view on requirebin
Created
February 18, 2014 02:57
-
-
Save guybrush/9063898 to your computer and use it in GitHub Desktop.
requirebin sketch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ndarray = require('ndarray') | |
var cwise = require('cwise') | |
var s = 4 | |
var arr0 = new ndarray(new Uint8Array(s*s*s),[s,s,s]) | |
var arr1 = new ndarray(new Uint8Array(s*s*s/2*2*2),[s/2,s/2,s/2]) | |
arr0.set(1,1,1,1) | |
var lod = cwise | |
( { args: | |
[ 'array' | |
, 'array', 'array', 'array', 'array' | |
, 'array', 'array', 'array', 'array' | |
] | |
, body: function(out,a,b,c,d,e,f,g,h){ | |
console.log(a,b,c,d,e,f,g,h) | |
out = a || b || c || d || e || f || g || h | |
} | |
} ) | |
var arr0_0 = arr0.step(2,2,2) | |
var arr0_1 = arr0.lo(1,0,0).step(2,2,2) | |
var arr0_2 = arr0.lo(0,1,0).step(2,2,2) | |
var arr0_3 = arr0.lo(1,1,0).step(2,2,2) | |
var arr0_4 = arr0.lo(0,0,1).step(2,2,2) | |
var arr0_5 = arr0.lo(1,0,1).step(2,2,2) | |
var arr0_6 = arr0.lo(0,1,1).step(2,2,2) | |
var arr0_7 = arr0.lo(1,1,1).step(2,2,2) | |
lod(arr1,arr0_0,arr0_1,arr0_2,arr0_3,arr0_4,arr0_5,arr0_6,arr0_7) | |
var el = document.createElement('div') | |
document.body.appendChild(el) | |
el.style['font-family'] = 'Consolas' | |
el.innerHTML = 'arr1.get(0,0,0): '+arr1.get(0,0,0) | |
+ '<br>arr1.get(1,1,1): '+arr1.get(1,1,1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require=function e(t,r,n){function i(o,s){if(!r[o]){if(!t[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(a)return a(o,!0);throw Error("Cannot find module '"+o+"'")}var l=r[o]={exports:{}};t[o][0].call(l.exports,function(e){var r=t[o][1][e];return i(r?r:e)},l,l.exports,e,t,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;n.length>o;o++)i(n[o]);return i}({sOiPdP:[function(e,t){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){var r=["View",t,"d",e].join(""),i="generic"===e;if(0===t){var a=["function ",r,"(a,d) {this.data = a;this.offset = d};var proto=",r,".prototype;proto.dtype='",e,"';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=proto.pick=function ",r,"_copy() {return new ",r,"(this.data,this.offset)};proto.get=function ",r,"_get(){return ",i?"this.data.get(this.offset)":"this.data[this.offset]","};proto.set=function ",r,"_set(v){return ",i?"this.data.get(this.offset)":"this.data[this.offset]","=v};return function construct_",r,"(a,b,c,d){return new ",r,"(a,d)}"].join(""),o=Function(a);return o()}var a=["'use strict'"],s=u(t),c=s.map(function(e){return"i"+e}),f="this.offset+"+s.map(function(e){return["this._stride",e,"*i",e].join("")}).join("+");a.push(["function ",r,"(a,",s.map(function(e){return"b"+e}).join(","),",",s.map(function(e){return"c"+e}).join(","),",d){this.data=a"].join(""));for(var h=0;t>h;++h)a.push(["this._shape",h,"=b",h,"|0"].join(""));for(var h=0;t>h;++h)a.push(["this._stride",h,"=c",h,"|0"].join(""));a.push("this.offset=d|0}"),a.push(["var proto=",r,".prototype"].join("")),a.push(["proto.dtype='",e,"'"].join("")),a.push("proto.dimension="+t);var d=["VStride",t,"d",e].join(""),g=["VShape",t,"d",e].join(""),y={stride:d,shape:g};for(var v in y){var m=y[v];a.push(["function ",m,"(v) {this._v=v} var aproto=",m,".prototype"].join("")),a.push(["aproto.length=",t].join(""));for(var b=[],h=0;t>h;++h)b.push(["this._v._",v,h].join(""));a.push(["aproto.toJSON=function ",m,"_toJSON(){return [",b.join(","),"]}"].join("")),a.push(["aproto.toString=function ",m,"_toString(){return [",b.join(","),"].join()}"].join(""));for(var h=0;t>h;++h)a.push(["Object.defineProperty(aproto,",h,",{get:function(){return this._v._",v,h,"},set:function(v){return this._v._",v,h,"=v|0},enumerable:true})"].join(""));for(var h=0;l.length>h;++h)l[h]in Array.prototype&&a.push(["aproto.",l[h],"=Array.prototype.",l[h]].join(""));a.push(["Object.defineProperty(proto,'",v,"',{get:function ",m,"_get(){return new ",m,"(this)},set: function ",m,"_set(v){"].join(""));for(var h=0;t>h;++h)a.push(["this._",v,h,"=v[",h,"]|0"].join(""));a.push("return v}})")}a.push(["Object.defineProperty(proto,'size',{get:function ",r,"_size(){return ",s.map(function(e){return["this._shape",e].join("")}).join("*"),"}})"].join("")),1===t?a.push("proto.order=[0]"):(a.push("Object.defineProperty(proto,'order',{get:"),4>t?(a.push(["function ",r,"_order(){"].join("")),2===t?a.push("return (Math.abs(this._stride0)>Math.abs(this._stride1))?[1,0]:[0,1]}})"):3===t&&a.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];}}})")):a.push("ORDER})")),a.push(["proto.set=function ",r,"_set(",c.join(","),",v){"].join("")),i?a.push(["return this.data.set(",f,",v)}"].join("")):a.push(["return this.data[",f,"]=v}"].join("")),a.push(["proto.get=function ",r,"_get(",c.join(","),"){"].join("")),i?a.push(["return this.data.get(",f,")}"].join("")):a.push(["return this.data[",f,"]}"].join("")),a.push(["proto.index=function ",r,"_index(",c.join(),"){return ",f,"}"].join("")),a.push(["proto.hi=function ",r,"_hi(",c.join(","),"){return new ",r,"(this.data,",s.map(function(e){return["(typeof i",e,"!=='number'||i",e,"<0)?this._shape",e,":i",e,"|0"].join("")}).join(","),",",s.map(function(e){return"this._stride"+e}).join(","),",this.offset)}"].join(""));var w=s.map(function(e){return"a"+e+"=this._shape"+e}),x=s.map(function(e){return"c"+e+"=this._stride"+e});a.push(["proto.lo=function ",r,"_lo(",c.join(","),"){var b=this.offset,d=0,",w.join(","),",",x.join(",")].join(""));for(var h=0;t>h;++h)a.push(["if(typeof i",h,"==='number'&&i",h,">=0){d=i",h,"|0;b+=c",h,"*d;a",h,"-=d}"].join(""));a.push(["return new ",r,"(this.data,",s.map(function(e){return"a"+e}).join(","),",",s.map(function(e){return"c"+e}).join(","),",b)}"].join("")),a.push(["proto.step=function ",r,"_step(",c.join(","),"){var ",s.map(function(e){return"a"+e+"=this._shape"+e}).join(","),",",s.map(function(e){return"b"+e+"=this._stride"+e}).join(","),",c=this.offset,d=0,ceil=Math.ceil"].join(""));for(var h=0;t>h;++h)a.push(["if(typeof i",h,"==='number'){d=i",h,"|0;if(d<0){c+=b",h,"*(a",h,"-1);a",h,"=ceil(-a",h,"/d)}else{a",h,"=ceil(a",h,"/d)}b",h,"*=d}"].join(""));a.push(["return new ",r,"(this.data,",s.map(function(e){return"a"+e}).join(","),",",s.map(function(e){return"b"+e}).join(","),",c)}"].join(""));for(var E=Array(t),S=Array(t),h=0;t>h;++h)E[h]=["a[i",h,"|0]"].join(""),S[h]=["b[i",h,"|0]"].join("");a.push(["proto.transpose=function ",r,"_transpose(",c,"){var a=this.shape,b=this.stride;return new ",r,"(this.data,",E.join(","),",",S.join(","),",this.offset)}"].join("")),a.push(["proto.pick=function ",r,"_pick(",c,"){var a=[],b=[],c=this.offset"].join(""));for(var h=0;t>h;++h)a.push(["if(typeof i",h,"==='number'&&i",h,">=0){c=(c+this._stride",h,"*i",h,")|0}else{a.push(this._shape",h,");b.push(this._stride",h,")}"].join(""));a.push("var ctor=CTOR_LIST[a.length];return ctor(this.data,a,b,c)}"),a.push(["return function construct_",r,"(data,shape,stride,offset){return new ",r,"(data,",s.map(function(e){return"shape["+e+"]"}).join(","),",",s.map(function(e){return"stride["+e+"]"}).join(","),",offset)}"].join(""));var o=Function("CTOR_LIST","ORDER",a.join("\n"));return o(p[e],n)}function a(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 Uint8ClampedArray?"uint8_clamped":s!==void 0&&e instanceof s?"buffer":e instanceof Array?"array":"generic"}function o(e,t,r,n){void 0===t&&(t=[e.length]);var o=t.length;if(void 0===r){r=Array(o);for(var s=o-1,u=1;s>=0;--s)r[s]=u,u*=t[s]}if(void 0===n){n=0;for(var s=0;o>s;++s)0>r[s]&&(n-=(t[s]-1)*r[s])}for(var l=a(e),c=p[l];o>=c.length;)c.push(i(l,c.length));var f=c[o];return f(e,t,r,n)}var s=e("__browserify_Buffer"),u=e("iota-array"),l=["concat","join","slice","toString","indexOf","lastIndexOf","forEach","every","some","filter","map","reduce","reduceRight"],p={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};t.exports=o},{__browserify_Buffer:4,"iota-array":3}],ndarray:[function(e,t){t.exports=e("sOiPdP")},{}],3:[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},{}],4:[function(e,t){e=function r(t,n,i){function a(s,u){if(!n[s]){if(!t[s]){var l="function"==typeof e&&e;if(!u&&l)return l(s,!0);if(o)return o(s,!0);throw Error("Cannot find module '"+s+"'")}var p=n[s]={exports:{}};t[s][0].call(p.exports,function(e){var r=t[s][1][e];return a(r?r:e)},p,p.exports,r,t,n,i)}return n[s].exports}for(var o="function"==typeof e&&e,s=0;i.length>s;s++)a(i[s]);return a}({PcZj9L:[function(e,t,r){function n(e,t){var r=typeof e;if("base64"===t&&"string"===r)for(e=ut(e);0!==e.length%4;)e+="=";var i;if("number"===r)i=ht(e);else if("string"===r)i=n.byteLength(e,t);else{if("object"!==r)throw Error("First argument needs to be a number, array or string.");i=ht(e.length)}var a=ct(new Uint8Array(i));if(n.isBuffer(e))a.set(e);else if(dt(e))for(var o=0;i>o;o++)a[o]=n.isBuffer(e)?e.readUInt8(o):e[o];else"string"===r&&a.write(e,0,t);return a}function i(e,t,r,i){r=Number(r)||0;var a=e.length-r;i?(i=Number(i),i>a&&(i=a)):i=a;var o=t.length;if(0!==o%2)throw Error("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;i>s;s++){var u=parseInt(t.substr(2*s,2),16);if(isNaN(u))throw Error("Invalid hex string");e[r+s]=u}return n._charsWritten=2*s,s}function a(e,t,r,i){return n._charsWritten=bt(yt(t),e,r,i)}function o(e,t,r,i){return n._charsWritten=bt(vt(t),e,r,i)}function s(e,t,r,n){return o(e,t,r,n)}function u(e,t,r,i){return n._charsWritten=bt(mt(t),e,r,i)}function l(e,t,r,n){if(isFinite(t))isFinite(r)||(n=r,r=void 0);else{var l=n;n=t,t=r,r=l}t=Number(t)||0;var p=this.length-t;switch(r?(r=Number(r),r>p&&(r=p)):r=p,n=((n||"utf8")+"").toLowerCase()){case"hex":return i(this,e,t,r);case"utf8":case"utf-8":return a(this,e,t,r);case"ascii":return o(this,e,t,r);case"binary":return s(this,e,t,r);case"base64":return u(this,e,t,r);default:throw Error("Unknown encoding")}}function p(e,t,r){var n=this instanceof pt?this._proxy:this;if(e=((e||"utf8")+"").toLowerCase(),t=Number(t)||0,r=void 0!==r?Number(r):r=n.length,r===t)return"";switch(e){case"hex":return v(n,t,r);case"utf8":case"utf-8":return d(n,t,r);case"ascii":return g(n,t,r);case"binary":return y(n,t,r);case"base64":return h(n,t,r);default:throw Error("Unknown encoding")}}function c(){return{type:"Buffer",data:Array.prototype.slice.call(this,0)}}function f(e,t,r,n){var i=this;if(r||(r=0),n||0===n||(n=this.length),t||(t=0),n!==r&&0!==e.length&&0!==i.length){if(r>n)throw Error("sourceEnd < sourceStart");if(0>t||t>=e.length)throw Error("targetStart out of bounds");if(0>r||r>=i.length)throw Error("sourceStart out of bounds");if(0>n||n>i.length)throw Error("sourceEnd out of bounds");n>this.length&&(n=this.length),n-r>e.length-t&&(n=e.length-t+r);for(var a=0;n-r>a;a++)e[a+t]=this[a+r]}}function h(t,r,n){var i=t.slice(r,n);return e("base64-js").fromByteArray(i)}function d(e,t,r){for(var n=e.slice(t,r),i="",a="",o=0;n.length>o;)127>=n[o]?(i+=wt(a)+String.fromCharCode(n[o]),a=""):a+="%"+n[o].toString(16),o++;return i+wt(a)}function g(e,t,r){for(var n=e.slice(t,r),i="",a=0;n.length>a;a++)i+=String.fromCharCode(n[a]);return i}function y(e,t,r){return g(e,t,r)}function v(e,t,r){var n=e.length;(!t||0>t)&&(t=0),(!r||0>r||r>n)&&(r=n);for(var i="",a=t;r>a;a++)i+=gt(e[a]);return i}function m(e,t){var r=this.length;return e=ft(e,r,0),t=ft(t,r,r),ct(this.subarray(e,t))}function b(e,t){var r=this;return t||(jt(void 0!==e&&null!==e,"missing offset"),jt(r.length>e,"Trying to read beyond buffer length")),e>=r.length?void 0:r[e]}function w(e,t,r,n){n||(jt("boolean"==typeof r,"missing or invalid endian"),jt(void 0!==t&&null!==t,"missing offset"),jt(e.length>t+1,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){if(t+1===i){var a=new DataView(new ArrayBuffer(2));return a.setUint8(0,e[i-1]),a.getUint16(0,r)}return e._dataview.getUint16(t,r)}}function x(e,t){return w(this,e,!0,t)}function E(e,t){return w(this,e,!1,t)}function S(e,t,r,n){n||(jt("boolean"==typeof r,"missing or invalid endian"),jt(void 0!==t&&null!==t,"missing offset"),jt(e.length>t+3,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){if(t+3>=i){for(var a=new DataView(new ArrayBuffer(4)),o=0;i>o+t;o++)a.setUint8(o,e[o+t]);return a.getUint32(0,r)}return e._dataview.getUint32(t,r)}}function j(e,t){return S(this,e,!0,t)}function I(e,t){return S(this,e,!1,t)}function L(e,t){var r=this;return t||(jt(void 0!==e&&null!==e,"missing offset"),jt(r.length>e,"Trying to read beyond buffer length")),e>=r.length?void 0:r._dataview.getInt8(e)}function A(e,t,r,n){n||(jt("boolean"==typeof r,"missing or invalid endian"),jt(void 0!==t&&null!==t,"missing offset"),jt(e.length>t+1,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){if(t+1===i){var a=new DataView(new ArrayBuffer(2));return a.setUint8(0,e[i-1]),a.getInt16(0,r)}return e._dataview.getInt16(t,r)}}function k(e,t){return A(this,e,!0,t)}function _(e,t){return A(this,e,!1,t)}function O(e,t,r,n){n||(jt("boolean"==typeof r,"missing or invalid endian"),jt(void 0!==t&&null!==t,"missing offset"),jt(e.length>t+3,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){if(t+3>=i){for(var a=new DataView(new ArrayBuffer(4)),o=0;i>o+t;o++)a.setUint8(o,e[o+t]);return a.getInt32(0,r)}return e._dataview.getInt32(t,r)}}function U(e,t){return O(this,e,!0,t)}function B(e,t){return O(this,e,!1,t)}function N(e,t,r,n){return n||(jt("boolean"==typeof r,"missing or invalid endian"),jt(e.length>t+3,"Trying to read beyond buffer length")),e._dataview.getFloat32(t,r)}function P(e,t){return N(this,e,!0,t)}function C(e,t){return N(this,e,!1,t)}function D(e,t,r,n){return n||(jt("boolean"==typeof r,"missing or invalid endian"),jt(e.length>t+7,"Trying to read beyond buffer length")),e._dataview.getFloat64(t,r)}function F(e,t){return D(this,e,!0,t)}function R(e,t){return D(this,e,!1,t)}function T(e,t,r){var n=this;r||(jt(void 0!==e&&null!==e,"missing value"),jt(void 0!==t&&null!==t,"missing offset"),jt(n.length>t,"trying to write beyond buffer length"),xt(e,255)),t>=n.length||(n[t]=e)}function V(e,t,r,n,i){i||(jt(void 0!==t&&null!==t,"missing value"),jt("boolean"==typeof n,"missing or invalid endian"),jt(void 0!==r&&null!==r,"missing offset"),jt(e.length>r+1,"trying to write beyond buffer length"),xt(t,65535));var a=e.length;if(!(r>=a))if(r+1===a){var o=new DataView(new ArrayBuffer(2));o.setUint16(0,t,n),e[r]=o.getUint8(0)}else e._dataview.setUint16(r,t,n)}function M(e,t,r){V(this,e,t,!0,r)}function q(e,t,r){V(this,e,t,!1,r)}function G(e,t,r,n,i){i||(jt(void 0!==t&&null!==t,"missing value"),jt("boolean"==typeof n,"missing or invalid endian"),jt(void 0!==r&&null!==r,"missing offset"),jt(e.length>r+3,"trying to write beyond buffer length"),xt(t,4294967295));var a=e.length;if(!(r>=a))if(r+3>=a){var o=new DataView(new ArrayBuffer(4));o.setUint32(0,t,n);for(var s=0;a>s+r;s++)e[s+r]=o.getUint8(s)}else e._dataview.setUint32(r,t,n)}function W(e,t,r){G(this,e,t,!0,r)}function H(e,t,r){G(this,e,t,!1,r)}function z(e,t,r){var n=this;r||(jt(void 0!==e&&null!==e,"missing value"),jt(void 0!==t&&null!==t,"missing offset"),jt(n.length>t,"Trying to write beyond buffer length"),Et(e,127,-128)),t>=n.length||n._dataview.setInt8(t,e)}function K(e,t,r,n,i){i||(jt(void 0!==t&&null!==t,"missing value"),jt("boolean"==typeof n,"missing or invalid endian"),jt(void 0!==r&&null!==r,"missing offset"),jt(e.length>r+1,"Trying to write beyond buffer length"),Et(t,32767,-32768));var a=e.length;if(!(r>=a))if(r+1===a){var o=new DataView(new ArrayBuffer(2));o.setInt16(0,t,n),e[r]=o.getUint8(0)}else e._dataview.setInt16(r,t,n)}function X(e,t,r){K(this,e,t,!0,r)}function J(e,t,r){K(this,e,t,!1,r)}function Y(e,t,r,n,i){i||(jt(void 0!==t&&null!==t,"missing value"),jt("boolean"==typeof n,"missing or invalid endian"),jt(void 0!==r&&null!==r,"missing offset"),jt(e.length>r+3,"Trying to write beyond buffer length"),Et(t,2147483647,-2147483648));var a=e.length;if(!(r>=a))if(r+3>=a){var o=new DataView(new ArrayBuffer(4));o.setInt32(0,t,n);for(var s=0;a>s+r;s++)e[s+r]=o.getUint8(s)}else e._dataview.setInt32(r,t,n)}function Z(e,t,r){Y(this,e,t,!0,r)}function $(e,t,r){Y(this,e,t,!1,r)}function Q(e,t,r,n,i){i||(jt(void 0!==t&&null!==t,"missing value"),jt("boolean"==typeof n,"missing or invalid endian"),jt(void 0!==r&&null!==r,"missing offset"),jt(e.length>r+3,"Trying to write beyond buffer length"),St(t,3.4028234663852886e38,-3.4028234663852886e38));var a=e.length;if(!(r>=a))if(r+3>=a){var o=new DataView(new ArrayBuffer(4));o.setFloat32(0,t,n);for(var s=0;a>s+r;s++)e[s+r]=o.getUint8(s)}else e._dataview.setFloat32(r,t,n)}function et(e,t,r){Q(this,e,t,!0,r)}function tt(e,t,r){Q(this,e,t,!1,r)}function rt(e,t,r,n,i){i||(jt(void 0!==t&&null!==t,"missing value"),jt("boolean"==typeof n,"missing or invalid endian"),jt(void 0!==r&&null!==r,"missing offset"),jt(e.length>r+7,"Trying to write beyond buffer length"),St(t,1.7976931348623157e308,-1.7976931348623157e308));var a=e.length;if(!(r>=a))if(r+7>=a){var o=new DataView(new ArrayBuffer(8));o.setFloat64(0,t,n);for(var s=0;a>s+r;s++)e[s+r]=o.getUint8(s)}else e._dataview.setFloat64(r,t,n)}function nt(e,t,r){rt(this,e,t,!0,r)}function it(e,t,r){rt(this,e,t,!1,r)}function at(e,t,r){if(e||(e=0),t||(t=0),r||(r=this.length),"string"==typeof e&&(e=e.charCodeAt(0)),"number"!=typeof e||isNaN(e))throw Error("value is not a number");if(t>r)throw Error("end < start");if(r!==t&&0!==this.length){if(0>t||t>=this.length)throw Error("start out of bounds");if(0>r||r>this.length)throw Error("end out of bounds");for(var n=t;r>n;n++)this[n]=e}}function ot(){for(var e=[],t=this.length,n=0;t>n;n++)if(e[n]=gt(this[n]),n===r.INSPECT_MAX_BYTES){e[n+1]="...";break}return"<Buffer "+e.join(" ")+">"}function st(){return new n(this).buffer}function ut(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function lt(){var e=new Uint8Array(0);e.foo=function(){return 42};try{return 42===e.foo()}catch(t){return!1}}function pt(e){this._arr=e,0!==e.byteLength&&(this._dataview=new DataView(e.buffer,e.byteOffset,e.byteLength))}function ct(e){if(void 0===It&&(It=lt()),It)return e.write=l,e.toString=p,e.toLocaleString=p,e.toJSON=c,e.copy=f,e.slice=m,e.readUInt8=b,e.readUInt16LE=x,e.readUInt16BE=E,e.readUInt32LE=j,e.readUInt32BE=I,e.readInt8=L,e.readInt16LE=k,e.readInt16BE=_,e.readInt32LE=U,e.readInt32BE=B,e.readFloatLE=P,e.readFloatBE=C,e.readDoubleLE=F,e.readDoubleBE=R,e.writeUInt8=T,e.writeUInt16LE=M,e.writeUInt16BE=q,e.writeUInt32LE=W,e.writeUInt32BE=H,e.writeInt8=z,e.writeInt16LE=X,e.writeInt16BE=J,e.writeInt32LE=Z,e.writeInt32BE=$,e.writeFloatLE=et,e.writeFloatBE=tt,e.writeDoubleLE=nt,e.writeDoubleBE=it,e.fill=at,e.inspect=ot,e.toArrayBuffer=st,e._isBuffer=!0,0!==e.byteLength&&(e._dataview=new DataView(e.buffer,e.byteOffset,e.byteLength)),e;var t=new pt(e),r=new Proxy(t,Lt);return t._proxy=r,r}function ft(e,t,r){return"number"!=typeof e?r:(e=~~e,e>=t?t:e>=0?e:(e+=t,e>=0?e:0))}function ht(e){return e=~~Math.ceil(+e),0>e?0:e}function dt(e){return Array.isArray(e)||n.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function gt(e){return 16>e?"0"+e.toString(16):e.toString(16)}function yt(e){for(var t=[],r=0;e.length>r;r++)if(127>=e.charCodeAt(r))t.push(e.charCodeAt(r));else for(var n=encodeURIComponent(e.charAt(r)).substr(1).split("%"),i=0;n.length>i;i++)t.push(parseInt(n[i],16));return t}function vt(e){for(var t=[],r=0;e.length>r;r++)t.push(255&e.charCodeAt(r));return t}function mt(t){return e("base64-js").toByteArray(t)}function bt(e,t,r,n){for(var i=0;n>i&&!(i+r>=t.length||i>=e.length);)t[i+r]=e[i],i++;return i}function wt(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}function xt(e,t){jt("number"==typeof e,"cannot write a non-number as a number"),jt(e>=0,"specified a negative value for writing an unsigned value"),jt(t>=e,"value is larger than maximum value for type"),jt(Math.floor(e)===e,"value has a fractional component")}function Et(e,t,r){jt("number"==typeof e,"cannot write a non-number as a number"),jt(t>=e,"value larger than maximum allowed value"),jt(e>=r,"value smaller than minimum allowed value"),jt(Math.floor(e)===e,"value has a fractional component")}function St(e,t,r){jt("number"==typeof e,"cannot write a non-number as a number"),jt(t>=e,"value larger than maximum allowed value"),jt(e>=r,"value smaller than minimum allowed value")}function jt(e,t){if(!e)throw Error(t||"Failed assertion")}r.Buffer=n,r.SlowBuffer=n,r.INSPECT_MAX_BYTES=50,n.poolSize=8192;var It;n.isEncoding=function(e){switch((e+"").toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},n.isBuffer=function(e){return e&&e._isBuffer},n.byteLength=function(e,t){switch(t||"utf8"){case"hex":return e.length/2;case"utf8":case"utf-8":return yt(e).length;case"ascii":case"binary":return e.length;case"base64":return mt(e).length;default:throw Error("Unknown encoding")}},n.concat=function(e,t){if(!Array.isArray(e))throw Error("Usage: Buffer.concat(list, [totalLength])\nlist should be an Array.");var r,i;if(0===e.length)return new n(0);if(1===e.length)return e[0];if("number"!=typeof t)for(t=0,r=0;e.length>r;r++)i=e[r],t+=i.length;var a=new n(t),o=0;for(r=0;e.length>r;r++)i=e[r],i.copy(a,o),o+=i.length;return a},pt.prototype.write=l,pt.prototype.toString=p,pt.prototype.toLocaleString=p,pt.prototype.toJSON=c,pt.prototype.copy=f,pt.prototype.slice=m,pt.prototype.readUInt8=b,pt.prototype.readUInt16LE=x,pt.prototype.readUInt16BE=E,pt.prototype.readUInt32LE=j,pt.prototype.readUInt32BE=I,pt.prototype.readInt8=L,pt.prototype.readInt16LE=k,pt.prototype.readInt16BE=_,pt.prototype.readInt32LE=U,pt.prototype.readInt32BE=B,pt.prototype.readFloatLE=P,pt.prototype.readFloatBE=C,pt.prototype.readDoubleLE=F,pt.prototype.readDoubleBE=R,pt.prototype.writeUInt8=T,pt.prototype.writeUInt16LE=M,pt.prototype.writeUInt16BE=q,pt.prototype.writeUInt32LE=W,pt.prototype.writeUInt32BE=H,pt.prototype.writeInt8=z,pt.prototype.writeInt16LE=X,pt.prototype.writeInt16BE=J,pt.prototype.writeInt32LE=Z,pt.prototype.writeInt32BE=$,pt.prototype.writeFloatLE=et,pt.prototype.writeFloatBE=tt,pt.prototype.writeDoubleLE=nt,pt.prototype.writeDoubleBE=it,pt.prototype.fill=at,pt.prototype.inspect=ot,pt.prototype.toArrayBuffer=st,pt.prototype._isBuffer=!0,pt.prototype.subarray=function(){return this._arr.subarray.apply(this._arr,arguments)},pt.prototype.set=function(){return this._arr.set.apply(this._arr,arguments)};var Lt={get:function(e,t){return t in e?e[t]:e._arr[t]},set:function(e,t,r){e._arr[t]=r}}},{"base64-js":3}],"native-buffer-browserify":[function(e,t){t.exports=e("PcZj9L")},{}],3:[function(e,t){(function(){"use strict";function e(e){var t,r,i,a,o,s;if(e.length%4>0)throw"Invalid string. Length must be a multiple of 4";for(o=e.indexOf("="),o=o>0?e.length-o:0,s=[],i=o>0?e.length-4:e.length,t=0,r=0;i>t;t+=4,r+=3)a=n.indexOf(e[t])<<18|n.indexOf(e[t+1])<<12|n.indexOf(e[t+2])<<6|n.indexOf(e[t+3]),s.push((16711680&a)>>16),s.push((65280&a)>>8),s.push(255&a);return 2===o?(a=n.indexOf(e[t])<<2|n.indexOf(e[t+1])>>4,s.push(255&a)):1===o&&(a=n.indexOf(e[t])<<10|n.indexOf(e[t+1])<<4|n.indexOf(e[t+2])>>2,s.push(255&a>>8),s.push(255&a)),s}function r(e){function t(e){return n[63&e>>18]+n[63&e>>12]+n[63&e>>6]+n[63&e]}var r,i,a,o=e.length%3,s="";for(r=0,a=e.length-o;a>r;r+=3)i=(e[r]<<16)+(e[r+1]<<8)+e[r+2],s+=t(i);switch(o){case 1:i=e[e.length-1],s+=n[i>>2],s+=n[63&i<<4],s+="==";break;case 2:i=(e[e.length-2]<<8)+e[e.length-1],s+=n[i>>10],s+=n[63&i>>4],s+=n[63&i<<2],s+="="}return s}var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";t.exports.toByteArray=e,t.exports.fromByteArray=r})()},{}]},{},[]),t.exports=e("native-buffer-browserify").Buffer},{}]},{},[]),require=function e(t,r,n){function i(o,s){if(!r[o]){if(!t[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(a)return a(o,!0);throw Error("Cannot find module '"+o+"'")}var l=r[o]={exports:{}};t[o][0].call(l.exports,function(e){var r=t[o][1][e];return i(r?r:e)},l,l.exports,e,t,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;n.length>o;o++)i(n[o]);return i}({"4IMPv+":[function(e,t){"use strict";function r(e){for(var t in e)0>a.indexOf(t)&&0>o.indexOf(t)&&console.warn("cwise: Unknown argument '"+t+"' passed to expression compiler");for(var r=0;a.length>r;++r)if(!e[a[r]])throw Error("cwise: Missing argument: "+a[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"),a=["args","body"],o=["pre","post","printCode","funcName","blockSize"];t.exports=r},{"cwise-compiler":3,"cwise-parser":7}],cwise:[function(e,t){t.exports=e("4IMPv+")},{}],3:[function(e,t){"use strict";function r(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],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.slice(0);for(var a=0;n.length>a;++a){var o=n[a];if("array"===o){if(t.arrayArgs.push(a),t.shimArgs.push("array"+a),t.pre.args.length>a&&t.pre.args[a].count>0)throw Error("cwise: pre() block may not reference array args");if(t.post.args.length>a&&t.post.args[a].count>0)throw Error("cwise: post() block may not reference array args")}else if("scalar"===o)t.scalarArgs.push(a),t.shimArgs.push("scalar"+a);else if("index"===o){if(t.indexArgs.push(a),t.pre.args.length>a&&t.pre.args[a].count>0)throw Error("cwise: pre() block may not reference array index");if(t.body.args.length>a&&t.body.args[a].lvalue)throw Error("cwise: body() block may not write to array index");if(t.post.args.length>a&&t.post.args[a].count>0)throw Error("cwise: post() block may not reference array index")}else if("shape"===o){if(t.shapeArgs.push(a),t.pre.args.length>a&&t.pre.args[a].lvalue)throw Error("cwise: pre() block may not write to array shape");if(t.body.args.length>a&&t.body.args[a].lvalue)throw Error("cwise: body() block may not write to array shape");if(t.post.args.length>a&&t.post.args[a].lvalue)throw Error("cwise: post() block may not write to array shape")}else{if("object"!=typeof o||!o.offset)throw Error("cwise: Unknown argument type "+n[a]);t.argTypes[a]="offset",t.offsetArgs.push({array:o.array,offset:o.offset}),t.offsetArgIndex.push(a)}}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":5}],4:[function(e,t){"use strict";function r(e,t,r){var n,i,a=e.length,o=t.arrayArgs.length,s=t.indexArgs.length>0,u=[],l=[],p=0,c=0;for(n=0;a>n;++n)l.push(["i",n,"=0"].join(""));for(i=0;o>i;++i)for(n=0;a>n;++n)c=p,p=e[n],0===n?l.push(["d",i,"s",n,"=t",i,"[",p,"]"].join("")):l.push(["d",i,"s",n,"=(t",i,"[",p,"]-s",c,"*t",i,"[",c,"])"].join(""));for(u.push("var "+l.join(",")),n=a-1;n>=0;--n)p=e[n],u.push(["for(i",n,"=0;i",n,"<s",p,";++i",n,"){"].join(""));for(u.push(r),n=0;a>n;++n){for(c=p,p=e[n],i=0;o>i;++i)u.push(["p",i,"+=d",i,"s",n].join(""));s&&(n>0&&u.push(["index[",c,"]-=s",c].join("")),u.push(["++index[",p,"]"].join(""))),u.push("}")}return u.join("\n")}function n(e,t,n,i){for(var a=t.length,o=n.arrayArgs.length,s=n.blockSize,u=n.indexArgs.length>0,l=[],p=0;o>p;++p)l.push(["var offset",p,"=p",p].join(""));for(var p=e;a>p;++p)l.push(["for(var j"+p+"=SS[",t[p],"]|0;j",p,">0;){"].join("")),l.push(["if(j",p,"<",s,"){"].join("")),l.push(["s",t[p],"=j",p].join("")),l.push(["j",p,"=0"].join("")),l.push(["}else{s",t[p],"=",s].join("")),l.push(["j",p,"-=",s,"}"].join("")),u&&l.push(["index[",t[p],"]=j",p].join(""));for(var p=0;o>p;++p){for(var c=["offset"+p],f=e;a>f;++f)c.push(["j",f,"*t",p,"[",t[f],"]"].join(""));l.push(["p",p,"=(",c.join("+"),")"].join(""))}l.push(r(t,n,i));for(var p=e;a>p;++p)l.push("}");return l.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 a(e,t,r){for(var n=e.body,i=[],a=[],o=0;e.args.length>o;++o){var s=e.args[o];if(!(0>=s.count)){var u=RegExp(s.name,"g"),l="",p=t.arrayArgs.indexOf(o);switch(t.argTypes[o]){case"offset":var c=t.offsetArgIndex.indexOf(o),f=t.offsetArgs[c];p=f.array,l="+q"+c;case"array":l="p"+p+l;var h="l"+o,d="a"+p;1===s.count?"generic"===r[p]?s.lvalue?(i.push(["var ",h,"=",d,".get(",l,")"].join("")),n=n.replace(u,h),a.push([d,".set(",l,",",h,")"].join(""))):n=n.replace(u,[d,".get(",l,")"].join("")):n=n.replace(u,[d,"[",l,"]"].join("")):"generic"===r[p]?(i.push(["var ",h,"=",d,".get(",l,")"].join("")),n=n.replace(u,h),s.lvalue&&a.push([d,".set(",l,",",h,")"].join(""))):(i.push(["var ",h,"=",d,"[",l,"]"].join("")),n=n.replace(u,h),s.lvalue&&a.push([d,"[",l,"]=",h].join("")));break;case"scalar":n=n.replace(u,"Y"+t.scalarArgs.indexOf(o));break;case"index":n=n.replace(u,"index");break;case"shape":n=n.replace(u,"shape")}}}return[i.join("\n"),n,a.join("\n")].join("\n").trim()}function o(e){for(var t=Array(e.length),r=!0,n=0;e.length>n;++n){var i=e[n],a=i.match(/\d+/);a=a?a[0]:"",t[n]=0===i.charAt(0)?"u"+i.charAt(1)+a:i.charAt(0)+a,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,l=Array(e.arrayArgs.length),p=Array(e.arrayArgs.length),c=["SS"],f=["'use strict'"],h=[],d=0;s>d;++d)h.push(["s",d,"=SS[",d,"]"].join(""));for(var g=0;e.arrayArgs.length>g;++g)c.push("a"+g),c.push("t"+g),c.push("p"+g),p[g]=t[2*g],l[g]=t[2*g+1];for(var g=0;e.scalarArgs.length>g;++g)c.push("Y"+g);if(e.shapeArgs.length>0&&h.push("shape=SS.slice(0)"),e.indexArgs.length>0){for(var y=Array(s),g=0;s>g;++g)y[g]="0";h.push(["index=[",y.join(","),"]"].join(""))}for(var g=0;e.offsetArgs.length>g;++g){for(var v=e.offsetArgs[g],m=[],d=0;v.offset.length>d;++d)0!==v.offset[d]&&(1===v.offset[d]?m.push(["t",v.array,"[",d,"]"].join("")):m.push([v.offset[d],"*t",v.array,"[",d,"]"].join("")));0===m.length?h.push("q"+g+"=0"):h.push(["q",g,"=(",m.join("+"),")|0"].join(""))}var b=u([].concat(e.pre.thisVars).concat(e.body.thisVars).concat(e.post.thisVars));h=h.concat(b),f.push("var "+h.join(","));for(var g=0;e.arrayArgs.length>g;++g)f.push("p"+g+"|=0");e.pre.body.length>3&&f.push(a(e.pre,e,p));var w=a(e.body,e,p),x=i(l);s>x?f.push(n(x,l[0],e,w)):f.push(r(l[0],e,w)),e.post.body.length>3&&f.push(a(e.post,e,p)),e.debug&&console.log("Generated cwise routine for ",t,":\n\n",f.join("\n"));var E=[e.funcName||"unnamed","_cwise_loop_",l[0].join("s"),"m",x,o(p)].join(""),S=Function(["function ",E,"(",c.join(","),"){",f.join("\n"),"} return ",E].join(""));return S()}var u=e("uniq");t.exports=s},{uniq:6}],5:[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 a=[],o=[],s=[["array",e.arrayArgs[0],".shape"].join("")],u=0;e.arrayArgs.length>u;++u){var l=e.arrayArgs[u];r.push(["t",l,"=array",l,".dtype,","r",l,"=array",l,".order"].join("")),a.push("t"+l),a.push("r"+l),o.push("t"+l),o.push("r"+l+".join()"),s.push("array"+l+".data"),s.push("array"+l+".stride"),s.push("array"+l+".offset|0")}for(var u=0;e.scalarArgs.length>u;++u)s.push("scalar"+e.scalarArgs[u]);r.push(["type=[",o.join(","),"].join()"].join("")),r.push("proc=CACHED[type]"),t.push("var "+r.join(",")),t.push(["if(!proc){","CACHED[type]=proc=compile([",a.join(","),"])}","return proc(",s.join(","),")}"].join("")),e.debug&&console.log("Generated thunk:",t.join("\n"));var p=Function("compile",t.join("\n"));return p(n.bind(void 0,e))}var n=e("./compile.js");t.exports=r},{"./compile.js":4}],6:[function(e,t){"use strict";function r(e,t){for(var r=1,n=e.length,i=e[0],a=e[0],o=1;n>o;++o)if(a=i,i=e[o],t(i,a)){if(o===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],a=1;r>a;++a,i=n)if(i=n,n=e[a],n!==i){if(a===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},{}],7:[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 a(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 o(e){function t(e){var t=y+e.replace(/\_/g,"__");return E.push(t),t}function o(e){var t="this_"+e.replace(/\_/g,"__");return S.push(t),t}function p(e,t){for(var r=e.range[0],n=e.range[1],i=r+1;n>i;++i)w[i]="";w[r]=t}function c(e){return"'"+e.replace(/\_/g,"\\_").replace(/\'/g,"'")+"'"}function f(e){return w.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|I:"UpdateExpression"===e.parent.type?j|I:I}for(var d=["(",e,")()"].join(""),g=s.parse(d,{range:!0}),y="_inline_"+l++ +"_",v=a(g),m=Array(v.length),b=0;v.length>b;++b)m[b]=new r([y,"arg",b,"_"].join(""),!1,!1);for(var w=Array(d.length),b=0,x=d.length;x>b;++b)w[b]=d.charAt(b);var E=[],S=[],j=1,I=2;(function L(e,r){if(e.parent=r,"MemberExpression"===e.type)e.computed?(L(e.object,e),L(e.property,e)):"ThisExpression"===e.object.type?p(e,o(e.property.name)):L(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,a=v.indexOf(n);if(a>=0){var s=m[a],u=h(e);u&j&&(s.lvalue=!0),u&I&&(s.rvalue=!0),++s.count,p(e,s.name)}else i(n)||p(e,t(n))}else if("Literal"===e.type)"string"==typeof e.value&&p(e,c(e.value));else{if("WithStatement"===e.type)throw Error("cwise-parser: with() statements not allowed");for(var l=Object.keys(e),f=0,d=l.length;d>f;++f)if("parent"!==l[f]){var g=e[l[f]];if(g)if(g instanceof Array)for(var y=0;g.length>y;++y)g[y]&&"string"==typeof g[y].type&&L(g[y],e);else"string"==typeof g.type&&L(g,e)}}}})(g.body[0].expression.callee.body,void 0),u(E),u(S);var A=new n(f(g.body[0].expression.callee.body),m,S,E);return A}var s=e("esprima"),u=e("uniq"),l=0;t.exports=o},{esprima:8,uniq:9}],8:[function(e,t,r){(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 a(e){return"01234567".indexOf(e)>=0}function o(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&&cr.NonAsciiIdentifierStart.test(e)}function l(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&"z">=e||e>="A"&&"Z">=e||e>="0"&&"9">=e||e.charCodeAt(0)>=128&&cr.NonAsciiIdentifierPart.test(e)}function p(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0}return!1}function c(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&&c(e)?!0:p(e)}function d(){var e,t,r;for(t=!1,r=!1;vr>dr;)if(e=fr[dr],r)e=fr[dr++],s(e)&&(r=!1,"\r"===e&&"\n"===fr[dr]&&++dr,++gr,yr=dr);else if(t)s(e)?("\r"===e&&"\n"===fr[dr+1]&&++dr,++gr,++dr,yr=dr,dr>=vr&&L({},pr.UnexpectedToken,"ILLEGAL")):(e=fr[dr++],dr>=vr&&L({},pr.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>=vr&&L({},pr.UnexpectedToken,"ILLEGAL")}else if(o(e))++dr;else{if(!s(e))break;++dr,"\r"===e&&"\n"===fr[dr]&&++dr,++gr,yr=dr}}function g(e){var t,r,n,a=0;for(r="u"===e?4:2,t=0;r>t;++t){if(!(vr>dr&&i(fr[dr])))return"";n=fr[dr++],a=16*a+"0123456789abcdef".indexOf(n.toLowerCase())}return String.fromCharCode(a)}function y(){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=g("u")){if("\\"===e||!u(e))return;r=e}else dr=n,r="u"}else r=fr[dr++];for(;vr>dr&&(e=fr[dr],l(e));)if("\\"===e){if(++dr,"u"!==fr[dr])return;if(++dr,n=dr,e=g("u")){if("\\"===e||!l(e))return;r+=e}else dr=n,r+="u"}else r+=fr[dr++];return 1===r.length?{type:or.Identifier,value:r,lineNumber:gr,lineStart:yr,range:[t,dr]}:h(r)?{type:or.Keyword,value:r,lineNumber:gr,lineStart:yr,range:[t,dr]}:"null"===r?{type:or.NullLiteral,value:r,lineNumber:gr,lineStart:yr,range:[t,dr]}:"true"===r||"false"===r?{type:or.BooleanLiteral,value:r,lineNumber:gr,lineStart:yr,range:[t,dr]}:{type:or.Identifier,value:r,lineNumber:gr,lineStart:yr,range:[t,dr]}}}function v(){var e,t,r,i=dr,a=fr[dr];return";"===a||"{"===a||"}"===a?(++dr,{type:or.Punctuator,value:a,lineNumber:gr,lineStart:yr,range:[i,dr]}):","===a||"("===a||")"===a?(++dr,{type:or.Punctuator,value:a,lineNumber:gr,lineStart:yr,range:[i,dr]}):(e=fr[dr+1],"."!==a||n(e)?(t=fr[dr+2],r=fr[dr+3],">"===a&&">"===e&&">"===t&&"="===r?(dr+=4,{type:or.Punctuator,value:">>>=",lineNumber:gr,lineStart:yr,range:[i,dr]}):"="===a&&"="===e&&"="===t?(dr+=3,{type:or.Punctuator,value:"===",lineNumber:gr,lineStart:yr,range:[i,dr]}):"!"===a&&"="===e&&"="===t?(dr+=3,{type:or.Punctuator,value:"!==",lineNumber:gr,lineStart:yr,range:[i,dr]}):">"===a&&">"===e&&">"===t?(dr+=3,{type:or.Punctuator,value:">>>",lineNumber:gr,lineStart:yr,range:[i,dr]}):"<"===a&&"<"===e&&"="===t?(dr+=3,{type:or.Punctuator,value:"<<=",lineNumber:gr,lineStart:yr,range:[i,dr]}):">"===a&&">"===e&&"="===t?(dr+=3,{type:or.Punctuator,value:">>=",lineNumber:gr,lineStart:yr,range:[i,dr]}):"="===e&&"<>=!+-*%&|^/".indexOf(a)>=0?(dr+=2,{type:or.Punctuator,value:a+e,lineNumber:gr,lineStart:yr,range:[i,dr]}):a===e&&"+-<>&|".indexOf(a)>=0&&"+-<>&|".indexOf(e)>=0?(dr+=2,{type:or.Punctuator,value:a+e,lineNumber:gr,lineStart:yr,range:[i,dr]}):"[]<>+-*%&|^!~?:=/".indexOf(a)>=0?{type:or.Punctuator,value:fr[dr++],lineNumber:gr,lineStart:yr,range:[i,dr]}:void 0):{type:or.Punctuator,value:fr[dr++],lineNumber:gr,lineStart:yr,range:[i,dr]})}function m(){var e,r,o;if(o=fr[dr],t(n(o)||"."===o,"Numeric literal must start with a decimal digit or a decimal point"),r=dr,e="","."!==o){if(e=fr[dr++],o=fr[dr],"0"===e){if("x"===o||"X"===o){for(e+=fr[dr++];vr>dr&&(o=fr[dr],i(o));)e+=fr[dr++];return 2>=e.length&&L({},pr.UnexpectedToken,"ILLEGAL"),vr>dr&&(o=fr[dr],u(o)&&L({},pr.UnexpectedToken,"ILLEGAL")),{type:or.NumericLiteral,value:parseInt(e,16),lineNumber:gr,lineStart:yr,range:[r,dr]}}if(a(o)){for(e+=fr[dr++];vr>dr&&(o=fr[dr],a(o));)e+=fr[dr++];return vr>dr&&(o=fr[dr],(u(o)||n(o))&&L({},pr.UnexpectedToken,"ILLEGAL")),{type:or.NumericLiteral,value:parseInt(e,8),octal:!0,lineNumber:gr,lineStart:yr,range:[r,dr]}}n(o)&&L({},pr.UnexpectedToken,"ILLEGAL")}for(;vr>dr&&(o=fr[dr],n(o));)e+=fr[dr++]}if("."===o)for(e+=fr[dr++];vr>dr&&(o=fr[dr],n(o));)e+=fr[dr++];if("e"===o||"E"===o)if(e+=fr[dr++],o=fr[dr],("+"===o||"-"===o)&&(e+=fr[dr++]),o=fr[dr],n(o))for(e+=fr[dr++];vr>dr&&(o=fr[dr],n(o));)e+=fr[dr++];else o="character "+o,dr>=vr&&(o="<end>"),L({},pr.UnexpectedToken,"ILLEGAL");return vr>dr&&(o=fr[dr],u(o)&&L({},pr.UnexpectedToken,"ILLEGAL")),{type:or.NumericLiteral,value:parseFloat(e),lineNumber:gr,lineStart:yr,range:[r,dr]}}function b(){var e,r,n,i,o,u,l="",p=!1;for(e=fr[dr],t("'"===e||'"'===e,"String literal must starts with a quote"),r=dr,++dr;vr>dr;){if(n=fr[dr++],n===e){e="";break}if("\\"===n)if(n=fr[dr++],s(n))++gr,"\r"===n&&"\n"===fr[dr]&&++dr;else switch(n){case"n":l+="\n";break;case"r":l+="\r";break;case"t":l+=" ";break;case"u":case"x":u=dr,o=g(n),o?l+=o:(dr=u,l+=n);break;case"b":l+="\b";break;case"f":l+="\f";break;case"v":l+="";break;default:a(n)?(i="01234567".indexOf(n),0!==i&&(p=!0),vr>dr&&a(fr[dr])&&(p=!0,i=8*i+"01234567".indexOf(fr[dr++]),"0123".indexOf(n)>=0&&vr>dr&&a(fr[dr])&&(i=8*i+"01234567".indexOf(fr[dr++]))),l+=String.fromCharCode(i)):l+=n}else{if(s(n))break;l+=n}}return""!==e&&L({},pr.UnexpectedToken,"ILLEGAL"),{type:or.StringLiteral,value:l,octal:p,lineNumber:gr,lineStart:yr,range:[r,dr]}}function w(){var e,r,n,i,a,o,u,p=!1,c=!1;for(mr=null,d(),n=dr,r=fr[dr],t("/"===r,"Regular expression literal must start with a slash"),e=fr[dr++];vr>dr;)if(r=fr[dr++],e+=r,"\\"===r)r=fr[dr++],s(r)&&L({},pr.UnterminatedRegExp),e+=r;else if(p)"]"===r&&(p=!1);else{if("/"===r){c=!0;break}"["===r?p=!0:s(r)&&L({},pr.UnterminatedRegExp)}for(c||L({},pr.UnterminatedRegExp),i=e.substr(1,e.length-2),a="";vr>dr&&(r=fr[dr],l(r));)if(++dr,"\\"===r&&vr>dr)if(r=fr[dr],"u"===r)if(++dr,u=dr,r=g("u"))for(a+=r,e+="\\u";dr>u;++u)e+=fr[u];else dr=u,a+="u",e+="\\u";else e+="\\";else a+=r,e+=r;try{o=RegExp(i,a)}catch(f){L({},pr.InvalidRegExp)}return{literal:e,value:o,range:[n,dr]}}function x(e){return e.type===or.Identifier||e.type===or.Keyword||e.type===or.BooleanLiteral||e.type===or.NullLiteral}function E(){var e,t;return d(),dr>=vr?{type:or.EOF,lineNumber:gr,lineStart:yr,range:[dr,dr]}:(t=v(),t!==void 0?t:(e=fr[dr],"'"===e||'"'===e?b():"."===e||n(e)?m():(t=y(),t!==void 0?t:(L({},pr.UnexpectedToken,"ILLEGAL"),void 0))))}function S(){var e;return mr?(dr=mr.range[1],gr=mr.lineNumber,yr=mr.lineStart,e=mr,mr=null,e):(mr=null,E())}function j(){var e,t,r;return null!==mr?mr:(e=dr,t=gr,r=yr,mr=E(),dr=e,gr=t,yr=r,mr)}function I(){var e,t,r,n;return e=dr,t=gr,r=yr,d(),n=gr!==t,dr=e,gr=t,yr=r,n}function L(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]-yr+1):(r=Error("Line "+gr+": "+i),r.index=dr,r.lineNumber=gr,r.column=dr-yr+1),r}function A(){try{L.apply(null,arguments)}catch(e){if(!wr.errors)throw e;wr.errors.push(e)}}function k(e){if(e.type===or.EOF&&L(e,pr.UnexpectedEOS),e.type===or.NumericLiteral&&L(e,pr.UnexpectedNumber),e.type===or.StringLiteral&&L(e,pr.UnexpectedString),e.type===or.Identifier&&L(e,pr.UnexpectedIdentifier),e.type===or.Keyword){if(p(e.value))L(e,pr.UnexpectedReserved);else if(hr&&c(e.value))return A(e,pr.StrictReservedWord),void 0;L(e,pr.UnexpectedToken,e.value)}L(e,pr.UnexpectedToken,e.value)}function _(e){var t=S();(t.type!==or.Punctuator||t.value!==e)&&k(t)}function O(e){var t=S();(t.type!==or.Keyword||t.value!==e)&&k(t)}function U(e){var t=j();return t.type===or.Punctuator&&t.value===e}function B(e){var t=j();return t.type===or.Keyword&&t.value===e}function N(){var e=j(),t=e.value;return e.type!==or.Punctuator?!1:"="===t||"*="===t||"/="===t||"%="===t||"+="===t||"-="===t||"<<="===t||">>="===t||">>>="===t||"&="===t||"^="===t||"|="===t}function P(){var e,t;if(";"===fr[dr])return S(),void 0;if(t=gr,d(),gr===t){if(U(";"))return S(),void 0;e=j(),e.type===or.EOF||U("}")||k(e)}}function C(e){return e.type===ur.Identifier||e.type===ur.MemberExpression}function D(){var e=[];for(_("[");!U("]");)U(",")?(S(),e.push(null)):(e.push(lt()),U("]")||_(","));return _("]"),{type:ur.ArrayExpression,elements:e}}function F(e,t){var r,n;return r=hr,n=Dt(),t&&hr&&f(e[0].name)&&A(t,pr.StrictParamName),hr=r,{type:ur.FunctionExpression,id:null,params:e,defaults:[],body:n,rest:null,generator:!1,expression:!1}}function R(){var e=S();return e.type===or.StringLiteral||e.type===or.NumericLiteral?(hr&&e.octal&&A(e,pr.StrictOctalLiteral),Xt(e)):{type:ur.Identifier,name:e.value}}function T(){var e,t,r,n;return e=j(),e.type===or.Identifier?(r=R(),"get"!==e.value||U(":")?"set"!==e.value||U(":")?(_(":"),{type:ur.Property,key:r,value:lt(),kind:"init"}):(t=R(),_("("),e=j(),e.type!==or.Identifier?(_(")"),A(e,pr.UnexpectedToken,e.value),{type:ur.Property,key:t,value:F([]),kind:"set"}):(n=[ht()],_(")"),{type:ur.Property,key:t,value:F(n,e),kind:"set"})):(t=R(),_("("),_(")"),{type:ur.Property,key:t,value:F([]),kind:"get"})):e.type!==or.EOF&&e.type!==or.Punctuator?(t=R(),_(":"),{type:ur.Property,key:t,value:lt(),kind:"init"}):(k(e),void 0)}function V(){var e,t,r,n=[],i={},a=String;for(_("{");!U("}");)e=T(),t=e.key.type===ur.Identifier?e.key.name:a(e.key.value),r="init"===e.kind?lr.Data:"get"===e.kind?lr.Get:lr.Set,Object.prototype.hasOwnProperty.call(i,t)?(i[t]===lr.Data?hr&&r===lr.Data?A({},pr.StrictDuplicateProperty):r!==lr.Data&&A({},pr.AccessorDataProperty):r===lr.Data?A({},pr.AccessorDataProperty):i[t]&r&&A({},pr.AccessorGetSet),i[t]|=r):i[t]=r,n.push(e),U("}")||_(",");return _("}"),{type:ur.ObjectExpression,properties:n}}function M(){var e;return _("("),e=pt(),_(")"),e}function q(){var e=j(),t=e.type;if(t===or.Identifier)return{type:ur.Identifier,name:S().value};if(t===or.StringLiteral||t===or.NumericLiteral)return hr&&e.octal&&A(e,pr.StrictOctalLiteral),Xt(S());if(t===or.Keyword){if(B("this"))return S(),{type:ur.ThisExpression};if(B("function"))return Rt()}return t===or.BooleanLiteral?(S(),e.value="true"===e.value,Xt(e)):t===or.NullLiteral?(S(),e.value=null,Xt(e)):U("[")?D():U("{")?V():U("(")?M():U("/")||U("/=")?Xt(w()):k(S())}function G(){var e=[];if(_("("),!U(")"))for(;vr>dr&&(e.push(lt()),!U(")"));)_(",");return _(")"),e}function W(){var e=S();return x(e)||k(e),{type:ur.Identifier,name:e.value}}function H(){return _("."),W()}function z(){var e;return _("["),e=pt(),_("]"),e}function K(){var e;return O("new"),e={type:ur.NewExpression,callee:J(),arguments:[]},U("(")&&(e.arguments=G()),e}function X(){var e;for(e=B("new")?K():q();U(".")||U("[")||U("(");)e=U("(")?{type:ur.CallExpression,callee:e,arguments:G()}:U("[")?{type:ur.MemberExpression,computed:!0,object:e,property:z()}:{type:ur.MemberExpression,computed:!1,object:e,property:H()};return e}function J(){var e;for(e=B("new")?K():q();U(".")||U("[");)e=U("[")?{type:ur.MemberExpression,computed:!0,object:e,property:z()}:{type:ur.MemberExpression,computed:!1,object:e,property:H()};return e}function Y(){var e,t=X();return e=j(),e.type!==or.Punctuator?t:(!U("++")&&!U("--")||I()||(hr&&t.type===ur.Identifier&&f(t.name)&&A({},pr.StrictLHSPostfix),C(t)||A({},pr.InvalidLHSInAssignment),t={type:ur.UpdateExpression,operator:S().value,argument:t,prefix:!1}),t)}function Z(){var e,t;return e=j(),e.type!==or.Punctuator&&e.type!==or.Keyword?Y():U("++")||U("--")?(e=S(),t=Z(),hr&&t.type===ur.Identifier&&f(t.name)&&A({},pr.StrictLHSPrefix),C(t)||A({},pr.InvalidLHSInAssignment),t={type:ur.UpdateExpression,operator:e.value,argument:t,prefix:!0}):U("+")||U("-")||U("~")||U("!")?t={type:ur.UnaryExpression,operator:S().value,argument:Z(),prefix:!0}:B("delete")||B("void")||B("typeof")?(t={type:ur.UnaryExpression,operator:S().value,argument:Z(),prefix:!0},hr&&"delete"===t.operator&&t.argument.type===ur.Identifier&&A({},pr.StrictDelete),t):Y()}function $(){for(var e=Z();U("*")||U("/")||U("%");)e={type:ur.BinaryExpression,operator:S().value,left:e,right:Z()};return e}function Q(){for(var e=$();U("+")||U("-");)e={type:ur.BinaryExpression,operator:S().value,left:e,right:$()};return e}function et(){for(var e=Q();U("<<")||U(">>")||U(">>>");)e={type:ur.BinaryExpression,operator:S().value,left:e,right:Q()};return e}function tt(){var e,t;for(t=br.allowIn,br.allowIn=!0,e=et();U("<")||U(">")||U("<=")||U(">=")||t&&B("in")||B("instanceof");)e={type:ur.BinaryExpression,operator:S().value,left:e,right:et()};return br.allowIn=t,e}function rt(){for(var e=tt();U("==")||U("!=")||U("===")||U("!==");)e={type:ur.BinaryExpression,operator:S().value,left:e,right:tt()};return e}function nt(){for(var e=rt();U("&");)S(),e={type:ur.BinaryExpression,operator:"&",left:e,right:rt()};return e}function it(){for(var e=nt();U("^");)S(),e={type:ur.BinaryExpression,operator:"^",left:e,right:nt()};return e}function at(){for(var e=it();U("|");)S(),e={type:ur.BinaryExpression,operator:"|",left:e,right:it()};return e}function ot(){for(var e=at();U("&&");)S(),e={type:ur.LogicalExpression,operator:"&&",left:e,right:at()};return e}function st(){for(var e=ot();U("||");)S(),e={type:ur.LogicalExpression,operator:"||",left:e,right:ot()};return e}function ut(){var e,t,r;return e=st(),U("?")&&(S(),t=br.allowIn,br.allowIn=!0,r=lt(),br.allowIn=t,_(":"),e={type:ur.ConditionalExpression,test:e,consequent:r,alternate:lt()}),e}function lt(){var e,t;return e=j(),t=ut(),N()&&(C(t)||A({},pr.InvalidLHSInAssignment),hr&&t.type===ur.Identifier&&f(t.name)&&A(e,pr.StrictLHSAssignment),t={type:ur.AssignmentExpression,operator:S().value,left:t,right:lt()}),t}function pt(){var e=lt();if(U(","))for(e={type:ur.SequenceExpression,expressions:[e]};vr>dr&&U(",");)S(),e.expressions.push(lt());return e}function ct(){for(var e,t=[];vr>dr&&!U("}")&&(e=Tt(),void 0!==e);)t.push(e);return t}function ft(){var e;return _("{"),e=ct(),_("}"),{type:ur.BlockStatement,body:e}}function ht(){var e=S();return e.type!==or.Identifier&&k(e),{type:ur.Identifier,name:e.value}}function dt(e){var t=ht(),r=null;return hr&&f(t.name)&&A({},pr.StrictVarName),"const"===e?(_("="),r=lt()):U("=")&&(S(),r=lt()),{type:ur.VariableDeclarator,id:t,init:r}}function gt(e){var t=[];do{if(t.push(dt(e)),!U(","))break;S()}while(vr>dr);return t}function yt(){var e;return O("var"),e=gt(),P(),{type:ur.VariableDeclaration,declarations:e,kind:"var"}}function vt(e){var t;return O(e),t=gt(e),P(),{type:ur.VariableDeclaration,declarations:t,kind:e}}function mt(){return _(";"),{type:ur.EmptyStatement}}function bt(){var e=pt();return P(),{type:ur.ExpressionStatement,expression:e}}function wt(){var e,t,r;return O("if"),_("("),e=pt(),_(")"),t=Ct(),B("else")?(S(),r=Ct()):r=null,{type:ur.IfStatement,test:e,consequent:t,alternate:r}}function xt(){var e,t,r;return O("do"),r=br.inIteration,br.inIteration=!0,e=Ct(),br.inIteration=r,O("while"),_("("),t=pt(),_(")"),U(";")&&S(),{type:ur.DoWhileStatement,body:e,test:t}}function Et(){var e,t,r;return O("while"),_("("),e=pt(),_(")"),r=br.inIteration,br.inIteration=!0,t=Ct(),br.inIteration=r,{type:ur.WhileStatement,test:e,body:t}}function St(){var e=S();return{type:ur.VariableDeclaration,declarations:gt(),kind:e.value}}function jt(){var e,t,r,n,i,a,o;return e=t=r=null,O("for"),_("("),U(";")?S():(B("var")||B("let")?(br.allowIn=!1,e=St(),br.allowIn=!0,1===e.declarations.length&&B("in")&&(S(),n=e,i=pt(),e=null)):(br.allowIn=!1,e=pt(),br.allowIn=!0,B("in")&&(C(e)||A({},pr.InvalidLHSInForIn),S(),n=e,i=pt(),e=null)),n===void 0&&_(";")),n===void 0&&(U(";")||(t=pt()),_(";"),U(")")||(r=pt())),_(")"),o=br.inIteration,br.inIteration=!0,a=Ct(),br.inIteration=o,n===void 0?{type:ur.ForStatement,init:e,test:t,update:r,body:a}:{type:ur.ForInStatement,left:n,right:i,body:a,each:!1}}function It(){var e,t=null;return O("continue"),";"===fr[dr]?(S(),br.inIteration||L({},pr.IllegalContinue),{type:ur.ContinueStatement,label:null}):I()?(br.inIteration||L({},pr.IllegalContinue),{type:ur.ContinueStatement,label:null}):(e=j(),e.type===or.Identifier&&(t=ht(),Object.prototype.hasOwnProperty.call(br.labelSet,t.name)||L({},pr.UnknownLabel,t.name)),P(),null!==t||br.inIteration||L({},pr.IllegalContinue),{type:ur.ContinueStatement,label:t})}function Lt(){var e,t=null;return O("break"),";"===fr[dr]?(S(),br.inIteration||br.inSwitch||L({},pr.IllegalBreak),{type:ur.BreakStatement,label:null}):I()?(br.inIteration||br.inSwitch||L({},pr.IllegalBreak),{type:ur.BreakStatement,label:null}):(e=j(),e.type===or.Identifier&&(t=ht(),Object.prototype.hasOwnProperty.call(br.labelSet,t.name)||L({},pr.UnknownLabel,t.name)),P(),null!==t||br.inIteration||br.inSwitch||L({},pr.IllegalBreak),{type:ur.BreakStatement,label:t})}function At(){var e,t=null;return O("return"),br.inFunctionBody||A({},pr.IllegalReturn)," "===fr[dr]&&u(fr[dr+1])?(t=pt(),P(),{type:ur.ReturnStatement,argument:t}):I()?{type:ur.ReturnStatement,argument:null}:(U(";")||(e=j(),U("}")||e.type===or.EOF||(t=pt())),P(),{type:ur.ReturnStatement,argument:t})}function kt(){var e,t;return hr&&A({},pr.StrictModeWith),O("with"),_("("),e=pt(),_(")"),t=Ct(),{type:ur.WithStatement,object:e,body:t}}function _t(){var e,t,r=[];for(B("default")?(S(),e=null):(O("case"),e=pt()),_(":");vr>dr&&!(U("}")||B("default")||B("case"))&&(t=Ct(),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=pt(),_(")"),_("{"),t=[],U("}"))return S(),{type:ur.SwitchStatement,discriminant:e,cases:t};for(n=br.inSwitch,br.inSwitch=!0,i=!1;vr>dr&&!U("}");)r=_t(),null===r.test&&(i&&L({},pr.MultipleDefaultsInSwitch),i=!0),t.push(r);return br.inSwitch=n,_("}"),{type:ur.SwitchStatement,discriminant:e,cases:t}}function Ut(){var e;return O("throw"),I()&&L({},pr.NewlineAfterThrow),e=pt(),P(),{type:ur.ThrowStatement,argument:e}}function Bt(){var e;return O("catch"),_("("),U(")")&&k(j()),e=ht(),hr&&f(e.name)&&A({},pr.StrictCatchVariable),_(")"),{type:ur.CatchClause,param:e,body:ft()}}function Nt(){var e,t=[],r=null;return O("try"),e=ft(),B("catch")&&t.push(Bt()),B("finally")&&(S(),r=ft()),0!==t.length||r||L({},pr.NoCatchOrFinally),{type:ur.TryStatement,block:e,guardedHandlers:[],handlers:t,finalizer:r}}function Pt(){return O("debugger"),P(),{type:ur.DebuggerStatement}}function Ct(){var e,t,r=j();if(r.type===or.EOF&&k(r),r.type===or.Punctuator)switch(r.value){case";":return mt();case"{":return ft();case"(":return bt();default:}if(r.type===or.Keyword)switch(r.value){case"break":return Lt();case"continue":return It();case"debugger":return Pt();case"do":return xt();case"for":return jt();case"function":return Ft();case"if":return wt();case"return":return At();case"switch":return Ot();case"throw":return Ut();case"try":return Nt();case"var":return yt();case"while":return Et();case"with":return kt();default:}return e=pt(),e.type===ur.Identifier&&U(":")?(S(),Object.prototype.hasOwnProperty.call(br.labelSet,e.name)&&L({},pr.Redeclaration,"Label",e.name),br.labelSet[e.name]=!0,t=Ct(),delete br.labelSet[e.name],{type:ur.LabeledStatement,label:e,body:t}):(P(),{type:ur.ExpressionStatement,expression:e})}function Dt(){var e,t,n,i,a,o,s,u,l=[];for(_("{");vr>dr&&(t=j(),t.type===or.StringLiteral)&&(e=Tt(),l.push(e),e.expression.type===ur.Literal);)n=r(t.range[0]+1,t.range[1]-1),"use strict"===n?(hr=!0,i&&A(i,pr.StrictOctalLiteral)):!i&&t.octal&&(i=t);for(a=br.labelSet,o=br.inIteration,s=br.inSwitch,u=br.inFunctionBody,br.labelSet={},br.inIteration=!1,br.inSwitch=!1,br.inFunctionBody=!0;vr>dr&&!U("}")&&(e=Tt(),void 0!==e);)l.push(e);return _("}"),br.labelSet=a,br.inIteration=o,br.inSwitch=s,br.inFunctionBody=u,{type:ur.BlockStatement,body:l}}function Ft(){var e,t,r,n,i,a,o,s,u,l=[];if(O("function"),n=j(),e=ht(),hr?f(n.value)&&A(n,pr.StrictFunctionName):f(n.value)?(a=n,o=pr.StrictFunctionName):c(n.value)&&(a=n,o=pr.StrictReservedWord),_("("),!U(")"))for(u={};vr>dr&&(n=j(),t=ht(),hr?(f(n.value)&&(i=n,o=pr.StrictParamName),Object.prototype.hasOwnProperty.call(u,n.value)&&(i=n,o=pr.StrictParamDupe)):a||(f(n.value)?(a=n,o=pr.StrictParamName):c(n.value)?(a=n,o=pr.StrictReservedWord):Object.prototype.hasOwnProperty.call(u,n.value)&&(a=n,o=pr.StrictParamDupe)),l.push(t),u[t.name]=!0,!U(")"));)_(",");return _(")"),s=hr,r=Dt(),hr&&a&&L(a,o),hr&&i&&A(i,o),hr=s,{type:ur.FunctionDeclaration,id:e,params:l,defaults:[],body:r,rest:null,generator:!1,expression:!1}}function Rt(){var e,t,r,n,i,a,o,s,u=null,l=[];if(O("function"),U("(")||(e=j(),u=ht(),hr?f(e.value)&&A(e,pr.StrictFunctionName):f(e.value)?(r=e,n=pr.StrictFunctionName):c(e.value)&&(r=e,n=pr.StrictReservedWord)),_("("),!U(")"))for(s={};vr>dr&&(e=j(),i=ht(),hr?(f(e.value)&&(t=e,n=pr.StrictParamName),Object.prototype.hasOwnProperty.call(s,e.value)&&(t=e,n=pr.StrictParamDupe)):r||(f(e.value)?(r=e,n=pr.StrictParamName):c(e.value)?(r=e,n=pr.StrictReservedWord):Object.prototype.hasOwnProperty.call(s,e.value)&&(r=e,n=pr.StrictParamDupe)),l.push(i),s[i.name]=!0,!U(")"));)_(",");return _(")"),o=hr,a=Dt(),hr&&r&&L(r,n),hr&&t&&A(t,n),hr=o,{type:ur.FunctionExpression,id:u,params:l,defaults:[],body:a,rest:null,generator:!1,expression:!1}}function Tt(){var e=j();if(e.type===or.Keyword)switch(e.value){case"const":case"let":return vt(e.value);case"function":return Ft();default:return Ct()}return e.type!==or.EOF?Ct():void 0}function Vt(){for(var e,t,n,i,a=[];vr>dr&&(t=j(),t.type===or.StringLiteral)&&(e=Tt(),a.push(e),e.expression.type===ur.Literal);)n=r(t.range[0]+1,t.range[1]-1),"use strict"===n?(hr=!0,i&&A(i,pr.StrictOctalLiteral)):!i&&t.octal&&(i=t);for(;vr>dr&&(e=Tt(),void 0!==e);)a.push(e);return a}function Mt(){var e;return hr=!1,e={type:ur.Program,body:Vt()}}function qt(e,r,n,i,a){t("number"==typeof n,"Comment must have valid position"),wr.comments.length>0&&wr.comments[wr.comments.length-1].range[1]>n||wr.comments.push({type:e,value:r,range:[n,i],loc:a})}function Gt(){var e,t,r,n,i,a;for(e="",i=!1,a=!1;vr>dr;)if(t=fr[dr],a)t=fr[dr++],s(t)?(r.end={line:gr,column:dr-yr-1},a=!1,qt("Line",e,n,dr-1,r),"\r"===t&&"\n"===fr[dr]&&++dr,++gr,yr=dr,e=""):dr>=vr?(a=!1,e+=t,r.end={line:gr,column:vr-yr},qt("Line",e,n,vr,r)):e+=t;else if(i)s(t)?("\r"===t&&"\n"===fr[dr+1]?(++dr,e+="\r\n"):e+=t,++gr,++dr,yr=dr,dr>=vr&&L({},pr.UnexpectedToken,"ILLEGAL")):(t=fr[dr++],dr>=vr&&L({},pr.UnexpectedToken,"ILLEGAL"),e+=t,"*"===t&&(t=fr[dr],"/"===t&&(e=e.substr(0,e.length-1),i=!1,++dr,r.end={line:gr,column:dr-yr},qt("Block",e,n,dr,r),e="")));else if("/"===t)if(t=fr[dr+1],"/"===t)r={start:{line:gr,column:dr-yr}},n=dr,dr+=2,a=!0,dr>=vr&&(r.end={line:gr,column:dr-yr},a=!1,qt("Line",e,n,dr,r));else{if("*"!==t)break;n=dr,dr+=2,i=!0,r={start:{line:gr,column:dr-yr-2}},dr>=vr&&L({},pr.UnexpectedToken,"ILLEGAL")}else if(o(t))++dr;else{if(!s(t))break;++dr,"\r"===t&&"\n"===fr[dr]&&++dr,++gr,yr=dr}}function Wt(){var e,t,r,n=[];for(e=0;wr.comments.length>e;++e)t=wr.comments[e],r={type:t.type,value:t.value},wr.range&&(r.range=t.range),wr.loc&&(r.loc=t.loc),n.push(r);wr.comments=n}function Ht(){var e,t,n,i,a;return d(),e=dr,t={start:{line:gr,column:dr-yr}},n=wr.advance(),t.end={line:gr,column:dr-yr},n.type!==or.EOF&&(i=[n.range[0],n.range[1]],a=r(n.range[0],n.range[1]),wr.tokens.push({type:sr[n.type],value:a,range:i,loc:t})),n}function zt(){var e,t,r,n;return d(),e=dr,t={start:{line:gr,column:dr-yr}},r=wr.scanRegExp(),t.end={line:gr,column:dr-yr},wr.tokens.length>0&&(n=wr.tokens[wr.tokens.length-1],n.range[0]===e&&"Punctuator"===n.type&&("/"===n.value||"/="===n.value)&&wr.tokens.pop()),wr.tokens.push({type:"RegularExpression",value:r.literal,range:[e,dr],loc:t}),r}function Kt(){var e,t,r,n=[];for(e=0;wr.tokens.length>e;++e)t=wr.tokens[e],r={type:t.type,value:t.value},wr.range&&(r.range=t.range),wr.loc&&(r.loc=t.loc),n.push(r);wr.tokens=n}function Xt(e){return{type:ur.Literal,value:e.value}}function Jt(e){return{type:ur.Literal,value:e.value,raw:r(e.range[0],e.range[1])}}function Yt(){var e={};return e.range=[dr,dr],e.loc={start:{line:gr,column:dr-yr},end:{line:gr,column:dr-yr}},e.end=function(){this.range[1]=dr,this.loc.end.line=gr,this.loc.end.column=dr-yr},e.applyGroup=function(e){wr.range&&(e.groupRange=[this.range[0],this.range[1]]),wr.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){wr.range&&(e.range=[this.range[0],this.range[1]]),wr.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 Zt(){var e,t;return d(),e=Yt(),_("("),t=pt(),_(")"),e.end(),e.applyGroup(t),t}function $t(){var e,t;for(d(),e=Yt(),t=B("new")?K():q();U(".")||U("[");)U("[")?(t={type:ur.MemberExpression,computed:!0,object:t,property:z()},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=Yt(),t=B("new")?K():q();U(".")||U("[")||U("(");)U("(")?(t={type:ur.CallExpression,callee:t,arguments:G()},e.end(),e.apply(t)):U("[")?(t={type:ur.MemberExpression,computed:!0,object:t,property:z()},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 a,o;n(r.left)&&i(r.left),n(r.right)&&i(r.right),e&&(r.left.groupRange||r.right.groupRange?(a=r.left.groupRange?r.left.groupRange[0]:r.left.range[0],o=r.right.groupRange?r.right.groupRange[1]:r.right.range[1],r.range=[a,o]):r.range===void 0&&(a=r.left.range[0],o=r.right.range[1],r.range=[a,o])),t&&(r.left.groupLoc||r.right.groupLoc?(a=r.left.groupLoc?r.left.groupLoc.start:r.left.loc.start,o=r.right.groupLoc?r.right.groupLoc.end:r.right.loc.end,r.loc={start:a,end:o}):r.loc===void 0&&(r.loc={start:r.left.loc.start,end:r.right.loc.end}))}return function(){var a,o;return d(),a=Yt(),o=r.apply(null,arguments),a.end(),e&&o.range===void 0&&a.apply(o),t&&o.loc===void 0&&a.apply(o),n(o)&&i(o),o}}}function rr(){var e;wr.comments&&(wr.skipComment=d,d=Gt),wr.raw&&(wr.createLiteral=Xt,Xt=Jt),(wr.range||wr.loc)&&(wr.parseGroupExpression=M,wr.parseLeftHandSideExpression=J,wr.parseLeftHandSideExpressionAllowCall=X,M=Zt,J=$t,X=Qt,e=tr(wr.range,wr.loc),wr.parseAdditiveExpression=Q,wr.parseAssignmentExpression=lt,wr.parseBitwiseANDExpression=nt,wr.parseBitwiseORExpression=at,wr.parseBitwiseXORExpression=it,wr.parseBlock=ft,wr.parseFunctionSourceElements=Dt,wr.parseCatchClause=Bt,wr.parseComputedMember=z,wr.parseConditionalExpression=ut,wr.parseConstLetDeclaration=vt,wr.parseEqualityExpression=rt,wr.parseExpression=pt,wr.parseForVariableDeclaration=St,wr.parseFunctionDeclaration=Ft,wr.parseFunctionExpression=Rt,wr.parseLogicalANDExpression=ot,wr.parseLogicalORExpression=st,wr.parseMultiplicativeExpression=$,wr.parseNewExpression=K,wr.parseNonComputedProperty=W,wr.parseObjectProperty=T,wr.parseObjectPropertyKey=R,wr.parsePostfixExpression=Y,wr.parsePrimaryExpression=q,wr.parseProgram=Mt,wr.parsePropertyFunction=F,wr.parseRelationalExpression=tt,wr.parseStatement=Ct,wr.parseShiftExpression=et,wr.parseSwitchCase=_t,wr.parseUnaryExpression=Z,wr.parseVariableDeclaration=dt,wr.parseVariableIdentifier=ht,Q=e(wr.parseAdditiveExpression),lt=e(wr.parseAssignmentExpression),nt=e(wr.parseBitwiseANDExpression),at=e(wr.parseBitwiseORExpression),it=e(wr.parseBitwiseXORExpression),ft=e(wr.parseBlock),Dt=e(wr.parseFunctionSourceElements),Bt=e(wr.parseCatchClause),z=e(wr.parseComputedMember),ut=e(wr.parseConditionalExpression),vt=e(wr.parseConstLetDeclaration),rt=e(wr.parseEqualityExpression),pt=e(wr.parseExpression),St=e(wr.parseForVariableDeclaration),Ft=e(wr.parseFunctionDeclaration),Rt=e(wr.parseFunctionExpression),J=e(J),ot=e(wr.parseLogicalANDExpression),st=e(wr.parseLogicalORExpression),$=e(wr.parseMultiplicativeExpression),K=e(wr.parseNewExpression),W=e(wr.parseNonComputedProperty),T=e(wr.parseObjectProperty),R=e(wr.parseObjectPropertyKey),Y=e(wr.parsePostfixExpression),q=e(wr.parsePrimaryExpression),Mt=e(wr.parseProgram),F=e(wr.parsePropertyFunction),tt=e(wr.parseRelationalExpression),Ct=e(wr.parseStatement),et=e(wr.parseShiftExpression),_t=e(wr.parseSwitchCase),Z=e(wr.parseUnaryExpression),dt=e(wr.parseVariableDeclaration),ht=e(wr.parseVariableIdentifier)),wr.tokens!==void 0&&(wr.advance=E,wr.scanRegExp=w,E=Ht,w=zt)}function nr(){"function"==typeof wr.skipComment&&(d=wr.skipComment),wr.raw&&(Xt=wr.createLiteral),(wr.range||wr.loc)&&(Q=wr.parseAdditiveExpression,lt=wr.parseAssignmentExpression,nt=wr.parseBitwiseANDExpression,at=wr.parseBitwiseORExpression,it=wr.parseBitwiseXORExpression,ft=wr.parseBlock,Dt=wr.parseFunctionSourceElements,Bt=wr.parseCatchClause,z=wr.parseComputedMember,ut=wr.parseConditionalExpression,vt=wr.parseConstLetDeclaration,rt=wr.parseEqualityExpression,pt=wr.parseExpression,St=wr.parseForVariableDeclaration,Ft=wr.parseFunctionDeclaration,Rt=wr.parseFunctionExpression,M=wr.parseGroupExpression,J=wr.parseLeftHandSideExpression,X=wr.parseLeftHandSideExpressionAllowCall,ot=wr.parseLogicalANDExpression,st=wr.parseLogicalORExpression,$=wr.parseMultiplicativeExpression,K=wr.parseNewExpression,W=wr.parseNonComputedProperty,T=wr.parseObjectProperty,R=wr.parseObjectPropertyKey,q=wr.parsePrimaryExpression,Y=wr.parsePostfixExpression,Mt=wr.parseProgram,F=wr.parsePropertyFunction,tt=wr.parseRelationalExpression,Ct=wr.parseStatement,et=wr.parseShiftExpression,_t=wr.parseSwitchCase,Z=wr.parseUnaryExpression,dt=wr.parseVariableDeclaration,ht=wr.parseVariableIdentifier),"function"==typeof wr.scanRegExp&&(E=wr.advance,w=wr.scanRegExp) | |
}function ir(e){var t,r=e.length,n=[];for(t=0;r>t;++t)n[t]=e.charAt(t);return n}function ar(e,t){var r,n;n=String,"string"==typeof e||e instanceof String||(e=n(e)),fr=e,dr=0,gr=fr.length>0?1:0,yr=0,vr=fr.length,mr=null,br={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1},wr={},t!==void 0&&(wr.range="boolean"==typeof t.range&&t.range,wr.loc="boolean"==typeof t.loc&&t.loc,wr.raw="boolean"==typeof t.raw&&t.raw,"boolean"==typeof t.tokens&&t.tokens&&(wr.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(wr.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(wr.errors=[])),vr>0&&fr[0]===void 0&&(e instanceof String&&(fr=e.valueOf()),fr[0]===void 0&&(fr=ir(e))),rr();try{r=Mt(),wr.comments!==void 0&&(Wt(),r.comments=wr.comments),wr.tokens!==void 0&&(Kt(),r.tokens=wr.tokens),wr.errors!==void 0&&(r.errors=wr.errors),(wr.range||wr.loc)&&(r.body=er(r.body))}catch(i){throw i}finally{nr(),wr={}}return r}var or,sr,ur,lr,pr,cr,fr,hr,dr,gr,yr,vr,mr,br,wr;or={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8},sr={},sr[or.BooleanLiteral]="Boolean",sr[or.EOF]="<end>",sr[or.Identifier]="Identifier",sr[or.Keyword]="Keyword",sr[or.NullLiteral]="Null",sr[or.NumericLiteral]="Numeric",sr[or.Punctuator]="Punctuator",sr[or.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"},lr={Data:1,Get:2,Set:4},pr={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"},cr={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=ar,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}()})},{}],9:[function(e,t){t.exports=e(6)},{}]},{},[]);var ndarray=require("ndarray"),cwise=require("cwise"),s=4,arr0=new ndarray(new Uint8Array(s*s*s),[s,s,s]),arr1=new ndarray(new Uint8Array(2*2*(s*s*s/2)),[s/2,s/2,s/2]);arr0.set(1,1,1,1);var lod=cwise({args:["array","array","array","array","array","array","array","array","array"],body:function(e,t,r,n,i,a,o,s,u){console.log(t,r,n,i,a,o,s,u),e=t||r||n||i||a||o||s||u}}),arr0_0=arr0.step(2,2,2),arr0_1=arr0.lo(1,0,0).step(2,2,2),arr0_2=arr0.lo(0,1,0).step(2,2,2),arr0_3=arr0.lo(1,1,0).step(2,2,2),arr0_4=arr0.lo(0,0,1).step(2,2,2),arr0_5=arr0.lo(1,0,1).step(2,2,2),arr0_6=arr0.lo(0,1,1).step(2,2,2),arr0_7=arr0.lo(1,1,1).step(2,2,2);lod(arr1,arr0_0,arr0_1,arr0_2,arr0_3,arr0_4,arr0_5,arr0_6,arr0_7);var el=document.createElement("div");document.body.appendChild(el),el.style["font-family"]="Consolas",el.innerHTML="arr1.get(0,0,0): "+arr1.get(0,0,0)+"<br>arr1.get(1,1,1): "+arr1.get(1,1,1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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