6 lines
143 KiB
JavaScript
Raw Normal View History

(function(e,t){'object'==typeof exports&&'object'==typeof module?module.exports=t(function(){try{return require('assemblyscript')}catch(t){}}(),require('./assemblyscript')):'function'==typeof define&&define.amd?define(['assemblyscript'],t):'object'==typeof exports?exports.asc=t(function(){try{return require('assemblyscript')}catch(t){}}(),require('./assemblyscript')):e.asc=t(e._,e[void 0])})('undefined'==typeof self?this:self,function(t,e){var s=Math.floor,r=Math.pow,o=Math.min;return function(e){function t(s){if(i[s])return i[s].exports;var r=i[s]={i:s,l:!1,exports:{}};return e[s].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,s){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:s})},t.n=function(e){var i=e&&e.__esModule?function(){return e['default']}:function(){return e};return t.d(i,'a',i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p='',t(t.s=3)}([function(e,t,i){t.nextTick=function(e){setTimeout(e,0)},t.platform=t.arch=t.execPath=t.title='browser',t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(){throw new Error('No such module. (Possibly not yet loaded)')},function(){var e,s='/';t.cwd=function(){return s},t.chdir=function(t){e||(e=i(1)),s=e.resolve(t,s)}}(),t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},function(e,t,i){(function(e){function s(e,t){for(var s,r=0,o=e.length-1;0<=o;o--)s=e[o],'.'===s?e.splice(o,1):'..'===s?(e.splice(o,1),r++):r&&(e.splice(o,1),r--);if(t)for(;r--;r)e.unshift('..');return e}function r(e,t){if(e.filter)return e.filter(t);for(var s=[],r=0;r<e.length;r++)t(e[r],r,e)&&s.push(e[r]);return s}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,n=function(e){return i.exec(e).slice(1)};t.resolve=function(){for(var t,o='',n=!1,a=arguments.length-1;-1<=a&&!n;a--){if(t=0<=a?arguments[a]:e.cwd(),'string'!=typeof t)throw new TypeError('Arguments to path.resolve must be strings');else if(!t)continue;o=t+'/'+o,n='/'===t.charAt(0)}return o=s(r(o.split('/'),function(e){return!!e}),!n).join('/'),(n?'/':'')+o||'.'},t.normalize=function(e){var i=t.isAbsolute(e),o='/'===a(e,-1);return e=s(r(e.split('/'),function(e){return!!e}),!i).join('/'),e||i||(e='.'),e&&o&&(e+='/'),(i?'/':'')+e},t.isAbsolute=function(e){return'/'===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,function(e){if('string'!=typeof e)throw new TypeError('Arguments to path.join must be strings');return e}).join('/'))},t.relative=function(e,s){function r(e){for(var t=0;t<e.length&&''===e[t];t++);for(var i=e.length-1;0<=i&&''===e[i];i--);return t>i?[]:e.slice(t,i-t+1)}e=t.resolve(e).substr(1),s=t.resolve(s).substr(1);for(var n=r(e.split('/')),a=r(s.split('/')),l=o(n.length,a.length),u=l,c=0;c<l;c++)if(n[c]!==a[c]){u=c;break}for(var i=[],c=u;c<n.length;c++)i.push('..');return i=i.concat(a.slice(u)),i.join('/')},t.sep='/',t.delimiter=':',t.dirname=function(e){var t=n(e),i=t[0],s=t[1];return i||s?(s&&(s=s.substr(0,s.length-1)),i+s):'.'},t.basename=function(e,t){var i=n(e)[2];return t&&i.substr(-1*t.length)===t&&(i=i.substr(0,i.length-t.length)),i},t.extname=function(e){return n(e)[3]};var a=function(e,t,i){return e.substr(t,i)}}).call(t,i(0))},function(e){var t=function(){return this}();try{t=t||Function('return this')()||(1,eval)('this')}catch(i){'object'==typeof window&&(t=window)}e.exports=t},function(e,t,i){e.exports=i(4)},function(e,t,i){(function(e,s){function r(e){const s={};return Object.keys(t.options).forEach((e)=>{const i=t.options[e];i.aliases&&((s.alias||(s.alias={}))[e]=i.aliases),void 0!==i.default&&((s.default||(s.default={}))[e]=i.default),'string'===i.type?(s.string||(s.string=[])).push(e):'boolean'===i.type&&(s.boolean||(s.boolean=[])).push(e)}),i(14)(e,s)}function o(e,t){for(var i,s=!1;null!=(i=f.nextDiagnostic(e));)t.write(f.formatDiagnostic(i,t.isTTY,!0)+d.EOL+d.EOL),f.isError(i)&&(s=!0);return s}function n(){return{readTime:0,readCount:0,writeTime:0,writeCount:0,parseTime:0,parseCount:0,compileTime:0,com
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=e.TYPED_ARRAY_SUPPORT===void 0?function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&'function'==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}():e.TYPED_ARRAY_SUPPORT,t.kMaxLength=n(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,i){return u(null,e,t,i)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,'undefined'!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,i){return d(null,e,t,i)},l.allocUnsafe=function(e){return f(null,e)},l.allocUnsafeSlow=function(e){return f(null,e)},l.isBuffer=function(e){return!!(null!=e&&e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('Arguments must be Buffers');if(e===t)return 0;for(var s=e.length,r=t.length,n=0,i=o(s,r);n<i;++n)if(e[n]!==t[n]){s=e[n],r=t[n];break}return s<r?-1:r<s?1:0},l.isEncoding=function(e){switch((e+'').toLowerCase()){case'hex':case'utf8':case'utf-8':case'ascii':case'latin1':case'binary':case'base64':case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return!0;default:return!1;}},l.concat=function(e,t){if(!te(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var s;if(t===void 0)for(t=0,s=0;s<e.length;++s)t+=e[s].length;var i=l.allocUnsafe(t),r=0;for(s=0;s<e.length;++s){var o=e[s];if(!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,r),r+=o.length}return i},l.byteLength=y,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(0!=e%2)throw new RangeError('Buffer size must be a multiple of 16-bits');for(var t=0;t<e;t+=2)v(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(0!=e%4)throw new RangeError('Buffer size must be a multiple of 32-bits');for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(0!=e%8)throw new RangeError('Buffer size must be a multiple of 64-bits');for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0==e?'':0===arguments.length?I(this,0,e):_.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError('Argument must be a Buffer');return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e='',i=t.INSPECT_MAX_BYTES;return 0<this.length&&(e=this.toString('hex',0,i).match(/.{2}/g).join(' '),this.length>i&&(e+=' ... ')),'<Buffer '+e+'>'},l.prototype.compare=function(e,t,s,r,n){if(!l.isBuffer(e))throw new TypeError('Argument must be a Buffer');if(void 0===t&&(t=0),void 0===s&&(s=e?e.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),0>t||s>e.length||0>r||n>this.length)throw new RangeError('out of range index');if(r>=n&&t>=s)return 0;if(r>=n)return-1;if(t>=s)return 1;if(t>>>=0,s>>>=0,r>>>=0,n>>>=0,this===e)return 0;for(var a=n-r,u=s-t,c=o(a,u),d=this.slice(r,n),f=e.slice(t,s),h=0;h<c;++h)if(d[h]!==f[h]){a=d[h],u=f[h];break}return a<u?-1:u<a?1:0},l.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},l.prototype.indexOf=function(e,t,i){return T(this,e,t,i,!0)},l.prototype.lastIndexOf=function(e,t,i){return T(this,e,t,i,!1)},l.prototype.write=function(e,t,i,s){if(void 0===t)s='utf8',i=this.length,t=0;else if(void 0===i&&'string'==typeof t)s=t,i=this.length,t=0;else if(isFinite(t))t|=0,isFinite(i)?(i|=0,void 0===s&&(s='utf8')):(s=i,i=void 0);else throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');var r=this.length-t;if((void 0===i||i>r)&&(i=r),0<e.length&&(0>i||0>t)||t>this.length)throw new RangeError('Attempt to write outside buffer bounds');s||(s='utf8');for(var o=!1;;)switch(s){case'hex':return E(this,e,t,i);case'ut