Socket
Socket
Sign inDemoInstall

object-hash

Package Overview
Dependencies
0
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.9.5 to 1.0.0

test/blob.js

4

dist/object_hash.js

@@ -1,2 +0,2 @@

!function(t){if("object"==typeof exports)module.exports=t();else if("function"==typeof define&&define.amd)define(t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.objectHash=t()}}(function(){return function t(e,r,n){function o(u,a){if(!r[u]){if(!e[u]){var s="function"==typeof require&&require;if(!a&&s)return s(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}var f=r[u]={exports:{}};e[u][0].call(f.exports,function(t){var r=e[u][1][t];return o(r?r:t)},f,f.exports,t,e,r,n)}return r[u].exports}for(var i="function"==typeof require&&require,u=0;u<n.length;u++)o(n[u]);return o}({1:[function(t,e,r){(function(n,o,i,u,a,s,f,c,l){"use strict";function d(t,e){return e=e||{},e.algorithm=e.algorithm||"sha1",e.encoding=e.encoding||"hex",e.excludeValues=e.excludeValues?!0:!1,e.algorithm=e.algorithm.toLowerCase(),e.encoding=e.encoding.toLowerCase(),e.respectType=e.respectType===!1?!1:!0,e.respectFunctionProperties=e.respectFunctionProperties===!1?!1:!0,e.unorderedArrays=e.unorderedArrays!==!0?!1:!0,e.unorderedSets=e.unorderedSets!==!0?!1:!0,p(t,e),h(t,e)}function p(t,e){var r=w.getHashes?w.getHashes():["sha1","md5"],n=["buffer","hex","binary","base64"];if("undefined"==typeof t)throw new Error("Object argument required.");for(var o=0;o<r.length;++o)r[o].toLowerCase()===e.algorithm.toLowerCase()&&(e.algorithm=r[o]);if(-1===r.indexOf(e.algorithm))throw new Error('Algorithm "'+e.algorithm+'" not supported. supported values: '+r.join(", "));if(-1===n.indexOf(e.encoding))throw new Error('Encoding "'+e.encoding+'" not supported. supported values: '+n.join(", "))}function h(t,e){var r=w.createHash(e.algorithm),n=[];return y(r,e,n).dispatch(t),"buffer"===e.encoding?r.digest():r.digest(e.encoding)}function g(t){if("function"!=typeof t)return!1;var e=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i;return null!=e.exec(Function.prototype.toString.call(t))}function y(t,e,r){return{dispatch:function(t){var e=typeof t;return null===t?this._null():this["_"+e](t)},_object:function(n){var o=/\[object (.*)\]/i,u=Object.prototype.toString.call(n),a=o.exec(u)[1]||"null",s=null;if(a=a.toLowerCase(),(s=r.indexOf(n))>=0)return void y(t,e,r).dispatch("[CIRCULAR]: "+s);if(r.push(n),"undefined"!=typeof i&&i.isBuffer&&i.isBuffer(n))return t.update("buffer:"),t.update(n);if("object"===a||"function"===a){t.update("object:");var f=Object.keys(n).sort();return e.respectType===!1||g(n)||f.splice(0,0,"prototype","__proto__","constructor"),f.forEach(function(o){t.update(o,"utf8"),e.excludeValues||y(t,e,r).dispatch(n[o])})}if(!y(t,e,r)["_"+a])throw new Error('Unknown object type "'+a+'"');y(t,e,r)["_"+a](n)},_array:function(n){return t.update("array:"+n.length+":"),e.unorderedArrays!==!1&&(n=n.sort()),n.forEach(function(n){y(t,e,r).dispatch(n)})},_date:function(e){return t.update("date:"+e.toJSON())},_symbol:function(e){return t.update("symbol:"+e.toString(),"utf8")},_error:function(e){return t.update("error:"+e.toString(),"utf8")},_boolean:function(e){return t.update("bool:"+e.toString())},_string:function(e){return t.update("string:"+e,"utf8")},_function:function(r){return t.update("fn:"+r.toString(),"utf8"),e.respectFunctionProperties&&this._object(r),t},_number:function(e){return t.update("number:"+e.toString())},_xml:function(e){return t.update("xml:"+e.toString(),"utf8")},_null:function(){return t.update("Null")},_undefined:function(){return t.update("Undefined")},_regexp:function(e){return t.update("regex:"+e.toString(),"utf8")},_uint8array:function(n){return t.update("uint8array:"),y(t,e,r).dispatch(Array.prototype.slice.call(n))},_uint8clampedarray:function(n){return t.update("uint8clampedarray:"),y(t,e,r).dispatch(Array.prototype.slice.call(n))},_int8array:function(n){return t.update("uint8array:"),y(t,e,r).dispatch(Array.prototype.slice.call(n))},_uint16array:function(n){return t.update("uint16array:"),y(t,e,r).dispatch(Array.prototype.slice.call(n))},_int16array:function(n){return t.update("uint16array:"),y(t,e,r).dispatch(Array.prototype.slice.call(n))},_uint32array:function(n){return t.update("uint32array:"),y(t,e,r).dispatch(Array.prototype.slice.call(n))},_int32array:function(n){return t.update("uint32array:"),y(t,e,r).dispatch(Array.prototype.slice.call(n))},_float32array:function(n){return t.update("float32array:"),y(t,e,r).dispatch(Array.prototype.slice.call(n))},_float64array:function(n){return t.update("float64array:"),y(t,e,r).dispatch(Array.prototype.slice.call(n))},_arraybuffer:function(n){return t.update("arraybuffer:"),y(t,e,r).dispatch(new Uint8Array(n))},_url:function(e){return t.update("url:"+e.toString(),"utf8")},_map:function(n){t.update("map:");var o=Array.from(n);return e.unorderedSets!==!1&&e.unorderedArrays===!1&&(o=o.sort()),y(t,e,r).dispatch(o)},_set:function(n){t.update("set:");var o=Array.from(n);return e.unorderedSets!==!1&&e.unorderedArrays===!1&&(o=o.sort()),y(t,e,r).dispatch(o)},_domwindow:function(){return t.update("domwindow")},_process:function(){return t.update("process")},_timer:function(){return t.update("timer")},_pipe:function(){return t.update("pipe")},_tcp:function(){return t.update("tcp")},_udp:function(){return t.update("udp")},_tty:function(){return t.update("tty")},_statwatcher:function(){return t.update("statwatcher")},_securecontext:function(){return t.update("securecontext")},_connection:function(){return t.update("connection")},_zlib:function(){return t.update("zlib")},_context:function(){return t.update("context")},_nodescript:function(){return t.update("nodescript")},_httpparser:function(){return t.update("httpparser")},_dataview:function(){return t.update("dataview")},_signal:function(){return t.update("signal")},_fsevent:function(){return t.update("fsevent")},_tlswrap:function(){return t.update("tlswrap")}}}var w=t("crypto");r=e.exports=d,r.sha1=function(t){return d(t)},r.keys=function(t){return d(t,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},r.MD5=function(t){return d(t,{algorithm:"md5",encoding:"hex"})},r.keysMD5=function(t){return d(t,{algorithm:"md5",encoding:"hex",excludeValues:!0})},r.HashTable=t("./lib/hashTable")}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_efdb3947.js","/")},{"./lib/hashTable":3,buffer:5,crypto:7,lYpoI2:12}],2:[function(t,e,r){(function(n,o,i,u,a,s,f,c,l){"use strict";function d(t,e){return e=e||{},e.algorithm=e.algorithm||"sha1",e.encoding=e.encoding||"hex",e.excludeValues=e.excludeValues?!0:!1,e.algorithm=e.algorithm.toLowerCase(),e.encoding=e.encoding.toLowerCase(),e.respectType=e.respectType===!1?!1:!0,e.respectFunctionProperties=e.respectFunctionProperties===!1?!1:!0,e.unorderedArrays=e.unorderedArrays!==!0?!1:!0,e.unorderedSets=e.unorderedSets!==!0?!1:!0,p(t,e),h(t,e)}function p(t,e){var r=w.getHashes?w.getHashes():["sha1","md5"],n=["buffer","hex","binary","base64"];if("undefined"==typeof t)throw new Error("Object argument required.");for(var o=0;o<r.length;++o)r[o].toLowerCase()===e.algorithm.toLowerCase()&&(e.algorithm=r[o]);if(-1===r.indexOf(e.algorithm))throw new Error('Algorithm "'+e.algorithm+'" not supported. supported values: '+r.join(", "));if(-1===n.indexOf(e.encoding))throw new Error('Encoding "'+e.encoding+'" not supported. supported values: '+n.join(", "))}function h(t,e){var r=w.createHash(e.algorithm),n=[];return y(r,e,n).dispatch(t),"buffer"===e.encoding?r.digest():r.digest(e.encoding)}function g(t){if("function"!=typeof t)return!1;var e=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i;return null!=e.exec(Function.prototype.toString.call(t))}function y(t,e,r){return{dispatch:function(t){var e=typeof t;return null===t?this._null():this["_"+e](t)},_object:function(n){var o=/\[object (.*)\]/i,u=Object.prototype.toString.call(n),a=o.exec(u)[1]||"null",s=null;if(a=a.toLowerCase(),(s=r.indexOf(n))>=0)return void y(t,e,r).dispatch("[CIRCULAR]: "+s);if(r.push(n),"undefined"!=typeof i&&i.isBuffer&&i.isBuffer(n))return t.update("buffer:"),t.update(n);if("object"===a||"function"===a){t.update("object:");var f=Object.keys(n).sort();return e.respectType===!1||g(n)||f.splice(0,0,"prototype","__proto__","constructor"),f.forEach(function(o){t.update(o,"utf8"),e.excludeValues||y(t,e,r).dispatch(n[o])})}if(!y(t,e,r)["_"+a])throw new Error('Unknown object type "'+a+'"');y(t,e,r)["_"+a](n)},_array:function(n){return t.update("array:"+n.length+":"),e.unorderedArrays!==!1&&(n=n.sort()),n.forEach(function(n){y(t,e,r).dispatch(n)})},_date:function(e){return t.update("date:"+e.toJSON())},_symbol:function(e){return t.update("symbol:"+e.toString(),"utf8")},_error:function(e){return t.update("error:"+e.toString(),"utf8")},_boolean:function(e){return t.update("bool:"+e.toString())},_string:function(e){return t.update("string:"+e,"utf8")},_function:function(r){return t.update("fn:"+r.toString(),"utf8"),e.respectFunctionProperties&&this._object(r),t},_number:function(e){return t.update("number:"+e.toString())},_xml:function(e){return t.update("xml:"+e.toString(),"utf8")},_null:function(){return t.update("Null")},_undefined:function(){return t.update("Undefined")},_regexp:function(e){return t.update("regex:"+e.toString(),"utf8")},_uint8array:function(n){return t.update("uint8array:"),y(t,e,r).dispatch(Array.prototype.slice.call(n))},_uint8clampedarray:function(n){return t.update("uint8clampedarray:"),y(t,e,r).dispatch(Array.prototype.slice.call(n))},_int8array:function(n){return t.update("uint8array:"),y(t,e,r).dispatch(Array.prototype.slice.call(n))},_uint16array:function(n){return t.update("uint16array:"),y(t,e,r).dispatch(Array.prototype.slice.call(n))},_int16array:function(n){return t.update("uint16array:"),y(t,e,r).dispatch(Array.prototype.slice.call(n))},_uint32array:function(n){return t.update("uint32array:"),y(t,e,r).dispatch(Array.prototype.slice.call(n))},_int32array:function(n){return t.update("uint32array:"),y(t,e,r).dispatch(Array.prototype.slice.call(n))},_float32array:function(n){return t.update("float32array:"),y(t,e,r).dispatch(Array.prototype.slice.call(n))},_float64array:function(n){return t.update("float64array:"),y(t,e,r).dispatch(Array.prototype.slice.call(n))},_arraybuffer:function(n){return t.update("arraybuffer:"),y(t,e,r).dispatch(new Uint8Array(n))},_url:function(e){return t.update("url:"+e.toString(),"utf8")},_map:function(n){t.update("map:");var o=Array.from(n);return e.unorderedSets!==!1&&e.unorderedArrays===!1&&(o=o.sort()),y(t,e,r).dispatch(o)},_set:function(n){t.update("set:");var o=Array.from(n);return e.unorderedSets!==!1&&e.unorderedArrays===!1&&(o=o.sort()),y(t,e,r).dispatch(o)},_domwindow:function(){return t.update("domwindow")},_process:function(){return t.update("process")},_timer:function(){return t.update("timer")},_pipe:function(){return t.update("pipe")},_tcp:function(){return t.update("tcp")},_udp:function(){return t.update("udp")},_tty:function(){return t.update("tty")},_statwatcher:function(){return t.update("statwatcher")},_securecontext:function(){return t.update("securecontext")},_connection:function(){return t.update("connection")},_zlib:function(){return t.update("zlib")},_context:function(){return t.update("context")},_nodescript:function(){return t.update("nodescript")},_httpparser:function(){return t.update("httpparser")},_dataview:function(){return t.update("dataview")},_signal:function(){return t.update("signal")},_fsevent:function(){return t.update("fsevent")},_tlswrap:function(){return t.update("tlswrap")}}}var w=t("crypto");r=e.exports=d,r.sha1=function(t){return d(t)},r.keys=function(t){return d(t,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},r.MD5=function(t){return d(t,{algorithm:"md5",encoding:"hex"})},r.keysMD5=function(t){return d(t,{algorithm:"md5",encoding:"hex",excludeValues:!0})},r.HashTable=t("./lib/hashTable")}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/index.js","/")},{"./lib/hashTable":3,buffer:5,crypto:7,lYpoI2:12}],3:[function(t,e,r){(function(n,o,i,u,a,s,f,c,l){"use strict";function d(t){t=t||{},this.options=t,this._table={}}var p=t("../index");r=e.exports=d,d.prototype.add=function(){var t=this,e=Array.prototype.slice.call(arguments,0);return e.forEach(function(e){"[object Array]"===Object.prototype.toString.call(e)?e.forEach(function(e){t._addObject(e)}):t._addObject(e)}),this},d.prototype.remove=function(){var t=this,e=Array.prototype.slice.call(arguments,0);return e.forEach(function(e){"[object Array]"===Object.prototype.toString.call(e)?e.forEach(function(e){t._removeObject(e)}):t._removeObject(e)}),this},d.prototype._removeObject=function(t){var e=p(t,this.options),r=this.getCount(e);1>=r?delete this._table[e]:this._table[e].count=r-1},d.prototype._addObject=function(t){var e=p(t,this.options);this._table[e]?(this._table[e].count++,this.options.excludeValues&&this._table[e].value.push(t)):this._table[e]={value:this.options.excludeValues?[t]:t,count:1}},d.prototype.hasKey=function(t){return!!this._table[t]},d.prototype.getValue=function(t){return this._table[t]?this._table[t].value:void 0},d.prototype.getCount=function(t){return this._table[t]?this._table[t].count:0},d.prototype.table=function(){return this._table},d.prototype.toArray=function(){for(var t=Object.keys(this._table),e=[],r=0;r<t.length;r++)e.push({value:this._table[t[r]].value,count:this._table[t[r]].count,hash:t[r]});return e},d.prototype.reset=function(){return this._table={},this}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/lib/hashTable.js","/lib")},{"../index":2,buffer:5,lYpoI2:12}],4:[function(t,e,r){(function(t,e,n,o,i,u,a,s,f){var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===i||e===l?62:e===u||e===d?63:a>e?-1:a+10>e?e-a+26+26:f+26>e?e-f:s+26>e?e-s+26:void 0}function r(t){function r(t){f[l++]=t}var n,i,u,a,s,f;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=t.length;s="="===t.charAt(c-2)?2:"="===t.charAt(c-1)?1:0,f=new o(3*t.length/4-s),u=s>0?t.length-4:t.length;var l=0;for(n=0,i=0;u>n;n+=4,i+=3)a=e(t.charAt(n))<<18|e(t.charAt(n+1))<<12|e(t.charAt(n+2))<<6|e(t.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===s?(a=e(t.charAt(n))<<2|e(t.charAt(n+1))>>4,r(255&a)):1===s&&(a=e(t.charAt(n))<<10|e(t.charAt(n+1))<<4|e(t.charAt(n+2))>>2,r(a>>8&255),r(255&a)),f}function n(t){function e(t){return c.charAt(t)}function r(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var n,o,i,u=t.length%3,a="";for(n=0,i=t.length-u;i>n;n+=3)o=(t[n]<<16)+(t[n+1]<<8)+t[n+2],a+=r(o);switch(u){case 1:o=t[t.length-1],a+=e(o>>2),a+=e(o<<4&63),a+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],a+=e(o>>10),a+=e(o>>4&63),a+=e(o<<2&63),a+="="}return a}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="+".charCodeAt(0),u="/".charCodeAt(0),a="0".charCodeAt(0),s="a".charCodeAt(0),f="A".charCodeAt(0),l="-".charCodeAt(0),d="_".charCodeAt(0);t.toByteArray=r,t.fromByteArray=n}("undefined"==typeof r?this.base64js={}:r)}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/base64-js/lib/b64.js","/node_modules/base64-js/lib")},{buffer:5,lYpoI2:12}],5:[function(t,e,r){(function(e,n,o,i,u,a,s,f,c){function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);var n=typeof t;if("base64"===e&&"string"===n)for(t=Y(t);t.length%4!==0;)t+="=";var i;if("number"===n)i=N(t);else if("string"===n)i=o.byteLength(t,e);else{if("object"!==n)throw new Error("First argument needs to be a number, array or string.");i=N(t.length)}var u;o._useTypedArrays?u=o._augment(new Uint8Array(i)):(u=this,u.length=i,u._isBuffer=!0);var a;if(o._useTypedArrays&&"number"==typeof t.byteLength)u._set(t);else if(D(t))for(a=0;i>a;a++)o.isBuffer(t)?u[a]=t.readUInt8(a):u[a]=t[a];else if("string"===n)u.write(t,0,e);else if("number"===n&&!o._useTypedArrays&&!r)for(a=0;i>a;a++)u[a]=0;return u}function l(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var u=e.length;K(u%2===0,"Invalid hex string"),n>u/2&&(n=u/2);for(var a=0;n>a;a++){var s=parseInt(e.substr(2*a,2),16);K(!isNaN(s),"Invalid hex string"),t[r+a]=s}return o._charsWritten=2*a,a}function d(t,e,r,n){var i=o._charsWritten=z(H(e),t,r,n);return i}function p(t,e,r,n){var i=o._charsWritten=z(P(e),t,r,n);return i}function h(t,e,r,n){return p(t,e,r,n)}function g(t,e,r,n){var i=o._charsWritten=z(q(e),t,r,n);return i}function y(t,e,r,n){var i=o._charsWritten=z(R(e),t,r,n);return i}function w(t,e,r){return 0===e&&r===t.length?G.fromByteArray(t):G.fromByteArray(t.slice(e,r))}function b(t,e,r){var n="",o="";r=Math.min(t.length,r);for(var i=e;r>i;i++)t[i]<=127?(n+=J(o)+String.fromCharCode(t[i]),o=""):o+="%"+t[i].toString(16);return n+J(o)}function m(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;r>o;o++)n+=String.fromCharCode(t[o]);return n}function v(t,e,r){return m(t,e,r)}function _(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var o="",i=e;r>i;i++)o+=V(t[i]);return o}function E(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function A(t,e,r,n){n||(K("boolean"==typeof r,"missing or invalid endian"),K(void 0!==e&&null!==e,"missing offset"),K(e+1<t.length,"Trying to read beyond buffer length"));var o=t.length;if(!(e>=o)){var i;return r?(i=t[e],o>e+1&&(i|=t[e+1]<<8)):(i=t[e]<<8,o>e+1&&(i|=t[e+1])),i}}function I(t,e,r,n){n||(K("boolean"==typeof r,"missing or invalid endian"),K(void 0!==e&&null!==e,"missing offset"),K(e+3<t.length,"Trying to read beyond buffer length"));var o=t.length;if(!(e>=o)){var i;return r?(o>e+2&&(i=t[e+2]<<16),o>e+1&&(i|=t[e+1]<<8),i|=t[e],o>e+3&&(i+=t[e+3]<<24>>>0)):(o>e+1&&(i=t[e+1]<<16),o>e+2&&(i|=t[e+2]<<8),o>e+3&&(i|=t[e+3]),i+=t[e]<<24>>>0),i}}function B(t,e,r,n){n||(K("boolean"==typeof r,"missing or invalid endian"),K(void 0!==e&&null!==e,"missing offset"),K(e+1<t.length,"Trying to read beyond buffer length"));var o=t.length;if(!(e>=o)){var i=A(t,e,r,!0),u=32768&i;return u?-1*(65535-i+1):i}}function x(t,e,r,n){n||(K("boolean"==typeof r,"missing or invalid endian"),K(void 0!==e&&null!==e,"missing offset"),K(e+3<t.length,"Trying to read beyond buffer length"));var o=t.length;if(!(e>=o)){var i=I(t,e,r,!0),u=2147483648&i;return u?-1*(4294967295-i+1):i}}function L(t,e,r,n){return n||(K("boolean"==typeof r,"missing or invalid endian"),K(e+3<t.length,"Trying to read beyond buffer length")),Q.read(t,e,r,23,4)}function S(t,e,r,n){return n||(K("boolean"==typeof r,"missing or invalid endian"),K(e+7<t.length,"Trying to read beyond buffer length")),Q.read(t,e,r,52,8)}function j(t,e,r,n,o){o||(K(void 0!==e&&null!==e,"missing value"),K("boolean"==typeof n,"missing or invalid endian"),K(void 0!==r&&null!==r,"missing offset"),K(r+1<t.length,"trying to write beyond buffer length"),W(e,65535));var i=t.length;if(!(r>=i))for(var u=0,a=Math.min(i-r,2);a>u;u++)t[r+u]=(e&255<<8*(n?u:1-u))>>>8*(n?u:1-u)}function U(t,e,r,n,o){o||(K(void 0!==e&&null!==e,"missing value"),K("boolean"==typeof n,"missing or invalid endian"),K(void 0!==r&&null!==r,"missing offset"),K(r+3<t.length,"trying to write beyond buffer length"),W(e,4294967295));var i=t.length;if(!(r>=i))for(var u=0,a=Math.min(i-r,4);a>u;u++)t[r+u]=e>>>8*(n?u:3-u)&255}function C(t,e,r,n,o){o||(K(void 0!==e&&null!==e,"missing value"),K("boolean"==typeof n,"missing or invalid endian"),K(void 0!==r&&null!==r,"missing offset"),K(r+1<t.length,"Trying to write beyond buffer length"),X(e,32767,-32768));var i=t.length;r>=i||(e>=0?j(t,e,r,n,o):j(t,65535+e+1,r,n,o))}function T(t,e,r,n,o){o||(K(void 0!==e&&null!==e,"missing value"),K("boolean"==typeof n,"missing or invalid endian"),K(void 0!==r&&null!==r,"missing offset"),K(r+3<t.length,"Trying to write beyond buffer length"),X(e,2147483647,-2147483648));var i=t.length;r>=i||(e>=0?U(t,e,r,n,o):U(t,4294967295+e+1,r,n,o))}function k(t,e,r,n,o){o||(K(void 0!==e&&null!==e,"missing value"),K("boolean"==typeof n,"missing or invalid endian"),K(void 0!==r&&null!==r,"missing offset"),K(r+3<t.length,"Trying to write beyond buffer length"),$(e,3.4028234663852886e38,-3.4028234663852886e38));var i=t.length;r>=i||Q.write(t,e,r,n,23,4)}function M(t,e,r,n,o){o||(K(void 0!==e&&null!==e,"missing value"),K("boolean"==typeof n,"missing or invalid endian"),K(void 0!==r&&null!==r,"missing offset"),K(r+7<t.length,"Trying to write beyond buffer length"),$(e,1.7976931348623157e308,-1.7976931348623157e308));var i=t.length;r>=i||Q.write(t,e,r,n,52,8)}function Y(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function O(t,e,r){return"number"!=typeof t?r:(t=~~t,t>=e?e:t>=0?t:(t+=e,t>=0?t:0))}function N(t){return t=~~Math.ceil(+t),0>t?0:t}function F(t){return(Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)})(t)}function D(t){return F(t)||o.isBuffer(t)||t&&"object"==typeof t&&"number"==typeof t.length}function V(t){return 16>t?"0"+t.toString(16):t.toString(16)}function H(t){for(var e=[],r=0;r<t.length;r++){var n=t.charCodeAt(r);if(127>=n)e.push(t.charCodeAt(r));else{var o=r;n>=55296&&57343>=n&&r++;for(var i=encodeURIComponent(t.slice(o,r+1)).substr(1).split("%"),u=0;u<i.length;u++)e.push(parseInt(i[u],16))}}return e}function P(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}function R(t){for(var e,r,n,o=[],i=0;i<t.length;i++)e=t.charCodeAt(i),r=e>>8,n=e%256,o.push(n),o.push(r);return o}function q(t){return G.toByteArray(t)}function z(t,e,r,n){for(var o=0;n>o&&!(o+r>=e.length||o>=t.length);o++)e[o+r]=t[o];return o}function J(t){try{return decodeURIComponent(t)}catch(e){return String.fromCharCode(65533)}}function W(t,e){K("number"==typeof t,"cannot write a non-number as a number"),K(t>=0,"specified a negative value for writing an unsigned value"),K(e>=t,"value is larger than maximum value for type"),K(Math.floor(t)===t,"value has a fractional component")}function X(t,e,r){K("number"==typeof t,"cannot write a non-number as a number"),K(e>=t,"value larger than maximum allowed value"),K(t>=r,"value smaller than minimum allowed value"),K(Math.floor(t)===t,"value has a fractional component")}function $(t,e,r){K("number"==typeof t,"cannot write a non-number as a number"),K(e>=t,"value larger than maximum allowed value"),K(t>=r,"value smaller than minimum allowed value")}function K(t,e){if(!t)throw new Error(e||"Failed assertion")}var G=t("base64-js"),Q=t("ieee754");r.Buffer=o,r.SlowBuffer=o,r.INSPECT_MAX_BYTES=50,o.poolSize=8192,o._useTypedArrays=function(){try{var t=new ArrayBuffer(0),e=new Uint8Array(t);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray}catch(r){return!1}}(),o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.isBuffer=function(t){return!(null===t||void 0===t||!t._isBuffer)},o.byteLength=function(t,e){var r;switch(t+="",e||"utf8"){case"hex":r=t.length/2;break;case"utf8":case"utf-8":r=H(t).length;break;case"ascii":case"binary":case"raw":r=t.length;break;case"base64":r=q(t).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=2*t.length;break;default:throw new Error("Unknown encoding")}return r},o.concat=function(t,e){if(K(F(t),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===t.length)return new o(0);if(1===t.length)return t[0];var r;if("number"!=typeof e)for(e=0,r=0;r<t.length;r++)e+=t[r].length;var n=new o(e),i=0;for(r=0;r<t.length;r++){var u=t[r];u.copy(n,i),i+=u.length}return n},o.prototype.write=function(t,e,r,n){if(isFinite(e))isFinite(r)||(n=r,r=void 0);else{var o=n;n=e,e=r,r=o}e=Number(e)||0;var i=this.length-e;r?(r=Number(r),r>i&&(r=i)):r=i,n=String(n||"utf8").toLowerCase();var u;switch(n){case"hex":u=l(this,t,e,r);break;case"utf8":case"utf-8":u=d(this,t,e,r);break;case"ascii":u=p(this,t,e,r);break;case"binary":u=h(this,t,e,r);break;case"base64":u=g(this,t,e,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":u=y(this,t,e,r);break;default:throw new Error("Unknown encoding")}return u},o.prototype.toString=function(t,e,r){var n=this;if(t=String(t||"utf8").toLowerCase(),e=Number(e)||0,r=void 0!==r?Number(r):r=n.length,r===e)return"";var o;switch(t){case"hex":o=_(n,e,r);break;case"utf8":case"utf-8":o=b(n,e,r);break;case"ascii":o=m(n,e,r);break;case"binary":o=v(n,e,r);break;case"base64":o=w(n,e,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":o=E(n,e,r);break;default:throw new Error("Unknown encoding")}return o},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.copy=function(t,e,r,n){var i=this;if(r||(r=0),n||0===n||(n=this.length),e||(e=0),n!==r&&0!==t.length&&0!==i.length){K(n>=r,"sourceEnd < sourceStart"),K(e>=0&&e<t.length,"targetStart out of bounds"),K(r>=0&&r<i.length,"sourceStart out of bounds"),K(n>=0&&n<=i.length,"sourceEnd out of bounds"),n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var u=n-r;if(100>u||!o._useTypedArrays)for(var a=0;u>a;a++)t[a+e]=this[a+r];else t._set(this.subarray(r,r+u),e)}},o.prototype.slice=function(t,e){var r=this.length;if(t=O(t,r,0),e=O(e,r,r),o._useTypedArrays)return o._augment(this.subarray(t,e));for(var n=e-t,i=new o(n,void 0,!0),u=0;n>u;u++)i[u]=this[u+t];return i},o.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},o.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},o.prototype.readUInt8=function(t,e){return e||(K(void 0!==t&&null!==t,"missing offset"),K(t<this.length,"Trying to read beyond buffer length")),t>=this.length?void 0:this[t]},o.prototype.readUInt16LE=function(t,e){return A(this,t,!0,e)},o.prototype.readUInt16BE=function(t,e){return A(this,t,!1,e)},o.prototype.readUInt32LE=function(t,e){return I(this,t,!0,e)},o.prototype.readUInt32BE=function(t,e){return I(this,t,!1,e)},o.prototype.readInt8=function(t,e){if(e||(K(void 0!==t&&null!==t,"missing offset"),K(t<this.length,"Trying to read beyond buffer length")),!(t>=this.length)){var r=128&this[t];return r?-1*(255-this[t]+1):this[t]}},o.prototype.readInt16LE=function(t,e){return B(this,t,!0,e)},o.prototype.readInt16BE=function(t,e){return B(this,t,!1,e)},o.prototype.readInt32LE=function(t,e){return x(this,t,!0,e)},o.prototype.readInt32BE=function(t,e){return x(this,t,!1,e)},o.prototype.readFloatLE=function(t,e){return L(this,t,!0,e)},o.prototype.readFloatBE=function(t,e){return L(this,t,!1,e)},o.prototype.readDoubleLE=function(t,e){return S(this,t,!0,e)},o.prototype.readDoubleBE=function(t,e){return S(this,t,!1,e)},o.prototype.writeUInt8=function(t,e,r){r||(K(void 0!==t&&null!==t,"missing value"),K(void 0!==e&&null!==e,"missing offset"),K(e<this.length,"trying to write beyond buffer length"),W(t,255)),e>=this.length||(this[e]=t)},o.prototype.writeUInt16LE=function(t,e,r){j(this,t,e,!0,r)},o.prototype.writeUInt16BE=function(t,e,r){j(this,t,e,!1,r)},o.prototype.writeUInt32LE=function(t,e,r){U(this,t,e,!0,r)},o.prototype.writeUInt32BE=function(t,e,r){U(this,t,e,!1,r)},o.prototype.writeInt8=function(t,e,r){r||(K(void 0!==t&&null!==t,"missing value"),K(void 0!==e&&null!==e,"missing offset"),K(e<this.length,"Trying to write beyond buffer length"),X(t,127,-128)),e>=this.length||(t>=0?this.writeUInt8(t,e,r):this.writeUInt8(255+t+1,e,r))},o.prototype.writeInt16LE=function(t,e,r){C(this,t,e,!0,r)},o.prototype.writeInt16BE=function(t,e,r){C(this,t,e,!1,r)},o.prototype.writeInt32LE=function(t,e,r){T(this,t,e,!0,r)},o.prototype.writeInt32BE=function(t,e,r){T(this,t,e,!1,r)},o.prototype.writeFloatLE=function(t,e,r){k(this,t,e,!0,r)},o.prototype.writeFloatBE=function(t,e,r){k(this,t,e,!1,r)},o.prototype.writeDoubleLE=function(t,e,r){M(this,t,e,!0,r)},o.prototype.writeDoubleBE=function(t,e,r){M(this,t,e,!1,r)},o.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),"string"==typeof t&&(t=t.charCodeAt(0)),K("number"==typeof t&&!isNaN(t),"value is not a number"),K(r>=e,"end < start"),r!==e&&0!==this.length){K(e>=0&&e<this.length,"start out of bounds"),K(r>=0&&r<=this.length,"end out of bounds");for(var n=e;r>n;n++)this[n]=t}},o.prototype.inspect=function(){for(var t=[],e=this.length,n=0;e>n;n++)if(t[n]=V(this[n]),n===r.INSPECT_MAX_BYTES){t[n+1]="...";break}return"<Buffer "+t.join(" ")+">"},o.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(o._useTypedArrays)return new o(this).buffer;for(var t=new Uint8Array(this.length),e=0,r=t.length;r>e;e+=1)t[e]=this[e];return t.buffer}throw new Error("Buffer.toArrayBuffer not supported in this browser")};var Z=o.prototype;o._augment=function(t){return t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=Z.get,t.set=Z.set,t.write=Z.write,t.toString=Z.toString,t.toLocaleString=Z.toString,t.toJSON=Z.toJSON,t.copy=Z.copy,t.slice=Z.slice,t.readUInt8=Z.readUInt8,t.readUInt16LE=Z.readUInt16LE,t.readUInt16BE=Z.readUInt16BE,t.readUInt32LE=Z.readUInt32LE,t.readUInt32BE=Z.readUInt32BE,t.readInt8=Z.readInt8,t.readInt16LE=Z.readInt16LE,t.readInt16BE=Z.readInt16BE,t.readInt32LE=Z.readInt32LE,t.readInt32BE=Z.readInt32BE,t.readFloatLE=Z.readFloatLE,t.readFloatBE=Z.readFloatBE,t.readDoubleLE=Z.readDoubleLE,t.readDoubleBE=Z.readDoubleBE,t.writeUInt8=Z.writeUInt8,t.writeUInt16LE=Z.writeUInt16LE,t.writeUInt16BE=Z.writeUInt16BE,t.writeUInt32LE=Z.writeUInt32LE,t.writeUInt32BE=Z.writeUInt32BE,t.writeInt8=Z.writeInt8,t.writeInt16LE=Z.writeInt16LE,t.writeInt16BE=Z.writeInt16BE,t.writeInt32LE=Z.writeInt32LE,t.writeInt32BE=Z.writeInt32BE,t.writeFloatLE=Z.writeFloatLE,t.writeFloatBE=Z.writeFloatBE,t.writeDoubleLE=Z.writeDoubleLE,t.writeDoubleBE=Z.writeDoubleBE,t.fill=Z.fill,t.inspect=Z.inspect,t.toArrayBuffer=Z.toArrayBuffer,t}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":4,buffer:5,ieee754:13,lYpoI2:12}],6:[function(t,e,r){(function(r,n,o,i,u,a,s,f,c){function l(t,e){if(t.length%h!==0){var r=t.length+(h-t.length%h);t=o.concat([t,g],r)}for(var n=[],i=e?t.readInt32BE:t.readInt32LE,u=0;u<t.length;u+=h)n.push(i.call(t,u));return n}function d(t,e,r){for(var n=new o(e),i=r?n.writeInt32BE:n.writeInt32LE,u=0;u<t.length;u++)i.call(n,t[u],4*u,!0);return n}function p(t,e,r,n){o.isBuffer(t)||(t=new o(t));var i=e(l(t,n),t.length*y);return d(i,r,n)}var o=t("buffer").Buffer,h=4,g=new o(h);g.fill(0);var y=8;e.exports={hash:p}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:5,lYpoI2:12}],7:[function(t,e,r){(function(e,n,o,i,u,a,s,f,c){function l(t,e,r){o.isBuffer(e)||(e=new o(e)),o.isBuffer(r)||(r=new o(r)),e.length>v?e=t(e):e.length<v&&(e=o.concat([e,_],v));for(var n=new o(v),i=new o(v),u=0;v>u;u++)n[u]=54^e[u],i[u]=92^e[u];var a=t(o.concat([n,r]));return t(o.concat([i,a]))}function d(t,e){t=t||"sha1";var r=m[t],n=[],i=0;return r||p("algorithm:",t,"is not yet supported"),{update:function(t){return o.isBuffer(t)||(t=new o(t)),n.push(t),i+=t.length,this},digest:function(t){var i=o.concat(n),u=e?l(r,e,i):r(i);return n=null,t?u.toString(t):u}}}function p(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"));
}function h(t,e){for(var r in t)e(t[r],r)}var o=t("buffer").Buffer,g=t("./sha"),y=t("./sha256"),w=t("./rng"),b=t("./md5"),m={sha1:g,sha256:y,md5:b},v=64,_=new o(v);_.fill(0),r.createHash=function(t){return d(t)},r.createHmac=function(t,e){return d(t,e)},r.randomBytes=function(t,e){if(!e||!e.call)return new o(w(t));try{e.call(this,void 0,new o(w(t)))}catch(r){e(r)}},h(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(t){r[t]=function(){p("sorry,",t,"is not implemented yet")}})}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":8,"./rng":9,"./sha":10,"./sha256":11,buffer:5,lYpoI2:12}],8:[function(t,e,r){(function(r,n,o,i,u,a,s,f,c){function l(t,e){t[e>>5]|=128<<e%32,t[(e+64>>>9<<4)+14]=e;for(var r=1732584193,n=-271733879,o=-1732584194,i=271733878,u=0;u<t.length;u+=16){var a=r,s=n,f=o,c=i;r=p(r,n,o,i,t[u+0],7,-680876936),i=p(i,r,n,o,t[u+1],12,-389564586),o=p(o,i,r,n,t[u+2],17,606105819),n=p(n,o,i,r,t[u+3],22,-1044525330),r=p(r,n,o,i,t[u+4],7,-176418897),i=p(i,r,n,o,t[u+5],12,1200080426),o=p(o,i,r,n,t[u+6],17,-1473231341),n=p(n,o,i,r,t[u+7],22,-45705983),r=p(r,n,o,i,t[u+8],7,1770035416),i=p(i,r,n,o,t[u+9],12,-1958414417),o=p(o,i,r,n,t[u+10],17,-42063),n=p(n,o,i,r,t[u+11],22,-1990404162),r=p(r,n,o,i,t[u+12],7,1804603682),i=p(i,r,n,o,t[u+13],12,-40341101),o=p(o,i,r,n,t[u+14],17,-1502002290),n=p(n,o,i,r,t[u+15],22,1236535329),r=h(r,n,o,i,t[u+1],5,-165796510),i=h(i,r,n,o,t[u+6],9,-1069501632),o=h(o,i,r,n,t[u+11],14,643717713),n=h(n,o,i,r,t[u+0],20,-373897302),r=h(r,n,o,i,t[u+5],5,-701558691),i=h(i,r,n,o,t[u+10],9,38016083),o=h(o,i,r,n,t[u+15],14,-660478335),n=h(n,o,i,r,t[u+4],20,-405537848),r=h(r,n,o,i,t[u+9],5,568446438),i=h(i,r,n,o,t[u+14],9,-1019803690),o=h(o,i,r,n,t[u+3],14,-187363961),n=h(n,o,i,r,t[u+8],20,1163531501),r=h(r,n,o,i,t[u+13],5,-1444681467),i=h(i,r,n,o,t[u+2],9,-51403784),o=h(o,i,r,n,t[u+7],14,1735328473),n=h(n,o,i,r,t[u+12],20,-1926607734),r=g(r,n,o,i,t[u+5],4,-378558),i=g(i,r,n,o,t[u+8],11,-2022574463),o=g(o,i,r,n,t[u+11],16,1839030562),n=g(n,o,i,r,t[u+14],23,-35309556),r=g(r,n,o,i,t[u+1],4,-1530992060),i=g(i,r,n,o,t[u+4],11,1272893353),o=g(o,i,r,n,t[u+7],16,-155497632),n=g(n,o,i,r,t[u+10],23,-1094730640),r=g(r,n,o,i,t[u+13],4,681279174),i=g(i,r,n,o,t[u+0],11,-358537222),o=g(o,i,r,n,t[u+3],16,-722521979),n=g(n,o,i,r,t[u+6],23,76029189),r=g(r,n,o,i,t[u+9],4,-640364487),i=g(i,r,n,o,t[u+12],11,-421815835),o=g(o,i,r,n,t[u+15],16,530742520),n=g(n,o,i,r,t[u+2],23,-995338651),r=y(r,n,o,i,t[u+0],6,-198630844),i=y(i,r,n,o,t[u+7],10,1126891415),o=y(o,i,r,n,t[u+14],15,-1416354905),n=y(n,o,i,r,t[u+5],21,-57434055),r=y(r,n,o,i,t[u+12],6,1700485571),i=y(i,r,n,o,t[u+3],10,-1894986606),o=y(o,i,r,n,t[u+10],15,-1051523),n=y(n,o,i,r,t[u+1],21,-2054922799),r=y(r,n,o,i,t[u+8],6,1873313359),i=y(i,r,n,o,t[u+15],10,-30611744),o=y(o,i,r,n,t[u+6],15,-1560198380),n=y(n,o,i,r,t[u+13],21,1309151649),r=y(r,n,o,i,t[u+4],6,-145523070),i=y(i,r,n,o,t[u+11],10,-1120210379),o=y(o,i,r,n,t[u+2],15,718787259),n=y(n,o,i,r,t[u+9],21,-343485551),r=w(r,a),n=w(n,s),o=w(o,f),i=w(i,c)}return Array(r,n,o,i)}function d(t,e,r,n,o,i){return w(b(w(w(e,t),w(n,i)),o),r)}function p(t,e,r,n,o,i,u){return d(e&r|~e&n,t,e,o,i,u)}function h(t,e,r,n,o,i,u){return d(e&n|r&~n,t,e,o,i,u)}function g(t,e,r,n,o,i,u){return d(e^r^n,t,e,o,i,u)}function y(t,e,r,n,o,i,u){return d(r^(e|~n),t,e,o,i,u)}function w(t,e){var r=(65535&t)+(65535&e),n=(t>>16)+(e>>16)+(r>>16);return n<<16|65535&r}function b(t,e){return t<<e|t>>>32-e}var m=t("./helpers");e.exports=function(t){return m.hash(t,l,16)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":6,buffer:5,lYpoI2:12}],9:[function(t,e,r){(function(t,r,n,o,i,u,a,s,f){!function(){var t,r,n=this;t=function(t){for(var e,e,r=new Array(t),n=0;t>n;n++)0==(3&n)&&(e=4294967296*Math.random()),r[n]=e>>>((3&n)<<3)&255;return r},n.crypto&&crypto.getRandomValues&&(r=function(t){var e=new Uint8Array(t);return crypto.getRandomValues(e),e}),e.exports=r||t}()}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:5,lYpoI2:12}],10:[function(t,e,r){(function(r,n,o,i,u,a,s,f,c){function l(t,e){t[e>>5]|=128<<24-e%32,t[(e+64>>9<<4)+15]=e;for(var r=Array(80),n=1732584193,o=-271733879,i=-1732584194,u=271733878,a=-1009589776,s=0;s<t.length;s+=16){for(var f=n,c=o,l=i,y=u,w=a,b=0;80>b;b++){16>b?r[b]=t[s+b]:r[b]=g(r[b-3]^r[b-8]^r[b-14]^r[b-16],1);var m=h(h(g(n,5),d(b,o,i,u)),h(h(a,r[b]),p(b)));a=u,u=i,i=g(o,30),o=n,n=m}n=h(n,f),o=h(o,c),i=h(i,l),u=h(u,y),a=h(a,w)}return Array(n,o,i,u,a)}function d(t,e,r,n){return 20>t?e&r|~e&n:40>t?e^r^n:60>t?e&r|e&n|r&n:e^r^n}function p(t){return 20>t?1518500249:40>t?1859775393:60>t?-1894007588:-899497514}function h(t,e){var r=(65535&t)+(65535&e),n=(t>>16)+(e>>16)+(r>>16);return n<<16|65535&r}function g(t,e){return t<<e|t>>>32-e}var y=t("./helpers");e.exports=function(t){return y.hash(t,l,20,!0)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":6,buffer:5,lYpoI2:12}],11:[function(t,e,r){(function(r,n,o,i,u,a,s,f,c){var l=t("./helpers"),d=function(t,e){var r=(65535&t)+(65535&e),n=(t>>16)+(e>>16)+(r>>16);return n<<16|65535&r},p=function(t,e){return t>>>e|t<<32-e},h=function(t,e){return t>>>e},g=function(t,e,r){return t&e^~t&r},y=function(t,e,r){return t&e^t&r^e&r},w=function(t){return p(t,2)^p(t,13)^p(t,22)},b=function(t){return p(t,6)^p(t,11)^p(t,25)},m=function(t){return p(t,7)^p(t,18)^h(t,3)},v=function(t){return p(t,17)^p(t,19)^h(t,10)},_=function(t,e){var r,n,o,i,u,a,s,f,c,l,p,h,_=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),E=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),A=new Array(64);t[e>>5]|=128<<24-e%32,t[(e+64>>9<<4)+15]=e;for(var c=0;c<t.length;c+=16){r=E[0],n=E[1],o=E[2],i=E[3],u=E[4],a=E[5],s=E[6],f=E[7];for(var l=0;64>l;l++)16>l?A[l]=t[l+c]:A[l]=d(d(d(v(A[l-2]),A[l-7]),m(A[l-15])),A[l-16]),p=d(d(d(d(f,b(u)),g(u,a,s)),_[l]),A[l]),h=d(w(r),y(r,n,o)),f=s,s=a,a=u,u=d(i,p),i=o,o=n,n=r,r=d(p,h);E[0]=d(r,E[0]),E[1]=d(n,E[1]),E[2]=d(o,E[2]),E[3]=d(i,E[3]),E[4]=d(u,E[4]),E[5]=d(a,E[5]),E[6]=d(s,E[6]),E[7]=d(f,E[7])}return E};e.exports=function(t){return l.hash(t,_,32,!0)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":6,buffer:5,lYpoI2:12}],12:[function(t,e,r){(function(t,r,n,o,i,u,a,s,f){function c(){}var t=e.exports={};t.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var r=[];return window.addEventListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),r.length>0)){var n=r.shift();n()}},!0),function(t){r.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),t.title="browser",t.browser=!0,t.env={},t.argv=[],t.on=c,t.addListener=c,t.once=c,t.off=c,t.removeListener=c,t.removeAllListeners=c,t.emit=c,t.binding=function(t){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(t){throw new Error("process.chdir is not supported")}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:5,lYpoI2:12}],13:[function(t,e,r){(function(t,e,n,o,i,u,a,s,f){r.read=function(t,e,r,n,o){var i,u,a=8*o-n-1,s=(1<<a)-1,f=s>>1,c=-7,l=r?o-1:0,d=r?-1:1,p=t[e+l];for(l+=d,i=p&(1<<-c)-1,p>>=-c,c+=a;c>0;i=256*i+t[e+l],l+=d,c-=8);for(u=i&(1<<-c)-1,i>>=-c,c+=n;c>0;u=256*u+t[e+l],l+=d,c-=8);if(0===i)i=1-f;else{if(i===s)return u?NaN:(p?-1:1)*(1/0);u+=Math.pow(2,n),i-=f}return(p?-1:1)*u*Math.pow(2,i-n)},r.write=function(t,e,r,n,o,i){var u,a,s,f=8*i-o-1,c=(1<<f)-1,l=c>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,h=n?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,u=c):(u=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-u))<1&&(u--,s*=2),e+=u+l>=1?d/s:d*Math.pow(2,1-l),e*s>=2&&(u++,s/=2),u+l>=c?(a=0,u=c):u+l>=1?(a=(e*s-1)*Math.pow(2,o),u+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,o),u=0));o>=8;t[r+p]=255&a,p+=h,a/=256,o-=8);for(u=u<<o|a,f+=o;f>0;t[r+p]=255&u,p+=h,u/=256,f-=8);t[r+p-h]|=128*g}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/ieee754/index.js","/node_modules/ieee754")},{buffer:5,lYpoI2:12}]},{},[1])(1)});
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.objectHash=e()}}(function(){return function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);throw new Error("Cannot find module '"+s+"'")}var f=n[s]={exports:{}};t[s][0].call(f.exports,function(e){var n=t[s][1][e];return i(n?n:e)},f,f.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){(function(r,i,o,s,a,u,f,l,d){"use strict";function c(e,t){return t=h(e,t),g(e,t)}function h(e,t){var n=m.getHashes?m.getHashes():["sha1","md5"],r=["buffer","hex","binary","base64"];if(t=t||{},t.algorithm=t.algorithm||"sha1",t.encoding=t.encoding||"hex",t.excludeValues=t.excludeValues?!0:!1,t.algorithm=t.algorithm.toLowerCase(),t.encoding=t.encoding.toLowerCase(),t.ignoreUnknown=t.ignoreUnknown!==!0?!1:!0,t.respectType=t.respectType===!1?!1:!0,t.respectFunctionProperties=t.respectFunctionProperties===!1?!1:!0,t.unorderedArrays=t.unorderedArrays!==!0?!1:!0,t.unorderedSets=t.unorderedSets===!1?!1:!0,t.replacer=t.replacer||void 0,"undefined"==typeof e)throw new Error("Object argument required.");n.push("passthrough");for(var i=0;i<n.length;++i)n[i].toLowerCase()===t.algorithm.toLowerCase()&&(t.algorithm=n[i]);if(-1===n.indexOf(t.algorithm))throw new Error('Algorithm "'+t.algorithm+'" not supported. supported values: '+n.join(", "));if(-1===r.indexOf(t.encoding)&&"passthrough"!==t.algorithm)throw new Error('Encoding "'+t.encoding+'" not supported. supported values: '+r.join(", "));return t}function p(e){if("function"!=typeof e)return!1;var t=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i;return null!=t.exec(Function.prototype.toString.call(e))}function g(e,t){var n;n="passthrough"!==t.algorithm?m.createHash(t.algorithm):new y.PassThrough,"undefined"==typeof n.write&&(n.write=n.update,n.end=n.update);var r=w(t,n);if(r.dispatch(e),n.end(""),"undefined"==typeof n.read&&"function"==typeof n.digest)return n.digest("buffer"===t.encoding?void 0:t.encoding);var i=n.read();return"buffer"===t.encoding?i:i.toString(t.encoding)}function w(e,t,n){return n=n||[],{dispatch:function(t){e.replacer&&(t=e.replacer(t));var n=typeof t;return null===t&&(n="null"),this["_"+n](t)},_object:function(r){var i=/\[object (.*)\]/i,s=Object.prototype.toString.call(r),a=i.exec(s);a=a?a[1]:"unknown:["+s+"]",a=a.toLowerCase();var u=null;if((u=n.indexOf(r))>=0)return this.dispatch("[CIRCULAR:"+u+"]");if(n.push(r),"undefined"!=typeof o&&o.isBuffer&&o.isBuffer(r))return t.write("buffer:"),t.write(r);if("object"===a||"function"===a){var f=Object.keys(r).sort();e.respectType===!1||p(r)||f.splice(0,0,"prototype","__proto__","constructor"),t.write("object:"+f.length+":");var l=this;return f.forEach(function(n){l.dispatch(n),t.write(":"),e.excludeValues||l.dispatch(r[n]),t.write(",")})}if(!this["_"+a]){if(e.ignoreUnknown)return t.write("["+a+"]");throw new Error('Unknown object type "'+a+'"')}this["_"+a](r)},_array:function(r,i){i="undefined"!=typeof i?i:e.unorderedArrays!==!1;var o=this;if(t.write("array:"+r.length+":"),!i)return r.forEach(function(e){return o.dispatch(e)});var s=[],a=r.map(function(t){var r=new y.PassThrough,i=n.slice(),o=w(e,r,i);return o.dispatch(t),s=s.concat(i.slice(n.length)),r.read().toString()});return n=n.concat(s),a.sort(),this._array(a,!1)},_date:function(e){return t.write("date:"+e.toJSON())},_symbol:function(e){return t.write("symbol:"+e.toString(),"utf8")},_error:function(e){return t.write("error:"+e.toString(),"utf8")},_boolean:function(e){return t.write("bool:"+e.toString())},_string:function(e){t.write("string:"+e.length+":"),t.write(e,"utf8")},_function:function(n){t.write("fn:"),p(n)?this.dispatch("[native]"):this.dispatch(n.toString()),e.respectFunctionProperties&&this._object(n)},_number:function(e){return t.write("number:"+e.toString())},_xml:function(e){return t.write("xml:"+e.toString(),"utf8")},_null:function(){return t.write("Null")},_undefined:function(){return t.write("Undefined")},_regexp:function(e){return t.write("regex:"+e.toString(),"utf8")},_uint8array:function(e){return t.write("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint8clampedarray:function(e){return t.write("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(e))},_int8array:function(e){return t.write("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint16array:function(e){return t.write("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_int16array:function(e){return t.write("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_uint32array:function(e){return t.write("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_int32array:function(e){return t.write("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_float32array:function(e){return t.write("float32array:"),this.dispatch(Array.prototype.slice.call(e))},_float64array:function(e){return t.write("float64array:"),this.dispatch(Array.prototype.slice.call(e))},_arraybuffer:function(e){return t.write("arraybuffer:"),this.dispatch(new Uint8Array(e))},_url:function(e){return t.write("url:"+e.toString(),"utf8")},_map:function(n){t.write("map:");var r=Array.from(n);return this._array(r,e.unorderedSets!==!1)},_set:function(n){t.write("set:");var r=Array.from(n);return this._array(r,e.unorderedSets!==!1)},_blob:function(){if(e.ignoreUnknown)return t.write("[blob]");throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n')},_domwindow:function(){return t.write("domwindow")},_process:function(){return t.write("process")},_timer:function(){return t.write("timer")},_pipe:function(){return t.write("pipe")},_tcp:function(){return t.write("tcp")},_udp:function(){return t.write("udp")},_tty:function(){return t.write("tty")},_statwatcher:function(){return t.write("statwatcher")},_securecontext:function(){return t.write("securecontext")},_connection:function(){return t.write("connection")},_zlib:function(){return t.write("zlib")},_context:function(){return t.write("context")},_nodescript:function(){return t.write("nodescript")},_httpparser:function(){return t.write("httpparser")},_dataview:function(){return t.write("dataview")},_signal:function(){return t.write("signal")},_fsevent:function(){return t.write("fsevent")},_tlswrap:function(){return t.write("tlswrap")}}}var m=e("crypto"),y=e("stream");n=t.exports=c,n.sha1=function(e){return c(e)},n.keys=function(e){return c(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},n.MD5=function(e){return c(e,{algorithm:"md5",encoding:"hex"})},n.keysMD5=function(e){return c(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})},n.writeToStream=function(e,t,n){return"undefined"==typeof n&&(n=t,t={}),t=h(e,t),w(t,n).dispatch(e)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_8d4d9bf9.js","/")},{buffer:3,crypto:5,lYpoI2:11,stream:13}],2:[function(e,t,n){(function(e,t,r,i,o,s,a,u,f){var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===o||t===d?62:t===s||t===c?63:a>t?-1:a+10>t?t-a+26+26:f+26>t?t-f:u+26>t?t-u+26:void 0}function n(e){function n(e){f[d++]=e}var r,o,s,a,u,f;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=e.length;u="="===e.charAt(l-2)?2:"="===e.charAt(l-1)?1:0,f=new i(3*e.length/4-u),s=u>0?e.length-4:e.length;var d=0;for(r=0,o=0;s>r;r+=4,o+=3)a=t(e.charAt(r))<<18|t(e.charAt(r+1))<<12|t(e.charAt(r+2))<<6|t(e.charAt(r+3)),n((16711680&a)>>16),n((65280&a)>>8),n(255&a);return 2===u?(a=t(e.charAt(r))<<2|t(e.charAt(r+1))>>4,n(255&a)):1===u&&(a=t(e.charAt(r))<<10|t(e.charAt(r+1))<<4|t(e.charAt(r+2))>>2,n(a>>8&255),n(255&a)),f}function r(e){function t(e){return l.charAt(e)}function n(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var r,i,o,s=e.length%3,a="";for(r=0,o=e.length-s;o>r;r+=3)i=(e[r]<<16)+(e[r+1]<<8)+e[r+2],a+=n(i);switch(s){case 1:i=e[e.length-1],a+=t(i>>2),a+=t(i<<4&63),a+="==";break;case 2:i=(e[e.length-2]<<8)+e[e.length-1],a+=t(i>>10),a+=t(i>>4&63),a+=t(i<<2&63),a+="="}return a}var i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="+".charCodeAt(0),s="/".charCodeAt(0),a="0".charCodeAt(0),u="a".charCodeAt(0),f="A".charCodeAt(0),d="-".charCodeAt(0),c="_".charCodeAt(0);e.toByteArray=n,e.fromByteArray=r}("undefined"==typeof n?this.base64js={}:n)}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/base64-js/lib/b64.js","/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(e,t,n){(function(t,r,i,o,s,a,u,f,l){function i(e,t,n){if(!(this instanceof i))return new i(e,t,n);var r=typeof e;if("base64"===t&&"string"===r)for(e=R(e);e.length%4!==0;)e+="=";var o;if("number"===r)o=D(e);else if("string"===r)o=i.byteLength(e,t);else{if("object"!==r)throw new Error("First argument needs to be a number, array or string.");o=D(e.length)}var s;i._useTypedArrays?s=i._augment(new Uint8Array(o)):(s=this,s.length=o,s._isBuffer=!0);var a;if(i._useTypedArrays&&"number"==typeof e.byteLength)s._set(e);else if(W(e))for(a=0;o>a;a++)i.isBuffer(e)?s[a]=e.readUInt8(a):s[a]=e[a];else if("string"===r)s.write(e,0,t);else if("number"===r&&!i._useTypedArrays&&!n)for(a=0;o>a;a++)s[a]=0;return s}function d(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r),r>o&&(r=o)):r=o;var s=t.length;G(s%2===0,"Invalid hex string"),r>s/2&&(r=s/2);for(var a=0;r>a;a++){var u=parseInt(t.substr(2*a,2),16);G(!isNaN(u),"Invalid hex string"),e[n+a]=u}return i._charsWritten=2*a,a}function c(e,t,n,r){var o=i._charsWritten=V(F(t),e,n,r);return o}function h(e,t,n,r){var o=i._charsWritten=V(P(t),e,n,r);return o}function p(e,t,n,r){return h(e,t,n,r)}function g(e,t,n,r){var o=i._charsWritten=V(z(t),e,n,r);return o}function w(e,t,n,r){var o=i._charsWritten=V(H(t),e,n,r);return o}function m(e,t,n){return 0===t&&n===e.length?K.fromByteArray(e):K.fromByteArray(e.slice(t,n))}function y(e,t,n){var r="",i="";n=Math.min(e.length,n);for(var o=t;n>o;o++)e[o]<=127?(r+=q(i)+String.fromCharCode(e[o]),i=""):i+="%"+e[o].toString(16);return r+q(i)}function b(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(e[i]);return r}function v(e,t,n){return b(e,t,n)}function _(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var i="",o=t;n>o;o++)i+=O(e[o]);return i}function E(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function I(e,t,n,r){r||(G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+1<e.length,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o;return n?(o=e[t],i>t+1&&(o|=e[t+1]<<8)):(o=e[t]<<8,i>t+1&&(o|=e[t+1])),o}}function L(e,t,n,r){r||(G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+3<e.length,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o;return n?(i>t+2&&(o=e[t+2]<<16),i>t+1&&(o|=e[t+1]<<8),o|=e[t],i>t+3&&(o+=e[t+3]<<24>>>0)):(i>t+1&&(o=e[t+1]<<16),i>t+2&&(o|=e[t+2]<<8),i>t+3&&(o|=e[t+3]),o+=e[t]<<24>>>0),o}}function B(e,t,n,r){r||(G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+1<e.length,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o=I(e,t,n,!0),s=32768&o;return s?-1*(65535-o+1):o}}function S(e,t,n,r){r||(G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+3<e.length,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o=L(e,t,n,!0),s=2147483648&o;return s?-1*(4294967295-o+1):o}}function A(e,t,n,r){return r||(G("boolean"==typeof n,"missing or invalid endian"),G(t+3<e.length,"Trying to read beyond buffer length")),Q.read(e,t,n,23,4)}function j(e,t,n,r){return r||(G("boolean"==typeof n,"missing or invalid endian"),G(t+7<e.length,"Trying to read beyond buffer length")),Q.read(e,t,n,52,8)}function k(e,t,n,r,i){i||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==n&&null!==n,"missing offset"),G(n+1<e.length,"trying to write beyond buffer length"),J(t,65535));var o=e.length;if(!(n>=o))for(var s=0,a=Math.min(o-n,2);a>s;s++)e[n+s]=(t&255<<8*(r?s:1-s))>>>8*(r?s:1-s)}function x(e,t,n,r,i){i||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==n&&null!==n,"missing offset"),G(n+3<e.length,"trying to write beyond buffer length"),J(t,4294967295));var o=e.length;if(!(n>=o))for(var s=0,a=Math.min(o-n,4);a>s;s++)e[n+s]=t>>>8*(r?s:3-s)&255}function M(e,t,n,r,i){i||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==n&&null!==n,"missing offset"),G(n+1<e.length,"Trying to write beyond buffer length"),X(t,32767,-32768));var o=e.length;n>=o||(t>=0?k(e,t,n,r,i):k(e,65535+t+1,n,r,i))}function C(e,t,n,r,i){i||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==n&&null!==n,"missing offset"),G(n+3<e.length,"Trying to write beyond buffer length"),X(t,2147483647,-2147483648));var o=e.length;n>=o||(t>=0?x(e,t,n,r,i):x(e,4294967295+t+1,n,r,i))}function U(e,t,n,r,i){i||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==n&&null!==n,"missing offset"),G(n+3<e.length,"Trying to write beyond buffer length"),$(t,3.4028234663852886e38,-3.4028234663852886e38));var o=e.length;n>=o||Q.write(e,t,n,r,23,4)}function T(e,t,n,r,i){i||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==n&&null!==n,"missing offset"),G(n+7<e.length,"Trying to write beyond buffer length"),$(t,1.7976931348623157e308,-1.7976931348623157e308));var o=e.length;n>=o||Q.write(e,t,n,r,52,8)}function R(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e,t,n){return"number"!=typeof e?n:(e=~~e,e>=t?t:e>=0?e:(e+=t,e>=0?e:0))}function D(e){return e=~~Math.ceil(+e),0>e?0:e}function N(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function W(e){return N(e)||i.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function O(e){return 16>e?"0"+e.toString(16):e.toString(16)}function F(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(127>=r)t.push(e.charCodeAt(n));else{var i=n;r>=55296&&57343>=r&&n++;for(var o=encodeURIComponent(e.slice(i,n+1)).substr(1).split("%"),s=0;s<o.length;s++)t.push(parseInt(o[s],16))}}return t}function P(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}function H(e){for(var t,n,r,i=[],o=0;o<e.length;o++)t=e.charCodeAt(o),n=t>>8,r=t%256,i.push(r),i.push(n);return i}function z(e){return K.toByteArray(e)}function V(e,t,n,r){for(var i=0;r>i&&!(i+n>=t.length||i>=e.length);i++)t[i+n]=e[i];return i}function q(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}function J(e,t){G("number"==typeof e,"cannot write a non-number as a number"),G(e>=0,"specified a negative value for writing an unsigned value"),G(t>=e,"value is larger than maximum value for type"),G(Math.floor(e)===e,"value has a fractional component")}function X(e,t,n){G("number"==typeof e,"cannot write a non-number as a number"),G(t>=e,"value larger than maximum allowed value"),G(e>=n,"value smaller than minimum allowed value"),G(Math.floor(e)===e,"value has a fractional component")}function $(e,t,n){G("number"==typeof e,"cannot write a non-number as a number"),G(t>=e,"value larger than maximum allowed value"),G(e>=n,"value smaller than minimum allowed value")}function G(e,t){if(!e)throw new Error(t||"Failed assertion")}var K=e("base64-js"),Q=e("ieee754");n.Buffer=i,n.SlowBuffer=i,n.INSPECT_MAX_BYTES=50,i.poolSize=8192,i._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray}catch(n){return!1}}(),i.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.isBuffer=function(e){return!(null===e||void 0===e||!e._isBuffer)},i.byteLength=function(e,t){var n;switch(e+="",t||"utf8"){case"hex":n=e.length/2;break;case"utf8":case"utf-8":n=F(e).length;break;case"ascii":case"binary":case"raw":n=e.length;break;case"base64":n=z(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=2*e.length;break;default:throw new Error("Unknown encoding")}return n},i.concat=function(e,t){if(G(N(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new i(0);if(1===e.length)return e[0];var n;if("number"!=typeof t)for(t=0,n=0;n<e.length;n++)t+=e[n].length;var r=new i(t),o=0;for(n=0;n<e.length;n++){var s=e[n];s.copy(r,o),o+=s.length}return r},i.prototype.write=function(e,t,n,r){if(isFinite(t))isFinite(n)||(r=n,n=void 0);else{var i=r;r=t,t=n,n=i}t=Number(t)||0;var o=this.length-t;n?(n=Number(n),n>o&&(n=o)):n=o,r=String(r||"utf8").toLowerCase();var s;switch(r){case"hex":s=d(this,e,t,n);break;case"utf8":case"utf-8":s=c(this,e,t,n);break;case"ascii":s=h(this,e,t,n);break;case"binary":s=p(this,e,t,n);break;case"base64":s=g(this,e,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":s=w(this,e,t,n);break;default:throw new Error("Unknown encoding")}return s},i.prototype.toString=function(e,t,n){var r=this;if(e=String(e||"utf8").toLowerCase(),t=Number(t)||0,n=void 0!==n?Number(n):n=r.length,n===t)return"";var i;switch(e){case"hex":i=_(r,t,n);break;case"utf8":case"utf-8":i=y(r,t,n);break;case"ascii":i=b(r,t,n);break;case"binary":i=v(r,t,n);break;case"base64":i=m(r,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":i=E(r,t,n);break;default:throw new Error("Unknown encoding")}return i},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},i.prototype.copy=function(e,t,n,r){var o=this;if(n||(n=0),r||0===r||(r=this.length),t||(t=0),r!==n&&0!==e.length&&0!==o.length){G(r>=n,"sourceEnd < sourceStart"),G(t>=0&&t<e.length,"targetStart out of bounds"),G(n>=0&&n<o.length,"sourceStart out of bounds"),G(r>=0&&r<=o.length,"sourceEnd out of bounds"),r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var s=r-n;if(100>s||!i._useTypedArrays)for(var a=0;s>a;a++)e[a+t]=this[a+n];else e._set(this.subarray(n,n+s),t)}},i.prototype.slice=function(e,t){var n=this.length;if(e=Y(e,n,0),t=Y(t,n,n),i._useTypedArrays)return i._augment(this.subarray(e,t));for(var r=t-e,o=new i(r,void 0,!0),s=0;r>s;s++)o[s]=this[s+e];return o},i.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},i.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},i.prototype.readUInt8=function(e,t){return t||(G(void 0!==e&&null!==e,"missing offset"),G(e<this.length,"Trying to read beyond buffer length")),e>=this.length?void 0:this[e]},i.prototype.readUInt16LE=function(e,t){return I(this,e,!0,t)},i.prototype.readUInt16BE=function(e,t){return I(this,e,!1,t)},i.prototype.readUInt32LE=function(e,t){return L(this,e,!0,t)},i.prototype.readUInt32BE=function(e,t){return L(this,e,!1,t)},i.prototype.readInt8=function(e,t){if(t||(G(void 0!==e&&null!==e,"missing offset"),G(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length)){var n=128&this[e];return n?-1*(255-this[e]+1):this[e]}},i.prototype.readInt16LE=function(e,t){return B(this,e,!0,t)},i.prototype.readInt16BE=function(e,t){return B(this,e,!1,t)},i.prototype.readInt32LE=function(e,t){return S(this,e,!0,t)},i.prototype.readInt32BE=function(e,t){return S(this,e,!1,t)},i.prototype.readFloatLE=function(e,t){return A(this,e,!0,t)},i.prototype.readFloatBE=function(e,t){return A(this,e,!1,t)},i.prototype.readDoubleLE=function(e,t){return j(this,e,!0,t)},i.prototype.readDoubleBE=function(e,t){return j(this,e,!1,t)},i.prototype.writeUInt8=function(e,t,n){n||(G(void 0!==e&&null!==e,"missing value"),G(void 0!==t&&null!==t,"missing offset"),G(t<this.length,"trying to write beyond buffer length"),J(e,255)),t>=this.length||(this[t]=e)},i.prototype.writeUInt16LE=function(e,t,n){k(this,e,t,!0,n)},i.prototype.writeUInt16BE=function(e,t,n){k(this,e,t,!1,n)},i.prototype.writeUInt32LE=function(e,t,n){x(this,e,t,!0,n)},i.prototype.writeUInt32BE=function(e,t,n){x(this,e,t,!1,n)},i.prototype.writeInt8=function(e,t,n){n||(G(void 0!==e&&null!==e,"missing value"),G(void 0!==t&&null!==t,"missing offset"),G(t<this.length,"Trying to write beyond buffer length"),X(e,127,-128)),t>=this.length||(e>=0?this.writeUInt8(e,t,n):this.writeUInt8(255+e+1,t,n))},i.prototype.writeInt16LE=function(e,t,n){M(this,e,t,!0,n)},i.prototype.writeInt16BE=function(e,t,n){M(this,e,t,!1,n)},i.prototype.writeInt32LE=function(e,t,n){C(this,e,t,!0,n)},i.prototype.writeInt32BE=function(e,t,n){C(this,e,t,!1,n)},i.prototype.writeFloatLE=function(e,t,n){U(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){U(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){T(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){T(this,e,t,!1,n)},i.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),"string"==typeof e&&(e=e.charCodeAt(0)),G("number"==typeof e&&!isNaN(e),"value is not a number"),G(n>=t,"end < start"),n!==t&&0!==this.length){G(t>=0&&t<this.length,"start out of bounds"),G(n>=0&&n<=this.length,"end out of bounds");for(var r=t;n>r;r++)this[r]=e}},i.prototype.inspect=function(){for(var e=[],t=this.length,r=0;t>r;r++)if(e[r]=O(this[r]),r===n.INSPECT_MAX_BYTES){e[r+1]="...";break}return"<Buffer "+e.join(" ")+">"},i.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(i._useTypedArrays)return new i(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;n>t;t+=1)e[t]=this[t];return e.buffer}throw new Error("Buffer.toArrayBuffer not supported in this browser")};var Z=i.prototype;i._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=Z.get,e.set=Z.set,e.write=Z.write,e.toString=Z.toString,e.toLocaleString=Z.toString,e.toJSON=Z.toJSON,e.copy=Z.copy,e.slice=Z.slice,e.readUInt8=Z.readUInt8,e.readUInt16LE=Z.readUInt16LE,e.readUInt16BE=Z.readUInt16BE,e.readUInt32LE=Z.readUInt32LE,e.readUInt32BE=Z.readUInt32BE,e.readInt8=Z.readInt8,e.readInt16LE=Z.readInt16LE,e.readInt16BE=Z.readInt16BE,e.readInt32LE=Z.readInt32LE,e.readInt32BE=Z.readInt32BE,e.readFloatLE=Z.readFloatLE,e.readFloatBE=Z.readFloatBE,e.readDoubleLE=Z.readDoubleLE,e.readDoubleBE=Z.readDoubleBE,e.writeUInt8=Z.writeUInt8,e.writeUInt16LE=Z.writeUInt16LE,e.writeUInt16BE=Z.writeUInt16BE,e.writeUInt32LE=Z.writeUInt32LE,e.writeUInt32BE=Z.writeUInt32BE,e.writeInt8=Z.writeInt8,e.writeInt16LE=Z.writeInt16LE,e.writeInt16BE=Z.writeInt16BE,e.writeInt32LE=Z.writeInt32LE,e.writeInt32BE=Z.writeInt32BE,e.writeFloatLE=Z.writeFloatLE,e.writeFloatBE=Z.writeFloatBE,e.writeDoubleLE=Z.writeDoubleLE,e.writeDoubleBE=Z.writeDoubleBE,e.fill=Z.fill,e.inspect=Z.inspect,e.toArrayBuffer=Z.toArrayBuffer,e}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:20,lYpoI2:11}],4:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){function d(e,t){if(e.length%p!==0){var n=e.length+(p-e.length%p);e=i.concat([e,g],n)}for(var r=[],o=t?e.readInt32BE:e.readInt32LE,s=0;s<e.length;s+=p)r.push(o.call(e,s));return r}function c(e,t,n){for(var r=new i(t),o=n?r.writeInt32BE:r.writeInt32LE,s=0;s<e.length;s++)o.call(r,e[s],4*s,!0);return r}function h(e,t,n,r){i.isBuffer(e)||(e=new i(e));var o=t(d(e,r),e.length*w);return c(o,n,r)}var i=e("buffer").Buffer,p=4,g=new i(p);g.fill(0);var w=8;t.exports={hash:h}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],5:[function(e,t,n){(function(t,r,i,o,s,a,u,f,l){function d(e,t,n){i.isBuffer(t)||(t=new i(t)),i.isBuffer(n)||(n=new i(n)),t.length>v?t=e(t):t.length<v&&(t=i.concat([t,_],v));for(var r=new i(v),o=new i(v),s=0;v>s;s++)r[s]=54^t[s],o[s]=92^t[s];var a=e(i.concat([r,n]));return e(i.concat([o,a]))}function c(e,t){e=e||"sha1";var n=b[e],r=[],o=0;return n||h("algorithm:",e,"is not yet supported"),{update:function(e){return i.isBuffer(e)||(e=new i(e)),r.push(e),o+=e.length,this},digest:function(e){var o=i.concat(r),s=t?d(n,t,o):n(o);return r=null,e?s.toString(e):s}}}function h(){var e=[].slice.call(arguments).join(" ");throw new Error([e,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function p(e,t){for(var n in e)t(e[n],n)}var i=e("buffer").Buffer,g=e("./sha"),w=e("./sha256"),m=e("./rng"),y=e("./md5"),b={sha1:g,sha256:w,md5:y},v=64,_=new i(v);_.fill(0),n.createHash=function(e){return c(e)},n.createHmac=function(e,t){return c(e,t)},n.randomBytes=function(e,t){if(!t||!t.call)return new i(m(e));try{t.call(this,void 0,new i(m(e)))}catch(n){t(n)}},p(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(e){n[e]=function(){h("sorry,",e,"is not implemented yet")}})}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:11}],6:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){function d(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;for(var n=1732584193,r=-271733879,i=-1732584194,o=271733878,s=0;s<e.length;s+=16){var a=n,u=r,f=i,l=o;n=h(n,r,i,o,e[s+0],7,-680876936),o=h(o,n,r,i,e[s+1],12,-389564586),i=h(i,o,n,r,e[s+2],17,606105819),r=h(r,i,o,n,e[s+3],22,-1044525330),n=h(n,r,i,o,e[s+4],7,-176418897),o=h(o,n,r,i,e[s+5],12,1200080426),i=h(i,o,n,r,e[s+6],17,-1473231341),r=h(r,i,o,n,e[s+7],22,-45705983),n=h(n,r,i,o,e[s+8],7,1770035416),o=h(o,n,r,i,e[s+9],12,-1958414417),i=h(i,o,n,r,e[s+10],17,-42063),r=h(r,i,o,n,e[s+11],22,-1990404162),n=h(n,r,i,o,e[s+12],7,1804603682),o=h(o,n,r,i,e[s+13],12,-40341101),i=h(i,o,n,r,e[s+14],17,-1502002290),r=h(r,i,o,n,e[s+15],22,1236535329),n=p(n,r,i,o,e[s+1],5,-165796510),o=p(o,n,r,i,e[s+6],9,-1069501632),i=p(i,o,n,r,e[s+11],14,643717713),r=p(r,i,o,n,e[s+0],20,-373897302),n=p(n,r,i,o,e[s+5],5,-701558691),o=p(o,n,r,i,e[s+10],9,38016083),i=p(i,o,n,r,e[s+15],14,-660478335),r=p(r,i,o,n,e[s+4],20,-405537848),n=p(n,r,i,o,e[s+9],5,568446438),o=p(o,n,r,i,e[s+14],9,-1019803690),i=p(i,o,n,r,e[s+3],14,-187363961),r=p(r,i,o,n,e[s+8],20,1163531501),n=p(n,r,i,o,e[s+13],5,-1444681467),o=p(o,n,r,i,e[s+2],9,-51403784),i=p(i,o,n,r,e[s+7],14,1735328473),r=p(r,i,o,n,e[s+12],20,-1926607734),n=g(n,r,i,o,e[s+5],4,-378558),o=g(o,n,r,i,e[s+8],11,-2022574463),i=g(i,o,n,r,e[s+11],16,1839030562),r=g(r,i,o,n,e[s+14],23,-35309556),n=g(n,r,i,o,e[s+1],4,-1530992060),o=g(o,n,r,i,e[s+4],11,1272893353),i=g(i,o,n,r,e[s+7],16,-155497632),r=g(r,i,o,n,e[s+10],23,-1094730640),n=g(n,r,i,o,e[s+13],4,681279174),o=g(o,n,r,i,e[s+0],11,-358537222),i=g(i,o,n,r,e[s+3],16,-722521979),r=g(r,i,o,n,e[s+6],23,76029189),n=g(n,r,i,o,e[s+9],4,-640364487),o=g(o,n,r,i,e[s+12],11,-421815835),i=g(i,o,n,r,e[s+15],16,530742520),r=g(r,i,o,n,e[s+2],23,-995338651),n=w(n,r,i,o,e[s+0],6,-198630844),o=w(o,n,r,i,e[s+7],10,1126891415),i=w(i,o,n,r,e[s+14],15,-1416354905),r=w(r,i,o,n,e[s+5],21,-57434055),n=w(n,r,i,o,e[s+12],6,1700485571),o=w(o,n,r,i,e[s+3],10,-1894986606),i=w(i,o,n,r,e[s+10],15,-1051523),r=w(r,i,o,n,e[s+1],21,-2054922799),n=w(n,r,i,o,e[s+8],6,1873313359),o=w(o,n,r,i,e[s+15],10,-30611744),i=w(i,o,n,r,e[s+6],15,-1560198380),r=w(r,i,o,n,e[s+13],21,1309151649),n=w(n,r,i,o,e[s+4],6,-145523070),o=w(o,n,r,i,e[s+11],10,-1120210379),i=w(i,o,n,r,e[s+2],15,718787259),r=w(r,i,o,n,e[s+9],21,-343485551),n=m(n,a),r=m(r,u),i=m(i,f),o=m(o,l)}return Array(n,r,i,o)}function c(e,t,n,r,i,o){return m(y(m(m(t,e),m(r,o)),i),n)}function h(e,t,n,r,i,o,s){return c(t&n|~t&r,e,t,i,o,s)}function p(e,t,n,r,i,o,s){return c(t&r|n&~r,e,t,i,o,s)}function g(e,t,n,r,i,o,s){return c(t^n^r,e,t,i,o,s)}function w(e,t,n,r,i,o,s){return c(n^(t|~r),e,t,i,o,s)}function m(e,t){var n=(65535&e)+(65535&t),r=(e>>16)+(t>>16)+(n>>16);return r<<16|65535&n}function y(e,t){return e<<t|e>>>32-t}var b=e("./helpers");t.exports=function(e){return b.hash(e,d,16)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(e,t,n){(function(e,n,r,i,o,s,a,u,f){!function(){var e,n,r=this;e=function(e){for(var t,t,n=new Array(e),r=0;e>r;r++)0==(3&r)&&(t=4294967296*Math.random()),n[r]=t>>>((3&r)<<3)&255;return n},r.crypto&&crypto.getRandomValues&&(n=function(e){var t=new Uint8Array(e);return crypto.getRandomValues(t),t}),t.exports=n||e}()}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){function d(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var n=Array(80),r=1732584193,i=-271733879,o=-1732584194,s=271733878,a=-1009589776,u=0;u<e.length;u+=16){for(var f=r,l=i,d=o,w=s,m=a,y=0;80>y;y++){16>y?n[y]=e[u+y]:n[y]=g(n[y-3]^n[y-8]^n[y-14]^n[y-16],1);var b=p(p(g(r,5),c(y,i,o,s)),p(p(a,n[y]),h(y)));a=s,s=o,o=g(i,30),i=r,r=b}r=p(r,f),i=p(i,l),o=p(o,d),s=p(s,w),a=p(a,m)}return Array(r,i,o,s,a)}function c(e,t,n,r){return 20>e?t&n|~t&r:40>e?t^n^r:60>e?t&n|t&r|n&r:t^n^r}function h(e){return 20>e?1518500249:40>e?1859775393:60>e?-1894007588:-899497514}function p(e,t){var n=(65535&e)+(65535&t),r=(e>>16)+(t>>16)+(n>>16);return r<<16|65535&n}function g(e,t){return e<<t|e>>>32-t}var w=e("./helpers");t.exports=function(e){return w.hash(e,d,20,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){var d=e("./helpers"),c=function(e,t){var n=(65535&e)+(65535&t),r=(e>>16)+(t>>16)+(n>>16);return r<<16|65535&n},h=function(e,t){return e>>>t|e<<32-t},p=function(e,t){return e>>>t},g=function(e,t,n){return e&t^~e&n},w=function(e,t,n){return e&t^e&n^t&n},m=function(e){return h(e,2)^h(e,13)^h(e,22)},y=function(e){return h(e,6)^h(e,11)^h(e,25)},b=function(e){return h(e,7)^h(e,18)^p(e,3)},v=function(e){return h(e,17)^h(e,19)^p(e,10);
},_=function(e,t){var n,r,i,o,s,a,u,f,l,d,h,p,_=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),E=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),I=new Array(64);e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var l=0;l<e.length;l+=16){n=E[0],r=E[1],i=E[2],o=E[3],s=E[4],a=E[5],u=E[6],f=E[7];for(var d=0;64>d;d++)16>d?I[d]=e[d+l]:I[d]=c(c(c(v(I[d-2]),I[d-7]),b(I[d-15])),I[d-16]),h=c(c(c(c(f,y(s)),g(s,a,u)),_[d]),I[d]),p=c(m(n),w(n,r,i)),f=u,u=a,a=s,s=c(o,h),o=i,i=r,r=n,n=c(h,p);E[0]=c(n,E[0]),E[1]=c(r,E[1]),E[2]=c(i,E[2]),E[3]=c(o,E[3]),E[4]=c(s,E[4]),E[5]=c(a,E[5]),E[6]=c(u,E[6]),E[7]=c(f,E[7])}return E};t.exports=function(e){return d.hash(e,_,32,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(e,t,n){(function(e,n,r,i,o,s,a,u,f){function l(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function d(e){return"function"==typeof e}function c(e){return"number"==typeof e}function h(e){return"object"==typeof e&&null!==e}function p(e){return void 0===e}t.exports=l,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._maxListeners=void 0,l.defaultMaxListeners=10,l.prototype.setMaxListeners=function(e){if(!c(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},l.prototype.emit=function(e){var t,n,r,i,o,s;if(this._events||(this._events={}),"error"===e&&(!this._events.error||h(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],p(n))return!1;if(d(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;r>o;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(h(n)){for(r=arguments.length,i=new Array(r-1),o=1;r>o;o++)i[o-1]=arguments[o];for(s=n.slice(),r=s.length,o=0;r>o;o++)s[o].apply(this,i)}return!0},l.prototype.addListener=function(e,t){var n;if(!d(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,d(t.listener)?t.listener:t),this._events[e]?h(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,h(this._events[e])&&!this._events[e].warned){var n;n=p(this._maxListeners)?l.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},l.prototype.on=l.prototype.addListener,l.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!d(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},l.prototype.removeListener=function(e,t){var n,r,i,o;if(!d(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],i=n.length,r=-1,n===t||d(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(h(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(0>r)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},l.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],d(n))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},l.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?d(this._events[e])?[this._events[e]]:this._events[e].slice():[]},l.listenerCount=function(e,t){var n;return n=e._events&&e._events[t]?d(e._events[t])?1:e._events[t].length:0}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/events/events.js","/node_modules/gulp-browserify/node_modules/events")},{buffer:3,lYpoI2:11}],11:[function(e,t,n){(function(e,n,r,i,o,s,a,u,f){function l(){}var e=t.exports={};e.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var n=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(e){n.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.on=l,e.addListener=l,e.once=l,e.off=l,e.removeListener=l,e.removeAllListeners=l,e.emit=l,e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:11}],12:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){function d(e){return this instanceof d?(g.call(this,e),w.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",c)):new d(e)}function c(){if(!this.allowHalfOpen&&!this._writableState.ended){var e=this;p(function(){e.end()})}}t.exports=d;var h=e("inherits"),p=e("process/browser.js").nextTick,g=e("./readable.js"),w=e("./writable.js");h(d,g),d.prototype.write=w.prototype.write,d.prototype.end=w.prototype.end,d.prototype._write=w.prototype._write}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/stream-browserify/duplex.js","/node_modules/gulp-browserify/node_modules/stream-browserify")},{"./readable.js":16,"./writable.js":18,buffer:3,inherits:21,lYpoI2:11,"process/browser.js":14}],13:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){function d(){c.call(this)}t.exports=d;var c=e("events").EventEmitter,h=e("inherits");h(d,c),d.Readable=e("./readable.js"),d.Writable=e("./writable.js"),d.Duplex=e("./duplex.js"),d.Transform=e("./transform.js"),d.PassThrough=e("./passthrough.js"),d.Stream=d,d.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&u.pause&&u.pause()}function r(){u.readable&&u.resume&&u.resume()}function i(){f||(f=!0,e.end())}function o(){f||(f=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(a(),0===c.listenerCount(this,"error"))throw e}function a(){u.removeListener("data",n),e.removeListener("drain",r),u.removeListener("end",i),u.removeListener("close",o),u.removeListener("error",s),e.removeListener("error",s),u.removeListener("end",a),u.removeListener("close",a),e.removeListener("close",a)}var u=this;u.on("data",n),e.on("drain",r),e._isStdio||t&&t.end===!1||(u.on("end",i),u.on("close",o));var f=!1;return u.on("error",s),e.on("error",s),u.on("end",a),u.on("close",a),e.on("close",a),e.emit("pipe",u),e}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/stream-browserify/index.js","/node_modules/gulp-browserify/node_modules/stream-browserify")},{"./duplex.js":12,"./passthrough.js":15,"./readable.js":16,"./transform.js":17,"./writable.js":18,buffer:3,events:10,inherits:21,lYpoI2:11}],14:[function(e,t,n){(function(e,n,r,i,o,s,a,u,f){var e=t.exports={};e.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var n=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(e){n.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/stream-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/stream-browserify/node_modules/process")},{buffer:3,lYpoI2:11}],15:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){function d(e){return this instanceof d?void c.call(this,e):new d(e)}t.exports=d;var c=e("./transform.js"),h=e("inherits");h(d,c),d.prototype._transform=function(e,t,n){n(null,e)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/stream-browserify/passthrough.js","/node_modules/gulp-browserify/node_modules/stream-browserify")},{"./transform.js":17,buffer:3,inherits:21,lYpoI2:11}],16:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){function d(t,n){t=t||{};var r=t.highWaterMark;this.highWaterMark=r||0===r?r:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(M||(M=e("string_decoder").StringDecoder),this.decoder=new M(t.encoding),this.encoding=t.encoding)}function c(e){return this instanceof c?(this._readableState=new d(e,this),this.readable=!0,void U.call(this)):new c(e)}function h(e,t,n,r,i){var o=m(t,n);if(o)e.emit("error",o);else if(null===n||void 0===n)t.reading=!1,t.ended||y(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||i||r||(n=t.decoder.write(n)),t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):(t.reading=!1,t.buffer.push(n)),t.needReadable&&b(e),_(e,t);else i||(t.reading=!1);return p(t)}function p(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function g(e){if(e>=Y)e=Y;else{e--;for(var t=1;32>t;t<<=1)e|=e>>t;e++}return e}function w(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||null===e?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:0>=e?0:(e>t.highWaterMark&&(t.highWaterMark=g(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function m(e,t){var n=null;return i.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||n||(n=new TypeError("Invalid non-string/buffer chunk")),n}function y(e,t){if(t.decoder&&!t.ended){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.length>0?b(e):j(e)}function b(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,t.sync?T(function(){v(e)}):v(e))}function v(e){e.emit("readable")}function _(e,t){t.readingMore||(t.readingMore=!0,T(function(){E(e,t)}))}function E(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function I(e){return function(){var t=e._readableState;t.awaitDrain--,0===t.awaitDrain&&L(e)}}function L(e){function t(e,t,i){var o=e.write(n);!1===o&&r.awaitDrain++}var n,r=e._readableState;for(r.awaitDrain=0;r.pipesCount&&null!==(n=e.read());)if(1===r.pipesCount?t(r.pipes,0,null):k(r.pipes,t),e.emit("data",n),r.awaitDrain>0)return;return 0===r.pipesCount?(r.flowing=!1,void(C.listenerCount(e,"data")>0&&S(e))):void(r.ranOut=!0)}function B(){this._readableState.ranOut&&(this._readableState.ranOut=!1,L(this))}function S(e,t){var n=e._readableState;if(n.flowing)throw new Error("Cannot switch to old mode now.");var r=t||!1,i=!1;e.readable=!0,e.pipe=U.prototype.pipe,e.on=e.addListener=U.prototype.on,e.on("readable",function(){i=!0;for(var t;!r&&null!==(t=e.read());)e.emit("data",t);null===t&&(i=!1,e._readableState.needReadable=!0)}),e.pause=function(){r=!0,this.emit("pause")},e.resume=function(){r=!1,i?T(function(){e.emit("readable")}):this.read(0),this.emit("resume")},e.emit("readable")}function A(e,t){var n,r=t.buffer,o=t.length,s=!!t.decoder,a=!!t.objectMode;if(0===r.length)return null;if(0===o)n=null;else if(a)n=r.shift();else if(!e||e>=o)n=s?r.join(""):i.concat(r,o),r.length=0;else if(e<r[0].length){var u=r[0];n=u.slice(0,e),r[0]=u.slice(e)}else if(e===r[0].length)n=r.shift();else{n=s?"":new i(e);for(var f=0,l=0,d=r.length;d>l&&e>f;l++){var u=r[0],c=Math.min(e-f,u.length);s?n+=u.slice(0,c):u.copy(n,f,0,c),c<u.length?r[0]=u.slice(c):r.shift(),f+=c}}return n}function j(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");!t.endEmitted&&t.calledRead&&(t.ended=!0,T(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function k(e,t){for(var n=0,r=e.length;r>n;n++)t(e[n],n)}function x(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}t.exports=c,c.ReadableState=d;var M,C=e("events").EventEmitter,U=e("./index.js"),i=e("buffer").Buffer,T=e("process/browser.js").nextTick,R=e("inherits");R(c,U),c.prototype.push=function(e,t){var n=this._readableState;return"string"!=typeof e||n.objectMode||(t=t||n.defaultEncoding,t!==n.encoding&&(e=new i(e,t),t="")),h(this,n,e,t,!1)},c.prototype.unshift=function(e){var t=this._readableState;return h(this,t,e,"",!0)},c.prototype.setEncoding=function(t){M||(M=e("string_decoder").StringDecoder),this._readableState.decoder=new M(t),this._readableState.encoding=t};var Y=8388608;c.prototype.read=function(e){var t=this._readableState;t.calledRead=!0;var n=e;if(("number"!=typeof e||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return b(this),null;if(e=w(e,t),0===e&&t.ended)return 0===t.length&&j(this),null;var r=t.needReadable;t.length-e<=t.highWaterMark&&(r=!0),(t.ended||t.reading)&&(r=!1),r&&(t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),r&&!t.reading&&(e=w(n,t));var i;return i=e>0?A(e,t):null,null===i&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),t.ended&&!t.endEmitted&&0===t.length&&j(this),i},c.prototype._read=function(e){this.emit("error",new Error("not implemented"))},c.prototype.pipe=function(e,t){function r(e){e===l&&o()}function i(){e.end()}function o(){e.removeListener("close",a),e.removeListener("finish",u),e.removeListener("drain",p),e.removeListener("error",s),e.removeListener("unpipe",r),l.removeListener("end",i),l.removeListener("end",o),(!e._writableState||e._writableState.needDrain)&&p()}function s(t){f(),0===g&&0===C.listenerCount(e,"error")&&e.emit("error",t)}function a(){e.removeListener("finish",u),f()}function u(){e.removeListener("close",a),f()}function f(){l.unpipe(e)}var l=this,d=this._readableState;switch(d.pipesCount){case 0:d.pipes=e;break;case 1:d.pipes=[d.pipes,e];break;default:d.pipes.push(e)}d.pipesCount+=1;var c=(!t||t.end!==!1)&&e!==n.stdout&&e!==n.stderr,h=c?i:o;d.endEmitted?T(h):l.once("end",h),e.on("unpipe",r);var p=I(l);e.on("drain",p);var g=C.listenerCount(e,"error");return e.once("error",s),e.once("close",a),e.once("finish",u),e.emit("pipe",l),d.flowing||(this.on("readable",B),d.flowing=!0,T(function(){L(l)})),e},c.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,this.removeListener("readable",B),t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,this.removeListener("readable",B),t.flowing=!1;for(var i=0;r>i;i++)n[i].emit("unpipe",this);return this}var i=x(t.pipes,e);return-1===i?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},c.prototype.on=function(e,t){var n=U.prototype.on.call(this,e,t);if("data"!==e||this._readableState.flowing||S(this),"readable"===e&&this.readable){var r=this._readableState;r.readableListening||(r.readableListening=!0,r.emittedReadable=!1,r.needReadable=!0,r.reading?r.length&&b(this,r):this.read(0))}return n},c.prototype.addListener=c.prototype.on,c.prototype.resume=function(){S(this),this.read(0),this.emit("resume")},c.prototype.pause=function(){S(this,!0),this.emit("pause")},c.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(i){if(t.decoder&&(i=t.decoder.write(i)),i&&(t.objectMode||i.length)){var o=r.push(i);o||(n=!0,e.pause())}});for(var i in e)"function"==typeof e[i]&&"undefined"==typeof this[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return k(o,function(t){e.on(t,function(e){return r.emit.apply(r,t,e)})}),r._read=function(t){n&&(n=!1,e.resume())},r},c._fromList=A}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/stream-browserify/readable.js","/node_modules/gulp-browserify/node_modules/stream-browserify")},{"./index.js":13,buffer:3,events:10,inherits:21,lYpoI2:11,"process/browser.js":14,string_decoder:19}],17:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){function d(e,t){this.afterTransform=function(e,n){return c(t,e,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function c(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&e.push(n),i&&i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}function h(e){if(!(this instanceof h))return new h(e);g.call(this,e);var t=(this._transformState=new d(e,this),this);this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("finish",function(){"function"==typeof this._flush?this._flush(function(e){p(t,e)}):p(t)})}function p(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=(e._readableState,e._transformState);if(n.length)throw new Error("calling transform done when ws.length != 0");if(r.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}t.exports=h;var g=e("./duplex.js"),w=e("inherits");w(h,g),h.prototype.push=function(e,t){return this._transformState.needTransform=!1,g.prototype.push.call(this,e,t)},h.prototype._transform=function(e,t,n){throw new Error("not implemented")},h.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},h.prototype._read=function(e){var t=this._transformState;t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/stream-browserify/transform.js","/node_modules/gulp-browserify/node_modules/stream-browserify")},{"./duplex.js":12,buffer:3,inherits:21,lYpoI2:11}],18:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){function d(e,t,n){this.chunk=e,this.encoding=t,this.callback=n}function c(e,t){e=e||{};var n=e.highWaterMark;this.highWaterMark=n||0===n?n:16384,this.objectMode=!!e.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var r=e.decodeStrings===!1;this.decodeStrings=!r,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){_(t,e)},this.writecb=null,this.writelen=0,this.buffer=[]}function h(e){return this instanceof h||this instanceof M.Duplex?(this._writableState=new c(e,this),this.writable=!0,void M.call(this)):new h(e)}function p(e,t,n){var r=new Error("write after end");e.emit("error",r),C(function(){n(r)})}function g(e,t,n,r){var o=!0;if(!i.isBuffer(n)&&"string"!=typeof n&&null!==n&&void 0!==n&&!t.objectMode){var s=new TypeError("Invalid non-string/buffer chunk");e.emit("error",s),C(function(){r(s)}),o=!1}return o}function w(e,t,n){return e.objectMode||e.decodeStrings===!1||"string"!=typeof t||(t=new i(t,n)),t}function m(e,t,n,r,i){n=w(t,n,r);var o=t.objectMode?1:n.length;t.length+=o;var s=t.length<t.highWaterMark;return t.needDrain=!s,t.writing?t.buffer.push(new d(n,r,i)):y(e,t,o,n,r,i),s}function y(e,t,n,r,i,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,e._write(r,i,t.onwrite),t.sync=!1}function b(e,t,n,r,i){n?C(function(){i(r)}):i(r),e.emit("error",r)}function v(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function _(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(v(n),t)b(e,n,r,t,i);else{var o=B(e,n);o||n.bufferProcessing||!n.buffer.length||L(e,n),r?C(function(){E(e,n,o,i)}):E(e,n,o,i)}}function E(e,t,n,r){n||I(e,t),r(),n&&S(e,t)}function I(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function L(e,t){t.bufferProcessing=!0;for(var n=0;n<t.buffer.length;n++){var r=t.buffer[n],i=r.chunk,o=r.encoding,s=r.callback,a=t.objectMode?1:i.length;if(y(e,t,a,i,o,s),t.writing){n++;break}}t.bufferProcessing=!1,n<t.buffer.length?t.buffer=t.buffer.slice(n):t.buffer.length=0}function B(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function S(e,t){var n=B(e,t);return n&&(t.finished=!0,e.emit("finish")),n}function A(e,t,n){t.ending=!0,S(e,t),n&&(t.finished?C(n):e.once("finish",n)),t.ended=!0}t.exports=h,h.WritableState=c;var j="undefined"!=typeof Uint8Array?function(e){return e instanceof Uint8Array}:function(e){return e&&e.constructor&&"Uint8Array"===e.constructor.name},k="undefined"!=typeof ArrayBuffer?function(e){return e instanceof ArrayBuffer}:function(e){return e&&e.constructor&&"ArrayBuffer"===e.constructor.name},x=e("inherits"),M=e("./index.js"),C=e("process/browser.js").nextTick,i=e("buffer").Buffer;x(h,M),h.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},h.prototype.write=function(e,t,n){var r=this._writableState,o=!1;return"function"==typeof t&&(n=t,t=null),!i.isBuffer(e)&&j(e)&&(e=new i(e)),k(e)&&"undefined"!=typeof Uint8Array&&(e=new i(new Uint8Array(e))),i.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=function(){}),r.ended?p(this,r,n):g(this,r,e,n)&&(o=m(this,r,e,t,n)),o},h.prototype._write=function(e,t,n){n(new Error("not implemented"))},h.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),"undefined"!=typeof e&&null!==e&&this.write(e,t),r.ending||r.finished||A(this,r,n)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/stream-browserify/writable.js","/node_modules/gulp-browserify/node_modules/stream-browserify")},{"./index.js":13,buffer:3,inherits:21,lYpoI2:11,"process/browser.js":14}],19:[function(e,t,n){(function(t,r,i,o,s,a,u,f,l){function d(e){if(e&&!i.isEncoding(e))throw new Error("Unknown encoding: "+e)}function c(e){return e.toString(this.encoding)}function h(e){var t=this.charReceived=e.length%2;return this.charLength=t?2:0,t}function p(e){var t=this.charReceived=e.length%3;return this.charLength=t?3:0,t}var i=e("buffer").Buffer,g=n.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),d(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=h;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=p;break;default:return void(this.write=c)}this.charBuffer=new i(6),this.charReceived=0,this.charLength=0};g.prototype.write=function(e){for(var t="",n=0;this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,n,r),this.charReceived+=r-n,n=r,this.charReceived<this.charLength)return"";t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var i=t.charCodeAt(t.length-1);if(!(i>=55296&&56319>=i)){if(this.charReceived=this.charLength=0,r==e.length)return t;e=e.slice(r,e.length);break}this.charLength+=this.surrogateSize,t=""}var o=this.detectIncompleteChar(e),s=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-o,s),this.charReceived=o,s-=o),t+=e.toString(this.encoding,0,s);var s=t.length-1,i=t.charCodeAt(s);if(i>=55296&&56319>=i){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),this.charBuffer.write(t.charAt(t.length-1),this.encoding),t.substring(0,s)}return t},g.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(2>=t&&n>>4==14){this.charLength=3;break}if(3>=t&&n>>3==30){this.charLength=4;break}}return t},g.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/string_decoder/index.js","/node_modules/gulp-browserify/node_modules/string_decoder")},{buffer:3,lYpoI2:11}],20:[function(e,t,n){(function(e,t,r,i,o,s,a,u,f){n.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,f=u>>1,l=-7,d=n?i-1:0,c=n?-1:1,h=e[t+d];for(d+=c,o=h&(1<<-l)-1,h>>=-l,l+=a;l>0;o=256*o+e[t+d],d+=c,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+e[t+d],d+=c,l-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:(h?-1:1)*(1/0);s+=Math.pow(2,r),o-=f}return(h?-1:1)*s*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var s,a,u,f=8*o-i-1,l=(1<<f)-1,d=l>>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),t+=s+d>=1?c/u:c*Math.pow(2,1-d),t*u>=2&&(s++,u/=2),s+d>=l?(a=0,s=l):s+d>=1?(a=(t*u-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[n+h]=255&a,h+=p,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;e[n+h]=255&s,h+=p,s/=256,f-=8);e[n+h-p]|=128*g}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/ieee754/index.js","/node_modules/ieee754")},{buffer:3,lYpoI2:11}],21:[function(e,t,n){(function(e,n,r,i,o,s,a,u,f){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/inherits/inherits_browser.js","/node_modules/inherits")},{buffer:3,lYpoI2:11}]},{},[1])(1)});
'use strict';
var crypto = require('crypto');
var stream = require('stream');

@@ -13,2 +14,4 @@ /**

* - `encoding` hash encoding, supports 'buffer', '*hex', 'binary', 'base64'
* - `ignoreUnknown` {true|*false} ignore unknown object types
* - `replacer` optional function that replaces values before hashing
* - `respectFunctionProperties` {*true|false} consider function properties when hashing

@@ -18,8 +21,8 @@ * - `respectType` {*true|false} Respect special properties (prototype, constructor)

* - `unorderedArrays` {true|*false} Sort all arrays before hashing
* - `unorderedSets` {true|*false} Sort `Set` and `Map` instances before hashing
* - `unorderedSets` {*true|false} Sort `Set` and `Map` instances before hashing
* * = default
*
* @param {object} value to hash
* @param {options} hashing options
* @return {hash value}
* @param {object} object value to hash
* @param {object} options hashing options
* @return {string} hash value
* @api public

@@ -30,15 +33,4 @@ */

function objectHash(object, options){
options = options || {};
options.algorithm = options.algorithm || 'sha1';
options.encoding = options.encoding || 'hex';
options.excludeValues = options.excludeValues ? true : false;
options.algorithm = options.algorithm.toLowerCase();
options.encoding = options.encoding.toLowerCase();
options.respectType = options.respectType === false ? false : true; // default to true
options.respectFunctionProperties = options.respectFunctionProperties === false ? false : true;
options.unorderedArrays = options.unorderedArrays !== true ? false : true; // default to false
options.unorderedSets = options.unorderedSets !== true ? false : true; // default to false
options = applyDefaults(object, options);
validate(object, options);
return hash(object, options);

@@ -50,4 +42,4 @@ }

*
* @param {object} value to hash
* @return {hash value}
* @param {object} object value to hash
* @return {string} hash value
* @api public

@@ -68,13 +60,19 @@ */

/**
* Expose HashTable constructor
*
*/
exports.HashTable = require('./lib/hashTable');
// Internals
function validate(object, options){
function applyDefaults(object, options){
var hashes = crypto.getHashes ? crypto.getHashes() : ['sha1', 'md5'];
var encodings = ['buffer', 'hex', 'binary', 'base64'];
options = options || {};
options.algorithm = options.algorithm || 'sha1';
options.encoding = options.encoding || 'hex';
options.excludeValues = options.excludeValues ? true : false;
options.algorithm = options.algorithm.toLowerCase();
options.encoding = options.encoding.toLowerCase();
options.ignoreUnknown = options.ignoreUnknown !== true ? false : true; // default to false
options.respectType = options.respectType === false ? false : true; // default to true
options.respectFunctionProperties = options.respectFunctionProperties === false ? false : true;
options.unorderedArrays = options.unorderedArrays !== true ? false : true; // default to false
options.unorderedSets = options.unorderedSets === false ? false : true; // default to false
options.replacer = options.replacer || undefined;

@@ -85,2 +83,3 @@ if(typeof object === 'undefined') {

hashes.push('passthrough');
// if there is a case-insensitive match in the hashes list, accept it

@@ -99,19 +98,11 @@ // (i.e. SHA256 for sha256)

if(encodings.indexOf(options.encoding) === -1){
if(encodings.indexOf(options.encoding) === -1 &&
options.algorithm !== 'passthrough'){
throw new Error('Encoding "' + options.encoding + '" not supported. ' +
'supported values: ' + encodings.join(', '));
}
return options;
}
function hash(object, options){
var hashFn = crypto.createHash(options.algorithm);
var context = [];
typeHasher(hashFn, options, context).dispatch(object);
return (options.encoding === 'buffer') ? hashFn.digest() :
hashFn.digest(options.encoding);
}
/** Check if the given function is a native function */

@@ -126,7 +117,67 @@ function isNativeFunction(f) {

function typeHasher(hashFn, options, context){
function hash(object, options) {
var hashingStream;
if (options.algorithm !== 'passthrough') {
hashingStream = crypto.createHash(options.algorithm);
} else {
hashingStream = new stream.PassThrough();
}
if (typeof hashingStream.write === 'undefined') {
hashingStream.write = hashingStream.update;
hashingStream.end = hashingStream.update;
}
var hasher = typeHasher(options, hashingStream);
hasher.dispatch(object);
hashingStream.end(''); // write empty string since .update() requires a string arg
if (typeof hashingStream.read === 'undefined' &&
typeof hashingStream.digest === 'function') {
return hashingStream.digest(options.encoding === 'buffer' ? undefined : options.encoding);
}
var buf = hashingStream.read();
if (options.encoding === 'buffer') {
return buf;
}
return buf.toString(options.encoding);
}
/**
* Expose streaming API
*
* @param {object} object Value to serialize
* @param {object} options Options, as for hash()
* @param {object} stream A stream to write the serializiation to
* @api public
*/
exports.writeToStream = function(object, options, stream) {
if (typeof stream === 'undefined') {
stream = options;
options = {};
}
options = applyDefaults(object, options);
return typeHasher(options, stream).dispatch(object);
};
function typeHasher(options, writeTo, context){
context = context || [];
return {
dispatch: function(value){
if (options.replacer) {
value = options.replacer(value);
}
var type = typeof value;
return (value === null) ? this._null() : this['_' + type](value);
if (value === null) {
type = 'null';
}
return this['_' + type](value);
},

@@ -136,9 +187,15 @@ _object: function(object) {

var objString = Object.prototype.toString.call(object);
var objType = pattern.exec(objString)[1] || 'null';
var objType = pattern.exec(objString);
if (!objType) { // object type did not match [object ...]
objType = 'unknown:[' + objString + ']';
} else {
objType = objType[1]; // take only the class name
}
objType = objType.toLowerCase();
var objectNumber = null;
objType = objType.toLowerCase();
if ((objectNumber = context.indexOf(object)) >= 0) {
typeHasher(hashFn, options, context).dispatch("[CIRCULAR]: " + objectNumber);
return;
return this.dispatch('[CIRCULAR:' + objectNumber + ']');
} else {

@@ -149,14 +206,15 @@ context.push(object);

if (typeof Buffer !== 'undefined' && Buffer.isBuffer && Buffer.isBuffer(object)) {
hashFn.update('buffer:');
return hashFn.update(object);
writeTo.write('buffer:');
return writeTo.write(object);
}
if(objType !== 'object' && objType !== 'function') {
if(typeHasher(hashFn, options, context)['_' + objType]) {
typeHasher(hashFn, options, context)['_' + objType](object);
}else{
if(this['_' + objType]) {
this['_' + objType](object);
} else if (options.ignoreUnknown) {
return writeTo.write('[' + objType + ']');
} else {
throw new Error('Unknown object type "' + objType + '"');
}
}else{
hashFn.update('object:');
var keys = Object.keys(object).sort();

@@ -173,135 +231,175 @@ // Make sure to incorporate special properties, so

}
writeTo.write('object:' + keys.length + ':');
var self = this;
return keys.forEach(function(key){
hashFn.update(key, 'utf8');
self.dispatch(key);
writeTo.write(':');
if(!options.excludeValues) {
typeHasher(hashFn, options, context).dispatch(object[key]);
self.dispatch(object[key]);
}
writeTo.write(',');
});
}
},
_array: function(arr){
hashFn.update('array:' + arr.length + ':');
if (options.unorderedArrays !== false) {
arr = arr.sort();
_array: function(arr, unordered){
unordered = typeof unordered !== 'undefined' ? unordered :
options.unorderedArrays !== false; // default to options.unorderedArrays
var self = this;
writeTo.write('array:' + arr.length + ':');
if (!unordered) {
return arr.forEach(function(entry) {
return self.dispatch(entry);
});
}
return arr.forEach(function(el){
typeHasher(hashFn, options, context).dispatch(el);
// the unordered case is a little more complicated:
// since there is no canonical ordering on objects,
// i.e. {a:1} < {a:2} and {a:1} > {a:2} are both false,
// we first serialize each entry using a PassThrough stream
// before sorting.
// also: we can’t use the same context array for all entries
// since the order of hashing should *not* matter. instead,
// we keep track of the additions to a copy of the context array
// and add all of them to the global context array when we’re done
var contextAdditions = [];
var entries = arr.map(function(entry) {
var strm = new stream.PassThrough();
var localContext = context.slice(); // make copy
var hasher = typeHasher(options, strm, localContext);
hasher.dispatch(entry);
// take only what was added to localContext and append it to contextAdditions
contextAdditions = contextAdditions.concat(localContext.slice(context.length));
return strm.read().toString();
});
context = context.concat(contextAdditions);
entries.sort();
return this._array(entries, false);
},
_date: function(date){
return hashFn.update('date:' + date.toJSON());
return writeTo.write('date:' + date.toJSON());
},
_symbol: function(sym){
return hashFn.update('symbol:' + sym.toString(), 'utf8');
return writeTo.write('symbol:' + sym.toString(), 'utf8');
},
_error: function(err){
return hashFn.update('error:' + err.toString(), 'utf8');
return writeTo.write('error:' + err.toString(), 'utf8');
},
_boolean: function(bool){
return hashFn.update('bool:' + bool.toString());
return writeTo.write('bool:' + bool.toString());
},
_string: function(string){
return hashFn.update('string:' + string, 'utf8');
writeTo.write('string:' + string.length + ':');
writeTo.write(string, 'utf8');
},
_function: function(fn){
hashFn.update('fn:' + fn.toString(), 'utf8');
writeTo.write('fn:');
if (isNativeFunction(fn)) {
this.dispatch('[native]');
} else {
this.dispatch(fn.toString());
}
if (options.respectFunctionProperties) {
this._object(fn);
}
return hashFn;
},
_number: function(number){
return hashFn.update('number:' + number.toString());
return writeTo.write('number:' + number.toString());
},
_xml: function(xml){
return hashFn.update('xml:' + xml.toString(), 'utf8');
return writeTo.write('xml:' + xml.toString(), 'utf8');
},
_null: function() {
return hashFn.update('Null');
return writeTo.write('Null');
},
_undefined: function() {
return hashFn.update('Undefined');
return writeTo.write('Undefined');
},
_regexp: function(regex){
return hashFn.update('regex:' + regex.toString(), 'utf8');
return writeTo.write('regex:' + regex.toString(), 'utf8');
},
_uint8array: function(arr){
hashFn.update('uint8array:');
return typeHasher(hashFn, options, context).dispatch(Array.prototype.slice.call(arr));
writeTo.write('uint8array:');
return this.dispatch(Array.prototype.slice.call(arr));
},
_uint8clampedarray: function(arr){
hashFn.update('uint8clampedarray:');
return typeHasher(hashFn, options, context).dispatch(Array.prototype.slice.call(arr));
writeTo.write('uint8clampedarray:');
return this.dispatch(Array.prototype.slice.call(arr));
},
_int8array: function(arr){
hashFn.update('uint8array:');
return typeHasher(hashFn, options, context).dispatch(Array.prototype.slice.call(arr));
writeTo.write('uint8array:');
return this.dispatch(Array.prototype.slice.call(arr));
},
_uint16array: function(arr){
hashFn.update('uint16array:');
return typeHasher(hashFn, options, context).dispatch(Array.prototype.slice.call(arr));
writeTo.write('uint16array:');
return this.dispatch(Array.prototype.slice.call(arr));
},
_int16array: function(arr){
hashFn.update('uint16array:');
return typeHasher(hashFn, options, context).dispatch(Array.prototype.slice.call(arr));
writeTo.write('uint16array:');
return this.dispatch(Array.prototype.slice.call(arr));
},
_uint32array: function(arr){
hashFn.update('uint32array:');
return typeHasher(hashFn, options, context).dispatch(Array.prototype.slice.call(arr));
writeTo.write('uint32array:');
return this.dispatch(Array.prototype.slice.call(arr));
},
_int32array: function(arr){
hashFn.update('uint32array:');
return typeHasher(hashFn, options, context).dispatch(Array.prototype.slice.call(arr));
writeTo.write('uint32array:');
return this.dispatch(Array.prototype.slice.call(arr));
},
_float32array: function(arr){
hashFn.update('float32array:');
return typeHasher(hashFn, options, context).dispatch(Array.prototype.slice.call(arr));
writeTo.write('float32array:');
return this.dispatch(Array.prototype.slice.call(arr));
},
_float64array: function(arr){
hashFn.update('float64array:');
return typeHasher(hashFn, options, context).dispatch(Array.prototype.slice.call(arr));
writeTo.write('float64array:');
return this.dispatch(Array.prototype.slice.call(arr));
},
_arraybuffer: function(arr){
hashFn.update('arraybuffer:');
return typeHasher(hashFn, options, context).dispatch(new Uint8Array(arr));
writeTo.write('arraybuffer:');
return this.dispatch(new Uint8Array(arr));
},
_url: function(url) {
return hashFn.update('url:' + url.toString(), 'utf8');
return writeTo.write('url:' + url.toString(), 'utf8');
},
_map: function(map) {
hashFn.update('map:');
writeTo.write('map:');
var arr = Array.from(map);
if (options.unorderedSets !== false && options.unorderedArrays === false) {
arr = arr.sort();
}
return typeHasher(hashFn, options, context).dispatch(arr);
return this._array(arr, options.unorderedSets !== false);
},
_set: function(set) {
hashFn.update('set:');
writeTo.write('set:');
var arr = Array.from(set);
if (options.unorderedSets !== false && options.unorderedArrays === false) {
arr = arr.sort();
return this._array(arr, options.unorderedSets !== false);
},
_blob: function() {
if (options.ignoreUnknown) {
return writeTo.write('[blob]');
}
return typeHasher(hashFn, options, context).dispatch(arr);
throw Error('Hashing Blob objects is currently not supported\n' +
'(see https://github.com/puleos/object-hash/issues/26)\n' +
'Use "options.replacer" or "options.ignoreUnknown"\n');
},
_domwindow: function() { return hashFn.update('domwindow'); },
_domwindow: function() { return writeTo.write('domwindow'); },
/* Node.js standard native objects */
_process: function() { return hashFn.update('process'); },
_timer: function() { return hashFn.update('timer'); },
_pipe: function() { return hashFn.update('pipe'); },
_tcp: function() { return hashFn.update('tcp'); },
_udp: function() { return hashFn.update('udp'); },
_tty: function() { return hashFn.update('tty'); },
_statwatcher: function() { return hashFn.update('statwatcher'); },
_securecontext: function() { return hashFn.update('securecontext'); },
_connection: function() { return hashFn.update('connection'); },
_zlib: function() { return hashFn.update('zlib'); },
_context: function() { return hashFn.update('context'); },
_nodescript: function() { return hashFn.update('nodescript'); },
_httpparser: function() { return hashFn.update('httpparser'); },
_dataview: function() { return hashFn.update('dataview'); },
_signal: function() { return hashFn.update('signal'); },
_fsevent: function() { return hashFn.update('fsevent'); },
_tlswrap: function() { return hashFn.update('tlswrap'); }
_process: function() { return writeTo.write('process'); },
_timer: function() { return writeTo.write('timer'); },
_pipe: function() { return writeTo.write('pipe'); },
_tcp: function() { return writeTo.write('tcp'); },
_udp: function() { return writeTo.write('udp'); },
_tty: function() { return writeTo.write('tty'); },
_statwatcher: function() { return writeTo.write('statwatcher'); },
_securecontext: function() { return writeTo.write('securecontext'); },
_connection: function() { return writeTo.write('connection'); },
_zlib: function() { return writeTo.write('zlib'); },
_context: function() { return writeTo.write('context'); },
_nodescript: function() { return writeTo.write('nodescript'); },
_httpparser: function() { return writeTo.write('httpparser'); },
_dataview: function() { return writeTo.write('dataview'); },
_signal: function() { return writeTo.write('signal'); },
_fsevent: function() { return writeTo.write('fsevent'); },
_tlswrap: function() { return writeTo.write('tlswrap'); }
};
}
{
"name": "object-hash",
"version": "0.9.5",
"version": "1.0.0",
"description": "Generate hashes from javascript objects in node and the browser.",

@@ -47,4 +47,4 @@ "homepage": "https://github.com/puleos/object-hash",

"engines": {
"node": ">= 0.8.0"
"node": ">= 0.10.0"
}
}

@@ -0,1 +1,3 @@

'use strict';
var assert = require('assert');

@@ -7,327 +9,263 @@ var crypto = require('crypto');

describe('hash', function() {
it('throws when nothing to hash', function () {
assert.throws(hash, 'no arguments');
assert.throws(function() {
hash(undefined, {algorithm: 'md5'});
}, 'undefined');
});
it('throws when nothing to hash', function () {
assert.throws(hash, 'no arguments');
assert.throws(function() {
hash(undefined, {algorithm: 'md5'});
}, 'undefined');
});
it('throws when passed an invalid options', function() {
assert.throws(function() {
hash({foo: 'bar'}, {algorithm: 'shalala'});
}, 'bad algorithm');
assert.throws(function() {
hash({foo: 'bar'}, {encoding: 'base16'});
}, 'bad encoding');
});
it('throws when passed an invalid options', function() {
assert.throws(function() {
hash({foo: 'bar'}, {algorithm: 'shalala'});
}, 'bad algorithm');
assert.throws(function() {
hash({foo: 'bar'}, {encoding: 'base16'});
}, 'bad encoding');
});
it('hashes non-object types', function() {
var func = function(a){ return a + 1; };
assert.ok(validSha1.test(hash('Shazbot!')), 'hash string');
assert.ok(validSha1.test(hash(42)), 'hash number');
assert.ok(validSha1.test(hash(true)), 'hash bool');
assert.ok(validSha1.test(hash(func)), 'hash function');
});
it('hashes a simple object', function() {
assert.ok(validSha1.test(hash({foo: 'bar', bar: 'baz'})), 'hash object');
});
it('hashes special object types', function() {
var dt = new Date();
dt.setDate(dt.getDate() + 1);
if (typeof Buffer !== 'undefined') {
it('can return buffers', function() {
assert.ok(Buffer.isBuffer(hash({foo: 'bar', bar: 'baz'}, {encoding: 'buffer'})), 'hash object');
});
}
assert.ok(validSha1.test(hash([1,2,3,4])), 'hash array');
assert.notEqual(hash([1,2,3,4]), hash([4,3,2,1]), 'different arrays not equal');
assert.ok(validSha1.test(hash(new Date())), 'hash date');
assert.notEqual(hash(new Date()), hash(dt), 'different dates not equal');
assert.ok(validSha1.test(hash(null)), 'hash Null');
assert.ok(validSha1.test(hash(Number.NaN)), 'hash NaN');
assert.ok(validSha1.test(hash({ foo: undefined })), 'hash Undefined value');
assert.ok(validSha1.test(hash(new RegExp())), 'hash regex');
assert.ok(validSha1.test(hash(new Error())), 'hash error');
});
it('hashes identical objects with different key ordering', function() {
var hash1 = hash({foo: 'bar', bar: 'baz'});
var hash2 = hash({bar: 'baz', foo: 'bar'});
var hash3 = hash({bar: 'foo', foo: 'baz'});
assert.equal(hash1, hash2, 'hashes are equal');
assert.notEqual(hash1, hash3, 'different objects not equal');
});
if (typeof Symbol !== 'undefined')
it('hashes Symbols', function() {
assert.ok(validSha1.test(hash(Symbol('Banana'))), 'hash error');
});
it('hashes only object keys when excludeValues option is set', function() {
var hash1 = hash({foo: false, bar: 'OK'}, { excludeValues: true });
var hash2 = hash({foo: true, bar: 'NO'}, { excludeValues: true });
var hash3 = hash({foo: true, bar: 'OK', baz: false}, { excludeValues: true });
assert.equal(hash1, hash2, 'values not in hash digest');
assert.notEqual(hash1, hash3, 'different keys not equal');
});
it('hashes a simple object', function() {
assert.ok(validSha1.test(hash({foo: 'bar', bar: 'baz'})), 'hash object');
});
it('array values are hashed', function() {
var hash1 = hash({foo: ['bar', 'baz'], bax: true });
var hash2 = hash({foo: ['baz', 'bar'], bax: true });
assert.notEqual(hash1, hash2, 'different array orders are unique');
});
it('hashes identical objects with different key ordering', function() {
var hash1 = hash({foo: 'bar', bar: 'baz'});
var hash2 = hash({bar: 'baz', foo: 'bar'});
var hash3 = hash({bar: 'foo', foo: 'baz'});
assert.equal(hash1, hash2, 'hashes are equal');
assert.notEqual(hash1, hash3, 'different objects not equal');
});
it('nested object values are hashed', function() {
var hash1 = hash({foo: {bar: true, bax: 1}});
var hash2 = hash({foo: {bar: true, bax: 1}});
var hash3 = hash({foo: {bar: false, bax: 1}});
assert.equal(hash1, hash2, 'hashes are equal');
assert.notEqual(hash1, hash3, 'different objects not equal');
});
it('hashes only object keys when excludeValues option is set', function() {
var hash1 = hash({foo: false, bar: 'OK'}, { excludeValues: true });
var hash2 = hash({foo: true, bar: 'NO'}, { excludeValues: true });
var hash3 = hash({foo: true, bar: 'OK', baz: false}, { excludeValues: true });
assert.equal(hash1, hash2, 'values not in hash digest');
assert.notEqual(hash1, hash3, 'different keys not equal');
});
it('sugar methods should be equivalent', function() {
var obj = {foo: 'bar', baz: true};
assert.equal(hash.keys(obj), hash(obj, {excludeValues: true}), 'keys');
assert.equal(hash.sha1(obj), hash(obj, {algorithm: 'sha1'}), 'sha1');
assert.equal(hash.MD5(obj), hash(obj, {algorithm: 'md5'}), 'md5');
assert.equal(hash.keysMD5(obj),
hash(obj, {algorithm: 'md5', excludeValues: true}), 'keys md5');
});
it('array values are hashed', function() {
var hash1 = hash({foo: ['bar', 'baz'], bax: true });
var hash2 = hash({foo: ['baz', 'bar'], bax: true });
assert.notEqual(hash1, hash2, 'different array orders are unique');
});
it('array of nested object values are hashed', function() {
var hash1 = hash({foo: [ {bar: true, bax: 1}, {bar: false, bax: 2} ] });
var hash2 = hash({foo: [ {bar: true, bax: 1}, {bar: false, bax: 2} ] });
var hash3 = hash({foo: [ {bar: false, bax: 2} ] });
assert.equal(hash1, hash2, 'hashes are equal');
assert.notEqual(hash1, hash3, 'different objects not equal');
});
it('nested object values are hashed', function() {
var hash1 = hash({foo: {bar: true, bax: 1}});
var hash2 = hash({foo: {bar: true, bax: 1}});
var hash3 = hash({foo: {bar: false, bax: 1}});
assert.equal(hash1, hash2, 'hashes are equal');
assert.notEqual(hash1, hash3, 'different objects not equal');
});
it("recursive objects don't blow up stack", function() {
var hash1 = {foo: 'bar'};
hash1.recursive = hash1;
assert.doesNotThrow(function() {hash(hash1);}, /Maximum call stack size exceeded/, 'Should not throw an stack size exceeded exception');
});
it('sugar methods should be equivalent', function() {
var obj = {foo: 'bar', baz: true};
assert.equal(hash.keys(obj), hash(obj, {excludeValues: true}), 'keys');
assert.equal(hash.MD5(obj), hash(obj, {algorithm: 'md5'}), 'md5');
assert.equal(hash.keysMD5(obj),
hash(obj, {algorithm: 'md5', excludeValues: true}), 'keys md5');
});
it("recursive arrays don't blow up stack", function() {
var hash1 = ['foo', 'bar'];
hash1.push(hash1);
assert.doesNotThrow(function() {hash(hash1);}, /Maximum call stack size exceeded/, 'Should not throw an stack size exceeded exception');
});
it("recursive arrays don't blow up stack with unorderedArrays", function() {
var hash1 = ['foo', 'bar'];
hash1.push(hash1);
assert.doesNotThrow(function() {hash(hash1, {unorderedArrays: true});}, /Maximum call stack size exceeded/, 'Should not throw an stack size exceeded exception');
});
it('array of nested object values are hashed', function() {
var hash1 = hash({foo: [ {bar: true, bax: 1}, {bar: false, bax: 2} ] });
var hash2 = hash({foo: [ {bar: true, bax: 1}, {bar: false, bax: 2} ] });
var hash3 = hash({foo: [ {bar: false, bax: 2} ] });
assert.equal(hash1, hash2, 'hashes are equal');
assert.notEqual(hash1, hash3, 'different objects not equal');
});
it("recursive handling tracks identity", function() {
var hash1 = {k1: {k: 'v'}, k2: {k: 'k2'}};
hash1.k1.r1 = hash1.k1;
hash1.k2.r2 = hash1.k2;
var hash2 = {k1: {k: 'v'}, k2: {k: 'k2'}};
hash2.k1.r1 = hash2.k2;
hash2.k2.r2 = hash2.k1;
assert.notEqual(hash(hash1), hash(hash2), "order of recursive objects should matter");
});
it("recursive objects don't blow up stack", function() {
var hash1 = {foo: 'bar'};
hash1.recursive = hash1;
assert.doesNotThrow(function() {hash(hash1);}, /Maximum call stack size exceeded/, 'Should not throw an stack size exceeded exception');
});
it("object types are hashed", function() {
var hash1 = hash({foo: 'bar'});
var hash2 = hash(['foo', 'bar']);
assert.notEqual(hash1, hash2, "arrays and objects should not produce identical hashes");
});
it("recursive arrays don't blow up stack", function() {
var hash1 = ['foo', 'bar'];
hash1.push(hash1);
assert.doesNotThrow(function() {hash(hash1);}, /Maximum call stack size exceeded/, 'Should not throw an stack size exceeded exception');
});
it("utf8 strings are hashed correctly", function() {
var hash1 = hash('\u03c3'); // cf 83 in utf8
var hash2 = hash('\u01c3'); // c7 83 in utf8
assert.notEqual(hash1, hash2, "different strings with similar utf8 encodings should produce different hashes");
});
it("recursive handling tracks identity", function() {
var hash1 = {k1: {k: 'v'}, k2: {k: 'k2'}};
hash1.k1.r1 = hash1.k1;
hash1.k2.r2 = hash1.k2;
var hash2 = {k1: {k: 'v'}, k2: {k: 'k2'}};
hash2.k1.r1 = hash2.k2;
hash2.k2.r2 = hash2.k1;
assert.notEqual(hash(hash1), hash(hash2), "order of recursive objects should matter");
});
it("various hashes in crypto.getHashes() should be supported", function() {
var hashes = ['sha1', 'md5'];
if (crypto.getHashes) {
// take all hashes from crypto.getHashes() starting with MD or SHA
hashes = crypto.getHashes().filter(RegExp.prototype.test.bind(/^(md|sha)/i));
}
var obj = {randomText: 'bananas'};
for (var i = 0; i < hashes.length; i++) {
assert.ok(hash(obj, {algorithm: hashes[i]}), 'Algorithm ' + hashes[i] + ' should be supported');
}
});
it("null and 'Null' string produce different hashes", function() {
var hash1 = hash({foo: null});
var hash2 = hash({foo: 'Null'});
assert.notEqual(hash1, hash2, "null and 'Null' should not produce identical hashes");
});
it("null and 'Null' string produce different hashes", function() {
var hash1 = hash({foo: null});
var hash2 = hash({foo: 'Null'});
assert.notEqual(hash1, hash2, "null and 'Null' should not produce identical hashes");
});
it("object types are hashed", function() {
var hash1 = hash({foo: 'bar'});
var hash2 = hash(['foo', 'bar']);
assert.notEqual(hash1, hash2, "arrays and objects should not produce identical hashes");
});
it('Distinguish functions based on their properties', function() {
it("utf8 strings are hashed correctly", function() {
var hash1 = hash('\u03c3'); // cf 83 in utf8
var hash2 = hash('\u01c3'); // c7 83 in utf8
assert.notEqual(hash1, hash2, "different strings with similar utf8 encodings should produce different hashes");
});
var a, b, c, d;
function Foo() {}
a = hash(Foo);
it("various hashes in crypto.getHashes() should be supported", function() {
var hashes = ['sha1', 'md5'];
if (crypto.getHashes) {
// take all hashes from crypto.getHashes() starting with MD or SHA
hashes = crypto.getHashes().filter(RegExp.prototype.test.bind(/^(md|sha)/i));
}
var obj = {randomText: 'bananas'};
for (var i = 0; i < hashes.length; i++) {
assert.ok(hash(obj, {algorithm: hashes[i]}), 'Algorithm ' + hashes[i] + ' should be supported');
}
});
Foo.foo = 22;
b = hash(Foo);
if (typeof Buffer !== 'undefined') {
it("Buffers can be hashed", function() {
assert.ok(validSha1.test(hash(new Buffer('Banana'))), 'hashes Buffers');
});
}
Foo.bar = "42";
c = hash(Foo);
if (typeof Uint8Array !== 'undefined') {
it("Typed arrays can be hashed", function() {
assert.ok(validSha1.test(hash(new Uint8Array([1,2,3,4]))), 'hashes Uint8Array');
assert.ok(validSha1.test(hash(new Int8Array([1,2,3,4]))), 'hashes Int8Array');
assert.ok(validSha1.test(hash(new Uint16Array([1,2,3,4]))), 'hashes Uint16Array');
assert.ok(validSha1.test(hash(new Int16Array([1,2,3,4]))), 'hashes Int16Array');
assert.ok(validSha1.test(hash(new Uint32Array([1,2,3,4]))), 'hashes Uint32Array');
assert.ok(validSha1.test(hash(new Int32Array([1,2,3,4]))), 'hashes Int32Array');
assert.ok(validSha1.test(hash(new Float32Array([1,2,3,4]))), 'hashes Float32Array');
if (typeof Float64Array !== 'undefined')
assert.ok(validSha1.test(hash(new Float64Array([1,2,3,4]))), 'hashes Float64Array');
if (typeof Uint8ClampedArray !== 'undefined')
assert.ok(validSha1.test(hash(new Uint8ClampedArray([1,2,3,4]))), 'hashes Uint8ClampedArray');
assert.ok(validSha1.test(hash(new Uint8Array([1,2,3,4]).buffer)), 'hashes ArrayBuffer');
});
}
Foo.foo = "22";
d = hash(Foo);
if (typeof Map !== 'undefined') {
it("Maps can be hashed", function() {
var map = new Map([['a',1],['b',2]]);
assert.ok(validSha1.test(hash(map)), 'hashes Maps');
});
}
assert.notEqual(a,b, 'adding a property changes the hash');
assert.notEqual(b,c, 'adding another property changes the hash');
assert.notEqual(c,d, 'changing a property changes the hash');
});
if (typeof WeakMap !== 'undefined') {
it("WeakMaps can’t be hashed", function() {
var map = new WeakMap([[{foo: 'bar'},1]]);
assert.throws(function() {
validSha1.test(hash(map))
}, 'does not hash WeakMaps');
});
}
it('respectFunctionProperties = false', function() {
if (typeof Set !== 'undefined') {
it("Sets can be hashed", function() {
var set = new Set(['you', 'du', 'tu', 'あなた', '您']);
assert.ok(validSha1.test(hash(set)), 'hashes Sets');
});
}
var a, b;
function Foo() {}
a = hash(Foo, {respectFunctionProperties: false});
if (typeof WeakSet !== 'undefined') {
it("WeakSets can’t be hashed", function() {
var obj = {foo: 'bar'};
var set = new WeakSet([obj]);
assert.throws(function() {
validSha1.test(hash(set))
}, 'does not hash WeakSets');
});
}
Foo.foo = 22;
b = hash(Foo, {respectFunctionProperties: false});
it('Distinguish functions based on their properties', function() {
assert.equal(a,b, 'function properties are ignored');
});
var a, b, c, d;
function Foo() {}
a = hash(Foo);
it('Distinguish functions based on prototype properties', function() {
Foo.foo = 22;
b = hash(Foo);
var a, b, c, d;
function Foo() {}
a = hash(Foo);
Foo.bar = "42";
c = hash(Foo);
Foo.prototype.foo = 22;
b = hash(Foo);
Foo.foo = "22";
d = hash(Foo);
Foo.prototype.bar = "42";
c = hash(Foo);
assert.notEqual(a,b, 'adding a property changes the hash');
assert.notEqual(b,c, 'adding another property changes the hash');
assert.notEqual(c,d, 'changing a property changes the hash');
});
Foo.prototype.foo = "22";
d = hash(Foo);
it('respectFunctionProperties = false', function() {
assert.notEqual(a,b, 'adding a property to the prototype changes the hash');
assert.notEqual(b,c, 'adding another property to the prototype changes the hash');
assert.notEqual(c,d, 'changing a property in the prototype changes the hash');
});
var a, b;
function Foo() {}
a = hash(Foo, {respectFunctionProperties: false});
it('Distinguish objects based on their type', function() {
Foo.foo = 22;
b = hash(Foo, {respectFunctionProperties: false});
function Foo() {}
function Bar() {}
assert.equal(a,b, 'function properties are ignored');
});
var f = new Foo(), b = new Bar();
it('Distinguish functions based on prototype properties', function() {
assert.notEqual(hash(Foo), hash(Bar), 'Functions with different names should produce a different Hash.');
assert.notEqual(hash(f), hash(b), 'Objects with different constructor should have a different Hash.');
});
var a, b, c, d;
function Foo() {}
a = hash(Foo);
it('respectType = false', function() {
var opt = { respectType: false };
Foo.prototype.foo = 22;
b = hash(Foo);
Foo.prototype.bar = "42";
c = hash(Foo);
function Foo() {}
function Bar() {}
Foo.prototype.foo = "22";
d = hash(Foo);
var f = new Foo(), b = new Bar();
assert.equal(hash(f, opt), hash(b, opt), 'Hashing should disregard the different constructor');
assert.notEqual(a,b, 'adding a property to the prototype changes the hash');
assert.notEqual(b,c, 'adding another property to the prototype changes the hash');
assert.notEqual(c,d, 'changing a property in the prototype changes the hash');
});
it('Distinguish objects based on their type', function() {
var ha, hb;
function F() {}
ha = hash(F, opt);
function Foo() {}
function Bar() {}
F.prototype.meaningOfLife = 42;
hb = hash(F, opt);
var f = new Foo(), b = new Bar();
assert.equal(ha, hb, 'Hashing should disregard changes in the function\'s prototype');
});
assert.notEqual(hash(Foo), hash(Bar), 'Functions with different names should produce a different Hash.');
assert.notEqual(hash(f), hash(b), 'Objects with different constructor should have a different Hash.');
});
it('unorderedArrays = false', function() {
var ha, hb;
ha = hash([1, 2, 3]);
hb = hash([3, 2, 1]);
it('respectType = false', function() {
var opt = { respectType: false };
assert.notEqual(ha, hb, 'Hashing should respect the order of array entries');
});
it('unorderedArrays = true', function() {
var opt = { unorderedArrays: true };
var ha, hb;
ha = hash([1, 2, 3], opt);
hb = hash([3, 2, 1], opt);
function Foo() {}
function Bar() {}
assert.equal(ha, hb, 'Hashing should not respect the order of array entries');
ha = hash([{a: 1}, {a: 2}], opt);
hb = hash([{a: 2}, {a: 1}], opt);
var f = new Foo(), b = new Bar();
assert.equal(hash(f, opt), hash(b, opt), 'Hashing should disregard the different constructor');
assert.equal(ha, hb, 'Hashing should not respect the order of array entries');
});
if (typeof Set !== 'undefined') {
it('unorderedSets = false', function() {
var opt = { unorderedSets: false };
var ha, hb;
ha = hash(new Set([1, 2, 3]), opt);
hb = hash(new Set([3, 2, 1]), opt);
var ha, hb;
function F() {}
ha = hash(F, opt);
assert.notEqual(ha, hb, 'Hashing should respect the order of Set entries');
});
F.prototype.meaningOfLife = 42;
hb = hash(F, opt);
it('unorderedSets = true', function() {
var ha, hb;
ha = hash(new Set([1, 2, 3]));
hb = hash(new Set([3, 2, 1]));
assert.equal(ha, hb, 'Hashing should disregard changes in the function\'s prototype');
assert.equal(ha, hb, 'Hashing should not respect the order of Set entries');
});
}
});
it('unorderedArrays = false', function() {
ha = hash([1, 2, 3]);
hb = hash([3, 2, 1]);
assert.notEqual(ha, hb, 'Hashing should respect the order of array entries');
});
it('unorderedArrays = true', function() {
var opt = { unorderedArrays: true };
ha = hash([1, 2, 3], opt);
hb = hash([3, 2, 1], opt);
assert.equal(ha, hb, 'Hashing should not respect the order of array entries');
});
if (typeof Set !== 'undefined') {
it('unorderedSets = false', function() {
ha = hash(new Set([1, 2, 3]));
hb = hash(new Set([3, 2, 1]));
assert.notEqual(ha, hb, 'Hashing should respect the order of Set entries');
});
it('unorderedSets = true', function() {
var opt = { unorderedSets: true };
ha = hash(new Set([1, 2, 3]), opt);
hb = hash(new Set([3, 2, 1]), opt);
assert.equal(ha, hb, 'Hashing should not respect the order of Set entries');
});
}
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc