UNPKG

modelld

Version:

A JavaScript API for selecting and manipulating linked data subgraphs

7 lines 507 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Modelld=e():t.Modelld=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="/dist/",e(0)}(function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(typeof t[e]){case"function":break;case"object":t[e]=function(e){var r=e.slice(1),n=t[e[0]];return function(t,e,i){n.apply(this,[t,e,i].concat(r))}}(t[e]);break;default:t[e]=t[t[e]]}return t}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1);Object.defineProperty(e,"fieldFactory",{enumerable:!0,get:function(){return n.fieldFactory}});var i=r(205);Object.defineProperty(e,"modelFactory",{enumerable:!0,get:function(){return i.modelFactory}})},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){var e=function(e,r){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return new v({predicate:t,value:e,namedNode:n.namedNode,namedGraph:r})};return e.fromQuad=function(t){return new v({predicate:t.predicate,originalObject:t.object,originalNamedGraph:t.graph})},e.predicate=t,e}function a(t){var e=void 0,r=t.value,n=t.datatype,i=function(){throw new Error("Cannot parse rdf type/value to JS value. Given value ["+r+"] of type ["+n+"].")};if(n){var o="http://www.w3.org/2001/XMLSchema#";switch(n.value){case o+"boolean":"1"===r?e=!0:"0"===r?e=!1:i();break;case o+"dateTime":e=new Date(r);break;case o+"decimal":case o+"double":e=Number.parseFloat(r);break;case o+"integer":e=Number.parseInt(r);break;case"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString":case o+"string":default:e=r}}else e=r;return e}Object.defineProperty(e,"__esModule",{value:!0}),e.Field=void 0;var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();e.fieldFactory=o;var u=r(2),c=n(u),l=r(99),f=n(l),h=r(123),p=n(h),d=r(204),v=e.Field=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=e.predicate,n=e.namedGraph,o=e.value,s=e.namedNode,u=e.originalObject,c=e.originalNamedGraph;if(i(this,t),!((0,d.isDefined)(r)&&((0,d.isDefined)(o)&&(0,d.isDefined)(n)||(0,d.isDefined)(u)&&(0,d.isDefined)(c))))throw new Error("Insufficient arguments.");this.predicate=r,(0,d.isDefined)(u)&&(this.originalObject=u,this.value=a(u)),(0,d.isDefined)(c)&&(this.originalNamedGraph=p["default"].NamedNode.fromValue(c),this.namedGraph=this.originalNamedGraph),(0,d.isDefined)(n)&&(this.namedGraph=p["default"].NamedNode.fromValue(n)),(0,d.isDefined)(o)&&(this.value=o),(0,d.isDefined)(s)&&(this.namedNode=s||!1),this.id=f["default"].v4(),Object.freeze(this)}return s(t,[{key:"toQuad",value:function(t,e){var r=void 0;return(0,d.isDefined)(this.originalObject)?(r=(0,c["default"])(this.originalObject),r.value=this.originalObject.constructor.fromValue(this.value).value,(0,d.isDefined)(r.uri)&&(r.uri=this.value)):r=this.namedNode?t.NamedNode.fromValue(this.value):t.Literal.fromValue(this.value),t.quad(e,this.predicate,r,this.namedGraph||this.originalNamedGraph)}},{key:"originalQuad",value:function(t,e){return(0,d.isDefined)(this.originalObject)||(0,d.isDefined)(this.originalNamedGraph)?t.quad(e,this.predicate,this.originalObject,this.originalNamedGraph):null}},{key:"set",value:function(e){var r=e.value,n=void 0===r?null:r,i=e.namedGraph,o=void 0===i?null:i,a=e.namedNode,s=void 0!==a&&a;return new t({originalObject:this.originalObject,originalNamedGraph:this.originalNamedGraph,namedGraph:o||this.namedGraph,predicate:this.predicate,value:null!==n?n:this.value,namedNode:s})}},{key:"fromCurrentState",value:function(e,r){var n=this.toQuad(e,r);return new t({predicate:this.predicate,originalObject:n.object,originalNamedGraph:n.graph,namedNode:this.namedNode})}}]),t}()},function(t,e,r){function n(t){return i(t,!1,!0)}var i=r(3);t.exports=n},function(t,e,r){function n(t,e,r,x,T,k,S){var N;if(x&&(N=k?x(t,T,k,S):x(t)),void 0!==N)return N;if(!b(t))return t;var j=y(t);if(j){if(N=p(t),!e)return c(t,N)}else{var R=h(t),C=R==E||R==I;if(g(t))return u(t,e);if(R==O||R==_||C&&!k){if(m(t))return k?t:{};if(N=v(C?{}:t),!e)return l(t,s(N,t))}else{if(!J[R])return k?t:{};N=d(t,R,n,e)}}S||(S=new i);var A=S.get(t);if(A)return A;if(S.set(t,N),!j)var D=r?f(t):w(t);return o(D||t,function(i,o){D&&(o=i,i=t[o]),a(N,o,n(i,e,r,x,o,t,S))}),N}var i=r(4),o=r(45),a=r(46),s=r(47),u=r(63),c=r(64),l=r(65),f=r(68),h=r(71),p=r(77),d=r(78),v=r(93),y=r(57),g=r(96),m=r(23),b=r(22),w=r(49),_="[object Arguments]",x="[object Array]",T="[object Boolean]",k="[object Date]",S="[object Error]",E="[object Function]",I="[object GeneratorFunction]",N="[object Map]",j="[object Number]",O="[object Object]",R="[object RegExp]",C="[object Set]",A="[object String]",D="[object Symbol]",L="[object WeakMap]",M="[object ArrayBuffer]",U="[object DataView]",P="[object Float32Array]",q="[object Float64Array]",F="[object Int8Array]",B="[object Int16Array]",z="[object Int32Array]",H="[object Uint8Array]",X="[object Uint8ClampedArray]",V="[object Uint16Array]",W="[object Uint32Array]",J={};J[_]=J[x]=J[M]=J[U]=J[T]=J[k]=J[P]=J[q]=J[F]=J[B]=J[z]=J[N]=J[j]=J[O]=J[R]=J[C]=J[A]=J[D]=J[H]=J[X]=J[V]=J[W]=!0,J[S]=J[E]=J[L]=!1,t.exports=n},function(t,e,r){function n(t){this.__data__=new i(t)}var i=r(5),o=r(13),a=r(14),s=r(15),u=r(16),c=r(17);n.prototype.clear=o,n.prototype["delete"]=a,n.prototype.get=s,n.prototype.has=u,n.prototype.set=c,t.exports=n},function(t,e,r){function n(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var i=r(6),o=r(7),a=r(10),s=r(11),u=r(12);n.prototype.clear=i,n.prototype["delete"]=o,n.prototype.get=a,n.prototype.has=s,n.prototype.set=u,t.exports=n},function(t,e){function r(){this.__data__=[]}t.exports=r},function(t,e,r){function n(t){var e=this.__data__,r=i(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():a.call(e,r,1),!0}var i=r(8),o=Array.prototype,a=o.splice;t.exports=n},function(t,e,r){function n(t,e){for(var r=t.length;r--;)if(i(t[r][0],e))return r;return-1}var i=r(9);t.exports=n},function(t,e){function r(t,e){return t===e||t!==t&&e!==e}t.exports=r},function(t,e,r){function n(t){var e=this.__data__,r=i(e,t);return r<0?void 0:e[r][1]}var i=r(8);t.exports=n},function(t,e,r){function n(t){return i(this.__data__,t)>-1}var i=r(8);t.exports=n},function(t,e,r){function n(t,e){var r=this.__data__,n=i(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}var i=r(8);t.exports=n},function(t,e,r){function n(){this.__data__=new i}var i=r(5);t.exports=n},function(t,e){function r(t){return this.__data__["delete"](t)}t.exports=r},function(t,e){function r(t){return this.__data__.get(t)}t.exports=r},function(t,e){function r(t){return this.__data__.has(t)}t.exports=r},function(t,e,r){function n(t,e){var r=this.__data__;if(r instanceof i){var n=r.__data__;if(!o||n.length<s-1)return n.push([t,e]),this;r=this.__data__=new a(n)}return r.set(t,e),this}var i=r(5),o=r(18),a=r(30),s=200;t.exports=n},function(t,e,r){var n=r(19),i=r(26),o=n(i,"Map");t.exports=o},function(t,e,r){function n(t,e){var r=o(t,e);return i(r)?r:void 0}var i=r(20),o=r(29);t.exports=n},function(t,e,r){function n(t){if(!s(t)||a(t))return!1;var e=i(t)||o(t)?v:l;return e.test(u(t))}var i=r(21),o=r(23),a=r(24),s=r(22),u=r(28),c=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,f=Function.prototype,h=Object.prototype,p=f.toString,d=h.hasOwnProperty,v=RegExp("^"+p.call(d).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=n},function(t,e,r){function n(t){var e=i(t)?u.call(t):"";return e==o||e==a}var i=r(22),o="[object Function]",a="[object GeneratorFunction]",s=Object.prototype,u=s.toString;t.exports=n},function(t,e){function r(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=r},function(t,e){function r(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(r){}return e}t.exports=r},function(t,e,r){function n(t){return!!o&&o in t}var i=r(25),o=function(){var t=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=n},function(t,e,r){var n=r(26),i=n["__core-js_shared__"];t.exports=i},function(t,e,r){var n=r(27),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();t.exports=o},function(t,e){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(e,function(){return this}())},function(t,e){function r(t){if(null!=t){try{return i.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var n=Function.prototype,i=n.toString;t.exports=r},function(t,e){function r(t,e){return null==t?void 0:t[e]}t.exports=r},function(t,e,r){function n(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var i=r(31),o=r(39),a=r(42),s=r(43),u=r(44);n.prototype.clear=i,n.prototype["delete"]=o,n.prototype.get=a,n.prototype.has=s,n.prototype.set=u,t.exports=n},function(t,e,r){function n(){this.__data__={hash:new i,map:new(a||o),string:new i}}var i=r(32),o=r(5),a=r(18);t.exports=n},function(t,e,r){function n(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var i=r(33),o=r(35),a=r(36),s=r(37),u=r(38);n.prototype.clear=i,n.prototype["delete"]=o,n.prototype.get=a,n.prototype.has=s,n.prototype.set=u,t.exports=n},function(t,e,r){function n(){this.__data__=i?i(null):{}}var i=r(34);t.exports=n},function(t,e,r){var n=r(19),i=n(Object,"create");t.exports=i},function(t,e){function r(t){return this.has(t)&&delete this.__data__[t]}t.exports=r},function(t,e,r){function n(t){var e=this.__data__;if(i){var r=e[t];return r===o?void 0:r}return s.call(e,t)?e[t]:void 0}var i=r(34),o="__lodash_hash_undefined__",a=Object.prototype,s=a.hasOwnProperty;t.exports=n},function(t,e,r){function n(t){var e=this.__data__;return i?void 0!==e[t]:a.call(e,t)}var i=r(34),o=Object.prototype,a=o.hasOwnProperty;t.exports=n},function(t,e,r){function n(t,e){var r=this.__data__;return r[t]=i&&void 0===e?o:e,this}var i=r(34),o="__lodash_hash_undefined__";t.exports=n},function(t,e,r){function n(t){return i(this,t)["delete"](t)}var i=r(40);t.exports=n},function(t,e,r){function n(t,e){var r=t.__data__;return i(e)?r["string"==typeof e?"string":"hash"]:r.map}var i=r(41);t.exports=n},function(t,e){function r(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}t.exports=r},function(t,e,r){function n(t){return i(this,t).get(t)}var i=r(40);t.exports=n},function(t,e,r){function n(t){return i(this,t).has(t)}var i=r(40);t.exports=n},function(t,e,r){function n(t,e){return i(this,t).set(t,e),this}var i=r(40);t.exports=n},function(t,e){function r(t,e){for(var r=-1,n=t?t.length:0;++r<n&&e(t[r],r,t)!==!1;);return t}t.exports=r},function(t,e,r){function n(t,e,r){var n=t[e];a.call(t,e)&&i(n,r)&&(void 0!==r||e in t)||(t[e]=r)}var i=r(9),o=Object.prototype,a=o.hasOwnProperty;t.exports=n},function(t,e,r){function n(t,e){return t&&i(e,o(e),t)}var i=r(48),o=r(49);t.exports=n},function(t,e,r){function n(t,e,r,n){r||(r={});for(var o=-1,a=e.length;++o<a;){var s=e[o],u=n?n(r[s],t[s],s,r,t):void 0;i(r,s,void 0===u?t[s]:u)}return r}var i=r(46);t.exports=n},function(t,e,r){function n(t){return a(t)?i(t):o(t)}var i=r(50),o=r(59),a=r(54);t.exports=n},function(t,e,r){function n(t,e){var r=a(t)||o(t)?i(t.length,String):[],n=r.length,u=!!n;for(var l in t)!e&&!c.call(t,l)||u&&("length"==l||s(l,n))||r.push(l);return r}var i=r(51),o=r(52),a=r(57),s=r(58),u=Object.prototype,c=u.hasOwnProperty;t.exports=n},function(t,e){function r(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}t.exports=r},function(t,e,r){function n(t){return i(t)&&s.call(t,"callee")&&(!c.call(t,"callee")||u.call(t)==o)}var i=r(53),o="[object Arguments]",a=Object.prototype,s=a.hasOwnProperty,u=a.toString,c=a.propertyIsEnumerable;t.exports=n},function(t,e,r){function n(t){return o(t)&&i(t)}var i=r(54),o=r(56);t.exports=n},function(t,e,r){function n(t){return null!=t&&o(t.length)&&!i(t)}var i=r(21),o=r(55);t.exports=n},function(t,e){function r(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}var n=9007199254740991;t.exports=r},function(t,e){function r(t){return!!t&&"object"==typeof t}t.exports=r},function(t,e){var r=Array.isArray;t.exports=r},function(t,e){function r(t,e){return e=null==e?n:e,!!e&&("number"==typeof t||i.test(t))&&t>-1&&t%1==0&&t<e}var n=9007199254740991,i=/^(?:0|[1-9]\d*)$/;t.exports=r},function(t,e,r){function n(t){if(!i(t))return o(t);var e=[];for(var r in Object(t))s.call(t,r)&&"constructor"!=r&&e.push(r);return e}var i=r(60),o=r(61),a=Object.prototype,s=a.hasOwnProperty;t.exports=n},function(t,e){function r(t){var e=t&&t.constructor,r="function"==typeof e&&e.prototype||n;return t===r}var n=Object.prototype;t.exports=r},function(t,e,r){var n=r(62),i=n(Object.keys,Object);t.exports=i},function(t,e){function r(t,e){return function(r){return t(e(r))}}t.exports=r},function(t,e){function r(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}t.exports=r},function(t,e){function r(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}t.exports=r},function(t,e,r){function n(t,e){return i(t,o(t),e)}var i=r(48),o=r(66);t.exports=n},function(t,e,r){var n=r(62),i=r(67),o=Object.getOwnPropertySymbols,a=o?n(o,Object):i;t.exports=a},function(t,e){function r(){return[]}t.exports=r},function(t,e,r){function n(t){return i(t,a,o)}var i=r(69),o=r(66),a=r(49);t.exports=n},function(t,e,r){function n(t,e,r){var n=e(t);return o(t)?n:i(n,r(t))}var i=r(70),o=r(57);t.exports=n},function(t,e){function r(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}t.exports=r},function(t,e,r){var n=r(72),i=r(18),o=r(73),a=r(74),s=r(75),u=r(76),c=r(28),l="[object Map]",f="[object Object]",h="[object Promise]",p="[object Set]",d="[object WeakMap]",v="[object DataView]",y=Object.prototype,g=y.toString,m=c(n),b=c(i),w=c(o),_=c(a),x=c(s),T=u;(n&&T(new n(new ArrayBuffer(1)))!=v||i&&T(new i)!=l||o&&T(o.resolve())!=h||a&&T(new a)!=p||s&&T(new s)!=d)&&(T=function(t){var e=g.call(t),r=e==f?t.constructor:void 0,n=r?c(r):void 0;if(n)switch(n){case m:return v;case b:return l;case w:return h;case _:return p;case x:return d}return e}),t.exports=T},function(t,e,r){var n=r(19),i=r(26),o=n(i,"DataView");t.exports=o},function(t,e,r){var n=r(19),i=r(26),o=n(i,"Promise");t.exports=o},function(t,e,r){var n=r(19),i=r(26),o=n(i,"Set");t.exports=o},function(t,e,r){var n=r(19),i=r(26),o=n(i,"WeakMap");t.exports=o},function(t,e){function r(t){return i.call(t)}var n=Object.prototype,i=n.toString;t.exports=r},function(t,e){function r(t){var e=t.length,r=t.constructor(e);return e&&"string"==typeof t[0]&&i.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var n=Object.prototype,i=n.hasOwnProperty;t.exports=r},function(t,e,r){function n(t,e,r,n){var O=t.constructor;switch(e){case b:return i(t);case f:case h:return new O((+t));case w:return o(t,n);case _:case x:case T:case k:case S:case E:case I:case N:case j:return l(t,n);case p:return a(t,n,r);case d:case g:return new O(t);case v:return s(t);case y:return u(t,n,r);case m:return c(t)}}var i=r(79),o=r(81),a=r(82),s=r(86),u=r(87),c=r(90),l=r(92),f="[object Boolean]",h="[object Date]",p="[object Map]",d="[object Number]",v="[object RegExp]",y="[object Set]",g="[object String]",m="[object Symbol]",b="[object ArrayBuffer]",w="[object DataView]",_="[object Float32Array]",x="[object Float64Array]",T="[object Int8Array]",k="[object Int16Array]",S="[object Int32Array]",E="[object Uint8Array]",I="[object Uint8ClampedArray]",N="[object Uint16Array]",j="[object Uint32Array]";t.exports=n},function(t,e,r){function n(t){var e=new t.constructor(t.byteLength);return new i(e).set(new i(t)),e}var i=r(80);t.exports=n},function(t,e,r){var n=r(26),i=n.Uint8Array;t.exports=i},function(t,e,r){function n(t,e){var r=e?i(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var i=r(79);t.exports=n},function(t,e,r){function n(t,e,r){var n=e?r(a(t),!0):a(t);return o(n,i,new t.constructor)}var i=r(83),o=r(84),a=r(85);t.exports=n},function(t,e){function r(t,e){return t.set(e[0],e[1]),t}t.exports=r},function(t,e){function r(t,e,r,n){var i=-1,o=t?t.length:0;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}t.exports=r},function(t,e){function r(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}t.exports=r},function(t,e){function r(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}var n=/\w*$/;t.exports=r},function(t,e,r){function n(t,e,r){var n=e?r(a(t),!0):a(t);return o(n,i,new t.constructor)}var i=r(88),o=r(84),a=r(89);t.exports=n},function(t,e){function r(t,e){return t.add(e),t}t.exports=r},function(t,e){function r(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}t.exports=r},function(t,e,r){function n(t){return a?Object(a.call(t)):{}}var i=r(91),o=i?i.prototype:void 0,a=o?o.valueOf:void 0;t.exports=n},function(t,e,r){var n=r(26),i=n.Symbol;t.exports=i},function(t,e,r){function n(t,e){var r=e?i(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var i=r(79);t.exports=n},function(t,e,r){function n(t){return"function"!=typeof t.constructor||a(t)?{}:i(o(t))}var i=r(94),o=r(95),a=r(60);t.exports=n},function(t,e,r){function n(t){return i(t)?o(t):{}}var i=r(22),o=Object.create;t.exports=n},function(t,e,r){var n=r(62),i=n(Object.getPrototypeOf,Object);t.exports=i},function(t,e,r){(function(t){var n=r(26),i=r(98),o="object"==typeof e&&e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o,u=s?n.Buffer:void 0,c=u?u.isBuffer:void 0,l=c||i;t.exports=l}).call(e,r(97)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){function r(){return!1}t.exports=r},function(t,e,r){var n;(function(i){!function(o){"use strict";function a(){var t=o.crypto||o.msCrypto;if(!h&&t&&t.getRandomValues)try{var e=new Uint8Array(16);v=h=function(){return t.getRandomValues(e),e},h()}catch(r){}if(!h){var n=new Array(16);p=h=function(){for(var t,e=0;e<16;e++)0===(3&e)&&(t=4294967296*Math.random()),n[e]=t>>>((3&e)<<3)&255;return n},"undefined"!=typeof console&&console.warn&&console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()")}}function s(){try{var t=r(104).randomBytes;d=h=t&&function(){return t(16)},h()}catch(e){}}function u(t,e,r){var n=e&&r||0,i=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){i<16&&(e[n+i++]=m[t])});i<16;)e[n+i++]=0;return e}function c(t,e){var r=e||0,n=g;return n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]}function l(t,e,r){var n=e&&r||0,i=e||[];t=t||{};var o=null!=t.clockseq?t.clockseq:x,a=null!=t.msecs?t.msecs:(new Date).getTime(),s=null!=t.nsecs?t.nsecs:k+1,u=a-T+(s-k)/1e4;if(u<0&&null==t.clockseq&&(o=o+1&16383),(u<0||a>T)&&null==t.nsecs&&(s=0),s>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");T=a,k=s,x=o,a+=122192928e5;var l=(1e4*(268435455&a)+s)%4294967296;i[n++]=l>>>24&255,i[n++]=l>>>16&255,i[n++]=l>>>8&255,i[n++]=255&l;var f=a/4294967296*1e4&268435455;i[n++]=f>>>8&255,i[n++]=255&f,i[n++]=f>>>24&15|16,i[n++]=f>>>16&255,i[n++]=o>>>8|128,i[n++]=255&o;for(var h=t.node||_,p=0;p<6;p++)i[n+p]=h[p];return e?e:c(i)}function f(t,e,r){var n=e&&r||0;"string"==typeof t&&(e="binary"===t?new y(16):null,t=null),t=t||{};var i=t.random||(t.rng||h)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e)for(var o=0;o<16;o++)e[n+o]=i[o];return e||c(i)}var h,p,d,v;o?a():s();for(var y="function"==typeof i?i:Array,g=[],m={},b=0;b<256;b++)g[b]=(b+256).toString(16).substr(1),m[g[b]]=b;var w=h(),_=[1|w[0],w[1],w[2],w[3],w[4],w[5]],x=16383&(w[6]<<8|w[7]),T=0,k=0,S=f;S.v1=l,S.v4=f,S.parse=u,S.unparse=c,S.BufferClass=y,S._rng=h,S._mathRNG=p,S._nodeRNG=d,S._whatwgRNG=v,"undefined"!=typeof t&&t.exports?t.exports=S:(n=function(){return S}.call(e,r,e,t),!(void 0!==n&&(t.exports=n)))}("undefined"!=typeof window?window:null)}).call(e,r(100).Buffer)},function(t,e,r){(function(t,n){/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> * @license MIT */ "use strict";function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,r){if(o()<r)throw new RangeError("Invalid typed array length");return t.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r),e.__proto__=t.prototype):(null===e&&(e=new t(r)),e.length=r),e}function t(e,r,n){if(!(t.TYPED_ARRAY_SUPPORT||this instanceof t))return new t(e,r,n);if("number"==typeof e){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return s(this,e,r,n)}function s(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?p(t,e,r,n):"string"==typeof e?f(t,e,r):d(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e,r,n){return u(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}function l(e,r){if(u(r),e=a(e,r<0?0:0|v(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)e[n]=0;return e}function f(e,r,n){if("string"==typeof n&&""!==n||(n="utf8"),!t.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|g(r,n);e=a(e,i);var o=e.write(r,n);return o!==i&&(e=e.slice(0,o)),e}function h(t,e){var r=e.length<0?0:0|v(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(e,r,n,i){if(r.byteLength,n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return r=void 0===n&&void 0===i?new Uint8Array(r):void 0===i?new Uint8Array(r,n):new Uint8Array(r,n,i),t.TYPED_ARRAY_SUPPORT?(e=r,e.__proto__=t.prototype):e=h(e,r),e}function d(e,r){if(t.isBuffer(r)){var n=0|v(r.length);return e=a(e,n),0===e.length?e:(r.copy(e,0,0,n),e)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||Y(r.length)?a(e,0):h(e,r);if("Buffer"===r.type&&Z(r.data))return h(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function v(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function y(e){return+e!=e&&(e=0),t.alloc(+e)}function g(e,r){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(i)return V(e).length;r=(""+r).toLowerCase(),i=!0}}function m(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return A(this,e,r);case"utf8":case"utf-8":return j(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return N(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function w(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=t.from(r,i)),t.isBuffer(r))return 0===r.length?-1:_(e,r,n,i,o);if("number"==typeof r)return r=255&r,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):_(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function _(t,e,r,n,i){function o(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,s=t.length,u=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}var c;if(i){var l=-1;for(c=r;c<s;c++)if(o(t,c)===o(e,l===-1?0:c-l)){if(l===-1&&(l=c),c-l+1===u)return l*a}else l!==-1&&(c-=c-l),l=-1}else for(r+u>s&&(r=s-u),c=r;c>=0;c--){for(var f=!0,h=0;h<u;h++)if(o(t,c+h)!==o(e,h)){f=!1;break}if(f)return c}return-1}function x(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function T(t,e,r,n){return $(V(e,t.length-r),t,r,n)}function k(t,e,r,n){return $(W(e),t,r,n)}function S(t,e,r,n){return k(t,e,r,n)}function E(t,e,r,n){return $(G(e),t,r,n)}function I(t,e,r,n){return $(J(e,t.length-r),t,r,n)}function N(t,e,r){return 0===e&&r===t.length?Q.fromByteArray(t):Q.fromByteArray(t.slice(e,r))}function j(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=r){var u,c,l,f;switch(s){case 1:o<128&&(a=o);break;case 2:u=t[i+1],128===(192&u)&&(f=(31&o)<<6|63&u,f>127&&(a=f));break;case 3:u=t[i+1],c=t[i+2],128===(192&u)&&128===(192&c)&&(f=(15&o)<<12|(63&u)<<6|63&c,f>2047&&(f<55296||f>57343)&&(a=f));break;case 4:u=t[i+1],c=t[i+2],l=t[i+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(f=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l,f>65535&&f<1114112&&(a=f))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return O(n)}function O(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=tt));return r}function R(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function C(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function A(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=X(t[o]);return i}function D(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function L(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function M(e,r,n,i,o,a){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<a)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function U(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function P(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function q(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(t,e,r,n,i){return i||q(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),K.write(t,e,r,n,23,4),r+4}function B(t,e,r,n,i){return i||q(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),K.write(t,e,r,n,52,8),r+8}function z(t){if(t=H(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function H(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function X(t){return t<16?"0"+t.toString(16):t.toString(16)}function V(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function J(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function G(t){return Q.toByteArray(z(t))}function $(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Y(t){return t!==t}var Q=r(101),K=r(102),Z=r(103);e.Buffer=t,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=o(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,r){return s(null,t,e,r)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,r){return c(null,t,e,r)},t.allocUnsafe=function(t){return l(null,t)},t.allocUnsafeSlow=function(t){return l(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,r){if(!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,i=r.length,o=0,a=Math.min(n,i);o<a;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!Z(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=t.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!t.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,o),o+=a.length}return i},t.byteLength=g,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)b(this,e,e+1);return this},t.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},t.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this},t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?j(this,0,t):m.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e,r,n,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var a=o-i,s=n-r,u=Math.min(a,s),c=this.slice(i,o),l=e.slice(r,n),f=0;f<u;++f)if(c[f]!==l[f]){a=c[f],s=l[f];break}return a<s?-1:s<a?1:0},t.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},t.prototype.indexOf=function(t,e,r){return w(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return w(this,t,e,r,!1)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return x(this,t,e,r);case"utf8":case"utf-8":return T(this,t,e,r);case"ascii":return k(this,t,e,r);case"latin1":case"binary":return S(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=this.subarray(e,r),i.__proto__=t.prototype;else{var o=r-e;i=new t(o,(void 0));for(var a=0;a<o;++a)i[a]=this[a+e]}return i},t.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||L(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||L(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||L(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||L(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||L(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,r){t=0|t,e=0|e,r||L(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||L(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return e||L(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||L(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(t,e){e||L(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(t,e){return e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||L(t,4,this.length),K.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||L(t,4,this.length),K.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||L(t,8,this.length),K.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||L(t,8,this.length),K.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e=0|e,r=0|r,!n){var i=Math.pow(2,8*r)-1;M(this,t,e,r,i,0)}var o=1,a=0;for(this[e]=255&t;++a<r&&(o*=256);)this[e+a]=t/o&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e=0|e,r=0|r,!n){var i=Math.pow(2,8*r)-1;M(this,t,e,r,i,0)}var o=r-1,a=1;for(this[e+o]=255&t;--o>=0&&(a*=256);)this[e+o]=t/a&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r=0|r,n||M(this,e,r,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=255&e,r+1},t.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=0|r,n||M(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):U(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||M(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):U(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||M(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):P(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=0|r,n||M(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):P(this,e,r,!1),r+4},t.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},t.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},t.prototype.writeInt8=function(e,r,n){return e=+e,r=0|r,n||M(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r=0|r,n||M(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):U(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||M(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):U(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||M(this,e,r,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):P(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r=0|r,n||M(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):P(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return F(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return F(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return B(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return B(this,t,e,!1,r)},t.prototype.copy=function(e,r,n,i){if(n||(n=0),i||0===i||(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,a=i-n;if(this===e&&n<r&&r<i)for(o=a-1;o>=0;--o)e[o+r]=this[o+n];else if(a<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+r]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),r);return a},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e=255&e);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=r;a<n;++a)this[a]=e;else{var s=t.isBuffer(e)?e:V(new t(e,i).toString()),u=s.length;for(a=0;a<n-r;++a)this[a+r]=s[a%u]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(e,r(100).Buffer,function(){return this}())},function(t,e){"use strict";function r(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)s[e]=t[e],u[t.charCodeAt(e)]=e;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63}function n(t){var e,r,n,i,o,a,s=t.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[s-2]?2:"="===t[s-1]?1:0,a=new c(3*s/4-o),n=o>0?s-4:s;var l=0;for(e=0,r=0;e<n;e+=4,r+=3)i=u[t.charCodeAt(e)]<<18|u[t.charCodeAt(e+1)]<<12|u[t.charCodeAt(e+2)]<<6|u[t.charCodeAt(e+3)],a[l++]=i>>16&255,a[l++]=i>>8&255,a[l++]=255&i;return 2===o?(i=u[t.charCodeAt(e)]<<2|u[t.charCodeAt(e+1)]>>4,a[l++]=255&i):1===o&&(i=u[t.charCodeAt(e)]<<10|u[t.charCodeAt(e+1)]<<4|u[t.charCodeAt(e+2)]>>2,a[l++]=i>>8&255,a[l++]=255&i),a}function i(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function o(t,e,r){for(var n,o=[],a=e;a<r;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],o.push(i(n));return o.join("")}function a(t){for(var e,r=t.length,n=r%3,i="",a=[],u=16383,c=0,l=r-n;c<l;c+=u)a.push(o(t,c,c+u>l?l:c+u));return 1===n?(e=t[r-1],i+=s[e>>2],i+=s[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=s[e>>10],i+=s[e>>4&63],i+=s[e<<2&63],i+="="),a.push(i),a.join("")}e.toByteArray=n,e.fromByteArray=a;var s=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array;r()},function(t,e){e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=s;l>0;o=256*o+t[e+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:(p?-1:1)*(1/0);a+=Math.pow(2,n),o-=c}return(p?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),e+=a+f>=1?h/u:h*Math.pow(2,1-f),e*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[r+p]=255&a,p+=d,a/=256,c-=8);t[r+p-d]|=128*v}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){(function(t){function n(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function i(t,e){for(var r in t)e(t[r],r)}var o=r(105);e.createHash=r(107),e.createHmac=r(120),e.randomBytes=function(e,r){if(!r||!r.call)return new t(o(e));try{r.call(this,void 0,new t(o(e)))}catch(n){r(n)}},e.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var a=r(121)(e);e.pbkdf2=a.pbkdf2,e.pbkdf2Sync=a.pbkdf2Sync,i(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman"],function(t){e[t]=function(){n("sorry,",t,"is not implemented yet")}})}).call(e,r(100).Buffer)},function(t,e,r){(function(e,n){!function(){var i=("undefined"==typeof window?e:window)||{};_crypto=i.crypto||i.msCrypto||r(106),t.exports=function(t){if(_crypto.getRandomValues){var e=new n(t);return _crypto.getRandomValues(e),e}if(_crypto.randomBytes)return _crypto.randomBytes(t);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(e,function(){return this}(),r(100).Buffer)},function(t,e){},function(t,e,r){(function(e){function n(t){return function(){var r=[],n={update:function(t,n){return e.isBuffer(t)||(t=new e(t,n)),r.push(t),this},digest:function(n){var i=e.concat(r),o=t(i);return r=null,n?o.toString(n):o}};return n}}var i=r(108),o=n(r(117)),a=n(r(119));t.exports=function(t){return"md5"===t?new o:"rmd160"===t?new a:i(t)}}).call(e,r(100).Buffer)},function(t,e,r){var e=t.exports=function(t){var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r},n=r(100).Buffer,i=r(109)(n);e.sha1=r(110)(n,i),e.sha256=r(115)(n,i),e.sha512=r(116)(n,i)},function(t,e){t.exports=function(t){function e(e,r){this._block=new t(e),this._finalSize=r,this._blockSize=e,this._len=0,this._s=0}return e.prototype.init=function(){this._s=0,this._len=0},e.prototype.update=function(e,r){"string"==typeof e&&(r=r||"utf8",e=new t(e,r));for(var n=this._len+=e.length,i=this._s=this._s||0,o=0,a=this._block;i<n;){for(var s=Math.min(e.length,o+this._blockSize-i%this._blockSize),u=s-o,c=0;c<u;c++)a[i%this._blockSize+c]=e[c+o];i+=u,o+=u,i%this._blockSize===0&&this._update(a)}return this._s=i,this},e.prototype.digest=function(t){var e=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),e%(8*this._blockSize)>=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var r=this._update(this._block)||this._hash();return t?r.toString(t):r},e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e}},function(t,e,r){var n=r(111).inherits;t.exports=function(t,e){function r(){return d.length?d.pop().init():this instanceof r?(this._w=p,e.call(this,64,56),this._h=null,void this.init()):new r}function i(t,e,r,n){return t<20?e&r|~e&n:t<40?e^r^n:t<60?e&r|e&n|r&n:e^r^n}function o(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function a(t,e){return t+e|0}function s(t,e){return t<<e|t>>>32-e}var u=0,c=4,l=8,f=12,h=16,p=new("undefined"==typeof Int32Array?Array:Int32Array)(80),d=[];return n(r,e),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,e.prototype.init.call(this),this},r.prototype._POOL=d,r.prototype._update=function(t){var e,r,n,u,c,l,f,h,p,d;e=l=this._a,r=f=this._b,n=h=this._c,u=p=this._d,c=d=this._e;for(var v=this._w,y=0;y<80;y++){var g=v[y]=y<16?t.readInt32BE(4*y):s(v[y-3]^v[y-8]^v[y-14]^v[y-16],1),m=a(a(s(e,5),i(y,r,n,u)),a(a(c,g),o(y)));c=u,u=n,n=s(r,30),r=e,e=m}this._a=a(e,l),this._b=a(r,f),this._c=a(n,h),this._d=a(u,p),this._e=a(c,d)},r.prototype._hash=function(){d.length<100&&d.push(this);var e=new t(20);return e.writeInt32BE(0|this._a,u),e.writeInt32BE(0|this._b,c),e.writeInt32BE(0|this._c,l),e.writeInt32BE(0|this._d,f),e.writeInt32BE(0|this._e,h),e},r}},function(t,e,r){(function(t,n){function i(t,r){var n={seen:[],stylize:a};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),v(r)?n.showHidden=r:r&&e._extend(n,r),_(n.showHidden)&&(n.showHidden=!1),_(n.depth)&&(n.depth=2),_(n.colors)&&(n.colors=!1),_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,t,n.depth)}function o(t,e){var r=i.styles[e];return r?"["+i.colors[r][0]+"m"+t+"["+i.colors[r][1]+"m":t}function a(t,e){return t}function s(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function u(t,r,n){if(t.customInspect&&r&&E(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return b(i)||(i=u(t,i,n)),i}var o=c(t,r);if(o)return o;var a=Object.keys(r),v=s(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),S(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(r);if(0===a.length){if(E(r)){var y=r.name?": "+r.name:"";return t.stylize("[Function"+y+"]","special")}if(x(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return t.stylize(Date.prototype.toString.call(r),"date");if(S(r))return l(r)}var g="",m=!1,w=["{","}"];if(d(r)&&(m=!0,w=["[","]"]),E(r)){var _=r.name?": "+r.name:"";g=" [Function"+_+"]"}if(x(r)&&(g=" "+RegExp.prototype.toString.call(r)),k(r)&&(g=" "+Date.prototype.toUTCString.call(r)),S(r)&&(g=" "+l(r)),0===a.length&&(!m||0==r.length))return w[0]+g+w[1];if(n<0)return x(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var T;return T=m?f(t,r,n,v,a):a.map(function(e){return h(t,r,n,v,e,m)}),t.seen.pop(),p(T,g,w)}function c(t,e){if(_(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return m(e)?t.stylize(""+e,"number"):v(e)?t.stylize(""+e,"boolean"):y(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,i){for(var o=[],a=0,s=e.length;a<s;++a)R(e,String(a))?o.push(h(t,e,r,n,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(h(t,e,r,n,i,!0))}),o}function h(t,e,r,n,i,o){var a,s,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?s=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(s=t.stylize("[Setter]","special")),R(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(c.value)<0?(s=y(r)?u(t,c.value,null):u(t,c.value,r-1),s.indexOf("\n")>-1&&(s=o?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n"))):s=t.stylize("[Circular]","special")),_(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g