tiny-ai-api
Version:
A customizable and extensible client api for managing conversations and AI interactions, currently supporting the **Google Gemini** API — with flexibility to support any similar AI APIs.
1 lines • 160 kB
JavaScript
var TinyAiApi=function(t){"use strict";class e extends Error{constructor(t,e){super("".concat(t," at position ").concat(e)),this.position=e}}function r(t){return/^[0-9A-Fa-f]$/.test(t)}function n(t){return t>="0"&&t<="9"}function o(t){return t>=" "}function i(t){return",:[]/{}()\n+".includes(t)}function s(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"||"_"===t||"$"===t}function a(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"||"_"===t||"$"===t||t>="0"&&t<="9"}const l=/^(http|https|ftp|mailto|file|data|irc):\/\/$/,u=/^[A-Za-z0-9-._~:/?#@!$&'()*+;=]$/;function c(t){return",[]/{}\n+".includes(t)}function f(t){return y(t)||h.test(t)}const h=/^[[{\w-]$/;function p(t){return"\n"===t||"\r"===t||"\t"===t||"\b"===t||"\f"===t}function d(t,e){const r=t.charCodeAt(e);return 32===r||10===r||9===r||13===r}function g(t,e){const r=t.charCodeAt(e);return 32===r||9===r||13===r}function m(t,e){const r=t.charCodeAt(e);return 160===r||r>=8192&&r<=8202||8239===r||8287===r||12288===r}function y(t){return w(t)||v(t)}function w(t){return'"'===t||"“"===t||"”"===t}function b(t){return'"'===t}function v(t){return"'"===t||"‘"===t||"’"===t||"`"===t||"´"===t}function E(t){return"'"===t}function T(t,e){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=t.lastIndexOf(e);return-1!==n?t.substring(0,n)+(r?"":t.substring(n+1)):t}function _(t,e){let r=t.length;if(!d(t,r-1))return t+e;for(;d(t,r-1);)r--;return t.substring(0,r)+e+t.substring(r)}function A(t,e,r){return t.substring(0,e)+t.substring(e+r)}const x={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},I={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function L(t){let h=0,L="";P();k()||function(){throw new e("Unexpected end of json string",t.length)}(),P();const C=D(",");for(C&&B(),f(t[h])&&function(t){return/[,\n][ \t\r]*$/.test(t)}(L)?(C||(L=_(L,",")),function(){let t=!0,e=!0;for(;e;){if(t)t=!1;else{D(",")||(L=_(L,","))}e=k()}e||(L=T(L,","));L="[\n".concat(L,"\n]")}()):C&&(L=T(L,","));"}"===t[h]||"]"===t[h];)h++,B();if(h>=t.length)return L;function k(){B();const e=function(){if("{"===t[h]){L+="{",h++,B(),R(",")&&B();let e=!0;for(;h<t.length&&"}"!==t[h];){let r;e?(r=!0,e=!1):(r=D(","),r||(L=_(L,",")),B()),O();if(!(U()||H(!0))){"}"===t[h]||"{"===t[h]||"]"===t[h]||"["===t[h]||void 0===t[h]?L=T(L,","):Y();break}B();const n=D(":"),o=h>=t.length;n||(f(t[h])||o?L=_(L,":"):J());k()||(n||o?L+="null":J())}return"}"===t[h]?(L+="}",h++):L=_(L,"}"),!0}return!1}()||function(){if("["===t[h]){L+="[",h++,B(),R(",")&&B();let e=!0;for(;h<t.length&&"]"!==t[h];){if(e)e=!1;else{D(",")||(L=_(L,","))}O();if(!k()){L=T(L,",");break}}return"]"===t[h]?(L+="]",h++):L=_(L,"]"),!0}return!1}()||U()||function(){const e=h;if("-"===t[h]){if(h++,V())return $(e),!0;if(!n(t[h]))return h=e,!1}for(;n(t[h]);)h++;if("."===t[h]){if(h++,V())return $(e),!0;if(!n(t[h]))return h=e,!1;for(;n(t[h]);)h++}if("e"===t[h]||"E"===t[h]){if(h++,"-"!==t[h]&&"+"!==t[h]||h++,V())return $(e),!0;if(!n(t[h]))return h=e,!1;for(;n(t[h]);)h++}if(!V())return h=e,!1;if(h>e){const r=t.slice(e,h),n=/^0\d/.test(r);return L+=n?'"'.concat(r,'"'):r,!0}return!1}()||F("true","true")||F("false","false")||F("null","null")||F("True","true")||F("False","false")||F("None","null")||H(!1)||function(){if("/"===t[h]){const e=h;for(h++;h<t.length&&("/"!==t[h]||"\\"===t[h-1]);)h++;return h++,L+='"'.concat(t.substring(e,h),'"'),!0}}();return B(),e}function B(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const e=h;let r=N(t);do{r=M(),r&&(r=N(t))}while(r);return h>e}function N(e){const r=e?d:g;let n="";for(;;)if(r(t,h))n+=t[h],h++;else{if(!m(t,h))break;n+=" ",h++}return n.length>0&&(L+=n,!0)}function M(){if("/"===t[h]&&"*"===t[h+1]){for(;h<t.length&&!S(t,h);)h++;return h+=2,!0}if("/"===t[h]&&"/"===t[h+1]){for(;h<t.length&&"\n"!==t[h];)h++;return!0}return!1}function P(){if("```"===t.slice(h,h+3)){if(h+=3,s(t[h]))for(;h<t.length&&a(t[h]);)h++;return B(),!0}return!1}function D(e){return t[h]===e&&(L+=t[h],h++,!0)}function R(e){return t[h]===e&&(h++,!0)}function O(){return B(),"."===t[h]&&"."===t[h+1]&&"."===t[h+2]&&(h+=3,B(),R(","),!0)}function U(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,a="\\"===t[h];if(a&&(h++,a=!0),y(t[h])){const f=b(t[h])?b:E(t[h])?E:v(t[h])?v:w,d=h,g=L.length;let m='"';for(h++;;){if(h>=t.length){const r=j(h-1);return!e&&i(t.charAt(r))?(h=d,L=L.substring(0,g),U(!0)):(m=_(m,'"'),L+=m,!0)}if(h===s)return m=_(m,'"'),L+=m,!0;if(f(t[h])){const r=h,o=m.length;if(m+='"',h++,L+=m,B(!1),e||h>=t.length||i(t[h])||y(t[h])||n(t[h]))return W(),!0;const s=j(r-1),a=t.charAt(s);if(","===a)return h=d,L=L.substring(0,g),U(!1,s);if(i(a))return h=d,L=L.substring(0,g),U(!0);L=L.substring(0,g),h=r+1,m="".concat(m.substring(0,o),"\\").concat(m.substring(o))}else{if(e&&c(t[h])){if(":"===t[h-1]&&l.test(t.substring(d+1,h+2)))for(;h<t.length&&u.test(t[h]);)m+=t[h],h++;return m=_(m,'"'),L+=m,W(),!0}if("\\"===t[h]){const e=t.charAt(h+1);if(void 0!==I[e])m+=t.slice(h,h+2),h+=2;else if("u"===e){let e=2;for(;e<6&&r(t[h+e]);)e++;6===e?(m+=t.slice(h,h+6),h+=6):h+e>=t.length?h=t.length:q()}else m+=e,h+=2}else{const e=t.charAt(h);'"'===e&&"\\"!==t[h-1]?(m+="\\".concat(e),h++):p(e)?(m+=x[e],h++):(o(e)||K(e),m+=e,h++)}}a&&R("\\")}}return!1}function W(){let e=!1;for(B();"+"===t[h];){e=!0,h++,B(),L=T(L,'"',!0);const t=L.length,r=U();L=r?A(L,t,1):_(L,'"')}return e}function F(e,r){return t.slice(h,h+e.length)===e&&(L+=r,h+=e.length,!0)}function H(e){const r=h;if(s(t[h])){for(;h<t.length&&a(t[h]);)h++;let e=h;for(;d(t,e);)e++;if("("===t[e])return h=e+1,k(),")"===t[h]&&(h++,";"===t[h]&&h++),!0}for(;h<t.length&&!c(t[h])&&!y(t[h])&&(!e||":"!==t[h]);)h++;if(":"===t[h-1]&&l.test(t.substring(r,h+2)))for(;h<t.length&&u.test(t[h]);)h++;if(h>r){for(;d(t,h-1)&&h>0;)h--;const e=t.slice(r,h);return L+="undefined"===e?"null":JSON.stringify(e),'"'===t[h]&&h++,!0}}function j(e){let r=e;for(;r>0&&d(t,r);)r--;return r}function V(){return h>=t.length||i(t[h])||d(t,h)}function $(e){L+="".concat(t.slice(e,h),"0")}function K(t){throw new e("Invalid character ".concat(JSON.stringify(t)),h)}function Y(){throw new e("Object key expected",h)}function J(){throw new e("Colon expected",h)}function q(){const r=t.slice(h,h+6);throw new e('Invalid unicode character "'.concat(r,'"'),h)}!function(){throw new e("Unexpected character ".concat(JSON.stringify(t[h])),h)}()}function S(t,e){return"*"===t[e]&&"/"===t[e+1]}function C(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function k(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var B,N={exports:{}};var M,P=(B||(B=1,N.exports=function t(e,r,n){function o(s,a){if(!r[s]){if(!e[s]){if(!a&&k)return k(s);if(i)return i(s,!0);throw new Error("Cannot find module '"+s+"'")}a=r[s]={exports:{}},e[s][0].call(a.exports,(function(t){return o(e[s][1][t]||t)}),a,a.exports,t,e,r,n)}return r[s].exports}for(var i=k,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(t,e,r){(function(n,o,i,s,a,l,u,c,f){var h=t("crypto");function p(t,e){var r;return void 0===(r="passthrough"!==(e=m(t,e)).algorithm?h.createHash(e.algorithm):new b).write&&(r.write=r.update,r.end=r.update),w(e,r).dispatch(t),r.update||r.end(""),r.digest?r.digest("buffer"===e.encoding?void 0:e.encoding):(t=r.read(),"buffer"!==e.encoding?t.toString(e.encoding):t)}(r=e.exports=p).sha1=function(t){return p(t)},r.keys=function(t){return p(t,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},r.MD5=function(t){return p(t,{algorithm:"md5",encoding:"hex"})},r.keysMD5=function(t){return p(t,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var d=h.getHashes?h.getHashes().slice():["sha1","md5"],g=(d.push("passthrough"),["buffer","hex","binary","base64"]);function m(t,e){var r={};if(r.algorithm=(e=e||{}).algorithm||"sha1",r.encoding=e.encoding||"hex",r.excludeValues=!!e.excludeValues,r.algorithm=r.algorithm.toLowerCase(),r.encoding=r.encoding.toLowerCase(),r.ignoreUnknown=!0===e.ignoreUnknown,r.respectType=!1!==e.respectType,r.respectFunctionNames=!1!==e.respectFunctionNames,r.respectFunctionProperties=!1!==e.respectFunctionProperties,r.unorderedArrays=!0===e.unorderedArrays,r.unorderedSets=!1!==e.unorderedSets,r.unorderedObjects=!1!==e.unorderedObjects,r.replacer=e.replacer||void 0,r.excludeKeys=e.excludeKeys||void 0,void 0===t)throw new Error("Object argument required.");for(var n=0;n<d.length;++n)d[n].toLowerCase()===r.algorithm.toLowerCase()&&(r.algorithm=d[n]);if(-1===d.indexOf(r.algorithm))throw new Error('Algorithm "'+r.algorithm+'" not supported. supported values: '+d.join(", "));if(-1===g.indexOf(r.encoding)&&"passthrough"!==r.algorithm)throw new Error('Encoding "'+r.encoding+'" not supported. supported values: '+g.join(", "));return r}function y(t){if("function"==typeof t)return null!=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(t))}function w(t,e,r){function n(t){return e.update?e.update(t,"utf8"):e.write(t,"utf8")}return r=r||[],{dispatch:function(e){return this["_"+(null===(e=t.replacer?t.replacer(e):e)?"null":typeof e)](e)},_object:function(e){var o,s=Object.prototype.toString.call(e),a=/\[object (.*)\]/i.exec(s);if(a=(a=a?a[1]:"unknown:["+s+"]").toLowerCase(),0<=(s=r.indexOf(e)))return this.dispatch("[CIRCULAR:"+s+"]");if(r.push(e),void 0!==i&&i.isBuffer&&i.isBuffer(e))return n("buffer:"),n(e);if("object"===a||"function"===a||"asyncfunction"===a)return s=Object.keys(e),t.unorderedObjects&&(s=s.sort()),!1===t.respectType||y(e)||s.splice(0,0,"prototype","__proto__","constructor"),t.excludeKeys&&(s=s.filter((function(e){return!t.excludeKeys(e)}))),n("object:"+s.length+":"),o=this,s.forEach((function(r){o.dispatch(r),n(":"),t.excludeValues||o.dispatch(e[r]),n(",")}));if(!this["_"+a]){if(t.ignoreUnknown)return n("["+a+"]");throw new Error('Unknown object type "'+a+'"')}this["_"+a](e)},_array:function(e,o){o=void 0!==o?o:!1!==t.unorderedArrays;var i=this;if(n("array:"+e.length+":"),!o||e.length<=1)return e.forEach((function(t){return i.dispatch(t)}));var s=[];return o=e.map((function(e){var n=new b,o=r.slice();return w(t,n,o).dispatch(e),s=s.concat(o.slice(r.length)),n.read().toString()})),r=r.concat(s),o.sort(),this._array(o,!1)},_date:function(t){return n("date:"+t.toJSON())},_symbol:function(t){return n("symbol:"+t.toString())},_error:function(t){return n("error:"+t.toString())},_boolean:function(t){return n("bool:"+t.toString())},_string:function(t){n("string:"+t.length+":"),n(t.toString())},_function:function(e){n("fn:"),y(e)?this.dispatch("[native]"):this.dispatch(e.toString()),!1!==t.respectFunctionNames&&this.dispatch("function-name:"+String(e.name)),t.respectFunctionProperties&&this._object(e)},_number:function(t){return n("number:"+t.toString())},_xml:function(t){return n("xml:"+t.toString())},_null:function(){return n("Null")},_undefined:function(){return n("Undefined")},_regexp:function(t){return n("regex:"+t.toString())},_uint8array:function(t){return n("uint8array:"),this.dispatch(Array.prototype.slice.call(t))},_uint8clampedarray:function(t){return n("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(t))},_int8array:function(t){return n("int8array:"),this.dispatch(Array.prototype.slice.call(t))},_uint16array:function(t){return n("uint16array:"),this.dispatch(Array.prototype.slice.call(t))},_int16array:function(t){return n("int16array:"),this.dispatch(Array.prototype.slice.call(t))},_uint32array:function(t){return n("uint32array:"),this.dispatch(Array.prototype.slice.call(t))},_int32array:function(t){return n("int32array:"),this.dispatch(Array.prototype.slice.call(t))},_float32array:function(t){return n("float32array:"),this.dispatch(Array.prototype.slice.call(t))},_float64array:function(t){return n("float64array:"),this.dispatch(Array.prototype.slice.call(t))},_arraybuffer:function(t){return n("arraybuffer:"),this.dispatch(new Uint8Array(t))},_url:function(t){return n("url:"+t.toString())},_map:function(e){return n("map:"),e=Array.from(e),this._array(e,!1!==t.unorderedSets)},_set:function(e){return n("set:"),e=Array.from(e),this._array(e,!1!==t.unorderedSets)},_file:function(t){return n("file:"),this.dispatch([t.name,t.size,t.type,t.lastModfied])},_blob:function(){if(t.ignoreUnknown)return n("[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 n("domwindow")},_bigint:function(t){return n("bigint:"+t.toString())},_process:function(){return n("process")},_timer:function(){return n("timer")},_pipe:function(){return n("pipe")},_tcp:function(){return n("tcp")},_udp:function(){return n("udp")},_tty:function(){return n("tty")},_statwatcher:function(){return n("statwatcher")},_securecontext:function(){return n("securecontext")},_connection:function(){return n("connection")},_zlib:function(){return n("zlib")},_context:function(){return n("context")},_nodescript:function(){return n("nodescript")},_httpparser:function(){return n("httpparser")},_dataview:function(){return n("dataview")},_signal:function(){return n("signal")},_fsevent:function(){return n("fsevent")},_tlswrap:function(){return n("tlswrap")}}}function b(){return{buf:"",write:function(t){this.buf+=t},end:function(t){this.buf+=t},read:function(){return this.buf}}}r.writeToStream=function(t,e,r){return void 0===r&&(r=e,e={}),w(e=m(t,e),r).dispatch(t)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(t,e,r){(function(t,e,n,o,i,s,a,l,u){!function(t){var e="undefined"!=typeof Uint8Array?Uint8Array:Array,r="+".charCodeAt(0),n="/".charCodeAt(0),o="0".charCodeAt(0),i="a".charCodeAt(0),s="A".charCodeAt(0),a="-".charCodeAt(0),l="_".charCodeAt(0);function u(t){return(t=t.charCodeAt(0))===r||t===a?62:t===n||t===l?63:t<o?-1:t<o+10?t-o+26+26:t<s+26?t-s:t<i+26?t-i+26:void 0}t.toByteArray=function(t){var r,n;if(0<t.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var o=t.length,i=(o="="===t.charAt(o-2)?2:"="===t.charAt(o-1)?1:0,new e(3*t.length/4-o)),s=0<o?t.length-4:t.length,a=0;function l(t){i[a++]=t}for(r=0;r<s;r+=4,0)l((16711680&(n=u(t.charAt(r))<<18|u(t.charAt(r+1))<<12|u(t.charAt(r+2))<<6|u(t.charAt(r+3))))>>16),l((65280&n)>>8),l(255&n);return 2==o?l(255&(n=u(t.charAt(r))<<2|u(t.charAt(r+1))>>4)):1==o&&(l((n=u(t.charAt(r))<<10|u(t.charAt(r+1))<<4|u(t.charAt(r+2))>>2)>>8&255),l(255&n)),i},t.fromByteArray=function(t){var e,r,n,o,i=t.length%3,s="";function a(t){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)}for(e=0,n=t.length-i;e<n;e+=3)s+=a((o=r=(t[e]<<16)+(t[e+1]<<8)+t[e+2])>>18&63)+a(o>>12&63)+a(o>>6&63)+a(63&o);switch(i){case 1:s=(s+=a((r=t[t.length-1])>>2))+a(r<<4&63)+"==";break;case 2:s=(s=(s+=a((r=(t[t.length-2]<<8)+t[t.length-1])>>10))+a(r>>4&63))+a(r<<2&63)+"="}return s}}(void 0===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/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(t,e,r){(function(e,n,o,i,s,a,l,u,c){var f=t("base64-js"),h=t("ieee754");function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);var n,i,s,a,l=typeof t;if("base64"===e&&"string"==l)for(t=(a=t).trim?a.trim():a.replace(/^\s+|\s+$/g,"");t.length%4!=0;)t+="=";if("number"==l)n=k(t);else if("string"==l)n=o.byteLength(t,e);else{if("object"!=l)throw new Error("First argument needs to be a number, array or string.");n=k(t.length)}if(o._useTypedArrays?i=o._augment(new Uint8Array(n)):((i=this).length=n,i._isBuffer=!0),o._useTypedArrays&&"number"==typeof t.byteLength)i._set(t);else if(B(a=t)||o.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length)for(s=0;s<n;s++)o.isBuffer(t)?i[s]=t.readUInt8(s):i[s]=t[s];else if("string"==l)i.write(t,0,e);else if("number"==l&&!o._useTypedArrays&&!r)for(s=0;s<n;s++)i[s]=0;return i}function p(t,e,r,n){return o._charsWritten=D(function(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function d(t,e,r,n){return o._charsWritten=D(function(t){for(var e,r,n=[],o=0;o<t.length;o++)e=(r=t.charCodeAt(o))>>8,r%=256,n.push(r),n.push(e);return n}(e),t,r,n)}function g(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;o++)n+=String.fromCharCode(t[o]);return n}function m(t,e,r,n){var o;if(n||(F("boolean"==typeof r,"missing or invalid endian"),F(null!=e,"missing offset"),F(e+1<t.length,"Trying to read beyond buffer length")),!((n=t.length)<=e))return r?(o=t[e],e+1<n&&(o|=t[e+1]<<8)):(o=t[e]<<8,e+1<n&&(o|=t[e+1])),o}function y(t,e,r,n){var o;if(n||(F("boolean"==typeof r,"missing or invalid endian"),F(null!=e,"missing offset"),F(e+3<t.length,"Trying to read beyond buffer length")),!((n=t.length)<=e))return r?(e+2<n&&(o=t[e+2]<<16),e+1<n&&(o|=t[e+1]<<8),o|=t[e],e+3<n&&(o+=t[e+3]<<24>>>0)):(e+1<n&&(o=t[e+1]<<16),e+2<n&&(o|=t[e+2]<<8),e+3<n&&(o|=t[e+3]),o+=t[e]<<24>>>0),o}function w(t,e,r,n){if(n||(F("boolean"==typeof r,"missing or invalid endian"),F(null!=e,"missing offset"),F(e+1<t.length,"Trying to read beyond buffer length")),!(t.length<=e))return 32768&(n=m(t,e,r,!0))?-1*(65535-n+1):n}function b(t,e,r,n){if(n||(F("boolean"==typeof r,"missing or invalid endian"),F(null!=e,"missing offset"),F(e+3<t.length,"Trying to read beyond buffer length")),!(t.length<=e))return 2147483648&(n=y(t,e,r,!0))?-1*(4294967295-n+1):n}function v(t,e,r,n){return n||(F("boolean"==typeof r,"missing or invalid endian"),F(e+3<t.length,"Trying to read beyond buffer length")),h.read(t,e,r,23,4)}function E(t,e,r,n){return n||(F("boolean"==typeof r,"missing or invalid endian"),F(e+7<t.length,"Trying to read beyond buffer length")),h.read(t,e,r,52,8)}function T(t,e,r,n,o){if(o||(F(null!=e,"missing value"),F("boolean"==typeof n,"missing or invalid endian"),F(null!=r,"missing offset"),F(r+1<t.length,"trying to write beyond buffer length"),O(e,65535)),!((o=t.length)<=r))for(var i=0,s=Math.min(o-r,2);i<s;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function _(t,e,r,n,o){if(o||(F(null!=e,"missing value"),F("boolean"==typeof n,"missing or invalid endian"),F(null!=r,"missing offset"),F(r+3<t.length,"trying to write beyond buffer length"),O(e,4294967295)),!((o=t.length)<=r))for(var i=0,s=Math.min(o-r,4);i<s;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function A(t,e,r,n,o){o||(F(null!=e,"missing value"),F("boolean"==typeof n,"missing or invalid endian"),F(null!=r,"missing offset"),F(r+1<t.length,"Trying to write beyond buffer length"),U(e,32767,-32768)),t.length<=r||T(t,0<=e?e:65535+e+1,r,n,o)}function x(t,e,r,n,o){o||(F(null!=e,"missing value"),F("boolean"==typeof n,"missing or invalid endian"),F(null!=r,"missing offset"),F(r+3<t.length,"Trying to write beyond buffer length"),U(e,2147483647,-2147483648)),t.length<=r||_(t,0<=e?e:4294967295+e+1,r,n,o)}function I(t,e,r,n,o){o||(F(null!=e,"missing value"),F("boolean"==typeof n,"missing or invalid endian"),F(null!=r,"missing offset"),F(r+3<t.length,"Trying to write beyond buffer length"),W(e,34028234663852886e22,-34028234663852886e22)),t.length<=r||h.write(t,e,r,n,23,4)}function L(t,e,r,n,o){o||(F(null!=e,"missing value"),F("boolean"==typeof n,"missing or invalid endian"),F(null!=r,"missing offset"),F(r+7<t.length,"Trying to write beyond buffer length"),W(e,17976931348623157e292,-17976931348623157e292)),t.length<=r||h.write(t,e,r,n,52,8)}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(t){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||!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=M(t).length;break;case"ascii":case"binary":case"raw":r=t.length;break;case"base64":r=P(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(F(B(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];if("number"!=typeof e)for(i=e=0;i<t.length;i++)e+=t[i].length;for(var r=new o(e),n=0,i=0;i<t.length;i++){var s=t[i];s.copy(r,n),n+=s.length}return r},o.prototype.write=function(t,e,r,n){isFinite(e)?isFinite(r)||(n=r,r=void 0):(u=n,n=e,e=r,r=u),e=Number(e)||0;var i,s,a,l,u=this.length-e;switch((!r||u<(r=Number(r)))&&(r=u),n=String(n||"utf8").toLowerCase()){case"hex":i=function(t,e,r,n){r=Number(r)||0;var i=t.length-r;(!n||i<(n=Number(n)))&&(n=i),F((i=e.length)%2==0,"Invalid hex string"),i/2<n&&(n=i/2);for(var s=0;s<n;s++){var a=parseInt(e.substr(2*s,2),16);F(!isNaN(a),"Invalid hex string"),t[r+s]=a}return o._charsWritten=2*s,s}(this,t,e,r);break;case"utf8":case"utf-8":s=this,a=e,l=r,i=o._charsWritten=D(M(t),s,a,l);break;case"ascii":case"binary":i=p(this,t,e,r);break;case"base64":s=this,a=e,l=r,i=o._charsWritten=D(P(t),s,a,l);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":i=d(this,t,e,r);break;default:throw new Error("Unknown encoding")}return i},o.prototype.toString=function(t,e,r){var n,o,i,s,a=this;if(t=String(t||"utf8").toLowerCase(),e=Number(e)||0,(r=void 0!==r?Number(r):a.length)===e)return"";switch(t){case"hex":n=function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||n<r)&&(r=n);for(var o="",i=e;i<r;i++)o+=N(t[i]);return o}(a,e,r);break;case"utf8":case"utf-8":n=function(t,e,r){var n="",o="";r=Math.min(t.length,r);for(var i=e;i<r;i++)t[i]<=127?(n+=R(o)+String.fromCharCode(t[i]),o=""):o+="%"+t[i].toString(16);return n+R(o)}(a,e,r);break;case"ascii":case"binary":n=g(a,e,r);break;case"base64":o=a,s=r,n=0===(i=e)&&s===o.length?f.fromByteArray(o):f.fromByteArray(o.slice(i,s));break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=function(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}(a,e,r);break;default:throw new Error("Unknown encoding")}return n},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.copy=function(t,e,r,n){if(e=e||0,(n=n||0===n?n:this.length)!==(r=r||0)&&0!==t.length&&0!==this.length){F(r<=n,"sourceEnd < sourceStart"),F(0<=e&&e<t.length,"targetStart out of bounds"),F(0<=r&&r<this.length,"sourceStart out of bounds"),F(0<=n&&n<=this.length,"sourceEnd out of bounds"),n>this.length&&(n=this.length);var i=(n=t.length-e<n-r?t.length-e+r:n)-r;if(i<100||!o._useTypedArrays)for(var s=0;s<i;s++)t[s+e]=this[s+r];else t._set(this.subarray(r,r+i),e)}},o.prototype.slice=function(t,e){var r=this.length;if(t=C(t,r,0),e=C(e,r,r),o._useTypedArrays)return o._augment(this.subarray(t,e));for(var n=e-t,i=new o(n,void 0,!0),s=0;s<n;s++)i[s]=this[s+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){if(e||(F(null!=t,"missing offset"),F(t<this.length,"Trying to read beyond buffer length")),!(t>=this.length))return this[t]},o.prototype.readUInt16LE=function(t,e){return m(this,t,!0,e)},o.prototype.readUInt16BE=function(t,e){return m(this,t,!1,e)},o.prototype.readUInt32LE=function(t,e){return y(this,t,!0,e)},o.prototype.readUInt32BE=function(t,e){return y(this,t,!1,e)},o.prototype.readInt8=function(t,e){if(e||(F(null!=t,"missing offset"),F(t<this.length,"Trying to read beyond buffer length")),!(t>=this.length))return 128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){return w(this,t,!0,e)},o.prototype.readInt16BE=function(t,e){return w(this,t,!1,e)},o.prototype.readInt32LE=function(t,e){return b(this,t,!0,e)},o.prototype.readInt32BE=function(t,e){return b(this,t,!1,e)},o.prototype.readFloatLE=function(t,e){return v(this,t,!0,e)},o.prototype.readFloatBE=function(t,e){return v(this,t,!1,e)},o.prototype.readDoubleLE=function(t,e){return E(this,t,!0,e)},o.prototype.readDoubleBE=function(t,e){return E(this,t,!1,e)},o.prototype.writeUInt8=function(t,e,r){r||(F(null!=t,"missing value"),F(null!=e,"missing offset"),F(e<this.length,"trying to write beyond buffer length"),O(t,255)),e>=this.length||(this[e]=t)},o.prototype.writeUInt16LE=function(t,e,r){T(this,t,e,!0,r)},o.prototype.writeUInt16BE=function(t,e,r){T(this,t,e,!1,r)},o.prototype.writeUInt32LE=function(t,e,r){_(this,t,e,!0,r)},o.prototype.writeUInt32BE=function(t,e,r){_(this,t,e,!1,r)},o.prototype.writeInt8=function(t,e,r){r||(F(null!=t,"missing value"),F(null!=e,"missing offset"),F(e<this.length,"Trying to write beyond buffer length"),U(t,127,-128)),e>=this.length||(0<=t?this.writeUInt8(t,e,r):this.writeUInt8(255+t+1,e,r))},o.prototype.writeInt16LE=function(t,e,r){A(this,t,e,!0,r)},o.prototype.writeInt16BE=function(t,e,r){A(this,t,e,!1,r)},o.prototype.writeInt32LE=function(t,e,r){x(this,t,e,!0,r)},o.prototype.writeInt32BE=function(t,e,r){x(this,t,e,!1,r)},o.prototype.writeFloatLE=function(t,e,r){I(this,t,e,!0,r)},o.prototype.writeFloatBE=function(t,e,r){I(this,t,e,!1,r)},o.prototype.writeDoubleLE=function(t,e,r){L(this,t,e,!0,r)},o.prototype.writeDoubleBE=function(t,e,r){L(this,t,e,!1,r)},o.prototype.fill=function(t,e,r){if(e=e||0,r=r||this.length,F("number"==typeof(t="string"==typeof(t=t||0)?t.charCodeAt(0):t)&&!isNaN(t),"value is not a number"),F(e<=r,"end < start"),r!==e&&0!==this.length){F(0<=e&&e<this.length,"start out of bounds"),F(0<=r&&r<=this.length,"end out of bounds");for(var n=e;n<r;n++)this[n]=t}},o.prototype.inspect=function(){for(var t=[],e=this.length,n=0;n<e;n++)if(t[n]=N(this[n]),n===r.INSPECT_MAX_BYTES){t[n+1]="...";break}return"<Buffer "+t.join(" ")+">"},o.prototype.toArrayBuffer=function(){if("undefined"==typeof Uint8Array)throw new Error("Buffer.toArrayBuffer not supported in this browser");if(o._useTypedArrays)return new o(this).buffer;for(var t=new Uint8Array(this.length),e=0,r=t.length;e<r;e+=1)t[e]=this[e];return t.buffer};var S=o.prototype;function C(t,e,r){return"number"!=typeof t?r:e<=(t=~~t)?e:0<=t||0<=(t+=e)?t:0}function k(t){return(t=~~Math.ceil(+t))<0?0:t}function B(t){return(Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)})(t)}function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function M(t){for(var e=[],r=0;r<t.length;r++){var n=t.charCodeAt(r);if(n<=127)e.push(t.charCodeAt(r));else for(var o=r,i=(55296<=n&&n<=57343&&r++,encodeURIComponent(t.slice(o,r+1)).substr(1).split("%")),s=0;s<i.length;s++)e.push(parseInt(i[s],16))}return e}function P(t){return f.toByteArray(t)}function D(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);o++)e[o+r]=t[o];return o}function R(t){try{return decodeURIComponent(t)}catch(t){return String.fromCharCode(65533)}}function O(t,e){F("number"==typeof t,"cannot write a non-number as a number"),F(0<=t,"specified a negative value for writing an unsigned value"),F(t<=e,"value is larger than maximum value for type"),F(Math.floor(t)===t,"value has a fractional component")}function U(t,e,r){F("number"==typeof t,"cannot write a non-number as a number"),F(t<=e,"value larger than maximum allowed value"),F(r<=t,"value smaller than minimum allowed value"),F(Math.floor(t)===t,"value has a fractional component")}function W(t,e,r){F("number"==typeof t,"cannot write a non-number as a number"),F(t<=e,"value larger than maximum allowed value"),F(r<=t,"value smaller than minimum allowed value")}function F(t,e){if(!t)throw new Error(e||"Failed assertion")}o._augment=function(t){return t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=S.get,t.set=S.set,t.write=S.write,t.toString=S.toString,t.toLocaleString=S.toString,t.toJSON=S.toJSON,t.copy=S.copy,t.slice=S.slice,t.readUInt8=S.readUInt8,t.readUInt16LE=S.readUInt16LE,t.readUInt16BE=S.readUInt16BE,t.readUInt32LE=S.readUInt32LE,t.readUInt32BE=S.readUInt32BE,t.readInt8=S.readInt8,t.readInt16LE=S.readInt16LE,t.readInt16BE=S.readInt16BE,t.readInt32LE=S.readInt32LE,t.readInt32BE=S.readInt32BE,t.readFloatLE=S.readFloatLE,t.readFloatBE=S.readFloatBE,t.readDoubleLE=S.readDoubleLE,t.readDoubleBE=S.readDoubleBE,t.writeUInt8=S.writeUInt8,t.writeUInt16LE=S.writeUInt16LE,t.writeUInt16BE=S.writeUInt16BE,t.writeUInt32LE=S.writeUInt32LE,t.writeUInt32BE=S.writeUInt32BE,t.writeInt8=S.writeInt8,t.writeInt16LE=S.writeInt16LE,t.writeInt16BE=S.writeInt16BE,t.writeInt32LE=S.writeInt32LE,t.writeInt32BE=S.writeInt32BE,t.writeFloatLE=S.writeFloatLE,t.writeFloatBE=S.writeFloatBE,t.writeDoubleLE=S.writeDoubleLE,t.writeDoubleBE=S.writeDoubleBE,t.fill=S.fill,t.inspect=S.inspect,t.toArrayBuffer=S.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":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(t,e,r){(function(r,n,o,i,s,a,l,u,c){o=t("buffer").Buffer;var f=4,h=new o(f);h.fill(0),e.exports={hash:function(t,e,r,n){for(var i=e(function(t,e){t.length%f!=0&&(r=t.length+(f-t.length%f),t=o.concat([t,h],r));for(var r,n=[],i=e?t.readInt32BE:t.readInt32LE,s=0;s<t.length;s+=f)n.push(i.call(t,s));return n}(t=o.isBuffer(t)?t:new o(t),n),8*t.length),s=(e=n,new o(r)),a=e?s.writeInt32BE:s.writeInt32LE,l=0;l<i.length;l++)a.call(s,i[l],4*l,!0);return s}}}).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:3,lYpoI2:11}],5:[function(t,e,r){(function(e,n,o,i,s,a,l,u,c){o=t("buffer").Buffer;var f=t("./sha"),h=t("./sha256"),p=t("./rng"),d={sha1:f,sha256:h,md5:t("./md5")},g=64,m=new o(g);function y(t,e){var r=d[t=t||"sha1"],n=[];return r||w("algorithm:",t,"is not yet supported"),{update:function(t){return o.isBuffer(t)||(t=new o(t)),n.push(t),t.length,this},digest:function(t){var i=o.concat(n);return i=e?function(t,e,r){o.isBuffer(e)||(e=new o(e)),o.isBuffer(r)||(r=new o(r)),e.length>g?e=t(e):e.length<g&&(e=o.concat([e,m],g));for(var n=new o(g),i=new o(g),s=0;s<g;s++)n[s]=54^e[s],i[s]=92^e[s];return r=t(o.concat([n,r])),t(o.concat([i,r]))}(r,e,i):r(i),n=null,t?i.toString(t):i}}}function w(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}m.fill(0),r.createHash=function(t){return y(t)},r.createHmac=y,r.randomBytes=function(t,e){if(!e||!e.call)return new o(p(t));try{e.call(this,void 0,new o(p(t)))}catch(t){e(t)}};var b,v=["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],E=function(t){r[t]=function(){w("sorry,",t,"is not implemented yet")}};for(b in v)E(v[b])}).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":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:11}],6:[function(t,e,r){(function(r,n,o,i,s,a,l,u,c){var f=t("./helpers");function h(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var r=1732584193,n=-271733879,o=-1732584194,i=271733878,s=0;s<t.length;s+=16){var a=r,l=n,u=o,c=i;r=d(r,n,o,i,t[s+0],7,-680876936),i=d(i,r,n,o,t[s+1],12,-389564586),o=d(o,i,r,n,t[s+2],17,606105819),n=d(n,o,i,r,t[s+3],22,-1044525330),r=d(r,n,o,i,t[s+4],7,-176418897),i=d(i,r,n,o,t[s+5],12,1200080426),o=d(o,i,r,n,t[s+6],17,-1473231341),n=d(n,o,i,r,t[s+7],22,-45705983),r=d(r,n,o,i,t[s+8],7,1770035416),i=d(i,r,n,o,t[s+9],12,-1958414417),o=d(o,i,r,n,t[s+10],17,-42063),n=d(n,o,i,r,t[s+11],22,-1990404162),r=d(r,n,o,i,t[s+12],7,1804603682),i=d(i,r,n,o,t[s+13],12,-40341101),o=d(o,i,r,n,t[s+14],17,-1502002290),r=g(r,n=d(n,o,i,r,t[s+15],22,1236535329),o,i,t[s+1],5,-165796510),i=g(i,r,n,o,t[s+6],9,-1069501632),o=g(o,i,r,n,t[s+11],14,643717713),n=g(n,o,i,r,t[s+0],20,-373897302),r=g(r,n,o,i,t[s+5],5,-701558691),i=g(i,r,n,o,t[s+10],9,38016083),o=g(o,i,r,n,t[s+15],14,-660478335),n=g(n,o,i,r,t[s+4],20,-405537848),r=g(r,n,o,i,t[s+9],5,568446438),i=g(i,r,n,o,t[s+14],9,-1019803690),o=g(o,i,r,n,t[s+3],14,-187363961),n=g(n,o,i,r,t[s+8],20,1163531501),r=g(r,n,o,i,t[s+13],5,-1444681467),i=g(i,r,n,o,t[s+2],9,-51403784),o=g(o,i,r,n,t[s+7],14,1735328473),r=m(r,n=g(n,o,i,r,t[s+12],20,-1926607734),o,i,t[s+5],4,-378558),i=m(i,r,n,o,t[s+8],11,-2022574463),o=m(o,i,r,n,t[s+11],16,1839030562),n=m(n,o,i,r,t[s+14],23,-35309556),r=m(r,n,o,i,t[s+1],4,-1530992060),i=m(i,r,n,o,t[s+4],11,1272893353),o=m(o,i,r,n,t[s+7],16,-155497632),n=m(n,o,i,r,t[s+10],23,-1094730640),r=m(r,n,o,i,t[s+13],4,681279174),i=m(i,r,n,o,t[s+0],11,-358537222),o=m(o,i,r,n,t[s+3],16,-722521979),n=m(n,o,i,r,t[s+6],23,76029189),r=m(r,n,o,i,t[s+9],4,-640364487),i=m(i,r,n,o,t[s+12],11,-421815835),o=m(o,i,r,n,t[s+15],16,530742520),r=y(r,n=m(n,o,i,r,t[s+2],23,-995338651),o,i,t[s+0],6,-198630844),i=y(i,r,n,o,t[s+7],10,1126891415),o=y(o,i,r,n,t[s+14],15,-1416354905),n=y(n,o,i,r,t[s+5],21,-57434055),r=y(r,n,o,i,t[s+12],6,1700485571),i=y(i,r,n,o,t[s+3],10,-1894986606),o=y(o,i,r,n,t[s+10],15,-1051523),n=y(n,o,i,r,t[s+1],21,-2054922799),r=y(r,n,o,i,t[s+8],6,1873313359),i=y(i,r,n,o,t[s+15],10,-30611744),o=y(o,i,r,n,t[s+6],15,-1560198380),n=y(n,o,i,r,t[s+13],21,1309151649),r=y(r,n,o,i,t[s+4],6,-145523070),i=y(i,r,n,o,t[s+11],10,-1120210379),o=y(o,i,r,n,t[s+2],15,718787259),n=y(n,o,i,r,t[s+9],21,-343485551),r=w(r,a),n=w(n,l),o=w(o,u),i=w(i,c)}return Array(r,n,o,i)}function p(t,e,r,n,o,i){return w((e=w(w(e,t),w(n,i)))<<o|e>>>32-o,r)}function d(t,e,r,n,o,i,s){return p(e&r|~e&n,t,e,o,i,s)}function g(t,e,r,n,o,i,s){return p(e&n|r&~n,t,e,o,i,s)}function m(t,e,r,n,o,i,s){return p(e^r^n,t,e,o,i,s)}function y(t,e,r,n,o,i,s){return p(r^(e|~n),t,e,o,i,s)}function w(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}e.exports=function(t){return f.hash(t,h,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":4,buffer:3,lYpoI2:11}],7:[function(t,e,r){(function(t,r,n,o,i,s,a,l,u){e.exports=function(t){for(var e,r=new Array(t),n=0;n<t;n++)!(3&n)&&(e=4294967296*Math.random()),r[n]=e>>>((3&n)<<3)&255;return 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/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(t,e,r){(function(r,n,o,i,s,a,l,u,c){var f=t("./helpers");function h(t,e){t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var r,n,o,i=Array(80),s=1732584193,a=-271733879,l=-1732584194,u=271733878,c=-1009589776,f=0;f<t.length;f+=16){for(var h=s,g=a,m=l,y=u,w=c,b=0;b<80;b++){i[b]=b<16?t[f+b]:d(i[b-3]^i[b-8]^i[b-14]^i[b-16],1);var v=p(p(d(s,5),(v=a,n=l,o=u,(r=b)<20?v&n|~v&o:!(r<40)&&r<60?v&n|v&o|n&o:v^n^o)),p(p(c,i[b]),(r=b)<20?1518500249:r<40?1859775393:r<60?-1894007588:-899497514));c=u,u=l,l=d(a,30),a=s,s=v}s=p(s,h),a=p(a,g),l=p(l,m),u=p(u,y),c=p(c,w)}return Array(s,a,l,u,c)}function p(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function d(t,e){return t<<e|t>>>32-e}e.exports=function(t){return f.hash(t,h,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":4,buffer:3,lYpoI2:11}],9:[function(t,e,r){(function(r,n,o,i,s,a,l,u,c){function f(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function h(t,e){var r,n=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),o=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),i=new Array(64);t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var s,a,l=0;l<t.length;l+=16){for(var u=o[0],c=o[1],h=o[2],p=o[3],m=o[4],y=o[5],w=o[6],b=o[7],v=0;v<64;v++)i[v]=v<16?t[v+l]:f(f(f((a=i[v-2],d(a,17)^d(a,19)^g(a,10)),i[v-7]),(a=i[v-15],d(a,7)^d(a,18)^g(a,3))),i[v-16]),r=f(f(f(f(b,d(a=m,6)^d(a,11)^d(a,25)),m&y^~m&w),n[v]),i[v]),s=f(d(s=u,2)^d(s,13)^d(s,22),u&c^u&h^c&h),b=w,w=y,y=m,m=f(p,r),p=h,h=c,c=u,u=f(r,s);o[0]=f(u,o[0]),o[1]=f(c,o[1]),o[2]=f(h,o[2]),o[3]=f(p,o[3]),o[4]=f(m,o[4]),o[5]=f(y,o[5]),o[6]=f(w,o[6]),o[7]=f(b,o[7])}return o}var p=t("./helpers"),d=function(t,e){return t>>>e|t<<32-e},g=function(t,e){return t>>>e};e.exports=function(t){return p.hash(t,h,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":4,buffer:3,lYpoI2:11}],10:[function(t,e,r){(function(t,e,n,o,i,s,a,l,u){r.read=function(t,e,r,n,o){var i,s,a=8*o-n-1,l=(1<<a)-1,u=l>>1,c=-7,f=r?o-1:0,h=r?-1:1;for(o=t[e+f],f+=h,i=o&(1<<-c)-1,o>>=-c,c+=a;0<c;i=256*i+t[e+f],f+=h,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=n;0<c;s=256*s+t[e+f],f+=h,c-=8);if(0===i)i=1-u;else{if(i===l)return s?NaN:1/0*(o?-1:1);s+=Math.pow(2,n),i-=u}return(o?-1:1)*s*Math.pow(2,i-n)},r.write=function(t,e,r,n,o,i){var s,a,l=8*i-o-1,u=(1<<l)-1,c=u>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,p=n?1:-1;for(i=e<0||0===e&&1/e<0?1:0,e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(n=Math.pow(2,-s))<1&&(s--,n*=2),2<=(e+=1<=s+c?f/n:f*Math.pow(2,1-c))*n&&(s++,n/=2),u<=s+c?(a=0,s=u):1<=s+c?(a=(e*n-1)*Math.pow(2,o),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,o),s=0));8<=o;t[r+h]=255&a,h+=p,a/=256,o-=8);for(s=s<<o|a,l+=o;0<l;t[r+h]=255&s,h+=p,s/=256,l-=8);t[r+h-p]|=128*i}}).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/ieee754/index.js","/node_modules/gulp-browserify/node_modules/ieee754")},{buffer:3,lYpoI2:11}],11:[function(t,e,r){(function(t,r,n,o,i,s,a,l,u){var c,f,h;function p(){}(t=e.exports={}).nextTick=(f="undefined"!=typeof window&&window.setImmediate,h="undefined"!=typeof window&&window.postMessage&&window.addEventListener,f?function(t){return window.setImmediate(t)}:h?(c=[],window.addEventListener("message",(function(t){var e=t.source;e!==window&&null!==e||"process-tick"!==t.data||(t.stopPropagation(),0<c.length&&c.shift()())}),!0),function(t){c.push(t),window.postMessage("process-tick","*")}):function(t){setTimeout(t,0)}),t.title="browser",t.browser=!0,t.env={},t.argv=[],t.on=p,t.addListener=p,t.once=p,t.off=p,t.removeListener=p,t.removeAllListeners=p,t.emit=p,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:3,lYpoI2:11}]},{},[1])(1)),N.exports),D=C(P),R={exports:{}};var O,U=function(){if(M)return R.exports;M=1;var t,e="object"==typeof Reflect?Reflect:null,r=e&&"function"==typeof e.apply?e.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};t=e&&"function"==typeof e.ownKeys?e.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var n=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}R.exports=o,R.exports.once=function(t,e){return new Promise((function(r,n){function o(r){t.removeListener(e,i),n(r)}function i(){"function"==typeof t.removeListener&&t.removeListener("error",o),r([].slice.call(arguments))}d(t,e,i,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&d(t,"error",e,r)}(t,o,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var i=10;function s(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function a(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function l(t,e,r,n){var o,i,l,u;if(s(r),void 0===(i=t._events)?(i=t._events=Object.create(null),t._eventsCount=0):(void 0!==i.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),i=t._events),l=i[e]),void 0===l)l=i[e]=r,++t._eventsCount;else if("function"==typeof l?l=i[e]=n?[r,l]:[l,r]:n?l.unshift(r):l.push(r),(o=a(t))>0&&l.length>o&&!l.warned){l.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=l.length,u=c,console&&console.warn&&console.warn(u)}return t}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},o=u.bind(n);return o.listener=r,n.wrapFn=o,o}function f(t,e,r){var n=t._events;if(void 0===n)return[];var o=n[e];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(o):p(o,o.length)}function h(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function d(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function o(i){n.once&&t.removeEventListener(e,o),r(i)}))}}return Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(t){if("number"!=typeof t||t<0||n(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");i=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||n(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return a(this)},o.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var o="error"===t,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=i[t];if(void 0===l)return!1;if("function"==typeof l)r(l,this,e);else{var u=l.length,c=p(l,u);for(n=0;n<u;++n)r(c[n],this,e)}return!0},o.prototype.addListener=function(t,e){return l(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return l(this,t,e,!0)},o.prototype.once=function(t,e){return s(e),this.on(t,c(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return s(e),this.prependListener(t,c(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,n,o,i,a;if(s(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===e||r[i].listener===e){a=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,o),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,a||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return f(this,t,!0)},o.prototype.rawListeners=function(t){return f(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):h.call(t,e)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]},R.exports}(),W={},F={};var H,j,V={};function $(){return H||(H=1,V.read=function(t,e,r,n,o){var i,s,a=8*o-n-1,l=(1<<a)-1,u=l>>1,c=-7,f=r?o-1:0,h=r?-1:1,p=t[e+f];for(f+=h,i=p&(1<<-c)-1,p>>=-c,c+=a;c>0;i=256*i+t[e+f],f+=h,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=n;c>0;s=256*s+t[e+f],f+=h,c-=8);if(0===i)i=1-u;else{if(i===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=u}return(p?-1:1)*s*Math.pow(2,i-n)},V.write=function(t,e,r,n,o,i){var s,a,l,u=8*i-o-1,c=(1<<u)-1,f=c>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),(e+=s+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(s++,l/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(e*l-1)*Math.pow(2,o),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;t[r+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,u+=o;u>0;t[r+p]=255&s,p+=d,s/=256,u-=8);t[r+p-d]|=128*g}),V}var K=(j||(j=1,function(t){var e=function(){if(O)return F;O=1,F.byteLength=function(t){var e=i(t),r=e[0],n=e[1];return 3*(r+n)/4-n},F.toByteArray=function(t){var n,o,s=i(t),a=s[0],l=s[1],u=new r(function(t,e,r){return 3*(e+r)/4-r}(0,a,l)),c=0,f=l>0?a-4:a;for(o=0;o<f;o+=4)n=e[t.charCodeAt(o)]<<18|e[t.charCodeAt(o+1)]<<12|e[t.charCodeAt(o+2)]<<6|e[t.charCodeAt(o+3)],u[c++]=n>>16&255,u[c++]=n>>8&255,u[c++]=255&n;return 2===l&&(n=e[t.charCodeAt(o)]<<2|e[t.charCodeAt(o+1)]>>4,u[c++]=255&n),1===l&&(n=e[t.charCodeAt(o)]<<10|e[t.charCodeAt(o+1)]<<4|e[t.charCodeAt(o+2)]>>2,u[c++]=n>>8&255,u[c++]=255&n),u},F.fromByteArray=function(e){for(var r,n=e.length,o=n%3,i=[],a=16383,l=0,u=n-o;l<u;l+=a)i.push(s(e,l,l+a>u?u:l+a));return 1===o?(r=e[n-1],i.push(t[r>>2]+t[r<<4&63]+"==")):2===o&&(r=(e[n-2]<<8)+e[n-1],i.push(t[r>>10]+t[r>>4&63]+t[r<<2&63]+"=")),i.join("")};for(var t=[],e=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)t[o]=n[o],e[n.charCodeAt(o)]=o;function i(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function s(e,r,n){for(var o,i,s=[],a=r;a<n;a+=3)o=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(t[(i=o)>>18&63]+t[i>>12&63]+t[i>>6&63]+t[63&i]);return s.join("")}return e["-".charCodeAt(0)]=62,e["_".charCodeAt(0)]=63,F}(),r=$();t.Buffer=i,t.SlowBuffer=function(t){return+t!=t&&(t=0),i.alloc(+t)},t.INSPECT_MAX_BYTES=50;var n=2147483647;function o(t){if(t>n)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return e.__proto__=i.prototype,e}function i(t,e,r){if("number"==typeof t){if("string"==ty