Skip to content

Instantly share code, notes, and snippets.

@hughsk
Created September 1, 2013 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hughsk/6407805 to your computer and use it in GitHub Desktop.
Save hughsk/6407805 to your computer and use it in GitHub Desktop.
requirebin sketch
var observer = require('continuous-observer')
var cave = require('cave-automata-2d')
var fill = require('ndarray-fill')
var zero = require('zeros')
var raf = require('raf')
var canvas = document.createElement('canvas')
var ctx = canvas.getContext('2d')
// Set up the controls, so that we can control
// the camera with the arrow keys or WASD.
var controls = require('kb-controls-iframed')({
'<up>': 'up',
'<down>': 'down',
'<left>': 'left',
'<right>': 'right',
'W': 'up',
'S': 'down',
'A': 'left',
'D': 'right'
})
var field = require('ndarray-continuous')({
shape: [28, 28], // Make each chunk 28 elements high/wide
getter: getter
})
// This method generates a new chunk for
// the continuous ndarray if it's needed.
//
// Here we're creating an empty ndarray, then
// filling it up with cave-automata-2d. We're
// also inverting it so that we can get links
// between the chunks without much extra work.
function getter(position, done) {
var array = zero(this.shape)
cave(array)(10)
invert(array)
return done(null, array)
}
function invert(array) {
return fill(array, function(x, y) {
return 1 - array.get(x, y)
})
}
// We'll use continuous-observer to add and remove
// chunks as needed, based on the camera's position
// each frame.
var moveTo = observer(field)
var camera = {
x: 0,
y: 0
}
raf().on('data', function() {
if (controls.up) camera.y -= 0.25
if (controls.down) camera.y += 0.25
if (controls.left) camera.x -= 0.25
if (controls.right) camera.x += 0.25
moveTo([camera.x, camera.y])
ctx.fillStyle = '#f2f2f2'
ctx.fillRect(0, 0, canvas.width, canvas.height)
// Iterate over each chunk in the continuous-ndarray,
// drawing each one according to their position on the
// grid.
field.each(function(chunk) {
var pos = chunk.position
var w = chunk.shape[0]
var h = chunk.shape[1]
var offset = {
x: chunk.position[0] * chunk.shape[0],
y: chunk.position[1] * chunk.shape[1]
}
ctx.fillStyle = '#af3'
for (var x = 0; x < w; x += 1) {
for (var y = 0; y < h; y += 1) {
if (chunk.get(x, y) > 0) {
ctx.fillRect(
(offset.x + x - camera.x) * 40,
(offset.y + y - camera.y) * 40,
40,
40
)
}
}
}
})
})
document.body.style.margin =
document.body.style.padding = 0
document.body.style.overflow = 'hidden'
document.body.appendChild(canvas)
canvas.width = window.innerWidth
canvas.height = window.innerHeight
function getter(e,t){var r=zero(this.shape);return cave(r)(10),invert(r),t(null,r)}function invert(e){return fill(e,function(t,r){return 1-e.get(t,r)})}require=function(e,t,r){function n(r,o){if(!t[r]){if(!e[r]){var a="function"==typeof require&&require;if(!o&&a)return a(r,!0);if(i)return i(r,!0);throw Error("Cannot find module '"+r+"'")}var s=t[r]={exports:{}};e[r][0].call(s.exports,function(t){var i=e[r][1][t];return n(i?i:t)},s,s.exports)}return t[r].exports}for(var i="function"==typeof require&&require,o=0;r.length>o;o++)n(r[o]);return n}({"kb-controls-iframed":[function(e,t){t.exports=e("l20TNK")},{}],l20TNK:[function(e,t){var r=e("ever"),n=e("vkey"),i=Math.max;t.exports=function(e,t,o){function a(){for(var e in t)o[t[e]]=0,v[e]=1}function s(e){return function(){return a(),g=e,this}}function u(e){return function(t){g&&(t.preventDefault(),e(t))}}function p(e,r){return function(n){var a=e(n),s=t[a];s&&(o[s]+=r?i(v[a]--,0):-(v[a]=1),!r&&0>o[s]&&(o[s]=0))}}function c(e){return"<mouse "+e.which+">"}function l(e){return n[e.keyCode]||e.char}var f=null;if(void 0===t||!e.ownerDocument){o=t,t=e,e=this.document.body;try{f=window.top.document.body}catch(h){}}var d=r(e),y=f?r(f):d,v={},g=!0;o=o||{};for(var m in t){if("enabled"===t[m]||"enable"===t[m]||"disable"===t[m]||"destroy"===t[m])throw Error(t[m]+" is reserved");o[t[m]]=0,v[m]=1}return y.on("keyup",u(p(l,!1))),y.on("keydown",u(p(l,!0))),d.on("mouseup",u(p(c,!1))),d.on("mousedown",u(p(c,!0))),o.enabled=function(){return g},o.enable=s(!0),o.disable=s(!1),o.destroy=function(){y.removeAllListeners(),d.removeAllListeners()},o}},{ever:1,vkey:2}],2:[function(e,t){(function(){var e,r="undefined"!=typeof window?window.navigator.userAgent:"",n=/OS X/.test(r),i=/Opera/.test(r),o=!/like Gecko/.test(r)&&!i,a=t.exports={0:n?"<menu>":"<UNK>",1:"<mouse 1>",2:"<mouse 2>",3:"<break>",4:"<mouse 3>",5:"<mouse 4>",6:"<mouse 5>",8:"<backspace>",9:"<tab>",12:"<clear>",13:"<enter>",16:"<shift>",17:"<control>",18:"<alt>",19:"<pause>",20:"<caps-lock>",21:"<ime-hangul>",23:"<ime-junja>",24:"<ime-final>",25:"<ime-kanji>",27:"<escape>",28:"<ime-convert>",29:"<ime-nonconvert>",30:"<ime-accept>",31:"<ime-mode-change>",27:"<escape>",32:"<space>",33:"<page-up>",34:"<page-down>",35:"<end>",36:"<home>",37:"<left>",38:"<up>",39:"<right>",40:"<down>",41:"<select>",42:"<print>",43:"<execute>",44:"<snapshot>",45:"<insert>",46:"<delete>",47:"<help>",91:"<meta>",92:"<meta>",93:n?"<meta>":"<menu>",95:"<sleep>",106:"<num-*>",107:"<num-+>",108:"<num-enter>",109:"<num-->",110:"<num-.>",111:"<num-/>",144:"<num-lock>",145:"<scroll-lock>",160:"<shift-left>",161:"<shift-right>",162:"<control-left>",163:"<control-right>",164:"<alt-left>",165:"<alt-right>",166:"<browser-back>",167:"<browser-forward>",168:"<browser-refresh>",169:"<browser-stop>",170:"<browser-search>",171:"<browser-favorites>",172:"<browser-home>",173:n&&o?"-":"<volume-mute>",174:"<volume-down>",175:"<volume-up>",176:"<next-track>",177:"<prev-track>",178:"<stop>",179:"<play-pause>",180:"<launch-mail>",181:"<launch-media-select>",182:"<launch-app 1>",183:"<launch-app 2>",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",223:"<meta>",224:"<meta>",226:"<alt-gr>",229:"<ime-process>",231:i?"`":"<unicode>",246:"<attention>",247:"<crsel>",248:"<exsel>",249:"<erase-eof>",250:"<play>",251:"<zoom>",252:"<no-name>",253:"<pa-1>",254:"<clear>"};for(e=58;65>e;++e)a[e]=String.fromCharCode(e);for(e=48;58>e;++e)a[e]=e-48+"";for(e=65;91>e;++e)a[e]=String.fromCharCode(e);for(e=96;107>e;++e)a[e]="<num-"+(e-96)+">";for(e=112;136>e;++e)a[e]="F"+(e-111)})()},{}],1:[function(e,t){function r(e){this.element=e}function n(e){var t=Object.prototype.toString.call(e);return/\[object \S+Event\]/.test(t)}var i=e("events").EventEmitter;t.exports=function(e){return new r(e)},r.prototype=new i,r.prototype.on=function(e,t,r){return this._events||(this._events={}),this._events[e]||(this._events[e]=[]),this._events[e].push(t),this.element.addEventListener(e,t,r||!1),this},r.prototype.addListener=r.prototype.on,r.prototype.removeListener=function(e,t,r){this._events||(this._events={}),this.element.removeEventListener(e,t,r||!1);var n=this.listeners(e),i=n.indexOf(t);return i>=0&&n.splice(i,1),this},r.prototype.removeAllListeners=function(e){function t(e){for(var t=r.listeners(e),n=0;t.length>n;n++)r.removeListener(e,t[n])}var r=this;if(e)t(e);else if(r._events)for(var n in r._events)n&&t(n);return i.prototype.removeAllListeners.apply(r,arguments)};var o=e("./init.json");r.prototype.emit=function(e,t){if("object"==typeof e&&(t=e,e=t.type),!n(t)){var i=r.typeOf(e),a=t||{};void 0===a.type&&(a.type=e),t=document.createEvent(i+"s");for(var s="function"==typeof t["init"+i]?"init"+i:"initEvent",u=o[s],p={},c=[],l=0;u.length>l;l++){var f=u[l];c.push(a[f]),p[f]=!0}t[s].apply(t,c);for(var f in a)p[f]||(t[f]=a[f])}return this.element.dispatchEvent(t)},r.types=e("./types.json"),r.typeOf=function(){var e={};for(var t in r.types)for(var n=r.types[t],i=0;n.length>i;i++)e[n[i]]=t;return function(t){return e[t]||"Event"}}()},{events:3,"./types.json":4,"./init.json":5}],6:[function(e,t){var r=t.exports={};r.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var r=[];return window.addEventListener("message",function(e){if(e.source===window&&"process-tick"===e.data&&(e.stopPropagation(),r.length>0)){var t=r.shift();t()}},!0),function(e){r.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.binding=function(){throw Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw Error("process.chdir is not supported")}},{}],3:[function(e,t,r){(function(e){function t(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;e.length>r;r++)if(t===e[r])return r;return-1}e.EventEmitter||(e.EventEmitter=function(){});var n=r.EventEmitter=e.EventEmitter,i="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=10;n.prototype.setMaxListeners=function(e){this._events||(this._events={}),this._events.maxListeners=e},n.prototype.emit=function(e){if("error"===e&&(!this._events||!this._events.error||i(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var t=this._events[e];if(!t)return!1;if("function"==typeof t){switch(arguments.length){case 1:t.call(this);break;case 2:t.call(this,arguments[1]);break;case 3:t.call(this,arguments[1],arguments[2]);break;default:var r=Array.prototype.slice.call(arguments,1);t.apply(this,r)}return!0}if(i(t)){for(var r=Array.prototype.slice.call(arguments,1),n=t.slice(),o=0,a=n.length;a>o;o++)n[o].apply(this,r);return!0}return!1},n.prototype.addListener=function(e,t){if("function"!=typeof t)throw Error("addListener only takes instances of Function");if(this._events||(this._events={}),this.emit("newListener",e,t),this._events[e])if(i(this._events[e])){if(!this._events[e].warned){var r;r=void 0!==this._events.maxListeners?this._events.maxListeners:o,r&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),console.trace())}this._events[e].push(t)}else this._events[e]=[this._events[e],t];else this._events[e]=t;return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){var r=this;return r.on(e,function n(){r.removeListener(e,n),t.apply(this,arguments)}),this},n.prototype.removeListener=function(e,r){if("function"!=typeof r)throw Error("removeListener only takes instances of Function");if(!this._events||!this._events[e])return this;var n=this._events[e];if(i(n)){var o=t(n,r);if(0>o)return this;n.splice(o,1),0==n.length&&delete this._events[e]}else this._events[e]===r&&delete this._events[e];return this},n.prototype.removeAllListeners=function(e){return 0===arguments.length?(this._events={},this):(e&&this._events&&this._events[e]&&(this._events[e]=null),this)},n.prototype.listeners=function(e){return this._events||(this._events={}),this._events[e]||(this._events[e]=[]),i(this._events[e])||(this._events[e]=[this._events[e]]),this._events[e]}})(e("__browserify_process"))},{__browserify_process:6}],4:[function(e,t){t.exports={MouseEvent:["click","mousedown","mouseup","mouseover","mousemove","mouseout"],KeyBoardEvent:["keydown","keyup","keypress"],MutationEvent:["DOMSubtreeModified","DOMNodeInserted","DOMNodeRemoved","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","DOMAttrModified","DOMCharacterDataModified"],HTMLEvent:["load","unload","abort","error","select","change","submit","reset","focus","blur","resize","scroll"],UIEvent:["DOMFocusIn","DOMFocusOut","DOMActivate"]}},{}],5:[function(e,t){t.exports={initEvent:["type","canBubble","cancelable"],initUIEvent:["type","canBubble","cancelable","view","detail"],initMouseEvent:["type","canBubble","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget"],initMutationEvent:["type","canBubble","cancelable","relatedNode","prevValue","newValue","attrName","attrChange"]}},{}]},{},[]),require=function(e,t,r){function n(r,o){if(!t[r]){if(!e[r]){var a="function"==typeof require&&require;if(!o&&a)return a(r,!0);if(i)return i(r,!0);throw Error("Cannot find module '"+r+"'")}var s=t[r]={exports:{}};e[r][0].call(s.exports,function(t){var i=e[r][1][t];return n(i?i:t)},s,s.exports)}return t[r].exports}for(var i="function"==typeof require&&require,o=0;r.length>o;o++)n(r[o]);return n}({raf:[function(e,t){t.exports=e("3xkq9l")},{}],"3xkq9l":[function(e,t){(function(){function r(e){function t(){var n=r.now(),s=n-i;i=n,o.emit("data",s),o.paused||a(t,e)}var i=r.now(),o=new n;return o.pause=function(){o.paused=!0},o.resume=function(){o.paused=!1},a(t,e),o}t.exports=r;var n=e("events").EventEmitter,i="undefined"==typeof window?this:window,o=i.performance&&i.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date},a=i.requestAnimationFrame||i.webkitRequestAnimationFrame||i.mozRequestAnimationFrame||i.msRequestAnimationFrame||i.oRequestAnimationFrame||(i.setImmediate?function(e){setImmediate(e)}:function(e){setTimeout(e,0)});r.polyfill=a,r.now=o})()},{events:1}],2:[function(e,t){var r=t.exports={};r.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var r=[];return window.addEventListener("message",function(e){if(e.source===window&&"process-tick"===e.data&&(e.stopPropagation(),r.length>0)){var t=r.shift();t()}},!0),function(e){r.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.binding=function(){throw Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw Error("process.chdir is not supported")}},{}],1:[function(e,t,r){(function(e){function t(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;e.length>r;r++)if(t===e[r])return r;return-1}e.EventEmitter||(e.EventEmitter=function(){});var n=r.EventEmitter=e.EventEmitter,i="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=10;n.prototype.setMaxListeners=function(e){this._events||(this._events={}),this._events.maxListeners=e},n.prototype.emit=function(e){if("error"===e&&(!this._events||!this._events.error||i(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var t=this._events[e];if(!t)return!1;if("function"==typeof t){switch(arguments.length){case 1:t.call(this);break;case 2:t.call(this,arguments[1]);break;case 3:t.call(this,arguments[1],arguments[2]);break;default:var r=Array.prototype.slice.call(arguments,1);t.apply(this,r)}return!0}if(i(t)){for(var r=Array.prototype.slice.call(arguments,1),n=t.slice(),o=0,a=n.length;a>o;o++)n[o].apply(this,r);return!0}return!1},n.prototype.addListener=function(e,t){if("function"!=typeof t)throw Error("addListener only takes instances of Function");if(this._events||(this._events={}),this.emit("newListener",e,t),this._events[e])if(i(this._events[e])){if(!this._events[e].warned){var r;r=void 0!==this._events.maxListeners?this._events.maxListeners:o,r&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),console.trace())}this._events[e].push(t)}else this._events[e]=[this._events[e],t];else this._events[e]=t;return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){var r=this;return r.on(e,function n(){r.removeListener(e,n),t.apply(this,arguments)}),this},n.prototype.removeListener=function(e,r){if("function"!=typeof r)throw Error("removeListener only takes instances of Function");if(!this._events||!this._events[e])return this;var n=this._events[e];if(i(n)){var o=t(n,r);if(0>o)return this;n.splice(o,1),0==n.length&&delete this._events[e]}else this._events[e]===r&&delete this._events[e];return this},n.prototype.removeAllListeners=function(e){return 0===arguments.length?(this._events={},this):(e&&this._events&&this._events[e]&&(this._events[e]=null),this)},n.prototype.listeners=function(e){return this._events||(this._events={}),this._events[e]||(this._events[e]=[]),i(this._events[e])||(this._events[e]=[this._events[e]]),this._events[e]}})(e("__browserify_process"))},{__browserify_process:2}]},{},[]),require=function(e,t,r){function n(r,o){if(!t[r]){if(!e[r]){var a="function"==typeof require&&require;if(!o&&a)return a(r,!0);if(i)return i(r,!0);throw Error("Cannot find module '"+r+"'")}var s=t[r]={exports:{}};e[r][0].call(s.exports,function(t){var i=e[r][1][t];return n(i?i:t)},s,s.exports)}return t[r].exports}for(var i="function"==typeof require&&require,o=0;r.length>o;o++)n(r[o]);return n}({zeros:[function(e,t){t.exports=e("xvt2Cj")},{}],xvt2Cj:[function(e,t){"use strict";var r=e("ndarray");t.exports=function(e){for(var t=1,n=0;e.length>n;++n)t*=e[n];return r(new Float64Array(t),e)}},{ndarray:1}],1:[function(e,t){"use strict";function r(e,t){return e[0]-t[0]}function n(){var e,t=this.stride,n=Array(t.length);for(e=0;n.length>e;++e)n[e]=[Math.abs(t[e]),e];n.sort(r);var i=Array(n.length);for(e=0;i.length>e;++e)i[e]=n[e][1];return i}function i(e,t){if(0===t){var r=Function([p,"ZeroArray.prototype.dtype='"+e+"'","return function construct_ZeroArray(a,b,c,d){return new ZeroArray(a,d)}"].join("\n"));return r()}var i="generic"===e,o=["'use strict'"],a=s(t),l=a.map(function(e){return"i"+e}),f="this.offset+"+a.map(function(e){return["this._stride",e,"*i",e].join("")}).join("+"),h=["View",t,"d",e].join("");o.push(["function ",h,"(a,",a.map(function(e){return"b"+e}).join(","),",",a.map(function(e){return"c"+e}).join(","),",d){this.data=a"].join(""));for(var d=0;t>d;++d)o.push(["this._shape",d,"=b",d,"|0"].join(""));for(var d=0;t>d;++d)o.push(["this._stride",d,"=c",d,"|0"].join(""));o.push("this.offset=d|0}"),o.push(["var proto=",h,".prototype"].join("")),o.push(["proto.dtype='",e,"'"].join("")),o.push("proto.dimension="+t);var y=["VStride",t,"d",e].join(""),v=["VShape",t,"d",e].join(""),g={stride:y,shape:v};for(var m in g){var b=g[m];o.push(["function ",b,"(v) {this._v=v} var aproto=",b,".prototype"].join("")),o.push(["aproto.length=",t].join(""));for(var x=[],d=0;t>d;++d)x.push(["this._v._",m,d].join(""));o.push(["aproto.toJSON=function ",b,"_toJSON(){return [",x.join(","),"]}"].join("")),o.push(["aproto.toString=function ",b,"_toJSON(){return [",x.join(","),"].join()}"].join(""));for(var d=0;t>d;++d)o.push(["Object.defineProperty(aproto,",d,",{get:function(){return this._v._",m,d,"},set:function(v){return this._v._",m,d,"=v|0},enumerable:true})"].join(""));for(var d=0;u.length>d;++d)u[d]in Array.prototype&&o.push(["aproto.",u[d],"=Array.prototype.",u[d]].join(""));o.push(["Object.defineProperty(proto,'",m,"',{get:function ",b,"_get(){return new ",b,"(this)},set: function ",b,"_set(v){"].join(""));for(var d=0;t>d;++d)o.push(["this._",m,d,"=v[",d,"]|0"].join(""));o.push("return v}})")}o.push(["Object.defineProperty(proto,'size',{get:function ",h,"_size(){return ",a.map(function(e){return["this._shape",e].join("")}).join("*"),"}})"].join("")),1===t?o.push("proto.order=[0]"):(o.push("Object.defineProperty(proto,'order',{get:"),4>t?(o.push(["function ",h,"_order(){"].join("")),2===t?o.push("return (Math.abs(this._stride0)>Math.abs(this._stride1))?[1,0]:[0,1]}})"):3===t&&o.push("var s0=Math.abs(this._stride0),s1=Math.abs(this._stride1),s2=Math.abs(this._stride2);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):o.push("ORDER})")),o.push(["proto.set=function ",h,"_set(",l.join(","),",v){"].join("")),i?o.push(["return this.data.set(",f,",v)}"].join("")):o.push(["return this.data[",f,"]=v}"].join("")),o.push(["proto.get=function ",h,"_get(",l.join(","),"){"].join("")),i?o.push(["return this.data.get(",f,")}"].join("")):o.push(["return this.data[",f,"]}"].join("")),o.push(["proto.hi=function ",h,"_hi(",l.join(","),"){return new ",h,"(this.data,",a.map(function(e){return["typeof i",e,"!=='number'?this._shape",e,":i",e,"|0"].join("")}).join(","),",",a.map(function(e){return"this._stride"+e}).join(","),",this.offset)}"].join(""));var w=a.map(function(e){return"a"+e+"=this._shape"+e}),S=a.map(function(e){return"c"+e+"=this._stride"+e});o.push(["proto.lo=function ",h,"_lo(",l.join(","),"){var b=this.offset,d=0,",w.join(","),",",S.join(",")].join(""));for(var d=0;t>d;++d)o.push(["if(typeof i",d,"==='number'){d=i",d,"|0;b+=c",d,"*d;a",d,"-=d}"].join(""));o.push(["return new ",h,"(this.data,",a.map(function(e){return"a"+e}).join(","),",",a.map(function(e){return"c"+e}).join(","),",b)}"].join("")),o.push(["proto.step=function ",h,"_step(",l.join(","),"){var ",a.map(function(e){return"a"+e+"=this._shape"+e}).join(","),",",a.map(function(e){return"b"+e+"=this._stride"+e}).join(","),",c=this.offset,d=0,ceil=Math.ceil"].join(""));for(var d=0;t>d;++d)o.push(["if(typeof i",d,"==='number'){d=i",d,"|0;if(d<0){c+=b",d,"*(a",d,"-1);a",d,"=ceil(-a",d,"/d)}else{a",d,"=ceil(a",d,"/d)}b",d,"*=d}"].join(""));o.push(["return new ",h,"(this.data,",a.map(function(e){return"a"+e}).join(","),",",a.map(function(e){return"b"+e}).join(","),",c)}"].join(""));for(var E=Array(t),j=Array(t),d=0;t>d;++d)E[d]=["a[i",d,"|0]"].join(""),j[d]=["b[i",d,"|0]"].join("");o.push(["proto.transpose=function ",h,"_transpose(",l,"){var a=this.shape,b=this.stride;return new ",h,"(this.data,",E.join(","),",",j.join(","),",this.offset)}"].join("")),o.push(["proto.pick=function ",h,"_pick(",l,"){var a=[],b=[],c=this.offset"].join(""));for(var d=0;t>d;++d)o.push(["if(i",d,">=0){c=(c+this._stride",d,"*i",d,")|0}else{a.push(this._shape",d,");b.push(this._stride",d,")}"].join(""));o.push("var ctor=CTOR_LIST[a.length];return ctor(this.data,a,b,c)}"),o.push(["return function construct_",h,"(data,shape,stride,offset){return new ",h,"(data,",a.map(function(e){return"shape["+e+"]"}).join(","),",",a.map(function(e){return"stride["+e+"]"}).join(","),",offset)}"].join(""));var A=Function("CTOR_LIST","ORDER",o.join("\n"));return A(c[e],n)}function o(e){return e instanceof Float64Array?"float64":e instanceof Float32Array?"float32":e instanceof Int32Array?"int32":e instanceof Uint32Array?"uint32":e instanceof Uint8Array?"uint8":e instanceof Uint16Array?"uint16":e instanceof Int16Array?"int16":e instanceof Int8Array?"int8":e instanceof Array?"array":"generic"}function a(e,t,r,n){void 0===t&&(t=[e.length]);var a=t.length;if(void 0===r){r=Array(a);for(var s=a-1,u=1;s>=0;--s)r[s]=u,u*=t[s]}if(void 0===n){n=0;for(var s=0;a>s;++s)0>r[s]&&(n-=(t[s]-1)*r[s])}for(var p=o(e),l=c[p];a>=l.length;)l.push(i(p,l.length));var f=l[a];return f(e,t,r,n)}var s=e("iota-array"),u=["concat","join","slice","toString","indexOf","lastIndexOf","forEach","every","some","filter","map","reduce","reduceRight"],p="function ZeroArray(a,d) {this.data = a;this.offset = d};var proto=ZeroArray.prototype;proto.size=0;proto.shape=[];proto.stride=[];proto.order=[];proto.get=proto.set=function() {return Number.NaN};proto.lo=proto.hi=proto.transpose=proto.step=proto.pick=function() {return new ZeroArray(this.data,this.shape,this.stride,this.offset)}",c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],generic:[]};t.exports=a},{"iota-array":2}],2:[function(e,t){"use strict";function r(e){for(var t=Array(e),r=0;e>r;++r)t[r]=r;return t}t.exports=r},{}]},{},[]),require=function(e,t,r){function n(r,o){if(!t[r]){if(!e[r]){var a="function"==typeof require&&require;if(!o&&a)return a(r,!0);if(i)return i(r,!0);throw Error("Cannot find module '"+r+"'")}var s=t[r]={exports:{}};e[r][0].call(s.exports,function(t){var i=e[r][1][t];return n(i?i:t)},s,s.exports)}return t[r].exports}for(var i="function"==typeof require&&require,o=0;r.length>o;o++)n(r[o]);return n}({"cave-automata-2d":[function(e,t){t.exports=e("CKdiaf")},{}],CKdiaf:[function(e,t){function r(e,t){function r(t){u=n,p=i,c=y,l=d,t=t||1;for(var r=0;t>r;r+=1)r%2?g(e,f):g(f,e);return t%2&&o(e,function(e,t){return f.get(e,t)}),e}t=t||{};var n=e.shape[0],i=e.shape[1],f=t.buffer||a([n,i]),h=t.density||.5,d=t.threshold||5,y="border"in t?t.border:1,v="fill"in t?t.fill:!0,g=s[y?"border":"vanilla"];return v&&o(e,function(e,t){return h>=Math.random()||1>=e||e>=n-2||1>=t||t>=i-2?1:0}),t.iterations&&r(t.iterations),r}var n=e("moore")(1,2).concat([[0,0]]),i=e("ndarray-stencil"),o=e("ndarray-fill"),a=e("zeros");n.length;var s={};t.exports=r;var u=null,p=null,c=null,l=null;s.vanilla=i(n,function(e,t,r,n,i,o,a,s,u){return e+t+r+n+i+o+a+s+u>=l?1:0},{useIndex:!1}),s.border=i(n,function(e,t,r,n,i,o,a,s,f,h){return e+t+r+n+i+o+a+s+f>=l||c>h[0]||h[0]>u-c-3||c>h[1]||h[1]>p-c-3?1:0},{useIndex:!0})},{moore:1,"ndarray-fill":2,zeros:3,"ndarray-stencil":4}],1:[function(e,t){function r(e,t){function r(n,i,o){if(o===t-1)for(var a=-e;e>=a;a+=1)(a||i.some(function(e){return e}))&&n.push(i.concat(a));else for(var a=-e;e>=a;a+=1)r(n,i.concat(a),o+1);return n}return t=t||2,e=e||1,r([],[],0)}t.exports=r},{}],3:[function(e,t){"use strict";var r=e("ndarray");t.exports=function(e){for(var t=1,n=0;e.length>n;++n)t*=e[n];return r(new Float64Array(t),e)}},{ndarray:5}],2:[function(e,t){"use strict";var r=e("cwise")({args:["index","array","scalar"],body:function(e,t,r){t=r.apply(void 0,e)}});t.exports=function(e,t){return r(e,t),e}},{cwise:6}],4:[function(e,t){"use strict";function r(e,t,r,n){for(var i=[],o=["scalar","array"],a=0;e>a;++a)o.push("array"),i.push("a"+a);n.useIndex&&(i.push("idx"),o.push("index")),i.push(["out=func(",i.join(","),")"].join("")),i.unshift("out"),i.unshift("func");var s=u({args:o,body:Function.apply(void 0,i),funcName:"StencilOp"});return s.bind(void 0,r)}function n(e,t){for(var r=Array(t.length),n=0;e.length>n;++n){var i=-t[n]-e[n];r[n]=0===i?"s"+n:["s",n,"-",-i].join("")}return r.join(",")}function i(e,t){for(var r=Array(t.length),n=0;e.length>n;++n){var i=-e[n]-t[n];r[n]=0===i?"0":i}return r.join(",")}function o(e,t,r,o){e.length;var a=t.length,u=["'use strict'"];u.push("var s=out.shape");for(var p=0;a>p;++p)u.push(["var s",p,"=s[",p,"]|0"].join(""));u.push(["func(out.hi(",n(r,s(a)),").lo(",i(t,s(a)),")"].join(""));for(var p=0;e.length>p;++p)u.push([",inp.hi(",n(r,e[p]),").lo(",i(t,e[p]),")"].join(""));u.push(")");var c=Function("func","out","inp",u.join("\n"));return c.bind(void 0,o)}function a(e,t,n){if(n=n||{},0===e.length)throw Error("ndarray-stencil: Need to specify at least one point for stencil");for(var i=e.length,a=e[0].length,u=s(a),p=s(a),c=0;i>c;++c)for(var l=e[c],f=0;a>f;++f)u[f]=Math.min(u[f],l[f]),p[f]=Math.max(p[f],l[f]);var h=r(i,a,t,n);return o(e,u,p,h)}var s=e("dup"),u=e("cwise");t.exports=a},{cwise:7,dup:8}],8:[function(e,t){"use strict";function r(e,t,n){var i=0|e[n];if(0>=i)return[];var o,a=Array(i);if(n===e.length-1)for(o=0;i>o;++o)a[o]=t;else for(o=0;i>o;++o)a[o]=r(e,t,n+1);return a}function n(e,t){var r,n;for(r=Array(e),n=0;e>n;++n)r[n]=t;return r}function i(e,t){switch(t===void 0&&(t=0),typeof e){case"number":if(e>0)return n(0|e,t);break;case"object":if("number"==typeof e.length)return r(e,t,0)}return[]}t.exports=i},{}],5:[function(e,t){"use strict";function r(e,t){return e[0]-t[0]}function n(){var e,t=this.stride,n=Array(t.length);for(e=0;n.length>e;++e)n[e]=[Math.abs(t[e]),e];n.sort(r);var i=Array(n.length);for(e=0;i.length>e;++e)i[e]=n[e][1];return i}function i(e,t){if(0===t){var r=Function([p,"ZeroArray.prototype.dtype='"+e+"'","return function construct_ZeroArray(a,b,c,d){return new ZeroArray(a,d)}"].join("\n"));return r()}var i="generic"===e,o=["'use strict'"],a=s(t),l=a.map(function(e){return"i"+e}),f="this.offset+"+a.map(function(e){return["this._stride",e,"*i",e].join("")}).join("+"),h=["View",t,"d",e].join("");o.push(["function ",h,"(a,",a.map(function(e){return"b"+e}).join(","),",",a.map(function(e){return"c"+e}).join(","),",d){this.data=a"].join(""));for(var d=0;t>d;++d)o.push(["this._shape",d,"=b",d,"|0"].join(""));for(var d=0;t>d;++d)o.push(["this._stride",d,"=c",d,"|0"].join(""));o.push("this.offset=d|0}"),o.push(["var proto=",h,".prototype"].join("")),o.push(["proto.dtype='",e,"'"].join("")),o.push("proto.dimension="+t);var y=["VStride",t,"d",e].join(""),v=["VShape",t,"d",e].join(""),g={stride:y,shape:v};for(var m in g){var b=g[m];o.push(["function ",b,"(v) {this._v=v} var aproto=",b,".prototype"].join("")),o.push(["aproto.length=",t].join(""));for(var x=[],d=0;t>d;++d)x.push(["this._v._",m,d].join(""));o.push(["aproto.toJSON=function ",b,"_toJSON(){return [",x.join(","),"]}"].join("")),o.push(["aproto.toString=function ",b,"_toJSON(){return [",x.join(","),"].join()}"].join(""));for(var d=0;t>d;++d)o.push(["Object.defineProperty(aproto,",d,",{get:function(){return this._v._",m,d,"},set:function(v){return this._v._",m,d,"=v|0},enumerable:true})"].join(""));for(var d=0;u.length>d;++d)u[d]in Array.prototype&&o.push(["aproto.",u[d],"=Array.prototype.",u[d]].join(""));o.push(["Object.defineProperty(proto,'",m,"',{get:function ",b,"_get(){return new ",b,"(this)},set: function ",b,"_set(v){"].join(""));for(var d=0;t>d;++d)o.push(["this._",m,d,"=v[",d,"]|0"].join(""));o.push("return v}})")}o.push(["Object.defineProperty(proto,'size',{get:function ",h,"_size(){return ",a.map(function(e){return["this._shape",e].join("")}).join("*"),"}})"].join("")),1===t?o.push("proto.order=[0]"):(o.push("Object.defineProperty(proto,'order',{get:"),4>t?(o.push(["function ",h,"_order(){"].join("")),2===t?o.push("return (Math.abs(this._stride0)>Math.abs(this._stride1))?[1,0]:[0,1]}})"):3===t&&o.push("var s0=Math.abs(this._stride0),s1=Math.abs(this._stride1),s2=Math.abs(this._stride2);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):o.push("ORDER})")),o.push(["proto.set=function ",h,"_set(",l.join(","),",v){"].join("")),i?o.push(["return this.data.set(",f,",v)}"].join("")):o.push(["return this.data[",f,"]=v}"].join("")),o.push(["proto.get=function ",h,"_get(",l.join(","),"){"].join("")),i?o.push(["return this.data.get(",f,")}"].join("")):o.push(["return this.data[",f,"]}"].join("")),o.push(["proto.hi=function ",h,"_hi(",l.join(","),"){return new ",h,"(this.data,",a.map(function(e){return["typeof i",e,"!=='number'?this._shape",e,":i",e,"|0"].join("")}).join(","),",",a.map(function(e){return"this._stride"+e}).join(","),",this.offset)}"].join(""));var w=a.map(function(e){return"a"+e+"=this._shape"+e}),S=a.map(function(e){return"c"+e+"=this._stride"+e});o.push(["proto.lo=function ",h,"_lo(",l.join(","),"){var b=this.offset,d=0,",w.join(","),",",S.join(",")].join(""));for(var d=0;t>d;++d)o.push(["if(typeof i",d,"==='number'){d=i",d,"|0;b+=c",d,"*d;a",d,"-=d}"].join(""));o.push(["return new ",h,"(this.data,",a.map(function(e){return"a"+e}).join(","),",",a.map(function(e){return"c"+e}).join(","),",b)}"].join("")),o.push(["proto.step=function ",h,"_step(",l.join(","),"){var ",a.map(function(e){return"a"+e+"=this._shape"+e}).join(","),",",a.map(function(e){return"b"+e+"=this._stride"+e}).join(","),",c=this.offset,d=0,ceil=Math.ceil"].join(""));for(var d=0;t>d;++d)o.push(["if(typeof i",d,"==='number'){d=i",d,"|0;if(d<0){c+=b",d,"*(a",d,"-1);a",d,"=ceil(-a",d,"/d)}else{a",d,"=ceil(a",d,"/d)}b",d,"*=d}"].join(""));o.push(["return new ",h,"(this.data,",a.map(function(e){return"a"+e}).join(","),",",a.map(function(e){return"b"+e}).join(","),",c)}"].join(""));for(var E=Array(t),j=Array(t),d=0;t>d;++d)E[d]=["a[i",d,"|0]"].join(""),j[d]=["b[i",d,"|0]"].join("");o.push(["proto.transpose=function ",h,"_transpose(",l,"){var a=this.shape,b=this.stride;return new ",h,"(this.data,",E.join(","),",",j.join(","),",this.offset)}"].join("")),o.push(["proto.pick=function ",h,"_pick(",l,"){var a=[],b=[],c=this.offset"].join(""));for(var d=0;t>d;++d)o.push(["if(i",d,">=0){c=(c+this._stride",d,"*i",d,")|0}else{a.push(this._shape",d,");b.push(this._stride",d,")}"].join(""));o.push("var ctor=CTOR_LIST[a.length];return ctor(this.data,a,b,c)}"),o.push(["return function construct_",h,"(data,shape,stride,offset){return new ",h,"(data,",a.map(function(e){return"shape["+e+"]"}).join(","),",",a.map(function(e){return"stride["+e+"]"}).join(","),",offset)}"].join(""));var A=Function("CTOR_LIST","ORDER",o.join("\n"));return A(c[e],n)}function o(e){return e instanceof Float64Array?"float64":e instanceof Float32Array?"float32":e instanceof Int32Array?"int32":e instanceof Uint32Array?"uint32":e instanceof Uint8Array?"uint8":e instanceof Uint16Array?"uint16":e instanceof Int16Array?"int16":e instanceof Int8Array?"int8":e instanceof Array?"array":"generic"}function a(e,t,r,n){void 0===t&&(t=[e.length]);var a=t.length;if(void 0===r){r=Array(a);for(var s=a-1,u=1;s>=0;--s)r[s]=u,u*=t[s]}if(void 0===n){n=0;for(var s=0;a>s;++s)0>r[s]&&(n-=(t[s]-1)*r[s])}for(var p=o(e),l=c[p];a>=l.length;)l.push(i(p,l.length));var f=l[a];return f(e,t,r,n)}var s=e("iota-array"),u=["concat","join","slice","toString","indexOf","lastIndexOf","forEach","every","some","filter","map","reduce","reduceRight"],p="function ZeroArray(a,d) {this.data = a;this.offset = d};var proto=ZeroArray.prototype;proto.size=0;proto.shape=[];proto.stride=[];proto.order=[];proto.get=proto.set=function() {return Number.NaN};proto.lo=proto.hi=proto.transpose=proto.step=proto.pick=function() {return new ZeroArray(this.data,this.shape,this.stride,this.offset)}",c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],generic:[]};t.exports=a},{"iota-array":9}],6:[function(e,t){"use strict";function r(e){for(var t in e)0>o.indexOf(t)&&0>a.indexOf(t)&&console.warn("cwise: Unknown argument '"+t+"' passed to expression compiler");for(var r=0;o.length>r;++r)if(!e[o[r]])throw Error("cwise: Missing argument: "+o[r]);return i({args:e.args,pre:n(e.pre||function(){}),body:n(e.body),post:n(e.post||function(){}),debug:!!e.printCode,funcName:e.funcName||e.body.name||"cwise",blockSize:e.blockSize||64})}var n=e("cwise-parser"),i=e("cwise-compiler"),o=["args","body"],a=["pre","post","printCode","funcName","blockSize"];t.exports=r},{"cwise-compiler":10,"cwise-parser":11}],7:[function(e,t){"use strict";function r(e){for(var t in e)0>o.indexOf(t)&&0>a.indexOf(t)&&console.warn("cwise: Unknown argument '"+t+"' passed to expression compiler");
for(var r=0;o.length>r;++r)if(!e[o[r]])throw Error("cwise: Missing argument: "+o[r]);return i({args:e.args,pre:n(e.pre||function(){}),body:n(e.body),post:n(e.post||function(){}),debug:!!e.printCode,funcName:e.funcName||e.body.name||"cwise",blockSize:e.blockSize||64})}var n=e("cwise-parser"),i=e("cwise-compiler"),o=["args","body"],a=["pre","post","printCode","funcName","blockSize"];t.exports=r},{"cwise-parser":12,"cwise-compiler":13}],9:[function(e,t){"use strict";function r(e){for(var t=Array(e),r=0;e>r;++r)t[r]=r;return t}t.exports=r},{}],10:[function(e,t){"use strict";function r(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.scalarArgs=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}function n(e){var t=new r;t.pre=e.pre,t.body=e.body,t.post=e.post;var n=e.args.slice(0);t.argTypes=n;for(var o=0;n.length>o;++o)switch(n[o]){case"array":if(t.arrayArgs.push(o),t.shimArgs.push("array"+o),t.pre.args.length>o&&t.pre.args[o].count>0)throw Error("cwise: pre() block may not reference array args");if(t.post.args.length>o&&t.post.args[o].count>0)throw Error("cwise: post() block may not reference array args");break;case"scalar":t.scalarArgs.push(o),t.shimArgs.push("scalar"+o);break;case"index":if(t.indexArgs.push(o),t.pre.args.length>o&&t.pre.args[o].count>0)throw Error("cwise: pre() block may not reference array index");if(t.body.args.length>o&&t.body.args[o].lvalue)throw Error("cwise: body() block may not write to array index");if(t.post.args.length>o&&t.post.args[o].count>0)throw Error("cwise: post() block may not reference array index");break;case"shape":if(t.shapeArgs.push(o),t.pre.args.length>o&&t.pre.args[o].lvalue)throw Error("cwise: pre() block may not write to array shape");if(t.body.args.length>o&&t.body.args[o].lvalue)throw Error("cwise: body() block may not write to array shape");if(t.post.args.length>o&&t.post.args[o].lvalue)throw Error("cwise: post() block may not write to array shape");break;default:throw Error("cwise: Unknown argument type "+n[o])}if(0>=t.arrayArgs.length)throw Error("cwise: No array arguments specified");if(t.pre.args.length>n.length)throw Error("cwise: Too many arguments in pre() block");if(t.body.args.length>n.length)throw Error("cwise: Too many arguments in body() block");if(t.post.args.length>n.length)throw Error("cwise: Too many arguments in post() block");return t.debug=!!e.printCode||!!e.debug,t.funcName=e.funcName||"cwise",t.blockSize=e.blockSize||64,i(t)}var i=e("./lib/thunk.js");t.exports=n},{"./lib/thunk.js":14}],13:[function(e,t){"use strict";function r(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.scalarArgs=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}function n(e){var t=new r;t.pre=e.pre,t.body=e.body,t.post=e.post;var n=e.args.slice(0);t.argTypes=n;for(var o=0;n.length>o;++o)switch(n[o]){case"array":if(t.arrayArgs.push(o),t.shimArgs.push("array"+o),t.pre.args.length>o&&t.pre.args[o].count>0)throw Error("cwise: pre() block may not reference array args");if(t.post.args.length>o&&t.post.args[o].count>0)throw Error("cwise: post() block may not reference array args");break;case"scalar":t.scalarArgs.push(o),t.shimArgs.push("scalar"+o);break;case"index":if(t.indexArgs.push(o),t.pre.args.length>o&&t.pre.args[o].count>0)throw Error("cwise: pre() block may not reference array index");if(t.body.args.length>o&&t.body.args[o].lvalue)throw Error("cwise: body() block may not write to array index");if(t.post.args.length>o&&t.post.args[o].count>0)throw Error("cwise: post() block may not reference array index");break;case"shape":if(t.shapeArgs.push(o),t.pre.args.length>o&&t.pre.args[o].lvalue)throw Error("cwise: pre() block may not write to array shape");if(t.body.args.length>o&&t.body.args[o].lvalue)throw Error("cwise: body() block may not write to array shape");if(t.post.args.length>o&&t.post.args[o].lvalue)throw Error("cwise: post() block may not write to array shape");break;default:throw Error("cwise: Unknown argument type "+n[o])}if(0>=t.arrayArgs.length)throw Error("cwise: No array arguments specified");if(t.pre.args.length>n.length)throw Error("cwise: Too many arguments in pre() block");if(t.body.args.length>n.length)throw Error("cwise: Too many arguments in body() block");if(t.post.args.length>n.length)throw Error("cwise: Too many arguments in post() block");return t.debug=!!e.printCode||!!e.debug,t.funcName=e.funcName||"cwise",t.blockSize=e.blockSize||64,i(t)}var i=e("./lib/thunk.js");t.exports=n},{"./lib/thunk.js":15}],11:[function(e,t){"use strict";function r(e,t,r){this.name=e,this.lvalue=t,this.rvalue=r,this.count=0}function n(e,t,r,n){this.body=e,this.args=t,this.thisVars=r,this.localVars=n}function i(e){if("eval"===e)throw Error("cwise-parser: eval() not allowed");return"undefined"!=typeof window?e in window:"undefined"!=typeof GLOBAL?e in GLOBAL:"undefined"!=typeof self?e in self:!1}function o(e){for(var t=e.body[0].expression.callee.params,r=Array(t.length),n=0;t.length>n;++n)r[n]=t[n].name;return r}function a(e){function t(e){var t=v+e.replace(/\_/g,"__");return S.push(t),t}function a(e){var t="this_"+e.replace(/\_/g,"__");return E.push(t),t}function c(e,t){for(var r=e.range[0],n=e.range[1],i=r+1;n>i;++i)x[i]="";x[r]=t}function l(e){return"'"+e.replace(/\_/g,"\\_").replace(/\'/g,"'")+"'"}function f(e){return x.slice(e.range[0],e.range[1]).join("")}function h(e){return"AssignmentExpression"===e.parent.type&&e.parent.left===e?"="===e.parent.operator?j:j|A:"UpdateExpression"===e.parent.type?j|A:A}for(var d=["(",e,")()"].join(""),y=s.parse(d,{range:!0}),v="_inline_"+p++ +"_",g=o(y),m=Array(g.length),b=0;g.length>b;++b)m[b]=new r([v,"arg",b,"_"].join(""),!1,!1);for(var x=Array(d.length),b=0,w=d.length;w>b;++b)x[b]=d.charAt(b);var S=[],E=[],j=1,A=2;(function k(e,r){if(e.parent=r,"MemberExpression"===e.type)e.computed?(k(e.object,e),k(e.property,e)):"ThisExpression"===e.object.type?c(e,a(e.property.name)):k(e.object,e);else{if("ThisExpression"===e.type)throw Error("cwise-parser: Computed this is not allowed");if("Identifier"===e.type){var n=e.name,o=g.indexOf(n);if(o>=0){var s=m[o],u=h(e);u&j&&(s.lvalue=!0),u&A&&(s.rvalue=!0),++s.count,c(e,s.name)}else i(n)||c(e,t(n))}else if("Literal"===e.type)"string"==typeof e.value&&c(e,l(e.value));else{if("WithStatement"===e.type)throw Error("cwise-parser: with() statements not allowed");for(var p=Object.keys(e),f=0,d=p.length;d>f;++f)if("parent"!==p[f]){var y=e[p[f]];if(y)if(y instanceof Array)for(var v=0;y.length>v;++v)y[v]&&"string"==typeof y[v].type&&k(y[v],e);else"string"==typeof y.type&&k(y,e)}}}})(y.body[0].expression.callee.body,void 0),u(S),u(E);var L=new n(f(y.body[0].expression.callee.body),m,E,S);return L}var s=e("esprima"),u=e("uniq"),p=0;t.exports=a},{esprima:16,uniq:17}],12:[function(e,t){"use strict";function r(e,t,r){this.name=e,this.lvalue=t,this.rvalue=r,this.count=0}function n(e,t,r,n){this.body=e,this.args=t,this.thisVars=r,this.localVars=n}function i(e){if("eval"===e)throw Error("cwise-parser: eval() not allowed");return"undefined"!=typeof window?e in window:"undefined"!=typeof GLOBAL?e in GLOBAL:"undefined"!=typeof self?e in self:!1}function o(e){for(var t=e.body[0].expression.callee.params,r=Array(t.length),n=0;t.length>n;++n)r[n]=t[n].name;return r}function a(e){function t(e){var t=v+e.replace(/\_/g,"__");return S.push(t),t}function a(e){var t="this_"+e.replace(/\_/g,"__");return E.push(t),t}function c(e,t){for(var r=e.range[0],n=e.range[1],i=r+1;n>i;++i)x[i]="";x[r]=t}function l(e){return"'"+e.replace(/\_/g,"\\_").replace(/\'/g,"'")+"'"}function f(e){return x.slice(e.range[0],e.range[1]).join("")}function h(e){return"AssignmentExpression"===e.parent.type&&e.parent.left===e?"="===e.parent.operator?j:j|A:"UpdateExpression"===e.parent.type?j|A:A}for(var d=["(",e,")()"].join(""),y=s.parse(d,{range:!0}),v="_inline_"+p++ +"_",g=o(y),m=Array(g.length),b=0;g.length>b;++b)m[b]=new r([v,"arg",b,"_"].join(""),!1,!1);for(var x=Array(d.length),b=0,w=d.length;w>b;++b)x[b]=d.charAt(b);var S=[],E=[],j=1,A=2;(function k(e,r){if(e.parent=r,"MemberExpression"===e.type)e.computed?(k(e.object,e),k(e.property,e)):"ThisExpression"===e.object.type?c(e,a(e.property.name)):k(e.object,e);else{if("ThisExpression"===e.type)throw Error("cwise-parser: Computed this is not allowed");if("Identifier"===e.type){var n=e.name,o=g.indexOf(n);if(o>=0){var s=m[o],u=h(e);u&j&&(s.lvalue=!0),u&A&&(s.rvalue=!0),++s.count,c(e,s.name)}else i(n)||c(e,t(n))}else if("Literal"===e.type)"string"==typeof e.value&&c(e,l(e.value));else{if("WithStatement"===e.type)throw Error("cwise-parser: with() statements not allowed");for(var p=Object.keys(e),f=0,d=p.length;d>f;++f)if("parent"!==p[f]){var y=e[p[f]];if(y)if(y instanceof Array)for(var v=0;y.length>v;++v)y[v]&&"string"==typeof y[v].type&&k(y[v],e);else"string"==typeof y.type&&k(y,e)}}}})(y.body[0].expression.callee.body,void 0),u(S),u(E);var L=new n(f(y.body[0].expression.callee.body),m,E,S);return L}var s=e("esprima"),u=e("uniq"),p=0;t.exports=a},{esprima:18,uniq:19}],14:[function(e,t){"use strict";function r(e){var t=["'use strict'","var CACHED={}"],r=[],i=e.funcName+"_cwise_thunk";t.push(["return function ",i,"(",e.shimArgs.join(","),"){"].join(""));for(var o=[],a=[],s=[["array",e.arrayArgs[0],".shape"].join("")],u=0;e.arrayArgs.length>u;++u){var p=e.arrayArgs[u];r.push(["t",p,"=array",p,".dtype,","r",p,"=array",p,".order"].join("")),o.push("t"+p),o.push("r"+p),a.push("t"+p),a.push("r"+p+".join()"),s.push("array"+p+".data"),s.push("array"+p+".stride"),s.push("array"+p+".offset|0")}for(var u=0;e.scalarArgs.length>u;++u)s.push("scalar"+e.scalarArgs[u]);r.push(["type=[",a.join(","),"].join()"].join("")),r.push("proc=CACHED[type]"),t.push("var "+r.join(",")),t.push(["if(!proc){","CACHED[type]=proc=compile([",o.join(","),"])}","return proc(",s.join(","),")}"].join("")),e.debug&&console.log("Generated thunk:",t.join("\n"));var c=Function("compile",t.join("\n"));return c(n.bind(void 0,e))}var n=e("./compile.js");t.exports=r},{"./compile.js":20}],15:[function(e,t){"use strict";function r(e){var t=["'use strict'","var CACHED={}"],r=[],i=e.funcName+"_cwise_thunk";t.push(["return function ",i,"(",e.shimArgs.join(","),"){"].join(""));for(var o=[],a=[],s=[["array",e.arrayArgs[0],".shape"].join("")],u=0;e.arrayArgs.length>u;++u){var p=e.arrayArgs[u];r.push(["t",p,"=array",p,".dtype,","r",p,"=array",p,".order"].join("")),o.push("t"+p),o.push("r"+p),a.push("t"+p),a.push("r"+p+".join()"),s.push("array"+p+".data"),s.push("array"+p+".stride"),s.push("array"+p+".offset|0")}for(var u=0;e.scalarArgs.length>u;++u)s.push("scalar"+e.scalarArgs[u]);r.push(["type=[",a.join(","),"].join()"].join("")),r.push("proc=CACHED[type]"),t.push("var "+r.join(",")),t.push(["if(!proc){","CACHED[type]=proc=compile([",o.join(","),"])}","return proc(",s.join(","),")}"].join("")),e.debug&&console.log("Generated thunk:",t.join("\n"));var c=Function("compile",t.join("\n"));return c(n.bind(void 0,e))}var n=e("./compile.js");t.exports=r},{"./compile.js":21}],16:[function(e,t,r){(function(){(function(e,t){"use strict";"function"==typeof define&&define.amd?define(["exports"],t):r!==void 0?t(r):t(e.esprima={})})(this,function(e){"use strict";function t(e,t){if(!e)throw Error("ASSERT: "+t)}function r(e,t){return fr.slice(e,t)}function n(e){return"0123456789".indexOf(e)>=0}function i(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function o(e){return"01234567".indexOf(e)>=0}function a(e){return" "===e||" "===e||" "===e||"\f"===e||" "===e||e.charCodeAt(0)>=5760&&" ᠎              ".indexOf(e)>=0}function s(e){return"\n"===e||"\r"===e||"\u2028"===e||"\u2029"===e}function u(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&"z">=e||e>="A"&&"Z">=e||e.charCodeAt(0)>=128&&lr.NonAsciiIdentifierStart.test(e)}function p(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&"z">=e||e>="A"&&"Z">=e||e>="0"&&"9">=e||e.charCodeAt(0)>=128&&lr.NonAsciiIdentifierPart.test(e)}function c(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0}return!1}function l(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0}return!1}function f(e){return"eval"===e||"arguments"===e}function h(e){var t=!1;switch(e.length){case 2:t="if"===e||"in"===e||"do"===e;break;case 3:t="var"===e||"for"===e||"new"===e||"try"===e;break;case 4:t="this"===e||"else"===e||"case"===e||"void"===e||"with"===e;break;case 5:t="while"===e||"break"===e||"catch"===e||"throw"===e;break;case 6:t="return"===e||"typeof"===e||"delete"===e||"switch"===e;break;case 7:t="default"===e||"finally"===e;break;case 8:t="function"===e||"continue"===e||"debugger"===e;break;case 10:t="instanceof"===e}if(t)return!0;switch(e){case"const":return!0;case"yield":case"let":return!0}return hr&&l(e)?!0:c(e)}function d(){var e,t,r;for(t=!1,r=!1;gr>dr;)if(e=fr[dr],r)e=fr[dr++],s(e)&&(r=!1,"\r"===e&&"\n"===fr[dr]&&++dr,++yr,vr=dr);else if(t)s(e)?("\r"===e&&"\n"===fr[dr+1]&&++dr,++yr,++dr,vr=dr,dr>=gr&&k({},cr.UnexpectedToken,"ILLEGAL")):(e=fr[dr++],dr>=gr&&k({},cr.UnexpectedToken,"ILLEGAL"),"*"===e&&(e=fr[dr],"/"===e&&(++dr,t=!1)));else if("/"===e)if(e=fr[dr+1],"/"===e)dr+=2,r=!0;else{if("*"!==e)break;dr+=2,t=!0,dr>=gr&&k({},cr.UnexpectedToken,"ILLEGAL")}else if(a(e))++dr;else{if(!s(e))break;++dr,"\r"===e&&"\n"===fr[dr]&&++dr,++yr,vr=dr}}function y(e){var t,r,n,o=0;for(r="u"===e?4:2,t=0;r>t;++t){if(!(gr>dr&&i(fr[dr])))return"";n=fr[dr++],o=16*o+"0123456789abcdef".indexOf(n.toLowerCase())}return String.fromCharCode(o)}function v(){var e,t,r,n;if(e=fr[dr],u(e)){if(t=dr,"\\"===e){if(++dr,"u"!==fr[dr])return;if(++dr,n=dr,e=y("u")){if("\\"===e||!u(e))return;r=e}else dr=n,r="u"}else r=fr[dr++];for(;gr>dr&&(e=fr[dr],p(e));)if("\\"===e){if(++dr,"u"!==fr[dr])return;if(++dr,n=dr,e=y("u")){if("\\"===e||!p(e))return;r+=e}else dr=n,r+="u"}else r+=fr[dr++];return 1===r.length?{type:ar.Identifier,value:r,lineNumber:yr,lineStart:vr,range:[t,dr]}:h(r)?{type:ar.Keyword,value:r,lineNumber:yr,lineStart:vr,range:[t,dr]}:"null"===r?{type:ar.NullLiteral,value:r,lineNumber:yr,lineStart:vr,range:[t,dr]}:"true"===r||"false"===r?{type:ar.BooleanLiteral,value:r,lineNumber:yr,lineStart:vr,range:[t,dr]}:{type:ar.Identifier,value:r,lineNumber:yr,lineStart:vr,range:[t,dr]}}}function g(){var e,t,r,i=dr,o=fr[dr];return";"===o||"{"===o||"}"===o?(++dr,{type:ar.Punctuator,value:o,lineNumber:yr,lineStart:vr,range:[i,dr]}):","===o||"("===o||")"===o?(++dr,{type:ar.Punctuator,value:o,lineNumber:yr,lineStart:vr,range:[i,dr]}):(e=fr[dr+1],"."!==o||n(e)?(t=fr[dr+2],r=fr[dr+3],">"===o&&">"===e&&">"===t&&"="===r?(dr+=4,{type:ar.Punctuator,value:">>>=",lineNumber:yr,lineStart:vr,range:[i,dr]}):"="===o&&"="===e&&"="===t?(dr+=3,{type:ar.Punctuator,value:"===",lineNumber:yr,lineStart:vr,range:[i,dr]}):"!"===o&&"="===e&&"="===t?(dr+=3,{type:ar.Punctuator,value:"!==",lineNumber:yr,lineStart:vr,range:[i,dr]}):">"===o&&">"===e&&">"===t?(dr+=3,{type:ar.Punctuator,value:">>>",lineNumber:yr,lineStart:vr,range:[i,dr]}):"<"===o&&"<"===e&&"="===t?(dr+=3,{type:ar.Punctuator,value:"<<=",lineNumber:yr,lineStart:vr,range:[i,dr]}):">"===o&&">"===e&&"="===t?(dr+=3,{type:ar.Punctuator,value:">>=",lineNumber:yr,lineStart:vr,range:[i,dr]}):"="===e&&"<>=!+-*%&|^/".indexOf(o)>=0?(dr+=2,{type:ar.Punctuator,value:o+e,lineNumber:yr,lineStart:vr,range:[i,dr]}):o===e&&"+-<>&|".indexOf(o)>=0&&"+-<>&|".indexOf(e)>=0?(dr+=2,{type:ar.Punctuator,value:o+e,lineNumber:yr,lineStart:vr,range:[i,dr]}):"[]<>+-*%&|^!~?:=/".indexOf(o)>=0?{type:ar.Punctuator,value:fr[dr++],lineNumber:yr,lineStart:vr,range:[i,dr]}:void 0):{type:ar.Punctuator,value:fr[dr++],lineNumber:yr,lineStart:vr,range:[i,dr]})}function m(){var e,r,a;if(a=fr[dr],t(n(a)||"."===a,"Numeric literal must start with a decimal digit or a decimal point"),r=dr,e="","."!==a){if(e=fr[dr++],a=fr[dr],"0"===e){if("x"===a||"X"===a){for(e+=fr[dr++];gr>dr&&(a=fr[dr],i(a));)e+=fr[dr++];return 2>=e.length&&k({},cr.UnexpectedToken,"ILLEGAL"),gr>dr&&(a=fr[dr],u(a)&&k({},cr.UnexpectedToken,"ILLEGAL")),{type:ar.NumericLiteral,value:parseInt(e,16),lineNumber:yr,lineStart:vr,range:[r,dr]}}if(o(a)){for(e+=fr[dr++];gr>dr&&(a=fr[dr],o(a));)e+=fr[dr++];return gr>dr&&(a=fr[dr],(u(a)||n(a))&&k({},cr.UnexpectedToken,"ILLEGAL")),{type:ar.NumericLiteral,value:parseInt(e,8),octal:!0,lineNumber:yr,lineStart:vr,range:[r,dr]}}n(a)&&k({},cr.UnexpectedToken,"ILLEGAL")}for(;gr>dr&&(a=fr[dr],n(a));)e+=fr[dr++]}if("."===a)for(e+=fr[dr++];gr>dr&&(a=fr[dr],n(a));)e+=fr[dr++];if("e"===a||"E"===a)if(e+=fr[dr++],a=fr[dr],("+"===a||"-"===a)&&(e+=fr[dr++]),a=fr[dr],n(a))for(e+=fr[dr++];gr>dr&&(a=fr[dr],n(a));)e+=fr[dr++];else a="character "+a,dr>=gr&&(a="<end>"),k({},cr.UnexpectedToken,"ILLEGAL");return gr>dr&&(a=fr[dr],u(a)&&k({},cr.UnexpectedToken,"ILLEGAL")),{type:ar.NumericLiteral,value:parseFloat(e),lineNumber:yr,lineStart:vr,range:[r,dr]}}function b(){var e,r,n,i,a,u,p="",c=!1;for(e=fr[dr],t("'"===e||'"'===e,"String literal must starts with a quote"),r=dr,++dr;gr>dr;){if(n=fr[dr++],n===e){e="";break}if("\\"===n)if(n=fr[dr++],s(n))++yr,"\r"===n&&"\n"===fr[dr]&&++dr;else switch(n){case"n":p+="\n";break;case"r":p+="\r";break;case"t":p+=" ";break;case"u":case"x":u=dr,a=y(n),a?p+=a:(dr=u,p+=n);break;case"b":p+="\b";break;case"f":p+="\f";break;case"v":p+=" ";break;default:o(n)?(i="01234567".indexOf(n),0!==i&&(c=!0),gr>dr&&o(fr[dr])&&(c=!0,i=8*i+"01234567".indexOf(fr[dr++]),"0123".indexOf(n)>=0&&gr>dr&&o(fr[dr])&&(i=8*i+"01234567".indexOf(fr[dr++]))),p+=String.fromCharCode(i)):p+=n}else{if(s(n))break;p+=n}}return""!==e&&k({},cr.UnexpectedToken,"ILLEGAL"),{type:ar.StringLiteral,value:p,octal:c,lineNumber:yr,lineStart:vr,range:[r,dr]}}function x(){var e,r,n,i,o,a,u,c=!1,l=!1;for(mr=null,d(),n=dr,r=fr[dr],t("/"===r,"Regular expression literal must start with a slash"),e=fr[dr++];gr>dr;)if(r=fr[dr++],e+=r,c)"]"===r&&(c=!1);else if("\\"===r)r=fr[dr++],s(r)&&k({},cr.UnterminatedRegExp),e+=r;else{if("/"===r){l=!0;break}"["===r?c=!0:s(r)&&k({},cr.UnterminatedRegExp)}for(l||k({},cr.UnterminatedRegExp),i=e.substr(1,e.length-2),o="";gr>dr&&(r=fr[dr],p(r));)if(++dr,"\\"===r&&gr>dr)if(r=fr[dr],"u"===r)if(++dr,u=dr,r=y("u"))for(o+=r,e+="\\u";dr>u;++u)e+=fr[u];else dr=u,o+="u",e+="\\u";else e+="\\";else o+=r,e+=r;try{a=RegExp(i,o)}catch(f){k({},cr.InvalidRegExp)}return{literal:e,value:a,range:[n,dr]}}function w(e){return e.type===ar.Identifier||e.type===ar.Keyword||e.type===ar.BooleanLiteral||e.type===ar.NullLiteral}function S(){var e,t;return d(),dr>=gr?{type:ar.EOF,lineNumber:yr,lineStart:vr,range:[dr,dr]}:(t=g(),t!==void 0?t:(e=fr[dr],"'"===e||'"'===e?b():"."===e||n(e)?m():(t=v(),t!==void 0?t:(k({},cr.UnexpectedToken,"ILLEGAL"),void 0))))}function E(){var e;return mr?(dr=mr.range[1],yr=mr.lineNumber,vr=mr.lineStart,e=mr,mr=null,e):(mr=null,S())}function j(){var e,t,r;return null!==mr?mr:(e=dr,t=yr,r=vr,mr=S(),dr=e,yr=t,vr=r,mr)}function A(){var e,t,r,n;return e=dr,t=yr,r=vr,d(),n=yr!==t,dr=e,yr=t,vr=r,n}function k(e,t){var r,n=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,function(e,t){return n[t]||""});throw"number"==typeof e.lineNumber?(r=Error("Line "+e.lineNumber+": "+i),r.index=e.range[0],r.lineNumber=e.lineNumber,r.column=e.range[0]-vr+1):(r=Error("Line "+yr+": "+i),r.index=dr,r.lineNumber=yr,r.column=dr-vr+1),r}function L(){try{k.apply(null,arguments)}catch(e){if(!xr.errors)throw e;xr.errors.push(e)}}function I(e){if(e.type===ar.EOF&&k(e,cr.UnexpectedEOS),e.type===ar.NumericLiteral&&k(e,cr.UnexpectedNumber),e.type===ar.StringLiteral&&k(e,cr.UnexpectedString),e.type===ar.Identifier&&k(e,cr.UnexpectedIdentifier),e.type===ar.Keyword){if(c(e.value))k(e,cr.UnexpectedReserved);else if(hr&&l(e.value))return L(e,cr.StrictReservedWord),void 0;k(e,cr.UnexpectedToken,e.value)}k(e,cr.UnexpectedToken,e.value)}function _(e){var t=E();(t.type!==ar.Punctuator||t.value!==e)&&I(t)}function O(e){var t=E();(t.type!==ar.Keyword||t.value!==e)&&I(t)}function N(e){var t=j();return t.type===ar.Punctuator&&t.value===e}function P(e){var t=j();return t.type===ar.Keyword&&t.value===e}function C(){var e=j(),t=e.value;return e.type!==ar.Punctuator?!1:"="===t||"*="===t||"/="===t||"%="===t||"+="===t||"-="===t||"<<="===t||">>="===t||">>>="===t||"&="===t||"^="===t||"|="===t}function D(){var e,t;if(";"===fr[dr])return E(),void 0;if(t=yr,d(),yr===t){if(N(";"))return E(),void 0;e=j(),e.type===ar.EOF||N("}")||I(e)}}function F(e){return e.type===ur.Identifier||e.type===ur.MemberExpression}function R(){var e=[];for(_("[");!N("]");)N(",")?(E(),e.push(null)):(e.push(pt()),N("]")||_(","));return _("]"),{type:ur.ArrayExpression,elements:e}}function U(e,t){var r,n;return r=hr,n=Rt(),t&&hr&&f(e[0].name)&&L(t,cr.StrictParamName),hr=r,{type:ur.FunctionExpression,id:null,params:e,defaults:[],body:n,rest:null,generator:!1,expression:!1}}function B(){var e=E();return e.type===ar.StringLiteral||e.type===ar.NumericLiteral?(hr&&e.octal&&L(e,cr.StrictOctalLiteral),Zt(e)):{type:ur.Identifier,name:e.value}}function T(){var e,t,r,n;return e=j(),e.type===ar.Identifier?(r=B(),"get"!==e.value||N(":")?"set"!==e.value||N(":")?(_(":"),{type:ur.Property,key:r,value:pt(),kind:"init"}):(t=B(),_("("),e=j(),e.type!==ar.Identifier?(_(")"),L(e,cr.UnexpectedToken,e.value),{type:ur.Property,key:t,value:U([]),kind:"set"}):(n=[ht()],_(")"),{type:ur.Property,key:t,value:U(n,e),kind:"set"})):(t=B(),_("("),_(")"),{type:ur.Property,key:t,value:U([]),kind:"get"})):e.type!==ar.EOF&&e.type!==ar.Punctuator?(t=B(),_(":"),{type:ur.Property,key:t,value:pt(),kind:"init"}):(I(e),void 0)}function M(){var e,t,r,n=[],i={},o=String;for(_("{");!N("}");)e=T(),t=e.key.type===ur.Identifier?e.key.name:o(e.key.value),r="init"===e.kind?pr.Data:"get"===e.kind?pr.Get:pr.Set,Object.prototype.hasOwnProperty.call(i,t)?(i[t]===pr.Data?hr&&r===pr.Data?L({},cr.StrictDuplicateProperty):r!==pr.Data&&L({},cr.AccessorDataProperty):r===pr.Data?L({},cr.AccessorDataProperty):i[t]&r&&L({},cr.AccessorGetSet),i[t]|=r):i[t]=r,n.push(e),N("}")||_(",");return _("}"),{type:ur.ObjectExpression,properties:n}}function q(){var e;return _("("),e=ct(),_(")"),e}function V(){var e=j(),t=e.type;if(t===ar.Identifier)return{type:ur.Identifier,name:E().value};if(t===ar.StringLiteral||t===ar.NumericLiteral)return hr&&e.octal&&L(e,cr.StrictOctalLiteral),Zt(E());if(t===ar.Keyword){if(P("this"))return E(),{type:ur.ThisExpression};if(P("function"))return Bt()}return t===ar.BooleanLiteral?(E(),e.value="true"===e.value,Zt(e)):t===ar.NullLiteral?(E(),e.value=null,Zt(e)):N("[")?R():N("{")?M():N("(")?q():N("/")||N("/=")?Zt(x()):I(E())}function G(){var e=[];if(_("("),!N(")"))for(;gr>dr&&(e.push(pt()),!N(")"));)_(",");return _(")"),e}function z(){var e=E();return w(e)||I(e),{type:ur.Identifier,name:e.value}}function H(){return _("."),z()}function K(){var e;return _("["),e=ct(),_("]"),e}function W(){var e;return O("new"),e={type:ur.NewExpression,callee:X(),arguments:[]},N("(")&&(e.arguments=G()),e}function Z(){var e;for(e=P("new")?W():V();N(".")||N("[")||N("(");)e=N("(")?{type:ur.CallExpression,callee:e,arguments:G()}:N("[")?{type:ur.MemberExpression,computed:!0,object:e,property:K()}:{type:ur.MemberExpression,computed:!1,object:e,property:H()};return e}function X(){var e;for(e=P("new")?W():V();N(".")||N("[");)e=N("[")?{type:ur.MemberExpression,computed:!0,object:e,property:K()}:{type:ur.MemberExpression,computed:!1,object:e,property:H()};return e}function J(){var e,t=Z();return e=j(),e.type!==ar.Punctuator?t:(!N("++")&&!N("--")||A()||(hr&&t.type===ur.Identifier&&f(t.name)&&L({},cr.StrictLHSPostfix),F(t)||k({},cr.InvalidLHSInAssignment),t={type:ur.UpdateExpression,operator:E().value,argument:t,prefix:!1}),t)}function Y(){var e,t;return e=j(),e.type!==ar.Punctuator&&e.type!==ar.Keyword?J():N("++")||N("--")?(e=E(),t=Y(),hr&&t.type===ur.Identifier&&f(t.name)&&L({},cr.StrictLHSPrefix),F(t)||k({},cr.InvalidLHSInAssignment),t={type:ur.UpdateExpression,operator:e.value,argument:t,prefix:!0}):N("+")||N("-")||N("~")||N("!")?t={type:ur.UnaryExpression,operator:E().value,argument:Y(),prefix:!0}:P("delete")||P("void")||P("typeof")?(t={type:ur.UnaryExpression,operator:E().value,argument:Y(),prefix:!0},hr&&"delete"===t.operator&&t.argument.type===ur.Identifier&&L({},cr.StrictDelete),t):J()}function $(){for(var e=Y();N("*")||N("/")||N("%");)e={type:ur.BinaryExpression,operator:E().value,left:e,right:Y()};return e}function Q(){for(var e=$();N("+")||N("-");)e={type:ur.BinaryExpression,operator:E().value,left:e,right:$()};return e}function et(){for(var e=Q();N("<<")||N(">>")||N(">>>");)e={type:ur.BinaryExpression,operator:E().value,left:e,right:Q()};return e}function tt(){var e,t;for(t=br.allowIn,br.allowIn=!0,e=et();N("<")||N(">")||N("<=")||N(">=")||t&&P("in")||P("instanceof");)e={type:ur.BinaryExpression,operator:E().value,left:e,right:et()};return br.allowIn=t,e}function rt(){for(var e=tt();N("==")||N("!=")||N("===")||N("!==");)e={type:ur.BinaryExpression,operator:E().value,left:e,right:tt()};return e}function nt(){for(var e=rt();N("&");)E(),e={type:ur.BinaryExpression,operator:"&",left:e,right:rt()};return e}function it(){for(var e=nt();N("^");)E(),e={type:ur.BinaryExpression,operator:"^",left:e,right:nt()};return e}function ot(){for(var e=it();N("|");)E(),e={type:ur.BinaryExpression,operator:"|",left:e,right:it()};return e}function at(){for(var e=ot();N("&&");)E(),e={type:ur.LogicalExpression,operator:"&&",left:e,right:ot()};return e}function st(){for(var e=at();N("||");)E(),e={type:ur.LogicalExpression,operator:"||",left:e,right:at()};return e}function ut(){var e,t,r;return e=st(),N("?")&&(E(),t=br.allowIn,br.allowIn=!0,r=pt(),br.allowIn=t,_(":"),e={type:ur.ConditionalExpression,test:e,consequent:r,alternate:pt()}),e}function pt(){var e,t;return e=j(),t=ut(),C()&&(F(t)||k({},cr.InvalidLHSInAssignment),hr&&t.type===ur.Identifier&&f(t.name)&&L(e,cr.StrictLHSAssignment),t={type:ur.AssignmentExpression,operator:E().value,left:t,right:pt()}),t}function ct(){var e=pt();if(N(","))for(e={type:ur.SequenceExpression,expressions:[e]};gr>dr&&N(",");)E(),e.expressions.push(pt());return e}function lt(){for(var e,t=[];gr>dr&&!N("}")&&(e=Tt(),void 0!==e);)t.push(e);return t}function ft(){var e;return _("{"),e=lt(),_("}"),{type:ur.BlockStatement,body:e}}function ht(){var e=E();return e.type!==ar.Identifier&&I(e),{type:ur.Identifier,name:e.value}}function dt(e){var t=ht(),r=null;return hr&&f(t.name)&&L({},cr.StrictVarName),"const"===e?(_("="),r=pt()):N("=")&&(E(),r=pt()),{type:ur.VariableDeclarator,id:t,init:r}}function yt(e){var t=[];do{if(t.push(dt(e)),!N(","))break;E()}while(gr>dr);return t}function vt(){var e;return O("var"),e=yt(),D(),{type:ur.VariableDeclaration,declarations:e,kind:"var"}}function gt(e){var t;return O(e),t=yt(e),D(),{type:ur.VariableDeclaration,declarations:t,kind:e}}function mt(){return _(";"),{type:ur.EmptyStatement}}function bt(){var e=ct();return D(),{type:ur.ExpressionStatement,expression:e}}function xt(){var e,t,r;return O("if"),_("("),e=ct(),_(")"),t=Ft(),P("else")?(E(),r=Ft()):r=null,{type:ur.IfStatement,test:e,consequent:t,alternate:r}}function wt(){var e,t,r;return O("do"),r=br.inIteration,br.inIteration=!0,e=Ft(),br.inIteration=r,O("while"),_("("),t=ct(),_(")"),N(";")&&E(),{type:ur.DoWhileStatement,body:e,test:t}}function St(){var e,t,r;return O("while"),_("("),e=ct(),_(")"),r=br.inIteration,br.inIteration=!0,t=Ft(),br.inIteration=r,{type:ur.WhileStatement,test:e,body:t}}function Et(){var e=E();return{type:ur.VariableDeclaration,declarations:yt(),kind:e.value}}function jt(){var e,t,r,n,i,o,a;return e=t=r=null,O("for"),_("("),N(";")?E():(P("var")||P("let")?(br.allowIn=!1,e=Et(),br.allowIn=!0,1===e.declarations.length&&P("in")&&(E(),n=e,i=ct(),e=null)):(br.allowIn=!1,e=ct(),br.allowIn=!0,P("in")&&(F(e)||k({},cr.InvalidLHSInForIn),E(),n=e,i=ct(),e=null)),n===void 0&&_(";")),n===void 0&&(N(";")||(t=ct()),_(";"),N(")")||(r=ct())),_(")"),a=br.inIteration,br.inIteration=!0,o=Ft(),br.inIteration=a,n===void 0?{type:ur.ForStatement,init:e,test:t,update:r,body:o}:{type:ur.ForInStatement,left:n,right:i,body:o,each:!1}}function At(){var e,t=null;return O("continue"),";"===fr[dr]?(E(),br.inIteration||k({},cr.IllegalContinue),{type:ur.ContinueStatement,label:null}):A()?(br.inIteration||k({},cr.IllegalContinue),{type:ur.ContinueStatement,label:null}):(e=j(),e.type===ar.Identifier&&(t=ht(),Object.prototype.hasOwnProperty.call(br.labelSet,t.name)||k({},cr.UnknownLabel,t.name)),D(),null!==t||br.inIteration||k({},cr.IllegalContinue),{type:ur.ContinueStatement,label:t})}function kt(){var e,t=null;return O("break"),";"===fr[dr]?(E(),br.inIteration||br.inSwitch||k({},cr.IllegalBreak),{type:ur.BreakStatement,label:null}):A()?(br.inIteration||br.inSwitch||k({},cr.IllegalBreak),{type:ur.BreakStatement,label:null}):(e=j(),e.type===ar.Identifier&&(t=ht(),Object.prototype.hasOwnProperty.call(br.labelSet,t.name)||k({},cr.UnknownLabel,t.name)),D(),null!==t||br.inIteration||br.inSwitch||k({},cr.IllegalBreak),{type:ur.BreakStatement,label:t})}function Lt(){var e,t=null;return O("return"),br.inFunctionBody||L({},cr.IllegalReturn)," "===fr[dr]&&u(fr[dr+1])?(t=ct(),D(),{type:ur.ReturnStatement,argument:t}):A()?{type:ur.ReturnStatement,argument:null}:(N(";")||(e=j(),N("}")||e.type===ar.EOF||(t=ct())),D(),{type:ur.ReturnStatement,argument:t})}function It(){var e,t;return hr&&L({},cr.StrictModeWith),O("with"),_("("),e=ct(),_(")"),t=Ft(),{type:ur.WithStatement,object:e,body:t}}function _t(){var e,t,r=[];for(P("default")?(E(),e=null):(O("case"),e=ct()),_(":");gr>dr&&!(N("}")||P("default")||P("case"))&&(t=Ft(),void 0!==t);)r.push(t);return{type:ur.SwitchCase,test:e,consequent:r}}function Ot(){var e,t,r,n,i;if(O("switch"),_("("),e=ct(),_(")"),_("{"),N("}"))return E(),{type:ur.SwitchStatement,discriminant:e};for(t=[],n=br.inSwitch,br.inSwitch=!0,i=!1;gr>dr&&!N("}");)r=_t(),null===r.test&&(i&&k({},cr.MultipleDefaultsInSwitch),i=!0),t.push(r);return br.inSwitch=n,_("}"),{type:ur.SwitchStatement,discriminant:e,cases:t}}function Nt(){var e;return O("throw"),A()&&k({},cr.NewlineAfterThrow),e=ct(),D(),{type:ur.ThrowStatement,argument:e}}function Pt(){var e;return O("catch"),_("("),N(")")&&I(j()),e=ht(),hr&&f(e.name)&&L({},cr.StrictCatchVariable),_(")"),{type:ur.CatchClause,param:e,body:ft()}}function Ct(){var e,t=[],r=null;return O("try"),e=ft(),P("catch")&&t.push(Pt()),P("finally")&&(E(),r=ft()),0!==t.length||r||k({},cr.NoCatchOrFinally),{type:ur.TryStatement,block:e,guardedHandlers:[],handlers:t,finalizer:r}}function Dt(){return O("debugger"),D(),{type:ur.DebuggerStatement}}function Ft(){var e,t,r=j();if(r.type===ar.EOF&&I(r),r.type===ar.Punctuator)switch(r.value){case";":return mt();case"{":return ft();case"(":return bt();default:}if(r.type===ar.Keyword)switch(r.value){case"break":return kt();case"continue":return At();case"debugger":return Dt();case"do":return wt();case"for":return jt();case"function":return Ut();case"if":return xt();case"return":return Lt();case"switch":return Ot();case"throw":return Nt();case"try":return Ct();case"var":return vt();case"while":return St();case"with":return It();default:}return e=ct(),e.type===ur.Identifier&&N(":")?(E(),Object.prototype.hasOwnProperty.call(br.labelSet,e.name)&&k({},cr.Redeclaration,"Label",e.name),br.labelSet[e.name]=!0,t=Ft(),delete br.labelSet[e.name],{type:ur.LabeledStatement,label:e,body:t}):(D(),{type:ur.ExpressionStatement,expression:e})}function Rt(){var e,t,n,i,o,a,s,u,p=[];for(_("{");gr>dr&&(t=j(),t.type===ar.StringLiteral)&&(e=Tt(),p.push(e),e.expression.type===ur.Literal);)n=r(t.range[0]+1,t.range[1]-1),"use strict"===n?(hr=!0,i&&L(i,cr.StrictOctalLiteral)):!i&&t.octal&&(i=t);for(o=br.labelSet,a=br.inIteration,s=br.inSwitch,u=br.inFunctionBody,br.labelSet={},br.inIteration=!1,br.inSwitch=!1,br.inFunctionBody=!0;gr>dr&&!N("}")&&(e=Tt(),void 0!==e);)p.push(e);return _("}"),br.labelSet=o,br.inIteration=a,br.inSwitch=s,br.inFunctionBody=u,{type:ur.BlockStatement,body:p}}function Ut(){var e,t,r,n,i,o,a,s,u,p=[];if(O("function"),n=j(),e=ht(),hr?f(n.value)&&L(n,cr.StrictFunctionName):f(n.value)?(o=n,a=cr.StrictFunctionName):l(n.value)&&(o=n,a=cr.StrictReservedWord),_("("),!N(")"))for(u={};gr>dr&&(n=j(),t=ht(),hr?(f(n.value)&&(i=n,a=cr.StrictParamName),Object.prototype.hasOwnProperty.call(u,n.value)&&(i=n,a=cr.StrictParamDupe)):o||(f(n.value)?(o=n,a=cr.StrictParamName):l(n.value)?(o=n,a=cr.StrictReservedWord):Object.prototype.hasOwnProperty.call(u,n.value)&&(o=n,a=cr.StrictParamDupe)),p.push(t),u[t.name]=!0,!N(")"));)_(",");
return _(")"),s=hr,r=Rt(),hr&&o&&k(o,a),hr&&i&&L(i,a),hr=s,{type:ur.FunctionDeclaration,id:e,params:p,defaults:[],body:r,rest:null,generator:!1,expression:!1}}function Bt(){var e,t,r,n,i,o,a,s,u=null,p=[];if(O("function"),N("(")||(e=j(),u=ht(),hr?f(e.value)&&L(e,cr.StrictFunctionName):f(e.value)?(r=e,n=cr.StrictFunctionName):l(e.value)&&(r=e,n=cr.StrictReservedWord)),_("("),!N(")"))for(s={};gr>dr&&(e=j(),i=ht(),hr?(f(e.value)&&(t=e,n=cr.StrictParamName),Object.prototype.hasOwnProperty.call(s,e.value)&&(t=e,n=cr.StrictParamDupe)):r||(f(e.value)?(r=e,n=cr.StrictParamName):l(e.value)?(r=e,n=cr.StrictReservedWord):Object.prototype.hasOwnProperty.call(s,e.value)&&(r=e,n=cr.StrictParamDupe)),p.push(i),s[i.name]=!0,!N(")"));)_(",");return _(")"),a=hr,o=Rt(),hr&&r&&k(r,n),hr&&t&&L(t,n),hr=a,{type:ur.FunctionExpression,id:u,params:p,defaults:[],body:o,rest:null,generator:!1,expression:!1}}function Tt(){var e=j();if(e.type===ar.Keyword)switch(e.value){case"const":case"let":return gt(e.value);case"function":return Ut();default:return Ft()}return e.type!==ar.EOF?Ft():void 0}function Mt(){for(var e,t,n,i,o=[];gr>dr&&(t=j(),t.type===ar.StringLiteral)&&(e=Tt(),o.push(e),e.expression.type===ur.Literal);)n=r(t.range[0]+1,t.range[1]-1),"use strict"===n?(hr=!0,i&&L(i,cr.StrictOctalLiteral)):!i&&t.octal&&(i=t);for(;gr>dr&&(e=Tt(),void 0!==e);)o.push(e);return o}function qt(){var e;return hr=!1,e={type:ur.Program,body:Mt()}}function Vt(e,r,n,i,o){t("number"==typeof n,"Comment must have valid position"),xr.comments.length>0&&xr.comments[xr.comments.length-1].range[1]>n||xr.comments.push({type:e,value:r,range:[n,i],loc:o})}function Gt(){var e,t,r,n,i,o;for(e="",i=!1,o=!1;gr>dr;)if(t=fr[dr],o)t=fr[dr++],s(t)?(r.end={line:yr,column:dr-vr-1},o=!1,Vt("Line",e,n,dr-1,r),"\r"===t&&"\n"===fr[dr]&&++dr,++yr,vr=dr,e=""):dr>=gr?(o=!1,e+=t,r.end={line:yr,column:gr-vr},Vt("Line",e,n,gr,r)):e+=t;else if(i)s(t)?("\r"===t&&"\n"===fr[dr+1]?(++dr,e+="\r\n"):e+=t,++yr,++dr,vr=dr,dr>=gr&&k({},cr.UnexpectedToken,"ILLEGAL")):(t=fr[dr++],dr>=gr&&k({},cr.UnexpectedToken,"ILLEGAL"),e+=t,"*"===t&&(t=fr[dr],"/"===t&&(e=e.substr(0,e.length-1),i=!1,++dr,r.end={line:yr,column:dr-vr},Vt("Block",e,n,dr,r),e="")));else if("/"===t)if(t=fr[dr+1],"/"===t)r={start:{line:yr,column:dr-vr}},n=dr,dr+=2,o=!0,dr>=gr&&(r.end={line:yr,column:dr-vr},o=!1,Vt("Line",e,n,dr,r));else{if("*"!==t)break;n=dr,dr+=2,i=!0,r={start:{line:yr,column:dr-vr-2}},dr>=gr&&k({},cr.UnexpectedToken,"ILLEGAL")}else if(a(t))++dr;else{if(!s(t))break;++dr,"\r"===t&&"\n"===fr[dr]&&++dr,++yr,vr=dr}}function zt(){var e,t,r,n=[];for(e=0;xr.comments.length>e;++e)t=xr.comments[e],r={type:t.type,value:t.value},xr.range&&(r.range=t.range),xr.loc&&(r.loc=t.loc),n.push(r);xr.comments=n}function Ht(){var e,t,n,i,o;return d(),e=dr,t={start:{line:yr,column:dr-vr}},n=xr.advance(),t.end={line:yr,column:dr-vr},n.type!==ar.EOF&&(i=[n.range[0],n.range[1]],o=r(n.range[0],n.range[1]),xr.tokens.push({type:sr[n.type],value:o,range:i,loc:t})),n}function Kt(){var e,t,r,n;return d(),e=dr,t={start:{line:yr,column:dr-vr}},r=xr.scanRegExp(),t.end={line:yr,column:dr-vr},xr.tokens.length>0&&(n=xr.tokens[xr.tokens.length-1],n.range[0]===e&&"Punctuator"===n.type&&("/"===n.value||"/="===n.value)&&xr.tokens.pop()),xr.tokens.push({type:"RegularExpression",value:r.literal,range:[e,dr],loc:t}),r}function Wt(){var e,t,r,n=[];for(e=0;xr.tokens.length>e;++e)t=xr.tokens[e],r={type:t.type,value:t.value},xr.range&&(r.range=t.range),xr.loc&&(r.loc=t.loc),n.push(r);xr.tokens=n}function Zt(e){return{type:ur.Literal,value:e.value}}function Xt(e){return{type:ur.Literal,value:e.value,raw:r(e.range[0],e.range[1])}}function Jt(){var e={};return e.range=[dr,dr],e.loc={start:{line:yr,column:dr-vr},end:{line:yr,column:dr-vr}},e.end=function(){this.range[1]=dr,this.loc.end.line=yr,this.loc.end.column=dr-vr},e.applyGroup=function(e){xr.range&&(e.groupRange=[this.range[0],this.range[1]]),xr.loc&&(e.groupLoc={start:{line:this.loc.start.line,column:this.loc.start.column},end:{line:this.loc.end.line,column:this.loc.end.column}})},e.apply=function(e){xr.range&&(e.range=[this.range[0],this.range[1]]),xr.loc&&(e.loc={start:{line:this.loc.start.line,column:this.loc.start.column},end:{line:this.loc.end.line,column:this.loc.end.column}})},e}function Yt(){var e,t;return d(),e=Jt(),_("("),t=ct(),_(")"),e.end(),e.applyGroup(t),t}function $t(){var e,t;for(d(),e=Jt(),t=P("new")?W():V();N(".")||N("[");)N("[")?(t={type:ur.MemberExpression,computed:!0,object:t,property:K()},e.end(),e.apply(t)):(t={type:ur.MemberExpression,computed:!1,object:t,property:H()},e.end(),e.apply(t));return t}function Qt(){var e,t;for(d(),e=Jt(),t=P("new")?W():V();N(".")||N("[")||N("(");)N("(")?(t={type:ur.CallExpression,callee:t,arguments:G()},e.end(),e.apply(t)):N("[")?(t={type:ur.MemberExpression,computed:!0,object:t,property:K()},e.end(),e.apply(t)):(t={type:ur.MemberExpression,computed:!1,object:t,property:H()},e.end(),e.apply(t));return t}function er(e){var t,r,n;t="[object Array]"===Object.prototype.toString.apply(e)?[]:{};for(r in e)e.hasOwnProperty(r)&&"groupRange"!==r&&"groupLoc"!==r&&(n=e[r],t[r]=null===n||"object"!=typeof n||n instanceof RegExp?n:er(n));return t}function tr(e,t){return function(r){function n(e){return e.type===ur.LogicalExpression||e.type===ur.BinaryExpression}function i(r){var o,a;n(r.left)&&i(r.left),n(r.right)&&i(r.right),e&&(r.left.groupRange||r.right.groupRange?(o=r.left.groupRange?r.left.groupRange[0]:r.left.range[0],a=r.right.groupRange?r.right.groupRange[1]:r.right.range[1],r.range=[o,a]):r.range===void 0&&(o=r.left.range[0],a=r.right.range[1],r.range=[o,a])),t&&(r.left.groupLoc||r.right.groupLoc?(o=r.left.groupLoc?r.left.groupLoc.start:r.left.loc.start,a=r.right.groupLoc?r.right.groupLoc.end:r.right.loc.end,r.loc={start:o,end:a}):r.loc===void 0&&(r.loc={start:r.left.loc.start,end:r.right.loc.end}))}return function(){var o,a;return d(),o=Jt(),a=r.apply(null,arguments),o.end(),e&&a.range===void 0&&o.apply(a),t&&a.loc===void 0&&o.apply(a),n(a)&&i(a),a}}}function rr(){var e;xr.comments&&(xr.skipComment=d,d=Gt),xr.raw&&(xr.createLiteral=Zt,Zt=Xt),(xr.range||xr.loc)&&(xr.parseGroupExpression=q,xr.parseLeftHandSideExpression=X,xr.parseLeftHandSideExpressionAllowCall=Z,q=Yt,X=$t,Z=Qt,e=tr(xr.range,xr.loc),xr.parseAdditiveExpression=Q,xr.parseAssignmentExpression=pt,xr.parseBitwiseANDExpression=nt,xr.parseBitwiseORExpression=ot,xr.parseBitwiseXORExpression=it,xr.parseBlock=ft,xr.parseFunctionSourceElements=Rt,xr.parseCatchClause=Pt,xr.parseComputedMember=K,xr.parseConditionalExpression=ut,xr.parseConstLetDeclaration=gt,xr.parseEqualityExpression=rt,xr.parseExpression=ct,xr.parseForVariableDeclaration=Et,xr.parseFunctionDeclaration=Ut,xr.parseFunctionExpression=Bt,xr.parseLogicalANDExpression=at,xr.parseLogicalORExpression=st,xr.parseMultiplicativeExpression=$,xr.parseNewExpression=W,xr.parseNonComputedProperty=z,xr.parseObjectProperty=T,xr.parseObjectPropertyKey=B,xr.parsePostfixExpression=J,xr.parsePrimaryExpression=V,xr.parseProgram=qt,xr.parsePropertyFunction=U,xr.parseRelationalExpression=tt,xr.parseStatement=Ft,xr.parseShiftExpression=et,xr.parseSwitchCase=_t,xr.parseUnaryExpression=Y,xr.parseVariableDeclaration=dt,xr.parseVariableIdentifier=ht,Q=e(xr.parseAdditiveExpression),pt=e(xr.parseAssignmentExpression),nt=e(xr.parseBitwiseANDExpression),ot=e(xr.parseBitwiseORExpression),it=e(xr.parseBitwiseXORExpression),ft=e(xr.parseBlock),Rt=e(xr.parseFunctionSourceElements),Pt=e(xr.parseCatchClause),K=e(xr.parseComputedMember),ut=e(xr.parseConditionalExpression),gt=e(xr.parseConstLetDeclaration),rt=e(xr.parseEqualityExpression),ct=e(xr.parseExpression),Et=e(xr.parseForVariableDeclaration),Ut=e(xr.parseFunctionDeclaration),Bt=e(xr.parseFunctionExpression),X=e(X),at=e(xr.parseLogicalANDExpression),st=e(xr.parseLogicalORExpression),$=e(xr.parseMultiplicativeExpression),W=e(xr.parseNewExpression),z=e(xr.parseNonComputedProperty),T=e(xr.parseObjectProperty),B=e(xr.parseObjectPropertyKey),J=e(xr.parsePostfixExpression),V=e(xr.parsePrimaryExpression),qt=e(xr.parseProgram),U=e(xr.parsePropertyFunction),tt=e(xr.parseRelationalExpression),Ft=e(xr.parseStatement),et=e(xr.parseShiftExpression),_t=e(xr.parseSwitchCase),Y=e(xr.parseUnaryExpression),dt=e(xr.parseVariableDeclaration),ht=e(xr.parseVariableIdentifier)),xr.tokens!==void 0&&(xr.advance=S,xr.scanRegExp=x,S=Ht,x=Kt)}function nr(){"function"==typeof xr.skipComment&&(d=xr.skipComment),xr.raw&&(Zt=xr.createLiteral),(xr.range||xr.loc)&&(Q=xr.parseAdditiveExpression,pt=xr.parseAssignmentExpression,nt=xr.parseBitwiseANDExpression,ot=xr.parseBitwiseORExpression,it=xr.parseBitwiseXORExpression,ft=xr.parseBlock,Rt=xr.parseFunctionSourceElements,Pt=xr.parseCatchClause,K=xr.parseComputedMember,ut=xr.parseConditionalExpression,gt=xr.parseConstLetDeclaration,rt=xr.parseEqualityExpression,ct=xr.parseExpression,Et=xr.parseForVariableDeclaration,Ut=xr.parseFunctionDeclaration,Bt=xr.parseFunctionExpression,q=xr.parseGroupExpression,X=xr.parseLeftHandSideExpression,Z=xr.parseLeftHandSideExpressionAllowCall,at=xr.parseLogicalANDExpression,st=xr.parseLogicalORExpression,$=xr.parseMultiplicativeExpression,W=xr.parseNewExpression,z=xr.parseNonComputedProperty,T=xr.parseObjectProperty,B=xr.parseObjectPropertyKey,V=xr.parsePrimaryExpression,J=xr.parsePostfixExpression,qt=xr.parseProgram,U=xr.parsePropertyFunction,tt=xr.parseRelationalExpression,Ft=xr.parseStatement,et=xr.parseShiftExpression,_t=xr.parseSwitchCase,Y=xr.parseUnaryExpression,dt=xr.parseVariableDeclaration,ht=xr.parseVariableIdentifier),"function"==typeof xr.scanRegExp&&(S=xr.advance,x=xr.scanRegExp)}function ir(e){var t,r=e.length,n=[];for(t=0;r>t;++t)n[t]=e.charAt(t);return n}function or(e,t){var r,n;n=String,"string"==typeof e||e instanceof String||(e=n(e)),fr=e,dr=0,yr=fr.length>0?1:0,vr=0,gr=fr.length,mr=null,br={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1},xr={},t!==void 0&&(xr.range="boolean"==typeof t.range&&t.range,xr.loc="boolean"==typeof t.loc&&t.loc,xr.raw="boolean"==typeof t.raw&&t.raw,"boolean"==typeof t.tokens&&t.tokens&&(xr.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(xr.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(xr.errors=[])),gr>0&&fr[0]===void 0&&(e instanceof String&&(fr=e.valueOf()),fr[0]===void 0&&(fr=ir(e))),rr();try{r=qt(),xr.comments!==void 0&&(zt(),r.comments=xr.comments),xr.tokens!==void 0&&(Wt(),r.tokens=xr.tokens),xr.errors!==void 0&&(r.errors=xr.errors),(xr.range||xr.loc)&&(r.body=er(r.body))}catch(i){throw i}finally{nr(),xr={}}return r}var ar,sr,ur,pr,cr,lr,fr,hr,dr,yr,vr,gr,mr,br,xr;ar={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8},sr={},sr[ar.BooleanLiteral]="Boolean",sr[ar.EOF]="<end>",sr[ar.Identifier]="Identifier",sr[ar.Keyword]="Keyword",sr[ar.NullLiteral]="Null",sr[ar.NumericLiteral]="Numeric",sr[ar.Punctuator]="Punctuator",sr[ar.StringLiteral]="String",ur={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},pr={Data:1,Get:2,Set:4},cr={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},lr={NonAsciiIdentifierStart:RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},"esprima"[0]===void 0&&(r=function(e,t){return fr.slice(e,t).join("")}),e.version="1.0.3",e.parse=or,e.Syntax=function(){var e,t={};"function"==typeof Object.create&&(t=Object.create(null));for(e in ur)ur.hasOwnProperty(e)&&(t[e]=ur[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()})})()},{}],17:[function(e,t){"use strict";function r(e,t){for(var r=1,n=e.length,i=e[0],o=e[0],a=1;n>a;++a)if(o=i,i=e[a],t(i,o)){if(a===r){r++;continue}e[r++]=i}return e.length=r,e}function n(e){for(var t=1,r=e.length,n=e[0],i=e[0],o=1;r>o;++o,i=n)if(i=n,n=e[o],n!==i){if(o===t){t++;continue}e[t++]=n}return e.length=t,e}function i(e,t,i){return 0===e.length?[]:t?(i||e.sort(t),r(e,t)):(i||e.sort(),n(e))}t.exports=i},{}],18:[function(e,t,r){(function(){(function(e,t){"use strict";"function"==typeof define&&define.amd?define(["exports"],t):r!==void 0?t(r):t(e.esprima={})})(this,function(e){"use strict";function t(e,t){if(!e)throw Error("ASSERT: "+t)}function r(e,t){return fr.slice(e,t)}function n(e){return"0123456789".indexOf(e)>=0}function i(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function o(e){return"01234567".indexOf(e)>=0}function a(e){return" "===e||" "===e||" "===e||"\f"===e||" "===e||e.charCodeAt(0)>=5760&&" ᠎              ".indexOf(e)>=0}function s(e){return"\n"===e||"\r"===e||"\u2028"===e||"\u2029"===e}function u(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&"z">=e||e>="A"&&"Z">=e||e.charCodeAt(0)>=128&&lr.NonAsciiIdentifierStart.test(e)}function p(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&"z">=e||e>="A"&&"Z">=e||e>="0"&&"9">=e||e.charCodeAt(0)>=128&&lr.NonAsciiIdentifierPart.test(e)}function c(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0}return!1}function l(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0}return!1}function f(e){return"eval"===e||"arguments"===e}function h(e){var t=!1;switch(e.length){case 2:t="if"===e||"in"===e||"do"===e;break;case 3:t="var"===e||"for"===e||"new"===e||"try"===e;break;case 4:t="this"===e||"else"===e||"case"===e||"void"===e||"with"===e;break;case 5:t="while"===e||"break"===e||"catch"===e||"throw"===e;break;case 6:t="return"===e||"typeof"===e||"delete"===e||"switch"===e;break;case 7:t="default"===e||"finally"===e;break;case 8:t="function"===e||"continue"===e||"debugger"===e;break;case 10:t="instanceof"===e}if(t)return!0;switch(e){case"const":return!0;case"yield":case"let":return!0}return hr&&l(e)?!0:c(e)}function d(){var e,t,r;for(t=!1,r=!1;gr>dr;)if(e=fr[dr],r)e=fr[dr++],s(e)&&(r=!1,"\r"===e&&"\n"===fr[dr]&&++dr,++yr,vr=dr);else if(t)s(e)?("\r"===e&&"\n"===fr[dr+1]&&++dr,++yr,++dr,vr=dr,dr>=gr&&k({},cr.UnexpectedToken,"ILLEGAL")):(e=fr[dr++],dr>=gr&&k({},cr.UnexpectedToken,"ILLEGAL"),"*"===e&&(e=fr[dr],"/"===e&&(++dr,t=!1)));else if("/"===e)if(e=fr[dr+1],"/"===e)dr+=2,r=!0;else{if("*"!==e)break;dr+=2,t=!0,dr>=gr&&k({},cr.UnexpectedToken,"ILLEGAL")}else if(a(e))++dr;else{if(!s(e))break;++dr,"\r"===e&&"\n"===fr[dr]&&++dr,++yr,vr=dr}}function y(e){var t,r,n,o=0;for(r="u"===e?4:2,t=0;r>t;++t){if(!(gr>dr&&i(fr[dr])))return"";n=fr[dr++],o=16*o+"0123456789abcdef".indexOf(n.toLowerCase())}return String.fromCharCode(o)}function v(){var e,t,r,n;if(e=fr[dr],u(e)){if(t=dr,"\\"===e){if(++dr,"u"!==fr[dr])return;if(++dr,n=dr,e=y("u")){if("\\"===e||!u(e))return;r=e}else dr=n,r="u"}else r=fr[dr++];for(;gr>dr&&(e=fr[dr],p(e));)if("\\"===e){if(++dr,"u"!==fr[dr])return;if(++dr,n=dr,e=y("u")){if("\\"===e||!p(e))return;r+=e}else dr=n,r+="u"}else r+=fr[dr++];return 1===r.length?{type:ar.Identifier,value:r,lineNumber:yr,lineStart:vr,range:[t,dr]}:h(r)?{type:ar.Keyword,value:r,lineNumber:yr,lineStart:vr,range:[t,dr]}:"null"===r?{type:ar.NullLiteral,value:r,lineNumber:yr,lineStart:vr,range:[t,dr]}:"true"===r||"false"===r?{type:ar.BooleanLiteral,value:r,lineNumber:yr,lineStart:vr,range:[t,dr]}:{type:ar.Identifier,value:r,lineNumber:yr,lineStart:vr,range:[t,dr]}}}function g(){var e,t,r,i=dr,o=fr[dr];return";"===o||"{"===o||"}"===o?(++dr,{type:ar.Punctuator,value:o,lineNumber:yr,lineStart:vr,range:[i,dr]}):","===o||"("===o||")"===o?(++dr,{type:ar.Punctuator,value:o,lineNumber:yr,lineStart:vr,range:[i,dr]}):(e=fr[dr+1],"."!==o||n(e)?(t=fr[dr+2],r=fr[dr+3],">"===o&&">"===e&&">"===t&&"="===r?(dr+=4,{type:ar.Punctuator,value:">>>=",lineNumber:yr,lineStart:vr,range:[i,dr]}):"="===o&&"="===e&&"="===t?(dr+=3,{type:ar.Punctuator,value:"===",lineNumber:yr,lineStart:vr,range:[i,dr]}):"!"===o&&"="===e&&"="===t?(dr+=3,{type:ar.Punctuator,value:"!==",lineNumber:yr,lineStart:vr,range:[i,dr]}):">"===o&&">"===e&&">"===t?(dr+=3,{type:ar.Punctuator,value:">>>",lineNumber:yr,lineStart:vr,range:[i,dr]}):"<"===o&&"<"===e&&"="===t?(dr+=3,{type:ar.Punctuator,value:"<<=",lineNumber:yr,lineStart:vr,range:[i,dr]}):">"===o&&">"===e&&"="===t?(dr+=3,{type:ar.Punctuator,value:">>=",lineNumber:yr,lineStart:vr,range:[i,dr]}):"="===e&&"<>=!+-*%&|^/".indexOf(o)>=0?(dr+=2,{type:ar.Punctuator,value:o+e,lineNumber:yr,lineStart:vr,range:[i,dr]}):o===e&&"+-<>&|".indexOf(o)>=0&&"+-<>&|".indexOf(e)>=0?(dr+=2,{type:ar.Punctuator,value:o+e,lineNumber:yr,lineStart:vr,range:[i,dr]}):"[]<>+-*%&|^!~?:=/".indexOf(o)>=0?{type:ar.Punctuator,value:fr[dr++],lineNumber:yr,lineStart:vr,range:[i,dr]}:void 0):{type:ar.Punctuator,value:fr[dr++],lineNumber:yr,lineStart:vr,range:[i,dr]})}function m(){var e,r,a;if(a=fr[dr],t(n(a)||"."===a,"Numeric literal must start with a decimal digit or a decimal point"),r=dr,e="","."!==a){if(e=fr[dr++],a=fr[dr],"0"===e){if("x"===a||"X"===a){for(e+=fr[dr++];gr>dr&&(a=fr[dr],i(a));)e+=fr[dr++];return 2>=e.length&&k({},cr.UnexpectedToken,"ILLEGAL"),gr>dr&&(a=fr[dr],u(a)&&k({},cr.UnexpectedToken,"ILLEGAL")),{type:ar.NumericLiteral,value:parseInt(e,16),lineNumber:yr,lineStart:vr,range:[r,dr]}}if(o(a)){for(e+=fr[dr++];gr>dr&&(a=fr[dr],o(a));)e+=fr[dr++];return gr>dr&&(a=fr[dr],(u(a)||n(a))&&k({},cr.UnexpectedToken,"ILLEGAL")),{type:ar.NumericLiteral,value:parseInt(e,8),octal:!0,lineNumber:yr,lineStart:vr,range:[r,dr]}}n(a)&&k({},cr.UnexpectedToken,"ILLEGAL")}for(;gr>dr&&(a=fr[dr],n(a));)e+=fr[dr++]}if("."===a)for(e+=fr[dr++];gr>dr&&(a=fr[dr],n(a));)e+=fr[dr++];if("e"===a||"E"===a)if(e+=fr[dr++],a=fr[dr],("+"===a||"-"===a)&&(e+=fr[dr++]),a=fr[dr],n(a))for(e+=fr[dr++];gr>dr&&(a=fr[dr],n(a));)e+=fr[dr++];else a="character "+a,dr>=gr&&(a="<end>"),k({},cr.UnexpectedToken,"ILLEGAL");return gr>dr&&(a=fr[dr],u(a)&&k({},cr.UnexpectedToken,"ILLEGAL")),{type:ar.NumericLiteral,value:parseFloat(e),lineNumber:yr,lineStart:vr,range:[r,dr]}}function b(){var e,r,n,i,a,u,p="",c=!1;for(e=fr[dr],t("'"===e||'"'===e,"String literal must starts with a quote"),r=dr,++dr;gr>dr;){if(n=fr[dr++],n===e){e="";break}if("\\"===n)if(n=fr[dr++],s(n))++yr,"\r"===n&&"\n"===fr[dr]&&++dr;else switch(n){case"n":p+="\n";break;case"r":p+="\r";break;case"t":p+=" ";break;case"u":case"x":u=dr,a=y(n),a?p+=a:(dr=u,p+=n);break;case"b":p+="\b";break;case"f":p+="\f";break;case"v":p+=" ";break;default:o(n)?(i="01234567".indexOf(n),0!==i&&(c=!0),gr>dr&&o(fr[dr])&&(c=!0,i=8*i+"01234567".indexOf(fr[dr++]),"0123".indexOf(n)>=0&&gr>dr&&o(fr[dr])&&(i=8*i+"01234567".indexOf(fr[dr++]))),p+=String.fromCharCode(i)):p+=n}else{if(s(n))break;p+=n}}return""!==e&&k({},cr.UnexpectedToken,"ILLEGAL"),{type:ar.StringLiteral,value:p,octal:c,lineNumber:yr,lineStart:vr,range:[r,dr]}}function x(){var e,r,n,i,o,a,u,c=!1,l=!1;for(mr=null,d(),n=dr,r=fr[dr],t("/"===r,"Regular expression literal must start with a slash"),e=fr[dr++];gr>dr;)if(r=fr[dr++],e+=r,c)"]"===r&&(c=!1);else if("\\"===r)r=fr[dr++],s(r)&&k({},cr.UnterminatedRegExp),e+=r;else{if("/"===r){l=!0;break}"["===r?c=!0:s(r)&&k({},cr.UnterminatedRegExp)}for(l||k({},cr.UnterminatedRegExp),i=e.substr(1,e.length-2),o="";gr>dr&&(r=fr[dr],p(r));)if(++dr,"\\"===r&&gr>dr)if(r=fr[dr],"u"===r)if(++dr,u=dr,r=y("u"))for(o+=r,e+="\\u";dr>u;++u)e+=fr[u];else dr=u,o+="u",e+="\\u";else e+="\\";else o+=r,e+=r;try{a=RegExp(i,o)}catch(f){k({},cr.InvalidRegExp)}return{literal:e,value:a,range:[n,dr]}}function w(e){return e.type===ar.Identifier||e.type===ar.Keyword||e.type===ar.BooleanLiteral||e.type===ar.NullLiteral}function S(){var e,t;return d(),dr>=gr?{type:ar.EOF,lineNumber:yr,lineStart:vr,range:[dr,dr]}:(t=g(),t!==void 0?t:(e=fr[dr],"'"===e||'"'===e?b():"."===e||n(e)?m():(t=v(),t!==void 0?t:(k({},cr.UnexpectedToken,"ILLEGAL"),void 0))))}function E(){var e;return mr?(dr=mr.range[1],yr=mr.lineNumber,vr=mr.lineStart,e=mr,mr=null,e):(mr=null,S())}function j(){var e,t,r;return null!==mr?mr:(e=dr,t=yr,r=vr,mr=S(),dr=e,yr=t,vr=r,mr)}function A(){var e,t,r,n;return e=dr,t=yr,r=vr,d(),n=yr!==t,dr=e,yr=t,vr=r,n}function k(e,t){var r,n=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,function(e,t){return n[t]||""});throw"number"==typeof e.lineNumber?(r=Error("Line "+e.lineNumber+": "+i),r.index=e.range[0],r.lineNumber=e.lineNumber,r.column=e.range[0]-vr+1):(r=Error("Line "+yr+": "+i),r.index=dr,r.lineNumber=yr,r.column=dr-vr+1),r}function L(){try{k.apply(null,arguments)}catch(e){if(!xr.errors)throw e;xr.errors.push(e)}}function I(e){if(e.type===ar.EOF&&k(e,cr.UnexpectedEOS),e.type===ar.NumericLiteral&&k(e,cr.UnexpectedNumber),e.type===ar.StringLiteral&&k(e,cr.UnexpectedString),e.type===ar.Identifier&&k(e,cr.UnexpectedIdentifier),e.type===ar.Keyword){if(c(e.value))k(e,cr.UnexpectedReserved);else if(hr&&l(e.value))return L(e,cr.StrictReservedWord),void 0;k(e,cr.UnexpectedToken,e.value)}k(e,cr.UnexpectedToken,e.value)}function _(e){var t=E();(t.type!==ar.Punctuator||t.value!==e)&&I(t)}function O(e){var t=E();(t.type!==ar.Keyword||t.value!==e)&&I(t)}function N(e){var t=j();return t.type===ar.Punctuator&&t.value===e}function P(e){var t=j();return t.type===ar.Keyword&&t.value===e}function C(){var e=j(),t=e.value;return e.type!==ar.Punctuator?!1:"="===t||"*="===t||"/="===t||"%="===t||"+="===t||"-="===t||"<<="===t||">>="===t||">>>="===t||"&="===t||"^="===t||"|="===t}function D(){var e,t;if(";"===fr[dr])return E(),void 0;if(t=yr,d(),yr===t){if(N(";"))return E(),void 0;e=j(),e.type===ar.EOF||N("}")||I(e)}}function F(e){return e.type===ur.Identifier||e.type===ur.MemberExpression}function R(){var e=[];for(_("[");!N("]");)N(",")?(E(),e.push(null)):(e.push(pt()),N("]")||_(","));return _("]"),{type:ur.ArrayExpression,elements:e}}function U(e,t){var r,n;return r=hr,n=Rt(),t&&hr&&f(e[0].name)&&L(t,cr.StrictParamName),hr=r,{type:ur.FunctionExpression,id:null,params:e,defaults:[],body:n,rest:null,generator:!1,expression:!1}}function B(){var e=E();return e.type===ar.StringLiteral||e.type===ar.NumericLiteral?(hr&&e.octal&&L(e,cr.StrictOctalLiteral),Zt(e)):{type:ur.Identifier,name:e.value}}function T(){var e,t,r,n;return e=j(),e.type===ar.Identifier?(r=B(),"get"!==e.value||N(":")?"set"!==e.value||N(":")?(_(":"),{type:ur.Property,key:r,value:pt(),kind:"init"}):(t=B(),_("("),e=j(),e.type!==ar.Identifier?(_(")"),L(e,cr.UnexpectedToken,e.value),{type:ur.Property,key:t,value:U([]),kind:"set"}):(n=[ht()],_(")"),{type:ur.Property,key:t,value:U(n,e),kind:"set"})):(t=B(),_("("),_(")"),{type:ur.Property,key:t,value:U([]),kind:"get"})):e.type!==ar.EOF&&e.type!==ar.Punctuator?(t=B(),_(":"),{type:ur.Property,key:t,value:pt(),kind:"init"}):(I(e),void 0)}function M(){var e,t,r,n=[],i={},o=String;for(_("{");!N("}");)e=T(),t=e.key.type===ur.Identifier?e.key.name:o(e.key.value),r="init"===e.kind?pr.Data:"get"===e.kind?pr.Get:pr.Set,Object.prototype.hasOwnProperty.call(i,t)?(i[t]===pr.Data?hr&&r===pr.Data?L({},cr.StrictDuplicateProperty):r!==pr.Data&&L({},cr.AccessorDataProperty):r===pr.Data?L({},cr.AccessorDataProperty):i[t]&r&&L({},cr.AccessorGetSet),i[t]|=r):i[t]=r,n.push(e),N("}")||_(",");return _("}"),{type:ur.ObjectExpression,properties:n}}function q(){var e;return _("("),e=ct(),_(")"),e}function V(){var e=j(),t=e.type;if(t===ar.Identifier)return{type:ur.Identifier,name:E().value};if(t===ar.StringLiteral||t===ar.NumericLiteral)return hr&&e.octal&&L(e,cr.StrictOctalLiteral),Zt(E());if(t===ar.Keyword){if(P("this"))return E(),{type:ur.ThisExpression};if(P("function"))return Bt()}return t===ar.BooleanLiteral?(E(),e.value="true"===e.value,Zt(e)):t===ar.NullLiteral?(E(),e.value=null,Zt(e)):N("[")?R():N("{")?M():N("(")?q():N("/")||N("/=")?Zt(x()):I(E())}function G(){var e=[];if(_("("),!N(")"))for(;gr>dr&&(e.push(pt()),!N(")"));)_(",");return _(")"),e}function z(){var e=E();return w(e)||I(e),{type:ur.Identifier,name:e.value}}function H(){return _("."),z()}function K(){var e;return _("["),e=ct(),_("]"),e}function W(){var e;return O("new"),e={type:ur.NewExpression,callee:X(),arguments:[]},N("(")&&(e.arguments=G()),e}function Z(){var e;for(e=P("new")?W():V();N(".")||N("[")||N("(");)e=N("(")?{type:ur.CallExpression,callee:e,arguments:G()}:N("[")?{type:ur.MemberExpression,computed:!0,object:e,property:K()}:{type:ur.MemberExpression,computed:!1,object:e,property:H()};return e}function X(){var e;for(e=P("new")?W():V();N(".")||N("[");)e=N("[")?{type:ur.MemberExpression,computed:!0,object:e,property:K()}:{type:ur.MemberExpression,computed:!1,object:e,property:H()};return e}function J(){var e,t=Z();return e=j(),e.type!==ar.Punctuator?t:(!N("++")&&!N("--")||A()||(hr&&t.type===ur.Identifier&&f(t.name)&&L({},cr.StrictLHSPostfix),F(t)||k({},cr.InvalidLHSInAssignment),t={type:ur.UpdateExpression,operator:E().value,argument:t,prefix:!1}),t)}function Y(){var e,t;return e=j(),e.type!==ar.Punctuator&&e.type!==ar.Keyword?J():N("++")||N("--")?(e=E(),t=Y(),hr&&t.type===ur.Identifier&&f(t.name)&&L({},cr.StrictLHSPrefix),F(t)||k({},cr.InvalidLHSInAssignment),t={type:ur.UpdateExpression,operator:e.value,argument:t,prefix:!0}):N("+")||N("-")||N("~")||N("!")?t={type:ur.UnaryExpression,operator:E().value,argument:Y(),prefix:!0}:P("delete")||P("void")||P("typeof")?(t={type:ur.UnaryExpression,operator:E().value,argument:Y(),prefix:!0},hr&&"delete"===t.operator&&t.argument.type===ur.Identifier&&L({},cr.StrictDelete),t):J()}function $(){for(var e=Y();N("*")||N("/")||N("%");)e={type:ur.BinaryExpression,operator:E().value,left:e,right:Y()};return e}function Q(){for(var e=$();N("+")||N("-");)e={type:ur.BinaryExpression,operator:E().value,left:e,right:$()};return e}function et(){for(var e=Q();N("<<")||N(">>")||N(">>>");)e={type:ur.BinaryExpression,operator:E().value,left:e,right:Q()};return e}function tt(){var e,t;for(t=br.allowIn,br.allowIn=!0,e=et();N("<")||N(">")||N("<=")||N(">=")||t&&P("in")||P("instanceof");)e={type:ur.BinaryExpression,operator:E().value,left:e,right:et()};return br.allowIn=t,e}function rt(){for(var e=tt();N("==")||N("!=")||N("===")||N("!==");)e={type:ur.BinaryExpression,operator:E().value,left:e,right:tt()};return e}function nt(){for(var e=rt();N("&");)E(),e={type:ur.BinaryExpression,operator:"&",left:e,right:rt()};return e}function it(){for(var e=nt();N("^");)E(),e={type:ur.BinaryExpression,operator:"^",left:e,right:nt()};return e}function ot(){for(var e=it();N("|");)E(),e={type:ur.BinaryExpression,operator:"|",left:e,right:it()};return e}function at(){for(var e=ot();N("&&");)E(),e={type:ur.LogicalExpression,operator:"&&",left:e,right:ot()};return e}function st(){for(var e=at();N("||");)E(),e={type:ur.LogicalExpression,operator:"||",left:e,right:at()};return e}function ut(){var e,t,r;return e=st(),N("?")&&(E(),t=br.allowIn,br.allowIn=!0,r=pt(),br.allowIn=t,_(":"),e={type:ur.ConditionalExpression,test:e,consequent:r,alternate:pt()}),e}function pt(){var e,t;return e=j(),t=ut(),C()&&(F(t)||k({},cr.InvalidLHSInAssignment),hr&&t.type===ur.Identifier&&f(t.name)&&L(e,cr.StrictLHSAssignment),t={type:ur.AssignmentExpression,operator:E().value,left:t,right:pt()}),t
}function ct(){var e=pt();if(N(","))for(e={type:ur.SequenceExpression,expressions:[e]};gr>dr&&N(",");)E(),e.expressions.push(pt());return e}function lt(){for(var e,t=[];gr>dr&&!N("}")&&(e=Tt(),void 0!==e);)t.push(e);return t}function ft(){var e;return _("{"),e=lt(),_("}"),{type:ur.BlockStatement,body:e}}function ht(){var e=E();return e.type!==ar.Identifier&&I(e),{type:ur.Identifier,name:e.value}}function dt(e){var t=ht(),r=null;return hr&&f(t.name)&&L({},cr.StrictVarName),"const"===e?(_("="),r=pt()):N("=")&&(E(),r=pt()),{type:ur.VariableDeclarator,id:t,init:r}}function yt(e){var t=[];do{if(t.push(dt(e)),!N(","))break;E()}while(gr>dr);return t}function vt(){var e;return O("var"),e=yt(),D(),{type:ur.VariableDeclaration,declarations:e,kind:"var"}}function gt(e){var t;return O(e),t=yt(e),D(),{type:ur.VariableDeclaration,declarations:t,kind:e}}function mt(){return _(";"),{type:ur.EmptyStatement}}function bt(){var e=ct();return D(),{type:ur.ExpressionStatement,expression:e}}function xt(){var e,t,r;return O("if"),_("("),e=ct(),_(")"),t=Ft(),P("else")?(E(),r=Ft()):r=null,{type:ur.IfStatement,test:e,consequent:t,alternate:r}}function wt(){var e,t,r;return O("do"),r=br.inIteration,br.inIteration=!0,e=Ft(),br.inIteration=r,O("while"),_("("),t=ct(),_(")"),N(";")&&E(),{type:ur.DoWhileStatement,body:e,test:t}}function St(){var e,t,r;return O("while"),_("("),e=ct(),_(")"),r=br.inIteration,br.inIteration=!0,t=Ft(),br.inIteration=r,{type:ur.WhileStatement,test:e,body:t}}function Et(){var e=E();return{type:ur.VariableDeclaration,declarations:yt(),kind:e.value}}function jt(){var e,t,r,n,i,o,a;return e=t=r=null,O("for"),_("("),N(";")?E():(P("var")||P("let")?(br.allowIn=!1,e=Et(),br.allowIn=!0,1===e.declarations.length&&P("in")&&(E(),n=e,i=ct(),e=null)):(br.allowIn=!1,e=ct(),br.allowIn=!0,P("in")&&(F(e)||k({},cr.InvalidLHSInForIn),E(),n=e,i=ct(),e=null)),n===void 0&&_(";")),n===void 0&&(N(";")||(t=ct()),_(";"),N(")")||(r=ct())),_(")"),a=br.inIteration,br.inIteration=!0,o=Ft(),br.inIteration=a,n===void 0?{type:ur.ForStatement,init:e,test:t,update:r,body:o}:{type:ur.ForInStatement,left:n,right:i,body:o,each:!1}}function At(){var e,t=null;return O("continue"),";"===fr[dr]?(E(),br.inIteration||k({},cr.IllegalContinue),{type:ur.ContinueStatement,label:null}):A()?(br.inIteration||k({},cr.IllegalContinue),{type:ur.ContinueStatement,label:null}):(e=j(),e.type===ar.Identifier&&(t=ht(),Object.prototype.hasOwnProperty.call(br.labelSet,t.name)||k({},cr.UnknownLabel,t.name)),D(),null!==t||br.inIteration||k({},cr.IllegalContinue),{type:ur.ContinueStatement,label:t})}function kt(){var e,t=null;return O("break"),";"===fr[dr]?(E(),br.inIteration||br.inSwitch||k({},cr.IllegalBreak),{type:ur.BreakStatement,label:null}):A()?(br.inIteration||br.inSwitch||k({},cr.IllegalBreak),{type:ur.BreakStatement,label:null}):(e=j(),e.type===ar.Identifier&&(t=ht(),Object.prototype.hasOwnProperty.call(br.labelSet,t.name)||k({},cr.UnknownLabel,t.name)),D(),null!==t||br.inIteration||br.inSwitch||k({},cr.IllegalBreak),{type:ur.BreakStatement,label:t})}function Lt(){var e,t=null;return O("return"),br.inFunctionBody||L({},cr.IllegalReturn)," "===fr[dr]&&u(fr[dr+1])?(t=ct(),D(),{type:ur.ReturnStatement,argument:t}):A()?{type:ur.ReturnStatement,argument:null}:(N(";")||(e=j(),N("}")||e.type===ar.EOF||(t=ct())),D(),{type:ur.ReturnStatement,argument:t})}function It(){var e,t;return hr&&L({},cr.StrictModeWith),O("with"),_("("),e=ct(),_(")"),t=Ft(),{type:ur.WithStatement,object:e,body:t}}function _t(){var e,t,r=[];for(P("default")?(E(),e=null):(O("case"),e=ct()),_(":");gr>dr&&!(N("}")||P("default")||P("case"))&&(t=Ft(),void 0!==t);)r.push(t);return{type:ur.SwitchCase,test:e,consequent:r}}function Ot(){var e,t,r,n,i;if(O("switch"),_("("),e=ct(),_(")"),_("{"),N("}"))return E(),{type:ur.SwitchStatement,discriminant:e};for(t=[],n=br.inSwitch,br.inSwitch=!0,i=!1;gr>dr&&!N("}");)r=_t(),null===r.test&&(i&&k({},cr.MultipleDefaultsInSwitch),i=!0),t.push(r);return br.inSwitch=n,_("}"),{type:ur.SwitchStatement,discriminant:e,cases:t}}function Nt(){var e;return O("throw"),A()&&k({},cr.NewlineAfterThrow),e=ct(),D(),{type:ur.ThrowStatement,argument:e}}function Pt(){var e;return O("catch"),_("("),N(")")&&I(j()),e=ht(),hr&&f(e.name)&&L({},cr.StrictCatchVariable),_(")"),{type:ur.CatchClause,param:e,body:ft()}}function Ct(){var e,t=[],r=null;return O("try"),e=ft(),P("catch")&&t.push(Pt()),P("finally")&&(E(),r=ft()),0!==t.length||r||k({},cr.NoCatchOrFinally),{type:ur.TryStatement,block:e,guardedHandlers:[],handlers:t,finalizer:r}}function Dt(){return O("debugger"),D(),{type:ur.DebuggerStatement}}function Ft(){var e,t,r=j();if(r.type===ar.EOF&&I(r),r.type===ar.Punctuator)switch(r.value){case";":return mt();case"{":return ft();case"(":return bt();default:}if(r.type===ar.Keyword)switch(r.value){case"break":return kt();case"continue":return At();case"debugger":return Dt();case"do":return wt();case"for":return jt();case"function":return Ut();case"if":return xt();case"return":return Lt();case"switch":return Ot();case"throw":return Nt();case"try":return Ct();case"var":return vt();case"while":return St();case"with":return It();default:}return e=ct(),e.type===ur.Identifier&&N(":")?(E(),Object.prototype.hasOwnProperty.call(br.labelSet,e.name)&&k({},cr.Redeclaration,"Label",e.name),br.labelSet[e.name]=!0,t=Ft(),delete br.labelSet[e.name],{type:ur.LabeledStatement,label:e,body:t}):(D(),{type:ur.ExpressionStatement,expression:e})}function Rt(){var e,t,n,i,o,a,s,u,p=[];for(_("{");gr>dr&&(t=j(),t.type===ar.StringLiteral)&&(e=Tt(),p.push(e),e.expression.type===ur.Literal);)n=r(t.range[0]+1,t.range[1]-1),"use strict"===n?(hr=!0,i&&L(i,cr.StrictOctalLiteral)):!i&&t.octal&&(i=t);for(o=br.labelSet,a=br.inIteration,s=br.inSwitch,u=br.inFunctionBody,br.labelSet={},br.inIteration=!1,br.inSwitch=!1,br.inFunctionBody=!0;gr>dr&&!N("}")&&(e=Tt(),void 0!==e);)p.push(e);return _("}"),br.labelSet=o,br.inIteration=a,br.inSwitch=s,br.inFunctionBody=u,{type:ur.BlockStatement,body:p}}function Ut(){var e,t,r,n,i,o,a,s,u,p=[];if(O("function"),n=j(),e=ht(),hr?f(n.value)&&L(n,cr.StrictFunctionName):f(n.value)?(o=n,a=cr.StrictFunctionName):l(n.value)&&(o=n,a=cr.StrictReservedWord),_("("),!N(")"))for(u={};gr>dr&&(n=j(),t=ht(),hr?(f(n.value)&&(i=n,a=cr.StrictParamName),Object.prototype.hasOwnProperty.call(u,n.value)&&(i=n,a=cr.StrictParamDupe)):o||(f(n.value)?(o=n,a=cr.StrictParamName):l(n.value)?(o=n,a=cr.StrictReservedWord):Object.prototype.hasOwnProperty.call(u,n.value)&&(o=n,a=cr.StrictParamDupe)),p.push(t),u[t.name]=!0,!N(")"));)_(",");return _(")"),s=hr,r=Rt(),hr&&o&&k(o,a),hr&&i&&L(i,a),hr=s,{type:ur.FunctionDeclaration,id:e,params:p,defaults:[],body:r,rest:null,generator:!1,expression:!1}}function Bt(){var e,t,r,n,i,o,a,s,u=null,p=[];if(O("function"),N("(")||(e=j(),u=ht(),hr?f(e.value)&&L(e,cr.StrictFunctionName):f(e.value)?(r=e,n=cr.StrictFunctionName):l(e.value)&&(r=e,n=cr.StrictReservedWord)),_("("),!N(")"))for(s={};gr>dr&&(e=j(),i=ht(),hr?(f(e.value)&&(t=e,n=cr.StrictParamName),Object.prototype.hasOwnProperty.call(s,e.value)&&(t=e,n=cr.StrictParamDupe)):r||(f(e.value)?(r=e,n=cr.StrictParamName):l(e.value)?(r=e,n=cr.StrictReservedWord):Object.prototype.hasOwnProperty.call(s,e.value)&&(r=e,n=cr.StrictParamDupe)),p.push(i),s[i.name]=!0,!N(")"));)_(",");return _(")"),a=hr,o=Rt(),hr&&r&&k(r,n),hr&&t&&L(t,n),hr=a,{type:ur.FunctionExpression,id:u,params:p,defaults:[],body:o,rest:null,generator:!1,expression:!1}}function Tt(){var e=j();if(e.type===ar.Keyword)switch(e.value){case"const":case"let":return gt(e.value);case"function":return Ut();default:return Ft()}return e.type!==ar.EOF?Ft():void 0}function Mt(){for(var e,t,n,i,o=[];gr>dr&&(t=j(),t.type===ar.StringLiteral)&&(e=Tt(),o.push(e),e.expression.type===ur.Literal);)n=r(t.range[0]+1,t.range[1]-1),"use strict"===n?(hr=!0,i&&L(i,cr.StrictOctalLiteral)):!i&&t.octal&&(i=t);for(;gr>dr&&(e=Tt(),void 0!==e);)o.push(e);return o}function qt(){var e;return hr=!1,e={type:ur.Program,body:Mt()}}function Vt(e,r,n,i,o){t("number"==typeof n,"Comment must have valid position"),xr.comments.length>0&&xr.comments[xr.comments.length-1].range[1]>n||xr.comments.push({type:e,value:r,range:[n,i],loc:o})}function Gt(){var e,t,r,n,i,o;for(e="",i=!1,o=!1;gr>dr;)if(t=fr[dr],o)t=fr[dr++],s(t)?(r.end={line:yr,column:dr-vr-1},o=!1,Vt("Line",e,n,dr-1,r),"\r"===t&&"\n"===fr[dr]&&++dr,++yr,vr=dr,e=""):dr>=gr?(o=!1,e+=t,r.end={line:yr,column:gr-vr},Vt("Line",e,n,gr,r)):e+=t;else if(i)s(t)?("\r"===t&&"\n"===fr[dr+1]?(++dr,e+="\r\n"):e+=t,++yr,++dr,vr=dr,dr>=gr&&k({},cr.UnexpectedToken,"ILLEGAL")):(t=fr[dr++],dr>=gr&&k({},cr.UnexpectedToken,"ILLEGAL"),e+=t,"*"===t&&(t=fr[dr],"/"===t&&(e=e.substr(0,e.length-1),i=!1,++dr,r.end={line:yr,column:dr-vr},Vt("Block",e,n,dr,r),e="")));else if("/"===t)if(t=fr[dr+1],"/"===t)r={start:{line:yr,column:dr-vr}},n=dr,dr+=2,o=!0,dr>=gr&&(r.end={line:yr,column:dr-vr},o=!1,Vt("Line",e,n,dr,r));else{if("*"!==t)break;n=dr,dr+=2,i=!0,r={start:{line:yr,column:dr-vr-2}},dr>=gr&&k({},cr.UnexpectedToken,"ILLEGAL")}else if(a(t))++dr;else{if(!s(t))break;++dr,"\r"===t&&"\n"===fr[dr]&&++dr,++yr,vr=dr}}function zt(){var e,t,r,n=[];for(e=0;xr.comments.length>e;++e)t=xr.comments[e],r={type:t.type,value:t.value},xr.range&&(r.range=t.range),xr.loc&&(r.loc=t.loc),n.push(r);xr.comments=n}function Ht(){var e,t,n,i,o;return d(),e=dr,t={start:{line:yr,column:dr-vr}},n=xr.advance(),t.end={line:yr,column:dr-vr},n.type!==ar.EOF&&(i=[n.range[0],n.range[1]],o=r(n.range[0],n.range[1]),xr.tokens.push({type:sr[n.type],value:o,range:i,loc:t})),n}function Kt(){var e,t,r,n;return d(),e=dr,t={start:{line:yr,column:dr-vr}},r=xr.scanRegExp(),t.end={line:yr,column:dr-vr},xr.tokens.length>0&&(n=xr.tokens[xr.tokens.length-1],n.range[0]===e&&"Punctuator"===n.type&&("/"===n.value||"/="===n.value)&&xr.tokens.pop()),xr.tokens.push({type:"RegularExpression",value:r.literal,range:[e,dr],loc:t}),r}function Wt(){var e,t,r,n=[];for(e=0;xr.tokens.length>e;++e)t=xr.tokens[e],r={type:t.type,value:t.value},xr.range&&(r.range=t.range),xr.loc&&(r.loc=t.loc),n.push(r);xr.tokens=n}function Zt(e){return{type:ur.Literal,value:e.value}}function Xt(e){return{type:ur.Literal,value:e.value,raw:r(e.range[0],e.range[1])}}function Jt(){var e={};return e.range=[dr,dr],e.loc={start:{line:yr,column:dr-vr},end:{line:yr,column:dr-vr}},e.end=function(){this.range[1]=dr,this.loc.end.line=yr,this.loc.end.column=dr-vr},e.applyGroup=function(e){xr.range&&(e.groupRange=[this.range[0],this.range[1]]),xr.loc&&(e.groupLoc={start:{line:this.loc.start.line,column:this.loc.start.column},end:{line:this.loc.end.line,column:this.loc.end.column}})},e.apply=function(e){xr.range&&(e.range=[this.range[0],this.range[1]]),xr.loc&&(e.loc={start:{line:this.loc.start.line,column:this.loc.start.column},end:{line:this.loc.end.line,column:this.loc.end.column}})},e}function Yt(){var e,t;return d(),e=Jt(),_("("),t=ct(),_(")"),e.end(),e.applyGroup(t),t}function $t(){var e,t;for(d(),e=Jt(),t=P("new")?W():V();N(".")||N("[");)N("[")?(t={type:ur.MemberExpression,computed:!0,object:t,property:K()},e.end(),e.apply(t)):(t={type:ur.MemberExpression,computed:!1,object:t,property:H()},e.end(),e.apply(t));return t}function Qt(){var e,t;for(d(),e=Jt(),t=P("new")?W():V();N(".")||N("[")||N("(");)N("(")?(t={type:ur.CallExpression,callee:t,arguments:G()},e.end(),e.apply(t)):N("[")?(t={type:ur.MemberExpression,computed:!0,object:t,property:K()},e.end(),e.apply(t)):(t={type:ur.MemberExpression,computed:!1,object:t,property:H()},e.end(),e.apply(t));return t}function er(e){var t,r,n;t="[object Array]"===Object.prototype.toString.apply(e)?[]:{};for(r in e)e.hasOwnProperty(r)&&"groupRange"!==r&&"groupLoc"!==r&&(n=e[r],t[r]=null===n||"object"!=typeof n||n instanceof RegExp?n:er(n));return t}function tr(e,t){return function(r){function n(e){return e.type===ur.LogicalExpression||e.type===ur.BinaryExpression}function i(r){var o,a;n(r.left)&&i(r.left),n(r.right)&&i(r.right),e&&(r.left.groupRange||r.right.groupRange?(o=r.left.groupRange?r.left.groupRange[0]:r.left.range[0],a=r.right.groupRange?r.right.groupRange[1]:r.right.range[1],r.range=[o,a]):r.range===void 0&&(o=r.left.range[0],a=r.right.range[1],r.range=[o,a])),t&&(r.left.groupLoc||r.right.groupLoc?(o=r.left.groupLoc?r.left.groupLoc.start:r.left.loc.start,a=r.right.groupLoc?r.right.groupLoc.end:r.right.loc.end,r.loc={start:o,end:a}):r.loc===void 0&&(r.loc={start:r.left.loc.start,end:r.right.loc.end}))}return function(){var o,a;return d(),o=Jt(),a=r.apply(null,arguments),o.end(),e&&a.range===void 0&&o.apply(a),t&&a.loc===void 0&&o.apply(a),n(a)&&i(a),a}}}function rr(){var e;xr.comments&&(xr.skipComment=d,d=Gt),xr.raw&&(xr.createLiteral=Zt,Zt=Xt),(xr.range||xr.loc)&&(xr.parseGroupExpression=q,xr.parseLeftHandSideExpression=X,xr.parseLeftHandSideExpressionAllowCall=Z,q=Yt,X=$t,Z=Qt,e=tr(xr.range,xr.loc),xr.parseAdditiveExpression=Q,xr.parseAssignmentExpression=pt,xr.parseBitwiseANDExpression=nt,xr.parseBitwiseORExpression=ot,xr.parseBitwiseXORExpression=it,xr.parseBlock=ft,xr.parseFunctionSourceElements=Rt,xr.parseCatchClause=Pt,xr.parseComputedMember=K,xr.parseConditionalExpression=ut,xr.parseConstLetDeclaration=gt,xr.parseEqualityExpression=rt,xr.parseExpression=ct,xr.parseForVariableDeclaration=Et,xr.parseFunctionDeclaration=Ut,xr.parseFunctionExpression=Bt,xr.parseLogicalANDExpression=at,xr.parseLogicalORExpression=st,xr.parseMultiplicativeExpression=$,xr.parseNewExpression=W,xr.parseNonComputedProperty=z,xr.parseObjectProperty=T,xr.parseObjectPropertyKey=B,xr.parsePostfixExpression=J,xr.parsePrimaryExpression=V,xr.parseProgram=qt,xr.parsePropertyFunction=U,xr.parseRelationalExpression=tt,xr.parseStatement=Ft,xr.parseShiftExpression=et,xr.parseSwitchCase=_t,xr.parseUnaryExpression=Y,xr.parseVariableDeclaration=dt,xr.parseVariableIdentifier=ht,Q=e(xr.parseAdditiveExpression),pt=e(xr.parseAssignmentExpression),nt=e(xr.parseBitwiseANDExpression),ot=e(xr.parseBitwiseORExpression),it=e(xr.parseBitwiseXORExpression),ft=e(xr.parseBlock),Rt=e(xr.parseFunctionSourceElements),Pt=e(xr.parseCatchClause),K=e(xr.parseComputedMember),ut=e(xr.parseConditionalExpression),gt=e(xr.parseConstLetDeclaration),rt=e(xr.parseEqualityExpression),ct=e(xr.parseExpression),Et=e(xr.parseForVariableDeclaration),Ut=e(xr.parseFunctionDeclaration),Bt=e(xr.parseFunctionExpression),X=e(X),at=e(xr.parseLogicalANDExpression),st=e(xr.parseLogicalORExpression),$=e(xr.parseMultiplicativeExpression),W=e(xr.parseNewExpression),z=e(xr.parseNonComputedProperty),T=e(xr.parseObjectProperty),B=e(xr.parseObjectPropertyKey),J=e(xr.parsePostfixExpression),V=e(xr.parsePrimaryExpression),qt=e(xr.parseProgram),U=e(xr.parsePropertyFunction),tt=e(xr.parseRelationalExpression),Ft=e(xr.parseStatement),et=e(xr.parseShiftExpression),_t=e(xr.parseSwitchCase),Y=e(xr.parseUnaryExpression),dt=e(xr.parseVariableDeclaration),ht=e(xr.parseVariableIdentifier)),xr.tokens!==void 0&&(xr.advance=S,xr.scanRegExp=x,S=Ht,x=Kt)}function nr(){"function"==typeof xr.skipComment&&(d=xr.skipComment),xr.raw&&(Zt=xr.createLiteral),(xr.range||xr.loc)&&(Q=xr.parseAdditiveExpression,pt=xr.parseAssignmentExpression,nt=xr.parseBitwiseANDExpression,ot=xr.parseBitwiseORExpression,it=xr.parseBitwiseXORExpression,ft=xr.parseBlock,Rt=xr.parseFunctionSourceElements,Pt=xr.parseCatchClause,K=xr.parseComputedMember,ut=xr.parseConditionalExpression,gt=xr.parseConstLetDeclaration,rt=xr.parseEqualityExpression,ct=xr.parseExpression,Et=xr.parseForVariableDeclaration,Ut=xr.parseFunctionDeclaration,Bt=xr.parseFunctionExpression,q=xr.parseGroupExpression,X=xr.parseLeftHandSideExpression,Z=xr.parseLeftHandSideExpressionAllowCall,at=xr.parseLogicalANDExpression,st=xr.parseLogicalORExpression,$=xr.parseMultiplicativeExpression,W=xr.parseNewExpression,z=xr.parseNonComputedProperty,T=xr.parseObjectProperty,B=xr.parseObjectPropertyKey,V=xr.parsePrimaryExpression,J=xr.parsePostfixExpression,qt=xr.parseProgram,U=xr.parsePropertyFunction,tt=xr.parseRelationalExpression,Ft=xr.parseStatement,et=xr.parseShiftExpression,_t=xr.parseSwitchCase,Y=xr.parseUnaryExpression,dt=xr.parseVariableDeclaration,ht=xr.parseVariableIdentifier),"function"==typeof xr.scanRegExp&&(S=xr.advance,x=xr.scanRegExp)}function ir(e){var t,r=e.length,n=[];for(t=0;r>t;++t)n[t]=e.charAt(t);return n}function or(e,t){var r,n;n=String,"string"==typeof e||e instanceof String||(e=n(e)),fr=e,dr=0,yr=fr.length>0?1:0,vr=0,gr=fr.length,mr=null,br={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1},xr={},t!==void 0&&(xr.range="boolean"==typeof t.range&&t.range,xr.loc="boolean"==typeof t.loc&&t.loc,xr.raw="boolean"==typeof t.raw&&t.raw,"boolean"==typeof t.tokens&&t.tokens&&(xr.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(xr.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(xr.errors=[])),gr>0&&fr[0]===void 0&&(e instanceof String&&(fr=e.valueOf()),fr[0]===void 0&&(fr=ir(e))),rr();try{r=qt(),xr.comments!==void 0&&(zt(),r.comments=xr.comments),xr.tokens!==void 0&&(Wt(),r.tokens=xr.tokens),xr.errors!==void 0&&(r.errors=xr.errors),(xr.range||xr.loc)&&(r.body=er(r.body))}catch(i){throw i}finally{nr(),xr={}}return r}var ar,sr,ur,pr,cr,lr,fr,hr,dr,yr,vr,gr,mr,br,xr;ar={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8},sr={},sr[ar.BooleanLiteral]="Boolean",sr[ar.EOF]="<end>",sr[ar.Identifier]="Identifier",sr[ar.Keyword]="Keyword",sr[ar.NullLiteral]="Null",sr[ar.NumericLiteral]="Numeric",sr[ar.Punctuator]="Punctuator",sr[ar.StringLiteral]="String",ur={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},pr={Data:1,Get:2,Set:4},cr={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},lr={NonAsciiIdentifierStart:RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},"esprima"[0]===void 0&&(r=function(e,t){return fr.slice(e,t).join("")}),e.version="1.0.3",e.parse=or,e.Syntax=function(){var e,t={};"function"==typeof Object.create&&(t=Object.create(null));for(e in ur)ur.hasOwnProperty(e)&&(t[e]=ur[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()})})()},{}],19:[function(e,t){"use strict";function r(e,t){for(var r=1,n=e.length,i=e[0],o=e[0],a=1;n>a;++a)if(o=i,i=e[a],t(i,o)){if(a===r){r++;continue}e[r++]=i}return e.length=r,e}function n(e){for(var t=1,r=e.length,n=e[0],i=e[0],o=1;r>o;++o,i=n)if(i=n,n=e[o],n!==i){if(o===t){t++;continue}e[t++]=n}return e.length=t,e}function i(e,t,i){return 0===e.length?[]:t?(i||e.sort(t),r(e,t)):(i||e.sort(),n(e))}t.exports=i},{}],20:[function(e,t){"use strict";function r(e,t,r){var n,i,o=e.length,a=t.arrayArgs.length,s=t.indexArgs.length>0,u=[],p=[],c=0,l=0;for(n=0;o>n;++n)p.push(["i",n,"=0"].join(""));for(i=0;a>i;++i)for(n=0;o>n;++n)l=c,c=e[n],0===n?p.push(["d",i,"s",n,"=t",i,"[",c,"]"].join("")):p.push(["d",i,"s",n,"=(t",i,"[",c,"]-s",l,"*t",i,"[",l,"])"].join(""));for(u.push("var "+p.join(",")),n=o-1;n>=0;--n)c=e[n],u.push(["for(i",n,"=0;i",n,"<s",c,";++i",n,"){"].join(""));for(u.push(r),n=0;o>n;++n){for(l=c,c=e[n],i=0;a>i;++i)u.push(["p",i,"+=d",i,"s",n].join(""));s&&(n>0&&u.push(["index[",l,"]-=s",l].join("")),u.push(["++index[",c,"]"].join(""))),u.push("}")}return u.join("\n")}function n(e,t,n,i){for(var o=t.length,a=n.arrayArgs.length,s=n.blockSize,u=n.indexArgs.length>0,p=[],c=0;a>c;++c)p.push(["var offset",c,"=p",c].join(""));for(var c=e;o>c;++c)p.push(["for(var j"+c+"=SS[",t[c],"]|0;j",c,">0;){"].join("")),p.push(["if(j",c,"<",s,"){"].join("")),p.push(["s",t[c],"=j",c].join("")),p.push(["j",c,"=0"].join("")),p.push(["}else{s",t[c],"=",s].join("")),p.push(["j",c,"-=",s,"}"].join("")),u&&p.push(["index[",t[c],"]=j",c].join(""));for(var c=0;a>c;++c){for(var l=["offset"+c],f=e;o>f;++f)l.push(["j",f,"*t",c,"[",t[f],"]"].join(""));p.push(["p",c,"=(",l.join("+"),")"].join(""))}p.push(r(t,n,i));for(var c=e;o>c;++c)p.push("}");return p.join("\n")}function i(e){for(var t=0,r=e[0].length;r>t;){for(var n=1;e.length>n;++n)if(e[n][t]!==e[0][t])return t;++t}return t}function o(e,t,r){for(var n=e.body,i=[],o=[],a=0;e.args.length>a;++a){var s=e.args[a];if(!(0>=s.count)){var u=RegExp(s.name,"g");switch(t.argTypes[a]){case"array":var p=t.arrayArgs.indexOf(a);1===s.count?"generic"===r[p]?s.lvalue?(i.push(["var l",p,"=a",p,".get(p",p,")"].join("")),n=n.replace(u,"l"+p),o.push(["a",p,".set(p",p,",l",p,")"].join(""))):n=n.replace(u,["a",p,".get(p",p,")"].join("")):n=n.replace(u,["a",p,"[p",p,"]"].join("")):"generic"===r[p]?(i.push(["var l",p,"=a",p,".get(p",p,")"].join("")),n=n.replace(u,"l"+p),s.lvalue&&o.push(["a",p,".set(p",p,",l",p,")"].join(""))):(i.push(["var l",p,"=a",p,"[p",p,"]"].join("")),n=n.replace(u,"l"+p),s.lvalue&&o.push(["a",p,"[p",p,"]=l",p].join("")));break;case"scalar":n=n.replace(u,"Y"+t.scalarArgs.indexOf(a));break;case"index":n=n.replace(u,"index");break;case"shape":n=n.replace(u,"shape")}}}return[i.join("\n"),n,o.join("\n")].join("\n").trim()}function a(e){for(var t=Array(e.length),r=!0,n=0;e.length>n;++n){var i=e[n],o=i.match(/\d+/);o=o?o[0]:"",t[n]=0===i.charAt(0)?"u"+i.charAt(1)+o:i.charAt(0)+o,n>0&&(r=r&&t[n]===t[n-1])}return r?t[0]:t.join("")}function s(e,t){for(var s=0|t[1].length,p=Array(e.arrayArgs.length),c=Array(e.arrayArgs.length),l=["SS"],f=["'use strict'"],h=[],d=0;s>d;++d)h.push(["s",d,"=SS[",d,"]"].join(""));for(var y=0;e.arrayArgs.length>y;++y)l.push("a"+y),l.push("t"+y),l.push("p"+y),c[y]=t[2*y],p[y]=t[2*y+1];for(var y=0;e.scalarArgs.length>y;++y)l.push("Y"+y);if(e.shapeArgs.length>0&&h.push("shape=SS.slice(0)"),e.indexArgs.length>0){for(var v=Array(s),y=0;s>y;++y)v[y]="0";h.push(["index=[",v.join(","),"]"].join(""))}var g=u([].concat(e.pre.thisVars).concat(e.body.thisVars).concat(e.post.thisVars));h=h.concat(g),f.push("var "+h.join(","));for(var y=0;e.arrayArgs.length>y;++y)f.push("p"+y+"|=0");e.pre.body.length>3&&f.push(o(e.pre,e,c));var m=o(e.body,e,c),b=i(p);s>b?f.push(n(b,p[0],e,m)):f.push(r(p[0],e,m)),e.post.body.length>3&&f.push(o(e.post,e,c)),e.debug&&console.log("Generated cwise routine for ",t,":\n\n",f.join("\n"));var x=[e.funcName||"unnamed","_cwise_loop_",p[0].join("s"),"m",b,a(c)].join(""),w=Function(["function ",x,"(",l.join(","),"){",f.join("\n"),"} return ",x].join(""));return w()}var u=e("uniq");t.exports=s},{uniq:22}],21:[function(e,t){"use strict";function r(e,t,r){var n,i,o=e.length,a=t.arrayArgs.length,s=t.indexArgs.length>0,u=[],p=[],c=0,l=0;for(n=0;o>n;++n)p.push(["i",n,"=0"].join(""));for(i=0;a>i;++i)for(n=0;o>n;++n)l=c,c=e[n],0===n?p.push(["d",i,"s",n,"=t",i,"[",c,"]"].join("")):p.push(["d",i,"s",n,"=(t",i,"[",c,"]-s",l,"*t",i,"[",l,"])"].join(""));for(u.push("var "+p.join(",")),n=o-1;n>=0;--n)c=e[n],u.push(["for(i",n,"=0;i",n,"<s",c,";++i",n,"){"].join(""));for(u.push(r),n=0;o>n;++n){for(l=c,c=e[n],i=0;a>i;++i)u.push(["p",i,"+=d",i,"s",n].join(""));s&&(n>0&&u.push(["index[",l,"]-=s",l].join("")),u.push(["++index[",c,"]"].join(""))),u.push("}")}return u.join("\n")}function n(e,t,n,i){for(var o=t.length,a=n.arrayArgs.length,s=n.blockSize,u=n.indexArgs.length>0,p=[],c=0;a>c;++c)p.push(["var offset",c,"=p",c].join(""));for(var c=e;o>c;++c)p.push(["for(var j"+c+"=SS[",t[c],"]|0;j",c,">0;){"].join("")),p.push(["if(j",c,"<",s,"){"].join("")),p.push(["s",t[c],"=j",c].join("")),p.push(["j",c,"=0"].join("")),p.push(["}else{s",t[c],"=",s].join("")),p.push(["j",c,"-=",s,"}"].join("")),u&&p.push(["index[",t[c],"]=j",c].join(""));for(var c=0;a>c;++c){for(var l=["offset"+c],f=e;o>f;++f)l.push(["j",f,"*t",c,"[",t[f],"]"].join(""));p.push(["p",c,"=(",l.join("+"),")"].join(""))}p.push(r(t,n,i));for(var c=e;o>c;++c)p.push("}");return p.join("\n")}function i(e){for(var t=0,r=e[0].length;r>t;){for(var n=1;e.length>n;++n)if(e[n][t]!==e[0][t])return t;++t}return t}function o(e,t,r){for(var n=e.body,i=[],o=[],a=0;e.args.length>a;++a){var s=e.args[a];if(!(0>=s.count)){var u=RegExp(s.name,"g");switch(t.argTypes[a]){case"array":var p=t.arrayArgs.indexOf(a);1===s.count?"generic"===r[p]?s.lvalue?(i.push(["var l",p,"=a",p,".get(p",p,")"].join("")),n=n.replace(u,"l"+p),o.push(["a",p,".set(p",p,",l",p,")"].join(""))):n=n.replace(u,["a",p,".get(p",p,")"].join("")):n=n.replace(u,["a",p,"[p",p,"]"].join("")):"generic"===r[p]?(i.push(["var l",p,"=a",p,".get(p",p,")"].join("")),n=n.replace(u,"l"+p),s.lvalue&&o.push(["a",p,".set(p",p,",l",p,")"].join(""))):(i.push(["var l",p,"=a",p,"[p",p,"]"].join("")),n=n.replace(u,"l"+p),s.lvalue&&o.push(["a",p,"[p",p,"]=l",p].join("")));break;case"scalar":n=n.replace(u,"Y"+t.scalarArgs.indexOf(a));break;case"index":n=n.replace(u,"index");break;case"shape":n=n.replace(u,"shape")}}}return[i.join("\n"),n,o.join("\n")].join("\n").trim()}function a(e){for(var t=Array(e.length),r=!0,n=0;e.length>n;++n){var i=e[n],o=i.match(/\d+/);o=o?o[0]:"",t[n]=0===i.charAt(0)?"u"+i.charAt(1)+o:i.charAt(0)+o,n>0&&(r=r&&t[n]===t[n-1])}return r?t[0]:t.join("")}function s(e,t){for(var s=0|t[1].length,p=Array(e.arrayArgs.length),c=Array(e.arrayArgs.length),l=["SS"],f=["'use strict'"],h=[],d=0;s>d;++d)h.push(["s",d,"=SS[",d,"]"].join(""));for(var y=0;e.arrayArgs.length>y;++y)l.push("a"+y),l.push("t"+y),l.push("p"+y),c[y]=t[2*y],p[y]=t[2*y+1];for(var y=0;e.scalarArgs.length>y;++y)l.push("Y"+y);if(e.shapeArgs.length>0&&h.push("shape=SS.slice(0)"),e.indexArgs.length>0){for(var v=Array(s),y=0;s>y;++y)v[y]="0";h.push(["index=[",v.join(","),"]"].join(""))}var g=u([].concat(e.pre.thisVars).concat(e.body.thisVars).concat(e.post.thisVars));h=h.concat(g),f.push("var "+h.join(","));for(var y=0;e.arrayArgs.length>y;++y)f.push("p"+y+"|=0");e.pre.body.length>3&&f.push(o(e.pre,e,c));var m=o(e.body,e,c),b=i(p);s>b?f.push(n(b,p[0],e,m)):f.push(r(p[0],e,m)),e.post.body.length>3&&f.push(o(e.post,e,c)),e.debug&&console.log("Generated cwise routine for ",t,":\n\n",f.join("\n"));var x=[e.funcName||"unnamed","_cwise_loop_",p[0].join("s"),"m",b,a(c)].join(""),w=Function(["function ",x,"(",l.join(","),"){",f.join("\n"),"} return ",x].join(""));return w()}var u=e("uniq");t.exports=s},{uniq:23}],22:[function(e,t){"use strict";function r(e,t){for(var r=1,n=e.length,i=e[0],o=e[0],a=1;n>a;++a)if(o=i,i=e[a],t(i,o)){if(a===r){r++;continue}e[r++]=i}return e.length=r,e}function n(e){for(var t=1,r=e.length,n=e[0],i=e[0],o=1;r>o;++o,i=n)if(i=n,n=e[o],n!==i){if(o===t){t++;continue}e[t++]=n}return e.length=t,e}function i(e,t,i){return 0===e.length?[]:t?(i||e.sort(t),r(e,t)):(i||e.sort(),n(e))}t.exports=i},{}],23:[function(e,t){"use strict";function r(e,t){for(var r=1,n=e.length,i=e[0],o=e[0],a=1;n>a;++a)if(o=i,i=e[a],t(i,o)){if(a===r){r++;continue}e[r++]=i}return e.length=r,e}function n(e){for(var t=1,r=e.length,n=e[0],i=e[0],o=1;r>o;++o,i=n)if(i=n,n=e[o],n!==i){if(o===t){t++;continue}e[t++]=n}return e.length=t,e}function i(e,t,i){return 0===e.length?[]:t?(i||e.sort(t),r(e,t)):(i||e.sort(),n(e))}t.exports=i},{}]},{},[]),require=function(e,t,r){function n(r,o){if(!t[r]){if(!e[r]){var a="function"==typeof require&&require;
if(!o&&a)return a(r,!0);if(i)return i(r,!0);throw Error("Cannot find module '"+r+"'")}var s=t[r]={exports:{}};e[r][0].call(s.exports,function(t){var i=e[r][1][t];return n(i?i:t)},s,s.exports)}return t[r].exports}for(var i="function"==typeof require&&require,o=0;r.length>o;o++)n(r[o]);return n}({1:[function(e,t){var r=t.exports={};r.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var r=[];return window.addEventListener("message",function(e){if(e.source===window&&"process-tick"===e.data&&(e.stopPropagation(),r.length>0)){var t=r.shift();t()}},!0),function(e){r.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.binding=function(){throw Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw Error("process.chdir is not supported")}},{}],2:[function(e,t,r){(function(e){function t(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;e.length>r;r++)if(t===e[r])return r;return-1}e.EventEmitter||(e.EventEmitter=function(){});var n=r.EventEmitter=e.EventEmitter,i="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=10;n.prototype.setMaxListeners=function(e){this._events||(this._events={}),this._events.maxListeners=e},n.prototype.emit=function(e){if("error"===e&&(!this._events||!this._events.error||i(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var t=this._events[e];if(!t)return!1;if("function"==typeof t){switch(arguments.length){case 1:t.call(this);break;case 2:t.call(this,arguments[1]);break;case 3:t.call(this,arguments[1],arguments[2]);break;default:var r=Array.prototype.slice.call(arguments,1);t.apply(this,r)}return!0}if(i(t)){for(var r=Array.prototype.slice.call(arguments,1),n=t.slice(),o=0,a=n.length;a>o;o++)n[o].apply(this,r);return!0}return!1},n.prototype.addListener=function(e,t){if("function"!=typeof t)throw Error("addListener only takes instances of Function");if(this._events||(this._events={}),this.emit("newListener",e,t),this._events[e])if(i(this._events[e])){if(!this._events[e].warned){var r;r=void 0!==this._events.maxListeners?this._events.maxListeners:o,r&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),console.trace())}this._events[e].push(t)}else this._events[e]=[this._events[e],t];else this._events[e]=t;return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){var r=this;return r.on(e,function n(){r.removeListener(e,n),t.apply(this,arguments)}),this},n.prototype.removeListener=function(e,r){if("function"!=typeof r)throw Error("removeListener only takes instances of Function");if(!this._events||!this._events[e])return this;var n=this._events[e];if(i(n)){var o=t(n,r);if(0>o)return this;n.splice(o,1),0==n.length&&delete this._events[e]}else this._events[e]===r&&delete this._events[e];return this},n.prototype.removeAllListeners=function(e){return 0===arguments.length?(this._events={},this):(e&&this._events&&this._events[e]&&(this._events[e]=null),this)},n.prototype.listeners=function(e){return this._events||(this._events={}),this._events[e]||(this._events[e]=[]),i(this._events[e])||(this._events[e]=[this._events[e]]),this._events[e]}})(e("__browserify_process"))},{__browserify_process:1}],"ndarray-continuous":[function(e,t){t.exports=e("j9v/Ir")},{}],"j9v/Ir":[function(e,t){function r(){}function n(e){if(!(this instanceof n))return new n(e);if(i.call(this),e=e||{},Array.isArray(e)&&(e={shape:e}),e.getter&&(this.getter=e.getter),!e.shape)throw Error("You need to provide a default shape for your ndarrays");this.offsets=[],this.shape=e.shape,this.dims=this.shape.length,this.index=a(this.dims,4,null,"position"),this.pending=a(this.dims,4,null,"position");for(var t=1,r=0;this.shape.length>r;r+=1)this.offsets[r]=t,t*=this.shape[r]}var i=e("events").EventEmitter,o=e("ndarray-group"),a=e("morton-page"),s=e("inherits"),u=e("cell-range"),p=e("map-async"),c=e("zeros");t.exports=n,s(n,i),n.prototype.each=function(e){for(var t=this.index.pages,r=0;t.length>r;r+=1)for(var n=0;t[r].length>n;n+=1)e.call(this,t[r][n])},n.prototype.size=function(){for(var e=this.index.pages,t=0,r=0;e.length>r;r+=1)t+=e[r].length;return t},n.prototype.chunk=function(e,t){function n(r,n){var i=0;if(o.pending.remove.apply(o.pending,e),r){for(t(r);s.length>i;i+=1)s[i](r);return s.length=0}for(u=n,n.position=e.slice(0),o.index.add(n),o.emit("created",n),t(null,n);s.length>i;i+=1)s[i](null,n);return s.length=0,n}var i=this.index.get.apply(this.index,e),o=this;if(t=t||r,i)return t(null,i),i;var a=this.pending.get.apply(this.pending,e);if(a)return a.push(t),null;var s=[];s.position=e,this.pending.add(s),this.getter.call(this,e,n);var u=null;return u},n.prototype.group=function(e,t,n){var i=u(e,t),a=this.offsets;this.shape;var s=this.dims,c=this;n=n||r,i.sort(function(e,t){for(var r=0,n=0,i=0;s>i;i+=1)r+=e[i]*a[i],n+=t[i]*a[i];return r-n});var l=null;return p(i,function(e,t){c.chunk(e,t)},function(r,i){if(r)return n(r);for(var a=[],s=0;e.length>s;s+=1)a[s]=t[s]-e[s]+1;l=o(a,i),n(null,l)}),l},n.prototype.range=function(e,t,n){var i=[],o=[],a=this.dims,s=[],u=[];n=n||r;for(var p=0;a>p;p+=1)i[p]=Math.floor(e[p]/this.shape[p]),o[p]=Math.ceil(t[p]/this.shape[p]),s[p]=-i[p]*this.shape[p]+e[p],u[p]=-i[p]*this.shape[p]+t[p]+1;var c=null;return this.group(i,o,function(e,t){return e?n(e):(t=t.hi.apply(t,u),t=t.lo.apply(t,s),n(null,c=t),void 0)}),c},n.prototype.get=function(e,t){for(var r=[],n=0,i=this.dims,o=this.shape,a=i;a--;)r[a]=Math.floor(e[a]/o[a]);return t=t||function(){},this.chunk(r,function(a,s){if(a)return t(a);for(var u=i;u--;)r[u]=e[u]-r[u]*o[u];return n=s.get.apply(s,r),t(null,n),n}),n},n.prototype.set=function(e,t,r){for(var n=[],i=this.shape,o=this.dims,a=o;a--;)n[a]=Math.floor(e[a]/i[a]);r=r||function(){},this.chunk(n,function(a,s){if(a)return r(a);for(var u=o;u--;)n[u]=e[u]-n[u]*i[u];return n[o]=t,s.set.apply(s,n),r(null)})},n.prototype.remove=function(e,t){var n=this.index.get.apply(this.index,e);return t=t||r,n?(this.emit("removed",n),this.index.remove.apply(this.index,e),t(null,n),!0):(t(null),!1)},n.prototype.getter=function(e,t){return t(null,c(this.shape))}},{events:2,"morton-page":3,"ndarray-group":4,"cell-range":5,inherits:6,zeros:7,"map-async":8}],5:[function(e,t){function r(e,t){function r(i,o,a){if(a===n-1)for(var s=e[a];t[a]>=s;s+=1)s===t[a]?(o.push(s),i.push(o)):i.push(o.concat(s));else for(var s=e[a];t[a]>=s;s+=1)s==t[a]?(o.push(s),r(i,o,a+1)):r(i,o.concat(s),a+1);return i}if(e.length!==t.length)throw Error("Both arguments must be arrays of equal length");var n=e.length;return t[t.length-1],r([],[],0)}t.exports=r},{}],6:[function(e,t){t.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],8:[function(e,t){function r(e,t,r,i){function o(e){function t(t,r){return t?i&&i(t):(s[e]=r,0===--u&&i&&i(null,s),void 0)}return t}var a=Object.keys(e),s=Array.isArray(e)?[]:{},u=a.length;if("function"==typeof r&&(i=r,r=this),0===a.length)return i(null,s);for(var p=0,c=a.length;c>p;p++){var l=a[p],f=e[l];n(t,o(l),r,f,l,e)}}function n(e,t,r,n,i,o){var a=e.length;1===a?e.call(r,t):2===a?e.call(r,n,t):3===a?e.call(r,n,i,t):e.call(r,n,i,o,t)}t.exports=r},{}],3:[function(e,t){"use strict";function r(e,t,r,n){for(var a=Array(e),s=0;e>s;++s)a[s]="x"+s;var u=i(n),p=u?"."+n:"['"+n+"']",c=["'use strict'"],l=["MortonCache",e,"b",t].join("");c.push(["function ",l,"(sz){","this.pages=new Array(",1<<t,");","for(var i=0;i<",1<<t,";++i){this.pages[i]=[]};","}"].join("")),c.push(["var proto=",l,".prototype"].join("")),c.push("proto.bits="+t),c.push("proto.shift="+r),c.push("proto.key='"+n+"'"),c.push("proto.add=function(page){"),c.push(["this.pages[(interleave.apply(undefined, page",p,")>>",r,")&",(1<<t)-1,"].push(page)"].join("")),c.push("}");for(var f=[],s=0;e>s;++s)f.push(["(k[",s,"]===",a[s],")"].join(""));c.push(["proto.get=function(",a.join(","),"){","var pages=this.pages[(interleave(",a.join(","),")>>",r,")&",(1<<t)-1,"],n=pages.length;","for(var i=0;i<n;++i){","var p=pages[i],k=p",p,";","if(",f.join("&&"),"){ return p }","}","return null }"].join("")),c.push(["proto.remove=function(",a.join(","),"){","var pages=this.pages[(interleave(",a.join(","),")>>",r,")&",(1<<t)-1,"],n=pages.length;","for(var i=0;i<n;++i){","var k=pages[i]",p,";","if(",f.join("&&"),"){pages[i]=pages[pages.length-1];pages.pop();break;}","}","}"].join("")),c.push("return "+l);var h=Function("interleave",c.join("\n"));return h(o[e])}function n(e,t,n,i){n=n||0,i=i||"key",i=i.replace(/\'/g,"\\'");var o=[e,t,n,i].join(":"),s=a[o];return s?new s:(s=r(e,t,n,i),a[o]=s,new s)}var i=e("is-property"),o=e("bit-interleave"),a={};t.exports=n},{"is-property":9,"bit-interleave":10}],4:[function(e,t){function r(e,t){function r(){for(var e=0,r=0;s>r;r+=1)p[r]=i(arguments[r],l[r]),e+=o(arguments[r]/l[r])*h[r];var n=t[e];if(!n)throw Error("Position "+[].slice.call(arguments).join(",")+" (array "+(e+1)+"/"+t.length+") is out of bounds");return n.get.apply(n,p)}function a(){for(var e=0,r=0;s>r;r+=1)u[r]=i(arguments[r],l[r]),e+=o(arguments[r]/l[r])*h[r];var n=t[e];return u[s]=arguments[s],n.set.apply(n,u)}for(var s=e.length,u=[],p=[],c=[],l=[],f=1,h=[],d=0;s>d;d+=1)l[d]=t[0].shape[d],c[d]=l[d]*e[d],h[d]=f,f*=e[d];if(f!==t.length)throw Error("You need to supply a list of ndarrays "+f+" elements long");var y=n(c,r,a);return y.children=t,y}var n=e("ndarray-proxy"),i=e("mod-loop"),o=Math.floor;t.exports=r},{"ndarray-proxy":11,"mod-loop":12}],7:[function(e,t){"use strict";var r=e("ndarray");t.exports=function(e){for(var t=1,n=0;e.length>n;++n)t*=e[n];return r(new Float64Array(t),e)}},{ndarray:13}],9:[function(e,t){"use strict";function r(e){return/^[^0-9\/\\.\-+*!~()\[\];:?'"<>,{}|`~%\^& \f\n\r\t\v​\u00a0\u1680​\u180e\u2000​\u2001\u2002​\u2003\u2004​\u2005\u2006​\u2007\u2008​\u2009\u200a​\u2028\u2029​​\u202f\u205f​\u3000]\w*$/.test(e)}t.exports=r},{}],12:[function(e,t){function r(e,t){return e>0?e%t:(e+=(~~(e/t)+1)*t,e%t)}t.exports=r},{}],10:[function(e,t){"use strict";function r(e){for(var t=Array(e),r=["'use strict'"],n=0|Math.floor(32/e),o=0|32-n*e,a=(1<<n)-1,s=(1<<n+1)-1,u=[],p=[],c=i.nextPow2(n+1)>>1;c>0;c>>=1){for(var l=(1<<c)-1,f=0,h=0;32>h;h+=e*c)f|=l<<h;p.push(f>>>0),u.push(c*(e-1))}for(var d=i.nextPow2(n+1)===i.nextPow2(n)?0:1,y=0;e>y;++y)if(t[y]="x"+y,o>0){r.push(["x",y,"&=",s].join(""));for(var h=0;u.length>h;++h)r.push(["x",y,"=(x",y,"|(x",y,"<<",u[h],"))&",p[h]].join(""));--o}else{r.push(["x",y,"&=",a].join(""));for(var h=d;u.length>h;++h)r.push(["x",y,"=(x",y,"|(x",y,"<<",u[h],"))&",p[h]].join(""))}for(var v=["x0"],y=1;e>y;++y)v.push(["(x",y,"<<",y,")"].join(""));return r.push("return "+v.join("+")),t.push(r.join("\n")),Function.apply(void 0,t)}function n(e){for(var t=[],r=[],n=["'use strict'"],i=["switch(arguments.length){"],o=0;32>=o;++o)t.push("interleave"+o),i.push(["case ",o,": return interleave",o,"(",r.join(","),")"].join("")),32>o&&r.push("x"+o);i.push("default: return 0 }"),n.push(["return function interleaven(",r.join(","),"){",i.join("\n"),"}"].join("")),t.push(n.join("\n"));var a=Function.apply(void 0,t);return a.apply(void 0,e)}var i=e("bit-twiddle");(function(){var e=Array(33);e[0]=function(){},e[1]=function(e){return e};for(var i=2;33>i;++i)e[i]=r(i);t.exports=n(e);for(var i=0;32>=i;++i)t.exports[i]=e[i]})()},{"bit-twiddle":14}],11:[function(e,t){"use strict";function r(){throw Error("ndarray-lazy: Getter not implemented")}function n(){throw Error("ndarray-lazy: Setter not implemented")}function i(e,t,i){var s=e.length;if(0===s)return o([],[]);for(var u=Array(s),p=0,c="Proxy1DStore",l=0;s>l;++l)u[l]=a.log2(a.nextPow2(e[l])),p+=u[l];if(p>32)throw Error("ndarray-lazy: Not enough addressable bits. Can't create lazy array: "+e);for(var f=Array(s),h=Array(s),d=0,l=s-1;l>=0;--l)f[l]=1<<d,h[l]=0===d?"i&"+((1<<u[l])-1):["(i>>>",d,")&",(1<<u[l])-1].join(""),d+=u[l];var y=["'use strict'"];y.push(["function ",c,"(){};var proto=",c].join("")),y.push("proto.length="+(1<<p)),y.push(["proto.get=function(i){return get_func(",h.join(","),")}"].join("")),y.push("proto.set=function(i,v){return set_func(",h.join(","),",v)}"),y.push("return "+c);var v=Function("get_func","set_func",y.join("\n"));return o(v(t||r,i||n),e,f,0)}var o=e("ndarray"),a=e("bit-twiddle");t.exports=i},{ndarray:15,"bit-twiddle":16}],13:[function(e,t){"use strict";function r(e,t){return e[0]-t[0]}function n(){var e,t=this.stride,n=Array(t.length);for(e=0;n.length>e;++e)n[e]=[Math.abs(t[e]),e];n.sort(r);var i=Array(n.length);for(e=0;i.length>e;++e)i[e]=n[e][1];return i}function i(e,t){if(0===t){var r=Function([p,"ZeroArray.prototype.dtype='"+e+"'","return function construct_ZeroArray(a,b,c,d){return new ZeroArray(a,d)}"].join("\n"));return r()}var i="generic"===e,o=["'use strict'"],a=s(t),l=a.map(function(e){return"i"+e}),f="this.offset+"+a.map(function(e){return["this._stride",e,"*i",e].join("")}).join("+"),h=["View",t,"d",e].join("");o.push(["function ",h,"(a,",a.map(function(e){return"b"+e}).join(","),",",a.map(function(e){return"c"+e}).join(","),",d){this.data=a"].join(""));for(var d=0;t>d;++d)o.push(["this._shape",d,"=b",d,"|0"].join(""));for(var d=0;t>d;++d)o.push(["this._stride",d,"=c",d,"|0"].join(""));o.push("this.offset=d|0}"),o.push(["var proto=",h,".prototype"].join("")),o.push(["proto.dtype='",e,"'"].join("")),o.push("proto.dimension="+t);var y=["VStride",t,"d",e].join(""),v=["VShape",t,"d",e].join(""),g={stride:y,shape:v};for(var m in g){var b=g[m];o.push(["function ",b,"(v) {this._v=v} var aproto=",b,".prototype"].join("")),o.push(["aproto.length=",t].join(""));for(var x=[],d=0;t>d;++d)x.push(["this._v._",m,d].join(""));o.push(["aproto.toJSON=function ",b,"_toJSON(){return [",x.join(","),"]}"].join("")),o.push(["aproto.toString=function ",b,"_toJSON(){return [",x.join(","),"].join()}"].join(""));for(var d=0;t>d;++d)o.push(["Object.defineProperty(aproto,",d,",{get:function(){return this._v._",m,d,"},set:function(v){return this._v._",m,d,"=v|0},enumerable:true})"].join(""));for(var d=0;u.length>d;++d)u[d]in Array.prototype&&o.push(["aproto.",u[d],"=Array.prototype.",u[d]].join(""));o.push(["Object.defineProperty(proto,'",m,"',{get:function ",b,"_get(){return new ",b,"(this)},set: function ",b,"_set(v){"].join(""));for(var d=0;t>d;++d)o.push(["this._",m,d,"=v[",d,"]|0"].join(""));o.push("return v}})")}o.push(["Object.defineProperty(proto,'size',{get:function ",h,"_size(){return ",a.map(function(e){return["this._shape",e].join("")}).join("*"),"}})"].join("")),1===t?o.push("proto.order=[0]"):(o.push("Object.defineProperty(proto,'order',{get:"),4>t?(o.push(["function ",h,"_order(){"].join("")),2===t?o.push("return (Math.abs(this._stride0)>Math.abs(this._stride1))?[1,0]:[0,1]}})"):3===t&&o.push("var s0=Math.abs(this._stride0),s1=Math.abs(this._stride1),s2=Math.abs(this._stride2);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):o.push("ORDER})")),o.push(["proto.set=function ",h,"_set(",l.join(","),",v){"].join("")),i?o.push(["return this.data.set(",f,",v)}"].join("")):o.push(["return this.data[",f,"]=v}"].join("")),o.push(["proto.get=function ",h,"_get(",l.join(","),"){"].join("")),i?o.push(["return this.data.get(",f,")}"].join("")):o.push(["return this.data[",f,"]}"].join("")),o.push(["proto.hi=function ",h,"_hi(",l.join(","),"){return new ",h,"(this.data,",a.map(function(e){return["typeof i",e,"!=='number'?this._shape",e,":i",e,"|0"].join("")}).join(","),",",a.map(function(e){return"this._stride"+e}).join(","),",this.offset)}"].join(""));var w=a.map(function(e){return"a"+e+"=this._shape"+e}),S=a.map(function(e){return"c"+e+"=this._stride"+e});o.push(["proto.lo=function ",h,"_lo(",l.join(","),"){var b=this.offset,d=0,",w.join(","),",",S.join(",")].join(""));for(var d=0;t>d;++d)o.push(["if(typeof i",d,"==='number'){d=i",d,"|0;b+=c",d,"*d;a",d,"-=d}"].join(""));o.push(["return new ",h,"(this.data,",a.map(function(e){return"a"+e}).join(","),",",a.map(function(e){return"c"+e}).join(","),",b)}"].join("")),o.push(["proto.step=function ",h,"_step(",l.join(","),"){var ",a.map(function(e){return"a"+e+"=this._shape"+e}).join(","),",",a.map(function(e){return"b"+e+"=this._stride"+e}).join(","),",c=this.offset,d=0,ceil=Math.ceil"].join(""));for(var d=0;t>d;++d)o.push(["if(typeof i",d,"==='number'){d=i",d,"|0;if(d<0){c+=b",d,"*(a",d,"-1);a",d,"=ceil(-a",d,"/d)}else{a",d,"=ceil(a",d,"/d)}b",d,"*=d}"].join(""));o.push(["return new ",h,"(this.data,",a.map(function(e){return"a"+e}).join(","),",",a.map(function(e){return"b"+e}).join(","),",c)}"].join(""));for(var E=Array(t),j=Array(t),d=0;t>d;++d)E[d]=["a[i",d,"|0]"].join(""),j[d]=["b[i",d,"|0]"].join("");o.push(["proto.transpose=function ",h,"_transpose(",l,"){var a=this.shape,b=this.stride;return new ",h,"(this.data,",E.join(","),",",j.join(","),",this.offset)}"].join("")),o.push(["proto.pick=function ",h,"_pick(",l,"){var a=[],b=[],c=this.offset"].join(""));for(var d=0;t>d;++d)o.push(["if(i",d,">=0){c=(c+this._stride",d,"*i",d,")|0}else{a.push(this._shape",d,");b.push(this._stride",d,")}"].join(""));o.push("var ctor=CTOR_LIST[a.length];return ctor(this.data,a,b,c)}"),o.push(["return function construct_",h,"(data,shape,stride,offset){return new ",h,"(data,",a.map(function(e){return"shape["+e+"]"}).join(","),",",a.map(function(e){return"stride["+e+"]"}).join(","),",offset)}"].join(""));var A=Function("CTOR_LIST","ORDER",o.join("\n"));return A(c[e],n)}function o(e){return e instanceof Float64Array?"float64":e instanceof Float32Array?"float32":e instanceof Int32Array?"int32":e instanceof Uint32Array?"uint32":e instanceof Uint8Array?"uint8":e instanceof Uint16Array?"uint16":e instanceof Int16Array?"int16":e instanceof Int8Array?"int8":e instanceof Array?"array":"generic"}function a(e,t,r,n){void 0===t&&(t=[e.length]);var a=t.length;if(void 0===r){r=Array(a);for(var s=a-1,u=1;s>=0;--s)r[s]=u,u*=t[s]}if(void 0===n){n=0;for(var s=0;a>s;++s)0>r[s]&&(n-=(t[s]-1)*r[s])}for(var p=o(e),l=c[p];a>=l.length;)l.push(i(p,l.length));var f=l[a];return f(e,t,r,n)}var s=e("iota-array"),u=["concat","join","slice","toString","indexOf","lastIndexOf","forEach","every","some","filter","map","reduce","reduceRight"],p="function ZeroArray(a,d) {this.data = a;this.offset = d};var proto=ZeroArray.prototype;proto.size=0;proto.shape=[];proto.stride=[];proto.order=[];proto.get=proto.set=function() {return Number.NaN};proto.lo=proto.hi=proto.transpose=proto.step=proto.pick=function() {return new ZeroArray(this.data,this.shape,this.stride,this.offset)}",c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],generic:[]};t.exports=a},{"iota-array":17}],14:[function(e,t,r){"use strict";"use restrict";function n(e){var t=32;return e&=-e,e&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}var i=32;r.INT_BITS=i,r.INT_MAX=2147483647,r.INT_MIN=-1<<i-1,r.sign=function(e){return(e>0)-(0>e)},r.abs=function(e){var t=e>>i-1;return(e^t)-t},r.min=function(e,t){return t^(e^t)&-(t>e)},r.max=function(e,t){return e^(e^t)&-(t>e)},r.isPow2=function(e){return!(e&e-1||!e)},r.log2=function(e){var t,r;return t=(e>65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1},r.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},r.popCount=function(e){return e-=1431655765&e>>>1,e=(858993459&e)+(858993459&e>>>2),16843009*(252645135&e+(e>>>4))>>>24},r.countTrailingZeros=n,r.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1},r.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)},r.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,1&27030>>>e};var o=Array(256);(function(e){for(var t=0;256>t;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=255&n<<i}})(o),r.reverse=function(e){return o[255&e]<<24|o[255&e>>>8]<<16|o[255&e>>>16]<<8|o[255&e>>>24]},r.interleave2=function(e,t){return e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e|t<<1},r.deinterleave2=function(e,t){return e=1431655765&e>>>t,e=858993459&(e|e>>>1),e=252645135&(e|e>>>2),e=16711935&(e|e>>>4),e=65535&(e|e>>>16),e<<16>>16},r.interleave3=function(e,t,r){return e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e|=t<<1,r&=1023,r=4278190335&(r|r<<16),r=251719695&(r|r<<8),r=3272356035&(r|r<<4),r=1227133513&(r|r<<2),e|r<<2},r.deinterleave3=function(e,t){return e=1227133513&e>>>t,e=3272356035&(e|e>>>2),e=251719695&(e|e>>>4),e=4278190335&(e|e>>>8),e=1023&(e|e>>>16),e<<22>>22},r.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>n(e)+1}},{}],16:[function(e,t,r){"use strict";"use restrict";function n(e){var t=32;return e&=-e,e&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}var i=32;r.INT_BITS=i,r.INT_MAX=2147483647,r.INT_MIN=-1<<i-1,r.sign=function(e){return(e>0)-(0>e)},r.abs=function(e){var t=e>>i-1;return(e^t)-t},r.min=function(e,t){return t^(e^t)&-(t>e)},r.max=function(e,t){return e^(e^t)&-(t>e)},r.isPow2=function(e){return!(e&e-1||!e)},r.log2=function(e){var t,r;return t=(e>65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1},r.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},r.popCount=function(e){return e-=1431655765&e>>>1,e=(858993459&e)+(858993459&e>>>2),16843009*(252645135&e+(e>>>4))>>>24},r.countTrailingZeros=n,r.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1},r.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)},r.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,1&27030>>>e};var o=Array(256);(function(e){for(var t=0;256>t;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=255&n<<i}})(o),r.reverse=function(e){return o[255&e]<<24|o[255&e>>>8]<<16|o[255&e>>>16]<<8|o[255&e>>>24]},r.interleave2=function(e,t){return e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e|t<<1},r.deinterleave2=function(e,t){return e=1431655765&e>>>t,e=858993459&(e|e>>>1),e=252645135&(e|e>>>2),e=16711935&(e|e>>>4),e=65535&(e|e>>>16),e<<16>>16},r.interleave3=function(e,t,r){return e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e|=t<<1,r&=1023,r=4278190335&(r|r<<16),r=251719695&(r|r<<8),r=3272356035&(r|r<<4),r=1227133513&(r|r<<2),e|r<<2},r.deinterleave3=function(e,t){return e=1227133513&e>>>t,e=3272356035&(e|e>>>2),e=251719695&(e|e>>>4),e=4278190335&(e|e>>>8),e=1023&(e|e>>>16),e<<22>>22},r.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>n(e)+1}},{}],17:[function(e,t){"use strict";function r(e){for(var t=Array(e),r=0;e>r;++r)t[r]=r;return t}t.exports=r},{}],15:[function(e,t){"use strict";function r(e,t){return e[0]-t[0]}function n(){var e,t=this.stride,n=Array(t.length);for(e=0;n.length>e;++e)n[e]=[Math.abs(t[e]),e];n.sort(r);var i=Array(n.length);for(e=0;i.length>e;++e)i[e]=n[e][1];return i}function i(e,t){if(0===t){var r=Function([p,"ZeroArray.prototype.dtype='"+e+"'","return function construct_ZeroArray(a,b,c,d){return new ZeroArray(a,d)}"].join("\n"));return r()}var i="generic"===e,o=["'use strict'"],a=s(t),l=a.map(function(e){return"i"+e}),f="this.offset+"+a.map(function(e){return["this._stride",e,"*i",e].join("")}).join("+"),h=["View",t,"d",e].join("");o.push(["function ",h,"(a,",a.map(function(e){return"b"+e}).join(","),",",a.map(function(e){return"c"+e}).join(","),",d){this.data=a"].join(""));for(var d=0;t>d;++d)o.push(["this._shape",d,"=b",d,"|0"].join(""));for(var d=0;t>d;++d)o.push(["this._stride",d,"=c",d,"|0"].join(""));o.push("this.offset=d|0}"),o.push(["var proto=",h,".prototype"].join("")),o.push(["proto.dtype='",e,"'"].join("")),o.push("proto.dimension="+t);var y=["VStride",t,"d",e].join(""),v=["VShape",t,"d",e].join(""),g={stride:y,shape:v};for(var m in g){var b=g[m];o.push(["function ",b,"(v) {this._v=v} var aproto=",b,".prototype"].join("")),o.push(["aproto.length=",t].join(""));for(var x=[],d=0;t>d;++d)x.push(["this._v._",m,d].join(""));o.push(["aproto.toJSON=function ",b,"_toJSON(){return [",x.join(","),"]}"].join("")),o.push(["aproto.toString=function ",b,"_toJSON(){return [",x.join(","),"].join()}"].join(""));for(var d=0;t>d;++d)o.push(["Object.defineProperty(aproto,",d,",{get:function(){return this._v._",m,d,"},set:function(v){return this._v._",m,d,"=v|0},enumerable:true})"].join(""));for(var d=0;u.length>d;++d)u[d]in Array.prototype&&o.push(["aproto.",u[d],"=Array.prototype.",u[d]].join(""));o.push(["Object.defineProperty(proto,'",m,"',{get:function ",b,"_get(){return new ",b,"(this)},set: function ",b,"_set(v){"].join(""));for(var d=0;t>d;++d)o.push(["this._",m,d,"=v[",d,"]|0"].join(""));o.push("return v}})")}o.push(["Object.defineProperty(proto,'size',{get:function ",h,"_size(){return ",a.map(function(e){return["this._shape",e].join("")}).join("*"),"}})"].join("")),1===t?o.push("proto.order=[0]"):(o.push("Object.defineProperty(proto,'order',{get:"),4>t?(o.push(["function ",h,"_order(){"].join("")),2===t?o.push("return (Math.abs(this._stride0)>Math.abs(this._stride1))?[1,0]:[0,1]}})"):3===t&&o.push("var s0=Math.abs(this._stride0),s1=Math.abs(this._stride1),s2=Math.abs(this._stride2);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):o.push("ORDER})")),o.push(["proto.set=function ",h,"_set(",l.join(","),",v){"].join("")),i?o.push(["return this.data.set(",f,",v)}"].join("")):o.push(["return this.data[",f,"]=v}"].join("")),o.push(["proto.get=function ",h,"_get(",l.join(","),"){"].join("")),i?o.push(["return this.data.get(",f,")}"].join("")):o.push(["return this.data[",f,"]}"].join("")),o.push(["proto.hi=function ",h,"_hi(",l.join(","),"){return new ",h,"(this.data,",a.map(function(e){return["typeof i",e,"!=='number'?this._shape",e,":i",e,"|0"].join("")}).join(","),",",a.map(function(e){return"this._stride"+e}).join(","),",this.offset)}"].join(""));var w=a.map(function(e){return"a"+e+"=this._shape"+e}),S=a.map(function(e){return"c"+e+"=this._stride"+e});o.push(["proto.lo=function ",h,"_lo(",l.join(","),"){var b=this.offset,d=0,",w.join(","),",",S.join(",")].join(""));for(var d=0;t>d;++d)o.push(["if(typeof i",d,"==='number'){d=i",d,"|0;b+=c",d,"*d;a",d,"-=d}"].join(""));o.push(["return new ",h,"(this.data,",a.map(function(e){return"a"+e}).join(","),",",a.map(function(e){return"c"+e}).join(","),",b)}"].join("")),o.push(["proto.step=function ",h,"_step(",l.join(","),"){var ",a.map(function(e){return"a"+e+"=this._shape"+e}).join(","),",",a.map(function(e){return"b"+e+"=this._stride"+e}).join(","),",c=this.offset,d=0,ceil=Math.ceil"].join(""));for(var d=0;t>d;++d)o.push(["if(typeof i",d,"==='number'){d=i",d,"|0;if(d<0){c+=b",d,"*(a",d,"-1);a",d,"=ceil(-a",d,"/d)}else{a",d,"=ceil(a",d,"/d)}b",d,"*=d}"].join(""));o.push(["return new ",h,"(this.data,",a.map(function(e){return"a"+e}).join(","),",",a.map(function(e){return"b"+e}).join(","),",c)}"].join(""));for(var E=Array(t),j=Array(t),d=0;t>d;++d)E[d]=["a[i",d,"|0]"].join(""),j[d]=["b[i",d,"|0]"].join("");o.push(["proto.transpose=function ",h,"_transpose(",l,"){var a=this.shape,b=this.stride;return new ",h,"(this.data,",E.join(","),",",j.join(","),",this.offset)}"].join("")),o.push(["proto.pick=function ",h,"_pick(",l,"){var a=[],b=[],c=this.offset"].join(""));for(var d=0;t>d;++d)o.push(["if(i",d,">=0){c=(c+this._stride",d,"*i",d,")|0}else{a.push(this._shape",d,");b.push(this._stride",d,")}"].join(""));o.push("var ctor=CTOR_LIST[a.length];return ctor(this.data,a,b,c)}"),o.push(["return function construct_",h,"(data,shape,stride,offset){return new ",h,"(data,",a.map(function(e){return"shape["+e+"]"}).join(","),",",a.map(function(e){return"stride["+e+"]"}).join(","),",offset)}"].join(""));var A=Function("CTOR_LIST","ORDER",o.join("\n"));return A(c[e],n)}function o(e){return e instanceof Float64Array?"float64":e instanceof Float32Array?"float32":e instanceof Int32Array?"int32":e instanceof Uint32Array?"uint32":e instanceof Uint8Array?"uint8":e instanceof Uint16Array?"uint16":e instanceof Int16Array?"int16":e instanceof Int8Array?"int8":e instanceof Array?"array":"generic"}function a(e,t,r,n){void 0===t&&(t=[e.length]);var a=t.length;if(void 0===r){r=Array(a);for(var s=a-1,u=1;s>=0;--s)r[s]=u,u*=t[s]}if(void 0===n){n=0;for(var s=0;a>s;++s)0>r[s]&&(n-=(t[s]-1)*r[s])}for(var p=o(e),l=c[p];a>=l.length;)l.push(i(p,l.length));var f=l[a];return f(e,t,r,n)}var s=e("iota-array"),u=["concat","join","slice","toString","indexOf","lastIndexOf","forEach","every","some","filter","map","reduce","reduceRight"],p="function ZeroArray(a,d) {this.data = a;this.offset = d};var proto=ZeroArray.prototype;proto.size=0;proto.shape=[];proto.stride=[];proto.order=[];proto.get=proto.set=function() {return Number.NaN};proto.lo=proto.hi=proto.transpose=proto.step=proto.pick=function() {return new ZeroArray(this.data,this.shape,this.stride,this.offset)}",c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],generic:[]};t.exports=a},{"iota-array":18}],18:[function(e,t){"use strict";function r(e){for(var t=Array(e),r=0;e>r;++r)t[r]=r;return t}t.exports=r},{}]},{},[]),require=function(e,t,r){function n(r,o){if(!t[r]){if(!e[r]){var a="function"==typeof require&&require;if(!o&&a)return a(r,!0);if(i)return i(r,!0);throw Error("Cannot find module '"+r+"'")}var s=t[r]={exports:{}};e[r][0].call(s.exports,function(t){var i=e[r][1][t];return n(i?i:t)},s,s.exports)}return t[r].exports}for(var i="function"==typeof require&&require,o=0;r.length>o;o++)n(r[o]);return n}({"ndarray-fill":[function(e,t){t.exports=e("ZgKnQ/")},{}],"ZgKnQ/":[function(e,t){"use strict";var r=e("cwise")({args:["index","array","scalar"],body:function(e,t,r){t=r.apply(void 0,e)}});t.exports=function(e,t){return r(e,t),e}},{cwise:1}],1:[function(e,t){"use strict";function r(e){for(var t in e)0>o.indexOf(t)&&0>a.indexOf(t)&&console.warn("cwise: Unknown argument '"+t+"' passed to expression compiler");for(var r=0;o.length>r;++r)if(!e[o[r]])throw Error("cwise: Missing argument: "+o[r]);return i({args:e.args,pre:n(e.pre||function(){}),body:n(e.body),post:n(e.post||function(){}),debug:!!e.printCode,funcName:e.funcName||e.body.name||"cwise",blockSize:e.blockSize||64})}var n=e("cwise-parser"),i=e("cwise-compiler"),o=["args","body"],a=["pre","post","printCode","funcName","blockSize"];t.exports=r},{"cwise-parser":2,"cwise-compiler":3}],3:[function(e,t){"use strict";function r(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.scalarArgs=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1
}function n(e){var t=new r;t.pre=e.pre,t.body=e.body,t.post=e.post;var n=e.args.slice(0);t.argTypes=n;for(var o=0;n.length>o;++o)switch(n[o]){case"array":if(t.arrayArgs.push(o),t.shimArgs.push("array"+o),t.pre.args.length>o&&t.pre.args[o].count>0)throw Error("cwise: pre() block may not reference array args");if(t.post.args.length>o&&t.post.args[o].count>0)throw Error("cwise: post() block may not reference array args");break;case"scalar":t.scalarArgs.push(o),t.shimArgs.push("scalar"+o);break;case"index":if(t.indexArgs.push(o),t.pre.args.length>o&&t.pre.args[o].count>0)throw Error("cwise: pre() block may not reference array index");if(t.body.args.length>o&&t.body.args[o].lvalue)throw Error("cwise: body() block may not write to array index");if(t.post.args.length>o&&t.post.args[o].count>0)throw Error("cwise: post() block may not reference array index");break;case"shape":if(t.shapeArgs.push(o),t.pre.args.length>o&&t.pre.args[o].lvalue)throw Error("cwise: pre() block may not write to array shape");if(t.body.args.length>o&&t.body.args[o].lvalue)throw Error("cwise: body() block may not write to array shape");if(t.post.args.length>o&&t.post.args[o].lvalue)throw Error("cwise: post() block may not write to array shape");break;default:throw Error("cwise: Unknown argument type "+n[o])}if(0>=t.arrayArgs.length)throw Error("cwise: No array arguments specified");if(t.pre.args.length>n.length)throw Error("cwise: Too many arguments in pre() block");if(t.body.args.length>n.length)throw Error("cwise: Too many arguments in body() block");if(t.post.args.length>n.length)throw Error("cwise: Too many arguments in post() block");return t.debug=!!e.printCode||!!e.debug,t.funcName=e.funcName||"cwise",t.blockSize=e.blockSize||64,i(t)}var i=e("./lib/thunk.js");t.exports=n},{"./lib/thunk.js":4}],2:[function(e,t){"use strict";function r(e,t,r){this.name=e,this.lvalue=t,this.rvalue=r,this.count=0}function n(e,t,r,n){this.body=e,this.args=t,this.thisVars=r,this.localVars=n}function i(e){if("eval"===e)throw Error("cwise-parser: eval() not allowed");return"undefined"!=typeof window?e in window:"undefined"!=typeof GLOBAL?e in GLOBAL:"undefined"!=typeof self?e in self:!1}function o(e){for(var t=e.body[0].expression.callee.params,r=Array(t.length),n=0;t.length>n;++n)r[n]=t[n].name;return r}function a(e){function t(e){var t=v+e.replace(/\_/g,"__");return S.push(t),t}function a(e){var t="this_"+e.replace(/\_/g,"__");return E.push(t),t}function c(e,t){for(var r=e.range[0],n=e.range[1],i=r+1;n>i;++i)x[i]="";x[r]=t}function l(e){return"'"+e.replace(/\_/g,"\\_").replace(/\'/g,"'")+"'"}function f(e){return x.slice(e.range[0],e.range[1]).join("")}function h(e){return"AssignmentExpression"===e.parent.type&&e.parent.left===e?"="===e.parent.operator?j:j|A:"UpdateExpression"===e.parent.type?j|A:A}for(var d=["(",e,")()"].join(""),y=s.parse(d,{range:!0}),v="_inline_"+p++ +"_",g=o(y),m=Array(g.length),b=0;g.length>b;++b)m[b]=new r([v,"arg",b,"_"].join(""),!1,!1);for(var x=Array(d.length),b=0,w=d.length;w>b;++b)x[b]=d.charAt(b);var S=[],E=[],j=1,A=2;(function k(e,r){if(e.parent=r,"MemberExpression"===e.type)e.computed?(k(e.object,e),k(e.property,e)):"ThisExpression"===e.object.type?c(e,a(e.property.name)):k(e.object,e);else{if("ThisExpression"===e.type)throw Error("cwise-parser: Computed this is not allowed");if("Identifier"===e.type){var n=e.name,o=g.indexOf(n);if(o>=0){var s=m[o],u=h(e);u&j&&(s.lvalue=!0),u&A&&(s.rvalue=!0),++s.count,c(e,s.name)}else i(n)||c(e,t(n))}else if("Literal"===e.type)"string"==typeof e.value&&c(e,l(e.value));else{if("WithStatement"===e.type)throw Error("cwise-parser: with() statements not allowed");for(var p=Object.keys(e),f=0,d=p.length;d>f;++f)if("parent"!==p[f]){var y=e[p[f]];if(y)if(y instanceof Array)for(var v=0;y.length>v;++v)y[v]&&"string"==typeof y[v].type&&k(y[v],e);else"string"==typeof y.type&&k(y,e)}}}})(y.body[0].expression.callee.body,void 0),u(S),u(E);var L=new n(f(y.body[0].expression.callee.body),m,E,S);return L}var s=e("esprima"),u=e("uniq"),p=0;t.exports=a},{esprima:5,uniq:6}],4:[function(e,t){"use strict";function r(e){var t=["'use strict'","var CACHED={}"],r=[],i=e.funcName+"_cwise_thunk";t.push(["return function ",i,"(",e.shimArgs.join(","),"){"].join(""));for(var o=[],a=[],s=[["array",e.arrayArgs[0],".shape"].join("")],u=0;e.arrayArgs.length>u;++u){var p=e.arrayArgs[u];r.push(["t",p,"=array",p,".dtype,","r",p,"=array",p,".order"].join("")),o.push("t"+p),o.push("r"+p),a.push("t"+p),a.push("r"+p+".join()"),s.push("array"+p+".data"),s.push("array"+p+".stride"),s.push("array"+p+".offset|0")}for(var u=0;e.scalarArgs.length>u;++u)s.push("scalar"+e.scalarArgs[u]);r.push(["type=[",a.join(","),"].join()"].join("")),r.push("proc=CACHED[type]"),t.push("var "+r.join(",")),t.push(["if(!proc){","CACHED[type]=proc=compile([",o.join(","),"])}","return proc(",s.join(","),")}"].join("")),e.debug&&console.log("Generated thunk:",t.join("\n"));var c=Function("compile",t.join("\n"));return c(n.bind(void 0,e))}var n=e("./compile.js");t.exports=r},{"./compile.js":7}],6:[function(e,t){"use strict";function r(e,t){for(var r=1,n=e.length,i=e[0],o=e[0],a=1;n>a;++a)if(o=i,i=e[a],t(i,o)){if(a===r){r++;continue}e[r++]=i}return e.length=r,e}function n(e){for(var t=1,r=e.length,n=e[0],i=e[0],o=1;r>o;++o,i=n)if(i=n,n=e[o],n!==i){if(o===t){t++;continue}e[t++]=n}return e.length=t,e}function i(e,t,i){return 0===e.length?[]:t?(i||e.sort(t),r(e,t)):(i||e.sort(),n(e))}t.exports=i},{}],5:[function(e,t,r){(function(){(function(e,t){"use strict";"function"==typeof define&&define.amd?define(["exports"],t):r!==void 0?t(r):t(e.esprima={})})(this,function(e){"use strict";function t(e,t){if(!e)throw Error("ASSERT: "+t)}function r(e,t){return fr.slice(e,t)}function n(e){return"0123456789".indexOf(e)>=0}function i(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function o(e){return"01234567".indexOf(e)>=0}function a(e){return" "===e||" "===e||" "===e||"\f"===e||" "===e||e.charCodeAt(0)>=5760&&" ᠎              ".indexOf(e)>=0}function s(e){return"\n"===e||"\r"===e||"\u2028"===e||"\u2029"===e}function u(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&"z">=e||e>="A"&&"Z">=e||e.charCodeAt(0)>=128&&lr.NonAsciiIdentifierStart.test(e)}function p(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&"z">=e||e>="A"&&"Z">=e||e>="0"&&"9">=e||e.charCodeAt(0)>=128&&lr.NonAsciiIdentifierPart.test(e)}function c(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0}return!1}function l(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0}return!1}function f(e){return"eval"===e||"arguments"===e}function h(e){var t=!1;switch(e.length){case 2:t="if"===e||"in"===e||"do"===e;break;case 3:t="var"===e||"for"===e||"new"===e||"try"===e;break;case 4:t="this"===e||"else"===e||"case"===e||"void"===e||"with"===e;break;case 5:t="while"===e||"break"===e||"catch"===e||"throw"===e;break;case 6:t="return"===e||"typeof"===e||"delete"===e||"switch"===e;break;case 7:t="default"===e||"finally"===e;break;case 8:t="function"===e||"continue"===e||"debugger"===e;break;case 10:t="instanceof"===e}if(t)return!0;switch(e){case"const":return!0;case"yield":case"let":return!0}return hr&&l(e)?!0:c(e)}function d(){var e,t,r;for(t=!1,r=!1;gr>dr;)if(e=fr[dr],r)e=fr[dr++],s(e)&&(r=!1,"\r"===e&&"\n"===fr[dr]&&++dr,++yr,vr=dr);else if(t)s(e)?("\r"===e&&"\n"===fr[dr+1]&&++dr,++yr,++dr,vr=dr,dr>=gr&&k({},cr.UnexpectedToken,"ILLEGAL")):(e=fr[dr++],dr>=gr&&k({},cr.UnexpectedToken,"ILLEGAL"),"*"===e&&(e=fr[dr],"/"===e&&(++dr,t=!1)));else if("/"===e)if(e=fr[dr+1],"/"===e)dr+=2,r=!0;else{if("*"!==e)break;dr+=2,t=!0,dr>=gr&&k({},cr.UnexpectedToken,"ILLEGAL")}else if(a(e))++dr;else{if(!s(e))break;++dr,"\r"===e&&"\n"===fr[dr]&&++dr,++yr,vr=dr}}function y(e){var t,r,n,o=0;for(r="u"===e?4:2,t=0;r>t;++t){if(!(gr>dr&&i(fr[dr])))return"";n=fr[dr++],o=16*o+"0123456789abcdef".indexOf(n.toLowerCase())}return String.fromCharCode(o)}function v(){var e,t,r,n;if(e=fr[dr],u(e)){if(t=dr,"\\"===e){if(++dr,"u"!==fr[dr])return;if(++dr,n=dr,e=y("u")){if("\\"===e||!u(e))return;r=e}else dr=n,r="u"}else r=fr[dr++];for(;gr>dr&&(e=fr[dr],p(e));)if("\\"===e){if(++dr,"u"!==fr[dr])return;if(++dr,n=dr,e=y("u")){if("\\"===e||!p(e))return;r+=e}else dr=n,r+="u"}else r+=fr[dr++];return 1===r.length?{type:ar.Identifier,value:r,lineNumber:yr,lineStart:vr,range:[t,dr]}:h(r)?{type:ar.Keyword,value:r,lineNumber:yr,lineStart:vr,range:[t,dr]}:"null"===r?{type:ar.NullLiteral,value:r,lineNumber:yr,lineStart:vr,range:[t,dr]}:"true"===r||"false"===r?{type:ar.BooleanLiteral,value:r,lineNumber:yr,lineStart:vr,range:[t,dr]}:{type:ar.Identifier,value:r,lineNumber:yr,lineStart:vr,range:[t,dr]}}}function g(){var e,t,r,i=dr,o=fr[dr];return";"===o||"{"===o||"}"===o?(++dr,{type:ar.Punctuator,value:o,lineNumber:yr,lineStart:vr,range:[i,dr]}):","===o||"("===o||")"===o?(++dr,{type:ar.Punctuator,value:o,lineNumber:yr,lineStart:vr,range:[i,dr]}):(e=fr[dr+1],"."!==o||n(e)?(t=fr[dr+2],r=fr[dr+3],">"===o&&">"===e&&">"===t&&"="===r?(dr+=4,{type:ar.Punctuator,value:">>>=",lineNumber:yr,lineStart:vr,range:[i,dr]}):"="===o&&"="===e&&"="===t?(dr+=3,{type:ar.Punctuator,value:"===",lineNumber:yr,lineStart:vr,range:[i,dr]}):"!"===o&&"="===e&&"="===t?(dr+=3,{type:ar.Punctuator,value:"!==",lineNumber:yr,lineStart:vr,range:[i,dr]}):">"===o&&">"===e&&">"===t?(dr+=3,{type:ar.Punctuator,value:">>>",lineNumber:yr,lineStart:vr,range:[i,dr]}):"<"===o&&"<"===e&&"="===t?(dr+=3,{type:ar.Punctuator,value:"<<=",lineNumber:yr,lineStart:vr,range:[i,dr]}):">"===o&&">"===e&&"="===t?(dr+=3,{type:ar.Punctuator,value:">>=",lineNumber:yr,lineStart:vr,range:[i,dr]}):"="===e&&"<>=!+-*%&|^/".indexOf(o)>=0?(dr+=2,{type:ar.Punctuator,value:o+e,lineNumber:yr,lineStart:vr,range:[i,dr]}):o===e&&"+-<>&|".indexOf(o)>=0&&"+-<>&|".indexOf(e)>=0?(dr+=2,{type:ar.Punctuator,value:o+e,lineNumber:yr,lineStart:vr,range:[i,dr]}):"[]<>+-*%&|^!~?:=/".indexOf(o)>=0?{type:ar.Punctuator,value:fr[dr++],lineNumber:yr,lineStart:vr,range:[i,dr]}:void 0):{type:ar.Punctuator,value:fr[dr++],lineNumber:yr,lineStart:vr,range:[i,dr]})}function m(){var e,r,a;if(a=fr[dr],t(n(a)||"."===a,"Numeric literal must start with a decimal digit or a decimal point"),r=dr,e="","."!==a){if(e=fr[dr++],a=fr[dr],"0"===e){if("x"===a||"X"===a){for(e+=fr[dr++];gr>dr&&(a=fr[dr],i(a));)e+=fr[dr++];return 2>=e.length&&k({},cr.UnexpectedToken,"ILLEGAL"),gr>dr&&(a=fr[dr],u(a)&&k({},cr.UnexpectedToken,"ILLEGAL")),{type:ar.NumericLiteral,value:parseInt(e,16),lineNumber:yr,lineStart:vr,range:[r,dr]}}if(o(a)){for(e+=fr[dr++];gr>dr&&(a=fr[dr],o(a));)e+=fr[dr++];return gr>dr&&(a=fr[dr],(u(a)||n(a))&&k({},cr.UnexpectedToken,"ILLEGAL")),{type:ar.NumericLiteral,value:parseInt(e,8),octal:!0,lineNumber:yr,lineStart:vr,range:[r,dr]}}n(a)&&k({},cr.UnexpectedToken,"ILLEGAL")}for(;gr>dr&&(a=fr[dr],n(a));)e+=fr[dr++]}if("."===a)for(e+=fr[dr++];gr>dr&&(a=fr[dr],n(a));)e+=fr[dr++];if("e"===a||"E"===a)if(e+=fr[dr++],a=fr[dr],("+"===a||"-"===a)&&(e+=fr[dr++]),a=fr[dr],n(a))for(e+=fr[dr++];gr>dr&&(a=fr[dr],n(a));)e+=fr[dr++];else a="character "+a,dr>=gr&&(a="<end>"),k({},cr.UnexpectedToken,"ILLEGAL");return gr>dr&&(a=fr[dr],u(a)&&k({},cr.UnexpectedToken,"ILLEGAL")),{type:ar.NumericLiteral,value:parseFloat(e),lineNumber:yr,lineStart:vr,range:[r,dr]}}function b(){var e,r,n,i,a,u,p="",c=!1;for(e=fr[dr],t("'"===e||'"'===e,"String literal must starts with a quote"),r=dr,++dr;gr>dr;){if(n=fr[dr++],n===e){e="";break}if("\\"===n)if(n=fr[dr++],s(n))++yr,"\r"===n&&"\n"===fr[dr]&&++dr;else switch(n){case"n":p+="\n";break;case"r":p+="\r";break;case"t":p+=" ";break;case"u":case"x":u=dr,a=y(n),a?p+=a:(dr=u,p+=n);break;case"b":p+="\b";break;case"f":p+="\f";break;case"v":p+=" ";break;default:o(n)?(i="01234567".indexOf(n),0!==i&&(c=!0),gr>dr&&o(fr[dr])&&(c=!0,i=8*i+"01234567".indexOf(fr[dr++]),"0123".indexOf(n)>=0&&gr>dr&&o(fr[dr])&&(i=8*i+"01234567".indexOf(fr[dr++]))),p+=String.fromCharCode(i)):p+=n}else{if(s(n))break;p+=n}}return""!==e&&k({},cr.UnexpectedToken,"ILLEGAL"),{type:ar.StringLiteral,value:p,octal:c,lineNumber:yr,lineStart:vr,range:[r,dr]}}function x(){var e,r,n,i,o,a,u,c=!1,l=!1;for(mr=null,d(),n=dr,r=fr[dr],t("/"===r,"Regular expression literal must start with a slash"),e=fr[dr++];gr>dr;)if(r=fr[dr++],e+=r,"\\"===r)r=fr[dr++],s(r)&&k({},cr.UnterminatedRegExp),e+=r;else if(c)"]"===r&&(c=!1);else{if("/"===r){l=!0;break}"["===r?c=!0:s(r)&&k({},cr.UnterminatedRegExp)}for(l||k({},cr.UnterminatedRegExp),i=e.substr(1,e.length-2),o="";gr>dr&&(r=fr[dr],p(r));)if(++dr,"\\"===r&&gr>dr)if(r=fr[dr],"u"===r)if(++dr,u=dr,r=y("u"))for(o+=r,e+="\\u";dr>u;++u)e+=fr[u];else dr=u,o+="u",e+="\\u";else e+="\\";else o+=r,e+=r;try{a=RegExp(i,o)}catch(f){k({},cr.InvalidRegExp)}return{literal:e,value:a,range:[n,dr]}}function w(e){return e.type===ar.Identifier||e.type===ar.Keyword||e.type===ar.BooleanLiteral||e.type===ar.NullLiteral}function S(){var e,t;return d(),dr>=gr?{type:ar.EOF,lineNumber:yr,lineStart:vr,range:[dr,dr]}:(t=g(),t!==void 0?t:(e=fr[dr],"'"===e||'"'===e?b():"."===e||n(e)?m():(t=v(),t!==void 0?t:(k({},cr.UnexpectedToken,"ILLEGAL"),void 0))))}function E(){var e;return mr?(dr=mr.range[1],yr=mr.lineNumber,vr=mr.lineStart,e=mr,mr=null,e):(mr=null,S())}function j(){var e,t,r;return null!==mr?mr:(e=dr,t=yr,r=vr,mr=S(),dr=e,yr=t,vr=r,mr)}function A(){var e,t,r,n;return e=dr,t=yr,r=vr,d(),n=yr!==t,dr=e,yr=t,vr=r,n}function k(e,t){var r,n=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,function(e,t){return n[t]||""});throw"number"==typeof e.lineNumber?(r=Error("Line "+e.lineNumber+": "+i),r.index=e.range[0],r.lineNumber=e.lineNumber,r.column=e.range[0]-vr+1):(r=Error("Line "+yr+": "+i),r.index=dr,r.lineNumber=yr,r.column=dr-vr+1),r}function L(){try{k.apply(null,arguments)}catch(e){if(!xr.errors)throw e;xr.errors.push(e)}}function I(e){if(e.type===ar.EOF&&k(e,cr.UnexpectedEOS),e.type===ar.NumericLiteral&&k(e,cr.UnexpectedNumber),e.type===ar.StringLiteral&&k(e,cr.UnexpectedString),e.type===ar.Identifier&&k(e,cr.UnexpectedIdentifier),e.type===ar.Keyword){if(c(e.value))k(e,cr.UnexpectedReserved);else if(hr&&l(e.value))return L(e,cr.StrictReservedWord),void 0;k(e,cr.UnexpectedToken,e.value)}k(e,cr.UnexpectedToken,e.value)}function _(e){var t=E();(t.type!==ar.Punctuator||t.value!==e)&&I(t)}function O(e){var t=E();(t.type!==ar.Keyword||t.value!==e)&&I(t)}function N(e){var t=j();return t.type===ar.Punctuator&&t.value===e}function P(e){var t=j();return t.type===ar.Keyword&&t.value===e}function C(){var e=j(),t=e.value;return e.type!==ar.Punctuator?!1:"="===t||"*="===t||"/="===t||"%="===t||"+="===t||"-="===t||"<<="===t||">>="===t||">>>="===t||"&="===t||"^="===t||"|="===t}function D(){var e,t;if(";"===fr[dr])return E(),void 0;if(t=yr,d(),yr===t){if(N(";"))return E(),void 0;e=j(),e.type===ar.EOF||N("}")||I(e)}}function F(e){return e.type===ur.Identifier||e.type===ur.MemberExpression}function R(){var e=[];for(_("[");!N("]");)N(",")?(E(),e.push(null)):(e.push(pt()),N("]")||_(","));return _("]"),{type:ur.ArrayExpression,elements:e}}function U(e,t){var r,n;return r=hr,n=Rt(),t&&hr&&f(e[0].name)&&L(t,cr.StrictParamName),hr=r,{type:ur.FunctionExpression,id:null,params:e,defaults:[],body:n,rest:null,generator:!1,expression:!1}}function B(){var e=E();return e.type===ar.StringLiteral||e.type===ar.NumericLiteral?(hr&&e.octal&&L(e,cr.StrictOctalLiteral),Zt(e)):{type:ur.Identifier,name:e.value}}function T(){var e,t,r,n;return e=j(),e.type===ar.Identifier?(r=B(),"get"!==e.value||N(":")?"set"!==e.value||N(":")?(_(":"),{type:ur.Property,key:r,value:pt(),kind:"init"}):(t=B(),_("("),e=j(),e.type!==ar.Identifier?(_(")"),L(e,cr.UnexpectedToken,e.value),{type:ur.Property,key:t,value:U([]),kind:"set"}):(n=[ht()],_(")"),{type:ur.Property,key:t,value:U(n,e),kind:"set"})):(t=B(),_("("),_(")"),{type:ur.Property,key:t,value:U([]),kind:"get"})):e.type!==ar.EOF&&e.type!==ar.Punctuator?(t=B(),_(":"),{type:ur.Property,key:t,value:pt(),kind:"init"}):(I(e),void 0)}function M(){var e,t,r,n=[],i={},o=String;for(_("{");!N("}");)e=T(),t=e.key.type===ur.Identifier?e.key.name:o(e.key.value),r="init"===e.kind?pr.Data:"get"===e.kind?pr.Get:pr.Set,Object.prototype.hasOwnProperty.call(i,t)?(i[t]===pr.Data?hr&&r===pr.Data?L({},cr.StrictDuplicateProperty):r!==pr.Data&&L({},cr.AccessorDataProperty):r===pr.Data?L({},cr.AccessorDataProperty):i[t]&r&&L({},cr.AccessorGetSet),i[t]|=r):i[t]=r,n.push(e),N("}")||_(",");return _("}"),{type:ur.ObjectExpression,properties:n}}function q(){var e;return _("("),e=ct(),_(")"),e}function V(){var e=j(),t=e.type;if(t===ar.Identifier)return{type:ur.Identifier,name:E().value};if(t===ar.StringLiteral||t===ar.NumericLiteral)return hr&&e.octal&&L(e,cr.StrictOctalLiteral),Zt(E());if(t===ar.Keyword){if(P("this"))return E(),{type:ur.ThisExpression};if(P("function"))return Bt()}return t===ar.BooleanLiteral?(E(),e.value="true"===e.value,Zt(e)):t===ar.NullLiteral?(E(),e.value=null,Zt(e)):N("[")?R():N("{")?M():N("(")?q():N("/")||N("/=")?Zt(x()):I(E())}function G(){var e=[];if(_("("),!N(")"))for(;gr>dr&&(e.push(pt()),!N(")"));)_(",");return _(")"),e}function z(){var e=E();return w(e)||I(e),{type:ur.Identifier,name:e.value}}function H(){return _("."),z()}function K(){var e;return _("["),e=ct(),_("]"),e}function W(){var e;return O("new"),e={type:ur.NewExpression,callee:X(),arguments:[]},N("(")&&(e.arguments=G()),e}function Z(){var e;for(e=P("new")?W():V();N(".")||N("[")||N("(");)e=N("(")?{type:ur.CallExpression,callee:e,arguments:G()}:N("[")?{type:ur.MemberExpression,computed:!0,object:e,property:K()}:{type:ur.MemberExpression,computed:!1,object:e,property:H()};return e}function X(){var e;for(e=P("new")?W():V();N(".")||N("[");)e=N("[")?{type:ur.MemberExpression,computed:!0,object:e,property:K()}:{type:ur.MemberExpression,computed:!1,object:e,property:H()};return e}function J(){var e,t=Z();return e=j(),e.type!==ar.Punctuator?t:(!N("++")&&!N("--")||A()||(hr&&t.type===ur.Identifier&&f(t.name)&&L({},cr.StrictLHSPostfix),F(t)||L({},cr.InvalidLHSInAssignment),t={type:ur.UpdateExpression,operator:E().value,argument:t,prefix:!1}),t)}function Y(){var e,t;return e=j(),e.type!==ar.Punctuator&&e.type!==ar.Keyword?J():N("++")||N("--")?(e=E(),t=Y(),hr&&t.type===ur.Identifier&&f(t.name)&&L({},cr.StrictLHSPrefix),F(t)||L({},cr.InvalidLHSInAssignment),t={type:ur.UpdateExpression,operator:e.value,argument:t,prefix:!0}):N("+")||N("-")||N("~")||N("!")?t={type:ur.UnaryExpression,operator:E().value,argument:Y(),prefix:!0}:P("delete")||P("void")||P("typeof")?(t={type:ur.UnaryExpression,operator:E().value,argument:Y(),prefix:!0},hr&&"delete"===t.operator&&t.argument.type===ur.Identifier&&L({},cr.StrictDelete),t):J()}function $(){for(var e=Y();N("*")||N("/")||N("%");)e={type:ur.BinaryExpression,operator:E().value,left:e,right:Y()};return e}function Q(){for(var e=$();N("+")||N("-");)e={type:ur.BinaryExpression,operator:E().value,left:e,right:$()};return e}function et(){for(var e=Q();N("<<")||N(">>")||N(">>>");)e={type:ur.BinaryExpression,operator:E().value,left:e,right:Q()};return e}function tt(){var e,t;for(t=br.allowIn,br.allowIn=!0,e=et();N("<")||N(">")||N("<=")||N(">=")||t&&P("in")||P("instanceof");)e={type:ur.BinaryExpression,operator:E().value,left:e,right:et()};return br.allowIn=t,e}function rt(){for(var e=tt();N("==")||N("!=")||N("===")||N("!==");)e={type:ur.BinaryExpression,operator:E().value,left:e,right:tt()};return e}function nt(){for(var e=rt();N("&");)E(),e={type:ur.BinaryExpression,operator:"&",left:e,right:rt()};return e}function it(){for(var e=nt();N("^");)E(),e={type:ur.BinaryExpression,operator:"^",left:e,right:nt()};return e}function ot(){for(var e=it();N("|");)E(),e={type:ur.BinaryExpression,operator:"|",left:e,right:it()};return e}function at(){for(var e=ot();N("&&");)E(),e={type:ur.LogicalExpression,operator:"&&",left:e,right:ot()};return e}function st(){for(var e=at();N("||");)E(),e={type:ur.LogicalExpression,operator:"||",left:e,right:at()};return e}function ut(){var e,t,r;return e=st(),N("?")&&(E(),t=br.allowIn,br.allowIn=!0,r=pt(),br.allowIn=t,_(":"),e={type:ur.ConditionalExpression,test:e,consequent:r,alternate:pt()}),e}function pt(){var e,t;return e=j(),t=ut(),C()&&(F(t)||L({},cr.InvalidLHSInAssignment),hr&&t.type===ur.Identifier&&f(t.name)&&L(e,cr.StrictLHSAssignment),t={type:ur.AssignmentExpression,operator:E().value,left:t,right:pt()}),t}function ct(){var e=pt();if(N(","))for(e={type:ur.SequenceExpression,expressions:[e]};gr>dr&&N(",");)E(),e.expressions.push(pt());return e}function lt(){for(var e,t=[];gr>dr&&!N("}")&&(e=Tt(),void 0!==e);)t.push(e);return t}function ft(){var e;return _("{"),e=lt(),_("}"),{type:ur.BlockStatement,body:e}}function ht(){var e=E();return e.type!==ar.Identifier&&I(e),{type:ur.Identifier,name:e.value}}function dt(e){var t=ht(),r=null;return hr&&f(t.name)&&L({},cr.StrictVarName),"const"===e?(_("="),r=pt()):N("=")&&(E(),r=pt()),{type:ur.VariableDeclarator,id:t,init:r}}function yt(e){var t=[];do{if(t.push(dt(e)),!N(","))break;E()}while(gr>dr);return t}function vt(){var e;return O("var"),e=yt(),D(),{type:ur.VariableDeclaration,declarations:e,kind:"var"}}function gt(e){var t;return O(e),t=yt(e),D(),{type:ur.VariableDeclaration,declarations:t,kind:e}}function mt(){return _(";"),{type:ur.EmptyStatement}}function bt(){var e=ct();return D(),{type:ur.ExpressionStatement,expression:e}}function xt(){var e,t,r;return O("if"),_("("),e=ct(),_(")"),t=Ft(),P("else")?(E(),r=Ft()):r=null,{type:ur.IfStatement,test:e,consequent:t,alternate:r}}function wt(){var e,t,r;return O("do"),r=br.inIteration,br.inIteration=!0,e=Ft(),br.inIteration=r,O("while"),_("("),t=ct(),_(")"),N(";")&&E(),{type:ur.DoWhileStatement,body:e,test:t}}function St(){var e,t,r;return O("while"),_("("),e=ct(),_(")"),r=br.inIteration,br.inIteration=!0,t=Ft(),br.inIteration=r,{type:ur.WhileStatement,test:e,body:t}}function Et(){var e=E();return{type:ur.VariableDeclaration,declarations:yt(),kind:e.value}}function jt(){var e,t,r,n,i,o,a;return e=t=r=null,O("for"),_("("),N(";")?E():(P("var")||P("let")?(br.allowIn=!1,e=Et(),br.allowIn=!0,1===e.declarations.length&&P("in")&&(E(),n=e,i=ct(),e=null)):(br.allowIn=!1,e=ct(),br.allowIn=!0,P("in")&&(F(e)||L({},cr.InvalidLHSInForIn),E(),n=e,i=ct(),e=null)),n===void 0&&_(";")),n===void 0&&(N(";")||(t=ct()),_(";"),N(")")||(r=ct())),_(")"),a=br.inIteration,br.inIteration=!0,o=Ft(),br.inIteration=a,n===void 0?{type:ur.ForStatement,init:e,test:t,update:r,body:o}:{type:ur.ForInStatement,left:n,right:i,body:o,each:!1}}function At(){var e,t=null;return O("continue"),";"===fr[dr]?(E(),br.inIteration||k({},cr.IllegalContinue),{type:ur.ContinueStatement,label:null}):A()?(br.inIteration||k({},cr.IllegalContinue),{type:ur.ContinueStatement,label:null}):(e=j(),e.type===ar.Identifier&&(t=ht(),Object.prototype.hasOwnProperty.call(br.labelSet,t.name)||k({},cr.UnknownLabel,t.name)),D(),null!==t||br.inIteration||k({},cr.IllegalContinue),{type:ur.ContinueStatement,label:t})}function kt(){var e,t=null;return O("break"),";"===fr[dr]?(E(),br.inIteration||br.inSwitch||k({},cr.IllegalBreak),{type:ur.BreakStatement,label:null}):A()?(br.inIteration||br.inSwitch||k({},cr.IllegalBreak),{type:ur.BreakStatement,label:null}):(e=j(),e.type===ar.Identifier&&(t=ht(),Object.prototype.hasOwnProperty.call(br.labelSet,t.name)||k({},cr.UnknownLabel,t.name)),D(),null!==t||br.inIteration||br.inSwitch||k({},cr.IllegalBreak),{type:ur.BreakStatement,label:t})}function Lt(){var e,t=null;return O("return"),br.inFunctionBody||L({},cr.IllegalReturn)," "===fr[dr]&&u(fr[dr+1])?(t=ct(),D(),{type:ur.ReturnStatement,argument:t}):A()?{type:ur.ReturnStatement,argument:null}:(N(";")||(e=j(),N("}")||e.type===ar.EOF||(t=ct())),D(),{type:ur.ReturnStatement,argument:t})}function It(){var e,t;return hr&&L({},cr.StrictModeWith),O("with"),_("("),e=ct(),_(")"),t=Ft(),{type:ur.WithStatement,object:e,body:t}}function _t(){var e,t,r=[];for(P("default")?(E(),e=null):(O("case"),e=ct()),_(":");gr>dr&&!(N("}")||P("default")||P("case"))&&(t=Ft(),void 0!==t);)r.push(t);return{type:ur.SwitchCase,test:e,consequent:r}}function Ot(){var e,t,r,n,i;if(O("switch"),_("("),e=ct(),_(")"),_("{"),t=[],N("}"))return E(),{type:ur.SwitchStatement,discriminant:e,cases:t};for(n=br.inSwitch,br.inSwitch=!0,i=!1;gr>dr&&!N("}");)r=_t(),null===r.test&&(i&&k({},cr.MultipleDefaultsInSwitch),i=!0),t.push(r);return br.inSwitch=n,_("}"),{type:ur.SwitchStatement,discriminant:e,cases:t}}function Nt(){var e;return O("throw"),A()&&k({},cr.NewlineAfterThrow),e=ct(),D(),{type:ur.ThrowStatement,argument:e}}function Pt(){var e;return O("catch"),_("("),N(")")&&I(j()),e=ht(),hr&&f(e.name)&&L({},cr.StrictCatchVariable),_(")"),{type:ur.CatchClause,param:e,body:ft()}}function Ct(){var e,t=[],r=null;return O("try"),e=ft(),P("catch")&&t.push(Pt()),P("finally")&&(E(),r=ft()),0!==t.length||r||k({},cr.NoCatchOrFinally),{type:ur.TryStatement,block:e,guardedHandlers:[],handlers:t,finalizer:r}}function Dt(){return O("debugger"),D(),{type:ur.DebuggerStatement}}function Ft(){var e,t,r=j();if(r.type===ar.EOF&&I(r),r.type===ar.Punctuator)switch(r.value){case";":return mt();case"{":return ft();case"(":return bt();default:}if(r.type===ar.Keyword)switch(r.value){case"break":return kt();case"continue":return At();case"debugger":return Dt();case"do":return wt();case"for":return jt();case"function":return Ut();case"if":return xt();case"return":return Lt();case"switch":return Ot();case"throw":return Nt();case"try":return Ct();case"var":return vt();case"while":return St();case"with":return It();default:}return e=ct(),e.type===ur.Identifier&&N(":")?(E(),Object.prototype.hasOwnProperty.call(br.labelSet,e.name)&&k({},cr.Redeclaration,"Label",e.name),br.labelSet[e.name]=!0,t=Ft(),delete br.labelSet[e.name],{type:ur.LabeledStatement,label:e,body:t}):(D(),{type:ur.ExpressionStatement,expression:e})}function Rt(){var e,t,n,i,o,a,s,u,p=[];for(_("{");gr>dr&&(t=j(),t.type===ar.StringLiteral)&&(e=Tt(),p.push(e),e.expression.type===ur.Literal);)n=r(t.range[0]+1,t.range[1]-1),"use strict"===n?(hr=!0,i&&L(i,cr.StrictOctalLiteral)):!i&&t.octal&&(i=t);for(o=br.labelSet,a=br.inIteration,s=br.inSwitch,u=br.inFunctionBody,br.labelSet={},br.inIteration=!1,br.inSwitch=!1,br.inFunctionBody=!0;gr>dr&&!N("}")&&(e=Tt(),void 0!==e);)p.push(e);return _("}"),br.labelSet=o,br.inIteration=a,br.inSwitch=s,br.inFunctionBody=u,{type:ur.BlockStatement,body:p}}function Ut(){var e,t,r,n,i,o,a,s,u,p=[];if(O("function"),n=j(),e=ht(),hr?f(n.value)&&L(n,cr.StrictFunctionName):f(n.value)?(o=n,a=cr.StrictFunctionName):l(n.value)&&(o=n,a=cr.StrictReservedWord),_("("),!N(")"))for(u={};gr>dr&&(n=j(),t=ht(),hr?(f(n.value)&&(i=n,a=cr.StrictParamName),Object.prototype.hasOwnProperty.call(u,n.value)&&(i=n,a=cr.StrictParamDupe)):o||(f(n.value)?(o=n,a=cr.StrictParamName):l(n.value)?(o=n,a=cr.StrictReservedWord):Object.prototype.hasOwnProperty.call(u,n.value)&&(o=n,a=cr.StrictParamDupe)),p.push(t),u[t.name]=!0,!N(")"));)_(",");return _(")"),s=hr,r=Rt(),hr&&o&&k(o,a),hr&&i&&L(i,a),hr=s,{type:ur.FunctionDeclaration,id:e,params:p,defaults:[],body:r,rest:null,generator:!1,expression:!1}}function Bt(){var e,t,r,n,i,o,a,s,u=null,p=[];if(O("function"),N("(")||(e=j(),u=ht(),hr?f(e.value)&&L(e,cr.StrictFunctionName):f(e.value)?(r=e,n=cr.StrictFunctionName):l(e.value)&&(r=e,n=cr.StrictReservedWord)),_("("),!N(")"))for(s={};gr>dr&&(e=j(),i=ht(),hr?(f(e.value)&&(t=e,n=cr.StrictParamName),Object.prototype.hasOwnProperty.call(s,e.value)&&(t=e,n=cr.StrictParamDupe)):r||(f(e.value)?(r=e,n=cr.StrictParamName):l(e.value)?(r=e,n=cr.StrictReservedWord):Object.prototype.hasOwnProperty.call(s,e.value)&&(r=e,n=cr.StrictParamDupe)),p.push(i),s[i.name]=!0,!N(")"));)_(",");return _(")"),a=hr,o=Rt(),hr&&r&&k(r,n),hr&&t&&L(t,n),hr=a,{type:ur.FunctionExpression,id:u,params:p,defaults:[],body:o,rest:null,generator:!1,expression:!1}}function Tt(){var e=j();if(e.type===ar.Keyword)switch(e.value){case"const":case"let":return gt(e.value);case"function":return Ut();default:return Ft()}return e.type!==ar.EOF?Ft():void 0}function Mt(){for(var e,t,n,i,o=[];gr>dr&&(t=j(),t.type===ar.StringLiteral)&&(e=Tt(),o.push(e),e.expression.type===ur.Literal);)n=r(t.range[0]+1,t.range[1]-1),"use strict"===n?(hr=!0,i&&L(i,cr.StrictOctalLiteral)):!i&&t.octal&&(i=t);for(;gr>dr&&(e=Tt(),void 0!==e);)o.push(e);return o}function qt(){var e;return hr=!1,e={type:ur.Program,body:Mt()}}function Vt(e,r,n,i,o){t("number"==typeof n,"Comment must have valid position"),xr.comments.length>0&&xr.comments[xr.comments.length-1].range[1]>n||xr.comments.push({type:e,value:r,range:[n,i],loc:o})}function Gt(){var e,t,r,n,i,o;for(e="",i=!1,o=!1;gr>dr;)if(t=fr[dr],o)t=fr[dr++],s(t)?(r.end={line:yr,column:dr-vr-1},o=!1,Vt("Line",e,n,dr-1,r),"\r"===t&&"\n"===fr[dr]&&++dr,++yr,vr=dr,e=""):dr>=gr?(o=!1,e+=t,r.end={line:yr,column:gr-vr},Vt("Line",e,n,gr,r)):e+=t;else if(i)s(t)?("\r"===t&&"\n"===fr[dr+1]?(++dr,e+="\r\n"):e+=t,++yr,++dr,vr=dr,dr>=gr&&k({},cr.UnexpectedToken,"ILLEGAL")):(t=fr[dr++],dr>=gr&&k({},cr.UnexpectedToken,"ILLEGAL"),e+=t,"*"===t&&(t=fr[dr],"/"===t&&(e=e.substr(0,e.length-1),i=!1,++dr,r.end={line:yr,column:dr-vr},Vt("Block",e,n,dr,r),e="")));else if("/"===t)if(t=fr[dr+1],"/"===t)r={start:{line:yr,column:dr-vr}},n=dr,dr+=2,o=!0,dr>=gr&&(r.end={line:yr,column:dr-vr},o=!1,Vt("Line",e,n,dr,r));else{if("*"!==t)break;n=dr,dr+=2,i=!0,r={start:{line:yr,column:dr-vr-2}},dr>=gr&&k({},cr.UnexpectedToken,"ILLEGAL")}else if(a(t))++dr;else{if(!s(t))break;++dr,"\r"===t&&"\n"===fr[dr]&&++dr,++yr,vr=dr}}function zt(){var e,t,r,n=[];for(e=0;xr.comments.length>e;++e)t=xr.comments[e],r={type:t.type,value:t.value},xr.range&&(r.range=t.range),xr.loc&&(r.loc=t.loc),n.push(r);xr.comments=n}function Ht(){var e,t,n,i,o;return d(),e=dr,t={start:{line:yr,column:dr-vr}},n=xr.advance(),t.end={line:yr,column:dr-vr},n.type!==ar.EOF&&(i=[n.range[0],n.range[1]],o=r(n.range[0],n.range[1]),xr.tokens.push({type:sr[n.type],value:o,range:i,loc:t})),n}function Kt(){var e,t,r,n;return d(),e=dr,t={start:{line:yr,column:dr-vr}},r=xr.scanRegExp(),t.end={line:yr,column:dr-vr},xr.tokens.length>0&&(n=xr.tokens[xr.tokens.length-1],n.range[0]===e&&"Punctuator"===n.type&&("/"===n.value||"/="===n.value)&&xr.tokens.pop()),xr.tokens.push({type:"RegularExpression",value:r.literal,range:[e,dr],loc:t}),r}function Wt(){var e,t,r,n=[];for(e=0;xr.tokens.length>e;++e)t=xr.tokens[e],r={type:t.type,value:t.value},xr.range&&(r.range=t.range),xr.loc&&(r.loc=t.loc),n.push(r);xr.tokens=n}function Zt(e){return{type:ur.Literal,value:e.value}}function Xt(e){return{type:ur.Literal,value:e.value,raw:r(e.range[0],e.range[1])}}function Jt(){var e={};return e.range=[dr,dr],e.loc={start:{line:yr,column:dr-vr},end:{line:yr,column:dr-vr}},e.end=function(){this.range[1]=dr,this.loc.end.line=yr,this.loc.end.column=dr-vr},e.applyGroup=function(e){xr.range&&(e.groupRange=[this.range[0],this.range[1]]),xr.loc&&(e.groupLoc={start:{line:this.loc.start.line,column:this.loc.start.column},end:{line:this.loc.end.line,column:this.loc.end.column}})},e.apply=function(e){xr.range&&(e.range=[this.range[0],this.range[1]]),xr.loc&&(e.loc={start:{line:this.loc.start.line,column:this.loc.start.column},end:{line:this.loc.end.line,column:this.loc.end.column}})},e}function Yt(){var e,t;return d(),e=Jt(),_("("),t=ct(),_(")"),e.end(),e.applyGroup(t),t}function $t(){var e,t;for(d(),e=Jt(),t=P("new")?W():V();N(".")||N("[");)N("[")?(t={type:ur.MemberExpression,computed:!0,object:t,property:K()},e.end(),e.apply(t)):(t={type:ur.MemberExpression,computed:!1,object:t,property:H()},e.end(),e.apply(t));return t}function Qt(){var e,t;for(d(),e=Jt(),t=P("new")?W():V();N(".")||N("[")||N("(");)N("(")?(t={type:ur.CallExpression,callee:t,arguments:G()},e.end(),e.apply(t)):N("[")?(t={type:ur.MemberExpression,computed:!0,object:t,property:K()},e.end(),e.apply(t)):(t={type:ur.MemberExpression,computed:!1,object:t,property:H()},e.end(),e.apply(t));return t}function er(e){var t,r,n;t="[object Array]"===Object.prototype.toString.apply(e)?[]:{};for(r in e)e.hasOwnProperty(r)&&"groupRange"!==r&&"groupLoc"!==r&&(n=e[r],t[r]=null===n||"object"!=typeof n||n instanceof RegExp?n:er(n));
return t}function tr(e,t){return function(r){function n(e){return e.type===ur.LogicalExpression||e.type===ur.BinaryExpression}function i(r){var o,a;n(r.left)&&i(r.left),n(r.right)&&i(r.right),e&&(r.left.groupRange||r.right.groupRange?(o=r.left.groupRange?r.left.groupRange[0]:r.left.range[0],a=r.right.groupRange?r.right.groupRange[1]:r.right.range[1],r.range=[o,a]):r.range===void 0&&(o=r.left.range[0],a=r.right.range[1],r.range=[o,a])),t&&(r.left.groupLoc||r.right.groupLoc?(o=r.left.groupLoc?r.left.groupLoc.start:r.left.loc.start,a=r.right.groupLoc?r.right.groupLoc.end:r.right.loc.end,r.loc={start:o,end:a}):r.loc===void 0&&(r.loc={start:r.left.loc.start,end:r.right.loc.end}))}return function(){var o,a;return d(),o=Jt(),a=r.apply(null,arguments),o.end(),e&&a.range===void 0&&o.apply(a),t&&a.loc===void 0&&o.apply(a),n(a)&&i(a),a}}}function rr(){var e;xr.comments&&(xr.skipComment=d,d=Gt),xr.raw&&(xr.createLiteral=Zt,Zt=Xt),(xr.range||xr.loc)&&(xr.parseGroupExpression=q,xr.parseLeftHandSideExpression=X,xr.parseLeftHandSideExpressionAllowCall=Z,q=Yt,X=$t,Z=Qt,e=tr(xr.range,xr.loc),xr.parseAdditiveExpression=Q,xr.parseAssignmentExpression=pt,xr.parseBitwiseANDExpression=nt,xr.parseBitwiseORExpression=ot,xr.parseBitwiseXORExpression=it,xr.parseBlock=ft,xr.parseFunctionSourceElements=Rt,xr.parseCatchClause=Pt,xr.parseComputedMember=K,xr.parseConditionalExpression=ut,xr.parseConstLetDeclaration=gt,xr.parseEqualityExpression=rt,xr.parseExpression=ct,xr.parseForVariableDeclaration=Et,xr.parseFunctionDeclaration=Ut,xr.parseFunctionExpression=Bt,xr.parseLogicalANDExpression=at,xr.parseLogicalORExpression=st,xr.parseMultiplicativeExpression=$,xr.parseNewExpression=W,xr.parseNonComputedProperty=z,xr.parseObjectProperty=T,xr.parseObjectPropertyKey=B,xr.parsePostfixExpression=J,xr.parsePrimaryExpression=V,xr.parseProgram=qt,xr.parsePropertyFunction=U,xr.parseRelationalExpression=tt,xr.parseStatement=Ft,xr.parseShiftExpression=et,xr.parseSwitchCase=_t,xr.parseUnaryExpression=Y,xr.parseVariableDeclaration=dt,xr.parseVariableIdentifier=ht,Q=e(xr.parseAdditiveExpression),pt=e(xr.parseAssignmentExpression),nt=e(xr.parseBitwiseANDExpression),ot=e(xr.parseBitwiseORExpression),it=e(xr.parseBitwiseXORExpression),ft=e(xr.parseBlock),Rt=e(xr.parseFunctionSourceElements),Pt=e(xr.parseCatchClause),K=e(xr.parseComputedMember),ut=e(xr.parseConditionalExpression),gt=e(xr.parseConstLetDeclaration),rt=e(xr.parseEqualityExpression),ct=e(xr.parseExpression),Et=e(xr.parseForVariableDeclaration),Ut=e(xr.parseFunctionDeclaration),Bt=e(xr.parseFunctionExpression),X=e(X),at=e(xr.parseLogicalANDExpression),st=e(xr.parseLogicalORExpression),$=e(xr.parseMultiplicativeExpression),W=e(xr.parseNewExpression),z=e(xr.parseNonComputedProperty),T=e(xr.parseObjectProperty),B=e(xr.parseObjectPropertyKey),J=e(xr.parsePostfixExpression),V=e(xr.parsePrimaryExpression),qt=e(xr.parseProgram),U=e(xr.parsePropertyFunction),tt=e(xr.parseRelationalExpression),Ft=e(xr.parseStatement),et=e(xr.parseShiftExpression),_t=e(xr.parseSwitchCase),Y=e(xr.parseUnaryExpression),dt=e(xr.parseVariableDeclaration),ht=e(xr.parseVariableIdentifier)),xr.tokens!==void 0&&(xr.advance=S,xr.scanRegExp=x,S=Ht,x=Kt)}function nr(){"function"==typeof xr.skipComment&&(d=xr.skipComment),xr.raw&&(Zt=xr.createLiteral),(xr.range||xr.loc)&&(Q=xr.parseAdditiveExpression,pt=xr.parseAssignmentExpression,nt=xr.parseBitwiseANDExpression,ot=xr.parseBitwiseORExpression,it=xr.parseBitwiseXORExpression,ft=xr.parseBlock,Rt=xr.parseFunctionSourceElements,Pt=xr.parseCatchClause,K=xr.parseComputedMember,ut=xr.parseConditionalExpression,gt=xr.parseConstLetDeclaration,rt=xr.parseEqualityExpression,ct=xr.parseExpression,Et=xr.parseForVariableDeclaration,Ut=xr.parseFunctionDeclaration,Bt=xr.parseFunctionExpression,q=xr.parseGroupExpression,X=xr.parseLeftHandSideExpression,Z=xr.parseLeftHandSideExpressionAllowCall,at=xr.parseLogicalANDExpression,st=xr.parseLogicalORExpression,$=xr.parseMultiplicativeExpression,W=xr.parseNewExpression,z=xr.parseNonComputedProperty,T=xr.parseObjectProperty,B=xr.parseObjectPropertyKey,V=xr.parsePrimaryExpression,J=xr.parsePostfixExpression,qt=xr.parseProgram,U=xr.parsePropertyFunction,tt=xr.parseRelationalExpression,Ft=xr.parseStatement,et=xr.parseShiftExpression,_t=xr.parseSwitchCase,Y=xr.parseUnaryExpression,dt=xr.parseVariableDeclaration,ht=xr.parseVariableIdentifier),"function"==typeof xr.scanRegExp&&(S=xr.advance,x=xr.scanRegExp)}function ir(e){var t,r=e.length,n=[];for(t=0;r>t;++t)n[t]=e.charAt(t);return n}function or(e,t){var r,n;n=String,"string"==typeof e||e instanceof String||(e=n(e)),fr=e,dr=0,yr=fr.length>0?1:0,vr=0,gr=fr.length,mr=null,br={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1},xr={},t!==void 0&&(xr.range="boolean"==typeof t.range&&t.range,xr.loc="boolean"==typeof t.loc&&t.loc,xr.raw="boolean"==typeof t.raw&&t.raw,"boolean"==typeof t.tokens&&t.tokens&&(xr.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(xr.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(xr.errors=[])),gr>0&&fr[0]===void 0&&(e instanceof String&&(fr=e.valueOf()),fr[0]===void 0&&(fr=ir(e))),rr();try{r=qt(),xr.comments!==void 0&&(zt(),r.comments=xr.comments),xr.tokens!==void 0&&(Wt(),r.tokens=xr.tokens),xr.errors!==void 0&&(r.errors=xr.errors),(xr.range||xr.loc)&&(r.body=er(r.body))}catch(i){throw i}finally{nr(),xr={}}return r}var ar,sr,ur,pr,cr,lr,fr,hr,dr,yr,vr,gr,mr,br,xr;ar={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8},sr={},sr[ar.BooleanLiteral]="Boolean",sr[ar.EOF]="<end>",sr[ar.Identifier]="Identifier",sr[ar.Keyword]="Keyword",sr[ar.NullLiteral]="Null",sr[ar.NumericLiteral]="Numeric",sr[ar.Punctuator]="Punctuator",sr[ar.StringLiteral]="String",ur={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},pr={Data:1,Get:2,Set:4},cr={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},lr={NonAsciiIdentifierStart:RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},"esprima"[0]===void 0&&(r=function(e,t){return fr.slice(e,t).join("")}),e.version="1.0.4",e.parse=or,e.Syntax=function(){var e,t={};"function"==typeof Object.create&&(t=Object.create(null));for(e in ur)ur.hasOwnProperty(e)&&(t[e]=ur[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()})})()},{}],7:[function(e,t){"use strict";function r(e,t,r){var n,i,o=e.length,a=t.arrayArgs.length,s=t.indexArgs.length>0,u=[],p=[],c=0,l=0;for(n=0;o>n;++n)p.push(["i",n,"=0"].join(""));for(i=0;a>i;++i)for(n=0;o>n;++n)l=c,c=e[n],0===n?p.push(["d",i,"s",n,"=t",i,"[",c,"]"].join("")):p.push(["d",i,"s",n,"=(t",i,"[",c,"]-s",l,"*t",i,"[",l,"])"].join(""));for(u.push("var "+p.join(",")),n=o-1;n>=0;--n)c=e[n],u.push(["for(i",n,"=0;i",n,"<s",c,";++i",n,"){"].join(""));for(u.push(r),n=0;o>n;++n){for(l=c,c=e[n],i=0;a>i;++i)u.push(["p",i,"+=d",i,"s",n].join(""));s&&(n>0&&u.push(["index[",l,"]-=s",l].join("")),u.push(["++index[",c,"]"].join(""))),u.push("}")}return u.join("\n")}function n(e,t,n,i){for(var o=t.length,a=n.arrayArgs.length,s=n.blockSize,u=n.indexArgs.length>0,p=[],c=0;a>c;++c)p.push(["var offset",c,"=p",c].join(""));for(var c=e;o>c;++c)p.push(["for(var j"+c+"=SS[",t[c],"]|0;j",c,">0;){"].join("")),p.push(["if(j",c,"<",s,"){"].join("")),p.push(["s",t[c],"=j",c].join("")),p.push(["j",c,"=0"].join("")),p.push(["}else{s",t[c],"=",s].join("")),p.push(["j",c,"-=",s,"}"].join("")),u&&p.push(["index[",t[c],"]=j",c].join(""));for(var c=0;a>c;++c){for(var l=["offset"+c],f=e;o>f;++f)l.push(["j",f,"*t",c,"[",t[f],"]"].join(""));p.push(["p",c,"=(",l.join("+"),")"].join(""))}p.push(r(t,n,i));for(var c=e;o>c;++c)p.push("}");return p.join("\n")}function i(e){for(var t=0,r=e[0].length;r>t;){for(var n=1;e.length>n;++n)if(e[n][t]!==e[0][t])return t;++t}return t}function o(e,t,r){for(var n=e.body,i=[],o=[],a=0;e.args.length>a;++a){var s=e.args[a];if(!(0>=s.count)){var u=RegExp(s.name,"g");switch(t.argTypes[a]){case"array":var p=t.arrayArgs.indexOf(a);1===s.count?"generic"===r[p]?s.lvalue?(i.push(["var l",p,"=a",p,".get(p",p,")"].join("")),n=n.replace(u,"l"+p),o.push(["a",p,".set(p",p,",l",p,")"].join(""))):n=n.replace(u,["a",p,".get(p",p,")"].join("")):n=n.replace(u,["a",p,"[p",p,"]"].join("")):"generic"===r[p]?(i.push(["var l",p,"=a",p,".get(p",p,")"].join("")),n=n.replace(u,"l"+p),s.lvalue&&o.push(["a",p,".set(p",p,",l",p,")"].join(""))):(i.push(["var l",p,"=a",p,"[p",p,"]"].join("")),n=n.replace(u,"l"+p),s.lvalue&&o.push(["a",p,"[p",p,"]=l",p].join("")));break;case"scalar":n=n.replace(u,"Y"+t.scalarArgs.indexOf(a));break;case"index":n=n.replace(u,"index");break;case"shape":n=n.replace(u,"shape")}}}return[i.join("\n"),n,o.join("\n")].join("\n").trim()}function a(e){for(var t=Array(e.length),r=!0,n=0;e.length>n;++n){var i=e[n],o=i.match(/\d+/);o=o?o[0]:"",t[n]=0===i.charAt(0)?"u"+i.charAt(1)+o:i.charAt(0)+o,n>0&&(r=r&&t[n]===t[n-1])}return r?t[0]:t.join("")}function s(e,t){for(var s=0|t[1].length,p=Array(e.arrayArgs.length),c=Array(e.arrayArgs.length),l=["SS"],f=["'use strict'"],h=[],d=0;s>d;++d)h.push(["s",d,"=SS[",d,"]"].join(""));for(var y=0;e.arrayArgs.length>y;++y)l.push("a"+y),l.push("t"+y),l.push("p"+y),c[y]=t[2*y],p[y]=t[2*y+1];for(var y=0;e.scalarArgs.length>y;++y)l.push("Y"+y);if(e.shapeArgs.length>0&&h.push("shape=SS.slice(0)"),e.indexArgs.length>0){for(var v=Array(s),y=0;s>y;++y)v[y]="0";h.push(["index=[",v.join(","),"]"].join(""))}var g=u([].concat(e.pre.thisVars).concat(e.body.thisVars).concat(e.post.thisVars));h=h.concat(g),f.push("var "+h.join(","));for(var y=0;e.arrayArgs.length>y;++y)f.push("p"+y+"|=0");e.pre.body.length>3&&f.push(o(e.pre,e,c));var m=o(e.body,e,c),b=i(p);s>b?f.push(n(b,p[0],e,m)):f.push(r(p[0],e,m)),e.post.body.length>3&&f.push(o(e.post,e,c)),e.debug&&console.log("Generated cwise routine for ",t,":\n\n",f.join("\n"));var x=[e.funcName||"unnamed","_cwise_loop_",p[0].join("s"),"m",b,a(c)].join(""),w=Function(["function ",x,"(",l.join(","),"){",f.join("\n"),"} return ",x].join(""));return w()}var u=e("uniq");t.exports=s},{uniq:8}],8:[function(e,t){"use strict";function r(e,t){for(var r=1,n=e.length,i=e[0],o=e[0],a=1;n>a;++a)if(o=i,i=e[a],t(i,o)){if(a===r){r++;continue}e[r++]=i}return e.length=r,e}function n(e){for(var t=1,r=e.length,n=e[0],i=e[0],o=1;r>o;++o,i=n)if(i=n,n=e[o],n!==i){if(o===t){t++;continue}e[t++]=n}return e.length=t,e}function i(e,t,i){return 0===e.length?[]:t?(i||e.sort(t),r(e,t)):(i||e.sort(),n(e))}t.exports=i},{}]},{},[]),require=function(e,t,r){function n(r,o){if(!t[r]){if(!e[r]){var a="function"==typeof require&&require;if(!o&&a)return a(r,!0);if(i)return i(r,!0);throw Error("Cannot find module '"+r+"'")}var s=t[r]={exports:{}};e[r][0].call(s.exports,function(t){var i=e[r][1][t];return n(i?i:t)},s,s.exports)}return t[r].exports}for(var i="function"==typeof require&&require,o=0;r.length>o;o++)n(r[o]);return n}({"continuous-observer":[function(e,t){t.exports=e("9zD7g5")},{}],"9zD7g5":[function(e,t){function r(e,t,r){function p(e,t){return d[0]=e,c(d,t)}function c(n,o){return Array.isArray(n[0])?(o=o||function(){},i(n,function(t,r){t=t.slice();for(var n=f;n--;)t[n]=a(t[n]/l[n]);i(h,function(r,n){for(var i=t.slice(),o=f;o--;)i[o]+=r[o];e.chunk(i,n)},r)},function(i){if(i)return next(i);for(var a,s,p=1/0,c=[],h=0,d=n.length,y=e.index.pages,v=0;y.length>v;v+=1)for(var g=0;y[v].length>g;g+=1){for(a=y[v][g].position,p=1/0,s=0;d>s;s+=1){h=0;for(var m=0;f>m;m+=1)h+=u(a[m]-n[s][m]/l[m]);p=p>h?h:p}p>t+r&&c.push(a)}for(s=c.length;s--;)e.remove(c[s]);return o(null)}),void 0):p(n,o)}t=0|+t||1,r=s((0|+r)-t,t);var l=e.shape,f=l.length,h=o(n(f,-t),n(f,t)),d=[];return c}var n=e("dup"),i=e("map-async"),o=e("cell-range"),a=Math.round;Math.min;var s=Math.max,u=Math.abs;t.exports=r},{dup:1,"cell-range":2,"map-async":3}],1:[function(e,t){"use strict";function r(e,t,n){var i=0|e[n];if(0>=i)return[];var o,a=Array(i);if(n===e.length-1)for(o=0;i>o;++o)a[o]=t;else for(o=0;i>o;++o)a[o]=r(e,t,n+1);return a}function n(e,t){var r,n;for(r=Array(e),n=0;e>n;++n)r[n]=t;return r}function i(e,t){switch(t===void 0&&(t=0),typeof e){case"number":if(e>0)return n(0|e,t);break;case"object":if("number"==typeof e.length)return r(e,t,0)}return[]}t.exports=i},{}],2:[function(e,t){function r(e,t){function r(i,o,a){if(a===n-1)for(var s=e[a];t[a]>=s;s+=1)s===t[a]?(o.push(s),i.push(o)):i.push(o.concat(s));else for(var s=e[a];t[a]>=s;s+=1)s==t[a]?(o.push(s),r(i,o,a+1)):r(i,o.concat(s),a+1);return i}if(e.length!==t.length)throw Error("Both arguments must be arrays of equal length");var n=e.length;return t[t.length-1],r([],[],0)}t.exports=r},{}],3:[function(e,t){function r(e,t,r,i){function o(e){function t(t,r){return t?i&&i(t):(s[e]=r,0===--u&&i&&i(null,s),void 0)}return t}var a=Object.keys(e),s=Array.isArray(e)?[]:{},u=a.length;if("function"==typeof r&&(i=r,r=this),0===a.length)return i(null,s);for(var p=0,c=a.length;c>p;p++){var l=a[p],f=e[l];n(t,o(l),r,f,l,e)}}function n(e,t,r,n,i,o){var a=e.length;1===a?e.call(r,t):2===a?e.call(r,n,t):3===a?e.call(r,n,i,t):e.call(r,n,i,o,t)}t.exports=r},{}]},{},[]);var observer=require("continuous-observer"),cave=require("cave-automata-2d"),fill=require("ndarray-fill"),zero=require("zeros"),raf=require("raf"),canvas=document.createElement("canvas"),ctx=canvas.getContext("2d"),controls=require("kb-controls-iframed")({"<up>":"up","<down>":"down","<left>":"left","<right>":"right",W:"up",S:"down",A:"left",D:"right"}),field=require("ndarray-continuous")({shape:[28,28],getter:getter}),moveTo=observer(field),camera={x:0,y:0};raf().on("data",function(){controls.up&&(camera.y-=.25),controls.down&&(camera.y+=.25),controls.left&&(camera.x-=.25),controls.right&&(camera.x+=.25),moveTo([camera.x,camera.y]),ctx.fillStyle="#f2f2f2",ctx.fillRect(0,0,canvas.width,canvas.height),field.each(function(e){e.position;var t=e.shape[0],r=e.shape[1],n={x:e.position[0]*e.shape[0],y:e.position[1]*e.shape[1]};ctx.fillStyle="#af3";for(var i=0;t>i;i+=1)for(var o=0;r>o;o+=1)e.get(i,o)>0&&ctx.fillRect(40*(n.x+i-camera.x),40*(n.y+o-camera.y),40,40)})}),document.body.style.margin=document.body.style.padding=0,document.body.style.overflow="hidden",document.body.appendChild(canvas),canvas.width=window.innerWidth,canvas.height=window.innerHeight;
<style type='text/css'>html, body { margin: 0; padding: 0; border: 0; }
body, html { height: 100%; width: 100%; }</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment