diff --git a/.jsdoc.json b/.jsdoc.json index afc57bd..5545318 100644 --- a/.jsdoc.json +++ b/.jsdoc.json @@ -4,7 +4,7 @@ "dictionaries": ["jsdoc"] }, "source": { - "include": ["./src/asserts", "./src/be.js", "./src/interface.js", "package.json", "doc-home.md"], + "include": ["./src/assertions", "./src/be.js", "./src/interface.js", "package.json", "doc-home.md"], "includePattern": ".js$", "excludePattern": "(node_modules/|docs)" }, diff --git a/CHANGELOG.md b/CHANGELOG.md index efed2d5..e82614c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [1.12.0] - 2017-08-28 +## [1.12.1] - 2017-08-28 ### Added - `be.nil`, checks if value is null or undefined diff --git a/dist/be.js b/dist/be.js index 4618c00..046c6ed 100644 --- a/dist/be.js +++ b/dist/be.js @@ -1,4 +1,4 @@ -// [AIV] beJS Build version: 1.11.0 +// [AIV] beJS Build version: 1.12.1 var be = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache @@ -473,6 +473,24 @@ Types['null'] = function (value) { return Types.classOf(value, 'null'); }; +/** + * Check if is null or undefined + * + * **Interfaces**: `all`, `any`, `not`, `err` + * + * @function + * @name nil + * @alias nil + * @param value {Mixed} value + * @returns {boolean} + * @example + * be.nil(null) // true + * be.nil(undefined) // true + */ +Types.nil = function (value) { + return Types.null(value) || Types.undefined(value); +}; + /** * Check if is a object * @@ -1906,7 +1924,7 @@ module.exports = __webpack_require__(6); var Helpers = __webpack_require__(2); var Interface = __webpack_require__(0); -var version = '1.11.0'; +var version = '1.12.1'; /** * be class @@ -2509,12 +2527,12 @@ exports.INSPECT_MAX_BYTES = 50; * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they * get the Object implementation, which is slower but behaves correctly. */ -Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport +Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport(); /* * Export kMaxLength after typed array support is determined. */ -();exports.kMaxLength = kMaxLength(); +exports.kMaxLength = kMaxLength(); function typedArraySupport() { try { @@ -3448,8 +3466,7 @@ var MAX_ARGUMENTS_LENGTH = 0x1000; function decodeCodePointsArray(codePoints) { var len = codePoints.length; if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints // avoid extra slice() - ); + return String.fromCharCode.apply(String, codePoints); // avoid extra slice() } // Decode in chunks to avoid "call stack size exceeded". @@ -4077,9 +4094,9 @@ var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g; function base64clean(str) { // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '' + str = stringtrim(str).replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to '' - );if (str.length < 2) return ''; + if (str.length < 2) return ''; // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not while (str.length % 4 !== 0) { str = str + '='; @@ -4105,10 +4122,10 @@ function utf8ToBytes(string, units) { var bytes = []; for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i + codePoint = string.charCodeAt(i); // is surrogate component - );if (codePoint > 0xD7FF && codePoint < 0xE000) { + if (codePoint > 0xD7FF && codePoint < 0xE000) { // last char was a lead if (!leadSurrogate) { // no lead yet @@ -6268,74 +6285,7 @@ module.exports = DOM; /* 25 */ /***/ (function(module, exports) { -module.exports = { - "name": "bejs", - "version": "1.11.0", - "description": "Simple, light-weight assertions framework for javascript", - "homepage": "https://be.js.org", - "main": "index.js", - "scripts": { - "version:major": "webpack --env.major && npm run-script doc && version-to-tag.sh && npm publish", - "version:minor": "webpack --env.minor && npm run-script doc && version-to-tag.sh && npm publish", - "version:patch": "webpack --env.patch && npm run-script doc && version-to-tag.sh && npm publish", - "build": "webpack --progress", - "doc": "./node_modules/.bin/jsdoc --configure .jsdoc.json --verbose", - "test": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" - }, - "keywords": [ - "asserts", - "test", - "is", - "boolean", - "url", - "number", - "string", - "email", - "object", - "check", - "float", - "alphanumeric", - "mocha", - "testing", - "validation", - "test unit", - "valid", - "type" - ], - "author": { - "name": "Fabio Ricali", - "email": "fabio@rica.li" - }, - "contributors": [ - { - "name": "Davide Polano", - "email": "info@mdslab.org" - } - ], - "license": "MIT", - "devDependencies": { - "babel-core": "^6.25.0", - "babel-loader": "^7.1.0", - "babel-preset-es2015": "^6.24.1", - "coveralls": "^2.13.1", - "docdash": "^0.4.0", - "istanbul": "^0.4.5", - "jsdoc": "^3.4.3", - "jsdom": "^11.0.0", - "koa": "^2.3.0", - "minami": "^1.2.3", - "mocha": "^3.4.2", - "mocha-lcov-reporter": "^1.3.0", - "request": "^2.81.0", - "unminified-webpack-plugin": "^1.2.0", - "webpack": "^3.0.0", - "webpack-auto-inject-version": "^0.5.14" - }, - "repository": { - "type": "git", - "url": "https://github.com/fabioricali/beJS" - } -}; +module.exports = {"name":"bejs","version":"1.12.1","description":"Simple, light-weight assertions framework for javascript","homepage":"https://be.js.org","main":"index.js","scripts":{"version:major":"webpack --env.major && npm run-script doc && version-to-tag.sh && npm publish","version:minor":"webpack --env.minor && npm run-script doc && version-to-tag.sh && npm publish","version:patch":"webpack --env.patch && npm run-script doc && version-to-tag.sh && npm publish","build":"webpack --progress","doc":"./node_modules/.bin/jsdoc --configure .jsdoc.json --verbose","test":"istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"},"keywords":["asserts","assertions","test","is","boolean","url","number","string","email","object","check","float","alphanumeric","mocha","testing","validation","test unit","valid","type"],"author":{"name":"Fabio Ricali","email":"fabio@rica.li"},"contributors":[{"name":"Davide Polano","email":"info@mdslab.org"}],"license":"MIT","devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.2","babel-preset-es2015":"^6.24.1","coveralls":"^2.13.1","docdash":"^0.4.0","istanbul":"^0.4.5","jsdoc":"^3.5.4","jsdom":"^11.2.0","koa":"^2.3.0","minami":"^1.2.3","mocha":"^3.5.0","mocha-lcov-reporter":"^1.3.0","request":"^2.81.0","unminified-webpack-plugin":"^1.2.0","webpack":"^3.5.5","webpack-auto-inject-version":"^0.5.14"},"repository":{"type":"git","url":"https://github.com/fabioricali/beJS"}} /***/ }) /******/ ]); \ No newline at end of file diff --git a/dist/be.min.js b/dist/be.min.js index 6ce4533..9d73846 100644 --- a/dist/be.min.js +++ b/dist/be.min.js @@ -1,2 +1,2 @@ -// [AIV] beJS Build version: 1.11.0 - var be=function(t){function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var e={};return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},r.p="",r(r.s=5)}([function(t,r,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=e(2),i=e(7),a={};a._isArray=function(t){return"[object Array]"===o.objectToString(t)},a.create=function(t){t.all={},t.any={},t.not={},t.err=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"function"==typeof r?(t.err.__last_error_message="",t.err.__last_error_callback=r):(t.err.__last_error_message=r,t.err.__last_error_callback=e),t.err},t.err.__last_error_message="";for(var r in t)!function(r){if(t.hasOwnProperty(r)&&"function"==typeof t[r]&&void 0===t[r]._ofBe&&(t.not[r]=function(){for(var e=arguments.length,n=Array(e),o=0;o0)return!1;if(0===t.length)return!0;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))return!1}return!(i.string(t)&&t.length>0)},i.falsy=function(t){return!t},i.truthy=function(t){return!i.falsy(t)},i.error=function(t){return i.classOf(t,"error")},i.argument=function(t){return i.classOf(t,"arguments")||i.object(t)&&"callee"in t},i.primitive=function(t){return t!==Object(t)},i.promise=function(t){return i.classOf(t,"promise")},i.buffer=function(t){return r&&t instanceof r},i.iterable=function(t){return i.function(t[Symbol.iterator])},i.symbol=function(t){return!i.undefined(Symbol)&&i.classOf(t,"symbol")},i.defined=function(t){return!i.undefined(t)},i.oSet=function(t){return i.classOf(t,"set")},i.weakSet=function(t){return i.classOf(t,"weakset")},i.map=function(t){return i.classOf(t,"map")},i.weakMap=function(t){return i.classOf(t,"weakmap")},i.mapIterator=function(t){return i.classOf(t,"map iterator")},i.setIterator=function(t){return i.classOf(t,"set iterator")},i.int8Array=function(t){return i.classOf(t,"int8array")},i.uint8Array=function(t){return i.classOf(t,"uint8array")},i.uint8ClampedArray=function(t){return i.classOf(t,"uint8clampedarray")},i.int16Array=function(t){return i.classOf(t,"int16array")},i.uint16Array=function(t){return i.classOf(t,"uint16array")},i.int32Array=function(t){return i.classOf(t,"int32array")},i.uint32Array=function(t){return i.classOf(t,"uint32array")},i.float32Array=function(t){return i.classOf(t,"float32array")},i.float64Array=function(t){return i.classOf(t,"float64array")},i.asyncFunction=function(t){return i.classOf(t,"asyncfunction")},i.generatorFunction=function(t){return i.classOf(t,"generatorfunction")},i=o.create(i),t.exports=i}).call(r,e(9).Buffer)},function(t,r,e){"use strict";var n={};n.objectToString=function(t){return Object.prototype.toString.call(t)},n.getEditDistance=function(t,r){if(0===t.length)return r.length;if(0===r.length)return t.length;var e=[],n=void 0;for(n=0;n<=r.length;n++)e[n]=[n];var o=void 0;for(o=0;o<=t.length;o++)e[0][o]=o;for(n=1;n<=r.length;n++)for(o=1;o<=t.length;o++)r.charAt(n-1)===t.charAt(o-1)?e[n][o]=e[n-1][o-1]:e[n][o]=Math.min(e[n-1][o-1]+1,Math.min(e[n][o-1]+1,e[n-1][o]+1));return e[r.length][t.length]},n.comparators={"==":function(t,r){return 0===n.compareVersions(t,r)},"<":function(t,r){return n.compareVersions(t,r)<0},"<=":function(t,r){return n.compareVersions(t,r)<=0},">":function(t,r){return n.compareVersions(t,r)>0},">=":function(t,r){return n.compareVersions(t,r)>=0}},n.compareVersions=function(t,r){for(var e=void 0,n=/(\.0+)+$/,o=t.replace(n,"").split("."),i=r.replace(n,"").split("."),a=Math.min(o.length,i.length),u=0;u=?)(?:\s+)?(\d+((\.\d+)+)?)?/);return!!r&&[r[1],r[2]]},n.createRegExpMethods=function(t,r){for(var e in r)!function(e){r.hasOwnProperty(e)&&(t[e]=function(t){return r[e].test(t)})}(e);return t},t.exports=n},function(t,r,e){"use strict";var n=e(1),o=e(0),i={};i.int=function(t){return n.number(t)&&isFinite(t)&&Math.floor(t)===t},i.float=function(t){return n.number(t)&&!i.int(t)},i.nan=function(t){return isNaN(t)},i.even=function(t){return n.number(t)&&t%2==0},i.odd=function(t){return n.number(t)&&!i.even(t)},i.positive=function(t){return n.number(t)&&(t>0||i.positiveZero(t))},i.negative=function(t){return n.number(t)&&(t<0||i.negativeZero(t))},i.negativeZero=function(t){return n.number(t)&&0===t&&1/t===Number.NEGATIVE_INFINITY},i.positiveZero=function(t){return n.number(t)&&0===t&&1/t===Number.POSITIVE_INFINITY},i.infinity=function(t){return i.infinityPositive(t)||i.infinityNegative(t)},i.infinityPositive=function(t){return t===Number.POSITIVE_INFINITY},i.infinityNegative=function(t){return t===Number.NEGATIVE_INFINITY},i.between=function(t,r,e){return n.all.number(t,r,e)&&t>=r&&t<=e},i.between.multiple=!1,i.greater=function(t,r){return n.all.number(t,r)&&t>r},i.greater.multiple=!1,i.lesser=function(t,r){return n.all.number(t,r)&&t()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,hex:/^(?:0x)?[a-f0-9]+$/,ipv4:/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^(([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))$/,base64:/^([0-9a-zA-Z+\/]{4})*(([0-9a-zA-Z+\/]{2}==)|([0-9a-zA-Z+\/]{3}=))?$/,semVer:/^(\d*)\.(\d*)\.(\d*)(-(\d*|\d*[a-z-][0-9a-z-]*)(\.(\d*|\d*[a-z-][0-9a-z-]*))*)?(\+[0-9a-z-]+(\.[0-9a-z-]+)*)?$/i,fiscalCodeIT:/^[A-Za-z]{6}[0-9]{2}[A-Za-z]{1}[0-9]{2}[A-Za-z]{1}[0-9]{3}[A-Za-z]{1}$/,macAddress:/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/,uuid1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,uuid3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,uuid4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,uuid5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,uuid:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,isrc:/^([A-Z]{2}-[0-9A-Z]{3}-\d{2}-\d{5}|[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5})$/,iswc:/^T-(\d{9}|\d{3}.\d{3}.\d{3})-[A-Za-z0-9]$/};a=n.createRegExpMethods(a,u),a.ip=function(t){return a.ipv4(t)||a.ipv6(t)},a.equal=function(t,r){if(o.all.number(t,r))return t===r&&1/t==1/r;if(o.all.string(t,r)||o.all.regexp(t,r))return t.toString()===r.toString();if(o.all.boolean(t,r))return t===r;if(o.all.object(t,r)||o.all.array(t,r)){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(var e in t){if(!t.hasOwnProperty(e)||!r.hasOwnProperty(e))return!1;if(!a.equal(t[e],r[e]))return!1}return!0}return!1},a.equal.multiple=!1,a.hexColor=function(t){try{return t=t.replace("#",""),a.hex(t)&&(3===t.length||6===t.length)}catch(t){return!1}},a.compareVersion=function(t,r,e,o){return o&&(t=t.split(".")[0],e=e.split(".")[0]),n.comparators[r](t,e)},a=i.create(a),t.exports=a},function(t,r,e){"use strict";t.exports=e(6)},function(t,r,e){"use strict";var n=e(2),o=e(0),i={};i._helpers=n;var a={Strings:e(8),Types:e(1),Numbers:e(3),Envs:e(14),Objects:e(17),Mixed:e(4),Arrays:e(18),Dates:e(19),Urls:e(20),Hashes:e(21),CreditCards:e(22),PostalCodes:e(23),DOM:e(24)};i.getVersion=function(){return a.Envs.commonjsEnv()?e(25).version:"1.11.0"},i.getVersion._ofBe=!0,i.set=function(t,r){i[t]=r},i.set._ofBe=!0;for(var u in a)!function(t){if(a.hasOwnProperty(t)){for(var r in a[t])!function(r){a[t].hasOwnProperty(r)&&a.Types.function(a[t][r])&&(i[r]=function(){for(var e=arguments.length,n=Array(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:"";n(this,r);var e=o(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t));return Object.defineProperty(e,"message",{configurable:!0,enumerable:!1,value:t,writable:!0}),Object.defineProperty(e,"name",{configurable:!0,enumerable:!1,value:e.constructor.name,writable:!0}),Error.hasOwnProperty("captureStackTrace")?(Error.captureStackTrace(e,e.constructor),o(e)):(Object.defineProperty(e,"stack",{configurable:!0,enumerable:!1,value:new Error(t).stack,writable:!0}),e)}return i(r,t),r}(Error),u=function(t){function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"An error has occurred";return n(this,r),o(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t))}return i(r,t),r}(a);t.exports=u},function(t,r,e){"use strict";var n=e(2),o=e(0),i=e(1),a={};a.camelCase=function(t){return i.string(t)&&!a.upperCase(t)&&a.alphanumeric(t)&&a.spaces(t.replace(/([A-Z])/g," $1"))},a.snakeCase=function(t){return a.lowerCase(t)&&/^[0-9a-z]*_[0-9a-z]/gi.test(t)},a.kebabCase=function(t){return a.lowerCase(t)&&/^[0-9a-z]*-[0-9a-z]/gi.test(t)},a.similarity=function(t,r,e){if(!i.all.string(t,r))return!1;(!i.number(e)||e<0||e>1)&&(e=1);var o=t,a=r;t.length=e},a.similarity.multiple=!1,a.contains=function(t,r){return!!i.string(t)&&t.indexOf(r)>-1},a.contains.multiple=!1,a.lowerCase=function(t){return!!i.string(t)&&t.toLowerCase()===t},a.upperCase=function(t){return!!i.string(t)&&t.toUpperCase()===t},a.word=function(t){if(!i.string(t))return!1;var r=t.trim();return r.length>0&&1===r.split(" ").length},a.capitalized=function(t){if(!i.string(t))return!1;if(0===t.trim().length)return!1;var r=t.trim().split(" ");for(var e in r){var n=r[e].charAt(0);if(n!==n.toUpperCase())return!1}return!0},a.emptyString=function(t){return i.string(t)&&0===t.length},a.alphanumeric=function(t){return/^[a-z0-9]+$/i.test(t)&&i.string(t)},a.startWith=function(t,r,e){return i.any.string(t,r)||(t+="",r+=""),i.truthy(e)&&(t=t.toLocaleLowerCase(),r=r.toLocaleLowerCase()),0===r.indexOf(t)},a.startWith.multiple=!1,a.endWith=function(t,r,e){i.any.string(t,r)||(t+="",r+=""),i.truthy(e)&&(t=t.toLocaleLowerCase(),r=r.toLocaleLowerCase());var n=r.length-t.length;return n>=0&&r.indexOf(t,n)===n},a.endWith.multiple=!1,a.palindrome=function(t){return!!i.string(t)&&(t=t.replace(/\s/g,"").toLowerCase())===t.split("").reverse().join("")},a.char=function(t){return i.string(t)&&1===t.length},a.space=function(t){return a.char(t)&&/\s/.test(t)},a.spaces=function(t){return/\s/.test(t)},a=o.create(a),t.exports=a},function(t,r,e){"use strict";(function(t){function n(){return i.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,r){if(n()=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|t}function g(t){return+t!=t&&(t=0),i.alloc(+t)}function y(t,r){if(i.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return Z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return H(t).length;default:if(n)return Z(t).length;r=(""+r).toLowerCase(),n=!0}}function m(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if(e>>>=0,r>>>=0,e<=r)return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return R(this,r,e);case"ascii":return C(this,r,e);case"latin1":case"binary":return I(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function v(t,r,e,n,o){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=o?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(o)return-1;e=t.length-1}else if(e<0){if(!o)return-1;e=0}if("string"==typeof r&&(r=i.from(r,n)),i.isBuffer(r))return 0===r.length?-1:w(t,r,e,n,o);if("number"==typeof r)return r&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):w(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function w(t,r,e,n,o){function i(t,r){return 1===a?t[r]:t.readUInt16BE(r*a)}var a=1,u=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;a=2,u/=2,s/=2,e/=2}var f;if(o){var c=-1;for(f=e;fu&&(e=u-s),f=e;f>=0;f--){for(var l=!0,h=0;ho&&(n=o):n=o;var i=r.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a239?4:i>223?3:i>191?2:1;if(o+u<=e){var s,f,c,l;switch(u){case 1:i<128&&(a=i);break;case 2:s=t[o+1],128==(192&s)&&(l=(31&i)<<6|63&s)>127&&(a=l);break;case 3:s=t[o+1],f=t[o+2],128==(192&s)&&128==(192&f)&&(l=(15&i)<<12|(63&s)<<6|63&f)>2047&&(l<55296||l>57343)&&(a=l);break;case 4:s=t[o+1],f=t[o+2],c=t[o+3],128==(192&s)&&128==(192&f)&&128==(192&c)&&(l=(15&i)<<18|(63&s)<<12|(63&f)<<6|63&c)>65535&&l<1114112&&(a=l)}}null===a?(a=65533,u=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),o+=u}return B(n)}function B(t){var r=t.length;if(r<=Q)return String.fromCharCode.apply(String,t);for(var e="",n=0;nn)&&(e=n);for(var o="",i=r;ie)throw new RangeError("Trying to access beyond buffer length")}function U(t,r,e,n,o,a){if(!i.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||rt.length)throw new RangeError("Index out of range")}function L(t,r,e,n){r<0&&(r=65535+r+1);for(var o=0,i=Math.min(t.length-e,2);o>>8*(n?o:1-o)}function k(t,r,e,n){r<0&&(r=4294967295+r+1);for(var o=0,i=Math.min(t.length-e,4);o>>8*(n?o:3-o)&255}function M(t,r,e,n,o,i){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Y(t,r,e,n,o){return o||M(t,r,e,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,r,e,n,23,4),e+4}function D(t,r,e,n,o){return o||M(t,r,e,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,r,e,n,52,8),e+8}function N(t){if(t=z(t).replace(tt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function z(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function $(t){return t<16?"0"+t.toString(16):t.toString(16)}function Z(t,r){r=r||1/0;for(var e,n=t.length,o=null,i=[],a=0;a55295&&e<57344){if(!o){if(e>56319){(r-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=e;continue}if(e<56320){(r-=3)>-1&&i.push(239,191,189),o=e;continue}e=65536+(o-55296<<10|e-56320)}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,e<128){if((r-=1)<0)break;i.push(e)}else if(e<2048){if((r-=2)<0)break;i.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;i.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return i}function V(t){for(var r=[],e=0;e>8,o=e%256,i.push(o),i.push(n);return i}function H(t){return G.toByteArray(N(t))}function q(t,r,e,n){for(var o=0;o=r.length||o>=t.length);++o)r[o+e]=t[o];return o}function J(t){return t!==t}var G=e(11),X=e(12),K=e(13);r.Buffer=i,r.SlowBuffer=g,r.INSPECT_MAX_BYTES=50,i.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),r.kMaxLength=n(),i.poolSize=8192,i._augment=function(t){return t.__proto__=i.prototype,t},i.from=function(t,r,e){return a(null,t,r,e)},i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0})),i.alloc=function(t,r,e){return s(null,t,r,e)},i.allocUnsafe=function(t){return f(null,t)},i.allocUnsafeSlow=function(t){return f(null,t)},i.isBuffer=function(t){return!(null==t||!t._isBuffer)},i.compare=function(t,r){if(!i.isBuffer(t)||!i.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,o=0,a=Math.min(e,n);o0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),""},i.prototype.compare=function(t,r,e,n,o){if(!i.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),r<0||e>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&r>=e)return 0;if(n>=o)return-1;if(r>=e)return 1;if(r>>>=0,e>>>=0,n>>>=0,o>>>=0,this===t)return 0;for(var a=o-n,u=e-r,s=Math.min(a,u),f=this.slice(n,o),c=t.slice(r,e),l=0;lo)&&(e=o),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return _(this,t,r,e);case"ascii":return E(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return O(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r,e);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;i.prototype.slice=function(t,r){var e=this.length;t=~~t,r=void 0===r?e:~~r,t<0?(t+=e)<0&&(t=0):t>e&&(t=e),r<0?(r+=e)<0&&(r=0):r>e&&(r=e),r0&&(o*=256);)n+=this[t+--r]*o;return n},i.prototype.readUInt8=function(t,r){return r||j(t,1,this.length),this[t]},i.prototype.readUInt16LE=function(t,r){return r||j(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function(t,r){return r||j(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function(t,r){return r||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function(t,r){return r||j(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||j(t,r,this.length);for(var n=this[t],o=1,i=0;++i=o&&(n-=Math.pow(2,8*r)),n},i.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||j(t,r,this.length);for(var n=r,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*r)),i},i.prototype.readInt8=function(t,r){return r||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},i.prototype.readInt16LE=function(t,r){r||j(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},i.prototype.readInt16BE=function(t,r){r||j(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},i.prototype.readInt32LE=function(t,r){return r||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function(t,r){return r||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function(t,r){return r||j(t,4,this.length),X.read(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,r){return r||j(t,4,this.length),X.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,r){return r||j(t,8,this.length),X.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,r){return r||j(t,8,this.length),X.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function(t,r,e,n){if(t=+t,r|=0,e|=0,!n){U(this,t,r,e,Math.pow(2,8*e)-1,0)}var o=1,i=0;for(this[r]=255&t;++i=0&&(i*=256);)this[r+o]=t/i&255;return r+e},i.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,1,255,0),i.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},i.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):L(this,t,r,!0),r+2},i.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):L(this,t,r,!1),r+2},i.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):k(this,t,r,!0),r+4},i.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):k(this,t,r,!1),r+4},i.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);U(this,t,r,e,o-1,-o)}var i=0,a=1,u=0;for(this[r]=255&t;++i>0)-u&255;return r+e},i.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);U(this,t,r,e,o-1,-o)}var i=e-1,a=1,u=0;for(this[r+i]=255&t;--i>=0&&(a*=256);)t<0&&0===u&&0!==this[r+i+1]&&(u=1),this[r+i]=(t/a>>0)-u&255;return r+e},i.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,1,127,-128),i.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},i.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):L(this,t,r,!0),r+2},i.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):L(this,t,r,!1),r+2},i.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):k(this,t,r,!0),r+4},i.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),i.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):k(this,t,r,!1),r+4},i.prototype.writeFloatLE=function(t,r,e){return Y(this,t,r,!0,e)},i.prototype.writeFloatBE=function(t,r,e){return Y(this,t,r,!1,e)},i.prototype.writeDoubleLE=function(t,r,e){return D(this,t,r,!0,e)},i.prototype.writeDoubleBE=function(t,r,e){return D(this,t,r,!1,e)},i.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r=0;--o)t[o+r]=this[o+e];else if(a<1e3||!i.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,e=void 0===e?this.length:e>>>0,t||(t=0);var a;if("number"==typeof t)for(a=r;a0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[r-2]?2:"="===t[r-1]?1:0}function o(t){return 3*t.length/4-n(t)}function i(t){var r,e,o,i,a,u=t.length;i=n(t),a=new l(3*u/4-i),e=i>0?u-4:u;var s=0;for(r=0;r>16&255,a[s++]=o>>8&255,a[s++]=255&o;return 2===i?(o=c[t.charCodeAt(r)]<<2|c[t.charCodeAt(r+1)]>>4,a[s++]=255&o):1===i&&(o=c[t.charCodeAt(r)]<<10|c[t.charCodeAt(r+1)]<<4|c[t.charCodeAt(r+2)]>>2,a[s++]=o>>8&255,a[s++]=255&o),a}function a(t){return f[t>>18&63]+f[t>>12&63]+f[t>>6&63]+f[63&t]}function u(t,r,e){for(var n,o=[],i=r;is?s:a+16383));return 1===n?(r=t[e-1],o+=f[r>>2],o+=f[r<<4&63],o+="=="):2===n&&(r=(t[e-2]<<8)+t[e-1],o+=f[r>>10],o+=f[r>>4&63],o+=f[r<<2&63],o+="="),i.push(o),i.join("")}r.byteLength=o,r.toByteArray=i,r.fromByteArray=s;for(var f=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,d=h.length;p>1,c=-7,l=e?o-1:0,h=e?-1:1,p=t[r+l];for(l+=h,i=p&(1<<-c)-1,p>>=-c,c+=u;c>0;i=256*i+t[r+l],l+=h,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=n;c>0;a=256*a+t[r+l],l+=h,c-=8);if(0===i)i=1-f;else{if(i===s)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=f}return(p?-1:1)*a*Math.pow(2,i-n)},r.write=function(t,r,e,n,o,i){var a,u,s,f=8*i-o-1,c=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,g=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,a=c):(a=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-a))<1&&(a--,s*=2),r+=a+l>=1?h/s:h*Math.pow(2,1-l),r*s>=2&&(a++,s/=2),a+l>=c?(u=0,a=c):a+l>=1?(u=(r*s-1)*Math.pow(2,o),a+=l):(u=r*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;t[e+p]=255&u,p+=d,u/=256,o-=8);for(a=a<0;t[e+p]=255&a,p+=d,a/=256,f-=8);t[e+p-d]|=128*g}},function(t,r,e){"use strict";var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,r,e){"use strict";(function(r){var n=e(2),o=e(4),i=e(0),a={};a.commonjsEnv=function(){return void 0!==r},a.commonjsEnv.multiple=!1,a.browserEnv=function(){return"undefined"!=typeof window},a.browserEnv.multiple=!1,a.amdEnv=function(){return e(16)},a.amdEnv.multiple=!1,a.navigator=function(){return a.browserEnv()&&void 0!==window.navigator},a.navigator.multiple=!1,a.onLine=function(){return a.navigator()&&navigator.onLine},a.onLine.multiple=!1;var u={android:/^(?:(?!Windows).)*(Android)(?:\s)(\d+((\.\d+)+)?)?/,androidTablet:/(Android)(?:\s)(\d+((\.\d+)+)?)?(?!.*Mobile)/,androidPhone:/(Android)(?:\s)(\d+((\.\d+)+)?)?(?:.*Mobile)/,chrome:/(Chrome|Crios)\/(\d+((\.\d+)+)?)?\s+(Safari)\/(\d+((\.\d+)+)?)?$/,chromeIOS:/(CriOS)\/(\d+((\.\d+)+)?)?/,opera:/(Opera|OPR)(?:[\/\s])(\d+((\.\d+)+)?)?/,firefox:/(Firefox)\/(\d+((\.\d+)+)?)?$/,edge:/(Edge)\/(\d+((\.\d+)+)?)?$/,safari:/^(?:(?!Chrome).)*(Safari)\/(\d+((\.\d+)+)?)?/,safariMobile:/^(?:(?!CriOS).)*(?:Mobile\/.*)(Safari)\/(\d+((\.\d+)+)?)?/,ie:/(MSIE|rv)(?:[\s:])(\d+((\.\d+)+)?)?/,windowsPhone:/(Windows Phone)(?:\s)(\d+((\.\d+)+)?)?/,windowsTablet:/(Windows NT)(?:\s)(\d+((\.\d+)+)?)?(?:.*Touch)/,blackberry:/BlackBerry|BB10/,iphone:/iPhone/,ipad:/iPad/,ipod:/iPod/,ios:/iPhone|iPad|iPod/,mac:/Mac/,linux:/Linux/,windows:/Windows/};for(var s in u)!function(t){a[t]=function(r,e){var i=n.operatorVersion(r);e=i||e||!r?e||navigator.userAgent:r;var a=e.match(u[t]);return i&&a&&a[2]?o.compareVersion(a[2],i[0],i[1],!0):null!==a},a[t].multiple=!1}(s);a.mobile=function(t){return t=t||navigator.userAgent,a.iphone(t)||a.ipod(t)||a.androidPhone(t)||a.blackberry(t)||a.windowsPhone(t)},a.tablet=function(t){return t=t||navigator.userAgent,a.ipad(t)||a.windowsTablet(t)||a.androidTablet(t)},a.desktop=function(t){return t=t||navigator.userAgent,a.not.tablet(t)&&a.not.mobile(t)},a=i.create(a),t.exports=a}).call(r,e(15))},function(t,r,e){"use strict";function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(r){try{return l.call(null,t,0)}catch(r){return l.call(this,t,0)}}}function a(t){if(h===clearTimeout)return clearTimeout(t);if((h===o||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(r){try{return h.call(null,t)}catch(r){return h.call(this,t)}}}function u(){y&&d&&(y=!1,d.length?g=d.concat(g):m=-1,g.length&&s())}function s(){if(!y){var t=i(u);y=!0;for(var r=g.length;r;){for(d=g,g=[];++m1)for(var e=1;er)return!1;return e===r},i.propertyCount.multiple=!1,i=o.create(i),t.exports=i},function(t,r,e){"use strict";var n=e(1),o=e(0),i={};i.inArray=function(t,r){if(!n.array(r))return!1;for(var e in r)if(r.hasOwnProperty(e)&&r[e]===t)return!0;return!1},i.inArray.multiple=!1,i.arrayOfStrings=function(t){return n.all.string(t)},i.arrayOfObjects=function(t){return n.all.object(t)},i.arrayOfBooleans=function(t){return n.all.boolean(t)},i.arrayOfNumbers=function(t){return n.all.number(t)},i.arrayOfDates=function(t){return n.all.date(t)},i.arrayOfFunctions=function(t){return n.all.function(t)},i.objValueInArray=function(t,r,e){var o=[];return n.all.object(t)&&(o=t.map(function(t){return t.hasOwnProperty(r)&&t[r]===e})),n.any.booleanTrue(o)},i.objValueInArray.multiple=!1,i=o.create(i),t.exports=i},function(t,r,e){"use strict";var n=e(1),o=e(3),i=e(0),a={},u=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],s=["january","february","march","april","may","june","july","august","september","october","november","december"];a.dateString=function(t){var r=Date.parse(t);return!isNaN(r)},a.timeString=function(t){return/^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$/.test(t)},a.today=function(t){var r=new Date;return n.date(t)&&r.toDateString()===t.toDateString()},a.tomorrow=function(t){var r=new Date;return r.setDate(r.getDate()+1),n.date(t)&&r.toDateString()===t.toDateString()},a.yesterday=function(t){var r=new Date;return r.setDate(r.getDate()-1),n.date(t)&&r.toDateString()===t.toDateString()},a.past=function(t){var r=(new Date).getTime();return n.date(t)&&r>t.getTime()},a.future=function(t){return n.date(t)&&!a.past(t)},a.day=function(t,r){return n.date(t)&&n.string(r)&&u[t.getDay()]===r.toLowerCase()},a.day.multiple=!1,a.month=function(t,r){return n.date(t)&&n.string(r)&&s[t.getMonth()]===r.toLowerCase()},a.month.multiple=!1,a.year=function(t,r){return n.date(t)&&n.number(r)&&t.getFullYear()===r},a.year.multiple=!1,a.leapYear=function(t){return n.number(t)&&t%4==0&&t%100!=0||t%400==0},a.weekend=function(t){return a.day(t,"saturday")||a.day(t,"sunday")},a.weekday=function(t){return n.date(t)&&!a.weekend(t)},a.numberInWeek=function(t){return n.number(t)&&o.between(t,0,6)},a.dateBetween=function(t,r,e){return n.all.date(t,r,e)&&o.between(t.getTime(),r.getTime(),e.getTime())},a.dateBetween.multiple=!1,a.dayLightSavingTime=function(t){if(!n.date(t))return!1;var r=new Date(t.getFullYear(),0,1),e=new Date(t.getFullYear(),6,1),o=Math.max(r.getTimezoneOffset(),e.getTimezoneOffset());return t.getTimezoneOffset()0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"function"==typeof r?(t.err.__last_error_message="",t.err.__last_error_callback=r):(t.err.__last_error_message=r,t.err.__last_error_callback=e),t.err},t.err.__last_error_message="";for(var r in t)!function(r){if(t.hasOwnProperty(r)&&"function"==typeof t[r]&&void 0===t[r]._ofBe&&(t.not[r]=function(){for(var e=arguments.length,n=Array(e),o=0;o0)return!1;if(0===t.length)return!0;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))return!1}return!(i.string(t)&&t.length>0)},i.falsy=function(t){return!t},i.truthy=function(t){return!i.falsy(t)},i.error=function(t){return i.classOf(t,"error")},i.argument=function(t){return i.classOf(t,"arguments")||i.object(t)&&"callee"in t},i.primitive=function(t){return t!==Object(t)},i.promise=function(t){return i.classOf(t,"promise")},i.buffer=function(t){return r&&t instanceof r},i.iterable=function(t){return i.function(t[Symbol.iterator])},i.symbol=function(t){return!i.undefined(Symbol)&&i.classOf(t,"symbol")},i.defined=function(t){return!i.undefined(t)},i.oSet=function(t){return i.classOf(t,"set")},i.weakSet=function(t){return i.classOf(t,"weakset")},i.map=function(t){return i.classOf(t,"map")},i.weakMap=function(t){return i.classOf(t,"weakmap")},i.mapIterator=function(t){return i.classOf(t,"map iterator")},i.setIterator=function(t){return i.classOf(t,"set iterator")},i.int8Array=function(t){return i.classOf(t,"int8array")},i.uint8Array=function(t){return i.classOf(t,"uint8array")},i.uint8ClampedArray=function(t){return i.classOf(t,"uint8clampedarray")},i.int16Array=function(t){return i.classOf(t,"int16array")},i.uint16Array=function(t){return i.classOf(t,"uint16array")},i.int32Array=function(t){return i.classOf(t,"int32array")},i.uint32Array=function(t){return i.classOf(t,"uint32array")},i.float32Array=function(t){return i.classOf(t,"float32array")},i.float64Array=function(t){return i.classOf(t,"float64array")},i.asyncFunction=function(t){return i.classOf(t,"asyncfunction")},i.generatorFunction=function(t){return i.classOf(t,"generatorfunction")},i=o.create(i),t.exports=i}).call(r,e(9).Buffer)},function(t,r,e){"use strict";var n={};n.objectToString=function(t){return Object.prototype.toString.call(t)},n.getEditDistance=function(t,r){if(0===t.length)return r.length;if(0===r.length)return t.length;var e=[],n=void 0;for(n=0;n<=r.length;n++)e[n]=[n];var o=void 0;for(o=0;o<=t.length;o++)e[0][o]=o;for(n=1;n<=r.length;n++)for(o=1;o<=t.length;o++)r.charAt(n-1)===t.charAt(o-1)?e[n][o]=e[n-1][o-1]:e[n][o]=Math.min(e[n-1][o-1]+1,Math.min(e[n][o-1]+1,e[n-1][o]+1));return e[r.length][t.length]},n.comparators={"==":function(t,r){return 0===n.compareVersions(t,r)},"<":function(t,r){return n.compareVersions(t,r)<0},"<=":function(t,r){return n.compareVersions(t,r)<=0},">":function(t,r){return n.compareVersions(t,r)>0},">=":function(t,r){return n.compareVersions(t,r)>=0}},n.compareVersions=function(t,r){for(var e=void 0,n=/(\.0+)+$/,o=t.replace(n,"").split("."),i=r.replace(n,"").split("."),u=Math.min(o.length,i.length),a=0;a=?)(?:\s+)?(\d+((\.\d+)+)?)?/);return!!r&&[r[1],r[2]]},n.createRegExpMethods=function(t,r){for(var e in r)!function(e){r.hasOwnProperty(e)&&(t[e]=function(t){return r[e].test(t)})}(e);return t},t.exports=n},function(t,r,e){"use strict";var n=e(1),o=e(0),i={};i.int=function(t){return n.number(t)&&isFinite(t)&&Math.floor(t)===t},i.float=function(t){return n.number(t)&&!i.int(t)},i.nan=function(t){return isNaN(t)},i.even=function(t){return n.number(t)&&t%2==0},i.odd=function(t){return n.number(t)&&!i.even(t)},i.positive=function(t){return n.number(t)&&(t>0||i.positiveZero(t))},i.negative=function(t){return n.number(t)&&(t<0||i.negativeZero(t))},i.negativeZero=function(t){return n.number(t)&&0===t&&1/t===Number.NEGATIVE_INFINITY},i.positiveZero=function(t){return n.number(t)&&0===t&&1/t===Number.POSITIVE_INFINITY},i.infinity=function(t){return i.infinityPositive(t)||i.infinityNegative(t)},i.infinityPositive=function(t){return t===Number.POSITIVE_INFINITY},i.infinityNegative=function(t){return t===Number.NEGATIVE_INFINITY},i.between=function(t,r,e){return n.all.number(t,r,e)&&t>=r&&t<=e},i.between.multiple=!1,i.greater=function(t,r){return n.all.number(t,r)&&t>r},i.greater.multiple=!1,i.lesser=function(t,r){return n.all.number(t,r)&&t()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,hex:/^(?:0x)?[a-f0-9]+$/,ipv4:/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^(([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))$/,base64:/^([0-9a-zA-Z+\/]{4})*(([0-9a-zA-Z+\/]{2}==)|([0-9a-zA-Z+\/]{3}=))?$/,semVer:/^(\d*)\.(\d*)\.(\d*)(-(\d*|\d*[a-z-][0-9a-z-]*)(\.(\d*|\d*[a-z-][0-9a-z-]*))*)?(\+[0-9a-z-]+(\.[0-9a-z-]+)*)?$/i,fiscalCodeIT:/^[A-Za-z]{6}[0-9]{2}[A-Za-z]{1}[0-9]{2}[A-Za-z]{1}[0-9]{3}[A-Za-z]{1}$/,macAddress:/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/,uuid1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,uuid3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,uuid4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,uuid5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,uuid:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,isrc:/^([A-Z]{2}-[0-9A-Z]{3}-\d{2}-\d{5}|[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5})$/,iswc:/^T-(\d{9}|\d{3}.\d{3}.\d{3})-[A-Za-z0-9]$/};u=n.createRegExpMethods(u,a),u.ip=function(t){return u.ipv4(t)||u.ipv6(t)},u.equal=function(t,r){if(o.all.number(t,r))return t===r&&1/t==1/r;if(o.all.string(t,r)||o.all.regexp(t,r))return t.toString()===r.toString();if(o.all.boolean(t,r))return t===r;if(o.all.object(t,r)||o.all.array(t,r)){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(var e in t){if(!t.hasOwnProperty(e)||!r.hasOwnProperty(e))return!1;if(!u.equal(t[e],r[e]))return!1}return!0}return!1},u.equal.multiple=!1,u.hexColor=function(t){try{return t=t.replace("#",""),u.hex(t)&&(3===t.length||6===t.length)}catch(t){return!1}},u.compareVersion=function(t,r,e,o){return o&&(t=t.split(".")[0],e=e.split(".")[0]),n.comparators[r](t,e)},u=i.create(u),t.exports=u},function(t,r,e){"use strict";t.exports=e(6)},function(t,r,e){"use strict";var n=e(2),o=e(0),i={};i._helpers=n;var u={Strings:e(8),Types:e(1),Numbers:e(3),Envs:e(14),Objects:e(17),Mixed:e(4),Arrays:e(18),Dates:e(19),Urls:e(20),Hashes:e(21),CreditCards:e(22),PostalCodes:e(23),DOM:e(24)};i.getVersion=function(){return u.Envs.commonjsEnv()?e(25).version:"1.12.1"},i.getVersion._ofBe=!0,i.set=function(t,r){i[t]=r},i.set._ofBe=!0;for(var a in u)!function(t){if(u.hasOwnProperty(t)){for(var r in u[t])!function(r){u[t].hasOwnProperty(r)&&u.Types.function(u[t][r])&&(i[r]=function(){for(var e=arguments.length,n=Array(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:"";n(this,r);var e=o(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t));return Object.defineProperty(e,"message",{configurable:!0,enumerable:!1,value:t,writable:!0}),Object.defineProperty(e,"name",{configurable:!0,enumerable:!1,value:e.constructor.name,writable:!0}),Error.hasOwnProperty("captureStackTrace")?(Error.captureStackTrace(e,e.constructor),o(e)):(Object.defineProperty(e,"stack",{configurable:!0,enumerable:!1,value:new Error(t).stack,writable:!0}),e)}return i(r,t),r}(Error),a=function(t){function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"An error has occurred";return n(this,r),o(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t))}return i(r,t),r}(u);t.exports=a},function(t,r,e){"use strict";var n=e(2),o=e(0),i=e(1),u={};u.camelCase=function(t){return i.string(t)&&!u.upperCase(t)&&u.alphanumeric(t)&&u.spaces(t.replace(/([A-Z])/g," $1"))},u.snakeCase=function(t){return u.lowerCase(t)&&/^[0-9a-z]*_[0-9a-z]/gi.test(t)},u.kebabCase=function(t){return u.lowerCase(t)&&/^[0-9a-z]*-[0-9a-z]/gi.test(t)},u.similarity=function(t,r,e){if(!i.all.string(t,r))return!1;(!i.number(e)||e<0||e>1)&&(e=1);var o=t,u=r;t.length=e},u.similarity.multiple=!1,u.contains=function(t,r){return!!i.string(t)&&t.indexOf(r)>-1},u.contains.multiple=!1,u.lowerCase=function(t){return!!i.string(t)&&t.toLowerCase()===t},u.upperCase=function(t){return!!i.string(t)&&t.toUpperCase()===t},u.word=function(t){if(!i.string(t))return!1;var r=t.trim();return r.length>0&&1===r.split(" ").length},u.capitalized=function(t){if(!i.string(t))return!1;if(0===t.trim().length)return!1;var r=t.trim().split(" ");for(var e in r){var n=r[e].charAt(0);if(n!==n.toUpperCase())return!1}return!0},u.emptyString=function(t){return i.string(t)&&0===t.length},u.alphanumeric=function(t){return/^[a-z0-9]+$/i.test(t)&&i.string(t)},u.startWith=function(t,r,e){return i.any.string(t,r)||(t+="",r+=""),i.truthy(e)&&(t=t.toLocaleLowerCase(),r=r.toLocaleLowerCase()),0===r.indexOf(t)},u.startWith.multiple=!1,u.endWith=function(t,r,e){i.any.string(t,r)||(t+="",r+=""),i.truthy(e)&&(t=t.toLocaleLowerCase(),r=r.toLocaleLowerCase());var n=r.length-t.length;return n>=0&&r.indexOf(t,n)===n},u.endWith.multiple=!1,u.palindrome=function(t){return!!i.string(t)&&(t=t.replace(/\s/g,"").toLowerCase())===t.split("").reverse().join("")},u.char=function(t){return i.string(t)&&1===t.length},u.space=function(t){return u.char(t)&&/\s/.test(t)},u.spaces=function(t){return/\s/.test(t)},u=o.create(u),t.exports=u},function(t,r,e){"use strict";(function(t){function n(){return i.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,r){if(n()=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|t}function g(t){return+t!=t&&(t=0),i.alloc(+t)}function y(t,r){if(i.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return Z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return H(t).length;default:if(n)return Z(t).length;r=(""+r).toLowerCase(),n=!0}}function m(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if(e>>>=0,r>>>=0,e<=r)return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return R(this,r,e);case"ascii":return C(this,r,e);case"latin1":case"binary":return I(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function v(t,r,e,n,o){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=o?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(o)return-1;e=t.length-1}else if(e<0){if(!o)return-1;e=0}if("string"==typeof r&&(r=i.from(r,n)),i.isBuffer(r))return 0===r.length?-1:w(t,r,e,n,o);if("number"==typeof r)return r&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):w(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function w(t,r,e,n,o){function i(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}var u=1,a=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,a/=2,s/=2,e/=2}var f;if(o){var c=-1;for(f=e;fa&&(e=a-s),f=e;f>=0;f--){for(var l=!0,h=0;ho&&(n=o):n=o;var i=r.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var u=0;u239?4:i>223?3:i>191?2:1;if(o+a<=e){var s,f,c,l;switch(a){case 1:i<128&&(u=i);break;case 2:s=t[o+1],128==(192&s)&&(l=(31&i)<<6|63&s)>127&&(u=l);break;case 3:s=t[o+1],f=t[o+2],128==(192&s)&&128==(192&f)&&(l=(15&i)<<12|(63&s)<<6|63&f)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:s=t[o+1],f=t[o+2],c=t[o+3],128==(192&s)&&128==(192&f)&&128==(192&c)&&(l=(15&i)<<18|(63&s)<<12|(63&f)<<6|63&c)>65535&&l<1114112&&(u=l)}}null===u?(u=65533,a=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),o+=a}return B(n)}function B(t){var r=t.length;if(r<=Q)return String.fromCharCode.apply(String,t);for(var e="",n=0;nn)&&(e=n);for(var o="",i=r;ie)throw new RangeError("Trying to access beyond buffer length")}function U(t,r,e,n,o,u){if(!i.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||rt.length)throw new RangeError("Index out of range")}function L(t,r,e,n){r<0&&(r=65535+r+1);for(var o=0,i=Math.min(t.length-e,2);o>>8*(n?o:1-o)}function k(t,r,e,n){r<0&&(r=4294967295+r+1);for(var o=0,i=Math.min(t.length-e,4);o>>8*(n?o:3-o)&255}function M(t,r,e,n,o,i){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Y(t,r,e,n,o){return o||M(t,r,e,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,r,e,n,23,4),e+4}function D(t,r,e,n,o){return o||M(t,r,e,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,r,e,n,52,8),e+8}function N(t){if(t=z(t).replace(tt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function z(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function $(t){return t<16?"0"+t.toString(16):t.toString(16)}function Z(t,r){r=r||1/0;for(var e,n=t.length,o=null,i=[],u=0;u55295&&e<57344){if(!o){if(e>56319){(r-=3)>-1&&i.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=e;continue}if(e<56320){(r-=3)>-1&&i.push(239,191,189),o=e;continue}e=65536+(o-55296<<10|e-56320)}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,e<128){if((r-=1)<0)break;i.push(e)}else if(e<2048){if((r-=2)<0)break;i.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;i.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return i}function V(t){for(var r=[],e=0;e>8,o=e%256,i.push(o),i.push(n);return i}function H(t){return G.toByteArray(N(t))}function q(t,r,e,n){for(var o=0;o=r.length||o>=t.length);++o)r[o+e]=t[o];return o}function J(t){return t!==t}var G=e(11),X=e(12),K=e(13);r.Buffer=i,r.SlowBuffer=g,r.INSPECT_MAX_BYTES=50,i.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),r.kMaxLength=n(),i.poolSize=8192,i._augment=function(t){return t.__proto__=i.prototype,t},i.from=function(t,r,e){return u(null,t,r,e)},i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0})),i.alloc=function(t,r,e){return s(null,t,r,e)},i.allocUnsafe=function(t){return f(null,t)},i.allocUnsafeSlow=function(t){return f(null,t)},i.isBuffer=function(t){return!(null==t||!t._isBuffer)},i.compare=function(t,r){if(!i.isBuffer(t)||!i.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,o=0,u=Math.min(e,n);o0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),""},i.prototype.compare=function(t,r,e,n,o){if(!i.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),r<0||e>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&r>=e)return 0;if(n>=o)return-1;if(r>=e)return 1;if(r>>>=0,e>>>=0,n>>>=0,o>>>=0,this===t)return 0;for(var u=o-n,a=e-r,s=Math.min(u,a),f=this.slice(n,o),c=t.slice(r,e),l=0;lo)&&(e=o),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return _(this,t,r,e);case"ascii":return E(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return O(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r,e);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;i.prototype.slice=function(t,r){var e=this.length;t=~~t,r=void 0===r?e:~~r,t<0?(t+=e)<0&&(t=0):t>e&&(t=e),r<0?(r+=e)<0&&(r=0):r>e&&(r=e),r0&&(o*=256);)n+=this[t+--r]*o;return n},i.prototype.readUInt8=function(t,r){return r||j(t,1,this.length),this[t]},i.prototype.readUInt16LE=function(t,r){return r||j(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function(t,r){return r||j(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function(t,r){return r||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function(t,r){return r||j(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||j(t,r,this.length);for(var n=this[t],o=1,i=0;++i=o&&(n-=Math.pow(2,8*r)),n},i.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||j(t,r,this.length);for(var n=r,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*r)),i},i.prototype.readInt8=function(t,r){return r||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},i.prototype.readInt16LE=function(t,r){r||j(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},i.prototype.readInt16BE=function(t,r){r||j(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},i.prototype.readInt32LE=function(t,r){return r||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function(t,r){return r||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function(t,r){return r||j(t,4,this.length),X.read(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,r){return r||j(t,4,this.length),X.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,r){return r||j(t,8,this.length),X.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,r){return r||j(t,8,this.length),X.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function(t,r,e,n){if(t=+t,r|=0,e|=0,!n){U(this,t,r,e,Math.pow(2,8*e)-1,0)}var o=1,i=0;for(this[r]=255&t;++i=0&&(i*=256);)this[r+o]=t/i&255;return r+e},i.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,1,255,0),i.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},i.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):L(this,t,r,!0),r+2},i.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):L(this,t,r,!1),r+2},i.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):k(this,t,r,!0),r+4},i.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):k(this,t,r,!1),r+4},i.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);U(this,t,r,e,o-1,-o)}var i=0,u=1,a=0;for(this[r]=255&t;++i>0)-a&255;return r+e},i.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);U(this,t,r,e,o-1,-o)}var i=e-1,u=1,a=0;for(this[r+i]=255&t;--i>=0&&(u*=256);)t<0&&0===a&&0!==this[r+i+1]&&(a=1),this[r+i]=(t/u>>0)-a&255;return r+e},i.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,1,127,-128),i.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},i.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):L(this,t,r,!0),r+2},i.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):L(this,t,r,!1),r+2},i.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):k(this,t,r,!0),r+4},i.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),i.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):k(this,t,r,!1),r+4},i.prototype.writeFloatLE=function(t,r,e){return Y(this,t,r,!0,e)},i.prototype.writeFloatBE=function(t,r,e){return Y(this,t,r,!1,e)},i.prototype.writeDoubleLE=function(t,r,e){return D(this,t,r,!0,e)},i.prototype.writeDoubleBE=function(t,r,e){return D(this,t,r,!1,e)},i.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r=0;--o)t[o+r]=this[o+e];else if(u<1e3||!i.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,e=void 0===e?this.length:e>>>0,t||(t=0);var u;if("number"==typeof t)for(u=r;u0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[r-2]?2:"="===t[r-1]?1:0}function o(t){return 3*t.length/4-n(t)}function i(t){var r,e,o,i,u,a=t.length;i=n(t),u=new l(3*a/4-i),e=i>0?a-4:a;var s=0;for(r=0;r>16&255,u[s++]=o>>8&255,u[s++]=255&o;return 2===i?(o=c[t.charCodeAt(r)]<<2|c[t.charCodeAt(r+1)]>>4,u[s++]=255&o):1===i&&(o=c[t.charCodeAt(r)]<<10|c[t.charCodeAt(r+1)]<<4|c[t.charCodeAt(r+2)]>>2,u[s++]=o>>8&255,u[s++]=255&o),u}function u(t){return f[t>>18&63]+f[t>>12&63]+f[t>>6&63]+f[63&t]}function a(t,r,e){for(var n,o=[],i=r;is?s:u+16383));return 1===n?(r=t[e-1],o+=f[r>>2],o+=f[r<<4&63],o+="=="):2===n&&(r=(t[e-2]<<8)+t[e-1],o+=f[r>>10],o+=f[r>>4&63],o+=f[r<<2&63],o+="="),i.push(o),i.join("")}r.byteLength=o,r.toByteArray=i,r.fromByteArray=s;for(var f=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,d=h.length;p>1,c=-7,l=e?o-1:0,h=e?-1:1,p=t[r+l];for(l+=h,i=p&(1<<-c)-1,p>>=-c,c+=a;c>0;i=256*i+t[r+l],l+=h,c-=8);for(u=i&(1<<-c)-1,i>>=-c,c+=n;c>0;u=256*u+t[r+l],l+=h,c-=8);if(0===i)i=1-f;else{if(i===s)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,n),i-=f}return(p?-1:1)*u*Math.pow(2,i-n)},r.write=function(t,r,e,n,o,i){var u,a,s,f=8*i-o-1,c=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,g=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(a=isNaN(r)?1:0,u=c):(u=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-u))<1&&(u--,s*=2),r+=u+l>=1?h/s:h*Math.pow(2,1-l),r*s>=2&&(u++,s/=2),u+l>=c?(a=0,u=c):u+l>=1?(a=(r*s-1)*Math.pow(2,o),u+=l):(a=r*Math.pow(2,l-1)*Math.pow(2,o),u=0));o>=8;t[e+p]=255&a,p+=d,a/=256,o-=8);for(u=u<0;t[e+p]=255&u,p+=d,u/=256,f-=8);t[e+p-d]|=128*g}},function(t,r,e){"use strict";var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,r,e){"use strict";(function(r){var n=e(2),o=e(4),i=e(0),u={};u.commonjsEnv=function(){return void 0!==r},u.commonjsEnv.multiple=!1,u.browserEnv=function(){return"undefined"!=typeof window},u.browserEnv.multiple=!1,u.amdEnv=function(){return e(16)},u.amdEnv.multiple=!1,u.navigator=function(){return u.browserEnv()&&void 0!==window.navigator},u.navigator.multiple=!1,u.onLine=function(){return u.navigator()&&navigator.onLine},u.onLine.multiple=!1;var a={android:/^(?:(?!Windows).)*(Android)(?:\s)(\d+((\.\d+)+)?)?/,androidTablet:/(Android)(?:\s)(\d+((\.\d+)+)?)?(?!.*Mobile)/,androidPhone:/(Android)(?:\s)(\d+((\.\d+)+)?)?(?:.*Mobile)/,chrome:/(Chrome|Crios)\/(\d+((\.\d+)+)?)?\s+(Safari)\/(\d+((\.\d+)+)?)?$/,chromeIOS:/(CriOS)\/(\d+((\.\d+)+)?)?/,opera:/(Opera|OPR)(?:[\/\s])(\d+((\.\d+)+)?)?/,firefox:/(Firefox)\/(\d+((\.\d+)+)?)?$/,edge:/(Edge)\/(\d+((\.\d+)+)?)?$/,safari:/^(?:(?!Chrome).)*(Safari)\/(\d+((\.\d+)+)?)?/,safariMobile:/^(?:(?!CriOS).)*(?:Mobile\/.*)(Safari)\/(\d+((\.\d+)+)?)?/,ie:/(MSIE|rv)(?:[\s:])(\d+((\.\d+)+)?)?/,windowsPhone:/(Windows Phone)(?:\s)(\d+((\.\d+)+)?)?/,windowsTablet:/(Windows NT)(?:\s)(\d+((\.\d+)+)?)?(?:.*Touch)/,blackberry:/BlackBerry|BB10/,iphone:/iPhone/,ipad:/iPad/,ipod:/iPod/,ios:/iPhone|iPad|iPod/,mac:/Mac/,linux:/Linux/,windows:/Windows/};for(var s in a)!function(t){u[t]=function(r,e){var i=n.operatorVersion(r);e=i||e||!r?e||navigator.userAgent:r;var u=e.match(a[t]);return i&&u&&u[2]?o.compareVersion(u[2],i[0],i[1],!0):null!==u},u[t].multiple=!1}(s);u.mobile=function(t){return t=t||navigator.userAgent,u.iphone(t)||u.ipod(t)||u.androidPhone(t)||u.blackberry(t)||u.windowsPhone(t)},u.tablet=function(t){return t=t||navigator.userAgent,u.ipad(t)||u.windowsTablet(t)||u.androidTablet(t)},u.desktop=function(t){return t=t||navigator.userAgent,u.not.tablet(t)&&u.not.mobile(t)},u=i.create(u),t.exports=u}).call(r,e(15))},function(t,r,e){"use strict";function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(r){try{return l.call(null,t,0)}catch(r){return l.call(this,t,0)}}}function u(t){if(h===clearTimeout)return clearTimeout(t);if((h===o||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(r){try{return h.call(null,t)}catch(r){return h.call(this,t)}}}function a(){y&&d&&(y=!1,d.length?g=d.concat(g):m=-1,g.length&&s())}function s(){if(!y){var t=i(a);y=!0;for(var r=g.length;r;){for(d=g,g=[];++m1)for(var e=1;er)return!1;return e===r},i.propertyCount.multiple=!1,i=o.create(i),t.exports=i},function(t,r,e){"use strict";var n=e(1),o=e(0),i={};i.inArray=function(t,r){if(!n.array(r))return!1;for(var e in r)if(r.hasOwnProperty(e)&&r[e]===t)return!0;return!1},i.inArray.multiple=!1,i.arrayOfStrings=function(t){return n.all.string(t)},i.arrayOfObjects=function(t){return n.all.object(t)},i.arrayOfBooleans=function(t){return n.all.boolean(t)},i.arrayOfNumbers=function(t){return n.all.number(t)},i.arrayOfDates=function(t){return n.all.date(t)},i.arrayOfFunctions=function(t){return n.all.function(t)},i.objValueInArray=function(t,r,e){var o=[];return n.all.object(t)&&(o=t.map(function(t){return t.hasOwnProperty(r)&&t[r]===e})),n.any.booleanTrue(o)},i.objValueInArray.multiple=!1,i=o.create(i),t.exports=i},function(t,r,e){"use strict";var n=e(1),o=e(3),i=e(0),u={},a=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],s=["january","february","march","april","may","june","july","august","september","october","november","december"];u.dateString=function(t){var r=Date.parse(t);return!isNaN(r)},u.timeString=function(t){return/^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$/.test(t)},u.today=function(t){var r=new Date;return n.date(t)&&r.toDateString()===t.toDateString()},u.tomorrow=function(t){var r=new Date;return r.setDate(r.getDate()+1),n.date(t)&&r.toDateString()===t.toDateString()},u.yesterday=function(t){var r=new Date;return r.setDate(r.getDate()-1),n.date(t)&&r.toDateString()===t.toDateString()},u.past=function(t){var r=(new Date).getTime();return n.date(t)&&r>t.getTime()},u.future=function(t){return n.date(t)&&!u.past(t)},u.day=function(t,r){return n.date(t)&&n.string(r)&&a[t.getDay()]===r.toLowerCase()},u.day.multiple=!1,u.month=function(t,r){return n.date(t)&&n.string(r)&&s[t.getMonth()]===r.toLowerCase()},u.month.multiple=!1,u.year=function(t,r){return n.date(t)&&n.number(r)&&t.getFullYear()===r},u.year.multiple=!1,u.leapYear=function(t){return n.number(t)&&t%4==0&&t%100!=0||t%400==0},u.weekend=function(t){return u.day(t,"saturday")||u.day(t,"sunday")},u.weekday=function(t){return n.date(t)&&!u.weekend(t)},u.numberInWeek=function(t){return n.number(t)&&o.between(t,0,6)},u.dateBetween=function(t,r,e){return n.all.date(t,r,e)&&o.between(t.getTime(),r.getTime(),e.getTime())},u.dateBetween.multiple=!1,u.dayLightSavingTime=function(t){if(!n.date(t))return!1;var r=new Date(t.getFullYear(),0,1),e=new Date(t.getFullYear(),6,1),o=Math.max(r.getTimezoneOffset(),e.getTimezoneOffset());return t.getTimezoneOffset()