add AMD support for browsers, closes #23
This commit is contained in:
parent
bb81e8d380
commit
e7b02406fd
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,4 +1,7 @@
|
||||
node_modules
|
||||
node_modules/
|
||||
amd-test/browser-source-map-support.js
|
||||
amd-test/script.js
|
||||
amd-test/script.map
|
||||
browserify-test/compiled.js
|
||||
browserify-test/script.js
|
||||
browserify-test/script.map
|
||||
|
13
README.md
13
README.md
@ -19,9 +19,18 @@ The path should either be absolute or relative to the compiled file.
|
||||
|
||||
This library also works in Chrome. While the DevTools console already supports source maps, the V8 engine doesn't and `Error.prototype.stack` will be incorrect without this library. Everything will just work if you deploy your source files using [browserify](http://browserify.org/). Just make sure to pass the `--debug` flag to the browserify command so your source maps are included in the bundled code.
|
||||
|
||||
This library also works if you use another build process or just include the source files directly. In this case, include the file `source-map-support.browser.js` in your page. It contains the whole library already bundled for the browser using browserify.
|
||||
This library also works if you use another build process or just include the source files directly. In this case, include the file `browser-source-map-support.js` in your page and call `sourceMapSupport.install()`. It contains the whole library already bundled for the browser using browserify.
|
||||
|
||||
<script src="source-map-support.browser.js"></script>
|
||||
<script src="browser-source-map-support.js"></script>
|
||||
<script>sourceMapSupport.install();</script>
|
||||
|
||||
This library also works if you use AMD (Asynchronous Module Definition), which is used in tools like [RequireJS](http://requirejs.org/). Just list `browser-source-map-support` as a dependency:
|
||||
|
||||
<script>
|
||||
define(['browser-source-map-support'], function(sourceMapSupport) {
|
||||
sourceMapSupport.install();
|
||||
});
|
||||
</script>
|
||||
|
||||
## Options
|
||||
|
||||
|
6
amd-test/index.html
Normal file
6
amd-test/index.html
Normal file
@ -0,0 +1,6 @@
|
||||
<p>
|
||||
Make sure to run build.js.
|
||||
This test should say either "Test failed" or "Test passed":
|
||||
</p>
|
||||
<script src="require.js"></script>
|
||||
<script>require(['script']);</script>
|
36
amd-test/require.js
Normal file
36
amd-test/require.js
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
RequireJS 2.1.9 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
|
||||
Available via the MIT or new BSD license.
|
||||
see: http://github.com/jrburke/requirejs for details
|
||||
*/
|
||||
var requirejs,require,define;
|
||||
(function(Z){function H(b){return"[object Function]"===L.call(b)}function I(b){return"[object Array]"===L.call(b)}function y(b,c){if(b){var e;for(e=0;e<b.length&&(!b[e]||!c(b[e],e,b));e+=1);}}function M(b,c){if(b){var e;for(e=b.length-1;-1<e&&(!b[e]||!c(b[e],e,b));e-=1);}}function t(b,c){return ga.call(b,c)}function l(b,c){return t(b,c)&&b[c]}function F(b,c){for(var e in b)if(t(b,e)&&c(b[e],e))break}function Q(b,c,e,h){c&&F(c,function(c,j){if(e||!t(b,j))h&&"string"!==typeof c?(b[j]||(b[j]={}),Q(b[j],
|
||||
c,e,h)):b[j]=c});return b}function u(b,c){return function(){return c.apply(b,arguments)}}function aa(b){throw b;}function ba(b){if(!b)return b;var c=Z;y(b.split("."),function(b){c=c[b]});return c}function A(b,c,e,h){c=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=h;e&&(c.originalError=e);return c}function ha(b){function c(a,f,b){var d,m,c,g,e,h,j,i=f&&f.split("/");d=i;var n=k.map,p=n&&n["*"];if(a&&"."===a.charAt(0))if(f){d=l(k.pkgs,f)?i=[f]:i.slice(0,i.length-
|
||||
1);f=a=d.concat(a.split("/"));for(d=0;f[d];d+=1)if(m=f[d],"."===m)f.splice(d,1),d-=1;else if(".."===m)if(1===d&&(".."===f[2]||".."===f[0]))break;else 0<d&&(f.splice(d-1,2),d-=2);d=l(k.pkgs,f=a[0]);a=a.join("/");d&&a===f+"/"+d.main&&(a=f)}else 0===a.indexOf("./")&&(a=a.substring(2));if(b&&n&&(i||p)){f=a.split("/");for(d=f.length;0<d;d-=1){c=f.slice(0,d).join("/");if(i)for(m=i.length;0<m;m-=1)if(b=l(n,i.slice(0,m).join("/")))if(b=l(b,c)){g=b;e=d;break}if(g)break;!h&&(p&&l(p,c))&&(h=l(p,c),j=d)}!g&&
|
||||
h&&(g=h,e=j);g&&(f.splice(0,e,g),a=f.join("/"))}return a}function e(a){z&&y(document.getElementsByTagName("script"),function(f){if(f.getAttribute("data-requiremodule")===a&&f.getAttribute("data-requirecontext")===i.contextName)return f.parentNode.removeChild(f),!0})}function h(a){var f=l(k.paths,a);if(f&&I(f)&&1<f.length)return f.shift(),i.require.undef(a),i.require([a]),!0}function $(a){var f,b=a?a.indexOf("!"):-1;-1<b&&(f=a.substring(0,b),a=a.substring(b+1,a.length));return[f,a]}function n(a,f,
|
||||
b,d){var m,B,g=null,e=f?f.name:null,h=a,j=!0,k="";a||(j=!1,a="_@r"+(L+=1));a=$(a);g=a[0];a=a[1];g&&(g=c(g,e,d),B=l(r,g));a&&(g?k=B&&B.normalize?B.normalize(a,function(a){return c(a,e,d)}):c(a,e,d):(k=c(a,e,d),a=$(k),g=a[0],k=a[1],b=!0,m=i.nameToUrl(k)));b=g&&!B&&!b?"_unnormalized"+(M+=1):"";return{prefix:g,name:k,parentMap:f,unnormalized:!!b,url:m,originalName:h,isDefine:j,id:(g?g+"!"+k:k)+b}}function q(a){var f=a.id,b=l(p,f);b||(b=p[f]=new i.Module(a));return b}function s(a,f,b){var d=a.id,m=l(p,
|
||||
d);if(t(r,d)&&(!m||m.defineEmitComplete))"defined"===f&&b(r[d]);else if(m=q(a),m.error&&"error"===f)b(m.error);else m.on(f,b)}function v(a,f){var b=a.requireModules,d=!1;if(f)f(a);else if(y(b,function(f){if(f=l(p,f))f.error=a,f.events.error&&(d=!0,f.emit("error",a))}),!d)j.onError(a)}function w(){R.length&&(ia.apply(G,[G.length-1,0].concat(R)),R=[])}function x(a){delete p[a];delete T[a]}function E(a,f,b){var d=a.map.id;a.error?a.emit("error",a.error):(f[d]=!0,y(a.depMaps,function(d,c){var g=d.id,
|
||||
e=l(p,g);e&&(!a.depMatched[c]&&!b[g])&&(l(f,g)?(a.defineDep(c,r[g]),a.check()):E(e,f,b))}),b[d]=!0)}function C(){var a,f,b,d,m=(b=1E3*k.waitSeconds)&&i.startTime+b<(new Date).getTime(),c=[],g=[],j=!1,l=!0;if(!U){U=!0;F(T,function(b){a=b.map;f=a.id;if(b.enabled&&(a.isDefine||g.push(b),!b.error))if(!b.inited&&m)h(f)?j=d=!0:(c.push(f),e(f));else if(!b.inited&&(b.fetched&&a.isDefine)&&(j=!0,!a.prefix))return l=!1});if(m&&c.length)return b=A("timeout","Load timeout for modules: "+c,null,c),b.contextName=
|
||||
i.contextName,v(b);l&&y(g,function(a){E(a,{},{})});if((!m||d)&&j)if((z||da)&&!V)V=setTimeout(function(){V=0;C()},50);U=!1}}function D(a){t(r,a[0])||q(n(a[0],null,!0)).init(a[1],a[2])}function J(a){var a=a.currentTarget||a.srcElement,b=i.onScriptLoad;a.detachEvent&&!W?a.detachEvent("onreadystatechange",b):a.removeEventListener("load",b,!1);b=i.onScriptError;(!a.detachEvent||W)&&a.removeEventListener("error",b,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}function K(){var a;for(w();G.length;){a=
|
||||
G.shift();if(null===a[0])return v(A("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));D(a)}}var U,X,i,N,V,k={waitSeconds:7,baseUrl:"./",paths:{},pkgs:{},shim:{},config:{}},p={},T={},Y={},G=[],r={},S={},L=1,M=1;N={require:function(a){return a.require?a.require:a.require=i.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?a.exports:a.exports=r[a.map.id]={}},module:function(a){return a.module?a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){var b=
|
||||
l(k.pkgs,a.map.id);return(b?l(k.config,a.map.id+"/"+b.main):l(k.config,a.map.id))||{}},exports:r[a.map.id]}}};X=function(a){this.events=l(Y,a.id)||{};this.map=a;this.shim=l(k.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};X.prototype={init:function(a,b,c,d){d=d||{};if(!this.inited){this.factory=b;if(c)this.on("error",c);else this.events.error&&(c=u(this,function(a){this.emit("error",a)}));this.depMaps=a&&a.slice(0);this.errback=c;this.inited=!0;
|
||||
this.ignore=d.ignore;d.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0;i.startTime=(new Date).getTime();var a=this.map;if(this.shim)i.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],u(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix?this.callPlugin():this.load()}},load:function(){var a=
|
||||
this.map.url;S[a]||(S[a]=!0,i.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id;b=this.depExports;var d=this.exports,m=this.factory;if(this.inited)if(this.error)this.emit("error",this.error);else{if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(H(m)){if(this.events.error&&this.map.isDefine||j.onError!==aa)try{d=i.execCb(c,m,b,d)}catch(e){a=e}else d=i.execCb(c,m,b,d);this.map.isDefine&&((b=this.module)&&void 0!==b.exports&&b.exports!==
|
||||
this.exports?d=b.exports:void 0===d&&this.usingExports&&(d=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",v(this.error=a)}else d=m;this.exports=d;if(this.map.isDefine&&!this.ignore&&(r[c]=d,j.onResourceLoad))j.onResourceLoad(i,this.map,this.depMaps);x(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=
|
||||
!0)}}else this.fetch()}},callPlugin:function(){var a=this.map,b=a.id,e=n(a.prefix);this.depMaps.push(e);s(e,"defined",u(this,function(d){var m,e;e=this.map.name;var g=this.map.parentMap?this.map.parentMap.name:null,h=i.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(d.normalize&&(e=d.normalize(e,function(a){return c(a,g,!0)})||""),d=n(a.prefix+"!"+e,this.map.parentMap),s(d,"defined",u(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),
|
||||
e=l(p,d.id)){this.depMaps.push(d);if(this.events.error)e.on("error",u(this,function(a){this.emit("error",a)}));e.enable()}}else m=u(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),m.error=u(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];F(p,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&x(a.map.id)});v(a)}),m.fromText=u(this,function(d,c){var e=a.name,g=n(e),B=O;c&&(d=c);B&&(O=!1);q(g);t(k.config,b)&&(k.config[e]=k.config[b]);try{j.exec(d)}catch(ca){return v(A("fromtexteval",
|
||||
"fromText eval for "+b+" failed: "+ca,ca,[b]))}B&&(O=!0);this.depMaps.push(g);i.completeLoad(e);h([e],m)}),d.load(a.name,h,m,k)}));i.enable(e,this);this.pluginMaps[e.id]=e},enable:function(){T[this.map.id]=this;this.enabling=this.enabled=!0;y(this.depMaps,u(this,function(a,b){var c,d;if("string"===typeof a){a=n(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=l(N,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;s(a,"defined",u(this,function(a){this.defineDep(b,
|
||||
a);this.check()}));this.errback&&s(a,"error",u(this,this.errback))}c=a.id;d=p[c];!t(N,c)&&(d&&!d.enabled)&&i.enable(a,this)}));F(this.pluginMaps,u(this,function(a){var b=l(p,a.id);b&&!b.enabled&&i.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){y(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};i={config:k,contextName:b,registry:p,defined:r,urlFetched:S,defQueue:G,Module:X,makeModuleMap:n,
|
||||
nextTick:j.nextTick,onError:v,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=k.pkgs,c=k.shim,d={paths:!0,config:!0,map:!0};F(a,function(a,b){d[b]?"map"===b?(k.map||(k.map={}),Q(k[b],a,!0,!0)):Q(k[b],a,!0):k[b]=a});a.shim&&(F(a.shim,function(a,b){I(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=i.makeShimExports(a);c[b]=a}),k.shim=c);a.packages&&(y(a.packages,function(a){a="string"===typeof a?{name:a}:a;b[a.name]={name:a.name,
|
||||
location:a.location||a.name,main:(a.main||"main").replace(ja,"").replace(ea,"")}}),k.pkgs=b);F(p,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=n(b))});if(a.deps||a.callback)i.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(Z,arguments));return b||a.exports&&ba(a.exports)}},makeRequire:function(a,f){function h(d,c,e){var g,k;f.enableBuildCallback&&(c&&H(c))&&(c.__requireJsBuild=!0);if("string"===typeof d){if(H(c))return v(A("requireargs",
|
||||
"Invalid require call"),e);if(a&&t(N,d))return N[d](p[a.id]);if(j.get)return j.get(i,d,a,h);g=n(d,a,!1,!0);g=g.id;return!t(r,g)?v(A("notloaded",'Module name "'+g+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):r[g]}K();i.nextTick(function(){K();k=q(n(null,a));k.skipMap=f.skipMap;k.init(d,c,e,{enabled:!0});C()});return h}f=f||{};Q(h,{isBrowser:z,toUrl:function(b){var f,e=b.lastIndexOf("."),g=b.split("/")[0];if(-1!==e&&(!("."===g||".."===g)||1<e))f=b.substring(e,b.length),b=
|
||||
b.substring(0,e);return i.nameToUrl(c(b,a&&a.id,!0),f,!0)},defined:function(b){return t(r,n(b,a,!1,!0).id)},specified:function(b){b=n(b,a,!1,!0).id;return t(r,b)||t(p,b)}});a||(h.undef=function(b){w();var c=n(b,a,!0),f=l(p,b);e(b);delete r[b];delete S[c.url];delete Y[b];f&&(f.events.defined&&(Y[b]=f.events),x(b))});return h},enable:function(a){l(p,a.id)&&q(a).enable()},completeLoad:function(a){var b,c,d=l(k.shim,a)||{},e=d.exports;for(w();G.length;){c=G.shift();if(null===c[0]){c[0]=a;if(b)break;b=
|
||||
!0}else c[0]===a&&(b=!0);D(c)}c=l(p,a);if(!b&&!t(r,a)&&c&&!c.inited){if(k.enforceDefine&&(!e||!ba(e)))return h(a)?void 0:v(A("nodefine","No define call for "+a,null,[a]));D([a,d.deps||[],d.exportsFn])}C()},nameToUrl:function(a,b,c){var d,e,h,g,i,n;if(j.jsExtRegExp.test(a))g=a+(b||"");else{d=k.paths;e=k.pkgs;g=a.split("/");for(i=g.length;0<i;i-=1)if(n=g.slice(0,i).join("/"),h=l(e,n),n=l(d,n)){I(n)&&(n=n[0]);g.splice(0,i,n);break}else if(h){a=a===h.name?h.location+"/"+h.main:h.location;g.splice(0,i,
|
||||
a);break}g=g.join("/");g+=b||(/^data\:|\?/.test(g)||c?"":".js");g=("/"===g.charAt(0)||g.match(/^[\w\+\.\-]+:/)?"":k.baseUrl)+g}return k.urlArgs?g+((-1===g.indexOf("?")?"?":"&")+k.urlArgs):g},load:function(a,b){j.load(i,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||ka.test((a.currentTarget||a.srcElement).readyState))P=null,a=J(a),i.completeLoad(a.id)},onScriptError:function(a){var b=J(a);if(!h(b.id))return v(A("scripterror","Script error for: "+b.id,
|
||||
a,[b.id]))}};i.require=i.makeRequire();return i}var j,w,x,C,J,D,P,K,q,fa,la=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,ma=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,ea=/\.js$/,ja=/^\.\//;w=Object.prototype;var L=w.toString,ga=w.hasOwnProperty,ia=Array.prototype.splice,z=!!("undefined"!==typeof window&&"undefined"!==typeof navigator&&window.document),da=!z&&"undefined"!==typeof importScripts,ka=z&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,W="undefined"!==typeof opera&&
|
||||
"[object Opera]"===opera.toString(),E={},s={},R=[],O=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(H(requirejs))return;s=requirejs;requirejs=void 0}"undefined"!==typeof require&&!H(require)&&(s=require,require=void 0);j=requirejs=function(b,c,e,h){var q,n="_";!I(b)&&"string"!==typeof b&&(q=b,I(c)?(b=c,c=e,e=h):b=[]);q&&q.context&&(n=q.context);(h=l(E,n))||(h=E[n]=j.s.newContext(n));q&&h.configure(q);return h.require(b,c,e)};j.config=function(b){return j(b)};j.nextTick="undefined"!==
|
||||
typeof setTimeout?function(b){setTimeout(b,4)}:function(b){b()};require||(require=j);j.version="2.1.9";j.jsExtRegExp=/^\/|:|\?|\.js$/;j.isBrowser=z;w=j.s={contexts:E,newContext:ha};j({});y(["toUrl","undef","defined","specified"],function(b){j[b]=function(){var c=E._;return c.require[b].apply(c,arguments)}});if(z&&(x=w.head=document.getElementsByTagName("head")[0],C=document.getElementsByTagName("base")[0]))x=w.head=C.parentNode;j.onError=aa;j.createNode=function(b){var c=b.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml",
|
||||
"html:script"):document.createElement("script");c.type=b.scriptType||"text/javascript";c.charset="utf-8";c.async=!0;return c};j.load=function(b,c,e){var h=b&&b.config||{};if(z)return h=j.createNode(h,c,e),h.setAttribute("data-requirecontext",b.contextName),h.setAttribute("data-requiremodule",c),h.attachEvent&&!(h.attachEvent.toString&&0>h.attachEvent.toString().indexOf("[native code"))&&!W?(O=!0,h.attachEvent("onreadystatechange",b.onScriptLoad)):(h.addEventListener("load",b.onScriptLoad,!1),h.addEventListener("error",
|
||||
b.onScriptError,!1)),h.src=e,K=h,C?x.insertBefore(h,C):x.appendChild(h),K=null,h;if(da)try{importScripts(e),b.completeLoad(c)}catch(l){b.onError(A("importscripts","importScripts failed for "+c+" at "+e,l,[c]))}};z&&!s.skipDataMain&&M(document.getElementsByTagName("script"),function(b){x||(x=b.parentNode);if(J=b.getAttribute("data-main"))return q=J,s.baseUrl||(D=q.split("/"),q=D.pop(),fa=D.length?D.join("/")+"/":"./",s.baseUrl=fa),q=q.replace(ea,""),j.jsExtRegExp.test(q)&&(q=J),s.deps=s.deps?s.deps.concat(q):
|
||||
[q],!0});define=function(b,c,e){var h,j;"string"!==typeof b&&(e=c,c=b,b=null);I(c)||(e=c,c=null);!c&&H(e)&&(c=[],e.length&&(e.toString().replace(la,"").replace(ma,function(b,e){c.push(e)}),c=(1===e.length?["require"]:["require","exports","module"]).concat(c)));if(O){if(!(h=K))P&&"interactive"===P.readyState||M(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return P=b}),h=P;h&&(b||(b=h.getAttribute("data-requiremodule")),j=E[h.getAttribute("data-requirecontext")])}(j?
|
||||
j.defQueue:R).push([b,c,e])};define.amd={jQuery:!0};j.exec=function(b){return eval(b)};j(s)}})(this);
|
13
amd-test/script.coffee
Normal file
13
amd-test/script.coffee
Normal file
@ -0,0 +1,13 @@
|
||||
define ['browser-source-map-support'], (sourceMapSupport) ->
|
||||
sourceMapSupport.install()
|
||||
|
||||
foo = -> throw new Error 'foo'
|
||||
|
||||
try
|
||||
foo()
|
||||
catch e
|
||||
if /\bscript\.coffee\b/.test e.stack
|
||||
document.body.appendChild document.createTextNode 'Test passed'
|
||||
else
|
||||
document.body.appendChild document.createTextNode 'Test failed'
|
||||
console.log e.stack
|
119
browser-source-map-support.js
Normal file
119
browser-source-map-support.js
Normal file
@ -0,0 +1,119 @@
|
||||
/*
|
||||
* Support for source maps in V8 stack traces
|
||||
* https://github.com/evanw/node-source-map-support
|
||||
*/
|
||||
(this.define||function(M,N){this.sourceMapSupport=N()})("browser-source-map-support",function(M){(function m(x,h,w){function B(b,k){if(!h[b]){if(!x[b]){var g="function"==typeof require&&require;if(!k&&g)return g(b,!0);if(D)return D(b,!0);throw Error("Cannot find module '"+b+"'");}g=h[b]={exports:{}};x[b][0].call(g.exports,function(f){var a=x[b][1][f];return B(a?a:f)},g,g.exports,m,x,h,w)}return h[b].exports}for(var D="function"==typeof require&&require,q=0;q<w.length;q++)B(w[q]);return B})({1:[function(m,
|
||||
x,h){M=m("./source-map-support")},{"./source-map-support":18}],2:[function(m,x,h){function w(a){return"[object Array]"===g.call(a)}function B(a,e){var b;if(null===a)b={__proto__:null};else{if("object"!==typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");b=function(){};b.prototype=a;b=new b;b.__proto__=a}"undefined"!==typeof e&&Object.defineProperties&&Object.defineProperties(b,e);return b}function D(a){return"object"!=typeof a&&"function"!=typeof a||null===a}function q(a){if(D(a))throw new TypeError("Object.keys called on a non-object");
|
||||
var b=[],e;for(e in a)f.call(a,e)&&b.push(e);return b}function b(a){if(D(a))throw new TypeError("Object.getOwnPropertyNames called on a non-object");var b=q(a);h.isArray(a)&&-1===h.indexOf(a,"length")&&b.push("length");return b}function k(a,b){return{value:a[b]}}var g=Object.prototype.toString,f=Object.prototype.hasOwnProperty;h.isArray="function"===typeof Array.isArray?Array.isArray:w;h.indexOf=function(a,b){if(a.indexOf)return a.indexOf(b);for(var e=0;e<a.length;e++)if(b===a[e])return e;return-1};
|
||||
h.filter=function(a,b){if(a.filter)return a.filter(b);for(var e=[],f=0;f<a.length;f++)b(a[f],f,a)&&e.push(a[f]);return e};h.forEach=function(a,b,e){if(a.forEach)return a.forEach(b,e);for(var f=0;f<a.length;f++)b.call(e,a[f],f,a)};h.map=function(a,b){if(a.map)return a.map(b);for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=b(a[f],f,a);return e};h.reduce=function(a,b,e){if(a.reduce)return a.reduce(b,e);var f,t=!1;2<arguments.length&&(f=e,t=!0);for(var d=0,c=a.length;c>d;++d)a.hasOwnProperty(d)&&(t?
|
||||
f=b(f,a[d],d,a):(f=a[d],t=!0));return f};"b"!=="ab".substr(-1)?h.substr=function(a,b,e){0>b&&(b=a.length+b);return a.substr(b,e)}:h.substr=function(a,b,e){return a.substr(b,e)};h.trim=function(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")};h.bind=function(){var a=Array.prototype.slice.call(arguments),b=a.shift();if(b.bind)return b.bind.apply(b,a);var e=a.shift();return function(){b.apply(e,a.concat([Array.prototype.slice.call(arguments)]))}};h.create="function"===typeof Object.create?Object.create:
|
||||
B;var a="function"===typeof Object.keys?Object.keys:q,e="function"===typeof Object.getOwnPropertyNames?Object.getOwnPropertyNames:b;if(Error().hasOwnProperty("description")){var p=function(a,b){"[object Error]"===g.call(a)&&(b=h.filter(b,function(a){return"description"!==a&&"number"!==a&&"message"!==a}));return b};h.keys=function(b){return p(b,a(b))};h.getOwnPropertyNames=function(a){return p(a,e(a))}}else h.keys=a,h.getOwnPropertyNames=e;if("function"===typeof Object.getOwnPropertyDescriptor)try{Object.getOwnPropertyDescriptor({a:1},
|
||||
"a"),h.getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor}catch(n){h.getOwnPropertyDescriptor=function(a,b){try{return Object.getOwnPropertyDescriptor(a,b)}catch(e){return k(a,b)}}}else h.getOwnPropertyDescriptor=k},{}],3:[function(m,x,h){},{}],4:[function(m,x,h){function w(b,g){for(var f=0,a=b.length-1;0<=a;a--){var e=b[a];"."===e?b.splice(a,1):".."===e?(b.splice(a,1),f++):f&&(b.splice(a,1),f--)}if(g)for(;f--;f)b.unshift("..");return b}var B=m("__browserify_process"),D=m("util"),q=m("_shims"),
|
||||
b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;h.resolve=function(){for(var b="",g=!1,f=arguments.length-1;-1<=f&&!g;f--){var a=0<=f?arguments[f]:B.cwd();if(!D.isString(a))throw new TypeError("Arguments to path.resolve must be strings");a&&(b=a+"/"+b,g="/"===a.charAt(0))}b=w(q.filter(b.split("/"),function(a){return!!a}),!g).join("/");return(g?"/":"")+b||"."};h.normalize=function(b){var g=h.isAbsolute(b),f="/"===q.substr(b,-1);(b=w(q.filter(b.split("/"),function(a){return!!a}),!g).join("/"))||
|
||||
g||(b=".");b&&f&&(b+="/");return(g?"/":"")+b};h.isAbsolute=function(b){return"/"===b.charAt(0)};h.join=function(){var b=Array.prototype.slice.call(arguments,0);return h.normalize(q.filter(b,function(b,f){if(!D.isString(b))throw new TypeError("Arguments to path.join must be strings");return b}).join("/"))};h.relative=function(b,g){function f(a){for(var b=0;b<a.length&&""===a[b];b++);for(var e=a.length-1;0<=e&&""===a[e];e--);return b>e?[]:a.slice(b,e-b+1)}b=h.resolve(b).substr(1);g=h.resolve(g).substr(1);
|
||||
for(var a=f(b.split("/")),e=f(g.split("/")),p=Math.min(a.length,e.length),n=p,v=0;v<p;v++)if(a[v]!==e[v]){n=v;break}p=[];for(v=n;v<a.length;v++)p.push("..");p=p.concat(e.slice(n));return p.join("/")};h.sep="/";h.delimiter=":";h.dirname=function(k){var g=b.exec(k).slice(1);k=g[0];g=g[1];if(!k&&!g)return".";g&&(g=g.substr(0,g.length-1));return k+g};h.basename=function(k,g){var f=b.exec(k).slice(1)[2];g&&f.substr(-1*g.length)===g&&(f=f.substr(0,f.length-g.length));return f};h.extname=function(k){return b.exec(k).slice(1)[3]}},
|
||||
{__browserify_process:7,_shims:2,util:5}],5:[function(m,x,h){function w(c,a){var d={seen:[],stylize:D};3<=arguments.length&&(d.depth=arguments[2]);4<=arguments.length&&(d.colors=arguments[3]);p(a)?d.showHidden=a:a&&h._extend(d,a);s(d.showHidden)&&(d.showHidden=!1);s(d.depth)&&(d.depth=2);s(d.colors)&&(d.colors=!1);s(d.customInspect)&&(d.customInspect=!0);d.colors&&(d.stylize=B);return b(d,c,d.depth)}function B(c,a){var d=w.styles[a];return d?"\u001b["+w.colors[d][0]+"m"+c+"\u001b["+w.colors[d][1]+
|
||||
"m":c}function D(c,a){return c}function q(c){var a={};F.forEach(c,function(c,z){a[c]=!0});return a}function b(u,n,p){if(u.customInspect&&n&&c(n.inspect)&&n.inspect!==h.inspect&&(!n.constructor||n.constructor.prototype!==n)){var z=n.inspect(p);v(z)||(z=b(u,z,p));return z}if(z=k(u,n))return z;var l=F.keys(n),C=q(l);u.showHidden&&(l=F.getOwnPropertyNames(n));if(0===l.length){if(c(n))return u.stylize("[Function"+(n.name?": "+n.name:"")+"]","special");if(A(n))return u.stylize(RegExp.prototype.toString.call(n),
|
||||
"regexp");if(t(n))return u.stylize(Date.prototype.toString.call(n),"date");if(d(n))return"["+Error.prototype.toString.call(n)+"]"}var z="",K=!1,L=["{","}"];e(n)&&(K=!0,L=["[","]"]);c(n)&&(z=" [Function"+(n.name?": "+n.name:"")+"]");A(n)&&(z=" "+RegExp.prototype.toString.call(n));t(n)&&(z=" "+Date.prototype.toUTCString.call(n));d(n)&&(z=" "+("["+Error.prototype.toString.call(n)+"]"));if(0===l.length&&(!K||0==n.length))return L[0]+z+L[1];if(0>p)return A(n)?u.stylize(RegExp.prototype.toString.call(n),
|
||||
"regexp"):u.stylize("[Object]","special");u.seen.push(n);l=K?g(u,n,p,C,l):l.map(function(l){return f(u,n,p,C,l,K)});u.seen.pop();return a(l,z,L)}function k(c,a){if(s(a))return c.stylize("undefined","undefined");if(v(a)){var d="'"+JSON.stringify(a).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return c.stylize(d,"string")}if(n(a))return c.stylize(""+a,"number");if(p(a))return c.stylize(""+a,"boolean");if(null===a)return c.stylize("null","null")}function g(c,a,d,z,l){for(var C=[],
|
||||
b=0,e=a.length;b<e;++b)Object.prototype.hasOwnProperty.call(a,String(b))?C.push(f(c,a,d,z,String(b),!0)):C.push("");F.forEach(l,function(l){l.match(/^\d+$/)||C.push(f(c,a,d,z,l,!0))});return C}function f(a,c,d,z,l,C){var e,f;c=F.getOwnPropertyDescriptor(c,l)||{value:c[l]};c.get?f=c.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):c.set&&(f=a.stylize("[Setter]","special"));Object.prototype.hasOwnProperty.call(z,l)||(e="["+l+"]");f||(0>F.indexOf(a.seen,c.value)?(f=null===d?
|
||||
b(a,c.value,null):b(a,c.value,d-1),-1<f.indexOf("\n")&&(f=C?f.split("\n").map(function(l){return" "+l}).join("\n").substr(2):"\n"+f.split("\n").map(function(l){return" "+l}).join("\n"))):f=a.stylize("[Circular]","special"));if(s(e)){if(C&&l.match(/^\d+$/))return f;e=JSON.stringify(""+l);e.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(e=e.substr(1,e.length-2),e=a.stylize(e,"name")):(e=e.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),e=a.stylize(e,"string"))}return e+": "+f}function a(a,
|
||||
c,d){var z=0;return 60<F.reduce(a,function(l,a){z++;0<=a.indexOf("\n")&&z++;return l+a.replace(/\u001b\[\d\d?m/g,"").length+1},0)?d[0]+(""===c?"":c+"\n ")+" "+a.join(",\n ")+" "+d[1]:d[0]+c+" "+a.join(", ")+" "+d[1]}function e(a){return F.isArray(a)}function p(a){return"boolean"===typeof a}function n(a){return"number"===typeof a}function v(a){return"string"===typeof a}function s(a){return void 0===a}function A(a){return y(a)&&"[object RegExp]"===Object.prototype.toString.call(a)}function y(a){return"object"===
|
||||
typeof a&&a}function t(a){return y(a)&&"[object Date]"===Object.prototype.toString.call(a)}function d(a){return y(a)&&"[object Error]"===Object.prototype.toString.call(a)}function c(a){return"function"===typeof a}function u(a){return 10>a?"0"+a.toString(10):a.toString(10)}function G(){var a=new Date,c=[u(a.getHours()),u(a.getMinutes()),u(a.getSeconds())].join(":");return[a.getDate(),H[a.getMonth()],c].join(" ")}var F=m("_shims"),I=/%[sdj%]/g;h.format=function(a){if(!v(a)){for(var c=[],d=0;d<arguments.length;d++)c.push(w(arguments[d]));
|
||||
return c.join(" ")}for(var d=1,z=arguments,l=z.length,c=String(a).replace(I,function(a){if("%%"===a)return"%";if(d>=l)return a;switch(a){case "%s":return String(z[d++]);case "%d":return Number(z[d++]);case "%j":try{return JSON.stringify(z[d++])}catch(c){return"[Circular]"}default:return a}}),C=z[d];d<l;C=z[++d])c=null!==C&&y(C)?c+(" "+w(C)):c+(" "+C);return c};h.inspect=w;w.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,
|
||||
39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};w.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};h.isArray=e;h.isBoolean=p;h.isNull=function(a){return null===a};h.isNullOrUndefined=function(a){return null==a};h.isNumber=n;h.isString=v;h.isSymbol=function(a){return"symbol"===typeof a};h.isUndefined=s;h.isRegExp=A;h.isObject=y;h.isDate=t;h.isError=d;h.isFunction=c;h.isPrimitive=function(a){return null===
|
||||
a||"boolean"===typeof a||"number"===typeof a||"string"===typeof a||"symbol"===typeof a||"undefined"===typeof a};h.isBuffer=function(a){return a&&"object"===typeof a&&"function"===typeof a.copy&&"function"===typeof a.fill&&"function"===typeof a.binarySlice};var H="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");h.log=function(){console.log("%s - %s",G(),h.format.apply(h,arguments))};h.inherits=function(a,c){a.super_=c;a.prototype=F.create(c.prototype,{constructor:{value:a,enumerable:!1,
|
||||
writable:!0,configurable:!0}})};h._extend=function(a,c){if(!c||!y(c))return a;for(var d=F.keys(c),z=d.length;z--;)a[d[z]]=c[d[z]];return a}},{_shims:2}],6:[function(m,x,h){m=function B(h,q,b){function k(a,e){if(!q[a]){if(!h[a]){var f="function"==typeof m&&m;if(!e&&f)return f(a,!0);if(g)return g(a,!0);throw Error("Cannot find module '"+a+"'");}f=q[a]={exports:{}};h[a][0].call(f.exports,function(b){var e=h[a][1][b];return k(e?e:b)},f,f.exports,B,h,q,b)}return q[a].exports}for(var g="function"==typeof m&&
|
||||
m,f=0;f<b.length;f++)k(b[f]);return k}({1:[function(h,m,q){q.readIEEE754=function(b,k,g,f,a){var e;e=8*a-f-1;var p=(1<<e)-1,n=p>>1,v=-7;a=g?0:a-1;var s=g?1:-1,h=b[k+a];a+=s;g=h&(1<<-v)-1;h>>=-v;for(v+=e;0<v;g=256*g+b[k+a],a+=s,v-=8);e=g&(1<<-v)-1;g>>=-v;for(v+=f;0<v;e=256*e+b[k+a],a+=s,v-=8);if(0===g)g=1-n;else{if(g===p)return e?NaN:Infinity*(h?-1:1);e+=Math.pow(2,f);g-=n}return(h?-1:1)*e*Math.pow(2,g-f)};q.writeIEEE754=function(b,k,g,f,a,e){var p,n=8*e-a-1,v=(1<<n)-1,s=v>>1,h=23===a?Math.pow(2,-24)-
|
||||
Math.pow(2,-77):0;e=f?e-1:0;var y=f?-1:1,t=0>k||0===k&&0>1/k?1:0;k=Math.abs(k);isNaN(k)||Infinity===k?(k=isNaN(k)?1:0,f=v):(f=Math.floor(Math.log(k)/Math.LN2),1>k*(p=Math.pow(2,-f))&&(f--,p*=2),k=1<=f+s?k+h/p:k+h*Math.pow(2,1-s),2<=k*p&&(f++,p/=2),f+s>=v?(k=0,f=v):1<=f+s?(k=(k*p-1)*Math.pow(2,a),f+=s):(k=k*Math.pow(2,s-1)*Math.pow(2,a),f=0));for(;8<=a;b[g+e]=k&255,e+=y,k/=256,a-=8);f=f<<a|k;for(n+=a;0<n;b[g+e]=f&255,e+=y,f/=256,n-=8);b[g+e-y]|=128*t}},{}],q9TxCC:[function(h,m,q){function b(a,l,c){r||
|
||||
(r=h("assert"));if(!(this instanceof b))return new b(a,l,c);this.parent=this;this.offset=0;if("base64"==l&&"string"==typeof a)for(a=a.trim?a.trim():a.replace(/^\s+|\s+$/g,"");0!=a.length%4;)a+="=";if("number"===typeof c)for(this.length=g(l),l=0;l<this.length;l++)this[l]=a.get(l+c);else{switch(c=typeof a){case "number":this.length=g(a);break;case "string":this.length=b.byteLength(a,l);break;case "object":this.length=g(a.length);break;default:throw Error("First argument needs to be a number, array or string.");
|
||||
}if(f(a)||b.isBuffer(a)||a&&"object"===typeof a&&"number"===typeof a.length)for(l=0;l<this.length;l++)this[l]=a instanceof b?a.readUInt8(l):a[l];else if("string"==c)this.length=this.write(a,0,l);else if("number"===c)for(l=0;l<this.length;l++)this[l]=0}}function k(a,l,c){if("number"!==typeof a)return c;a=~~a;if(a>=l)return l;if(0<=a)return a;a+=l;return 0<=a?a:0}function g(a){a=~~Math.ceil(+a);return 0>a?0:a}function f(a){return(Array.isArray||function(a){return"[object Array]"=={}.toString.apply(a)})(a)}
|
||||
function a(a){for(var l=[],c=0;c<a.length;c++)if(127>=a.charCodeAt(c))l.push(a.charCodeAt(c));else for(var d=encodeURIComponent(a.charAt(c)).substr(1).split("%"),b=0;b<d.length;b++)l.push(parseInt(d[b],16));return l}function e(a,l,c,d){for(var b=0;b<d&&!(b+c>=l.length||b>=a.length);)l[b+c]=a[b],b++;return b}function p(a){try{return decodeURIComponent(a)}catch(l){return String.fromCharCode(65533)}}function n(a,l,c,d){var b=0;d||(r.ok("boolean"===typeof c,"missing or invalid endian"),r.ok(void 0!==
|
||||
l&&null!==l,"missing offset"),r.ok(l+1<a.length,"Trying to read beyond buffer length"));if(l>=a.length)return 0;c?(b=a[l]<<8,l+1<a.length&&(b|=a[l+1])):(b=a[l],l+1<a.length&&(b|=a[l+1]<<8));return b}function v(a,l,c,d){var b=0;d||(r.ok("boolean"===typeof c,"missing or invalid endian"),r.ok(void 0!==l&&null!==l,"missing offset"),r.ok(l+3<a.length,"Trying to read beyond buffer length"));if(l>=a.length)return 0;c?(l+1<a.length&&(b=a[l+1]<<16),l+2<a.length&&(b|=a[l+2]<<8),l+3<a.length&&(b|=a[l+3]),b+=
|
||||
a[l]<<24>>>0):(l+2<a.length&&(b=a[l+2]<<16),l+1<a.length&&(b|=a[l+1]<<8),b|=a[l],l+3<a.length&&(b+=a[l+3]<<24>>>0));return b}function s(a,l,c,d){d||(r.ok("boolean"===typeof c,"missing or invalid endian"),r.ok(void 0!==l&&null!==l,"missing offset"),r.ok(l+1<a.length,"Trying to read beyond buffer length"));a=n(a,l,c,d);return a&32768?-1*(65535-a+1):a}function A(a,l,c,d){d||(r.ok("boolean"===typeof c,"missing or invalid endian"),r.ok(void 0!==l&&null!==l,"missing offset"),r.ok(l+3<a.length,"Trying to read beyond buffer length"));
|
||||
a=v(a,l,c,d);return a&2147483648?-1*(4294967295-a+1):a}function y(a,l,c,d){d||(r.ok("boolean"===typeof c,"missing or invalid endian"),r.ok(l+3<a.length,"Trying to read beyond buffer length"));return h("./buffer_ieee754").readIEEE754(a,l,c,23,4)}function t(a,l,c,d){d||(r.ok("boolean"===typeof c,"missing or invalid endian"),r.ok(l+7<a.length,"Trying to read beyond buffer length"));return h("./buffer_ieee754").readIEEE754(a,l,c,52,8)}function d(a,l){r.ok("number"==typeof a,"cannot write a non-number as a number");
|
||||
r.ok(0<=a,"specified a negative value for writing an unsigned value");r.ok(a<=l,"value is larger than maximum value for type");r.ok(Math.floor(a)===a,"value has a fractional component")}function c(a,l,c,b,e){e||(r.ok(void 0!==l&&null!==l,"missing value"),r.ok("boolean"===typeof b,"missing or invalid endian"),r.ok(void 0!==c&&null!==c,"missing offset"),r.ok(c+1<a.length,"trying to write beyond buffer length"),d(l,65535));for(e=0;e<Math.min(a.length-c,2);e++)a[c+e]=(l&255<<8*(b?1-e:e))>>>8*(b?1-e:e)}
|
||||
function u(a,l,c,b,e){e||(r.ok(void 0!==l&&null!==l,"missing value"),r.ok("boolean"===typeof b,"missing or invalid endian"),r.ok(void 0!==c&&null!==c,"missing offset"),r.ok(c+3<a.length,"trying to write beyond buffer length"),d(l,4294967295));for(e=0;e<Math.min(a.length-c,4);e++)a[c+e]=l>>>8*(b?3-e:e)&255}function G(a,l,c){r.ok("number"==typeof a,"cannot write a non-number as a number");r.ok(a<=l,"value larger than maximum allowed value");r.ok(a>=c,"value smaller than minimum allowed value");r.ok(Math.floor(a)===
|
||||
a,"value has a fractional component")}function F(a,l,c){r.ok("number"==typeof a,"cannot write a non-number as a number");r.ok(a<=l,"value larger than maximum allowed value");r.ok(a>=c,"value smaller than minimum allowed value")}function x(a,l,d,b,e){e||(r.ok(void 0!==l&&null!==l,"missing value"),r.ok("boolean"===typeof b,"missing or invalid endian"),r.ok(void 0!==d&&null!==d,"missing offset"),r.ok(d+1<a.length,"Trying to write beyond buffer length"),G(l,32767,-32768));0<=l?c(a,l,d,b,e):c(a,65535+
|
||||
l+1,d,b,e)}function H(a,c,d,b,e){e||(r.ok(void 0!==c&&null!==c,"missing value"),r.ok("boolean"===typeof b,"missing or invalid endian"),r.ok(void 0!==d&&null!==d,"missing offset"),r.ok(d+3<a.length,"Trying to write beyond buffer length"),G(c,2147483647,-2147483648));0<=c?u(a,c,d,b,e):u(a,4294967295+c+1,d,b,e)}function J(a,c,d,b,e){e||(r.ok(void 0!==c&&null!==c,"missing value"),r.ok("boolean"===typeof b,"missing or invalid endian"),r.ok(void 0!==d&&null!==d,"missing offset"),r.ok(d+3<a.length,"Trying to write beyond buffer length"),
|
||||
F(c,3.4028234663852886E38,-3.4028234663852886E38));h("./buffer_ieee754").writeIEEE754(a,c,d,b,23,4)}function E(a,c,d,b,e){e||(r.ok(void 0!==c&&null!==c,"missing value"),r.ok("boolean"===typeof b,"missing or invalid endian"),r.ok(void 0!==d&&null!==d,"missing offset"),r.ok(d+7<a.length,"Trying to write beyond buffer length"),F(c,1.7976931348623157E308,-1.7976931348623157E308));h("./buffer_ieee754").writeIEEE754(a,c,d,b,52,8)}var r;q.Buffer=b;q.SlowBuffer=b;b.poolSize=8192;q.INSPECT_MAX_BYTES=50;b.prototype.get=
|
||||
function(a){if(0>a||a>=this.length)throw Error("oob");return this[a]};b.prototype.set=function(a,c){if(0>a||a>=this.length)throw Error("oob");return this[a]=c};b.byteLength=function(c,l){switch(l||"utf8"){case "hex":return c.length/2;case "utf8":case "utf-8":return a(c).length;case "ascii":case "binary":return c.length;case "base64":return h("base64-js").toByteArray(c).length;default:throw Error("Unknown encoding");}};b.prototype.utf8Write=function(c,l,d){return b._charsWritten=e(a(c),this,l,d)};
|
||||
b.prototype.asciiWrite=function(a,c,d){for(var f=b,t=[],n=0;n<a.length;n++)t.push(a.charCodeAt(n)&255);return f._charsWritten=e(t,this,c,d)};b.prototype.binaryWrite=b.prototype.asciiWrite;b.prototype.base64Write=function(a,c,d){return b._charsWritten=e(h("base64-js").toByteArray(a),this,c,d)};b.prototype.base64Slice=function(a,c){var d=Array.prototype.slice.apply(this,arguments);return h("base64-js").fromByteArray(d)};b.prototype.utf8Slice=function(){for(var a=Array.prototype.slice.apply(this,arguments),
|
||||
c="",d="",b=0;b<a.length;)127>=a[b]?(c+=p(d)+String.fromCharCode(a[b]),d=""):d+="%"+a[b].toString(16),b++;return c+p(d)};b.prototype.asciiSlice=function(){for(var a=Array.prototype.slice.apply(this,arguments),c="",d=0;d<a.length;d++)c+=String.fromCharCode(a[d]);return c};b.prototype.binarySlice=b.prototype.asciiSlice;b.prototype.inspect=function(){for(var a=[],c=this.length,d=0;d<c;d++)if(a[d]=16>this[d]?"0"+this[d].toString(16):this[d].toString(16),d==q.INSPECT_MAX_BYTES){a[d+1]="...";break}return"<Buffer "+
|
||||
a.join(" ")+">"};b.prototype.hexSlice=function(a,c){var d=this.length;if(!a||0>a)a=0;if(!c||0>c||c>d)c=d;for(var d="",b=a;b<c;b++)d+=16>this[b]?"0"+this[b].toString(16):this[b].toString(16);return d};b.prototype.toString=function(a,c,d){a=String(a||"utf8").toLowerCase();c=+c||0;"undefined"==typeof d&&(d=this.length);if(+d==c)return"";switch(a){case "hex":return this.hexSlice(c,d);case "utf8":case "utf-8":return this.utf8Slice(c,d);case "ascii":return this.asciiSlice(c,d);case "binary":return this.binarySlice(c,
|
||||
d);case "base64":return this.base64Slice(c,d);case "ucs2":case "ucs-2":return this.ucs2Slice(c,d);default:throw Error("Unknown encoding");}};b.prototype.hexWrite=function(a,c,d){c=+c||0;var e=this.length-c;d?(d=+d,d>e&&(d=e)):d=e;e=a.length;if(e%2)throw Error("Invalid hex string");d>e/2&&(d=e/2);for(e=0;e<d;e++){var f=parseInt(a.substr(2*e,2),16);if(isNaN(f))throw Error("Invalid hex string");this[c+e]=f}b._charsWritten=2*e;return e};b.prototype.write=function(a,c,d,b){if(isFinite(c))isFinite(d)||
|
||||
(b=d,d=void 0);else{var e=b;b=c;c=d;d=e}c=+c||0;e=this.length-c;d?(d=+d,d>e&&(d=e)):d=e;b=String(b||"utf8").toLowerCase();switch(b){case "hex":return this.hexWrite(a,c,d);case "utf8":case "utf-8":return this.utf8Write(a,c,d);case "ascii":return this.asciiWrite(a,c,d);case "binary":return this.binaryWrite(a,c,d);case "base64":return this.base64Write(a,c,d);case "ucs2":case "ucs-2":return this.ucs2Write(a,c,d);default:throw Error("Unknown encoding");}};b.prototype.slice=function(a,c){var d=this.length;
|
||||
a=k(a,d,0);c=k(c,d,d);return new b(this,c-a,+a)};b.prototype.copy=function(a,c,d,b){d||(d=0);if(void 0===b||isNaN(b))b=this.length;c||(c=0);if(b<d)throw Error("sourceEnd < sourceStart");if(b===d||0==a.length||0==this.length)return 0;if(0>c||c>=a.length)throw Error("targetStart out of bounds");if(0>d||d>=this.length)throw Error("sourceStart out of bounds");if(0>b||b>this.length)throw Error("sourceEnd out of bounds");b>this.length&&(b=this.length);a.length-c<b-d&&(b=a.length-c+d);for(var e=[];d<b;d++)r.ok("undefined"!==
|
||||
typeof this[d],"copying undefined buffer bytes!"),e.push(this[d]);for(d=c;d<c+e.length;d++)a[d]=e[d-c]};b.prototype.fill=function(a,c,d){a||(a=0);c||(c=0);d||(d=this.length);"string"===typeof a&&(a=a.charCodeAt(0));if("number"!==typeof a||isNaN(a))throw Error("value is not a number");if(d<c)throw Error("end < start");if(d===c||0==this.length)return 0;if(0>c||c>=this.length)throw Error("start out of bounds");if(0>d||d>this.length)throw Error("end out of bounds");for(;c<d;c++)this[c]=a};b.isBuffer=
|
||||
function(a){return a instanceof b||a instanceof b};b.concat=function(a,c){if(!f(a))throw Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.");if(0===a.length)return new b(0);if(1===a.length)return a[0];if("number"!==typeof c)for(var d=c=0;d<a.length;d++){var e=a[d];c+=e.length}for(var t=new b(c),n=0,d=0;d<a.length;d++)e=a[d],e.copy(t,n),n+=e.length;return t};b.isEncoding=function(a){switch((a+"").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}};b.prototype.readUInt8=function(a,c){c||(r.ok(void 0!==a&&null!==a,"missing offset"),r.ok(a<this.length,"Trying to read beyond buffer length"));if(!(a>=this.length))return this[a]};b.prototype.readUInt16LE=function(a,c){return n(this,a,!1,c)};b.prototype.readUInt16BE=function(a,c){return n(this,a,!0,c)};b.prototype.readUInt32LE=function(a,c){return v(this,a,!1,c)};b.prototype.readUInt32BE=function(a,c){return v(this,a,!0,c)};b.prototype.readInt8=function(a,c){var d;c||(r.ok(void 0!==
|
||||
a&&null!==a,"missing offset"),r.ok(a<this.length,"Trying to read beyond buffer length"));if(!(a>=this.length))return(d=this[a]&128)?-1*(255-this[a]+1):this[a]};b.prototype.readInt16LE=function(a,c){return s(this,a,!1,c)};b.prototype.readInt16BE=function(a,c){return s(this,a,!0,c)};b.prototype.readInt32LE=function(a,c){return A(this,a,!1,c)};b.prototype.readInt32BE=function(a,c){return A(this,a,!0,c)};b.prototype.readFloatLE=function(a,c){return y(this,a,!1,c)};b.prototype.readFloatBE=function(a,c){return y(this,
|
||||
a,!0,c)};b.prototype.readDoubleLE=function(a,c){return t(this,a,!1,c)};b.prototype.readDoubleBE=function(a,c){return t(this,a,!0,c)};b.prototype.writeUInt8=function(a,c,b){b||(r.ok(void 0!==a&&null!==a,"missing value"),r.ok(void 0!==c&&null!==c,"missing offset"),r.ok(c<this.length,"trying to write beyond buffer length"),d(a,255));c<this.length&&(this[c]=a)};b.prototype.writeUInt16LE=function(a,d,b){c(this,a,d,!1,b)};b.prototype.writeUInt16BE=function(a,d,b){c(this,a,d,!0,b)};b.prototype.writeUInt32LE=
|
||||
function(a,c,d){u(this,a,c,!1,d)};b.prototype.writeUInt32BE=function(a,c,d){u(this,a,c,!0,d)};b.prototype.writeInt8=function(a,c,d){d||(r.ok(void 0!==a&&null!==a,"missing value"),r.ok(void 0!==c&&null!==c,"missing offset"),r.ok(c<this.length,"Trying to write beyond buffer length"),G(a,127,-128));0<=a?this.writeUInt8(a,c,d):this.writeUInt8(255+a+1,c,d)};b.prototype.writeInt16LE=function(a,c,d){x(this,a,c,!1,d)};b.prototype.writeInt16BE=function(a,c,d){x(this,a,c,!0,d)};b.prototype.writeInt32LE=function(a,
|
||||
c,d){H(this,a,c,!1,d)};b.prototype.writeInt32BE=function(a,c,d){H(this,a,c,!0,d)};b.prototype.writeFloatLE=function(a,c,d){J(this,a,c,!1,d)};b.prototype.writeFloatBE=function(a,c,d){J(this,a,c,!0,d)};b.prototype.writeDoubleLE=function(a,c,d){E(this,a,c,!1,d)};b.prototype.writeDoubleBE=function(a,c,d){E(this,a,c,!0,d)}},{"./buffer_ieee754":1,assert:6,"base64-js":4}],"buffer-browserify":[function(h,m,q){m.exports=h("q9TxCC")},{}],4:[function(h,m,q){(function(b){m.exports.toByteArray=function(b){var g,
|
||||
f,a,e,p;if(0<b.length%4)throw"Invalid string. Length must be a multiple of 4";e=b.indexOf("=");e=0<e?b.length-e:0;p=[];f=0<e?b.length-4:b.length;for(g=0;g<f;g+=4)a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b[g])<<18|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b[g+1])<<12|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b[g+2])<<6|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b[g+
|
||||
3]),p.push((a&16711680)>>16),p.push((a&65280)>>8),p.push(a&255);2===e?(a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b[g])<<2|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b[g+1])>>4,p.push(a&255)):1===e&&(a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b[g])<<10|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b[g+1])<<4|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b[g+
|
||||
2])>>2,p.push(a>>8&255),p.push(a&255));return p};m.exports.fromByteArray=function(b){var g,f=b.length%3,a="",e,p;g=0;for(p=b.length-f;g<p;g+=3)e=(b[g]<<16)+(b[g+1]<<8)+b[g+2],a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e>>18&63]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e>>12&63]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e>>6&63]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e&63];switch(f){case 1:e=b[b.length-
|
||||
1];a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e>>2];a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e<<4&63];a+="==";break;case 2:e=(b[b.length-2]<<8)+b[b.length-1],a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e>>10],a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e>>4&63],a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e<<2&63],a+="="}return a}})()},{}],5:[function(h,m,q){function b(a){return"[object Array]"===
|
||||
p.call(a)}function k(a,d){var c;if(null===a)c={__proto__:null};else{if("object"!==typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");c=function(){};c.prototype=a;c=new c;c.__proto__=a}"undefined"!==typeof d&&Object.defineProperties&&Object.defineProperties(c,d);return c}function g(a){return"object"!=typeof a&&"function"!=typeof a||null===a}function f(a){if(g(a))throw new TypeError("Object.keys called on a non-object");var d=[],c;for(c in a)n.call(a,c)&&d.push(c);return d}function a(a){if(g(a))throw new TypeError("Object.getOwnPropertyNames called on a non-object");
|
||||
var d=f(a);q.isArray(a)&&-1===q.indexOf(a,"length")&&d.push("length");return d}function e(a,d){return{value:a[d]}}var p=Object.prototype.toString,n=Object.prototype.hasOwnProperty;q.isArray="function"===typeof Array.isArray?Array.isArray:b;q.indexOf=function(a,d){if(a.indexOf)return a.indexOf(d);for(var c=0;c<a.length;c++)if(d===a[c])return c;return-1};q.filter=function(a,d){if(a.filter)return a.filter(d);for(var c=[],b=0;b<a.length;b++)d(a[b],b,a)&&c.push(a[b]);return c};q.forEach=function(a,d,c){if(a.forEach)return a.forEach(d,
|
||||
c);for(var b=0;b<a.length;b++)d.call(c,a[b],b,a)};q.map=function(a,d){if(a.map)return a.map(d);for(var c=Array(a.length),b=0;b<a.length;b++)c[b]=d(a[b],b,a);return c};q.reduce=function(a,d,c){if(a.reduce)return a.reduce(d,c);var b,e=!1;2<arguments.length&&(b=c,e=!0);for(var f=0,n=a.length;n>f;++f)a.hasOwnProperty(f)&&(e?b=d(b,a[f],f,a):(b=a[f],e=!0));return b};"b"!=="ab".substr(-1)?q.substr=function(a,d,c){0>d&&(d=a.length+d);return a.substr(d,c)}:q.substr=function(a,d,c){return a.substr(d,c)};q.trim=
|
||||
function(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")};q.bind=function(){var a=Array.prototype.slice.call(arguments),d=a.shift();if(d.bind)return d.bind.apply(d,a);var c=a.shift();return function(){d.apply(c,a.concat([Array.prototype.slice.call(arguments)]))}};q.create="function"===typeof Object.create?Object.create:k;var v="function"===typeof Object.keys?Object.keys:f,s="function"===typeof Object.getOwnPropertyNames?Object.getOwnPropertyNames:a;if(Error().hasOwnProperty("description")){var A=
|
||||
function(a,d){"[object Error]"===p.call(a)&&(d=q.filter(d,function(a){return"description"!==a&&"number"!==a&&"message"!==a}));return d};q.keys=function(a){return A(a,v(a))};q.getOwnPropertyNames=function(a){return A(a,s(a))}}else q.keys=v,q.getOwnPropertyNames=s;if("function"===typeof Object.getOwnPropertyDescriptor)try{Object.getOwnPropertyDescriptor({a:1},"a"),q.getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor}catch(y){q.getOwnPropertyDescriptor=function(a,d){try{return Object.getOwnPropertyDescriptor(a,
|
||||
d)}catch(c){return e(a,d)}}}else q.getOwnPropertyDescriptor=e},{}],6:[function(h,m,q){function b(a,c){return s.isUndefined(c)?""+c:s.isNumber(c)&&(isNaN(c)||!isFinite(c))||s.isFunction(c)||s.isRegExp(c)?c.toString():c}function k(a,c){return s.isString(a)?a.length<c?a:a.slice(0,c):a}function g(a,c,b,e,f){throw new t.AssertionError({message:b,actual:a,expected:c,operator:e,stackStartFunction:f});}function f(a,c){a||g(a,!0,c,"==",t.ok)}function a(a,c){if(a===c)return!0;if(s.isBuffer(a)&&s.isBuffer(c)){if(a.length!=
|
||||
c.length)return!1;for(var b=0;b<a.length;b++)if(a[b]!==c[b])return!1;return!0}return s.isDate(a)&&s.isDate(c)?a.getTime()===c.getTime():s.isRegExp(a)&&s.isRegExp(c)?a.source===c.source&&a.global===c.global&&a.multiline===c.multiline&&a.lastIndex===c.lastIndex&&a.ignoreCase===c.ignoreCase:s.isObject(a)||s.isObject(c)?p(a,c):a==c}function e(a){return"[object Arguments]"==Object.prototype.toString.call(a)}function p(d,c){if(s.isNullOrUndefined(d)||s.isNullOrUndefined(c)||d.prototype!==c.prototype)return!1;
|
||||
if(e(d)){if(!e(c))return!1;d=y.call(d);c=y.call(c);return a(d,c)}try{var b=A.keys(d),f=A.keys(c),n}catch(g){return!1}if(b.length!=f.length)return!1;b.sort();f.sort();for(n=b.length-1;0<=n;n--)if(b[n]!=f[n])return!1;for(n=b.length-1;0<=n;n--)if(f=b[n],!a(d[f],c[f]))return!1;return!0}function n(a,c){return a&&c?"[object RegExp]"==Object.prototype.toString.call(c)?c.test(a):a instanceof c||!0===c.call({},a)?!0:!1:!1}function v(a,c,b,e){var f;s.isString(b)&&(e=b,b=null);try{c()}catch(p){f=p}e=(b&&b.name?
|
||||
" ("+b.name+").":".")+(e?" "+e:".");a&&!f&&g(f,b,"Missing expected exception"+e);!a&&n(f,b)&&g(f,b,"Got unwanted exception"+e);if(a&&f&&b&&!n(f,b)||!a&&f)throw f;}var s=h("util"),A=h("_shims"),y=Array.prototype.slice,t=m.exports=f;t.AssertionError=function(a){this.name="AssertionError";this.actual=a.actual;this.expected=a.expected;this.operator=a.operator;this.message=a.message||k(JSON.stringify(this.actual,b),128)+" "+this.operator+" "+k(JSON.stringify(this.expected,b),128)};s.inherits(t.AssertionError,
|
||||
Error);t.fail=g;t.ok=f;t.equal=function(a,c,b){a!=c&&g(a,c,b,"==",t.equal)};t.notEqual=function(a,c,b){a==c&&g(a,c,b,"!=",t.notEqual)};t.deepEqual=function(b,c,e){a(b,c)||g(b,c,e,"deepEqual",t.deepEqual)};t.notDeepEqual=function(b,c,e){a(b,c)&&g(b,c,e,"notDeepEqual",t.notDeepEqual)};t.strictEqual=function(a,c,b){a!==c&&g(a,c,b,"===",t.strictEqual)};t.notStrictEqual=function(a,c,b){a===c&&g(a,c,b,"!==",t.notStrictEqual)};t["throws"]=function(a,c,b){v.apply(this,[!0].concat(y.call(arguments)))};t.doesNotThrow=
|
||||
function(a,c){v.apply(this,[!1].concat(y.call(arguments)))};t.ifError=function(a){if(a)throw a;}},{_shims:5,util:7}],7:[function(h,m,q){function b(c,b){var e={seen:[],stylize:g};3<=arguments.length&&(e.depth=arguments[2]);4<=arguments.length&&(e.colors=arguments[3]);A(b)?e.showHidden=b:b&&q._extend(e,b);d(e.showHidden)&&(e.showHidden=!1);d(e.depth)&&(e.depth=2);d(e.colors)&&(e.colors=!1);d(e.customInspect)&&(e.customInspect=!0);e.colors&&(e.stylize=k);return a(e,c,e.depth)}function k(a,c){var d=b.styles[c];
|
||||
return d?"\u001b["+b.colors[d][0]+"m"+a+"\u001b["+b.colors[d][1]+"m":a}function g(a,c){return a}function f(a){var c={};E.forEach(a,function(a,b){c[a]=!0});return c}function a(b,d,g){if(b.customInspect&&d&&I(d.inspect)&&d.inspect!==q.inspect&&(!d.constructor||d.constructor.prototype!==d)){var k=d.inspect(g);t(k)||(k=a(b,k,g));return k}if(k=e(b,d))return k;var y=E.keys(d),h=f(y);b.showHidden&&(y=E.getOwnPropertyNames(d));if(0===y.length){if(I(d))return b.stylize("[Function"+(d.name?": "+d.name:"")+
|
||||
"]","special");if(c(d))return b.stylize(RegExp.prototype.toString.call(d),"regexp");if(G(d))return b.stylize(Date.prototype.toString.call(d),"date");if(x(d))return"["+Error.prototype.toString.call(d)+"]"}var k="",u=!1,m=["{","}"];s(d)&&(u=!0,m=["[","]"]);I(d)&&(k=" [Function"+(d.name?": "+d.name:"")+"]");c(d)&&(k=" "+RegExp.prototype.toString.call(d));G(d)&&(k=" "+Date.prototype.toUTCString.call(d));x(d)&&(k=" "+("["+Error.prototype.toString.call(d)+"]"));if(0===y.length&&(!u||0==d.length))return m[0]+
|
||||
k+m[1];if(0>g)return c(d)?b.stylize(RegExp.prototype.toString.call(d),"regexp"):b.stylize("[Object]","special");b.seen.push(d);y=u?p(b,d,g,h,y):y.map(function(a){return n(b,d,g,h,a,u)});b.seen.pop();return v(y,k,m)}function e(a,c){if(d(c))return a.stylize("undefined","undefined");if(t(c)){var b="'"+JSON.stringify(c).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(b,"string")}if(y(c))return a.stylize(""+c,"number");if(A(c))return a.stylize(""+c,"boolean");if(null===
|
||||
c)return a.stylize("null","null")}function p(a,c,b,d,e){for(var f=[],g=0,p=c.length;g<p;++g)Object.prototype.hasOwnProperty.call(c,String(g))?f.push(n(a,c,b,d,String(g),!0)):f.push("");E.forEach(e,function(e){e.match(/^\d+$/)||f.push(n(a,c,b,d,e,!0))});return f}function n(c,b,e,f,n,g){var p,k;b=E.getOwnPropertyDescriptor(b,n)||{value:b[n]};b.get?k=b.set?c.stylize("[Getter/Setter]","special"):c.stylize("[Getter]","special"):b.set&&(k=c.stylize("[Setter]","special"));Object.prototype.hasOwnProperty.call(f,
|
||||
n)||(p="["+n+"]");k||(0>E.indexOf(c.seen,b.value)?(k=null===e?a(c,b.value,null):a(c,b.value,e-1),-1<k.indexOf("\n")&&(k=g?k.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+k.split("\n").map(function(a){return" "+a}).join("\n"))):k=c.stylize("[Circular]","special"));if(d(p)){if(g&&n.match(/^\d+$/))return k;p=JSON.stringify(""+n);p.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(p=p.substr(1,p.length-2),p=c.stylize(p,"name")):(p=p.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,
|
||||
"'"),p=c.stylize(p,"string"))}return p+": "+k}function v(a,c,b){var d=0;return 60<E.reduce(a,function(a,c){d++;0<=c.indexOf("\n")&&d++;return a+c.replace(/\u001b\[\d\d?m/g,"").length+1},0)?b[0]+(""===c?"":c+"\n ")+" "+a.join(",\n ")+" "+b[1]:b[0]+c+" "+a.join(", ")+" "+b[1]}function s(a){return E.isArray(a)}function A(a){return"boolean"===typeof a}function y(a){return"number"===typeof a}function t(a){return"string"===typeof a}function d(a){return void 0===a}function c(a){return u(a)&&"[object RegExp]"===
|
||||
Object.prototype.toString.call(a)}function u(a){return"object"===typeof a&&a}function G(a){return u(a)&&"[object Date]"===Object.prototype.toString.call(a)}function x(a){return u(a)&&"[object Error]"===Object.prototype.toString.call(a)}function I(a){return"function"===typeof a}function H(a){return 10>a?"0"+a.toString(10):a.toString(10)}function J(){var a=new Date,c=[H(a.getHours()),H(a.getMinutes()),H(a.getSeconds())].join(":");return[a.getDate(),z[a.getMonth()],c].join(" ")}var E=h("_shims"),r=/%[sdj%]/g;
|
||||
q.format=function(a){if(!t(a)){for(var c=[],d=0;d<arguments.length;d++)c.push(b(arguments[d]));return c.join(" ")}for(var d=1,e=arguments,f=e.length,c=String(a).replace(r,function(a){if("%%"===a)return"%";if(d>=f)return a;switch(a){case "%s":return String(e[d++]);case "%d":return Number(e[d++]);case "%j":try{return JSON.stringify(e[d++])}catch(c){return"[Circular]"}default:return a}}),n=e[d];d<f;n=e[++d])c=null!==n&&u(n)?c+(" "+b(n)):c+(" "+n);return c};q.inspect=b;b.colors={bold:[1,22],italic:[3,
|
||||
23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};b.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};q.isArray=s;q.isBoolean=A;q.isNull=function(a){return null===a};q.isNullOrUndefined=function(a){return null==a};q.isNumber=y;q.isString=t;q.isSymbol=function(a){return"symbol"===typeof a};q.isUndefined=d;q.isRegExp=
|
||||
c;q.isObject=u;q.isDate=G;q.isError=x;q.isFunction=I;q.isPrimitive=function(a){return null===a||"boolean"===typeof a||"number"===typeof a||"string"===typeof a||"symbol"===typeof a||"undefined"===typeof a};q.isBuffer=function(a){return a instanceof Buffer};var z="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");q.log=function(){console.log("%s - %s",J(),q.format.apply(q,arguments))};q.inherits=function(a,c){a.super_=c;a.prototype=E.create(c.prototype,{constructor:{value:a,enumerable:!1,
|
||||
writable:!0,configurable:!0}})};q._extend=function(a,c){if(!c||!u(c))return a;for(var b=E.keys(c),d=b.length;d--;)a[b[d]]=c[b[d]];return a}},{_shims:5}]},{},[]);x.exports=m("buffer-browserify")},{}],7:[function(m,x,h){m=x.exports={};m.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(h){return window.setImmediate(h)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var h=[];window.addEventListener("message",function(m){m.source===window&&
|
||||
"process-tick"===m.data&&(m.stopPropagation(),0<h.length&&h.shift()())},!0);return function(m){h.push(m);window.postMessage("process-tick","*")}}return function(h){setTimeout(h,0)}}();m.title="browser";m.browser=!0;m.env={};m.argv=[];m.binding=function(h){throw Error("process.binding is not supported");};m.cwd=function(){return"/"};m.chdir=function(h){throw Error("process.chdir is not supported");}},{}],8:[function(m,x,h){h.SourceMapGenerator=m("./source-map/source-map-generator").SourceMapGenerator;
|
||||
h.SourceMapConsumer=m("./source-map/source-map-consumer").SourceMapConsumer;h.SourceNode=m("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":13,"./source-map/source-map-generator":14,"./source-map/source-node":15}],9:[function(m,x,h){if("function"!==typeof w)var w=m("amdefine")(x,m);w(function(h,m,q){function b(){this._array=[];this._set={}}var k=h("./util");b.fromArray=function(g,f){for(var a=new b,e=0,p=g.length;e<p;e++)a.add(g[e],f);return a};b.prototype.add=function(b,
|
||||
f){var a=this.has(b),e=this._array.length;a&&!f||this._array.push(b);a||(this._set[k.toSetString(b)]=e)};b.prototype.has=function(b){return Object.prototype.hasOwnProperty.call(this._set,k.toSetString(b))};b.prototype.indexOf=function(b){if(this.has(b))return this._set[k.toSetString(b)];throw Error('"'+b+'" is not in the set.');};b.prototype.at=function(b){if(0<=b&&b<this._array.length)return this._array[b];throw Error("No element indexed by "+b);};b.prototype.toArray=function(){return this._array.slice()};
|
||||
m.ArraySet=b})},{"./util":16,amdefine:17}],10:[function(m,x,h){if("function"!==typeof w)var w=m("amdefine")(x,m);w(function(h,m,q){var b=h("./base64");m.encode=function(k){var g="",f=0>k?(-k<<1)+1:(k<<1)+0;do k=f&31,f>>>=5,0<f&&(k|=32),g+=b.encode(k);while(0<f);return g};m.decode=function(k){var g=0,f=k.length,a=0,e=0,p,n;do{if(g>=f)throw Error("Expected more digits in base 64 VLQ value.");n=b.decode(k.charAt(g++));p=!!(n&32);n&=31;a+=n<<e;e+=5}while(p);f=a>>1;return{value:1===(a&1)?-f:f,rest:k.slice(g)}}})},
|
||||
{"./base64":11,amdefine:17}],11:[function(m,x,h){if("function"!==typeof w)var w=m("amdefine")(x,m);w(function(h,m,q){var b={},k={};"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach(function(g,f){b[g]=f;k[f]=g});m.encode=function(b){if(b in k)return k[b];throw new TypeError("Must be between 0 and 63: "+b);};m.decode=function(g){if(g in b)return b[g];throw new TypeError("Not a valid base 64 digit: "+g);}})},{amdefine:17}],12:[function(m,x,h){if("function"!==typeof w)var w=
|
||||
m("amdefine")(x,m);w(function(h,m,q){function b(k,g,f,a,e){var p=Math.floor((g-k)/2)+k,n=e(f,a[p]);return 0===n?a[p]:0<n?1<g-p?b(p,g,f,a,e):a[p]:1<p-k?b(k,p,f,a,e):0>k?null:a[k]}m.search=function(k,g,f){return 0<g.length?b(-1,g.length,k,g,f):null}})},{amdefine:17}],13:[function(m,x,h){if("function"!==typeof w)var w=m("amdefine")(x,m);w(function(h,m,q){function b(a){var b=a;"string"===typeof a&&(b=JSON.parse(a.replace(/^\)\]\}'/,"")));a=k.getArg(b,"version");var n=k.getArg(b,"sources"),g=k.getArg(b,
|
||||
"names"),h=k.getArg(b,"sourceRoot",null),m=k.getArg(b,"sourcesContent",null),y=k.getArg(b,"mappings"),b=k.getArg(b,"file",null);if(a!==this._version)throw Error("Unsupported version: "+a);this._names=f.fromArray(g,!0);this._sources=f.fromArray(n,!0);this.sourceRoot=h;this.sourcesContent=m;this.file=b;this._generatedMappings=[];this._originalMappings=[];this._parseMappings(y,h)}var k=h("./util"),g=h("./binary-search"),f=h("./array-set").ArraySet,a=h("./base64-vlq");b.prototype._version=3;Object.defineProperty(b.prototype,
|
||||
"sources",{get:function(){return this._sources.toArray().map(function(a){return this.sourceRoot?k.join(this.sourceRoot,a):a},this)}});b.prototype._parseMappings=function(b,f){for(var n=1,g=0,k=0,h=0,y=0,t=0,d=/^[,;]/,c=b,u;0<c.length;)if(";"===c.charAt(0))n++,c=c.slice(1),g=0;else if(","===c.charAt(0))c=c.slice(1);else{u={};u.generatedLine=n;c=a.decode(c);u.generatedColumn=g+c.value;g=u.generatedColumn;c=c.rest;if(0<c.length&&!d.test(c.charAt(0))){c=a.decode(c);u.source=this._sources.at(y+c.value);
|
||||
y+=c.value;c=c.rest;if(0===c.length||d.test(c.charAt(0)))throw Error("Found a source, but no line and column");c=a.decode(c);u.originalLine=k+c.value;k=u.originalLine;u.originalLine+=1;c=c.rest;if(0===c.length||d.test(c.charAt(0)))throw Error("Found a source and line, but no column");c=a.decode(c);u.originalColumn=h+c.value;h=u.originalColumn;c=c.rest;0<c.length&&!d.test(c.charAt(0))&&(c=a.decode(c),u.name=this._names.at(t+c.value),t+=c.value,c=c.rest)}this._generatedMappings.push(u);"number"===typeof u.originalLine&&
|
||||
this._originalMappings.push(u)}this._originalMappings.sort(this._compareOriginalPositions)};b.prototype._compareOriginalPositions=function(a,b){if(a.source>b.source)return 1;if(a.source<b.source)return-1;var f=a.originalLine-b.originalLine;return 0===f?a.originalColumn-b.originalColumn:f};b.prototype._compareGeneratedPositions=function(a,b){var f=a.generatedLine-b.generatedLine;return 0===f?a.generatedColumn-b.generatedColumn:f};b.prototype._findMapping=function(a,b,f,k,h){if(0>=a[f])throw new TypeError("Line must be greater than or equal to 1, got "+
|
||||
a[f]);if(0>a[k])throw new TypeError("Column must be greater than or equal to 0, got "+a[k]);return g.search(a,b,h)};b.prototype.originalPositionFor=function(a){a={generatedLine:k.getArg(a,"line"),generatedColumn:k.getArg(a,"column")};if(a=this._findMapping(a,this._generatedMappings,"generatedLine","generatedColumn",this._compareGeneratedPositions)){var b=k.getArg(a,"source",null);b&&this.sourceRoot&&(b=k.join(this.sourceRoot,b));return{source:b,line:k.getArg(a,"originalLine",null),column:k.getArg(a,
|
||||
"originalColumn",null),name:k.getArg(a,"name",null)}}return{source:null,line:null,column:null,name:null}};b.prototype.sourceContentFor=function(a){if(!this.sourcesContent)return null;this.sourceRoot&&(a=k.relative(this.sourceRoot,a));if(this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];var b;if(this.sourceRoot&&(b=k.urlParse(this.sourceRoot))){var f=a.replace(/^file:\/\//,"");if("file"==b.scheme&&this._sources.has(f))return this.sourcesContent[this._sources.indexOf(f)];if((!b.path||
|
||||
"/"==b.path)&&this._sources.has("/"+a))return this.sourcesContent[this._sources.indexOf("/"+a)]}throw Error('"'+a+'" is not in the SourceMap.');};b.prototype.generatedPositionFor=function(a){a={source:k.getArg(a,"source"),originalLine:k.getArg(a,"line"),originalColumn:k.getArg(a,"column")};this.sourceRoot&&(a.source=k.relative(this.sourceRoot,a.source));return(a=this._findMapping(a,this._originalMappings,"originalLine","originalColumn",this._compareOriginalPositions))?{line:k.getArg(a,"generatedLine",
|
||||
null),column:k.getArg(a,"generatedColumn",null)}:{line:null,column:null}};b.GENERATED_ORDER=1;b.ORIGINAL_ORDER=2;b.prototype.eachMapping=function(a,f,n){f=f||null;switch(n||b.GENERATED_ORDER){case b.GENERATED_ORDER:n=this._generatedMappings;break;case b.ORIGINAL_ORDER:n=this._originalMappings;break;default:throw Error("Unknown order of iteration.");}var g=this.sourceRoot;n.map(function(a){var b=a.source;b&&g&&(b=k.join(g,b));return{source:b,generatedLine:a.generatedLine,generatedColumn:a.generatedColumn,
|
||||
originalLine:a.originalLine,originalColumn:a.originalColumn,name:a.name}}).forEach(a,f)};m.SourceMapConsumer=b})},{"./array-set":9,"./base64-vlq":10,"./binary-search":12,"./util":16,amdefine:17}],14:[function(m,x,h){if("function"!==typeof w)var w=m("amdefine")(x,m);w(function(h,m,q){function b(a){this._file=e.getArg(a,"file");this._sourceRoot=e.getArg(a,"sourceRoot",null);this._sources=new p;this._names=new p;this._mappings=[];this._sourcesContents=null}function k(a,b){var e=(a&&a.line)-(b&&b.line);
|
||||
return e?e:(a&&a.column)-(b&&b.column)}function g(a,b){a=a||"";b=b||"";return(a>b)-(a<b)}function f(a,b){return k(a.generated,b.generated)||k(a.original,b.original)||g(a.source,b.source)||g(a.name,b.name)}var a=h("./base64-vlq"),e=h("./util"),p=h("./array-set").ArraySet;b.prototype._version=3;b.fromSourceMap=function(a){var f=a.sourceRoot,g=new b({file:a.file,sourceRoot:f});a.eachMapping(function(a){var b={generated:{line:a.generatedLine,column:a.generatedColumn}};a.source&&(b.source=a.source,f&&
|
||||
(b.source=e.relative(f,b.source)),b.original={line:a.originalLine,column:a.originalColumn},a.name&&(b.name=a.name));g.addMapping(b)});a.sources.forEach(function(b){var e=a.sourceContentFor(b);e&&g.setSourceContent(b,e)});return g};b.prototype.addMapping=function(a){var b=e.getArg(a,"generated"),f=e.getArg(a,"original",null),g=e.getArg(a,"source",null);a=e.getArg(a,"name",null);this._validateMapping(b,f,g,a);g&&!this._sources.has(g)&&this._sources.add(g);a&&!this._names.has(a)&&this._names.add(a);
|
||||
this._mappings.push({generated:b,original:f,source:g,name:a})};b.prototype.setSourceContent=function(a,b){var f=a;this._sourceRoot&&(f=e.relative(this._sourceRoot,f));null!==b?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[e.toSetString(f)]=b):(delete this._sourcesContents[e.toSetString(f)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))};b.prototype.applySourceMap=function(a,b){b||(b=a.file);var f=this._sourceRoot;f&&(b=e.relative(f,b));var g=
|
||||
new p,k=new p;this._mappings.forEach(function(h){if(h.source===b&&h.original){var d=a.originalPositionFor({line:h.original.line,column:h.original.column});null!==d.source&&(h.source=f?e.relative(f,d.source):d.source,h.original.line=d.line,h.original.column=d.column,null!==d.name&&null!==h.name&&(h.name=d.name))}(d=h.source)&&!g.has(d)&&g.add(d);(h=h.name)&&!k.has(h)&&k.add(h)},this);this._sources=g;this._names=k;a.sources.forEach(function(b){var d=a.sourceContentFor(b);d&&(f&&(b=e.relative(f,b)),
|
||||
this.setSourceContent(b,d))},this)};b.prototype._validateMapping=function(a,b,e,f){if(!(a&&"line"in a&&"column"in a&&0<a.line&&0<=a.column&&!b&&!e&&!f||a&&"line"in a&&"column"in a&&b&&"line"in b&&"column"in b&&0<a.line&&0<=a.column&&0<b.line&&0<=b.column&&e))throw Error("Invalid mapping.");};b.prototype._serializeMappings=function(){var b=0,e=1,g=0,h=0,k=0,p=0,d="",c;this._mappings.sort(f);for(var u=0,m=this._mappings.length;u<m;u++){c=this._mappings[u];if(c.generated.line!==e)for(b=0;c.generated.line!==
|
||||
e;)d+=";",e++;else if(0<u){if(!f(c,this._mappings[u-1]))continue;d+=","}d+=a.encode(c.generated.column-b);b=c.generated.column;c.source&&c.original&&(d+=a.encode(this._sources.indexOf(c.source)-p),p=this._sources.indexOf(c.source),d+=a.encode(c.original.line-1-h),h=c.original.line-1,d+=a.encode(c.original.column-g),g=c.original.column,c.name&&(d+=a.encode(this._names.indexOf(c.name)-k),k=this._names.indexOf(c.name)))}return d};b.prototype.toJSON=function(){var a={version:this._version,file:this._file,
|
||||
sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};this._sourceRoot&&(a.sourceRoot=this._sourceRoot);this._sourcesContents&&(a.sourcesContent=a.sources.map(function(b){a.sourceRoot&&(b=e.relative(a.sourceRoot,b));return Object.prototype.hasOwnProperty.call(this._sourcesContents,e.toSetString(b))?this._sourcesContents[e.toSetString(b)]:null},this));return a};b.prototype.toString=function(){return JSON.stringify(this)};m.SourceMapGenerator=b})},{"./array-set":9,
|
||||
"./base64-vlq":10,"./util":16,amdefine:17}],15:[function(m,x,h){if("function"!==typeof w)var w=m("amdefine")(x,m);w(function(h,m,q){function b(b,a,e,g,h){this.children=[];this.sourceContents={};this.line=void 0===b?null:b;this.column=void 0===a?null:a;this.source=void 0===e?null:e;this.name=void 0===h?null:h;null!=g&&this.add(g)}var k=h("./source-map-generator").SourceMapGenerator,g=h("./util");b.fromStringWithSourceMap=function(f,a){function e(a,e){null===a||void 0===a.source?g.add(e):g.add(new b(a.originalLine,
|
||||
a.originalColumn,a.source,e,a.name))}var g=new b,h=f.split("\n"),k=1,m=0,q=null;a.eachMapping(function(a){if(null===q){for(;k<a.generatedLine;)g.add(h.shift()+"\n"),k++;if(m<a.generatedColumn){var b=h[0];g.add(b.substr(0,a.generatedColumn));h[0]=b.substr(a.generatedColumn);m=a.generatedColumn}}else{if(k<a.generatedLine){var d="";do d+=h.shift()+"\n",k++,m=0;while(k<a.generatedLine);m<a.generatedColumn&&(b=h[0],d+=b.substr(0,a.generatedColumn),h[0]=b.substr(a.generatedColumn),m=a.generatedColumn)}else b=
|
||||
h[0],d=b.substr(0,a.generatedColumn-m),h[0]=b.substr(a.generatedColumn-m),m=a.generatedColumn;e(q,d)}q=a},this);e(q,h.join("\n"));a.sources.forEach(function(b){var e=a.sourceContentFor(b);e&&g.setSourceContent(b,e)});return g};b.prototype.add=function(f){if(Array.isArray(f))f.forEach(function(a){this.add(a)},this);else if(f instanceof b||"string"===typeof f)f&&this.children.push(f);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+f);return this};
|
||||
b.prototype.prepend=function(f){if(Array.isArray(f))for(var a=f.length-1;0<=a;a--)this.prepend(f[a]);else if(f instanceof b||"string"===typeof f)this.children.unshift(f);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+f);return this};b.prototype.walk=function(f){this.children.forEach(function(a){a instanceof b?a.walk(f):""!==a&&f(a,{source:this.source,line:this.line,column:this.column,name:this.name})},this)};b.prototype.join=function(b){var a,
|
||||
e,g=this.children.length;if(0<g){a=[];for(e=0;e<g-1;e++)a.push(this.children[e]),a.push(b);a.push(this.children[e]);this.children=a}return this};b.prototype.replaceRight=function(f,a){var e=this.children[this.children.length-1];e instanceof b?e.replaceRight(f,a):"string"===typeof e?this.children[this.children.length-1]=e.replace(f,a):this.children.push("".replace(f,a));return this};b.prototype.setSourceContent=function(b,a){this.sourceContents[g.toSetString(b)]=a};b.prototype.walkSourceContents=function(f){this.children.forEach(function(a){a instanceof
|
||||
b&&a.walkSourceContents(f)},this);Object.keys(this.sourceContents).forEach(function(a){f(g.fromSetString(a),this.sourceContents[a])},this)};b.prototype.toString=function(){var b="";this.walk(function(a){b+=a});return b};b.prototype.toStringWithSourceMap=function(b){var a="",e=1,g=0,h=new k(b),m=!1,q=null,w=null,y=null,t=null;this.walk(function(b,c){a+=b;null!==c.source&&null!==c.line&&null!==c.column?(q===c.source&&w===c.line&&y===c.column&&t===c.name||h.addMapping({source:c.source,original:{line:c.line,
|
||||
column:c.column},generated:{line:e,column:g},name:c.name}),q=c.source,w=c.line,y=c.column,t=c.name,m=!0):m&&(h.addMapping({generated:{line:e,column:g}}),q=null,m=!1);b.split("").forEach(function(a){"\n"===a?(e++,g=0):g++})});this.walkSourceContents(function(a,b){h.setSourceContent(a,b)});return{code:a,map:h}};m.SourceNode=b})},{"./source-map-generator":14,"./util":16,amdefine:17}],16:[function(m,x,h){if("function"!==typeof w)var w=m("amdefine")(x,m);w(function(h,m,q){function b(b){return(b=b.match(g))?
|
||||
{scheme:b[1],auth:b[3],host:b[4],port:b[6],path:b[7]}:null}function k(b){var a=b.scheme+"://";b.auth&&(a+=b.auth+"@");b.host&&(a+=b.host);b.port&&(a+=":"+b.port);b.path&&(a+=b.path);return a}m.getArg=function(b,a,e){if(a in b)return b[a];if(3===arguments.length)return e;throw Error('"'+a+'" is a required argument.');};var g=/([\w+\-.]+):\/\/((\w+:\w+)@)?([\w.]+)?(:(\d+))?(\S+)?/;m.urlParse=b;m.urlGenerate=k;m.join=function(f,a){var e;return a.match(g)?a:"/"===a.charAt(0)&&(e=b(f))?(e.path=a,k(e)):
|
||||
f.replace(/\/$/,"")+"/"+a};m.toSetString=function(b){return"$"+b};m.fromSetString=function(b){return b.substr(1)};m.relative=function(f,a){f=f.replace(/\/$/,"");var e=b(f);return"/"==a.charAt(0)&&e&&"/"==e.path?a.slice(1):0===a.indexOf(f+"/")?a.substr(f.length+1):a}})},{amdefine:17}],17:[function(m,x,h){var w=m("__browserify_process"),B="/node_modules/source-map/node_modules/amdefine/amdefine.js";"use strict";x.exports=function(h,q){function b(a,b){var d;if(a&&"."===a.charAt(0)&&b){d=b.split("/");
|
||||
d=d.slice(0,d.length-1);var c=d=d.concat(a.split("/")),e,f;for(e=0;c[e];e+=1)if(f=c[e],"."===f)c.splice(e,1),e-=1;else if(".."===f)if(1!==e||".."!==c[2]&&".."!==c[0])0<e&&(c.splice(e-1,2),e-=2);else break;a=d.join("/")}return a}function k(a){return function(e){return b(e,a)}}function g(a){function b(d){p[a]=d}b.fromText=function(a,b){throw Error("amdefine does not implement load.fromText");};return b}function f(a,b,d){var c,e,f;if(a)e=p[a]={},f={id:a,uri:B,exports:e},c=s(q,e,f,a);else{if(n)throw Error("amdefine with no module ID cannot be called more than once per file.");
|
||||
n=!0;e=h.exports;f=h;c=s(q,e,f,h.id)}b&&(b=b.map(function(a){return c(a)}));b="function"===typeof d?d.apply(f.exports,b):d;void 0!==b&&(f.exports=b,a&&(p[a]=f.exports))}function a(a,b,d){Array.isArray(a)?(d=b,b=a,a=void 0):"string"!==typeof a&&(d=a,a=b=void 0);b&&!Array.isArray(b)&&(d=b,b=void 0);b||(b=["require","exports","module"]);a?e[a]=[a,b,d]:f(a,b,d)}var e={},p={},n=!1,v=m("path"),s,x;s=function(a,e,d,c){function f(b,g){if("string"===typeof b)return x(a,e,d,b,c);b=b.map(function(b){return x(a,
|
||||
e,d,b,c)});w.nextTick(function(){g.apply(null,b)})}f.toUrl=function(a){return 0===a.indexOf(".")?b(a,v.dirname(d.filename)):a};return f};q=q||function(){return h.require.apply(h,arguments)};x=function(a,h,d,c,m){var n=c.indexOf("!"),q=c;if(-1===n){c=b(c,m);if("require"===c)return s(a,h,d,m);if("exports"===c)return h;if("module"===c)return d;if(p.hasOwnProperty(c))return p[c];if(e[c])return f.apply(null,e[c]),p[c];if(a)return a(q);throw Error("No module with ID: "+c);}q=c.substring(0,n);c=c.substring(n+
|
||||
1,c.length);n=x(a,h,d,q,m);c=n.normalize?n.normalize(c,k(m)):b(c,m);p[c]||n.load(c,s(a,h,d,m),g(c),{});return p[c]};a.require=function(a){if(p[a])return p[a];if(e[a])return f.apply(null,e[a]),p[a]};a.amd={};return a}},{__browserify_process:7,path:4}],18:[function(m,x,h){function w(a){if(a in s)return s[a];try{if("undefined"!==typeof window){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);var e=4===b.readyState?b.responseText:null}else e=p.readFileSync(a,"utf8")}catch(f){e=null}return s[a]=
|
||||
e}function B(a,b){var f=/^\w+:\/\/[^\/]*/.exec(a),f=f?f[0]:"";return f+e.resolve(a.slice(f.length),b)}function D(a){var b=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(a);return b?(a=t({source:b[2],line:b[3],column:b[4]}),"eval at "+b[1]+" ("+a.source+":"+a.line+":"+a.column+")"):(b=/^eval at ([^(]+) \((.+)\)$/.exec(a))?"eval at "+b[1]+" ("+D(b[2])+")":a}function q(a){var b=a.getFileName()||a.getScriptNameOrSourceURL();if(b){var e=t({source:b,line:a.getLineNumber(),column:a.getColumnNumber()});return{__proto__:a,
|
||||
getFileName:function(){return e.source},getLineNumber:function(){return e.line},getColumnNumber:function(){return e.column},getScriptNameOrSourceURL:function(){return e.source}}}var f=a.isEval()&&a.getEvalOrigin();return f?(f=D(f),{__proto__:a,getEvalOrigin:function(){return f}}):a}function b(a,b){v&&(s={},A={});return a+b.map(function(a){return"\n at "+q(a)}).join("")}function k(a){a&&a.stack||(console.log("Uncaught exception:",a),g.exit());var b=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(a.stack);
|
||||
if(b&&(b=t({source:b[1],line:b[2],column:b[3]}),p.existsSync(b.source))){var e=p.readFileSync(b.source,"utf8").split(/(?:\r\n|\r|\n)/)[b.line-1];e&&(console.log("\n"+b.source+":"+b.line),console.log(e),console.log(Array(+b.column).join(" ")+"^"))}console.log(a.stack);g.exit()}var g=m("__browserify_process"),f=m("__browserify_Buffer").Buffer,a=m("source-map").SourceMapConsumer,e=m("path"),p=m("fs"),n=!1,v=!1,s={},A={},y=function(a){var b=w(a),b=/\/\/[#@]\s*sourceMappingURL=(.*)\s*$/m.exec(b);if(!b)return null;
|
||||
b=b[1];"data:application/json;base64,"==b.slice(0,29).toLowerCase()?a=(new f(b.slice(29),"base64")).toString():(a=e.dirname(a),b=B(a,b),a=w(b,"utf8"));return a?{url:b,map:a}:null},t=h.mapSourcePosition=function(b){var c=A[b.source];if(!c){var f=y(b.source);f&&(c=A[b.source]={url:f.url,map:new a(f.map)})}return c&&(f=c.map.originalPositionFor(b),null!==f.source)?(c.url&&(f.source=B(e.dirname(c.url),f.source)),f):b};h.install=function(a){if(!n){n=!0;Error.prepareStackTrace=b;a=a||{};var c="handleUncaughtExceptions"in
|
||||
a?a.handleUncaughtExceptions:!0;v="emptyCacheBetweenOperations"in a?a.emptyCacheBetweenOperations:!1;a.retrieveSourceMap&&(y=a.retrieveSourceMap);if(c&&"undefined"===typeof window)g.on("uncaughtException",k)}}},{__browserify_Buffer:6,__browserify_process:7,fs:3,path:4,"source-map":8}]},{},[1]);return M});
|
6
browser-test/index.html
Normal file
6
browser-test/index.html
Normal file
@ -0,0 +1,6 @@
|
||||
<p>
|
||||
Make sure to run build.js.
|
||||
This test should say either "Test failed" or "Test passed":
|
||||
</p>
|
||||
<script src="../browser-source-map-support.js"></script>
|
||||
<script src="script.js"></script>
|
12
browser-test/script.coffee
Normal file
12
browser-test/script.coffee
Normal file
@ -0,0 +1,12 @@
|
||||
sourceMapSupport.install()
|
||||
|
||||
foo = -> throw new Error 'foo'
|
||||
|
||||
try
|
||||
foo()
|
||||
catch e
|
||||
if /\bscript\.coffee\b/.test e.stack
|
||||
document.body.appendChild document.createTextNode 'Test passed'
|
||||
else
|
||||
document.body.appendChild document.createTextNode 'Test failed'
|
||||
console.log e.stack
|
27
browser-test/script.js
Normal file
27
browser-test/script.js
Normal file
@ -0,0 +1,27 @@
|
||||
// Generated by CoffeeScript 1.6.3
|
||||
(function() {
|
||||
var e, foo;
|
||||
|
||||
sourceMapSupport.install();
|
||||
|
||||
foo = function() {
|
||||
throw new Error('foo');
|
||||
};
|
||||
|
||||
try {
|
||||
foo();
|
||||
} catch (_error) {
|
||||
e = _error;
|
||||
if (/\bscript\.coffee\b/.test(e.stack)) {
|
||||
document.body.appendChild(document.createTextNode('Test passed'));
|
||||
} else {
|
||||
document.body.appendChild(document.createTextNode('Test failed'));
|
||||
console.log(e.stack);
|
||||
}
|
||||
}
|
||||
|
||||
}).call(this);
|
||||
|
||||
/*
|
||||
//@ sourceMappingURL=script.map
|
||||
*/
|
10
browser-test/script.map
Normal file
10
browser-test/script.map
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"version": 3,
|
||||
"file": "script.js",
|
||||
"sourceRoot": "..",
|
||||
"sources": [
|
||||
"browser-test/script.coffee"
|
||||
],
|
||||
"names": [],
|
||||
"mappings": ";AAAA;CAAA,KAAA;;CAAA,CAAA,KAAA,SAAgB;;CAAhB,CAEA,CAAA,MAAM;CAAG,GAAU,CAAA,KAAA;CAFnB,EAEM;;CAEN;CACE,EAAA,CAAA;IADF,EAAA;CAGE,GADI,EACJ;CAAA,GAAA,CAAG,eAAoB;CACrB,GAAa,EAAb,EAAQ,GAAR,EAA0B,CAAA;MAD5B;CAGE,GAAa,EAAb,EAAQ,GAAR,EAA0B,CAAA;CAA1B,EACA,EAAA,CAAA,CAAO;MAPX;IAJA;CAAA"
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
coffee --map --compile script.coffee
|
||||
browserify --debug script.js > compiled.js
|
@ -1,5 +1,5 @@
|
||||
<p>
|
||||
Make sure to run build.sh.
|
||||
Make sure to run build.js.
|
||||
This test should say either "Test failed" or "Test passed":
|
||||
</p>
|
||||
<script src="compiled.js"></script>
|
||||
|
@ -6,7 +6,7 @@ try
|
||||
foo()
|
||||
catch e
|
||||
if /\bscript\.coffee\b/.test e.stack
|
||||
document.write 'Test passed'
|
||||
document.body.appendChild document.createTextNode 'Test passed'
|
||||
else
|
||||
document.write 'Test failed'
|
||||
document.body.appendChild document.createTextNode 'Test failed'
|
||||
console.log e.stack
|
||||
|
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Use browserify to package up source-map-support.js into source-map-support.browser.js
|
||||
echo 'require("./source-map-support").install();' > .temp.js && \
|
||||
echo '/*
|
||||
* Support for source maps in V8 stack traces
|
||||
* https://github.com/evanw/node-source-map-support
|
||||
*/' > source-map-support.browser.js && \
|
||||
browserify .temp.js | \
|
||||
sed 's/\bbyte\b/bite/g' | \
|
||||
sed 's/[[:<:]]byte[[:>:]]/bite/g' | \
|
||||
sed 's/@license/license/g' | \
|
||||
python -c 'import sys, urllib; sys.stdout.write("output_info=compiled_code&output_format=text&compilation_level=SIMPLE_OPTIMIZATIONS&js_code=" + urllib.quote(sys.stdin.read(), safe=""))' | \
|
||||
curl -d @- 'http://closure-compiler.appspot.com/compile' >> source-map-support.browser.js && \
|
||||
rm .temp.js
|
57
build.js
Executable file
57
build.js
Executable file
@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var fs = require('fs');
|
||||
var querystring = require('querystring');
|
||||
var child_process = require('child_process');
|
||||
|
||||
// Use browserify to package up source-map-support.js
|
||||
fs.writeFileSync('.temp.js', 'sourceMapSupport = require("./source-map-support");');
|
||||
child_process.exec('node_modules/browserify/bin/cmd.js .temp.js', function(error, stdout) {
|
||||
if (error) throw error;
|
||||
|
||||
// Wrap the code so it works both as a normal <script> module and as an AMD module
|
||||
var header = [
|
||||
'/*',
|
||||
' * Support for source maps in V8 stack traces',
|
||||
' * https://github.com/evanw/node-source-map-support',
|
||||
' */',
|
||||
].join('\n');
|
||||
var code = [
|
||||
'(this["define"] || function(name, callback) { this["sourceMapSupport"] = callback(); })("browser-source-map-support", function(sourceMapSupport) {',
|
||||
stdout.replace(/\bbyte\b/g, 'bite').replace(/@license/g, 'license'),
|
||||
'return sourceMapSupport});',
|
||||
].join('\n');
|
||||
|
||||
// Use the online Google Closure Compiler service for minification
|
||||
fs.writeFileSync('.temp.js', querystring.stringify({
|
||||
compilation_level: 'SIMPLE_OPTIMIZATIONS',
|
||||
output_info: 'compiled_code',
|
||||
output_format: 'text',
|
||||
js_code: code
|
||||
}));
|
||||
child_process.exec('curl -d @.temp.js "http://closure-compiler.appspot.com/compile"', function(error, stdout) {
|
||||
if (error) throw error;
|
||||
var code = header + '\n' + stdout;
|
||||
fs.unlinkSync('.temp.js');
|
||||
fs.writeFileSync('browser-source-map-support.js', code);
|
||||
fs.writeFileSync('amd-test/browser-source-map-support.js', code);
|
||||
});
|
||||
});
|
||||
|
||||
// Build the AMD test
|
||||
child_process.exec('node_modules/coffee-script/bin/coffee --map --compile amd-test/script.coffee', function(error) {
|
||||
if (error) throw error;
|
||||
});
|
||||
|
||||
// Build the browserify test
|
||||
child_process.exec('node_modules/coffee-script/bin/coffee --map --compile browserify-test/script.coffee', function(error) {
|
||||
if (error) throw error;
|
||||
child_process.exec('node_modules/browserify/bin/cmd.js --debug browserify-test/script.js > browserify-test/compiled.js', function(error) {
|
||||
if (error) throw error;
|
||||
})
|
||||
});
|
||||
|
||||
// Build the browser test
|
||||
child_process.exec('node_modules/coffee-script/bin/coffee --map --compile browser-test/script.coffee', function(error) {
|
||||
if (error) throw error;
|
||||
});
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "source-map-support",
|
||||
"description": "Fixes stack traces for files with source maps",
|
||||
"version": "0.2.4",
|
||||
"version": "0.2.5",
|
||||
"main": "./source-map-support.js",
|
||||
"scripts": {
|
||||
"test": "node_modules/mocha/bin/mocha"
|
||||
@ -10,6 +10,8 @@
|
||||
"source-map": "0.1.29"
|
||||
},
|
||||
"devDependencies": {
|
||||
"coffee-script": "1.6.3",
|
||||
"browserify": "2.35.2",
|
||||
"mocha": "1.8.1"
|
||||
},
|
||||
"repository": {
|
||||
|
@ -1,145 +0,0 @@
|
||||
/*
|
||||
* Support for source maps in V8 stack traces
|
||||
* https://github.com/evanw/node-source-map-support
|
||||
*/
|
||||
(function(k,v,p){function g(e,a){if(!v[e]){if(!k[e]){var c="function"==typeof require&&require;if(!a&&c)return c(e,!0);if(E)return E(e,!0);throw Error("Cannot find module '"+e+"'");}c=v[e]={exports:{}};k[e][0].call(c.exports,function(a){var d=k[e][1][a];return g(d?d:a)},c,c.exports)}return v[e].exports}for(var E="function"==typeof require&&require,h=0;h<p.length;h++)g(p[h]);return g})({1:[function(k,v,p){k("./source-map-support").install()},{"./source-map-support":12}],2:[function(k,v,p){p.SourceMapGenerator=
|
||||
k("./source-map/source-map-generator").SourceMapGenerator;p.SourceMapConsumer=k("./source-map/source-map-consumer").SourceMapConsumer;p.SourceNode=k("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":7,"./source-map/source-map-generator":8,"./source-map/source-node":9}],3:[function(k,v,p){if("function"!==typeof g)var g=k("amdefine")(v,k);g(function(g,h,e){function a(){this._array=[];this._set={}}var c=g("./util");a.fromArray=function(c,d){for(var f=new a,b=0,e=c.length;b<
|
||||
e;b++)f.add(c[b],d);return f};a.prototype.add=function(a,d){var f=this.has(a),b=this._array.length;f&&!d||this._array.push(a);f||(this._set[c.toSetString(a)]=b)};a.prototype.has=function(a){return Object.prototype.hasOwnProperty.call(this._set,c.toSetString(a))};a.prototype.indexOf=function(a){if(this.has(a))return this._set[c.toSetString(a)];throw Error('"'+a+'" is not in the set.');};a.prototype.at=function(a){if(0<=a&&a<this._array.length)return this._array[a];throw Error("No element indexed by "+
|
||||
a);};a.prototype.toArray=function(){return this._array.slice()};h.ArraySet=a})},{"./util":10,amdefine:11}],4:[function(k,v,p){if("function"!==typeof g)var g=k("amdefine")(v,k);g(function(g,h,e){var a=g("./base64");h.encode=function(c){var e="",d=0>c?(-c<<1)+1:(c<<1)+0;do c=d&31,d>>>=5,0<d&&(c|=32),e+=a.encode(c);while(0<d);return e};h.decode=function(c){var e=0,d=c.length,f=0,b=0,q,x;do{if(e>=d)throw Error("Expected more digits in base 64 VLQ value.");x=a.decode(c.charAt(e++));q=!!(x&32);x&=31;f+=
|
||||
x<<b;b+=5}while(q);d=f>>1;return{value:1===(f&1)?-d:d,rest:c.slice(e)}}})},{"./base64":5,amdefine:11}],5:[function(k,v,p){if("function"!==typeof g)var g=k("amdefine")(v,k);g(function(g,h,e){var a={},c={};"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach(function(e,d){a[e]=d;c[d]=e});h.encode=function(a){if(a in c)return c[a];throw new TypeError("Must be between 0 and 63: "+a);};h.decode=function(c){if(c in a)return a[c];throw new TypeError("Not a valid base 64 digit: "+
|
||||
c);}})},{amdefine:11}],6:[function(k,v,p){if("function"!==typeof g)var g=k("amdefine")(v,k);g(function(g,h,e){function a(c,e,d,f,b){var q=Math.floor((e-c)/2)+c,x=b(d,f[q]);return 0===x?f[q]:0<x?1<e-q?a(q,e,d,f,b):f[q]:1<q-c?a(c,q,d,f,b):0>c?null:f[c]}h.search=function(c,e,d){return 0<e.length?a(-1,e.length,c,e,d):null}})},{amdefine:11}],7:[function(k,v,p){if("function"!==typeof g)var g=k("amdefine")(v,k);g(function(g,h,e){function a(b){var a=b;"string"===typeof b&&(a=JSON.parse(b.replace(/^\)\]\}'/,
|
||||
"")));b=c.getArg(a,"version");var f=c.getArg(a,"sources"),e=c.getArg(a,"names"),m=c.getArg(a,"sourceRoot",null),g=c.getArg(a,"sourcesContent",null),s=c.getArg(a,"mappings"),a=c.getArg(a,"file",null);if(b!==this._version)throw Error("Unsupported version: "+b);this._names=d.fromArray(e,!0);this._sources=d.fromArray(f,!0);this.sourceRoot=m;this.sourcesContent=g;this.file=a;this._generatedMappings=[];this._originalMappings=[];this._parseMappings(s,m)}var c=g("./util"),m=g("./binary-search"),d=g("./array-set").ArraySet,
|
||||
f=g("./base64-vlq");a.prototype._version=3;Object.defineProperty(a.prototype,"sources",{get:function(){return this._sources.toArray().map(function(b){return this.sourceRoot?c.join(this.sourceRoot,b):b},this)}});a.prototype._parseMappings=function(b,a){for(var d=1,c=0,e=0,m=0,s=0,r=0,t=/^[,;]/,n=b,z;0<n.length;)if(";"===n.charAt(0))d++,n=n.slice(1),c=0;else if(","===n.charAt(0))n=n.slice(1);else{z={};z.generatedLine=d;n=f.decode(n);z.generatedColumn=c+n.value;c=z.generatedColumn;n=n.rest;if(0<n.length&&
|
||||
!t.test(n.charAt(0))){n=f.decode(n);z.source=this._sources.at(s+n.value);s+=n.value;n=n.rest;if(0===n.length||t.test(n.charAt(0)))throw Error("Found a source, but no line and column");n=f.decode(n);z.originalLine=e+n.value;e=z.originalLine;z.originalLine+=1;n=n.rest;if(0===n.length||t.test(n.charAt(0)))throw Error("Found a source and line, but no column");n=f.decode(n);z.originalColumn=m+n.value;m=z.originalColumn;n=n.rest;0<n.length&&!t.test(n.charAt(0))&&(n=f.decode(n),z.name=this._names.at(r+n.value),
|
||||
r+=n.value,n=n.rest)}this._generatedMappings.push(z);"number"===typeof z.originalLine&&this._originalMappings.push(z)}this._originalMappings.sort(this._compareOriginalPositions)};a.prototype._compareOriginalPositions=function(b,a){if(b.source>a.source)return 1;if(b.source<a.source)return-1;var d=b.originalLine-a.originalLine;return 0===d?b.originalColumn-a.originalColumn:d};a.prototype._compareGeneratedPositions=function(b,a){var d=b.generatedLine-a.generatedLine;return 0===d?b.generatedColumn-a.generatedColumn:
|
||||
d};a.prototype._findMapping=function(b,a,d,c,f){if(0>=b[d])throw new TypeError("Line must be greater than or equal to 1, got "+b[d]);if(0>b[c])throw new TypeError("Column must be greater than or equal to 0, got "+b[c]);return m.search(b,a,f)};a.prototype.originalPositionFor=function(b){b={generatedLine:c.getArg(b,"line"),generatedColumn:c.getArg(b,"column")};if(b=this._findMapping(b,this._generatedMappings,"generatedLine","generatedColumn",this._compareGeneratedPositions)){var a=c.getArg(b,"source",
|
||||
null);a&&this.sourceRoot&&(a=c.join(this.sourceRoot,a));return{source:a,line:c.getArg(b,"originalLine",null),column:c.getArg(b,"originalColumn",null),name:c.getArg(b,"name",null)}}return{source:null,line:null,column:null,name:null}};a.prototype.sourceContentFor=function(b){if(!this.sourcesContent)return null;this.sourceRoot&&(b=c.relative(this.sourceRoot,b));if(this._sources.has(b))return this.sourcesContent[this._sources.indexOf(b)];var a;if(this.sourceRoot&&(a=c.urlParse(this.sourceRoot))){var d=
|
||||
b.replace(/^file:\/\//,"");if("file"==a.scheme&&this._sources.has(d))return this.sourcesContent[this._sources.indexOf(d)];if((!a.path||"/"==a.path)&&this._sources.has("/"+b))return this.sourcesContent[this._sources.indexOf("/"+b)]}throw Error('"'+b+'" is not in the SourceMap.');};a.prototype.generatedPositionFor=function(b){b={source:c.getArg(b,"source"),originalLine:c.getArg(b,"line"),originalColumn:c.getArg(b,"column")};this.sourceRoot&&(b.source=c.relative(this.sourceRoot,b.source));return(b=this._findMapping(b,
|
||||
this._originalMappings,"originalLine","originalColumn",this._compareOriginalPositions))?{line:c.getArg(b,"generatedLine",null),column:c.getArg(b,"generatedColumn",null)}:{line:null,column:null}};a.GENERATED_ORDER=1;a.ORIGINAL_ORDER=2;a.prototype.eachMapping=function(b,d,f){d=d||null;switch(f||a.GENERATED_ORDER){case a.GENERATED_ORDER:f=this._generatedMappings;break;case a.ORIGINAL_ORDER:f=this._originalMappings;break;default:throw Error("Unknown order of iteration.");}var e=this.sourceRoot;f.map(function(b){var a=
|
||||
b.source;a&&e&&(a=c.join(e,a));return{source:a,generatedLine:b.generatedLine,generatedColumn:b.generatedColumn,originalLine:b.originalLine,originalColumn:b.originalColumn,name:b.name}}).forEach(b,d)};h.SourceMapConsumer=a})},{"./array-set":3,"./base64-vlq":4,"./binary-search":6,"./util":10,amdefine:11}],8:[function(k,v,p){if("function"!==typeof g)var g=k("amdefine")(v,k);g(function(g,h,e){function a(a){this._file=b.getArg(a,"file");this._sourceRoot=b.getArg(a,"sourceRoot",null);this._sources=new q;
|
||||
this._names=new q;this._mappings=[];this._sourcesContents=null}function c(b,a){var d=(b&&b.line)-(a&&a.line);return d?d:(b&&b.column)-(a&&a.column)}function m(b,a){b=b||"";a=a||"";return(b>a)-(b<a)}function d(b,a){return c(b.generated,a.generated)||c(b.original,a.original)||m(b.source,a.source)||m(b.name,a.name)}var f=g("./base64-vlq"),b=g("./util"),q=g("./array-set").ArraySet;a.prototype._version=3;a.fromSourceMap=function(d){var c=d.sourceRoot,f=new a({file:d.file,sourceRoot:c});d.eachMapping(function(a){var d=
|
||||
{generated:{line:a.generatedLine,column:a.generatedColumn}};a.source&&(d.source=a.source,c&&(d.source=b.relative(c,d.source)),d.original={line:a.originalLine,column:a.originalColumn},a.name&&(d.name=a.name));f.addMapping(d)});d.sources.forEach(function(b){var a=d.sourceContentFor(b);a&&f.setSourceContent(b,a)});return f};a.prototype.addMapping=function(a){var d=b.getArg(a,"generated"),c=b.getArg(a,"original",null),f=b.getArg(a,"source",null);a=b.getArg(a,"name",null);this._validateMapping(d,c,f,a);
|
||||
f&&!this._sources.has(f)&&this._sources.add(f);a&&!this._names.has(a)&&this._names.add(a);this._mappings.push({generated:d,original:c,source:f,name:a})};a.prototype.setSourceContent=function(a,d){var c=a;this._sourceRoot&&(c=b.relative(this._sourceRoot,c));null!==d?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[b.toSetString(c)]=d):(delete this._sourcesContents[b.toSetString(c)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))};a.prototype.applySourceMap=
|
||||
function(a,d){d||(d=a.file);var c=this._sourceRoot;c&&(d=b.relative(c,d));var f=new q,e=new q;this._mappings.forEach(function(r){if(r.source===d&&r.original){var t=a.originalPositionFor({line:r.original.line,column:r.original.column});null!==t.source&&(r.source=c?b.relative(c,t.source):t.source,r.original.line=t.line,r.original.column=t.column,null!==t.name&&null!==r.name&&(r.name=t.name))}(t=r.source)&&!f.has(t)&&f.add(t);(r=r.name)&&!e.has(r)&&e.add(r)},this);this._sources=f;this._names=e;a.sources.forEach(function(d){var t=
|
||||
a.sourceContentFor(d);t&&(c&&(d=b.relative(c,d)),this.setSourceContent(d,t))},this)};a.prototype._validateMapping=function(b,a,d,c){if(!(b&&"line"in b&&"column"in b&&0<b.line&&0<=b.column&&!a&&!d&&!c||b&&"line"in b&&"column"in b&&a&&"line"in a&&"column"in a&&0<b.line&&0<=b.column&&0<a.line&&0<=a.column&&d))throw Error("Invalid mapping.");};a.prototype._serializeMappings=function(){var b=0,a=1,c=0,e=0,m=0,r=0,t="",n;this._mappings.sort(d);for(var q=0,g=this._mappings.length;q<g;q++){n=this._mappings[q];
|
||||
if(n.generated.line!==a)for(b=0;n.generated.line!==a;)t+=";",a++;else if(0<q){if(!d(n,this._mappings[q-1]))continue;t+=","}t+=f.encode(n.generated.column-b);b=n.generated.column;n.source&&n.original&&(t+=f.encode(this._sources.indexOf(n.source)-r),r=this._sources.indexOf(n.source),t+=f.encode(n.original.line-1-e),e=n.original.line-1,t+=f.encode(n.original.column-c),c=n.original.column,n.name&&(t+=f.encode(this._names.indexOf(n.name)-m),m=this._names.indexOf(n.name)))}return t};a.prototype.toJSON=
|
||||
function(){var a={version:this._version,file:this._file,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};this._sourceRoot&&(a.sourceRoot=this._sourceRoot);this._sourcesContents&&(a.sourcesContent=a.sources.map(function(d){a.sourceRoot&&(d=b.relative(a.sourceRoot,d));return Object.prototype.hasOwnProperty.call(this._sourcesContents,b.toSetString(d))?this._sourcesContents[b.toSetString(d)]:null},this));return a};a.prototype.toString=function(){return JSON.stringify(this)};
|
||||
h.SourceMapGenerator=a})},{"./array-set":3,"./base64-vlq":4,"./util":10,amdefine:11}],9:[function(k,v,p){if("function"!==typeof g)var g=k("amdefine")(v,k);g(function(g,h,e){function a(a,c,b,e,m){this.children=[];this.sourceContents={};this.line=void 0===a?null:a;this.column=void 0===c?null:c;this.source=void 0===b?null:b;this.name=void 0===m?null:m;null!=e&&this.add(e)}var c=g("./source-map-generator").SourceMapGenerator,m=g("./util");a.fromStringWithSourceMap=function(d,c){function b(b,d){null===
|
||||
b||void 0===b.source?e.add(d):e.add(new a(b.originalLine,b.originalColumn,b.source,d,b.name))}var e=new a,m=d.split("\n"),g=1,h=0,k=null;c.eachMapping(function(a){if(null===k){for(;g<a.generatedLine;)e.add(m.shift()+"\n"),g++;if(h<a.generatedColumn){var d=m[0];e.add(d.substr(0,a.generatedColumn));m[0]=d.substr(a.generatedColumn);h=a.generatedColumn}}else{if(g<a.generatedLine){var c="";do c+=m.shift()+"\n",g++,h=0;while(g<a.generatedLine);h<a.generatedColumn&&(d=m[0],c+=d.substr(0,a.generatedColumn),
|
||||
m[0]=d.substr(a.generatedColumn),h=a.generatedColumn)}else d=m[0],c=d.substr(0,a.generatedColumn-h),m[0]=d.substr(a.generatedColumn-h),h=a.generatedColumn;b(k,c)}k=a},this);b(k,m.join("\n"));c.sources.forEach(function(b){var a=c.sourceContentFor(b);a&&e.setSourceContent(b,a)});return e};a.prototype.add=function(d){if(Array.isArray(d))d.forEach(function(a){this.add(a)},this);else if(d instanceof a||"string"===typeof d)d&&this.children.push(d);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+
|
||||
d);return this};a.prototype.prepend=function(d){if(Array.isArray(d))for(var c=d.length-1;0<=c;c--)this.prepend(d[c]);else if(d instanceof a||"string"===typeof d)this.children.unshift(d);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+d);return this};a.prototype.walk=function(d){this.children.forEach(function(c){c instanceof a?c.walk(d):""!==c&&d(c,{source:this.source,line:this.line,column:this.column,name:this.name})},this)};a.prototype.join=
|
||||
function(a){var c,b,e=this.children.length;if(0<e){c=[];for(b=0;b<e-1;b++)c.push(this.children[b]),c.push(a);c.push(this.children[b]);this.children=c}return this};a.prototype.replaceRight=function(d,c){var b=this.children[this.children.length-1];b instanceof a?b.replaceRight(d,c):"string"===typeof b?this.children[this.children.length-1]=b.replace(d,c):this.children.push("".replace(d,c));return this};a.prototype.setSourceContent=function(a,c){this.sourceContents[m.toSetString(a)]=c};a.prototype.walkSourceContents=
|
||||
function(d){this.children.forEach(function(c){c instanceof a&&c.walkSourceContents(d)},this);Object.keys(this.sourceContents).forEach(function(a){d(m.fromSetString(a),this.sourceContents[a])},this)};a.prototype.toString=function(){var a="";this.walk(function(c){a+=c});return a};a.prototype.toStringWithSourceMap=function(a){var e="",b=1,m=0,g=new c(a),h=!1,k=null,w=null,s=null,r=null;this.walk(function(a,d){e+=a;null!==d.source&&null!==d.line&&null!==d.column?(k===d.source&&w===d.line&&s===d.column&&
|
||||
r===d.name||g.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:b,column:m},name:d.name}),k=d.source,w=d.line,s=d.column,r=d.name,h=!0):h&&(g.addMapping({generated:{line:b,column:m}}),k=null,h=!1);a.split("").forEach(function(a){"\n"===a?(b++,m=0):m++})});this.walkSourceContents(function(a,b){g.setSourceContent(a,b)});return{code:e,map:g}};h.SourceNode=a})},{"./source-map-generator":8,"./util":10,amdefine:11}],10:[function(k,v,p){if("function"!==typeof g)var g=k("amdefine")(v,
|
||||
k);g(function(g,h,e){function a(a){return(a=a.match(m))?{scheme:a[1],auth:a[3],host:a[4],port:a[6],path:a[7]}:null}function c(a){var c=a.scheme+"://";a.auth&&(c+=a.auth+"@");a.host&&(c+=a.host);a.port&&(c+=":"+a.port);a.path&&(c+=a.path);return c}h.getArg=function(a,c,b){if(c in a)return a[c];if(3===arguments.length)return b;throw Error('"'+c+'" is a required argument.');};var m=/([\w+\-.]+):\/\/((\w+:\w+)@)?([\w.]+)?(:(\d+))?(\S+)?/;h.urlParse=a;h.urlGenerate=c;h.join=function(d,e){var b;return e.match(m)?
|
||||
e:"/"===e.charAt(0)&&(b=a(d))?(b.path=e,c(b)):d.replace(/\/$/,"")+"/"+e};h.toSetString=function(a){return"$"+a};h.fromSetString=function(a){return a.substr(1)};h.relative=function(c,e){c=c.replace(/\/$/,"");var b=a(c);return"/"==e.charAt(0)&&b&&"/"==b.path?e.slice(1):0===e.indexOf(c+"/")?e.substr(c.length+1):e}})},{amdefine:11}],11:[function(k,v,p){(function(g,E){v.exports=function(h,e){function a(a,b){var c;if(a&&"."===a.charAt(0)&&b){c=b.split("/");c=c.slice(0,c.length-1);var d=c=c.concat(a.split("/")),
|
||||
e,f;for(e=0;d[e];e+=1)if(f=d[e],"."===f)d.splice(e,1),e-=1;else if(".."===f)if(1!==e||".."!==d[2]&&".."!==d[0])0<e&&(d.splice(e-1,2),e-=2);else break;a=c.join("/")}return a}function c(b){return function(c){return a(c,b)}}function m(a){function b(c){q[a]=c}b.fromText=function(a,b){throw Error("amdefine does not implement load.fromText");};return b}function d(a,b,c){var d,f,m;if(a)f=q[a]={},m={id:a,uri:E,exports:f},d=u(e,f,m,a);else{if(x)throw Error("amdefine with no module ID cannot be called more than once per file.");
|
||||
x=!0;f=h.exports;m=h;d=u(e,f,m,h.id)}b&&(b=b.map(function(a){return d(a)}));b="function"===typeof c?c.apply(m.exports,b):c;void 0!==b&&(m.exports=b,a&&(q[a]=m.exports))}function f(a,c,e){Array.isArray(a)?(e=c,c=a,a=void 0):"string"!==typeof a&&(e=a,a=c=void 0);c&&!Array.isArray(c)&&(e=c,c=void 0);c||(c=["require","exports","module"]);a?b[a]=[a,c,e]:d(a,c,e)}var b={},q={},x=!1,B=k("path"),u,w;u=function(b,c,d,e){function f(a,m){if("string"===typeof a)return w(b,c,d,a,e);a=a.map(function(a){return w(b,
|
||||
c,d,a,e)});g.nextTick(function(){m.apply(null,a)})}f.toUrl=function(b){return 0===b.indexOf(".")?a(b,B.dirname(d.filename)):b};return f};e=e||function(){return h.require.apply(h,arguments)};w=function(e,f,t,n,g){var h=n.indexOf("!"),x=n;if(-1===h){n=a(n,g);if("require"===n)return u(e,f,t,g);if("exports"===n)return f;if("module"===n)return t;if(q.hasOwnProperty(n))return q[n];if(b[n])return d.apply(null,b[n]),q[n];if(e)return e(x);throw Error("No module with ID: "+n);}x=n.substring(0,h);n=n.substring(h+
|
||||
1,n.length);h=w(e,f,t,x,g);n=h.normalize?h.normalize(n,c(g)):a(n,g);q[n]||h.load(n,u(e,f,t,g),m(n),{});return q[n]};f.require=function(a){if(q[a])return q[a];if(b[a])return d.apply(null,b[a]),q[a]};f.amd={};return f}})(k("__browserify_process"),"/node_modules/source-map/node_modules/amdefine/amdefine.js")},{__browserify_process:16,path:14}],12:[function(k,v,p){(function(g,E){function h(a){if(a in u)return u[a];try{if("undefined"!==typeof window){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);
|
||||
var c=4===b.readyState?b.responseText:null}else c=q.readFileSync(a,"utf8")}catch(d){c=null}return u[a]=c}function e(a,c){var d=/^\w+:\/\/[^\/]*/.exec(a),d=d?d[0]:"";return d+b.resolve(a.slice(d.length),c)}function a(b){var c=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(b);return c?(b=r({source:c[2],line:c[3],column:c[4]}),"eval at "+c[1]+" ("+b.source+":"+b.line+":"+b.column+")"):(c=/^eval at ([^(]+) \((.+)\)$/.exec(b))?"eval at "+c[1]+" ("+a(c[2])+")":b}function c(b){var c=b.getFileName()||b.getScriptNameOrSourceURL();
|
||||
if(c){var d=r({source:c,line:b.getLineNumber(),column:b.getColumnNumber()});return{__proto__:b,getFileName:function(){return d.source},getLineNumber:function(){return d.line},getColumnNumber:function(){return d.column},getScriptNameOrSourceURL:function(){return d.source}}}var e=b.isEval()&&b.getEvalOrigin();return e?(e=a(e),{__proto__:b,getEvalOrigin:function(){return e}}):b}function m(a,b){B&&(u={},w={});return a+b.map(function(a){return"\n at "+c(a)}).join("")}function d(a){a&&a.stack||(console.log("Uncaught exception:",
|
||||
a),g.exit());var b=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(a.stack);if(b&&(b=r({source:b[1],line:b[2],column:b[3]}),q.existsSync(b.source))){var c=q.readFileSync(b.source,"utf8").split(/(?:\r\n|\r|\n)/)[b.line-1];c&&(console.log("\n"+b.source+":"+b.line),console.log(c),console.log(Array(+b.column).join(" ")+"^"))}console.log(a.stack);g.exit()}var f=k("source-map").SourceMapConsumer,b=k("path"),q=k("fs"),x=!1,B=!1,u={},w={},s=function(a){var c=h(a),c=/\/\/[#@]\s*sourceMappingURL=(.*)\s*$/m.exec(c);
|
||||
if(!c)return null;c=c[1];"data:application/json;base64,"==c.slice(0,29).toLowerCase()?a=(new E(c.slice(29),"base64")).toString():(a=b.dirname(a),c=e(a,c),a=h(c,"utf8"));return a?{url:c,map:a}:null},r=p.mapSourcePosition=function(a){var c=w[a.source];if(!c){var d=s(a.source);d&&(c=w[a.source]={url:d.url,map:new f(d.map)})}return c&&(d=c.map.originalPositionFor(a),null!==d.source)?(c.url&&(d.source=e(b.dirname(c.url),d.source)),d):a};p.install=function(a){if(!x){x=!0;Error.prepareStackTrace=m;a=a||
|
||||
{};var b="handleUncaughtExceptions"in a?a.handleUncaughtExceptions:!0;B="emptyCacheBetweenOperations"in a?a.emptyCacheBetweenOperations:!1;a.retrieveSourceMap&&(s=a.retrieveSourceMap);if(b&&"undefined"===typeof window)g.on("uncaughtException",d)}}})(k("__browserify_process"),k("__browserify_Buffer").Buffer)},{__browserify_Buffer:15,__browserify_process:16,fs:13,path:14,"source-map":2}],13:[function(k,v,p){},{}],14:[function(k,v,p){(function(g){function k(a,c){for(var e=[],d=0;d<a.length;d++)c(a[d],
|
||||
d,a)&&e.push(a[d]);return e}function h(a,c){for(var e=0,d=a.length;0<=d;d--){var f=a[d];"."==f?a.splice(d,1):".."===f?(a.splice(d,1),e++):e&&(a.splice(d,1),e--)}if(c)for(;e--;e)a.unshift("..");return a}var e=/^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/;p.resolve=function(){for(var a="",c=!1,e=arguments.length;-1<=e&&!c;e--){var d=0<=e?arguments[e]:g.cwd();"string"===typeof d&&d&&(a=d+"/"+a,c="/"===d.charAt(0))}a=h(k(a.split("/"),function(a){return!!a}),!c).join("/");return(c?"/":"")+a||"."};p.normalize=
|
||||
function(a){var c="/"===a.charAt(0),e="/"===a.slice(-1);(a=h(k(a.split("/"),function(a){return!!a}),!c).join("/"))||c||(a=".");a&&e&&(a+="/");return(c?"/":"")+a};p.join=function(){var a=Array.prototype.slice.call(arguments,0);return p.normalize(k(a,function(a,e){return a&&"string"===typeof a}).join("/"))};p.dirname=function(a){return(a=e.exec(a)[1]||"")?1===a.length?a:a.substring(0,a.length-1):"."};p.basename=function(a,c){var m=e.exec(a)[2]||"";c&&m.substr(-1*c.length)===c&&(m=m.substr(0,m.length-
|
||||
c.length));return m};p.extname=function(a){return e.exec(a)[3]||""};p.relative=function(a,c){function e(a){for(var b=0;b<a.length&&""===a[b];b++);for(var c=a.length-1;0<=c&&""===a[c];c--);return b>c?[]:a.slice(b,c-b+1)}a=p.resolve(a).substr(1);c=p.resolve(c).substr(1);for(var d=e(a.split("/")),f=e(c.split("/")),b=Math.min(d.length,f.length),g=b,h=0;h<b;h++)if(d[h]!==f[h]){g=h;break}b=[];for(h=g;h<d.length;h++)b.push("..");b=b.concat(f.slice(g));return b.join("/")}})(k("__browserify_process"))},{__browserify_process:16}],
|
||||
15:[function(k,v,p){k=function(g,k,h,e){function a(c){if(!h[c]){if(!k[c]){if(g)return g(c);throw Error("Cannot find module '"+c+"'");}var d=h[c]={exports:{}};k[c][0](function(d){var b=k[c][1][d];return a(b?b:d)},d,d.exports)}return h[c].exports}for(var c=0;c<e.length;c++)a(e[c]);return a}("undefined"!==typeof k&&k,{1:[function(g,k,h){function e(a){if(Object.keys)return Object.keys(a);var b=[],c;for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c);return b}function a(a,b){return void 0===
|
||||
b?""+b:"number"===typeof b&&(isNaN(b)||!isFinite(b))||"function"===typeof b||b instanceof RegExp?b.toString():b}function c(a,b){return"string"==typeof a?a.length<b?a:a.slice(0,b):a}function m(a,b,c,d,e){throw new s.AssertionError({message:c,actual:a,expected:b,operator:d,stackStartFunction:e});}function d(a,b){a||m(a,!0,b,"==",s.ok)}function f(a,b){if(a===b)return!0;if(u.isBuffer(a)&&u.isBuffer(b)){if(a.length!=b.length)return!1;for(var c=0;c<a.length;c++)if(a[c]!==b[c])return!1;return!0}return a instanceof
|
||||
Date&&b instanceof Date?a.getTime()===b.getTime():"object"!=typeof a&&"object"!=typeof b?a==b:q(a,b)}function b(a){return"[object Arguments]"==Object.prototype.toString.call(a)}function q(a,c){if(null===a||void 0===a||null===c||void 0===c||a.prototype!==c.prototype)return!1;if(b(a)){if(!b(c))return!1;a=w.call(a);c=w.call(c);return f(a,c)}try{var d=e(a),m=e(c),g}catch(h){return!1}if(d.length!=m.length)return!1;d.sort();m.sort();for(g=d.length-1;0<=g;g--)if(d[g]!=m[g])return!1;for(g=d.length-1;0<=g;g--)if(m=
|
||||
d[g],!f(a[m],c[m]))return!1;return!0}function x(a,b){return a&&b?b instanceof RegExp?b.test(a):a instanceof b||!0===b.call({},a)?!0:!1:!1}function B(a,b,c,d){var e;"string"===typeof c&&(d=c,c=null);try{b()}catch(f){e=f}d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:".");a&&!e&&m("Missing expected exception"+d);!a&&x(e,c)&&m("Got unwanted exception"+d);if(a&&e&&c&&!x(e,c)||!a&&e)throw e;}h=g("util");var u=g("buffer").Buffer,w=Array.prototype.slice,s=k.exports=d;s.AssertionError=function(a){this.name=
|
||||
"AssertionError";this.message=a.message;this.actual=a.actual;this.expected=a.expected;this.operator=a.operator;a=a.stackStartFunction||m;Error.captureStackTrace&&Error.captureStackTrace(this,a)};h.inherits(s.AssertionError,Error);s.AssertionError.prototype.toString=function(){return this.message?[this.name+":",this.message].join(" "):[this.name+":",c(JSON.stringify(this.actual,a),128),this.operator,c(JSON.stringify(this.expected,a),128)].join(" ")};s.AssertionError.__proto__=Error.prototype;s.fail=
|
||||
m;s.ok=d;s.equal=function(a,b,c){a!=b&&m(a,b,c,"==",s.equal)};s.notEqual=function(a,b,c){a==b&&m(a,b,c,"!=",s.notEqual)};s.deepEqual=function(a,b,c){f(a,b)||m(a,b,c,"deepEqual",s.deepEqual)};s.notDeepEqual=function(a,b,c){f(a,b)&&m(a,b,c,"notDeepEqual",s.notDeepEqual)};s.strictEqual=function(a,b,c){a!==b&&m(a,b,c,"===",s.strictEqual)};s.notStrictEqual=function(a,b,c){a===b&&m(a,b,c,"!==",s.notStrictEqual)};s["throws"]=function(a,b,c){B.apply(this,[!0].concat(w.call(arguments)))};s.doesNotThrow=function(a,
|
||||
b,c){B.apply(this,[!1].concat(w.call(arguments)))};s.ifError=function(a){if(a)throw a;}},{util:2,buffer:3}],2:[function(g,k,h){function e(a){return a instanceof Array||Array.isArray(a)||a&&a!==Object.prototype&&e(a.__proto__)}function a(a){return a instanceof RegExp||"object"===typeof a&&"[object RegExp]"===Object.prototype.toString.call(a)}function c(a){if(a instanceof Date)return!0;if("object"!==typeof a)return!1;var b=Date.prototype&&d(Date.prototype);a=a.__proto__&&d(a.__proto__);return JSON.stringify(a)===
|
||||
JSON.stringify(b)}g("events");h.isArray=e;h.isDate=function(a){return"[object Date]"===Object.prototype.toString.call(a)};h.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)};h.print=function(){};h.puts=function(){};h.debug=function(){};h.inspect=function(b,f,g,k){function w(b,g){if(b&&"function"===typeof b.inspect&&b!==h&&(!b.constructor||b.constructor.prototype!==b))return b.inspect(g);switch(typeof b){case "undefined":return r("undefined","undefined");case "string":var q=
|
||||
"'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r(q,"string");case "number":return r(""+b,"number");case "boolean":return r(""+b,"boolean")}if(null===b)return r("null","null");var k=m(b),B=f?d(b):k;if("function"===typeof b&&0===B.length)return a(b)?r(""+b,"regexp"):r("[Function"+(b.name?": "+b.name:"")+"]","special");if(c(b)&&0===B.length)return r(b.toUTCString(),"date");var u,p;e(b)?(p="Array",q=["[","]"]):(p="Object",q=["{","}"]);"function"===typeof b?
|
||||
(u=b.name?": "+b.name:"",u=a(b)?" "+b:" [Function"+u+"]"):u="";c(b)&&(u=" "+b.toUTCString());if(0===B.length)return q[0]+u+q[1];if(0>g)return a(b)?r(""+b,"regexp"):r("[Object]","special");s.push(b);B=B.map(function(a){var c,C;b.__lookupGetter__&&(b.__lookupGetter__(a)?C=b.__lookupSetter__(a)?r("[Getter/Setter]","special"):r("[Getter]","special"):b.__lookupSetter__(a)&&(C=r("[Setter]","special")));0>k.indexOf(a)&&(c="["+a+"]");C||(0>s.indexOf(b[a])?(C=null===g?w(b[a]):w(b[a],g-1),-1<C.indexOf("\n")&&
|
||||
(C=e(b)?C.split("\n").map(function(C){return" "+C}).join("\n").substr(2):"\n"+C.split("\n").map(function(C){return" "+C}).join("\n"))):C=r("[Circular]","special"));if("undefined"===typeof c){if("Array"===p&&a.match(/^\d+$/))return C;c=JSON.stringify(""+a);c.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(c=c.substr(1,c.length-2),c=r(c,"name")):(c=c.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),c=r(c,"string"))}return c+": "+C});s.pop();var E=0;return B=50<B.reduce(function(a,b){E++;0<=
|
||||
b.indexOf("\n")&&E++;return a+b.length+1},0)?q[0]+(""===u?"":u+"\n ")+" "+B.join(",\n ")+" "+q[1]:q[0]+u+" "+B.join(", ")+" "+q[1]}var s=[],r=function(a,b){var c={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},d={special:"cyan",number:"blue","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"}[b];return d?"\u001b["+c[d][0]+
|
||||
"m"+a+"\u001b["+c[d][1]+"m":a};k||(r=function(a,b){return a});return w(b,"undefined"===typeof g?2:g)};h.log=function(a){};h.pump=null;var m=Object.keys||function(a){var b=[],c;for(c in a)b.push(c);return b},d=Object.getOwnPropertyNames||function(a){var b=[],c;for(c in a)Object.hasOwnProperty.call(a,c)&&b.push(c);return b},f=Object.create||function(a,b){var c;if(null===a)c={__proto__:null};else{if("object"!==typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");c=function(){};
|
||||
c.prototype=a;c=new c;c.__proto__=a}"undefined"!==typeof b&&Object.defineProperties&&Object.defineProperties(c,b);return c};h.inherits=function(a,b){a.super_=b;a.prototype=f(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})};var b=/%[sdj%]/g;h.format=function(a){if("string"!==typeof a){for(var c=[],d=0;d<arguments.length;d++)c.push(h.inspect(arguments[d]));return c.join(" ")}for(var d=1,e=arguments,f=e.length,c=String(a).replace(b,function(a){if("%%"===a)return"%";if(d>=
|
||||
f)return a;switch(a){case "%s":return String(e[d++]);case "%d":return Number(e[d++]);case "%j":return JSON.stringify(e[d++]);default:return a}}),m=e[d];d<f;m=e[++d])c=null===m||"object"!==typeof m?c+(" "+m):c+(" "+h.inspect(m));return c}},{events:4}],5:[function(g,k,h){h.readIEEE754=function(e,a,c,m,d){var f;f=8*d-m-1;var b=(1<<f)-1,g=b>>1,h=-7;d=c?0:d-1;var k=c?1:-1,u=e[a+d];d+=k;c=u&(1<<-h)-1;u>>=-h;for(h+=f;0<h;c=256*c+e[a+d],d+=k,h-=8);f=c&(1<<-h)-1;c>>=-h;for(h+=m;0<h;f=256*f+e[a+d],d+=k,h-=
|
||||
8);if(0===c)c=1-g;else{if(c===b)return f?NaN:Infinity*(u?-1:1);f+=Math.pow(2,m);c-=g}return(u?-1:1)*f*Math.pow(2,c-m)};h.writeIEEE754=function(e,a,c,m,d,f){var b,g=8*f-d-1,h=(1<<g)-1,k=h>>1,u=23===d?Math.pow(2,-24)-Math.pow(2,-77):0;f=m?f-1:0;var p=m?-1:1,s=0>a||0===a&&0>1/a?1:0;a=Math.abs(a);isNaN(a)||Infinity===a?(a=isNaN(a)?1:0,m=h):(m=Math.floor(Math.log(a)/Math.LN2),1>a*(b=Math.pow(2,-m))&&(m--,b*=2),a=1<=m+k?a+u/b:a+u*Math.pow(2,1-k),2<=a*b&&(m++,b/=2),m+k>=h?(a=0,m=h):1<=m+k?(a=(a*b-1)*Math.pow(2,
|
||||
d),m+=k):(a=a*Math.pow(2,k-1)*Math.pow(2,d),m=0));for(;8<=d;e[c+f]=a&255,f+=p,a/=256,d-=8);m=m<<d|a;for(g+=d;0<g;e[c+f]=m&255,f+=p,m/=256,g-=8);e[c+f-p]|=128*s}},{}],6:[function(g,k,h){g=k.exports={};g.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(a){return window.setImmediate(a)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var e=[];window.addEventListener("message",function(a){a.source===window&&"process-tick"===a.data&&(a.stopPropagation(),
|
||||
0<e.length&&e.shift()())},!0);return function(a){e.push(a);window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}();g.title="browser";g.browser=!0;g.env={};g.argv=[];g.binding=function(e){throw Error("process.binding is not supported");};g.cwd=function(){return"/"};g.chdir=function(e){throw Error("process.chdir is not supported");}},{}],4:[function(g,k,h){(function(e){e.EventEmitter||(e.EventEmitter=function(){});e=h.EventEmitter=e.EventEmitter;var a="function"===typeof Array.isArray?
|
||||
Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};e.prototype.setMaxListeners=function(a){this._events||(this._events={});this._events.maxListeners=a};e.prototype.emit=function(c){if("error"===c&&(!this._events||!this._events.error||a(this._events.error)&&!this._events.error.length)){if(arguments[1]instanceof Error)throw arguments[1];throw Error("Uncaught, unspecified 'error' event.");}if(!this._events)return!1;var e=this._events[c];if(!e)return!1;if("function"==
|
||||
typeof e){switch(arguments.length){case 1:e.call(this);break;case 2:e.call(this,arguments[1]);break;case 3:e.call(this,arguments[1],arguments[2]);break;default:var d=Array.prototype.slice.call(arguments,1);e.apply(this,d)}return!0}if(a(e)){for(var d=Array.prototype.slice.call(arguments,1),e=e.slice(),f=0,b=e.length;f<b;f++)e[f].apply(this,d);return!0}return!1};e.prototype.addListener=function(c,e){if("function"!==typeof e)throw Error("addListener only takes instances of Function");this._events||(this._events=
|
||||
{});this.emit("newListener",c,e);if(this._events[c])if(a(this._events[c])){if(!this._events[c].warned){var d;(d=void 0!==this._events.maxListeners?this._events.maxListeners:10)&&0<d&&this._events[c].length>d&&(this._events[c].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[c].length),console.trace())}this._events[c].push(e)}else this._events[c]=[this._events[c],e];else this._events[c]=
|
||||
e;return this};e.prototype.on=e.prototype.addListener;e.prototype.once=function(a,e){var d=this;d.on(a,function b(){d.removeListener(a,b);e.apply(this,arguments)});return this};e.prototype.removeListener=function(c,e){if("function"!==typeof e)throw Error("removeListener only takes instances of Function");if(!this._events||!this._events[c])return this;var d=this._events[c];if(a(d)){var f;a:if(d.indexOf)f=d.indexOf(e);else{for(f=0;f<d.length;f++)if(e===d[f])break a;f=-1}if(0>f)return this;d.splice(f,
|
||||
1);0==d.length&&delete this._events[c]}else this._events[c]===e&&delete this._events[c];return this};e.prototype.removeAllListeners=function(a){if(0===arguments.length)return this._events={},this;a&&this._events&&this._events[a]&&(this._events[a]=null);return this};e.prototype.listeners=function(c){this._events||(this._events={});this._events[c]||(this._events[c]=[]);a(this._events[c])||(this._events[c]=[this._events[c]]);return this._events[c]}})(g("__browserify_process"))},{__browserify_process:6}],
|
||||
"buffer-browserify":[function(g,k,h){k.exports=g("q9TxCC")},{}],q9TxCC:[function(g,k,h){function e(a){this.length=a}function a(a){return 16>a?"0"+a.toString(16):a.toString(16)}function c(a){for(var b=[],y=0;y<a.length;y++)if(127>=a.charCodeAt(y))b.push(a.charCodeAt(y));else for(var c=encodeURIComponent(a.charAt(y)).substr(1).split("%"),d=0;d<c.length;d++)b.push(parseInt(c[d],16));return b}function m(a,b,y,c){for(var d=0;d<c&&!(d+y>=b.length||d>=a.length);)b[d+y]=a[d],d++;return d}function d(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}
|
||||
function f(a){a=~~Math.ceil(+a);return 0>a?0:a}function b(a,D,y){if(!(this instanceof b))return new b(a,D,y);if("number"===typeof y)this.length=f(D),this.parent=a,this.offset=y;else{switch(y=typeof a){case "number":this.length=f(a);break;case "string":this.length=b.byteLength(a,D);break;case "object":this.length=f(a.length);break;default:throw Error("First argument needs to be a number, array or string.");}if(this.length>b.poolSize)this.parent=new e(this.length),this.offset=0;else{if(!A||A.length-
|
||||
A.used<this.length)A=new e(b.poolSize),A.used=0;this.parent=A;this.offset=A.used;A.used+=this.length}if(Array.isArray(a)||b.isBuffer(a)||a&&"object"===typeof a&&"number"===typeof a.length)for(D=0;D<this.length;D++)this.parent[D+this.offset]=a instanceof b?a.readUInt8(D):a[D];else"string"==y&&(this.length=this.write(a,0,D))}}function q(a,b,y,c){var d=0;c||(l.ok("boolean"===typeof y,"missing or invalid endian"),l.ok(void 0!==b&&null!==b,"missing offset"),l.ok(b+1<a.length,"Trying to read beyond buffer length"));
|
||||
if(b>=a.length)return 0;y?(d=a.parent[a.offset+b]<<8,b+1<a.length&&(d|=a.parent[a.offset+b+1])):(d=a.parent[a.offset+b],b+1<a.length&&(d|=a.parent[a.offset+b+1]<<8));return d}function x(a,b,y,c){var d=0;c||(l.ok("boolean"===typeof y,"missing or invalid endian"),l.ok(void 0!==b&&null!==b,"missing offset"),l.ok(b+3<a.length,"Trying to read beyond buffer length"));if(b>=a.length)return 0;y?(b+1<a.length&&(d=a.parent[a.offset+b+1]<<16),b+2<a.length&&(d|=a.parent[a.offset+b+2]<<8),b+3<a.length&&(d|=a.parent[a.offset+
|
||||
b+3]),d+=a.parent[a.offset+b]<<24>>>0):(b+2<a.length&&(d=a.parent[a.offset+b+2]<<16),b+1<a.length&&(d|=a.parent[a.offset+b+1]<<8),d|=a.parent[a.offset+b],b+3<a.length&&(d+=a.parent[a.offset+b+3]<<24>>>0));return d}function p(a,b,y,c){c||(l.ok("boolean"===typeof y,"missing or invalid endian"),l.ok(void 0!==b&&null!==b,"missing offset"),l.ok(b+1<a.length,"Trying to read beyond buffer length"));a=q(a,b,y,c);return a&32768?-1*(65535-a+1):a}function u(a,b,c,d){d||(l.ok("boolean"===typeof c,"missing or invalid endian"),
|
||||
l.ok(void 0!==b&&null!==b,"missing offset"),l.ok(b+3<a.length,"Trying to read beyond buffer length"));a=x(a,b,c,d);return a&2147483648?-1*(4294967295-a+1):a}function w(a,b,c,d){d||(l.ok("boolean"===typeof c,"missing or invalid endian"),l.ok(b+3<a.length,"Trying to read beyond buffer length"));return g("./buffer_ieee754").readIEEE754(a,b,c,23,4)}function s(a,b,c,d){d||(l.ok("boolean"===typeof c,"missing or invalid endian"),l.ok(b+7<a.length,"Trying to read beyond buffer length"));return g("./buffer_ieee754").readIEEE754(a,
|
||||
b,c,52,8)}function r(a,b){l.ok("number"==typeof a,"cannot write a non-number as a number");l.ok(0<=a,"specified a negative value for writing an unsigned value");l.ok(a<=b,"value is larger than maximum value for type");l.ok(Math.floor(a)===a,"value has a fractional component")}function t(a,b,c,d,e){e||(l.ok(void 0!==b&&null!==b,"missing value"),l.ok("boolean"===typeof d,"missing or invalid endian"),l.ok(void 0!==c&&null!==c,"missing offset"),l.ok(c+1<a.length,"trying to write beyond buffer length"),
|
||||
r(b,65535));for(e=0;e<Math.min(a.length-c,2);e++)a.parent[a.offset+c+e]=(b&255<<8*(d?1-e:e))>>>8*(d?1-e:e)}function n(a,b,c,d,e){e||(l.ok(void 0!==b&&null!==b,"missing value"),l.ok("boolean"===typeof d,"missing or invalid endian"),l.ok(void 0!==c&&null!==c,"missing offset"),l.ok(c+3<a.length,"trying to write beyond buffer length"),r(b,4294967295));for(e=0;e<Math.min(a.length-c,4);e++)a.parent[a.offset+c+e]=b>>>8*(d?3-e:e)&255}function v(a,b,c){l.ok("number"==typeof a,"cannot write a non-number as a number");
|
||||
l.ok(a<=b,"value larger than maximum allowed value");l.ok(a>=c,"value smaller than minimum allowed value");l.ok(Math.floor(a)===a,"value has a fractional component")}function F(a,b,c){l.ok("number"==typeof a,"cannot write a non-number as a number");l.ok(a<=b,"value larger than maximum allowed value");l.ok(a>=c,"value smaller than minimum allowed value")}function G(a,b,c,d,e){e||(l.ok(void 0!==b&&null!==b,"missing value"),l.ok("boolean"===typeof d,"missing or invalid endian"),l.ok(void 0!==c&&null!==
|
||||
c,"missing offset"),l.ok(c+1<a.length,"Trying to write beyond buffer length"),v(b,32767,-32768));0<=b?t(a,b,c,d,e):t(a,65535+b+1,c,d,e)}function H(a,b,c,d,e){e||(l.ok(void 0!==b&&null!==b,"missing value"),l.ok("boolean"===typeof d,"missing or invalid endian"),l.ok(void 0!==c&&null!==c,"missing offset"),l.ok(c+3<a.length,"Trying to write beyond buffer length"),v(b,2147483647,-2147483648));0<=b?n(a,b,c,d,e):n(a,4294967295+b+1,c,d,e)}function I(a,b,c,d,e){e||(l.ok(void 0!==b&&null!==b,"missing value"),
|
||||
l.ok("boolean"===typeof d,"missing or invalid endian"),l.ok(void 0!==c&&null!==c,"missing offset"),l.ok(c+3<a.length,"Trying to write beyond buffer length"),F(b,3.4028234663852886E38,-3.4028234663852886E38));g("./buffer_ieee754").writeIEEE754(a,b,c,d,23,4)}function J(a,b,c,d,e){e||(l.ok(void 0!==b&&null!==b,"missing value"),l.ok("boolean"===typeof d,"missing or invalid endian"),l.ok(void 0!==c&&null!==c,"missing offset"),l.ok(c+7<a.length,"Trying to write beyond buffer length"),F(b,1.7976931348623157E308,
|
||||
-1.7976931348623157E308));g("./buffer_ieee754").writeIEEE754(a,b,c,d,52,8)}var l=g("assert");h.INSPECT_MAX_BYTES=50;e.byteLength=function(a,b){switch(b||"utf8"){case "hex":return a.length/2;case "utf8":case "utf-8":return c(a).length;case "ascii":case "binary":return a.length;case "base64":return g("base64-js").toByteArray(a).length;default:throw Error("Unknown encoding");}};e.prototype.utf8Write=function(a,b,y){return e._charsWritten=m(c(a),this,b,y)};e.prototype.asciiWrite=function(a,b,c){for(var d=
|
||||
[],f=0;f<a.length;f++)d.push(a.charCodeAt(f)&255);return e._charsWritten=m(d,this,b,c)};e.prototype.binaryWrite=e.prototype.asciiWrite;e.prototype.base64Write=function(a,b,c){return e._charsWritten=m(g("base64-js").toByteArray(a),this,b,c)};e.prototype.base64Slice=function(a,b){var c=Array.prototype.slice.apply(this,arguments);return g("base64-js").fromByteArray(c)};e.prototype.utf8Slice=function(){for(var a=Array.prototype.slice.apply(this,arguments),b="",c="",e=0;e<a.length;)127>=a[e]?(b+=d(c)+
|
||||
String.fromCharCode(a[e]),c=""):c+="%"+a[e].toString(16),e++;return b+d(c)};e.prototype.asciiSlice=function(){for(var a=Array.prototype.slice.apply(this,arguments),b="",c=0;c<a.length;c++)b+=String.fromCharCode(a[c]);return b};e.prototype.binarySlice=e.prototype.asciiSlice;e.prototype.inspect=function(){for(var b=[],c=this.length,d=0;d<c;d++)if(b[d]=a(this[d]),d==h.INSPECT_MAX_BYTES){b[d+1]="...";break}return"<SlowBuffer "+b.join(" ")+">"};e.prototype.hexSlice=function(b,c){var d=this.length;if(!b||
|
||||
0>b)b=0;if(!c||0>c||c>d)c=d;for(var d="",e=b;e<c;e++)d+=a(this[e]);return d};e.prototype.toString=function(a,b,c){a=String(a||"utf8").toLowerCase();b=+b||0;"undefined"==typeof c&&(c=this.length);if(+c==b)return"";switch(a){case "hex":return this.hexSlice(b,c);case "utf8":case "utf-8":return this.utf8Slice(b,c);case "ascii":return this.asciiSlice(b,c);case "binary":return this.binarySlice(b,c);case "base64":return this.base64Slice(b,c);case "ucs2":case "ucs-2":return this.ucs2Slice(b,c);default:throw Error("Unknown encoding");
|
||||
}};e.prototype.hexWrite=function(a,b,c){b=+b||0;var d=this.length-b;c?(c=+c,c>d&&(c=d)):c=d;d=a.length;if(d%2)throw Error("Invalid hex string");c>d/2&&(c=d/2);for(d=0;d<c;d++){var f=parseInt(a.substr(2*d,2),16);if(isNaN(f))throw Error("Invalid hex string");this[b+d]=f}e._charsWritten=2*d;return d};e.prototype.write=function(a,b,c,d){if(isFinite(b))isFinite(c)||(d=c,c=void 0);else{var e=d;d=b;b=c;c=e}b=+b||0;e=this.length-b;c?(c=+c,c>e&&(c=e)):c=e;d=String(d||"utf8").toLowerCase();switch(d){case "hex":return this.hexWrite(a,
|
||||
b,c);case "utf8":case "utf-8":return this.utf8Write(a,b,c);case "ascii":return this.asciiWrite(a,b,c);case "binary":return this.binaryWrite(a,b,c);case "base64":return this.base64Write(a,b,c);case "ucs2":case "ucs-2":return this.ucs2Write(a,b,c);default:throw Error("Unknown encoding");}};e.prototype.slice=function(a,c){void 0===c&&(c=this.length);if(c>this.length)throw Error("oob");if(a>c)throw Error("oob");return new b(this,c-a,+a)};e.prototype.copy=function(a,b,c,d){for(var e=[];c<d;c++)l.ok("undefined"!==
|
||||
typeof this[c],"copying undefined buffer bytes!"),e.push(this[c]);for(c=b;c<b+e.length;c++)a[c]=e[c-b]};e.prototype.fill=function(a,b,c){if(c>this.length)throw Error("oob");if(b>c)throw Error("oob");for(;b<c;b++)this[b]=a};h.SlowBuffer=e;h.Buffer=b;b.poolSize=8192;var A;b.isBuffer=function(a){return a instanceof b||a instanceof e};b.concat=function(a,c){if(!Array.isArray(a))throw Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.");if(0===a.length)return new b(0);if(1===
|
||||
a.length)return a[0];if("number"!==typeof c)for(var d=c=0;d<a.length;d++){var e=a[d];c+=e.length}for(var f=new b(c),g=0,d=0;d<a.length;d++)e=a[d],e.copy(f,g),g+=e.length;return f};b.prototype.inspect=function(){for(var b=[],c=this.length,d=0;d<c;d++)if(b[d]=a(this.parent[d+this.offset]),d==h.INSPECT_MAX_BYTES){b[d+1]="...";break}return"<Buffer "+b.join(" ")+">"};b.prototype.get=function(a){if(0>a||a>=this.length)throw Error("oob");return this.parent[this.offset+a]};b.prototype.set=function(a,b){if(0>
|
||||
a||a>=this.length)throw Error("oob");return this.parent[this.offset+a]=b};b.prototype.write=function(a,c,d,f){if(isFinite(c))isFinite(d)||(f=d,d=void 0);else{var g=f;f=c;c=d;d=g}c=+c||0;g=this.length-c;d?(d=+d,d>g&&(d=g)):d=g;f=String(f||"utf8").toLowerCase();switch(f){case "hex":a=this.parent.hexWrite(a,this.offset+c,d);break;case "utf8":case "utf-8":a=this.parent.utf8Write(a,this.offset+c,d);break;case "ascii":a=this.parent.asciiWrite(a,this.offset+c,d);break;case "binary":a=this.parent.binaryWrite(a,
|
||||
this.offset+c,d);break;case "base64":a=this.parent.base64Write(a,this.offset+c,d);break;case "ucs2":case "ucs-2":a=this.parent.ucs2Write(a,this.offset+c,d);break;default:throw Error("Unknown encoding");}b._charsWritten=e._charsWritten;return a};b.prototype.toString=function(a,b,c){a=String(a||"utf8").toLowerCase();"undefined"==typeof b||0>b?b=0:b>this.length&&(b=this.length);"undefined"==typeof c||c>this.length?c=this.length:0>c&&(c=0);b+=this.offset;c+=this.offset;switch(a){case "hex":return this.parent.hexSlice(b,
|
||||
c);case "utf8":case "utf-8":return this.parent.utf8Slice(b,c);case "ascii":return this.parent.asciiSlice(b,c);case "binary":return this.parent.binarySlice(b,c);case "base64":return this.parent.base64Slice(b,c);case "ucs2":case "ucs-2":return this.parent.ucs2Slice(b,c);default:throw Error("Unknown encoding");}};b.byteLength=e.byteLength;b.prototype.fill=function(a,b,c){a||(a=0);b||(b=0);c||(c=this.length);"string"===typeof a&&(a=a.charCodeAt(0));if("number"!==typeof a||isNaN(a))throw Error("value is not a number");
|
||||
if(c<b)throw Error("end < start");if(c===b||0==this.length)return 0;if(0>b||b>=this.length)throw Error("start out of bounds");if(0>c||c>this.length)throw Error("end out of bounds");return this.parent.fill(a,b+this.offset,c+this.offset)};b.prototype.copy=function(a,b,c,d){c||(c=0);d||(d=this.length);b||(b=0);if(d<c)throw Error("sourceEnd < sourceStart");if(d===c||0==a.length||0==this.length)return 0;if(0>b||b>=a.length)throw Error("targetStart out of bounds");if(0>c||c>=this.length)throw Error("sourceStart out of bounds");
|
||||
if(0>d||d>this.length)throw Error("sourceEnd out of bounds");d>this.length&&(d=this.length);a.length-b<d-c&&(d=a.length-b+c);return this.parent.copy(a.parent,b+a.offset,c+this.offset,d+this.offset)};b.prototype.slice=function(a,c){void 0===c&&(c=this.length);if(c>this.length)throw Error("oob");if(a>c)throw Error("oob");return new b(this.parent,c-a,+a+this.offset)};b.prototype.utf8Slice=function(a,b){return this.toString("utf8",a,b)};b.prototype.binarySlice=function(a,b){return this.toString("binary",
|
||||
a,b)};b.prototype.asciiSlice=function(a,b){return this.toString("ascii",a,b)};b.prototype.utf8Write=function(a,b){return this.write(a,b,"utf8")};b.prototype.binaryWrite=function(a,b){return this.write(a,b,"binary")};b.prototype.asciiWrite=function(a,b){return this.write(a,b,"ascii")};b.prototype.readUInt8=function(a,b){b||(l.ok(void 0!==a&&null!==a,"missing offset"),l.ok(a<this.length,"Trying to read beyond buffer length"));if(!(a>=this.length))return this.parent[this.offset+a]};b.prototype.readUInt16LE=
|
||||
function(a,b){return q(this,a,!1,b)};b.prototype.readUInt16BE=function(a,b){return q(this,a,!0,b)};b.prototype.readUInt32LE=function(a,b){return x(this,a,!1,b)};b.prototype.readUInt32BE=function(a,b){return x(this,a,!0,b)};b.prototype.readInt8=function(a,b){var c;b||(l.ok(void 0!==a&&null!==a,"missing offset"),l.ok(a<this.length,"Trying to read beyond buffer length"));if(!(a>=this.length))return(c=this.parent[this.offset+a]&128)?-1*(255-this.parent[this.offset+a]+1):this.parent[this.offset+a]};b.prototype.readInt16LE=
|
||||
function(a,b){return p(this,a,!1,b)};b.prototype.readInt16BE=function(a,b){return p(this,a,!0,b)};b.prototype.readInt32LE=function(a,b){return u(this,a,!1,b)};b.prototype.readInt32BE=function(a,b){return u(this,a,!0,b)};b.prototype.readFloatLE=function(a,b){return w(this,a,!1,b)};b.prototype.readFloatBE=function(a,b){return w(this,a,!0,b)};b.prototype.readDoubleLE=function(a,b){return s(this,a,!1,b)};b.prototype.readDoubleBE=function(a,b){return s(this,a,!0,b)};b.prototype.writeUInt8=function(a,b,
|
||||
c){c||(l.ok(void 0!==a&&null!==a,"missing value"),l.ok(void 0!==b&&null!==b,"missing offset"),l.ok(b<this.length,"trying to write beyond buffer length"),r(a,255));b<this.length&&(this.parent[this.offset+b]=a)};b.prototype.writeUInt16LE=function(a,b,c){t(this,a,b,!1,c)};b.prototype.writeUInt16BE=function(a,b,c){t(this,a,b,!0,c)};b.prototype.writeUInt32LE=function(a,b,c){n(this,a,b,!1,c)};b.prototype.writeUInt32BE=function(a,b,c){n(this,a,b,!0,c)};b.prototype.writeInt8=function(a,b,c){c||(l.ok(void 0!==
|
||||
a&&null!==a,"missing value"),l.ok(void 0!==b&&null!==b,"missing offset"),l.ok(b<this.length,"Trying to write beyond buffer length"),v(a,127,-128));0<=a?this.writeUInt8(a,b,c):this.writeUInt8(255+a+1,b,c)};b.prototype.writeInt16LE=function(a,b,c){G(this,a,b,!1,c)};b.prototype.writeInt16BE=function(a,b,c){G(this,a,b,!0,c)};b.prototype.writeInt32LE=function(a,b,c){H(this,a,b,!1,c)};b.prototype.writeInt32BE=function(a,b,c){H(this,a,b,!0,c)};b.prototype.writeFloatLE=function(a,b,c){I(this,a,b,!1,c)};b.prototype.writeFloatBE=
|
||||
function(a,b,c){I(this,a,b,!0,c)};b.prototype.writeDoubleLE=function(a,b,c){J(this,a,b,!1,c)};b.prototype.writeDoubleBE=function(a,b,c){J(this,a,b,!0,c)};e.prototype.readUInt8=b.prototype.readUInt8;e.prototype.readUInt16LE=b.prototype.readUInt16LE;e.prototype.readUInt16BE=b.prototype.readUInt16BE;e.prototype.readUInt32LE=b.prototype.readUInt32LE;e.prototype.readUInt32BE=b.prototype.readUInt32BE;e.prototype.readInt8=b.prototype.readInt8;e.prototype.readInt16LE=b.prototype.readInt16LE;e.prototype.readInt16BE=
|
||||
b.prototype.readInt16BE;e.prototype.readInt32LE=b.prototype.readInt32LE;e.prototype.readInt32BE=b.prototype.readInt32BE;e.prototype.readFloatLE=b.prototype.readFloatLE;e.prototype.readFloatBE=b.prototype.readFloatBE;e.prototype.readDoubleLE=b.prototype.readDoubleLE;e.prototype.readDoubleBE=b.prototype.readDoubleBE;e.prototype.writeUInt8=b.prototype.writeUInt8;e.prototype.writeUInt16LE=b.prototype.writeUInt16LE;e.prototype.writeUInt16BE=b.prototype.writeUInt16BE;e.prototype.writeUInt32LE=b.prototype.writeUInt32LE;
|
||||
e.prototype.writeUInt32BE=b.prototype.writeUInt32BE;e.prototype.writeInt8=b.prototype.writeInt8;e.prototype.writeInt16LE=b.prototype.writeInt16LE;e.prototype.writeInt16BE=b.prototype.writeInt16BE;e.prototype.writeInt32LE=b.prototype.writeInt32LE;e.prototype.writeInt32BE=b.prototype.writeInt32BE;e.prototype.writeFloatLE=b.prototype.writeFloatLE;e.prototype.writeFloatBE=b.prototype.writeFloatBE;e.prototype.writeDoubleLE=b.prototype.writeDoubleLE;e.prototype.writeDoubleBE=b.prototype.writeDoubleBE},
|
||||
{assert:1,"./buffer_ieee754":5,"base64-js":7}],7:[function(g,k,h){(function(e){k.exports.toByteArray=function(a){var c,e,d,f,b;if(0<a.length%4)throw"Invalid string. Length must be a multiple of 4";f=a.indexOf("=");f=0<f?a.length-f:0;b=[];e=0<f?a.length-4:a.length;for(c=0;c<e;c+=4)d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c])<<18|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c+1])<<12|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c+
|
||||
2])<<6|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c+3]),b.push((d&16711680)>>16),b.push((d&65280)>>8),b.push(d&255);2===f?(d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c])<<2|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c+1])>>4,b.push(d&255)):1===f&&(d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c])<<10|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c+
|
||||
1])<<4|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c+2])>>2,b.push(d>>8&255),b.push(d&255));return b};k.exports.fromByteArray=function(a){var c,e=a.length%3,d="",f,b;c=0;for(b=a.length-e;c<b;c+=3)f=(a[c]<<16)+(a[c+1]<<8)+a[c+2],d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f>>18&63]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f>>12&63]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f>>6&63]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f&
|
||||
63];switch(e){case 1:f=a[a.length-1];d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f>>2];d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f<<4&63];d+="==";break;case 2:f=(a[a.length-2]<<8)+a[a.length-1],d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f>>10],d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f>>4&63],d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f<<2&63],d+="="}return d}})()},
|
||||
{}],8:[function(g,k,h){h.readIEEE754=function(e,a,c,g,d){var f;f=8*d-g-1;var b=(1<<f)-1,h=b>>1,k=-7;d=c?0:d-1;var p=c?1:-1,u=e[a+d];d+=p;c=u&(1<<-k)-1;u>>=-k;for(k+=f;0<k;c=256*c+e[a+d],d+=p,k-=8);f=c&(1<<-k)-1;c>>=-k;for(k+=g;0<k;f=256*f+e[a+d],d+=p,k-=8);if(0===c)c=1-h;else{if(c===b)return f?NaN:Infinity*(u?-1:1);f+=Math.pow(2,g);c-=h}return(u?-1:1)*f*Math.pow(2,c-g)};h.writeIEEE754=function(e,a,c,g,d,f){var b,h=8*f-d-1,k=(1<<h)-1,p=k>>1,u=23===d?Math.pow(2,-24)-Math.pow(2,-77):0;f=g?f-1:0;var v=
|
||||
g?-1:1,s=0>a||0===a&&0>1/a?1:0;a=Math.abs(a);isNaN(a)||Infinity===a?(a=isNaN(a)?1:0,g=k):(g=Math.floor(Math.log(a)/Math.LN2),1>a*(b=Math.pow(2,-g))&&(g--,b*=2),a=1<=g+p?a+u/b:a+u*Math.pow(2,1-p),2<=a*b&&(g++,b/=2),g+p>=k?(a=0,g=k):1<=g+p?(a=(a*b-1)*Math.pow(2,d),g+=p):(a=a*Math.pow(2,p-1)*Math.pow(2,d),g=0));for(;8<=d;e[c+f]=a&255,f+=v,a/=256,d-=8);g=g<<d|a;for(h+=d;0<h;e[c+f]=g&255,f+=v,g/=256,h-=8);e[c+f-v]|=128*s}},{}],3:[function(g,k,h){function e(a){this.length=a}function a(a){return 16>a?"0"+
|
||||
a.toString(16):a.toString(16)}function c(a){for(var b=[],c=0;c<a.length;c++)if(127>=a.charCodeAt(c))b.push(a.charCodeAt(c));else for(var d=encodeURIComponent(a.charAt(c)).substr(1).split("%"),e=0;e<d.length;e++)b.push(parseInt(d[e],16));return b}function m(a,b,c,d){for(var e=0;e<d&&!(e+c>=b.length||e>=a.length);)b[e+c]=a[e],e++;return e}function d(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}function f(a){a=~~Math.ceil(+a);return 0>a?0:a}function b(a,c,d){if(!(this instanceof
|
||||
b))return new b(a,c,d);if("number"===typeof d)this.length=f(c),this.parent=a,this.offset=d;else{switch(d=typeof a){case "number":this.length=f(a);break;case "string":this.length=b.byteLength(a,c);break;case "object":this.length=f(a.length);break;default:throw Error("First argument needs to be a number, array or string.");}if(this.length>b.poolSize)this.parent=new e(this.length),this.offset=0;else{if(!A||A.length-A.used<this.length)A=new e(b.poolSize),A.used=0;this.parent=A;this.offset=A.used;A.used+=
|
||||
this.length}if(Array.isArray(a)||b.isBuffer(a)||a&&"object"===typeof a&&"number"===typeof a.length)for(c=0;c<this.length;c++)this.parent[c+this.offset]=a[c];else"string"==d&&(this.length=this.write(a,0,c))}}function q(a,b,c,d){var e=0;d||(l.ok("boolean"===typeof c,"missing or invalid endian"),l.ok(void 0!==b&&null!==b,"missing offset"),l.ok(b+1<a.length,"Trying to read beyond buffer length"));c?(e=a.parent[a.offset+b]<<8,e|=a.parent[a.offset+b+1]):(e=a.parent[a.offset+b],e|=a.parent[a.offset+b+1]<<
|
||||
8);return e}function p(a,b,c,d){var e=0;d||(l.ok("boolean"===typeof c,"missing or invalid endian"),l.ok(void 0!==b&&null!==b,"missing offset"),l.ok(b+3<a.length,"Trying to read beyond buffer length"));c?(e=a.parent[a.offset+b+1]<<16,e|=a.parent[a.offset+b+2]<<8,e|=a.parent[a.offset+b+3],e+=a.parent[a.offset+b]<<24>>>0):(e=a.parent[a.offset+b+2]<<16,e|=a.parent[a.offset+b+1]<<8,e|=a.parent[a.offset+b],e+=a.parent[a.offset+b+3]<<24>>>0);return e}function v(a,b,c,d){d||(l.ok("boolean"===typeof c,"missing or invalid endian"),
|
||||
l.ok(void 0!==b&&null!==b,"missing offset"),l.ok(b+1<a.length,"Trying to read beyond buffer length"));a=q(a,b,c,d);return a&32768?-1*(65535-a+1):a}function u(a,b,c,d){d||(l.ok("boolean"===typeof c,"missing or invalid endian"),l.ok(void 0!==b&&null!==b,"missing offset"),l.ok(b+3<a.length,"Trying to read beyond buffer length"));a=p(a,b,c,d);return a&2147483648?-1*(4294967295-a+1):a}function w(a,b,c,d){d||(l.ok("boolean"===typeof c,"missing or invalid endian"),l.ok(b+3<a.length,"Trying to read beyond buffer length"));
|
||||
return g("./buffer_ieee754").readIEEE754(a,b,c,23,4)}function s(a,b,c,d){d||(l.ok("boolean"===typeof c,"missing or invalid endian"),l.ok(b+7<a.length,"Trying to read beyond buffer length"));return g("./buffer_ieee754").readIEEE754(a,b,c,52,8)}function r(a,b){l.ok("number"==typeof a,"cannot write a non-number as a number");l.ok(0<=a,"specified a negative value for writing an unsigned value");l.ok(a<=b,"value is larger than maximum value for type");l.ok(Math.floor(a)===a,"value has a fractional component")}
|
||||
function t(a,b,c,d,e){e||(l.ok(void 0!==b&&null!==b,"missing value"),l.ok("boolean"===typeof d,"missing or invalid endian"),l.ok(void 0!==c&&null!==c,"missing offset"),l.ok(c+1<a.length,"trying to write beyond buffer length"),r(b,65535));d?(a.parent[a.offset+c]=(b&65280)>>>8,a.parent[a.offset+c+1]=b&255):(a.parent[a.offset+c+1]=(b&65280)>>>8,a.parent[a.offset+c]=b&255)}function n(a,b,c,d,e){e||(l.ok(void 0!==b&&null!==b,"missing value"),l.ok("boolean"===typeof d,"missing or invalid endian"),l.ok(void 0!==
|
||||
c&&null!==c,"missing offset"),l.ok(c+3<a.length,"trying to write beyond buffer length"),r(b,4294967295));d?(a.parent[a.offset+c]=b>>>24&255,a.parent[a.offset+c+1]=b>>>16&255,a.parent[a.offset+c+2]=b>>>8&255,a.parent[a.offset+c+3]=b&255):(a.parent[a.offset+c+3]=b>>>24&255,a.parent[a.offset+c+2]=b>>>16&255,a.parent[a.offset+c+1]=b>>>8&255,a.parent[a.offset+c]=b&255)}function z(a,b,c){l.ok("number"==typeof a,"cannot write a non-number as a number");l.ok(a<=b,"value larger than maximum allowed value");
|
||||
l.ok(a>=c,"value smaller than minimum allowed value");l.ok(Math.floor(a)===a,"value has a fractional component")}function F(a,b,c){l.ok("number"==typeof a,"cannot write a non-number as a number");l.ok(a<=b,"value larger than maximum allowed value");l.ok(a>=c,"value smaller than minimum allowed value")}function G(a,b,c,d,e){e||(l.ok(void 0!==b&&null!==b,"missing value"),l.ok("boolean"===typeof d,"missing or invalid endian"),l.ok(void 0!==c&&null!==c,"missing offset"),l.ok(c+1<a.length,"Trying to write beyond buffer length"),
|
||||
z(b,32767,-32768));0<=b?t(a,b,c,d,e):t(a,65535+b+1,c,d,e)}function H(a,b,c,d,e){e||(l.ok(void 0!==b&&null!==b,"missing value"),l.ok("boolean"===typeof d,"missing or invalid endian"),l.ok(void 0!==c&&null!==c,"missing offset"),l.ok(c+3<a.length,"Trying to write beyond buffer length"),z(b,2147483647,-2147483648));0<=b?n(a,b,c,d,e):n(a,4294967295+b+1,c,d,e)}function I(a,b,c,d,e){e||(l.ok(void 0!==b&&null!==b,"missing value"),l.ok("boolean"===typeof d,"missing or invalid endian"),l.ok(void 0!==c&&null!==
|
||||
c,"missing offset"),l.ok(c+3<a.length,"Trying to write beyond buffer length"),F(b,3.4028234663852886E38,-3.4028234663852886E38));g("./buffer_ieee754").writeIEEE754(a,b,c,d,23,4)}function J(a,b,c,d,e){e||(l.ok(void 0!==b&&null!==b,"missing value"),l.ok("boolean"===typeof d,"missing or invalid endian"),l.ok(void 0!==c&&null!==c,"missing offset"),l.ok(c+7<a.length,"Trying to write beyond buffer length"),F(b,1.7976931348623157E308,-1.7976931348623157E308));g("./buffer_ieee754").writeIEEE754(a,b,c,d,52,
|
||||
8)}var l=g("assert");h.INSPECT_MAX_BYTES=50;e.byteLength=function(a,b){switch(b||"utf8"){case "hex":return a.length/2;case "utf8":case "utf-8":return c(a).length;case "ascii":return a.length;case "base64":return g("base64-js").toByteArray(a).length;default:throw Error("Unknown encoding");}};e.prototype.utf8Write=function(a,b,d){return e._charsWritten=m(c(a),this,b,d)};e.prototype.asciiWrite=function(a,b,c){for(var d=[],f=0;f<a.length;f++)d.push(a.charCodeAt(f)&255);return e._charsWritten=m(d,this,
|
||||
b,c)};e.prototype.base64Write=function(a,b,c){return e._charsWritten=m(g("base64-js").toByteArray(a),this,b,c)};e.prototype.base64Slice=function(a,b){var c=Array.prototype.slice.apply(this,arguments);return g("base64-js").fromByteArray(c)};e.prototype.utf8Slice=function(){for(var a=Array.prototype.slice.apply(this,arguments),b="",c="",e=0;e<a.length;)127>=a[e]?(b+=d(c)+String.fromCharCode(a[e]),c=""):c+="%"+a[e].toString(16),e++;return b+d(c)};e.prototype.asciiSlice=function(){for(var a=Array.prototype.slice.apply(this,
|
||||
arguments),b="",c=0;c<a.length;c++)b+=String.fromCharCode(a[c]);return b};e.prototype.inspect=function(){for(var b=[],c=this.length,d=0;d<c;d++)if(b[d]=a(this[d]),d==h.INSPECT_MAX_BYTES){b[d+1]="...";break}return"<SlowBuffer "+b.join(" ")+">"};e.prototype.hexSlice=function(b,c){var d=this.length;if(!b||0>b)b=0;if(!c||0>c||c>d)c=d;for(var d="",e=b;e<c;e++)d+=a(this[e]);return d};e.prototype.toString=function(a,b,c){a=String(a||"utf8").toLowerCase();b=+b||0;"undefined"==typeof c&&(c=this.length);if(+c==
|
||||
b)return"";switch(a){case "hex":return this.hexSlice(b,c);case "utf8":case "utf-8":return this.utf8Slice(b,c);case "ascii":return this.asciiSlice(b,c);case "binary":return this.binarySlice(b,c);case "base64":return this.base64Slice(b,c);case "ucs2":case "ucs-2":return this.ucs2Slice(b,c);default:throw Error("Unknown encoding");}};e.prototype.hexWrite=function(a,b,c){b=+b||0;var d=this.length-b;c?(c=+c,c>d&&(c=d)):c=d;d=a.length;if(d%2)throw Error("Invalid hex string");c>d/2&&(c=d/2);for(d=0;d<c;d++){var f=
|
||||
parseInt(a.substr(2*d,2),16);if(isNaN(f))throw Error("Invalid hex string");this[b+d]=f}e._charsWritten=2*d;return d};e.prototype.write=function(a,b,c,d){if(isFinite(b))isFinite(c)||(d=c,c=void 0);else{var e=d;d=b;b=c;c=e}b=+b||0;e=this.length-b;c?(c=+c,c>e&&(c=e)):c=e;d=String(d||"utf8").toLowerCase();switch(d){case "hex":return this.hexWrite(a,b,c);case "utf8":case "utf-8":return this.utf8Write(a,b,c);case "ascii":return this.asciiWrite(a,b,c);case "binary":return this.binaryWrite(a,b,c);case "base64":return this.base64Write(a,
|
||||
b,c);case "ucs2":case "ucs-2":return this.ucs2Write(a,b,c);default:throw Error("Unknown encoding");}};e.prototype.slice=function(a,c){void 0===c&&(c=this.length);if(c>this.length)throw Error("oob");if(a>c)throw Error("oob");return new b(this,c-a,+a)};e.prototype.copy=function(a,b,c,d){for(var e=[];c<d;c++)l.ok("undefined"!==typeof this[c],"copying undefined buffer bytes!"),e.push(this[c]);for(c=b;c<b+e.length;c++)a[c]=e[c-b]};h.SlowBuffer=e;h.Buffer=b;b.poolSize=8192;var A;b.isBuffer=function(a){return a instanceof
|
||||
b||a instanceof e};b.concat=function(a,c){if(!Array.isArray(a))throw Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.");if(0===a.length)return new b(0);if(1===a.length)return a[0];if("number"!==typeof c)for(var d=c=0;d<a.length;d++){var e=a[d];c+=e.length}for(var f=new b(c),g=0,d=0;d<a.length;d++)e=a[d],e.copy(f,g),g+=e.length;return f};b.prototype.inspect=function(){for(var b=[],c=this.length,d=0;d<c;d++)if(b[d]=a(this.parent[d+this.offset]),d==h.INSPECT_MAX_BYTES){b[d+
|
||||
1]="...";break}return"<Buffer "+b.join(" ")+">"};b.prototype.get=function(a){if(0>a||a>=this.length)throw Error("oob");return this.parent[this.offset+a]};b.prototype.set=function(a,b){if(0>a||a>=this.length)throw Error("oob");return this.parent[this.offset+a]=b};b.prototype.write=function(a,c,d,f){if(isFinite(c))isFinite(d)||(f=d,d=void 0);else{var g=f;f=c;c=d;d=g}c=+c||0;g=this.length-c;d?(d=+d,d>g&&(d=g)):d=g;f=String(f||"utf8").toLowerCase();switch(f){case "hex":a=this.parent.hexWrite(a,this.offset+
|
||||
c,d);break;case "utf8":case "utf-8":a=this.parent.utf8Write(a,this.offset+c,d);break;case "ascii":a=this.parent.asciiWrite(a,this.offset+c,d);break;case "binary":a=this.parent.binaryWrite(a,this.offset+c,d);break;case "base64":a=this.parent.base64Write(a,this.offset+c,d);break;case "ucs2":case "ucs-2":a=this.parent.ucs2Write(a,this.offset+c,d);break;default:throw Error("Unknown encoding");}b._charsWritten=e._charsWritten;return a};b.prototype.toString=function(a,b,c){a=String(a||"utf8").toLowerCase();
|
||||
"undefined"==typeof b||0>b?b=0:b>this.length&&(b=this.length);"undefined"==typeof c||c>this.length?c=this.length:0>c&&(c=0);b+=this.offset;c+=this.offset;switch(a){case "hex":return this.parent.hexSlice(b,c);case "utf8":case "utf-8":return this.parent.utf8Slice(b,c);case "ascii":return this.parent.asciiSlice(b,c);case "binary":return this.parent.binarySlice(b,c);case "base64":return this.parent.base64Slice(b,c);case "ucs2":case "ucs-2":return this.parent.ucs2Slice(b,c);default:throw Error("Unknown encoding");
|
||||
}};b.byteLength=e.byteLength;b.prototype.fill=function(a,b,c){a||(a=0);b||(b=0);c||(c=this.length);"string"===typeof a&&(a=a.charCodeAt(0));if("number"!==typeof a||isNaN(a))throw Error("value is not a number");if(c<b)throw Error("end < start");if(c===b||0==this.length)return 0;if(0>b||b>=this.length)throw Error("start out of bounds");if(0>c||c>this.length)throw Error("end out of bounds");return this.parent.fill(a,b+this.offset,c+this.offset)};b.prototype.copy=function(a,b,c,d){c||(c=0);d||(d=this.length);
|
||||
b||(b=0);if(d<c)throw Error("sourceEnd < sourceStart");if(d===c||0==a.length||0==this.length)return 0;if(0>b||b>=a.length)throw Error("targetStart out of bounds");if(0>c||c>=this.length)throw Error("sourceStart out of bounds");if(0>d||d>this.length)throw Error("sourceEnd out of bounds");d>this.length&&(d=this.length);a.length-b<d-c&&(d=a.length-b+c);return this.parent.copy(a.parent,b+a.offset,c+this.offset,d+this.offset)};b.prototype.slice=function(a,c){void 0===c&&(c=this.length);if(c>this.length)throw Error("oob");
|
||||
if(a>c)throw Error("oob");return new b(this.parent,c-a,+a+this.offset)};b.prototype.utf8Slice=function(a,b){return this.toString("utf8",a,b)};b.prototype.binarySlice=function(a,b){return this.toString("binary",a,b)};b.prototype.asciiSlice=function(a,b){return this.toString("ascii",a,b)};b.prototype.utf8Write=function(a,b){return this.write(a,b,"utf8")};b.prototype.binaryWrite=function(a,b){return this.write(a,b,"binary")};b.prototype.asciiWrite=function(a,b){return this.write(a,b,"ascii")};b.prototype.readUInt8=
|
||||
function(a,b){b||(l.ok(void 0!==a&&null!==a,"missing offset"),l.ok(a<this.length,"Trying to read beyond buffer length"));return this.parent[this.offset+a]};b.prototype.readUInt16LE=function(a,b){return q(this,a,!1,b)};b.prototype.readUInt16BE=function(a,b){return q(this,a,!0,b)};b.prototype.readUInt32LE=function(a,b){return p(this,a,!1,b)};b.prototype.readUInt32BE=function(a,b){return p(this,a,!0,b)};b.prototype.readInt8=function(a,b){b||(l.ok(void 0!==a&&null!==a,"missing offset"),l.ok(a<this.length,
|
||||
"Trying to read beyond buffer length"));return this.parent[this.offset+a]&128?-1*(255-this.parent[this.offset+a]+1):this.parent[this.offset+a]};b.prototype.readInt16LE=function(a,b){return v(this,a,!1,b)};b.prototype.readInt16BE=function(a,b){return v(this,a,!0,b)};b.prototype.readInt32LE=function(a,b){return u(this,a,!1,b)};b.prototype.readInt32BE=function(a,b){return u(this,a,!0,b)};b.prototype.readFloatLE=function(a,b){return w(this,a,!1,b)};b.prototype.readFloatBE=function(a,b){return w(this,
|
||||
a,!0,b)};b.prototype.readDoubleLE=function(a,b){return s(this,a,!1,b)};b.prototype.readDoubleBE=function(a,b){return s(this,a,!0,b)};b.prototype.writeUInt8=function(a,b,c){c||(l.ok(void 0!==a&&null!==a,"missing value"),l.ok(void 0!==b&&null!==b,"missing offset"),l.ok(b<this.length,"trying to write beyond buffer length"),r(a,255));this.parent[this.offset+b]=a};b.prototype.writeUInt16LE=function(a,b,c){t(this,a,b,!1,c)};b.prototype.writeUInt16BE=function(a,b,c){t(this,a,b,!0,c)};b.prototype.writeUInt32LE=
|
||||
function(a,b,c){n(this,a,b,!1,c)};b.prototype.writeUInt32BE=function(a,b,c){n(this,a,b,!0,c)};b.prototype.writeInt8=function(a,b,c){c||(l.ok(void 0!==a&&null!==a,"missing value"),l.ok(void 0!==b&&null!==b,"missing offset"),l.ok(b<this.length,"Trying to write beyond buffer length"),z(a,127,-128));0<=a?this.writeUInt8(a,b,c):this.writeUInt8(255+a+1,b,c)};b.prototype.writeInt16LE=function(a,b,c){G(this,a,b,!1,c)};b.prototype.writeInt16BE=function(a,b,c){G(this,a,b,!0,c)};b.prototype.writeInt32LE=function(a,
|
||||
b,c){H(this,a,b,!1,c)};b.prototype.writeInt32BE=function(a,b,c){H(this,a,b,!0,c)};b.prototype.writeFloatLE=function(a,b,c){I(this,a,b,!1,c)};b.prototype.writeFloatBE=function(a,b,c){I(this,a,b,!0,c)};b.prototype.writeDoubleLE=function(a,b,c){J(this,a,b,!1,c)};b.prototype.writeDoubleBE=function(a,b,c){J(this,a,b,!0,c)};e.prototype.readUInt8=b.prototype.readUInt8;e.prototype.readUInt16LE=b.prototype.readUInt16LE;e.prototype.readUInt16BE=b.prototype.readUInt16BE;e.prototype.readUInt32LE=b.prototype.readUInt32LE;
|
||||
e.prototype.readUInt32BE=b.prototype.readUInt32BE;e.prototype.readInt8=b.prototype.readInt8;e.prototype.readInt16LE=b.prototype.readInt16LE;e.prototype.readInt16BE=b.prototype.readInt16BE;e.prototype.readInt32LE=b.prototype.readInt32LE;e.prototype.readInt32BE=b.prototype.readInt32BE;e.prototype.readFloatLE=b.prototype.readFloatLE;e.prototype.readFloatBE=b.prototype.readFloatBE;e.prototype.readDoubleLE=b.prototype.readDoubleLE;e.prototype.readDoubleBE=b.prototype.readDoubleBE;e.prototype.writeUInt8=
|
||||
b.prototype.writeUInt8;e.prototype.writeUInt16LE=b.prototype.writeUInt16LE;e.prototype.writeUInt16BE=b.prototype.writeUInt16BE;e.prototype.writeUInt32LE=b.prototype.writeUInt32LE;e.prototype.writeUInt32BE=b.prototype.writeUInt32BE;e.prototype.writeInt8=b.prototype.writeInt8;e.prototype.writeInt16LE=b.prototype.writeInt16LE;e.prototype.writeInt16BE=b.prototype.writeInt16BE;e.prototype.writeInt32LE=b.prototype.writeInt32LE;e.prototype.writeInt32BE=b.prototype.writeInt32BE;e.prototype.writeFloatLE=b.prototype.writeFloatLE;
|
||||
e.prototype.writeFloatBE=b.prototype.writeFloatBE;e.prototype.writeDoubleLE=b.prototype.writeDoubleLE;e.prototype.writeDoubleBE=b.prototype.writeDoubleBE},{assert:1,"./buffer_ieee754":8,"base64-js":9}],9:[function(g,k,h){(function(e){k.exports.toByteArray=function(a){var c,e,d,f,b;if(0<a.length%4)throw"Invalid string. Length must be a multiple of 4";f=a.indexOf("=");f=0<f?a.length-f:0;b=[];e=0<f?a.length-4:a.length;for(c=0;c<e;c+=4)d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c])<<
|
||||
18|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c+1])<<12|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c+2])<<6|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c+3]),b.push((d&16711680)>>16),b.push((d&65280)>>8),b.push(d&255);2===f?(d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c])<<2|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c+1])>>4,b.push(d&
|
||||
255)):1===f&&(d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c])<<10|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c+1])<<4|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c+2])>>2,b.push(d>>8&255),b.push(d&255));return b};k.exports.fromByteArray=function(a){var c,e=a.length%3,d="",f,b;c=0;for(b=a.length-e;c<b;c+=3)f=(a[c]<<16)+(a[c+1]<<8)+a[c+2],d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f>>
|
||||
18&63]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f>>12&63]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f>>6&63]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f&63];switch(e){case 1:f=a[a.length-1];d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f>>2];d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f<<4&63];d+="==";break;case 2:f=(a[a.length-2]<<8)+a[a.length-1],d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f>>
|
||||
10],d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f>>4&63],d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f<<2&63],d+="="}return d}})()},{}]},{},[]);v.exports=k("buffer-browserify")},{}],16:[function(k,v,p){k=v.exports={};k.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(g){return window.setImmediate(g)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var g=[];window.addEventListener("message",
|
||||
function(k){k.source===window&&"process-tick"===k.data&&(k.stopPropagation(),0<g.length&&g.shift()())},!0);return function(k){g.push(k);window.postMessage("process-tick","*")}}return function(g){setTimeout(g,0)}}();k.title="browser";k.browser=!0;k.env={};k.argv=[];k.binding=function(g){throw Error("process.binding is not supported");};k.cwd=function(){return"/"};k.chdir=function(g){throw Error("process.chdir is not supported");}},{}]},{},[1]);
|
Loading…
Reference in New Issue
Block a user