skynet-heartbeat
Version:
Skynet Gateblu and Mobiblu Heartbeat plugin
2 lines • 108 kB
JavaScript
!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.skynetPlugins||(t.skynetPlugins={})).skynetHeartbeat=e()}}(function(){var e;return function t(e,n,r){function i(s,a){if(!n[s]){if(!e[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 c=n[s]={exports:{}};e[s][0].call(c.exports,function(t){var n=e[s][1][t];return i(n?n:t)},c,c.exports,t,e,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){(function(){"use strict";function n(t,n,i,o){function s(e){a.messenger.data({device:a.name,type:"heartRate",heartRate:e}),u(null,"Logged Heartbeat : "+e)}var a=this;n||(n={}),"string"==typeof o?a.name=o:o?(a.name=o.name,a.uuid=o.uuid):(a.name=e("./package.json").name,a.uuid="ega98481-3d45-11fO-8982-6b4asd5f4sska"),a.messenger=t,a.options=n||{},a.api=i,a.mobile=!1,a.api&&"function"==typeof a.api.logActivity&&(a.mobile=!0);var u=function(e,t){var n={type:a.name};e&&(n.error=e),t&&(n.html=t),a.mobile?a.api.logActivity(n):console.log("logIt (HeartRate): "+JSON.stringify(n))};return n.addressKey||(n.addressKey="heart_"+a.uuid),r.init(n,{logIt:u,logHeartrate:s}),console.log("Initialized HeartRate Plugin"),a}var r=e("./heartrate");t.exports={Plugin:n}}).call(this,e("IrXUsu"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_4afdaa10.js","/")},{"./heartrate":2,"./package.json":29,IrXUsu:10,buffer:4}],2:[function(e,t){(function(){"use strict";function n(e){s(15e3,l,f,function(t){console.log("finished scanning",t),t=t.map(function(e){var t=a.clone(e);return delete t._noble,t}),e()})}function r(e){a.each(f,function(t){function n(e){if(e instanceof Uint8Array){var t=e;if(0===t.length)return void console.log("Subscription result had zero length data");var n,r=t[0];if(1===(1&r)){var i=t.buffer.slice(1,3),o=new Uint16Array(i)[0];n=o}else{var s=t.buffer.slice(1,2),a=new Uint8Array(s)[0];n=a}return n}return e.readUInt8(1)}function r(t){if(t){var r={heartRate:n(t)};console.log("heart rate",r.heartRate),e(r)}else e({error:"Unable to read to heart rate"})}function i(t){t.on("read",r),t.notify(!0,function(t){console.log("Heart rate level notification"),t&&e({error:"Unable to subscribe to heart rate"})})}function o(t){t.discoverCharacteristics([d],function(t,n){if(t)console.log("Error discovering characteristics",t),e({error:t});else{var r=n[0];console.log("Discovered heart rate characteristic for read",r.uuid),i(r)}})}function s(){t.discoverServices(l,function(t,n){var r=n[0];if(!r){var i="No heart rate service found";return console.log("Discover services error",n),e({error:i})}console.log("Discovered heart rate service for read",r.uuid),o(r)})}function a(){s()}function u(){t.connect(a)}"connected"===t.state?(console.log("Already connected to peripheral"),a()):(console.log("Connecting to peripheral"),u())})}var i,o,s=e("./scan"),a=e("lodash"),u={},c="180d",l=[c],f=[],d="2a37";u.init=function(e,t){i=e,o=t,n(function(){r(function(e){e||(e={}),e.error?(console.log("Error in Heartbeat Plugin: "+JSON.stringify(e.error)),o.logIt(e.error)):o.logHeartrate(e.heartRate)})})},t.exports=u}).call(this,e("IrXUsu"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/heartrate.js","/")},{"./scan":30,IrXUsu:10,buffer:4,lodash:13}],3:[function(e){(function(){}).call(this,e("IrXUsu"),"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/browserify/node_modules/browser-resolve/empty.js","/node_modules/gulp-browserify/node_modules/browserify/node_modules/browser-resolve")},{IrXUsu:10,buffer:4}],4:[function(e,t,n){(function(t,r,i){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=k(e);e.length%4!==0;)e+="=";var o;if("number"===r)o=B(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=B(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(L(e))for(a=0;o>a;a++)s[a]=i.isBuffer(e)?e.readUInt8(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 o(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;z(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);z(!isNaN(u),"Invalid hex string"),e[n+a]=u}return i._charsWritten=2*a,a}function s(e,t,n,r){var o=i._charsWritten=X(N(t),e,n,r);return o}function a(e,t,n,r){var o=i._charsWritten=X(O(t),e,n,r);return o}function u(e,t,n,r){return a(e,t,n,r)}function c(e,t,n,r){var o=i._charsWritten=X(M(t),e,n,r);return o}function l(e,t,n,r){var o=i._charsWritten=X(T(t),e,n,r);return o}function f(e,t,n){return V.fromByteArray(0===t&&n===e.length?e:e.slice(t,n))}function d(e,t,n){var r="",i="";n=Math.min(e.length,n);for(var o=t;n>o;o++)e[o]<=127?(r+=P(i)+String.fromCharCode(e[o]),i=""):i+="%"+e[o].toString(16);return r+P(i)}function p(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 h(e,t,n){return p(e,t,n)}function g(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+=R(e[o]);return i}function m(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 v(e,t,n,r){r||(z("boolean"==typeof n,"missing or invalid endian"),z(void 0!==t&&null!==t,"missing offset"),z(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 y(e,t,n,r){r||(z("boolean"==typeof n,"missing or invalid endian"),z(void 0!==t&&null!==t,"missing offset"),z(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||(z("boolean"==typeof n,"missing or invalid endian"),z(void 0!==t&&null!==t,"missing offset"),z(t+1<e.length,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o=v(e,t,n,!0),s=32768&o;return s?-1*(65535-o+1):o}}function _(e,t,n,r){r||(z("boolean"==typeof n,"missing or invalid endian"),z(void 0!==t&&null!==t,"missing offset"),z(t+3<e.length,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o=y(e,t,n,!0),s=2147483648&o;return s?-1*(4294967295-o+1):o}}function w(e,t,n,r){return r||(z("boolean"==typeof n,"missing or invalid endian"),z(t+3<e.length,"Trying to read beyond buffer length")),J.read(e,t,n,23,4)}function U(e,t,n,r){return r||(z("boolean"==typeof n,"missing or invalid endian"),z(t+7<e.length,"Trying to read beyond buffer length")),J.read(e,t,n,52,8)}function S(e,t,n,r,i){i||(z(void 0!==t&&null!==t,"missing value"),z("boolean"==typeof r,"missing or invalid endian"),z(void 0!==n&&null!==n,"missing offset"),z(n+1<e.length,"trying to write beyond buffer length"),H(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 C(e,t,n,r,i){i||(z(void 0!==t&&null!==t,"missing value"),z("boolean"==typeof r,"missing or invalid endian"),z(void 0!==n&&null!==n,"missing offset"),z(n+3<e.length,"trying to write beyond buffer length"),H(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 I(e,t,n,r,i){i||(z(void 0!==t&&null!==t,"missing value"),z("boolean"==typeof r,"missing or invalid endian"),z(void 0!==n&&null!==n,"missing offset"),z(n+1<e.length,"Trying to write beyond buffer length"),F(t,32767,-32768));var o=e.length;n>=o||(t>=0?S(e,t,n,r,i):S(e,65535+t+1,n,r,i))}function E(e,t,n,r,i){i||(z(void 0!==t&&null!==t,"missing value"),z("boolean"==typeof r,"missing or invalid endian"),z(void 0!==n&&null!==n,"missing offset"),z(n+3<e.length,"Trying to write beyond buffer length"),F(t,2147483647,-2147483648));var o=e.length;n>=o||(t>=0?C(e,t,n,r,i):C(e,4294967295+t+1,n,r,i))}function x(e,t,n,r,i){i||(z(void 0!==t&&null!==t,"missing value"),z("boolean"==typeof r,"missing or invalid endian"),z(void 0!==n&&null!==n,"missing offset"),z(n+3<e.length,"Trying to write beyond buffer length"),W(t,3.4028234663852886e38,-3.4028234663852886e38));var o=e.length;n>=o||J.write(e,t,n,r,23,4)}function D(e,t,n,r,i){i||(z(void 0!==t&&null!==t,"missing value"),z("boolean"==typeof r,"missing or invalid endian"),z(void 0!==n&&null!==n,"missing offset"),z(n+7<e.length,"Trying to write beyond buffer length"),W(t,1.7976931348623157e308,-1.7976931348623157e308));var o=e.length;n>=o||J.write(e,t,n,r,52,8)}function k(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function j(e,t,n){return"number"!=typeof e?n:(e=~~e,e>=t?t:e>=0?e:(e+=t,e>=0?e:0))}function B(e){return e=~~Math.ceil(+e),0>e?0:e}function A(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function L(e){return A(e)||i.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function R(e){return 16>e?"0"+e.toString(16):e.toString(16)}function N(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 O(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}function T(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 M(e){return V.toByteArray(e)}function X(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 P(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}function H(e,t){z("number"==typeof e,"cannot write a non-number as a number"),z(e>=0,"specified a negative value for writing an unsigned value"),z(t>=e,"value is larger than maximum value for type"),z(Math.floor(e)===e,"value has a fractional component")}function F(e,t,n){z("number"==typeof e,"cannot write a non-number as a number"),z(t>=e,"value larger than maximum allowed value"),z(e>=n,"value smaller than minimum allowed value"),z(Math.floor(e)===e,"value has a fractional component")}function W(e,t,n){z("number"==typeof e,"cannot write a non-number as a number"),z(t>=e,"value larger than maximum allowed value"),z(e>=n,"value smaller than minimum allowed value")}function z(e,t){if(!e)throw new Error(t||"Failed assertion")}var V=e("base64-js"),J=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=N(e).length;break;case"ascii":case"binary":case"raw":n=e.length;break;case"base64":n=M(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(z(A(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 f=this.length-t;n?(n=Number(n),n>f&&(n=f)):n=f,r=String(r||"utf8").toLowerCase();var d;switch(r){case"hex":d=o(this,e,t,n);break;case"utf8":case"utf-8":d=s(this,e,t,n);break;case"ascii":d=a(this,e,t,n);break;case"binary":d=u(this,e,t,n);break;case"base64":d=c(this,e,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":d=l(this,e,t,n);break;default:throw new Error("Unknown encoding")}return d},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=g(r,t,n);break;case"utf8":case"utf-8":i=d(r,t,n);break;case"ascii":i=p(r,t,n);break;case"binary":i=h(r,t,n);break;case"base64":i=f(r,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":i=m(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){z(r>=n,"sourceEnd < sourceStart"),z(t>=0&&t<e.length,"targetStart out of bounds"),z(n>=0&&n<o.length,"sourceStart out of bounds"),z(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=j(e,n,0),t=j(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||(z(void 0!==e&&null!==e,"missing offset"),z(e<this.length,"Trying to read beyond buffer length")),e>=this.length?void 0:this[e]},i.prototype.readUInt16LE=function(e,t){return v(this,e,!0,t)},i.prototype.readUInt16BE=function(e,t){return v(this,e,!1,t)},i.prototype.readUInt32LE=function(e,t){return y(this,e,!0,t)},i.prototype.readUInt32BE=function(e,t){return y(this,e,!1,t)},i.prototype.readInt8=function(e,t){if(t||(z(void 0!==e&&null!==e,"missing offset"),z(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 _(this,e,!0,t)},i.prototype.readInt32BE=function(e,t){return _(this,e,!1,t)},i.prototype.readFloatLE=function(e,t){return w(this,e,!0,t)},i.prototype.readFloatBE=function(e,t){return w(this,e,!1,t)},i.prototype.readDoubleLE=function(e,t){return U(this,e,!0,t)},i.prototype.readDoubleBE=function(e,t){return U(this,e,!1,t)},i.prototype.writeUInt8=function(e,t,n){n||(z(void 0!==e&&null!==e,"missing value"),z(void 0!==t&&null!==t,"missing offset"),z(t<this.length,"trying to write beyond buffer length"),H(e,255)),t>=this.length||(this[t]=e)},i.prototype.writeUInt16LE=function(e,t,n){S(this,e,t,!0,n)},i.prototype.writeUInt16BE=function(e,t,n){S(this,e,t,!1,n)},i.prototype.writeUInt32LE=function(e,t,n){C(this,e,t,!0,n)},i.prototype.writeUInt32BE=function(e,t,n){C(this,e,t,!1,n)},i.prototype.writeInt8=function(e,t,n){n||(z(void 0!==e&&null!==e,"missing value"),z(void 0!==t&&null!==t,"missing offset"),z(t<this.length,"Trying to write beyond buffer length"),F(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){I(this,e,t,!0,n)},i.prototype.writeInt16BE=function(e,t,n){I(this,e,t,!1,n)},i.prototype.writeInt32LE=function(e,t,n){E(this,e,t,!0,n)},i.prototype.writeInt32BE=function(e,t,n){E(this,e,t,!1,n)},i.prototype.writeFloatLE=function(e,t,n){x(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){x(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){D(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){D(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)),z("number"==typeof e&&!isNaN(e),"value is not a number"),z(n>=t,"end < start"),n!==t&&0!==this.length){z(t>=0&&t<this.length,"start out of bounds"),z(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]=R(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 $=i.prototype;i._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=$.get,e.set=$.set,e.write=$.write,e.toString=$.toString,e.toLocaleString=$.toString,e.toJSON=$.toJSON,e.copy=$.copy,e.slice=$.slice,e.readUInt8=$.readUInt8,e.readUInt16LE=$.readUInt16LE,e.readUInt16BE=$.readUInt16BE,e.readUInt32LE=$.readUInt32LE,e.readUInt32BE=$.readUInt32BE,e.readInt8=$.readInt8,e.readInt16LE=$.readInt16LE,e.readInt16BE=$.readInt16BE,e.readInt32LE=$.readInt32LE,e.readInt32BE=$.readInt32BE,e.readFloatLE=$.readFloatLE,e.readFloatBE=$.readFloatBE,e.readDoubleLE=$.readDoubleLE,e.readDoubleBE=$.readDoubleBE,e.writeUInt8=$.writeUInt8,e.writeUInt16LE=$.writeUInt16LE,e.writeUInt16BE=$.writeUInt16BE,e.writeUInt32LE=$.writeUInt32LE,e.writeUInt32BE=$.writeUInt32BE,e.writeInt8=$.writeInt8,e.writeInt16LE=$.writeInt16LE,e.writeInt16BE=$.writeInt16BE,e.writeInt32LE=$.writeInt32LE,e.writeInt32BE=$.writeInt32BE,e.writeFloatLE=$.writeFloatLE,e.writeFloatBE=$.writeFloatBE,e.writeDoubleLE=$.writeDoubleLE,e.writeDoubleBE=$.writeDoubleBE,e.fill=$.fill,e.inspect=$.inspect,e.toArrayBuffer=$.toArrayBuffer,e}}).call(this,e("IrXUsu"),"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/browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/browserify/node_modules/buffer")},{IrXUsu:10,"base64-js":5,buffer:4,ieee754:6}],5:[function(e,t,n){(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function n(e){var t=e.charCodeAt(0);return t===s?62:t===a?63:u>t?-1:u+10>t?t-u+26+26:l+26>t?t-l:c+26>t?t-c+26:void 0}function r(e){function t(e){c[f++]=e}var r,i,s,a,u,c;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,c=new o(3*e.length/4-u),s=u>0?e.length-4:e.length;var f=0;for(r=0,i=0;s>r;r+=4,i+=3)a=n(e.charAt(r))<<18|n(e.charAt(r+1))<<12|n(e.charAt(r+2))<<6|n(e.charAt(r+3)),t((16711680&a)>>16),t((65280&a)>>8),t(255&a);return 2===u?(a=n(e.charAt(r))<<2|n(e.charAt(r+1))>>4,t(255&a)):1===u&&(a=n(e.charAt(r))<<10|n(e.charAt(r+1))<<4|n(e.charAt(r+2))>>2,t(a>>8&255),t(255&a)),c}function i(t){function n(t){return e.charAt(t)}function r(e){return n(e>>18&63)+n(e>>12&63)+n(e>>6&63)+n(63&e)}var i,o,s,a=t.length%3,u="";for(i=0,s=t.length-a;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],u+=r(o);switch(a){case 1:o=t[t.length-1],u+=n(o>>2),u+=n(o<<4&63),u+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],u+=n(o>>10),u+=n(o>>4&63),u+=n(o<<2&63),u+="="}return u}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),u="0".charCodeAt(0),c="a".charCodeAt(0),l="A".charCodeAt(0);t.toByteArray=r,t.fromByteArray=i}("undefined"==typeof n?this.base64js={}:n)}).call(this,e("IrXUsu"),"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/browserify/node_modules/buffer/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/browserify/node_modules/buffer/node_modules/base64-js/lib")},{IrXUsu:10,buffer:4}],6:[function(e,t,n){(function(){n.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,l=-7,f=n?i-1:0,d=n?-1:1,p=e[t+f];for(f+=d,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=d,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+e[t+f],f+=d,l-=8);if(0===o)o=1-c;else{if(o===u)return s?0/0:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,h=r?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||1/0===t?(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+f>=1?d/u:d*Math.pow(2,1-f),t*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[n+p]=255&a,p+=h,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[n+p]=255&s,p+=h,s/=256,c-=8);e[n+p-h]|=128*g}}).call(this,e("IrXUsu"),"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/browserify/node_modules/buffer/node_modules/ieee754/index.js","/node_modules/gulp-browserify/node_modules/browserify/node_modules/buffer/node_modules/ieee754")},{IrXUsu:10,buffer:4}],7:[function(e,t){(function(){function e(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function r(e){return"number"==typeof e}function i(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}t.exports=e,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._maxListeners=void 0,e.defaultMaxListeners=10,e.prototype.setMaxListeners=function(e){if(!r(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},e.prototype.emit=function(e){var t,r,s,a,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[e],o(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(s=arguments.length,a=new Array(s-1),u=1;s>u;u++)a[u-1]=arguments[u];r.apply(this,a)}else if(i(r)){for(s=arguments.length,a=new Array(s-1),u=1;s>u;u++)a[u-1]=arguments[u];for(c=r.slice(),s=c.length,u=0;s>u;u++)c[u].apply(this,a)}return!0},e.prototype.addListener=function(t,r){var s;if(!n(r))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(r.listener)?r.listener:r),this._events[t]?i(this._events[t])?this._events[t].push(r):this._events[t]=[this._events[t],r]:this._events[t]=r,i(this._events[t])&&!this._events[t].warned){var s;s=o(this._maxListeners)?e.defaultMaxListeners:this._maxListeners,s&&s>0&&this._events[t].length>s&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},e.prototype.on=e.prototype.addListener,e.prototype.once=function(e,t){function r(){this.removeListener(e,r),i||(i=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var i=!1;return r.listener=t,this.on(e,r),this},e.prototype.removeListener=function(e,t){var r,o,s,a;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],s=r.length,o=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(r)){for(a=s;a-->0;)if(r[a]===t||r[a].listener&&r[a].listener===t){o=a;break}if(0>o)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},e.prototype.removeAllListeners=function(e){var t,r;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(r=this._events[e],n(r))this.removeListener(e,r);else for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},e.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},e.listenerCount=function(e,t){var r;return r=e._events&&e._events[t]?n(e._events[t])?1:e._events[t].length:0}}).call(this,e("IrXUsu"),"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/browserify/node_modules/events/events.js","/node_modules/gulp-browserify/node_modules/browserify/node_modules/events")},{IrXUsu:10,buffer:4}],8:[function(e,t){(function(){t.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}).call(this,e("IrXUsu"),"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/browserify/node_modules/inherits/inherits_browser.js","/node_modules/gulp-browserify/node_modules/browserify/node_modules/inherits")},{IrXUsu:10,buffer:4}],9:[function(e,t,n){(function(){n.endianness=function(){return"LE"},n.hostname=function(){return"undefined"!=typeof location?location.hostname:""},n.loadavg=function(){return[]},n.uptime=function(){return 0},n.freemem=function(){return Number.MAX_VALUE},n.totalmem=function(){return Number.MAX_VALUE},n.cpus=function(){return[]},n.type=function(){return"Browser"},n.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},n.networkInterfaces=n.getNetworkInterfaces=function(){return{}},n.arch=function(){return"javascript"},n.platform=function(){return"browser"},n.tmpdir=n.tmpDir=function(){return"/tmp"},n.EOL="\n"}).call(this,e("IrXUsu"),"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/browserify/node_modules/os-browserify/browser.js","/node_modules/gulp-browserify/node_modules/browserify/node_modules/os-browserify")},{IrXUsu:10,buffer:4}],10:[function(e,t){(function(e){function n(){}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=n,e.addListener=n,e.once=n,e.off=n,e.removeListener=n,e.removeAllListeners=n,e.emit=n,e.binding=function(){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(){throw new Error("process.chdir is not supported")}}).call(this,e("IrXUsu"),"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/browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/browserify/node_modules/process")},{IrXUsu:10,buffer:4}],11:[function(e,t){(function(){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}}).call(this,e("IrXUsu"),"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/browserify/node_modules/util/support/isBufferBrowser.js","/node_modules/gulp-browserify/node_modules/browserify/node_modules/util/support")},{IrXUsu:10,buffer:4}],12:[function(e,t,n){(function(t,r){function i(e,t){var r={seen:[],stylize:s};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),g(t)?r.showHidden=t:t&&n._extend(r,t),w(r.showHidden)&&(r.showHidden=!1),w(r.depth)&&(r.depth=2),w(r.colors)&&(r.colors=!1),w(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function s(e){return e}function a(e){var t={};return e.forEach(function(e){t[e]=!0}),t}function u(e,t,r){if(e.customInspect&&t&&E(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return b(i)||(i=u(e,i,r)),i}var o=c(e,t);if(o)return o;var s=Object.keys(t),g=a(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),I(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(t);if(0===s.length){if(E(t)){var m=t.name?": "+t.name:"";return e.stylize("[Function"+m+"]","special")}if(U(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(C(t))return e.stylize(Date.prototype.toString.call(t),"date");if(I(t))return l(t)}var v="",y=!1,_=["{","}"];if(h(t)&&(y=!0,_=["[","]"]),E(t)){var w=t.name?": "+t.name:"";v=" [Function"+w+"]"}if(U(t)&&(v=" "+RegExp.prototype.toString.call(t)),C(t)&&(v=" "+Date.prototype.toUTCString.call(t)),I(t)&&(v=" "+l(t)),0===s.length&&(!y||0==t.length))return _[0]+v+_[1];if(0>r)return U(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var S;return S=y?f(e,t,r,g,s):s.map(function(n){return d(e,t,r,g,n,y)}),e.seen.pop(),p(S,v,_)}function c(e,t){if(w(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,i){for(var o=[],s=0,a=t.length;a>s;++s)o.push(B(t,String(s))?d(e,t,n,r,String(s),!0):"");return i.forEach(function(i){i.match(/^\d+$/)||o.push(d(e,t,n,r,i,!0))}),o}function d(e,t,n,r,i,o){var s,a,c;if(c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},c.get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),B(r,i)||(s="["+i+"]"),a||(e.seen.indexOf(c.value)<0?(a=m(n)?u(e,c.value,null):u(e,c.value,n-1),a.indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e
}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n"))):a=e.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function p(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function h(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function m(e){return null===e}function v(e){return null==e}function y(e){return"number"==typeof e}function b(e){return"string"==typeof e}function _(e){return"symbol"==typeof e}function w(e){return void 0===e}function U(e){return S(e)&&"[object RegExp]"===D(e)}function S(e){return"object"==typeof e&&null!==e}function C(e){return S(e)&&"[object Date]"===D(e)}function I(e){return S(e)&&("[object Error]"===D(e)||e instanceof Error)}function E(e){return"function"==typeof e}function x(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function D(e){return Object.prototype.toString.call(e)}function k(e){return 10>e?"0"+e.toString(10):e.toString(10)}function j(){var e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":");return[e.getDate(),N[e.getMonth()],t].join(" ")}function B(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var A=/%[sdj%]/g;n.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}for(var n=1,r=arguments,o=r.length,s=String(e).replace(A,function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}}),a=r[n];o>n;a=r[++n])s+=m(a)||!S(a)?" "+a:" "+i(a);return s},n.deprecate=function(e,i){function o(){if(!s){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),s=!0}return e.apply(this,arguments)}if(w(r.process))return function(){return n.deprecate(e,i).apply(this,arguments)};if(t.noDeprecation===!0)return e;var s=!1;return o};var L,R={};n.debuglog=function(e){if(w(L)&&(L=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!R[e])if(new RegExp("\\b"+e+"\\b","i").test(L)){var r=t.pid;R[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else R[e]=function(){};return R[e]},n.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=h,n.isBoolean=g,n.isNull=m,n.isNullOrUndefined=v,n.isNumber=y,n.isString=b,n.isSymbol=_,n.isUndefined=w,n.isRegExp=U,n.isObject=S,n.isDate=C,n.isError=I,n.isFunction=E,n.isPrimitive=x,n.isBuffer=e("./support/isBuffer");var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];n.log=function(){console.log("%s - %s",j(),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!S(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e("IrXUsu"),"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/browserify/node_modules/util/util.js","/node_modules/gulp-browserify/node_modules/browserify/node_modules/util")},{"./support/isBuffer":11,IrXUsu:10,buffer:4,inherits:8}],13:[function(t,n,r){(function(t,i){(function(){function t(e,t,n){for(var r=(n||0)-1,i=e?e.length:0;++r<i;)if(e[r]===t)return r;return-1}function o(e,n){var r=typeof n;if(e=e.cache,"boolean"==r||null==n)return e[n]?0:-1;"number"!=r&&"string"!=r&&(r="object");var i="number"==r?n:w+n;return e=(e=e[r])&&e[i],"object"==r?e&&t(e,n)>-1?0:-1:e?0:-1}function s(e){var t=this.cache,n=typeof e;if("boolean"==n||null==e)t[e]=!0;else{"number"!=n&&"string"!=n&&(n="object");var r="number"==n?e:w+e,i=t[n]||(t[n]={});"object"==n?(i[r]||(i[r]=[])).push(e):i[r]=!0}}function a(e){return e.charCodeAt(0)}function u(e,t){for(var n=e.criteria,r=t.criteria,i=-1,o=n.length;++i<o;){var s=n[i],a=r[i];if(s!==a){if(s>a||"undefined"==typeof s)return 1;if(a>s||"undefined"==typeof a)return-1}}return e.index-t.index}function c(e){var t=-1,n=e.length,r=e[0],i=e[n/2|0],o=e[n-1];if(r&&"object"==typeof r&&i&&"object"==typeof i&&o&&"object"==typeof o)return!1;var a=d();a["false"]=a["null"]=a["true"]=a.undefined=!1;var u=d();for(u.array=e,u.cache=a,u.push=s;++t<n;)u.push(e[t]);return u}function l(e){return"\\"+Z[e]}function f(){return y.pop()||[]}function d(){return b.pop()||{array:null,cache:null,criteria:null,"false":!1,index:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,value:null}}function p(e){e.length=0,y.length<S&&y.push(e)}function h(e){var t=e.cache;t&&h(t),e.array=e.cache=e.criteria=e.object=e.number=e.string=e.value=null,b.length<S&&b.push(e)}function g(e,t,n){t||(t=0),"undefined"==typeof n&&(n=e?e.length:0);for(var r=-1,i=n-t||0,o=Array(0>i?0:i);++r<i;)o[r]=e[t+r];return o}function m(e){function n(e){return e&&"object"==typeof e&&!Yr(e)&&Rr.call(e,"__wrapped__")?e:new r(e)}function r(e,t){this.__chain__=!!t,this.__wrapped__=e}function i(e){function t(){if(r){var e=g(r);Nr.apply(e,arguments)}if(this instanceof t){var o=y(n.prototype),s=n.apply(o,e||arguments);return jt(s)?s:o}return n.apply(i,e||arguments)}var n=e[0],r=e[2],i=e[4];return Zr(t,e),t}function s(e,t,n,r,i){if(n){var o=n(e);if("undefined"!=typeof o)return o}var a=jt(e);if(!a)return e;var u=xr.call(e);if(!$[u])return e;var c=qr[u];switch(u){case P:case H:return new c(+e);case W:case J:return new c(e);case V:return o=c(e.source,k.exec(e)),o.lastIndex=e.lastIndex,o}var l=Yr(e);if(t){var d=!r;r||(r=f()),i||(i=f());for(var h=r.length;h--;)if(r[h]==e)return i[h];o=l?c(e.length):{}}else o=l?g(e):oi({},e);return l&&(Rr.call(e,"index")&&(o.index=e.index),Rr.call(e,"input")&&(o.input=e.input)),t?(r.push(e),i.push(o),(l?Kt:ui)(e,function(e,a){o[a]=s(e,t,n,r,i)}),d&&(p(r),p(i)),o):o}function y(e){return jt(e)?Pr(e):{}}function b(e,t,n){if("function"!=typeof e)return Yn;if("undefined"==typeof t||!("prototype"in e))return e;var r=e.__bindData__;if("undefined"==typeof r&&(Kr.funcNames&&(r=!e.name),r=r||!Kr.funcDecomp,!r)){var i=Ar.call(e);Kr.funcNames||(r=!j.test(i)),r||(r=R.test(i),Zr(e,r))}if(r===!1||r!==!0&&1&r[1])return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return Nn(e,t)}function S(e){function t(){var e=u?s:this;if(i){var p=g(i);Nr.apply(p,arguments)}if((o||l)&&(p||(p=g(arguments)),o&&Nr.apply(p,o),l&&p.length<a))return r|=16,S([n,f?r:-4&r,p,null,s,a]);if(p||(p=arguments),c&&(n=e[d]),this instanceof t){e=y(n.prototype);var h=n.apply(e,p);return jt(h)?h:e}return n.apply(e,p)}var n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],u=1&r,c=2&r,l=4&r,f=8&r,d=n;return Zr(t,e),t}function Z(e,n){var r=-1,i=ut(),s=e?e.length:0,a=s>=U&&i===t,u=[];if(a){var l=c(n);l?(i=o,n=l):a=!1}for(;++r<s;){var f=e[r];i(n,f)<0&&u.push(f)}return a&&h(n),u}function Q(e,t,n,r){for(var i=(r||0)-1,o=e?e.length:0,s=[];++i<o;){var a=e[i];if(a&&"object"==typeof a&&"number"==typeof a.length&&(Yr(a)||dt(a))){t||(a=Q(a,t,n));var u=-1,c=a.length,l=s.length;for(s.length+=c;++u<c;)s[l++]=a[u]}else n||s.push(a)}return s}function et(e,t,n,r,i,o){if(n){var s=n(e,t);if("undefined"!=typeof s)return!!s}if(e===t)return 0!==e||1/e==1/t;var a=typeof e,u=typeof t;if(!(e!==e||e&&K[a]||t&&K[u]))return!1;if(null==e||null==t)return e===t;var c=xr.call(e),l=xr.call(t);if(c==M&&(c=z),l==M&&(l=z),c!=l)return!1;switch(c){case P:case H:return+e==+t;case W:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case V:case J:return e==Ur(t)}var d=c==X;if(!d){var h=Rr.call(e,"__wrapped__"),g=Rr.call(t,"__wrapped__");if(h||g)return et(h?e.__wrapped__:e,g?t.__wrapped__:t,n,r,i,o);if(c!=z)return!1;var m=e.constructor,v=t.constructor;if(m!=v&&!(kt(m)&&m instanceof m&&kt(v)&&v instanceof v)&&"constructor"in e&&"constructor"in t)return!1}var y=!i;i||(i=f()),o||(o=f());for(var b=i.length;b--;)if(i[b]==e)return o[b]==t;var _=0;if(s=!0,i.push(e),o.push(t),d){if(b=e.length,_=t.length,s=_==b,s||r)for(;_--;){var w=b,U=t[_];if(r)for(;w--&&!(s=et(e[w],U,n,r,i,o)););else if(!(s=et(e[_],U,n,r,i,o)))break}}else ai(t,function(t,a,u){return Rr.call(u,a)?(_++,s=Rr.call(e,a)&&et(e[a],t,n,r,i,o)):void 0}),s&&!r&&ai(e,function(e,t,n){return Rr.call(n,t)?s=--_>-1:void 0});return i.pop(),o.pop(),y&&(p(i),p(o)),s}function tt(e,t,n,r,i){(Yr(t)?Kt:ui)(t,function(t,o){var s,a,u=t,c=e[o];if(t&&((a=Yr(t))||ci(t))){for(var l=r.length;l--;)if(s=r[l]==t){c=i[l];break}if(!s){var f;n&&(u=n(c,t),(f="undefined"!=typeof u)&&(c=u)),f||(c=a?Yr(c)?c:[]:ci(c)?c:{}),r.push(t),i.push(c),f||tt(c,t,n,r,i)}}else n&&(u=n(c,t),"undefined"==typeof u&&(u=t)),"undefined"!=typeof u&&(c=u);e[o]=c})}function nt(e,t){return e+Br(Gr()*(t-e+1))}function it(e,n,r){var i=-1,s=ut(),a=e?e.length:0,u=[],l=!n&&a>=U&&s===t,d=r||l?f():u;if(l){var g=c(d);s=o,d=g}for(;++i<a;){var m=e[i],v=r?r(m,i,e):m;(n?!i||d[d.length-1]!==v:s(d,v)<0)&&((r||l)&&d.push(v),u.push(m))}return l?(p(d.array),h(d)):r&&p(d),u}function ot(e){return function(t,r,i){var o={};r=n.createCallback(r,i,3);var s=-1,a=t?t.length:0;if("number"==typeof a)for(;++s<a;){var u=t[s];e(o,u,r(u,s,t),t)}else ui(t,function(t,n,i){e(o,t,r(t,n,i),i)});return o}}function st(e,t,n,r,o,s){var a=1&t,u=2&t,c=4&t,l=16&t,f=32&t;if(!u&&!kt(e))throw new Sr;l&&!n.length&&(t&=-17,l=n=!1),f&&!r.length&&(t&=-33,f=r=!1);var d=e&&e.__bindData__;if(d&&d!==!0)return d=g(d),d[2]&&(d[2]=g(d[2])),d[3]&&(d[3]=g(d[3])),!a||1&d[1]||(d[4]=o),!a&&1&d[1]&&(t|=8),!c||4&d[1]||(d[5]=s),l&&Nr.apply(d[2]||(d[2]=[]),n),f&&Mr.apply(d[3]||(d[3]=[]),r),d[1]|=t,st.apply(null,d);var p=1==t||17===t?i:S;return p([e,t,n,r,o,s])}function at(e){return ti[e]}function ut(){var e=(e=n.indexOf)===yn?t:e;return e}function ct(e){return"function"==typeof e&&Dr.test(e)}function lt(e){var t,n;return e&&xr.call(e)==z&&(t=e.constructor,!kt(t)||t instanceof t)?(ai(e,function(e,t){n=t}),"undefined"==typeof n||Rr.call(e,n)):!1}function ft(e){return ni[e]}function dt(e){return e&&"object"==typeof e&&"number"==typeof e.length&&xr.call(e)==M||!1}function pt(e,t,n,r){return"boolean"!=typeof t&&null!=t&&(r=n,n=t,t=!1),s(e,t,"function"==typeof n&&b(n,r,1))}function ht(e,t,n){return s(e,!0,"function"==typeof t&&b(t,n,1))}function gt(e,t){var n=y(e);return t?oi(n,t):n}function mt(e,t,r){var i;return t=n.createCallback(t,r,3),ui(e,function(e,n,r){return t(e,n,r)?(i=n,!1):void 0}),i}function vt(e,t,r){var i;return t=n.createCallback(t,r,3),bt(e,function(e,n,r){return t(e,n,r)?(i=n,!1):void 0}),i}function yt(e,t,n){var r=[];ai(e,function(e,t){r.push(t,e)});var i=r.length;for(t=b(t,n,3);i--&&t(r[i--],r[i],e)!==!1;);return e}function bt(e,t,n){var r=ei(e),i=r.length;for(t=b(t,n,3);i--;){var o=r[i];if(t(e[o],o,e)===!1)break}return e}function _t(e){var t=[];return ai(e,function(e,n){kt(e)&&t.push(n)}),t.sort()}function wt(e,t){return e?Rr.call(e,t):!1}function Ut(e){for(var t=-1,n=ei(e),r=n.length,i={};++t<r;){var o=n[t];i[e[o]]=o}return i}function St(e){return e===!0||e===!1||e&&"object"==typeof e&&xr.call(e)==P||!1}function Ct(e){return e&&"object"==typeof e&&xr.call(e)==H||!1}function It(e){return e&&1===e.nodeType||!1}function Et(e){var t=!0;if(!e)return t;var n=xr.call(e),r=e.length;return n==X||n==J||n==M||n==z&&"number"==typeof r&&kt(e.splice)?!r:(ui(e,function(){return t=!1}),t)}function xt(e,t,n,r){return et(e,t,"function"==typeof n&&b(n,r,2))}function Dt(e){return Fr(e)&&!Wr(parseFloat(e))}function kt(e){return"function"==typeof e}function jt(e){return!(!e||!K[typeof e])}function Bt(e){return Lt(e)&&e!=+e}function At(e){return null===e}function Lt(e){return"number"==typeof e||e&&"object"==typeof e&&xr.call(e)==W||!1}function Rt(e){return e&&"object"==typeof e&&xr.call(e)==V||!1}function Nt(e){return"string"==typeof e||e&&"object"==typeof e&&xr.call(e)==J||!1}function Ot(e){return"undefined"==typeof e}function Tt(e,t,r){var i={};return t=n.createCallback(t,r,3),ui(e,function(e,n,r){i[n]=t(e,n,r)}),i}function Mt(e){var t=arguments,n=2;if(!jt(e))return e;if("number"!=typeof t[2]&&(n=t.length),n>3&&"function"==typeof t[n-2])var r=b(t[--n-1],t[n--],2);else n>2&&"function"==typeof t[n-1]&&(r=t[--n]);for(var i=g(arguments,1,n),o=-1,s=f(),a=f();++o<n;)tt(e,i[o],r,s,a);return p(s),p(a),e}function Xt(e,t,r){var i={};if("function"!=typeof t){var o=[];ai(e,function(e,t){o.push(t)}),o=Z(o,Q(arguments,!0,!1,1));for(var s=-1,a=o.length;++s<a;){var u=o[s];i[u]=e[u]}}else t=n.createCallback(t,r,3),ai(e,function(e,n,r){t(e,n,r)||(i[n]=e)});return i}function Pt(e){for(var t=-1,n=ei(e),r=n.length,i=hr(r);++t<r;){var o=n[t];i[t]=[o,e[o]]}return i}function Ht(e,t,r){var i={};if("function"!=typeof t)for(var o=-1,s=Q(arguments,!0,!1,1),a=jt(e)?s.length:0;++o<a;){var u=s[o];u in e&&(i[u]=e[u])}else t=n.createCallback(t,r,3),ai(e,function(e,n,r){t(e,n,r)&&(i[n]=e)});return i}function Ft(e,t,r,i){var o=Yr(e);if(null==r)if(o)r=[];else{var s=e&&e.constructor,a=s&&s.prototype;r=y(a)}return t&&(t=n.createCallback(t,i,4),(o?Kt:ui)(e,function(e,n,i){return t(r,e,n,i)})),r}function Wt(e){for(var t=-1,n=ei(e),r=n.length,i=hr(r);++t<r;)i[t]=e[n[t]];return i}function zt(e){for(var t=arguments,n=-1,r=Q(t,!0,!1,1),i=t[2]&&t[2][t[1]]===e?1:r.length,o=hr(i);++n<i;)o[n]=e[r[n]];return o}function Vt(e,t,n){var r=-1,i=ut(),o=e?e.length:0,s=!1;return n=(0>n?Vr(0,o+n):n)||0,Yr(e)?s=i(e,t,n)>-1:"number"==typeof o?s=(Nt(e)?e.indexOf(t,n):i(e,t,n))>-1:ui(e,function(e){return++r>=n?!(s=e===t):void 0}),s}function Jt(e,t,r){var i=!0;t=n.createCallback(t,r,3);var o=-1,s=e?e.length:0;if("number"==typeof s)for(;++o<s&&(i=!!t(e[o],o,e)););else ui(e,function(e,n,r){return i=!!t(e,n,r)});return i}function $t(e,t,r){var i=[];t=n.createCallback(t,r,3);var o=-1,s=e?e.length:0;if("number"==typeof s)for(;++o<s;){var a=e[o];t(a,o,e)&&i.push(a)}else ui(e,function(e,n,r){t(e,n,r)&&i.push(e)});return i}function Gt(e,t,r){t=n.createCallback(t,r,3);var i=-1,o=e?e.length:0;if("number"!=typeof o){var s;return ui(e,function(e,n,r){return t(e,n,r)?(s=e,!1):void 0}),s}for(;++i<o;){var a=e[i];if(t(a,i,e))return a}}function qt(e,t,r){var i;return t=n.createCallback(t,r,3),Zt(e,function(e,n,r){return t(e,n,r)?(i=e,!1):void 0}),i}function Kt(e,t,n){var r=-1,i=e?e.length:0;if(t=t&&"undefined"==typeof n?t:b(t,n,3),"number"==typeof i)for(;++r<i&&t(e[r],r,e)!==!1;);else ui(e,t);return e}function Zt(e,t,n){var r=e?e.length:0;if(t=t&&"undefined"==typeof n?t:b(t,n,3),"number"==typeof r)for(;r--&&t(e[r],r,e)!==!1;);else{var i=ei(e);r=i.length,ui(e,function(e,n,o){return n=i?i[--r]:--r,t(o[n],n,o)})}return e}function Yt(e,t){var n=g(arguments,2),r=-1,i="function"==typeof t,o=e?e.length:0,s=hr("number"==typeof o?o:0);return Kt(e,function(e){s[++r]=(i?t:e[t]).apply(e,n)}),s}function Qt(e,t,r){var i=-1,o=e?e.length:0;if(t=n.createCallback(t,r,3),"number"==typeof o)for(var s=hr(o);++i<o;)s[i]=t(e[i],i,e);else s=[],ui(e,function(e,n,r){s[++i]=t(e,n,r)});return s}function en(e,t,r){var i=-1/0,o=i;if("function"!=typeof t&&r&&r[t]===e&&(t=null),null==t&&Yr(e))for(var s=-1,u=e.length;++s<u;){var c=e[s];c>o&&(o=c)}else t=null==t&&Nt(e)?a:n.createCallback(t,r,3),Kt(e,function(e,n,r){var s=t(e,n,r);s>i&&(i=s,o=e)});return o}function tn(e,t,r){var i=1/0,o=i;if("function"!=typeof t&&r&&r[t]===e&&(t=null),null==t&&Yr(e))for(var s=-1,u=e.length;++s<u;){var c=e[s];o>c&&(o=c)}else t=null==t&&Nt(e)?a:n.createCallback(t,r,3),Kt(e,function(e,n,r){var s=t(e,n,r);i>s&&(i=s,o=e)});return o}function nn(e,t,r,i){if(!e)return r;var o=arguments.length<3;t=n.createCallback(t,i,4);var s=-1,a=e.length;if("number"==typeof a)for(o&&(r=e[++s]);++s<a;)r=t(r,e[s],s,e);else ui(e,function(e,n,i){r=o?(o=!1,e):t(r,e,n,i)});return r}function rn(e,t,r,i){var o=arguments.length<3;return t=n.createCallback(t,i,4),Zt(e,function(e,n,i){r=o?(o=!1,e):t(r,e,n,i)}),r}function on(e,t,r){return t=n.createCallback(t,r,3),$t(e,function(e,n,r){return!t(e,n,r)})}function sn(e,t,n){if(e&&"number"!=typeof e.length&&(e=Wt(e)),null==t||n)return e?e[nt(0,e.length-1)]:v;var r=an(e);return r.length=Jr(Vr(0,t),r.length),r}function an(e){var t=-1,n=e?e.length:0,r=hr("number"==typeof n?n:0);return Kt(e,function(e){var n=nt(0,++t);r[t]=r[n],r[n]=e}),r}function un(e){var t=e?e.length:0;return"number"==typeof t?t:ei(e).length}function cn(e,t,r){var i;t=n.createCallback(t,r,3);var o=-1,s=e?e.length:0;if("number"==typeof s)for(;++o<s&&!(i=t(e[o],o,e)););else ui(e,function(e,n,r){return!(i=t(e,n,r))});return!!i}function ln(e,t,r){var i=-1,o=Yr(t),s=e?e.length:0,a=hr("number"==typeof s?s:0);for(o||(t=n.createCallback(t,r,3)),Kt(e,function(e,n,r){var s=a[++i]=d();o?s.criteria=Qt(t,function(t){return e[t]}):(s.criteria=f())[0]=t(e,n,r),s.index=i,s.value=e}),s=a.length,a.sort(u);s--;){var c=a[s];a[s]=c.value,o||p(c.criteria),h(c)}return a}function fn(e){return e&&"number"==typeof e.length?g(e):Wt(e)}function dn(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r}function pn(e){return Z(e,Q(arguments,!0,!0,1))}function hn(e,t,r){var i=-1,o=e?e.length:0;for(t=n.createCallback(t,r,3);++i<o;)if(t(e[i],i,e))return i;return-1}function gn(e,t,r){var i=e?e.length:0;for(t=n.createCallback(t,r,3);i--;)if(t(e[i],i,e))return i;return-1}function mn(e,t,r){var i=0,o=e?e.length:0;if("number"!=typeof t&&null!=t){var s=-1;for(t=n.createCallback(t,r,3);++s<o&&t(e[