拓恒河湖长制全民护河平台WEB端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js.map 15KB

1 vuosi sitten
1
  1. {"version":3,"sources":["base64.js"],"names":[],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"index.js","sourcesContent":["//\r\n// THIS FILE IS AUTOMATICALLY GENERATED! DO NOT EDIT BY HAND!\r\n//\r\n;\r\n(function (global, factory) {\r\n typeof exports === 'object' && typeof module !== 'undefined'\r\n ? module.exports = factory()\r\n : typeof define === 'function' && define.amd\r\n ? define(factory) :\r\n // cf. https://github.com/dankogai/js-base64/issues/119\r\n (function () {\r\n // existing version for noConflict()\r\n var _Base64 = global.Base64;\r\n var gBase64 = factory();\r\n gBase64.noConflict = function () {\r\n global.Base64 = _Base64;\r\n return gBase64;\r\n };\r\n if (global.Meteor) { // Meteor.js\r\n Base64 = gBase64;\r\n }\r\n global.Base64 = gBase64;\r\n })();\r\n}((typeof self !== 'undefined' ? self\r\n : typeof window !== 'undefined' ? window\r\n : typeof global !== 'undefined' ? global\r\n : this), function () {\r\n \r\n /**\r\n * base64.ts\r\n *\r\n * Licensed under the BSD 3-Clause License.\r\n * http://opensource.org/licenses/BSD-3-Clause\r\n *\r\n * References:\r\n * http://en.wikipedia.org/wiki/Base64\r\n *\r\n * @author Dan Kogai (https://github.com/dankogai)\r\n */\r\n var version = '3.7.2';\r\n /**\r\n * @deprecated use lowercase `version`.\r\n */\r\n var VERSION = version;\r\n var _hasatob = typeof atob === 'function';\r\n var _hasbtoa = typeof btoa === 'function';\r\n var _hasBuffer = typeof Buffer === 'function';\r\n var _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;\r\n var _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;\r\n var b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\r\n var b64chs = Array.prototype.slice.call(b64ch);\r\n var b64tab = (function (a) {\r\n var tab = {};\r\n a.forEach(function (c, i) { return tab[c] = i; });\r\n return tab;\r\n })(b64chs);\r\n var b64re = /^(?:[A-Za-z\\d+\\/]{4})*?(?:[A-Za-z\\d+\\/]{2}(?:==)?|[A-Za-z\\d+\\/]{3}=?)?$/;\r\n var _fromCC = String.fromCharCode.bind(String);\r\n var _U8Afrom = typeof Uint8Array.from === 'function'\r\n ? Uint8Array.from.bind(Uint8Array)\r\n : function (it, fn) {\r\n if (fn === void 0) { fn = function (x) { return x; }; }\r\n return new Uint8Array(Array.prototype.slice.call(it, 0).map(fn));\r\n };\r\n var _mkUriSafe = function (src) { return src\r\n .replace(/=/g, '').replace(/[+\\/]/g, function (m0) { return m0 == '+' ? '-' : '_'; }); };\r\n var _tidyB64 = function (s) { return s.replace(/[^A-Za-z0-9\\+\\/]/g, ''); };\r\n /**\r\n * polyfill version of `btoa`\r\n */\r\n var btoaPolyfill = function (bin) {\r\n // console.log('polyfilled');\r\n var u32, c0, c1, c2, asc = '';\r\n var pad = bin.length % 3;\r\n for (var i = 0; i < bin.length;) {\r\n if ((c0 = bin.charCodeAt(i++)) > 255 ||\r\n (c1 = bin.charCodeAt(i++)) > 255 ||\r\n (c2 = bin.charCodeAt(i++)) > 255)\r\n throw new TypeError('invalid character found');\r\n u32 = (c0 << 16) | (c1 << 8) | c2;\r\n asc += b64chs[u32 >> 18 & 63]\r\n + b64chs[u32 >> 12 & 63]\r\n + b64chs[u32 >> 6 & 63]\r\n + b64chs[u32 & 63];\r\n }\r\n return pad ? asc.slice(0, pad - 3) + \"===\".substring(pad) : asc;\r\n };\r\n /**\r\n * does what `window.btoa` of web browsers do.\r\n * @param {String} bin binary string\r\n * @returns {string} Base64-encoded string\r\n */\r\n var _btoa = _hasbtoa ? function (bin) { return btoa(bin); }\r\n : _hasBuffer ? function (bin) { return Buffer.from(bin, 'binary').toString('base64'); }\r\n : btoaPolyfill;\r\n var _fromUint8Array = _hasBuffer\r\n ? function (u8a) { return Buffer.from(u8a).toString('base64'); }\r\n : function (u8a) {\r\n // cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326\r\n var maxargs = 0x1000;\r\n var strs = [];\r\n for (var i = 0, l = u8a.length; i < l; i += maxargs) {\r\n strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));\r\n }\r\n return _btoa(strs.join(''));\r\n };\r\n /**\r\n * converts a Uint8Array to a Base64 string.\r\n * @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5\r\n * @returns {string} Base64 string\r\n */\r\n var fromUint8Array = function (u8a, urlsafe) {\r\n if (urlsafe === void 0) { urlsafe = false; }\r\n return urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);\r\n };\r\n // This trick is found broken https://github.com/dankogai/js-base64/issues/130\r\n // const utob = (src: string) => unescape(encodeURIComponent(src));\r\n // reverting good old fationed regexp\r\n var cb_utob = function (c) {\r\n if (c.length < 2) {\r\n var cc = c.charCodeAt(0);\r\n return cc < 0x80 ? c\r\n : cc < 0x800 ? (_fromCC(0xc0 | (cc >>> 6))\r\n + _fromCC(0x80 | (cc & 0x3f)))\r\n : (_fromCC(0xe0 | ((cc >>> 12) & 0x0f))\r\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\r\n + _fromCC(0x80 | (cc & 0x3f)));\r\n }\r\n else {\r\n var cc = 0x10000\r\n + (c.charCodeAt(0) - 0xD800) * 0x400\r\n + (c.charCodeAt(1) - 0xDC00);\r\n return (_fromCC(0xf0 | ((cc >>> 18) & 0x07))\r\n + _fromCC(0x80 | ((cc >>> 12) & 0x3f))\r\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\r\n + _fromCC(0x80 | (cc & 0x3f)));\r\n }\r\n };\r\n var re_utob = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFFF]|[^\\x00-\\x7F]/g;\r\n /**\r\n * @deprecated should have been internal use only.\r\n * @param {string} src UTF-8 string\r\n * @returns {string} UTF-16 string\r\n */\r\n var utob = function (u) { return u.replace(re_utob, cb_utob); };\r\n //\r\n var _encode = _hasBuffer\r\n ? function (s) { return Buffer.from(s, 'utf8').toString('base64'); }\r\n : _TE\r\n ? function (s) { return _fromUint8Array(_TE.encode(s)); }\r\n : function (s) { return _btoa(utob(s)); };\r\n /**\r\n * converts a UTF-8-encoded string to a Base64 string.\r\n * @param {boolean} [urlsafe] if `true` make the result URL-safe\r\n * @returns {string} Base64 string\r\n */\r\n var encode = function (src, urlsafe) {\r\n if (urlsafe === void 0) { urlsafe = false; }\r\n return urlsafe\r\n ? _mkUriSafe(_encode(src))\r\n : _encode(src);\r\n };\r\n /**\r\n * converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.\r\n * @returns {string} Base64 string\r\n */\r\n var encodeURI = function (src) { return encode(src, true); };\r\n // This trick is found broken https://github.com/dankogai/js-base64/issues/130\r\n // const btou = (src: string) => decodeURIComponent(escape(src));\r\n // reverting good old fationed regexp\r\n var re_btou = /[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xF7][\\x80-\\xBF]{3}/g;\r\n var cb_btou = function (cccc) {\r\n switch (cccc.length) {\r\n case 4:\r\n var cp = ((0x07 & cccc.charCodeAt(0)) << 18)\r\n | ((0x3f & cccc.charCodeAt(1)) << 12)\r\n | ((0x3f & cccc.charCodeAt(2)) << 6)\r\n | (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000;\r\n return (_fromCC((offset >>> 10) + 0xD800)\r\n + _fromCC((offset & 0x3FF) + 0xDC00));\r\n case 3:\r\n return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12)\r\n | ((0x3f & cccc.charCodeAt(1)) << 6)\r\n | (0x3f & cccc.charCodeAt(2)));\r\n default:\r\n return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6)\r\n | (0x3f & cccc.charCodeAt(1)));\r\n }\r\n };\r\n /**\r\n * @deprecated should have been internal use only.\r\n * @param {string} src UTF-16 string\r\n * @returns {string} UTF-8 string\r\n */\r\n var btou = function (b) { return b.replace(re_btou, cb_btou); };\r\n /**\r\n * polyfill version of `atob`\r\n */\r\n var atobPolyfill = function (asc) {\r\n // console.log('polyfilled');\r\n asc = asc.replace(/\\s+/g, '');\r\n if (!b64re.test(asc))\r\n throw new TypeError('malformed base64.');\r\n asc += '=='.slice(2 - (asc.length & 3));\r\n var u24, bin = '', r1, r2;\r\n for (var i = 0; i < asc.length;) {\r\n u24 = b64tab[asc.charAt(i++)] << 18\r\n | b64tab[asc.charAt(i++)] << 12\r\n | (r1 = b64tab[asc.charAt(i++)]) << 6\r\n | (r2 = b64tab[asc.charAt(i++)]);\r\n bin += r1 === 64 ? _fromCC(u24 >> 16 & 255)\r\n : r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255)\r\n : _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);\r\n }\r\n return bin;\r\n };\r\n /**\r\n * does what `window.atob` of web browsers do.\r\n * @param {String} asc Base64-encoded string\r\n * @returns {string} binary string\r\n */\r\n var _atob = _hasatob ? function (asc) { return atob(_tidyB64(asc)); }\r\n : _hasBuffer ? function (asc) { return Buffer.from(asc, 'base64').toString('binary'); }\r\n : atobPolyfill;\r\n //\r\n var _toUint8Array = _hasBuffer\r\n ? function (a) { return _U8Afrom(Buffer.from(a, 'base64')); }\r\n : function (a) { return _U8Afrom(_atob(a), function (c) { return c.charCodeAt(0); }); };\r\n /**\r\n * converts a Base64 string to a Uint8Array.\r\n */\r\n var toUint8Array = function (a) { return _toUint8Array(_unURI(a)); };\r\n //\r\n var _decode = _hasBuffer\r\n ? function (a) { return Buffer.from(a, 'base64').toString('utf8'); }\r\n : _TD\r\n ? function (a) { return _TD.decode(_toUint8Array(a)); }\r\n : function (a) { return btou(_atob(a)); };\r\n var _unURI = function (a) { return _tidyB64(a.replace(/[-_]/g, function (m0) { return m0 == '-' ? '+' : '/'; })); };\r\n /**\r\n * converts a Base64 string to a UTF-8 string.\r\n * @param {String} src Base64 string. Both normal and URL-safe are supported\r\n * @returns {string} UTF-8 string\r\n */\r\n var decode = function (src) { return _decode(_unURI(src)); };\r\n /**\r\n * check if a value is a valid Base64 string\r\n * @param {String} src a value to check\r\n */\r\n var isValid = function (src) {\r\n if (typeof src !== 'string')\r\n return false;\r\n var s = src.replace(/\\s+/g, '').replace(/={0,2}$/, '');\r\n return !/[^\\s0-9a-zA-Z\\+/]/.test(s) || !/[^\\s0-9a-zA-Z\\-_]/.test(s);\r\n };\r\n //\r\n var _noEnum = function (v) {\r\n return {\r\n value: v, enumerable: false, writable: true, configurable: true\r\n };\r\n };\r\n /**\r\n * extend String.prototype with relevant methods\r\n */\r\n var extendString = function () {\r\n var _add = function (name, body) { return Object.defineProperty(String.prototype, name, _noEnum(body)); };\r\n _add('fromBase64', function () { return decode(this); });\r\n _add('toBase64', function (urlsafe) { return encode(this, urlsafe); });\r\n _add('toBase64URI', function () { return encode(this, true); });\r\n _add('toBase64URL', function () { return encode(this, true); });\r\n _add('toUint8Array', function () { return toUint8Array(this); });\r\n };\r\n /**\r\n * extend Uint8Array.prototype with relevant methods\r\n */\r\n var extendUint8Array = function () {\r\n var _add = function (name, body) { return Object.defineProperty(Uint8Array.prototype, name, _noEnum(body)); };\r\n _add('toBase64', function (urlsafe) { return fromUint8Array(this, urlsafe); });\r\n _add('toBase64URI', function () { return fromUint8Array(this, true); });\r\n _add('toBase64URL', function () { return fromUint8Array(this, true); });\r\n };\r\n /**\r\n * extend Builtin prototypes with relevant methods\r\n */\r\n var extendBuiltins = function () {\r\n extendString();\r\n extendUint8Array();\r\n };\r\n var gBase64 = {\r\n version: version,\r\n VERSION: VERSION,\r\n atob: _atob,\r\n atobPolyfill: atobPolyfill,\r\n btoa: _btoa,\r\n btoaPolyfill: btoaPolyfill,\r\n fromBase64: decode,\r\n toBase64: encode,\r\n encode: encode,\r\n encodeURI: encodeURI,\r\n encodeURL: encodeURI,\r\n utob: utob,\r\n btou: btou,\r\n decode: decode,\r\n isValid: isValid,\r\n fromUint8Array: fromUint8Array,\r\n toUint8Array: toUint8Array,\r\n extendString: extendString,\r\n extendUint8Array: extendUint8Array,\r\n extendBuiltins: extendBuiltins\r\n };\r\n //\r\n // export Base64 to the namespace\r\n //\r\n // ES5 is yet to have Object.assign() that may make transpilers unhappy.\r\n // gBase64.Base64 = Object.assign({}, gBase64);\r\n gBase64.Base64 = {};\r\n Object.keys(gBase64).forEach(function (k) { return gBase64.Base64[k] = gBase64[k]; });\r\n return gBase64;\r\n}));\r\n"]}