diff --git a/jero-web/.eslintrc.js b/jero-web/.eslintrc.js new file mode 100644 index 00000000..7bdfe3ec --- /dev/null +++ b/jero-web/.eslintrc.js @@ -0,0 +1,20 @@ +module.exports = { + root: true, + env: { + node: true + }, + 'extends': [ + 'plugin:vue/essential', + '@vue/standard' + ], + parserOptions: { + parser: 'babel-eslint' + }, + rules: { + 'quotes': [2, 'single', { + 'avoidEscape': true, + 'allowTemplateLiterals': true + }], + 'semi': [2, 'never'], + } +} diff --git a/jero-web/babel.config.js b/jero-web/babel.config.js index bef7ac49..f05294d6 100644 --- a/jero-web/babel.config.js +++ b/jero-web/babel.config.js @@ -1,6 +1,6 @@ module.exports = { presets: [ ['@vue/app', - { useBuiltIns: 'entry' }] + { useBuiltIns: 'entry' }] ] } diff --git a/jero-web/idea.config.js b/jero-web/idea.config.js index ad5afd19..34c13849 100644 --- a/jero-web/idea.config.js +++ b/jero-web/idea.config.js @@ -6,19 +6,19 @@ function resolve (dir) { } module.exports = { - context: path.resolve(__dirname, './'), - resolve: { - extensions: ['.js', '.vue', '.json'], - alias: { - 'config': resolve('config'), - '@': resolve('src'), - '@views': resolve('src/views'), - '@comp': resolve('src/components'), - '@core': resolve('src/core'), - '@utils': resolve('src/utils'), - '@entry': resolve('src/entry'), - '@router': resolve('src/router'), - '@store': resolve('src/store') - } + context: path.resolve(__dirname, './'), + resolve: { + extensions: ['.js', '.vue', '.json'], + alias: { + config: resolve('config'), + '@': resolve('src'), + '@views': resolve('src/views'), + '@comp': resolve('src/components'), + '@core': resolve('src/core'), + '@utils': resolve('src/utils'), + '@entry': resolve('src/entry'), + '@router': resolve('src/router'), + '@store': resolve('src/store') } + } } diff --git a/jero-web/public/api_address_config.js b/jero-web/public/api_address_config.js index 3f7793c1..9b6674c9 100644 --- a/jero-web/public/api_address_config.js +++ b/jero-web/public/api_address_config.js @@ -2,11 +2,11 @@ * 防止打包部署时路径被写死 */ window._CONFIG = {} -window._CONFIG['domianURL'] = '/jero-boot' // 路由转发 devServer -window._CONFIG['domianWebSocketURL'] = 'http://localhost:8080' +window._CONFIG.domianURL = '/jero-boot' // 路由转发 devServer +window._CONFIG.domianWebSocketURL = 'http://localhost:8080' // 单点登录地址 -window._CONFIG['staticDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/download' -window._CONFIG['pdfDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/pdf/pdfPreviewIframe' -window._CONFIG['casPrefixUrl'] = 'http://cas.example.org:8443/cas' +window._CONFIG.staticDomainURL = window._CONFIG.domianURL + '/sys/common/download' +window._CONFIG.pdfDomainURL = window._CONFIG.domianURL + '/sys/common/pdf/pdfPreviewIframe' +window._CONFIG.casPrefixUrl = 'http://cas.example.org:8443/cas' // 预览文件地址 -window._CONFIG['onlinePreviewDomainURL'] = 'http://127.0.0.1:8012/onlinePreview' +window._CONFIG.onlinePreviewDomainURL = 'http://127.0.0.1:8012/onlinePreview' diff --git a/jero-web/public/cdn/babel-polyfill/polyfill_7_2_5.js b/jero-web/public/cdn/babel-polyfill/polyfill_7_2_5.js index 250b921f..a2ea8c4b 100644 --- a/jero-web/public/cdn/babel-polyfill/polyfill_7_2_5.js +++ b/jero-web/public/cdn/babel-polyfill/polyfill_7_2_5.js @@ -1,6424 +1,6480 @@ -(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 2 ? arguments[2] : undefined; - var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); - var inc = 1; - if (from < to && to < from + count) { - inc = -1; - from += count - 1; - to += count - 1; - } - while (count-- > 0) { - if (from in O) O[to] = O[from]; - else delete O[to]; - to += inc; - from += inc; - } return O; -}; - -},{"113":113,"117":117,"118":118}],18:[function(_dereq_,module,exports){ -// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) -'use strict'; -var toObject = _dereq_(118); -var toAbsoluteIndex = _dereq_(113); -var toLength = _dereq_(117); -module.exports = function fill(value /* , start = 0, end = @length */) { - var O = toObject(this); - var length = toLength(O.length); - var aLen = arguments.length; - var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); - var end = aLen > 2 ? arguments[2] : undefined; - var endPos = end === undefined ? length : toAbsoluteIndex(end, length); - while (endPos > index) O[index++] = value; - return O; -}; - -},{"113":113,"117":117,"118":118}],19:[function(_dereq_,module,exports){ -// false -> Array#indexOf -// true -> Array#includes -var toIObject = _dereq_(116); -var toLength = _dereq_(117); -var toAbsoluteIndex = _dereq_(113); -module.exports = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIObject($this); - var length = toLength(O.length); - var index = toAbsoluteIndex(fromIndex, length); - var value; - // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; - // eslint-disable-next-line no-self-compare - if (value != value) return true; - // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) if (IS_INCLUDES || index in O) { - if (O[index] === el) return IS_INCLUDES || index || 0; - } return !IS_INCLUDES && -1; - }; -}; - -},{"113":113,"116":116,"117":117}],20:[function(_dereq_,module,exports){ -// 0 -> Array#forEach -// 1 -> Array#map -// 2 -> Array#filter -// 3 -> Array#some -// 4 -> Array#every -// 5 -> Array#find -// 6 -> Array#findIndex -var ctx = _dereq_(32); -var IObject = _dereq_(53); -var toObject = _dereq_(118); -var toLength = _dereq_(117); -var asc = _dereq_(23); -module.exports = function (TYPE, $create) { - var IS_MAP = TYPE == 1; - var IS_FILTER = TYPE == 2; - var IS_SOME = TYPE == 3; - var IS_EVERY = TYPE == 4; - var IS_FIND_INDEX = TYPE == 6; - var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; - var create = $create || asc; - return function ($this, callbackfn, that) { - var O = toObject($this); - var self = IObject(O); - var f = ctx(callbackfn, that, 3); - var length = toLength(self.length); - var index = 0; - var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; - var val, res; - for (;length > index; index++) if (NO_HOLES || index in self) { - val = self[index]; - res = f(val, index, O); - if (TYPE) { - if (IS_MAP) result[index] = res; // map - else if (res) switch (TYPE) { - case 3: return true; // some - case 5: return val; // find - case 6: return index; // findIndex - case 2: result.push(val); // filter - } else if (IS_EVERY) return false; // every + module.exports = [].copyWithin || function copyWithin (target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this) + var len = toLength(O.length) + var to = toAbsoluteIndex(target, len) + var from = toAbsoluteIndex(start, len) + var end = arguments.length > 2 ? arguments[2] : undefined + var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to) + var inc = 1 + if (from < to && to < from + count) { + inc = -1 + from += count - 1 + to += count - 1 + } + while (count-- > 0) { + if (from in O) O[to] = O[from] + else delete O[to] + to += inc + from += inc + } return O + } + }, { 113: 113, 117: 117, 118: 118 }], + 18: [function (_dereq_, module, exports) { + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + 'use strict' + var toObject = _dereq_(118) + var toAbsoluteIndex = _dereq_(113) + var toLength = _dereq_(117) + module.exports = function fill (value /* , start = 0, end = @length */) { + var O = toObject(this) + var length = toLength(O.length) + var aLen = arguments.length + var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length) + var end = aLen > 2 ? arguments[2] : undefined + var endPos = end === undefined ? length : toAbsoluteIndex(end, length) + while (endPos > index) O[index++] = value + return O + } + }, { 113: 113, 117: 117, 118: 118 }], + 19: [function (_dereq_, module, exports) { + // false -> Array#indexOf + // true -> Array#includes + var toIObject = _dereq_(116) + var toLength = _dereq_(117) + var toAbsoluteIndex = _dereq_(113) + module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this) + var length = toLength(O.length) + var index = toAbsoluteIndex(fromIndex, length) + var value + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) { + while (length > index) { + value = O[index++] + // eslint-disable-next-line no-self-compare + if (value != value) return true + // Array#indexOf ignores holes, Array#includes - not + } + } else { + for (;length > index; index++) { + if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0 + } + } + } return !IS_INCLUDES && -1 } } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; - }; -}; - -},{"117":117,"118":118,"23":23,"32":32,"53":53}],21:[function(_dereq_,module,exports){ -var aFunction = _dereq_(11); -var toObject = _dereq_(118); -var IObject = _dereq_(53); -var toLength = _dereq_(117); - -module.exports = function (that, callbackfn, aLen, memo, isRight) { - aFunction(callbackfn); - var O = toObject(that); - var self = IObject(O); - var length = toLength(O.length); - var index = isRight ? length - 1 : 0; - var i = isRight ? -1 : 1; - if (aLen < 2) for (;;) { - if (index in self) { - memo = self[index]; - index += i; - break; - } - index += i; - if (isRight ? index < 0 : length <= index) { - throw TypeError('Reduce of empty array with no initial value'); - } - } - for (;isRight ? index >= 0 : length > index; index += i) if (index in self) { - memo = callbackfn(memo, self[index], index, O); - } - return memo; -}; - -},{"11":11,"117":117,"118":118,"53":53}],22:[function(_dereq_,module,exports){ -var isObject = _dereq_(57); -var isArray = _dereq_(55); -var SPECIES = _dereq_(128)('species'); - -module.exports = function (original) { - var C; - if (isArray(original)) { - C = original.constructor; - // cross-realm fallback - if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; - if (isObject(C)) { - C = C[SPECIES]; - if (C === null) C = undefined; - } - } return C === undefined ? Array : C; -}; - -},{"128":128,"55":55,"57":57}],23:[function(_dereq_,module,exports){ -// 9.4.2.3 ArraySpeciesCreate(originalArray, length) -var speciesConstructor = _dereq_(22); - -module.exports = function (original, length) { - return new (speciesConstructor(original))(length); -}; - -},{"22":22}],24:[function(_dereq_,module,exports){ -'use strict'; -var aFunction = _dereq_(11); -var isObject = _dereq_(57); -var invoke = _dereq_(52); -var arraySlice = [].slice; -var factories = {}; - -var construct = function (F, len, args) { - if (!(len in factories)) { - for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; - // eslint-disable-next-line no-new-func - factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); - } return factories[len](F, args); -}; - -module.exports = Function.bind || function bind(that /* , ...args */) { - var fn = aFunction(this); - var partArgs = arraySlice.call(arguments, 1); - var bound = function (/* args... */) { - var args = partArgs.concat(arraySlice.call(arguments)); - return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); - }; - if (isObject(fn.prototype)) bound.prototype = fn.prototype; - return bound; -}; - -},{"11":11,"52":52,"57":57}],25:[function(_dereq_,module,exports){ -// getting tag from 19.1.3.6 Object.prototype.toString() -var cof = _dereq_(26); -var TAG = _dereq_(128)('toStringTag'); -// ES3 wrong here -var ARG = cof(function () { return arguments; }()) == 'Arguments'; - -// fallback for IE11 Script Access Denied error -var tryGet = function (it, key) { - try { - return it[key]; - } catch (e) { /* empty */ } -}; - -module.exports = function (it) { - var O, T, B; - return it === undefined ? 'Undefined' : it === null ? 'Null' - // @@toStringTag case - : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T - // builtinTag case - : ARG ? cof(O) - // ES3 arguments fallback - : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; -}; - -},{"128":128,"26":26}],26:[function(_dereq_,module,exports){ -var toString = {}.toString; - -module.exports = function (it) { - return toString.call(it).slice(8, -1); -}; - -},{}],27:[function(_dereq_,module,exports){ -'use strict'; -var dP = _dereq_(75).f; -var create = _dereq_(74); -var redefineAll = _dereq_(93); -var ctx = _dereq_(32); -var anInstance = _dereq_(15); -var forOf = _dereq_(45); -var $iterDefine = _dereq_(61); -var step = _dereq_(63); -var setSpecies = _dereq_(99); -var DESCRIPTORS = _dereq_(36); -var fastKey = _dereq_(70).fastKey; -var validate = _dereq_(125); -var SIZE = DESCRIPTORS ? '_s' : 'size'; - -var getEntry = function (that, key) { - // fast case - var index = fastKey(key); - var entry; - if (index !== 'F') return that._i[index]; - // frozen object case - for (entry = that._f; entry; entry = entry.n) { - if (entry.k == key) return entry; - } -}; - -module.exports = { - getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { - var C = wrapper(function (that, iterable) { - anInstance(that, C, NAME, '_i'); - that._t = NAME; // collection type - that._i = create(null); // index - that._f = undefined; // first entry - that._l = undefined; // last entry - that[SIZE] = 0; // size - if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); - }); - redefineAll(C.prototype, { - // 23.1.3.1 Map.prototype.clear() - // 23.2.3.2 Set.prototype.clear() - clear: function clear() { - for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { - entry.r = true; - if (entry.p) entry.p = entry.p.n = undefined; - delete data[entry.i]; + }, { 113: 113, 116: 116, 117: 117 }], + 20: [function (_dereq_, module, exports) { + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + var ctx = _dereq_(32) + var IObject = _dereq_(53) + var toObject = _dereq_(118) + var toLength = _dereq_(117) + var asc = _dereq_(23) + module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1 + var IS_FILTER = TYPE == 2 + var IS_SOME = TYPE == 3 + var IS_EVERY = TYPE == 4 + var IS_FIND_INDEX = TYPE == 6 + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX + var create = $create || asc + return function ($this, callbackfn, that) { + var O = toObject($this) + var self = IObject(O) + var f = ctx(callbackfn, that, 3) + var length = toLength(self.length) + var index = 0 + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined + var val, res + for (;length > index; index++) { + if (NO_HOLES || index in self) { + val = self[index] + res = f(val, index, O) + if (TYPE) { + if (IS_MAP) result[index] = res // map + else if (res) { + switch (TYPE) { + case 3: return true // some + case 5: return val // find + case 6: return index // findIndex + case 2: result.push(val) // filter + } + } else if (IS_EVERY) return false // every + } + } } - that._f = that._l = undefined; - that[SIZE] = 0; + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result + } + } + }, { 117: 117, 118: 118, 23: 23, 32: 32, 53: 53 }], + 21: [function (_dereq_, module, exports) { + var aFunction = _dereq_(11) + var toObject = _dereq_(118) + var IObject = _dereq_(53) + var toLength = _dereq_(117) + + module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn) + var O = toObject(that) + var self = IObject(O) + var length = toLength(O.length) + var index = isRight ? length - 1 : 0 + var i = isRight ? -1 : 1 + if (aLen < 2) { + for (;;) { + if (index in self) { + memo = self[index] + index += i + break + } + index += i + if (isRight ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value') + } + } + } + for (;isRight ? index >= 0 : length > index; index += i) { + if (index in self) { + memo = callbackfn(memo, self[index], index, O) + } + } + return memo + } + }, { 11: 11, 117: 117, 118: 118, 53: 53 }], + 22: [function (_dereq_, module, exports) { + var isObject = _dereq_(57) + var isArray = _dereq_(55) + var SPECIES = _dereq_(128)('species') + + module.exports = function (original) { + var C + if (isArray(original)) { + C = original.constructor + // cross-realm fallback + if (typeof C === 'function' && (C === Array || isArray(C.prototype))) C = undefined + if (isObject(C)) { + C = C[SPECIES] + if (C === null) C = undefined + } + } return C === undefined ? Array : C + } + }, { 128: 128, 55: 55, 57: 57 }], + 23: [function (_dereq_, module, exports) { + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + var speciesConstructor = _dereq_(22) + + module.exports = function (original, length) { + return new (speciesConstructor(original))(length) + } + }, { 22: 22 }], + 24: [function (_dereq_, module, exports) { + 'use strict' + var aFunction = _dereq_(11) + var isObject = _dereq_(57) + var invoke = _dereq_(52) + var arraySlice = [].slice + var factories = {} + + var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']' + // eslint-disable-next-line no-new-func + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')') + } return factories[len](F, args) + } + + module.exports = Function.bind || function bind (that /* , ...args */) { + var fn = aFunction(this) + var partArgs = arraySlice.call(arguments, 1) + var bound = function (/* args... */) { + var args = partArgs.concat(arraySlice.call(arguments)) + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that) + } + if (isObject(fn.prototype)) bound.prototype = fn.prototype + return bound + } + }, { 11: 11, 52: 52, 57: 57 }], + 25: [function (_dereq_, module, exports) { + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = _dereq_(26) + var TAG = _dereq_(128)('toStringTag') + // ES3 wrong here + var ARG = cof(function () { return arguments }()) == 'Arguments' + + // fallback for IE11 Script Access Denied error + var tryGet = function (it, key) { + try { + return it[key] + } catch (e) { /* empty */ } + } + + module.exports = function (it) { + var O, T, B + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) === 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee === 'function' ? 'Arguments' : B + } + }, { 128: 128, 26: 26 }], + 26: [function (_dereq_, module, exports) { + var toString = {}.toString + + module.exports = function (it) { + return toString.call(it).slice(8, -1) + } + }, {}], + 27: [function (_dereq_, module, exports) { + 'use strict' + var dP = _dereq_(75).f + var create = _dereq_(74) + var redefineAll = _dereq_(93) + var ctx = _dereq_(32) + var anInstance = _dereq_(15) + var forOf = _dereq_(45) + var $iterDefine = _dereq_(61) + var step = _dereq_(63) + var setSpecies = _dereq_(99) + var DESCRIPTORS = _dereq_(36) + var fastKey = _dereq_(70).fastKey + var validate = _dereq_(125) + var SIZE = DESCRIPTORS ? '_s' : 'size' + + var getEntry = function (that, key) { + // fast case + var index = fastKey(key) + var entry + if (index !== 'F') return that._i[index] + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry + } + } + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i') + that._t = NAME // collection type + that._i = create(null) // index + that._f = undefined // first entry + that._l = undefined // last entry + that[SIZE] = 0 // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that) + }) + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear () { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true + if (entry.p) entry.p = entry.p.n = undefined + delete data[entry.i] + } + that._f = that._l = undefined + that[SIZE] = 0 + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + delete: function (key) { + var that = validate(this, NAME) + var entry = getEntry(that, key) + if (entry) { + var next = entry.n + var prev = entry.p + delete that._i[entry.i] + entry.r = true + if (prev) prev.n = next + if (next) next.p = prev + if (that._f == entry) that._f = next + if (that._l == entry) that._l = prev + that[SIZE]-- + } return !!entry + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach (callbackfn /* , that = undefined */) { + validate(this, NAME) + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3) + var entry + while (entry = entry ? entry.n : this._f) { + f(entry.v, entry.k, this) + // revert to the last existing entry + while (entry && entry.r) entry = entry.p + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has (key) { + return !!getEntry(validate(this, NAME), key) + } + }) + if (DESCRIPTORS) { + dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE] + } + }) + } + return C }, - // 23.1.3.3 Map.prototype.delete(key) - // 23.2.3.4 Set.prototype.delete(value) - 'delete': function (key) { - var that = validate(this, NAME); - var entry = getEntry(that, key); + def: function (that, key, value) { + var entry = getEntry(that, key) + var prev, index + // change existing entry if (entry) { - var next = entry.n; - var prev = entry.p; - delete that._i[entry.i]; - entry.r = true; - if (prev) prev.n = next; - if (next) next.p = prev; - if (that._f == entry) that._f = next; - if (that._l == entry) that._l = prev; - that[SIZE]--; - } return !!entry; + entry.v = value + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + } + if (!that._f) that._f = entry + if (prev) prev.n = entry + that[SIZE]++ + // add to index + if (index !== 'F') that._i[index] = entry + } return that }, - // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) - // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) - forEach: function forEach(callbackfn /* , that = undefined */) { - validate(this, NAME); - var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); - var entry; - while (entry = entry ? entry.n : this._f) { - f(entry.v, entry.k, this); + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function (iterated, kind) { + this._t = validate(iterated, NAME) // target + this._k = kind // kind + this._l = undefined // previous + }, function () { + var that = this + var kind = that._k + var entry = that._l // revert to the last existing entry - while (entry && entry.r) entry = entry.p; + while (entry && entry.r) entry = entry.p + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined + return step(1) + } + // return step by kind + if (kind == 'keys') return step(0, entry.k) + if (kind == 'values') return step(0, entry.v) + return step(0, [entry.k, entry.v]) + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true) + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME) + } + } + }, { 125: 125, 15: 15, 32: 32, 36: 36, 45: 45, 61: 61, 63: 63, 70: 70, 74: 74, 75: 75, 93: 93, 99: 99 }], + 28: [function (_dereq_, module, exports) { + 'use strict' + var redefineAll = _dereq_(93) + var getWeak = _dereq_(70).getWeak + var anObject = _dereq_(16) + var isObject = _dereq_(57) + var anInstance = _dereq_(15) + var forOf = _dereq_(45) + var createArrayMethod = _dereq_(20) + var $has = _dereq_(47) + var validate = _dereq_(125) + var arrayFind = createArrayMethod(5) + var arrayFindIndex = createArrayMethod(6) + var id = 0 + + // fallback for uncaught frozen keys + var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()) + } + var UncaughtFrozenStore = function () { + this.a = [] + } + var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key + }) + } + UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key) + if (entry) return entry[1] + }, + has: function (key) { + return !!findUncaughtFrozen(this, key) + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key) + if (entry) entry[1] = value + else this.a.push([key, value]) + }, + delete: function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key + }) + if (~index) this.a.splice(index, 1) + return !!~index + } + } + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i') + that._t = NAME // collection type + that._i = id++ // collection id + that._l = undefined // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that) + }) + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + delete: function (key) { + if (!isObject(key)) return false + var data = getWeak(key) + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).delete(key) + return data && $has(data, this._i) && delete data[this._i] + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has (key) { + if (!isObject(key)) return false + var data = getWeak(key) + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key) + return data && $has(data, this._i) + } + }) + return C + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true) + if (data === true) uncaughtFrozenStore(that).set(key, value) + else data[that._i] = value + return that + }, + ufstore: uncaughtFrozenStore + } + }, { 125: 125, 15: 15, 16: 16, 20: 20, 45: 45, 47: 47, 57: 57, 70: 70, 93: 93 }], + 29: [function (_dereq_, module, exports) { + 'use strict' + var global = _dereq_(46) + var $export = _dereq_(40) + var redefine = _dereq_(94) + var redefineAll = _dereq_(93) + var meta = _dereq_(70) + var forOf = _dereq_(45) + var anInstance = _dereq_(15) + var isObject = _dereq_(57) + var fails = _dereq_(42) + var $iterDetect = _dereq_(62) + var setToStringTag = _dereq_(100) + var inheritIfRequired = _dereq_(51) + + module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME] + var C = Base + var ADDER = IS_MAP ? 'set' : 'add' + var proto = C && C.prototype + var O = {} + var fixMethod = function (KEY) { + var fn = proto[KEY] + redefine(proto, KEY, + KEY == 'delete' ? function (a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a) + } : KEY == 'has' ? function has (a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a) + } : KEY == 'get' ? function get (a) { + return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a) + } : KEY == 'add' ? function add (a) { fn.call(this, a === 0 ? 0 : a); return this } + : function set (a, b) { fn.call(this, a === 0 ? 0 : a, b); return this } + ) + } + if (typeof C !== 'function' || !(IS_WEAK || proto.forEach && !fails(function () { + new C().entries().next() + }))) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER) + redefineAll(C.prototype, methods) + meta.NEED = true + } else { + var instance = new C() + // early implementations not supports chaining + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1) }) + // most early implementations doesn't supports iterables, most modern - not close it correctly + var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter) }) // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = !IS_WEAK && fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C() + var index = 5 + while (index--) $instance[ADDER](index, index) + return !$instance.has(-0) + }) + if (!ACCEPT_ITERABLES) { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME) + var that = inheritIfRequired(new Base(), target, C) + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that) + return that + }) + C.prototype = proto + proto.constructor = C } - }, - // 23.1.3.7 Map.prototype.has(key) - // 23.2.3.7 Set.prototype.has(value) - has: function has(key) { - return !!getEntry(validate(this, NAME), key); + if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { + fixMethod('delete') + fixMethod('has') + IS_MAP && fixMethod('get') + } + if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER) + // weak collections should not contains .clear method + if (IS_WEAK && proto.clear) delete proto.clear } - }); - if (DESCRIPTORS) dP(C.prototype, 'size', { - get: function () { - return validate(this, NAME)[SIZE]; - } - }); - return C; - }, - def: function (that, key, value) { - var entry = getEntry(that, key); - var prev, index; - // change existing entry - if (entry) { - entry.v = value; - // create new entry - } else { - that._l = entry = { - i: index = fastKey(key, true), // <- index - k: key, // <- key - v: value, // <- value - p: prev = that._l, // <- previous entry - n: undefined, // <- next entry - r: false // <- removed - }; - if (!that._f) that._f = entry; - if (prev) prev.n = entry; - that[SIZE]++; - // add to index - if (index !== 'F') that._i[index] = entry; - } return that; - }, - getEntry: getEntry, - setStrong: function (C, NAME, IS_MAP) { - // add .keys, .values, .entries, [@@iterator] - // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 - $iterDefine(C, NAME, function (iterated, kind) { - this._t = validate(iterated, NAME); // target - this._k = kind; // kind - this._l = undefined; // previous - }, function () { - var that = this; - var kind = that._k; - var entry = that._l; - // revert to the last existing entry - while (entry && entry.r) entry = entry.p; - // get next entry - if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { - // or finish the iteration - that._t = undefined; - return step(1); - } - // return step by kind - if (kind == 'keys') return step(0, entry.k); - if (kind == 'values') return step(0, entry.v); - return step(0, [entry.k, entry.v]); - }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); - // add [@@species], 23.1.2.2, 23.2.2.2 - setSpecies(NAME); - } -}; + setToStringTag(C, NAME) -},{"125":125,"15":15,"32":32,"36":36,"45":45,"61":61,"63":63,"70":70,"74":74,"75":75,"93":93,"99":99}],28:[function(_dereq_,module,exports){ -'use strict'; -var redefineAll = _dereq_(93); -var getWeak = _dereq_(70).getWeak; -var anObject = _dereq_(16); -var isObject = _dereq_(57); -var anInstance = _dereq_(15); -var forOf = _dereq_(45); -var createArrayMethod = _dereq_(20); -var $has = _dereq_(47); -var validate = _dereq_(125); -var arrayFind = createArrayMethod(5); -var arrayFindIndex = createArrayMethod(6); -var id = 0; + O[NAME] = C + $export($export.G + $export.W + $export.F * (C != Base), O) -// fallback for uncaught frozen keys -var uncaughtFrozenStore = function (that) { - return that._l || (that._l = new UncaughtFrozenStore()); -}; -var UncaughtFrozenStore = function () { - this.a = []; -}; -var findUncaughtFrozen = function (store, key) { - return arrayFind(store.a, function (it) { - return it[0] === key; - }); -}; -UncaughtFrozenStore.prototype = { - get: function (key) { - var entry = findUncaughtFrozen(this, key); - if (entry) return entry[1]; - }, - has: function (key) { - return !!findUncaughtFrozen(this, key); - }, - set: function (key, value) { - var entry = findUncaughtFrozen(this, key); - if (entry) entry[1] = value; - else this.a.push([key, value]); - }, - 'delete': function (key) { - var index = arrayFindIndex(this.a, function (it) { - return it[0] === key; - }); - if (~index) this.a.splice(index, 1); - return !!~index; - } -}; + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP) -module.exports = { - getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { - var C = wrapper(function (that, iterable) { - anInstance(that, C, NAME, '_i'); - that._t = NAME; // collection type - that._i = id++; // collection id - that._l = undefined; // leak store for uncaught frozen objects - if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); - }); - redefineAll(C.prototype, { - // 23.3.3.2 WeakMap.prototype.delete(key) - // 23.4.3.3 WeakSet.prototype.delete(value) - 'delete': function (key) { - if (!isObject(key)) return false; - var data = getWeak(key); - if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); - return data && $has(data, this._i) && delete data[this._i]; - }, - // 23.3.3.4 WeakMap.prototype.has(key) - // 23.4.3.4 WeakSet.prototype.has(value) - has: function has(key) { - if (!isObject(key)) return false; - var data = getWeak(key); - if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); - return data && $has(data, this._i); - } - }); - return C; - }, - def: function (that, key, value) { - var data = getWeak(anObject(key), true); - if (data === true) uncaughtFrozenStore(that).set(key, value); - else data[that._i] = value; - return that; - }, - ufstore: uncaughtFrozenStore -}; - -},{"125":125,"15":15,"16":16,"20":20,"45":45,"47":47,"57":57,"70":70,"93":93}],29:[function(_dereq_,module,exports){ -'use strict'; -var global = _dereq_(46); -var $export = _dereq_(40); -var redefine = _dereq_(94); -var redefineAll = _dereq_(93); -var meta = _dereq_(70); -var forOf = _dereq_(45); -var anInstance = _dereq_(15); -var isObject = _dereq_(57); -var fails = _dereq_(42); -var $iterDetect = _dereq_(62); -var setToStringTag = _dereq_(100); -var inheritIfRequired = _dereq_(51); - -module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { - var Base = global[NAME]; - var C = Base; - var ADDER = IS_MAP ? 'set' : 'add'; - var proto = C && C.prototype; - var O = {}; - var fixMethod = function (KEY) { - var fn = proto[KEY]; - redefine(proto, KEY, - KEY == 'delete' ? function (a) { - return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); - } : KEY == 'has' ? function has(a) { - return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); - } : KEY == 'get' ? function get(a) { - return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); - } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; } - : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; } - ); - }; - if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { - new C().entries().next(); - }))) { - // create collection constructor - C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); - redefineAll(C.prototype, methods); - meta.NEED = true; - } else { - var instance = new C(); - // early implementations not supports chaining - var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; - // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false - var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); - // most early implementations doesn't supports iterables, most modern - not close it correctly - var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new - // for early implementations -0 and +0 not the same - var BUGGY_ZERO = !IS_WEAK && fails(function () { - // V8 ~ Chromium 42- fails only with 5+ elements - var $instance = new C(); - var index = 5; - while (index--) $instance[ADDER](index, index); - return !$instance.has(-0); - }); - if (!ACCEPT_ITERABLES) { - C = wrapper(function (target, iterable) { - anInstance(target, C, NAME); - var that = inheritIfRequired(new Base(), target, C); - if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); - return that; - }); - C.prototype = proto; - proto.constructor = C; + return C } - if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { - fixMethod('delete'); - fixMethod('has'); - IS_MAP && fixMethod('get'); + }, { 100: 100, 15: 15, 40: 40, 42: 42, 45: 45, 46: 46, 51: 51, 57: 57, 62: 62, 70: 70, 93: 93, 94: 94 }], + 30: [function (_dereq_, module, exports) { + var core = module.exports = { version: '2.6.1' } + if (typeof __e === 'number') __e = core // eslint-disable-line no-undef + }, {}], + 31: [function (_dereq_, module, exports) { + 'use strict' + var $defineProperty = _dereq_(75) + var createDesc = _dereq_(92) + + module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)) + else object[index] = value } - if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); - // weak collections should not contains .clear method - if (IS_WEAK && proto.clear) delete proto.clear; - } + }, { 75: 75, 92: 92 }], + 32: [function (_dereq_, module, exports) { + // optional / simple context binding + var aFunction = _dereq_(11) + module.exports = function (fn, that, length) { + aFunction(fn) + if (that === undefined) return fn + switch (length) { + case 1: return function (a) { + return fn.call(that, a) + } + case 2: return function (a, b) { + return fn.call(that, a, b) + } + case 3: return function (a, b, c) { + return fn.call(that, a, b, c) + } + } + return function (/* ...args */) { + return fn.apply(that, arguments) + } + } + }, { 11: 11 }], + 33: [function (_dereq_, module, exports) { + 'use strict' + // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() + var fails = _dereq_(42) + var getTime = Date.prototype.getTime + var $toISOString = Date.prototype.toISOString - setToStringTag(C, NAME); + var lz = function (num) { + return num > 9 ? num : '0' + num + } - O[NAME] = C; - $export($export.G + $export.W + $export.F * (C != Base), O); - - if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); - - return C; -}; - -},{"100":100,"15":15,"40":40,"42":42,"45":45,"46":46,"51":51,"57":57,"62":62,"70":70,"93":93,"94":94}],30:[function(_dereq_,module,exports){ -var core = module.exports = { version: '2.6.1' }; -if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef - -},{}],31:[function(_dereq_,module,exports){ -'use strict'; -var $defineProperty = _dereq_(75); -var createDesc = _dereq_(92); - -module.exports = function (object, index, value) { - if (index in object) $defineProperty.f(object, index, createDesc(0, value)); - else object[index] = value; -}; - -},{"75":75,"92":92}],32:[function(_dereq_,module,exports){ -// optional / simple context binding -var aFunction = _dereq_(11); -module.exports = function (fn, that, length) { - aFunction(fn); - if (that === undefined) return fn; - switch (length) { - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; -}; - -},{"11":11}],33:[function(_dereq_,module,exports){ -'use strict'; -// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() -var fails = _dereq_(42); -var getTime = Date.prototype.getTime; -var $toISOString = Date.prototype.toISOString; - -var lz = function (num) { - return num > 9 ? num : '0' + num; -}; - -// PhantomJS / old WebKit has a broken implementations -module.exports = (fails(function () { - return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; -}) || !fails(function () { - $toISOString.call(new Date(NaN)); -})) ? function toISOString() { - if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); - var d = this; - var y = d.getUTCFullYear(); - var m = d.getUTCMilliseconds(); - var s = y < 0 ? '-' : y > 9999 ? '+' : ''; - return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + // PhantomJS / old WebKit has a broken implementations + module.exports = (fails(function () { + return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z' + }) || !fails(function () { + $toISOString.call(new Date(NaN)) + })) ? function toISOString () { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value') + var d = this + var y = d.getUTCFullYear() + var m = d.getUTCMilliseconds() + var s = y < 0 ? '-' : y > 9999 ? '+' : '' + return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + - ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; -} : $toISOString; + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z' + } : $toISOString + }, { 42: 42 }], + 34: [function (_dereq_, module, exports) { + 'use strict' + var anObject = _dereq_(16) + var toPrimitive = _dereq_(119) + var NUMBER = 'number' -},{"42":42}],34:[function(_dereq_,module,exports){ -'use strict'; -var anObject = _dereq_(16); -var toPrimitive = _dereq_(119); -var NUMBER = 'number'; - -module.exports = function (hint) { - if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); - return toPrimitive(anObject(this), hint != NUMBER); -}; - -},{"119":119,"16":16}],35:[function(_dereq_,module,exports){ -// 7.2.1 RequireObjectCoercible(argument) -module.exports = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; -}; - -},{}],36:[function(_dereq_,module,exports){ -// Thank's IE8 for his funny defineProperty -module.exports = !_dereq_(42)(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; -}); - -},{"42":42}],37:[function(_dereq_,module,exports){ -var isObject = _dereq_(57); -var document = _dereq_(46).document; -// typeof document.createElement is 'object' in old IE -var is = isObject(document) && isObject(document.createElement); -module.exports = function (it) { - return is ? document.createElement(it) : {}; -}; - -},{"46":46,"57":57}],38:[function(_dereq_,module,exports){ -// IE 8- don't enum bug keys -module.exports = ( - 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' -).split(','); - -},{}],39:[function(_dereq_,module,exports){ -// all enumerable object keys, includes symbols -var getKeys = _dereq_(83); -var gOPS = _dereq_(80); -var pIE = _dereq_(84); -module.exports = function (it) { - var result = getKeys(it); - var getSymbols = gOPS.f; - if (getSymbols) { - var symbols = getSymbols(it); - var isEnum = pIE.f; - var i = 0; - var key; - while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); - } return result; -}; - -},{"80":80,"83":83,"84":84}],40:[function(_dereq_,module,exports){ -var global = _dereq_(46); -var core = _dereq_(30); -var hide = _dereq_(48); -var redefine = _dereq_(94); -var ctx = _dereq_(32); -var PROTOTYPE = 'prototype'; - -var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; - var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); - var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); - var key, own, out, exp; - if (IS_GLOBAL) source = name; - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - // export native or passed - out = (own ? target : source)[key]; - // bind timers to global for call from export context - exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // extend global - if (target) redefine(target, key, out, type & $export.U); - // export - if (exports[key] != out) hide(exports, key, exp); - if (IS_PROTO && expProto[key] != out) expProto[key] = out; - } -}; -global.core = core; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -module.exports = $export; - -},{"30":30,"32":32,"46":46,"48":48,"94":94}],41:[function(_dereq_,module,exports){ -var MATCH = _dereq_(128)('match'); -module.exports = function (KEY) { - var re = /./; - try { - '/./'[KEY](re); - } catch (e) { - try { - re[MATCH] = false; - return !'/./'[KEY](re); - } catch (f) { /* empty */ } - } return true; -}; - -},{"128":128}],42:[function(_dereq_,module,exports){ -module.exports = function (exec) { - try { - return !!exec(); - } catch (e) { - return true; - } -}; - -},{}],43:[function(_dereq_,module,exports){ -'use strict'; -_dereq_(224); -var redefine = _dereq_(94); -var hide = _dereq_(48); -var fails = _dereq_(42); -var defined = _dereq_(35); -var wks = _dereq_(128); -var regexpExec = _dereq_(96); - -var SPECIES = wks('species'); - -var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { - // #replace needs built-in support for named groups. - // #match works fine because it just return the exec results, even if it has - // a "grops" property. - var re = /./; - re.exec = function () { - var result = []; - result.groups = { a: '7' }; - return result; - }; - return ''.replace(re, '$') !== '7'; -}); - -var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { - // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec - var re = /(?:)/; - var originalExec = re.exec; - re.exec = function () { return originalExec.apply(this, arguments); }; - var result = 'ab'.split(re); - return result.length === 2 && result[0] === 'a' && result[1] === 'b'; -})(); - -module.exports = function (KEY, length, exec) { - var SYMBOL = wks(KEY); - - var DELEGATES_TO_SYMBOL = !fails(function () { - // String methods call symbol-named RegEp methods - var O = {}; - O[SYMBOL] = function () { return 7; }; - return ''[KEY](O) != 7; - }); - - var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () { - // Symbol-named RegExp methods call .exec - var execCalled = false; - var re = /a/; - re.exec = function () { execCalled = true; return null; }; - if (KEY === 'split') { - // RegExp[@@split] doesn't call the regex's exec method, but first creates - // a new one. We need to return the patched regex when creating the new one. - re.constructor = {}; - re.constructor[SPECIES] = function () { return re; }; + module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint') + return toPrimitive(anObject(this), hint != NUMBER) } - re[SYMBOL](''); - return !execCalled; - }) : undefined; + }, { 119: 119, 16: 16 }], + 35: [function (_dereq_, module, exports) { + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it) + return it + } + }, {}], + 36: [function (_dereq_, module, exports) { + // Thank's IE8 for his funny defineProperty + module.exports = !_dereq_(42)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7 } }).a != 7 + }) + }, { 42: 42 }], + 37: [function (_dereq_, module, exports) { + var isObject = _dereq_(57) + var document = _dereq_(46).document + // typeof document.createElement is 'object' in old IE + var is = isObject(document) && isObject(document.createElement) + module.exports = function (it) { + return is ? document.createElement(it) : {} + } + }, { 46: 46, 57: 57 }], + 38: [function (_dereq_, module, exports) { + // IE 8- don't enum bug keys + module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' + ).split(',') + }, {}], + 39: [function (_dereq_, module, exports) { + // all enumerable object keys, includes symbols + var getKeys = _dereq_(83) + var gOPS = _dereq_(80) + var pIE = _dereq_(84) + module.exports = function (it) { + var result = getKeys(it) + var getSymbols = gOPS.f + if (getSymbols) { + var symbols = getSymbols(it) + var isEnum = pIE.f + var i = 0 + var key + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key) + } return result + } + }, { 80: 80, 83: 83, 84: 84 }], + 40: [function (_dereq_, module, exports) { + var global = _dereq_(46) + var core = _dereq_(30) + var hide = _dereq_(48) + var redefine = _dereq_(94) + var ctx = _dereq_(32) + var PROTOTYPE = 'prototype' - if ( - !DELEGATES_TO_SYMBOL || + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F + var IS_GLOBAL = type & $export.G + var IS_STATIC = type & $export.S + var IS_PROTO = type & $export.P + var IS_BIND = type & $export.B + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE] + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}) + var key, own, out, exp + if (IS_GLOBAL) source = name + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined + // export native or passed + out = (own ? target : source)[key] + // bind timers to global for call from export context + exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out === 'function' ? ctx(Function.call, out) : out + // extend global + if (target) redefine(target, key, out, type & $export.U) + // export + if (exports[key] != out) hide(exports, key, exp) + if (IS_PROTO && expProto[key] != out) expProto[key] = out + } + } + global.core = core + // type bitmap + $export.F = 1 // forced + $export.G = 2 // global + $export.S = 4 // static + $export.P = 8 // proto + $export.B = 16 // bind + $export.W = 32 // wrap + $export.U = 64 // safe + $export.R = 128 // real proto method for `library` + module.exports = $export + }, { 30: 30, 32: 32, 46: 46, 48: 48, 94: 94 }], + 41: [function (_dereq_, module, exports) { + var MATCH = _dereq_(128)('match') + module.exports = function (KEY) { + var re = /./ + try { + '/./'[KEY](re) + } catch (e) { + try { + re[MATCH] = false + return !'/./'[KEY](re) + } catch (f) { /* empty */ } + } return true + } + }, { 128: 128 }], + 42: [function (_dereq_, module, exports) { + module.exports = function (exec) { + try { + return !!exec() + } catch (e) { + return true + } + } + }, {}], + 43: [function (_dereq_, module, exports) { + 'use strict' + _dereq_(224) + var redefine = _dereq_(94) + var hide = _dereq_(48) + var fails = _dereq_(42) + var defined = _dereq_(35) + var wks = _dereq_(128) + var regexpExec = _dereq_(96) + + var SPECIES = wks('species') + + var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./ + re.exec = function () { + var result = [] + result.groups = { a: '7' } + return result + } + return ''.replace(re, '$') !== '7' + }) + + var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + var re = /(?:)/ + var originalExec = re.exec + re.exec = function () { return originalExec.apply(this, arguments) } + var result = 'ab'.split(re) + return result.length === 2 && result[0] === 'a' && result[1] === 'b' + })() + + module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY) + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {} + O[SYMBOL] = function () { return 7 } + return ''[KEY](O) != 7 + }) + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false + var re = /a/ + re.exec = function () { execCalled = true; return null } + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {} + re.constructor[SPECIES] = function () { return re } + } + re[SYMBOL]('') + return !execCalled + }) : undefined + + if ( + !DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) - ) { - var nativeRegExpMethod = /./[SYMBOL]; - var fns = exec( - defined, - SYMBOL, - ''[KEY], - function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { - if (regexp.exec === regexpExec) { - if (DELEGATES_TO_SYMBOL && !forceStringMethod) { - // The native String method already delegates to @@method (this - // polyfilled function), leasing to infinite recursion. - // We avoid it by directly calling the native @@method method. - return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + ) { + var nativeRegExpMethod = /./[SYMBOL] + var fns = exec( + defined, + SYMBOL, + ''[KEY], + function maybeCallNative (nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) } + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) } + } + return { done: false } } - return { done: true, value: nativeMethod.call(str, regexp, arg2) }; - } - return { done: false }; + ) + var strfn = fns[0] + var rxfn = fns[1] + + redefine(String.prototype, KEY, strfn) + hide(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function (string, arg) { return rxfn.call(string, this, arg) } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function (string) { return rxfn.call(string, this) } + ) } - ); - var strfn = fns[0]; - var rxfn = fns[1]; - - redefine(String.prototype, KEY, strfn); - hide(RegExp.prototype, SYMBOL, length == 2 - // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) - // 21.2.5.11 RegExp.prototype[@@split](string, limit) - ? function (string, arg) { return rxfn.call(string, this, arg); } - // 21.2.5.6 RegExp.prototype[@@match](string) - // 21.2.5.9 RegExp.prototype[@@search](string) - : function (string) { return rxfn.call(string, this); } - ); - } -}; - -},{"128":128,"224":224,"35":35,"42":42,"48":48,"94":94,"96":96}],44:[function(_dereq_,module,exports){ -'use strict'; -// 21.2.5.3 get RegExp.prototype.flags -var anObject = _dereq_(16); -module.exports = function () { - var that = anObject(this); - var result = ''; - if (that.global) result += 'g'; - if (that.ignoreCase) result += 'i'; - if (that.multiline) result += 'm'; - if (that.unicode) result += 'u'; - if (that.sticky) result += 'y'; - return result; -}; - -},{"16":16}],45:[function(_dereq_,module,exports){ -var ctx = _dereq_(32); -var call = _dereq_(59); -var isArrayIter = _dereq_(54); -var anObject = _dereq_(16); -var toLength = _dereq_(117); -var getIterFn = _dereq_(129); -var BREAK = {}; -var RETURN = {}; -var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { - var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); - var f = ctx(fn, that, entries ? 2 : 1); - var index = 0; - var length, step, iterator, result; - if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); - // fast case for arrays with default iterator - if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { - result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); - if (result === BREAK || result === RETURN) return result; - } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { - result = call(iterator, f, step.value, entries); - if (result === BREAK || result === RETURN) return result; - } -}; -exports.BREAK = BREAK; -exports.RETURN = RETURN; - -},{"117":117,"129":129,"16":16,"32":32,"54":54,"59":59}],46:[function(_dereq_,module,exports){ -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self - // eslint-disable-next-line no-new-func - : Function('return this')(); -if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef - -},{}],47:[function(_dereq_,module,exports){ -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); -}; - -},{}],48:[function(_dereq_,module,exports){ -var dP = _dereq_(75); -var createDesc = _dereq_(92); -module.exports = _dereq_(36) ? function (object, key, value) { - return dP.f(object, key, createDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; - -},{"36":36,"75":75,"92":92}],49:[function(_dereq_,module,exports){ -var document = _dereq_(46).document; -module.exports = document && document.documentElement; - -},{"46":46}],50:[function(_dereq_,module,exports){ -module.exports = !_dereq_(36) && !_dereq_(42)(function () { - return Object.defineProperty(_dereq_(37)('div'), 'a', { get: function () { return 7; } }).a != 7; -}); - -},{"36":36,"37":37,"42":42}],51:[function(_dereq_,module,exports){ -var isObject = _dereq_(57); -var setPrototypeOf = _dereq_(98).set; -module.exports = function (that, target, C) { - var S = target.constructor; - var P; - if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { - setPrototypeOf(that, P); - } return that; -}; - -},{"57":57,"98":98}],52:[function(_dereq_,module,exports){ -// fast apply, http://jsperf.lnkit.com/fast-apply/5 -module.exports = function (fn, args, that) { - var un = that === undefined; - switch (args.length) { - case 0: return un ? fn() - : fn.call(that); - case 1: return un ? fn(args[0]) - : fn.call(that, args[0]); - case 2: return un ? fn(args[0], args[1]) - : fn.call(that, args[0], args[1]); - case 3: return un ? fn(args[0], args[1], args[2]) - : fn.call(that, args[0], args[1], args[2]); - case 4: return un ? fn(args[0], args[1], args[2], args[3]) - : fn.call(that, args[0], args[1], args[2], args[3]); - } return fn.apply(that, args); -}; - -},{}],53:[function(_dereq_,module,exports){ -// fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = _dereq_(26); -// eslint-disable-next-line no-prototype-builtins -module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { - return cof(it) == 'String' ? it.split('') : Object(it); -}; - -},{"26":26}],54:[function(_dereq_,module,exports){ -// check on default Array iterator -var Iterators = _dereq_(64); -var ITERATOR = _dereq_(128)('iterator'); -var ArrayProto = Array.prototype; - -module.exports = function (it) { - return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); -}; - -},{"128":128,"64":64}],55:[function(_dereq_,module,exports){ -// 7.2.2 IsArray(argument) -var cof = _dereq_(26); -module.exports = Array.isArray || function isArray(arg) { - return cof(arg) == 'Array'; -}; - -},{"26":26}],56:[function(_dereq_,module,exports){ -// 20.1.2.3 Number.isInteger(number) -var isObject = _dereq_(57); -var floor = Math.floor; -module.exports = function isInteger(it) { - return !isObject(it) && isFinite(it) && floor(it) === it; -}; - -},{"57":57}],57:[function(_dereq_,module,exports){ -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - -},{}],58:[function(_dereq_,module,exports){ -// 7.2.8 IsRegExp(argument) -var isObject = _dereq_(57); -var cof = _dereq_(26); -var MATCH = _dereq_(128)('match'); -module.exports = function (it) { - var isRegExp; - return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); -}; - -},{"128":128,"26":26,"57":57}],59:[function(_dereq_,module,exports){ -// call something on iterator step with safe closing on error -var anObject = _dereq_(16); -module.exports = function (iterator, fn, value, entries) { - try { - return entries ? fn(anObject(value)[0], value[1]) : fn(value); - // 7.4.6 IteratorClose(iterator, completion) - } catch (e) { - var ret = iterator['return']; - if (ret !== undefined) anObject(ret.call(iterator)); - throw e; - } -}; - -},{"16":16}],60:[function(_dereq_,module,exports){ -'use strict'; -var create = _dereq_(74); -var descriptor = _dereq_(92); -var setToStringTag = _dereq_(100); -var IteratorPrototype = {}; - -// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -_dereq_(48)(IteratorPrototype, _dereq_(128)('iterator'), function () { return this; }); - -module.exports = function (Constructor, NAME, next) { - Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); - setToStringTag(Constructor, NAME + ' Iterator'); -}; - -},{"100":100,"128":128,"48":48,"74":74,"92":92}],61:[function(_dereq_,module,exports){ -'use strict'; -var LIBRARY = _dereq_(65); -var $export = _dereq_(40); -var redefine = _dereq_(94); -var hide = _dereq_(48); -var Iterators = _dereq_(64); -var $iterCreate = _dereq_(60); -var setToStringTag = _dereq_(100); -var getPrototypeOf = _dereq_(81); -var ITERATOR = _dereq_(128)('iterator'); -var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` -var FF_ITERATOR = '@@iterator'; -var KEYS = 'keys'; -var VALUES = 'values'; - -var returnThis = function () { return this; }; - -module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { - $iterCreate(Constructor, NAME, next); - var getMethod = function (kind) { - if (!BUGGY && kind in proto) return proto[kind]; - switch (kind) { - case KEYS: return function keys() { return new Constructor(this, kind); }; - case VALUES: return function values() { return new Constructor(this, kind); }; - } return function entries() { return new Constructor(this, kind); }; - }; - var TAG = NAME + ' Iterator'; - var DEF_VALUES = DEFAULT == VALUES; - var VALUES_BUG = false; - var proto = Base.prototype; - var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; - var $default = $native || getMethod(DEFAULT); - var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; - var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; - var methods, key, IteratorPrototype; - // Fix native - if ($anyNative) { - IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); - if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { - // Set @@toStringTag to native iterators - setToStringTag(IteratorPrototype, TAG, true); - // fix for some old engines - if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); } - } - // fix Array#{values, @@iterator}.name in V8 / FF - if (DEF_VALUES && $native && $native.name !== VALUES) { - VALUES_BUG = true; - $default = function values() { return $native.call(this); }; - } - // Define iterator - if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { - hide(proto, ITERATOR, $default); - } - // Plug for library - Iterators[NAME] = $default; - Iterators[TAG] = returnThis; - if (DEFAULT) { - methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), - entries: $entries - }; - if (FORCED) for (key in methods) { - if (!(key in proto)) redefine(proto, key, methods[key]); - } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); - } - return methods; -}; - -},{"100":100,"128":128,"40":40,"48":48,"60":60,"64":64,"65":65,"81":81,"94":94}],62:[function(_dereq_,module,exports){ -var ITERATOR = _dereq_(128)('iterator'); -var SAFE_CLOSING = false; - -try { - var riter = [7][ITERATOR](); - riter['return'] = function () { SAFE_CLOSING = true; }; - // eslint-disable-next-line no-throw-literal - Array.from(riter, function () { throw 2; }); -} catch (e) { /* empty */ } - -module.exports = function (exec, skipClosing) { - if (!skipClosing && !SAFE_CLOSING) return false; - var safe = false; - try { - var arr = [7]; - var iter = arr[ITERATOR](); - iter.next = function () { return { done: safe = true }; }; - arr[ITERATOR] = function () { return iter; }; - exec(arr); - } catch (e) { /* empty */ } - return safe; -}; - -},{"128":128}],63:[function(_dereq_,module,exports){ -module.exports = function (done, value) { - return { value: value, done: !!done }; -}; - -},{}],64:[function(_dereq_,module,exports){ -module.exports = {}; - -},{}],65:[function(_dereq_,module,exports){ -module.exports = false; - -},{}],66:[function(_dereq_,module,exports){ -// 20.2.2.14 Math.expm1(x) -var $expm1 = Math.expm1; -module.exports = (!$expm1 - // Old FF bug - || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 - // Tor Browser bug - || $expm1(-2e-17) != -2e-17 -) ? function expm1(x) { - return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; -} : $expm1; - -},{}],67:[function(_dereq_,module,exports){ -// 20.2.2.16 Math.fround(x) -var sign = _dereq_(69); -var pow = Math.pow; -var EPSILON = pow(2, -52); -var EPSILON32 = pow(2, -23); -var MAX32 = pow(2, 127) * (2 - EPSILON32); -var MIN32 = pow(2, -126); - -var roundTiesToEven = function (n) { - return n + 1 / EPSILON - 1 / EPSILON; -}; - -module.exports = Math.fround || function fround(x) { - var $abs = Math.abs(x); - var $sign = sign(x); - var a, result; - if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; - a = (1 + EPSILON32 / EPSILON) * $abs; - result = a - (a - $abs); - // eslint-disable-next-line no-self-compare - if (result > MAX32 || result != result) return $sign * Infinity; - return $sign * result; -}; - -},{"69":69}],68:[function(_dereq_,module,exports){ -// 20.2.2.20 Math.log1p(x) -module.exports = Math.log1p || function log1p(x) { - return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); -}; - -},{}],69:[function(_dereq_,module,exports){ -// 20.2.2.28 Math.sign(x) -module.exports = Math.sign || function sign(x) { - // eslint-disable-next-line no-self-compare - return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; -}; - -},{}],70:[function(_dereq_,module,exports){ -var META = _dereq_(123)('meta'); -var isObject = _dereq_(57); -var has = _dereq_(47); -var setDesc = _dereq_(75).f; -var id = 0; -var isExtensible = Object.isExtensible || function () { - return true; -}; -var FREEZE = !_dereq_(42)(function () { - return isExtensible(Object.preventExtensions({})); -}); -var setMeta = function (it) { - setDesc(it, META, { value: { - i: 'O' + ++id, // object ID - w: {} // weak collections IDs - } }); -}; -var fastKey = function (it, create) { - // return primitive with prefix - if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; - if (!has(it, META)) { - // can't set metadata to uncaught frozen object - if (!isExtensible(it)) return 'F'; - // not necessary to add metadata - if (!create) return 'E'; - // add missing metadata - setMeta(it); - // return object ID - } return it[META].i; -}; -var getWeak = function (it, create) { - if (!has(it, META)) { - // can't set metadata to uncaught frozen object - if (!isExtensible(it)) return true; - // not necessary to add metadata - if (!create) return false; - // add missing metadata - setMeta(it); - // return hash weak collections IDs - } return it[META].w; -}; -// add metadata on freeze-family methods calling -var onFreeze = function (it) { - if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); - return it; -}; -var meta = module.exports = { - KEY: META, - NEED: false, - fastKey: fastKey, - getWeak: getWeak, - onFreeze: onFreeze -}; - -},{"123":123,"42":42,"47":47,"57":57,"75":75}],71:[function(_dereq_,module,exports){ -var global = _dereq_(46); -var macrotask = _dereq_(112).set; -var Observer = global.MutationObserver || global.WebKitMutationObserver; -var process = global.process; -var Promise = global.Promise; -var isNode = _dereq_(26)(process) == 'process'; - -module.exports = function () { - var head, last, notify; - - var flush = function () { - var parent, fn; - if (isNode && (parent = process.domain)) parent.exit(); - while (head) { - fn = head.fn; - head = head.next; - try { - fn(); - } catch (e) { - if (head) notify(); - else last = undefined; - throw e; - } - } last = undefined; - if (parent) parent.enter(); - }; - - // Node.js - if (isNode) { - notify = function () { - process.nextTick(flush); - }; - // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 - } else if (Observer && !(global.navigator && global.navigator.standalone)) { - var toggle = true; - var node = document.createTextNode(''); - new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new - notify = function () { - node.data = toggle = !toggle; - }; - // environments with maybe non-completely correct, but existent Promise - } else if (Promise && Promise.resolve) { - // Promise.resolve without an argument throws an error in LG WebOS 2 - var promise = Promise.resolve(undefined); - notify = function () { - promise.then(flush); - }; - // for other environments - macrotask based on: - // - setImmediate - // - MessageChannel - // - window.postMessag - // - onreadystatechange - // - setTimeout - } else { - notify = function () { - // strange IE + webpack dev server bug - use .call(global) - macrotask.call(global, flush); - }; - } - - return function (fn) { - var task = { fn: fn, next: undefined }; - if (last) last.next = task; - if (!head) { - head = task; - notify(); - } last = task; - }; -}; - -},{"112":112,"26":26,"46":46}],72:[function(_dereq_,module,exports){ -'use strict'; -// 25.4.1.5 NewPromiseCapability(C) -var aFunction = _dereq_(11); - -function PromiseCapability(C) { - var resolve, reject; - this.promise = new C(function ($$resolve, $$reject) { - if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); - resolve = $$resolve; - reject = $$reject; - }); - this.resolve = aFunction(resolve); - this.reject = aFunction(reject); -} - -module.exports.f = function (C) { - return new PromiseCapability(C); -}; - -},{"11":11}],73:[function(_dereq_,module,exports){ -'use strict'; -// 19.1.2.1 Object.assign(target, source, ...) -var getKeys = _dereq_(83); -var gOPS = _dereq_(80); -var pIE = _dereq_(84); -var toObject = _dereq_(118); -var IObject = _dereq_(53); -var $assign = Object.assign; - -// should work with symbols and should have deterministic property order (V8 bug) -module.exports = !$assign || _dereq_(42)(function () { - var A = {}; - var B = {}; - // eslint-disable-next-line no-undef - var S = Symbol(); - var K = 'abcdefghijklmnopqrst'; - A[S] = 7; - K.split('').forEach(function (k) { B[k] = k; }); - return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; -}) ? function assign(target, source) { // eslint-disable-line no-unused-vars - var T = toObject(target); - var aLen = arguments.length; - var index = 1; - var getSymbols = gOPS.f; - var isEnum = pIE.f; - while (aLen > index) { - var S = IObject(arguments[index++]); - var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); - var length = keys.length; - var j = 0; - var key; - while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; - } return T; -} : $assign; - -},{"118":118,"42":42,"53":53,"80":80,"83":83,"84":84}],74:[function(_dereq_,module,exports){ -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -var anObject = _dereq_(16); -var dPs = _dereq_(76); -var enumBugKeys = _dereq_(38); -var IE_PROTO = _dereq_(101)('IE_PROTO'); -var Empty = function () { /* empty */ }; -var PROTOTYPE = 'prototype'; - -// Create object with fake `null` prototype: use iframe Object with cleared prototype -var createDict = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = _dereq_(37)('iframe'); - var i = enumBugKeys.length; - var lt = '<'; - var gt = '>'; - var iframeDocument; - iframe.style.display = 'none'; - _dereq_(49).appendChild(iframe); - iframe.src = 'javascript:'; // eslint-disable-line no-script-url - // createDict = iframe.contentWindow.Object; - // html.removeChild(iframe); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); - iframeDocument.close(); - createDict = iframeDocument.F; - while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; - return createDict(); -}; - -module.exports = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - Empty[PROTOTYPE] = anObject(O); - result = new Empty(); - Empty[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = createDict(); - return Properties === undefined ? result : dPs(result, Properties); -}; - -},{"101":101,"16":16,"37":37,"38":38,"49":49,"76":76}],75:[function(_dereq_,module,exports){ -var anObject = _dereq_(16); -var IE8_DOM_DEFINE = _dereq_(50); -var toPrimitive = _dereq_(119); -var dP = Object.defineProperty; - -exports.f = _dereq_(36) ? Object.defineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (IE8_DOM_DEFINE) try { - return dP(O, P, Attributes); - } catch (e) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; -}; - -},{"119":119,"16":16,"36":36,"50":50}],76:[function(_dereq_,module,exports){ -var dP = _dereq_(75); -var anObject = _dereq_(16); -var getKeys = _dereq_(83); - -module.exports = _dereq_(36) ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var keys = getKeys(Properties); - var length = keys.length; - var i = 0; - var P; - while (length > i) dP.f(O, P = keys[i++], Properties[P]); - return O; -}; - -},{"16":16,"36":36,"75":75,"83":83}],77:[function(_dereq_,module,exports){ -var pIE = _dereq_(84); -var createDesc = _dereq_(92); -var toIObject = _dereq_(116); -var toPrimitive = _dereq_(119); -var has = _dereq_(47); -var IE8_DOM_DEFINE = _dereq_(50); -var gOPD = Object.getOwnPropertyDescriptor; - -exports.f = _dereq_(36) ? gOPD : function getOwnPropertyDescriptor(O, P) { - O = toIObject(O); - P = toPrimitive(P, true); - if (IE8_DOM_DEFINE) try { - return gOPD(O, P); - } catch (e) { /* empty */ } - if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); -}; - -},{"116":116,"119":119,"36":36,"47":47,"50":50,"84":84,"92":92}],78:[function(_dereq_,module,exports){ -// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window -var toIObject = _dereq_(116); -var gOPN = _dereq_(79).f; -var toString = {}.toString; - -var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames - ? Object.getOwnPropertyNames(window) : []; - -var getWindowNames = function (it) { - try { - return gOPN(it); - } catch (e) { - return windowNames.slice(); - } -}; - -module.exports.f = function getOwnPropertyNames(it) { - return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); -}; - -},{"116":116,"79":79}],79:[function(_dereq_,module,exports){ -// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) -var $keys = _dereq_(82); -var hiddenKeys = _dereq_(38).concat('length', 'prototype'); - -exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { - return $keys(O, hiddenKeys); -}; - -},{"38":38,"82":82}],80:[function(_dereq_,module,exports){ -exports.f = Object.getOwnPropertySymbols; - -},{}],81:[function(_dereq_,module,exports){ -// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -var has = _dereq_(47); -var toObject = _dereq_(118); -var IE_PROTO = _dereq_(101)('IE_PROTO'); -var ObjectProto = Object.prototype; - -module.exports = Object.getPrototypeOf || function (O) { - O = toObject(O); - if (has(O, IE_PROTO)) return O[IE_PROTO]; - if (typeof O.constructor == 'function' && O instanceof O.constructor) { - return O.constructor.prototype; - } return O instanceof Object ? ObjectProto : null; -}; - -},{"101":101,"118":118,"47":47}],82:[function(_dereq_,module,exports){ -var has = _dereq_(47); -var toIObject = _dereq_(116); -var arrayIndexOf = _dereq_(19)(false); -var IE_PROTO = _dereq_(101)('IE_PROTO'); - -module.exports = function (object, names) { - var O = toIObject(object); - var i = 0; - var result = []; - var key; - for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while (names.length > i) if (has(O, key = names[i++])) { - ~arrayIndexOf(result, key) || result.push(key); - } - return result; -}; - -},{"101":101,"116":116,"19":19,"47":47}],83:[function(_dereq_,module,exports){ -// 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = _dereq_(82); -var enumBugKeys = _dereq_(38); - -module.exports = Object.keys || function keys(O) { - return $keys(O, enumBugKeys); -}; - -},{"38":38,"82":82}],84:[function(_dereq_,module,exports){ -exports.f = {}.propertyIsEnumerable; - -},{}],85:[function(_dereq_,module,exports){ -// most Object methods by ES6 should accept primitives -var $export = _dereq_(40); -var core = _dereq_(30); -var fails = _dereq_(42); -module.exports = function (KEY, exec) { - var fn = (core.Object || {})[KEY] || Object[KEY]; - var exp = {}; - exp[KEY] = exec(fn); - $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); -}; - -},{"30":30,"40":40,"42":42}],86:[function(_dereq_,module,exports){ -var getKeys = _dereq_(83); -var toIObject = _dereq_(116); -var isEnum = _dereq_(84).f; -module.exports = function (isEntries) { - return function (it) { - var O = toIObject(it); - var keys = getKeys(O); - var length = keys.length; - var i = 0; - var result = []; - var key; - while (length > i) if (isEnum.call(O, key = keys[i++])) { - result.push(isEntries ? [key, O[key]] : O[key]); - } return result; - }; -}; - -},{"116":116,"83":83,"84":84}],87:[function(_dereq_,module,exports){ -// all object keys, includes non-enumerable and symbols -var gOPN = _dereq_(79); -var gOPS = _dereq_(80); -var anObject = _dereq_(16); -var Reflect = _dereq_(46).Reflect; -module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { - var keys = gOPN.f(anObject(it)); - var getSymbols = gOPS.f; - return getSymbols ? keys.concat(getSymbols(it)) : keys; -}; - -},{"16":16,"46":46,"79":79,"80":80}],88:[function(_dereq_,module,exports){ -var $parseFloat = _dereq_(46).parseFloat; -var $trim = _dereq_(110).trim; - -module.exports = 1 / $parseFloat(_dereq_(111) + '-0') !== -Infinity ? function parseFloat(str) { - var string = $trim(String(str), 3); - var result = $parseFloat(string); - return result === 0 && string.charAt(0) == '-' ? -0 : result; -} : $parseFloat; - -},{"110":110,"111":111,"46":46}],89:[function(_dereq_,module,exports){ -var $parseInt = _dereq_(46).parseInt; -var $trim = _dereq_(110).trim; -var ws = _dereq_(111); -var hex = /^[-+]?0[xX]/; - -module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) { - var string = $trim(String(str), 3); - return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); -} : $parseInt; - -},{"110":110,"111":111,"46":46}],90:[function(_dereq_,module,exports){ -module.exports = function (exec) { - try { - return { e: false, v: exec() }; - } catch (e) { - return { e: true, v: e }; - } -}; - -},{}],91:[function(_dereq_,module,exports){ -var anObject = _dereq_(16); -var isObject = _dereq_(57); -var newPromiseCapability = _dereq_(72); - -module.exports = function (C, x) { - anObject(C); - if (isObject(x) && x.constructor === C) return x; - var promiseCapability = newPromiseCapability.f(C); - var resolve = promiseCapability.resolve; - resolve(x); - return promiseCapability.promise; -}; - -},{"16":16,"57":57,"72":72}],92:[function(_dereq_,module,exports){ -module.exports = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; -}; - -},{}],93:[function(_dereq_,module,exports){ -var redefine = _dereq_(94); -module.exports = function (target, src, safe) { - for (var key in src) redefine(target, key, src[key], safe); - return target; -}; - -},{"94":94}],94:[function(_dereq_,module,exports){ -var global = _dereq_(46); -var hide = _dereq_(48); -var has = _dereq_(47); -var SRC = _dereq_(123)('src'); -var TO_STRING = 'toString'; -var $toString = Function[TO_STRING]; -var TPL = ('' + $toString).split(TO_STRING); - -_dereq_(30).inspectSource = function (it) { - return $toString.call(it); -}; - -(module.exports = function (O, key, val, safe) { - var isFunction = typeof val == 'function'; - if (isFunction) has(val, 'name') || hide(val, 'name', key); - if (O[key] === val) return; - if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); - if (O === global) { - O[key] = val; - } else if (!safe) { - delete O[key]; - hide(O, key, val); - } else if (O[key]) { - O[key] = val; - } else { - hide(O, key, val); - } -// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative -})(Function.prototype, TO_STRING, function toString() { - return typeof this == 'function' && this[SRC] || $toString.call(this); -}); - -},{"123":123,"30":30,"46":46,"47":47,"48":48}],95:[function(_dereq_,module,exports){ -'use strict'; - -var classof = _dereq_(25); -var builtinExec = RegExp.prototype.exec; - - // `RegExpExec` abstract operation -// https://tc39.github.io/ecma262/#sec-regexpexec -module.exports = function (R, S) { - var exec = R.exec; - if (typeof exec === 'function') { - var result = exec.call(R, S); - if (typeof result !== 'object') { - throw new TypeError('RegExp exec method returned something other than an Object or null'); + }, { 128: 128, 224: 224, 35: 35, 42: 42, 48: 48, 94: 94, 96: 96 }], + 44: [function (_dereq_, module, exports) { + 'use strict' + // 21.2.5.3 get RegExp.prototype.flags + var anObject = _dereq_(16) + module.exports = function () { + var that = anObject(this) + var result = '' + if (that.global) result += 'g' + if (that.ignoreCase) result += 'i' + if (that.multiline) result += 'm' + if (that.unicode) result += 'u' + if (that.sticky) result += 'y' + return result } - return result; - } - if (classof(R) !== 'RegExp') { - throw new TypeError('RegExp#exec called on incompatible receiver'); - } - return builtinExec.call(R, S); -}; - -},{"25":25}],96:[function(_dereq_,module,exports){ -'use strict'; - -var regexpFlags = _dereq_(44); - -var nativeExec = RegExp.prototype.exec; -// This always refers to the native implementation, because the -// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, -// which loads this file before patching the method. -var nativeReplace = String.prototype.replace; - -var patchedExec = nativeExec; - -var LAST_INDEX = 'lastIndex'; - -var UPDATES_LAST_INDEX_WRONG = (function () { - var re1 = /a/, - re2 = /b*/g; - nativeExec.call(re1, 'a'); - nativeExec.call(re2, 'a'); - return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; -})(); - -// nonparticipating capturing group, copied from es5-shim's String#split patch. -var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; - -var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; - -if (PATCH) { - patchedExec = function exec(str) { - var re = this; - var lastIndex, reCopy, match, i; - - if (NPCG_INCLUDED) { - reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); - } - if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; - - match = nativeExec.call(re, str); - - if (UPDATES_LAST_INDEX_WRONG && match) { - re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; - } - if (NPCG_INCLUDED && match && match.length > 1) { - // Fix browsers whose `exec` methods don't consistently return `undefined` - // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ - // eslint-disable-next-line no-loop-func - nativeReplace.call(match[0], reCopy, function () { - for (i = 1; i < arguments.length - 2; i++) { - if (arguments[i] === undefined) match[i] = undefined; + }, { 16: 16 }], + 45: [function (_dereq_, module, exports) { + var ctx = _dereq_(32) + var call = _dereq_(59) + var isArrayIter = _dereq_(54) + var anObject = _dereq_(16) + var toLength = _dereq_(117) + var getIterFn = _dereq_(129) + var BREAK = {} + var RETURN = {} + var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable } : getIterFn(iterable) + var f = ctx(fn, that, entries ? 2 : 1) + var index = 0 + var length, step, iterator, result + if (typeof iterFn !== 'function') throw TypeError(iterable + ' is not iterable!') + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) { + for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]) + if (result === BREAK || result === RETURN) return result } - }); + } else { + for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries) + if (result === BREAK || result === RETURN) return result + } + } } - - return match; - }; -} - -module.exports = patchedExec; - -},{"44":44}],97:[function(_dereq_,module,exports){ -// 7.2.9 SameValue(x, y) -module.exports = Object.is || function is(x, y) { - // eslint-disable-next-line no-self-compare - return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; -}; - -},{}],98:[function(_dereq_,module,exports){ -// Works with __proto__ only. Old v8 can't work with null proto objects. -/* eslint-disable no-proto */ -var isObject = _dereq_(57); -var anObject = _dereq_(16); -var check = function (O, proto) { - anObject(O); - if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); -}; -module.exports = { - set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line - function (test, buggy, set) { - try { - set = _dereq_(32)(Function.call, _dereq_(77).f(Object.prototype, '__proto__').set, 2); - set(test, []); - buggy = !(test instanceof Array); - } catch (e) { buggy = true; } - return function setPrototypeOf(O, proto) { - check(O, proto); - if (buggy) O.__proto__ = proto; - else set(O, proto); - return O; - }; - }({}, false) : undefined), - check: check -}; - -},{"16":16,"32":32,"57":57,"77":77}],99:[function(_dereq_,module,exports){ -'use strict'; -var global = _dereq_(46); -var dP = _dereq_(75); -var DESCRIPTORS = _dereq_(36); -var SPECIES = _dereq_(128)('species'); - -module.exports = function (KEY) { - var C = global[KEY]; - if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { - configurable: true, - get: function () { return this; } - }); -}; - -},{"128":128,"36":36,"46":46,"75":75}],100:[function(_dereq_,module,exports){ -var def = _dereq_(75).f; -var has = _dereq_(47); -var TAG = _dereq_(128)('toStringTag'); - -module.exports = function (it, tag, stat) { - if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); -}; - -},{"128":128,"47":47,"75":75}],101:[function(_dereq_,module,exports){ -var shared = _dereq_(102)('keys'); -var uid = _dereq_(123); -module.exports = function (key) { - return shared[key] || (shared[key] = uid(key)); -}; - -},{"102":102,"123":123}],102:[function(_dereq_,module,exports){ -var core = _dereq_(30); -var global = _dereq_(46); -var SHARED = '__core-js_shared__'; -var store = global[SHARED] || (global[SHARED] = {}); - -(module.exports = function (key, value) { - return store[key] || (store[key] = value !== undefined ? value : {}); -})('versions', []).push({ - version: core.version, - mode: _dereq_(65) ? 'pure' : 'global', - copyright: '© 2018 Denis Pushkarev (zloirock.ru)' -}); - -},{"30":30,"46":46,"65":65}],103:[function(_dereq_,module,exports){ -// 7.3.20 SpeciesConstructor(O, defaultConstructor) -var anObject = _dereq_(16); -var aFunction = _dereq_(11); -var SPECIES = _dereq_(128)('species'); -module.exports = function (O, D) { - var C = anObject(O).constructor; - var S; - return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); -}; - -},{"11":11,"128":128,"16":16}],104:[function(_dereq_,module,exports){ -'use strict'; -var fails = _dereq_(42); - -module.exports = function (method, arg) { - return !!method && fails(function () { - // eslint-disable-next-line no-useless-call - arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); - }); -}; - -},{"42":42}],105:[function(_dereq_,module,exports){ -var toInteger = _dereq_(115); -var defined = _dereq_(35); -// true -> String#at -// false -> String#codePointAt -module.exports = function (TO_STRING) { - return function (that, pos) { - var s = String(defined(that)); - var i = toInteger(pos); - var l = s.length; - var a, b; - if (i < 0 || i >= l) return TO_STRING ? '' : undefined; - a = s.charCodeAt(i); - return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff - ? TO_STRING ? s.charAt(i) : a - : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; - }; -}; - -},{"115":115,"35":35}],106:[function(_dereq_,module,exports){ -// helper for String#{startsWith, endsWith, includes} -var isRegExp = _dereq_(58); -var defined = _dereq_(35); - -module.exports = function (that, searchString, NAME) { - if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); - return String(defined(that)); -}; - -},{"35":35,"58":58}],107:[function(_dereq_,module,exports){ -var $export = _dereq_(40); -var fails = _dereq_(42); -var defined = _dereq_(35); -var quot = /"/g; -// B.2.3.2.1 CreateHTML(string, tag, attribute, value) -var createHTML = function (string, tag, attribute, value) { - var S = String(defined(string)); - var p1 = '<' + tag; - if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; - return p1 + '>' + S + ''; -}; -module.exports = function (NAME, exec) { - var O = {}; - O[NAME] = exec(createHTML); - $export($export.P + $export.F * fails(function () { - var test = ''[NAME]('"'); - return test !== test.toLowerCase() || test.split('"').length > 3; - }), 'String', O); -}; - -},{"35":35,"40":40,"42":42}],108:[function(_dereq_,module,exports){ -// https://github.com/tc39/proposal-string-pad-start-end -var toLength = _dereq_(117); -var repeat = _dereq_(109); -var defined = _dereq_(35); - -module.exports = function (that, maxLength, fillString, left) { - var S = String(defined(that)); - var stringLength = S.length; - var fillStr = fillString === undefined ? ' ' : String(fillString); - var intMaxLength = toLength(maxLength); - if (intMaxLength <= stringLength || fillStr == '') return S; - var fillLen = intMaxLength - stringLength; - var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); - if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); - return left ? stringFiller + S : S + stringFiller; -}; - -},{"109":109,"117":117,"35":35}],109:[function(_dereq_,module,exports){ -'use strict'; -var toInteger = _dereq_(115); -var defined = _dereq_(35); - -module.exports = function repeat(count) { - var str = String(defined(this)); - var res = ''; - var n = toInteger(count); - if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); - for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; - return res; -}; - -},{"115":115,"35":35}],110:[function(_dereq_,module,exports){ -var $export = _dereq_(40); -var defined = _dereq_(35); -var fails = _dereq_(42); -var spaces = _dereq_(111); -var space = '[' + spaces + ']'; -var non = '\u200b\u0085'; -var ltrim = RegExp('^' + space + space + '*'); -var rtrim = RegExp(space + space + '*$'); - -var exporter = function (KEY, exec, ALIAS) { - var exp = {}; - var FORCE = fails(function () { - return !!spaces[KEY]() || non[KEY]() != non; - }); - var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; - if (ALIAS) exp[ALIAS] = fn; - $export($export.P + $export.F * FORCE, 'String', exp); -}; - -// 1 -> String#trimLeft -// 2 -> String#trimRight -// 3 -> String#trim -var trim = exporter.trim = function (string, TYPE) { - string = String(defined(string)); - if (TYPE & 1) string = string.replace(ltrim, ''); - if (TYPE & 2) string = string.replace(rtrim, ''); - return string; -}; - -module.exports = exporter; - -},{"111":111,"35":35,"40":40,"42":42}],111:[function(_dereq_,module,exports){ -module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + - '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; - -},{}],112:[function(_dereq_,module,exports){ -var ctx = _dereq_(32); -var invoke = _dereq_(52); -var html = _dereq_(49); -var cel = _dereq_(37); -var global = _dereq_(46); -var process = global.process; -var setTask = global.setImmediate; -var clearTask = global.clearImmediate; -var MessageChannel = global.MessageChannel; -var Dispatch = global.Dispatch; -var counter = 0; -var queue = {}; -var ONREADYSTATECHANGE = 'onreadystatechange'; -var defer, channel, port; -var run = function () { - var id = +this; - // eslint-disable-next-line no-prototype-builtins - if (queue.hasOwnProperty(id)) { - var fn = queue[id]; - delete queue[id]; - fn(); - } -}; -var listener = function (event) { - run.call(event.data); -}; -// Node.js 0.9+ & IE10+ has setImmediate, otherwise: -if (!setTask || !clearTask) { - setTask = function setImmediate(fn) { - var args = []; - var i = 1; - while (arguments.length > i) args.push(arguments[i++]); - queue[++counter] = function () { + exports.BREAK = BREAK + exports.RETURN = RETURN + }, { 117: 117, 129: 129, 16: 16, 32: 32, 54: 54, 59: 59 }], + 46: [function (_dereq_, module, exports) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window !== 'undefined' && window.Math == Math + ? window : typeof self !== 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func - invoke(typeof fn == 'function' ? fn : Function(fn), args); - }; - defer(counter); - return counter; - }; - clearTask = function clearImmediate(id) { - delete queue[id]; - }; - // Node.js 0.8- - if (_dereq_(26)(process) == 'process') { - defer = function (id) { - process.nextTick(ctx(run, id, 1)); - }; - // Sphere (JS game engine) Dispatch API - } else if (Dispatch && Dispatch.now) { - defer = function (id) { - Dispatch.now(ctx(run, id, 1)); - }; - // Browsers with MessageChannel, includes WebWorkers - } else if (MessageChannel) { - channel = new MessageChannel(); - port = channel.port2; - channel.port1.onmessage = listener; - defer = ctx(port.postMessage, port, 1); - // Browsers with postMessage, skip WebWorkers - // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' - } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { - defer = function (id) { - global.postMessage(id + '', '*'); - }; - global.addEventListener('message', listener, false); - // IE8- - } else if (ONREADYSTATECHANGE in cel('script')) { - defer = function (id) { - html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { - html.removeChild(this); - run.call(id); - }; - }; - // Rest old browsers - } else { - defer = function (id) { - setTimeout(ctx(run, id, 1), 0); - }; - } -} -module.exports = { - set: setTask, - clear: clearTask -}; - -},{"26":26,"32":32,"37":37,"46":46,"49":49,"52":52}],113:[function(_dereq_,module,exports){ -var toInteger = _dereq_(115); -var max = Math.max; -var min = Math.min; -module.exports = function (index, length) { - index = toInteger(index); - return index < 0 ? max(index + length, 0) : min(index, length); -}; - -},{"115":115}],114:[function(_dereq_,module,exports){ -// https://tc39.github.io/ecma262/#sec-toindex -var toInteger = _dereq_(115); -var toLength = _dereq_(117); -module.exports = function (it) { - if (it === undefined) return 0; - var number = toInteger(it); - var length = toLength(number); - if (number !== length) throw RangeError('Wrong length!'); - return length; -}; - -},{"115":115,"117":117}],115:[function(_dereq_,module,exports){ -// 7.1.4 ToInteger -var ceil = Math.ceil; -var floor = Math.floor; -module.exports = function (it) { - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -}; - -},{}],116:[function(_dereq_,module,exports){ -// to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = _dereq_(53); -var defined = _dereq_(35); -module.exports = function (it) { - return IObject(defined(it)); -}; - -},{"35":35,"53":53}],117:[function(_dereq_,module,exports){ -// 7.1.15 ToLength -var toInteger = _dereq_(115); -var min = Math.min; -module.exports = function (it) { - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 -}; - -},{"115":115}],118:[function(_dereq_,module,exports){ -// 7.1.13 ToObject(argument) -var defined = _dereq_(35); -module.exports = function (it) { - return Object(defined(it)); -}; - -},{"35":35}],119:[function(_dereq_,module,exports){ -// 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = _dereq_(57); -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -module.exports = function (it, S) { - if (!isObject(it)) return it; - var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - throw TypeError("Can't convert object to primitive value"); -}; - -},{"57":57}],120:[function(_dereq_,module,exports){ -'use strict'; -if (_dereq_(36)) { - var LIBRARY = _dereq_(65); - var global = _dereq_(46); - var fails = _dereq_(42); - var $export = _dereq_(40); - var $typed = _dereq_(122); - var $buffer = _dereq_(121); - var ctx = _dereq_(32); - var anInstance = _dereq_(15); - var propertyDesc = _dereq_(92); - var hide = _dereq_(48); - var redefineAll = _dereq_(93); - var toInteger = _dereq_(115); - var toLength = _dereq_(117); - var toIndex = _dereq_(114); - var toAbsoluteIndex = _dereq_(113); - var toPrimitive = _dereq_(119); - var has = _dereq_(47); - var classof = _dereq_(25); - var isObject = _dereq_(57); - var toObject = _dereq_(118); - var isArrayIter = _dereq_(54); - var create = _dereq_(74); - var getPrototypeOf = _dereq_(81); - var gOPN = _dereq_(79).f; - var getIterFn = _dereq_(129); - var uid = _dereq_(123); - var wks = _dereq_(128); - var createArrayMethod = _dereq_(20); - var createArrayIncludes = _dereq_(19); - var speciesConstructor = _dereq_(103); - var ArrayIterators = _dereq_(140); - var Iterators = _dereq_(64); - var $iterDetect = _dereq_(62); - var setSpecies = _dereq_(99); - var arrayFill = _dereq_(18); - var arrayCopyWithin = _dereq_(17); - var $DP = _dereq_(75); - var $GOPD = _dereq_(77); - var dP = $DP.f; - var gOPD = $GOPD.f; - var RangeError = global.RangeError; - var TypeError = global.TypeError; - var Uint8Array = global.Uint8Array; - var ARRAY_BUFFER = 'ArrayBuffer'; - var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; - var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; - var PROTOTYPE = 'prototype'; - var ArrayProto = Array[PROTOTYPE]; - var $ArrayBuffer = $buffer.ArrayBuffer; - var $DataView = $buffer.DataView; - var arrayForEach = createArrayMethod(0); - var arrayFilter = createArrayMethod(2); - var arraySome = createArrayMethod(3); - var arrayEvery = createArrayMethod(4); - var arrayFind = createArrayMethod(5); - var arrayFindIndex = createArrayMethod(6); - var arrayIncludes = createArrayIncludes(true); - var arrayIndexOf = createArrayIncludes(false); - var arrayValues = ArrayIterators.values; - var arrayKeys = ArrayIterators.keys; - var arrayEntries = ArrayIterators.entries; - var arrayLastIndexOf = ArrayProto.lastIndexOf; - var arrayReduce = ArrayProto.reduce; - var arrayReduceRight = ArrayProto.reduceRight; - var arrayJoin = ArrayProto.join; - var arraySort = ArrayProto.sort; - var arraySlice = ArrayProto.slice; - var arrayToString = ArrayProto.toString; - var arrayToLocaleString = ArrayProto.toLocaleString; - var ITERATOR = wks('iterator'); - var TAG = wks('toStringTag'); - var TYPED_CONSTRUCTOR = uid('typed_constructor'); - var DEF_CONSTRUCTOR = uid('def_constructor'); - var ALL_CONSTRUCTORS = $typed.CONSTR; - var TYPED_ARRAY = $typed.TYPED; - var VIEW = $typed.VIEW; - var WRONG_LENGTH = 'Wrong length!'; - - var $map = createArrayMethod(1, function (O, length) { - return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); - }); - - var LITTLE_ENDIAN = fails(function () { - // eslint-disable-next-line no-undef - return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; - }); - - var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { - new Uint8Array(1).set({}); - }); - - var toOffset = function (it, BYTES) { - var offset = toInteger(it); - if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); - return offset; - }; - - var validate = function (it) { - if (isObject(it) && TYPED_ARRAY in it) return it; - throw TypeError(it + ' is not a typed array!'); - }; - - var allocate = function (C, length) { - if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { - throw TypeError('It is not a typed array constructor!'); - } return new C(length); - }; - - var speciesFromList = function (O, list) { - return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); - }; - - var fromList = function (C, list) { - var index = 0; - var length = list.length; - var result = allocate(C, length); - while (length > index) result[index] = list[index++]; - return result; - }; - - var addGetter = function (it, key, internal) { - dP(it, key, { get: function () { return this._d[internal]; } }); - }; - - var $from = function from(source /* , mapfn, thisArg */) { - var O = toObject(source); - var aLen = arguments.length; - var mapfn = aLen > 1 ? arguments[1] : undefined; - var mapping = mapfn !== undefined; - var iterFn = getIterFn(O); - var i, length, values, result, step, iterator; - if (iterFn != undefined && !isArrayIter(iterFn)) { - for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { - values.push(step.value); - } O = values; + : Function('return this')() + if (typeof __g === 'number') __g = global // eslint-disable-line no-undef + }, {}], + 47: [function (_dereq_, module, exports) { + var hasOwnProperty = {}.hasOwnProperty + module.exports = function (it, key) { + return hasOwnProperty.call(it, key) } - if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); - for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { - result[i] = mapping ? mapfn(O[i], i) : O[i]; + }, {}], + 48: [function (_dereq_, module, exports) { + var dP = _dereq_(75) + var createDesc = _dereq_(92) + module.exports = _dereq_(36) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)) + } : function (object, key, value) { + object[key] = value + return object } - return result; - }; - - var $of = function of(/* ...items */) { - var index = 0; - var length = arguments.length; - var result = allocate(this, length); - while (length > index) result[index] = arguments[index++]; - return result; - }; - - // iOS Safari 6.x fails here - var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); }); - - var $toLocaleString = function toLocaleString() { - return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); - }; - - var proto = { - copyWithin: function copyWithin(target, start /* , end */) { - return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); - }, - every: function every(callbackfn /* , thisArg */) { - return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); - }, - fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars - return arrayFill.apply(validate(this), arguments); - }, - filter: function filter(callbackfn /* , thisArg */) { - return speciesFromList(this, arrayFilter(validate(this), callbackfn, - arguments.length > 1 ? arguments[1] : undefined)); - }, - find: function find(predicate /* , thisArg */) { - return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); - }, - findIndex: function findIndex(predicate /* , thisArg */) { - return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); - }, - forEach: function forEach(callbackfn /* , thisArg */) { - arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); - }, - indexOf: function indexOf(searchElement /* , fromIndex */) { - return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); - }, - includes: function includes(searchElement /* , fromIndex */) { - return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); - }, - join: function join(separator) { // eslint-disable-line no-unused-vars - return arrayJoin.apply(validate(this), arguments); - }, - lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars - return arrayLastIndexOf.apply(validate(this), arguments); - }, - map: function map(mapfn /* , thisArg */) { - return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); - }, - reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars - return arrayReduce.apply(validate(this), arguments); - }, - reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars - return arrayReduceRight.apply(validate(this), arguments); - }, - reverse: function reverse() { - var that = this; - var length = validate(that).length; - var middle = Math.floor(length / 2); - var index = 0; - var value; - while (index < middle) { - value = that[index]; - that[index++] = that[--length]; - that[length] = value; - } return that; - }, - some: function some(callbackfn /* , thisArg */) { - return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); - }, - sort: function sort(comparefn) { - return arraySort.call(validate(this), comparefn); - }, - subarray: function subarray(begin, end) { - var O = validate(this); - var length = O.length; - var $begin = toAbsoluteIndex(begin, length); - return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( - O.buffer, - O.byteOffset + $begin * O.BYTES_PER_ELEMENT, - toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) - ); + }, { 36: 36, 75: 75, 92: 92 }], + 49: [function (_dereq_, module, exports) { + var document = _dereq_(46).document + module.exports = document && document.documentElement + }, { 46: 46 }], + 50: [function (_dereq_, module, exports) { + module.exports = !_dereq_(36) && !_dereq_(42)(function () { + return Object.defineProperty(_dereq_(37)('div'), 'a', { get: function () { return 7 } }).a != 7 + }) + }, { 36: 36, 37: 37, 42: 42 }], + 51: [function (_dereq_, module, exports) { + var isObject = _dereq_(57) + var setPrototypeOf = _dereq_(98).set + module.exports = function (that, target, C) { + var S = target.constructor + var P + if (S !== C && typeof S === 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { + setPrototypeOf(that, P) + } return that } - }; - - var $slice = function slice(start, end) { - return speciesFromList(this, arraySlice.call(validate(this), start, end)); - }; - - var $set = function set(arrayLike /* , offset */) { - validate(this); - var offset = toOffset(arguments[1], 1); - var length = this.length; - var src = toObject(arrayLike); - var len = toLength(src.length); - var index = 0; - if (len + offset > length) throw RangeError(WRONG_LENGTH); - while (index < len) this[offset + index] = src[index++]; - }; - - var $iterators = { - entries: function entries() { - return arrayEntries.call(validate(this)); - }, - keys: function keys() { - return arrayKeys.call(validate(this)); - }, - values: function values() { - return arrayValues.call(validate(this)); + }, { 57: 57, 98: 98 }], + 52: [function (_dereq_, module, exports) { + // fast apply, http://jsperf.lnkit.com/fast-apply/5 + module.exports = function (fn, args, that) { + var un = that === undefined + switch (args.length) { + case 0: return un ? fn() + : fn.call(that) + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]) + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]) + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]) + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]) + } return fn.apply(that, args) } - }; + }, {}], + 53: [function (_dereq_, module, exports) { + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = _dereq_(26) + // eslint-disable-next-line no-prototype-builtins + module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it) + } + }, { 26: 26 }], + 54: [function (_dereq_, module, exports) { + // check on default Array iterator + var Iterators = _dereq_(64) + var ITERATOR = _dereq_(128)('iterator') + var ArrayProto = Array.prototype - var isTAIndex = function (target, key) { - return isObject(target) - && target[TYPED_ARRAY] - && typeof key != 'symbol' - && key in target - && String(+key) == String(key); - }; - var $getDesc = function getOwnPropertyDescriptor(target, key) { - return isTAIndex(target, key = toPrimitive(key, true)) - ? propertyDesc(2, target[key]) - : gOPD(target, key); - }; - var $setDesc = function defineProperty(target, key, desc) { - if (isTAIndex(target, key = toPrimitive(key, true)) - && isObject(desc) - && has(desc, 'value') - && !has(desc, 'get') - && !has(desc, 'set') - // TODO: add validation descriptor w/o calling accessors - && !desc.configurable - && (!has(desc, 'writable') || desc.writable) - && (!has(desc, 'enumerable') || desc.enumerable) - ) { - target[key] = desc.value; - return target; - } return dP(target, key, desc); - }; + module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it) + } + }, { 128: 128, 64: 64 }], + 55: [function (_dereq_, module, exports) { + // 7.2.2 IsArray(argument) + var cof = _dereq_(26) + module.exports = Array.isArray || function isArray (arg) { + return cof(arg) == 'Array' + } + }, { 26: 26 }], + 56: [function (_dereq_, module, exports) { + // 20.1.2.3 Number.isInteger(number) + var isObject = _dereq_(57) + var floor = Math.floor + module.exports = function isInteger (it) { + return !isObject(it) && isFinite(it) && floor(it) === it + } + }, { 57: 57 }], + 57: [function (_dereq_, module, exports) { + module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function' + } + }, {}], + 58: [function (_dereq_, module, exports) { + // 7.2.8 IsRegExp(argument) + var isObject = _dereq_(57) + var cof = _dereq_(26) + var MATCH = _dereq_(128)('match') + module.exports = function (it) { + var isRegExp + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp') + } + }, { 128: 128, 26: 26, 57: 57 }], + 59: [function (_dereq_, module, exports) { + // call something on iterator step with safe closing on error + var anObject = _dereq_(16) + module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value) + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator.return + if (ret !== undefined) anObject(ret.call(iterator)) + throw e + } + } + }, { 16: 16 }], + 60: [function (_dereq_, module, exports) { + 'use strict' + var create = _dereq_(74) + var descriptor = _dereq_(92) + var setToStringTag = _dereq_(100) + var IteratorPrototype = {} - if (!ALL_CONSTRUCTORS) { - $GOPD.f = $getDesc; - $DP.f = $setDesc; - } + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + _dereq_(48)(IteratorPrototype, _dereq_(128)('iterator'), function () { return this }) - $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { - getOwnPropertyDescriptor: $getDesc, - defineProperty: $setDesc - }); + module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }) + setToStringTag(Constructor, NAME + ' Iterator') + } + }, { 100: 100, 128: 128, 48: 48, 74: 74, 92: 92 }], + 61: [function (_dereq_, module, exports) { + 'use strict' + var LIBRARY = _dereq_(65) + var $export = _dereq_(40) + var redefine = _dereq_(94) + var hide = _dereq_(48) + var Iterators = _dereq_(64) + var $iterCreate = _dereq_(60) + var setToStringTag = _dereq_(100) + var getPrototypeOf = _dereq_(81) + var ITERATOR = _dereq_(128)('iterator') + var BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` + var FF_ITERATOR = '@@iterator' + var KEYS = 'keys' + var VALUES = 'values' - if (fails(function () { arrayToString.call({}); })) { - arrayToString = arrayToLocaleString = function toString() { - return arrayJoin.call(this); - }; - } + var returnThis = function () { return this } - var $TypedArrayPrototype$ = redefineAll({}, proto); - redefineAll($TypedArrayPrototype$, $iterators); - hide($TypedArrayPrototype$, ITERATOR, $iterators.values); - redefineAll($TypedArrayPrototype$, { - slice: $slice, - set: $set, - constructor: function () { /* noop */ }, - toString: arrayToString, - toLocaleString: $toLocaleString - }); - addGetter($TypedArrayPrototype$, 'buffer', 'b'); - addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); - addGetter($TypedArrayPrototype$, 'byteLength', 'l'); - addGetter($TypedArrayPrototype$, 'length', 'e'); - dP($TypedArrayPrototype$, TAG, { - get: function () { return this[TYPED_ARRAY]; } - }); - - // eslint-disable-next-line max-statements - module.exports = function (KEY, BYTES, wrapper, CLAMPED) { - CLAMPED = !!CLAMPED; - var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; - var GETTER = 'get' + KEY; - var SETTER = 'set' + KEY; - var TypedArray = global[NAME]; - var Base = TypedArray || {}; - var TAC = TypedArray && getPrototypeOf(TypedArray); - var FORCED = !TypedArray || !$typed.ABV; - var O = {}; - var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; - var getter = function (that, index) { - var data = that._d; - return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); - }; - var setter = function (that, index, value) { - var data = that._d; - if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; - data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); - }; - var addElement = function (that, index) { - dP(that, index, { - get: function () { - return getter(this, index); - }, - set: function (value) { - return setter(this, index, value); - }, - enumerable: true - }); - }; - if (FORCED) { - TypedArray = wrapper(function (that, data, $offset, $length) { - anInstance(that, TypedArray, NAME, '_d'); - var index = 0; - var offset = 0; - var buffer, byteLength, length, klass; - if (!isObject(data)) { - length = toIndex(data); - byteLength = length * BYTES; - buffer = new $ArrayBuffer(byteLength); - } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { - buffer = data; - offset = toOffset($offset, BYTES); - var $len = data.byteLength; - if ($length === undefined) { - if ($len % BYTES) throw RangeError(WRONG_LENGTH); - byteLength = $len - offset; - if (byteLength < 0) throw RangeError(WRONG_LENGTH); - } else { - byteLength = toLength($length) * BYTES; - if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); + module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next) + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind] + switch (kind) { + case KEYS: return function keys () { return new Constructor(this, kind) } + case VALUES: return function values () { return new Constructor(this, kind) } + } return function entries () { return new Constructor(this, kind) } + } + var TAG = NAME + ' Iterator' + var DEF_VALUES = DEFAULT == VALUES + var VALUES_BUG = false + var proto = Base.prototype + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] + var $default = $native || getMethod(DEFAULT) + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native + var methods, key, IteratorPrototype + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())) + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true) + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] !== 'function') hide(IteratorPrototype, ITERATOR, returnThis) + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true + $default = function values () { return $native.call(this) } + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default) + } + // Plug for library + Iterators[NAME] = $default + Iterators[TAG] = returnThis + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + } + if (FORCED) { + for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]) } - length = byteLength / BYTES; - } else if (TYPED_ARRAY in data) { - return fromList(TypedArray, data); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods) + } + return methods + } + }, { 100: 100, 128: 128, 40: 40, 48: 48, 60: 60, 64: 64, 65: 65, 81: 81, 94: 94 }], + 62: [function (_dereq_, module, exports) { + var ITERATOR = _dereq_(128)('iterator') + var SAFE_CLOSING = false + + try { + var riter = [7][ITERATOR]() + riter.return = function () { SAFE_CLOSING = true } + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2 }) + } catch (e) { /* empty */ } + + module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false + var safe = false + try { + var arr = [7] + var iter = arr[ITERATOR]() + iter.next = function () { return { done: safe = true } } + arr[ITERATOR] = function () { return iter } + exec(arr) + } catch (e) { /* empty */ } + return safe + } + }, { 128: 128 }], + 63: [function (_dereq_, module, exports) { + module.exports = function (done, value) { + return { value: value, done: !!done } + } + }, {}], + 64: [function (_dereq_, module, exports) { + module.exports = {} + }, {}], + 65: [function (_dereq_, module, exports) { + module.exports = false + }, {}], + 66: [function (_dereq_, module, exports) { + // 20.2.2.14 Math.expm1(x) + var $expm1 = Math.expm1 + module.exports = (!$expm1 || + // Old FF bug + $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 || + // Tor Browser bug + $expm1(-2e-17) != -2e-17 + ) ? function expm1 (x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1 + } : $expm1 + }, {}], + 67: [function (_dereq_, module, exports) { + // 20.2.2.16 Math.fround(x) + var sign = _dereq_(69) + var pow = Math.pow + var EPSILON = pow(2, -52) + var EPSILON32 = pow(2, -23) + var MAX32 = pow(2, 127) * (2 - EPSILON32) + var MIN32 = pow(2, -126) + + var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON + } + + module.exports = Math.fround || function fround (x) { + var $abs = Math.abs(x) + var $sign = sign(x) + var a, result + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32 + a = (1 + EPSILON32 / EPSILON) * $abs + result = a - (a - $abs) + // eslint-disable-next-line no-self-compare + if (result > MAX32 || result != result) return $sign * Infinity + return $sign * result + } + }, { 69: 69 }], + 68: [function (_dereq_, module, exports) { + // 20.2.2.20 Math.log1p(x) + module.exports = Math.log1p || function log1p (x) { + return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x) + } + }, {}], + 69: [function (_dereq_, module, exports) { + // 20.2.2.28 Math.sign(x) + module.exports = Math.sign || function sign (x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1 + } + }, {}], + 70: [function (_dereq_, module, exports) { + var META = _dereq_(123)('meta') + var isObject = _dereq_(57) + var has = _dereq_(47) + var setDesc = _dereq_(75).f + var id = 0 + var isExtensible = Object.isExtensible || function () { + return true + } + var FREEZE = !_dereq_(42)(function () { + return isExtensible(Object.preventExtensions({})) + }) + var setMeta = function (it) { + setDesc(it, META, { + value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } + }) + } + var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it === 'symbol' ? it : (typeof it === 'string' ? 'S' : 'P') + it + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F' + // not necessary to add metadata + if (!create) return 'E' + // add missing metadata + setMeta(it) + // return object ID + } return it[META].i + } + var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true + // not necessary to add metadata + if (!create) return false + // add missing metadata + setMeta(it) + // return hash weak collections IDs + } return it[META].w + } + // add metadata on freeze-family methods calling + var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it) + return it + } + var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze + } + }, { 123: 123, 42: 42, 47: 47, 57: 57, 75: 75 }], + 71: [function (_dereq_, module, exports) { + var global = _dereq_(46) + var macrotask = _dereq_(112).set + var Observer = global.MutationObserver || global.WebKitMutationObserver + var process = global.process + var Promise = global.Promise + var isNode = _dereq_(26)(process) == 'process' + + module.exports = function () { + var head, last, notify + + var flush = function () { + var parent, fn + if (isNode && (parent = process.domain)) parent.exit() + while (head) { + fn = head.fn + head = head.next + try { + fn() + } catch (e) { + if (head) notify() + else last = undefined + throw e + } + } last = undefined + if (parent) parent.enter() + } + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush) + } + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true + var node = document.createTextNode('') + new Observer(flush).observe(node, { characterData: true }) // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle + } + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined) + notify = function () { + promise.then(flush) + } + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush) + } + } + + return function (fn) { + var task = { fn: fn, next: undefined } + if (last) last.next = task + if (!head) { + head = task + notify() + } last = task + } + } + }, { 112: 112, 26: 26, 46: 46 }], + 72: [function (_dereq_, module, exports) { + 'use strict' + // 25.4.1.5 NewPromiseCapability(C) + var aFunction = _dereq_(11) + + function PromiseCapability (C) { + var resolve, reject + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor') + resolve = $$resolve + reject = $$reject + }) + this.resolve = aFunction(resolve) + this.reject = aFunction(reject) + } + + module.exports.f = function (C) { + return new PromiseCapability(C) + } + }, { 11: 11 }], + 73: [function (_dereq_, module, exports) { + 'use strict' + // 19.1.2.1 Object.assign(target, source, ...) + var getKeys = _dereq_(83) + var gOPS = _dereq_(80) + var pIE = _dereq_(84) + var toObject = _dereq_(118) + var IObject = _dereq_(53) + var $assign = Object.assign + + // should work with symbols and should have deterministic property order (V8 bug) + module.exports = !$assign || _dereq_(42)(function () { + var A = {} + var B = {} + // eslint-disable-next-line no-undef + var S = Symbol() + var K = 'abcdefghijklmnopqrst' + A[S] = 7 + K.split('').forEach(function (k) { B[k] = k }) + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K + }) ? function assign (target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target) + var aLen = arguments.length + var index = 1 + var getSymbols = gOPS.f + var isEnum = pIE.f + while (aLen > index) { + var S = IObject(arguments[index++]) + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) + var length = keys.length + var j = 0 + var key + while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key] + } return T + } : $assign + }, { 118: 118, 42: 42, 53: 53, 80: 80, 83: 83, 84: 84 }], + 74: [function (_dereq_, module, exports) { + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + var anObject = _dereq_(16) + var dPs = _dereq_(76) + var enumBugKeys = _dereq_(38) + var IE_PROTO = _dereq_(101)('IE_PROTO') + var Empty = function () { /* empty */ } + var PROTOTYPE = 'prototype' + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = _dereq_(37)('iframe') + var i = enumBugKeys.length + var lt = '<' + var gt = '>' + var iframeDocument + iframe.style.display = 'none' + _dereq_(49).appendChild(iframe) + iframe.src = 'javascript:' // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document + iframeDocument.open() + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt) + iframeDocument.close() + createDict = iframeDocument.F + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]] + return createDict() + } + + module.exports = Object.create || function create (O, Properties) { + var result + if (O !== null) { + Empty[PROTOTYPE] = anObject(O) + result = new Empty() + Empty[PROTOTYPE] = null + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O + } else result = createDict() + return Properties === undefined ? result : dPs(result, Properties) + } + }, { 101: 101, 16: 16, 37: 37, 38: 38, 49: 49, 76: 76 }], + 75: [function (_dereq_, module, exports) { + var anObject = _dereq_(16) + var IE8_DOM_DEFINE = _dereq_(50) + var toPrimitive = _dereq_(119) + var dP = Object.defineProperty + + exports.f = _dereq_(36) ? Object.defineProperty : function defineProperty (O, P, Attributes) { + anObject(O) + P = toPrimitive(P, true) + anObject(Attributes) + if (IE8_DOM_DEFINE) { + try { + return dP(O, P, Attributes) + } catch (e) { /* empty */ } + } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!') + if ('value' in Attributes) O[P] = Attributes.value + return O + } + }, { 119: 119, 16: 16, 36: 36, 50: 50 }], + 76: [function (_dereq_, module, exports) { + var dP = _dereq_(75) + var anObject = _dereq_(16) + var getKeys = _dereq_(83) + + module.exports = _dereq_(36) ? Object.defineProperties : function defineProperties (O, Properties) { + anObject(O) + var keys = getKeys(Properties) + var length = keys.length + var i = 0 + var P + while (length > i) dP.f(O, P = keys[i++], Properties[P]) + return O + } + }, { 16: 16, 36: 36, 75: 75, 83: 83 }], + 77: [function (_dereq_, module, exports) { + var pIE = _dereq_(84) + var createDesc = _dereq_(92) + var toIObject = _dereq_(116) + var toPrimitive = _dereq_(119) + var has = _dereq_(47) + var IE8_DOM_DEFINE = _dereq_(50) + var gOPD = Object.getOwnPropertyDescriptor + + exports.f = _dereq_(36) ? gOPD : function getOwnPropertyDescriptor (O, P) { + O = toIObject(O) + P = toPrimitive(P, true) + if (IE8_DOM_DEFINE) { + try { + return gOPD(O, P) + } catch (e) { /* empty */ } + } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]) + } + }, { 116: 116, 119: 119, 36: 36, 47: 47, 50: 50, 84: 84, 92: 92 }], + 78: [function (_dereq_, module, exports) { + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = _dereq_(116) + var gOPN = _dereq_(79).f + var toString = {}.toString + + var windowNames = typeof window === 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : [] + + var getWindowNames = function (it) { + try { + return gOPN(it) + } catch (e) { + return windowNames.slice() + } + } + + module.exports.f = function getOwnPropertyNames (it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)) + } + }, { 116: 116, 79: 79 }], + 79: [function (_dereq_, module, exports) { + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + var $keys = _dereq_(82) + var hiddenKeys = _dereq_(38).concat('length', 'prototype') + + exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames (O) { + return $keys(O, hiddenKeys) + } + }, { 38: 38, 82: 82 }], + 80: [function (_dereq_, module, exports) { + exports.f = Object.getOwnPropertySymbols + }, {}], + 81: [function (_dereq_, module, exports) { + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + var has = _dereq_(47) + var toObject = _dereq_(118) + var IE_PROTO = _dereq_(101)('IE_PROTO') + var ObjectProto = Object.prototype + + module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O) + if (has(O, IE_PROTO)) return O[IE_PROTO] + if (typeof O.constructor === 'function' && O instanceof O.constructor) { + return O.constructor.prototype + } return O instanceof Object ? ObjectProto : null + } + }, { 101: 101, 118: 118, 47: 47 }], + 82: [function (_dereq_, module, exports) { + var has = _dereq_(47) + var toIObject = _dereq_(116) + var arrayIndexOf = _dereq_(19)(false) + var IE_PROTO = _dereq_(101)('IE_PROTO') + + module.exports = function (object, names) { + var O = toIObject(object) + var i = 0 + var result = [] + var key + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key) + // Don't enum bug & hidden keys + while (names.length > i) { + if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key) + } + } + return result + } + }, { 101: 101, 116: 116, 19: 19, 47: 47 }], + 83: [function (_dereq_, module, exports) { + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + var $keys = _dereq_(82) + var enumBugKeys = _dereq_(38) + + module.exports = Object.keys || function keys (O) { + return $keys(O, enumBugKeys) + } + }, { 38: 38, 82: 82 }], + 84: [function (_dereq_, module, exports) { + exports.f = {}.propertyIsEnumerable + }, {}], + 85: [function (_dereq_, module, exports) { + // most Object methods by ES6 should accept primitives + var $export = _dereq_(40) + var core = _dereq_(30) + var fails = _dereq_(42) + module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY] + var exp = {} + exp[KEY] = exec(fn) + $export($export.S + $export.F * fails(function () { fn(1) }), 'Object', exp) + } + }, { 30: 30, 40: 40, 42: 42 }], + 86: [function (_dereq_, module, exports) { + var getKeys = _dereq_(83) + var toIObject = _dereq_(116) + var isEnum = _dereq_(84).f + module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it) + var keys = getKeys(O) + var length = keys.length + var i = 0 + var result = [] + var key + while (length > i) { + if (isEnum.call(O, key = keys[i++])) { + result.push(isEntries ? [key, O[key]] : O[key]) + } + } return result + } + } + }, { 116: 116, 83: 83, 84: 84 }], + 87: [function (_dereq_, module, exports) { + // all object keys, includes non-enumerable and symbols + var gOPN = _dereq_(79) + var gOPS = _dereq_(80) + var anObject = _dereq_(16) + var Reflect = _dereq_(46).Reflect + module.exports = Reflect && Reflect.ownKeys || function ownKeys (it) { + var keys = gOPN.f(anObject(it)) + var getSymbols = gOPS.f + return getSymbols ? keys.concat(getSymbols(it)) : keys + } + }, { 16: 16, 46: 46, 79: 79, 80: 80 }], + 88: [function (_dereq_, module, exports) { + var $parseFloat = _dereq_(46).parseFloat + var $trim = _dereq_(110).trim + + module.exports = 1 / $parseFloat(_dereq_(111) + '-0') !== -Infinity ? function parseFloat (str) { + var string = $trim(String(str), 3) + var result = $parseFloat(string) + return result === 0 && string.charAt(0) == '-' ? -0 : result + } : $parseFloat + }, { 110: 110, 111: 111, 46: 46 }], + 89: [function (_dereq_, module, exports) { + var $parseInt = _dereq_(46).parseInt + var $trim = _dereq_(110).trim + var ws = _dereq_(111) + var hex = /^[-+]?0[xX]/ + + module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt (str, radix) { + var string = $trim(String(str), 3) + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)) + } : $parseInt + }, { 110: 110, 111: 111, 46: 46 }], + 90: [function (_dereq_, module, exports) { + module.exports = function (exec) { + try { + return { e: false, v: exec() } + } catch (e) { + return { e: true, v: e } + } + } + }, {}], + 91: [function (_dereq_, module, exports) { + var anObject = _dereq_(16) + var isObject = _dereq_(57) + var newPromiseCapability = _dereq_(72) + + module.exports = function (C, x) { + anObject(C) + if (isObject(x) && x.constructor === C) return x + var promiseCapability = newPromiseCapability.f(C) + var resolve = promiseCapability.resolve + resolve(x) + return promiseCapability.promise + } + }, { 16: 16, 57: 57, 72: 72 }], + 92: [function (_dereq_, module, exports) { + module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + } + } + }, {}], + 93: [function (_dereq_, module, exports) { + var redefine = _dereq_(94) + module.exports = function (target, src, safe) { + for (var key in src) redefine(target, key, src[key], safe) + return target + } + }, { 94: 94 }], + 94: [function (_dereq_, module, exports) { + var global = _dereq_(46) + var hide = _dereq_(48) + var has = _dereq_(47) + var SRC = _dereq_(123)('src') + var TO_STRING = 'toString' + var $toString = Function[TO_STRING] + var TPL = ('' + $toString).split(TO_STRING) + + _dereq_(30).inspectSource = function (it) { + return $toString.call(it) + }; + + (module.exports = function (O, key, val, safe) { + var isFunction = typeof val === 'function' + if (isFunction) has(val, 'name') || hide(val, 'name', key) + if (O[key] === val) return + if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))) + if (O === global) { + O[key] = val + } else if (!safe) { + delete O[key] + hide(O, key, val) + } else if (O[key]) { + O[key] = val + } else { + hide(O, key, val) + } + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + })(Function.prototype, TO_STRING, function toString () { + return typeof this === 'function' && this[SRC] || $toString.call(this) + }) + }, { 123: 123, 30: 30, 46: 46, 47: 47, 48: 48 }], + 95: [function (_dereq_, module, exports) { + 'use strict' + + var classof = _dereq_(25) + var builtinExec = RegExp.prototype.exec + + // `RegExpExec` abstract operation + // https://tc39.github.io/ecma262/#sec-regexpexec + module.exports = function (R, S) { + var exec = R.exec + if (typeof exec === 'function') { + var result = exec.call(R, S) + if (typeof result !== 'object') { + throw new TypeError('RegExp exec method returned something other than an Object or null') + } + return result + } + if (classof(R) !== 'RegExp') { + throw new TypeError('RegExp#exec called on incompatible receiver') + } + return builtinExec.call(R, S) + } + }, { 25: 25 }], + 96: [function (_dereq_, module, exports) { + 'use strict' + + var regexpFlags = _dereq_(44) + + var nativeExec = RegExp.prototype.exec + // This always refers to the native implementation, because the + // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, + // which loads this file before patching the method. + var nativeReplace = String.prototype.replace + + var patchedExec = nativeExec + + var LAST_INDEX = 'lastIndex' + + var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/ + var re2 = /b*/g + nativeExec.call(re1, 'a') + nativeExec.call(re2, 'a') + return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0 + })() + + // nonparticipating capturing group, copied from es5-shim's String#split patch. + var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined + + var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED + + if (PATCH) { + patchedExec = function exec (str) { + var re = this + var lastIndex, reCopy, match, i + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)) + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX] + + match = nativeExec.call(re, str) + + if (UPDATES_LAST_INDEX_WRONG && match) { + re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + // eslint-disable-next-line no-loop-func + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined + } + }) + } + + return match + } + } + + module.exports = patchedExec + }, { 44: 44 }], + 97: [function (_dereq_, module, exports) { + // 7.2.9 SameValue(x, y) + module.exports = Object.is || function is (x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y + } + }, {}], + 98: [function (_dereq_, module, exports) { + // Works with __proto__ only. Old v8 can't work with null proto objects. + /* eslint-disable no-proto */ + var isObject = _dereq_(57) + var anObject = _dereq_(16) + var check = function (O, proto) { + anObject(O) + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!") + } + module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + (function (test, buggy, set) { + try { + set = _dereq_(32)(Function.call, _dereq_(77).f(Object.prototype, '__proto__').set, 2) + set(test, []) + buggy = !(test instanceof Array) + } catch (e) { buggy = true } + return function setPrototypeOf (O, proto) { + check(O, proto) + if (buggy) O.__proto__ = proto + else set(O, proto) + return O + } + }({}, false)) : undefined), + check: check + } + }, { 16: 16, 32: 32, 57: 57, 77: 77 }], + 99: [function (_dereq_, module, exports) { + 'use strict' + var global = _dereq_(46) + var dP = _dereq_(75) + var DESCRIPTORS = _dereq_(36) + var SPECIES = _dereq_(128)('species') + + module.exports = function (KEY) { + var C = global[KEY] + if (DESCRIPTORS && C && !C[SPECIES]) { + dP.f(C, SPECIES, { + configurable: true, + get: function () { return this } + }) + } + } + }, { 128: 128, 36: 36, 46: 46, 75: 75 }], + 100: [function (_dereq_, module, exports) { + var def = _dereq_(75).f + var has = _dereq_(47) + var TAG = _dereq_(128)('toStringTag') + + module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }) + } + }, { 128: 128, 47: 47, 75: 75 }], + 101: [function (_dereq_, module, exports) { + var shared = _dereq_(102)('keys') + var uid = _dereq_(123) + module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)) + } + }, { 102: 102, 123: 123 }], + 102: [function (_dereq_, module, exports) { + var core = _dereq_(30) + var global = _dereq_(46) + var SHARED = '__core-js_shared__' + var store = global[SHARED] || (global[SHARED] = {}); + + (module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}) + })('versions', []).push({ + version: core.version, + mode: _dereq_(65) ? 'pure' : 'global', + copyright: '© 2018 Denis Pushkarev (zloirock.ru)' + }) + }, { 30: 30, 46: 46, 65: 65 }], + 103: [function (_dereq_, module, exports) { + // 7.3.20 SpeciesConstructor(O, defaultConstructor) + var anObject = _dereq_(16) + var aFunction = _dereq_(11) + var SPECIES = _dereq_(128)('species') + module.exports = function (O, D) { + var C = anObject(O).constructor + var S + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S) + } + }, { 11: 11, 128: 128, 16: 16 }], + 104: [function (_dereq_, module, exports) { + 'use strict' + var fails = _dereq_(42) + + module.exports = function (method, arg) { + return !!method && fails(function () { + // eslint-disable-next-line no-useless-call + arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null) + }) + } + }, { 42: 42 }], + 105: [function (_dereq_, module, exports) { + var toInteger = _dereq_(115) + var defined = _dereq_(35) + // true -> String#at + // false -> String#codePointAt + module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)) + var i = toInteger(pos) + var l = s.length + var a, b + if (i < 0 || i >= l) return TO_STRING ? '' : undefined + a = s.charCodeAt(i) + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000 + } + } + }, { 115: 115, 35: 35 }], + 106: [function (_dereq_, module, exports) { + // helper for String#{startsWith, endsWith, includes} + var isRegExp = _dereq_(58) + var defined = _dereq_(35) + + module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!") + return String(defined(that)) + } + }, { 35: 35, 58: 58 }], + 107: [function (_dereq_, module, exports) { + var $export = _dereq_(40) + var fails = _dereq_(42) + var defined = _dereq_(35) + var quot = /"/g + // B.2.3.2.1 CreateHTML(string, tag, attribute, value) + var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)) + var p1 = '<' + tag + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"' + return p1 + '>' + S + '' + } + module.exports = function (NAME, exec) { + var O = {} + O[NAME] = exec(createHTML) + $export($export.P + $export.F * fails(function () { + var test = ''[NAME]('"') + return test !== test.toLowerCase() || test.split('"').length > 3 + }), 'String', O) + } + }, { 35: 35, 40: 40, 42: 42 }], + 108: [function (_dereq_, module, exports) { + // https://github.com/tc39/proposal-string-pad-start-end + var toLength = _dereq_(117) + var repeat = _dereq_(109) + var defined = _dereq_(35) + + module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)) + var stringLength = S.length + var fillStr = fillString === undefined ? ' ' : String(fillString) + var intMaxLength = toLength(maxLength) + if (intMaxLength <= stringLength || fillStr == '') return S + var fillLen = intMaxLength - stringLength + var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)) + if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen) + return left ? stringFiller + S : S + stringFiller + } + }, { 109: 109, 117: 117, 35: 35 }], + 109: [function (_dereq_, module, exports) { + 'use strict' + var toInteger = _dereq_(115) + var defined = _dereq_(35) + + module.exports = function repeat (count) { + var str = String(defined(this)) + var res = '' + var n = toInteger(count) + if (n < 0 || n == Infinity) throw RangeError("Count can't be negative") + for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str + return res + } + }, { 115: 115, 35: 35 }], + 110: [function (_dereq_, module, exports) { + var $export = _dereq_(40) + var defined = _dereq_(35) + var fails = _dereq_(42) + var spaces = _dereq_(111) + var space = '[' + spaces + ']' + var non = '\u200b\u0085' + var ltrim = RegExp('^' + space + space + '*') + var rtrim = RegExp(space + space + '*$') + + var exporter = function (KEY, exec, ALIAS) { + var exp = {} + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non + }) + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY] + if (ALIAS) exp[ALIAS] = fn + $export($export.P + $export.F * FORCE, 'String', exp) + } + + // 1 -> String#trimLeft + // 2 -> String#trimRight + // 3 -> String#trim + var trim = exporter.trim = function (string, TYPE) { + string = String(defined(string)) + if (TYPE & 1) string = string.replace(ltrim, '') + if (TYPE & 2) string = string.replace(rtrim, '') + return string + } + + module.exports = exporter + }, { 111: 111, 35: 35, 40: 40, 42: 42 }], + 111: [function (_dereq_, module, exports) { + module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF' + }, {}], + 112: [function (_dereq_, module, exports) { + var ctx = _dereq_(32) + var invoke = _dereq_(52) + var html = _dereq_(49) + var cel = _dereq_(37) + var global = _dereq_(46) + var process = global.process + var setTask = global.setImmediate + var clearTask = global.clearImmediate + var MessageChannel = global.MessageChannel + var Dispatch = global.Dispatch + var counter = 0 + var queue = {} + var ONREADYSTATECHANGE = 'onreadystatechange' + var defer, channel, port + var run = function () { + var id = +this + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id] + delete queue[id] + fn() + } + } + var listener = function (event) { + run.call(event.data) + } + // Node.js 0.9+ & IE10+ has setImmediate, otherwise: + if (!setTask || !clearTask) { + setTask = function setImmediate (fn) { + var args = [] + var i = 1 + while (arguments.length > i) args.push(arguments[i++]) + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn === 'function' ? fn : Function(fn), args) + } + defer(counter) + return counter + } + clearTask = function clearImmediate (id) { + delete queue[id] + } + // Node.js 0.8- + if (_dereq_(26)(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)) + } + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)) + } + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel() + port = channel.port2 + channel.port1.onmessage = listener + defer = ctx(port.postMessage, port, 1) + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage === 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*') + } + global.addEventListener('message', listener, false) + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this) + run.call(id) + } + } + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0) + } + } + } + module.exports = { + set: setTask, + clear: clearTask + } + }, { 26: 26, 32: 32, 37: 37, 46: 46, 49: 49, 52: 52 }], + 113: [function (_dereq_, module, exports) { + var toInteger = _dereq_(115) + var max = Math.max + var min = Math.min + module.exports = function (index, length) { + index = toInteger(index) + return index < 0 ? max(index + length, 0) : min(index, length) + } + }, { 115: 115 }], + 114: [function (_dereq_, module, exports) { + // https://tc39.github.io/ecma262/#sec-toindex + var toInteger = _dereq_(115) + var toLength = _dereq_(117) + module.exports = function (it) { + if (it === undefined) return 0 + var number = toInteger(it) + var length = toLength(number) + if (number !== length) throw RangeError('Wrong length!') + return length + } + }, { 115: 115, 117: 117 }], + 115: [function (_dereq_, module, exports) { + // 7.1.4 ToInteger + var ceil = Math.ceil + var floor = Math.floor + module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it) + } + }, {}], + 116: [function (_dereq_, module, exports) { + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = _dereq_(53) + var defined = _dereq_(35) + module.exports = function (it) { + return IObject(defined(it)) + } + }, { 35: 35, 53: 53 }], + 117: [function (_dereq_, module, exports) { + // 7.1.15 ToLength + var toInteger = _dereq_(115) + var min = Math.min + module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0 // pow(2, 53) - 1 == 9007199254740991 + } + }, { 115: 115 }], + 118: [function (_dereq_, module, exports) { + // 7.1.13 ToObject(argument) + var defined = _dereq_(35) + module.exports = function (it) { + return Object(defined(it)) + } + }, { 35: 35 }], + 119: [function (_dereq_, module, exports) { + // 7.1.1 ToPrimitive(input [, PreferredType]) + var isObject = _dereq_(57) + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + module.exports = function (it, S) { + if (!isObject(it)) return it + var fn, val + if (S && typeof (fn = it.toString) === 'function' && !isObject(val = fn.call(it))) return val + if (typeof (fn = it.valueOf) === 'function' && !isObject(val = fn.call(it))) return val + if (!S && typeof (fn = it.toString) === 'function' && !isObject(val = fn.call(it))) return val + throw TypeError("Can't convert object to primitive value") + } + }, { 57: 57 }], + 120: [function (_dereq_, module, exports) { + 'use strict' + if (_dereq_(36)) { + var LIBRARY = _dereq_(65) + var global = _dereq_(46) + var fails = _dereq_(42) + var $export = _dereq_(40) + var $typed = _dereq_(122) + var $buffer = _dereq_(121) + var ctx = _dereq_(32) + var anInstance = _dereq_(15) + var propertyDesc = _dereq_(92) + var hide = _dereq_(48) + var redefineAll = _dereq_(93) + var toInteger = _dereq_(115) + var toLength = _dereq_(117) + var toIndex = _dereq_(114) + var toAbsoluteIndex = _dereq_(113) + var toPrimitive = _dereq_(119) + var has = _dereq_(47) + var classof = _dereq_(25) + var isObject = _dereq_(57) + var toObject = _dereq_(118) + var isArrayIter = _dereq_(54) + var create = _dereq_(74) + var getPrototypeOf = _dereq_(81) + var gOPN = _dereq_(79).f + var getIterFn = _dereq_(129) + var uid = _dereq_(123) + var wks = _dereq_(128) + var createArrayMethod = _dereq_(20) + var createArrayIncludes = _dereq_(19) + var speciesConstructor = _dereq_(103) + var ArrayIterators = _dereq_(140) + var Iterators = _dereq_(64) + var $iterDetect = _dereq_(62) + var setSpecies = _dereq_(99) + var arrayFill = _dereq_(18) + var arrayCopyWithin = _dereq_(17) + var $DP = _dereq_(75) + var $GOPD = _dereq_(77) + var dP = $DP.f + var gOPD = $GOPD.f + var RangeError = global.RangeError + var TypeError = global.TypeError + var Uint8Array = global.Uint8Array + var ARRAY_BUFFER = 'ArrayBuffer' + var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER + var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT' + var PROTOTYPE = 'prototype' + var ArrayProto = Array[PROTOTYPE] + var $ArrayBuffer = $buffer.ArrayBuffer + var $DataView = $buffer.DataView + var arrayForEach = createArrayMethod(0) + var arrayFilter = createArrayMethod(2) + var arraySome = createArrayMethod(3) + var arrayEvery = createArrayMethod(4) + var arrayFind = createArrayMethod(5) + var arrayFindIndex = createArrayMethod(6) + var arrayIncludes = createArrayIncludes(true) + var arrayIndexOf = createArrayIncludes(false) + var arrayValues = ArrayIterators.values + var arrayKeys = ArrayIterators.keys + var arrayEntries = ArrayIterators.entries + var arrayLastIndexOf = ArrayProto.lastIndexOf + var arrayReduce = ArrayProto.reduce + var arrayReduceRight = ArrayProto.reduceRight + var arrayJoin = ArrayProto.join + var arraySort = ArrayProto.sort + var arraySlice = ArrayProto.slice + var arrayToString = ArrayProto.toString + var arrayToLocaleString = ArrayProto.toLocaleString + var ITERATOR = wks('iterator') + var TAG = wks('toStringTag') + var TYPED_CONSTRUCTOR = uid('typed_constructor') + var DEF_CONSTRUCTOR = uid('def_constructor') + var ALL_CONSTRUCTORS = $typed.CONSTR + var TYPED_ARRAY = $typed.TYPED + var VIEW = $typed.VIEW + var WRONG_LENGTH = 'Wrong length!' + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length) + }) + + var LITTLE_ENDIAN = fails(function () { + // eslint-disable-next-line no-undef + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1 + }) + + var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { + new Uint8Array(1).set({}) + }) + + var toOffset = function (it, BYTES) { + var offset = toInteger(it) + if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!') + return offset + } + + var validate = function (it) { + if (isObject(it) && TYPED_ARRAY in it) return it + throw TypeError(it + ' is not a typed array!') + } + + var allocate = function (C, length) { + if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { + throw TypeError('It is not a typed array constructor!') + } return new C(length) + } + + var speciesFromList = function (O, list) { + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list) + } + + var fromList = function (C, list) { + var index = 0 + var length = list.length + var result = allocate(C, length) + while (length > index) result[index] = list[index++] + return result + } + + var addGetter = function (it, key, internal) { + dP(it, key, { get: function () { return this._d[internal] } }) + } + + var $from = function from (source /* , mapfn, thisArg */) { + var O = toObject(source) + var aLen = arguments.length + var mapfn = aLen > 1 ? arguments[1] : undefined + var mapping = mapfn !== undefined + var iterFn = getIterFn(O) + var i, length, values, result, step, iterator + if (iterFn != undefined && !isArrayIter(iterFn)) { + for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { + values.push(step.value) + } O = values + } + if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2) + for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { + result[i] = mapping ? mapfn(O[i], i) : O[i] + } + return result + } + + var $of = function of (/* ...items */) { + var index = 0 + var length = arguments.length + var result = allocate(this, length) + while (length > index) result[index] = arguments[index++] + return result + } + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)) }) + + var $toLocaleString = function toLocaleString () { + return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments) + } + + var proto = { + copyWithin: function copyWithin (target, start /* , end */) { + return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined) + }, + every: function every (callbackfn /* , thisArg */) { + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined) + }, + fill: function fill (value /* , start, end */) { // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments) + }, + filter: function filter (callbackfn /* , thisArg */) { + return speciesFromList(this, arrayFilter(validate(this), callbackfn, + arguments.length > 1 ? arguments[1] : undefined)) + }, + find: function find (predicate /* , thisArg */) { + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined) + }, + findIndex: function findIndex (predicate /* , thisArg */) { + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined) + }, + forEach: function forEach (callbackfn /* , thisArg */) { + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined) + }, + indexOf: function indexOf (searchElement /* , fromIndex */) { + return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined) + }, + includes: function includes (searchElement /* , fromIndex */) { + return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined) + }, + join: function join (separator) { // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments) + }, + lastIndexOf: function lastIndexOf (searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments) + }, + map: function map (mapfn /* , thisArg */) { + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined) + }, + reduce: function reduce (callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments) + }, + reduceRight: function reduceRight (callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments) + }, + reverse: function reverse () { + var that = this + var length = validate(that).length + var middle = Math.floor(length / 2) + var index = 0 + var value + while (index < middle) { + value = that[index] + that[index++] = that[--length] + that[length] = value + } return that + }, + some: function some (callbackfn /* , thisArg */) { + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined) + }, + sort: function sort (comparefn) { + return arraySort.call(validate(this), comparefn) + }, + subarray: function subarray (begin, end) { + var O = validate(this) + var length = O.length + var $begin = toAbsoluteIndex(begin, length) + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) + ) + } + } + + var $slice = function slice (start, end) { + return speciesFromList(this, arraySlice.call(validate(this), start, end)) + } + + var $set = function set (arrayLike /* , offset */) { + validate(this) + var offset = toOffset(arguments[1], 1) + var length = this.length + var src = toObject(arrayLike) + var len = toLength(src.length) + var index = 0 + if (len + offset > length) throw RangeError(WRONG_LENGTH) + while (index < len) this[offset + index] = src[index++] + } + + var $iterators = { + entries: function entries () { + return arrayEntries.call(validate(this)) + }, + keys: function keys () { + return arrayKeys.call(validate(this)) + }, + values: function values () { + return arrayValues.call(validate(this)) + } + } + + var isTAIndex = function (target, key) { + return isObject(target) && + target[TYPED_ARRAY] && + typeof key !== 'symbol' && + key in target && + String(+key) == String(key) + } + var $getDesc = function getOwnPropertyDescriptor (target, key) { + return isTAIndex(target, key = toPrimitive(key, true)) + ? propertyDesc(2, target[key]) + : gOPD(target, key) + } + var $setDesc = function defineProperty (target, key, desc) { + if (isTAIndex(target, key = toPrimitive(key, true)) && + isObject(desc) && + has(desc, 'value') && + !has(desc, 'get') && + !has(desc, 'set') && + // TODO: add validation descriptor w/o calling accessors + !desc.configurable && + (!has(desc, 'writable') || desc.writable) && + (!has(desc, 'enumerable') || desc.enumerable) + ) { + target[key] = desc.value + return target + } return dP(target, key, desc) + } + + if (!ALL_CONSTRUCTORS) { + $GOPD.f = $getDesc + $DP.f = $setDesc + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc + }) + + if (fails(function () { arrayToString.call({}) })) { + arrayToString = arrayToLocaleString = function toString () { + return arrayJoin.call(this) + } + } + + var $TypedArrayPrototype$ = redefineAll({}, proto) + redefineAll($TypedArrayPrototype$, $iterators) + hide($TypedArrayPrototype$, ITERATOR, $iterators.values) + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function () { /* noop */ }, + toString: arrayToString, + toLocaleString: $toLocaleString + }) + addGetter($TypedArrayPrototype$, 'buffer', 'b') + addGetter($TypedArrayPrototype$, 'byteOffset', 'o') + addGetter($TypedArrayPrototype$, 'byteLength', 'l') + addGetter($TypedArrayPrototype$, 'length', 'e') + dP($TypedArrayPrototype$, TAG, { + get: function () { return this[TYPED_ARRAY] } + }) + + // eslint-disable-next-line max-statements + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array' + var GETTER = 'get' + KEY + var SETTER = 'set' + KEY + var TypedArray = global[NAME] + var Base = TypedArray || {} + var TAC = TypedArray && getPrototypeOf(TypedArray) + var FORCED = !TypedArray || !$typed.ABV + var O = {} + var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE] + var getter = function (that, index) { + var data = that._d + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN) + } + var setter = function (that, index, value) { + var data = that._d + if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN) + } + var addElement = function (that, index) { + dP(that, index, { + get: function () { + return getter(this, index) + }, + set: function (value) { + return setter(this, index, value) + }, + enumerable: true + }) + } + if (FORCED) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME, '_d') + var index = 0 + var offset = 0 + var buffer, byteLength, length, klass + if (!isObject(data)) { + length = toIndex(data) + byteLength = length * BYTES + buffer = new $ArrayBuffer(byteLength) + } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { + buffer = data + offset = toOffset($offset, BYTES) + var $len = data.byteLength + if ($length === undefined) { + if ($len % BYTES) throw RangeError(WRONG_LENGTH) + byteLength = $len - offset + if (byteLength < 0) throw RangeError(WRONG_LENGTH) + } else { + byteLength = toLength($length) * BYTES + if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH) + } + length = byteLength / BYTES + } else if (TYPED_ARRAY in data) { + return fromList(TypedArray, data) + } else { + return $from.call(TypedArray, data) + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer) + }) + while (index < length) addElement(that, index++) + }) + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$) + hide(TypedArrayPrototype, 'constructor', TypedArray) + } else if (!fails(function () { + TypedArray(1) + }) || !fails(function () { + new TypedArray(-1) // eslint-disable-line no-new + }) || !$iterDetect(function (iter) { + new TypedArray() // eslint-disable-line no-new + new TypedArray(null) // eslint-disable-line no-new + new TypedArray(1.5) // eslint-disable-line no-new + new TypedArray(iter) // eslint-disable-line no-new + }, true)) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME) + var klass + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if (!isObject(data)) return new Base(toIndex(data)) + if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data) + } + if (TYPED_ARRAY in data) return fromList(TypedArray, data) + return $from.call(TypedArray, data) + }) + arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) { + if (!(key in TypedArray)) hide(TypedArray, key, Base[key]) + }) + TypedArray[PROTOTYPE] = TypedArrayPrototype + if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray + } + var $nativeIterator = TypedArrayPrototype[ITERATOR] + var CORRECT_ITER_NAME = !!$nativeIterator && + ($nativeIterator.name == 'values' || $nativeIterator.name == undefined) + var $iterator = $iterators.values + hide(TypedArray, TYPED_CONSTRUCTOR, true) + hide(TypedArrayPrototype, TYPED_ARRAY, NAME) + hide(TypedArrayPrototype, VIEW, true) + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray) + + if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { + dP(TypedArrayPrototype, TAG, { + get: function () { return NAME } + }) + } + + O[NAME] = TypedArray + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O) + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES + }) + + $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1) }), NAME, { + from: $from, + of: $of + }) + + if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES) + + $export($export.P, NAME, proto) + + setSpecies(NAME) + + $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }) + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators) + + if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString + + $export($export.P + $export.F * fails(function () { + new TypedArray(1).slice() + }), NAME, { slice: $slice }) + + $export($export.P + $export.F * (fails(function () { + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString() + }) || !fails(function () { + TypedArrayPrototype.toLocaleString.call([1, 2]) + })), NAME, { toLocaleString: $toLocaleString }) + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator + if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator) + } + } else module.exports = function () { /* empty */ } + }, { 103: 103, 113: 113, 114: 114, 115: 115, 117: 117, 118: 118, 119: 119, 121: 121, 122: 122, 123: 123, 128: 128, 129: 129, 140: 140, 15: 15, 17: 17, 18: 18, 19: 19, 20: 20, 25: 25, 32: 32, 36: 36, 40: 40, 42: 42, 46: 46, 47: 47, 48: 48, 54: 54, 57: 57, 62: 62, 64: 64, 65: 65, 74: 74, 75: 75, 77: 77, 79: 79, 81: 81, 92: 92, 93: 93, 99: 99 }], + 121: [function (_dereq_, module, exports) { + 'use strict' + var global = _dereq_(46) + var DESCRIPTORS = _dereq_(36) + var LIBRARY = _dereq_(65) + var $typed = _dereq_(122) + var hide = _dereq_(48) + var redefineAll = _dereq_(93) + var fails = _dereq_(42) + var anInstance = _dereq_(15) + var toInteger = _dereq_(115) + var toLength = _dereq_(117) + var toIndex = _dereq_(114) + var gOPN = _dereq_(79).f + var dP = _dereq_(75).f + var arrayFill = _dereq_(18) + var setToStringTag = _dereq_(100) + var ARRAY_BUFFER = 'ArrayBuffer' + var DATA_VIEW = 'DataView' + var PROTOTYPE = 'prototype' + var WRONG_LENGTH = 'Wrong length!' + var WRONG_INDEX = 'Wrong index!' + var $ArrayBuffer = global[ARRAY_BUFFER] + var $DataView = global[DATA_VIEW] + var Math = global.Math + var RangeError = global.RangeError + // eslint-disable-next-line no-shadow-restricted-names + var Infinity = global.Infinity + var BaseBuffer = $ArrayBuffer + var abs = Math.abs + var pow = Math.pow + var floor = Math.floor + var log = Math.log + var LN2 = Math.LN2 + var BUFFER = 'buffer' + var BYTE_LENGTH = 'byteLength' + var BYTE_OFFSET = 'byteOffset' + var $BUFFER = DESCRIPTORS ? '_b' : BUFFER + var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH + var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET + + // IEEE754 conversions based on https://github.com/feross/ieee754 + function packIEEE754 (value, mLen, nBytes) { + var buffer = new Array(nBytes) + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0 + var i = 0 + var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0 + var e, m, c + value = abs(value) + // eslint-disable-next-line no-self-compare + if (value != value || value === Infinity) { + // eslint-disable-next-line no-self-compare + m = value != value ? 1 : 0 + e = eMax + } else { + e = floor(log(value) / LN2) + if (value * (c = pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c } else { - return $from.call(TypedArray, data); + value += rt * pow(2, 1 - eBias) } - hide(that, '_d', { - b: buffer, - o: offset, - l: byteLength, - e: length, - v: new $DataView(buffer) - }); - while (index < length) addElement(that, index++); - }); - TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); - hide(TypedArrayPrototype, 'constructor', TypedArray); - } else if (!fails(function () { - TypedArray(1); - }) || !fails(function () { - new TypedArray(-1); // eslint-disable-line no-new - }) || !$iterDetect(function (iter) { - new TypedArray(); // eslint-disable-line no-new - new TypedArray(null); // eslint-disable-line no-new - new TypedArray(1.5); // eslint-disable-line no-new - new TypedArray(iter); // eslint-disable-line no-new - }, true)) { - TypedArray = wrapper(function (that, data, $offset, $length) { - anInstance(that, TypedArray, NAME); - var klass; - // `ws` module bug, temporarily remove validation length for Uint8Array - // https://github.com/websockets/ws/pull/645 - if (!isObject(data)) return new Base(toIndex(data)); - if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { - return $length !== undefined - ? new Base(data, toOffset($offset, BYTES), $length) - : $offset !== undefined - ? new Base(data, toOffset($offset, BYTES)) - : new Base(data); + if (value * c >= 2) { + e++ + c /= 2 } - if (TYPED_ARRAY in data) return fromList(TypedArray, data); - return $from.call(TypedArray, data); - }); - arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) { - if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); - }); - TypedArray[PROTOTYPE] = TypedArrayPrototype; - if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = (value * c - 1) * pow(2, mLen) + e = e + eBias + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen) + e = 0 + } + } + for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = e << mLen | m + eLen += mLen + for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128 + return buffer } - var $nativeIterator = TypedArrayPrototype[ITERATOR]; - var CORRECT_ITER_NAME = !!$nativeIterator - && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); - var $iterator = $iterators.values; - hide(TypedArray, TYPED_CONSTRUCTOR, true); - hide(TypedArrayPrototype, TYPED_ARRAY, NAME); - hide(TypedArrayPrototype, VIEW, true); - hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); - - if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { - dP(TypedArrayPrototype, TAG, { - get: function () { return NAME; } - }); + function unpackIEEE754 (buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = eLen - 7 + var i = nBytes - 1 + var s = buffer[i--] + var e = s & 127 + var m + s >>= 7 + for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & (1 << -nBits) - 1 + e >>= -nBits + nBits += mLen + for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : s ? -Infinity : Infinity + } else { + m = m + pow(2, mLen) + e = e - eBias + } return (s ? -1 : 1) * m * pow(2, e - mLen) } - O[NAME] = TypedArray; + function unpackI32 (bytes) { + return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0] + } + function packI8 (it) { + return [it & 0xff] + } + function packI16 (it) { + return [it & 0xff, it >> 8 & 0xff] + } + function packI32 (it) { + return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff] + } + function packF64 (it) { + return packIEEE754(it, 52, 8) + } + function packF32 (it) { + return packIEEE754(it, 23, 4) + } - $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + function addGetter (C, key, internal) { + dP(C[PROTOTYPE], key, { get: function () { return this[internal] } }) + } - $export($export.S, NAME, { - BYTES_PER_ELEMENT: BYTES - }); + function get (view, bytes, index, isLittleEndian) { + var numIndex = +index + var intIndex = toIndex(numIndex) + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX) + var store = view[$BUFFER]._b + var start = intIndex + view[$OFFSET] + var pack = store.slice(start, start + bytes) + return isLittleEndian ? pack : pack.reverse() + } + function set (view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index + var intIndex = toIndex(numIndex) + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX) + var store = view[$BUFFER]._b + var start = intIndex + view[$OFFSET] + var pack = conversion(+value) + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1] + } - $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { - from: $from, - of: $of - }); + if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer (length) { + anInstance(this, $ArrayBuffer, ARRAY_BUFFER) + var byteLength = toIndex(length) + this._b = arrayFill.call(new Array(byteLength), 0) + this[$LENGTH] = byteLength + } - if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + $DataView = function DataView (buffer, byteOffset, byteLength) { + anInstance(this, $DataView, DATA_VIEW) + anInstance(buffer, $ArrayBuffer, DATA_VIEW) + var bufferLength = buffer[$LENGTH] + var offset = toInteger(byteOffset) + if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!') + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength) + if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH) + this[$BUFFER] = buffer + this[$OFFSET] = offset + this[$LENGTH] = byteLength + } - $export($export.P, NAME, proto); + if (DESCRIPTORS) { + addGetter($ArrayBuffer, BYTE_LENGTH, '_l') + addGetter($DataView, BUFFER, '_b') + addGetter($DataView, BYTE_LENGTH, '_l') + addGetter($DataView, BYTE_OFFSET, '_o') + } - setSpecies(NAME); + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8 (byteOffset) { + return get(this, 1, byteOffset)[0] << 24 >> 24 + }, + getUint8: function getUint8 (byteOffset) { + return get(this, 1, byteOffset)[0] + }, + getInt16: function getInt16 (byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]) + return (bytes[1] << 8 | bytes[0]) << 16 >> 16 + }, + getUint16: function getUint16 (byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]) + return bytes[1] << 8 | bytes[0] + }, + getInt32: function getInt32 (byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])) + }, + getUint32: function getUint32 (byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0 + }, + getFloat32: function getFloat32 (byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4) + }, + getFloat64: function getFloat64 (byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8) + }, + setInt8: function setInt8 (byteOffset, value) { + set(this, 1, byteOffset, packI8, value) + }, + setUint8: function setUint8 (byteOffset, value) { + set(this, 1, byteOffset, packI8, value) + }, + setInt16: function setInt16 (byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]) + }, + setUint16: function setUint16 (byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]) + }, + setInt32: function setInt32 (byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]) + }, + setUint32: function setUint32 (byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]) + }, + setFloat32: function setFloat32 (byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packF32, value, arguments[2]) + }, + setFloat64: function setFloat64 (byteOffset, value /* , littleEndian */) { + set(this, 8, byteOffset, packF64, value, arguments[2]) + } + }) + } else { + if (!fails(function () { + $ArrayBuffer(1) + }) || !fails(function () { + new $ArrayBuffer(-1) // eslint-disable-line no-new + }) || fails(function () { + new $ArrayBuffer() // eslint-disable-line no-new + new $ArrayBuffer(1.5) // eslint-disable-line no-new + new $ArrayBuffer(NaN) // eslint-disable-line no-new + return $ArrayBuffer.name != ARRAY_BUFFER + })) { + $ArrayBuffer = function ArrayBuffer (length) { + anInstance(this, $ArrayBuffer) + return new BaseBuffer(toIndex(length)) + } + var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE] + for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) { + if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]) + } + if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)) + var $setInt8 = $DataView[PROTOTYPE].setInt8 + view.setInt8(0, 2147483648) + view.setInt8(1, 2147483649) + if (view.getInt8(0) || !view.getInt8(1)) { + redefineAll($DataView[PROTOTYPE], { + setInt8: function setInt8 (byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24) + }, + setUint8: function setUint8 (byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24) + } + }, true) + } + } + setToStringTag($ArrayBuffer, ARRAY_BUFFER) + setToStringTag($DataView, DATA_VIEW) + hide($DataView[PROTOTYPE], $typed.VIEW, true) + exports[ARRAY_BUFFER] = $ArrayBuffer + exports[DATA_VIEW] = $DataView + }, { 100: 100, 114: 114, 115: 115, 117: 117, 122: 122, 15: 15, 18: 18, 36: 36, 42: 42, 46: 46, 48: 48, 65: 65, 75: 75, 79: 79, 93: 93 }], + 122: [function (_dereq_, module, exports) { + var global = _dereq_(46) + var hide = _dereq_(48) + var uid = _dereq_(123) + var TYPED = uid('typed_array') + var VIEW = uid('view') + var ABV = !!(global.ArrayBuffer && global.DataView) + var CONSTR = ABV + var i = 0 + var l = 9 + var Typed - $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); + var TypedArrayConstructors = ( + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' + ).split(',') - $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + while (i < l) { + if (Typed = global[TypedArrayConstructors[i++]]) { + hide(Typed.prototype, TYPED, true) + hide(Typed.prototype, VIEW, true) + } else CONSTR = false + } - if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString; + module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW + } + }, { 123: 123, 46: 46, 48: 48 }], + 123: [function (_dereq_, module, exports) { + var id = 0 + var px = Math.random() + module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)) + } + }, {}], + 124: [function (_dereq_, module, exports) { + var global = _dereq_(46) + var navigator = global.navigator - $export($export.P + $export.F * fails(function () { - new TypedArray(1).slice(); - }), NAME, { slice: $slice }); + module.exports = navigator && navigator.userAgent || '' + }, { 46: 46 }], + 125: [function (_dereq_, module, exports) { + var isObject = _dereq_(57) + module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!') + return it + } + }, { 57: 57 }], + 126: [function (_dereq_, module, exports) { + var global = _dereq_(46) + var core = _dereq_(30) + var LIBRARY = _dereq_(65) + var wksExt = _dereq_(127) + var defineProperty = _dereq_(75).f + module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}) + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }) + } + }, { 127: 127, 30: 30, 46: 46, 65: 65, 75: 75 }], + 127: [function (_dereq_, module, exports) { + exports.f = _dereq_(128) + }, { 128: 128 }], + 128: [function (_dereq_, module, exports) { + var store = _dereq_(102)('wks') + var uid = _dereq_(123) + var Symbol = _dereq_(46).Symbol + var USE_SYMBOL = typeof Symbol === 'function' + + var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)) + } + + $exports.store = store + }, { 102: 102, 123: 123, 46: 46 }], + 129: [function (_dereq_, module, exports) { + var classof = _dereq_(25) + var ITERATOR = _dereq_(128)('iterator') + var Iterators = _dereq_(64) + module.exports = _dereq_(30).getIteratorMethod = function (it) { + if (it != undefined) { + return it[ITERATOR] || + it['@@iterator'] || + Iterators[classof(it)] + } + } + }, { 128: 128, 25: 25, 30: 30, 64: 64 }], + 130: [function (_dereq_, module, exports) { + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + var $export = _dereq_(40) + + $export($export.P, 'Array', { copyWithin: _dereq_(17) }) + + _dereq_(13)('copyWithin') + }, { 13: 13, 17: 17, 40: 40 }], + 131: [function (_dereq_, module, exports) { + 'use strict' + var $export = _dereq_(40) + var $every = _dereq_(20)(4) + + $export($export.P + $export.F * !_dereq_(104)([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every (callbackfn /* , thisArg */) { + return $every(this, callbackfn, arguments[1]) + } + }) + }, { 104: 104, 20: 20, 40: 40 }], + 132: [function (_dereq_, module, exports) { + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + var $export = _dereq_(40) + + $export($export.P, 'Array', { fill: _dereq_(18) }) + + _dereq_(13)('fill') + }, { 13: 13, 18: 18, 40: 40 }], + 133: [function (_dereq_, module, exports) { + 'use strict' + var $export = _dereq_(40) + var $filter = _dereq_(20)(2) + + $export($export.P + $export.F * !_dereq_(104)([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter (callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments[1]) + } + }) + }, { 104: 104, 20: 20, 40: 40 }], + 134: [function (_dereq_, module, exports) { + 'use strict' + // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) + var $export = _dereq_(40) + var $find = _dereq_(20)(6) + var KEY = 'findIndex' + var forced = true + // Shouldn't skip holes + if (KEY in []) Array(1)[KEY](function () { forced = false }) + $export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex (callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined) + } + }) + _dereq_(13)(KEY) + }, { 13: 13, 20: 20, 40: 40 }], + 135: [function (_dereq_, module, exports) { + 'use strict' + // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) + var $export = _dereq_(40) + var $find = _dereq_(20)(5) + var KEY = 'find' + var forced = true + // Shouldn't skip holes + if (KEY in []) Array(1)[KEY](function () { forced = false }) + $export($export.P + $export.F * forced, 'Array', { + find: function find (callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined) + } + }) + _dereq_(13)(KEY) + }, { 13: 13, 20: 20, 40: 40 }], + 136: [function (_dereq_, module, exports) { + 'use strict' + var $export = _dereq_(40) + var $forEach = _dereq_(20)(0) + var STRICT = _dereq_(104)([].forEach, true) + + $export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach (callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments[1]) + } + }) + }, { 104: 104, 20: 20, 40: 40 }], + 137: [function (_dereq_, module, exports) { + 'use strict' + var ctx = _dereq_(32) + var $export = _dereq_(40) + var toObject = _dereq_(118) + var call = _dereq_(59) + var isArrayIter = _dereq_(54) + var toLength = _dereq_(117) + var createProperty = _dereq_(31) + var getIterFn = _dereq_(129) + + $export($export.S + $export.F * !_dereq_(62)(function (iter) { Array.from(iter) }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from (arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike) + var C = typeof this === 'function' ? this : Array + var aLen = arguments.length + var mapfn = aLen > 1 ? arguments[1] : undefined + var mapping = mapfn !== undefined + var index = 0 + var iterFn = getIterFn(O) + var length, result, step, iterator + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2) + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value) + } + } else { + length = toLength(O.length) + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]) + } + } + result.length = index + return result + } + }) + }, { 117: 117, 118: 118, 129: 129, 31: 31, 32: 32, 40: 40, 54: 54, 59: 59, 62: 62 }], + 138: [function (_dereq_, module, exports) { + 'use strict' + var $export = _dereq_(40) + var $indexOf = _dereq_(19)(false) + var $native = [].indexOf + var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0 + + $export($export.P + $export.F * (NEGATIVE_ZERO || !_dereq_(104)($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf (searchElement /* , fromIndex = 0 */) { + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]) + } + }) + }, { 104: 104, 19: 19, 40: 40 }], + 139: [function (_dereq_, module, exports) { + // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) + var $export = _dereq_(40) + + $export($export.S, 'Array', { isArray: _dereq_(55) }) + }, { 40: 40, 55: 55 }], + 140: [function (_dereq_, module, exports) { + 'use strict' + var addToUnscopables = _dereq_(13) + var step = _dereq_(63) + var Iterators = _dereq_(64) + var toIObject = _dereq_(116) + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = _dereq_(61)(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated) // target + this._i = 0 // next index + this._k = kind // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, function () { + var O = this._t + var kind = this._k + var index = this._i++ + if (!O || index >= O.length) { + this._t = undefined + return step(1) + } + if (kind == 'keys') return step(0, index) + if (kind == 'values') return step(0, O[index]) + return step(0, [index, O[index]]) + }, 'values') + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array + + addToUnscopables('keys') + addToUnscopables('values') + addToUnscopables('entries') + }, { 116: 116, 13: 13, 61: 61, 63: 63, 64: 64 }], + 141: [function (_dereq_, module, exports) { + 'use strict' + // 22.1.3.13 Array.prototype.join(separator) + var $export = _dereq_(40) + var toIObject = _dereq_(116) + var arrayJoin = [].join + + // fallback for not array-like strings + $export($export.P + $export.F * (_dereq_(53) != Object || !_dereq_(104)(arrayJoin)), 'Array', { + join: function join (separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator) + } + }) + }, { 104: 104, 116: 116, 40: 40, 53: 53 }], + 142: [function (_dereq_, module, exports) { + 'use strict' + var $export = _dereq_(40) + var toIObject = _dereq_(116) + var toInteger = _dereq_(115) + var toLength = _dereq_(117) + var $native = [].lastIndexOf + var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0 + + $export($export.P + $export.F * (NEGATIVE_ZERO || !_dereq_(104)($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf (searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0 + var O = toIObject(this) + var length = toLength(O.length) + var index = length - 1 + if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])) + if (index < 0) index = length + index + for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0 + return -1 + } + }) + }, { 104: 104, 115: 115, 116: 116, 117: 117, 40: 40 }], + 143: [function (_dereq_, module, exports) { + 'use strict' + var $export = _dereq_(40) + var $map = _dereq_(20)(1) + + $export($export.P + $export.F * !_dereq_(104)([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map (callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments[1]) + } + }) + }, { 104: 104, 20: 20, 40: 40 }], + 144: [function (_dereq_, module, exports) { + 'use strict' + var $export = _dereq_(40) + var createProperty = _dereq_(31) + + // WebKit Array.of isn't generic + $export($export.S + $export.F * _dereq_(42)(function () { + function F () { /* empty */ } + return !(Array.of.call(F) instanceof F) + }), 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function of (/* ...args */) { + var index = 0 + var aLen = arguments.length + var result = new (typeof this === 'function' ? this : Array)(aLen) + while (aLen > index) createProperty(result, index, arguments[index++]) + result.length = aLen + return result + } + }) + }, { 31: 31, 40: 40, 42: 42 }], + 145: [function (_dereq_, module, exports) { + 'use strict' + var $export = _dereq_(40) + var $reduce = _dereq_(21) + + $export($export.P + $export.F * !_dereq_(104)([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight (callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], true) + } + }) + }, { 104: 104, 21: 21, 40: 40 }], + 146: [function (_dereq_, module, exports) { + 'use strict' + var $export = _dereq_(40) + var $reduce = _dereq_(21) + + $export($export.P + $export.F * !_dereq_(104)([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce (callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], false) + } + }) + }, { 104: 104, 21: 21, 40: 40 }], + 147: [function (_dereq_, module, exports) { + 'use strict' + var $export = _dereq_(40) + var html = _dereq_(49) + var cof = _dereq_(26) + var toAbsoluteIndex = _dereq_(113) + var toLength = _dereq_(117) + var arraySlice = [].slice + + // fallback for not array-like ES3 strings and DOM objects + $export($export.P + $export.F * _dereq_(42)(function () { + if (html) arraySlice.call(html) + }), 'Array', { + slice: function slice (begin, end) { + var len = toLength(this.length) + var klass = cof(this) + end = end === undefined ? len : end + if (klass == 'Array') return arraySlice.call(this, begin, end) + var start = toAbsoluteIndex(begin, len) + var upTo = toAbsoluteIndex(end, len) + var size = toLength(upTo - start) + var cloned = new Array(size) + var i = 0 + for (; i < size; i++) { + cloned[i] = klass == 'String' + ? this.charAt(start + i) + : this[start + i] + } + return cloned + } + }) + }, { 113: 113, 117: 117, 26: 26, 40: 40, 42: 42, 49: 49 }], + 148: [function (_dereq_, module, exports) { + 'use strict' + var $export = _dereq_(40) + var $some = _dereq_(20)(3) + + $export($export.P + $export.F * !_dereq_(104)([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some (callbackfn /* , thisArg */) { + return $some(this, callbackfn, arguments[1]) + } + }) + }, { 104: 104, 20: 20, 40: 40 }], + 149: [function (_dereq_, module, exports) { + 'use strict' + var $export = _dereq_(40) + var aFunction = _dereq_(11) + var toObject = _dereq_(118) + var fails = _dereq_(42) + var $sort = [].sort + var test = [1, 2, 3] $export($export.P + $export.F * (fails(function () { - return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); + // IE8- + test.sort(undefined) }) || !fails(function () { - TypedArrayPrototype.toLocaleString.call([1, 2]); - })), NAME, { toLocaleString: $toLocaleString }); - - Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; - if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); - }; -} else module.exports = function () { /* empty */ }; - -},{"103":103,"113":113,"114":114,"115":115,"117":117,"118":118,"119":119,"121":121,"122":122,"123":123,"128":128,"129":129,"140":140,"15":15,"17":17,"18":18,"19":19,"20":20,"25":25,"32":32,"36":36,"40":40,"42":42,"46":46,"47":47,"48":48,"54":54,"57":57,"62":62,"64":64,"65":65,"74":74,"75":75,"77":77,"79":79,"81":81,"92":92,"93":93,"99":99}],121:[function(_dereq_,module,exports){ -'use strict'; -var global = _dereq_(46); -var DESCRIPTORS = _dereq_(36); -var LIBRARY = _dereq_(65); -var $typed = _dereq_(122); -var hide = _dereq_(48); -var redefineAll = _dereq_(93); -var fails = _dereq_(42); -var anInstance = _dereq_(15); -var toInteger = _dereq_(115); -var toLength = _dereq_(117); -var toIndex = _dereq_(114); -var gOPN = _dereq_(79).f; -var dP = _dereq_(75).f; -var arrayFill = _dereq_(18); -var setToStringTag = _dereq_(100); -var ARRAY_BUFFER = 'ArrayBuffer'; -var DATA_VIEW = 'DataView'; -var PROTOTYPE = 'prototype'; -var WRONG_LENGTH = 'Wrong length!'; -var WRONG_INDEX = 'Wrong index!'; -var $ArrayBuffer = global[ARRAY_BUFFER]; -var $DataView = global[DATA_VIEW]; -var Math = global.Math; -var RangeError = global.RangeError; -// eslint-disable-next-line no-shadow-restricted-names -var Infinity = global.Infinity; -var BaseBuffer = $ArrayBuffer; -var abs = Math.abs; -var pow = Math.pow; -var floor = Math.floor; -var log = Math.log; -var LN2 = Math.LN2; -var BUFFER = 'buffer'; -var BYTE_LENGTH = 'byteLength'; -var BYTE_OFFSET = 'byteOffset'; -var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; -var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; -var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; - -// IEEE754 conversions based on https://github.com/feross/ieee754 -function packIEEE754(value, mLen, nBytes) { - var buffer = new Array(nBytes); - var eLen = nBytes * 8 - mLen - 1; - var eMax = (1 << eLen) - 1; - var eBias = eMax >> 1; - var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; - var i = 0; - var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; - var e, m, c; - value = abs(value); - // eslint-disable-next-line no-self-compare - if (value != value || value === Infinity) { - // eslint-disable-next-line no-self-compare - m = value != value ? 1 : 0; - e = eMax; - } else { - e = floor(log(value) / LN2); - if (value * (c = pow(2, -e)) < 1) { - e--; - c *= 2; - } - if (e + eBias >= 1) { - value += rt / c; - } else { - value += rt * pow(2, 1 - eBias); - } - if (value * c >= 2) { - e++; - c /= 2; - } - if (e + eBias >= eMax) { - m = 0; - e = eMax; - } else if (e + eBias >= 1) { - m = (value * c - 1) * pow(2, mLen); - e = e + eBias; - } else { - m = value * pow(2, eBias - 1) * pow(2, mLen); - e = 0; - } - } - for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); - e = e << mLen | m; - eLen += mLen; - for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); - buffer[--i] |= s * 128; - return buffer; -} -function unpackIEEE754(buffer, mLen, nBytes) { - var eLen = nBytes * 8 - mLen - 1; - var eMax = (1 << eLen) - 1; - var eBias = eMax >> 1; - var nBits = eLen - 7; - var i = nBytes - 1; - var s = buffer[i--]; - var e = s & 127; - var m; - s >>= 7; - for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); - m = e & (1 << -nBits) - 1; - e >>= -nBits; - nBits += mLen; - for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); - if (e === 0) { - e = 1 - eBias; - } else if (e === eMax) { - return m ? NaN : s ? -Infinity : Infinity; - } else { - m = m + pow(2, mLen); - e = e - eBias; - } return (s ? -1 : 1) * m * pow(2, e - mLen); -} - -function unpackI32(bytes) { - return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; -} -function packI8(it) { - return [it & 0xff]; -} -function packI16(it) { - return [it & 0xff, it >> 8 & 0xff]; -} -function packI32(it) { - return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; -} -function packF64(it) { - return packIEEE754(it, 52, 8); -} -function packF32(it) { - return packIEEE754(it, 23, 4); -} - -function addGetter(C, key, internal) { - dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } }); -} - -function get(view, bytes, index, isLittleEndian) { - var numIndex = +index; - var intIndex = toIndex(numIndex); - if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); - var store = view[$BUFFER]._b; - var start = intIndex + view[$OFFSET]; - var pack = store.slice(start, start + bytes); - return isLittleEndian ? pack : pack.reverse(); -} -function set(view, bytes, index, conversion, value, isLittleEndian) { - var numIndex = +index; - var intIndex = toIndex(numIndex); - if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); - var store = view[$BUFFER]._b; - var start = intIndex + view[$OFFSET]; - var pack = conversion(+value); - for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; -} - -if (!$typed.ABV) { - $ArrayBuffer = function ArrayBuffer(length) { - anInstance(this, $ArrayBuffer, ARRAY_BUFFER); - var byteLength = toIndex(length); - this._b = arrayFill.call(new Array(byteLength), 0); - this[$LENGTH] = byteLength; - }; - - $DataView = function DataView(buffer, byteOffset, byteLength) { - anInstance(this, $DataView, DATA_VIEW); - anInstance(buffer, $ArrayBuffer, DATA_VIEW); - var bufferLength = buffer[$LENGTH]; - var offset = toInteger(byteOffset); - if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); - byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); - if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); - this[$BUFFER] = buffer; - this[$OFFSET] = offset; - this[$LENGTH] = byteLength; - }; - - if (DESCRIPTORS) { - addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); - addGetter($DataView, BUFFER, '_b'); - addGetter($DataView, BYTE_LENGTH, '_l'); - addGetter($DataView, BYTE_OFFSET, '_o'); - } - - redefineAll($DataView[PROTOTYPE], { - getInt8: function getInt8(byteOffset) { - return get(this, 1, byteOffset)[0] << 24 >> 24; - }, - getUint8: function getUint8(byteOffset) { - return get(this, 1, byteOffset)[0]; - }, - getInt16: function getInt16(byteOffset /* , littleEndian */) { - var bytes = get(this, 2, byteOffset, arguments[1]); - return (bytes[1] << 8 | bytes[0]) << 16 >> 16; - }, - getUint16: function getUint16(byteOffset /* , littleEndian */) { - var bytes = get(this, 2, byteOffset, arguments[1]); - return bytes[1] << 8 | bytes[0]; - }, - getInt32: function getInt32(byteOffset /* , littleEndian */) { - return unpackI32(get(this, 4, byteOffset, arguments[1])); - }, - getUint32: function getUint32(byteOffset /* , littleEndian */) { - return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; - }, - getFloat32: function getFloat32(byteOffset /* , littleEndian */) { - return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); - }, - getFloat64: function getFloat64(byteOffset /* , littleEndian */) { - return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); - }, - setInt8: function setInt8(byteOffset, value) { - set(this, 1, byteOffset, packI8, value); - }, - setUint8: function setUint8(byteOffset, value) { - set(this, 1, byteOffset, packI8, value); - }, - setInt16: function setInt16(byteOffset, value /* , littleEndian */) { - set(this, 2, byteOffset, packI16, value, arguments[2]); - }, - setUint16: function setUint16(byteOffset, value /* , littleEndian */) { - set(this, 2, byteOffset, packI16, value, arguments[2]); - }, - setInt32: function setInt32(byteOffset, value /* , littleEndian */) { - set(this, 4, byteOffset, packI32, value, arguments[2]); - }, - setUint32: function setUint32(byteOffset, value /* , littleEndian */) { - set(this, 4, byteOffset, packI32, value, arguments[2]); - }, - setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { - set(this, 4, byteOffset, packF32, value, arguments[2]); - }, - setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { - set(this, 8, byteOffset, packF64, value, arguments[2]); - } - }); -} else { - if (!fails(function () { - $ArrayBuffer(1); - }) || !fails(function () { - new $ArrayBuffer(-1); // eslint-disable-line no-new - }) || fails(function () { - new $ArrayBuffer(); // eslint-disable-line no-new - new $ArrayBuffer(1.5); // eslint-disable-line no-new - new $ArrayBuffer(NaN); // eslint-disable-line no-new - return $ArrayBuffer.name != ARRAY_BUFFER; - })) { - $ArrayBuffer = function ArrayBuffer(length) { - anInstance(this, $ArrayBuffer); - return new BaseBuffer(toIndex(length)); - }; - var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; - for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) { - if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); - } - if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; - } - // iOS Safari 7.x bug - var view = new $DataView(new $ArrayBuffer(2)); - var $setInt8 = $DataView[PROTOTYPE].setInt8; - view.setInt8(0, 2147483648); - view.setInt8(1, 2147483649); - if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], { - setInt8: function setInt8(byteOffset, value) { - $setInt8.call(this, byteOffset, value << 24 >> 24); - }, - setUint8: function setUint8(byteOffset, value) { - $setInt8.call(this, byteOffset, value << 24 >> 24); - } - }, true); -} -setToStringTag($ArrayBuffer, ARRAY_BUFFER); -setToStringTag($DataView, DATA_VIEW); -hide($DataView[PROTOTYPE], $typed.VIEW, true); -exports[ARRAY_BUFFER] = $ArrayBuffer; -exports[DATA_VIEW] = $DataView; - -},{"100":100,"114":114,"115":115,"117":117,"122":122,"15":15,"18":18,"36":36,"42":42,"46":46,"48":48,"65":65,"75":75,"79":79,"93":93}],122:[function(_dereq_,module,exports){ -var global = _dereq_(46); -var hide = _dereq_(48); -var uid = _dereq_(123); -var TYPED = uid('typed_array'); -var VIEW = uid('view'); -var ABV = !!(global.ArrayBuffer && global.DataView); -var CONSTR = ABV; -var i = 0; -var l = 9; -var Typed; - -var TypedArrayConstructors = ( - 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' -).split(','); - -while (i < l) { - if (Typed = global[TypedArrayConstructors[i++]]) { - hide(Typed.prototype, TYPED, true); - hide(Typed.prototype, VIEW, true); - } else CONSTR = false; -} - -module.exports = { - ABV: ABV, - CONSTR: CONSTR, - TYPED: TYPED, - VIEW: VIEW -}; - -},{"123":123,"46":46,"48":48}],123:[function(_dereq_,module,exports){ -var id = 0; -var px = Math.random(); -module.exports = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); -}; - -},{}],124:[function(_dereq_,module,exports){ -var global = _dereq_(46); -var navigator = global.navigator; - -module.exports = navigator && navigator.userAgent || ''; - -},{"46":46}],125:[function(_dereq_,module,exports){ -var isObject = _dereq_(57); -module.exports = function (it, TYPE) { - if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); - return it; -}; - -},{"57":57}],126:[function(_dereq_,module,exports){ -var global = _dereq_(46); -var core = _dereq_(30); -var LIBRARY = _dereq_(65); -var wksExt = _dereq_(127); -var defineProperty = _dereq_(75).f; -module.exports = function (name) { - var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); - if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); -}; - -},{"127":127,"30":30,"46":46,"65":65,"75":75}],127:[function(_dereq_,module,exports){ -exports.f = _dereq_(128); - -},{"128":128}],128:[function(_dereq_,module,exports){ -var store = _dereq_(102)('wks'); -var uid = _dereq_(123); -var Symbol = _dereq_(46).Symbol; -var USE_SYMBOL = typeof Symbol == 'function'; - -var $exports = module.exports = function (name) { - return store[name] || (store[name] = - USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); -}; - -$exports.store = store; - -},{"102":102,"123":123,"46":46}],129:[function(_dereq_,module,exports){ -var classof = _dereq_(25); -var ITERATOR = _dereq_(128)('iterator'); -var Iterators = _dereq_(64); -module.exports = _dereq_(30).getIteratorMethod = function (it) { - if (it != undefined) return it[ITERATOR] - || it['@@iterator'] - || Iterators[classof(it)]; -}; - -},{"128":128,"25":25,"30":30,"64":64}],130:[function(_dereq_,module,exports){ -// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) -var $export = _dereq_(40); - -$export($export.P, 'Array', { copyWithin: _dereq_(17) }); - -_dereq_(13)('copyWithin'); - -},{"13":13,"17":17,"40":40}],131:[function(_dereq_,module,exports){ -'use strict'; -var $export = _dereq_(40); -var $every = _dereq_(20)(4); - -$export($export.P + $export.F * !_dereq_(104)([].every, true), 'Array', { - // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) - every: function every(callbackfn /* , thisArg */) { - return $every(this, callbackfn, arguments[1]); - } -}); - -},{"104":104,"20":20,"40":40}],132:[function(_dereq_,module,exports){ -// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) -var $export = _dereq_(40); - -$export($export.P, 'Array', { fill: _dereq_(18) }); - -_dereq_(13)('fill'); - -},{"13":13,"18":18,"40":40}],133:[function(_dereq_,module,exports){ -'use strict'; -var $export = _dereq_(40); -var $filter = _dereq_(20)(2); - -$export($export.P + $export.F * !_dereq_(104)([].filter, true), 'Array', { - // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) - filter: function filter(callbackfn /* , thisArg */) { - return $filter(this, callbackfn, arguments[1]); - } -}); - -},{"104":104,"20":20,"40":40}],134:[function(_dereq_,module,exports){ -'use strict'; -// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) -var $export = _dereq_(40); -var $find = _dereq_(20)(6); -var KEY = 'findIndex'; -var forced = true; -// Shouldn't skip holes -if (KEY in []) Array(1)[KEY](function () { forced = false; }); -$export($export.P + $export.F * forced, 'Array', { - findIndex: function findIndex(callbackfn /* , that = undefined */) { - return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } -}); -_dereq_(13)(KEY); - -},{"13":13,"20":20,"40":40}],135:[function(_dereq_,module,exports){ -'use strict'; -// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) -var $export = _dereq_(40); -var $find = _dereq_(20)(5); -var KEY = 'find'; -var forced = true; -// Shouldn't skip holes -if (KEY in []) Array(1)[KEY](function () { forced = false; }); -$export($export.P + $export.F * forced, 'Array', { - find: function find(callbackfn /* , that = undefined */) { - return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } -}); -_dereq_(13)(KEY); - -},{"13":13,"20":20,"40":40}],136:[function(_dereq_,module,exports){ -'use strict'; -var $export = _dereq_(40); -var $forEach = _dereq_(20)(0); -var STRICT = _dereq_(104)([].forEach, true); - -$export($export.P + $export.F * !STRICT, 'Array', { - // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) - forEach: function forEach(callbackfn /* , thisArg */) { - return $forEach(this, callbackfn, arguments[1]); - } -}); - -},{"104":104,"20":20,"40":40}],137:[function(_dereq_,module,exports){ -'use strict'; -var ctx = _dereq_(32); -var $export = _dereq_(40); -var toObject = _dereq_(118); -var call = _dereq_(59); -var isArrayIter = _dereq_(54); -var toLength = _dereq_(117); -var createProperty = _dereq_(31); -var getIterFn = _dereq_(129); - -$export($export.S + $export.F * !_dereq_(62)(function (iter) { Array.from(iter); }), 'Array', { - // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) - from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { - var O = toObject(arrayLike); - var C = typeof this == 'function' ? this : Array; - var aLen = arguments.length; - var mapfn = aLen > 1 ? arguments[1] : undefined; - var mapping = mapfn !== undefined; - var index = 0; - var iterFn = getIterFn(O); - var length, result, step, iterator; - if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); - // if object isn't iterable or it's array with default iterator - use simple case - if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { - for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { - createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + // V8 bug + test.sort(null) + // Old WebKit + }) || !_dereq_(104)($sort)), 'Array', { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort (comparefn) { + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)) } - } else { - length = toLength(O.length); - for (result = new C(length); length > index; index++) { - createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + }) + }, { 104: 104, 11: 11, 118: 118, 40: 40, 42: 42 }], + 150: [function (_dereq_, module, exports) { + _dereq_(99)('Array') + }, { 99: 99 }], + 151: [function (_dereq_, module, exports) { + // 20.3.3.1 / 15.9.4.4 Date.now() + var $export = _dereq_(40) + + $export($export.S, 'Date', { now: function () { return new Date().getTime() } }) + }, { 40: 40 }], + 152: [function (_dereq_, module, exports) { + // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() + var $export = _dereq_(40) + var toISOString = _dereq_(33) + + // PhantomJS / old WebKit has a broken implementations + $export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString + }) + }, { 33: 33, 40: 40 }], + 153: [function (_dereq_, module, exports) { + 'use strict' + var $export = _dereq_(40) + var toObject = _dereq_(118) + var toPrimitive = _dereq_(119) + + $export($export.P + $export.F * _dereq_(42)(function () { + return new Date(NaN).toJSON() !== null || + Date.prototype.toJSON.call({ toISOString: function () { return 1 } }) !== 1 + }), 'Date', { + // eslint-disable-next-line no-unused-vars + toJSON: function toJSON (key) { + var O = toObject(this) + var pv = toPrimitive(O) + return typeof pv === 'number' && !isFinite(pv) ? null : O.toISOString() } + }) + }, { 118: 118, 119: 119, 40: 40, 42: 42 }], + 154: [function (_dereq_, module, exports) { + var TO_PRIMITIVE = _dereq_(128)('toPrimitive') + var proto = Date.prototype + + if (!(TO_PRIMITIVE in proto)) _dereq_(48)(proto, TO_PRIMITIVE, _dereq_(34)) + }, { 128: 128, 34: 34, 48: 48 }], + 155: [function (_dereq_, module, exports) { + var DateProto = Date.prototype + var INVALID_DATE = 'Invalid Date' + var TO_STRING = 'toString' + var $toString = DateProto[TO_STRING] + var getTime = DateProto.getTime + if (new Date(NaN) + '' != INVALID_DATE) { + _dereq_(94)(DateProto, TO_STRING, function toString () { + var value = getTime.call(this) + // eslint-disable-next-line no-self-compare + return value === value ? $toString.call(this) : INVALID_DATE + }) } - result.length = index; - return result; - } -}); + }, { 94: 94 }], + 156: [function (_dereq_, module, exports) { + // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) + var $export = _dereq_(40) -},{"117":117,"118":118,"129":129,"31":31,"32":32,"40":40,"54":54,"59":59,"62":62}],138:[function(_dereq_,module,exports){ -'use strict'; -var $export = _dereq_(40); -var $indexOf = _dereq_(19)(false); -var $native = [].indexOf; -var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; - -$export($export.P + $export.F * (NEGATIVE_ZERO || !_dereq_(104)($native)), 'Array', { - // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) - indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { - return NEGATIVE_ZERO - // convert -0 to +0 - ? $native.apply(this, arguments) || 0 - : $indexOf(this, searchElement, arguments[1]); - } -}); - -},{"104":104,"19":19,"40":40}],139:[function(_dereq_,module,exports){ -// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) -var $export = _dereq_(40); - -$export($export.S, 'Array', { isArray: _dereq_(55) }); - -},{"40":40,"55":55}],140:[function(_dereq_,module,exports){ -'use strict'; -var addToUnscopables = _dereq_(13); -var step = _dereq_(63); -var Iterators = _dereq_(64); -var toIObject = _dereq_(116); - -// 22.1.3.4 Array.prototype.entries() -// 22.1.3.13 Array.prototype.keys() -// 22.1.3.29 Array.prototype.values() -// 22.1.3.30 Array.prototype[@@iterator]() -module.exports = _dereq_(61)(Array, 'Array', function (iterated, kind) { - this._t = toIObject(iterated); // target - this._i = 0; // next index - this._k = kind; // kind -// 22.1.5.2.1 %ArrayIteratorPrototype%.next() -}, function () { - var O = this._t; - var kind = this._k; - var index = this._i++; - if (!O || index >= O.length) { - this._t = undefined; - return step(1); - } - if (kind == 'keys') return step(0, index); - if (kind == 'values') return step(0, O[index]); - return step(0, [index, O[index]]); -}, 'values'); - -// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) -Iterators.Arguments = Iterators.Array; - -addToUnscopables('keys'); -addToUnscopables('values'); -addToUnscopables('entries'); - -},{"116":116,"13":13,"61":61,"63":63,"64":64}],141:[function(_dereq_,module,exports){ -'use strict'; -// 22.1.3.13 Array.prototype.join(separator) -var $export = _dereq_(40); -var toIObject = _dereq_(116); -var arrayJoin = [].join; - -// fallback for not array-like strings -$export($export.P + $export.F * (_dereq_(53) != Object || !_dereq_(104)(arrayJoin)), 'Array', { - join: function join(separator) { - return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); - } -}); - -},{"104":104,"116":116,"40":40,"53":53}],142:[function(_dereq_,module,exports){ -'use strict'; -var $export = _dereq_(40); -var toIObject = _dereq_(116); -var toInteger = _dereq_(115); -var toLength = _dereq_(117); -var $native = [].lastIndexOf; -var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; - -$export($export.P + $export.F * (NEGATIVE_ZERO || !_dereq_(104)($native)), 'Array', { - // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) - lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { - // convert -0 to +0 - if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; - var O = toIObject(this); - var length = toLength(O.length); - var index = length - 1; - if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); - if (index < 0) index = length + index; - for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; - return -1; - } -}); - -},{"104":104,"115":115,"116":116,"117":117,"40":40}],143:[function(_dereq_,module,exports){ -'use strict'; -var $export = _dereq_(40); -var $map = _dereq_(20)(1); - -$export($export.P + $export.F * !_dereq_(104)([].map, true), 'Array', { - // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) - map: function map(callbackfn /* , thisArg */) { - return $map(this, callbackfn, arguments[1]); - } -}); - -},{"104":104,"20":20,"40":40}],144:[function(_dereq_,module,exports){ -'use strict'; -var $export = _dereq_(40); -var createProperty = _dereq_(31); - -// WebKit Array.of isn't generic -$export($export.S + $export.F * _dereq_(42)(function () { - function F() { /* empty */ } - return !(Array.of.call(F) instanceof F); -}), 'Array', { - // 22.1.2.3 Array.of( ...items) - of: function of(/* ...args */) { - var index = 0; - var aLen = arguments.length; - var result = new (typeof this == 'function' ? this : Array)(aLen); - while (aLen > index) createProperty(result, index, arguments[index++]); - result.length = aLen; - return result; - } -}); - -},{"31":31,"40":40,"42":42}],145:[function(_dereq_,module,exports){ -'use strict'; -var $export = _dereq_(40); -var $reduce = _dereq_(21); - -$export($export.P + $export.F * !_dereq_(104)([].reduceRight, true), 'Array', { - // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) - reduceRight: function reduceRight(callbackfn /* , initialValue */) { - return $reduce(this, callbackfn, arguments.length, arguments[1], true); - } -}); - -},{"104":104,"21":21,"40":40}],146:[function(_dereq_,module,exports){ -'use strict'; -var $export = _dereq_(40); -var $reduce = _dereq_(21); - -$export($export.P + $export.F * !_dereq_(104)([].reduce, true), 'Array', { - // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) - reduce: function reduce(callbackfn /* , initialValue */) { - return $reduce(this, callbackfn, arguments.length, arguments[1], false); - } -}); - -},{"104":104,"21":21,"40":40}],147:[function(_dereq_,module,exports){ -'use strict'; -var $export = _dereq_(40); -var html = _dereq_(49); -var cof = _dereq_(26); -var toAbsoluteIndex = _dereq_(113); -var toLength = _dereq_(117); -var arraySlice = [].slice; - -// fallback for not array-like ES3 strings and DOM objects -$export($export.P + $export.F * _dereq_(42)(function () { - if (html) arraySlice.call(html); -}), 'Array', { - slice: function slice(begin, end) { - var len = toLength(this.length); - var klass = cof(this); - end = end === undefined ? len : end; - if (klass == 'Array') return arraySlice.call(this, begin, end); - var start = toAbsoluteIndex(begin, len); - var upTo = toAbsoluteIndex(end, len); - var size = toLength(upTo - start); - var cloned = new Array(size); - var i = 0; - for (; i < size; i++) cloned[i] = klass == 'String' - ? this.charAt(start + i) - : this[start + i]; - return cloned; - } -}); - -},{"113":113,"117":117,"26":26,"40":40,"42":42,"49":49}],148:[function(_dereq_,module,exports){ -'use strict'; -var $export = _dereq_(40); -var $some = _dereq_(20)(3); - -$export($export.P + $export.F * !_dereq_(104)([].some, true), 'Array', { - // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) - some: function some(callbackfn /* , thisArg */) { - return $some(this, callbackfn, arguments[1]); - } -}); - -},{"104":104,"20":20,"40":40}],149:[function(_dereq_,module,exports){ -'use strict'; -var $export = _dereq_(40); -var aFunction = _dereq_(11); -var toObject = _dereq_(118); -var fails = _dereq_(42); -var $sort = [].sort; -var test = [1, 2, 3]; - -$export($export.P + $export.F * (fails(function () { - // IE8- - test.sort(undefined); -}) || !fails(function () { - // V8 bug - test.sort(null); - // Old WebKit -}) || !_dereq_(104)($sort)), 'Array', { - // 22.1.3.25 Array.prototype.sort(comparefn) - sort: function sort(comparefn) { - return comparefn === undefined - ? $sort.call(toObject(this)) - : $sort.call(toObject(this), aFunction(comparefn)); - } -}); - -},{"104":104,"11":11,"118":118,"40":40,"42":42}],150:[function(_dereq_,module,exports){ -_dereq_(99)('Array'); - -},{"99":99}],151:[function(_dereq_,module,exports){ -// 20.3.3.1 / 15.9.4.4 Date.now() -var $export = _dereq_(40); - -$export($export.S, 'Date', { now: function () { return new Date().getTime(); } }); - -},{"40":40}],152:[function(_dereq_,module,exports){ -// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() -var $export = _dereq_(40); -var toISOString = _dereq_(33); - -// PhantomJS / old WebKit has a broken implementations -$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { - toISOString: toISOString -}); - -},{"33":33,"40":40}],153:[function(_dereq_,module,exports){ -'use strict'; -var $export = _dereq_(40); -var toObject = _dereq_(118); -var toPrimitive = _dereq_(119); - -$export($export.P + $export.F * _dereq_(42)(function () { - return new Date(NaN).toJSON() !== null - || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1; -}), 'Date', { - // eslint-disable-next-line no-unused-vars - toJSON: function toJSON(key) { - var O = toObject(this); - var pv = toPrimitive(O); - return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); - } -}); - -},{"118":118,"119":119,"40":40,"42":42}],154:[function(_dereq_,module,exports){ -var TO_PRIMITIVE = _dereq_(128)('toPrimitive'); -var proto = Date.prototype; - -if (!(TO_PRIMITIVE in proto)) _dereq_(48)(proto, TO_PRIMITIVE, _dereq_(34)); - -},{"128":128,"34":34,"48":48}],155:[function(_dereq_,module,exports){ -var DateProto = Date.prototype; -var INVALID_DATE = 'Invalid Date'; -var TO_STRING = 'toString'; -var $toString = DateProto[TO_STRING]; -var getTime = DateProto.getTime; -if (new Date(NaN) + '' != INVALID_DATE) { - _dereq_(94)(DateProto, TO_STRING, function toString() { - var value = getTime.call(this); - // eslint-disable-next-line no-self-compare - return value === value ? $toString.call(this) : INVALID_DATE; - }); -} - -},{"94":94}],156:[function(_dereq_,module,exports){ -// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) -var $export = _dereq_(40); - -$export($export.P, 'Function', { bind: _dereq_(24) }); - -},{"24":24,"40":40}],157:[function(_dereq_,module,exports){ -'use strict'; -var isObject = _dereq_(57); -var getPrototypeOf = _dereq_(81); -var HAS_INSTANCE = _dereq_(128)('hasInstance'); -var FunctionProto = Function.prototype; -// 19.2.3.6 Function.prototype[@@hasInstance](V) -if (!(HAS_INSTANCE in FunctionProto)) _dereq_(75).f(FunctionProto, HAS_INSTANCE, { value: function (O) { - if (typeof this != 'function' || !isObject(O)) return false; - if (!isObject(this.prototype)) return O instanceof this; - // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: - while (O = getPrototypeOf(O)) if (this.prototype === O) return true; - return false; -} }); - -},{"128":128,"57":57,"75":75,"81":81}],158:[function(_dereq_,module,exports){ -var dP = _dereq_(75).f; -var FProto = Function.prototype; -var nameRE = /^\s*function ([^ (]*)/; -var NAME = 'name'; - -// 19.2.4.2 name -NAME in FProto || _dereq_(36) && dP(FProto, NAME, { - configurable: true, - get: function () { - try { - return ('' + this).match(nameRE)[1]; - } catch (e) { - return ''; + $export($export.P, 'Function', { bind: _dereq_(24) }) + }, { 24: 24, 40: 40 }], + 157: [function (_dereq_, module, exports) { + 'use strict' + var isObject = _dereq_(57) + var getPrototypeOf = _dereq_(81) + var HAS_INSTANCE = _dereq_(128)('hasInstance') + var FunctionProto = Function.prototype + // 19.2.3.6 Function.prototype[@@hasInstance](V) + if (!(HAS_INSTANCE in FunctionProto)) { + _dereq_(75).f(FunctionProto, HAS_INSTANCE, { + value: function (O) { + if (typeof this !== 'function' || !isObject(O)) return false + if (!isObject(this.prototype)) return O instanceof this + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while (O = getPrototypeOf(O)) if (this.prototype === O) return true + return false + } + }) } - } -}); + }, { 128: 128, 57: 57, 75: 75, 81: 81 }], + 158: [function (_dereq_, module, exports) { + var dP = _dereq_(75).f + var FProto = Function.prototype + var nameRE = /^\s*function ([^ (]*)/ + var NAME = 'name' -},{"36":36,"75":75}],159:[function(_dereq_,module,exports){ -'use strict'; -var strong = _dereq_(27); -var validate = _dereq_(125); -var MAP = 'Map'; + // 19.2.4.2 name + NAME in FProto || _dereq_(36) && dP(FProto, NAME, { + configurable: true, + get: function () { + try { + return ('' + this).match(nameRE)[1] + } catch (e) { + return '' + } + } + }) + }, { 36: 36, 75: 75 }], + 159: [function (_dereq_, module, exports) { + 'use strict' + var strong = _dereq_(27) + var validate = _dereq_(125) + var MAP = 'Map' -// 23.1 Map Objects -module.exports = _dereq_(29)(MAP, function (get) { - return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; -}, { - // 23.1.3.6 Map.prototype.get(key) - get: function get(key) { - var entry = strong.getEntry(validate(this, MAP), key); - return entry && entry.v; - }, - // 23.1.3.9 Map.prototype.set(key, value) - set: function set(key, value) { - return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); - } -}, strong, true); + // 23.1 Map Objects + module.exports = _dereq_(29)(MAP, function (get) { + return function Map () { return get(this, arguments.length > 0 ? arguments[0] : undefined) } + }, { + // 23.1.3.6 Map.prototype.get(key) + get: function get (key) { + var entry = strong.getEntry(validate(this, MAP), key) + return entry && entry.v + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set (key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value) + } + }, strong, true) + }, { 125: 125, 27: 27, 29: 29 }], + 160: [function (_dereq_, module, exports) { + // 20.2.2.3 Math.acosh(x) + var $export = _dereq_(40) + var log1p = _dereq_(68) + var sqrt = Math.sqrt + var $acosh = Math.acosh -},{"125":125,"27":27,"29":29}],160:[function(_dereq_,module,exports){ -// 20.2.2.3 Math.acosh(x) -var $export = _dereq_(40); -var log1p = _dereq_(68); -var sqrt = Math.sqrt; -var $acosh = Math.acosh; - -$export($export.S + $export.F * !($acosh + $export($export.S + $export.F * !($acosh && // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 - && Math.floor($acosh(Number.MAX_VALUE)) == 710 + Math.floor($acosh(Number.MAX_VALUE)) == 710 && // Tor Browser bug: Math.acosh(Infinity) -> NaN - && $acosh(Infinity) == Infinity -), 'Math', { - acosh: function acosh(x) { - return (x = +x) < 1 ? NaN : x > 94906265.62425156 - ? Math.log(x) + Math.LN2 - : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); - } -}); - -},{"40":40,"68":68}],161:[function(_dereq_,module,exports){ -// 20.2.2.5 Math.asinh(x) -var $export = _dereq_(40); -var $asinh = Math.asinh; - -function asinh(x) { - return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); -} - -// Tor Browser bug: Math.asinh(0) -> -0 -$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); - -},{"40":40}],162:[function(_dereq_,module,exports){ -// 20.2.2.7 Math.atanh(x) -var $export = _dereq_(40); -var $atanh = Math.atanh; - -// Tor Browser bug: Math.atanh(-0) -> 0 -$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { - atanh: function atanh(x) { - return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; - } -}); - -},{"40":40}],163:[function(_dereq_,module,exports){ -// 20.2.2.9 Math.cbrt(x) -var $export = _dereq_(40); -var sign = _dereq_(69); - -$export($export.S, 'Math', { - cbrt: function cbrt(x) { - return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); - } -}); - -},{"40":40,"69":69}],164:[function(_dereq_,module,exports){ -// 20.2.2.11 Math.clz32(x) -var $export = _dereq_(40); - -$export($export.S, 'Math', { - clz32: function clz32(x) { - return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; - } -}); - -},{"40":40}],165:[function(_dereq_,module,exports){ -// 20.2.2.12 Math.cosh(x) -var $export = _dereq_(40); -var exp = Math.exp; - -$export($export.S, 'Math', { - cosh: function cosh(x) { - return (exp(x = +x) + exp(-x)) / 2; - } -}); - -},{"40":40}],166:[function(_dereq_,module,exports){ -// 20.2.2.14 Math.expm1(x) -var $export = _dereq_(40); -var $expm1 = _dereq_(66); - -$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); - -},{"40":40,"66":66}],167:[function(_dereq_,module,exports){ -// 20.2.2.16 Math.fround(x) -var $export = _dereq_(40); - -$export($export.S, 'Math', { fround: _dereq_(67) }); - -},{"40":40,"67":67}],168:[function(_dereq_,module,exports){ -// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) -var $export = _dereq_(40); -var abs = Math.abs; - -$export($export.S, 'Math', { - hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars - var sum = 0; - var i = 0; - var aLen = arguments.length; - var larg = 0; - var arg, div; - while (i < aLen) { - arg = abs(arguments[i++]); - if (larg < arg) { - div = larg / arg; - sum = sum * div * div + 1; - larg = arg; - } else if (arg > 0) { - div = arg / larg; - sum += div * div; - } else sum += arg; - } - return larg === Infinity ? Infinity : larg * Math.sqrt(sum); - } -}); - -},{"40":40}],169:[function(_dereq_,module,exports){ -// 20.2.2.18 Math.imul(x, y) -var $export = _dereq_(40); -var $imul = Math.imul; - -// some WebKit versions fails with big numbers, some has wrong arity -$export($export.S + $export.F * _dereq_(42)(function () { - return $imul(0xffffffff, 5) != -5 || $imul.length != 2; -}), 'Math', { - imul: function imul(x, y) { - var UINT16 = 0xffff; - var xn = +x; - var yn = +y; - var xl = UINT16 & xn; - var yl = UINT16 & yn; - return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); - } -}); - -},{"40":40,"42":42}],170:[function(_dereq_,module,exports){ -// 20.2.2.21 Math.log10(x) -var $export = _dereq_(40); - -$export($export.S, 'Math', { - log10: function log10(x) { - return Math.log(x) * Math.LOG10E; - } -}); - -},{"40":40}],171:[function(_dereq_,module,exports){ -// 20.2.2.20 Math.log1p(x) -var $export = _dereq_(40); - -$export($export.S, 'Math', { log1p: _dereq_(68) }); - -},{"40":40,"68":68}],172:[function(_dereq_,module,exports){ -// 20.2.2.22 Math.log2(x) -var $export = _dereq_(40); - -$export($export.S, 'Math', { - log2: function log2(x) { - return Math.log(x) / Math.LN2; - } -}); - -},{"40":40}],173:[function(_dereq_,module,exports){ -// 20.2.2.28 Math.sign(x) -var $export = _dereq_(40); - -$export($export.S, 'Math', { sign: _dereq_(69) }); - -},{"40":40,"69":69}],174:[function(_dereq_,module,exports){ -// 20.2.2.30 Math.sinh(x) -var $export = _dereq_(40); -var expm1 = _dereq_(66); -var exp = Math.exp; - -// V8 near Chromium 38 has a problem with very small numbers -$export($export.S + $export.F * _dereq_(42)(function () { - return !Math.sinh(-2e-17) != -2e-17; -}), 'Math', { - sinh: function sinh(x) { - return Math.abs(x = +x) < 1 - ? (expm1(x) - expm1(-x)) / 2 - : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); - } -}); - -},{"40":40,"42":42,"66":66}],175:[function(_dereq_,module,exports){ -// 20.2.2.33 Math.tanh(x) -var $export = _dereq_(40); -var expm1 = _dereq_(66); -var exp = Math.exp; - -$export($export.S, 'Math', { - tanh: function tanh(x) { - var a = expm1(x = +x); - var b = expm1(-x); - return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); - } -}); - -},{"40":40,"66":66}],176:[function(_dereq_,module,exports){ -// 20.2.2.34 Math.trunc(x) -var $export = _dereq_(40); - -$export($export.S, 'Math', { - trunc: function trunc(it) { - return (it > 0 ? Math.floor : Math.ceil)(it); - } -}); - -},{"40":40}],177:[function(_dereq_,module,exports){ -'use strict'; -var global = _dereq_(46); -var has = _dereq_(47); -var cof = _dereq_(26); -var inheritIfRequired = _dereq_(51); -var toPrimitive = _dereq_(119); -var fails = _dereq_(42); -var gOPN = _dereq_(79).f; -var gOPD = _dereq_(77).f; -var dP = _dereq_(75).f; -var $trim = _dereq_(110).trim; -var NUMBER = 'Number'; -var $Number = global[NUMBER]; -var Base = $Number; -var proto = $Number.prototype; -// Opera ~12 has broken Object#toString -var BROKEN_COF = cof(_dereq_(74)(proto)) == NUMBER; -var TRIM = 'trim' in String.prototype; - -// 7.1.3 ToNumber(argument) -var toNumber = function (argument) { - var it = toPrimitive(argument, false); - if (typeof it == 'string' && it.length > 2) { - it = TRIM ? it.trim() : $trim(it, 3); - var first = it.charCodeAt(0); - var third, radix, maxCode; - if (first === 43 || first === 45) { - third = it.charCodeAt(2); - if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix - } else if (first === 48) { - switch (it.charCodeAt(1)) { - case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i - case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i - default: return +it; + $acosh(Infinity) == Infinity + ), 'Math', { + acosh: function acosh (x) { + return (x = +x) < 1 ? NaN : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)) } - for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { - code = digits.charCodeAt(i); - // parseInt parses a string to a first unavailable symbol - // but ToNumber should return NaN if a string contains unavailable symbols - if (code < 48 || code > maxCode) return NaN; - } return parseInt(digits, radix); - } - } return +it; -}; + }) + }, { 40: 40, 68: 68 }], + 161: [function (_dereq_, module, exports) { + // 20.2.2.5 Math.asinh(x) + var $export = _dereq_(40) + var $asinh = Math.asinh -if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { - $Number = function Number(value) { - var it = arguments.length < 1 ? 0 : value; - var that = this; - return that instanceof $Number + function asinh (x) { + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)) + } + + // Tor Browser bug: Math.asinh(0) -> -0 + $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }) + }, { 40: 40 }], + 162: [function (_dereq_, module, exports) { + // 20.2.2.7 Math.atanh(x) + var $export = _dereq_(40) + var $atanh = Math.atanh + + // Tor Browser bug: Math.atanh(-0) -> 0 + $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh (x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2 + } + }) + }, { 40: 40 }], + 163: [function (_dereq_, module, exports) { + // 20.2.2.9 Math.cbrt(x) + var $export = _dereq_(40) + var sign = _dereq_(69) + + $export($export.S, 'Math', { + cbrt: function cbrt (x) { + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3) + } + }) + }, { 40: 40, 69: 69 }], + 164: [function (_dereq_, module, exports) { + // 20.2.2.11 Math.clz32(x) + var $export = _dereq_(40) + + $export($export.S, 'Math', { + clz32: function clz32 (x) { + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32 + } + }) + }, { 40: 40 }], + 165: [function (_dereq_, module, exports) { + // 20.2.2.12 Math.cosh(x) + var $export = _dereq_(40) + var exp = Math.exp + + $export($export.S, 'Math', { + cosh: function cosh (x) { + return (exp(x = +x) + exp(-x)) / 2 + } + }) + }, { 40: 40 }], + 166: [function (_dereq_, module, exports) { + // 20.2.2.14 Math.expm1(x) + var $export = _dereq_(40) + var $expm1 = _dereq_(66) + + $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }) + }, { 40: 40, 66: 66 }], + 167: [function (_dereq_, module, exports) { + // 20.2.2.16 Math.fround(x) + var $export = _dereq_(40) + + $export($export.S, 'Math', { fround: _dereq_(67) }) + }, { 40: 40, 67: 67 }], + 168: [function (_dereq_, module, exports) { + // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) + var $export = _dereq_(40) + var abs = Math.abs + + $export($export.S, 'Math', { + hypot: function hypot (value1, value2) { // eslint-disable-line no-unused-vars + var sum = 0 + var i = 0 + var aLen = arguments.length + var larg = 0 + var arg, div + while (i < aLen) { + arg = abs(arguments[i++]) + if (larg < arg) { + div = larg / arg + sum = sum * div * div + 1 + larg = arg + } else if (arg > 0) { + div = arg / larg + sum += div * div + } else sum += arg + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum) + } + }) + }, { 40: 40 }], + 169: [function (_dereq_, module, exports) { + // 20.2.2.18 Math.imul(x, y) + var $export = _dereq_(40) + var $imul = Math.imul + + // some WebKit versions fails with big numbers, some has wrong arity + $export($export.S + $export.F * _dereq_(42)(function () { + return $imul(0xffffffff, 5) != -5 || $imul.length != 2 + }), 'Math', { + imul: function imul (x, y) { + var UINT16 = 0xffff + var xn = +x + var yn = +y + var xl = UINT16 & xn + var yl = UINT16 & yn + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0) + } + }) + }, { 40: 40, 42: 42 }], + 170: [function (_dereq_, module, exports) { + // 20.2.2.21 Math.log10(x) + var $export = _dereq_(40) + + $export($export.S, 'Math', { + log10: function log10 (x) { + return Math.log(x) * Math.LOG10E + } + }) + }, { 40: 40 }], + 171: [function (_dereq_, module, exports) { + // 20.2.2.20 Math.log1p(x) + var $export = _dereq_(40) + + $export($export.S, 'Math', { log1p: _dereq_(68) }) + }, { 40: 40, 68: 68 }], + 172: [function (_dereq_, module, exports) { + // 20.2.2.22 Math.log2(x) + var $export = _dereq_(40) + + $export($export.S, 'Math', { + log2: function log2 (x) { + return Math.log(x) / Math.LN2 + } + }) + }, { 40: 40 }], + 173: [function (_dereq_, module, exports) { + // 20.2.2.28 Math.sign(x) + var $export = _dereq_(40) + + $export($export.S, 'Math', { sign: _dereq_(69) }) + }, { 40: 40, 69: 69 }], + 174: [function (_dereq_, module, exports) { + // 20.2.2.30 Math.sinh(x) + var $export = _dereq_(40) + var expm1 = _dereq_(66) + var exp = Math.exp + + // V8 near Chromium 38 has a problem with very small numbers + $export($export.S + $export.F * _dereq_(42)(function () { + return !Math.sinh(-2e-17) != -2e-17 + }), 'Math', { + sinh: function sinh (x) { + return Math.abs(x = +x) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2) + } + }) + }, { 40: 40, 42: 42, 66: 66 }], + 175: [function (_dereq_, module, exports) { + // 20.2.2.33 Math.tanh(x) + var $export = _dereq_(40) + var expm1 = _dereq_(66) + var exp = Math.exp + + $export($export.S, 'Math', { + tanh: function tanh (x) { + var a = expm1(x = +x) + var b = expm1(-x) + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)) + } + }) + }, { 40: 40, 66: 66 }], + 176: [function (_dereq_, module, exports) { + // 20.2.2.34 Math.trunc(x) + var $export = _dereq_(40) + + $export($export.S, 'Math', { + trunc: function trunc (it) { + return (it > 0 ? Math.floor : Math.ceil)(it) + } + }) + }, { 40: 40 }], + 177: [function (_dereq_, module, exports) { + 'use strict' + var global = _dereq_(46) + var has = _dereq_(47) + var cof = _dereq_(26) + var inheritIfRequired = _dereq_(51) + var toPrimitive = _dereq_(119) + var fails = _dereq_(42) + var gOPN = _dereq_(79).f + var gOPD = _dereq_(77).f + var dP = _dereq_(75).f + var $trim = _dereq_(110).trim + var NUMBER = 'Number' + var $Number = global[NUMBER] + var Base = $Number + var proto = $Number.prototype + // Opera ~12 has broken Object#toString + var BROKEN_COF = cof(_dereq_(74)(proto)) == NUMBER + var TRIM = 'trim' in String.prototype + + // 7.1.3 ToNumber(argument) + var toNumber = function (argument) { + var it = toPrimitive(argument, false) + if (typeof it === 'string' && it.length > 2) { + it = TRIM ? it.trim() : $trim(it, 3) + var first = it.charCodeAt(0) + var third, radix, maxCode + if (first === 43 || first === 45) { + third = it.charCodeAt(2) + if (third === 88 || third === 120) return NaN // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: case 98: radix = 2; maxCode = 49; break // fast equal /^0b[01]+$/i + case 79: case 111: radix = 8; maxCode = 55; break // fast equal /^0o[0-7]+$/i + default: return +it + } + for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { + code = digits.charCodeAt(i) + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if (code < 48 || code > maxCode) return NaN + } return parseInt(digits, radix) + } + } return +it + } + + if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { + $Number = function Number (value) { + var it = arguments.length < 1 ? 0 : value + var that = this + return that instanceof $Number && // check on 1..constructor(foo) case - && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER) - ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); - }; - for (var keys = _dereq_(36) ? gOPN(Base) : ( - // ES3: - 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + (BROKEN_COF ? fails(function () { proto.valueOf.call(that) }) : cof(that) != NUMBER) + ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it) + } + for (var keys = _dereq_(36) ? gOPN(Base) : ( + // ES3: + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES6 (in case, if modules with ES6 Number statics required before): 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' - ).split(','), j = 0, key; keys.length > j; j++) { - if (has(Base, key = keys[j]) && !has($Number, key)) { - dP($Number, key, gOPD(Base, key)); + ).split(','), j = 0, key; keys.length > j; j++) { + if (has(Base, key = keys[j]) && !has($Number, key)) { + dP($Number, key, gOPD(Base, key)) + } + } + $Number.prototype = proto + proto.constructor = $Number + _dereq_(94)(global, NUMBER, $Number) } - } - $Number.prototype = proto; - proto.constructor = $Number; - _dereq_(94)(global, NUMBER, $Number); -} + }, { 110: 110, 119: 119, 26: 26, 36: 36, 42: 42, 46: 46, 47: 47, 51: 51, 74: 74, 75: 75, 77: 77, 79: 79, 94: 94 }], + 178: [function (_dereq_, module, exports) { + // 20.1.2.1 Number.EPSILON + var $export = _dereq_(40) -},{"110":110,"119":119,"26":26,"36":36,"42":42,"46":46,"47":47,"51":51,"74":74,"75":75,"77":77,"79":79,"94":94}],178:[function(_dereq_,module,exports){ -// 20.1.2.1 Number.EPSILON -var $export = _dereq_(40); + $export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }) + }, { 40: 40 }], + 179: [function (_dereq_, module, exports) { + // 20.1.2.2 Number.isFinite(number) + var $export = _dereq_(40) + var _isFinite = _dereq_(46).isFinite -$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); + $export($export.S, 'Number', { + isFinite: function isFinite (it) { + return typeof it === 'number' && _isFinite(it) + } + }) + }, { 40: 40, 46: 46 }], + 180: [function (_dereq_, module, exports) { + // 20.1.2.3 Number.isInteger(number) + var $export = _dereq_(40) -},{"40":40}],179:[function(_dereq_,module,exports){ -// 20.1.2.2 Number.isFinite(number) -var $export = _dereq_(40); -var _isFinite = _dereq_(46).isFinite; + $export($export.S, 'Number', { isInteger: _dereq_(56) }) + }, { 40: 40, 56: 56 }], + 181: [function (_dereq_, module, exports) { + // 20.1.2.4 Number.isNaN(number) + var $export = _dereq_(40) -$export($export.S, 'Number', { - isFinite: function isFinite(it) { - return typeof it == 'number' && _isFinite(it); - } -}); + $export($export.S, 'Number', { + isNaN: function isNaN (number) { + // eslint-disable-next-line no-self-compare + return number != number + } + }) + }, { 40: 40 }], + 182: [function (_dereq_, module, exports) { + // 20.1.2.5 Number.isSafeInteger(number) + var $export = _dereq_(40) + var isInteger = _dereq_(56) + var abs = Math.abs -},{"40":40,"46":46}],180:[function(_dereq_,module,exports){ -// 20.1.2.3 Number.isInteger(number) -var $export = _dereq_(40); + $export($export.S, 'Number', { + isSafeInteger: function isSafeInteger (number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff + } + }) + }, { 40: 40, 56: 56 }], + 183: [function (_dereq_, module, exports) { + // 20.1.2.6 Number.MAX_SAFE_INTEGER + var $export = _dereq_(40) -$export($export.S, 'Number', { isInteger: _dereq_(56) }); + $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }) + }, { 40: 40 }], + 184: [function (_dereq_, module, exports) { + // 20.1.2.10 Number.MIN_SAFE_INTEGER + var $export = _dereq_(40) -},{"40":40,"56":56}],181:[function(_dereq_,module,exports){ -// 20.1.2.4 Number.isNaN(number) -var $export = _dereq_(40); + $export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }) + }, { 40: 40 }], + 185: [function (_dereq_, module, exports) { + var $export = _dereq_(40) + var $parseFloat = _dereq_(88) + // 20.1.2.12 Number.parseFloat(string) + $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }) + }, { 40: 40, 88: 88 }], + 186: [function (_dereq_, module, exports) { + var $export = _dereq_(40) + var $parseInt = _dereq_(89) + // 20.1.2.13 Number.parseInt(string, radix) + $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }) + }, { 40: 40, 89: 89 }], + 187: [function (_dereq_, module, exports) { + 'use strict' + var $export = _dereq_(40) + var toInteger = _dereq_(115) + var aNumberValue = _dereq_(12) + var repeat = _dereq_(109) + var $toFixed = 1.0.toFixed + var floor = Math.floor + var data = [0, 0, 0, 0, 0, 0] + var ERROR = 'Number.toFixed: incorrect invocation!' + var ZERO = '0' -$export($export.S, 'Number', { - isNaN: function isNaN(number) { - // eslint-disable-next-line no-self-compare - return number != number; - } -}); - -},{"40":40}],182:[function(_dereq_,module,exports){ -// 20.1.2.5 Number.isSafeInteger(number) -var $export = _dereq_(40); -var isInteger = _dereq_(56); -var abs = Math.abs; - -$export($export.S, 'Number', { - isSafeInteger: function isSafeInteger(number) { - return isInteger(number) && abs(number) <= 0x1fffffffffffff; - } -}); - -},{"40":40,"56":56}],183:[function(_dereq_,module,exports){ -// 20.1.2.6 Number.MAX_SAFE_INTEGER -var $export = _dereq_(40); - -$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); - -},{"40":40}],184:[function(_dereq_,module,exports){ -// 20.1.2.10 Number.MIN_SAFE_INTEGER -var $export = _dereq_(40); - -$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); - -},{"40":40}],185:[function(_dereq_,module,exports){ -var $export = _dereq_(40); -var $parseFloat = _dereq_(88); -// 20.1.2.12 Number.parseFloat(string) -$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); - -},{"40":40,"88":88}],186:[function(_dereq_,module,exports){ -var $export = _dereq_(40); -var $parseInt = _dereq_(89); -// 20.1.2.13 Number.parseInt(string, radix) -$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); - -},{"40":40,"89":89}],187:[function(_dereq_,module,exports){ -'use strict'; -var $export = _dereq_(40); -var toInteger = _dereq_(115); -var aNumberValue = _dereq_(12); -var repeat = _dereq_(109); -var $toFixed = 1.0.toFixed; -var floor = Math.floor; -var data = [0, 0, 0, 0, 0, 0]; -var ERROR = 'Number.toFixed: incorrect invocation!'; -var ZERO = '0'; - -var multiply = function (n, c) { - var i = -1; - var c2 = c; - while (++i < 6) { - c2 += n * data[i]; - data[i] = c2 % 1e7; - c2 = floor(c2 / 1e7); - } -}; -var divide = function (n) { - var i = 6; - var c = 0; - while (--i >= 0) { - c += data[i]; - data[i] = floor(c / n); - c = (c % n) * 1e7; - } -}; -var numToString = function () { - var i = 6; - var s = ''; - while (--i >= 0) { - if (s !== '' || i === 0 || data[i] !== 0) { - var t = String(data[i]); - s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + var multiply = function (n, c) { + var i = -1 + var c2 = c + while (++i < 6) { + c2 += n * data[i] + data[i] = c2 % 1e7 + c2 = floor(c2 / 1e7) + } + } + var divide = function (n) { + var i = 6 + var c = 0 + while (--i >= 0) { + c += data[i] + data[i] = floor(c / n) + c = (c % n) * 1e7 + } + } + var numToString = function () { + var i = 6 + var s = '' + while (--i >= 0) { + if (s !== '' || i === 0 || data[i] !== 0) { + var t = String(data[i]) + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t + } + } return s + } + var pow = function (x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc) + } + var log = function (x) { + var n = 0 + var x2 = x + while (x2 >= 4096) { + n += 12 + x2 /= 4096 + } + while (x2 >= 2) { + n += 1 + x2 /= 2 + } return n } - } return s; -}; -var pow = function (x, n, acc) { - return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); -}; -var log = function (x) { - var n = 0; - var x2 = x; - while (x2 >= 4096) { - n += 12; - x2 /= 4096; - } - while (x2 >= 2) { - n += 1; - x2 /= 2; - } return n; -}; -$export($export.P + $export.F * (!!$toFixed && ( - 0.00008.toFixed(3) !== '0.000' || + $export($export.P + $export.F * (!!$toFixed && ( + 0.00008.toFixed(3) !== '0.000' || 0.9.toFixed(0) !== '1' || 1.255.toFixed(2) !== '1.25' || 1000000000000000128.0.toFixed(0) !== '1000000000000000128' -) || !_dereq_(42)(function () { - // V8 ~ Android 4.3- - $toFixed.call({}); -})), 'Number', { - toFixed: function toFixed(fractionDigits) { - var x = aNumberValue(this, ERROR); - var f = toInteger(fractionDigits); - var s = ''; - var m = ZERO; - var e, z, j, k; - if (f < 0 || f > 20) throw RangeError(ERROR); - // eslint-disable-next-line no-self-compare - if (x != x) return 'NaN'; - if (x <= -1e21 || x >= 1e21) return String(x); - if (x < 0) { - s = '-'; - x = -x; - } - if (x > 1e-21) { - e = log(x * pow(2, 69, 1)) - 69; - z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); - z *= 0x10000000000000; - e = 52 - e; - if (e > 0) { - multiply(0, z); - j = f; - while (j >= 7) { - multiply(1e7, 0); - j -= 7; + ) || !_dereq_(42)(function () { + // V8 ~ Android 4.3- + $toFixed.call({}) + })), 'Number', { + toFixed: function toFixed (fractionDigits) { + var x = aNumberValue(this, ERROR) + var f = toInteger(fractionDigits) + var s = '' + var m = ZERO + var e, z, j, k + if (f < 0 || f > 20) throw RangeError(ERROR) + // eslint-disable-next-line no-self-compare + if (x != x) return 'NaN' + if (x <= -1e21 || x >= 1e21) return String(x) + if (x < 0) { + s = '-' + x = -x } - multiply(pow(10, j, 1), 0); - j = e - 1; - while (j >= 23) { - divide(1 << 23); - j -= 23; + if (x > 1e-21) { + e = log(x * pow(2, 69, 1)) - 69 + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1) + z *= 0x10000000000000 + e = 52 - e + if (e > 0) { + multiply(0, z) + j = f + while (j >= 7) { + multiply(1e7, 0) + j -= 7 + } + multiply(pow(10, j, 1), 0) + j = e - 1 + while (j >= 23) { + divide(1 << 23) + j -= 23 + } + divide(1 << j) + multiply(1, 1) + divide(2) + m = numToString() + } else { + multiply(0, z) + multiply(1 << -e, 0) + m = numToString() + repeat.call(ZERO, f) + } } - divide(1 << j); - multiply(1, 1); - divide(2); - m = numToString(); - } else { - multiply(0, z); - multiply(1 << -e, 0); - m = numToString() + repeat.call(ZERO, f); + if (f > 0) { + k = m.length + m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)) + } else { + m = s + m + } return m } + }) + }, { 109: 109, 115: 115, 12: 12, 40: 40, 42: 42 }], + 188: [function (_dereq_, module, exports) { + 'use strict' + var $export = _dereq_(40) + var $fails = _dereq_(42) + var aNumberValue = _dereq_(12) + var $toPrecision = 1.0.toPrecision + + $export($export.P + $export.F * ($fails(function () { + // IE7- + return $toPrecision.call(1, undefined) !== '1' + }) || !$fails(function () { + // V8 ~ Android 4.3- + $toPrecision.call({}) + })), 'Number', { + toPrecision: function toPrecision (precision) { + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!') + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision) + } + }) + }, { 12: 12, 40: 40, 42: 42 }], + 189: [function (_dereq_, module, exports) { + // 19.1.3.1 Object.assign(target, source) + var $export = _dereq_(40) + + $export($export.S + $export.F, 'Object', { assign: _dereq_(73) }) + }, { 40: 40, 73: 73 }], + 190: [function (_dereq_, module, exports) { + var $export = _dereq_(40) + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + $export($export.S, 'Object', { create: _dereq_(74) }) + }, { 40: 40, 74: 74 }], + 191: [function (_dereq_, module, exports) { + var $export = _dereq_(40) + // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) + $export($export.S + $export.F * !_dereq_(36), 'Object', { defineProperties: _dereq_(76) }) + }, { 36: 36, 40: 40, 76: 76 }], + 192: [function (_dereq_, module, exports) { + var $export = _dereq_(40) + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + $export($export.S + $export.F * !_dereq_(36), 'Object', { defineProperty: _dereq_(75).f }) + }, { 36: 36, 40: 40, 75: 75 }], + 193: [function (_dereq_, module, exports) { + // 19.1.2.5 Object.freeze(O) + var isObject = _dereq_(57) + var meta = _dereq_(70).onFreeze + + _dereq_(85)('freeze', function ($freeze) { + return function freeze (it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it + } + }) + }, { 57: 57, 70: 70, 85: 85 }], + 194: [function (_dereq_, module, exports) { + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + var toIObject = _dereq_(116) + var $getOwnPropertyDescriptor = _dereq_(77).f + + _dereq_(85)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor (it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key) + } + }) + }, { 116: 116, 77: 77, 85: 85 }], + 195: [function (_dereq_, module, exports) { + // 19.1.2.7 Object.getOwnPropertyNames(O) + _dereq_(85)('getOwnPropertyNames', function () { + return _dereq_(78).f + }) + }, { 78: 78, 85: 85 }], + 196: [function (_dereq_, module, exports) { + // 19.1.2.9 Object.getPrototypeOf(O) + var toObject = _dereq_(118) + var $getPrototypeOf = _dereq_(81) + + _dereq_(85)('getPrototypeOf', function () { + return function getPrototypeOf (it) { + return $getPrototypeOf(toObject(it)) + } + }) + }, { 118: 118, 81: 81, 85: 85 }], + 197: [function (_dereq_, module, exports) { + // 19.1.2.11 Object.isExtensible(O) + var isObject = _dereq_(57) + + _dereq_(85)('isExtensible', function ($isExtensible) { + return function isExtensible (it) { + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false + } + }) + }, { 57: 57, 85: 85 }], + 198: [function (_dereq_, module, exports) { + // 19.1.2.12 Object.isFrozen(O) + var isObject = _dereq_(57) + + _dereq_(85)('isFrozen', function ($isFrozen) { + return function isFrozen (it) { + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true + } + }) + }, { 57: 57, 85: 85 }], + 199: [function (_dereq_, module, exports) { + // 19.1.2.13 Object.isSealed(O) + var isObject = _dereq_(57) + + _dereq_(85)('isSealed', function ($isSealed) { + return function isSealed (it) { + return isObject(it) ? $isSealed ? $isSealed(it) : false : true + } + }) + }, { 57: 57, 85: 85 }], + 200: [function (_dereq_, module, exports) { + // 19.1.3.10 Object.is(value1, value2) + var $export = _dereq_(40) + $export($export.S, 'Object', { is: _dereq_(97) }) + }, { 40: 40, 97: 97 }], + 201: [function (_dereq_, module, exports) { + // 19.1.2.14 Object.keys(O) + var toObject = _dereq_(118) + var $keys = _dereq_(83) + + _dereq_(85)('keys', function () { + return function keys (it) { + return $keys(toObject(it)) + } + }) + }, { 118: 118, 83: 83, 85: 85 }], + 202: [function (_dereq_, module, exports) { + // 19.1.2.15 Object.preventExtensions(O) + var isObject = _dereq_(57) + var meta = _dereq_(70).onFreeze + + _dereq_(85)('preventExtensions', function ($preventExtensions) { + return function preventExtensions (it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it + } + }) + }, { 57: 57, 70: 70, 85: 85 }], + 203: [function (_dereq_, module, exports) { + // 19.1.2.17 Object.seal(O) + var isObject = _dereq_(57) + var meta = _dereq_(70).onFreeze + + _dereq_(85)('seal', function ($seal) { + return function seal (it) { + return $seal && isObject(it) ? $seal(meta(it)) : it + } + }) + }, { 57: 57, 70: 70, 85: 85 }], + 204: [function (_dereq_, module, exports) { + // 19.1.3.19 Object.setPrototypeOf(O, proto) + var $export = _dereq_(40) + $export($export.S, 'Object', { setPrototypeOf: _dereq_(98).set }) + }, { 40: 40, 98: 98 }], + 205: [function (_dereq_, module, exports) { + 'use strict' + // 19.1.3.6 Object.prototype.toString() + var classof = _dereq_(25) + var test = {} + test[_dereq_(128)('toStringTag')] = 'z' + if (test + '' != '[object z]') { + _dereq_(94)(Object.prototype, 'toString', function toString () { + return '[object ' + classof(this) + ']' + }, true) } - if (f > 0) { - k = m.length; - m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); - } else { - m = s + m; - } return m; - } -}); + }, { 128: 128, 25: 25, 94: 94 }], + 206: [function (_dereq_, module, exports) { + var $export = _dereq_(40) + var $parseFloat = _dereq_(88) + // 18.2.4 parseFloat(string) + $export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }) + }, { 40: 40, 88: 88 }], + 207: [function (_dereq_, module, exports) { + var $export = _dereq_(40) + var $parseInt = _dereq_(89) + // 18.2.5 parseInt(string, radix) + $export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }) + }, { 40: 40, 89: 89 }], + 208: [function (_dereq_, module, exports) { + 'use strict' + var LIBRARY = _dereq_(65) + var global = _dereq_(46) + var ctx = _dereq_(32) + var classof = _dereq_(25) + var $export = _dereq_(40) + var isObject = _dereq_(57) + var aFunction = _dereq_(11) + var anInstance = _dereq_(15) + var forOf = _dereq_(45) + var speciesConstructor = _dereq_(103) + var task = _dereq_(112).set + var microtask = _dereq_(71)() + var newPromiseCapabilityModule = _dereq_(72) + var perform = _dereq_(90) + var userAgent = _dereq_(124) + var promiseResolve = _dereq_(91) + var PROMISE = 'Promise' + var TypeError = global.TypeError + var process = global.process + var versions = process && process.versions + var v8 = versions && versions.v8 || '' + var $Promise = global[PROMISE] + var isNode = classof(process) == 'process' + var empty = function () { /* empty */ } + var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper + var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f -},{"109":109,"115":115,"12":12,"40":40,"42":42}],188:[function(_dereq_,module,exports){ -'use strict'; -var $export = _dereq_(40); -var $fails = _dereq_(42); -var aNumberValue = _dereq_(12); -var $toPrecision = 1.0.toPrecision; - -$export($export.P + $export.F * ($fails(function () { - // IE7- - return $toPrecision.call(1, undefined) !== '1'; -}) || !$fails(function () { - // V8 ~ Android 4.3- - $toPrecision.call({}); -})), 'Number', { - toPrecision: function toPrecision(precision) { - var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); - return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); - } -}); - -},{"12":12,"40":40,"42":42}],189:[function(_dereq_,module,exports){ -// 19.1.3.1 Object.assign(target, source) -var $export = _dereq_(40); - -$export($export.S + $export.F, 'Object', { assign: _dereq_(73) }); - -},{"40":40,"73":73}],190:[function(_dereq_,module,exports){ -var $export = _dereq_(40); -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -$export($export.S, 'Object', { create: _dereq_(74) }); - -},{"40":40,"74":74}],191:[function(_dereq_,module,exports){ -var $export = _dereq_(40); -// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) -$export($export.S + $export.F * !_dereq_(36), 'Object', { defineProperties: _dereq_(76) }); - -},{"36":36,"40":40,"76":76}],192:[function(_dereq_,module,exports){ -var $export = _dereq_(40); -// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) -$export($export.S + $export.F * !_dereq_(36), 'Object', { defineProperty: _dereq_(75).f }); - -},{"36":36,"40":40,"75":75}],193:[function(_dereq_,module,exports){ -// 19.1.2.5 Object.freeze(O) -var isObject = _dereq_(57); -var meta = _dereq_(70).onFreeze; - -_dereq_(85)('freeze', function ($freeze) { - return function freeze(it) { - return $freeze && isObject(it) ? $freeze(meta(it)) : it; - }; -}); - -},{"57":57,"70":70,"85":85}],194:[function(_dereq_,module,exports){ -// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) -var toIObject = _dereq_(116); -var $getOwnPropertyDescriptor = _dereq_(77).f; - -_dereq_(85)('getOwnPropertyDescriptor', function () { - return function getOwnPropertyDescriptor(it, key) { - return $getOwnPropertyDescriptor(toIObject(it), key); - }; -}); - -},{"116":116,"77":77,"85":85}],195:[function(_dereq_,module,exports){ -// 19.1.2.7 Object.getOwnPropertyNames(O) -_dereq_(85)('getOwnPropertyNames', function () { - return _dereq_(78).f; -}); - -},{"78":78,"85":85}],196:[function(_dereq_,module,exports){ -// 19.1.2.9 Object.getPrototypeOf(O) -var toObject = _dereq_(118); -var $getPrototypeOf = _dereq_(81); - -_dereq_(85)('getPrototypeOf', function () { - return function getPrototypeOf(it) { - return $getPrototypeOf(toObject(it)); - }; -}); - -},{"118":118,"81":81,"85":85}],197:[function(_dereq_,module,exports){ -// 19.1.2.11 Object.isExtensible(O) -var isObject = _dereq_(57); - -_dereq_(85)('isExtensible', function ($isExtensible) { - return function isExtensible(it) { - return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; - }; -}); - -},{"57":57,"85":85}],198:[function(_dereq_,module,exports){ -// 19.1.2.12 Object.isFrozen(O) -var isObject = _dereq_(57); - -_dereq_(85)('isFrozen', function ($isFrozen) { - return function isFrozen(it) { - return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; - }; -}); - -},{"57":57,"85":85}],199:[function(_dereq_,module,exports){ -// 19.1.2.13 Object.isSealed(O) -var isObject = _dereq_(57); - -_dereq_(85)('isSealed', function ($isSealed) { - return function isSealed(it) { - return isObject(it) ? $isSealed ? $isSealed(it) : false : true; - }; -}); - -},{"57":57,"85":85}],200:[function(_dereq_,module,exports){ -// 19.1.3.10 Object.is(value1, value2) -var $export = _dereq_(40); -$export($export.S, 'Object', { is: _dereq_(97) }); - -},{"40":40,"97":97}],201:[function(_dereq_,module,exports){ -// 19.1.2.14 Object.keys(O) -var toObject = _dereq_(118); -var $keys = _dereq_(83); - -_dereq_(85)('keys', function () { - return function keys(it) { - return $keys(toObject(it)); - }; -}); - -},{"118":118,"83":83,"85":85}],202:[function(_dereq_,module,exports){ -// 19.1.2.15 Object.preventExtensions(O) -var isObject = _dereq_(57); -var meta = _dereq_(70).onFreeze; - -_dereq_(85)('preventExtensions', function ($preventExtensions) { - return function preventExtensions(it) { - return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; - }; -}); - -},{"57":57,"70":70,"85":85}],203:[function(_dereq_,module,exports){ -// 19.1.2.17 Object.seal(O) -var isObject = _dereq_(57); -var meta = _dereq_(70).onFreeze; - -_dereq_(85)('seal', function ($seal) { - return function seal(it) { - return $seal && isObject(it) ? $seal(meta(it)) : it; - }; -}); - -},{"57":57,"70":70,"85":85}],204:[function(_dereq_,module,exports){ -// 19.1.3.19 Object.setPrototypeOf(O, proto) -var $export = _dereq_(40); -$export($export.S, 'Object', { setPrototypeOf: _dereq_(98).set }); - -},{"40":40,"98":98}],205:[function(_dereq_,module,exports){ -'use strict'; -// 19.1.3.6 Object.prototype.toString() -var classof = _dereq_(25); -var test = {}; -test[_dereq_(128)('toStringTag')] = 'z'; -if (test + '' != '[object z]') { - _dereq_(94)(Object.prototype, 'toString', function toString() { - return '[object ' + classof(this) + ']'; - }, true); -} - -},{"128":128,"25":25,"94":94}],206:[function(_dereq_,module,exports){ -var $export = _dereq_(40); -var $parseFloat = _dereq_(88); -// 18.2.4 parseFloat(string) -$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); - -},{"40":40,"88":88}],207:[function(_dereq_,module,exports){ -var $export = _dereq_(40); -var $parseInt = _dereq_(89); -// 18.2.5 parseInt(string, radix) -$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); - -},{"40":40,"89":89}],208:[function(_dereq_,module,exports){ -'use strict'; -var LIBRARY = _dereq_(65); -var global = _dereq_(46); -var ctx = _dereq_(32); -var classof = _dereq_(25); -var $export = _dereq_(40); -var isObject = _dereq_(57); -var aFunction = _dereq_(11); -var anInstance = _dereq_(15); -var forOf = _dereq_(45); -var speciesConstructor = _dereq_(103); -var task = _dereq_(112).set; -var microtask = _dereq_(71)(); -var newPromiseCapabilityModule = _dereq_(72); -var perform = _dereq_(90); -var userAgent = _dereq_(124); -var promiseResolve = _dereq_(91); -var PROMISE = 'Promise'; -var TypeError = global.TypeError; -var process = global.process; -var versions = process && process.versions; -var v8 = versions && versions.v8 || ''; -var $Promise = global[PROMISE]; -var isNode = classof(process) == 'process'; -var empty = function () { /* empty */ }; -var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; -var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; - -var USE_NATIVE = !!function () { - try { - // correct subclassing with @@species support - var promise = $Promise.resolve(1); - var FakePromise = (promise.constructor = {})[_dereq_(128)('species')] = function (exec) { - exec(empty, empty); - }; - // unhandled rejections tracking support, NodeJS Promise without it fails @@species test - return (isNode || typeof PromiseRejectionEvent == 'function') - && promise.then(empty) instanceof FakePromise + var USE_NATIVE = !!(function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1) + var FakePromise = (promise.constructor = {})[_dereq_(128)('species')] = function (exec) { + exec(empty, empty) + } + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent === 'function') && + promise.then(empty) instanceof FakePromise && // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 // we can't detect it synchronously, so just check versions - && v8.indexOf('6.6') !== 0 - && userAgent.indexOf('Chrome/66') === -1; - } catch (e) { /* empty */ } -}(); + v8.indexOf('6.6') !== 0 && + userAgent.indexOf('Chrome/66') === -1 + } catch (e) { /* empty */ } + }()) -// helpers -var isThenable = function (it) { - var then; - return isObject(it) && typeof (then = it.then) == 'function' ? then : false; -}; -var notify = function (promise, isReject) { - if (promise._n) return; - promise._n = true; - var chain = promise._c; - microtask(function () { - var value = promise._v; - var ok = promise._s == 1; - var i = 0; - var run = function (reaction) { - var handler = ok ? reaction.ok : reaction.fail; - var resolve = reaction.resolve; - var reject = reaction.reject; - var domain = reaction.domain; - var result, then, exited; - try { - if (handler) { - if (!ok) { - if (promise._h == 2) onHandleUnhandled(promise); - promise._h = 1; + // helpers + var isThenable = function (it) { + var then + return isObject(it) && typeof (then = it.then) === 'function' ? then : false + } + var notify = function (promise, isReject) { + if (promise._n) return + promise._n = true + var chain = promise._c + microtask(function () { + var value = promise._v + var ok = promise._s == 1 + var i = 0 + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail + var resolve = reaction.resolve + var reject = reaction.reject + var domain = reaction.domain + var result, then, exited + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise) + promise._h = 1 + } + if (handler === true) result = value + else { + if (domain) domain.enter() + result = handler(value) // may throw + if (domain) { + domain.exit() + exited = true + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')) + } else if (then = isThenable(result)) { + then.call(result, resolve, reject) + } else resolve(result) + } else reject(value) + } catch (e) { + if (domain && !exited) domain.exit() + reject(e) } - if (handler === true) result = value; - else { - if (domain) domain.enter(); - result = handler(value); // may throw - if (domain) { - domain.exit(); - exited = true; + } + while (chain.length > i) run(chain[i++]) // variable length - can't use forEach + promise._c = [] + promise._n = false + if (isReject && !promise._h) onUnhandled(promise) + }) + } + var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v + var unhandled = isUnhandled(promise) + var result, handler, console + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise) + } else if (handler = global.onunhandledrejection) { + handler({ promise: promise, reason: value }) + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value) + } + }) + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1 + } promise._a = undefined + if (unhandled && result.e) throw result.v + }) + } + var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0 + } + var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler + if (isNode) { + process.emit('rejectionHandled', promise) + } else if (handler = global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }) + } + }) + } + var $reject = function (value) { + var promise = this + if (promise._d) return + promise._d = true + promise = promise._w || promise // unwrap + promise._v = value + promise._s = 2 + if (!promise._a) promise._a = promise._c.slice() + notify(promise, true) + } + var $resolve = function (value) { + var promise = this + var then + if (promise._d) return + promise._d = true + promise = promise._w || promise // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself") + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false } // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)) + } catch (e) { + $reject.call(wrapper, e) + } + }) + } else { + promise._v = value + promise._s = 1 + notify(promise, false) + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e) // wrap + } + } + + // constructor polyfill + if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise (executor) { + anInstance(this, $Promise, PROMISE, '_h') + aFunction(executor) + Internal.call(this) + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)) + } catch (err) { + $reject.call(this, err) + } + } + // eslint-disable-next-line no-unused-vars + Internal = function Promise (executor) { + this._c = [] // <- awaiting reactions + this._a = undefined // <- checked in isUnhandled reactions + this._s = 0 // <- state + this._d = false // <- done + this._v = undefined // <- value + this._h = 0 // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false // <- notify + } + Internal.prototype = _dereq_(93)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then (onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)) + reaction.ok = typeof onFulfilled === 'function' ? onFulfilled : true + reaction.fail = typeof onRejected === 'function' && onRejected + reaction.domain = isNode ? process.domain : undefined + this._c.push(reaction) + if (this._a) this._a.push(reaction) + if (this._s) notify(this, false) + return reaction.promise + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + catch: function (onRejected) { + return this.then(undefined, onRejected) + } + }) + OwnPromiseCapability = function () { + var promise = new Internal() + this.promise = promise + this.resolve = ctx($resolve, promise, 1) + this.reject = ctx($reject, promise, 1) + } + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C) + } + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }) + _dereq_(100)($Promise, PROMISE) + _dereq_(99)(PROMISE) + Wrapper = _dereq_(30)[PROMISE] + + // statics + $export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject (r) { + var capability = newPromiseCapability(this) + var $$reject = capability.reject + $$reject(r) + return capability.promise + } + }) + $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve (x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x) + } + }) + $export($export.S + $export.F * !(USE_NATIVE && _dereq_(62)(function (iter) { + $Promise.all(iter).catch(empty) + })), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all (iterable) { + var C = this + var capability = newPromiseCapability(C) + var resolve = capability.resolve + var reject = capability.reject + var result = perform(function () { + var values = [] + var index = 0 + var remaining = 1 + forOf(iterable, false, function (promise) { + var $index = index++ + var alreadyCalled = false + values.push(undefined) + remaining++ + C.resolve(promise).then(function (value) { + if (alreadyCalled) return + alreadyCalled = true + values[$index] = value + --remaining || resolve(values) + }, reject) + }) + --remaining || resolve(values) + }) + if (result.e) reject(result.v) + return capability.promise + }, + // 25.4.4.4 Promise.race(iterable) + race: function race (iterable) { + var C = this + var capability = newPromiseCapability(C) + var reject = capability.reject + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject) + }) + }) + if (result.e) reject(result.v) + return capability.promise + } + }) + }, { 100: 100, 103: 103, 11: 11, 112: 112, 124: 124, 128: 128, 15: 15, 25: 25, 30: 30, 32: 32, 40: 40, 45: 45, 46: 46, 57: 57, 62: 62, 65: 65, 71: 71, 72: 72, 90: 90, 91: 91, 93: 93, 99: 99 }], + 209: [function (_dereq_, module, exports) { + // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) + var $export = _dereq_(40) + var aFunction = _dereq_(11) + var anObject = _dereq_(16) + var rApply = (_dereq_(46).Reflect || {}).apply + var fApply = Function.apply + // MS Edge argumentsList argument is optional + $export($export.S + $export.F * !_dereq_(42)(function () { + rApply(function () { /* empty */ }) + }), 'Reflect', { + apply: function apply (target, thisArgument, argumentsList) { + var T = aFunction(target) + var L = anObject(argumentsList) + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L) + } + }) + }, { 11: 11, 16: 16, 40: 40, 42: 42, 46: 46 }], + 210: [function (_dereq_, module, exports) { + // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) + var $export = _dereq_(40) + var create = _dereq_(74) + var aFunction = _dereq_(11) + var anObject = _dereq_(16) + var isObject = _dereq_(57) + var fails = _dereq_(42) + var bind = _dereq_(24) + var rConstruct = (_dereq_(46).Reflect || {}).construct + + // MS Edge supports only 2 arguments and argumentsList argument is optional + // FF Nightly sets third argument as `new.target`, but does not create `this` from it + var NEW_TARGET_BUG = fails(function () { + function F () { /* empty */ } + return !(rConstruct(function () { /* empty */ }, [], F) instanceof F) + }) + var ARGS_BUG = !fails(function () { + rConstruct(function () { /* empty */ }) + }) + + $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct (Target, args /* , newTarget */) { + aFunction(Target) + anObject(args) + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]) + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget) + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (args.length) { + case 0: return new Target() + case 1: return new Target(args[0]) + case 2: return new Target(args[0], args[1]) + case 3: return new Target(args[0], args[1], args[2]) + case 4: return new Target(args[0], args[1], args[2], args[3]) + } + // w/o altered newTarget, lot of arguments case + var $args = [null] + $args.push.apply($args, args) + return new (bind.apply(Target, $args))() + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype + var instance = create(isObject(proto) ? proto : Object.prototype) + var result = Function.apply.call(Target, instance, args) + return isObject(result) ? result : instance + } + }) + }, { 11: 11, 16: 16, 24: 24, 40: 40, 42: 42, 46: 46, 57: 57, 74: 74 }], + 211: [function (_dereq_, module, exports) { + // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) + var dP = _dereq_(75) + var $export = _dereq_(40) + var anObject = _dereq_(16) + var toPrimitive = _dereq_(119) + + // MS Edge has broken Reflect.defineProperty - throwing instead of returning false + $export($export.S + $export.F * _dereq_(42)(function () { + // eslint-disable-next-line no-undef + Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }) + }), 'Reflect', { + defineProperty: function defineProperty (target, propertyKey, attributes) { + anObject(target) + propertyKey = toPrimitive(propertyKey, true) + anObject(attributes) + try { + dP.f(target, propertyKey, attributes) + return true + } catch (e) { + return false + } + } + }) + }, { 119: 119, 16: 16, 40: 40, 42: 42, 75: 75 }], + 212: [function (_dereq_, module, exports) { + // 26.1.4 Reflect.deleteProperty(target, propertyKey) + var $export = _dereq_(40) + var gOPD = _dereq_(77).f + var anObject = _dereq_(16) + + $export($export.S, 'Reflect', { + deleteProperty: function deleteProperty (target, propertyKey) { + var desc = gOPD(anObject(target), propertyKey) + return desc && !desc.configurable ? false : delete target[propertyKey] + } + }) + }, { 16: 16, 40: 40, 77: 77 }], + 213: [function (_dereq_, module, exports) { + 'use strict' + // 26.1.5 Reflect.enumerate(target) + var $export = _dereq_(40) + var anObject = _dereq_(16) + var Enumerate = function (iterated) { + this._t = anObject(iterated) // target + this._i = 0 // next index + var keys = this._k = [] // keys + var key + for (key in iterated) keys.push(key) + } + _dereq_(60)(Enumerate, 'Object', function () { + var that = this + var keys = that._k + var key + do { + if (that._i >= keys.length) return { value: undefined, done: true } + } while (!((key = keys[that._i++]) in that._t)) + return { value: key, done: false } + }) + + $export($export.S, 'Reflect', { + enumerate: function enumerate (target) { + return new Enumerate(target) + } + }) + }, { 16: 16, 40: 40, 60: 60 }], + 214: [function (_dereq_, module, exports) { + // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) + var gOPD = _dereq_(77) + var $export = _dereq_(40) + var anObject = _dereq_(16) + + $export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor (target, propertyKey) { + return gOPD.f(anObject(target), propertyKey) + } + }) + }, { 16: 16, 40: 40, 77: 77 }], + 215: [function (_dereq_, module, exports) { + // 26.1.8 Reflect.getPrototypeOf(target) + var $export = _dereq_(40) + var getProto = _dereq_(81) + var anObject = _dereq_(16) + + $export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf (target) { + return getProto(anObject(target)) + } + }) + }, { 16: 16, 40: 40, 81: 81 }], + 216: [function (_dereq_, module, exports) { + // 26.1.6 Reflect.get(target, propertyKey [, receiver]) + var gOPD = _dereq_(77) + var getPrototypeOf = _dereq_(81) + var has = _dereq_(47) + var $export = _dereq_(40) + var isObject = _dereq_(57) + var anObject = _dereq_(16) + + function get (target, propertyKey /* , receiver */) { + var receiver = arguments.length < 3 ? target : arguments[2] + var desc, proto + if (anObject(target) === receiver) return target[propertyKey] + if (desc = gOPD.f(target, propertyKey)) { + return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined + } + if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver) + } + + $export($export.S, 'Reflect', { get: get }) + }, { 16: 16, 40: 40, 47: 47, 57: 57, 77: 77, 81: 81 }], + 217: [function (_dereq_, module, exports) { + // 26.1.9 Reflect.has(target, propertyKey) + var $export = _dereq_(40) + + $export($export.S, 'Reflect', { + has: function has (target, propertyKey) { + return propertyKey in target + } + }) + }, { 40: 40 }], + 218: [function (_dereq_, module, exports) { + // 26.1.10 Reflect.isExtensible(target) + var $export = _dereq_(40) + var anObject = _dereq_(16) + var $isExtensible = Object.isExtensible + + $export($export.S, 'Reflect', { + isExtensible: function isExtensible (target) { + anObject(target) + return $isExtensible ? $isExtensible(target) : true + } + }) + }, { 16: 16, 40: 40 }], + 219: [function (_dereq_, module, exports) { + // 26.1.11 Reflect.ownKeys(target) + var $export = _dereq_(40) + + $export($export.S, 'Reflect', { ownKeys: _dereq_(87) }) + }, { 40: 40, 87: 87 }], + 220: [function (_dereq_, module, exports) { + // 26.1.12 Reflect.preventExtensions(target) + var $export = _dereq_(40) + var anObject = _dereq_(16) + var $preventExtensions = Object.preventExtensions + + $export($export.S, 'Reflect', { + preventExtensions: function preventExtensions (target) { + anObject(target) + try { + if ($preventExtensions) $preventExtensions(target) + return true + } catch (e) { + return false + } + } + }) + }, { 16: 16, 40: 40 }], + 221: [function (_dereq_, module, exports) { + // 26.1.14 Reflect.setPrototypeOf(target, proto) + var $export = _dereq_(40) + var setProto = _dereq_(98) + + if (setProto) { + $export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf (target, proto) { + setProto.check(target, proto) + try { + setProto.set(target, proto) + return true + } catch (e) { + return false + } + } + }) + } + }, { 40: 40, 98: 98 }], + 222: [function (_dereq_, module, exports) { + // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) + var dP = _dereq_(75) + var gOPD = _dereq_(77) + var getPrototypeOf = _dereq_(81) + var has = _dereq_(47) + var $export = _dereq_(40) + var createDesc = _dereq_(92) + var anObject = _dereq_(16) + var isObject = _dereq_(57) + + function set (target, propertyKey, V /* , receiver */) { + var receiver = arguments.length < 4 ? target : arguments[3] + var ownDesc = gOPD.f(anObject(target), propertyKey) + var existingDescriptor, proto + if (!ownDesc) { + if (isObject(proto = getPrototypeOf(target))) { + return set(proto, propertyKey, V, receiver) + } + ownDesc = createDesc(0) + } + if (has(ownDesc, 'value')) { + if (ownDesc.writable === false || !isObject(receiver)) return false + if (existingDescriptor = gOPD.f(receiver, propertyKey)) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false + existingDescriptor.value = V + dP.f(receiver, propertyKey, existingDescriptor) + } else dP.f(receiver, propertyKey, createDesc(0, V)) + return true + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true) + } + + $export($export.S, 'Reflect', { set: set }) + }, { 16: 16, 40: 40, 47: 47, 57: 57, 75: 75, 77: 77, 81: 81, 92: 92 }], + 223: [function (_dereq_, module, exports) { + var global = _dereq_(46) + var inheritIfRequired = _dereq_(51) + var dP = _dereq_(75).f + var gOPN = _dereq_(79).f + var isRegExp = _dereq_(58) + var $flags = _dereq_(44) + var $RegExp = global.RegExp + var Base = $RegExp + var proto = $RegExp.prototype + var re1 = /a/g + var re2 = /a/g + // "new" creates a new object, old webkit buggy here + var CORRECT_NEW = new $RegExp(re1) !== re1 + + if (_dereq_(36) && (!CORRECT_NEW || _dereq_(42)(function () { + re2[_dereq_(128)('match')] = false + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i' + }))) { + $RegExp = function RegExp (p, f) { + var tiRE = this instanceof $RegExp + var piRE = isRegExp(p) + var fiU = f === undefined + return !tiRE && piRE && p.constructor === $RegExp && fiU ? p + : inheritIfRequired(CORRECT_NEW + ? new Base(piRE && !fiU ? p.source : p, f) + : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) + , tiRE ? this : proto, $RegExp) + } + var proxy = function (key) { + key in $RegExp || dP($RegExp, key, { + configurable: true, + get: function () { return Base[key] }, + set: function (it) { Base[key] = it } + }) + } + for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]) + proto.constructor = $RegExp + $RegExp.prototype = proto + _dereq_(94)(global, 'RegExp', $RegExp) + } + + _dereq_(99)('RegExp') + }, { 128: 128, 36: 36, 42: 42, 44: 44, 46: 46, 51: 51, 58: 58, 75: 75, 79: 79, 94: 94, 99: 99 }], + 224: [function (_dereq_, module, exports) { + 'use strict' + var regexpExec = _dereq_(96) + _dereq_(40)({ + target: 'RegExp', + proto: true, + forced: regexpExec !== /./.exec + }, { + exec: regexpExec + }) + }, { 40: 40, 96: 96 }], + 225: [function (_dereq_, module, exports) { + // 21.2.5.3 get RegExp.prototype.flags() + if (_dereq_(36) && /./g.flags != 'g') { + _dereq_(75).f(RegExp.prototype, 'flags', { + configurable: true, + get: _dereq_(44) + }) + } + }, { 36: 36, 44: 44, 75: 75 }], + 226: [function (_dereq_, module, exports) { + 'use strict' + + var anObject = _dereq_(16) + var toLength = _dereq_(117) + var advanceStringIndex = _dereq_(14) + var regExpExec = _dereq_(95) + + // @@match logic + _dereq_(43)('match', 1, function (defined, MATCH, $match, maybeCallNative) { + return [ + // `String.prototype.match` method + // https://tc39.github.io/ecma262/#sec-string.prototype.match + function match (regexp) { + var O = defined(this) + var fn = regexp == undefined ? undefined : regexp[MATCH] + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)) + }, + // `RegExp.prototype[@@match]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match + function (regexp) { + var res = maybeCallNative($match, regexp, this) + if (res.done) return res.value + var rx = anObject(regexp) + var S = String(this) + if (!rx.global) return regExpExec(rx, S) + var fullUnicode = rx.unicode + rx.lastIndex = 0 + var A = [] + var n = 0 + var result + while ((result = regExpExec(rx, S)) !== null) { + var matchStr = String(result[0]) + A[n] = matchStr + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode) + n++ + } + return n === 0 ? null : A + } + ] + }) + }, { 117: 117, 14: 14, 16: 16, 43: 43, 95: 95 }], + 227: [function (_dereq_, module, exports) { + 'use strict' + + var anObject = _dereq_(16) + var toObject = _dereq_(118) + var toLength = _dereq_(117) + var toInteger = _dereq_(115) + var advanceStringIndex = _dereq_(14) + var regExpExec = _dereq_(95) + var max = Math.max + var min = Math.min + var floor = Math.floor + var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g + var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g + + var maybeToString = function (it) { + return it === undefined ? it : String(it) + } + + // @@replace logic + _dereq_(43)('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { + return [ + // `String.prototype.replace` method + // https://tc39.github.io/ecma262/#sec-string.prototype.replace + function replace (searchValue, replaceValue) { + var O = defined(this) + var fn = searchValue == undefined ? undefined : searchValue[REPLACE] + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue) + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + var res = maybeCallNative($replace, regexp, this, replaceValue) + if (res.done) return res.value + + var rx = anObject(regexp) + var S = String(this) + var functionalReplace = typeof replaceValue === 'function' + if (!functionalReplace) replaceValue = String(replaceValue) + var global = rx.global + if (global) { + var fullUnicode = rx.unicode + rx.lastIndex = 0 + } + var results = [] + while (true) { + var result = regExpExec(rx, S) + if (result === null) break + results.push(result) + if (!global) break + var matchStr = String(result[0]) + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode) + } + var accumulatedResult = '' + var nextSourcePosition = 0 + for (var i = 0; i < results.length; i++) { + result = results[i] + var matched = String(result[0]) + var position = max(min(toInteger(result.index), S.length), 0) + var captures = [] + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])) + var namedCaptures = result.groups + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S) + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures) + var replacement = String(replaceValue.apply(undefined, replacerArgs)) + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue) + } + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement + nextSourcePosition = position + matched.length } } - if (result === reaction.promise) { - reject(TypeError('Promise-chain cycle')); - } else if (then = isThenable(result)) { - then.call(result, resolve, reject); - } else resolve(result); - } else reject(value); - } catch (e) { - if (domain && !exited) domain.exit(); - reject(e); - } - }; - while (chain.length > i) run(chain[i++]); // variable length - can't use forEach - promise._c = []; - promise._n = false; - if (isReject && !promise._h) onUnhandled(promise); - }); -}; -var onUnhandled = function (promise) { - task.call(global, function () { - var value = promise._v; - var unhandled = isUnhandled(promise); - var result, handler, console; - if (unhandled) { - result = perform(function () { - if (isNode) { - process.emit('unhandledRejection', value, promise); - } else if (handler = global.onunhandledrejection) { - handler({ promise: promise, reason: value }); - } else if ((console = global.console) && console.error) { - console.error('Unhandled promise rejection', value); + return accumulatedResult + S.slice(nextSourcePosition) } - }); - // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should - promise._h = isNode || isUnhandled(promise) ? 2 : 1; - } promise._a = undefined; - if (unhandled && result.e) throw result.v; - }); -}; -var isUnhandled = function (promise) { - return promise._h !== 1 && (promise._a || promise._c).length === 0; -}; -var onHandleUnhandled = function (promise) { - task.call(global, function () { - var handler; - if (isNode) { - process.emit('rejectionHandled', promise); - } else if (handler = global.onrejectionhandled) { - handler({ promise: promise, reason: promise._v }); - } - }); -}; -var $reject = function (value) { - var promise = this; - if (promise._d) return; - promise._d = true; - promise = promise._w || promise; // unwrap - promise._v = value; - promise._s = 2; - if (!promise._a) promise._a = promise._c.slice(); - notify(promise, true); -}; -var $resolve = function (value) { - var promise = this; - var then; - if (promise._d) return; - promise._d = true; - promise = promise._w || promise; // unwrap - try { - if (promise === value) throw TypeError("Promise can't be resolved itself"); - if (then = isThenable(value)) { - microtask(function () { - var wrapper = { _w: promise, _d: false }; // wrap - try { - then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); - } catch (e) { - $reject.call(wrapper, e); + ] + + // https://tc39.github.io/ecma262/#sec-getsubstitution + function getSubstitution (matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length + var m = captures.length + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures) + symbols = SUBSTITUTION_SYMBOLS } - }); - } else { - promise._v = value; - promise._s = 1; - notify(promise, false); - } - } catch (e) { - $reject.call({ _w: promise, _d: false }, e); // wrap - } -}; - -// constructor polyfill -if (!USE_NATIVE) { - // 25.4.3.1 Promise(executor) - $Promise = function Promise(executor) { - anInstance(this, $Promise, PROMISE, '_h'); - aFunction(executor); - Internal.call(this); - try { - executor(ctx($resolve, this, 1), ctx($reject, this, 1)); - } catch (err) { - $reject.call(this, err); - } - }; - // eslint-disable-next-line no-unused-vars - Internal = function Promise(executor) { - this._c = []; // <- awaiting reactions - this._a = undefined; // <- checked in isUnhandled reactions - this._s = 0; // <- state - this._d = false; // <- done - this._v = undefined; // <- value - this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled - this._n = false; // <- notify - }; - Internal.prototype = _dereq_(93)($Promise.prototype, { - // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) - then: function then(onFulfilled, onRejected) { - var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); - reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; - reaction.fail = typeof onRejected == 'function' && onRejected; - reaction.domain = isNode ? process.domain : undefined; - this._c.push(reaction); - if (this._a) this._a.push(reaction); - if (this._s) notify(this, false); - return reaction.promise; - }, - // 25.4.5.1 Promise.prototype.catch(onRejected) - 'catch': function (onRejected) { - return this.then(undefined, onRejected); - } - }); - OwnPromiseCapability = function () { - var promise = new Internal(); - this.promise = promise; - this.resolve = ctx($resolve, promise, 1); - this.reject = ctx($reject, promise, 1); - }; - newPromiseCapabilityModule.f = newPromiseCapability = function (C) { - return C === $Promise || C === Wrapper - ? new OwnPromiseCapability(C) - : newGenericPromiseCapability(C); - }; -} - -$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); -_dereq_(100)($Promise, PROMISE); -_dereq_(99)(PROMISE); -Wrapper = _dereq_(30)[PROMISE]; - -// statics -$export($export.S + $export.F * !USE_NATIVE, PROMISE, { - // 25.4.4.5 Promise.reject(r) - reject: function reject(r) { - var capability = newPromiseCapability(this); - var $$reject = capability.reject; - $$reject(r); - return capability.promise; - } -}); -$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { - // 25.4.4.6 Promise.resolve(x) - resolve: function resolve(x) { - return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); - } -}); -$export($export.S + $export.F * !(USE_NATIVE && _dereq_(62)(function (iter) { - $Promise.all(iter)['catch'](empty); -})), PROMISE, { - // 25.4.4.1 Promise.all(iterable) - all: function all(iterable) { - var C = this; - var capability = newPromiseCapability(C); - var resolve = capability.resolve; - var reject = capability.reject; - var result = perform(function () { - var values = []; - var index = 0; - var remaining = 1; - forOf(iterable, false, function (promise) { - var $index = index++; - var alreadyCalled = false; - values.push(undefined); - remaining++; - C.resolve(promise).then(function (value) { - if (alreadyCalled) return; - alreadyCalled = true; - values[$index] = value; - --remaining || resolve(values); - }, reject); - }); - --remaining || resolve(values); - }); - if (result.e) reject(result.v); - return capability.promise; - }, - // 25.4.4.4 Promise.race(iterable) - race: function race(iterable) { - var C = this; - var capability = newPromiseCapability(C); - var reject = capability.reject; - var result = perform(function () { - forOf(iterable, false, function (promise) { - C.resolve(promise).then(capability.resolve, reject); - }); - }); - if (result.e) reject(result.v); - return capability.promise; - } -}); - -},{"100":100,"103":103,"11":11,"112":112,"124":124,"128":128,"15":15,"25":25,"30":30,"32":32,"40":40,"45":45,"46":46,"57":57,"62":62,"65":65,"71":71,"72":72,"90":90,"91":91,"93":93,"99":99}],209:[function(_dereq_,module,exports){ -// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) -var $export = _dereq_(40); -var aFunction = _dereq_(11); -var anObject = _dereq_(16); -var rApply = (_dereq_(46).Reflect || {}).apply; -var fApply = Function.apply; -// MS Edge argumentsList argument is optional -$export($export.S + $export.F * !_dereq_(42)(function () { - rApply(function () { /* empty */ }); -}), 'Reflect', { - apply: function apply(target, thisArgument, argumentsList) { - var T = aFunction(target); - var L = anObject(argumentsList); - return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); - } -}); - -},{"11":11,"16":16,"40":40,"42":42,"46":46}],210:[function(_dereq_,module,exports){ -// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) -var $export = _dereq_(40); -var create = _dereq_(74); -var aFunction = _dereq_(11); -var anObject = _dereq_(16); -var isObject = _dereq_(57); -var fails = _dereq_(42); -var bind = _dereq_(24); -var rConstruct = (_dereq_(46).Reflect || {}).construct; - -// MS Edge supports only 2 arguments and argumentsList argument is optional -// FF Nightly sets third argument as `new.target`, but does not create `this` from it -var NEW_TARGET_BUG = fails(function () { - function F() { /* empty */ } - return !(rConstruct(function () { /* empty */ }, [], F) instanceof F); -}); -var ARGS_BUG = !fails(function () { - rConstruct(function () { /* empty */ }); -}); - -$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { - construct: function construct(Target, args /* , newTarget */) { - aFunction(Target); - anObject(args); - var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); - if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); - if (Target == newTarget) { - // w/o altered newTarget, optimization for 0-4 arguments - switch (args.length) { - case 0: return new Target(); - case 1: return new Target(args[0]); - case 2: return new Target(args[0], args[1]); - case 3: return new Target(args[0], args[1], args[2]); - case 4: return new Target(args[0], args[1], args[2], args[3]); - } - // w/o altered newTarget, lot of arguments case - var $args = [null]; - $args.push.apply($args, args); - return new (bind.apply(Target, $args))(); - } - // with altered newTarget, not support built-in constructors - var proto = newTarget.prototype; - var instance = create(isObject(proto) ? proto : Object.prototype); - var result = Function.apply.call(Target, instance, args); - return isObject(result) ? result : instance; - } -}); - -},{"11":11,"16":16,"24":24,"40":40,"42":42,"46":46,"57":57,"74":74}],211:[function(_dereq_,module,exports){ -// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) -var dP = _dereq_(75); -var $export = _dereq_(40); -var anObject = _dereq_(16); -var toPrimitive = _dereq_(119); - -// MS Edge has broken Reflect.defineProperty - throwing instead of returning false -$export($export.S + $export.F * _dereq_(42)(function () { - // eslint-disable-next-line no-undef - Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); -}), 'Reflect', { - defineProperty: function defineProperty(target, propertyKey, attributes) { - anObject(target); - propertyKey = toPrimitive(propertyKey, true); - anObject(attributes); - try { - dP.f(target, propertyKey, attributes); - return true; - } catch (e) { - return false; - } - } -}); - -},{"119":119,"16":16,"40":40,"42":42,"75":75}],212:[function(_dereq_,module,exports){ -// 26.1.4 Reflect.deleteProperty(target, propertyKey) -var $export = _dereq_(40); -var gOPD = _dereq_(77).f; -var anObject = _dereq_(16); - -$export($export.S, 'Reflect', { - deleteProperty: function deleteProperty(target, propertyKey) { - var desc = gOPD(anObject(target), propertyKey); - return desc && !desc.configurable ? false : delete target[propertyKey]; - } -}); - -},{"16":16,"40":40,"77":77}],213:[function(_dereq_,module,exports){ -'use strict'; -// 26.1.5 Reflect.enumerate(target) -var $export = _dereq_(40); -var anObject = _dereq_(16); -var Enumerate = function (iterated) { - this._t = anObject(iterated); // target - this._i = 0; // next index - var keys = this._k = []; // keys - var key; - for (key in iterated) keys.push(key); -}; -_dereq_(60)(Enumerate, 'Object', function () { - var that = this; - var keys = that._k; - var key; - do { - if (that._i >= keys.length) return { value: undefined, done: true }; - } while (!((key = keys[that._i++]) in that._t)); - return { value: key, done: false }; -}); - -$export($export.S, 'Reflect', { - enumerate: function enumerate(target) { - return new Enumerate(target); - } -}); - -},{"16":16,"40":40,"60":60}],214:[function(_dereq_,module,exports){ -// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) -var gOPD = _dereq_(77); -var $export = _dereq_(40); -var anObject = _dereq_(16); - -$export($export.S, 'Reflect', { - getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { - return gOPD.f(anObject(target), propertyKey); - } -}); - -},{"16":16,"40":40,"77":77}],215:[function(_dereq_,module,exports){ -// 26.1.8 Reflect.getPrototypeOf(target) -var $export = _dereq_(40); -var getProto = _dereq_(81); -var anObject = _dereq_(16); - -$export($export.S, 'Reflect', { - getPrototypeOf: function getPrototypeOf(target) { - return getProto(anObject(target)); - } -}); - -},{"16":16,"40":40,"81":81}],216:[function(_dereq_,module,exports){ -// 26.1.6 Reflect.get(target, propertyKey [, receiver]) -var gOPD = _dereq_(77); -var getPrototypeOf = _dereq_(81); -var has = _dereq_(47); -var $export = _dereq_(40); -var isObject = _dereq_(57); -var anObject = _dereq_(16); - -function get(target, propertyKey /* , receiver */) { - var receiver = arguments.length < 3 ? target : arguments[2]; - var desc, proto; - if (anObject(target) === receiver) return target[propertyKey]; - if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value') - ? desc.value - : desc.get !== undefined - ? desc.get.call(receiver) - : undefined; - if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver); -} - -$export($export.S, 'Reflect', { get: get }); - -},{"16":16,"40":40,"47":47,"57":57,"77":77,"81":81}],217:[function(_dereq_,module,exports){ -// 26.1.9 Reflect.has(target, propertyKey) -var $export = _dereq_(40); - -$export($export.S, 'Reflect', { - has: function has(target, propertyKey) { - return propertyKey in target; - } -}); - -},{"40":40}],218:[function(_dereq_,module,exports){ -// 26.1.10 Reflect.isExtensible(target) -var $export = _dereq_(40); -var anObject = _dereq_(16); -var $isExtensible = Object.isExtensible; - -$export($export.S, 'Reflect', { - isExtensible: function isExtensible(target) { - anObject(target); - return $isExtensible ? $isExtensible(target) : true; - } -}); - -},{"16":16,"40":40}],219:[function(_dereq_,module,exports){ -// 26.1.11 Reflect.ownKeys(target) -var $export = _dereq_(40); - -$export($export.S, 'Reflect', { ownKeys: _dereq_(87) }); - -},{"40":40,"87":87}],220:[function(_dereq_,module,exports){ -// 26.1.12 Reflect.preventExtensions(target) -var $export = _dereq_(40); -var anObject = _dereq_(16); -var $preventExtensions = Object.preventExtensions; - -$export($export.S, 'Reflect', { - preventExtensions: function preventExtensions(target) { - anObject(target); - try { - if ($preventExtensions) $preventExtensions(target); - return true; - } catch (e) { - return false; - } - } -}); - -},{"16":16,"40":40}],221:[function(_dereq_,module,exports){ -// 26.1.14 Reflect.setPrototypeOf(target, proto) -var $export = _dereq_(40); -var setProto = _dereq_(98); - -if (setProto) $export($export.S, 'Reflect', { - setPrototypeOf: function setPrototypeOf(target, proto) { - setProto.check(target, proto); - try { - setProto.set(target, proto); - return true; - } catch (e) { - return false; - } - } -}); - -},{"40":40,"98":98}],222:[function(_dereq_,module,exports){ -// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) -var dP = _dereq_(75); -var gOPD = _dereq_(77); -var getPrototypeOf = _dereq_(81); -var has = _dereq_(47); -var $export = _dereq_(40); -var createDesc = _dereq_(92); -var anObject = _dereq_(16); -var isObject = _dereq_(57); - -function set(target, propertyKey, V /* , receiver */) { - var receiver = arguments.length < 4 ? target : arguments[3]; - var ownDesc = gOPD.f(anObject(target), propertyKey); - var existingDescriptor, proto; - if (!ownDesc) { - if (isObject(proto = getPrototypeOf(target))) { - return set(proto, propertyKey, V, receiver); - } - ownDesc = createDesc(0); - } - if (has(ownDesc, 'value')) { - if (ownDesc.writable === false || !isObject(receiver)) return false; - if (existingDescriptor = gOPD.f(receiver, propertyKey)) { - if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; - existingDescriptor.value = V; - dP.f(receiver, propertyKey, existingDescriptor); - } else dP.f(receiver, propertyKey, createDesc(0, V)); - return true; - } - return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); -} - -$export($export.S, 'Reflect', { set: set }); - -},{"16":16,"40":40,"47":47,"57":57,"75":75,"77":77,"81":81,"92":92}],223:[function(_dereq_,module,exports){ -var global = _dereq_(46); -var inheritIfRequired = _dereq_(51); -var dP = _dereq_(75).f; -var gOPN = _dereq_(79).f; -var isRegExp = _dereq_(58); -var $flags = _dereq_(44); -var $RegExp = global.RegExp; -var Base = $RegExp; -var proto = $RegExp.prototype; -var re1 = /a/g; -var re2 = /a/g; -// "new" creates a new object, old webkit buggy here -var CORRECT_NEW = new $RegExp(re1) !== re1; - -if (_dereq_(36) && (!CORRECT_NEW || _dereq_(42)(function () { - re2[_dereq_(128)('match')] = false; - // RegExp constructor can alter flags and IsRegExp works correct with @@match - return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; -}))) { - $RegExp = function RegExp(p, f) { - var tiRE = this instanceof $RegExp; - var piRE = isRegExp(p); - var fiU = f === undefined; - return !tiRE && piRE && p.constructor === $RegExp && fiU ? p - : inheritIfRequired(CORRECT_NEW - ? new Base(piRE && !fiU ? p.source : p, f) - : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) - , tiRE ? this : proto, $RegExp); - }; - var proxy = function (key) { - key in $RegExp || dP($RegExp, key, { - configurable: true, - get: function () { return Base[key]; }, - set: function (it) { Base[key] = it; } - }); - }; - for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]); - proto.constructor = $RegExp; - $RegExp.prototype = proto; - _dereq_(94)(global, 'RegExp', $RegExp); -} - -_dereq_(99)('RegExp'); - -},{"128":128,"36":36,"42":42,"44":44,"46":46,"51":51,"58":58,"75":75,"79":79,"94":94,"99":99}],224:[function(_dereq_,module,exports){ -'use strict'; -var regexpExec = _dereq_(96); -_dereq_(40)({ - target: 'RegExp', - proto: true, - forced: regexpExec !== /./.exec -}, { - exec: regexpExec -}); - -},{"40":40,"96":96}],225:[function(_dereq_,module,exports){ -// 21.2.5.3 get RegExp.prototype.flags() -if (_dereq_(36) && /./g.flags != 'g') _dereq_(75).f(RegExp.prototype, 'flags', { - configurable: true, - get: _dereq_(44) -}); - -},{"36":36,"44":44,"75":75}],226:[function(_dereq_,module,exports){ -'use strict'; - -var anObject = _dereq_(16); -var toLength = _dereq_(117); -var advanceStringIndex = _dereq_(14); -var regExpExec = _dereq_(95); - -// @@match logic -_dereq_(43)('match', 1, function (defined, MATCH, $match, maybeCallNative) { - return [ - // `String.prototype.match` method - // https://tc39.github.io/ecma262/#sec-string.prototype.match - function match(regexp) { - var O = defined(this); - var fn = regexp == undefined ? undefined : regexp[MATCH]; - return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); - }, - // `RegExp.prototype[@@match]` method - // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match - function (regexp) { - var res = maybeCallNative($match, regexp, this); - if (res.done) return res.value; - var rx = anObject(regexp); - var S = String(this); - if (!rx.global) return regExpExec(rx, S); - var fullUnicode = rx.unicode; - rx.lastIndex = 0; - var A = []; - var n = 0; - var result; - while ((result = regExpExec(rx, S)) !== null) { - var matchStr = String(result[0]); - A[n] = matchStr; - if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); - n++; - } - return n === 0 ? null : A; - } - ]; -}); - -},{"117":117,"14":14,"16":16,"43":43,"95":95}],227:[function(_dereq_,module,exports){ -'use strict'; - -var anObject = _dereq_(16); -var toObject = _dereq_(118); -var toLength = _dereq_(117); -var toInteger = _dereq_(115); -var advanceStringIndex = _dereq_(14); -var regExpExec = _dereq_(95); -var max = Math.max; -var min = Math.min; -var floor = Math.floor; -var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; -var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; - -var maybeToString = function (it) { - return it === undefined ? it : String(it); -}; - -// @@replace logic -_dereq_(43)('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { - return [ - // `String.prototype.replace` method - // https://tc39.github.io/ecma262/#sec-string.prototype.replace - function replace(searchValue, replaceValue) { - var O = defined(this); - var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; - return fn !== undefined - ? fn.call(searchValue, O, replaceValue) - : $replace.call(String(O), searchValue, replaceValue); - }, - // `RegExp.prototype[@@replace]` method - // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace - function (regexp, replaceValue) { - var res = maybeCallNative($replace, regexp, this, replaceValue); - if (res.done) return res.value; - - var rx = anObject(regexp); - var S = String(this); - var functionalReplace = typeof replaceValue === 'function'; - if (!functionalReplace) replaceValue = String(replaceValue); - var global = rx.global; - if (global) { - var fullUnicode = rx.unicode; - rx.lastIndex = 0; - } - var results = []; - while (true) { - var result = regExpExec(rx, S); - if (result === null) break; - results.push(result); - if (!global) break; - var matchStr = String(result[0]); - if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); - } - var accumulatedResult = ''; - var nextSourcePosition = 0; - for (var i = 0; i < results.length; i++) { - result = results[i]; - var matched = String(result[0]); - var position = max(min(toInteger(result.index), S.length), 0); - var captures = []; - // NOTE: This is equivalent to - // captures = result.slice(1).map(maybeToString) - // but for some reason `nativeSlice.call(result, 1, result.length)` (called in - // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and - // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. - for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); - var namedCaptures = result.groups; - if (functionalReplace) { - var replacerArgs = [matched].concat(captures, position, S); - if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); - var replacement = String(replaceValue.apply(undefined, replacerArgs)); - } else { - replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); - } - if (position >= nextSourcePosition) { - accumulatedResult += S.slice(nextSourcePosition, position) + replacement; - nextSourcePosition = position + matched.length; - } - } - return accumulatedResult + S.slice(nextSourcePosition); - } - ]; - - // https://tc39.github.io/ecma262/#sec-getsubstitution - function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { - var tailPos = position + matched.length; - var m = captures.length; - var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; - if (namedCaptures !== undefined) { - namedCaptures = toObject(namedCaptures); - symbols = SUBSTITUTION_SYMBOLS; - } - return $replace.call(replacement, symbols, function (match, ch) { - var capture; - switch (ch.charAt(0)) { - case '$': return '$'; - case '&': return matched; - case '`': return str.slice(0, position); - case "'": return str.slice(tailPos); - case '<': - capture = namedCaptures[ch.slice(1, -1)]; - break; - default: // \d\d? - var n = +ch; - if (n === 0) return ch; - if (n > m) { - var f = floor(n / 10); - if (f === 0) return ch; - if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); - return ch; + return $replace.call(replacement, symbols, function (match, ch) { + var capture + switch (ch.charAt(0)) { + case '$': return '$' + case '&': return matched + case '`': return str.slice(0, position) + case "'": return str.slice(tailPos) + case '<': + capture = namedCaptures[ch.slice(1, -1)] + break + default: // \d\d? + var n = +ch + if (n === 0) return ch + if (n > m) { + var f = floor(n / 10) + if (f === 0) return ch + if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1) + return ch + } + capture = captures[n - 1] } - capture = captures[n - 1]; + return capture === undefined ? '' : capture + }) } - return capture === undefined ? '' : capture; - }); - } -}); + }) + }, { 115: 115, 117: 117, 118: 118, 14: 14, 16: 16, 43: 43, 95: 95 }], + 228: [function (_dereq_, module, exports) { + 'use strict' -},{"115":115,"117":117,"118":118,"14":14,"16":16,"43":43,"95":95}],228:[function(_dereq_,module,exports){ -'use strict'; + var anObject = _dereq_(16) + var sameValue = _dereq_(97) + var regExpExec = _dereq_(95) -var anObject = _dereq_(16); -var sameValue = _dereq_(97); -var regExpExec = _dereq_(95); + // @@search logic + _dereq_(43)('search', 1, function (defined, SEARCH, $search, maybeCallNative) { + return [ + // `String.prototype.search` method + // https://tc39.github.io/ecma262/#sec-string.prototype.search + function search (regexp) { + var O = defined(this) + var fn = regexp == undefined ? undefined : regexp[SEARCH] + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)) + }, + // `RegExp.prototype[@@search]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search + function (regexp) { + var res = maybeCallNative($search, regexp, this) + if (res.done) return res.value + var rx = anObject(regexp) + var S = String(this) + var previousLastIndex = rx.lastIndex + if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0 + var result = regExpExec(rx, S) + if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex + return result === null ? -1 : result.index + } + ] + }) + }, { 16: 16, 43: 43, 95: 95, 97: 97 }], + 229: [function (_dereq_, module, exports) { + 'use strict' -// @@search logic -_dereq_(43)('search', 1, function (defined, SEARCH, $search, maybeCallNative) { - return [ - // `String.prototype.search` method - // https://tc39.github.io/ecma262/#sec-string.prototype.search - function search(regexp) { - var O = defined(this); - var fn = regexp == undefined ? undefined : regexp[SEARCH]; - return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); - }, - // `RegExp.prototype[@@search]` method - // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search - function (regexp) { - var res = maybeCallNative($search, regexp, this); - if (res.done) return res.value; - var rx = anObject(regexp); - var S = String(this); - var previousLastIndex = rx.lastIndex; - if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; - var result = regExpExec(rx, S); - if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; - return result === null ? -1 : result.index; - } - ]; -}); + var isRegExp = _dereq_(58) + var anObject = _dereq_(16) + var speciesConstructor = _dereq_(103) + var advanceStringIndex = _dereq_(14) + var toLength = _dereq_(117) + var callRegExpExec = _dereq_(95) + var regexpExec = _dereq_(96) + var $min = Math.min + var $push = [].push + var $SPLIT = 'split' + var LENGTH = 'length' + var LAST_INDEX = 'lastIndex' -},{"16":16,"43":43,"95":95,"97":97}],229:[function(_dereq_,module,exports){ -'use strict'; + // eslint-disable-next-line no-empty + var SUPPORTS_Y = !!(function () { try { return new RegExp('x', 'y') } catch (e) {} })() -var isRegExp = _dereq_(58); -var anObject = _dereq_(16); -var speciesConstructor = _dereq_(103); -var advanceStringIndex = _dereq_(14); -var toLength = _dereq_(117); -var callRegExpExec = _dereq_(95); -var regexpExec = _dereq_(96); -var $min = Math.min; -var $push = [].push; -var $SPLIT = 'split'; -var LENGTH = 'length'; -var LAST_INDEX = 'lastIndex'; - -// eslint-disable-next-line no-empty -var SUPPORTS_Y = !!(function () { try { return new RegExp('x', 'y'); } catch (e) {} })(); - -// @@split logic -_dereq_(43)('split', 2, function (defined, SPLIT, $split, maybeCallNative) { - var internalSplit; - if ( - 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + // @@split logic + _dereq_(43)('split', 2, function (defined, SPLIT, $split, maybeCallNative) { + var internalSplit + if ( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || '.'[$SPLIT](/()()/)[LENGTH] > 1 || ''[$SPLIT](/.?/)[LENGTH] - ) { - // based on es5-shim implementation, need to rework it - internalSplit = function (separator, limit) { - var string = String(this); - if (separator === undefined && limit === 0) return []; - // If `separator` is not a regex, use native split - if (!isRegExp(separator)) return $split.call(string, separator, limit); - var output = []; - var flags = (separator.ignoreCase ? 'i' : '') + + ) { + // based on es5-shim implementation, need to rework it + internalSplit = function (separator, limit) { + var string = String(this) + if (separator === undefined && limit === 0) return [] + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) return $split.call(string, separator, limit) + var output = [] + var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + - (separator.sticky ? 'y' : ''); - var lastLastIndex = 0; - var splitLimit = limit === undefined ? 4294967295 : limit >>> 0; - // Make `global` and avoid `lastIndex` issues by working with a copy - var separatorCopy = new RegExp(separator.source, flags + 'g'); - var match, lastIndex, lastLength; - while (match = regexpExec.call(separatorCopy, string)) { - lastIndex = separatorCopy[LAST_INDEX]; - if (lastIndex > lastLastIndex) { - output.push(string.slice(lastLastIndex, match.index)); - if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); - lastLength = match[0][LENGTH]; - lastLastIndex = lastIndex; - if (output[LENGTH] >= splitLimit) break; + (separator.sticky ? 'y' : '') + var lastLastIndex = 0 + var splitLimit = limit === undefined ? 4294967295 : limit >>> 0 + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g') + var match, lastIndex, lastLength + while (match = regexpExec.call(separatorCopy, string)) { + lastIndex = separatorCopy[LAST_INDEX] + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)) + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)) + lastLength = match[0][LENGTH] + lastLastIndex = lastIndex + if (output[LENGTH] >= splitLimit) break + } + if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++ // Avoid an infinite loop + } + if (lastLastIndex === string[LENGTH]) { + if (lastLength || !separatorCopy.test('')) output.push('') + } else output.push(string.slice(lastLastIndex)) + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output } - if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop + // Chakra, V8 + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit) + } + } else { + internalSplit = $split } - if (lastLastIndex === string[LENGTH]) { - if (lastLength || !separatorCopy.test('')) output.push(''); - } else output.push(string.slice(lastLastIndex)); - return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; - }; - // Chakra, V8 - } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { - internalSplit = function (separator, limit) { - return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); - }; - } else { - internalSplit = $split; - } - return [ - // `String.prototype.split` method - // https://tc39.github.io/ecma262/#sec-string.prototype.split - function split(separator, limit) { - var O = defined(this); - var splitter = separator == undefined ? undefined : separator[SPLIT]; - return splitter !== undefined - ? splitter.call(separator, O, limit) - : internalSplit.call(String(O), separator, limit); - }, - // `RegExp.prototype[@@split]` method - // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split - // - // NOTE: This cannot be properly polyfilled in engines that don't support - // the 'y' flag. - function (regexp, limit) { - var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); - if (res.done) return res.value; + return [ + // `String.prototype.split` method + // https://tc39.github.io/ecma262/#sec-string.prototype.split + function split (separator, limit) { + var O = defined(this) + var splitter = separator == undefined ? undefined : separator[SPLIT] + return splitter !== undefined + ? splitter.call(separator, O, limit) + : internalSplit.call(String(O), separator, limit) + }, + // `RegExp.prototype[@@split]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split) + if (res.done) return res.value - var rx = anObject(regexp); - var S = String(this); - var C = speciesConstructor(rx, RegExp); + var rx = anObject(regexp) + var S = String(this) + var C = speciesConstructor(rx, RegExp) - var unicodeMatching = rx.unicode; - var flags = (rx.ignoreCase ? 'i' : '') + + var unicodeMatching = rx.unicode + var flags = (rx.ignoreCase ? 'i' : '') + (rx.multiline ? 'm' : '') + (rx.unicode ? 'u' : '') + - (SUPPORTS_Y ? 'y' : 'g'); + (SUPPORTS_Y ? 'y' : 'g') - // ^(? + rx + ) is needed, in combination with some S slicing, to - // simulate the 'y' flag. - var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); - var lim = limit === undefined ? 0xffffffff : limit >>> 0; - if (lim === 0) return []; - if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; - var p = 0; - var q = 0; - var A = []; - while (q < S.length) { - splitter.lastIndex = SUPPORTS_Y ? q : 0; - var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); - var e; - if ( - z === null || + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags) + var lim = limit === undefined ? 0xffffffff : limit >>> 0 + if (lim === 0) return [] + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [] + var p = 0 + var q = 0 + var A = [] + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0 + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)) + var e + if ( + z === null || (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p - ) { - q = advanceStringIndex(S, q, unicodeMatching); - } else { - A.push(S.slice(p, q)); - if (A.length === lim) return A; - for (var i = 1; i <= z.length - 1; i++) { - A.push(z[i]); - if (A.length === lim) return A; + ) { + q = advanceStringIndex(S, q, unicodeMatching) + } else { + A.push(S.slice(p, q)) + if (A.length === lim) return A + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]) + if (A.length === lim) return A + } + q = p = e + } } - q = p = e; + A.push(S.slice(p)) + return A } + ] + }) + }, { 103: 103, 117: 117, 14: 14, 16: 16, 43: 43, 58: 58, 95: 95, 96: 96 }], + 230: [function (_dereq_, module, exports) { + 'use strict' + _dereq_(225) + var anObject = _dereq_(16) + var $flags = _dereq_(44) + var DESCRIPTORS = _dereq_(36) + var TO_STRING = 'toString' + var $toString = /./[TO_STRING] + + var define = function (fn) { + _dereq_(94)(RegExp.prototype, TO_STRING, fn, true) + } + + // 21.2.5.14 RegExp.prototype.toString() + if (_dereq_(42)(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b' })) { + define(function toString () { + var R = anObject(this) + return '/'.concat(R.source, '/', + 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined) + }) + // FF44- RegExp#toString has a wrong name + } else if ($toString.name != TO_STRING) { + define(function toString () { + return $toString.call(this) + }) + } + }, { 16: 16, 225: 225, 36: 36, 42: 42, 44: 44, 94: 94 }], + 231: [function (_dereq_, module, exports) { + 'use strict' + var strong = _dereq_(27) + var validate = _dereq_(125) + var SET = 'Set' + + // 23.2 Set Objects + module.exports = _dereq_(29)(SET, function (get) { + return function Set () { return get(this, arguments.length > 0 ? arguments[0] : undefined) } + }, { + // 23.2.3.1 Set.prototype.add(value) + add: function add (value) { + return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value) } - A.push(S.slice(p)); - return A; + }, strong) + }, { 125: 125, 27: 27, 29: 29 }], + 232: [function (_dereq_, module, exports) { + 'use strict' + // B.2.3.2 String.prototype.anchor(name) + _dereq_(107)('anchor', function (createHTML) { + return function anchor (name) { + return createHTML(this, 'a', 'name', name) + } + }) + }, { 107: 107 }], + 233: [function (_dereq_, module, exports) { + 'use strict' + // B.2.3.3 String.prototype.big() + _dereq_(107)('big', function (createHTML) { + return function big () { + return createHTML(this, 'big', '', '') + } + }) + }, { 107: 107 }], + 234: [function (_dereq_, module, exports) { + 'use strict' + // B.2.3.4 String.prototype.blink() + _dereq_(107)('blink', function (createHTML) { + return function blink () { + return createHTML(this, 'blink', '', '') + } + }) + }, { 107: 107 }], + 235: [function (_dereq_, module, exports) { + 'use strict' + // B.2.3.5 String.prototype.bold() + _dereq_(107)('bold', function (createHTML) { + return function bold () { + return createHTML(this, 'b', '', '') + } + }) + }, { 107: 107 }], + 236: [function (_dereq_, module, exports) { + 'use strict' + var $export = _dereq_(40) + var $at = _dereq_(105)(false) + $export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt (pos) { + return $at(this, pos) + } + }) + }, { 105: 105, 40: 40 }], + 237: [function (_dereq_, module, exports) { + // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) + 'use strict' + var $export = _dereq_(40) + var toLength = _dereq_(117) + var context = _dereq_(106) + var ENDS_WITH = 'endsWith' + var $endsWith = ''[ENDS_WITH] + + $export($export.P + $export.F * _dereq_(41)(ENDS_WITH), 'String', { + endsWith: function endsWith (searchString /* , endPosition = @length */) { + var that = context(this, searchString, ENDS_WITH) + var endPosition = arguments.length > 1 ? arguments[1] : undefined + var len = toLength(that.length) + var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len) + var search = String(searchString) + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search + } + }) + }, { 106: 106, 117: 117, 40: 40, 41: 41 }], + 238: [function (_dereq_, module, exports) { + 'use strict' + // B.2.3.6 String.prototype.fixed() + _dereq_(107)('fixed', function (createHTML) { + return function fixed () { + return createHTML(this, 'tt', '', '') + } + }) + }, { 107: 107 }], + 239: [function (_dereq_, module, exports) { + 'use strict' + // B.2.3.7 String.prototype.fontcolor(color) + _dereq_(107)('fontcolor', function (createHTML) { + return function fontcolor (color) { + return createHTML(this, 'font', 'color', color) + } + }) + }, { 107: 107 }], + 240: [function (_dereq_, module, exports) { + 'use strict' + // B.2.3.8 String.prototype.fontsize(size) + _dereq_(107)('fontsize', function (createHTML) { + return function fontsize (size) { + return createHTML(this, 'font', 'size', size) + } + }) + }, { 107: 107 }], + 241: [function (_dereq_, module, exports) { + var $export = _dereq_(40) + var toAbsoluteIndex = _dereq_(113) + var fromCharCode = String.fromCharCode + var $fromCodePoint = String.fromCodePoint + + // length should be 1, old FF problem + $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint (x) { // eslint-disable-line no-unused-vars + var res = [] + var aLen = arguments.length + var i = 0 + var code + while (aLen > i) { + code = +arguments[i++] + if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point') + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ) + } return res.join('') + } + }) + }, { 113: 113, 40: 40 }], + 242: [function (_dereq_, module, exports) { + // 21.1.3.7 String.prototype.includes(searchString, position = 0) + 'use strict' + var $export = _dereq_(40) + var context = _dereq_(106) + var INCLUDES = 'includes' + + $export($export.P + $export.F * _dereq_(41)(INCLUDES), 'String', { + includes: function includes (searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined) + } + }) + }, { 106: 106, 40: 40, 41: 41 }], + 243: [function (_dereq_, module, exports) { + 'use strict' + // B.2.3.9 String.prototype.italics() + _dereq_(107)('italics', function (createHTML) { + return function italics () { + return createHTML(this, 'i', '', '') + } + }) + }, { 107: 107 }], + 244: [function (_dereq_, module, exports) { + 'use strict' + var $at = _dereq_(105)(true) + + // 21.1.3.27 String.prototype[@@iterator]() + _dereq_(61)(String, 'String', function (iterated) { + this._t = String(iterated) // target + this._i = 0 // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, function () { + var O = this._t + var index = this._i + var point + if (index >= O.length) return { value: undefined, done: true } + point = $at(O, index) + this._i += point.length + return { value: point, done: false } + }) + }, { 105: 105, 61: 61 }], + 245: [function (_dereq_, module, exports) { + 'use strict' + // B.2.3.10 String.prototype.link(url) + _dereq_(107)('link', function (createHTML) { + return function link (url) { + return createHTML(this, 'a', 'href', url) + } + }) + }, { 107: 107 }], + 246: [function (_dereq_, module, exports) { + var $export = _dereq_(40) + var toIObject = _dereq_(116) + var toLength = _dereq_(117) + + $export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw (callSite) { + var tpl = toIObject(callSite.raw) + var len = toLength(tpl.length) + var aLen = arguments.length + var res = [] + var i = 0 + while (len > i) { + res.push(String(tpl[i++])) + if (i < aLen) res.push(String(arguments[i])) + } return res.join('') + } + }) + }, { 116: 116, 117: 117, 40: 40 }], + 247: [function (_dereq_, module, exports) { + var $export = _dereq_(40) + + $export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: _dereq_(109) + }) + }, { 109: 109, 40: 40 }], + 248: [function (_dereq_, module, exports) { + 'use strict' + // B.2.3.11 String.prototype.small() + _dereq_(107)('small', function (createHTML) { + return function small () { + return createHTML(this, 'small', '', '') + } + }) + }, { 107: 107 }], + 249: [function (_dereq_, module, exports) { + // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) + 'use strict' + var $export = _dereq_(40) + var toLength = _dereq_(117) + var context = _dereq_(106) + var STARTS_WITH = 'startsWith' + var $startsWith = ''[STARTS_WITH] + + $export($export.P + $export.F * _dereq_(41)(STARTS_WITH), 'String', { + startsWith: function startsWith (searchString /* , position = 0 */) { + var that = context(this, searchString, STARTS_WITH) + var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)) + var search = String(searchString) + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search + } + }) + }, { 106: 106, 117: 117, 40: 40, 41: 41 }], + 250: [function (_dereq_, module, exports) { + 'use strict' + // B.2.3.12 String.prototype.strike() + _dereq_(107)('strike', function (createHTML) { + return function strike () { + return createHTML(this, 'strike', '', '') + } + }) + }, { 107: 107 }], + 251: [function (_dereq_, module, exports) { + 'use strict' + // B.2.3.13 String.prototype.sub() + _dereq_(107)('sub', function (createHTML) { + return function sub () { + return createHTML(this, 'sub', '', '') + } + }) + }, { 107: 107 }], + 252: [function (_dereq_, module, exports) { + 'use strict' + // B.2.3.14 String.prototype.sup() + _dereq_(107)('sup', function (createHTML) { + return function sup () { + return createHTML(this, 'sup', '', '') + } + }) + }, { 107: 107 }], + 253: [function (_dereq_, module, exports) { + 'use strict' + // 21.1.3.25 String.prototype.trim() + _dereq_(110)('trim', function ($trim) { + return function trim () { + return $trim(this, 3) + } + }) + }, { 110: 110 }], + 254: [function (_dereq_, module, exports) { + 'use strict' + // ECMAScript 6 symbols shim + var global = _dereq_(46) + var has = _dereq_(47) + var DESCRIPTORS = _dereq_(36) + var $export = _dereq_(40) + var redefine = _dereq_(94) + var META = _dereq_(70).KEY + var $fails = _dereq_(42) + var shared = _dereq_(102) + var setToStringTag = _dereq_(100) + var uid = _dereq_(123) + var wks = _dereq_(128) + var wksExt = _dereq_(127) + var wksDefine = _dereq_(126) + var enumKeys = _dereq_(39) + var isArray = _dereq_(55) + var anObject = _dereq_(16) + var isObject = _dereq_(57) + var toIObject = _dereq_(116) + var toPrimitive = _dereq_(119) + var createDesc = _dereq_(92) + var _create = _dereq_(74) + var gOPNExt = _dereq_(78) + var $GOPD = _dereq_(77) + var $DP = _dereq_(75) + var $keys = _dereq_(83) + var gOPD = $GOPD.f + var dP = $DP.f + var gOPN = gOPNExt.f + var $Symbol = global.Symbol + var $JSON = global.JSON + var _stringify = $JSON && $JSON.stringify + var PROTOTYPE = 'prototype' + var HIDDEN = wks('_hidden') + var TO_PRIMITIVE = wks('toPrimitive') + var isEnum = {}.propertyIsEnumerable + var SymbolRegistry = shared('symbol-registry') + var AllSymbols = shared('symbols') + var OPSymbols = shared('op-symbols') + var ObjectProto = Object[PROTOTYPE] + var USE_NATIVE = typeof $Symbol === 'function' + var QObject = global.QObject + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = DESCRIPTORS && $fails(function () { + return _create(dP({}, 'a', { + get: function () { return dP(this, 'a', { value: 7 }).a } + })).a != 7 + }) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key) + if (protoDesc) delete ObjectProto[key] + dP(it, key, D) + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc) + } : dP + + var wrap = function (tag) { + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]) + sym._k = tag + return sym } - ]; -}); -},{"103":103,"117":117,"14":14,"16":16,"43":43,"58":58,"95":95,"96":96}],230:[function(_dereq_,module,exports){ -'use strict'; -_dereq_(225); -var anObject = _dereq_(16); -var $flags = _dereq_(44); -var DESCRIPTORS = _dereq_(36); -var TO_STRING = 'toString'; -var $toString = /./[TO_STRING]; - -var define = function (fn) { - _dereq_(94)(RegExp.prototype, TO_STRING, fn, true); -}; - -// 21.2.5.14 RegExp.prototype.toString() -if (_dereq_(42)(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) { - define(function toString() { - var R = anObject(this); - return '/'.concat(R.source, '/', - 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); - }); -// FF44- RegExp#toString has a wrong name -} else if ($toString.name != TO_STRING) { - define(function toString() { - return $toString.call(this); - }); -} - -},{"16":16,"225":225,"36":36,"42":42,"44":44,"94":94}],231:[function(_dereq_,module,exports){ -'use strict'; -var strong = _dereq_(27); -var validate = _dereq_(125); -var SET = 'Set'; - -// 23.2 Set Objects -module.exports = _dereq_(29)(SET, function (get) { - return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; -}, { - // 23.2.3.1 Set.prototype.add(value) - add: function add(value) { - return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value); - } -}, strong); - -},{"125":125,"27":27,"29":29}],232:[function(_dereq_,module,exports){ -'use strict'; -// B.2.3.2 String.prototype.anchor(name) -_dereq_(107)('anchor', function (createHTML) { - return function anchor(name) { - return createHTML(this, 'a', 'name', name); - }; -}); - -},{"107":107}],233:[function(_dereq_,module,exports){ -'use strict'; -// B.2.3.3 String.prototype.big() -_dereq_(107)('big', function (createHTML) { - return function big() { - return createHTML(this, 'big', '', ''); - }; -}); - -},{"107":107}],234:[function(_dereq_,module,exports){ -'use strict'; -// B.2.3.4 String.prototype.blink() -_dereq_(107)('blink', function (createHTML) { - return function blink() { - return createHTML(this, 'blink', '', ''); - }; -}); - -},{"107":107}],235:[function(_dereq_,module,exports){ -'use strict'; -// B.2.3.5 String.prototype.bold() -_dereq_(107)('bold', function (createHTML) { - return function bold() { - return createHTML(this, 'b', '', ''); - }; -}); - -},{"107":107}],236:[function(_dereq_,module,exports){ -'use strict'; -var $export = _dereq_(40); -var $at = _dereq_(105)(false); -$export($export.P, 'String', { - // 21.1.3.3 String.prototype.codePointAt(pos) - codePointAt: function codePointAt(pos) { - return $at(this, pos); - } -}); - -},{"105":105,"40":40}],237:[function(_dereq_,module,exports){ -// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) -'use strict'; -var $export = _dereq_(40); -var toLength = _dereq_(117); -var context = _dereq_(106); -var ENDS_WITH = 'endsWith'; -var $endsWith = ''[ENDS_WITH]; - -$export($export.P + $export.F * _dereq_(41)(ENDS_WITH), 'String', { - endsWith: function endsWith(searchString /* , endPosition = @length */) { - var that = context(this, searchString, ENDS_WITH); - var endPosition = arguments.length > 1 ? arguments[1] : undefined; - var len = toLength(that.length); - var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); - var search = String(searchString); - return $endsWith - ? $endsWith.call(that, search, end) - : that.slice(end - search.length, end) === search; - } -}); - -},{"106":106,"117":117,"40":40,"41":41}],238:[function(_dereq_,module,exports){ -'use strict'; -// B.2.3.6 String.prototype.fixed() -_dereq_(107)('fixed', function (createHTML) { - return function fixed() { - return createHTML(this, 'tt', '', ''); - }; -}); - -},{"107":107}],239:[function(_dereq_,module,exports){ -'use strict'; -// B.2.3.7 String.prototype.fontcolor(color) -_dereq_(107)('fontcolor', function (createHTML) { - return function fontcolor(color) { - return createHTML(this, 'font', 'color', color); - }; -}); - -},{"107":107}],240:[function(_dereq_,module,exports){ -'use strict'; -// B.2.3.8 String.prototype.fontsize(size) -_dereq_(107)('fontsize', function (createHTML) { - return function fontsize(size) { - return createHTML(this, 'font', 'size', size); - }; -}); - -},{"107":107}],241:[function(_dereq_,module,exports){ -var $export = _dereq_(40); -var toAbsoluteIndex = _dereq_(113); -var fromCharCode = String.fromCharCode; -var $fromCodePoint = String.fromCodePoint; - -// length should be 1, old FF problem -$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { - // 21.1.2.2 String.fromCodePoint(...codePoints) - fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars - var res = []; - var aLen = arguments.length; - var i = 0; - var code; - while (aLen > i) { - code = +arguments[i++]; - if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point'); - res.push(code < 0x10000 - ? fromCharCode(code) - : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) - ); - } return res.join(''); - } -}); - -},{"113":113,"40":40}],242:[function(_dereq_,module,exports){ -// 21.1.3.7 String.prototype.includes(searchString, position = 0) -'use strict'; -var $export = _dereq_(40); -var context = _dereq_(106); -var INCLUDES = 'includes'; - -$export($export.P + $export.F * _dereq_(41)(INCLUDES), 'String', { - includes: function includes(searchString /* , position = 0 */) { - return !!~context(this, searchString, INCLUDES) - .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); - } -}); - -},{"106":106,"40":40,"41":41}],243:[function(_dereq_,module,exports){ -'use strict'; -// B.2.3.9 String.prototype.italics() -_dereq_(107)('italics', function (createHTML) { - return function italics() { - return createHTML(this, 'i', '', ''); - }; -}); - -},{"107":107}],244:[function(_dereq_,module,exports){ -'use strict'; -var $at = _dereq_(105)(true); - -// 21.1.3.27 String.prototype[@@iterator]() -_dereq_(61)(String, 'String', function (iterated) { - this._t = String(iterated); // target - this._i = 0; // next index -// 21.1.5.2.1 %StringIteratorPrototype%.next() -}, function () { - var O = this._t; - var index = this._i; - var point; - if (index >= O.length) return { value: undefined, done: true }; - point = $at(O, index); - this._i += point.length; - return { value: point, done: false }; -}); - -},{"105":105,"61":61}],245:[function(_dereq_,module,exports){ -'use strict'; -// B.2.3.10 String.prototype.link(url) -_dereq_(107)('link', function (createHTML) { - return function link(url) { - return createHTML(this, 'a', 'href', url); - }; -}); - -},{"107":107}],246:[function(_dereq_,module,exports){ -var $export = _dereq_(40); -var toIObject = _dereq_(116); -var toLength = _dereq_(117); - -$export($export.S, 'String', { - // 21.1.2.4 String.raw(callSite, ...substitutions) - raw: function raw(callSite) { - var tpl = toIObject(callSite.raw); - var len = toLength(tpl.length); - var aLen = arguments.length; - var res = []; - var i = 0; - while (len > i) { - res.push(String(tpl[i++])); - if (i < aLen) res.push(String(arguments[i])); - } return res.join(''); - } -}); - -},{"116":116,"117":117,"40":40}],247:[function(_dereq_,module,exports){ -var $export = _dereq_(40); - -$export($export.P, 'String', { - // 21.1.3.13 String.prototype.repeat(count) - repeat: _dereq_(109) -}); - -},{"109":109,"40":40}],248:[function(_dereq_,module,exports){ -'use strict'; -// B.2.3.11 String.prototype.small() -_dereq_(107)('small', function (createHTML) { - return function small() { - return createHTML(this, 'small', '', ''); - }; -}); - -},{"107":107}],249:[function(_dereq_,module,exports){ -// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) -'use strict'; -var $export = _dereq_(40); -var toLength = _dereq_(117); -var context = _dereq_(106); -var STARTS_WITH = 'startsWith'; -var $startsWith = ''[STARTS_WITH]; - -$export($export.P + $export.F * _dereq_(41)(STARTS_WITH), 'String', { - startsWith: function startsWith(searchString /* , position = 0 */) { - var that = context(this, searchString, STARTS_WITH); - var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); - var search = String(searchString); - return $startsWith - ? $startsWith.call(that, search, index) - : that.slice(index, index + search.length) === search; - } -}); - -},{"106":106,"117":117,"40":40,"41":41}],250:[function(_dereq_,module,exports){ -'use strict'; -// B.2.3.12 String.prototype.strike() -_dereq_(107)('strike', function (createHTML) { - return function strike() { - return createHTML(this, 'strike', '', ''); - }; -}); - -},{"107":107}],251:[function(_dereq_,module,exports){ -'use strict'; -// B.2.3.13 String.prototype.sub() -_dereq_(107)('sub', function (createHTML) { - return function sub() { - return createHTML(this, 'sub', '', ''); - }; -}); - -},{"107":107}],252:[function(_dereq_,module,exports){ -'use strict'; -// B.2.3.14 String.prototype.sup() -_dereq_(107)('sup', function (createHTML) { - return function sup() { - return createHTML(this, 'sup', '', ''); - }; -}); - -},{"107":107}],253:[function(_dereq_,module,exports){ -'use strict'; -// 21.1.3.25 String.prototype.trim() -_dereq_(110)('trim', function ($trim) { - return function trim() { - return $trim(this, 3); - }; -}); - -},{"110":110}],254:[function(_dereq_,module,exports){ -'use strict'; -// ECMAScript 6 symbols shim -var global = _dereq_(46); -var has = _dereq_(47); -var DESCRIPTORS = _dereq_(36); -var $export = _dereq_(40); -var redefine = _dereq_(94); -var META = _dereq_(70).KEY; -var $fails = _dereq_(42); -var shared = _dereq_(102); -var setToStringTag = _dereq_(100); -var uid = _dereq_(123); -var wks = _dereq_(128); -var wksExt = _dereq_(127); -var wksDefine = _dereq_(126); -var enumKeys = _dereq_(39); -var isArray = _dereq_(55); -var anObject = _dereq_(16); -var isObject = _dereq_(57); -var toIObject = _dereq_(116); -var toPrimitive = _dereq_(119); -var createDesc = _dereq_(92); -var _create = _dereq_(74); -var gOPNExt = _dereq_(78); -var $GOPD = _dereq_(77); -var $DP = _dereq_(75); -var $keys = _dereq_(83); -var gOPD = $GOPD.f; -var dP = $DP.f; -var gOPN = gOPNExt.f; -var $Symbol = global.Symbol; -var $JSON = global.JSON; -var _stringify = $JSON && $JSON.stringify; -var PROTOTYPE = 'prototype'; -var HIDDEN = wks('_hidden'); -var TO_PRIMITIVE = wks('toPrimitive'); -var isEnum = {}.propertyIsEnumerable; -var SymbolRegistry = shared('symbol-registry'); -var AllSymbols = shared('symbols'); -var OPSymbols = shared('op-symbols'); -var ObjectProto = Object[PROTOTYPE]; -var USE_NATIVE = typeof $Symbol == 'function'; -var QObject = global.QObject; -// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 -var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; - -// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 -var setSymbolDesc = DESCRIPTORS && $fails(function () { - return _create(dP({}, 'a', { - get: function () { return dP(this, 'a', { value: 7 }).a; } - })).a != 7; -}) ? function (it, key, D) { - var protoDesc = gOPD(ObjectProto, key); - if (protoDesc) delete ObjectProto[key]; - dP(it, key, D); - if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); -} : dP; - -var wrap = function (tag) { - var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); - sym._k = tag; - return sym; -}; - -var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { - return typeof it == 'symbol'; -} : function (it) { - return it instanceof $Symbol; -}; - -var $defineProperty = function defineProperty(it, key, D) { - if (it === ObjectProto) $defineProperty(OPSymbols, key, D); - anObject(it); - key = toPrimitive(key, true); - anObject(D); - if (has(AllSymbols, key)) { - if (!D.enumerable) { - if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); - it[HIDDEN][key] = true; - } else { - if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; - D = _create(D, { enumerable: createDesc(0, false) }); - } return setSymbolDesc(it, key, D); - } return dP(it, key, D); -}; -var $defineProperties = function defineProperties(it, P) { - anObject(it); - var keys = enumKeys(P = toIObject(P)); - var i = 0; - var l = keys.length; - var key; - while (l > i) $defineProperty(it, key = keys[i++], P[key]); - return it; -}; -var $create = function create(it, P) { - return P === undefined ? _create(it) : $defineProperties(_create(it), P); -}; -var $propertyIsEnumerable = function propertyIsEnumerable(key) { - var E = isEnum.call(this, key = toPrimitive(key, true)); - if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; - return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; -}; -var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { - it = toIObject(it); - key = toPrimitive(key, true); - if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; - var D = gOPD(it, key); - if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; - return D; -}; -var $getOwnPropertyNames = function getOwnPropertyNames(it) { - var names = gOPN(toIObject(it)); - var result = []; - var i = 0; - var key; - while (names.length > i) { - if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); - } return result; -}; -var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { - var IS_OP = it === ObjectProto; - var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); - var result = []; - var i = 0; - var key; - while (names.length > i) { - if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); - } return result; -}; - -// 19.4.1.1 Symbol([description]) -if (!USE_NATIVE) { - $Symbol = function Symbol() { - if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); - var tag = uid(arguments.length > 0 ? arguments[0] : undefined); - var $set = function (value) { - if (this === ObjectProto) $set.call(OPSymbols, value); - if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; - setSymbolDesc(this, tag, createDesc(1, value)); - }; - if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); - return wrap(tag); - }; - redefine($Symbol[PROTOTYPE], 'toString', function toString() { - return this._k; - }); - - $GOPD.f = $getOwnPropertyDescriptor; - $DP.f = $defineProperty; - _dereq_(79).f = gOPNExt.f = $getOwnPropertyNames; - _dereq_(84).f = $propertyIsEnumerable; - _dereq_(80).f = $getOwnPropertySymbols; - - if (DESCRIPTORS && !_dereq_(65)) { - redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); - } - - wksExt.f = function (name) { - return wrap(wks(name)); - }; -} - -$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); - -for (var es6Symbols = ( - // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 - 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' -).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); - -for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); - -$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { - // 19.4.2.1 Symbol.for(key) - 'for': function (key) { - return has(SymbolRegistry, key += '') - ? SymbolRegistry[key] - : SymbolRegistry[key] = $Symbol(key); - }, - // 19.4.2.5 Symbol.keyFor(sym) - keyFor: function keyFor(sym) { - if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); - for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; - }, - useSetter: function () { setter = true; }, - useSimple: function () { setter = false; } -}); - -$export($export.S + $export.F * !USE_NATIVE, 'Object', { - // 19.1.2.2 Object.create(O [, Properties]) - create: $create, - // 19.1.2.4 Object.defineProperty(O, P, Attributes) - defineProperty: $defineProperty, - // 19.1.2.3 Object.defineProperties(O, Properties) - defineProperties: $defineProperties, - // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) - getOwnPropertyDescriptor: $getOwnPropertyDescriptor, - // 19.1.2.7 Object.getOwnPropertyNames(O) - getOwnPropertyNames: $getOwnPropertyNames, - // 19.1.2.8 Object.getOwnPropertySymbols(O) - getOwnPropertySymbols: $getOwnPropertySymbols -}); - -// 24.3.2 JSON.stringify(value [, replacer [, space]]) -$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { - var S = $Symbol(); - // MS Edge converts symbol values to JSON as {} - // WebKit converts symbol values to JSON as null - // V8 throws on boxed symbols - return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; -})), 'JSON', { - stringify: function stringify(it) { - var args = [it]; - var i = 1; - var replacer, $replacer; - while (arguments.length > i) args.push(arguments[i++]); - $replacer = replacer = args[1]; - if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined - if (!isArray(replacer)) replacer = function (key, value) { - if (typeof $replacer == 'function') value = $replacer.call(this, key, value); - if (!isSymbol(value)) return value; - }; - args[1] = replacer; - return _stringify.apply($JSON, args); - } -}); - -// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) -$Symbol[PROTOTYPE][TO_PRIMITIVE] || _dereq_(48)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); -// 19.4.3.5 Symbol.prototype[@@toStringTag] -setToStringTag($Symbol, 'Symbol'); -// 20.2.1.9 Math[@@toStringTag] -setToStringTag(Math, 'Math', true); -// 24.3.3 JSON[@@toStringTag] -setToStringTag(global.JSON, 'JSON', true); - -},{"100":100,"102":102,"116":116,"119":119,"123":123,"126":126,"127":127,"128":128,"16":16,"36":36,"39":39,"40":40,"42":42,"46":46,"47":47,"48":48,"55":55,"57":57,"65":65,"70":70,"74":74,"75":75,"77":77,"78":78,"79":79,"80":80,"83":83,"84":84,"92":92,"94":94}],255:[function(_dereq_,module,exports){ -'use strict'; -var $export = _dereq_(40); -var $typed = _dereq_(122); -var buffer = _dereq_(121); -var anObject = _dereq_(16); -var toAbsoluteIndex = _dereq_(113); -var toLength = _dereq_(117); -var isObject = _dereq_(57); -var ArrayBuffer = _dereq_(46).ArrayBuffer; -var speciesConstructor = _dereq_(103); -var $ArrayBuffer = buffer.ArrayBuffer; -var $DataView = buffer.DataView; -var $isView = $typed.ABV && ArrayBuffer.isView; -var $slice = $ArrayBuffer.prototype.slice; -var VIEW = $typed.VIEW; -var ARRAY_BUFFER = 'ArrayBuffer'; - -$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer }); - -$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { - // 24.1.3.1 ArrayBuffer.isView(arg) - isView: function isView(it) { - return $isView && $isView(it) || isObject(it) && VIEW in it; - } -}); - -$export($export.P + $export.U + $export.F * _dereq_(42)(function () { - return !new $ArrayBuffer(2).slice(1, undefined).byteLength; -}), ARRAY_BUFFER, { - // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) - slice: function slice(start, end) { - if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix - var len = anObject(this).byteLength; - var first = toAbsoluteIndex(start, len); - var fin = toAbsoluteIndex(end === undefined ? len : end, len); - var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); - var viewS = new $DataView(this); - var viewT = new $DataView(result); - var index = 0; - while (first < fin) { - viewT.setUint8(index++, viewS.getUint8(first++)); - } return result; - } -}); - -_dereq_(99)(ARRAY_BUFFER); - -},{"103":103,"113":113,"117":117,"121":121,"122":122,"16":16,"40":40,"42":42,"46":46,"57":57,"99":99}],256:[function(_dereq_,module,exports){ -var $export = _dereq_(40); -$export($export.G + $export.W + $export.F * !_dereq_(122).ABV, { - DataView: _dereq_(121).DataView -}); - -},{"121":121,"122":122,"40":40}],257:[function(_dereq_,module,exports){ -_dereq_(120)('Float32', 4, function (init) { - return function Float32Array(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; -}); - -},{"120":120}],258:[function(_dereq_,module,exports){ -_dereq_(120)('Float64', 8, function (init) { - return function Float64Array(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; -}); - -},{"120":120}],259:[function(_dereq_,module,exports){ -_dereq_(120)('Int16', 2, function (init) { - return function Int16Array(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; -}); - -},{"120":120}],260:[function(_dereq_,module,exports){ -_dereq_(120)('Int32', 4, function (init) { - return function Int32Array(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; -}); - -},{"120":120}],261:[function(_dereq_,module,exports){ -_dereq_(120)('Int8', 1, function (init) { - return function Int8Array(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; -}); - -},{"120":120}],262:[function(_dereq_,module,exports){ -_dereq_(120)('Uint16', 2, function (init) { - return function Uint16Array(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; -}); - -},{"120":120}],263:[function(_dereq_,module,exports){ -_dereq_(120)('Uint32', 4, function (init) { - return function Uint32Array(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; -}); - -},{"120":120}],264:[function(_dereq_,module,exports){ -_dereq_(120)('Uint8', 1, function (init) { - return function Uint8Array(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; -}); - -},{"120":120}],265:[function(_dereq_,module,exports){ -_dereq_(120)('Uint8', 1, function (init) { - return function Uint8ClampedArray(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; -}, true); - -},{"120":120}],266:[function(_dereq_,module,exports){ -'use strict'; -var each = _dereq_(20)(0); -var redefine = _dereq_(94); -var meta = _dereq_(70); -var assign = _dereq_(73); -var weak = _dereq_(28); -var isObject = _dereq_(57); -var fails = _dereq_(42); -var validate = _dereq_(125); -var WEAK_MAP = 'WeakMap'; -var getWeak = meta.getWeak; -var isExtensible = Object.isExtensible; -var uncaughtFrozenStore = weak.ufstore; -var tmp = {}; -var InternalMap; - -var wrapper = function (get) { - return function WeakMap() { - return get(this, arguments.length > 0 ? arguments[0] : undefined); - }; -}; - -var methods = { - // 23.3.3.3 WeakMap.prototype.get(key) - get: function get(key) { - if (isObject(key)) { - var data = getWeak(key); - if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); - return data ? data[this._i] : undefined; + var isSymbol = USE_NATIVE && typeof $Symbol.iterator === 'symbol' ? function (it) { + return typeof it === 'symbol' + } : function (it) { + return it instanceof $Symbol } - }, - // 23.3.3.5 WeakMap.prototype.set(key, value) - set: function set(key, value) { - return weak.def(validate(this, WEAK_MAP), key, value); - } -}; -// 23.3 WeakMap Objects -var $WeakMap = module.exports = _dereq_(29)(WEAK_MAP, wrapper, methods, weak, true, true); - -// IE11 WeakMap frozen keys fix -if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) { - InternalMap = weak.getConstructor(wrapper, WEAK_MAP); - assign(InternalMap.prototype, methods); - meta.NEED = true; - each(['delete', 'has', 'get', 'set'], function (key) { - var proto = $WeakMap.prototype; - var method = proto[key]; - redefine(proto, key, function (a, b) { - // store frozen objects on internal weakmap shim - if (isObject(a) && !isExtensible(a)) { - if (!this._f) this._f = new InternalMap(); - var result = this._f[key](a, b); - return key == 'set' ? this : result; - // store all the rest on native weakmap - } return method.call(this, a, b); - }); - }); -} - -},{"125":125,"20":20,"28":28,"29":29,"42":42,"57":57,"70":70,"73":73,"94":94}],267:[function(_dereq_,module,exports){ -'use strict'; -var weak = _dereq_(28); -var validate = _dereq_(125); -var WEAK_SET = 'WeakSet'; - -// 23.4 WeakSet Objects -_dereq_(29)(WEAK_SET, function (get) { - return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; -}, { - // 23.4.3.1 WeakSet.prototype.add(value) - add: function add(value) { - return weak.def(validate(this, WEAK_SET), value, true); - } -}, weak, false, true); - -},{"125":125,"28":28,"29":29}],268:[function(_dereq_,module,exports){ -'use strict'; -// https://github.com/tc39/Array.prototype.includes -var $export = _dereq_(40); -var $includes = _dereq_(19)(true); - -$export($export.P, 'Array', { - includes: function includes(el /* , fromIndex = 0 */) { - return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); - } -}); - -_dereq_(13)('includes'); - -},{"13":13,"19":19,"40":40}],269:[function(_dereq_,module,exports){ -// https://github.com/tc39/proposal-object-values-entries -var $export = _dereq_(40); -var $entries = _dereq_(86)(true); - -$export($export.S, 'Object', { - entries: function entries(it) { - return $entries(it); - } -}); - -},{"40":40,"86":86}],270:[function(_dereq_,module,exports){ -// https://github.com/tc39/proposal-object-getownpropertydescriptors -var $export = _dereq_(40); -var ownKeys = _dereq_(87); -var toIObject = _dereq_(116); -var gOPD = _dereq_(77); -var createProperty = _dereq_(31); - -$export($export.S, 'Object', { - getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { - var O = toIObject(object); - var getDesc = gOPD.f; - var keys = ownKeys(O); - var result = {}; - var i = 0; - var key, desc; - while (keys.length > i) { - desc = getDesc(O, key = keys[i++]); - if (desc !== undefined) createProperty(result, key, desc); + var $defineProperty = function defineProperty (it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D) + anObject(it) + key = toPrimitive(key, true) + anObject(D) + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})) + it[HIDDEN][key] = true + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false + D = _create(D, { enumerable: createDesc(0, false) }) + } return setSymbolDesc(it, key, D) + } return dP(it, key, D) + } + var $defineProperties = function defineProperties (it, P) { + anObject(it) + var keys = enumKeys(P = toIObject(P)) + var i = 0 + var l = keys.length + var key + while (l > i) $defineProperty(it, key = keys[i++], P[key]) + return it + } + var $create = function create (it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P) + } + var $propertyIsEnumerable = function propertyIsEnumerable (key) { + var E = isEnum.call(this, key = toPrimitive(key, true)) + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true + } + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor (it, key) { + it = toIObject(it) + key = toPrimitive(key, true) + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return + var D = gOPD(it, key) + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true + return D + } + var $getOwnPropertyNames = function getOwnPropertyNames (it) { + var names = gOPN(toIObject(it)) + var result = [] + var i = 0 + var key + while (names.length > i) { + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key) + } return result + } + var $getOwnPropertySymbols = function getOwnPropertySymbols (it) { + var IS_OP = it === ObjectProto + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)) + var result = [] + var i = 0 + var key + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]) + } return result } - return result; - } -}); -},{"116":116,"31":31,"40":40,"77":77,"87":87}],271:[function(_dereq_,module,exports){ -// https://github.com/tc39/proposal-object-values-entries -var $export = _dereq_(40); -var $values = _dereq_(86)(false); + // 19.4.1.1 Symbol([description]) + if (!USE_NATIVE) { + $Symbol = function Symbol () { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!') + var tag = uid(arguments.length > 0 ? arguments[0] : undefined) + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value) + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false + setSymbolDesc(this, tag, createDesc(1, value)) + } + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }) + return wrap(tag) + } + redefine($Symbol[PROTOTYPE], 'toString', function toString () { + return this._k + }) -$export($export.S, 'Object', { - values: function values(it) { - return $values(it); - } -}); + $GOPD.f = $getOwnPropertyDescriptor + $DP.f = $defineProperty + _dereq_(79).f = gOPNExt.f = $getOwnPropertyNames + _dereq_(84).f = $propertyIsEnumerable + _dereq_(80).f = $getOwnPropertySymbols -},{"40":40,"86":86}],272:[function(_dereq_,module,exports){ -// https://github.com/tc39/proposal-promise-finally -'use strict'; -var $export = _dereq_(40); -var core = _dereq_(30); -var global = _dereq_(46); -var speciesConstructor = _dereq_(103); -var promiseResolve = _dereq_(91); + if (DESCRIPTORS && !_dereq_(65)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true) + } -$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { - var C = speciesConstructor(this, core.Promise || global.Promise); - var isFunction = typeof onFinally == 'function'; - return this.then( - isFunction ? function (x) { - return promiseResolve(C, onFinally()).then(function () { return x; }); - } : onFinally, - isFunction ? function (e) { - return promiseResolve(C, onFinally()).then(function () { throw e; }); - } : onFinally - ); -} }); + wksExt.f = function (name) { + return wrap(wks(name)) + } + } -},{"103":103,"30":30,"40":40,"46":46,"91":91}],273:[function(_dereq_,module,exports){ -'use strict'; -// https://github.com/tc39/proposal-string-pad-start-end -var $export = _dereq_(40); -var $pad = _dereq_(108); -var userAgent = _dereq_(124); + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }) -// https://github.com/zloirock/core-js/issues/280 -$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { - padEnd: function padEnd(maxLength /* , fillString = ' ' */) { - return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); - } -}); + for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' + ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]) -},{"108":108,"124":124,"40":40}],274:[function(_dereq_,module,exports){ -'use strict'; -// https://github.com/tc39/proposal-string-pad-start-end -var $export = _dereq_(40); -var $pad = _dereq_(108); -var userAgent = _dereq_(124); + for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]) -// https://github.com/zloirock/core-js/issues/280 -$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { - padStart: function padStart(maxLength /* , fillString = ' ' */) { - return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); - } -}); + $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + for: function (key) { + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key) + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor (sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!') + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key + }, + useSetter: function () { setter = true }, + useSimple: function () { setter = false } + }) -},{"108":108,"124":124,"40":40}],275:[function(_dereq_,module,exports){ -_dereq_(126)('asyncIterator'); + $export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols + }) -},{"126":126}],276:[function(_dereq_,module,exports){ -var $iterators = _dereq_(140); -var getKeys = _dereq_(83); -var redefine = _dereq_(94); -var global = _dereq_(46); -var hide = _dereq_(48); -var Iterators = _dereq_(64); -var wks = _dereq_(128); -var ITERATOR = wks('iterator'); -var TO_STRING_TAG = wks('toStringTag'); -var ArrayValues = Iterators.Array; + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { + var S = $Symbol() + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}' + })), 'JSON', { + stringify: function stringify (it) { + var args = [it] + var i = 1 + var replacer, $replacer + while (arguments.length > i) args.push(arguments[i++]) + $replacer = replacer = args[1] + if (!isObject(replacer) && it === undefined || isSymbol(it)) return // IE8 returns string on undefined + if (!isArray(replacer)) { + replacer = function (key, value) { + if (typeof $replacer === 'function') value = $replacer.call(this, key, value) + if (!isSymbol(value)) return value + } + } + args[1] = replacer + return _stringify.apply($JSON, args) + } + }) -var DOMIterables = { - CSSRuleList: true, // TODO: Not spec compliant, should be false. - CSSStyleDeclaration: false, - CSSValueList: false, - ClientRectList: false, - DOMRectList: false, - DOMStringList: false, - DOMTokenList: true, - DataTransferItemList: false, - FileList: false, - HTMLAllCollection: false, - HTMLCollection: false, - HTMLFormElement: false, - HTMLSelectElement: false, - MediaList: true, // TODO: Not spec compliant, should be false. - MimeTypeArray: false, - NamedNodeMap: false, - NodeList: true, - PaintRequestList: false, - Plugin: false, - PluginArray: false, - SVGLengthList: false, - SVGNumberList: false, - SVGPathSegList: false, - SVGPointList: false, - SVGStringList: false, - SVGTransformList: false, - SourceBufferList: false, - StyleSheetList: true, // TODO: Not spec compliant, should be false. - TextTrackCueList: false, - TextTrackList: false, - TouchList: false -}; + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE][TO_PRIMITIVE] || _dereq_(48)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf) + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol') + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true) + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true) + }, { 100: 100, 102: 102, 116: 116, 119: 119, 123: 123, 126: 126, 127: 127, 128: 128, 16: 16, 36: 36, 39: 39, 40: 40, 42: 42, 46: 46, 47: 47, 48: 48, 55: 55, 57: 57, 65: 65, 70: 70, 74: 74, 75: 75, 77: 77, 78: 78, 79: 79, 80: 80, 83: 83, 84: 84, 92: 92, 94: 94 }], + 255: [function (_dereq_, module, exports) { + 'use strict' + var $export = _dereq_(40) + var $typed = _dereq_(122) + var buffer = _dereq_(121) + var anObject = _dereq_(16) + var toAbsoluteIndex = _dereq_(113) + var toLength = _dereq_(117) + var isObject = _dereq_(57) + var ArrayBuffer = _dereq_(46).ArrayBuffer + var speciesConstructor = _dereq_(103) + var $ArrayBuffer = buffer.ArrayBuffer + var $DataView = buffer.DataView + var $isView = $typed.ABV && ArrayBuffer.isView + var $slice = $ArrayBuffer.prototype.slice + var VIEW = $typed.VIEW + var ARRAY_BUFFER = 'ArrayBuffer' -for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { - var NAME = collections[i]; - var explicit = DOMIterables[NAME]; - var Collection = global[NAME]; - var proto = Collection && Collection.prototype; - var key; - if (proto) { - if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); - if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); - Iterators[NAME] = ArrayValues; - if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); - } -} + $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer }) -},{"128":128,"140":140,"46":46,"48":48,"64":64,"83":83,"94":94}],277:[function(_dereq_,module,exports){ -var $export = _dereq_(40); -var $task = _dereq_(112); -$export($export.G + $export.B, { - setImmediate: $task.set, - clearImmediate: $task.clear -}); + $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView (it) { + return $isView && $isView(it) || isObject(it) && VIEW in it + } + }) -},{"112":112,"40":40}],278:[function(_dereq_,module,exports){ -// ie9- setTimeout & setInterval additional parameters fix -var global = _dereq_(46); -var $export = _dereq_(40); -var userAgent = _dereq_(124); -var slice = [].slice; -var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check -var wrap = function (set) { - return function (fn, time /* , ...args */) { - var boundArgs = arguments.length > 2; - var args = boundArgs ? slice.call(arguments, 2) : false; - return set(boundArgs ? function () { - // eslint-disable-next-line no-new-func - (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); - } : fn, time); - }; -}; -$export($export.G + $export.B + $export.F * MSIE, { - setTimeout: wrap(global.setTimeout), - setInterval: wrap(global.setInterval) -}); + $export($export.P + $export.U + $export.F * _dereq_(42)(function () { + return !new $ArrayBuffer(2).slice(1, undefined).byteLength + }), ARRAY_BUFFER, { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice (start, end) { + if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start) // FF fix + var len = anObject(this).byteLength + var first = toAbsoluteIndex(start, len) + var fin = toAbsoluteIndex(end === undefined ? len : end, len) + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)) + var viewS = new $DataView(this) + var viewT = new $DataView(result) + var index = 0 + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)) + } return result + } + }) -},{"124":124,"40":40,"46":46}],279:[function(_dereq_,module,exports){ -_dereq_(278); -_dereq_(277); -_dereq_(276); -module.exports = _dereq_(30); + _dereq_(99)(ARRAY_BUFFER) + }, { 103: 103, 113: 113, 117: 117, 121: 121, 122: 122, 16: 16, 40: 40, 42: 42, 46: 46, 57: 57, 99: 99 }], + 256: [function (_dereq_, module, exports) { + var $export = _dereq_(40) + $export($export.G + $export.W + $export.F * !_dereq_(122).ABV, { + DataView: _dereq_(121).DataView + }) + }, { 121: 121, 122: 122, 40: 40 }], + 257: [function (_dereq_, module, exports) { + _dereq_(120)('Float32', 4, function (init) { + return function Float32Array (data, byteOffset, length) { + return init(this, data, byteOffset, length) + } + }) + }, { 120: 120 }], + 258: [function (_dereq_, module, exports) { + _dereq_(120)('Float64', 8, function (init) { + return function Float64Array (data, byteOffset, length) { + return init(this, data, byteOffset, length) + } + }) + }, { 120: 120 }], + 259: [function (_dereq_, module, exports) { + _dereq_(120)('Int16', 2, function (init) { + return function Int16Array (data, byteOffset, length) { + return init(this, data, byteOffset, length) + } + }) + }, { 120: 120 }], + 260: [function (_dereq_, module, exports) { + _dereq_(120)('Int32', 4, function (init) { + return function Int32Array (data, byteOffset, length) { + return init(this, data, byteOffset, length) + } + }) + }, { 120: 120 }], + 261: [function (_dereq_, module, exports) { + _dereq_(120)('Int8', 1, function (init) { + return function Int8Array (data, byteOffset, length) { + return init(this, data, byteOffset, length) + } + }) + }, { 120: 120 }], + 262: [function (_dereq_, module, exports) { + _dereq_(120)('Uint16', 2, function (init) { + return function Uint16Array (data, byteOffset, length) { + return init(this, data, byteOffset, length) + } + }) + }, { 120: 120 }], + 263: [function (_dereq_, module, exports) { + _dereq_(120)('Uint32', 4, function (init) { + return function Uint32Array (data, byteOffset, length) { + return init(this, data, byteOffset, length) + } + }) + }, { 120: 120 }], + 264: [function (_dereq_, module, exports) { + _dereq_(120)('Uint8', 1, function (init) { + return function Uint8Array (data, byteOffset, length) { + return init(this, data, byteOffset, length) + } + }) + }, { 120: 120 }], + 265: [function (_dereq_, module, exports) { + _dereq_(120)('Uint8', 1, function (init) { + return function Uint8ClampedArray (data, byteOffset, length) { + return init(this, data, byteOffset, length) + } + }, true) + }, { 120: 120 }], + 266: [function (_dereq_, module, exports) { + 'use strict' + var each = _dereq_(20)(0) + var redefine = _dereq_(94) + var meta = _dereq_(70) + var assign = _dereq_(73) + var weak = _dereq_(28) + var isObject = _dereq_(57) + var fails = _dereq_(42) + var validate = _dereq_(125) + var WEAK_MAP = 'WeakMap' + var getWeak = meta.getWeak + var isExtensible = Object.isExtensible + var uncaughtFrozenStore = weak.ufstore + var tmp = {} + var InternalMap -},{"276":276,"277":277,"278":278,"30":30}],280:[function(_dereq_,module,exports){ -/** + var wrapper = function (get) { + return function WeakMap () { + return get(this, arguments.length > 0 ? arguments[0] : undefined) + } + } + + var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get (key) { + if (isObject(key)) { + var data = getWeak(key) + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key) + return data ? data[this._i] : undefined + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set (key, value) { + return weak.def(validate(this, WEAK_MAP), key, value) + } + } + + // 23.3 WeakMap Objects + var $WeakMap = module.exports = _dereq_(29)(WEAK_MAP, wrapper, methods, weak, true, true) + + // IE11 WeakMap frozen keys fix + if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7 })) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP) + assign(InternalMap.prototype, methods) + meta.NEED = true + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype + var method = proto[key] + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap() + var result = this._f[key](a, b) + return key == 'set' ? this : result + // store all the rest on native weakmap + } return method.call(this, a, b) + }) + }) + } + }, { 125: 125, 20: 20, 28: 28, 29: 29, 42: 42, 57: 57, 70: 70, 73: 73, 94: 94 }], + 267: [function (_dereq_, module, exports) { + 'use strict' + var weak = _dereq_(28) + var validate = _dereq_(125) + var WEAK_SET = 'WeakSet' + + // 23.4 WeakSet Objects + _dereq_(29)(WEAK_SET, function (get) { + return function WeakSet () { return get(this, arguments.length > 0 ? arguments[0] : undefined) } + }, { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add (value) { + return weak.def(validate(this, WEAK_SET), value, true) + } + }, weak, false, true) + }, { 125: 125, 28: 28, 29: 29 }], + 268: [function (_dereq_, module, exports) { + 'use strict' + // https://github.com/tc39/Array.prototype.includes + var $export = _dereq_(40) + var $includes = _dereq_(19)(true) + + $export($export.P, 'Array', { + includes: function includes (el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined) + } + }) + + _dereq_(13)('includes') + }, { 13: 13, 19: 19, 40: 40 }], + 269: [function (_dereq_, module, exports) { + // https://github.com/tc39/proposal-object-values-entries + var $export = _dereq_(40) + var $entries = _dereq_(86)(true) + + $export($export.S, 'Object', { + entries: function entries (it) { + return $entries(it) + } + }) + }, { 40: 40, 86: 86 }], + 270: [function (_dereq_, module, exports) { + // https://github.com/tc39/proposal-object-getownpropertydescriptors + var $export = _dereq_(40) + var ownKeys = _dereq_(87) + var toIObject = _dereq_(116) + var gOPD = _dereq_(77) + var createProperty = _dereq_(31) + + $export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors (object) { + var O = toIObject(object) + var getDesc = gOPD.f + var keys = ownKeys(O) + var result = {} + var i = 0 + var key, desc + while (keys.length > i) { + desc = getDesc(O, key = keys[i++]) + if (desc !== undefined) createProperty(result, key, desc) + } + return result + } + }) + }, { 116: 116, 31: 31, 40: 40, 77: 77, 87: 87 }], + 271: [function (_dereq_, module, exports) { + // https://github.com/tc39/proposal-object-values-entries + var $export = _dereq_(40) + var $values = _dereq_(86)(false) + + $export($export.S, 'Object', { + values: function values (it) { + return $values(it) + } + }) + }, { 40: 40, 86: 86 }], + 272: [function (_dereq_, module, exports) { + // https://github.com/tc39/proposal-promise-finally + 'use strict' + var $export = _dereq_(40) + var core = _dereq_(30) + var global = _dereq_(46) + var speciesConstructor = _dereq_(103) + var promiseResolve = _dereq_(91) + + $export($export.P + $export.R, 'Promise', { + finally: function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise) + var isFunction = typeof onFinally === 'function' + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x }) + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e }) + } : onFinally + ) + } + }) + }, { 103: 103, 30: 30, 40: 40, 46: 46, 91: 91 }], + 273: [function (_dereq_, module, exports) { + 'use strict' + // https://github.com/tc39/proposal-string-pad-start-end + var $export = _dereq_(40) + var $pad = _dereq_(108) + var userAgent = _dereq_(124) + + // https://github.com/zloirock/core-js/issues/280 + $export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { + padEnd: function padEnd (maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false) + } + }) + }, { 108: 108, 124: 124, 40: 40 }], + 274: [function (_dereq_, module, exports) { + 'use strict' + // https://github.com/tc39/proposal-string-pad-start-end + var $export = _dereq_(40) + var $pad = _dereq_(108) + var userAgent = _dereq_(124) + + // https://github.com/zloirock/core-js/issues/280 + $export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { + padStart: function padStart (maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true) + } + }) + }, { 108: 108, 124: 124, 40: 40 }], + 275: [function (_dereq_, module, exports) { + _dereq_(126)('asyncIterator') + }, { 126: 126 }], + 276: [function (_dereq_, module, exports) { + var $iterators = _dereq_(140) + var getKeys = _dereq_(83) + var redefine = _dereq_(94) + var global = _dereq_(46) + var hide = _dereq_(48) + var Iterators = _dereq_(64) + var wks = _dereq_(128) + var ITERATOR = wks('iterator') + var TO_STRING_TAG = wks('toStringTag') + var ArrayValues = Iterators.Array + + var DOMIterables = { + CSSRuleList: true, // TODO: Not spec compliant, should be false. + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, // TODO: Not spec compliant, should be false. + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, // TODO: Not spec compliant, should be false. + TextTrackCueList: false, + TextTrackList: false, + TouchList: false + } + + for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i] + var explicit = DOMIterables[NAME] + var Collection = global[NAME] + var proto = Collection && Collection.prototype + var key + if (proto) { + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues) + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME) + Iterators[NAME] = ArrayValues + if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true) + } + } + }, { 128: 128, 140: 140, 46: 46, 48: 48, 64: 64, 83: 83, 94: 94 }], + 277: [function (_dereq_, module, exports) { + var $export = _dereq_(40) + var $task = _dereq_(112) + $export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear + }) + }, { 112: 112, 40: 40 }], + 278: [function (_dereq_, module, exports) { + // ie9- setTimeout & setInterval additional parameters fix + var global = _dereq_(46) + var $export = _dereq_(40) + var userAgent = _dereq_(124) + var slice = [].slice + var MSIE = /MSIE .\./.test(userAgent) // <- dirty ie9- check + var wrap = function (set) { + return function (fn, time /* , ...args */) { + var boundArgs = arguments.length > 2 + var args = boundArgs ? slice.call(arguments, 2) : false + return set(boundArgs ? function () { + // eslint-disable-next-line no-new-func + (typeof fn === 'function' ? fn : Function(fn)).apply(this, args) + } : fn, time) + } + } + $export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval) + }) + }, { 124: 124, 40: 40, 46: 46 }], + 279: [function (_dereq_, module, exports) { + _dereq_(278) + _dereq_(277) + _dereq_(276) + module.exports = _dereq_(30) + }, { 276: 276, 277: 277, 278: 278, 30: 30 }], + 280: [function (_dereq_, module, exports) { + /** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -!(function(global) { - "use strict"; + !(function (global) { + 'use strict' - var Op = Object.prototype; - var hasOwn = Op.hasOwnProperty; - var undefined; // More compressible than void 0. - var $Symbol = typeof Symbol === "function" ? Symbol : {}; - var iteratorSymbol = $Symbol.iterator || "@@iterator"; - var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; - var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + var Op = Object.prototype + var hasOwn = Op.hasOwnProperty + var undefined // More compressible than void 0. + var $Symbol = typeof Symbol === 'function' ? Symbol : {} + var iteratorSymbol = $Symbol.iterator || '@@iterator' + var asyncIteratorSymbol = $Symbol.asyncIterator || '@@asyncIterator' + var toStringTagSymbol = $Symbol.toStringTag || '@@toStringTag' - var inModule = typeof module === "object"; - var runtime = global.regeneratorRuntime; - if (runtime) { - if (inModule) { - // If regeneratorRuntime is defined globally and we're in a module, - // make the exports object identical to regeneratorRuntime. - module.exports = runtime; - } - // Don't bother evaluating the rest of this file if the runtime was - // already defined globally. - return; - } + var inModule = typeof module === 'object' + var runtime = global.regeneratorRuntime + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return + } - // Define the runtime globally (as expected by generated code) as either - // module.exports (if we're in a module) or a new, empty object. - runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {} - function wrap(innerFn, outerFn, self, tryLocsList) { - // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. - var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; - var generator = Object.create(protoGenerator.prototype); - var context = new Context(tryLocsList || []); + function wrap (innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator + var generator = Object.create(protoGenerator.prototype) + var context = new Context(tryLocsList || []) - // The ._invoke method unifies the implementations of the .next, - // .throw, and .return methods. - generator._invoke = makeInvokeMethod(innerFn, self, context); + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context) - return generator; - } - runtime.wrap = wrap; + return generator + } + runtime.wrap = wrap - // Try/catch helper to minimize deoptimizations. Returns a completion - // record like context.tryEntries[i].completion. This interface could - // have been (and was previously) designed to take a closure to be - // invoked without arguments, but in all the cases we care about we - // already have an existing method we want to call, so there's no need - // to create a new function object. We can even get away with assuming - // the method takes exactly one argument, since that happens to be true - // in every case, so we don't have to touch the arguments object. The - // only additional allocation required is the completion record, which - // has a stable shape and so hopefully should be cheap to allocate. - function tryCatch(fn, obj, arg) { - try { - return { type: "normal", arg: fn.call(obj, arg) }; - } catch (err) { - return { type: "throw", arg: err }; - } - } + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch (fn, obj, arg) { + try { + return { type: 'normal', arg: fn.call(obj, arg) } + } catch (err) { + return { type: 'throw', arg: err } + } + } - var GenStateSuspendedStart = "suspendedStart"; - var GenStateSuspendedYield = "suspendedYield"; - var GenStateExecuting = "executing"; - var GenStateCompleted = "completed"; + var GenStateSuspendedStart = 'suspendedStart' + var GenStateSuspendedYield = 'suspendedYield' + var GenStateExecuting = 'executing' + var GenStateCompleted = 'completed' - // Returning this object from the innerFn has the same effect as - // breaking out of the dispatch switch statement. - var ContinueSentinel = {}; + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {} - // Dummy constructor functions that we use as the .constructor and - // .constructor.prototype properties for functions that return Generator - // objects. For full spec compliance, you may wish to configure your - // minifier not to mangle the names of these two functions. - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator () {} + function GeneratorFunction () {} + function GeneratorFunctionPrototype () {} - // This is a polyfill for %IteratorPrototype% for environments that - // don't natively support it. - var IteratorPrototype = {}; - IteratorPrototype[iteratorSymbol] = function () { - return this; - }; + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {} + IteratorPrototype[iteratorSymbol] = function () { + return this + } - var getProto = Object.getPrototypeOf; - var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); - if (NativeIteratorPrototype && + var getProto = Object.getPrototypeOf + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))) + if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { - // This environment has a native %IteratorPrototype%; use it instead - // of the polyfill. - IteratorPrototype = NativeIteratorPrototype; - } + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype + } - var Gp = GeneratorFunctionPrototype.prototype = - Generator.prototype = Object.create(IteratorPrototype); - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunctionPrototype[toStringTagSymbol] = - GeneratorFunction.displayName = "GeneratorFunction"; + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype) + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype + GeneratorFunctionPrototype.constructor = GeneratorFunction + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = 'GeneratorFunction' - // Helper for defining the .next, .throw, and .return methods of the - // Iterator interface in terms of a single ._invoke method. - function defineIteratorMethods(prototype) { - ["next", "throw", "return"].forEach(function(method) { - prototype[method] = function(arg) { - return this._invoke(method, arg); - }; - }); - } + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods (prototype) { + ['next', 'throw', 'return'].forEach(function (method) { + prototype[method] = function (arg) { + return this._invoke(method, arg) + } + }) + } - runtime.isGeneratorFunction = function(genFun) { - var ctor = typeof genFun === "function" && genFun.constructor; - return ctor - ? ctor === GeneratorFunction || + runtime.isGeneratorFunction = function (genFun) { + var ctor = typeof genFun === 'function' && genFun.constructor + return ctor + ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can // do is to check its .name property. - (ctor.displayName || ctor.name) === "GeneratorFunction" - : false; - }; - - runtime.mark = function(genFun) { - if (Object.setPrototypeOf) { - Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); - } else { - genFun.__proto__ = GeneratorFunctionPrototype; - if (!(toStringTagSymbol in genFun)) { - genFun[toStringTagSymbol] = "GeneratorFunction"; + (ctor.displayName || ctor.name) === 'GeneratorFunction' + : false } - } - genFun.prototype = Object.create(Gp); - return genFun; - }; - // Within the body of any async function, `await x` is transformed to - // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test - // `hasOwn.call(value, "__await")` to determine if the yielded value is - // meant to be awaited. - runtime.awrap = function(arg) { - return { __await: arg }; - }; + runtime.mark = function (genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) + } else { + genFun.__proto__ = GeneratorFunctionPrototype + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = 'GeneratorFunction' + } + } + genFun.prototype = Object.create(Gp) + return genFun + } - function AsyncIterator(generator) { - function invoke(method, arg, resolve, reject) { - var record = tryCatch(generator[method], generator, arg); - if (record.type === "throw") { - reject(record.arg); - } else { - var result = record.arg; - var value = result.value; - if (value && - typeof value === "object" && - hasOwn.call(value, "__await")) { - return Promise.resolve(value.__await).then(function(value) { - invoke("next", value, resolve, reject); - }, function(err) { - invoke("throw", err, resolve, reject); - }); + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function (arg) { + return { __await: arg } + } + + function AsyncIterator (generator) { + function invoke (method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg) + if (record.type === 'throw') { + reject(record.arg) + } else { + var result = record.arg + var value = result.value + if (value && + typeof value === 'object' && + hasOwn.call(value, '__await')) { + return Promise.resolve(value.__await).then(function (value) { + invoke('next', value, resolve, reject) + }, function (err) { + invoke('throw', err, resolve, reject) + }) + } + + return Promise.resolve(value).then(function (unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. + result.value = unwrapped + resolve(result) + }, function (error) { + // If a rejected Promise was yielded, throw the rejection back + // into the async generator function so it can be handled there. + return invoke('throw', error, resolve, reject) + }) + } } - return Promise.resolve(value).then(function(unwrapped) { - // When a yielded Promise is resolved, its final value becomes - // the .value of the Promise<{value,done}> result for the - // current iteration. - result.value = unwrapped; - resolve(result); - }, function(error) { - // If a rejected Promise was yielded, throw the rejection back - // into the async generator function so it can be handled there. - return invoke("throw", error, resolve, reject); - }); - } - } + var previousPromise - var previousPromise; + function enqueue (method, arg) { + function callInvokeWithMethodAndArg () { + return new Promise(function (resolve, reject) { + invoke(method, arg, resolve, reject) + }) + } - function enqueue(method, arg) { - function callInvokeWithMethodAndArg() { - return new Promise(function(resolve, reject) { - invoke(method, arg, resolve, reject); - }); - } - - return previousPromise = + return previousPromise = // If enqueue has been called before, then we want to wait until // all previous Promises have been resolved before calling invoke, // so that results are always delivered in the correct order. If @@ -6436,518 +6492,511 @@ module.exports = _dereq_(30); // Avoid propagating failures to Promises returned by later // invocations of the iterator. callInvokeWithMethodAndArg - ) : callInvokeWithMethodAndArg(); - } - - // Define the unified helper method that is used to implement .next, - // .throw, and .return (see defineIteratorMethods). - this._invoke = enqueue; - } - - defineIteratorMethods(AsyncIterator.prototype); - AsyncIterator.prototype[asyncIteratorSymbol] = function () { - return this; - }; - runtime.AsyncIterator = AsyncIterator; - - // Note that simple async functions are implemented on top of - // AsyncIterator objects; they just return a Promise for the value of - // the final result produced by the iterator. - runtime.async = function(innerFn, outerFn, self, tryLocsList) { - var iter = new AsyncIterator( - wrap(innerFn, outerFn, self, tryLocsList) - ); - - return runtime.isGeneratorFunction(outerFn) - ? iter // If outerFn is a generator, return the full iterator. - : iter.next().then(function(result) { - return result.done ? result.value : iter.next(); - }); - }; - - function makeInvokeMethod(innerFn, self, context) { - var state = GenStateSuspendedStart; - - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error("Generator is already running"); - } - - if (state === GenStateCompleted) { - if (method === "throw") { - throw arg; + ) : callInvokeWithMethodAndArg() } - // Be forgiving, per 25.3.3.3.3 of the spec: - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume - return doneResult(); + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue } - context.method = method; - context.arg = arg; + defineIteratorMethods(AsyncIterator.prototype) + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this + } + runtime.AsyncIterator = AsyncIterator - while (true) { - var delegate = context.delegate; - if (delegate) { - var delegateResult = maybeInvokeDelegate(delegate, context); - if (delegateResult) { - if (delegateResult === ContinueSentinel) continue; - return delegateResult; - } - } + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function (innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ) - if (context.method === "next") { - // Setting context._sent for legacy support of Babel's - // function.sent implementation. - context.sent = context._sent = context.arg; + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function (result) { + return result.done ? result.value : iter.next() + }) + } - } else if (context.method === "throw") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw context.arg; + function makeInvokeMethod (innerFn, self, context) { + var state = GenStateSuspendedStart + + return function invoke (method, arg) { + if (state === GenStateExecuting) { + throw new Error('Generator is already running') } - context.dispatchException(context.arg); + if (state === GenStateCompleted) { + if (method === 'throw') { + throw arg + } - } else if (context.method === "return") { - context.abrupt("return", context.arg); - } - - state = GenStateExecuting; - - var record = tryCatch(innerFn, self, context); - if (record.type === "normal") { - // If an exception is thrown from innerFn, we leave state === - // GenStateExecuting and loop back for another invocation. - state = context.done - ? GenStateCompleted - : GenStateSuspendedYield; - - if (record.arg === ContinueSentinel) { - continue; + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult() } - return { - value: record.arg, - done: context.done - }; + context.method = method + context.arg = arg - } else if (record.type === "throw") { - state = GenStateCompleted; - // Dispatch the exception by looping back around to the - // context.dispatchException(context.arg) call above. - context.method = "throw"; - context.arg = record.arg; - } - } - }; - } + while (true) { + var delegate = context.delegate + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context) + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue + return delegateResult + } + } - // Call delegate.iterator[context.method](context.arg) and handle the - // result, either by returning a { value, done } result from the - // delegate iterator, or by modifying context.method and context.arg, - // setting context.delegate to null, and returning the ContinueSentinel. - function maybeInvokeDelegate(delegate, context) { - var method = delegate.iterator[context.method]; - if (method === undefined) { - // A .throw or .return when the delegate iterator has no .throw - // method always terminates the yield* loop. - context.delegate = null; + if (context.method === 'next') { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg + } else if (context.method === 'throw') { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted + throw context.arg + } - if (context.method === "throw") { - if (delegate.iterator.return) { - // If the delegate iterator has a return method, give it a - // chance to clean up. - context.method = "return"; - context.arg = undefined; - maybeInvokeDelegate(delegate, context); + context.dispatchException(context.arg) + } else if (context.method === 'return') { + context.abrupt('return', context.arg) + } - if (context.method === "throw") { - // If maybeInvokeDelegate(context) changed context.method from - // "return" to "throw", let that override the TypeError below. - return ContinueSentinel; + state = GenStateExecuting + + var record = tryCatch(innerFn, self, context) + if (record.type === 'normal') { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield + + if (record.arg === ContinueSentinel) { + continue + } + + return { + value: record.arg, + done: context.done + } + } else if (record.type === 'throw') { + state = GenStateCompleted + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = 'throw' + context.arg = record.arg + } } } - - context.method = "throw"; - context.arg = new TypeError( - "The iterator does not provide a 'throw' method"); } - return ContinueSentinel; - } + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate (delegate, context) { + var method = delegate.iterator[context.method] + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null - var record = tryCatch(method, delegate.iterator, context.arg); + if (context.method === 'throw') { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = 'return' + context.arg = undefined + maybeInvokeDelegate(delegate, context) - if (record.type === "throw") { - context.method = "throw"; - context.arg = record.arg; - context.delegate = null; - return ContinueSentinel; - } + if (context.method === 'throw') { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel + } + } - var info = record.arg; + context.method = 'throw' + context.arg = new TypeError( + "The iterator does not provide a 'throw' method") + } - if (! info) { - context.method = "throw"; - context.arg = new TypeError("iterator result is not an object"); - context.delegate = null; - return ContinueSentinel; - } - - if (info.done) { - // Assign the result of the finished delegate to the temporary - // variable specified by delegate.resultName (see delegateYield). - context[delegate.resultName] = info.value; - - // Resume execution at the desired location (see delegateYield). - context.next = delegate.nextLoc; - - // If context.method was "throw" but the delegate handled the - // exception, let the outer generator proceed normally. If - // context.method was "next", forget context.arg since it has been - // "consumed" by the delegate iterator. If context.method was - // "return", allow the original .return call to continue in the - // outer generator. - if (context.method !== "return") { - context.method = "next"; - context.arg = undefined; - } - - } else { - // Re-yield the result returned by the delegate method. - return info; - } - - // The delegate iterator is finished, so forget it and continue with - // the outer generator. - context.delegate = null; - return ContinueSentinel; - } - - // Define Generator.prototype.{next,throw,return} in terms of the - // unified ._invoke helper method. - defineIteratorMethods(Gp); - - Gp[toStringTagSymbol] = "Generator"; - - // A Generator should always return itself as the iterator object when the - // @@iterator function is called on it. Some browsers' implementations of the - // iterator prototype chain incorrectly implement this, causing the Generator - // object to not be returned from this call. This ensures that doesn't happen. - // See https://github.com/facebook/regenerator/issues/274 for more details. - Gp[iteratorSymbol] = function() { - return this; - }; - - Gp.toString = function() { - return "[object Generator]"; - }; - - function pushTryEntry(locs) { - var entry = { tryLoc: locs[0] }; - - if (1 in locs) { - entry.catchLoc = locs[1]; - } - - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; - } - - this.tryEntries.push(entry); - } - - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = "normal"; - delete record.arg; - entry.completion = record; - } - - function Context(tryLocsList) { - // The root entry object (effectively a try statement without a catch - // or a finally block) gives us a place to store values thrown from - // locations where there is no enclosing try statement. - this.tryEntries = [{ tryLoc: "root" }]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(true); - } - - runtime.keys = function(object) { - var keys = []; - for (var key in object) { - keys.push(key); - } - keys.reverse(); - - // Rather than returning an object with a next method, we keep - // things simple and return the next function itself. - return function next() { - while (keys.length) { - var key = keys.pop(); - if (key in object) { - next.value = key; - next.done = false; - return next; + return ContinueSentinel } + + var record = tryCatch(method, delegate.iterator, context.arg) + + if (record.type === 'throw') { + context.method = 'throw' + context.arg = record.arg + context.delegate = null + return ContinueSentinel + } + + var info = record.arg + + if (!info) { + context.method = 'throw' + context.arg = new TypeError('iterator result is not an object') + context.delegate = null + return ContinueSentinel + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== 'return') { + context.method = 'next' + context.arg = undefined + } + } else { + // Re-yield the result returned by the delegate method. + return info + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null + return ContinueSentinel } - // To avoid creating an additional object, we just hang the .value - // and .done properties off the next function object itself. This - // also ensures that the minifier will not anonymize the function. - next.done = true; - return next; - }; - }; + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp) - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); + Gp[toStringTagSymbol] = 'Generator' + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + Gp[iteratorSymbol] = function () { + return this } - if (typeof iterable.next === "function") { - return iterable; + Gp.toString = function () { + return '[object Generator]' } - if (!isNaN(iterable.length)) { - var i = -1, next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; + function pushTryEntry (locs) { + var entry = { tryLoc: locs[0] } + + if (1 in locs) { + entry.catchLoc = locs[1] + } + + if (2 in locs) { + entry.finallyLoc = locs[2] + entry.afterLoc = locs[3] + } + + this.tryEntries.push(entry) + } + + function resetTryEntry (entry) { + var record = entry.completion || {} + record.type = 'normal' + delete record.arg + entry.completion = record + } + + function Context (tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: 'root' }] + tryLocsList.forEach(pushTryEntry, this) + this.reset(true) + } + + runtime.keys = function (object) { + var keys = [] + for (var key in object) { + keys.push(key) + } + keys.reverse() + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next () { + while (keys.length) { + var key = keys.pop() + if (key in object) { + next.value = key + next.done = false + return next } } - next.value = undefined; - next.done = true; - - return next; - }; - - return next.next = next; + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true + return next + } } - } - // Return an iterator with no values. - return { next: doneResult }; - } - runtime.values = values; + function values (iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol] + if (iteratorMethod) { + return iteratorMethod.call(iterable) + } - function doneResult() { - return { value: undefined, done: true }; - } + if (typeof iterable.next === 'function') { + return iterable + } - Context.prototype = { - constructor: Context, + if (!isNaN(iterable.length)) { + var i = -1; var next = function next () { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i] + next.done = false + return next + } + } - reset: function(skipTempReset) { - this.prev = 0; - this.next = 0; - // Resetting context._sent for legacy support of Babel's - // function.sent implementation. - this.sent = this._sent = undefined; - this.done = false; - this.delegate = null; + next.value = undefined + next.done = true - this.method = "next"; - this.arg = undefined; + return next + } - this.tryEntries.forEach(resetTryEntry); + return next.next = next + } + } - if (!skipTempReset) { - for (var name in this) { - // Not sure about the optimal order of these conditions: - if (name.charAt(0) === "t" && + // Return an iterator with no values. + return { next: doneResult } + } + runtime.values = values + + function doneResult () { + return { value: undefined, done: true } + } + + Context.prototype = { + constructor: Context, + + reset: function (skipTempReset) { + this.prev = 0 + this.next = 0 + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined + this.done = false + this.delegate = null + + this.method = 'next' + this.arg = undefined + + this.tryEntries.forEach(resetTryEntry) + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === 't' && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { - this[name] = undefined; + this[name] = undefined + } + } } - } - } - }, + }, - stop: function() { - this.done = true; + stop: function () { + this.done = true - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === "throw") { - throw rootRecord.arg; - } - - return this.rval; - }, - - dispatchException: function(exception) { - if (this.done) { - throw exception; - } - - var context = this; - function handle(loc, caught) { - record.type = "throw"; - record.arg = exception; - context.next = loc; - - if (caught) { - // If the dispatched exception was caught by a catch block, - // then let that catch block handle the exception normally. - context.method = "next"; - context.arg = undefined; - } - - return !! caught; - } - - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; - - if (entry.tryLoc === "root") { - // Exception thrown outside of any try block that could handle - // it, so set the completion value of the entire function to - // throw the exception. - return handle("end"); - } - - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, "catchLoc"); - var hasFinally = hasOwn.call(entry, "finallyLoc"); - - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } - - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - - } else { - throw new Error("try statement without catch or finally"); + var rootEntry = this.tryEntries[0] + var rootRecord = rootEntry.completion + if (rootRecord.type === 'throw') { + throw rootRecord.arg } - } - } - }, - abrupt: function(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && - hasOwn.call(entry, "finallyLoc") && + return this.rval + }, + + dispatchException: function (exception) { + if (this.done) { + throw exception + } + + var context = this + function handle (loc, caught) { + record.type = 'throw' + record.arg = exception + context.next = loc + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = 'next' + context.arg = undefined + } + + return !!caught + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i] + var record = entry.completion + + if (entry.tryLoc === 'root') { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle('end') + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, 'catchLoc') + var hasFinally = hasOwn.call(entry, 'finallyLoc') + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true) + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc) + } + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true) + } + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc) + } + } else { + throw new Error('try statement without catch or finally') + } + } + } + }, + + abrupt: function (type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i] + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, 'finallyLoc') && this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } + var finallyEntry = entry + break + } + } - if (finallyEntry && - (type === "break" || - type === "continue") && + if (finallyEntry && + (type === 'break' || + type === 'continue') && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { - // Ignore the finally entry if control is not jumping to a - // location outside the try/catch block. - finallyEntry = null; - } - - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; - - if (finallyEntry) { - this.method = "next"; - this.next = finallyEntry.finallyLoc; - return ContinueSentinel; - } - - return this.complete(record); - }, - - complete: function(record, afterLoc) { - if (record.type === "throw") { - throw record.arg; - } - - if (record.type === "break" || - record.type === "continue") { - this.next = record.arg; - } else if (record.type === "return") { - this.rval = this.arg = record.arg; - this.method = "return"; - this.next = "end"; - } else if (record.type === "normal" && afterLoc) { - this.next = afterLoc; - } - - return ContinueSentinel; - }, - - finish: function(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; - } - } - }, - - "catch": function(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === "throw") { - var thrown = record.arg; - resetTryEntry(entry); + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null } - return thrown; + + var record = finallyEntry ? finallyEntry.completion : {} + record.type = type + record.arg = arg + + if (finallyEntry) { + this.method = 'next' + this.next = finallyEntry.finallyLoc + return ContinueSentinel + } + + return this.complete(record) + }, + + complete: function (record, afterLoc) { + if (record.type === 'throw') { + throw record.arg + } + + if (record.type === 'break' || + record.type === 'continue') { + this.next = record.arg + } else if (record.type === 'return') { + this.rval = this.arg = record.arg + this.method = 'return' + this.next = 'end' + } else if (record.type === 'normal' && afterLoc) { + this.next = afterLoc + } + + return ContinueSentinel + }, + + finish: function (finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i] + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc) + resetTryEntry(entry) + return ContinueSentinel + } + } + }, + + catch: function (tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i] + if (entry.tryLoc === tryLoc) { + var record = entry.completion + if (record.type === 'throw') { + var thrown = record.arg + resetTryEntry(entry) + } + return thrown + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error('illegal catch attempt') + }, + + delegateYield: function (iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + } + + if (this.method === 'next') { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined + } + + return ContinueSentinel } } - - // The context.catch method must only be called with a location - // argument that corresponds to a known catch block. - throw new Error("illegal catch attempt"); - }, - - delegateYield: function(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; - - if (this.method === "next") { - // Deliberately forget the last sent value so that we don't - // accidentally pass it on to the delegate. - this.arg = undefined; - } - - return ContinueSentinel; - } - }; -})( - // In sloppy mode, unbound `this` refers to the global object, fallback to - // Function constructor if we're in global strict mode. That is sadly a form - // of indirect eval which violates Content Security Policy. - (function() { - return this || (typeof self === "object" && self); - })() || Function("return this")() -); - -},{}]},{},[1]); + })( + // In sloppy mode, unbound `this` refers to the global object, fallback to + // Function constructor if we're in global strict mode. That is sadly a form + // of indirect eval which violates Content Security Policy. + (function () { + return this || (typeof self === 'object' && self) + })() || Function('return this')() + ) + }, {}] +}, {}, [1]) diff --git a/jero-web/public/cdn/font-icon/font_2316098_umqusozousr.js b/jero-web/public/cdn/font-icon/font_2316098_umqusozousr.js index b098acff..48bf517e 100644 --- a/jero-web/public/cdn/font-icon/font_2316098_umqusozousr.js +++ b/jero-web/public/cdn/font-icon/font_2316098_umqusozousr.js @@ -1 +1 @@ -!function(c){var a,t,e,i,l,n,o='',d=(d=document.getElementsByTagName("script"))[d.length-1].getAttribute("data-injectcss");if(d&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function h(){l||(l=!0,e())}a=function(){var c,a,t,e;(e=document.createElement("div")).innerHTML=o,o=null,(t=e.getElementsByTagName("svg")[0])&&(t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",c=t,(a=document.body).firstChild?(e=c,(t=a.firstChild).parentNode.insertBefore(e,t)):a.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(t=function(){document.removeEventListener("DOMContentLoaded",t,!1),a()},document.addEventListener("DOMContentLoaded",t,!1)):document.attachEvent&&(e=a,i=c.document,l=!1,(n=function(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(n,50)}h()})(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,h())})}(window); \ No newline at end of file +!(function (c) { var a; var t; var e; var i; var l; var n; var o = ''; var d = (d = document.getElementsByTagName('script'))[d.length - 1].getAttribute('data-injectcss'); if (d && !c.__iconfont__svg__cssinject__) { c.__iconfont__svg__cssinject__ = !0; try { document.write('') } catch (c) { console && console.log(c) } } function h () { l || (l = !0, e()) }a = function () { var c, a, t, e; (e = document.createElement('div')).innerHTML = o, o = null, (t = e.getElementsByTagName('svg')[0]) && (t.setAttribute('aria-hidden', 'true'), t.style.position = 'absolute', t.style.width = 0, t.style.height = 0, t.style.overflow = 'hidden', c = t, (a = document.body).firstChild ? (e = c, (t = a.firstChild).parentNode.insertBefore(e, t)) : a.appendChild(c)) }, document.addEventListener ? ~['complete', 'loaded', 'interactive'].indexOf(document.readyState) ? setTimeout(a, 0) : (t = function () { document.removeEventListener('DOMContentLoaded', t, !1), a() }, document.addEventListener('DOMContentLoaded', t, !1)) : document.attachEvent && (e = a, i = c.document, l = !1, (n = function () { try { i.documentElement.doScroll('left') } catch (c) { return void setTimeout(n, 50) }h() })(), i.onreadystatechange = function () { i.readyState == 'complete' && (i.onreadystatechange = null, h()) }) }(window)) diff --git a/jero-web/public/tinymce/langs/zh_CN.js b/jero-web/public/tinymce/langs/zh_CN.js index 0f3cf923..c2723ba1 100644 --- a/jero-web/public/tinymce/langs/zh_CN.js +++ b/jero-web/public/tinymce/langs/zh_CN.js @@ -1,261 +1,261 @@ -tinymce.addI18n('zh_CN',{ -"Redo": "\u91cd\u590d", -"Undo": "\u64a4\u6d88", -"Cut": "\u526a\u5207", -"Copy": "\u590d\u5236", -"Paste": "\u7c98\u8d34", -"Select all": "\u5168\u9009", -"New document": "\u65b0\u6587\u6863", -"Ok": "\u786e\u5b9a", -"Cancel": "\u53d6\u6d88", -"Visual aids": "\u7f51\u683c\u7ebf", -"Bold": "\u7c97\u4f53", -"Italic": "\u659c\u4f53", -"Underline": "\u4e0b\u5212\u7ebf", -"Strikethrough": "\u5220\u9664\u7ebf", -"Superscript": "\u4e0a\u6807", -"Subscript": "\u4e0b\u6807", -"Clear formatting": "\u6e05\u9664\u683c\u5f0f", -"Align left": "\u5de6\u5bf9\u9f50", -"Align center": "\u5c45\u4e2d", -"Align right": "\u53f3\u5bf9\u9f50", -"Justify": "\u4e24\u7aef\u5bf9\u9f50", -"Bullet list": "\u9879\u76ee\u7b26\u53f7", -"Numbered list": "\u7f16\u53f7\u5217\u8868", -"Decrease indent": "\u51cf\u5c11\u7f29\u8fdb", -"Increase indent": "\u589e\u52a0\u7f29\u8fdb", -"Close": "\u5173\u95ed", -"Formats": "\u683c\u5f0f", -"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "\u4f60\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u5bf9\u526a\u8d34\u677f\u7684\u8bbf\u95ee\uff0c\u8bf7\u4f7f\u7528Ctrl+X\/C\/V\u952e\u8fdb\u884c\u590d\u5236\u7c98\u8d34\u3002", -"Headers": "\u6807\u9898", -"Header 1": "\u6807\u98981", -"Header 2": "\u6807\u98982", -"Header 3": "\u6807\u98983", -"Header 4": "\u6807\u98984", -"Header 5": "\u6807\u98985", -"Header 6": "\u6807\u98986", -"Headings": "\u6807\u9898", -"Heading 1": "\u6807\u98981", -"Heading 2": "\u6807\u98982", -"Heading 3": "\u6807\u98983", -"Heading 4": "\u6807\u98984", -"Heading 5": "\u6807\u98985", -"Heading 6": "\u6807\u98986", -"Preformatted": "\u9884\u683c\u5f0f\u5316", -"Div": "Div\u533a\u5757", -"Pre": "\u9884\u683c\u5f0f\u6587\u672c", -"Code": "\u4ee3\u7801", -"Paragraph": "\u6bb5\u843d", -"Blockquote": "\u5f15\u7528", -"Inline": "\u6587\u672c", -"Blocks": "\u533a\u5757", -"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "\u5f53\u524d\u4e3a\u7eaf\u6587\u672c\u7c98\u8d34\u6a21\u5f0f\uff0c\u518d\u6b21\u70b9\u51fb\u53ef\u4ee5\u56de\u5230\u666e\u901a\u7c98\u8d34\u6a21\u5f0f\u3002", -"Font Family": "\u5b57\u4f53", -"Font Sizes": "\u5b57\u53f7", -"Class": "Class", -"Browse for an image": "\u6d4f\u89c8\u56fe\u50cf", -"OR": "\u6216", -"Drop an image here": "\u62d6\u653e\u4e00\u5f20\u56fe\u50cf\u81f3\u6b64", -"Upload": "\u4e0a\u4f20", -"Block": "\u5757", -"Align": "\u5bf9\u9f50", -"Default": "\u9ed8\u8ba4", -"Circle": "\u7a7a\u5fc3\u5706", -"Disc": "\u5b9e\u5fc3\u5706", -"Square": "\u65b9\u5757", -"Lower Alpha": "\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd", -"Lower Greek": "\u5c0f\u5199\u5e0c\u814a\u5b57\u6bcd", -"Lower Roman": "\u5c0f\u5199\u7f57\u9a6c\u5b57\u6bcd", -"Upper Alpha": "\u5927\u5199\u82f1\u6587\u5b57\u6bcd", -"Upper Roman": "\u5927\u5199\u7f57\u9a6c\u5b57\u6bcd", -"Anchor": "\u951a\u70b9", -"Name": "\u540d\u79f0", -"Id": "\u6807\u8bc6\u7b26", -"Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.": "\u6807\u8bc6\u7b26\u5e94\u8be5\u4ee5\u5b57\u6bcd\u5f00\u5934\uff0c\u540e\u8ddf\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u7834\u6298\u53f7\u3001\u70b9\u3001\u5192\u53f7\u6216\u4e0b\u5212\u7ebf\u3002", -"You have unsaved changes are you sure you want to navigate away?": "\u4f60\u8fd8\u6709\u6587\u6863\u5c1a\u672a\u4fdd\u5b58\uff0c\u786e\u5b9a\u8981\u79bb\u5f00\uff1f", -"Restore last draft": "\u6062\u590d\u4e0a\u6b21\u7684\u8349\u7a3f", -"Special character": "\u7279\u6b8a\u7b26\u53f7", -"Source code": "\u6e90\u4ee3\u7801", -"Insert\/Edit code sample": "\u63d2\u5165\/\u7f16\u8f91\u4ee3\u7801\u793a\u4f8b", -"Language": "\u8bed\u8a00", -"Code sample": "\u4ee3\u7801\u793a\u4f8b", -"Color": "\u989c\u8272", -"R": "R", -"G": "G", -"B": "B", -"Left to right": "\u4ece\u5de6\u5230\u53f3", -"Right to left": "\u4ece\u53f3\u5230\u5de6", -"Emoticons": "\u8868\u60c5", -"Document properties": "\u6587\u6863\u5c5e\u6027", -"Title": "\u6807\u9898", -"Keywords": "\u5173\u952e\u8bcd", -"Description": "\u63cf\u8ff0", -"Robots": "\u673a\u5668\u4eba", -"Author": "\u4f5c\u8005", -"Encoding": "\u7f16\u7801", -"Fullscreen": "\u5168\u5c4f", -"Action": "\u64cd\u4f5c", -"Shortcut": "\u5feb\u6377\u952e", -"Help": "\u5e2e\u52a9", -"Address": "\u5730\u5740", -"Focus to menubar": "\u79fb\u52a8\u7126\u70b9\u5230\u83dc\u5355\u680f", -"Focus to toolbar": "\u79fb\u52a8\u7126\u70b9\u5230\u5de5\u5177\u680f", -"Focus to element path": "\u79fb\u52a8\u7126\u70b9\u5230\u5143\u7d20\u8def\u5f84", -"Focus to contextual toolbar": "\u79fb\u52a8\u7126\u70b9\u5230\u4e0a\u4e0b\u6587\u83dc\u5355", -"Insert link (if link plugin activated)": "\u63d2\u5165\u94fe\u63a5 (\u5982\u679c\u94fe\u63a5\u63d2\u4ef6\u5df2\u6fc0\u6d3b)", -"Save (if save plugin activated)": "\u4fdd\u5b58(\u5982\u679c\u4fdd\u5b58\u63d2\u4ef6\u5df2\u6fc0\u6d3b)", -"Find (if searchreplace plugin activated)": "\u67e5\u627e(\u5982\u679c\u67e5\u627e\u66ff\u6362\u63d2\u4ef6\u5df2\u6fc0\u6d3b)", -"Plugins installed ({0}):": "\u5df2\u5b89\u88c5\u63d2\u4ef6 ({0}):", -"Premium plugins:": "\u4f18\u79c0\u63d2\u4ef6\uff1a", -"Learn more...": "\u4e86\u89e3\u66f4\u591a...", -"You are using {0}": "\u4f60\u6b63\u5728\u4f7f\u7528 {0}", -"Plugins": "\u63d2\u4ef6", -"Handy Shortcuts": "\u5feb\u6377\u952e", -"Horizontal line": "\u6c34\u5e73\u5206\u5272\u7ebf", -"Insert\/edit image": "\u63d2\u5165\/\u7f16\u8f91\u56fe\u7247", -"Image description": "\u56fe\u7247\u63cf\u8ff0", -"Source": "\u5730\u5740", -"Dimensions": "\u5927\u5c0f", -"Constrain proportions": "\u4fdd\u6301\u7eb5\u6a2a\u6bd4", -"General": "\u666e\u901a", -"Advanced": "\u9ad8\u7ea7", -"Style": "\u6837\u5f0f", -"Vertical space": "\u5782\u76f4\u8fb9\u8ddd", -"Horizontal space": "\u6c34\u5e73\u8fb9\u8ddd", -"Border": "\u8fb9\u6846", -"Insert image": "\u63d2\u5165\u56fe\u7247", -"Image": "\u56fe\u7247", -"Image list": "\u56fe\u7247\u5217\u8868", -"Rotate counterclockwise": "\u9006\u65f6\u9488\u65cb\u8f6c", -"Rotate clockwise": "\u987a\u65f6\u9488\u65cb\u8f6c", -"Flip vertically": "\u5782\u76f4\u7ffb\u8f6c", -"Flip horizontally": "\u6c34\u5e73\u7ffb\u8f6c", -"Edit image": "\u7f16\u8f91\u56fe\u7247", -"Image options": "\u56fe\u7247\u9009\u9879", -"Zoom in": "\u653e\u5927", -"Zoom out": "\u7f29\u5c0f", -"Crop": "\u88c1\u526a", -"Resize": "\u8c03\u6574\u5927\u5c0f", -"Orientation": "\u65b9\u5411", -"Brightness": "\u4eae\u5ea6", -"Sharpen": "\u9510\u5316", -"Contrast": "\u5bf9\u6bd4\u5ea6", -"Color levels": "\u989c\u8272\u5c42\u6b21", -"Gamma": "\u4f3d\u9a6c\u503c", -"Invert": "\u53cd\u8f6c", -"Apply": "\u5e94\u7528", -"Back": "\u540e\u9000", -"Insert date\/time": "\u63d2\u5165\u65e5\u671f\/\u65f6\u95f4", -"Date\/time": "\u65e5\u671f\/\u65f6\u95f4", -"Insert link": "\u63d2\u5165\u94fe\u63a5", -"Insert\/edit link": "\u63d2\u5165\/\u7f16\u8f91\u94fe\u63a5", -"Text to display": "\u663e\u793a\u6587\u5b57", -"Url": "\u5730\u5740", -"Target": "\u6253\u5f00\u65b9\u5f0f", -"None": "\u65e0", -"New window": "\u5728\u65b0\u7a97\u53e3\u6253\u5f00", -"Remove link": "\u5220\u9664\u94fe\u63a5", -"Anchors": "\u951a\u70b9", -"Link": "\u94fe\u63a5", -"Paste or type a link": "\u7c98\u8d34\u6216\u8f93\u5165\u94fe\u63a5", -"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u4e3a\u90ae\u4ef6\u5730\u5740\uff0c\u9700\u8981\u52a0\u4e0amailto:\u524d\u7f00\u5417\uff1f", -"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u5c5e\u4e8e\u5916\u90e8\u94fe\u63a5\uff0c\u9700\u8981\u52a0\u4e0ahttp:\/\/:\u524d\u7f00\u5417\uff1f", -"Link list": "\u94fe\u63a5\u5217\u8868", -"Insert video": "\u63d2\u5165\u89c6\u9891", -"Insert\/edit video": "\u63d2\u5165\/\u7f16\u8f91\u89c6\u9891", -"Insert\/edit media": "\u63d2\u5165\/\u7f16\u8f91\u5a92\u4f53", -"Alternative source": "\u955c\u50cf", -"Poster": "\u5c01\u9762", -"Paste your embed code below:": "\u5c06\u5185\u5d4c\u4ee3\u7801\u7c98\u8d34\u5728\u4e0b\u9762:", -"Embed": "\u5185\u5d4c", -"Media": "\u5a92\u4f53", -"Nonbreaking space": "\u4e0d\u95f4\u65ad\u7a7a\u683c", -"Page break": "\u5206\u9875\u7b26", -"Paste as text": "\u7c98\u8d34\u4e3a\u6587\u672c", -"Preview": "\u9884\u89c8", -"Print": "\u6253\u5370", -"Save": "\u4fdd\u5b58", -"Find": "\u67e5\u627e", -"Replace with": "\u66ff\u6362\u4e3a", -"Replace": "\u66ff\u6362", -"Replace all": "\u5168\u90e8\u66ff\u6362", -"Prev": "\u4e0a\u4e00\u4e2a", -"Next": "\u4e0b\u4e00\u4e2a", -"Find and replace": "\u67e5\u627e\u548c\u66ff\u6362", -"Could not find the specified string.": "\u672a\u627e\u5230\u641c\u7d22\u5185\u5bb9.", -"Match case": "\u533a\u5206\u5927\u5c0f\u5199", -"Whole words": "\u5168\u5b57\u5339\u914d", -"Spellcheck": "\u62fc\u5199\u68c0\u67e5", -"Ignore": "\u5ffd\u7565", -"Ignore all": "\u5168\u90e8\u5ffd\u7565", -"Finish": "\u5b8c\u6210", -"Add to Dictionary": "\u6dfb\u52a0\u5230\u5b57\u5178", -"Insert table": "\u63d2\u5165\u8868\u683c", -"Table properties": "\u8868\u683c\u5c5e\u6027", -"Delete table": "\u5220\u9664\u8868\u683c", -"Cell": "\u5355\u5143\u683c", -"Row": "\u884c", -"Column": "\u5217", -"Cell properties": "\u5355\u5143\u683c\u5c5e\u6027", -"Merge cells": "\u5408\u5e76\u5355\u5143\u683c", -"Split cell": "\u62c6\u5206\u5355\u5143\u683c", -"Insert row before": "\u5728\u4e0a\u65b9\u63d2\u5165", -"Insert row after": "\u5728\u4e0b\u65b9\u63d2\u5165", -"Delete row": "\u5220\u9664\u884c", -"Row properties": "\u884c\u5c5e\u6027", -"Cut row": "\u526a\u5207\u884c", -"Copy row": "\u590d\u5236\u884c", -"Paste row before": "\u7c98\u8d34\u5230\u4e0a\u65b9", -"Paste row after": "\u7c98\u8d34\u5230\u4e0b\u65b9", -"Insert column before": "\u5728\u5de6\u4fa7\u63d2\u5165", -"Insert column after": "\u5728\u53f3\u4fa7\u63d2\u5165", -"Delete column": "\u5220\u9664\u5217", -"Cols": "\u5217", -"Rows": "\u884c", -"Width": "\u5bbd", -"Height": "\u9ad8", -"Cell spacing": "\u5355\u5143\u683c\u5916\u95f4\u8ddd", -"Cell padding": "\u5355\u5143\u683c\u5185\u8fb9\u8ddd", -"Caption": "\u6807\u9898", -"Left": "\u5de6\u5bf9\u9f50", -"Center": "\u5c45\u4e2d", -"Right": "\u53f3\u5bf9\u9f50", -"Cell type": "\u5355\u5143\u683c\u7c7b\u578b", -"Scope": "\u8303\u56f4", -"Alignment": "\u5bf9\u9f50\u65b9\u5f0f", -"H Align": "\u6c34\u5e73\u5bf9\u9f50", -"V Align": "\u5782\u76f4\u5bf9\u9f50", -"Top": "\u9876\u90e8\u5bf9\u9f50", -"Middle": "\u5782\u76f4\u5c45\u4e2d", -"Bottom": "\u5e95\u90e8\u5bf9\u9f50", -"Header cell": "\u8868\u5934\u5355\u5143\u683c", -"Row group": "\u884c\u7ec4", -"Column group": "\u5217\u7ec4", -"Row type": "\u884c\u7c7b\u578b", -"Header": "\u8868\u5934", -"Body": "\u8868\u4f53", -"Footer": "\u8868\u5c3e", -"Border color": "\u8fb9\u6846\u989c\u8272", -"Insert template": "\u63d2\u5165\u6a21\u677f", -"Templates": "\u6a21\u677f", -"Template": "\u6a21\u677f", -"Text color": "\u6587\u5b57\u989c\u8272", -"Background color": "\u80cc\u666f\u8272", -"Custom...": "\u81ea\u5b9a\u4e49...", -"Custom color": "\u81ea\u5b9a\u4e49\u989c\u8272", -"No color": "\u65e0", -"Table of Contents": "\u5185\u5bb9\u5217\u8868", -"Show blocks": "\u663e\u793a\u533a\u5757\u8fb9\u6846", -"Show invisible characters": "\u663e\u793a\u4e0d\u53ef\u89c1\u5b57\u7b26", -"Words: {0}": "\u5b57\u6570\uff1a{0}", -"{0} words": "{0} \u5b57", -"File": "\u6587\u4ef6", -"Edit": "\u7f16\u8f91", -"Insert": "\u63d2\u5165", -"View": "\u89c6\u56fe", -"Format": "\u683c\u5f0f", -"Table": "\u8868\u683c", -"Tools": "\u5de5\u5177", -"Powered by {0}": "\u7531{0}\u9a71\u52a8", -"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "\u5728\u7f16\u8f91\u533a\u6309ALT-F9\u6253\u5f00\u83dc\u5355\uff0c\u6309ALT-F10\u6253\u5f00\u5de5\u5177\u680f\uff0c\u6309ALT-0\u67e5\u770b\u5e2e\u52a9" -}); \ No newline at end of file +tinymce.addI18n('zh_CN', { + Redo: '\u91cd\u590d', + Undo: '\u64a4\u6d88', + Cut: '\u526a\u5207', + Copy: '\u590d\u5236', + Paste: '\u7c98\u8d34', + 'Select all': '\u5168\u9009', + 'New document': '\u65b0\u6587\u6863', + Ok: '\u786e\u5b9a', + Cancel: '\u53d6\u6d88', + 'Visual aids': '\u7f51\u683c\u7ebf', + Bold: '\u7c97\u4f53', + Italic: '\u659c\u4f53', + Underline: '\u4e0b\u5212\u7ebf', + Strikethrough: '\u5220\u9664\u7ebf', + Superscript: '\u4e0a\u6807', + Subscript: '\u4e0b\u6807', + 'Clear formatting': '\u6e05\u9664\u683c\u5f0f', + 'Align left': '\u5de6\u5bf9\u9f50', + 'Align center': '\u5c45\u4e2d', + 'Align right': '\u53f3\u5bf9\u9f50', + Justify: '\u4e24\u7aef\u5bf9\u9f50', + 'Bullet list': '\u9879\u76ee\u7b26\u53f7', + 'Numbered list': '\u7f16\u53f7\u5217\u8868', + 'Decrease indent': '\u51cf\u5c11\u7f29\u8fdb', + 'Increase indent': '\u589e\u52a0\u7f29\u8fdb', + Close: '\u5173\u95ed', + Formats: '\u683c\u5f0f', + "Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": '\u4f60\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u5bf9\u526a\u8d34\u677f\u7684\u8bbf\u95ee\uff0c\u8bf7\u4f7f\u7528Ctrl+X\/C\/V\u952e\u8fdb\u884c\u590d\u5236\u7c98\u8d34\u3002', + Headers: '\u6807\u9898', + 'Header 1': '\u6807\u98981', + 'Header 2': '\u6807\u98982', + 'Header 3': '\u6807\u98983', + 'Header 4': '\u6807\u98984', + 'Header 5': '\u6807\u98985', + 'Header 6': '\u6807\u98986', + Headings: '\u6807\u9898', + 'Heading 1': '\u6807\u98981', + 'Heading 2': '\u6807\u98982', + 'Heading 3': '\u6807\u98983', + 'Heading 4': '\u6807\u98984', + 'Heading 5': '\u6807\u98985', + 'Heading 6': '\u6807\u98986', + Preformatted: '\u9884\u683c\u5f0f\u5316', + Div: 'Div\u533a\u5757', + Pre: '\u9884\u683c\u5f0f\u6587\u672c', + Code: '\u4ee3\u7801', + Paragraph: '\u6bb5\u843d', + Blockquote: '\u5f15\u7528', + Inline: '\u6587\u672c', + Blocks: '\u533a\u5757', + 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.': '\u5f53\u524d\u4e3a\u7eaf\u6587\u672c\u7c98\u8d34\u6a21\u5f0f\uff0c\u518d\u6b21\u70b9\u51fb\u53ef\u4ee5\u56de\u5230\u666e\u901a\u7c98\u8d34\u6a21\u5f0f\u3002', + 'Font Family': '\u5b57\u4f53', + 'Font Sizes': '\u5b57\u53f7', + Class: 'Class', + 'Browse for an image': '\u6d4f\u89c8\u56fe\u50cf', + OR: '\u6216', + 'Drop an image here': '\u62d6\u653e\u4e00\u5f20\u56fe\u50cf\u81f3\u6b64', + Upload: '\u4e0a\u4f20', + Block: '\u5757', + Align: '\u5bf9\u9f50', + Default: '\u9ed8\u8ba4', + Circle: '\u7a7a\u5fc3\u5706', + Disc: '\u5b9e\u5fc3\u5706', + Square: '\u65b9\u5757', + 'Lower Alpha': '\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd', + 'Lower Greek': '\u5c0f\u5199\u5e0c\u814a\u5b57\u6bcd', + 'Lower Roman': '\u5c0f\u5199\u7f57\u9a6c\u5b57\u6bcd', + 'Upper Alpha': '\u5927\u5199\u82f1\u6587\u5b57\u6bcd', + 'Upper Roman': '\u5927\u5199\u7f57\u9a6c\u5b57\u6bcd', + Anchor: '\u951a\u70b9', + Name: '\u540d\u79f0', + Id: '\u6807\u8bc6\u7b26', + 'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.': '\u6807\u8bc6\u7b26\u5e94\u8be5\u4ee5\u5b57\u6bcd\u5f00\u5934\uff0c\u540e\u8ddf\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u7834\u6298\u53f7\u3001\u70b9\u3001\u5192\u53f7\u6216\u4e0b\u5212\u7ebf\u3002', + 'You have unsaved changes are you sure you want to navigate away?': '\u4f60\u8fd8\u6709\u6587\u6863\u5c1a\u672a\u4fdd\u5b58\uff0c\u786e\u5b9a\u8981\u79bb\u5f00\uff1f', + 'Restore last draft': '\u6062\u590d\u4e0a\u6b21\u7684\u8349\u7a3f', + 'Special character': '\u7279\u6b8a\u7b26\u53f7', + 'Source code': '\u6e90\u4ee3\u7801', + 'Insert\/Edit code sample': '\u63d2\u5165\/\u7f16\u8f91\u4ee3\u7801\u793a\u4f8b', + Language: '\u8bed\u8a00', + 'Code sample': '\u4ee3\u7801\u793a\u4f8b', + Color: '\u989c\u8272', + R: 'R', + G: 'G', + B: 'B', + 'Left to right': '\u4ece\u5de6\u5230\u53f3', + 'Right to left': '\u4ece\u53f3\u5230\u5de6', + Emoticons: '\u8868\u60c5', + 'Document properties': '\u6587\u6863\u5c5e\u6027', + Title: '\u6807\u9898', + Keywords: '\u5173\u952e\u8bcd', + Description: '\u63cf\u8ff0', + Robots: '\u673a\u5668\u4eba', + Author: '\u4f5c\u8005', + Encoding: '\u7f16\u7801', + Fullscreen: '\u5168\u5c4f', + Action: '\u64cd\u4f5c', + Shortcut: '\u5feb\u6377\u952e', + Help: '\u5e2e\u52a9', + Address: '\u5730\u5740', + 'Focus to menubar': '\u79fb\u52a8\u7126\u70b9\u5230\u83dc\u5355\u680f', + 'Focus to toolbar': '\u79fb\u52a8\u7126\u70b9\u5230\u5de5\u5177\u680f', + 'Focus to element path': '\u79fb\u52a8\u7126\u70b9\u5230\u5143\u7d20\u8def\u5f84', + 'Focus to contextual toolbar': '\u79fb\u52a8\u7126\u70b9\u5230\u4e0a\u4e0b\u6587\u83dc\u5355', + 'Insert link (if link plugin activated)': '\u63d2\u5165\u94fe\u63a5 (\u5982\u679c\u94fe\u63a5\u63d2\u4ef6\u5df2\u6fc0\u6d3b)', + 'Save (if save plugin activated)': '\u4fdd\u5b58(\u5982\u679c\u4fdd\u5b58\u63d2\u4ef6\u5df2\u6fc0\u6d3b)', + 'Find (if searchreplace plugin activated)': '\u67e5\u627e(\u5982\u679c\u67e5\u627e\u66ff\u6362\u63d2\u4ef6\u5df2\u6fc0\u6d3b)', + 'Plugins installed ({0}):': '\u5df2\u5b89\u88c5\u63d2\u4ef6 ({0}):', + 'Premium plugins:': '\u4f18\u79c0\u63d2\u4ef6\uff1a', + 'Learn more...': '\u4e86\u89e3\u66f4\u591a...', + 'You are using {0}': '\u4f60\u6b63\u5728\u4f7f\u7528 {0}', + Plugins: '\u63d2\u4ef6', + 'Handy Shortcuts': '\u5feb\u6377\u952e', + 'Horizontal line': '\u6c34\u5e73\u5206\u5272\u7ebf', + 'Insert\/edit image': '\u63d2\u5165\/\u7f16\u8f91\u56fe\u7247', + 'Image description': '\u56fe\u7247\u63cf\u8ff0', + Source: '\u5730\u5740', + Dimensions: '\u5927\u5c0f', + 'Constrain proportions': '\u4fdd\u6301\u7eb5\u6a2a\u6bd4', + General: '\u666e\u901a', + Advanced: '\u9ad8\u7ea7', + Style: '\u6837\u5f0f', + 'Vertical space': '\u5782\u76f4\u8fb9\u8ddd', + 'Horizontal space': '\u6c34\u5e73\u8fb9\u8ddd', + Border: '\u8fb9\u6846', + 'Insert image': '\u63d2\u5165\u56fe\u7247', + Image: '\u56fe\u7247', + 'Image list': '\u56fe\u7247\u5217\u8868', + 'Rotate counterclockwise': '\u9006\u65f6\u9488\u65cb\u8f6c', + 'Rotate clockwise': '\u987a\u65f6\u9488\u65cb\u8f6c', + 'Flip vertically': '\u5782\u76f4\u7ffb\u8f6c', + 'Flip horizontally': '\u6c34\u5e73\u7ffb\u8f6c', + 'Edit image': '\u7f16\u8f91\u56fe\u7247', + 'Image options': '\u56fe\u7247\u9009\u9879', + 'Zoom in': '\u653e\u5927', + 'Zoom out': '\u7f29\u5c0f', + Crop: '\u88c1\u526a', + Resize: '\u8c03\u6574\u5927\u5c0f', + Orientation: '\u65b9\u5411', + Brightness: '\u4eae\u5ea6', + Sharpen: '\u9510\u5316', + Contrast: '\u5bf9\u6bd4\u5ea6', + 'Color levels': '\u989c\u8272\u5c42\u6b21', + Gamma: '\u4f3d\u9a6c\u503c', + Invert: '\u53cd\u8f6c', + Apply: '\u5e94\u7528', + Back: '\u540e\u9000', + 'Insert date\/time': '\u63d2\u5165\u65e5\u671f\/\u65f6\u95f4', + 'Date\/time': '\u65e5\u671f\/\u65f6\u95f4', + 'Insert link': '\u63d2\u5165\u94fe\u63a5', + 'Insert\/edit link': '\u63d2\u5165\/\u7f16\u8f91\u94fe\u63a5', + 'Text to display': '\u663e\u793a\u6587\u5b57', + Url: '\u5730\u5740', + Target: '\u6253\u5f00\u65b9\u5f0f', + None: '\u65e0', + 'New window': '\u5728\u65b0\u7a97\u53e3\u6253\u5f00', + 'Remove link': '\u5220\u9664\u94fe\u63a5', + Anchors: '\u951a\u70b9', + Link: '\u94fe\u63a5', + 'Paste or type a link': '\u7c98\u8d34\u6216\u8f93\u5165\u94fe\u63a5', + 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?': '\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u4e3a\u90ae\u4ef6\u5730\u5740\uff0c\u9700\u8981\u52a0\u4e0amailto:\u524d\u7f00\u5417\uff1f', + 'The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?': '\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u5c5e\u4e8e\u5916\u90e8\u94fe\u63a5\uff0c\u9700\u8981\u52a0\u4e0ahttp:\/\/:\u524d\u7f00\u5417\uff1f', + 'Link list': '\u94fe\u63a5\u5217\u8868', + 'Insert video': '\u63d2\u5165\u89c6\u9891', + 'Insert\/edit video': '\u63d2\u5165\/\u7f16\u8f91\u89c6\u9891', + 'Insert\/edit media': '\u63d2\u5165\/\u7f16\u8f91\u5a92\u4f53', + 'Alternative source': '\u955c\u50cf', + Poster: '\u5c01\u9762', + 'Paste your embed code below:': '\u5c06\u5185\u5d4c\u4ee3\u7801\u7c98\u8d34\u5728\u4e0b\u9762:', + Embed: '\u5185\u5d4c', + Media: '\u5a92\u4f53', + 'Nonbreaking space': '\u4e0d\u95f4\u65ad\u7a7a\u683c', + 'Page break': '\u5206\u9875\u7b26', + 'Paste as text': '\u7c98\u8d34\u4e3a\u6587\u672c', + Preview: '\u9884\u89c8', + Print: '\u6253\u5370', + Save: '\u4fdd\u5b58', + Find: '\u67e5\u627e', + 'Replace with': '\u66ff\u6362\u4e3a', + Replace: '\u66ff\u6362', + 'Replace all': '\u5168\u90e8\u66ff\u6362', + Prev: '\u4e0a\u4e00\u4e2a', + Next: '\u4e0b\u4e00\u4e2a', + 'Find and replace': '\u67e5\u627e\u548c\u66ff\u6362', + 'Could not find the specified string.': '\u672a\u627e\u5230\u641c\u7d22\u5185\u5bb9.', + 'Match case': '\u533a\u5206\u5927\u5c0f\u5199', + 'Whole words': '\u5168\u5b57\u5339\u914d', + Spellcheck: '\u62fc\u5199\u68c0\u67e5', + Ignore: '\u5ffd\u7565', + 'Ignore all': '\u5168\u90e8\u5ffd\u7565', + Finish: '\u5b8c\u6210', + 'Add to Dictionary': '\u6dfb\u52a0\u5230\u5b57\u5178', + 'Insert table': '\u63d2\u5165\u8868\u683c', + 'Table properties': '\u8868\u683c\u5c5e\u6027', + 'Delete table': '\u5220\u9664\u8868\u683c', + Cell: '\u5355\u5143\u683c', + Row: '\u884c', + Column: '\u5217', + 'Cell properties': '\u5355\u5143\u683c\u5c5e\u6027', + 'Merge cells': '\u5408\u5e76\u5355\u5143\u683c', + 'Split cell': '\u62c6\u5206\u5355\u5143\u683c', + 'Insert row before': '\u5728\u4e0a\u65b9\u63d2\u5165', + 'Insert row after': '\u5728\u4e0b\u65b9\u63d2\u5165', + 'Delete row': '\u5220\u9664\u884c', + 'Row properties': '\u884c\u5c5e\u6027', + 'Cut row': '\u526a\u5207\u884c', + 'Copy row': '\u590d\u5236\u884c', + 'Paste row before': '\u7c98\u8d34\u5230\u4e0a\u65b9', + 'Paste row after': '\u7c98\u8d34\u5230\u4e0b\u65b9', + 'Insert column before': '\u5728\u5de6\u4fa7\u63d2\u5165', + 'Insert column after': '\u5728\u53f3\u4fa7\u63d2\u5165', + 'Delete column': '\u5220\u9664\u5217', + Cols: '\u5217', + Rows: '\u884c', + Width: '\u5bbd', + Height: '\u9ad8', + 'Cell spacing': '\u5355\u5143\u683c\u5916\u95f4\u8ddd', + 'Cell padding': '\u5355\u5143\u683c\u5185\u8fb9\u8ddd', + Caption: '\u6807\u9898', + Left: '\u5de6\u5bf9\u9f50', + Center: '\u5c45\u4e2d', + Right: '\u53f3\u5bf9\u9f50', + 'Cell type': '\u5355\u5143\u683c\u7c7b\u578b', + Scope: '\u8303\u56f4', + Alignment: '\u5bf9\u9f50\u65b9\u5f0f', + 'H Align': '\u6c34\u5e73\u5bf9\u9f50', + 'V Align': '\u5782\u76f4\u5bf9\u9f50', + Top: '\u9876\u90e8\u5bf9\u9f50', + Middle: '\u5782\u76f4\u5c45\u4e2d', + Bottom: '\u5e95\u90e8\u5bf9\u9f50', + 'Header cell': '\u8868\u5934\u5355\u5143\u683c', + 'Row group': '\u884c\u7ec4', + 'Column group': '\u5217\u7ec4', + 'Row type': '\u884c\u7c7b\u578b', + Header: '\u8868\u5934', + Body: '\u8868\u4f53', + Footer: '\u8868\u5c3e', + 'Border color': '\u8fb9\u6846\u989c\u8272', + 'Insert template': '\u63d2\u5165\u6a21\u677f', + Templates: '\u6a21\u677f', + Template: '\u6a21\u677f', + 'Text color': '\u6587\u5b57\u989c\u8272', + 'Background color': '\u80cc\u666f\u8272', + 'Custom...': '\u81ea\u5b9a\u4e49...', + 'Custom color': '\u81ea\u5b9a\u4e49\u989c\u8272', + 'No color': '\u65e0', + 'Table of Contents': '\u5185\u5bb9\u5217\u8868', + 'Show blocks': '\u663e\u793a\u533a\u5757\u8fb9\u6846', + 'Show invisible characters': '\u663e\u793a\u4e0d\u53ef\u89c1\u5b57\u7b26', + 'Words: {0}': '\u5b57\u6570\uff1a{0}', + '{0} words': '{0} \u5b57', + File: '\u6587\u4ef6', + Edit: '\u7f16\u8f91', + Insert: '\u63d2\u5165', + View: '\u89c6\u56fe', + Format: '\u683c\u5f0f', + Table: '\u8868\u683c', + Tools: '\u5de5\u5177', + 'Powered by {0}': '\u7531{0}\u9a71\u52a8', + 'Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help': '\u5728\u7f16\u8f91\u533a\u6309ALT-F9\u6253\u5f00\u83dc\u5355\uff0c\u6309ALT-F10\u6253\u5f00\u5de5\u5177\u680f\uff0c\u6309ALT-0\u67e5\u770b\u5e2e\u52a9' +}) diff --git a/jero-web/public/v2.js b/jero-web/public/v2.js index ce047282..4e02f27d 100644 --- a/jero-web/public/v2.js +++ b/jero-web/public/v2.js @@ -1 +1 @@ -!function(){"use strict";function e(e){return e===undefined||null===e}function t(e){return e!==undefined&&null!==e}function n(e){return null!==e&&"object"===(void 0===e?"undefined":d(e))}function r(e){return"object"===(void 0===e?"undefined":d(e))&&e instanceof HTMLElement}function o(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function i(){return new RegExp("MSIE (\\d+\\.\\d+);").test(navigator.userAgent),parseFloat(RegExp.$1)||Infinity}function a(e,t){for(var n in t)e[n]=t[n];return e}function c(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}function u(e){return p.call(e).slice(8,-1)}function s(e){throw new Error("Vaptcha error: "+e)}function l(e){var t=e.mode,n=e.outage;return!!t&&"downtime"===(t=t.toLowerCase())&&!!n}function Promise(e){var t=this;this.state="pending",this.value=undefined,this.reason=undefined,this.onResolveAsyncCallbacks=[],this.onRejectAsyncCallbacks=[];var n=function(e){"pending"===t.state&&(t.state="fulfilled",t.value=e,t.onResolveAsyncCallbacks.map(function(e){return e()}))},r=function(e){"pending"===t.state&&(t.state="rejected",t.reason=e,t.onRejectAsyncCallbacks.map(function(t){return t(e)}))};try{e(n,r)}catch(o){r(o)}}window.HTMLElement=window.HTMLElement||Element,Array.prototype.map||(Array.prototype.map=function(e,t){var n,r,o;if(null==this)throw new TypeError(" this is null or not defined");var i=Object(this),a=i.length>>>0;if("[object Function]"!=Object.prototype.toString.call(e))throw new TypeError(e+" is not a function");for(t&&(n=t),r=new Array(a),o=0;o>>0;if(0===r)return!1;for(var o=0|t,i=Math.max(o>=0?o:r-Math.abs(o),0);i>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],o=0;o-1||r.indexOf("https://")>-1;return r.indexOf("?")<0&&(i="?"+i.slice(1)),a?""+r+i:""+e+t+r+i},o=function(e){var t=document.getElementsByTagName("head")[0],n=document.createElement("script");return n.charset="UTF-8",n.src=e,t.appendChild(n),{remove:function(){t.removeChild(n)}}},i=function(e,t){return t=t||{},new Promise(function(n){var i="VaptchaJsonp"+(new Date).valueOf();window[i]&&(i+="1"),a(t,{callback:i}),e=r(e,t);var c=o(e),u=setTimeout(function(){clearTimeout(u),window[i]=null,c.remove(),n({code:"0703",msg:"Time out,Refresh Again!"})},1e4);window[i]=function(){clearTimeout(u),n.apply(this,arguments),c.remove(),window[i]=null}})};return i.setConfig=function(n){e=n.protocol||e,t=n.api_server||t},i}(),g={getConfig:function(e){return y("/config",{id:e.vid,type:e.type,scene:e.scene||""})},refresh:function(e){return y("/refresh",e)},click:function(e){return y("/click",e)},get:function(e){return y("/get",e)},verify:function(e){return y("/verify",e)},userbehavior:function(e){return y("/userbehavior",e)}},w={"0201":"id empty","0202":"id error","0208":"scene error","0209":"request used up","0906":"params error","0702":"domain not match"},b=function(){var o=!1,c=function(e){var t=new v(e);return t.add("outage","required","please configure outage"),t.validate(),a(e,{js_path:"vaptcha-sdk-downtime.2.0.2.js",api_server:window.location.host,protocol:window.location.protocol+"//",mode:"DownTime"}),y.setConfig(e),y(e.outage,{action:"get"}).then(function(t){return t.code!==m.Success?(s(w[t.msg]||t.msg),Promise.reject(t.code)):(a(e,t),Promise.resolve())})},f=function(e){return l(e)?c(e):g.getConfig(e).then(function(t){return t.code!==m.Success?(s(w[t.msg]||t.msg),Promise.reject(t.code)):(t.type!==e.type&&(t.mode=t.type,t.type=e.type),a(e,t),l(e)?c(e):Promise.resolve())})},d=function(e,t){return""+e.protocol+e.cdn_servers[0]+"/"+t},p=function(t){var n=document.getElementsByTagName("head")[0],r=document.getElementById("vaptcha_style");return new Promise(function(o){e(r)?(r=document.createElement("link"),a(r,{rel:"stylesheet",type:"text/css",href:t,id:"vaptcha_style",onload:o}),n&&n.appendChild(r)):o()})},b=function C(e){var n=document.getElementsByTagName("head")[0],r=document.querySelector("script[src='"+e+"']");return new Promise(function(o){if(t(r))return void(r.loaded?o():setTimeout(function(){return C(e).then(o)}));r=document.createElement("script");var i=function(){r.readyState&&"loaded"!==r.readyState&&"complete"!==r.readyState||(o(),r.loaded=!0,r.onload=null,r.onreadystatechange=null)};a(r,{async:!0,charset:"utf-8",src:e,onerror:function(){return s("load sdk timeout")},onload:i,onreadystatechange:i}),n.appendChild(r)})},j=function T(e){var t=e.sdkName,n=e.config,r=d(n,n.js_path);return b(r).then(function(){var e=window["_"+h(t)+"Vaptcha"],r=new e(n);return r.vaptcha.resetCaptcha=function(e,t){a(n,t),T({sdkName:e,config:n}).then(function(e){r.destroy(),r.options=e.options,r.vaptcha=e.vaptcha,e.render(),"character"===n.mode&&["click","float","popup"].includes(n.type)&&e.vaptcha.dtClickCb({target:e.vaptcha.btnDiv})})},Promise.resolve(r)})},A=function(e){o=!0,e.https=!0,e.protocol="https://",y.setConfig(e),!["embed","popup","invisible"].includes(e.type)&&(e.type="popup"),i()<9&&b(d(e,e.canvas_path));var t=new v(e);if(t.addValidateRules({elementOrSelector:function(t,o){if("String"===u(e.container)&&(e.container=document.querySelector(e.container)),n(e.container)&&r(e.container[0])&&(e.container=e.container[0]),!r(e.container))return o}}),t.add("vid","required","please configure vid"),"invisible"!==e.type&&t.add("container","elementOrSelector","please configure container with element or selector"),t.validate())return f(e).then(function(){var t="theme_https."+e.css_version+".css",n=d(e,t);return p(n)}).then(function(){var t=e.mode||e.type;return o=!1,j({sdkName:t,config:e})})};return function S(e){return new Promise(function(t){o?setTimeout(function(){S(e).then(t)},1e3):A(e).then(t)})["catch"](function(e){return o=!1,s(e),Promise.reject(e)})}}(),j=function(){var e=function(e){var n=e.getAttribute("data-config"),r={};if(t(n))try{r=JSON.parse(n)}catch(o){s("dom config format error")}return r},n=function(e){var n=e.getAttribute("data-vid");return t(n)?{vid:n}:{}},r=function(e,n){var r=Object.create(f);r.container=e,a(r,n),t(r.vid)&&b(r).then(function(e){e.renderTokenInput(),e.render()})};return function(){for(var t=document.querySelectorAll("[data-vid]"),o=document.querySelectorAll("[data-config]"),i=0;i>> 0; if (Object.prototype.toString.call(e) != '[object Function]') throw new TypeError(e + ' is not a function'); for (t && (n = t), r = new Array(a), o = 0; o < a;) { var c, u; o in i && (c = i[o], u = e.call(n, c, o, i), r[o] = u), o++ } return r }), Array.prototype.includes || (Array.prototype.includes = function (e, t) { if (this == null) throw new TypeError('"this" is null or not defined'); var n = Object(this); var r = n.length >>> 0; if (r === 0) return !1; for (var o = 0 | t, i = Math.max(o >= 0 ? o : r - Math.abs(o), 0); i < r;) { if (n[i] === e) return !0; i++ } return !1 }), Array.prototype.findIndex || (Array.prototype.findIndex = function (e) { if (this == null) throw new TypeError('"this" is null or not defined'); var t = Object(this); var n = t.length >>> 0; if (typeof e !== 'function') throw new TypeError('predicate must be a function'); for (var r = arguments[1], o = 0; o < n;) { if (e.call(r, t[o], o, t)) return o; o++ } return -1 }), Object.create || (Object.create = function (e) { var t = function () {}; return t.prototype = e, new t() }); var f = { vid: null, scene: '', container: null, type: 'float', style: 'dark', lang: 'zh-CN', ai: !0, https: !0, guide: !0, aiAnimation: !0, protocol: 'https://', css_version: 'downtime', cdn_servers: ['cdn.vaptcha.com'], api_server: 'api.vaptcha.com/v2', canvas_path: '/canvas.min.js' }; var d = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (e) { return typeof e } : function (e) { return e && typeof Symbol === 'function' && e.constructor === Symbol && e !== Symbol.prototype ? 'symbol' : typeof e }; var p = Object.prototype.toString; var h = (c(function (e) { for (var t = {}, n = e && e.indexOf('?') !== -1 && e.split('?')[1] || window.location.search.substring(1), r = n.split('&'), o = 0; o < r.length; o++) { var i = r[o].split('='); t[decodeURIComponent(i[0])] = decodeURIComponent(i[1]) } return t }), c(function (e) { return e.charAt(0).toUpperCase() + e.slice(1) })); var v = function (t) { this.data = t, this.valiudateFuns = [], this.ruleFuns = { required: function (t, n) { return e(t) || t.length === 0 ? n : null } } }; v.prototype = { constructor: v, addValidateRules: function (e) { a(this.ruleFuns, e) }, add: function (e, t, n) { var r = this; var o = t.split(':'); var i = o.shift(); var a = this.ruleFuns[i]; o.unshift(this.data[e]), o.push(n), a && this.valiudateFuns.push(function () { return a.apply(r, o) }) }, validate: function () { for (var e, t = 0; e = this.valiudateFuns[t++];) { var n = e(); if (n) return s(n), !1 } return !0 } }; var m = { AccessDenied: '0101', RefreshAgain: '0102', Success: '0103', Fail: '0104', RefreshTooFast: '0105', RefreshTanto: '0106', DrawTanto: '0107', Attack: '0108', jsonpTimeOut: '0703', challengeExpire: '1002' }; Promise.prototype.then = function (e) { var t = this; if (this.state === 'fulfilled') { var r = e(this.value); if (n(r) && o(r.constructor) === 'Promise') return r } return this.state === 'pending' ? new Promise(function (r) { t.onResolveAsyncCallbacks.push(function () { var i = e(t.value); if (n(i) && o(i.constructor) === 'Promise') return i.then(r); r(i) }) }) : this }, Promise.prototype.catch = function (e) { return this.state === 'rejected' && e(this.reason), this.state === 'pending' && this.onRejectAsyncCallbacks.push(e), this }, Promise.resolve = function (e) { return new Promise(function (t) { t(e) }) }, Promise.reject = function (e) { return new Promise(function (t, n) { n(e) }) }; var y = (function () { var e = f.protocol; var t = f.api_server; var n = function (e) { var t = ''; for (var n in e)Object.prototype.hasOwnProperty.call(e, n) && (t += '&' + n + '=' + encodeURIComponent(e[n])); return t }; var r = function (r, o) { var i = n(o); var a = r.indexOf('http://') > -1 || r.indexOf('https://') > -1; return r.indexOf('?') < 0 && (i = '?' + i.slice(1)), a ? '' + r + i : '' + e + t + r + i }; var o = function (e) { var t = document.getElementsByTagName('head')[0]; var n = document.createElement('script'); return n.charset = 'UTF-8', n.src = e, t.appendChild(n), { remove: function () { t.removeChild(n) } } }; var i = function (e, t) { return t = t || {}, new Promise(function (n) { var i = 'VaptchaJsonp' + (new Date()).valueOf(); window[i] && (i += '1'), a(t, { callback: i }), e = r(e, t); var c = o(e); var u = setTimeout(function () { clearTimeout(u), window[i] = null, c.remove(), n({ code: '0703', msg: 'Time out,Refresh Again!' }) }, 1e4); window[i] = function () { clearTimeout(u), n.apply(this, arguments), c.remove(), window[i] = null } }) }; return i.setConfig = function (n) { e = n.protocol || e, t = n.api_server || t }, i }()); var g = { getConfig: function (e) { return y('/config', { id: e.vid, type: e.type, scene: e.scene || '' }) }, refresh: function (e) { return y('/refresh', e) }, click: function (e) { return y('/click', e) }, get: function (e) { return y('/get', e) }, verify: function (e) { return y('/verify', e) }, userbehavior: function (e) { return y('/userbehavior', e) } }; var w = { '0201': 'id empty', '0202': 'id error', '0208': 'scene error', '0209': 'request used up', '0906': 'params error', '0702': 'domain not match' }; var b = (function () { var o = !1; var c = function (e) { var t = new v(e); return t.add('outage', 'required', 'please configure outage'), t.validate(), a(e, { js_path: 'vaptcha-sdk-downtime.2.0.2.js', api_server: window.location.host, protocol: window.location.protocol + '//', mode: 'DownTime' }), y.setConfig(e), y(e.outage, { action: 'get' }).then(function (t) { return t.code !== m.Success ? (s(w[t.msg] || t.msg), Promise.reject(t.code)) : (a(e, t), Promise.resolve()) }) }; var f = function (e) { return l(e) ? c(e) : g.getConfig(e).then(function (t) { return t.code !== m.Success ? (s(w[t.msg] || t.msg), Promise.reject(t.code)) : (t.type !== e.type && (t.mode = t.type, t.type = e.type), a(e, t), l(e) ? c(e) : Promise.resolve()) }) }; var d = function (e, t) { return '' + e.protocol + e.cdn_servers[0] + '/' + t }; var p = function (t) { var n = document.getElementsByTagName('head')[0]; var r = document.getElementById('vaptcha_style'); return new Promise(function (o) { e(r) ? (r = document.createElement('link'), a(r, { rel: 'stylesheet', type: 'text/css', href: t, id: 'vaptcha_style', onload: o }), n && n.appendChild(r)) : o() }) }; var b = function C (e) { var n = document.getElementsByTagName('head')[0]; var r = document.querySelector("script[src='" + e + "']"); return new Promise(function (o) { if (t(r)) return void (r.loaded ? o() : setTimeout(function () { return C(e).then(o) })); r = document.createElement('script'); var i = function () { r.readyState && r.readyState !== 'loaded' && r.readyState !== 'complete' || (o(), r.loaded = !0, r.onload = null, r.onreadystatechange = null) }; a(r, { async: !0, charset: 'utf-8', src: e, onerror: function () { return s('load sdk timeout') }, onload: i, onreadystatechange: i }), n.appendChild(r) }) }; var j = function T (e) { var t = e.sdkName; var n = e.config; var r = d(n, n.js_path); return b(r).then(function () { var e = window['_' + h(t) + 'Vaptcha']; var r = new e(n); return r.vaptcha.resetCaptcha = function (e, t) { a(n, t), T({ sdkName: e, config: n }).then(function (e) { r.destroy(), r.options = e.options, r.vaptcha = e.vaptcha, e.render(), n.mode === 'character' && ['click', 'float', 'popup'].includes(n.type) && e.vaptcha.dtClickCb({ target: e.vaptcha.btnDiv }) }) }, Promise.resolve(r) }) }; var A = function (e) { o = !0, e.https = !0, e.protocol = 'https://', y.setConfig(e), !['embed', 'popup', 'invisible'].includes(e.type) && (e.type = 'popup'), i() < 9 && b(d(e, e.canvas_path)); var t = new v(e); if (t.addValidateRules({ elementOrSelector: function (t, o) { if (u(e.container) === 'String' && (e.container = document.querySelector(e.container)), n(e.container) && r(e.container[0]) && (e.container = e.container[0]), !r(e.container)) return o } }), t.add('vid', 'required', 'please configure vid'), e.type !== 'invisible' && t.add('container', 'elementOrSelector', 'please configure container with element or selector'), t.validate()) return f(e).then(function () { var t = 'theme_https.' + e.css_version + '.css'; var n = d(e, t); return p(n) }).then(function () { var t = e.mode || e.type; return o = !1, j({ sdkName: t, config: e }) }) }; return function S (e) { return new Promise(function (t) { o ? setTimeout(function () { S(e).then(t) }, 1e3) : A(e).then(t) }).catch(function (e) { return o = !1, s(e), Promise.reject(e) }) } }()); var j = (function () { var e = function (e) { var n = e.getAttribute('data-config'); var r = {}; if (t(n)) try { r = JSON.parse(n) } catch (o) { s('dom config format error') } return r }; var n = function (e) { var n = e.getAttribute('data-vid'); return t(n) ? { vid: n } : {} }; var r = function (e, n) { var r = Object.create(f); r.container = e, a(r, n), t(r.vid) && b(r).then(function (e) { e.renderTokenInput(), e.render() }) }; return function () { for (var t = document.querySelectorAll('[data-vid]'), o = document.querySelectorAll('[data-config]'), i = 0; i < o.length; i++) { var a = e(o[i]); r(o[i], a) } for (var c = 0; c < t.length; c++) if (!Array.prototype.includes.call(o, t[c])) { var u = n(t[c]); r(t[c], u) } } }()); window.onload = j, window.vaptcha = function (e) { var t = Object.create(f); return a(t, e), b(t) } }()) diff --git a/jero-web/src/App.vue b/jero-web/src/App.vue index 9f4f7a8f..77bfb0a0 100644 --- a/jero-web/src/App.vue +++ b/jero-web/src/App.vue @@ -6,39 +6,37 @@ \ No newline at end of file + diff --git a/jero-web/src/api/GroupRequest.js b/jero-web/src/api/GroupRequest.js index 26881387..defce419 100644 --- a/jero-web/src/api/GroupRequest.js +++ b/jero-web/src/api/GroupRequest.js @@ -7,24 +7,22 @@ import Vue from 'vue' * @param groupId 分组ID,如果不传或者为空则不分组 * @param expire 过期时间,默认 半分钟 */ -export function httpGroupRequest(getPromise, groupId, expire = 1000 * 30) { +export function httpGroupRequest (getPromise, groupId, expire = 1000 * 30) { if (groupId == null || groupId === '') { - console.log("--------popup----------getFrom DB-------with---no--groupId ") + console.log('--------popup----------getFrom DB-------with---no--groupId ') return getPromise() } if (Vue.ls.get(groupId)) { - console.log("---------popup--------getFrom Cache--------groupId = " + groupId) - return Promise.resolve(Vue.ls.get(groupId)); + console.log('---------popup--------getFrom Cache--------groupId = ' + groupId) + return Promise.resolve(Vue.ls.get(groupId)) } else { - console.log("--------popup----------getFrom DB---------groupId = " + groupId) + console.log('--------popup----------getFrom DB---------groupId = ' + groupId) } // 还没有发出请求,就发出第一次的请求 return getPromise().then(res => { - Vue.ls.set(groupId, res, expire); - return Promise.resolve(res); + Vue.ls.set(groupId, res, expire) + return Promise.resolve(res) }) } - - diff --git a/jero-web/src/api/api.js b/jero-web/src/api/api.js index 969c1443..c12d31c3 100644 --- a/jero-web/src/api/api.js +++ b/jero-web/src/api/api.js @@ -1,101 +1,101 @@ import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage' import Vue from 'vue' -import {UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types" +import { UI_CACHE_DB_DICT_DATA } from '@/store/mutation-types' -//角色管理 -const addRole = (params)=>postAction("/sys/role/add",params); -const editRole = (params)=>putAction("/sys/role/edit",params); -const checkRoleCode = (params)=>getAction("/sys/role/checkRoleCode",params); -const queryall = (params)=>getAction("/sys/role/queryall",params); +// 角色管理 +const addRole = (params) => postAction('/sys/role/add', params) +const editRole = (params) => putAction('/sys/role/edit', params) +const checkRoleCode = (params) => getAction('/sys/role/checkRoleCode', params) +const queryall = (params) => getAction('/sys/role/queryall', params) -//用户管理 -const addUser = (params)=>postAction("/sys/user/add",params); -const editUser = (params)=>putAction("/sys/user/edit",params); -const queryUserRole = (params)=>getAction("/sys/user/queryUserRole",params); -const getUserList = (params)=>getAction("/sys/user/page",params); -const frozenBatch = (params)=>putAction("/sys/user/frozenBatch",params); -//验证用户是否存在 -const checkOnlyUser = (params)=>getAction("/sys/user/checkOnlyUser",params); -//改变密码 -const changePassword = (params)=>putAction("/sys/user/changePassword",params); +// 用户管理 +const addUser = (params) => postAction('/sys/user/add', params) +const editUser = (params) => putAction('/sys/user/edit', params) +const queryUserRole = (params) => getAction('/sys/user/queryUserRole', params) +const getUserList = (params) => getAction('/sys/user/page', params) +const frozenBatch = (params) => putAction('/sys/user/frozenBatch', params) +// 验证用户是否存在 +const checkOnlyUser = (params) => getAction('/sys/user/checkOnlyUser', params) +// 改变密码 +const changePassword = (params) => putAction('/sys/user/changePassword', params) -//权限管理 -const addPermission= (params)=>postAction("/sys/permission/add",params); -const editPermission= (params)=>putAction("/sys/permission/edit",params); -const getPermissionList = (params)=>getAction("/sys/permission/page",params); -const getSystemMenuList = (params)=>getAction("/sys/permission/getSystemMenuList",params); -const getSystemSubmenu = (params)=>getAction("/sys/permission/getSystemSubmenu",params); +// 权限管理 +const addPermission = (params) => postAction('/sys/permission/add', params) +const editPermission = (params) => putAction('/sys/permission/edit', params) +const getPermissionList = (params) => getAction('/sys/permission/page', params) +const getSystemMenuList = (params) => getAction('/sys/permission/getSystemMenuList', params) +const getSystemSubmenu = (params) => getAction('/sys/permission/getSystemSubmenu', params) const getSystemSubmenuBatch = (params) => getAction('/sys/permission/getSystemSubmenuBatch', params) -const queryTreeList = (params)=>getAction("/sys/permission/queryTreeList",params); -const queryTreeListForRole = (params)=>getAction("/sys/role/queryTreeList",params); -const queryListAsync = (params)=>getAction("/sys/permission/queryListAsync",params); -const queryRolePermission = (params)=>getAction("/sys/permission/queryRolePermission",params); -const saveRolePermission = (params)=>postAction("/sys/permission/saveRolePermission",params); -const queryPermissionsByUser = ()=>getAction("/sys/permission/getUserPermissionByToken"); -const loadAllRoleIds = (params)=>getAction("/sys/permission/loadAllRoleIds",params); -const getPermissionRuleList = (params)=>getAction("/sys/permission/getPermRuleListByPermId",params); -const queryPermissionRule = (params)=>getAction("/sys/permission/queryPermissionRule",params); +const queryTreeList = (params) => getAction('/sys/permission/queryTreeList', params) +const queryTreeListForRole = (params) => getAction('/sys/role/queryTreeList', params) +const queryListAsync = (params) => getAction('/sys/permission/queryListAsync', params) +const queryRolePermission = (params) => getAction('/sys/permission/queryRolePermission', params) +const saveRolePermission = (params) => postAction('/sys/permission/saveRolePermission', params) +const queryPermissionsByUser = () => getAction('/sys/permission/getUserPermissionByToken') +const loadAllRoleIds = (params) => getAction('/sys/permission/loadAllRoleIds', params) +const getPermissionRuleList = (params) => getAction('/sys/permission/getPermRuleListByPermId', params) +const queryPermissionRule = (params) => getAction('/sys/permission/queryPermissionRule', params) // 部门管理 -const queryDepartTreeList = (params)=>getAction("/sys/sysDepart/queryTreeList",params); -const queryDepartTreeSync = (params)=>getAction("/sys/sysDepart/queryDepartTreeSync",params); -const queryIdTree = (params)=>getAction("/sys/sysDepart/queryIdTree",params); -const queryParentName = (params)=>getAction("/sys/sysDepart/queryParentName",params); -const searchByKeywords = (params)=>getAction("/sys/sysDepart/searchBy",params); -const deleteByDepartId = (params)=>deleteAction("/sys/sysDepart/delete",params); +const queryDepartTreeList = (params) => getAction('/sys/sysDepart/queryTreeList', params) +const queryDepartTreeSync = (params) => getAction('/sys/sysDepart/queryDepartTreeSync', params) +const queryIdTree = (params) => getAction('/sys/sysDepart/queryIdTree', params) +const queryParentName = (params) => getAction('/sys/sysDepart/queryParentName', params) +const searchByKeywords = (params) => getAction('/sys/sysDepart/searchBy', params) +const deleteByDepartId = (params) => deleteAction('/sys/sysDepart/delete', params) -//二级部门管理 -const queryDepartPermission = (params)=>getAction("/sys/permission/queryDepartPermission",params); -const saveDepartPermission = (params)=>postAction("/sys/permission/saveDepartPermission",params); -const queryTreeListForDeptRole = (params)=>getAction("/sys/sysDepartPermission/queryTreeListForDeptRole",params); -const queryDeptRolePermission = (params)=>getAction("/sys/sysDepartPermission/queryDeptRolePermission",params); -const queryMyDepartTreeList = (params)=>getAction("/sys/sysDepart/queryMyDeptTreeList",params); +// 二级部门管理 +const queryDepartPermission = (params) => getAction('/sys/permission/queryDepartPermission', params) +const saveDepartPermission = (params) => postAction('/sys/permission/saveDepartPermission', params) +const queryTreeListForDeptRole = (params) => getAction('/sys/sysDepartPermission/queryTreeListForDeptRole', params) +const queryDeptRolePermission = (params) => getAction('/sys/sysDepartPermission/queryDeptRolePermission', params) +const queryMyDepartTreeList = (params) => getAction('/sys/sysDepart/queryMyDeptTreeList', params) -//日志管理 -const deleteLog = (params)=>deleteAction("/sys/log/delete",params); -const deleteLogList = (params)=>deleteAction("/sys/log/deleteBatch",params); +// 日志管理 +const deleteLog = (params) => deleteAction('/sys/log/delete', params) +const deleteLogList = (params) => deleteAction('/sys/log/deleteBatch', params) -//数据字典 -const addDict = (params)=>postAction("/sys/dict/add",params); -const editDict = (params)=>putAction("/sys/dict/edit",params); -const treeList = (params)=>getAction("/sys/dict/treeList",params); -const addDictItem = (params)=>postAction("/sys/dictItem/add",params); -const editDictItem = (params)=>putAction("/sys/dictItem/edit",params); +// 数据字典 +const addDict = (params) => postAction('/sys/dict/add', params) +const editDict = (params) => putAction('/sys/dict/edit', params) +const treeList = (params) => getAction('/sys/dict/treeList', params) +const addDictItem = (params) => postAction('/sys/dictItem/add', params) +const editDictItem = (params) => putAction('/sys/dictItem/edit', params) -//字典标签专用(通过code获取字典数组) -export const ajaxGetDictItems = (code, params)=>getAction(`/sys/dict/getDictItems/${code}`,params); -//从缓存中获取字典配置 -function getDictItemsFromCache(dictCode) { +// 字典标签专用(通过code获取字典数组) +export const ajaxGetDictItems = (code, params) => getAction(`/sys/dict/getDictItems/${code}`, params) +// 从缓存中获取字典配置 +function getDictItemsFromCache (dictCode) { if (Vue.ls.get(UI_CACHE_DB_DICT_DATA) && Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]) { - let dictItems = Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]; - return dictItems; + const dictItems = Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode] + return dictItems } } -//系统通告 -const doReleaseData = (params)=>getAction("/sys/annountCement/doReleaseData",params); -const doReovkeData = (params)=>getAction("/sys/annountCement/doReovkeData",params); -//获取系统访问量 -const getLoginfo = (params)=>getAction("/sys/loginfo",params); -const getVisitInfo = (params)=>getAction("/sys/visitInfo",params); +// 系统通告 +const doReleaseData = (params) => getAction('/sys/annountCement/doReleaseData', params) +const doReovkeData = (params) => getAction('/sys/annountCement/doReovkeData', params) +// 获取系统访问量 +const getLoginfo = (params) => getAction('/sys/loginfo', params) +const getVisitInfo = (params) => getAction('/sys/visitInfo', params) // 根据部门主键查询用户信息 -const queryUserByDepId = (params)=>getAction("/sys/user/queryUserByDepId",params); +const queryUserByDepId = (params) => getAction('/sys/user/queryUserByDepId', params) // 重复校验 -const duplicateCheck = (params)=>getAction("/sys/duplicate/check",params); +const duplicateCheck = (params) => getAction('/sys/duplicate/check', params) // 加载分类字典 -const loadCategoryData = (params)=>getAction("/sys/category/loadAllData",params); +const loadCategoryData = (params) => getAction('/sys/category/loadAllData', params) const checkRuleByCode = (params) => getAction('/sys/checkRule/checkByCode', params) -//加载我的通告信息 -const getUserNoticeInfo= (params)=>getAction("/sys/sysAnnouncementSend/getMyAnnouncementSend",params); +// 加载我的通告信息 +const getUserNoticeInfo = (params) => getAction('/sys/sysAnnouncementSend/getMyAnnouncementSend', params) const getTransitURL = url => `/sys/common/transitRESTful?url=${encodeURIComponent(url)}` // 中转HTTP请求 export const transitRESTful = { get: (url, parameter) => getAction(getTransitURL(url), parameter), post: (url, parameter) => postAction(getTransitURL(url), parameter), put: (url, parameter) => putAction(getTransitURL(url), parameter), - http: (url, parameter) => httpAction(getTransitURL(url), parameter), + http: (url, parameter) => httpAction(getTransitURL(url), parameter) } export { @@ -154,6 +154,3 @@ export { getUserNoticeInfo, getDictItemsFromCache } - - - diff --git a/jero-web/src/api/index.js b/jero-web/src/api/index.js index 35367e20..ff5ae929 100644 --- a/jero-web/src/api/index.js +++ b/jero-web/src/api/index.js @@ -1,10 +1,10 @@ const api = { - Login: '/sys/login', - Logout: '/sys/logout', - ForgePassword: '/auth/forge-password', - Register: '/auth/register', - SendSms: '/account/sms', - // get my info - UserInfo: '/user/info' + Login: '/sys/login', + Logout: '/sys/logout', + ForgePassword: '/auth/forge-password', + Register: '/auth/register', + SendSms: '/account/sms', + // get my info + UserInfo: '/user/info' } -export default api \ No newline at end of file +export default api diff --git a/jero-web/src/api/login.js b/jero-web/src/api/login.js index 7bd6344b..4da8c0e6 100644 --- a/jero-web/src/api/login.js +++ b/jero-web/src/api/login.js @@ -12,7 +12,7 @@ import { axios } from '@/utils/request' * @param parameter * @returns {*} */ -export function login(parameter) { +export function login (parameter) { return axios({ url: '/sys/login', method: 'post', @@ -20,7 +20,7 @@ export function login(parameter) { }) } -export function phoneLogin(parameter) { +export function phoneLogin (parameter) { return axios({ url: '/sys/phoneLogin', method: 'post', @@ -28,7 +28,7 @@ export function phoneLogin(parameter) { }) } -export function getSmsCaptcha(parameter) { +export function getSmsCaptcha (parameter) { return axios({ url: api.SendSms, method: 'post', @@ -46,13 +46,13 @@ export function getSmsCaptcha(parameter) { // }) // } -export function logout(logoutToken) { +export function logout (logoutToken) { return axios({ url: '/sys/logout', method: 'post', headers: { 'Content-Type': 'application/json;charset=UTF-8', - 'X-Access-Token': logoutToken + 'X-Access-Token': logoutToken } }) } @@ -63,7 +63,7 @@ export function logout(logoutToken) { * @param thirdType * @returns {*} */ -export function thirdLogin(token,thirdType) { +export function thirdLogin (token, thirdType) { return axios({ url: `/sys/thirdLogin/getLoginUser/${token}/${thirdType}`, method: 'get', @@ -78,10 +78,10 @@ export function thirdLogin(token,thirdType) { * @param token * @returns {*} */ -export function forceLogout(parameter) { +export function forceLogout (parameter) { return axios({ url: '/sys/online/forceLogout', method: 'post', data: parameter }) -} \ No newline at end of file +} diff --git a/jero-web/src/api/manage.js b/jero-web/src/api/manage.js index c78cc25c..5e75e705 100644 --- a/jero-web/src/api/manage.js +++ b/jero-web/src/api/manage.js @@ -1,6 +1,6 @@ import Vue from 'vue' import { axios } from '@/utils/request' -import { ACCESS_TOKEN } from "@/store/mutation-types" +import { ACCESS_TOKEN } from '@/store/mutation-types' import signMd5Utils from '@/utils/encryption/signMd5Utils' const api = { @@ -13,48 +13,48 @@ const api = { export default api -//post -export function postAction(url,parameter) { - let sign = signMd5Utils.getSign(url, parameter); - //将签名和时间戳,添加在请求接口 Header - let signHeader = {"X-Sign": sign,"X-TIMESTAMP": signMd5Utils.getDateTimeToString()}; +// post +export function postAction (url, parameter) { + const sign = signMd5Utils.getSign(url, parameter) + // 将签名和时间戳,添加在请求接口 Header + const signHeader = { 'X-Sign': sign, 'X-TIMESTAMP': signMd5Utils.getDateTimeToString() } return axios({ url: url, - method:'post' , + method: 'post', data: parameter, headers: signHeader }) } -//post method= {post | put} -export function httpAction(url,parameter,method) { - let sign = signMd5Utils.getSign(url, parameter); - //将签名和时间戳,添加在请求接口 Header - let signHeader = {"X-Sign": sign,"X-TIMESTAMP": signMd5Utils.getDateTimeToString()}; +// post method= {post | put} +export function httpAction (url, parameter, method) { + const sign = signMd5Utils.getSign(url, parameter) + // 将签名和时间戳,添加在请求接口 Header + const signHeader = { 'X-Sign': sign, 'X-TIMESTAMP': signMd5Utils.getDateTimeToString() } return axios({ url: url, - method:method , + method: method, data: parameter, headers: signHeader }) } -//put -export function putAction(url,parameter) { +// put +export function putAction (url, parameter) { return axios({ url: url, - method:'put', + method: 'put', data: parameter }) } -//get -export function getAction(url,parameter) { - let sign = signMd5Utils.getSign(url, parameter); - //将签名和时间戳,添加在请求接口 Header - let signHeader = {"X-Sign": sign,"X-TIMESTAMP": signMd5Utils.getDateTimeToString()}; +// get +export function getAction (url, parameter) { + const sign = signMd5Utils.getSign(url, parameter) + // 将签名和时间戳,添加在请求接口 Header + const signHeader = { 'X-Sign': sign, 'X-TIMESTAMP': signMd5Utils.getDateTimeToString() } return axios({ url: url, @@ -64,8 +64,8 @@ export function getAction(url,parameter) { }) } -//deleteAction -export function deleteAction(url,parameter) { +// deleteAction +export function deleteAction (url, parameter) { return axios({ url: url, method: 'delete', @@ -73,7 +73,7 @@ export function deleteAction(url,parameter) { }) } -export function getUserList(parameter) { +export function getUserList (parameter) { return axios({ url: api.user, method: 'get', @@ -81,7 +81,7 @@ export function getUserList(parameter) { }) } -export function getRoleList(parameter) { +export function getRoleList (parameter) { return axios({ url: api.role, method: 'get', @@ -89,7 +89,7 @@ export function getRoleList(parameter) { }) } -export function getServiceList(parameter) { +export function getServiceList (parameter) { return axios({ url: api.service, method: 'get', @@ -97,7 +97,7 @@ export function getServiceList(parameter) { }) } -export function getPermissions(parameter) { +export function getPermissions (parameter) { return axios({ url: api.permissionNoPager, method: 'get', @@ -107,7 +107,7 @@ export function getPermissions(parameter) { // id == 0 add post // id != 0 update put -export function saveService(parameter) { +export function saveService (parameter) { return axios({ url: api.service, method: parameter.id == 0 ? 'post' : 'put', @@ -121,11 +121,11 @@ export function saveService(parameter) { * @param parameter * @returns {*} */ -export function downFile(url,parameter){ +export function downFile (url, parameter) { return axios({ url: url, params: parameter, - method:'get' , + method: 'get', responseType: 'blob' }) } @@ -137,24 +137,24 @@ export function downFile(url,parameter){ * @param parameter * @returns {*} */ -export function downloadFile(url, fileName, parameter) { +export function downloadFile (url, fileName, parameter) { return downFile(url, parameter).then((data) => { if (!data || data.size === 0) { - Vue.prototype['$message'].warning('文件下载失败') + Vue.prototype.$message.warning('文件下载失败') return } if (typeof window.navigator.msSaveBlob !== 'undefined') { window.navigator.msSaveBlob(new Blob([data]), fileName) } else { - let url = window.URL.createObjectURL(new Blob([data])) - let link = document.createElement('a') + const url = window.URL.createObjectURL(new Blob([data])) + const link = document.createElement('a') link.style.display = 'none' link.href = url link.setAttribute('download', fileName) document.body.appendChild(link) link.click() - document.body.removeChild(link) //下载完成移除元素 - window.URL.revokeObjectURL(url) //释放掉blob对象 + document.body.removeChild(link) // 下载完成移除元素 + window.URL.revokeObjectURL(url) // 释放掉blob对象 } }) } @@ -165,14 +165,14 @@ export function downloadFile(url, fileName, parameter) { * @param parameter * @returns {*} */ -export function uploadAction(url,parameter){ +export function uploadAction (url, parameter) { return axios({ url: url, data: parameter, - method:'post' , + method: 'post', headers: { - 'Content-Type': 'multipart/form-data', // 文件上传 - }, + 'Content-Type': 'multipart/form-data' // 文件上传 + } }) } @@ -182,18 +182,18 @@ export function uploadAction(url,parameter){ * @param subStr * @returns {*} */ -export function getFileAccessHttpUrl(avatar,subStr) { - if(!subStr) subStr = 'http' +export function getFileAccessHttpUrl (avatar, subStr) { + if (!subStr) subStr = 'http' try { - if(avatar && avatar.startsWith(subStr)){ - return avatar; - }else{ - if(avatar && avatar.length>0 && avatar.indexOf('[')==-1){ - let token = Vue.ls.get(ACCESS_TOKEN); - return window._CONFIG['staticDomainURL'] + "/" + avatar + "?token=" + token; + if (avatar && avatar.startsWith(subStr)) { + return avatar + } else { + if (avatar && avatar.length > 0 && avatar.indexOf('[') == -1) { + const token = Vue.ls.get(ACCESS_TOKEN) + return window._CONFIG.staticDomainURL + '/' + avatar + '?token=' + token } } - }catch(err){ - return; + } catch (err) { + } } diff --git a/jero-web/src/cas/sso.js b/jero-web/src/cas/sso.js index 1656cb44..cf22f680 100644 --- a/jero-web/src/cas/sso.js +++ b/jero-web/src/cas/sso.js @@ -1,77 +1,76 @@ import Vue from 'vue' -import { ACCESS_TOKEN } from "@/store/mutation-types" +import { ACCESS_TOKEN } from '@/store/mutation-types' import store from '@/store' /** * 单点登录 */ const init = (callback) => { if (process.env.VUE_APP_SSO == 'true') { - console.log("-------单点登录开始-------"); - let token = Vue.ls.get(ACCESS_TOKEN); - let st = getUrlParam("ticket"); - let sevice = "http://" + window.location.host + "/"; + console.log('-------单点登录开始-------') + const token = Vue.ls.get(ACCESS_TOKEN) + const st = getUrlParam('ticket') + const sevice = 'http://' + window.location.host + '/' if (token) { - loginSuccess(callback); + loginSuccess(callback) } else { if (st) { - validateSt(st, sevice, callback); + validateSt(st, sevice, callback) } else { - let serviceUrl = encodeURIComponent(sevice); - window.location.href = window._CONFIG['casPrefixUrl'] + "/login?service=" + serviceUrl; + const serviceUrl = encodeURIComponent(sevice) + window.location.href = window._CONFIG.casPrefixUrl + '/login?service=' + serviceUrl } } - console.log("-------单点登录结束-------"); - }else{ + console.log('-------单点登录结束-------') + } else { callback && callback() } -}; +} const SSO = { init: init -}; +} -function getUrlParam(paraName) { - let url = document.location.toString(); - let arrObj = url.split("?"); +function getUrlParam (paraName) { + const url = document.location.toString() + const arrObj = url.split('?') if (arrObj.length > 1) { - let arrPara = arrObj[1].split("&"); - let arr; + const arrPara = arrObj[1].split('&') + let arr for (let i = 0; i < arrPara.length; i++) { - arr = arrPara[i].split("="); + arr = arrPara[i].split('=') if (arr != null && arr[0] == paraName) { - return arr[1]; + return arr[1] } } - return ""; - } - else { - return ""; + return '' + } else { + return '' } } -function validateSt(ticket,service,callback){ - let params = { +function validateSt (ticket, service, callback) { + const params = { ticket: ticket, - service:service - }; - store.dispatch('ValidateLogin',params).then(res => { - //this.departConfirm(res) - if(res.success){ - loginSuccess(callback); - }else{ - let sevice = "http://"+window.location.host+"/"; - let serviceUrl = encodeURIComponent(sevice); - window.location.href = window._CONFIG['casPrefixUrl']+"/login?service="+serviceUrl; + service: service + } + store.dispatch('ValidateLogin', params).then(res => { + // this.departConfirm(res) + if (res.success) { + loginSuccess(callback) + } else { + const sevice = 'http://' + window.location.host + '/' + const serviceUrl = encodeURIComponent(sevice) + window.location.href = window._CONFIG.casPrefixUrl + '/login?service=' + serviceUrl } }).catch((err) => { - console.log(err); - //that.requestFailed(err); - }); + console.log(err) + // that.requestFailed(err); + }) } function loginSuccess (callback) { - callback(); + callback() } -export default SSO; \ No newline at end of file +export default SSO diff --git a/jero-web/src/components/AvatarList/Item.vue b/jero-web/src/components/AvatarList/Item.vue index 30442fc2..26e149ee 100644 --- a/jero-web/src/components/AvatarList/Item.vue +++ b/jero-web/src/components/AvatarList/Item.vue @@ -7,40 +7,40 @@ \ No newline at end of file +} + diff --git a/jero-web/src/components/AvatarList/List.vue b/jero-web/src/components/AvatarList/List.vue index 039f19f2..446ceeb8 100644 --- a/jero-web/src/components/AvatarList/List.vue +++ b/jero-web/src/components/AvatarList/List.vue @@ -5,7 +5,6 @@ - \ No newline at end of file + diff --git a/jero-web/src/components/JVxeCells/JVxeRadioCell.vue b/jero-web/src/components/JVxeCells/JVxeRadioCell.vue index 47dfcdbc..6f8f48f5 100644 --- a/jero-web/src/components/JVxeCells/JVxeRadioCell.vue +++ b/jero-web/src/components/JVxeCells/JVxeRadioCell.vue @@ -16,37 +16,37 @@ \ No newline at end of file + diff --git a/jero-web/src/components/JVxeCells/JVxeSelectDictSearchCell.js b/jero-web/src/components/JVxeCells/JVxeSelectDictSearchCell.js index d69febf7..a984c05d 100644 --- a/jero-web/src/components/JVxeCells/JVxeSelectDictSearchCell.js +++ b/jero-web/src/components/JVxeCells/JVxeSelectDictSearchCell.js @@ -11,19 +11,19 @@ const common = { labelMap: new Map(), /** 公共data */ - data() { + data () { return { loading: false, innerSelectValue: null, - innerOptions: [], + innerOptions: [] } }, /** 公共计算属性 */ computed: { - dict() { + dict () { return this.originColumn.dict }, - options() { + options () { if (this.isAsync) { return this.innerOptions } else { @@ -31,16 +31,16 @@ const common = { } }, // 是否是异步模式 - isAsync() { - let isAsync = this.originColumn.async + isAsync () { + const isAsync = this.originColumn.async return (isAsync != null && isAsync !== '') ? !!isAsync : true - }, + } }, /** 公共属性监听 */ watch: { innerValue: { immediate: true, - handler(value) { + handler (value) { if (value == null || value === '') { this.innerSelectValue = null } else { @@ -48,7 +48,7 @@ const common = { } } }, - dict() { + dict () { this.loadDataByDict() } }, @@ -56,15 +56,15 @@ const common = { methods: { // 根据 value 查询数据,用于回显 - async loadDataByValue(value) { + async loadDataByValue (value) { if (this.isAsync) { if (this.innerSelectValue !== value) { if (common.labelMap.has(value)) { this.innerOptions = cloneObject(common.labelMap.get(value)) } else { - let {success, result} = await getAction(`/sys/dict/loadDictItem/${this.dict}`, {key: value}) + const { success, result } = await getAction(`/sys/dict/loadDictItem/${this.dict}`, { key: value }) if (success && result && result.length > 0) { - this.innerOptions = [{value: value, text: result[0]}] + this.innerOptions = [{ value: value, text: result[0] }] common.labelMap.set(value, cloneObject(this.innerOptions)) } } @@ -74,38 +74,38 @@ const common = { }, // 初始化字典 - async loadDataByDict() { + async loadDataByDict () { if (!this.isAsync) { // 如果字典项集合有数据 if (!this.originColumn.options || this.originColumn.options.length === 0) { // 根据字典Code, 初始化字典数组 let dictStr = '' if (this.dict) { - let arr = this.dict.split(',') + const arr = this.dict.split(',') if (arr[0].indexOf('where') > 0) { - let tbInfo = arr[0].split('where') + const tbInfo = arr[0].split('where') dictStr = tbInfo[0].trim() + ',' + arr[1] + ',' + arr[2] + ',' + encodeURIComponent(tbInfo[1]) } else { dictStr = this.dict } if (this.dict.indexOf(',') === -1) { - //优先从缓存中读取字典配置 - let cache = getDictItemsFromCache(this.dict) + // 优先从缓存中读取字典配置 + const cache = getDictItemsFromCache(this.dict) if (cache) { this.innerOptions = cache return } } - let {success, result} = await ajaxGetDictItems(dictStr, null) + const { success, result } = await ajaxGetDictItems(dictStr, null) if (success) { this.innerOptions = result } } } } - }, + } - }, + } } @@ -113,25 +113,25 @@ const common = { export const DictSearchSpanCell = { name: 'JVxeSelectSearchSpanCell', mixins: [JVxeCellMixins], - data() { + data () { return { - ...common.data.apply(this), + ...common.data.apply(this) } }, computed: { - ...common.computed, + ...common.computed }, watch: { - ...common.watch, + ...common.watch }, methods: { - ...common.methods, + ...common.methods }, - render(h) { + render (h) { return h('span', {}, [ filterDictText(this.innerOptions, this.innerSelectValue || this.innerValue) ]) - }, + } } // 请求id @@ -141,7 +141,7 @@ let requestId = 0 export const DictSearchInputCell = { name: 'JVxeSelectSearchInputCell', mixins: [JVxeCellMixins], - data() { + data () { return { ...common.data.apply(this), @@ -161,26 +161,26 @@ export const DictSearchInputCell = { }, computed: { ...common.computed, - tipsContent() { + tipsContent () { return this.originColumn.tipsContent || '请输入搜索内容' }, - filterOption() { + filterOption () { if (this.isAsync) { return null } return (input, option) => option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, + } }, watch: { - ...common.watch, + ...common.watch }, - created() { - this.loadData = debounce(this.loadData, 300)//消抖 + created () { + this.loadData = debounce(this.loadData, 300)// 消抖 }, methods: { ...common.methods, - loadData(value) { + loadData (value) { const currentRequestId = ++requestId this.loading = true this.innerOptions = [] @@ -191,11 +191,11 @@ export const DictSearchInputCell = { } // 字典code格式:table,text,code this.hasRequest = true - getAction(`/sys/dict/loadDict/${this.dict}`, {keyword: value}).then(res => { + getAction(`/sys/dict/loadDict/${this.dict}`, { keyword: value }).then(res => { if (currentRequestId !== requestId) { return } - let {success, result, message} = res + const { success, result, message } = res if (success) { this.innerOptions = result result.forEach((item) => { @@ -209,11 +209,11 @@ export const DictSearchInputCell = { }) }, - handleChange(selectedValue) { + handleChange (selectedValue) { this.innerSelectValue = selectedValue this.handleChangeCommon(this.innerSelectValue) }, - handleSearch(value) { + handleSearch (value) { if (this.isAsync) { // 在输入时也应该开启加载,因为loadData加了消抖,所以会有800ms的用户主观上认为的卡顿时间 this.loading = true @@ -224,17 +224,17 @@ export const DictSearchInputCell = { } }, - renderOptionItem() { - let options = [] - this.options.forEach(({value, text, label, title, disabled}) => { + renderOptionItem () { + const options = [] + this.options.forEach(({ value, text, label, title, disabled }) => { options.push( {text || label || title} ) }) return options - }, + } }, - render() { + render () { return ( \ No newline at end of file + diff --git a/jero-web/src/components/Trend/index.js b/jero-web/src/components/Trend/index.js index 761366d5..9f142280 100644 --- a/jero-web/src/components/Trend/index.js +++ b/jero-web/src/components/Trend/index.js @@ -1,3 +1,3 @@ import Trend from './Trend.vue' -export default Trend \ No newline at end of file +export default Trend diff --git a/jero-web/src/components/_util/Area.js b/jero-web/src/components/_util/Area.js index a68675e6..d6cc4499 100644 --- a/jero-web/src/components/_util/Area.js +++ b/jero-web/src/components/_util/Area.js @@ -7,79 +7,77 @@ export default class Area { * 构造器 * @param express */ - constructor(pcaa) { - if(!pcaa){ - pcaa = Vue.prototype.$Jpcaa; + constructor (pcaa) { + if (!pcaa) { + pcaa = Vue.prototype.$Jpcaa } - let arr = [] + const arr = [] const province = pcaa['86'] - Object.keys(province).map(key=>{ - arr.push({id:key, text:province[key], pid:'86', index:1}); - const city = pcaa[key]; - Object.keys(city).map(key2=>{ - arr.push({id:key2, text:city[key2], pid:key, index:2}); - const qu = pcaa[key2]; - if(qu){ - Object.keys(qu).map(key3=>{ - arr.push({id:key3, text:qu[key3], pid:key2, index:3}); + Object.keys(province).map(key => { + arr.push({ id: key, text: province[key], pid: '86', index: 1 }) + const city = pcaa[key] + Object.keys(city).map(key2 => { + arr.push({ id: key2, text: city[key2], pid: key, index: 2 }) + const qu = pcaa[key2] + if (qu) { + Object.keys(qu).map(key3 => { + arr.push({ id: key3, text: qu[key3], pid: key2, index: 3 }) }) } }) }) - this.all = arr; + this.all = arr } - get pca(){ - return this.all; + get pca () { + return this.all } - getCode(text){ - if(!text || text.length==0){ + getCode (text) { + if (!text || text.length == 0) { return '' } - for(let item of this.all){ - if(item.text === text){ - return item.id; + for (const item of this.all) { + if (item.text === text) { + return item.id } } } - getText(code){ - if(!code || code.length==0){ + getText (code) { + if (!code || code.length == 0) { return '' } - let arr = [] - this.getAreaBycode(code, arr, 3); + const arr = [] + this.getAreaBycode(code, arr, 3) return arr.join('/') } - getRealCode(code){ - let arr = [] + getRealCode (code) { + const arr = [] this.getPcode(code, arr, 3) - return arr; + return arr } - getPcode(id, arr, index){ - for(let item of this.all){ - if(item.id === id && item.index == index){ + getPcode (id, arr, index) { + for (const item of this.all) { + if (item.id === id && item.index == index) { arr.unshift(id) - if(item.pid != '86'){ + if (item.pid != '86') { this.getPcode(item.pid, arr, --index) } } } } - getAreaBycode(code, arr, index){ - for(let item of this.all){ - if(item.id === code && item.index == index){ - arr.unshift(item.text); - if(item.pid != '86'){ + getAreaBycode (code, arr, index) { + for (const item of this.all) { + if (item.id === code && item.index == index) { + arr.unshift(item.text) + if (item.pid != '86') { this.getAreaBycode(item.pid, arr, --index) } - } } } - -} \ No newline at end of file +} diff --git a/jero-web/src/components/_util/StringUtil.js b/jero-web/src/components/_util/StringUtil.js index 3977832b..822a71bb 100644 --- a/jero-web/src/components/_util/StringUtil.js +++ b/jero-web/src/components/_util/StringUtil.js @@ -35,12 +35,12 @@ export const cutStrByFullLength = (str = '', maxLength) => { } // 下划线转换驼峰 -export function underLinetoHump(name) { - return name.replace(/\_(\w)/g, function(all, letter){ - return letter.toUpperCase(); - }); +export function underLinetoHump (name) { + return name.replace(/\_(\w)/g, function (all, letter) { + return letter.toUpperCase() + }) } // 驼峰转换下划线 -export function humptoUnderLine(name) { - return name.replace(/([A-Z])/g,"_$1").toLowerCase(); -} \ No newline at end of file +export function humptoUnderLine (name) { + return name.replace(/([A-Z])/g, '_$1').toLowerCase() +} diff --git a/jero-web/src/components/_util/util.js b/jero-web/src/components/_util/util.js index 98752a94..6a7d740d 100644 --- a/jero-web/src/components/_util/util.js +++ b/jero-web/src/components/_util/util.js @@ -9,4 +9,4 @@ */ export function filterEmpty (children = []) { return children.filter(c => c.tag || (c.text && c.text.trim() !== '')) -} \ No newline at end of file +} diff --git a/jero-web/src/components/chart/AreaChartTy.vue b/jero-web/src/components/chart/AreaChartTy.vue index 3d201e79..969a636b 100644 --- a/jero-web/src/components/chart/AreaChartTy.vue +++ b/jero-web/src/components/chart/AreaChartTy.vue @@ -13,76 +13,76 @@ \ No newline at end of file + diff --git a/jero-web/src/components/chart/Bar.vue b/jero-web/src/components/chart/Bar.vue index 52832d4f..52ba196b 100644 --- a/jero-web/src/components/chart/Bar.vue +++ b/jero-web/src/components/chart/Bar.vue @@ -10,41 +10,41 @@ \ No newline at end of file +} + diff --git a/jero-web/src/components/chart/BarAndLine.vue b/jero-web/src/components/chart/BarAndLine.vue index 549a31c4..a2b1900f 100644 --- a/jero-web/src/components/chart/BarAndLine.vue +++ b/jero-web/src/components/chart/BarAndLine.vue @@ -12,49 +12,49 @@ \ No newline at end of file +} + diff --git a/jero-web/src/components/chart/BarMultid.vue b/jero-web/src/components/chart/BarMultid.vue index 029a5d2c..c3f66187 100644 --- a/jero-web/src/components/chart/BarMultid.vue +++ b/jero-web/src/components/chart/BarMultid.vue @@ -11,86 +11,86 @@ \ No newline at end of file + diff --git a/jero-web/src/components/chart/DashChartDemo.vue b/jero-web/src/components/chart/DashChartDemo.vue index c2ebf084..6d541c45 100644 --- a/jero-web/src/components/chart/DashChartDemo.vue +++ b/jero-web/src/components/chart/DashChartDemo.vue @@ -45,143 +45,143 @@ diff --git a/jero-web/src/components/chart/IndexBar.vue b/jero-web/src/components/chart/IndexBar.vue index 2e44d96a..f756f1ac 100644 --- a/jero-web/src/components/chart/IndexBar.vue +++ b/jero-web/src/components/chart/IndexBar.vue @@ -15,47 +15,47 @@ \ No newline at end of file +} + diff --git a/jero-web/src/components/chart/LineChartMultid.vue b/jero-web/src/components/chart/LineChartMultid.vue index 90698f44..8c1ab207 100644 --- a/jero-web/src/components/chart/LineChartMultid.vue +++ b/jero-web/src/components/chart/LineChartMultid.vue @@ -12,84 +12,84 @@ \ No newline at end of file + diff --git a/jero-web/src/components/chart/Liquid.vue b/jero-web/src/components/chart/Liquid.vue index 85e5b617..0180ca89 100644 --- a/jero-web/src/components/chart/Liquid.vue +++ b/jero-web/src/components/chart/Liquid.vue @@ -48,33 +48,33 @@ \ No newline at end of file + diff --git a/jero-web/src/components/chart/MiniArea.vue b/jero-web/src/components/chart/MiniArea.vue index 97c8ff70..3b8da0bb 100644 --- a/jero-web/src/components/chart/MiniArea.vue +++ b/jero-web/src/components/chart/MiniArea.vue @@ -10,60 +10,60 @@ \ No newline at end of file + diff --git a/jero-web/src/components/chart/MiniBar.vue b/jero-web/src/components/chart/MiniBar.vue index 9dd6bca7..ebb7a7d3 100644 --- a/jero-web/src/components/chart/MiniBar.vue +++ b/jero-web/src/components/chart/MiniBar.vue @@ -8,69 +8,69 @@ \ No newline at end of file + diff --git a/jero-web/src/components/chart/MiniProgress.vue b/jero-web/src/components/chart/MiniProgress.vue index e6668288..b7c59448 100644 --- a/jero-web/src/components/chart/MiniProgress.vue +++ b/jero-web/src/components/chart/MiniProgress.vue @@ -11,27 +11,27 @@ \ No newline at end of file + diff --git a/jero-web/src/components/chart/Pie.vue b/jero-web/src/components/chart/Pie.vue index 750e2030..3e1a3062 100644 --- a/jero-web/src/components/chart/Pie.vue +++ b/jero-web/src/components/chart/Pie.vue @@ -9,62 +9,62 @@ \ No newline at end of file +} + diff --git a/jero-web/src/components/chart/Radar.vue b/jero-web/src/components/chart/Radar.vue index b7b30b05..c186da26 100644 --- a/jero-web/src/components/chart/Radar.vue +++ b/jero-web/src/components/chart/Radar.vue @@ -11,80 +11,80 @@ \ No newline at end of file + diff --git a/jero-web/src/components/chart/RankList.vue b/jero-web/src/components/chart/RankList.vue index f5d68fea..6376b167 100644 --- a/jero-web/src/components/chart/RankList.vue +++ b/jero-web/src/components/chart/RankList.vue @@ -12,24 +12,24 @@ \ No newline at end of file + diff --git a/jero-web/src/components/chart/StackBar.vue b/jero-web/src/components/chart/StackBar.vue index 01b566f5..ca8ffb37 100644 --- a/jero-web/src/components/chart/StackBar.vue +++ b/jero-web/src/components/chart/StackBar.vue @@ -12,43 +12,43 @@ \ No newline at end of file +} + diff --git a/jero-web/src/components/chart/TransferBar.vue b/jero-web/src/components/chart/TransferBar.vue index bb953e9f..8cd94c7c 100644 --- a/jero-web/src/components/chart/TransferBar.vue +++ b/jero-web/src/components/chart/TransferBar.vue @@ -16,51 +16,51 @@ \ No newline at end of file +} + diff --git a/jero-web/src/components/chart/Trend.vue b/jero-web/src/components/chart/Trend.vue index 1ca1deb8..412703a9 100644 --- a/jero-web/src/components/chart/Trend.vue +++ b/jero-web/src/components/chart/Trend.vue @@ -7,49 +7,49 @@ \ No newline at end of file + diff --git a/jero-web/src/components/chart/mixins/ChartMixins.js b/jero-web/src/components/chart/mixins/ChartMixins.js index f99c0bd3..7484ffbc 100644 --- a/jero-web/src/components/chart/mixins/ChartMixins.js +++ b/jero-web/src/components/chart/mixins/ChartMixins.js @@ -1,10 +1,10 @@ export const ChartEventMixins = { methods: { - handleClick(event, chart) { + handleClick (event, chart) { this.handleEvent('click', event, chart) }, - handleEvent(eventName, event, chart) { + handleEvent (eventName, event, chart) { this.$emit(eventName, event, chart) - }, + } } -} \ No newline at end of file +} diff --git a/jero-web/src/components/dict/JDictSelectTag.vue b/jero-web/src/components/dict/JDictSelectTag.vue index a7aa6c5b..20f226be 100644 --- a/jero-web/src/components/dict/JDictSelectTag.vue +++ b/jero-web/src/components/dict/JDictSelectTag.vue @@ -18,90 +18,90 @@ \ No newline at end of file + diff --git a/jero-web/src/components/dict/JDictSelectUtil.js b/jero-web/src/components/dict/JDictSelectUtil.js index a735f3fb..7614d11d 100644 --- a/jero-web/src/components/dict/JDictSelectUtil.js +++ b/jero-web/src/components/dict/JDictSelectUtil.js @@ -4,28 +4,28 @@ * date: 20190109 */ -import {ajaxGetDictItems,getDictItemsFromCache} from '@/api/api' -import {getAction} from '@/api/manage' +import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' +import { getAction } from '@/api/manage' /** * 获取字典数组 * @param dictCode 字典Code * @return List */ -export async function initDictOptions(dictCode) { +export async function initDictOptions (dictCode) { if (!dictCode) { - return '字典Code不能为空!'; + return '字典Code不能为空!' } - //优先从缓存中读取字典配置 - if(getDictItemsFromCache(dictCode)){ - let res = {} - res.result = getDictItemsFromCache(dictCode); - res.success = true; - return res; + // 优先从缓存中读取字典配置 + if (getDictItemsFromCache(dictCode)) { + const res = {} + res.result = getDictItemsFromCache(dictCode) + res.success = true + return res } - //获取字典数组 - let res = await ajaxGetDictItems(dictCode); - return res; + // 获取字典数组 + const res = await ajaxGetDictItems(dictCode) + return res } /** @@ -34,10 +34,10 @@ export async function initDictOptions(dictCode) { * @param text 字典值 * @return String */ -export function filterDictText(dictOptions, text) { +export function filterDictText (dictOptions, text) { // --update-begin----author:sunjianlei---date:20200323------for: 字典翻译 text 允许逗号分隔 --- if (text != null && Array.isArray(dictOptions)) { - let result = [] + const result = [] // 允许多个逗号分隔,允许传数组对象 let splitText if (Array.isArray(text)) { @@ -45,9 +45,9 @@ export function filterDictText(dictOptions, text) { } else { splitText = text.toString().trim().split(',') } - for (let txt of splitText) { + for (const txt of splitText) { let dictText = txt - for (let dictItem of dictOptions) { + for (const dictItem of dictOptions) { if (txt.toString() === dictItem.value.toString()) { dictText = (dictItem.text || dictItem.title || dictItem.label) break @@ -67,11 +67,11 @@ export function filterDictText(dictOptions, text) { * @param text 字典值 * @return String */ -export function filterMultiDictText(dictOptions, text) { - //js “!text” 认为0为空,所以做提前处理 - if(text === 0 || text === '0'){ - if(dictOptions){ - for (let dictItem of dictOptions) { +export function filterMultiDictText (dictOptions, text) { + // js “!text” 认为0为空,所以做提前处理 + if (text === 0 || text === '0') { + if (dictOptions) { + for (const dictItem of dictOptions) { if (text == dictItem.value) { return dictItem.text } @@ -79,26 +79,26 @@ export function filterMultiDictText(dictOptions, text) { } } - if(!text || text=='null' || !dictOptions || dictOptions.length==0){ - return "" + if (!text || text == 'null' || !dictOptions || dictOptions.length == 0) { + return '' } - let re = ""; + let re = '' text = text.toString() - let arr = text.split(",") + const arr = text.split(',') dictOptions.forEach(function (option) { - if(option){ - for(let i=0;i t["value"] == key) - if(item && item.length>0){ - return item[0]["text"] + // 优先从缓存中读取字典配置 + if (getDictItemsFromCache(dictCode)) { + const item = getDictItemsFromCache(dictCode).filter(t => t.value == key) + if (item && item.length > 0) { + return item[0].text } } } /** 通过code获取字典数组 */ -export async function getDictItems(dictCode, params) { - //优先从缓存中读取字典配置 - if(getDictItemsFromCache(dictCode)){ - let desformDictItems = getDictItemsFromCache(dictCode).map(item => ({...item, label: item.text})) - return desformDictItems; - } +export async function getDictItems (dictCode, params) { + // 优先从缓存中读取字典配置 + if (getDictItemsFromCache(dictCode)) { + const desformDictItems = getDictItemsFromCache(dictCode).map(item => ({ ...item, label: item.text })) + return desformDictItems + } - //缓存中没有,就请求后台 - return await ajaxGetDictItems(dictCode, params).then(({success, result}) => { - if (success) { - let res = result.map(item => ({...item, label: item.text})) - console.log('------- 从DB中获取到了字典-------dictCode : ', dictCode, res) - return Promise.resolve(res) - } else { - console.error('getDictItems error: : ', res) - return Promise.resolve([]) - } - }).catch((res) => { - console.error('getDictItems error: ', res) + // 缓存中没有,就请求后台 + return await ajaxGetDictItems(dictCode, params).then(({ success, result }) => { + if (success) { + const res = result.map(item => ({ ...item, label: item.text })) + console.log('------- 从DB中获取到了字典-------dictCode : ', dictCode, res) + return Promise.resolve(res) + } else { + console.error('getDictItems error: : ', res) return Promise.resolve([]) - }) -} \ No newline at end of file + } + }).catch((res) => { + console.error('getDictItems error: ', res) + return Promise.resolve([]) + }) +} diff --git a/jero-web/src/components/dict/JMultiSelectTag.vue b/jero-web/src/components/dict/JMultiSelectTag.vue index f762487d..15316a18 100644 --- a/jero-web/src/components/dict/JMultiSelectTag.vue +++ b/jero-web/src/components/dict/JMultiSelectTag.vue @@ -20,103 +20,102 @@ diff --git a/jero-web/src/components/dict/JSearchSelectTag.vue b/jero-web/src/components/dict/JSearchSelectTag.vue index 38e1400b..80d47160 100644 --- a/jero-web/src/components/dict/JSearchSelectTag.vue +++ b/jero-web/src/components/dict/JSearchSelectTag.vue @@ -39,214 +39,212 @@ \ No newline at end of file + diff --git a/jero-web/src/components/dict/index.js b/jero-web/src/components/dict/index.js index 23400a72..439f3fe6 100644 --- a/jero-web/src/components/dict/index.js +++ b/jero-web/src/components/dict/index.js @@ -1,16 +1,16 @@ import JDictSelectTag from './JDictSelectTag.vue' import JMultiSelectTag from './JMultiSelectTag.vue' import JSearchSelectTag from './JSearchSelectTag.vue' -import { filterMultiDictText,filterDictText,initDictOptions,filterDictTextByCache } from './JDictSelectUtil' +import { filterMultiDictText, filterDictText, initDictOptions, filterDictTextByCache } from './JDictSelectUtil' export default { install: function (Vue) { - Vue.component('JDictSelectTag',JDictSelectTag); - Vue.component('JMultiSelectTag',JMultiSelectTag); - Vue.component('JSearchSelectTag',JSearchSelectTag); + Vue.component('JDictSelectTag', JDictSelectTag) + Vue.component('JMultiSelectTag', JMultiSelectTag) + Vue.component('JSearchSelectTag', JSearchSelectTag) Vue.prototype.$initDictOptions = (dictCode) => initDictOptions(dictCode) Vue.prototype.$filterMultiDictText = (dictOptions, text) => filterMultiDictText(dictOptions, text) Vue.prototype.$filterDictText = (dictOptions, text) => filterDictText(dictOptions, text) Vue.prototype.$filterDictTextByCache = (...param) => filterDictTextByCache(...param) } -} \ No newline at end of file +} diff --git a/jero-web/src/components/jero/JAreaLinkage.vue b/jero-web/src/components/jero/JAreaLinkage.vue index 4cf8291f..639daaa6 100644 --- a/jero-web/src/components/jero/JAreaLinkage.vue +++ b/jero-web/src/components/jero/JAreaLinkage.vue @@ -29,122 +29,122 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JCategorySelect.vue b/jero-web/src/components/jero/JCategorySelect.vue index cab251ff..6b1dce79 100644 --- a/jero-web/src/components/jero/JCategorySelect.vue +++ b/jero-web/src/components/jero/JCategorySelect.vue @@ -17,253 +17,253 @@ diff --git a/jero-web/src/components/jero/JCheckbox.vue b/jero-web/src/components/jero/JCheckbox.vue index e87f5b51..5aac319b 100644 --- a/jero-web/src/components/jero/JCheckbox.vue +++ b/jero-web/src/components/jero/JCheckbox.vue @@ -6,41 +6,41 @@ diff --git a/jero-web/src/components/jero/JCodeEditor.vue b/jero-web/src/components/jero/JCodeEditor.vue index 8a69b9e7..cc8111e2 100644 --- a/jero-web/src/components/jero/JCodeEditor.vue +++ b/jero-web/src/components/jero/JCodeEditor.vue @@ -21,346 +21,346 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JEditor.vue b/jero-web/src/components/jero/JEditor.vue index a5e9d358..030e32c0 100644 --- a/jero-web/src/components/jero/JEditor.vue +++ b/jero-web/src/components/jero/JEditor.vue @@ -11,159 +11,159 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JEllipsis.vue b/jero-web/src/components/jero/JEllipsis.vue index 2a7404ce..0106ae06 100644 --- a/jero-web/src/components/jero/JEllipsis.vue +++ b/jero-web/src/components/jero/JEllipsis.vue @@ -11,20 +11,20 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JImageUpload.vue b/jero-web/src/components/jero/JImageUpload.vue index 7202af83..514a4443 100644 --- a/jero-web/src/components/jero/JImageUpload.vue +++ b/jero-web/src/components/jero/JImageUpload.vue @@ -27,207 +27,207 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JInput.vue b/jero-web/src/components/jero/JInput.vue index 5ebfb84a..370ac40c 100644 --- a/jero-web/src/components/jero/JInput.vue +++ b/jero-web/src/components/jero/JInput.vue @@ -9,122 +9,122 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JMarkdownEditor/index.vue b/jero-web/src/components/jero/JMarkdownEditor/index.vue index 3f1a165e..15a34b52 100644 --- a/jero-web/src/components/jero/JMarkdownEditor/index.vue +++ b/jero-web/src/components/jero/JMarkdownEditor/index.vue @@ -27,10 +27,10 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JModal/JPrompt.vue b/jero-web/src/components/jero/JModal/JPrompt.vue index 9d7f8556..ccf0a79b 100644 --- a/jero-web/src/components/jero/JModal/JPrompt.vue +++ b/jero-web/src/components/jero/JModal/JPrompt.vue @@ -16,37 +16,37 @@ import pick from 'lodash.pick' export default { name: 'JPrompt', - data() { + data () { return { visible: false, loading: false, content: '', // 弹窗参数 modalProps: { - title: '', + title: '' }, inputProps: { - placeholder: '', + placeholder: '' }, // form model model: { - input: '', + input: '' }, // 校验 rule: [], // 回调函数 - callback: {}, + callback: {} } }, computed: { - rules() { + rules () { return { input: this.rule } - }, + } }, methods: { - show(options) { + show (options) { this.content = options.content if (Array.isArray(options.rule)) { this.rule = options.rule @@ -55,10 +55,10 @@ export default { this.model.input = options.defaultValue } // 取出常用的弹窗参数 - let pickModalProps = pick(options, 'title', 'centered', 'cancelText', 'closable', 'mask', 'maskClosable', 'okText', 'okType', 'okButtonProps', 'cancelButtonProps', 'width', 'wrapClassName', 'zIndex', 'dialogStyle', 'dialogClass') + const pickModalProps = pick(options, 'title', 'centered', 'cancelText', 'closable', 'mask', 'maskClosable', 'okText', 'okType', 'okButtonProps', 'cancelButtonProps', 'width', 'wrapClassName', 'zIndex', 'dialogStyle', 'dialogClass') this.modalProps = Object.assign({}, pickModalProps, options.modalProps) // 取出常用的input参数 - let pickInputProps = pick(options, 'placeholder', 'allowClear') + const pickInputProps = pick(options, 'placeholder', 'allowClear') this.inputProps = Object.assign({}, pickInputProps, options.inputProps) // 回调函数 this.callback = pick(options, 'onOk', 'onOkAsync', 'onCancel') @@ -66,10 +66,10 @@ export default { this.$nextTick(() => this.$refs.input.focus()) }, - onOk() { + onOk () { this.$refs.form.validate((ok, err) => { if (ok) { - let event = {value: this.model.input, target: this} + const event = { value: this.model.input, target: this } // 异步方法优先级高于同步方法 if (typeof this.callback.onOkAsync === 'function') { this.callback.onOkAsync(event) @@ -82,43 +82,43 @@ export default { } }) }, - onCancel() { + onCancel () { if (typeof this.callback.onCancel === 'function') { this.callback.onCancel(this.model.input) } this.close() }, - onInputPressEnter() { + onInputPressEnter () { this.onOk() }, - close() { + close () { this.visible = this.loading ? this.visible : false }, - forceClose() { + forceClose () { this.visible = false }, - showLoading() { + showLoading () { this.loading = true }, - hideLoading() { + hideLoading () { this.loading = false }, - afterClose(e) { + afterClose (e) { if (typeof this.modalProps.afterClose === 'function') { this.modalProps.afterClose(e) } this.$emit('after-close', e) - }, + } - }, + } } \ No newline at end of file + diff --git a/jero-web/src/components/jero/JModal/index.js b/jero-web/src/components/jero/JModal/index.js index 638538ea..0d24d5ab 100644 --- a/jero-web/src/components/jero/JModal/index.js +++ b/jero-web/src/components/jero/JModal/index.js @@ -2,7 +2,7 @@ import JModal from './JModal' import JPrompt from './JPrompt' export default { - install(Vue) { + install (Vue) { Vue.component(JModal.name, JModal) const JPromptExtend = Vue.extend(JPrompt) @@ -14,5 +14,5 @@ export default { vm.$on('after-close', () => vm.$destroy()) return vm } - }, -} \ No newline at end of file + } +} diff --git a/jero-web/src/components/jero/JModal/index.vue b/jero-web/src/components/jero/JModal/index.vue index 45165f0b..15f602b4 100644 --- a/jero-web/src/components/jero/JModal/index.vue +++ b/jero-web/src/components/jero/JModal/index.vue @@ -47,125 +47,125 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JPopup.vue b/jero-web/src/components/jero/JPopup.vue index ff689ed5..5de73a5b 100644 --- a/jero-web/src/components/jero/JPopup.vue +++ b/jero-web/src/components/jero/JPopup.vue @@ -20,196 +20,196 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JSelectMultiple.vue b/jero-web/src/components/jero/JSelectMultiple.vue index e47804d1..b2deaafa 100644 --- a/jero-web/src/components/jero/JSelectMultiple.vue +++ b/jero-web/src/components/jero/JSelectMultiple.vue @@ -17,78 +17,78 @@ diff --git a/jero-web/src/components/jero/JSlider.vue b/jero-web/src/components/jero/JSlider.vue index 18fda687..a0a48dad 100644 --- a/jero-web/src/components/jero/JSlider.vue +++ b/jero-web/src/components/jero/JSlider.vue @@ -7,74 +7,74 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JSuperQuery.vue b/jero-web/src/components/jero/JSuperQuery.vue index 84e6d90a..4db12e1a 100644 --- a/jero-web/src/components/jero/JSuperQuery.vue +++ b/jero-web/src/components/jero/JSuperQuery.vue @@ -201,11 +201,9 @@ - - @@ -217,21 +215,21 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JSwitch.vue b/jero-web/src/components/jero/JSwitch.vue index dd153704..17c26136 100644 --- a/jero-web/src/components/jero/JSwitch.vue +++ b/jero-web/src/components/jero/JSwitch.vue @@ -20,83 +20,82 @@ diff --git a/jero-web/src/components/jero/JTable.vue b/jero-web/src/components/jero/JTable.vue index 43c2a1dd..410309a5 100644 --- a/jero-web/src/components/jero/JTable.vue +++ b/jero-web/src/components/jero/JTable.vue @@ -67,9 +67,9 @@ diff --git a/jero-web/src/components/jero/JTime.vue b/jero-web/src/components/jero/JTime.vue index 0615e8a1..60b1e9b8 100644 --- a/jero-web/src/components/jero/JTime.vue +++ b/jero-web/src/components/jero/JTime.vue @@ -11,80 +11,80 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JTreeDict.vue b/jero-web/src/components/jero/JTreeDict.vue index cec5e638..faa4bcae 100644 --- a/jero-web/src/components/jero/JTreeDict.vue +++ b/jero-web/src/components/jero/JTreeDict.vue @@ -17,202 +17,202 @@ \ No newline at end of file + +} + diff --git a/jero-web/src/components/jero/JTreeSelect.vue b/jero-web/src/components/jero/JTreeSelect.vue index e95fa5c8..a61c5594 100644 --- a/jero-web/src/components/jero/JTreeSelect.vue +++ b/jero-web/src/components/jero/JTreeSelect.vue @@ -39,300 +39,300 @@ diff --git a/jero-web/src/components/jero/JTreeTable.vue b/jero-web/src/components/jero/JTreeTable.vue index bf14b81e..0c0c76ce 100644 --- a/jero-web/src/components/jero/JTreeTable.vue +++ b/jero-web/src/components/jero/JTreeTable.vue @@ -17,164 +17,164 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JUpload.vue b/jero-web/src/components/jero/JUpload.vue index 42fe27fd..1c2c5812 100644 --- a/jero-web/src/components/jero/JUpload.vue +++ b/jero-web/src/components/jero/JUpload.vue @@ -35,275 +35,275 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JVxeTable/components/JVxeDetailsModal.vue b/jero-web/src/components/jero/JVxeTable/components/JVxeDetailsModal.vue index 792e0613..99157269 100644 --- a/jero-web/src/components/jero/JVxeTable/components/JVxeDetailsModal.vue +++ b/jero-web/src/components/jero/JVxeTable/components/JVxeDetailsModal.vue @@ -20,46 +20,46 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JVxeTable/components/JVxePagination.vue b/jero-web/src/components/jero/JVxeTable/components/JVxePagination.vue index b57dcf4b..8106a96c 100644 --- a/jero-web/src/components/jero/JVxeTable/components/JVxePagination.vue +++ b/jero-web/src/components/jero/JVxeTable/components/JVxePagination.vue @@ -10,58 +10,58 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JVxeTable/components/JVxeSubPopover.vue b/jero-web/src/components/jero/JVxeTable/components/JVxeSubPopover.vue index 610de076..f315e236 100644 --- a/jero-web/src/components/jero/JVxeTable/components/JVxeSubPopover.vue +++ b/jero-web/src/components/jero/JVxeTable/components/JVxeSubPopover.vue @@ -17,121 +17,120 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JVxeTable/components/JVxeTable.js b/jero-web/src/components/jero/JVxeTable/components/JVxeTable.js index e60713e4..9772a9bf 100644 --- a/jero-web/src/components/jero/JVxeTable/components/JVxeTable.js +++ b/jero-web/src/components/jero/JVxeTable/components/JVxeTable.js @@ -17,13 +17,13 @@ import { getNoAuthCols } from '@/utils/authFilter' export default { name: 'JVxeTable', - provide() { + provide () { return { superTrigger: (name, event) => this.trigger(name, event) } }, mixins: [VxeWebSocketMixins], - components: {JVxeToolbar, JVxeSubPopover, JVxeDetailsModal, JVxePagination}, + components: { JVxeToolbar, JVxeSubPopover, JVxeDetailsModal, JVxePagination }, props: { rowKey: PropTypes.string.def('id'), // 列信息 @@ -48,7 +48,7 @@ export default { // prefix 前缀;suffix 后缀; slots: ['prefix', 'suffix'], // add 新增按钮;remove 删除按钮;clearSelection 清空选择按钮;collapse 展开收起 - btns: ['add', 'remove', 'clearSelection'], + btns: ['add', 'remove', 'clearSelection'] })), // 是否显示行号 rowNumber: PropTypes.bool.def(false), @@ -66,7 +66,7 @@ export default { // 最大高度 maxHeight: { type: Number, - default: () => null, + default: () => null }, // 要禁用的行 TODO 未实现 disabledRows: PropTypes.object.def(() => ({})), @@ -99,9 +99,9 @@ export default { // 注:该参数不能动态修改;如果行、列字段多的情况下,会根据机器性能造成不同程度的卡顿。 alwaysEdit: PropTypes.bool.def(false), // 联动配置,数组,详情配置见文档 - linkageConfig: PropTypes.array.def(() => []), + linkageConfig: PropTypes.array.def(() => []) }, - data() { + data () { return { isJVXETable: true, // caseId,表格唯一标识 @@ -111,7 +111,7 @@ export default { // 内置 EditRules _innerEditRules: [], // 记录滚动条位置 - scroll: {top: 0, left: 0}, + scroll: { top: 0, left: 0 }, // 当前是否正在滚动 scrolling: false, // vxe 默认配置 @@ -125,7 +125,7 @@ export default { 'show-header-overflow': true, 'show-footer-overflow': true, // 可编辑配置 - 'edit-config': {trigger: 'click', mode: 'cell', showStatus: true}, + 'edit-config': { trigger: 'click', mode: 'cell', showStatus: true }, 'expand-config': { iconClose: 'ant-table-row-expand-icon ant-table-row-collapsed', iconOpen: 'ant-table-row-expand-icon ant-table-row-expanded' @@ -137,8 +137,8 @@ export default { // 'scroll-x': { // gt: 15 // }, - 'radio-config': {highlight: true}, - 'checkbox-config': {highlight: true}, + 'radio-config': { highlight: true }, + 'checkbox-config': { highlight: true } }, // 绑定左侧选择框 selectedRows: [], @@ -148,30 +148,30 @@ export default { statistics: { has: false, sum: [], - average: [], + average: [] }, // 允许执行刷新特效的行ID reloadEffectRowKeysMap: {}, - //配置了但是没有授权的按钮和列 集合 - excludeCode:[], + // 配置了但是没有授权的按钮和列 集合 + excludeCode: [], // 联动下拉选项(用于隔离不同的下拉选项) // 内部联动配置,map - _innerLinkageConfig: null, + _innerLinkageConfig: null } }, computed: { // vxe 最终 columns - vxeColumns() { + vxeColumns () { this._innerColumns.forEach(column => { - let renderOptions = { + const renderOptions = { caseId: this.caseId, bordered: this.bordered, disabled: this.disabled, scrolling: this.scrolling, reloadEffect: this.reloadEffect, reloadEffectRowKeysMap: this.reloadEffectRowKeysMap, - listeners: this.cellListeners, + listeners: this.cellListeners } if (column.$type === JVXETypes.rowDragSort) { renderOptions.dragSortKey = this.dragSortKey @@ -191,7 +191,7 @@ export default { config: this._innerLinkageConfig.get(column.key), getLinkageOptionsSibling: this.getLinkageOptionsSibling, getLinkageOptionsAsync: this.getLinkageOptionsAsync, - linkageSelectChange: this.linkageSelectChange, + linkageSelectChange: this.linkageSelectChange } } } @@ -204,21 +204,21 @@ export default { // update--begin--autor:lvdandan-----date:20201019------for:LOWCOD-882 【新行编辑】列表上带按钮的遮挡问题 if (column.$type === JVXETypes.file || column.$type === JVXETypes.image) { if (column.width && column.width.endsWith('px')) { - column.width = Number.parseInt(column.width.substr(0,column.width.length-2))+Number.parseInt(1)+'px'; + column.width = Number.parseInt(column.width.substr(0, column.width.length - 2)) + Number.parseInt(1) + 'px' } } // update--begin--autor:lvdandan-----date:20201019------for:LOWCOD-882 【新行编辑】列表上带按钮的遮挡问题 // update--begin--autor:lvdandan-----date:20201211------for:JT-118 【online】 日期、时间控件长度较小 if (column.$type === JVXETypes.datetime || column.$type === JVXETypes.userSelect || column.$type === JVXETypes.departSelect) { - let width = column.width && column.width.endsWith('px')?Number.parseInt(column.width.substr(0,column.width.length-2)):0; - if(width <= 190){ + const width = column.width && column.width.endsWith('px') ? Number.parseInt(column.width.substr(0, column.width.length - 2)) : 0 + if (width <= 190) { column.width = '190px' } } if (column.$type === JVXETypes.date) { - let width = column.width && column.width.endsWith('px')?Number.parseInt(column.width.substr(0,column.width.length-2)):0; - if(width <= 135){ + const width = column.width && column.width.endsWith('px') ? Number.parseInt(column.width.substr(0, column.width.length - 2)) : 0 + if (width <= 135) { column.width = '135px' } } @@ -227,15 +227,15 @@ export default { return this._innerColumns }, // vxe 最终 editRules - vxeEditRules() { + vxeEditRules () { return Object.assign({}, this.editRules, this._innerEditRules) }, // vxe 最终 props - vxeProps() { - let expandConfig = Object.assign({}, this.defaultVxeProps['expand-config'], this.expandConfig) + vxeProps () { + const expandConfig = Object.assign({}, this.defaultVxeProps['expand-config'], this.expandConfig) return Object.assign({}, this.defaultVxeProps, { - showFooter: this.statistics.has, + showFooter: this.statistics.has }, this.$attrs, { loading: this.loading, columns: this.vxeColumns, @@ -245,21 +245,21 @@ export default { maxHeight: this.maxHeight, border: this.bordered, expandConfig: expandConfig, - footerMethod: this.handleFooterMethod, + footerMethod: this.handleFooterMethod // footerSpanMethod: this.handleFooterSpanMethod, }) }, // vxe 最终 events - vxeEvents() { + vxeEvents () { // 内置事件 - let events = { - 'scroll': this.handleVxeScroll, + const events = { + scroll: this.handleVxeScroll, 'cell-click': this.handleCellClick, 'edit-closed': this.handleEditClosed, 'edit-actived': this.handleEditActived, 'radio-change': this.handleVxeRadioChange, 'checkbox-all': this.handleVxeCheckboxAll, - 'checkbox-change': this.handleVxeCheckboxChange, + 'checkbox-change': this.handleVxeCheckboxChange } // 用户传递的事件,进行合并操作 Object.keys(this.$listeners).forEach(key => { @@ -276,7 +276,7 @@ export default { return events }, // 组件监听事件 - cellListeners() { + cellListeners () { return { trigger: (name, event) => this.trigger(name, event), valueChange: event => this.trigger('valueChange', event), @@ -285,16 +285,16 @@ export default { /** 当前行向下移一位 */ rowMoveDown: rowIndex => this.rowResort(rowIndex, rowIndex + 1), /** 在当前行下面插入一行 */ - rowInsertDown: rowIndex => this.insertRows({}, rowIndex + 1), + rowInsertDown: rowIndex => this.insertRows({}, rowIndex + 1) } - }, + } }, watch: { dataSource: { // deep: true, immediate: true, - async handler() { - let vxe = await getRefPromise(this, 'vxe') + async handler () { + const vxe = await getRefPromise(this, 'vxe') this.dataSource.forEach((data, idx) => { // 开启了排序就自动计算排序值 @@ -303,7 +303,7 @@ export default { } // 处理联动回显数据 if (this._innerLinkageConfig != null) { - for (let configItem of this._innerLinkageConfig.values()) { + for (const configItem of this._innerLinkageConfig.values()) { this.autoSetLinkageOptionsByData(data, '', configItem, 0) } } @@ -334,16 +334,16 @@ export default { // } // } // }) - }, + } }, columns: { immediate: true, - handler(columns) { - //获取不需要显示列 + handler (columns) { + // 获取不需要显示列 this.loadExcludeCode() - let _innerColumns = [] - let _innerEditRules = {} - let {rowNumber, rowSelection, rowExpand, dragSort} = this + const _innerColumns = [] + const _innerEditRules = {} + const { rowNumber, rowSelection, rowExpand, dragSort } = this let expandColumn, seqColumn, checkboxColumn, radioColumn, dragSortColumn if (Array.isArray(columns)) { this.statistics.has = false @@ -352,11 +352,11 @@ export default { // 处理成vxe可识别的columns columns.forEach(column => { - if(this.excludeCode.indexOf(column.key)>=0){ + if (this.excludeCode.indexOf(column.key) >= 0) { return false } - let col = {...column} - let {type} = col + const col = { ...column } + const { type } = col const enhanced = getEnhancedMixins(type) if (type === JVXETypes.rowNumber) { seqColumn = col @@ -373,7 +373,7 @@ export default { // 防止和vxeTable自带的type起冲突 col.$type = col.type delete col.type - let renderName = 'cellRender', renderOptions = {name: JVXETypes._prefix + type} + let renderName = 'cellRender'; const renderOptions = { name: JVXETypes._prefix + type } if (type) { // hidden 是特殊的组件 if (type === JVXETypes.hidden) { @@ -392,10 +392,10 @@ export default { } // 处理校验 if (col.validateRules) { - let rules = [] + const rules = [] if (Array.isArray(col.validateRules)) { - for (let rule of col.validateRules) { - let replace = { + for (const rule of col.validateRules) { + const replace = { message: replaceProps(col, rule.message) } if (rule.unique || rule.pattern === 'only') { @@ -408,7 +408,7 @@ export default { delete rule.pattern } else { // 兼容Online表单的特殊规则 - for (let foo of fooPatterns) { + for (const foo of fooPatterns) { if (foo.value === rule.pattern) { rule.pattern = foo.pattern break @@ -429,7 +429,7 @@ export default { if (Array.isArray(col.statistics)) { this.statistics.has = true col.statistics.forEach(item => { - let arr = this.statistics[item.toLowerCase()] + const arr = this.statistics[item.toLowerCase()] if (Array.isArray(arr)) { pushIfNotExist(arr, col.key) } @@ -441,9 +441,9 @@ export default { } // 判断是否开启了序号 if (rowNumber) { - let col = {type: 'seq', title: '#', width: 60, fixed: 'left', align: 'center'} + let col = { type: 'seq', title: '#', width: 60, fixed: 'left', align: 'center' } if (seqColumn) { - col = Object.assign(col, seqColumn, {type: 'seq'}) + col = Object.assign(col, seqColumn, { type: 'seq' }) } _innerColumns.unshift(col) } @@ -453,14 +453,14 @@ export default { if (this.statistics.has && !rowExpand && !dragSort) { width = 60 } - let col = {type: this.rowSelectionType, width, fixed: 'left', align: 'center'} + let col = { type: this.rowSelectionType, width, fixed: 'left', align: 'center' } // radio if (this.rowSelectionType === 'radio' && radioColumn) { - col = Object.assign(col, radioColumn, {type: 'radio'}) + col = Object.assign(col, radioColumn, { type: 'radio' }) } // checkbox if (this.rowSelectionType === 'checkbox' && checkboxColumn) { - col = Object.assign(col, checkboxColumn, {type: 'checkbox'}) + col = Object.assign(col, checkboxColumn, { type: 'checkbox' }) } _innerColumns.unshift(col) } @@ -470,9 +470,9 @@ export default { if (this.statistics.has && !dragSort) { width = 60 } - let col = {type: 'expand', title: '', width, fixed: 'left', align: 'center', slots: {content: 'expandContent'}} + let col = { type: 'expand', title: '', width, fixed: 'left', align: 'center', slots: { content: 'expandContent' } } if (expandColumn) { - col = Object.assign(col, expandColumn, {type: 'expand'}) + col = Object.assign(col, expandColumn, { type: 'expand' }) } _innerColumns.unshift(col) } @@ -482,9 +482,9 @@ export default { if (this.statistics.has) { width = 60 } - let col = {type: JVXETypes.rowDragSort, title: '', width, fixed: 'left', align: 'center', cellRender: {name: JVXETypes._prefix + JVXETypes.rowDragSort}} + let col = { type: JVXETypes.rowDragSort, title: '', width, fixed: 'left', align: 'center', cellRender: { name: JVXETypes._prefix + JVXETypes.rowDragSort } } if (dragSortColumn) { - col = Object.assign(col, dragSortColumn, {type: JVXETypes.rowDragSort}) + col = Object.assign(col, dragSortColumn, { type: JVXETypes.rowDragSort }) } _innerColumns.unshift(col) } @@ -497,11 +497,11 @@ export default { // 整理多级联动配置 linkageConfig: { immediate: true, - handler() { + handler () { if (Array.isArray(this.linkageConfig) && this.linkageConfig.length > 0) { // 获取联动的key顺序 - let getLcKeys = (key, arr) => { - let col = this._innerColumns.find(col => col.key === key) + const getLcKeys = (key, arr) => { + const col = this._innerColumns.find(col => col.key === key) if (col) { arr.push(col.key) if (col.linkageKey) { @@ -510,12 +510,13 @@ export default { } return arr } - let configMap = new Map() + const configMap = new Map() this.linkageConfig.forEach(lc => { - let keys = getLcKeys(lc.key, []) + const keys = getLcKeys(lc.key, []) // 多个key共享一个,引用地址 - let configItem = { - ...lc, keys, + const configItem = { + ...lc, + keys, optionsMap: new Map() } keys.forEach(k => configMap.set(k, configItem)) @@ -525,11 +526,11 @@ export default { this._innerLinkageConfig = null } } - }, + } }, - created() { + created () { }, - mounted() { + mounted () { this.handleTabsChange() }, methods: { @@ -537,7 +538,7 @@ export default { /** * 自动判断父级是否是 组件,然后添加事件监听,自动重置表格 */ - handleTabsChange() { + handleTabsChange () { // 获取父级 const tabs = getVmParentByName(this, 'ATabs') const tabPane = getVmParentByName(this, 'ATabPane') @@ -558,8 +559,8 @@ export default { } }, - handleVxeScroll(event) { - let {$refs, scroll} = this + handleVxeScroll (event) { + const { $refs, scroll } = this // 记录滚动条的位置 scroll.top = event.scrollTop @@ -570,23 +571,23 @@ export default { this.closeScrolling() }, // 当手动勾选单选时触发的事件 - handleVxeRadioChange(event) { - let row = event.$table.getRadioRecord() + handleVxeRadioChange (event) { + const row = event.$table.getRadioRecord() this.selectedRows = row ? [row] : [] this.handleSelectChange('radio', this.selectedRows, event) }, // 当手动勾选全选时触发的事件 - handleVxeCheckboxAll(event) { + handleVxeCheckboxAll (event) { this.selectedRows = event.$table.getCheckboxRecords() this.handleSelectChange('checkbox-all', this.selectedRows, event) }, // 当手动勾选并且值发生改变时触发的事件 - handleVxeCheckboxChange(event) { + handleVxeCheckboxChange (event) { this.selectedRows = event.$table.getCheckboxRecords() this.handleSelectChange('checkbox', this.selectedRows, event) }, // 行选择change事件 - handleSelectChange(type, selectedRows, $event) { + handleSelectChange (type, selectedRows, $event) { let action if (type === 'radio') { action = 'selected' @@ -608,9 +609,9 @@ export default { }, // 点击单元格时触发的事件 - handleCellClick(event) { - let {row, column, $event, $table} = event - let {$refs} = this + handleCellClick (event) { + const { row, column, $event, $table } = event + const { $refs } = this // 点击了可编辑的 if (column.editRender) { @@ -651,21 +652,21 @@ export default { }, // 单元格编辑状态下被关闭时会触发该事件 - handleEditClosed({column}) { + handleEditClosed ({ column }) { // 执行增强 getEnhancedMixins(column.own.$type, 'aopEvents').editClosed.apply(this, arguments) }, // 单元格被激活编辑时会触发该事件 - handleEditActived({column}) { + handleEditActived ({ column }) { // 执行增强 getEnhancedMixins(column.own.$type, 'aopEvents').editActived.apply(this, arguments) }, /** 表尾数据处理方法,用于显示统计信息 */ - handleFooterMethod({columns, data}) { - const {statistics} = this - let footers = [] + handleFooterMethod ({ columns, data }) { + const { statistics } = this + const footers = [] if (statistics.has) { if (statistics.sum.length > 0) { footers.push(this.getFooterStatisticsMap({ @@ -687,7 +688,7 @@ export default { return footers }, - getFooterStatisticsMap({columns, title, checks, method}) { + getFooterStatisticsMap ({ columns, title, checks, method }) { return columns.map((column, columnIndex) => { if (columnIndex === 0) { return title @@ -700,19 +701,19 @@ export default { }, /** 表尾单元格合并方法 */ - handleFooterSpanMethod(event) { + handleFooterSpanMethod (event) { if (event.columnIndex === 0) { - return {colspan: 2} + return { colspan: 2 } } }, - /*--- 外部可调用接口方法 ---*/ + /* --- 外部可调用接口方法 --- */ /** * 重置滚动条Top位置 * @param top 新top位置,留空则滚动到上次记录的位置,用于解决切换tab选项卡时导致白屏以及自动将滚动条滚动到顶部的问题 */ - resetScrollTop(top) { + resetScrollTop (top) { this.scrollTo(null, (top == null || top === '') ? this.scroll.top : top) }, @@ -721,9 +722,9 @@ export default { * 适用于不是数据库里查出来的没有id的临时数据 * @param dataSource */ - async loadNewData(dataSource) { + async loadNewData (dataSource) { if (Array.isArray(dataSource)) { - let {xTable} = this.$refs.vxe.$refs + const { xTable } = this.$refs.vxe.$refs // issues/2784 // 先清空所有数据 xTable.loadData([]) @@ -735,7 +736,7 @@ export default { } // 处理联动回显数据 if (this._innerLinkageConfig != null) { - for (let configItem of this._innerLinkageConfig.values()) { + for (const configItem of this._innerLinkageConfig.values()) { this.autoSetLinkageOptionsByData(data, '', configItem, 0) } } @@ -747,33 +748,33 @@ export default { }, // 校验table,失败返回errMap,成功返回null - async validateTable() { + async validateTable () { const errMap = await this.validate().catch(errMap => errMap) - return errMap ? errMap : null + return errMap || null }, // 完整校验 - async fullValidateTable() { + async fullValidateTable () { const errMap = await this.fullValidate().catch(errMap => errMap) - return errMap ? errMap : null + return errMap || null }, /** 设置某行某列的值 */ - setValues(values) { + setValues (values) { if (!Array.isArray(values)) { console.warn(`JVxeTable.setValues:必须传递数组`) return } values.forEach((item, idx) => { - let {rowKey, values: record} = item - let {row} = this.getIfRowById(rowKey) + const { rowKey, values: record } = item + const { row } = this.getIfRowById(rowKey) if (!row) { return } Object.keys(record).forEach(colKey => { - let column = this.getColumnByKey(colKey) + const column = this.getColumnByKey(colKey) if (column) { - let oldValue = row[colKey] - let newValue = record[colKey] + const oldValue = row[colKey] + const newValue = record[colKey] if (newValue !== oldValue) { this.$set(row, colKey, newValue) // 触发 valueChange 事件 @@ -783,7 +784,7 @@ export default { oldValue: oldValue, col: column.own, column: column, - isSetValues: true, + isSetValues: true }) } } else { @@ -794,26 +795,26 @@ export default { }, /** 获取所有的数据,包括values、deleteIds */ - getAll() { + getAll () { return { tableData: this.getTableData(), deleteData: this.getDeleteData() } }, /** 获取表格表单里的值 */ - getValues(callback, rowIds) { - let tableData = this.getTableData({rowIds: rowIds}) + getValues (callback, rowIds) { + const tableData = this.getTableData({ rowIds: rowIds }) callback('', tableData) }, /** 获取表格数据 */ - getTableData(options = {}) { - let {rowIds} = options + getTableData (options = {}) { + const { rowIds } = options let tableData // 仅查询指定id的行 if (Array.isArray(rowIds) && rowIds.length > 0) { tableData = [] rowIds.forEach(rowId => { - let {row} = this.getIfRowById(rowId) + const { row } = this.getIfRowById(rowId) if (row) { tableData.push(row) } @@ -825,33 +826,33 @@ export default { return this.filterNewRows(tableData, false) }, /** 仅获取新增的数据 */ - getNewData() { - let newData = cloneObject(this.$refs.vxe.getInsertRecords()) + getNewData () { + const newData = cloneObject(this.$refs.vxe.getInsertRecords()) newData.forEach(row => delete row.id) return newData }, /** 仅获取新增的数据,带有id */ - getNewDataWithId() { - let newData = cloneObject(this.$refs.vxe.getInsertRecords()) + getNewDataWithId () { + const newData = cloneObject(this.$refs.vxe.getInsertRecords()) return newData }, /** 根据ID获取行,新增的行也能查出来 */ - getIfRowById(id) { - let row = this.getRowById(id), isNew = false + getIfRowById (id) { + let row = this.getRowById(id); let isNew = false if (!row) { row = this.getNewRowById(id) if (!row) { console.warn(`JVxeTable.getIfRowById:没有找到id为"${id}"的行`) - return {row: null} + return { row: null } } isNew = true } - return {row, isNew} + return { row, isNew } }, /** 通过临时ID获取新增的行 */ - getNewRowById(id) { - let records = this.getInsertRecords() - for (let record of records) { + getNewRowById (id) { + const records = this.getInsertRecords() + for (const record of records) { if (record.id === id) { return record } @@ -859,7 +860,7 @@ export default { return null }, /** 仅获取被删除的数据(新增又被删除的数据不会被获取到) */ - getDeleteData() { + getDeleteData () { return cloneObject(this.$refs.vxe.getRemoveRecords()) }, /** @@ -869,7 +870,7 @@ export default { * @param isOnlJs 是否是onlineJS增强触发的 * @return */ - async addRows(rows = {}, isOnlJs) { + async addRows (rows = {}, isOnlJs) { return this._addOrInsert(rows, -1, 'added', isOnlJs) }, @@ -880,7 +881,7 @@ export default { * @param index 添加下标,数字,必填 * @return */ - async insertRows(rows, index) { + async insertRows (rows, index) { if (typeof index !== 'number' || index < 0) { console.warn(`【JVXETable】insertRows:index必须传递数字,且大于-1`) return @@ -893,14 +894,14 @@ export default { * @param options 选项 * @param options.setActive 是否激活最后一行的编辑模式 */ - async pushRows(rows = {}, options = {}) { - let {xTable} = this.$refs.vxe.$refs - let {setActive, index} = options + async pushRows (rows = {}, options = {}) { + const { xTable } = this.$refs.vxe.$refs + let { setActive, index } = options setActive = setActive == null ? false : !!setActive index = index == null ? -1 : index index = index === -1 ? index : xTable.tableFullData[index] // 插入行 - let result = await xTable.insertAt(rows, index) + const result = await xTable.insertAt(rows, index) if (setActive) { // 激活最后一行的编辑模式 xTable.setActiveRow(result.rows[result.rows.length - 1]) @@ -910,8 +911,8 @@ export default { }, /** 清空选择行 */ - clearSelection() { - let event = {$table: this.$refs.vxe, target: this} + clearSelection () { + const event = { $table: this.$refs.vxe, target: this } if (this.rowSelectionType === JVXETypes.rowRadio) { this.$refs.vxe.clearRadioRow() this.handleVxeRadioChange(event) @@ -922,22 +923,22 @@ export default { }, /** 删除一行或多行数据 */ - async removeRows(rows) { + async removeRows (rows) { const res = await this._remove(rows) await this._recalcSortNumber() return res }, /** 根据id删除一行或多行 */ - removeRowsById(rowId) { + removeRowsById (rowId) { let rowIds if (Array.isArray(rowId)) { rowIds = rowId } else { rowIds = [rowId] } - let rows = rowIds.map((id) => { - let {row} = this.getIfRowById(id) + const rows = rowIds.map((id) => { + const { row } = this.getIfRowById(id) if (!row) { return } @@ -951,29 +952,29 @@ export default { return this.removeRows(rows) }, - getColumnByKey() { + getColumnByKey () { return this.$refs.vxe.getColumnByField.apply(this.$refs.vxe, arguments) }, - /* --- 辅助方法 ---*/ + /* --- 辅助方法 --- */ // 触发事件 - trigger(name, event = {}) { + trigger (name, event = {}) { event.$target = this event.$table = this.$refs.vxe - //online增强参数兼容 + // online增强参数兼容 event.target = this this.$emit(name, event) }, /** 【多级联动】获取同级联动下拉选项 */ - getLinkageOptionsSibling(row, col, config, request) { + getLinkageOptionsSibling (row, col, config, request) { // 如果当前列不是顶级列 let key = '' if (col.key !== config.key) { // 就找出联动上级列 - let idx = config.keys.findIndex(k => col.key === k) - let parentKey = config.keys[idx - 1] + const idx = config.keys.findIndex(k => col.key === k) + const parentKey = config.keys[idx - 1] key = row[parentKey] // 如果联动上级列没有选择数据,就直接返回空数组 if (key === '' || key == null) { @@ -985,7 +986,7 @@ export default { let options = config.optionsMap.get(key) if (!Array.isArray(options)) { if (request) { - let parent = key === 'root' ? '' : key + const parent = key === 'root' ? '' : key return this.getLinkageOptionsAsync(config, parent) } else { options = [] @@ -994,9 +995,9 @@ export default { return options }, /** 【多级联动】获取联动下拉选项(异步) */ - getLinkageOptionsAsync(config, parent) { + getLinkageOptionsAsync (config, parent) { return new Promise(resolve => { - let key = parent ? parent : 'root' + const key = parent || 'root' let options if (config.optionsMap.has(key)) { options = config.optionsMap.get(key) @@ -1010,7 +1011,7 @@ export default { } } else if (typeof config.requestData === 'function') { // 调用requestData方法,通过传入parent来获取子级 - let promise = config.requestData(parent) + const promise = config.requestData(parent) config.optionsMap.set(key, promise) promise.then(opt => { config.optionsMap.set(key, opt) @@ -1022,41 +1023,41 @@ export default { }) }, // 【多级联动】 用于回显数据,自动填充 optionsMap - autoSetLinkageOptionsByData(data, parent, config, level) { + autoSetLinkageOptionsByData (data, parent, config, level) { if (level === 0) { this.getLinkageOptionsAsync(config, '') } else { this.getLinkageOptionsAsync(config, parent) } if (config.keys.length - 1 > level) { - let value = data[config.keys[level]] + const value = data[config.keys[level]] if (value) { this.autoSetLinkageOptionsByData(data, value, config, level + 1) } } }, // 【多级联动】联动组件change时,清空下级组件 - linkageSelectChange(row, col, config, value) { + linkageSelectChange (row, col, config, value) { if (col.linkageKey) { this.getLinkageOptionsAsync(config, value) - let idx = config.keys.findIndex(k => k === col.key) - let values = {} + const idx = config.keys.findIndex(k => k === col.key) + const values = {} for (let i = idx; i < config.keys.length; i++) { values[config.keys[i]] = '' } // 清空后几列的数据 - this.setValues([{rowKey: row.id, values}]) + this.setValues([{ rowKey: row.id, values }]) } }, /** 加载数据字典并合并到 options */ - _loadDictConcatToOptions(column) { + _loadDictConcatToOptions (column) { initDictOptions(column.dictCode).then((res) => { if (res.success) { - let newOptions = (column.options || [])// .concat(res.result) + const newOptions = (column.options || [])// .concat(res.result) res.result.forEach(item => { // 过滤重复数据 - for (let option of newOptions) if (option.value === item.value) return + for (const option of newOptions) if (option.value === item.value) return newOptions.push(item) }) this.$set(column, 'options', newOptions) @@ -1067,8 +1068,8 @@ export default { } }) }, - //options自定义赋值 刷新 - virtualRefresh(){ + // options自定义赋值 刷新 + virtualRefresh () { this.scrolling = true this.closeScrolling() }, @@ -1083,13 +1084,13 @@ export default { * @param remove true = 删除新增,false=只删除id * @param handler function */ - filterNewRows(rows, remove = true, handler) { - let insertRecords = this.$refs.vxe.getInsertRecords() - let records = [] - for (let row of rows) { - let item = cloneObject(row) + filterNewRows (rows, remove = true, handler) { + const insertRecords = this.$refs.vxe.getInsertRecords() + const records = [] + for (const row of rows) { + const item = cloneObject(row) if (insertRecords.includes(row)) { - handler ? handler({item, row, insertRecords}) : null + handler ? handler({ item, row, insertRecords }) : null if (remove) { continue @@ -1102,8 +1103,8 @@ export default { }, // 删除选中的数据 - async removeSelection() { - let res = await this._remove(this.selectedRows) + async removeSelection () { + const res = await this._remove(this.selectedRows) this.clearSelection() await this._recalcSortNumber() return res @@ -1115,12 +1116,12 @@ export default { * 如果传 rows 则删除多行 * 如果为空则删除所有 */ - _remove(rows) { + _remove (rows) { const xTable = this.$refs.vxe.$refs.xTable - const {afterFullData, tableFullData, tableSourceData, editStore, treeConfig, checkboxOpts, selection, isInsertByRow, scrollYLoad} = xTable - const {actived, removeList, insertList} = editStore - const {checkField: property} = checkboxOpts + const { afterFullData, tableFullData, tableSourceData, editStore, treeConfig, checkboxOpts, selection, isInsertByRow, scrollYLoad } = xTable + const { actived, removeList, insertList } = editStore + const { checkField: property } = checkboxOpts let rest = [] const nowData = afterFullData if (treeConfig) { @@ -1152,7 +1153,7 @@ export default { } // 【从keepSource中删除】 if (xTable.keepSource) { - let rowIdSet = new Set(rows.map(row => row.id)) + const rowIdSet = new Set(rows.map(row => row.id)) XEUtils.remove(tableSourceData, row => rowIdSet.has(row.id)) } @@ -1171,17 +1172,17 @@ export default { } return xTable.$nextTick().then(() => { xTable.recalculate() - return {row: rest.length ? rest[rest.length - 1] : null, rows: rest} + return { row: rest.length ? rest[rest.length - 1] : null, rows: rest } }) }, /** 行重新排序 */ - async rowResort(oldIndex, newIndex) { + async rowResort (oldIndex, newIndex) { const xTable = this.$refs.vxe.$refs.xTable window.xTable = xTable const sort = (array) => { // 存储旧数据,并删除旧项目 - let row = array.splice(oldIndex, 1)[0] + const row = array.splice(oldIndex, 1)[0] // 向新项目里添加旧数据 array.splice(newIndex, 0, row) } @@ -1194,7 +1195,7 @@ export default { }, /** 重新计算排序字段的数值 */ - async _recalcSortNumber() { + async _recalcSortNumber () { const xTable = this.$refs.vxe.$refs.xTable if (this.dragSort) { xTable.tableFullData.forEach((data, idx) => data[this.dragSortKey] = (idx + 1)) @@ -1203,8 +1204,8 @@ export default { return await xTable.updateData() }, - async _addOrInsert(rows = {}, index, triggerName, isOnlJs) { - let {xTable} = this.$refs.vxe.$refs + async _addOrInsert (rows = {}, index, triggerName, isOnlJs) { + const { xTable } = this.$refs.vxe.$refs let records if (Array.isArray(rows)) { records = rows @@ -1213,17 +1214,17 @@ export default { } // 遍历添加默认值 records.forEach(record => this._createRow(record)) - let result = await this.pushRows(records, {index: index, setActive: true}) + const result = await this.pushRows(records, { index: index, setActive: true }) // 遍历插入的行 // update--begin--autor:lvdandan-----date:20201117------for:LOWCOD-987 【新行编辑】js增强附表内置方法调用问题 #1819 // online js增强时以传过来值为准,不再赋默认值 if (isOnlJs != true) { for (let i = 0; i < result.rows.length; i++) { - let row = result.rows[i] + const row = result.rows[i] this.trigger(triggerName, { row: row, $table: xTable, - target: this, + target: this }) } } @@ -1231,21 +1232,21 @@ export default { return result }, // 创建新行,自动添加默认值 - _createRow(record = {}) { - let {xTable} = this.$refs.vxe.$refs + _createRow (record = {}) { + const { xTable } = this.$refs.vxe.$refs // 添加默认值 xTable.tableFullColumn.forEach(column => { - let col = column.own + const col = column.own if (col.key && (record[col.key] == null || record[col.key] === '')) { // 设置默认值 - let createValue = getEnhancedMixins(col.$type || col.type, 'createValue') - record[col.key] = createValue({row: record, column, $table: xTable}) + const createValue = getEnhancedMixins(col.$type || col.type, 'createValue') + record[col.key] = createValue({ row: record, column, $table: xTable }) } // update-begin--author:sunjianlei---date:20210819------for: 处理联动列,联动列只能作用于 select 组件 if (col.$type === JVXETypes.select && this._innerLinkageConfig != null) { // 判断当前列是否是联动列 if (this._innerLinkageConfig.has(col.key)) { - let configItem = this._innerLinkageConfig.get(col.key) + const configItem = this._innerLinkageConfig.get(col.key) this.getLinkageOptionsAsync(configItem, '') } } @@ -1254,21 +1255,21 @@ export default { return record }, - /*--- 渲染函数 ---*/ + /* --- 渲染函数 --- */ // 渲染 vxe - renderVxeGrid(h) { + renderVxeGrid (h) { return h('vxe-grid', { ref: 'vxe', class: ['j-vxe-table'], props: this.vxeProps, on: this.vxeEvents, // 作用域插槽的格式为 - scopedSlots: this.$scopedSlots, + scopedSlots: this.$scopedSlots }) }, // 渲染工具栏 - renderToolbar(h) { + renderToolbar (h) { if (this.toolbar) { return h('j-vxe-toolbar', { props: { @@ -1277,7 +1278,7 @@ export default { size: this.size, disabled: this.disabled, disabledRows: this.disabledRows, - selectedRowIds: this.selectedRowIds, + selectedRowIds: this.selectedRowIds }, on: { // 新增事件 @@ -1285,15 +1286,15 @@ export default { // 保存事件 save: () => this.trigger('save', { $table: this.$refs.vxe, - target: this, + target: this }), // 删除事件 remove: () => { - let $table = this.$refs.vxe - let deleteRows = this.filterNewRows(this.selectedRows) + const $table = this.$refs.vxe + const deleteRows = this.filterNewRows(this.selectedRows) // 触发删除事件 if (deleteRows.length > 0) { - let removeEvent = {deleteRows, $table, target: this} + const removeEvent = { deleteRows, $table, target: this } if (this.asyncRemove) { // 确认删除,只有调用这个方法才会真删除 removeEvent.confirmRemove = () => this.removeSelection() @@ -1310,33 +1311,33 @@ export default { }, scopedSlots: { toolbarPrefix: this.$scopedSlots.toolbarPrefix, - toolbarSuffix: this.$scopedSlots.toolbarSuffix, - }, + toolbarSuffix: this.$scopedSlots.toolbarSuffix + } }) } return null }, // 渲染 toolbarAfter 插槽 - renderToolbarAfterSlot() { - if (this.$scopedSlots['toolbarAfter']) { - return this.$scopedSlots['toolbarAfter']() + renderToolbarAfterSlot () { + if (this.$scopedSlots.toolbarAfter) { + return this.$scopedSlots.toolbarAfter() } return null }, // 渲染点击时弹出的子表 - renderSubPopover(h) { + renderSubPopover (h) { if (this.clickRowShowSubForm && this.$scopedSlots.subForm) { return h('j-vxe-sub-popover', { ref: 'subPopover', scopedSlots: { - subForm: this.$scopedSlots.subForm, + subForm: this.$scopedSlots.subForm } }) } return null }, // 渲染点击时弹出的详细信息 - renderDetailsModal(h) { + renderDetailsModal (h) { if (this.clickRowShowMainForm && this.$scopedSlots.mainForm) { return h('j-vxe-details-modal', { ref: 'detailsModal', @@ -1348,7 +1349,7 @@ export default { } }, // 渲染分页器 - renderPagination(h) { + renderPagination (h) { if (this.pagination && Object.keys(this.pagination).length > 0) { return h('j-vxe-pagination', { props: { @@ -1358,17 +1359,17 @@ export default { }, on: { change: (e) => this.trigger('pageChange', e) - }, + } }) } return null }, - loadExcludeCode(){ - if(!this.authPre || this.authPre.length==0){ + loadExcludeCode () { + if (!this.authPre || this.authPre.length == 0) { this.excludeCode = [] - }else{ + } else { let pre = this.authPre - if(!pre.endsWith(':')){ + if (!pre.endsWith(':')) { pre += ':' } this.excludeCode = getNoAuthCols(pre) @@ -1376,7 +1377,7 @@ export default { } }, - render(h) { + render (h) { return h('div', { class: ['j-vxe-table-box', `size--${this.size}`] }, [ @@ -1385,33 +1386,33 @@ export default { this.renderToolbar(h), this.renderToolbarAfterSlot(), this.renderVxeGrid(h), - this.renderPagination(h), + this.renderPagination(h) ]) }, - beforeDestroy() { + beforeDestroy () { this.$emit('beforeDestroy') } } // 兼容 online 的规则 const fooPatterns = [ - {title: '非空', value: '*', pattern: /^.+$/}, - {title: '6到16位数字', value: 'n6-16', pattern: /^\d{6,16}$/}, - {title: '6到16位任意字符', value: '*6-16', pattern: /^.{6,16}$/}, - {title: '6到18位字母', value: 's6-18', pattern: /^[a-z|A-Z]{6,18}$/}, - {title: '网址', value: 'url', pattern: /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/}, - {title: '电子邮件', value: 'e', pattern: /^([\w]+\.*)([\w]+)@[\w]+\.\w{3}(\.\w{2}|)$/}, - {title: '手机号码', value: 'm', pattern: /^1[3456789]\d{9}$/}, - {title: '邮政编码', value: 'p', pattern: /^[1-9]\d{5}$/}, - {title: '字母', value: 's', pattern: /^[A-Z|a-z]+$/}, - {title: '数字', value: 'n', pattern: /^-?\d+(\.?\d+|\d?)$/}, - {title: '整数', value: 'z', pattern: /^-?\d+$/}, - {title: '金额', value: 'money', pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/}, + { title: '非空', value: '*', pattern: /^.+$/ }, + { title: '6到16位数字', value: 'n6-16', pattern: /^\d{6,16}$/ }, + { title: '6到16位任意字符', value: '*6-16', pattern: /^.{6,16}$/ }, + { title: '6到18位字母', value: 's6-18', pattern: /^[a-z|A-Z]{6,18}$/ }, + { title: '网址', value: 'url', pattern: /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/ }, + { title: '电子邮件', value: 'e', pattern: /^([\w]+\.*)([\w]+)@[\w]+\.\w{3}(\.\w{2}|)$/ }, + { title: '手机号码', value: 'm', pattern: /^1[3456789]\d{9}$/ }, + { title: '邮政编码', value: 'p', pattern: /^[1-9]\d{5}$/ }, + { title: '字母', value: 's', pattern: /^[A-Z|a-z]+$/ }, + { title: '数字', value: 'n', pattern: /^-?\d+(\.?\d+|\d?)$/ }, + { title: '整数', value: 'z', pattern: /^-?\d+$/ }, + { title: '金额', value: 'money', pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/ } ] /** 旧版handler转为新版Validator */ -function handlerConvertToValidator(event) { - const {column, rule} = event +function handlerConvertToValidator (event) { + const { column, rule } = event return new Promise((resolve, reject) => { rule.handler(event, (flag, msg) => { let message = rule.message @@ -1420,7 +1421,7 @@ function handlerConvertToValidator(event) { } if (flag == null) { resolve(message) - } else if (!!flag) { + } else if (flag) { resolve(message) } else { reject(new Error(message)) @@ -1430,11 +1431,11 @@ function handlerConvertToValidator(event) { } /** 唯一校验器 */ -function uniqueValidator(event) { - const {cellValue, column, rule} = event - let tableData = this.getTableData() +function uniqueValidator (event) { + const { cellValue, column, rule } = event + const tableData = this.getTableData() let findCount = 0 - for (let rowData of tableData) { + for (const rowData of tableData) { if (rowData[column.own.key] === cellValue) { if (++findCount >= 2) { return Promise.reject(new Error(rule.message)) @@ -1442,4 +1443,4 @@ function uniqueValidator(event) { } } return Promise.resolve() -} \ No newline at end of file +} diff --git a/jero-web/src/components/jero/JVxeTable/components/JVxeToolbar.vue b/jero-web/src/components/jero/JVxeTable/components/JVxeToolbar.vue index 8d53634e..6c501bd3 100644 --- a/jero-web/src/components/jero/JVxeTable/components/JVxeToolbar.vue +++ b/jero-web/src/components/jero/JVxeTable/components/JVxeToolbar.vue @@ -29,89 +29,89 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeCheckboxCell.vue b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeCheckboxCell.vue index 55a3e0c0..b5f7ee0a 100644 --- a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeCheckboxCell.vue +++ b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeCheckboxCell.vue @@ -10,86 +10,86 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeDateCell.vue b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeDateCell.vue index 48d33b5d..0e366bb4 100644 --- a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeDateCell.vue +++ b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeDateCell.vue @@ -13,56 +13,56 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeDepartSelectCell.vue b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeDepartSelectCell.vue index 5eceaf03..51f41424 100644 --- a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeDepartSelectCell.vue +++ b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeDepartSelectCell.vue @@ -26,113 +26,113 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeDragSortCell.vue b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeDragSortCell.vue index 0ba9e4fb..bbd918ee 100644 --- a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeDragSortCell.vue +++ b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeDragSortCell.vue @@ -20,51 +20,51 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeInputCell.vue b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeInputCell.vue index a32e9b62..623ba02b 100644 --- a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeInputCell.vue +++ b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeInputCell.vue @@ -9,79 +9,79 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeNormalCell.vue b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeNormalCell.vue index 1594a4c6..630f64c9 100644 --- a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeNormalCell.vue +++ b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeNormalCell.vue @@ -7,36 +7,36 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeProgressCell.vue b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeProgressCell.vue index bfe5103f..be963e9c 100644 --- a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeProgressCell.vue +++ b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeProgressCell.vue @@ -8,45 +8,45 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeSelectCell.vue b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeSelectCell.vue index 18ffafc4..7114c391 100644 --- a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeSelectCell.vue +++ b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeSelectCell.vue @@ -26,194 +26,193 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeSlotCell.js b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeSlotCell.js index b119e3cb..61317c3d 100644 --- a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeSlotCell.js +++ b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeSlotCell.js @@ -5,7 +5,7 @@ export default { name: 'JVxeSlotCell', mixins: [JVxeCellMixins], computed: { - slotProps() { + slotProps () { return { value: this.innerValue, row: this.row, @@ -23,12 +23,12 @@ export default { scrolling: this.renderOptions.scrolling, reloadEffect: this.renderOptions.reloadEffect, - triggerChange: (v) => this.handleChangeCommon(v), + triggerChange: (v) => this.handleChangeCommon(v) } - }, + } }, - render(h) { - let {slot} = this.renderOptions + render (h) { + const { slot } = this.renderOptions if (slot) { return h('div', {}, slot(this.slotProps)) } else { @@ -39,7 +39,7 @@ export default { enhanced: { switches: { editRender: false - }, + } } } diff --git a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeTagsCell.js b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeTagsCell.js index 5144724f..ce9f098f 100644 --- a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeTagsCell.js +++ b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeTagsCell.js @@ -4,31 +4,31 @@ import JVxeCellMixins from '@/components/jero/JVxeTable/mixins/JVxeCellMixins' export const TagsSpanCell = { name: 'JVxeTagsCell', mixins: [JVxeCellMixins], - data() { + data () { return { - innerTags: [], + innerTags: [] } }, watch: { innerValue: { immediate: true, - handler(value) { + handler (value) { if (value !== this.innerTags.join(';')) { - let rv = replaceValue(value) + const rv = replaceValue(value) this.innerTags = rv.split(';') this.handleChangeCommon(rv) } - }, - }, + } + } }, methods: { - renderTags(h) { - let tags = [] - for (let tag of this.innerTags) { + renderTags (h) { + const tags = [] + for (const tag of this.innerTags) { if (tag) { - let tagProps = {} - let tagStyle = {} - let setTagColor = this.originColumn.setTagColor + const tagProps = {} + const tagStyle = {} + const setTagColor = this.originColumn.setTagColor if (typeof setTagColor === 'function') { /** * 设置 tag 颜色 @@ -41,11 +41,11 @@ export const TagsSpanCell = { * event.column.own 当前列的原始配置 * @return Array | String 可以返回一个数组,数据第一项是tag背景颜色,第二项是字体颜色。也可以返回一个字符串,即tag背景颜色 */ - let color = setTagColor({ + const color = setTagColor({ tagValue: tag, value: this.innerValue, row: this.row, - column: this.column, + column: this.column }) if (Array.isArray(color)) { tagProps.color = color[0] @@ -56,49 +56,49 @@ export const TagsSpanCell = { } tags.push(h('a-tag', { props: tagProps, - style: tagStyle, + style: tagStyle }, [tag])) } } return tags - }, + } }, - render(h) { + render (h) { return h('div', {}, [ this.renderTags(h) ]) - }, + } } // tags 组件的输入框 export const TagsInputCell = { name: 'JVxeTagsInputCell', mixins: [JVxeCellMixins], - data() { + data () { return { - innerTagValue: '', + innerTagValue: '' } }, watch: { innerValue: { immediate: true, - handler(value) { + handler (value) { if (value !== this.innerTagValue) { this.handleInputChange(value) } - }, - }, + } + } }, methods: { - handleInputChange(value, event) { + handleInputChange (value, event) { this.innerTagValue = replaceValue(value, event) this.handleChangeCommon(this.innerTagValue) return this.innerTagValue - }, + } }, - render(h) { + render (h) { return h('a-input', { props: { value: this.innerValue, @@ -106,36 +106,36 @@ export const TagsInputCell = { }, on: { change: (event) => { - let {target, target: {value}} = event - let newValue = this.handleInputChange(value, event) + const { target, target: { value } } = event + const newValue = this.handleInputChange(value, event) if (newValue !== value) { target.value = newValue } } - }, + } }) - }, + } } // 将值每隔两位加上一个分号 -function replaceValue(value, event) { +function replaceValue (value, event) { if (value) { // 首先去掉现有的分号 value = value.replace(/;/g, '') // 然后再遍历添加分号 let rv = '' - let splitArr = value.split('') + const splitArr = value.split('') let count = 0 splitArr.forEach((val, index) => { rv += val - let position = index + 1 + const position = index + 1 if (position % 2 === 0 && position < splitArr.length) { count++ rv += ';' } }) if (event && count > 0) { - let {target, target: {selectionStart}} = event + const { target, target: { selectionStart } } = event target.selectionStart = selectionStart + count target.selectionEnd = selectionStart + count } diff --git a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeTextareaCell.vue b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeTextareaCell.vue index c75d8478..939c8beb 100644 --- a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeTextareaCell.vue +++ b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeTextareaCell.vue @@ -10,27 +10,27 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeUploadCell.vue b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeUploadCell.vue index 83589f98..a91d9876 100644 --- a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeUploadCell.vue +++ b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeUploadCell.vue @@ -61,127 +61,127 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeUserSelectCell.vue b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeUserSelectCell.vue index 586af464..220acbf8 100644 --- a/jero-web/src/components/jero/JVxeTable/components/cells/JVxeUserSelectCell.vue +++ b/jero-web/src/components/jero/JVxeTable/components/cells/JVxeUserSelectCell.vue @@ -31,106 +31,106 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/JVxeTable/components/cells/ReloadEffect.js b/jero-web/src/components/jero/JVxeTable/components/cells/ReloadEffect.js index 02a5e27e..1c1e6402 100644 --- a/jero-web/src/components/jero/JVxeTable/components/cells/ReloadEffect.js +++ b/jero-web/src/components/jero/JVxeTable/components/cells/ReloadEffect.js @@ -6,44 +6,44 @@ export default { props: { vNode: null, // 是否启用特效 - effect: Boolean, + effect: Boolean }, - data() { + data () { return { // vNode: null, innerEffect: false, // 应付同时多个特效 effectIdx: 0, - effectList: [], + effectList: [] } }, watch: { vNode: { deep: true, immediate: true, - handler(vNode, old) { + handler (vNode, old) { this.innerEffect = this.effect if (this.innerEffect && old != null) { - let topLayer = this.renderSpan(old, 'top') + const topLayer = this.renderSpan(old, 'top') this.effectList.push(topLayer) } - }, - }, + } + } }, methods: { // 条件渲染内容 span - renderVNode() { + renderVNode () { if (this.vNode == null) { return null } - let bottom = this.renderSpan(this.vNode, 'bottom') + const bottom = this.renderSpan(this.vNode, 'bottom') // 启用了特效,并且有旧数据,就渲染特效顶层 if (this.innerEffect && this.effectList.length > 0) { this.$emit('effect-begin') // 1.4s 以后关闭特效 window.setTimeout(() => { - let item = this.effectList[this.effectIdx] + const item = this.effectList[this.effectIdx] if (item && item.elm) { // 特效结束后,展示先把 display 设为 none,而不是直接删掉该元素, // 目的是为了防止页面重新渲染,导致动画重置 @@ -63,22 +63,22 @@ export default { } }, // 渲染内容 span - renderSpan(vNode, layer) { - let options = { + renderSpan (vNode, layer) { + const options = { key: layer + this.effectIdx + randomString(6), class: ['j-vxe-reload-effect-span', `layer-${layer}`], - style: {}, + style: {} } if (layer === 'top') { // 最新渲染的在下面 options.style['z-index'] = (9999 - this.effectIdx) } return this.$createElement('span', options, [vNode]) - }, + } }, - render(h) { + render (h) { return h('div', { - class: ['j-vxe-reload-effect-box'], + class: ['j-vxe-reload-effect-box'] }, [this.renderVNode()]) - }, -} \ No newline at end of file + } +} diff --git a/jero-web/src/components/jero/JVxeTable/index.js b/jero-web/src/components/jero/JVxeTable/index.js index e325327d..cce161a0 100644 --- a/jero-web/src/components/jero/JVxeTable/index.js +++ b/jero-web/src/components/jero/JVxeTable/index.js @@ -16,10 +16,10 @@ import JVxeDragSortCell from './components/cells/JVxeDragSortCell' import JVxeDepartSelectCell from './components/cells/JVxeDepartSelectCell' import JVxeUserSelectCell from './components/cells/JVxeUserSelectCell' -//update--begin--autor:lvdandan-----date:20201216------for:JVxeTable--JVXETypes 【online】代码结构调整,便于online打包 +// update--begin--autor:lvdandan-----date:20201216------for:JVxeTable--JVXETypes 【online】代码结构调整,便于online打包 // 组件类型 export const JVXETypes = jvxeTypes.JVXETypes -//update--end--autor:lvdandan-----date:20201216------for:JVxeTable--JVXETypes 【online】代码结构调整,便于online打包 +// update--end--autor:lvdandan-----date:20201216------for:JVxeTable--JVXETypes 【online】代码结构调整,便于online打包 // 注册自定义组件 export const AllCells = { @@ -28,8 +28,8 @@ export const AllCells = { ...mapCell(JVXETypes.inputNumber, JVxeInputCell), ...mapCell(JVXETypes.checkbox, JVxeCheckboxCell), ...mapCell(JVXETypes.select, JVxeSelectCell), - ...mapCell(JVXETypes.selectSearch, JVxeSelectCell), // 下拉搜索 - ...mapCell(JVXETypes.selectMultiple, JVxeSelectCell), // 下拉多选 + ...mapCell(JVXETypes.selectSearch, JVxeSelectCell), // 下拉搜索 + ...mapCell(JVXETypes.selectMultiple, JVxeSelectCell), // 下拉多选 ...mapCell(JVXETypes.date, JVxeDateCell), ...mapCell(JVXETypes.datetime, JVxeDateCell), ...mapCell(JVXETypes.upload, JVxeUploadCell), @@ -48,4 +48,4 @@ export const AllCells = { export { installCell, mapCell } -export default JVxeTable \ No newline at end of file +export default JVxeTable diff --git a/jero-web/src/components/jero/JVxeTable/install.js b/jero-web/src/components/jero/JVxeTable/install.js index 30676220..d5037179 100644 --- a/jero-web/src/components/jero/JVxeTable/install.js +++ b/jero-web/src/components/jero/JVxeTable/install.js @@ -43,16 +43,16 @@ installAllCell(VXETable) // 比如点击了某个组件的弹出层面板之后,此时被激活单元格不应该被自动关闭,通过返回 false 可以阻止默认的行为。 VXETable.interceptor.add('event.clearActived', function (params, event, target) { // 获取组件增强 - let col = params.column.own + const col = params.column.own const interceptor = getEnhancedMixins(col.$type, 'interceptor') // 执行增强 - let flag = interceptor['event.clearActived'].apply(this, arguments) + const flag = interceptor['event.clearActived'].apply(this, arguments) if (flag === false) { return false } - let path = getEventPath(event) - for (let p of path) { + const path = getEventPath(event) + for (const p of path) { let className = p.className || '' className = typeof className === 'string' ? className : className.toString() @@ -67,7 +67,7 @@ VXETable.interceptor.add('event.clearActived', function (params, event, target) return false } // 执行增强 - let flag = interceptor['event.clearActived.className'].apply(this, [className, ...arguments]) + const flag = interceptor['event.clearActived.className'].apply(this, [className, ...arguments]) if (flag === false) { return false } @@ -80,8 +80,8 @@ VXETable.interceptor.add('event.clearActived', function (params, event, target) * @param cell 输入组件 * @param span 显示组件,可空,默认为 JVxeNormalCell 组件 */ -export function mapCell(type, cell, span) { - let cells = {[type]: cell} +export function mapCell (type, cell, span) { + const cells = { [type]: cell } if (span) { cells[type + ':span'] = span } @@ -95,8 +95,8 @@ export function mapCell(type, cell, span) { * @param cell 输入组件 * @param span 显示组件,可空,默认为 JVxeNormalCell 组件 */ -export function installCell(type, cell, span) { - let exclude = [JVXETypes.rowNumber, JVXETypes.rowCheckbox, JVXETypes.rowRadio, JVXETypes.rowExpand, JVXETypes.rowDragSort] +export function installCell (type, cell, span) { + const exclude = [JVXETypes.rowNumber, JVXETypes.rowCheckbox, JVXETypes.rowRadio, JVXETypes.rowExpand, JVXETypes.rowDragSort] if (exclude.includes(type)) { throw new Error(`【installCell】不能使用"${type}"作为组件的type,因为这是关键字。`) } diff --git a/jero-web/src/components/jero/JVxeTable/jvxeTypes.js b/jero-web/src/components/jero/JVxeTable/jvxeTypes.js index 444a51a3..1ce9f94b 100644 --- a/jero-web/src/components/jero/JVxeTable/jvxeTypes.js +++ b/jero-web/src/components/jero/JVxeTable/jvxeTypes.js @@ -30,9 +30,9 @@ export const JVXETypes = { selectMultiple: 'select-multiple', // 进度条 progress: 'progress', - //部门选择 + // 部门选择 departSelect: 'sel_depart', - //用户选择 + // 用户选择 userSelect: 'sel_user', // 拖轮Tags(暂无用) @@ -40,5 +40,5 @@ export const JVXETypes = { slot: 'slot', normal: 'normal', - hidden: 'hidden', + hidden: 'hidden' } diff --git a/jero-web/src/components/jero/JVxeTable/mixins/JVxeCellMixins.js b/jero-web/src/components/jero/JVxeTable/mixins/JVxeCellMixins.js index 5b82e54a..68b5c709 100644 --- a/jero-web/src/components/jero/JVxeTable/mixins/JVxeCellMixins.js +++ b/jero-web/src/components/jero/JVxeTable/mixins/JVxeCellMixins.js @@ -5,7 +5,7 @@ import { getEnhancedMixins, JVXERenderType, replaceProps } from '@/components/je // noinspection JSUnusedLocalSymbols export default { inject: { - getParentContainer: {default: () => ((node) => node.parentNode)}, + getParentContainer: { default: () => (node) => node.parentNode } }, props: { value: PropTypes.any, @@ -16,42 +16,42 @@ export default { // 渲染选项 renderOptions: PropTypes.object, // 渲染类型 - renderType: PropTypes.string.def('default'), + renderType: PropTypes.string.def('default') }, - data() { + data () { return { - innerValue: null, + innerValue: null } }, computed: { - caseId() { + caseId () { return this.renderOptions.caseId }, - originColumn() { + originColumn () { return this.column.own }, - $type() { + $type () { return this.originColumn.$type }, - rows() { + rows () { return this.params.data }, - fullDataLength() { + fullDataLength () { return this.params.$table.tableFullData.length }, - rowIndex() { + rowIndex () { return this.params.rowIndex }, - columnIndex() { + columnIndex () { return this.params.columnIndex }, - cellProps() { - let {originColumn: col, renderOptions} = this + cellProps () { + const { originColumn: col, renderOptions } = this - let props = {} + const props = {} // 输入占位符 - props['placeholder'] = replaceProps(col, col.placeholder) + props.placeholder = replaceProps(col, col.placeholder) // 解析props if (typeof col.props === 'object') { @@ -61,7 +61,7 @@ export default { } // 判断是否是禁用的列 - props['disabled'] = (typeof col['disabled'] === 'boolean' ? col['disabled'] : props['disabled']) + props.disabled = (typeof col.disabled === 'boolean' ? col.disabled : props.disabled) // TODO 判断是否是禁用的行 // if (props['disabled'] !== true) { @@ -70,28 +70,28 @@ export default { // 判断是否禁用所有组件 if (renderOptions.disabled === true) { - props['disabled'] = true + props.disabled = true } return props - }, + } }, watch: { $type: { immediate: true, - handler($type) { + handler ($type) { this.enhanced = getEnhancedMixins($type) this.listeners = getListeners.call(this) - }, + } }, value: { immediate: true, - handler(val) { + handler (val) { let value = val // 验证值格式 - let originValue = this.row[this.column.property] - let getValue = this.enhanced.getValue.call(this, originValue) + const originValue = this.row[this.column.property] + const getValue = this.enhanced.getValue.call(this, originValue) if (originValue !== getValue) { // 值格式不正确,重新赋值 value = getValue @@ -102,7 +102,7 @@ export default { // 判断是否启用翻译 if (this.renderType === JVXERenderType.spaner && this.enhanced.translate.enabled) { - let res = this.enhanced.translate.handler.call(this, value) + const res = this.enhanced.translate.handler.call(this, value) // 异步翻译,目前仅【多级联动】使用 if (res instanceof Promise) { res.then(value => this.innerValue = value) @@ -110,17 +110,17 @@ export default { this.innerValue = res } } - }, - }, + } + } }, - created() { + created () { }, methods: { /** 通用处理change事件 */ - handleChangeCommon(value) { - let handle = this.enhanced.getValue.call(this, value) - this.trigger('change', {value: handle}) + handleChangeCommon (value) { + const handle = this.enhanced.getValue.call(this, value) + this.trigger('change', { value: handle }) // 触发valueChange事件 this.parentTrigger('valueChange', { type: this.$type, @@ -128,12 +128,12 @@ export default { oldValue: this.value, col: this.originColumn, rowIndex: this.params.rowIndex, - columnIndex: this.params.columnIndex, + columnIndex: this.params.columnIndex }) }, /** 通用处理blur事件 */ - handleBlurCommon(value) { - this.trigger('blur', {value}) + handleBlurCommon (value) { + this.trigger('blur', { value }) }, /** @@ -142,8 +142,8 @@ export default { * @param event 事件参数 * @param args 其他附带参数 */ - trigger(name, event, args = []) { - let listener = this.listeners[name] + trigger (name, event, args = []) { + const listener = this.listeners[name] if (typeof listener === 'function') { if (typeof event === 'object') { event = this.packageEvent(name, event) @@ -151,15 +151,15 @@ export default { listener(event, ...args) } }, - parentTrigger(name, event, args = []) { + parentTrigger (name, event, args = []) { args.unshift(this.packageEvent(name, event)) this.trigger('trigger', name, args) }, - packageEvent(name, event = {}) { + packageEvent (name, event = {}) { event.row = this.row event.column = this.column - //online增强参数兼容 - event.column['key'] = this.column['property'] + // online增强参数兼容 + event.column.key = this.column.property event.cellTarget = this if (!event.type) { event.type = name @@ -172,7 +172,7 @@ export default { event.validate = true } return event - }, + } }, model: { @@ -190,20 +190,20 @@ export default { // 注册参数(详见:https://xuliangzhan_admin.gitee.io/vxe-table/#/table/renderer/edit) installOptions: { // 自动聚焦的 class 类名 - autofocus: '', + autofocus: '' }, // 事件拦截器(用于兼容) interceptor: { // 已实现:event.clearActived // 说明:比如点击了某个组件的弹出层面板之后,此时被激活单元格不应该被自动关闭,通过返回 false 可以阻止默认的行为。 - ['event.clearActived'](params, event, target) { + 'event.clearActived' (params, event, target) { return true }, // 自定义:event.clearActived.className // 说明:比原生的多了一个参数:className,用于判断点击的元素的样式名(递归到顶层) - ['event.clearActived.className'](params, event, target) { + 'event.clearActived.className' (params, event, target) { return true - }, + } }, // 【功能开关】 switches: { @@ -211,16 +211,16 @@ export default { // 如果设为true,则表头上方会出现一个可编辑的图标 editRender: true, // false = 组件触发后可视);true = 组件一直可视 - visible: false, + visible: false }, // 【切面增强】切面事件处理,一般在某些方法执行后同步执行 aopEvents: { // 单元格被激活编辑时会触发该事件 - editActived() { + editActived () { }, // 单元格编辑状态下被关闭时会触发该事件 - editClosed() { - }, + editClosed () { + } }, // 【翻译增强】可以实现例如select组件保存的value,但是span模式下需要显示成text translate: { @@ -233,10 +233,10 @@ export default { * @param value 需要翻译的值 * @returns{*} 返回翻译后的数据 */ - handler(value,) { + handler (value) { // 默认翻译方法 return filterDictText(this.column.own.options, value) - }, + } }, /** * 【获取值增强】组件抛出的值 @@ -245,7 +245,7 @@ export default { * @param value 保存到数据库里的值 * @returns{*} 返回处理后的值 */ - getValue(value) { + getValue (value) { return value }, /** @@ -255,7 +255,7 @@ export default { * @param value 组件触发的值 * @returns{*} 返回处理后的值 */ - setValue(value) { + setValue (value) { return value }, /** @@ -269,14 +269,14 @@ export default { * * @returns 返回新值 */ - createValue({row, column, $table, renderOptions, params}) { + createValue ({ row, column, $table, renderOptions, params }) { return column.own.defaultValue - }, + } } } -function getListeners() { - let listeners = Object.assign({}, (this.renderOptions.listeners || {})) +function getListeners () { + const listeners = Object.assign({}, (this.renderOptions.listeners || {})) if (!listeners.change) { listeners.change = async (event) => { vModel.call(this, event.value) @@ -288,7 +288,7 @@ function getListeners() { return listeners } -export function vModel(value, row, property) { +export function vModel (value, row, property) { if (!row) { row = this.row } @@ -299,22 +299,22 @@ export function vModel(value, row, property) { } /** 模拟触发事件 */ -export function dispatchEvent({cell, $event}, className, handler) { +export function dispatchEvent ({ cell, $event }, className, handler) { // alwaysEdit 下不模拟触发事件,否者会导致触发两次 if (this && this.alwaysEdit) { return } window.setTimeout(() => { - let element = cell.getElementsByClassName(className) + const element = cell.getElementsByClassName(className) if (element && element.length > 0) { if (typeof handler === 'function') { handler(element[0]) } else { // 模拟触发点击事件 - if($event){ + if ($event) { element[0].dispatchEvent($event) } } } }, 10) -} \ No newline at end of file +} diff --git a/jero-web/src/components/jero/JVxeTable/mixins/vxe.web.socket.mixins.js b/jero-web/src/components/jero/JVxeTable/mixins/vxe.web.socket.mixins.js index 0385e625..4ab070b2 100644 --- a/jero-web/src/components/jero/JVxeTable/mixins/vxe.web.socket.mixins.js +++ b/jero-web/src/components/jero/JVxeTable/mixins/vxe.web.socket.mixins.js @@ -17,7 +17,7 @@ const vs = { // 消息类型:通用数据传递 TYPE_CSD: 'common_send_date', // 消息类型:更新vxe table数据 - TYPE_UVT: 'update_vxe_table', + TYPE_UVT: 'update_vxe_table' }, // 心跳检测 heartCheck: { @@ -26,11 +26,11 @@ const vs = { // 心跳消息超时时间,心跳消息多久没有回复后重连 timeout: 6000, timeoutTimer: null, - clear() { + clear () { clearTimeout(this.timeoutTimer) return this }, - start() { + start () { vs.sendMessage(vs.constants.TYPE_HB, '') // 如果超过一定时间还没重置,说明后端主动断开了 this.timeoutTimer = window.setTimeout(() => { @@ -39,17 +39,17 @@ const vs = { return this }, // 心跳消息返回 - back() { + back () { this.clear() window.setTimeout(() => this.start(), this.interval) - }, + } }, /** 初始化 WebSocket */ - initialWebSocket() { + initialWebSocket () { if (this.ws === null) { const userId = store.getters.userInfo.id - const domain = window._CONFIG['domianURL'].replace('https://', 'wss://').replace('http://', 'ws://') + const domain = window._CONFIG.domianURL.replace('https://', 'wss://').replace('http://', 'ws://') const url = `${domain}/vxeSocket/${userId}/${this.pageId}` this.ws = new WebSocket(url) @@ -63,9 +63,9 @@ const vs = { }, // 发送消息 - sendMessage(type, message) { + sendMessage (type, message) { try { - let ws = this.ws + const ws = this.ws if (ws != null && ws.readyState === ws.OPEN) { ws.send(JSON.stringify({ type: type, @@ -81,8 +81,8 @@ const vs = { tableMap: new Map(), CSDMap: new Map(), /** 添加绑定 */ - addBind(map, key, value) { - let binds = map.get(key) + addBind (map, key, value) { + const binds = map.get(key) if (Array.isArray(binds)) { binds.push(value) } else { @@ -90,11 +90,11 @@ const vs = { } }, /** 移除绑定 */ - removeBind(map, key, value) { - let binds = map.get(key) + removeBind (map, key, value) { + const binds = map.get(key) if (Array.isArray(binds)) { for (let i = 0; i < binds.length; i++) { - let bind = binds[i] + const bind = binds[i] if (bind === value) { binds.splice(i, 1) break @@ -108,8 +108,8 @@ const vs = { } }, // 呼叫绑定的表单 - callBind(map, key, callback) { - let binds = map.get(key) + callBind (map, key, callback) { + const binds = map.get(key) if (Array.isArray(binds)) { binds.forEach(callback) } @@ -117,7 +117,7 @@ const vs = { lockReconnect: false, /** 尝试重连 */ - reconnect() { + reconnect () { if (this.lockReconnect) return this.lockReconnect = true setTimeout(() => { @@ -132,15 +132,15 @@ const vs = { }, on: { - open() { + open () { console.log('【VXEWebSocket】连接成功') this.heartCheck.start() }, - error(e) { + error (e) { console.warn('【VXEWebSocket】连接发生错误:', e) this.reconnect() }, - message(e) { + message (e) { // 解析消息 let json try { @@ -149,8 +149,8 @@ const vs = { console.warn('【VXEWebSocket】收到无法解析的消息:', e.data) return } - let type = json[this.constants.TYPE] - let data = json[this.constants.DATA] + const type = json[this.constants.TYPE] + const data = json[this.constants.DATA] switch (type) { // 心跳检测 case this.constants.TYPE_HB: @@ -162,30 +162,30 @@ const vs = { break // 更新form数据 case this.constants.TYPE_UVT: - this.callBind(this.tableMap, data.socketKey, (vm) => this.onVM['onUpdateTable'].apply(vm, data.args)) + this.callBind(this.tableMap, data.socketKey, (vm) => this.onVM.onUpdateTable.apply(vm, data.args)) break default: console.warn('【VXEWebSocket】收到不识别的消息类型:' + type) break } }, - close(e) { + close (e) { console.log('【VXEWebSocket】连接被关闭:', e) this.reconnect() - }, + } }, onVM: { /** 收到更新表格的消息 */ - onUpdateTable(row, caseId) { + onUpdateTable (row, caseId) { // 判断是不是自己发的消息 if (this.caseId !== caseId) { const tableRow = this.getIfRowById(row.id).row // 局部保更新数据 if (tableRow) { // 特殊处理拖轮状态 - if (row['tug_status'] && tableRow['tug_status']) { - row['tug_status'] = Object.assign({}, tableRow['tug_status'], row['tug_status']) + if (row.tug_status && tableRow.tug_status) { + row.tug_status = Object.assign({}, tableRow.tug_status, row.tug_status) } // 判断是否启用重载特效 if (this.reloadEffect) { @@ -199,8 +199,8 @@ const vs = { this.$refs.vxe.reloadRow(tableRow) } } - }, - }, + } + } } @@ -214,12 +214,12 @@ export default { socketKey: { type: String, default: 'vxe-default' - }, + } }, - data() { + data () { return {} }, - mounted() { + mounted () { if (this.socketReload) { vs.initialWebSocket() vs.addBind(vs.tableMap, this.socketKey, this) @@ -228,17 +228,17 @@ export default { methods: { /** 发送socket消息更新行 */ - socketSendUpdateRow(row) { + socketSendUpdateRow (row) { vs.sendMessage(vs.constants.TYPE_UVT, { socketKey: this.socketKey, - args: [row, this.caseId], + args: [row, this.caseId] }) - }, + } }, - beforeDestroy() { + beforeDestroy () { vs.removeBind(vs.tableMap, this.socketKey, this) - }, + } } /** @@ -246,7 +246,7 @@ export default { * @param key 唯一key * @param fn 当消息来的时候触发的回调方法 */ -export function addBindSocketCSD(key, fn) { +export function addBindSocketCSD (key, fn) { if (typeof fn === 'function') { vs.addBind(vs.CSDMap, key, fn) } @@ -257,7 +257,7 @@ export function addBindSocketCSD(key, fn) { * @param key 唯一key * @param fn 要移除的方法,必须和添加时的方法内存层面上保持一致才可以正确移除 */ -export function removeBindSocketCSD(key, fn) { +export function removeBindSocketCSD (key, fn) { if (typeof fn === 'function') { vs.removeBind(vs.CSDMap, key, fn) } diff --git a/jero-web/src/components/jero/JVxeTable/utils/cellUtils.js b/jero-web/src/components/jero/JVxeTable/utils/cellUtils.js index b587f104..44a3032d 100644 --- a/jero-web/src/components/jero/JVxeTable/utils/cellUtils.js +++ b/jero-web/src/components/jero/JVxeTable/utils/cellUtils.js @@ -4,17 +4,17 @@ import JVxeCellMixins from '../mixins/JVxeCellMixins' export const JVXERenderType = { editer: 'editer', spaner: 'spaner', - default: 'default', + default: 'default' } /** 安装所有vxe组件 */ -export function installAllCell(VXETable) { +export function installAllCell (VXETable) { // 遍历所有组件批量注册 Object.keys(AllCells).forEach(type => installOneCell(VXETable, type)) } /** 安装单个vxe组件 */ -export function installOneCell(VXETable, type) { +export function installOneCell (VXETable, type) { const switches = getEnhancedMixins(type, 'switches') if (switches.editRender === false) { installCellRender(VXETable, type, AllCells[type]) @@ -24,7 +24,7 @@ export function installOneCell(VXETable, type) { } /** 注册可编辑组件 */ -export function installEditRender(VXETable, type, comp, spanComp) { +export function installEditRender (VXETable, type, comp, spanComp) { // 获取当前组件的增强 const enhanced = getEnhancedMixins(type) // span 组件 @@ -40,23 +40,23 @@ export function installEditRender(VXETable, type, comp, spanComp) { // 显示模板 renderCell: createRender(spanComp, enhanced, JVXERenderType.spaner), // 增强注册 - ...enhanced.installOptions, + ...enhanced.installOptions }) } /** 注册普通组件 */ -export function installCellRender(VXETable, type, comp = AllCells[JVXETypes.normal]) { +export function installCellRender (VXETable, type, comp = AllCells[JVXETypes.normal]) { // 获取当前组件的增强 const enhanced = getEnhancedMixins(type) VXETable.renderer.add(JVXETypes._prefix + type, { // 默认显示模板 renderDefault: createRender(comp, enhanced, JVXERenderType.default), // 增强注册 - ...enhanced.installOptions, + ...enhanced.installOptions }) } -function createRender(comp, enhanced, renderType) { +function createRender (comp, enhanced, renderType) { return function (h, renderOptions, params) { return [h(comp, { props: { @@ -65,7 +65,7 @@ function createRender(comp, enhanced, renderType) { column: params.column, params: params, renderOptions: renderOptions, - renderType: renderType, + renderType: renderType } })] } @@ -75,8 +75,8 @@ function createRender(comp, enhanced, renderType) { const AllCellsMixins = new Map() /** 获取某个组件的增强 */ -export function getEnhanced(type) { - let cell = AllCells[type] +export function getEnhanced (type) { + const cell = AllCells[type] if (cell && cell.enhanced) { return cell.enhanced } @@ -89,16 +89,16 @@ export function getEnhanced(type) { * @param type JVXETypes * @param name 可空,增强名称,留空返回所有增强 */ -export function getEnhancedMixins(type, name) { +export function getEnhancedMixins (type, name) { const getByName = (e) => name ? e[name] : e if (AllCellsMixins.has(type)) { return getByName(AllCellsMixins.get(type)) } - let defEnhanced = JVxeCellMixins.enhanced - let enhanced = getEnhanced(type) + const defEnhanced = JVxeCellMixins.enhanced + const enhanced = getEnhanced(type) if (enhanced) { Object.keys(defEnhanced).forEach(key => { - let def = defEnhanced[key] + const def = defEnhanced[key] if (enhanced.hasOwnProperty(key)) { // 方法如果存在就不覆盖 if (typeof def !== 'function' && typeof def !== 'string') { @@ -115,9 +115,8 @@ export function getEnhancedMixins(type, name) { return getByName(defEnhanced) } - /** 辅助方法:替换${...}变量 */ -export function replaceProps(col, value) { +export function replaceProps (col, value) { if (value && typeof value === 'string') { let text = value text = text.replace(/\${title}/g, col.title) diff --git a/jero-web/src/components/jero/JVxeTable/utils/vxeUtils.js b/jero-web/src/components/jero/JVxeTable/utils/vxeUtils.js index f32403a5..6e9b0a88 100644 --- a/jero-web/src/components/jero/JVxeTable/utils/vxeUtils.js +++ b/jero-web/src/components/jero/JVxeTable/utils/vxeUtils.js @@ -9,10 +9,10 @@ export const VALIDATE_FAILED = Symbol() * 这个方法可以等待挂载完成之后再返回 $refs 的对象,避免报错 * @author sunjianlei **/ -export function getRefPromise(vm, name) { +export function getRefPromise (vm, name) { return new Promise((resolve) => { - (function next() { - let ref = vm.$refs[name] + (function next () { + const ref = vm.$refs[name] if (ref) { resolve(ref) } else { @@ -25,10 +25,10 @@ export function getRefPromise(vm, name) { } /** 获取某一数字输入框列中的最大的值 */ -export function getInputNumberMaxValue(col, rowsValues) { +export function getInputNumberMaxValue (col, rowsValues) { let maxNum = 0 Object.values(rowsValues).forEach((rowValue, index) => { - let val = rowValue[col.key], num + const val = rowValue[col.key]; let num try { num = Number.parseFloat(val) } catch { @@ -52,7 +52,7 @@ export function getInputNumberMaxValue(col, rowsValues) { * @param tagName 标签名,不区分大小写 * @return {HTMLElement | NULL} */ -export function getParentNodeByTagName(dom, tagName = 'body') { +export function getParentNodeByTagName (dom, tagName = 'body') { if (tagName === 'body') { return document.body } @@ -72,13 +72,13 @@ export function getParentNodeByTagName(dom, tagName = 'body') { * @param columns * @param handler 单独处理方法 */ -export function vxePackageToSuperQuery(columns, handler) { +export function vxePackageToSuperQuery (columns, handler) { if (Array.isArray(columns)) { // 高级查询所需要的参数 - let fieldList = [] + const fieldList = [] // 遍历列 for (let i = 0; i < columns.length; i++) { - let col = columns[i] + const col = columns[i] if (col.type === JVXETypes.rowCheckbox || col.type === JVXETypes.rowRadio || col.type === JVXETypes.rowExpand || @@ -86,11 +86,11 @@ export function vxePackageToSuperQuery(columns, handler) { ) { continue } - let field = { + const field = { type: 'string', value: col.key, text: col.title, - dictCode: col.dictCode || col.dict, + dictCode: col.dictCode || col.dict } if (col.type === JVXETypes.date || col.type === JVXETypes.datetime) { field.type = col.type @@ -122,22 +122,22 @@ export function vxePackageToSuperQuery(columns, handler) { * @returns {Promise} * @author sunjianlei */ -export async function validateFormAndTables(form, cases, autoJumpTab) { +export async function validateFormAndTables (form, cases, autoJumpTab) { if (!(form && typeof form.validateFields === 'function')) { throw `form 参数需要的是一个form对象,而传入的却是${typeof form}` } let dataMap = {} - let values = await new Promise((resolve, reject) => { + const values = await new Promise((resolve, reject) => { // 验证主表表单 form.validateFields((err, values) => { - err ? reject({error: VALIDATE_FAILED, originError: err}) : resolve(values) + err ? reject({ error: VALIDATE_FAILED, originError: err }) : resolve(values) }) }) - Object.assign(dataMap, {formValue: values}) + Object.assign(dataMap, { formValue: values }) // 验证所有子表的表单 - let subData = await validateTables(cases, autoJumpTab) + const subData = await validateTables(cases, autoJumpTab) // 合并最终数据 - dataMap = Object.assign(dataMap, {tablesValue: subData}) + dataMap = Object.assign(dataMap, { tablesValue: subData }) return dataMap } @@ -149,22 +149,22 @@ export async function validateFormAndTables(form, cases, autoJumpTab) { * @returns {Promise} * @author sunjianlei */ -export async function validateFormModelAndTables(form,formData, cases, autoJumpTab) { +export async function validateFormModelAndTables (form, formData, cases, autoJumpTab) { if (!(form && typeof form.validate === 'function')) { throw `form 参数需要的是一个form对象,而传入的却是${typeof form}` } let dataMap = {} - let values = await new Promise((resolve, reject) => { + const values = await new Promise((resolve, reject) => { // 验证主表表单 - form.validate((valid,obj) => { - valid ?resolve(formData): reject({error: VALIDATE_FAILED, originError: valid}) + form.validate((valid, obj) => { + valid ? resolve(formData) : reject({ error: VALIDATE_FAILED, originError: valid }) }) }) - Object.assign(dataMap, {formValue: values}) + Object.assign(dataMap, { formValue: values }) // 验证所有子表的表单 - let subData = await validateTables(cases, autoJumpTab) + const subData = await validateTables(cases, autoJumpTab) // 合并最终数据 - dataMap = Object.assign(dataMap, {tablesValue: subData}) + dataMap = Object.assign(dataMap, { tablesValue: subData }) return dataMap } @@ -174,18 +174,18 @@ export async function validateFormModelAndTables(form,formData, cases, autoJumpT * @param cases 接收一个数组,每项都是一个JVxeTable实例 * @param autoJumpTab 校验失败后,是否自动跳转tab选项 */ -export function validateTables(cases, autoJumpTab = true) { +export function validateTables (cases, autoJumpTab = true) { if (!Array.isArray(cases)) { throw `'validateTables'函数的'cases'参数需要的是一个数组,而传入的却是${typeof cases}` } return new Promise((resolve, reject) => { - let tablesData = [] + const tablesData = [] let index = 0 if (!cases || cases.length === 0) { resolve() } - (function next() { - let vm = cases[index] + (function next () { + const vm = cases[index] vm.validateTable().then(errMap => { // 校验通过 if (!errMap) { @@ -193,25 +193,27 @@ export function validateTables(cases, autoJumpTab = true) { // 判断校验是否全部完成,完成返回成功,否则继续进行下一步校验 if (++index === cases.length) { resolve(tablesData) - } else ( - next() - ) + } else { + ( + next() + ) + } } else { // 尝试获取tabKey,如果在ATab组件内即可获取 let paneKey - let tabPane = getVmParentByName(vm, 'ATabPane') + const tabPane = getVmParentByName(vm, 'ATabPane') if (tabPane) { paneKey = tabPane.$vnode.key // 自动跳转到该表格 if (autoJumpTab) { - let tabs = getVmParentByName(tabPane, 'Tabs') + const tabs = getVmParentByName(tabPane, 'Tabs') tabs && tabs.setActiveKey && tabs.setActiveKey(paneKey) } } // 出现未验证通过的表单,不再进行下一步校验,直接返回失败 - reject({error: VALIDATE_FAILED, index, paneKey, errMap}) + reject({ error: VALIDATE_FAILED, index, paneKey, errMap }) } }) })() }) -} \ No newline at end of file +} diff --git a/jero-web/src/components/jero/index.js b/jero-web/src/components/jero/index.js index 386b842c..a699c7a0 100644 --- a/jero-web/src/components/jero/index.js +++ b/jero-web/src/components/jero/index.js @@ -26,21 +26,21 @@ import JSlider from './JSlider.vue' import JSwitch from './JSwitch.vue' import JTime from './JTime.vue' import JTreeTable from './JTreeTable.vue' -import JEasyCron from "@/components/jero/JEasyCron" -//jerobiz +import JEasyCron from '@/components/jero/JEasyCron' +// jerobiz import JSelectDepart from '../jerobiz/JSelectDepart.vue' import JSelectMultiUser from '../jerobiz/JSelectMultiUser.vue' import JSelectRole from '../jerobiz/JSelectRole.vue' import JSelectUserByDep from '../jerobiz/JSelectUserByDep.vue' -//引入需要全局注册的js函数和变量 -import { Modal, notification,message } from 'ant-design-vue' +// 引入需要全局注册的js函数和变量 +import { Modal, notification, message } from 'ant-design-vue' import lodash_object from 'lodash' import debounce from 'lodash/debounce' import pick from 'lodash.pick' import data from 'china-area-data' export default { - install(Vue) { + install (Vue) { Vue.use(JModal) Vue.component('JMarkdownEditor', JMarkdownEditor) Vue.component('JPopupOnlReport', JPopupOnlReport) @@ -70,20 +70,20 @@ export default { Vue.component('JTreeTable', JTreeTable) Vue.component('JUpload', JUpload) - //jerobiz + // jerobiz Vue.component('JSelectDepart', JSelectDepart) Vue.component('JSelectMultiUser', JSelectMultiUser) Vue.component('JSelectRole', JSelectRole) Vue.component('JSelectUserByDep', JSelectUserByDep) Vue.component(JEasyCron.name, JEasyCron) - //注册全局js函数和变量 + // 注册全局js函数和变量 Vue.prototype.$Jnotification = notification Vue.prototype.$Jmodal = Modal Vue.prototype.$Jmessage = message Vue.prototype.$Jlodash = lodash_object - Vue.prototype.$Jdebounce= debounce + Vue.prototype.$Jdebounce = debounce Vue.prototype.$Jpick = pick Vue.prototype.$Jpcaa = data } -} \ No newline at end of file +} diff --git a/jero-web/src/components/jero/minipop/JFilePop.vue b/jero-web/src/components/jero/minipop/JFilePop.vue index 0f5350ff..c27527e3 100644 --- a/jero-web/src/components/jero/minipop/JFilePop.vue +++ b/jero-web/src/components/jero/minipop/JFilePop.vue @@ -14,104 +14,103 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/minipop/JInputPop.vue b/jero-web/src/components/jero/minipop/JInputPop.vue index 1f6a6d71..a4619a86 100644 --- a/jero-web/src/components/jero/minipop/JInputPop.vue +++ b/jero-web/src/components/jero/minipop/JInputPop.vue @@ -17,89 +17,88 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jero/modal/JCronModal.vue b/jero-web/src/components/jero/modal/JCronModal.vue index 2727495b..f4db3731 100644 --- a/jero-web/src/components/jero/modal/JCronModal.vue +++ b/jero-web/src/components/jero/modal/JCronModal.vue @@ -251,582 +251,579 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jerobiz/JSelectBizComponent/JSelectBizComponentModal.vue b/jero-web/src/components/jerobiz/JSelectBizComponent/JSelectBizComponentModal.vue index 4cd452e1..9b0f2249 100644 --- a/jero-web/src/components/jerobiz/JSelectBizComponent/JSelectBizComponentModal.vue +++ b/jero-web/src/components/jerobiz/JSelectBizComponent/JSelectBizComponentModal.vue @@ -59,301 +59,301 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jerobiz/JSelectBizComponent/JSelectBizQueryItem.js b/jero-web/src/components/jerobiz/JSelectBizComponent/JSelectBizQueryItem.js index 1c41a596..0d09f748 100644 --- a/jero-web/src/components/jerobiz/JSelectBizComponent/JSelectBizQueryItem.js +++ b/jero-web/src/components/jerobiz/JSelectBizComponent/JSelectBizQueryItem.js @@ -2,19 +2,19 @@ export default { name: 'JSelectBizQueryItem', props: { queryParam: Object, - queryConfig: Array, + queryConfig: Array }, - data() { + data () { return {} }, methods: { - renderQueryItem() { + renderQueryItem () { return this.queryConfig.map(queryItem => { - const {key, label, placeholder, dictCode, props, customRender} = queryItem + const { key, label, placeholder, dictCode, props, customRender } = queryItem const options = { props: {}, on: { - pressEnter: () => this.$emit('pressEnter'), + pressEnter: () => this.$emit('pressEnter') } } if (props != null) { @@ -22,17 +22,17 @@ export default { } if (placeholder === undefined) { if (dictCode) { - options.props['placeholder'] = `请选择${label}` + options.props.placeholder = `请选择${label}` } else { - options.props['placeholder'] = `请输入${label}` + options.props.placeholder = `请输入${label}` } } else { - options.props['placeholder'] = placeholder + options.props.placeholder = placeholder } let input if (typeof customRender === 'function') { - input = customRender.call(this, {key, options, queryParam: this.queryParam}) + input = customRender.call(this, { key, options, queryParam: this.queryParam }) } else if (dictCode) { input = } else { @@ -40,9 +40,9 @@ export default { } return {input} }) - }, + } }, - render() { + render () { return {this.renderQueryItem()} - }, -} \ No newline at end of file + } +} diff --git a/jero-web/src/components/jerobiz/JSelectBizComponent/index.vue b/jero-web/src/components/jerobiz/JSelectBizComponent/index.vue index de1a27b8..912861e1 100644 --- a/jero-web/src/components/jerobiz/JSelectBizComponent/index.vue +++ b/jero-web/src/components/jerobiz/JSelectBizComponent/index.vue @@ -31,116 +31,116 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jerobiz/JSelectDepart.vue b/jero-web/src/components/jerobiz/JSelectDepart.vue index 19b6f1a4..0bfe073c 100644 --- a/jero-web/src/components/jerobiz/JSelectDepart.vue +++ b/jero-web/src/components/jerobiz/JSelectDepart.vue @@ -25,30 +25,30 @@ import JSelectDepartModal from './modal/JSelectDepartModal' import { underLinetoHump } from '@/components/_util/StringUtil' export default { name: 'JSelectDepart', - components:{ + components: { JSelectDepartModal }, - props:{ - modalWidth:{ - type:Number, - default:500, - required:false + props: { + modalWidth: { + type: Number, + default: 500, + required: false }, - multi:{ - type:Boolean, - default:false, - required:false + multi: { + type: Boolean, + default: false, + required: false }, - rootOpened:{ - type:Boolean, - default:true, - required:false + rootOpened: { + type: Boolean, + default: true, + required: false }, - value:{ - type:String, - required:false + value: { + type: String, + required: false }, - disabled:{ + disabled: { type: Boolean, required: false, default: false @@ -82,46 +82,46 @@ export default { } }, - data(){ + data () { return { - visible:false, - confirmLoading:false, - storeVals: '', //[key values] - textVals: '' //[label values] + visible: false, + confirmLoading: false, + storeVals: '', // [key values] + textVals: '' // [label values] } }, - computed:{ - storeField(){ + computed: { + storeField () { let field = this.customReturnField - if(!field){ - field = this.store; + if (!field) { + field = this.store } return underLinetoHump(field) }, - textField(){ + textField () { return underLinetoHump(this.text) } }, - mounted(){ + mounted () { this.storeVals = this.value }, - watch:{ - value(val){ + watch: { + value (val) { this.storeVals = val } }, - methods:{ - initComp(textVals){ + methods: { + initComp (textVals) { this.textVals = textVals }, - //返回选中的部门信息 - backDepartInfo(){ - if(this.backDepart===true){ - if(this.storeVals && this.storeVals.length>0){ - let arr1 = this.storeVals.split(',') - let arr2 = this.textVals.split(',') - let info = [] - for(let i=0;i 0) { + const arr1 = this.storeVals.split(',') + const arr2 = this.textVals.split(',') + const info = [] + for (let i = 0; i < arr1.length; i++) { info.push({ value: arr1[i], text: arr2[i] @@ -131,30 +131,30 @@ export default { } } }, - openModal(){ + openModal () { this.$refs.innerDepartSelectModal.show() }, - handleOK(rows) { + handleOK (rows) { if (!rows && rows.length <= 0) { this.textVals = '' this.storeVals = '' } else { - let arr1 = [] - let arr2 = [] - for(let dep of rows){ + const arr1 = [] + const arr2 = [] + for (const dep of rows) { arr1.push(dep[this.storeField]) arr2.push(dep[this.textField]) } this.storeVals = arr1.join(',') this.textVals = arr2.join(',') } - this.$emit("change", this.storeVals) + this.$emit('change', this.storeVals) this.backDepartInfo() }, - getDepartNames(){ + getDepartNames () { return this.departNames }, - handleEmpty(){ + handleEmpty () { this.handleOK('') } }, @@ -178,4 +178,4 @@ export default { .components-input-demo-presuffix .anticon-close-circle:active { color: #666; } - \ No newline at end of file + diff --git a/jero-web/src/components/jerobiz/JSelectMultiUser.vue b/jero-web/src/components/jerobiz/JSelectMultiUser.vue index 599a2c4a..6d95e40a 100644 --- a/jero-web/src/components/jerobiz/JSelectMultiUser.vue +++ b/jero-web/src/components/jerobiz/JSelectMultiUser.vue @@ -11,64 +11,64 @@ - \ No newline at end of file + diff --git a/jero-web/src/components/jerobiz/JSelectRole.vue b/jero-web/src/components/jerobiz/JSelectRole.vue index beab1e3f..f08d9a7e 100644 --- a/jero-web/src/components/jerobiz/JSelectRole.vue +++ b/jero-web/src/components/jerobiz/JSelectRole.vue @@ -13,23 +13,23 @@ - \ No newline at end of file + diff --git a/jero-web/src/components/jerobiz/JSelectUserByDep.vue b/jero-web/src/components/jerobiz/JSelectUserByDep.vue index 828dff9d..7fff5f5b 100644 --- a/jero-web/src/components/jerobiz/JSelectUserByDep.vue +++ b/jero-web/src/components/jerobiz/JSelectUserByDep.vue @@ -26,7 +26,7 @@ import { underLinetoHump } from '@/components/_util/StringUtil' export default { name: 'JSelectUserByDep', - components: {JSelectUserByDepModal}, + components: { JSelectUserByDepModal }, props: { modalWidth: { type: Number, @@ -65,29 +65,29 @@ export default { required: false } }, - data() { + data () { return { - storeVals: '', //[key values] - textVals: '' //[label values] + storeVals: '', // [key values] + textVals: '' // [label values] } }, - computed:{ - storeField(){ + computed: { + storeField () { let field = this.customReturnField - if(!field){ - field = this.store; + if (!field) { + field = this.store } return underLinetoHump(field) }, - textField(){ + textField () { return underLinetoHump(this.text) } }, - mounted() { + mounted () { this.storeVals = this.value }, watch: { - value(val) { + value (val) { this.storeVals = val } }, @@ -96,17 +96,17 @@ export default { event: 'change' }, methods: { - initComp(textVals) { + initComp (textVals) { this.textVals = textVals }, - //返回选中的用户信息 - backDeparInfo(){ - if(this.backUser===true){ - if(this.storeVals && this.storeVals.length>0){ - let arr1 = this.storeVals.split(',') - let arr2 = this.textVals.split(',') - let info = [] - for(let i=0;i 0) { + const arr1 = this.storeVals.split(',') + const arr2 = this.textVals.split(',') + const info = [] + for (let i = 0; i < arr1.length; i++) { info.push({ value: arr1[i], text: arr2[i] @@ -116,25 +116,25 @@ export default { } } }, - onSearchDepUser() { + onSearchDepUser () { this.$refs.selectModal.showModal() }, - selectOK(rows) { - console.log("当前选中用户", rows) + selectOK (rows) { + console.log('当前选中用户', rows) if (!rows) { this.storeVals = '' this.textVals = '' } else { - let temp1 = [] - let temp2 = [] - for (let item of rows) { + const temp1 = [] + const temp2 = [] + for (const item of rows) { temp1.push(item[this.storeField]) temp2.push(item[this.textField]) } this.storeVals = temp1.join(',') this.textVals = temp2.join(',') } - this.$emit("change", this.storeVals) + this.$emit('change', this.storeVals) } } } @@ -142,4 +142,4 @@ export default { \ No newline at end of file + diff --git a/jero-web/src/components/jerobiz/modal/JSelectDepartModal.vue b/jero-web/src/components/jerobiz/modal/JSelectDepartModal.vue index 23a992d8..c88aed4e 100644 --- a/jero-web/src/components/jerobiz/modal/JSelectDepartModal.vue +++ b/jero-web/src/components/jerobiz/modal/JSelectDepartModal.vue @@ -54,232 +54,230 @@ @@ -304,4 +302,4 @@ background: #fff; border-radius: 0 0 2px 2px; } - \ No newline at end of file + diff --git a/jero-web/src/components/jerobiz/modal/JSelectUserByDepModal.vue b/jero-web/src/components/jerobiz/modal/JSelectUserByDepModal.vue index dcfc77a5..7aeb3ee2 100644 --- a/jero-web/src/components/jerobiz/modal/JSelectUserByDepModal.vue +++ b/jero-web/src/components/jerobiz/modal/JSelectUserByDepModal.vue @@ -62,278 +62,276 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jerobiz/modal/SelectUserListModal.vue b/jero-web/src/components/jerobiz/modal/SelectUserListModal.vue index df1f2918..9306ae37 100644 --- a/jero-web/src/components/jerobiz/modal/SelectUserListModal.vue +++ b/jero-web/src/components/jerobiz/modal/SelectUserListModal.vue @@ -21,100 +21,99 @@ \ No newline at end of file + diff --git a/jero-web/src/components/jerobiz/thirdApp/JThirdAppDropdown.vue b/jero-web/src/components/jerobiz/thirdApp/JThirdAppDropdown.vue index 22510ffe..b750b4f2 100644 --- a/jero-web/src/components/jerobiz/thirdApp/JThirdAppDropdown.vue +++ b/jero-web/src/components/jerobiz/thirdApp/JThirdAppDropdown.vue @@ -19,16 +19,16 @@ export default { type: String, name: String, syncToApp: Boolean, - syncToLocal: Boolean, + syncToLocal: Boolean }, methods: { - handleMenuClick(event) { - this.$emit(event.key, {type: this.type}) - }, - }, + handleMenuClick (event) { + this.$emit(event.key, { type: this.type }) + } + } } \ No newline at end of file + diff --git a/jero-web/src/components/layouts/BasicLayout.vue b/jero-web/src/components/layouts/BasicLayout.vue index 65b40cd6..31d8d119 100644 --- a/jero-web/src/components/layouts/BasicLayout.vue +++ b/jero-web/src/components/layouts/BasicLayout.vue @@ -10,27 +10,27 @@ \ No newline at end of file + diff --git a/jero-web/src/components/layouts/BlankLayout.vue b/jero-web/src/components/layouts/BlankLayout.vue index 90c03998..1bfbfbf9 100644 --- a/jero-web/src/components/layouts/BlankLayout.vue +++ b/jero-web/src/components/layouts/BlankLayout.vue @@ -6,11 +6,11 @@ \ No newline at end of file + diff --git a/jero-web/src/components/layouts/IframeFReportView.vue b/jero-web/src/components/layouts/IframeFReportView.vue index c51e5b1e..46a9703b 100644 --- a/jero-web/src/components/layouts/IframeFReportView.vue +++ b/jero-web/src/components/layouts/IframeFReportView.vue @@ -5,43 +5,43 @@ \ No newline at end of file + diff --git a/jero-web/src/components/layouts/IframePageView.vue b/jero-web/src/components/layouts/IframePageView.vue index 1770b07b..7ca26820 100644 --- a/jero-web/src/components/layouts/IframePageView.vue +++ b/jero-web/src/components/layouts/IframePageView.vue @@ -5,62 +5,61 @@ \ No newline at end of file + diff --git a/jero-web/src/components/layouts/PageView.vue b/jero-web/src/components/layouts/PageView.vue index fc330a0a..1544d51b 100644 --- a/jero-web/src/components/layouts/PageView.vue +++ b/jero-web/src/components/layouts/PageView.vue @@ -9,55 +9,55 @@ \ No newline at end of file + diff --git a/jero-web/src/components/layouts/RouteView.vue b/jero-web/src/components/layouts/RouteView.vue index 73237de1..1b7a3149 100644 --- a/jero-web/src/components/layouts/RouteView.vue +++ b/jero-web/src/components/layouts/RouteView.vue @@ -8,37 +8,37 @@ \ No newline at end of file + diff --git a/jero-web/src/components/layouts/TabLayout.vue b/jero-web/src/components/layouts/TabLayout.vue index f9907aa0..5de94a8f 100644 --- a/jero-web/src/components/layouts/TabLayout.vue +++ b/jero-web/src/components/layouts/TabLayout.vue @@ -41,261 +41,260 @@ import { CACHE_INCLUDED_ROUTES } from '@/store/mutation-types' const indexKey = '/' - export default { - name: 'TabLayout', - components: { - GlobalLayout, - Contextmenu - }, - mixins: [mixin, mixinDevice], - data() { - return { - pageList: [], - linkList: [], - activePage: '', - menuVisible: false, - menuItemList: [ - { key: '4', icon: 'reload', text: '刷 新' }, - { key: '1', icon: 'arrow-left', text: '关闭左侧' }, - { key: '2', icon: 'arrow-right', text: '关闭右侧' }, - { key: '3', icon: 'close', text: '关闭其它' } - ], - reloadFlag:true +export default { + name: 'TabLayout', + components: { + GlobalLayout, + Contextmenu + }, + mixins: [mixin, mixinDevice], + data () { + return { + pageList: [], + linkList: [], + activePage: '', + menuVisible: false, + menuItemList: [ + { key: '4', icon: 'reload', text: '刷 新' }, + { key: '1', icon: 'arrow-left', text: '关闭左侧' }, + { key: '2', icon: 'arrow-right', text: '关闭右侧' }, + { key: '3', icon: 'close', text: '关闭其它' } + ], + reloadFlag: true + } + }, + /* update_begin author:wuxianquan date:20190828 for: 关闭当前tab页,供子页面调用 ->望菜单能配置外链,直接弹出新页面而不是嵌入iframe #428 */ + provide () { + return { + closeCurrent: this.closeCurrent + } + }, + /* update_end author:wuxianquan date:20190828 for: 关闭当前tab页,供子页面调用->望菜单能配置外链,直接弹出新页面而不是嵌入iframe #428 */ + computed: { + multipage () { + // 判断如果是手机模式,自动切换为单页面模式 + if (this.isMobile()) { + return false + } else { + return this.$store.state.app.multipage + } + } + }, + created () { + // 复制一个route对象出来,不能影响原route + const currentRoute = Object.assign({}, this.$route) + currentRoute.meta = Object.assign({}, currentRoute.meta) + this.pageList.push(currentRoute) + this.linkList.push(currentRoute.fullPath) + this.activePage = currentRoute.fullPath + }, + mounted () { + }, + watch: { + $route: function (newRoute) { + // console.log("新的路由",newRoute) + this.activePage = newRoute.fullPath + if (!this.multipage) { + this.linkList = [newRoute.fullPath] + this.pageList = [Object.assign({}, newRoute)] + // update-begin-author:taoyan date:20200211 for: TASK #3368 【路由缓存】首页的缓存设置有问题,需要根据后台的路由配置来实现是否缓存 + } else if (indexKey == newRoute.fullPath) { + // 首页时 判断是否缓存 没有缓存 刷新之 + if (newRoute.meta.keepAlive === false) { + this.routeReload() + } + // update-end-author:taoyan date:20200211 for: TASK #3368 【路由缓存】首页的缓存设置有问题,需要根据后台的路由配置来实现是否缓存 + } else if (this.linkList.indexOf(newRoute.fullPath) < 0) { + this.linkList.push(newRoute.fullPath) + this.pageList.push(Object.assign({}, newRoute)) + /// / update-begin-author:sunjianlei date:20200103 for: 如果新增的页面配置了缓存路由,那么就强制刷新一遍 #842 + // if (newRoute.meta.keepAlive) { + // this.routeReload() + // } + /// / update-end-author:sunjianlei date:20200103 for: 如果新增的页面配置了缓存路由,那么就强制刷新一遍 #842 + } else if (this.linkList.indexOf(newRoute.fullPath) >= 0) { + const oldIndex = this.linkList.indexOf(newRoute.fullPath) + const oldPositionRoute = this.pageList[oldIndex] + this.pageList.splice(oldIndex, 1, Object.assign({}, newRoute, { meta: oldPositionRoute.meta })) } }, - /* update_begin author:wuxianquan date:20190828 for: 关闭当前tab页,供子页面调用 ->望菜单能配置外链,直接弹出新页面而不是嵌入iframe #428 */ - provide(){ - return{ - closeCurrent:this.closeCurrent + activePage: function (key) { + const index = this.linkList.lastIndexOf(key) + const waitRouter = this.pageList[index] + // 【TESTA-523】修复:不允许重复跳转路由异常 + if (waitRouter.fullPath !== this.$route.fullPath) { + this.$router.push(Object.assign({}, waitRouter)) } + this.changeTitle(waitRouter.meta.title) + }, + multipage: function (newVal) { + if (this.reloadFlag) { + if (!newVal) { + this.linkList = [this.$route.fullPath] + this.pageList = [this.$route] + } + } + } + }, + methods: { + // update-begin-author:sunjianlei date:20200120 for: 动态更改页面标题 + changeTitle (title) { + const projectTitle = 'Jero-Boot 企业级快速开发平台' + // 首页特殊处理 + if (this.$route.path === indexKey) { + document.title = projectTitle + } else { + document.title = title + ' · ' + projectTitle + } + }, + // update-end-author:sunjianlei date:20200120 for: 动态更改页面标题 + + changePage (key) { + this.activePage = key + }, + tabCallBack () { + this.$nextTick(() => { + // update-begin-author:taoyan date: 20201211 for:【新版】online报错 JT-100 + setTimeout(() => { + // 省市区组件里面给window绑定了个resize事件 导致切换页面的时候触发了他的resize,但是切换页面,省市区组件还没被销毁前就触发了该事件,导致控制台报错,加个延迟 + triggerWindowResizeEvent() + }, 20) + // update-end-author:taoyan date: 20201211 for:【新版】online报错 JT-100 + }) + }, + editPage (key, action) { + this[action](key) + }, + remove (key) { + if (this.pageList.length === 1) { + this.$message.warning('这是最后一页,不能再关闭了啦') + return + } + console.log('this.pageList ', this.pageList) + const removeRoute = this.pageList.filter(item => item.fullPath == key) + this.pageList = this.pageList.filter(item => item.fullPath !== key) + let index = this.linkList.indexOf(key) + this.linkList = this.linkList.filter(item => item !== key) + index = index >= this.linkList.length ? this.linkList.length - 1 : index + this.activePage = this.linkList[index] + + // update-begin--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842 + // 关闭页面则从缓存cache_included_routes中删除路由,下次点击菜单会重新加载页面 + const cacheRouterArray = Vue.ls.get(CACHE_INCLUDED_ROUTES) || [] + if (removeRoute && removeRoute[0]) { + const componentName = removeRoute[0].meta.componentName + console.log('key: ', key) + console.log('componentName: ', componentName) + if (cacheRouterArray.includes(componentName)) { + cacheRouterArray.splice(cacheRouterArray.findIndex(item => item === componentName), 1) + Vue.ls.set(CACHE_INCLUDED_ROUTES, cacheRouterArray) + } + } + // update-end--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842 + }, + onContextmenu (e) { + const pagekey = this.getPageKey(e.target) + if (pagekey !== null) { + e.preventDefault() + this.menuVisible = true + } + }, + getPageKey (target, depth) { + depth = depth || 0 + if (depth > 2) { + return null + } + let pageKey = target.getAttribute('pagekey') + pageKey = pageKey || (target.previousElementSibling ? target.previousElementSibling.getAttribute('pagekey') : null) + return pageKey || (target.firstElementChild ? this.getPageKey(target.firstElementChild, ++depth) : null) + }, + onMenuSelect (key, target) { + const pageKey = this.getPageKey(target) + switch (key) { + case '1': + this.closeLeft(pageKey) + break + case '2': + this.closeRight(pageKey) + break + case '3': + this.closeOthers(pageKey) + break + case '4': + this.routeReload() + break + default: + break + } + }, + /* update_begin author:wuxianquan date:20190828 for: 关闭当前tab页,供子页面调用->望菜单能配置外链,直接弹出新页面而不是嵌入iframe #428 */ + closeCurrent () { + this.remove(this.activePage) }, /* update_end author:wuxianquan date:20190828 for: 关闭当前tab页,供子页面调用->望菜单能配置外链,直接弹出新页面而不是嵌入iframe #428 */ - computed: { - multipage() { - //判断如果是手机模式,自动切换为单页面模式 - if (this.isMobile()) { - return false - } else { - return this.$store.state.app.multipage + closeOthers (pageKey) { + const index = this.linkList.indexOf(pageKey) + if (pageKey == indexKey || pageKey.indexOf('?ticke=') >= 0) { + this.linkList = this.linkList.slice(index, index + 1) + this.pageList = this.pageList.slice(index, index + 1) + this.activePage = this.linkList[0] + } else { + this.linkList = this.linkList.slice(index, index + 1) + this.pageList = this.pageList.slice(index, index + 1) + this.activePage = this.linkList[1] + } + }, + closeLeft (pageKey) { + if (pageKey == indexKey) { + return + } + const tempList = [...this.pageList] + const index = this.linkList.indexOf(pageKey) + this.linkList = this.linkList.slice(index) + this.pageList = this.pageList.slice(index) + if (this.linkList.indexOf(this.activePage) < 0) { + this.activePage = this.linkList[0] + } + }, + closeRight (pageKey) { + const index = this.linkList.indexOf(pageKey) + this.linkList = this.linkList.slice(0, index + 1) + this.pageList = this.pageList.slice(0, index + 1) + if (this.linkList.indexOf(this.activePage < 0)) { + this.activePage = this.linkList[this.linkList.length - 1] + } + }, + // update-begin-author:taoyan date:20190430 for:动态路由title显示配置的菜单title而不是其对应路由的title + dynamicRouterShow (key, title) { + const keyIndex = this.linkList.indexOf(key) + if (keyIndex >= 0) { + const currRouter = this.pageList[keyIndex] + const meta = Object.assign({}, currRouter.meta, { title: title }) + this.pageList.splice(keyIndex, 1, Object.assign({}, currRouter, { meta: meta })) + if (key === this.activePage) { + this.changeTitle(title) } } }, - created() { - // 复制一个route对象出来,不能影响原route - let currentRoute = Object.assign({}, this.$route) - currentRoute.meta = Object.assign({}, currentRoute.meta) - this.pageList.push(currentRoute) - this.linkList.push(currentRoute.fullPath) - this.activePage = currentRoute.fullPath + // update-end-author:taoyan date:20190430 for:动态路由title显示配置的菜单title而不是其对应路由的title + + // update-begin-author:taoyan date:20191008 for:路由刷新 + routeReload () { + this.reloadFlag = false + const ToggleMultipage = 'ToggleMultipage' + this.$store.dispatch(ToggleMultipage, false) + this.$nextTick(() => { + this.$store.dispatch(ToggleMultipage, true) + this.reloadFlag = true + }) }, - mounted() { - }, - watch: { - '$route': function(newRoute) { - //console.log("新的路由",newRoute) - this.activePage = newRoute.fullPath - if (!this.multipage) { - this.linkList = [newRoute.fullPath] - this.pageList = [Object.assign({},newRoute)] - // update-begin-author:taoyan date:20200211 for: TASK #3368 【路由缓存】首页的缓存设置有问题,需要根据后台的路由配置来实现是否缓存 - } else if(indexKey==newRoute.fullPath) { - //首页时 判断是否缓存 没有缓存 刷新之 - if (newRoute.meta.keepAlive === false) { - this.routeReload() - } - // update-end-author:taoyan date:20200211 for: TASK #3368 【路由缓存】首页的缓存设置有问题,需要根据后台的路由配置来实现是否缓存 - }else if (this.linkList.indexOf(newRoute.fullPath) < 0) { - this.linkList.push(newRoute.fullPath) - this.pageList.push(Object.assign({},newRoute)) - //// update-begin-author:sunjianlei date:20200103 for: 如果新增的页面配置了缓存路由,那么就强制刷新一遍 #842 - // if (newRoute.meta.keepAlive) { - // this.routeReload() - // } - //// update-end-author:sunjianlei date:20200103 for: 如果新增的页面配置了缓存路由,那么就强制刷新一遍 #842 - } else if (this.linkList.indexOf(newRoute.fullPath) >= 0) { - let oldIndex = this.linkList.indexOf(newRoute.fullPath) - let oldPositionRoute = this.pageList[oldIndex] - this.pageList.splice(oldIndex, 1, Object.assign({},newRoute,{meta:oldPositionRoute.meta})) - } - }, - 'activePage': function(key) { - let index = this.linkList.lastIndexOf(key) - let waitRouter = this.pageList[index] - // 【TESTA-523】修复:不允许重复跳转路由异常 - if (waitRouter.fullPath !== this.$route.fullPath) { - this.$router.push(Object.assign({}, waitRouter)) - } - this.changeTitle(waitRouter.meta.title) - }, - 'multipage': function(newVal) { - if(this.reloadFlag){ - if (!newVal) { - this.linkList = [this.$route.fullPath] - this.pageList = [this.$route] - } - } - }, - }, - methods: { - // update-begin-author:sunjianlei date:20200120 for: 动态更改页面标题 - changeTitle(title) { - let projectTitle = "Jero-Boot 企业级快速开发平台" - // 首页特殊处理 - if (this.$route.path === indexKey) { - document.title = projectTitle - } else { - document.title = title + ' · ' + projectTitle - } - }, - // update-end-author:sunjianlei date:20200120 for: 动态更改页面标题 - - changePage(key) { - this.activePage = key - }, - tabCallBack() { - this.$nextTick(() => { - //update-begin-author:taoyan date: 20201211 for:【新版】online报错 JT-100 - setTimeout(()=>{ - //省市区组件里面给window绑定了个resize事件 导致切换页面的时候触发了他的resize,但是切换页面,省市区组件还没被销毁前就触发了该事件,导致控制台报错,加个延迟 - triggerWindowResizeEvent() - },20) - //update-end-author:taoyan date: 20201211 for:【新版】online报错 JT-100 - }) - }, - editPage(key, action) { - this[action](key) - }, - remove(key) { - if (this.pageList.length === 1) { - this.$message.warning('这是最后一页,不能再关闭了啦') - return - } - console.log("this.pageList ",this.pageList ); - let removeRoute = this.pageList.filter(item => item.fullPath == key) - this.pageList = this.pageList.filter(item => item.fullPath !== key) - let index = this.linkList.indexOf(key) - this.linkList = this.linkList.filter(item => item !== key) - index = index >= this.linkList.length ? this.linkList.length - 1 : index - this.activePage = this.linkList[index] - - //update-begin--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842 - //关闭页面则从缓存cache_included_routes中删除路由,下次点击菜单会重新加载页面 - let cacheRouterArray = Vue.ls.get(CACHE_INCLUDED_ROUTES) || [] - if (removeRoute && removeRoute[0]) { - let componentName = removeRoute[0].meta.componentName - console.log("key: ", key); - console.log("componentName: ", componentName); - if(cacheRouterArray.includes(componentName)){ - cacheRouterArray.splice(cacheRouterArray.findIndex(item => item === componentName), 1) - Vue.ls.set(CACHE_INCLUDED_ROUTES, cacheRouterArray) - } - } - //update-end--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842 - - }, - onContextmenu(e) { - const pagekey = this.getPageKey(e.target) - if (pagekey !== null) { - e.preventDefault() - this.menuVisible = true - } - }, - getPageKey(target, depth) { - depth = depth || 0 - if (depth > 2) { - return null - } - let pageKey = target.getAttribute('pagekey') - pageKey = pageKey || (target.previousElementSibling ? target.previousElementSibling.getAttribute('pagekey') : null) - return pageKey || (target.firstElementChild ? this.getPageKey(target.firstElementChild, ++depth) : null) - }, - onMenuSelect(key, target) { - let pageKey = this.getPageKey(target) - switch (key) { - case '1': - this.closeLeft(pageKey) - break - case '2': - this.closeRight(pageKey) - break - case '3': - this.closeOthers(pageKey) - break - case '4': - this.routeReload() - break - default: - break - } - }, - /* update_begin author:wuxianquan date:20190828 for: 关闭当前tab页,供子页面调用->望菜单能配置外链,直接弹出新页面而不是嵌入iframe #428 */ - closeCurrent(){ - this.remove(this.activePage); - }, - /* update_end author:wuxianquan date:20190828 for: 关闭当前tab页,供子页面调用->望菜单能配置外链,直接弹出新页面而不是嵌入iframe #428 */ - closeOthers(pageKey) { - let index = this.linkList.indexOf(pageKey) - if (pageKey == indexKey || pageKey.indexOf('?ticke=')>=0) { - this.linkList = this.linkList.slice(index, index + 1) - this.pageList = this.pageList.slice(index, index + 1) - this.activePage = this.linkList[0] - } else { - this.linkList = this.linkList.slice(index, index + 1) - this.pageList = this.pageList.slice(index, index + 1) - this.activePage = this.linkList[1] - } - }, - closeLeft(pageKey) { - if (pageKey == indexKey) { - return - } - let tempList = [...this.pageList] - let index = this.linkList.indexOf(pageKey) - this.linkList = this.linkList.slice(index) - this.pageList = this.pageList.slice(index) - if (this.linkList.indexOf(this.activePage) < 0) { - this.activePage = this.linkList[0] - } - }, - closeRight(pageKey) { - let index = this.linkList.indexOf(pageKey) - this.linkList = this.linkList.slice(0, index + 1) - this.pageList = this.pageList.slice(0, index + 1) - if (this.linkList.indexOf(this.activePage < 0)) { - this.activePage = this.linkList[this.linkList.length - 1] - } - }, - //update-begin-author:taoyan date:20190430 for:动态路由title显示配置的菜单title而不是其对应路由的title - dynamicRouterShow(key,title){ - let keyIndex = this.linkList.indexOf(key) - if(keyIndex>=0){ - let currRouter = this.pageList[keyIndex] - let meta = Object.assign({},currRouter.meta,{title:title}) - this.pageList.splice(keyIndex, 1, Object.assign({},currRouter,{meta:meta})) - if (key === this.activePage) { - this.changeTitle(title) - } - } - }, - //update-end-author:taoyan date:20190430 for:动态路由title显示配置的菜单title而不是其对应路由的title - - //update-begin-author:taoyan date:20191008 for:路由刷新 - routeReload(){ - this.reloadFlag = false - let ToggleMultipage = "ToggleMultipage" - this.$store.dispatch(ToggleMultipage,false) - this.$nextTick(()=>{ - this.$store.dispatch(ToggleMultipage,true) - this.reloadFlag = true - }) - }, - //update-end-author:taoyan date:20191008 for:路由刷新 - //新增一个返回方法 - excuteCallback(callback){ - callback() - }, + // update-end-author:taoyan date:20191008 for:路由刷新 + // 新增一个返回方法 + excuteCallback (callback) { + callback() } } +} diff --git a/jero-web/src/components/layouts/UserLayout.vue b/jero-web/src/components/layouts/UserLayout.vue index cdb754a0..d006f5f2 100644 --- a/jero-web/src/components/layouts/UserLayout.vue +++ b/jero-web/src/components/layouts/UserLayout.vue @@ -32,49 +32,49 @@ \ No newline at end of file + diff --git a/jero-web/src/components/layouts/index.js b/jero-web/src/components/layouts/index.js index 7cf0f77e..703de2c6 100644 --- a/jero-web/src/components/layouts/index.js +++ b/jero-web/src/components/layouts/index.js @@ -5,4 +5,4 @@ import RouteView from '@/components/layouts/RouteView' import PageView from '@/components/layouts/PageView' import TabLayout from '@/components/layouts/TabLayout' -export { UserLayout, BasicLayout, BlankLayout, RouteView, PageView, TabLayout } \ No newline at end of file +export { UserLayout, BasicLayout, BlankLayout, RouteView, PageView, TabLayout } diff --git a/jero-web/src/components/menu/Contextmenu.vue b/jero-web/src/components/menu/Contextmenu.vue index f88f7b45..39f7887b 100644 --- a/jero-web/src/components/menu/Contextmenu.vue +++ b/jero-web/src/components/menu/Contextmenu.vue @@ -52,7 +52,7 @@ export default { this.top = e.clientY this.target = e.target }, - handleClick ({key}) { + handleClick ({ key }) { this.$emit('select', key, this.target) this.$emit('update:visible', false) } diff --git a/jero-web/src/components/menu/SideMenu.vue b/jero-web/src/components/menu/SideMenu.vue index 8644c7db..48e0f4f2 100644 --- a/jero-web/src/components/menu/SideMenu.vue +++ b/jero-web/src/components/menu/SideMenu.vue @@ -20,61 +20,61 @@ \ No newline at end of file + diff --git a/jero-web/src/components/page/GlobalHeader.vue b/jero-web/src/components/page/GlobalHeader.vue index 123eb69d..a7bffedc 100644 --- a/jero-web/src/components/page/GlobalHeader.vue +++ b/jero-web/src/components/page/GlobalHeader.vue @@ -49,124 +49,124 @@ \ No newline at end of file + diff --git a/jero-web/src/components/page/GlobalLayout.vue b/jero-web/src/components/page/GlobalLayout.vue index 8a0effa3..0c3707a8 100644 --- a/jero-web/src/components/page/GlobalLayout.vue +++ b/jero-web/src/components/page/GlobalLayout.vue @@ -86,105 +86,105 @@ diff --git a/jero-web/src/components/page/PageHeader.vue b/jero-web/src/components/page/PageHeader.vue index f7e86b57..4e4e00b0 100644 --- a/jero-web/src/components/page/PageHeader.vue +++ b/jero-web/src/components/page/PageHeader.vue @@ -41,63 +41,62 @@ \ No newline at end of file + diff --git a/jero-web/src/components/page/PageLayout.vue b/jero-web/src/components/page/PageLayout.vue index 191fd8a4..fe1f7ed5 100644 --- a/jero-web/src/components/page/PageLayout.vue +++ b/jero-web/src/components/page/PageLayout.vue @@ -37,51 +37,51 @@ \ No newline at end of file + diff --git a/jero-web/src/components/page/SHeaderNotice.vue b/jero-web/src/components/page/SHeaderNotice.vue index 5e874e8c..9520a324 100644 --- a/jero-web/src/components/page/SHeaderNotice.vue +++ b/jero-web/src/components/page/SHeaderNotice.vue @@ -18,33 +18,33 @@ \ No newline at end of file + diff --git a/jero-web/src/components/setting/SettingDrawer.vue b/jero-web/src/components/setting/SettingDrawer.vue index 79f5e9e9..fe0c6ecf 100644 --- a/jero-web/src/components/setting/SettingDrawer.vue +++ b/jero-web/src/components/setting/SettingDrawer.vue @@ -163,89 +163,89 @@ \ No newline at end of file + diff --git a/jero-web/src/components/table/index.js b/jero-web/src/components/table/index.js index ffb65110..6907cee3 100644 --- a/jero-web/src/components/table/index.js +++ b/jero-web/src/components/table/index.js @@ -1,7 +1,7 @@ -import T from "ant-design-vue/es/table/Table"; -import get from "lodash.get" +import T from 'ant-design-vue/es/table/Table' +import get from 'lodash.get' export default { - data() { + data () { return { needTotalList: [], @@ -11,7 +11,7 @@ export default { localLoading: false, localDataSource: [], localPagination: Object.assign({}, T.props.pagination) - }; + } }, props: Object.assign({}, T.props, { rowKey: { @@ -43,122 +43,122 @@ export default { } }), watch: { - 'localPagination.current'(val) { + 'localPagination.current' (val) { this.$router.push({ name: this.$route.name, params: Object.assign({}, this.$route.params, { pageNo: val - }), - }); + }) + }) }, - pageNum(val) { + pageNum (val) { Object.assign(this.localPagination, { current: val - }); + }) }, - pageSize(val) { + pageSize (val) { console.log('pageSize:', val) Object.assign(this.localPagination, { pageSize: val - }); + }) }, - showSizeChanger(val) { + showSizeChanger (val) { console.log('showSizeChanger', val) Object.assign(this.localPagination, { showSizeChanger: val - }); + }) } }, - created() { + created () { this.localPagination = ['auto', true].includes(this.showPagination) && Object.assign({}, this.localPagination, { current: this.pageNum, pageSize: this.pageSize, showSizeChanger: this.showSizeChanger - }); + }) this.needTotalList = this.initTotalList(this.columns) - this.loadData(); + this.loadData() }, methods: { - refresh() { - this.loadData(); + refresh () { + this.loadData() }, - loadData(pagination, filters, sorter) { - + loadData (pagination, filters, sorter) { this.localLoading = true var result = this.data( Object.assign({ - pageNo: (pagination && pagination.current) || + pageNo: (pagination && pagination.current) || this.localPagination.current, - pageSize: (pagination && pagination.pageSize) || + pageSize: (pagination && pagination.pageSize) || this.localPagination.pageSize - }, - (sorter && sorter.field && { - sortField: sorter.field - }) || {}, - (sorter && sorter.order && { - sortOrder: sorter.order - }) || {}, { - ...filters - } + }, + (sorter && sorter.field && { + sortField: sorter.field + }) || {}, + (sorter && sorter.order && { + sortOrder: sorter.order + }) || {}, { + ...filters + } ) - ); + ) if (result instanceof Promise) { result.then(r => { this.localPagination = Object.assign({}, this.localPagination, { - current: r.pageNo, // 返回结果中的当前分页数 + current: r.pageNo, // 返回结果中的当前分页数 total: r.totalCount, // 返回结果中的总记录数 showSizeChanger: this.showSizeChanger, pageSize: (pagination && pagination.pageSize) || this.localPagination.pageSize }); - //update--begin--autor:wangshuai-----date:20200724------for:判断showPagination是否为false------ + // update--begin--autor:wangshuai-----date:20200724------for:判断showPagination是否为false------ (!this.showPagination || !r.totalCount && this.showPagination === 'auto') && (this.localPagination = false) - //update--end--autor:wangshuai-----date:20200724------for:判断showPagination是否为false----- - this.localDataSource = r.data; // 返回结果中的数组数据 + // update--end--autor:wangshuai-----date:20200724------for:判断showPagination是否为false----- + this.localDataSource = r.data // 返回结果中的数组数据 this.localLoading = false - }); + }) } }, - initTotalList(columns) { + initTotalList (columns) { const totalList = [] columns && columns instanceof Array && columns.forEach(column => { if (column.needTotal) { - totalList.push({ ...column, + totalList.push({ + ...column, total: 0 }) } }) return totalList }, - updateSelect(selectedRowKeys, selectedRows) { + updateSelect (selectedRowKeys, selectedRows) { this.selectedRowKeys = selectedRowKeys this.selectedRows = selectedRows - let list = this.needTotalList + const list = this.needTotalList this.needTotalList = list.map(item => { return { ...item, total: selectedRows.reduce((sum, val) => { - let total = sum + get(val, item.dataIndex) + const total = sum + get(val, item.dataIndex) return isNaN(total) ? 0 : total }, 0) } }) // this.$emit('change', selectedRowKeys, selectedRows) }, - updateEdit() { + updateEdit () { this.selectedRows = [] }, - onClearSelected() { + onClearSelected () { // 【TESTA-262】页面清空后还能才做所选行,增加 this.$emit('clearAll') this.selectedRowKeys = [] this.selectedRows = [] this.updateSelect([], []) this.$emit('clearAll') }, - renderMsg(h) { + renderMsg (h) { const _vm = this - let d = [] + const d = [] // 构建 已选择 d.push( h('span', { @@ -170,24 +170,24 @@ export default { fontWeight: 600 } }, this.selectedRows.length)]) - ); + ) // 构建 列统计 this.needTotalList.map(item => { d.push(h('span', { - style: { - marginRight: '12px' - } - }, - [ - `${ item.title }总计 `, + style: { + marginRight: '12px' + } + }, + [ + `${item.title}总计 `, h('a', { style: { fontWeight: 600 } - }, `${ !item.customRender ? item.total : item.customRender(item.total) }`) - ])) - }); + }, `${!item.customRender ? item.total : item.customRender(item.total)}`) + ])) + }) // 构建 清空选择 d.push(h('a', { @@ -201,41 +201,39 @@ export default { return d }, - renderAlert(h) { + renderAlert (h) { return h('span', { slot: 'message' }, this.renderMsg(h)) - }, + } }, - render(h) { + render (h) { const _vm = this - let props = {}, - localKeys = Object.keys(this.$data); + const props = {} + const localKeys = Object.keys(this.$data) Object.keys(T.props).forEach(k => { - let localKey = `local${k.substring(0,1).toUpperCase()}${k.substring(1)}`; + const localKey = `local${k.substring(0, 1).toUpperCase()}${k.substring(1)}` if (localKeys.includes(localKey)) { - return props[k] = _vm[localKey]; + return props[k] = _vm[localKey] } - return props[k] = _vm[k]; + return props[k] = _vm[k] }) - // 显示信息提示 if (this.showAlertInfo) { - props.rowSelection = { selectedRowKeys: this.selectedRowKeys, onChange: (selectedRowKeys, selectedRows) => { _vm.updateSelect(selectedRowKeys, selectedRows) _vm.$emit('onSelect', { selectedRowKeys: selectedRowKeys, selectedRows: selectedRows }) } - }; + } return h('div', {}, [ - h("a-alert", { + h('a-alert', { style: { marginBottom: '16px' }, @@ -244,26 +242,24 @@ export default { showIcon: true } }, [_vm.renderAlert(h)]), - h("a-table", { - tag: "component", + h('a-table', { + tag: 'component', attrs: props, on: { change: _vm.loadData }, scopedSlots: this.$scopedSlots }, this.$slots.default) - ]); - + ]) } - return h("a-table", { - tag: "component", + return h('a-table', { + tag: 'component', attrs: props, on: { change: _vm.loadData }, scopedSlots: this.$scopedSlots - }, this.$slots.default); - + }, this.$slots.default) } -}; \ No newline at end of file +} diff --git a/jero-web/src/components/tools/Breadcrumb.vue b/jero-web/src/components/tools/Breadcrumb.vue index 3bd067fa..3ed4f784 100644 --- a/jero-web/src/components/tools/Breadcrumb.vue +++ b/jero-web/src/components/tools/Breadcrumb.vue @@ -11,18 +11,17 @@ \ No newline at end of file + diff --git a/jero-web/src/components/tools/DetailList.vue b/jero-web/src/components/tools/DetailList.vue index d366e693..c9556223 100644 --- a/jero-web/src/components/tools/DetailList.vue +++ b/jero-web/src/components/tools/DetailList.vue @@ -8,73 +8,73 @@ \ No newline at end of file + diff --git a/jero-web/src/components/tools/DynamicNotice.vue b/jero-web/src/components/tools/DynamicNotice.vue index 02cb7fc6..ddd89123 100644 --- a/jero-web/src/components/tools/DynamicNotice.vue +++ b/jero-web/src/components/tools/DynamicNotice.vue @@ -7,30 +7,25 @@ \ No newline at end of file +} + diff --git a/jero-web/src/components/tools/FooterToolBar.vue b/jero-web/src/components/tools/FooterToolBar.vue index 8b00ab42..0629a1f4 100644 --- a/jero-web/src/components/tools/FooterToolBar.vue +++ b/jero-web/src/components/tools/FooterToolBar.vue @@ -10,9 +10,9 @@ \ No newline at end of file + diff --git a/jero-web/src/components/tools/HeadInfo.vue b/jero-web/src/components/tools/HeadInfo.vue index f4f6bbca..7fbc692d 100644 --- a/jero-web/src/components/tools/HeadInfo.vue +++ b/jero-web/src/components/tools/HeadInfo.vue @@ -7,27 +7,27 @@ \ No newline at end of file + diff --git a/jero-web/src/components/tools/HeaderNotice.vue b/jero-web/src/components/tools/HeaderNotice.vue index 799069f1..976576e6 100644 --- a/jero-web/src/components/tools/HeaderNotice.vue +++ b/jero-web/src/components/tools/HeaderNotice.vue @@ -77,247 +77,244 @@ \ No newline at end of file + diff --git a/jero-web/src/components/tools/Logo.vue b/jero-web/src/components/tools/Logo.vue index ba104fe9..15c96f5d 100644 --- a/jero-web/src/components/tools/Logo.vue +++ b/jero-web/src/components/tools/Logo.vue @@ -13,29 +13,29 @@ \ No newline at end of file + diff --git a/jero-web/src/components/tools/ShowAnnouncement.vue b/jero-web/src/components/tools/ShowAnnouncement.vue index b2c6d889..b8227aa3 100644 --- a/jero-web/src/components/tools/ShowAnnouncement.vue +++ b/jero-web/src/components/tools/ShowAnnouncement.vue @@ -23,69 +23,69 @@ \ No newline at end of file + diff --git a/jero-web/src/components/tools/UserMenu.vue b/jero-web/src/components/tools/UserMenu.vue index d0f23974..e5d182a5 100644 --- a/jero-web/src/components/tools/UserMenu.vue +++ b/jero-web/src/components/tools/UserMenu.vue @@ -92,172 +92,172 @@ \ No newline at end of file + diff --git a/jero-web/src/components/tools/UserPassword.vue b/jero-web/src/components/tools/UserPassword.vue index ff2cc790..33a6027b 100644 --- a/jero-web/src/components/tools/UserPassword.vue +++ b/jero-web/src/components/tools/UserPassword.vue @@ -39,119 +39,117 @@ - diff --git a/jero-web/src/components/tools/setting.js b/jero-web/src/components/tools/setting.js index fdfc3963..102beb6e 100644 --- a/jero-web/src/components/tools/setting.js +++ b/jero-web/src/components/tools/setting.js @@ -1,34 +1,34 @@ -import { message } from 'ant-design-vue/es'; +import { message } from 'ant-design-vue/es' // import defaultSettings from '../defaultSettings'; -let lessNodesAppended; +let lessNodesAppended const colorList = [ { - key: '薄暮', color: '#F5222D', + key: '薄暮', color: '#F5222D' }, { - key: '火山', color: '#FA541C', + key: '火山', color: '#FA541C' }, { - key: '日暮', color: '#FAAD14', + key: '日暮', color: '#FAAD14' }, { - key: '明青', color: '#13C2C2', + key: '明青', color: '#13C2C2' }, { - key: '极光绿', color: '#52C41A', + key: '极光绿', color: '#52C41A' }, { - key: '拂晓蓝(默认)', color: '#1890FF', + key: '拂晓蓝(默认)', color: '#1890FF' }, { - key: '极客蓝', color: '#2F54EB', + key: '极客蓝', color: '#2F54EB' }, { - key: '酱紫', color: '#722ED1', - }, -]; + key: '酱紫', color: '#722ED1' + } +] const updateTheme = primaryColor => { // Don't compile less in production! @@ -37,33 +37,33 @@ const updateTheme = primaryColor => { } */ // Determine if the component is remounted if (!primaryColor) { - return; + return } - const hideMessage = message.loading('正在编译主题!', 0); + const hideMessage = message.loading('正在编译主题!', 0) console.info(`正在编译主题!`) - function buildIt() { + function buildIt () { // 正确的判定less是否已经加载less.modifyVars可用 if (!window.less || !window.less.modifyVars) { - return; + return } // less.modifyVars可用 window.less.modifyVars({ - '@primary-color': primaryColor, - }) + '@primary-color': primaryColor + }) .then(() => { - hideMessage(); + hideMessage() }) .catch(() => { - message.error('Failed to update theme'); - hideMessage(); - }); + message.error('Failed to update theme') + hideMessage() + }) } if (!lessNodesAppended) { // insert less.js and color.less - const lessStyleNode = document.createElement('link'); - const lessConfigNode = document.createElement('script'); - const lessScriptNode = document.createElement('script'); - lessStyleNode.setAttribute('rel', 'stylesheet/less'); + const lessStyleNode = document.createElement('link') + const lessConfigNode = document.createElement('script') + const lessScriptNode = document.createElement('script') + lessStyleNode.setAttribute('rel', 'stylesheet/less') lessStyleNode.setAttribute('href', __webpack_public_path__ + 'color.less') lessConfigNode.innerHTML = ` window.less = { @@ -71,25 +71,25 @@ const updateTheme = primaryColor => { env: 'production', javascriptEnabled: true }; - `; - lessScriptNode.src = 'https://gw.alipayobjects.com/os/lib/less.js/3.8.1/less.min.js'; - lessScriptNode.async = true; + ` + lessScriptNode.src = 'https://gw.alipayobjects.com/os/lib/less.js/3.8.1/less.min.js' + lessScriptNode.async = true lessScriptNode.onload = () => { - buildIt(); - lessScriptNode.onload = null; - }; - document.body.appendChild(lessStyleNode); - document.body.appendChild(lessConfigNode); - document.body.appendChild(lessScriptNode); - lessNodesAppended = true; + buildIt() + lessScriptNode.onload = null + } + document.body.appendChild(lessStyleNode) + document.body.appendChild(lessConfigNode) + document.body.appendChild(lessScriptNode) + lessNodesAppended = true } else { - buildIt(); + buildIt() } -}; +} const updateColorWeak = colorWeak => { // document.body.className = colorWeak ? 'colorWeak' : ''; colorWeak ? document.body.classList.add('colorWeak') : document.body.classList.remove('colorWeak') -}; +} -export { updateTheme, colorList, updateColorWeak } \ No newline at end of file +export { updateTheme, colorList, updateColorWeak } diff --git a/jero-web/src/config/router.config.js b/jero-web/src/config/router.config.js index c5238c69..87e936da 100644 --- a/jero-web/src/config/router.config.js +++ b/jero-web/src/config/router.config.js @@ -319,7 +319,7 @@ export const constantRouterMap = [ path: 'alteration', name: 'alteration', component: () => import(/* webpackChunkName: "user" */ '@/views/user/alteration/Alteration') - }, + } ] }, @@ -346,7 +346,7 @@ export const constantRouterMap = [ // }, // ] // }, - + { // OAuth2 APP页面路由 path: '/oauth2-app', @@ -358,7 +358,7 @@ export const constantRouterMap = [ path: 'login', name: 'login', component: () => import(/* webpackChunkName: "oauth2-app.login" */ '@/views/user/oauth2/OAuth2Login') - }, + } ] }, { @@ -376,5 +376,5 @@ export const constantRouterMap = [ { path: '/404', component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404') - }, + } ] diff --git a/jero-web/src/defaultSettings.js b/jero-web/src/defaultSettings.js index 832264fe..f7b756b6 100644 --- a/jero-web/src/defaultSettings.js +++ b/jero-web/src/defaultSettings.js @@ -22,11 +22,11 @@ export default { fixSiderbar: false, // sticky siderbar autoHideHeader: false, // auto hide header colorWeak: false, - multipage: true, //默认多页签模式 + multipage: true, // 默认多页签模式 // vue-ls options storageOptions: { namespace: 'pro__', // key prefix name: 'ls', // name variable Vue.[ls] or this.[$ls], - storage: 'local', // storage name session, local, memory + storage: 'local' // storage name session, local, memory } -} \ No newline at end of file +} diff --git a/jero-web/src/icons.js b/jero-web/src/icons.js index 7c62954e..8a92c517 100644 --- a/jero-web/src/icons.js +++ b/jero-web/src/icons.js @@ -3,13 +3,13 @@ // export what you need export { default as SmileOutline -} from '@ant-design/icons/lib/outline/SmileOutline'; +} from '@ant-design/icons/lib/outline/SmileOutline' export { default as MehOutline -} from '@ant-design/icons/lib/outline/MehOutline'; +} from '@ant-design/icons/lib/outline/MehOutline' // export what antd other components need export { default as CloseOutline -} from '@ant-design/icons/lib/outline/CloseOutline'; -// and other icons... \ No newline at end of file +} from '@ant-design/icons/lib/outline/CloseOutline' +// and other icons... diff --git a/jero-web/src/main.js b/jero-web/src/main.js index 13deea5e..6ed36814 100644 --- a/jero-web/src/main.js +++ b/jero-web/src/main.js @@ -8,16 +8,12 @@ import router from './router' import store from './store/' import { VueAxios -} from "@/utils/request" - -require('@/components/onlineForm/onlineForm') -require('@/components/onlineForm/OnlineForm.css') +} from '@/utils/request' import Antd, { version } from 'ant-design-vue' -console.log('ant-design-vue version:', version) import Viser from 'viser-vue' -import 'ant-design-vue/dist/antd.less'; // or 'ant-design-vue/dist/antd.less' +import 'ant-design-vue/dist/antd.less' // or 'ant-design-vue/dist/antd.less' import '@/permission' // permission control import '@/utils/filter' // base filtermybatis-plus @@ -37,19 +33,23 @@ import { DEFAULT_FIXED_SIDEMENU, DEFAULT_CONTENT_WIDTH_TYPE, DEFAULT_MULTI_PAGE -} from "@/store/mutation-types" +} from '@/store/mutation-types' import config from '@/defaultSettings' import JDictSelectTag from './components/dict/index.js' import hasPermission from '@/utils/hasPermission' -import vueBus from '@/utils/vueBus'; +import vueBus from '@/utils/vueBus' import JeroComponents from '@/components/jero/index' import '@/assets/less/JAreaLinkage.less' import VueAreaLinkage from 'vue-area-linkage' import '@/components/jero/JVxeTable/install' import '@/components/JVxeCells/install' -//表单验证 +// 表单验证 import { rules } from '@/utils/rules' + +require('@/components/onlineForm/onlineForm') +require('@/components/onlineForm/OnlineForm.css') +console.log('ant-design-vue version:', version) Vue.prototype.rules = rules Vue.config.productionTip = false Vue.use(Storage, config.storageOptions) @@ -60,19 +60,19 @@ Vue.use(hasPermission) Vue.use(JDictSelectTag) Vue.use(Print) Vue.use(preview) -Vue.use(vueBus); -Vue.use(JeroComponents); -Vue.use(VueAreaLinkage); +Vue.use(vueBus) +Vue.use(JeroComponents) +Vue.use(VueAreaLinkage) SSO.init(() => { main() }) -function main() { +function main () { new Vue({ router, store, - mounted() { + mounted () { store.commit('SET_SIDEBAR_TYPE', Vue.ls.get(SIDEBAR_TYPE, true)) store.commit('TOGGLE_THEME', Vue.ls.get(DEFAULT_THEME, config.navTheme)) store.commit('TOGGLE_LAYOUT_MODE', Vue.ls.get(DEFAULT_LAYOUT_MODE, config.layout)) diff --git a/jero-web/src/mixins/DisabledAuthFilterMixin.js b/jero-web/src/mixins/DisabledAuthFilterMixin.js index 26aca742..23b159e9 100644 --- a/jero-web/src/mixins/DisabledAuthFilterMixin.js +++ b/jero-web/src/mixins/DisabledAuthFilterMixin.js @@ -1,19 +1,19 @@ /** * */ -import { disabledAuthFilter } from "@/utils/authFilter" +import { disabledAuthFilter } from '@/utils/authFilter' export const DisabledAuthFilterMixin = { props: ['formData'], - data(){ + data () { return { } }, - methods:{ - isDisabledAuth(code){ - return disabledAuthFilter(code,this.formData); - }, + methods: { + isDisabledAuth (code) { + return disabledAuthFilter(code, this.formData) + } } -} \ No newline at end of file +} diff --git a/jero-web/src/mixins/JEditableTableMixin.js b/jero-web/src/mixins/JEditableTableMixin.js index 10dea4f2..dd626bd1 100644 --- a/jero-web/src/mixins/JEditableTableMixin.js +++ b/jero-web/src/mixins/JEditableTableMixin.js @@ -6,7 +6,7 @@ export const JEditableTableMixin = { components: { JEditableTable }, - data() { + data () { return { title: '操作', visible: false, @@ -26,16 +26,16 @@ export const JEditableTableMixin = { methods: { /** 获取所有的editableTable实例 */ - getAllTable() { + getAllTable () { if (!(this.refKeys instanceof Array)) { throw this.throwNotArray('refKeys') } - let values = this.refKeys.map(key => getRefPromise(this, key)) + const values = this.refKeys.map(key => getRefPromise(this, key)) return Promise.all(values) }, /** 遍历所有的JEditableTable实例 */ - eachAllTable(callback) { + eachAllTable (callback) { // 开始遍历 this.getAllTable().then(tables => { tables.forEach((item, index) => { @@ -47,11 +47,11 @@ export const JEditableTableMixin = { }, /** 当点击新增按钮时调用此方法 */ - add() { - //update-begin-author:lvdandan date:20201113 for:LOWCOD-1049 JEditaTable,子表默认添加一条数据,addDefaultRowNum设置无效 #1930 + add () { + // update-begin-author:lvdandan date:20201113 for:LOWCOD-1049 JEditaTable,子表默认添加一条数据,addDefaultRowNum设置无效 #1930 return new Promise((resolve) => { - this.tableReset(); - resolve(); + this.tableReset() + resolve() }).then(() => { if (typeof this.addBefore === 'function') { this.addBefore() @@ -68,12 +68,12 @@ export const JEditableTableMixin = { if (typeof this.addAfter === 'function') this.addAfter(this.model) this.edit({}) }) - //update-end-author:lvdandan date:20201113 for:LOWCOD-1049 JEditaTable,子表默认添加一条数据,addDefaultRowNum设置无效 #1930 + // update-end-author:lvdandan date:20201113 for:LOWCOD-1049 JEditaTable,子表默认添加一条数据,addDefaultRowNum设置无效 #1930 }, /** 当点击了编辑(修改)按钮时调用此方法 */ - edit(record) { - if(record && '{}'!=JSON.stringify(record)){ - this.tableReset(); + edit (record) { + if (record && JSON.stringify(record) != '{}') { + this.tableReset() } if (typeof this.editBefore === 'function') this.editBefore(record) this.visible = true @@ -83,21 +83,21 @@ export const JEditableTableMixin = { if (typeof this.editAfter === 'function') this.editAfter(this.model) }, /** 关闭弹窗,并将所有JEditableTable实例回归到初始状态 */ - close() { + close () { this.visible = false this.$emit('close') }, - //清空子表table的数据 - tableReset(){ + // 清空子表table的数据 + tableReset () { this.eachAllTable((item) => { item.clearRow() }) }, /** 查询某个tab的数据 */ - requestSubTableData(url, params, tab, success) { + requestSubTableData (url, params, tab, success) { tab.loading = true getAction(url, params).then(res => { - let { result } = res + const { result } = res let dataSource = [] if (result) { if (Array.isArray(result)) { @@ -113,8 +113,8 @@ export const JEditableTableMixin = { }) }, /** 发起请求,自动判断是执行新增还是修改操作 */ - request(formData) { - let url = this.url.add, method = 'post' + request (formData) { + let url = this.url.add; let method = 'post' if (this.model.id) { url = this.url.edit method = 'put' @@ -136,18 +136,18 @@ export const JEditableTableMixin = { /* --- handle 事件 --- */ /** ATab 选项卡切换事件 */ - handleChangeTabs(key) { + handleChangeTabs (key) { // 自动重置scrollTop状态,防止出现白屏 getRefPromise(this, key).then(editableTable => { editableTable.resetScrollTop() }) }, /** 关闭按钮点击事件 */ - handleCancel() { + handleCancel () { this.close() }, /** 确定按钮点击事件 */ - handleOk() { + handleOk () { /** 触发表单验证 */ this.getAllTable().then(tables => { /** 一次性验证主表和所有的次表 */ @@ -156,7 +156,7 @@ export const JEditableTableMixin = { if (typeof this.classifyIntoFormData !== 'function') { throw this.throwNotFunction('classifyIntoFormData') } - let formData = this.classifyIntoFormData(allValues) + const formData = this.classifyIntoFormData(allValues) // 发起请求 return this.request(formData) }).catch(e => { @@ -172,14 +172,14 @@ export const JEditableTableMixin = { /* --- throw --- */ /** not a function */ - throwNotFunction(name) { + throwNotFunction (name) { return `${name} 未定义或不是一个函数` }, /** not a array */ - throwNotArray(name) { + throwNotArray (name) { return `${name} 未定义或不是一个数组` } } -} \ No newline at end of file +} diff --git a/jero-web/src/mixins/JEditableTableModelMixin.js b/jero-web/src/mixins/JEditableTableModelMixin.js index 07f05366..c619d9b5 100644 --- a/jero-web/src/mixins/JEditableTableModelMixin.js +++ b/jero-web/src/mixins/JEditableTableModelMixin.js @@ -1,17 +1,17 @@ import JEditableTable from '@/components/jero/JEditableTable' -import { VALIDATE_NO_PASSED, getRefPromise,validateFormModelAndTables} from '@/utils/JEditableTableUtil' +import { VALIDATE_NO_PASSED, getRefPromise, validateFormModelAndTables } from '@/utils/JEditableTableUtil' import { httpAction, getAction } from '@/api/manage' export const JEditableTableModelMixin = { components: { JEditableTable }, - data() { + data () { return { title: '操作', visible: false, confirmLoading: false, - model:{}, + model: {}, labelCol: { xs: { span: 24 }, sm: { span: 6 } @@ -25,16 +25,16 @@ export const JEditableTableModelMixin = { methods: { /** 获取所有的editableTable实例 */ - getAllTable() { + getAllTable () { if (!(this.refKeys instanceof Array)) { throw this.throwNotArray('refKeys') } - let values = this.refKeys.map(key => getRefPromise(this, key)) + const values = this.refKeys.map(key => getRefPromise(this, key)) return Promise.all(values) }, /** 遍历所有的JEditableTable实例 */ - eachAllTable(callback) { + eachAllTable (callback) { // 开始遍历 this.getAllTable().then(tables => { tables.forEach((item, index) => { @@ -45,13 +45,13 @@ export const JEditableTableModelMixin = { }) }, /** 当点击新增按钮时调用此方法 */ - add() { - //update-begin-author:lvdandan date:20201113 for:LOWCOD-1049 JEditaTable,子表默认添加一条数据,addDefaultRowNum设置无效 #1930 + add () { + // update-begin-author:lvdandan date:20201113 for:LOWCOD-1049 JEditaTable,子表默认添加一条数据,addDefaultRowNum设置无效 #1930 return new Promise((resolve) => { - this.tableReset(); - resolve(); + this.tableReset() + resolve() }).then(() => { - if (typeof this.addBefore === 'function'){ + if (typeof this.addBefore === 'function') { this.addBefore() } // 默认新增空数据 @@ -66,12 +66,12 @@ export const JEditableTableModelMixin = { if (typeof this.addAfter === 'function') this.addAfter(this.model) this.edit(this.model) }) - //update-end-author:lvdandan date:20201113 for:LOWCOD-1049 JEditaTable,子表默认添加一条数据,addDefaultRowNum设置无效 #1930 + // update-end-author:lvdandan date:20201113 for:LOWCOD-1049 JEditaTable,子表默认添加一条数据,addDefaultRowNum设置无效 #1930 }, /** 当点击了编辑(修改)按钮时调用此方法 */ - edit(record) { - if(record && '{}'!=JSON.stringify(record)&&record.id){ - this.tableReset(); + edit (record) { + if (record && JSON.stringify(record) != '{}' && record.id) { + this.tableReset() } if (typeof this.editBefore === 'function') this.editBefore(record) this.visible = true @@ -81,21 +81,21 @@ export const JEditableTableModelMixin = { if (typeof this.editAfter === 'function') this.editAfter(this.model) }, /** 关闭弹窗,并将所有JEditableTable实例回归到初始状态 */ - close() { + close () { this.visible = false this.$emit('close') }, - //清空子表table的数据 - tableReset(){ + // 清空子表table的数据 + tableReset () { this.eachAllTable((item) => { item.clearRow() }) }, /** 查询某个tab的数据 */ - requestSubTableData(url, params, tab, success) { + requestSubTableData (url, params, tab, success) { tab.loading = true getAction(url, params).then(res => { - let { result } = res + const { result } = res let dataSource = [] if (result) { if (Array.isArray(result)) { @@ -111,8 +111,8 @@ export const JEditableTableModelMixin = { }) }, /** 发起请求,自动判断是执行新增还是修改操作 */ - request(formData) { - let url = this.url.add, method = 'post' + request (formData) { + let url = this.url.add; let method = 'post' if (this.model.id) { url = this.url.edit method = 'put' @@ -134,22 +134,22 @@ export const JEditableTableModelMixin = { /* --- handle 事件 --- */ /** ATab 选项卡切换事件 */ - handleChangeTabs(key) { + handleChangeTabs (key) { // 自动重置scrollTop状态,防止出现白屏 getRefPromise(this, key).then(editableTable => { editableTable.resetScrollTop() }) }, /** 关闭按钮点击事件 */ - handleCancel() { + handleCancel () { this.close() }, /** 确定按钮点击事件 */ - handleOk() { + handleOk () { /** 触发表单验证 */ this.getAllTable().then(tables => { /** 一次性验证主表和所有的次表 */ - return validateFormModelAndTables(this.$refs.form,this.model, tables) + return validateFormModelAndTables(this.$refs.form, this.model, tables) }).then(allValues => { /** 一次性验证一对一的所有子表 */ return this.validateSubForm(allValues) @@ -157,22 +157,22 @@ export const JEditableTableModelMixin = { if (typeof this.classifyIntoFormData !== 'function') { throw this.throwNotFunction('classifyIntoFormData') } - let formData = this.classifyIntoFormData(allValues) + const formData = this.classifyIntoFormData(allValues) // 发起请求 return this.request(formData) }).catch(e => { if (e.error === VALIDATE_NO_PASSED) { // 如果有未通过表单验证的子表,就自动跳转到它所在的tab - //update--begin--autor:liusq-----date:20210316------for:未通过表单验证跳转tab问题------ - this.activeKey = e.index == null ? this.activeKey : (e.paneKey?e.paneKey:this.refKeys[e.index]) - //update--end--autor:liusq-----date:20210316------for:未通过表单验证跳转tab问题------ + // update--begin--autor:liusq-----date:20210316------for:未通过表单验证跳转tab问题------ + this.activeKey = e.index == null ? this.activeKey : (e.paneKey ? e.paneKey : this.refKeys[e.index]) + // update--end--autor:liusq-----date:20210316------for:未通过表单验证跳转tab问题------ } else { console.error(e) } }) }, - //校验所有子表表单 - validateSubForm(allValues){ + // 校验所有子表表单 + validateSubForm (allValues) { return new Promise((resolve) => { resolve(allValues) }) @@ -180,14 +180,14 @@ export const JEditableTableModelMixin = { /* --- throw --- */ /** not a function */ - throwNotFunction(name) { + throwNotFunction (name) { return `${name} 未定义或不是一个函数` }, /** not a array */ - throwNotArray(name) { + throwNotArray (name) { return `${name} 未定义或不是一个数组` } } -} \ No newline at end of file +} diff --git a/jero-web/src/mixins/JVxeTableMixin.js b/jero-web/src/mixins/JVxeTableMixin.js index 5d4c6469..b6b32566 100644 --- a/jero-web/src/mixins/JVxeTableMixin.js +++ b/jero-web/src/mixins/JVxeTableMixin.js @@ -1,8 +1,8 @@ -import { VALIDATE_FAILED, getRefPromise, validateFormAndTables} from '@/components/jero/JVxeTable/utils/vxeUtils.js' +import { VALIDATE_FAILED, getRefPromise, validateFormAndTables } from '@/components/jero/JVxeTable/utils/vxeUtils.js' import { httpAction, getAction } from '@/api/manage' export const JVxeTableMixin = { - data() { + data () { return { title: '操作', visible: false, @@ -23,16 +23,16 @@ export const JVxeTableMixin = { methods: { /** 获取所有的JVxeTable实例 */ - getAllTable() { + getAllTable () { if (!(this.refKeys instanceof Array)) { throw this.throwNotArray('refKeys') } - let values = this.refKeys.map(key => getRefPromise(this, key)) + const values = this.refKeys.map(key => getRefPromise(this, key)) return Promise.all(values) }, /** 遍历所有的JVxeTable实例 */ - eachAllTable(callback) { + eachAllTable (callback) { // 开始遍历 this.getAllTable().then(tables => { tables.forEach((item, index) => { @@ -44,7 +44,7 @@ export const JVxeTableMixin = { }, /** 当点击新增按钮时调用此方法 */ - add() { + add () { if (typeof this.addBefore === 'function') this.addBefore() // 默认新增空数据 let rowNum = this.addDefaultRowNum @@ -53,7 +53,7 @@ export const JVxeTableMixin = { console.warn('由于你没有在 data 中定义 addDefaultRowNum 或 addDefaultRowNum 不是数字,所以默认添加一条空数据,如果不想默认添加空数据,请将定义 addDefaultRowNum 为 0') } this.eachAllTable((item) => { - setTimeout(()=>{ + setTimeout(() => { item.addRows() }, 30) }) @@ -61,7 +61,7 @@ export const JVxeTableMixin = { this.edit({}) }, /** 当点击了编辑(修改)按钮时调用此方法 */ - edit(record) { + edit (record) { if (typeof this.editBefore === 'function') this.editBefore(record) this.visible = true this.activeKey = this.refKeys[0] @@ -70,7 +70,7 @@ export const JVxeTableMixin = { if (typeof this.editAfter === 'function') this.editAfter(this.model) }, /** 关闭弹窗,并将所有JVxeTable实例回归到初始状态 */ - close() { + close () { this.visible = false this.eachAllTable((item) => { item._remove() @@ -79,10 +79,10 @@ export const JVxeTableMixin = { }, /** 查询某个tab的数据 */ - requestSubTableData(url, params, tab, success) { + requestSubTableData (url, params, tab, success) { tab.loading = true getAction(url, params).then(res => { - let { result } = res + const { result } = res let dataSource = [] if (result) { if (Array.isArray(result)) { @@ -98,14 +98,14 @@ export const JVxeTableMixin = { }) }, /** 发起请求,自动判断是执行新增还是修改操作 */ - request(formData) { - let url = this.url.add, method = 'post' + request (formData) { + let url = this.url.add; let method = 'post' if (this.model.id) { url = this.url.edit method = 'put' } this.confirmLoading = true - console.log("formData===>",formData); + console.log('formData===>', formData) httpAction(url, formData, method).then((res) => { if (res.success) { this.$message.success(res.message) @@ -122,18 +122,18 @@ export const JVxeTableMixin = { /* --- handle 事件 --- */ /** ATab 选项卡切换事件 */ - handleChangeTabs(key) { + handleChangeTabs (key) { // 自动重置scrollTop状态,防止出现白屏 getRefPromise(this, key).then(vxeTable => { vxeTable.resetScrollTop() }) }, /** 关闭按钮点击事件 */ - handleCancel() { + handleCancel () { this.close() }, /** 确定按钮点击事件 */ - handleOk() { + handleOk () { /** 触发表单验证 */ this.getAllTable().then(tables => { /** 一次性验证主表和所有的次表 */ @@ -142,7 +142,7 @@ export const JVxeTableMixin = { if (typeof this.classifyIntoFormData !== 'function') { throw this.throwNotFunction('classifyIntoFormData') } - let formData = this.classifyIntoFormData(allValues) + const formData = this.classifyIntoFormData(allValues) // 发起请求 return this.request(formData) }).catch(e => { @@ -158,14 +158,14 @@ export const JVxeTableMixin = { /* --- throw --- */ /** not a function */ - throwNotFunction(name) { + throwNotFunction (name) { return `${name} 未定义或不是一个函数` }, /** not a array */ - throwNotArray(name) { + throwNotArray (name) { return `${name} 未定义或不是一个数组` } } -} \ No newline at end of file +} diff --git a/jero-web/src/mixins/JVxeTableModelMixin.js b/jero-web/src/mixins/JVxeTableModelMixin.js index 1d29b6c9..844aa97d 100644 --- a/jero-web/src/mixins/JVxeTableModelMixin.js +++ b/jero-web/src/mixins/JVxeTableModelMixin.js @@ -1,8 +1,8 @@ -import { VALIDATE_FAILED, getRefPromise, validateFormAndTables,validateFormModelAndTables} from '@/components/jero/JVxeTable/utils/vxeUtils.js' +import { VALIDATE_FAILED, getRefPromise, validateFormAndTables, validateFormModelAndTables } from '@/components/jero/JVxeTable/utils/vxeUtils.js' import { httpAction, getAction } from '@/api/manage' export const JVxeTableModelMixin = { - data() { + data () { return { title: '操作', visible: false, @@ -22,19 +22,19 @@ export const JVxeTableModelMixin = { methods: { /** 获取所有的JVxeTable实例 */ - getAllTable() { + getAllTable () { if (!(this.refKeys instanceof Array)) { throw this.throwNotArray('refKeys') } - let values = this.refKeys.map(key => getRefPromise(this, key)) + const values = this.refKeys.map(key => getRefPromise(this, key)) return Promise.all(values) }, /** 遍历所有的JVxeTable实例 */ - eachAllTable(callback) { + eachAllTable (callback) { // 开始遍历 this.getAllTable().then(tables => { - console.log("tables",tables) + console.log('tables', tables) tables.forEach((item, index) => { if (typeof callback === 'function') { callback(item, index) @@ -44,7 +44,7 @@ export const JVxeTableModelMixin = { }, /** 当点击新增按钮时调用此方法 */ - add() { + add () { if (typeof this.addBefore === 'function') this.addBefore() // 默认新增空数据 let rowNum = this.addDefaultRowNum @@ -53,17 +53,17 @@ export const JVxeTableModelMixin = { console.warn('由于你没有在 data 中定义 addDefaultRowNum 或 addDefaultRowNum 不是数字,所以默认添加一条空数据,如果不想默认添加空数据,请将定义 addDefaultRowNum 为 0') } this.eachAllTable((item) => { - //update-begin-author:taoyan date:20210315 for: 一对多jvex 默认几行不好使了 LOWCOD-1349 - setTimeout(()=>{ + // update-begin-author:taoyan date:20210315 for: 一对多jvex 默认几行不好使了 LOWCOD-1349 + setTimeout(() => { item.addRows() }, 30) - //update-end-author:taoyan date:20210315 for: 一对多jvex 默认几行不好使了 LOWCOD-1349 + // update-end-author:taoyan date:20210315 for: 一对多jvex 默认几行不好使了 LOWCOD-1349 }) if (typeof this.addAfter === 'function') this.addAfter(this.model) this.edit(this.model) }, /** 当点击了编辑(修改)按钮时调用此方法 */ - edit(record) { + edit (record) { if (typeof this.editBefore === 'function') this.editBefore(record) this.visible = true this.activeKey = this.refKeys[0] @@ -72,7 +72,7 @@ export const JVxeTableModelMixin = { if (typeof this.editAfter === 'function') this.editAfter(this.model) }, /** 关闭弹窗,并将所有JVxeTable实例回归到初始状态 */ - close() { + close () { this.visible = false this.eachAllTable((item) => { item._remove() @@ -81,10 +81,10 @@ export const JVxeTableModelMixin = { }, /** 查询某个tab的数据 */ - requestSubTableData(url, params, tab, success) { + requestSubTableData (url, params, tab, success) { tab.loading = true getAction(url, params).then(res => { - let { result } = res + const { result } = res let dataSource = [] if (result) { if (Array.isArray(result)) { @@ -100,14 +100,14 @@ export const JVxeTableModelMixin = { }) }, /** 发起请求,自动判断是执行新增还是修改操作 */ - request(formData) { - let url = this.url.add, method = 'post' + request (formData) { + let url = this.url.add; let method = 'post' if (this.model.id) { url = this.url.edit method = 'put' } this.confirmLoading = true - console.log("formData===>",formData); + console.log('formData===>', formData) httpAction(url, formData, method).then((res) => { if (res.success) { this.$message.success(res.message) @@ -124,22 +124,22 @@ export const JVxeTableModelMixin = { /* --- handle 事件 --- */ /** ATab 选项卡切换事件 */ - handleChangeTabs(key) { + handleChangeTabs (key) { // 自动重置scrollTop状态,防止出现白屏 getRefPromise(this, key).then(vxeTable => { vxeTable.resetScrollTop() }) }, /** 关闭按钮点击事件 */ - handleCancel() { + handleCancel () { this.close() }, /** 确定按钮点击事件 */ - handleOk() { + handleOk () { /** 触发表单验证 */ this.getAllTable().then(tables => { /** 一次性验证主表和所有的次表 */ - return validateFormModelAndTables(this.$refs.form,this.model, tables) + return validateFormModelAndTables(this.$refs.form, this.model, tables) }).then(allValues => { /** 一次性验证一对一的所有子表 */ return this.validateSubForm(allValues) @@ -147,7 +147,7 @@ export const JVxeTableModelMixin = { if (typeof this.classifyIntoFormData !== 'function') { throw this.throwNotFunction('classifyIntoFormData') } - let formData = this.classifyIntoFormData(allValues) + const formData = this.classifyIntoFormData(allValues) // 发起请求 return this.request(formData) }).catch(e => { @@ -159,8 +159,8 @@ export const JVxeTableModelMixin = { } }) }, -//校验所有子表表单 - validateSubForm(allValues){ + // 校验所有子表表单 + validateSubForm (allValues) { return new Promise((resolve) => { resolve(allValues) }) @@ -168,14 +168,14 @@ export const JVxeTableModelMixin = { /* --- throw --- */ /** not a function */ - throwNotFunction(name) { + throwNotFunction (name) { return `${name} 未定义或不是一个函数` }, /** not a array */ - throwNotArray(name) { + throwNotArray (name) { return `${name} 未定义或不是一个数组` } } -} \ No newline at end of file +} diff --git a/jero-web/src/mixins/JeroListMixin.js b/jero-web/src/mixins/JeroListMixin.js index 948de25e..6bcfc4ab 100644 --- a/jero-web/src/mixins/JeroListMixin.js +++ b/jero-web/src/mixins/JeroListMixin.js @@ -3,315 +3,313 @@ * 高级查询按钮调用 superQuery方法 高级查询组件ref定义为superQueryModal * data中url定义 list为查询列表 delete为删除单条记录 deleteBatch为批量删除 */ -import { filterObj } from '@/utils/util'; -import { deleteAction, getAction,downFile,getFileAccessHttpUrl } from '@/api/manage' +import { filterObj } from '@/utils/util' +import { deleteAction, getAction, downFile, getFileAccessHttpUrl } from '@/api/manage' import Vue from 'vue' -import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types" +import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types' import store from '@/store' export const JeroListMixin = { - data(){ + data () { return { /* 查询条件-请不要在queryParam中声明非字符串值的属性 */ queryParam: {}, /* 数据源 */ - dataSource:[], + dataSource: [], /* 分页参数 */ - ipagination:{ + ipagination: { current: 1, pageSize: 10, pageSizeOptions: ['10', '20', '30'], showTotal: (total, range) => { - return range[0] + "-" + range[1] + " 共" + total + "条" + return range[0] + '-' + range[1] + ' 共' + total + '条' }, showQuickJumper: true, showSizeChanger: true, total: 0 }, /* 排序参数 */ - isorter:{ + isorter: { column: 'createTime', - order: 'desc', + order: 'desc' }, /* 筛选参数 */ filters: {}, /* table加载状态 */ - loading:false, - /* table选中keys*/ + loading: false, + /* table选中keys */ selectedRowKeys: [], - /* table选中records*/ + /* table选中records */ selectionRows: [], /* 查询折叠 */ - toggleSearchStatus:false, + toggleSearchStatus: false, /* 高级查询条件生效状态 */ - superQueryFlag:false, + superQueryFlag: false, /* 高级查询条件 */ superQueryParams: '', /** 高级查询拼接方式 */ - superQueryMatchType: 'and', + superQueryMatchType: 'and' } }, - created() { - if(!this.disableMixinCreated){ - this.loadData(); - //初始化字典配置 在自己页面定义 - this.initDictConfig(); - } + created () { + if (!this.disableMixinCreated) { + this.loadData() + // 初始化字典配置 在自己页面定义 + this.initDictConfig() + } }, computed: { - //token header - tokenHeader(){ - let head = {'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)} - let tenantid = Vue.ls.get(TENANT_ID) - if(tenantid){ + // token header + tokenHeader () { + const head = { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) } + const tenantid = Vue.ls.get(TENANT_ID) + if (tenantid) { head['tenant-id'] = tenantid } - return head; + return head } }, - methods:{ - loadData(arg) { - if(!this.url.list){ - this.$message.error("请设置url.list属性!") + methods: { + loadData (arg) { + if (!this.url.list) { + this.$message.error('请设置url.list属性!') return } - //加载数据 若传入参数1则加载第一页的内容 + // 加载数据 若传入参数1则加载第一页的内容 if (arg === 1) { - this.ipagination.current = 1; + this.ipagination.current = 1 } - var params = this.getQueryParams();//查询条件 - this.loading = true; + var params = this.getQueryParams()// 查询条件 + this.loading = true getAction(this.url.list, params).then((res) => { if (res.success) { - //update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ - this.dataSource = res.result.records||res.result; - if(res.result.total) - { - this.ipagination.total = res.result.total; - }else{ - this.ipagination.total = 0; + // update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ + this.dataSource = res.result.records || res.result + if (res.result.total) { + this.ipagination.total = res.result.total + } else { + this.ipagination.total = 0 } - //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ - }else{ + // update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ + } else { this.$message.warning(res.message) } }).finally(() => { this.loading = false }) }, - initDictConfig(){ + initDictConfig () { }, - handleSuperQuery(params, matchType) { - //高级查询方法 - if(!params){ - this.superQueryParams='' + handleSuperQuery (params, matchType) { + // 高级查询方法 + if (!params) { + this.superQueryParams = '' this.superQueryFlag = false - }else{ + } else { this.superQueryFlag = true - this.superQueryParams=JSON.stringify(params) + this.superQueryParams = JSON.stringify(params) this.superQueryMatchType = matchType } this.loadData(1) }, - getQueryParams() { - //获取查询条件 - let sqp = {} - if(this.superQueryParams){ - sqp['superQueryParams']=encodeURI(this.superQueryParams) - sqp['superQueryMatchType'] = this.superQueryMatchType + getQueryParams () { + // 获取查询条件 + const sqp = {} + if (this.superQueryParams) { + sqp.superQueryParams = encodeURI(this.superQueryParams) + sqp.superQueryMatchType = this.superQueryMatchType } - var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters); - param.field = this.getQueryField(); - param.pageNo = this.ipagination.current; - param.pageSize = this.ipagination.pageSize; - return filterObj(param); + var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters) + param.field = this.getQueryField() + param.pageNo = this.ipagination.current + param.pageSize = this.ipagination.pageSize + return filterObj(param) }, - getQueryField() { - //TODO 字段权限控制 - var str = "id,"; + getQueryField () { + // TODO 字段权限控制 + var str = 'id,' this.columns.forEach(function (value) { - str += "," + value.dataIndex; - }); - return str; + str += ',' + value.dataIndex + }) + return str }, - onSelectChange(selectedRowKeys, selectionRows) { - this.selectedRowKeys = selectedRowKeys; - this.selectionRows = selectionRows; + onSelectChange (selectedRowKeys, selectionRows) { + this.selectedRowKeys = selectedRowKeys + this.selectionRows = selectionRows }, - onClearSelected() { - this.selectedRowKeys = []; - this.selectionRows = []; + onClearSelected () { + this.selectedRowKeys = [] + this.selectionRows = [] }, - searchQuery() { - this.loadData(1); + searchQuery () { + this.loadData(1) // 点击查询清空列表选中行 this.selectedRowKeys = [] this.selectionRows = [] }, - superQuery() { - this.$refs.superQueryModal.show(); + superQuery () { + this.$refs.superQueryModal.show() }, - searchReset() { + searchReset () { this.queryParam = {} - this.loadData(1); + this.loadData(1) }, batchDel: function () { - if(!this.url.deleteBatch){ - this.$message.error("请设置url.deleteBatch属性!") + if (!this.url.deleteBatch) { + this.$message.error('请设置url.deleteBatch属性!') return } if (this.selectedRowKeys.length <= 0) { - this.$message.warning('请选择一条记录!'); - return; + this.$message.warning('请选择一条记录!') } else { - var ids = ""; + var ids = '' for (var a = 0; a < this.selectedRowKeys.length; a++) { - ids += this.selectedRowKeys[a] + ","; + ids += this.selectedRowKeys[a] + ',' } - var that = this; + var that = this this.$confirm({ - title: "确认删除", - content: "是否删除选中数据?", + title: '确认删除', + content: '是否删除选中数据?', onOk: function () { - that.loading = true; - deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { - if (res.success){ - //重新计算分页问题 + that.loading = true + deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => { + if (res.success) { + // 重新计算分页问题 that.reCalculatePage(that.selectedRowKeys.length) - that.$message.success(res.message); - that.loadData(); - that.onClearSelected(); + that.$message.success(res.message) + that.loadData() + that.onClearSelected() } else { - that.$message.warning(res.message); + that.$message.warning(res.message) } }).finally(() => { - that.loading = false; - }); + that.loading = false + }) } - }); + }) } }, handleDelete: function (id) { - if(!this.url.delete){ - this.$message.error("请设置url.delete属性!") + if (!this.url.delete) { + this.$message.error('请设置url.delete属性!') return } - var that = this; - deleteAction(that.url.delete, {id: id}).then((res) => { + var that = this + deleteAction(that.url.delete, { id: id }).then((res) => { if (res.success) { - //重新计算分页问题 + // 重新计算分页问题 that.reCalculatePage(1) - that.$message.success(res.message); - that.loadData(); + that.$message.success(res.message) + that.loadData() } else { - that.$message.warning(res.message); + that.$message.warning(res.message) } - }); + }) }, - reCalculatePage(count){ - //总数量-count - let total=this.ipagination.total-count; - //获取删除后的分页数 - let currentIndex=Math.ceil(total/this.ipagination.pageSize); - //删除后的分页数<所在当前页 - if(currentIndex 0) { - this.isorter.column = sorter.field; - this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" + this.isorter.column = sorter.field + this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc' } - this.ipagination = pagination; - this.loadData(); + this.ipagination = pagination + this.loadData() }, - handleToggleSearch(){ - this.toggleSearchStatus = !this.toggleSearchStatus; + handleToggleSearch () { + this.toggleSearchStatus = !this.toggleSearchStatus }, // 给popup查询使用(查询区域不支持回填多个字段,限制只返回一个字段) - getPopupField(fields){ + getPopupField (fields) { return fields.split(',')[0] }, - modalFormOk() { + modalFormOk () { // 新增/修改 成功时,重载列表 - this.loadData(); - //清空列表选中 + this.loadData() + // 清空列表选中 this.onClearSelected() }, - handleDetail:function(record){ - this.$refs.modalForm.edit(record); - this.$refs.modalForm.title="详情"; - this.$refs.modalForm.disableSubmit = true; + handleDetail: function (record) { + this.$refs.modalForm.edit(record) + this.$refs.modalForm.title = '详情' + this.$refs.modalForm.disableSubmit = true }, /* 导出 */ - handleExportXls2(){ - let paramsStr = encodeURI(JSON.stringify(this.getQueryParams())); - let url = `${window._CONFIG['domianURL']}/${this.url.exportXlsUrl}?paramsStr=${paramsStr}`; - window.location.href = url; + handleExportXls2 () { + const paramsStr = encodeURI(JSON.stringify(this.getQueryParams())) + const url = `${window._CONFIG.domianURL}/${this.url.exportXlsUrl}?paramsStr=${paramsStr}` + window.location.href = url }, - handleExportXls(fileName){ - if(!fileName || typeof fileName != "string"){ - fileName = "导出文件" + handleExportXls (fileName) { + if (!fileName || typeof fileName !== 'string') { + fileName = '导出文件' } - let param = this.getQueryParams(); - if(this.selectedRowKeys && this.selectedRowKeys.length>0){ - param['selections'] = this.selectedRowKeys.join(",") + const param = this.getQueryParams() + if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { + param.selections = this.selectedRowKeys.join(',') } - console.log("导出参数",param) - downFile(this.url.exportXlsUrl,param).then((data)=>{ + console.log('导出参数', param) + downFile(this.url.exportXlsUrl, param).then((data) => { if (!data) { - this.$message.warning("文件下载失败") + this.$message.warning('文件下载失败') return } if (typeof window.navigator.msSaveBlob !== 'undefined') { - window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls') - }else{ - let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'})) - let link = document.createElement('a') + window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls') + } else { + const url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' })) + const link = document.createElement('a') link.style.display = 'none' link.href = url - link.setAttribute('download', fileName+'.xls') + link.setAttribute('download', fileName + '.xls') document.body.appendChild(link) link.click() - document.body.removeChild(link); //下载完成移除元素 - window.URL.revokeObjectURL(url); //释放掉blob对象 + document.body.removeChild(link) // 下载完成移除元素 + window.URL.revokeObjectURL(url) // 释放掉blob对象 } }) }, /* 导入 */ - handleImportExcel(info){ - this.loading = true; + handleImportExcel (info) { + this.loading = true if (info.file.status !== 'uploading') { - console.log(info.file, info.fileList); + console.log(info.file, info.fileList) } if (info.file.status === 'done') { - this.loading = false; + this.loading = false if (info.file.response.success) { // this.$message.success(`${info.file.name} 文件上传成功`); if (info.file.response.code === 201) { - let { message, result: { msg, fileUrl, fileName } } = info.file.response - let href = window._CONFIG['domianURL'] + fileUrl + const { message, result: { msg, fileUrl, fileName } } = info.file.response + const href = window._CONFIG.domianURL + fileUrl this.$warning({ title: message, content: (
- {msg}
- 具体详情请
点击下载 -
+ {msg}
+ 具体详情请 点击下载 + ) }) } else { @@ -319,14 +317,14 @@ export const JeroListMixin = { } this.loadData() } else { - this.$message.error(`${info.file.name} ${info.file.response.message}.`); + this.$message.error(`${info.file.name} ${info.file.response.message}.`) } } else if (info.file.status === 'error') { - this.loading = false; + this.loading = false if (info.file.response.status === 500) { - let data = info.file.response + const data = info.file.response const token = Vue.ls.get(ACCESS_TOKEN) - if (token && data.message.includes("Token失效")) { + if (token && data.message.includes('Token失效')) { this.error({ title: '登录已过期', content: '很抱歉,登录已过期,请重新登录', @@ -335,36 +333,36 @@ export const JeroListMixin = { onOk: () => { store.dispatch('Logout').then(() => { Vue.ls.remove(ACCESS_TOKEN) - window.location.reload(); + window.location.reload() }) } }) } } else { - this.$message.error(`文件上传失败: ${info.file.msg} `); + this.$message.error(`文件上传失败: ${info.file.msg} `) } } }, /* 图片预览 */ - getImgView(text){ - if(text && text.indexOf(",")>0){ - text = text.substring(0,text.indexOf(",")) + getImgView (text) { + if (text && text.indexOf(',') > 0) { + text = text.substring(0, text.indexOf(',')) } return getFileAccessHttpUrl(text) }, /* 文件下载 */ // update--autor:lvdandan-----date:20200630------for:修改下载文件方法名uploadFile改为downloadFile------ - downloadFile(text){ - if(!text){ - this.$message.warning("未知的文件") - return; + downloadFile (text) { + if (!text) { + this.$message.warning('未知的文件') + return } - if(text.indexOf(",")>0){ - text = text.substring(0,text.indexOf(",")) + if (text.indexOf(',') > 0) { + text = text.substring(0, text.indexOf(',')) } - let url = getFileAccessHttpUrl(text) - window.open(url); - }, + const url = getFileAccessHttpUrl(text) + window.open(url) + } } -} \ No newline at end of file +} diff --git a/jero-web/src/mixins/OnlineCommonUtil.js b/jero-web/src/mixins/OnlineCommonUtil.js index 5ec8004e..ca05fcf2 100644 --- a/jero-web/src/mixins/OnlineCommonUtil.js +++ b/jero-web/src/mixins/OnlineCommonUtil.js @@ -3,26 +3,26 @@ import Area from '@/components/_util/Area' import { postAction } from '@/api/manage' const onlUtil = { - data(){ + data () { return { - mixin_pca:'', + mixin_pca: '', flowCodePre: 'onl_' } }, - created(){ + created () { this.mixin_pca = new Area(this.$Jpcaa) }, - methods:{ - simpleDateFormat(millisecond, format){ + methods: { + simpleDateFormat (millisecond, format) { return formatDate(millisecond, format) }, - getPcaText(code){ - return this.mixin_pca.getText(code); + getPcaText (code) { + return this.mixin_pca.getText(code) }, - getPcaCode(text){ + getPcaCode (text) { return this.mixin_pca.getCode(text) } } } -export { onlUtil } \ No newline at end of file +export { onlUtil } diff --git a/jero-web/src/mixins/WebsocketMixin.js b/jero-web/src/mixins/WebsocketMixin.js index ee03f8c7..2b6d4af0 100644 --- a/jero-web/src/mixins/WebsocketMixin.js +++ b/jero-web/src/mixins/WebsocketMixin.js @@ -3,61 +3,61 @@ import { ACCESS_TOKEN } from '@/store/mutation-types' import Vue from 'vue' export const WebsocketMixin = { - mounted() { - this.initWebSocket(); + mounted () { + this.initWebSocket() }, destroyed: function () { // 离开页面生命周期函数 - this.websocketOnclose(); + this.websocketOnclose() }, - methods:{ + methods: { initWebSocket: function () { - let token = Vue.ls.get(ACCESS_TOKEN) - console.log("------------WebSocket连接成功"); + const token = Vue.ls.get(ACCESS_TOKEN) + console.log('------------WebSocket连接成功') // WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https - var userId = store.getters.userInfo.id; - if(!this.socketUrl.startsWith('/')){ + var userId = store.getters.userInfo.id + if (!this.socketUrl.startsWith('/')) { this.socketUrl = '/' + this.socketUrl } - if(!this.socketUrl.endsWith('/')){ + if (!this.socketUrl.endsWith('/')) { this.socketUrl = this.socketUrl + '/' } - var url = window._CONFIG['domianURL'].replace("https://","wss://").replace("http://","ws://") + this.socketUrl + userId + "/" + token; - this.websock = new WebSocket(url); - this.websock.onopen = this.websocketOnopen; - this.websock.onerror = this.websocketOnerror; - this.websock.onmessage = this.websocketOnmessage; - this.websock.onclose = this.websocketOnclose; + var url = window._CONFIG.domianURL.replace('https://', 'wss://').replace('http://', 'ws://') + this.socketUrl + userId + '/' + token + this.websock = new WebSocket(url) + this.websock.onopen = this.websocketOnopen + this.websock.onerror = this.websocketOnerror + this.websock.onmessage = this.websocketOnmessage + this.websock.onclose = this.websocketOnclose }, websocketOnopen: function () { - console.log("WebSocket连接成功"); + console.log('WebSocket连接成功') }, websocketOnerror: function (e) { - console.log("WebSocket连接发生错误"); - this.reconnect(); + console.log('WebSocket连接发生错误') + this.reconnect() }, websocketOnclose: function (e) { - this.reconnect(); + this.reconnect() }, - websocketSend(text) { + websocketSend (text) { // 数据发送 try { - this.websock.send(text); + this.websock.send(text) } catch (err) { - console.log("send failed (" + err.code + ")"); + console.log('send failed (' + err.code + ')') } }, - reconnect() { - var that = this; - if(that.lockReconnect) return; - that.lockReconnect = true; - //没连接上会一直重连,设置延迟避免请求过多 + reconnect () { + var that = this + if (that.lockReconnect) return + that.lockReconnect = true + // 没连接上会一直重连,设置延迟避免请求过多 setTimeout(function () { - console.info("尝试重连..."); - that.initWebSocket(); - that.lockReconnect = false; - }, 5000); - }, + console.info('尝试重连...') + that.initWebSocket() + that.lockReconnect = false + }, 5000) + } } -} \ No newline at end of file +} diff --git a/jero-web/src/router/index.js b/jero-web/src/router/index.js index 791a550e..d43567f8 100644 --- a/jero-web/src/router/index.js +++ b/jero-web/src/router/index.js @@ -5,7 +5,7 @@ import { constantRouterMap } from '@/config/router.config' Vue.use(Router) const originalPush = Router.prototype.push -Router.prototype.push = function push(location, onResolve, onReject) { +Router.prototype.push = function push (location, onResolve, onReject) { if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject) return originalPush.call(this, location).catch(err => err) } @@ -15,4 +15,4 @@ export default new Router({ base: process.env.BASE_URL, scrollBehavior: () => ({ y: 0 }), routes: constantRouterMap -}) \ No newline at end of file +}) diff --git a/jero-web/src/store/getters.js b/jero-web/src/store/getters.js index 6e295d31..3ed4cbd6 100644 --- a/jero-web/src/store/getters.js +++ b/jero-web/src/store/getters.js @@ -1,20 +1,20 @@ import Vue from 'vue' -import { USER_INFO, ENHANCE_PRE } from "@/store/mutation-types" +import { USER_INFO, ENHANCE_PRE } from '@/store/mutation-types' const getters = { device: state => state.app.device, theme: state => state.app.theme, color: state => state.app.color, token: state => state.user.token, - avatar: state => {state.user.avatar = Vue.ls.get(USER_INFO).avatar; return state.user.avatar}, + avatar: state => { state.user.avatar = Vue.ls.get(USER_INFO).avatar; return state.user.avatar }, username: state => state.user.username, - nickname: state => {state.user.realname = Vue.ls.get(USER_INFO).realname; return state.user.realname}, + nickname: state => { state.user.realname = Vue.ls.get(USER_INFO).realname; return state.user.realname }, welcome: state => state.user.welcome, permissionList: state => state.user.permissionList, - userInfo: state => {state.user.info = Vue.ls.get(USER_INFO); return state.user.info}, + userInfo: state => { state.user.info = Vue.ls.get(USER_INFO); return state.user.info }, addRouters: state => state.permission.addRouters, - onlAuthFields: state => {return state.online.authFields }, - enhanceJs:(state) => (code) => { - state.enhance.enhanceJs[code] = Vue.ls.get(ENHANCE_PRE+code); + onlAuthFields: state => { return state.online.authFields }, + enhanceJs: (state) => (code) => { + state.enhance.enhanceJs[code] = Vue.ls.get(ENHANCE_PRE + code) return state.enhance.enhanceJs[code] } diff --git a/jero-web/src/store/index.js b/jero-web/src/store/index.js index c39de619..2108c5da 100644 --- a/jero-web/src/store/index.js +++ b/jero-web/src/store/index.js @@ -16,7 +16,7 @@ export default new Vuex.Store({ user, permission, enhance, - online, + online }, state: { diff --git a/jero-web/src/store/modules/app.js b/jero-web/src/store/modules/app.js index e7912e68..5010e878 100644 --- a/jero-web/src/store/modules/app.js +++ b/jero-web/src/store/modules/app.js @@ -10,7 +10,7 @@ import { DEFAULT_FIXED_HEADER_HIDDEN, DEFAULT_CONTENT_WIDTH_TYPE, DEFAULT_MULTI_PAGE -} from "@/store/mutation-types" +} from '@/store/mutation-types' const app = { state: { @@ -27,7 +27,7 @@ const app = { autoHideHeader: false, color: null, weak: false, - multipage: true //默认多页签模式 + multipage: true // 默认多页签模式 }, mutations: { SET_SIDEBAR_TYPE: (state, type) => { @@ -84,43 +84,43 @@ const app = { setSidebar: ({ commit }, type) => { commit('SET_SIDEBAR_TYPE', type) }, - CloseSidebar({ commit }, { withoutAnimation }) { + CloseSidebar ({ commit }, { withoutAnimation }) { commit('CLOSE_SIDEBAR', withoutAnimation) }, - ToggleDevice({ commit }, device) { + ToggleDevice ({ commit }, device) { commit('TOGGLE_DEVICE', device) }, - ToggleTheme({ commit }, theme) { + ToggleTheme ({ commit }, theme) { commit('TOGGLE_THEME', theme) }, - ToggleLayoutMode({ commit }, mode) { + ToggleLayoutMode ({ commit }, mode) { commit('TOGGLE_LAYOUT_MODE', mode) }, - ToggleFixedHeader({ commit }, fixedHeader) { + ToggleFixedHeader ({ commit }, fixedHeader) { if (!fixedHeader) { commit('TOGGLE_FIXED_HEADER_HIDDEN', false) } commit('TOGGLE_FIXED_HEADER', fixedHeader) }, - ToggleFixSiderbar({ commit }, fixSiderbar) { - commit( 'TOGGLE_FIXED_SIDERBAR', fixSiderbar) + ToggleFixSiderbar ({ commit }, fixSiderbar) { + commit('TOGGLE_FIXED_SIDERBAR', fixSiderbar) }, - ToggleFixedHeaderHidden({ commit }, show) { + ToggleFixedHeaderHidden ({ commit }, show) { commit('TOGGLE_FIXED_HEADER_HIDDEN', show) }, - ToggleContentWidth({ commit }, type) { + ToggleContentWidth ({ commit }, type) { commit('TOGGLE_CONTENT_WIDTH', type) }, - ToggleColor({ commit }, color) { + ToggleColor ({ commit }, color) { commit('TOGGLE_COLOR', color) }, - ToggleWeak({ commit }, weakFlag) { + ToggleWeak ({ commit }, weakFlag) { commit('TOGGLE_WEAK', weakFlag) }, - ToggleMultipage({ commit }, multipageFlag) { + ToggleMultipage ({ commit }, multipageFlag) { commit('SET_MULTI_PAGE', multipageFlag) } } } -export default app \ No newline at end of file +export default app diff --git a/jero-web/src/store/modules/enhance.js b/jero-web/src/store/modules/enhance.js index e7c254d8..eb8c11b7 100644 --- a/jero-web/src/store/modules/enhance.js +++ b/jero-web/src/store/modules/enhance.js @@ -1,37 +1,37 @@ import Vue from 'vue' const enhance = { state: { - enhanceJs:{ + enhanceJs: { } }, mutations: { ADD_TABLE_ENHANCE: (state, record) => { - if(!state.enhanceJs){ - let obj = {} - let arr = [] - arr.push({...record}) + if (!state.enhanceJs) { + const obj = {} + const arr = [] + arr.push({ ...record }) obj[record.code] = arr state.enhanceJs = obj - }else{ - if(!state.enhanceJs[record.code]){ - let arr = [] - arr.push({...record}) + } else { + if (!state.enhanceJs[record.code]) { + const arr = [] + arr.push({ ...record }) state.enhanceJs[record.code] = arr } - state.enhanceJs[record.code].push({...record}) + state.enhanceJs[record.code].push({ ...record }) } - let arr = state.enhanceJs[record.code] - while(arr.length>16){ + const arr = state.enhanceJs[record.code] + while (arr.length > 16) { arr.shift() } - Vue.ls.set('enhance_'+record['code'], arr) + Vue.ls.set('enhance_' + record.code, arr) } }, actions: { - addEhanceRecord({ commit }, record) { + addEhanceRecord ({ commit }, record) { commit('ADD_TABLE_ENHANCE', record) } } } -export default enhance \ No newline at end of file +export default enhance diff --git a/jero-web/src/store/modules/online.js b/jero-web/src/store/modules/online.js index de6b26ff..f2f74410 100644 --- a/jero-web/src/store/modules/online.js +++ b/jero-web/src/store/modules/online.js @@ -1,25 +1,24 @@ import Vue from 'vue' -import { ONL_AUTH_FIELDS } from "@/store/mutation-types" +import { ONL_AUTH_FIELDS } from '@/store/mutation-types' import { getAction } from '@/api/manage' - const online = { state: { - //存储对象属性 value,text - authFields: [], + // 存储对象属性 value,text + authFields: [] }, mutations: { SET_AUTHFIELDS: (state, fields) => { - console.log('fields',fields) + console.log('fields', fields) Vue.set(state, 'authFields', fields) } }, actions: { // TODO 如果没找到可以尝试请求一下 - xxxxxx({ commit }, userInfo) { + xxxxxx ({ commit }, userInfo) { } } } -export default online \ No newline at end of file +export default online diff --git a/jero-web/src/store/modules/permission.js b/jero-web/src/store/modules/permission.js index 0f9d7207..9077d122 100644 --- a/jero-web/src/store/modules/permission.js +++ b/jero-web/src/store/modules/permission.js @@ -1,4 +1,4 @@ -import { asyncRouterMap, constantRouterMap } from "@/config/router.config" +import { asyncRouterMap, constantRouterMap } from '@/config/router.config' /** * 过滤账户是否拥有某一个权限,并将菜单从加载列表移除 @@ -7,7 +7,7 @@ import { asyncRouterMap, constantRouterMap } from "@/config/router.config" * @param route * @returns {boolean} */ -function hasPermission(permission, route) { +function hasPermission (permission, route) { if (route.meta && route.meta.permission) { let flag = -1 for (let i = 0, len = permission.length; i < len; i++) { @@ -37,7 +37,7 @@ function hasRole(roles, route) { } } -function filterAsyncRouter(routerMap, roles) { +function filterAsyncRouter (routerMap, roles) { const accessedRouters = routerMap.filter(route => { if (hasPermission(roles.permissionList, route)) { if (route.children && route.children.length) { @@ -50,7 +50,6 @@ function filterAsyncRouter(routerMap, roles) { return accessedRouters } - const permission = { state: { routers: constantRouterMap, @@ -63,7 +62,7 @@ const permission = { } }, actions: { - GenerateRoutes({ commit }, data) { + GenerateRoutes ({ commit }, data) { return new Promise(resolve => { const { roles } = data let accessedRouters @@ -73,10 +72,10 @@ const permission = { }) }, // 动态添加主界面路由,需要缓存 - UpdateAppRouter({ commit }, routes) { + UpdateAppRouter ({ commit }, routes) { return new Promise(resolve => { - //const [ roles ] = routes.constRoutes - let routelist = routes.constRoutes; + // const [ roles ] = routes.constRoutes + const routelist = routes.constRoutes commit('SET_ROUTERS', routelist) resolve() }) @@ -84,4 +83,4 @@ const permission = { } } -export default permission \ No newline at end of file +export default permission diff --git a/jero-web/src/store/modules/user.js b/jero-web/src/store/modules/user.js index 882a431e..27135a08 100644 --- a/jero-web/src/store/modules/user.js +++ b/jero-web/src/store/modules/user.js @@ -1,8 +1,8 @@ import Vue from 'vue' -import { login, logout, phoneLogin, thirdLogin } from "@/api/login" -import { ACCESS_TOKEN, USER_NAME,USER_INFO,USER_AUTH,SYS_BUTTON_AUTH,UI_CACHE_DB_DICT_DATA,TENANT_ID,CACHE_INCLUDED_ROUTES } from "@/store/mutation-types" +import { login, logout, phoneLogin, thirdLogin } from '@/api/login' +import { ACCESS_TOKEN, USER_NAME, USER_INFO, USER_AUTH, SYS_BUTTON_AUTH, UI_CACHE_DB_DICT_DATA, TENANT_ID, CACHE_INCLUDED_ROUTES } from '@/store/mutation-types' import store from '@/store' -import { welcome } from "@/utils/util" +import { welcome } from '@/utils/util' import { queryPermissionsByUser } from '@/api/api' import { getAction } from '@/api/manage' import notification from 'ant-design-vue/lib/notification' @@ -12,7 +12,7 @@ const user = { token: '', username: '', realname: '', - tenantid:'', + tenantid: '', welcome: '', avatar: '', permissionList: [], @@ -39,16 +39,16 @@ const user = { }, SET_TENANT: (state, id) => { state.tenantid = id - }, + } }, actions: { // CAS验证登录 - ValidateLogin({ commit }, userInfo) { + ValidateLogin ({ commit }, userInfo) { return new Promise((resolve, reject) => { - getAction("/sys/cas/client/validateLogin",userInfo).then(response => { - console.log("----cas 登录--------",response); - if(response.success){ + getAction('/sys/cas/client/validateLogin', userInfo).then(response => { + console.log('----cas 登录--------', response) + if (response.success) { const result = response.result const userInfo = result.userInfo Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000) @@ -56,10 +56,10 @@ const user = { Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000) commit('SET_TOKEN', result.token) commit('SET_INFO', userInfo) - commit('SET_NAME', { username: userInfo.username,realname: userInfo.realname, welcome: welcome() }) + commit('SET_NAME', { username: userInfo.username, realname: userInfo.realname, welcome: welcome() }) commit('SET_AVATAR', userInfo.avatar) resolve(response) - }else{ + } else { resolve(response) } }).catch(error => { @@ -68,10 +68,10 @@ const user = { }) }, // 登录 - Login({ commit }, userInfo) { + Login ({ commit }, userInfo) { return new Promise((resolve, reject) => { login(userInfo).then(response => { - if(response.code =='200'){ + if (response.code == '200') { const result = response.result const userInfo = result.userInfo Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000) @@ -80,65 +80,65 @@ const user = { Vue.ls.set(UI_CACHE_DB_DICT_DATA, result.sysAllDictItems, 7 * 24 * 60 * 60 * 1000) commit('SET_TOKEN', result.token) commit('SET_INFO', userInfo) - commit('SET_NAME', { username: userInfo.username,realname: userInfo.realname, welcome: welcome() }) + commit('SET_NAME', { username: userInfo.username, realname: userInfo.realname, welcome: welcome() }) commit('SET_AVATAR', userInfo.avatar) resolve(response) - }else{ - reject(response) + } else { + reject(response) } }).catch(error => { - reject(error) + reject(error) }) }) }, - //手机号登录 - PhoneLogin({ commit }, userInfo) { + // 手机号登录 + PhoneLogin ({ commit }, userInfo) { return new Promise((resolve, reject) => { - phoneLogin(userInfo).then(response => { - if(response.code =='200'){ - const result = response.result - const userInfo = result.userInfo - Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000) - Vue.ls.set(USER_NAME, userInfo.username, 7 * 24 * 60 * 60 * 1000) - Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000) - Vue.ls.set(UI_CACHE_DB_DICT_DATA, result.sysAllDictItems, 7 * 24 * 60 * 60 * 1000) - commit('SET_TOKEN', result.token) - commit('SET_INFO', userInfo) - commit('SET_NAME', { username: userInfo.username,realname: userInfo.realname, welcome: welcome() }) - commit('SET_AVATAR', userInfo.avatar) - resolve(response) - }else{ - reject(response) - } - }).catch(error => { - reject(error) + phoneLogin(userInfo).then(response => { + if (response.code == '200') { + const result = response.result + const userInfo = result.userInfo + Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000) + Vue.ls.set(USER_NAME, userInfo.username, 7 * 24 * 60 * 60 * 1000) + Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000) + Vue.ls.set(UI_CACHE_DB_DICT_DATA, result.sysAllDictItems, 7 * 24 * 60 * 60 * 1000) + commit('SET_TOKEN', result.token) + commit('SET_INFO', userInfo) + commit('SET_NAME', { username: userInfo.username, realname: userInfo.realname, welcome: welcome() }) + commit('SET_AVATAR', userInfo.avatar) + resolve(response) + } else { + reject(response) + } + }).catch(error => { + reject(error) + }) }) - }) }, // 获取用户信息 - GetPermissionList({ commit }) { + GetPermissionList ({ commit }) { return new Promise((resolve, reject) => { queryPermissionsByUser().then(response => { - const menuData = response.result.menu; - const authData = response.result.auth; - const allAuthData = response.result.allAuth; - //Vue.ls.set(USER_AUTH,authData); - sessionStorage.setItem(USER_AUTH,JSON.stringify(authData)); - sessionStorage.setItem(SYS_BUTTON_AUTH,JSON.stringify(allAuthData)); + const menuData = response.result.menu + const authData = response.result.auth + const allAuthData = response.result.allAuth + // Vue.ls.set(USER_AUTH,authData); + sessionStorage.setItem(USER_AUTH, JSON.stringify(authData)) + sessionStorage.setItem(SYS_BUTTON_AUTH, JSON.stringify(allAuthData)) if (menuData && menuData.length > 0) { - //update--begin--autor:qinfeng-----date:20200109------for: 一级菜单的子菜单全部是隐藏路由,则一级菜单不显示------ + // update--begin--autor:qinfeng-----date:20200109------for: 一级菜单的子菜单全部是隐藏路由,则一级菜单不显示------ menuData.forEach((item, index) => { - if (item["children"]) { - let hasChildrenMenu = item["children"].filter((i) => { + if (item.children) { + const hasChildrenMenu = item.children.filter((i) => { return !i.hidden || i.hidden == false }) if (hasChildrenMenu == null || hasChildrenMenu.length == 0) { - item["hidden"] = true + item.hidden = true } } }) - //console.log(" menu show json ", menuData) - //update--end--autor:qinfeng-----date:20200109------for: 一级菜单的子菜单全部是隐藏路由,则一级菜单不显示------ + // console.log(" menu show json ", menuData) + // update--end--autor:qinfeng-----date:20200109------for: 一级菜单的子菜单全部是隐藏路由,则一级菜单不显示------ commit('SET_PERMISSIONLIST', menuData) } else { Vue.prototype.$Jmodal.error({ @@ -160,9 +160,9 @@ const user = { }, // 登出 - Logout({ commit, state }) { + Logout ({ commit, state }) { return new Promise((resolve) => { - let logoutToken = state.token; + const logoutToken = state.token commit('SET_TOKEN', '') commit('SET_PERMISSIONLIST', []) Vue.ls.remove(ACCESS_TOKEN) @@ -171,25 +171,25 @@ const user = { Vue.ls.remove(UI_CACHE_DB_DICT_DATA) Vue.ls.remove(CACHE_INCLUDED_ROUTES) Vue.ls.remove(TENANT_ID) - //console.log('logoutToken: '+ logoutToken) + // console.log('logoutToken: '+ logoutToken) logout(logoutToken).then(() => { if (process.env.VUE_APP_SSO == 'true') { - let sevice = 'http://' + window.location.host + '/' - let serviceUrl = encodeURIComponent(sevice) + const sevice = 'http://' + window.location.host + '/' + const serviceUrl = encodeURIComponent(sevice) window.location.href = process.env.VUE_APP_CAS_BASE_URL + '/logout?service=' + serviceUrl } resolve() - window.location.replace("/user/login") + window.location.replace('/user/login') }).catch(() => { resolve() }) }) }, // 第三方登录 - ThirdLogin({ commit }, param) { + ThirdLogin ({ commit }, param) { return new Promise((resolve, reject) => { - thirdLogin(param.token,param.thirdType).then(response => { - if(response.code =='200'){ + thirdLogin(param.token, param.thirdType).then(response => { + if (response.code == '200') { const result = response.result const userInfo = result.userInfo Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000) @@ -197,10 +197,10 @@ const user = { Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000) commit('SET_TOKEN', result.token) commit('SET_INFO', userInfo) - commit('SET_NAME', { username: userInfo.username,realname: userInfo.realname, welcome: welcome() }) + commit('SET_NAME', { username: userInfo.username, realname: userInfo.realname, welcome: welcome() }) commit('SET_AVATAR', userInfo.avatar) resolve(response) - }else{ + } else { reject(response) } }).catch(error => { @@ -208,13 +208,12 @@ const user = { }) }) }, - saveTenant({ commit }, id){ + saveTenant ({ commit }, id) { Vue.ls.set(TENANT_ID, id, 7 * 24 * 60 * 60 * 1000) commit('SET_TENANT', id) } - } } -export default user \ No newline at end of file +export default user diff --git a/jero-web/src/store/mutation-types.js b/jero-web/src/store/mutation-types.js index fee0f7fa..291fccd8 100644 --- a/jero-web/src/store/mutation-types.js +++ b/jero-web/src/store/mutation-types.js @@ -5,7 +5,7 @@ export const DEFAULT_LAYOUT_MODE = 'DEFAULT_LAYOUT_MODE' export const DEFAULT_COLOR = 'DEFAULT_COLOR' export const DEFAULT_COLOR_WEAK = 'DEFAULT_COLOR_WEAK' export const DEFAULT_FIXED_HEADER = 'DEFAULT_FIXED_HEADER' -export const DEFAULT_FIXED_SIDEMENU= 'DEFAULT_FIXED_SIDEMENU' +export const DEFAULT_FIXED_SIDEMENU = 'DEFAULT_FIXED_SIDEMENU' export const DEFAULT_FIXED_HEADER_HIDDEN = 'DEFAULT_FIXED_HEADER_HIDDEN' export const DEFAULT_CONTENT_WIDTH_TYPE = 'DEFAULT_CONTENT_WIDTH_TYPE' export const DEFAULT_MULTI_PAGE = 'DEFAULT_MULTI_PAGE' @@ -20,9 +20,9 @@ export const INDEX_MAIN_PAGE_PATH = '/dashboard/analysis' export const OAUTH2_LOGIN_PAGE_PATH = '/oauth2-app/login' export const TENANT_ID = 'TENANT_ID' export const ONL_AUTH_FIELDS = 'ONL_AUTH_FIELDS' -//路由缓存问题,关闭了tab页时再打开就不刷新 #842 +// 路由缓存问题,关闭了tab页时再打开就不刷新 #842 export const CACHE_INCLUDED_ROUTES = 'CACHE_INCLUDED_ROUTES' export const CONTENT_WIDTH_TYPE = { Fluid: 'Fluid', Fixed: 'Fixed' -} \ No newline at end of file +} diff --git a/jero-web/src/utils/JEditableTableUtil.js b/jero-web/src/utils/JEditableTableUtil.js index 53ddabc5..4e812a9d 100644 --- a/jero-web/src/utils/JEditableTableUtil.js +++ b/jero-web/src/utils/JEditableTableUtil.js @@ -11,13 +11,13 @@ const FormTypes = { upload: 'upload', file: 'file', image: 'image', - popup:'popup', - list_multi:"list_multi", - sel_search:"sel_search", - sel_search_async:"sel_search_async", - radio:'radio', - checkbox_meta:"checkbox_meta", - input_pop:'input_pop', + popup: 'popup', + list_multi: 'list_multi', + sel_search: 'sel_search', + sel_search_async: 'sel_search_async', + radio: 'radio', + checkbox_meta: 'checkbox_meta', + input_pop: 'input_pop', sel_depart: 'sel_depart', sel_user: 'sel_user', slot: 'slot', @@ -32,10 +32,10 @@ export { FormTypes, VALIDATE_NO_PASSED } * 这个方法可以等待挂载完成之后再返回 $refs 的对象,避免报错 * @author sunjianlei **/ -export function getRefPromise(vm, name) { +export function getRefPromise (vm, name) { return new Promise((resolve) => { - (function next() { - let ref = vm.$refs[name] + (function next () { + const ref = vm.$refs[name] if (ref) { resolve(ref) } else { @@ -54,13 +54,12 @@ export function getRefPromise(vm, name) { * @returns {Promise} * @author sunjianlei */ -export function validateFormAndTables(form, cases) { - +export function validateFormAndTables (form, cases) { if (!(form && typeof form.validateFields === 'function')) { throw `form 参数需要的是一个form对象,而传入的却是${typeof form}` } - let options = {} + const options = {} return new Promise((resolve, reject) => { // 验证主表表单 form.validateFields((err, values) => { @@ -76,7 +75,6 @@ export function validateFormAndTables(form, cases) { }).catch(error => { return Promise.reject(error) }) - } /** @@ -86,16 +84,15 @@ export function validateFormAndTables(form, cases) { * @returns {Promise} * @author sunjianlei */ -export function validateFormModelAndTables(form,values, cases) { - +export function validateFormModelAndTables (form, values, cases) { if (!(form && typeof form.validate === 'function')) { throw `form 参数需要的是一个form对象,而传入的却是${typeof form}` } - let options = {} + const options = {} return new Promise((resolve, reject) => { // 验证主表表单 - form.validate((valid,obj) => { - valid ?resolve(values):reject({ error: VALIDATE_NO_PASSED }) + form.validate((valid, obj) => { + valid ? resolve(values) : reject({ error: VALIDATE_NO_PASSED }) }) }).then(values => { Object.assign(options, { formValue: values }) @@ -107,7 +104,6 @@ export function validateFormModelAndTables(form,values, cases) { }).catch(error => { return Promise.reject(error) }) - } /** @@ -116,39 +112,41 @@ export function validateFormModelAndTables(form,values, cases) { * @param deleteTempId 是否删除临时ID,如果设为true,行编辑就不返回新增行的ID,ID需要后台生成 * @author sunjianlei */ -export function validateTables(cases, deleteTempId) { +export function validateTables (cases, deleteTempId) { if (!(cases instanceof Array)) { throw `'validateTables'函数的'cases'参数需要的是一个数组,而传入的却是${typeof cases}` } return new Promise((resolve, reject) => { - let tables = [] - let index = 0; - if(!cases || cases.length === 0){ + const tables = [] + let index = 0 + if (!cases || cases.length === 0) { resolve() } - (function next() { - let vm = cases[index] + (function next () { + const vm = cases[index] vm.getAll(true, deleteTempId).then(all => { tables[index] = all // 判断校验是否全部完成,完成返回成功,否则继续进行下一步校验 if (++index === cases.length) { resolve(tables) - } else ( - next() - ) + } else { + ( + next() + ) + } }, error => { // 出现未验证通过的表单,不再进行下一步校验,直接返回失败并跳转到该表格 if (error === VALIDATE_NO_PASSED) { // 尝试获取tabKey,如果在ATab组件内即可获取 - let paneKey; - let tabPane = getVmParentByName(vm, 'ATabPane') + let paneKey + const tabPane = getVmParentByName(vm, 'ATabPane') if (tabPane) { paneKey = tabPane.$vnode.key } - reject({error: VALIDATE_NO_PASSED, index, paneKey}) + reject({ error: VALIDATE_NO_PASSED, index, paneKey }) } reject(error) }) })() }) -} \ No newline at end of file +} diff --git a/jero-web/src/utils/LunarFullCalendarUtil.js b/jero-web/src/utils/LunarFullCalendarUtil.js index e68eb633..996753dd 100644 --- a/jero-web/src/utils/LunarFullCalendarUtil.js +++ b/jero-web/src/utils/LunarFullCalendarUtil.js @@ -11,10 +11,10 @@ import { getRefPromise } from '@/utils/JEditableTableUtil' /* 日历的视图类型 */ const calendarViewType = { month: 'month', // 月视图 - basicWeek: 'basicWeek', // 基础周视图 - basicDay: 'basicDay',// 基础天视图 + basicWeek: 'basicWeek', // 基础周视图 + basicDay: 'basicDay', // 基础天视图 agendaWeek: 'agendaWeek', // 议程周视图 - agendaDay: 'agendaDay', // 议程天视图 + agendaDay: 'agendaDay' // 议程天视图 } /* 定义默认视图 */ @@ -36,7 +36,7 @@ const defaultSettings = { center: 'title', right: 'hide, custom, month,agendaWeek,agendaDay' }, - //点击今天日列表图 + // 点击今天日列表图 eventLimitClick: 'day', // 隐藏超出的事件 eventLimit: true, @@ -55,25 +55,25 @@ const defaultSettings = { // 周视图和日视同的左侧时间显示 slotLabelFormat: 'HH:mm', // 设置第二天阈值 - nextDayThreshold: '00:00:00', + nextDayThreshold: '00:00:00' } /** 提供了一些增强方法 */ const CalendarMixins = { - data() { + data () { return { calenderCurrentViewType: defaultView } }, methods: { - getCalendarConfigEventHandler() { + getCalendarConfigEventHandler () { return { // 处理 view changed 事件 viewRender: (view, element) => { - let { type } = view + const { type } = view - let lastViewType = this.calenderCurrentViewType + const lastViewType = this.calenderCurrentViewType this.calenderCurrentViewType = type if (typeof this.handleViewRender === 'function') { @@ -83,25 +83,24 @@ const CalendarMixins = { if (lastViewType !== this.calenderCurrentViewType && typeof this.handleViewChanged === 'function') { this.handleViewChanged(type, view, element) } - - }, + } } }, /** 获取 LunarFullCalendar 实例,ref = baseCalendar */ - getCalendar(fn) { + getCalendar (fn) { return getRefPromise(this, 'baseCalendar').then(fn) }, - calendarEmit(name, data) { + calendarEmit (name, data) { this.getCalendar(ref => ref.$emit(name, data)) }, - /** 强制重新加载所有的事件(日程)*/ - calendarReloadEvents() { + /** 强制重新加载所有的事件(日程) */ + calendarReloadEvents () { this.calendarEmit('reload-events') } } } -export { defaultSettings, calendarViewType, CalendarMixins } \ No newline at end of file +export { defaultSettings, calendarViewType, CalendarMixins } diff --git a/jero-web/src/utils/authFilter.js b/jero-web/src/utils/authFilter.js index 25685b4b..b1baacdc 100644 --- a/jero-web/src/utils/authFilter.js +++ b/jero-web/src/utils/authFilter.js @@ -1,121 +1,118 @@ -import { USER_AUTH,SYS_BUTTON_AUTH } from "@/store/mutation-types" +import { USER_AUTH, SYS_BUTTON_AUTH } from '@/store/mutation-types' -export function disabledAuthFilter(code,formData) { - if(nodeDisabledAuth(code,formData)){ - return true; - }else{ - return globalDisabledAuth(code); +export function disabledAuthFilter (code, formData) { + if (nodeDisabledAuth(code, formData)) { + return true + } else { + return globalDisabledAuth(code) } } -function nodeDisabledAuth(code,formData){ - let permissionList = []; +function nodeDisabledAuth (code, formData) { + let permissionList = [] try { if (formData) { - let bpmList = formData.permissionList; - permissionList = bpmList.filter(item=>item.type=='2') + const bpmList = formData.permissionList + permissionList = bpmList.filter(item => item.type == '2') // for (let bpm of bpmList) { // if(bpm.type == '2') { // permissionList.push(bpm); // } // } - }else{ - return false; + } else { + return false } } catch (e) { - //console.log("页面权限异常----", e); + // console.log("页面权限异常----", e); } - if (permissionList.length == 0) { - return false; + if (permissionList.length == 0) { + return false } - console.log("流程节点页面权限禁用--NODE--开始"); - let permissions = []; - for (let item of permissionList) { - if(item.type == '2') { - permissions.push(item.action); + console.log('流程节点页面权限禁用--NODE--开始') + const permissions = [] + for (const item of permissionList) { + if (item.type == '2') { + permissions.push(item.action) } } - //console.log("页面权限----"+code); + // console.log("页面权限----"+code); if (!permissions.includes(code)) { - return false; - }else{ - for (let item2 of permissionList) { - if(code === item2.action){ - console.log("流程节点页面权限禁用--NODE--生效"); - return true; + return false + } else { + for (const item2 of permissionList) { + if (code === item2.action) { + console.log('流程节点页面权限禁用--NODE--生效') + return true } } } - return false; + return false } -function globalDisabledAuth(code){ +function globalDisabledAuth (code) { + const permissionList = [] + const allPermissionList = [] - let permissionList = []; - let allPermissionList = []; - - //let authList = Vue.ls.get(USER_AUTH); - let authList = JSON.parse(sessionStorage.getItem(USER_AUTH) || "[]"); - for (let auth of authList) { - if(auth.type == '2') { - permissionList.push(auth); + // let authList = Vue.ls.get(USER_AUTH); + const authList = JSON.parse(sessionStorage.getItem(USER_AUTH) || '[]') + for (const auth of authList) { + if (auth.type == '2') { + permissionList.push(auth) } } - //console.log("页面禁用权限--Global--",sessionStorage.getItem(SYS_BUTTON_AUTH)); - let allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || "[]"); - for (let gauth of allAuthList) { - if(gauth.type == '2') { - allPermissionList.push(gauth); + // console.log("页面禁用权限--Global--",sessionStorage.getItem(SYS_BUTTON_AUTH)); + const allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || '[]') + for (const gauth of allAuthList) { + if (gauth.type == '2') { + allPermissionList.push(gauth) } } - //设置全局配置是否有命中 - let gFlag = false;//禁用命中 - let invalidFlag = false;//无效命中 - if(allPermissionList != null && allPermissionList != "" && allPermissionList != undefined && allPermissionList.length > 0){ - for (let itemG of allPermissionList) { - if(code === itemG.action){ - if(itemG.status == '0'){ - invalidFlag = true; - break; - }else{ - gFlag = true; - break; + // 设置全局配置是否有命中 + let gFlag = false// 禁用命中 + let invalidFlag = false// 无效命中 + if (allPermissionList != null && allPermissionList != '' && allPermissionList != undefined && allPermissionList.length > 0) { + for (const itemG of allPermissionList) { + if (code === itemG.action) { + if (itemG.status == '0') { + invalidFlag = true + break + } else { + gFlag = true + break } } } } - if(invalidFlag){ - return false; + if (invalidFlag) { + return false } - if (permissionList === null || permissionList === "" || permissionList === undefined||permissionList.length<=0) { - return gFlag; + if (permissionList === null || permissionList === '' || permissionList === undefined || permissionList.length <= 0) { + return gFlag } - let permissions = []; - for (let item of permissionList) { - if(item.type == '2') { - permissions.push(item.action); + const permissions = [] + for (const item of permissionList) { + if (item.type == '2') { + permissions.push(item.action) } } - //console.log("页面禁用权限----"+code); + // console.log("页面禁用权限----"+code); if (!permissions.includes(code)) { - return gFlag; - }else{ - for (let item2 of permissionList) { - if(code === item2.action){ - gFlag = false; + return gFlag + } else { + for (const item2 of permissionList) { + if (code === item2.action) { + gFlag = false } } - return gFlag; + return gFlag } } - - -export function colAuthFilter(columns,pre) { - let authList = getNoAuthCols(pre); +export function colAuthFilter (columns, pre) { + const authList = getNoAuthCols(pre) const cols = columns.filter(item => { - if (hasColoum(item,authList)) { + if (hasColoum(item, authList)) { return true } return false @@ -131,27 +128,27 @@ export function colAuthFilter(columns,pre) { * @param pre * @returns {*} */ -export function colAuthFilterJEditableTable(columns,pre) { - let authList = getAllShowAndDisabledAuthCols(pre); +export function colAuthFilterJEditableTable (columns, pre) { + const authList = getAllShowAndDisabledAuthCols(pre) const cols = columns.filter(item => { let oneAuth = authList.find(auth => { - return auth.action === pre + item.key; - }); - if(!oneAuth){ + return auth.action === pre + item.key + }) + if (!oneAuth) { return true } - //代码严谨处理,防止一个授权标识,配置多次 - if(oneAuth instanceof Array){ + // 代码严谨处理,防止一个授权标识,配置多次 + if (oneAuth instanceof Array) { oneAuth = oneAuth[0] } - //禁用逻辑 + // 禁用逻辑 if (oneAuth.type == '2' && !oneAuth.isAuth) { - item["disabled"] = true + item.disabled = true return true } - //隐藏逻辑逻辑 + // 隐藏逻辑逻辑 if (oneAuth.type == '1' && !oneAuth.isAuth) { return false } @@ -160,81 +157,78 @@ export function colAuthFilterJEditableTable(columns,pre) { return cols } - -function hasColoum(item,authList){ +function hasColoum (item, authList) { if (authList.includes(item.dataIndex)) { return false } return true } -//权限无效时不做控制,有效时控制,只能控制 显示不显示 -//根据授权码前缀获取未授权的列信息 -export function getNoAuthCols(pre){ - if(!pre || pre.length==0){ +// 权限无效时不做控制,有效时控制,只能控制 显示不显示 +// 根据授权码前缀获取未授权的列信息 +export function getNoAuthCols (pre) { + if (!pre || pre.length == 0) { return [] } - let permissionList = []; - let allPermissionList = []; + const permissionList = [] + const allPermissionList = [] - //let authList = Vue.ls.get(USER_AUTH); - let authList = JSON.parse(sessionStorage.getItem(USER_AUTH) || "[]"); - for (let auth of authList) { - //显示策略,有效状态 - if(auth.type == '1'&&startWith(auth.action,pre)) { - permissionList.push(substrPre(auth.action,pre)); + // let authList = Vue.ls.get(USER_AUTH); + const authList = JSON.parse(sessionStorage.getItem(USER_AUTH) || '[]') + for (const auth of authList) { + // 显示策略,有效状态 + if (auth.type == '1' && startWith(auth.action, pre)) { + permissionList.push(substrPre(auth.action, pre)) } } - //console.log("页面禁用权限--Global--",sessionStorage.getItem(SYS_BUTTON_AUTH)); - let allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || "[]"); - for (let gauth of allAuthList) { - //显示策略,有效状态 - if(gauth.type == '1'&&gauth.status == '1'&&startWith(gauth.action,pre)) { - allPermissionList.push(substrPre(gauth.action,pre)); + // console.log("页面禁用权限--Global--",sessionStorage.getItem(SYS_BUTTON_AUTH)); + const allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || '[]') + for (const gauth of allAuthList) { + // 显示策略,有效状态 + if (gauth.type == '1' && gauth.status == '1' && startWith(gauth.action, pre)) { + allPermissionList.push(substrPre(gauth.action, pre)) } } const cols = allPermissionList.filter(item => { if (permissionList.includes(item)) { - return false; + return false } - return true; + return true }) - return cols; + return cols } /** * 将Online的行编辑按钮权限,添加至本地存储 */ -export function addOnlineBtAuth2Storage(pre, authList){ - let allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || "[]"); - let newAuthList = allAuthList.filter(item=>{ - if(!item.action){ +export function addOnlineBtAuth2Storage (pre, authList) { + const allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || '[]') + const newAuthList = allAuthList.filter(item => { + if (!item.action) { return true } - return item.action.indexOf(pre)<0 + return item.action.indexOf(pre) < 0 }) - if(authList && authList.length>0){ - for(let item of authList){ + if (authList && authList.length > 0) { + for (const item of authList) { newAuthList.push({ - action: pre+item, - type:1, - status:1 + action: pre + item, + type: 1, + status: 1 }) } - let temp = JSON.parse(sessionStorage.getItem(USER_AUTH) || "[]"); - let newArr = temp.filter(item=>{ - if(!item.action){ + const temp = JSON.parse(sessionStorage.getItem(USER_AUTH) || '[]') + const newArr = temp.filter(item => { + if (!item.action) { return true } - return item.action.indexOf(pre)<0 || authList.indexOf(item.action.replace(pre, ''))<0 + return item.action.indexOf(pre) < 0 || authList.indexOf(item.action.replace(pre, '')) < 0 }) sessionStorage.setItem(USER_AUTH, JSON.stringify(newArr)) } sessionStorage.setItem(SYS_BUTTON_AUTH, JSON.stringify(newAuthList)) } - - /** * 额外增加方法【用于行编辑组件】 * date: 2020-04-05 @@ -242,32 +236,28 @@ export function addOnlineBtAuth2Storage(pre, authList){ * @param pre * @returns {*[]} */ -function getAllShowAndDisabledAuthCols(pre){ - //用户拥有的权限 - let userAuthList = JSON.parse(sessionStorage.getItem(USER_AUTH) || "[]"); - //全部权限配置 - let allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || "[]"); +function getAllShowAndDisabledAuthCols (pre) { + // 用户拥有的权限 + const userAuthList = JSON.parse(sessionStorage.getItem(USER_AUTH) || '[]') + // 全部权限配置 + const allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || '[]') - let newAllAuthList = allAuthList.map(function (item, index) { - let hasAuthArray = userAuthList.filter(u => u.action===item.action ); - if (hasAuthArray && hasAuthArray.length>0) { - item["isAuth"] = true + const newAllAuthList = allAuthList.map(function (item, index) { + const hasAuthArray = userAuthList.filter(u => u.action === item.action) + if (hasAuthArray && hasAuthArray.length > 0) { + item.isAuth = true } - return item; + return item }) - return newAllAuthList; + return newAllAuthList } -function startWith(str,pre) { - if (pre == null || pre == "" || str==null|| str==""|| str.length == 0 || pre.length > str.length) - return false; - if (str.substr(0, pre.length) == pre) - return true; - else - return false; +function startWith (str, pre) { + if (pre == null || pre == '' || str == null || str == '' || str.length == 0 || pre.length > str.length) { return false } + if (str.substr(0, pre.length) == pre) { return true } else { return false } } -function substrPre(str,pre) { - return str.substr(pre.length); -} \ No newline at end of file +function substrPre (str, pre) { + return str.substr(pre.length) +} diff --git a/jero-web/src/utils/axios.js b/jero-web/src/utils/axios.js index de27d4ce..693f8942 100644 --- a/jero-web/src/utils/axios.js +++ b/jero-web/src/utils/axios.js @@ -1,37 +1,37 @@ const VueAxios = { - vm: {}, - // eslint-disable-next-line no-unused-vars - install(Vue, router = {}, instance) { - if (this.installed) { - return; - } - this.installed = true; - - if (!instance) { - // eslint-disable-next-line no-console - console.error('You have to install axios'); - return; - } - - Vue.axios = instance; - - Object.defineProperties(Vue.prototype, { - axios: { - get: function get() { - return instance; - } - }, - $http: { - get: function get() { - return instance; - } - } - }); + vm: {}, + // eslint-disable-next-line no-unused-vars + install (Vue, router = {}, instance) { + if (this.installed) { + return } -}; + this.installed = true + + if (!instance) { + // eslint-disable-next-line no-console + console.error('You have to install axios') + return + } + + Vue.axios = instance + + Object.defineProperties(Vue.prototype, { + axios: { + get: function get () { + return instance + } + }, + $http: { + get: function get () { + return instance + } + } + }) + } +} export { - VueAxios, - // eslint-disable-next-line no-undef - //instance as axios -} \ No newline at end of file + VueAxios + // eslint-disable-next-line no-undef + // instance as axios +} diff --git a/jero-web/src/utils/browser.js b/jero-web/src/utils/browser.js index 97f232e3..da0a09f1 100644 --- a/jero-web/src/utils/browser.js +++ b/jero-web/src/utils/browser.js @@ -1,32 +1,31 @@ -//判断是否IE<11浏览器 -export function isIE() { +// 判断是否IE<11浏览器 +export function isIE () { return navigator.userAgent.indexOf('compatible') > -1 && navigator.userAgent.indexOf('MSIE') > -1 - } -export function isIE11() { +export function isIE11 () { return navigator.userAgent.indexOf('Trident') > -1 && navigator.userAgent.indexOf('rv:11.0') > -1 } -//判断是否IE的Edge浏览器 -export function isEdge() { +// 判断是否IE的Edge浏览器 +export function isEdge () { return navigator.userAgent.indexOf('Edge') > -1 && !isIE() } -export function getIEVersion() { - let userAgent = navigator.userAgent //取得浏览器的userAgent字符串 - let isIE = isIE() - let isIE11 = isIE11() - let isEdge = isEdge() +export function getIEVersion () { + const userAgent = navigator.userAgent // 取得浏览器的userAgent字符串 + const isIE = isIE() + const isIE11 = isIE11() + const isEdge = isEdge() if (isIE) { - let reIE = new RegExp('MSIE (\\d+\\.\\d+);') + const reIE = new RegExp('MSIE (\\d+\\.\\d+);') reIE.test(userAgent) - let fIEVersion = parseFloat(RegExp['$1']) + const fIEVersion = parseFloat(RegExp.$1) if (fIEVersion === 7 || fIEVersion === 8 || fIEVersion === 9 || fIEVersion === 10) { return fIEVersion } else { - return 6//IE版本<7 + return 6// IE版本<7 } } else if (isEdge) { return 'edge' @@ -35,4 +34,4 @@ export function getIEVersion() { } else { return -1 } -} \ No newline at end of file +} diff --git a/jero-web/src/utils/commonUploadFile.js b/jero-web/src/utils/commonUploadFile.js index eaa6dbb3..2e780e63 100644 --- a/jero-web/src/utils/commonUploadFile.js +++ b/jero-web/src/utils/commonUploadFile.js @@ -1,52 +1,52 @@ import { getFileAccessHttpUrl } from '@/api/manage' -const getFileName=(path)=>{ - if(path.lastIndexOf("\\")>=0){ - let reg=new RegExp("\\\\","g"); - path = path.replace(reg,"/"); +const getFileName = (path) => { + if (path.lastIndexOf('\\') >= 0) { + const reg = new RegExp('\\\\', 'g') + path = path.replace(reg, '/') } - return path.substring(path.lastIndexOf("/")+1); + return path.substring(path.lastIndexOf('/') + 1) } -const uidGenerator=()=>{ - return '-'+parseInt(Math.random()*10000+1,10); +const uidGenerator = () => { + return '-' + parseInt(Math.random() * 10000 + 1, 10) } -const getFilePaths=(uploadFiles)=>{ - let arr = []; - if(!uploadFiles){ - return "" +const getFilePaths = (uploadFiles) => { + const arr = [] + if (!uploadFiles) { + return '' } - for(let a=0;a0){ - return arr.join(",") + if (arr && arr.length > 0) { + return arr.join(',') } - return "" + return '' } -const getUploadFileList=(paths)=>{ - if(!paths){ - return []; +const getUploadFileList = (paths) => { + if (!paths) { + return [] } - let fileList = []; - let arr = paths.split(",") - for(let a=0;a{ - let encryptedString = {}; - encryptedString.key = res.result.key; - encryptedString.iv = res.result.iv; - Vue.ls.set(ENCRYPTED_STRING, encryptedString, 7 * 24 * 60 * 60 * 1000); - return encryptedString; - }); +export function getEncryptedString () { + return getAction('/sys/getEncryptedString', {}).then((res) => { + const encryptedString = {} + encryptedString.key = res.result.key + encryptedString.iv = res.result.iv + Vue.ls.set(ENCRYPTED_STRING, encryptedString, 7 * 24 * 60 * 60 * 1000) + return encryptedString + }) } /** * AES加密 :字符串 key iv 返回base64 */ -export function encryption(word, keyStr, ivStr) { +export function encryption (word, keyStr, ivStr) { + const key = CryptoJS.enc.Utf8.parse(keyStr) + const iv = CryptoJS.enc.Utf8.parse(ivStr) - let key = CryptoJS.enc.Utf8.parse(keyStr) - let iv = CryptoJS.enc.Utf8.parse(ivStr) - - let srcs = CryptoJS.enc.Utf8.parse(word); + const srcs = CryptoJS.enc.Utf8.parse(word) var encrypted = CryptoJS.AES.encrypt(srcs, key, { iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.ZeroPadding - }); + }) // console.log("-=-=-=-", encrypted.ciphertext) - return CryptoJS.enc.Base64.stringify(encrypted.ciphertext); - + return CryptoJS.enc.Base64.stringify(encrypted.ciphertext) } - var CryptoJS = CryptoJS || (function (Math, undefined) { /* * Local polyfil of Object.create */ var create = Object.create || (function () { - function F() {}; + function F () {}; return function (obj) { - var subtype; + var subtype - F.prototype = obj; + F.prototype = obj - subtype = new F(); + subtype = new F() - F.prototype = null; + F.prototype = null - return subtype; - }; + return subtype + } }()) /** * CryptoJS namespace. */ - var C = {}; + var C = {} /** * Library namespace. */ - var C_lib = C.lib = {}; + var C_lib = C.lib = {} /** * Base object for prototypal inheritance. */ var Base = C_lib.Base = (function () { - - return { /** * Creates a new object that inherits from this object. @@ -92,27 +87,27 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ extend: function (overrides) { // Spawn - var subtype = create(this); + var subtype = create(this) // Augment if (overrides) { - subtype.mixIn(overrides); + subtype.mixIn(overrides) } // Create default initializer if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { subtype.init = function () { - subtype.$super.init.apply(this, arguments); - }; + subtype.$super.init.apply(this, arguments) + } } // Initializer's prototype is the subtype object - subtype.init.prototype = subtype; + subtype.init.prototype = subtype // Reference supertype - subtype.$super = this; + subtype.$super = this - return subtype; + return subtype }, /** @@ -128,10 +123,10 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var instance = MyType.create(); */ create: function () { - var instance = this.extend(); - instance.init.apply(instance, arguments); + var instance = this.extend() + instance.init.apply(instance, arguments) - return instance; + return instance }, /** @@ -163,13 +158,13 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { mixIn: function (properties) { for (var propertyName in properties) { if (properties.hasOwnProperty(propertyName)) { - this[propertyName] = properties[propertyName]; + this[propertyName] = properties[propertyName] } } // IE won't copy toString using the loop above if (properties.hasOwnProperty('toString')) { - this.toString = properties.toString; + this.toString = properties.toString } }, @@ -183,10 +178,10 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var clone = instance.clone(); */ clone: function () { - return this.init.prototype.extend(this); + return this.init.prototype.extend(this) } - }; - }()); + } + }()) /** * An array of 32-bit words. @@ -208,12 +203,12 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); */ init: function (words, sigBytes) { - words = this.words = words || []; + words = this.words = words || [] if (sigBytes != undefined) { - this.sigBytes = sigBytes; + this.sigBytes = sigBytes } else { - this.sigBytes = words.length * 4; + this.sigBytes = words.length * 4 } }, @@ -231,7 +226,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var string = wordArray.toString(CryptoJS.enc.Utf8); */ toString: function (encoder) { - return (encoder || Hex).stringify(this); + return (encoder || Hex).stringify(this) }, /** @@ -247,31 +242,31 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ concat: function (wordArray) { // Shortcuts - var thisWords = this.words; - var thatWords = wordArray.words; - var thisSigBytes = this.sigBytes; - var thatSigBytes = wordArray.sigBytes; + var thisWords = this.words + var thatWords = wordArray.words + var thisSigBytes = this.sigBytes + var thatSigBytes = wordArray.sigBytes // Clamp excess bits - this.clamp(); + this.clamp() // Concat if (thisSigBytes % 4) { // Copy one byte at a time for (var i = 0; i < thatSigBytes; i++) { - var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); + var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff + thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8) } } else { // Copy one word at a time for (var i = 0; i < thatSigBytes; i += 4) { - thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2]; + thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2] } } - this.sigBytes += thatSigBytes; + this.sigBytes += thatSigBytes // Chainable - return this; + return this }, /** @@ -283,12 +278,12 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ clamp: function () { // Shortcuts - var words = this.words; - var sigBytes = this.sigBytes; + var words = this.words + var sigBytes = this.sigBytes // Clamp - words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); - words.length = Math.ceil(sigBytes / 4); + words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8) + words.length = Math.ceil(sigBytes / 4) }, /** @@ -301,10 +296,10 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var clone = wordArray.clone(); */ clone: function () { - var clone = Base.clone.call(this); - clone.words = this.words.slice(0); + var clone = Base.clone.call(this) + clone.words = this.words.slice(0) - return clone; + return clone }, /** @@ -321,38 +316,38 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var wordArray = CryptoJS.lib.WordArray.random(16); */ random: function (nBytes) { - var words = []; + var words = [] - var r = (function (m_w) { - var m_w = m_w; - var m_z = 0x3ade68b1; - var mask = 0xffffffff; + var r = function (m_w) { + var m_w = m_w + var m_z = 0x3ade68b1 + var mask = 0xffffffff return function () { - m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask; - m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask; - var result = ((m_z << 0x10) + m_w) & mask; - result /= 0x100000000; - result += 0.5; - return result * (Math.random() > .5 ? 1 : -1); + m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask + m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask + var result = ((m_z << 0x10) + m_w) & mask + result /= 0x100000000 + result += 0.5 + return result * (Math.random() > 0.5 ? 1 : -1) } - }); - - for (var i = 0, rcache; i < nBytes; i += 4) { - var _r = r((rcache || Math.random()) * 0x100000000); - - rcache = _r() * 0x3ade67b7; - words.push((_r() * 0x100000000) | 0); } - return new WordArray.init(words, nBytes); + for (var i = 0, rcache; i < nBytes; i += 4) { + var _r = r((rcache || Math.random()) * 0x100000000) + + rcache = _r() * 0x3ade67b7 + words.push((_r() * 0x100000000) | 0) + } + + return new WordArray.init(words, nBytes) } - }); + }) /** * Encoder namespace. */ - var C_enc = C.enc = {}; + var C_enc = C.enc = {} /** * Hex encoding strategy. @@ -373,18 +368,18 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ stringify: function (wordArray) { // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; + var words = wordArray.words + var sigBytes = wordArray.sigBytes // Convert - var hexChars = []; + var hexChars = [] for (var i = 0; i < sigBytes; i++) { - var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - hexChars.push((bite >>> 4).toString(16)); - hexChars.push((bite & 0x0f).toString(16)); + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff + hexChars.push((bite >>> 4).toString(16)) + hexChars.push((bite & 0x0f).toString(16)) } - return hexChars.join(''); + return hexChars.join('') }, /** @@ -402,17 +397,17 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ parse: function (hexStr) { // Shortcut - var hexStrLength = hexStr.length; + var hexStrLength = hexStr.length // Convert - var words = []; + var words = [] for (var i = 0; i < hexStrLength; i += 2) { - words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); + words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4) } - return new WordArray.init(words, hexStrLength / 2); + return new WordArray.init(words, hexStrLength / 2) } - }; + } /** * Latin1 encoding strategy. @@ -433,17 +428,17 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ stringify: function (wordArray) { // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; + var words = wordArray.words + var sigBytes = wordArray.sigBytes // Convert - var latin1Chars = []; + var latin1Chars = [] for (var i = 0; i < sigBytes; i++) { - var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - latin1Chars.push(String.fromCharCode(bite)); + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff + latin1Chars.push(String.fromCharCode(bite)) } - return latin1Chars.join(''); + return latin1Chars.join('') }, /** @@ -461,17 +456,17 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ parse: function (latin1Str) { // Shortcut - var latin1StrLength = latin1Str.length; + var latin1StrLength = latin1Str.length // Convert - var words = []; + var words = [] for (var i = 0; i < latin1StrLength; i++) { - words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); + words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8) } - return new WordArray.init(words, latin1StrLength); + return new WordArray.init(words, latin1StrLength) } - }; + } /** * UTF-8 encoding strategy. @@ -492,9 +487,9 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ stringify: function (wordArray) { try { - return decodeURIComponent(escape(Latin1.stringify(wordArray))); + return decodeURIComponent(escape(Latin1.stringify(wordArray))) } catch (e) { - throw new Error('Malformed UTF-8 data'); + throw new Error('Malformed UTF-8 data') } }, @@ -512,9 +507,9 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); */ parse: function (utf8Str) { - return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + return Latin1.parse(unescape(encodeURIComponent(utf8Str))) } - }; + } /** * Abstract buffered block algorithm template. @@ -533,8 +528,8 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ reset: function () { // Initial values - this._data = new WordArray.init(); - this._nDataBytes = 0; + this._data = new WordArray.init() + this._nDataBytes = 0 }, /** @@ -549,13 +544,13 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ _append: function (data) { // Convert string to WordArray, else assume WordArray already - if (typeof data == 'string') { - data = Utf8.parse(data); + if (typeof data === 'string') { + data = Utf8.parse(data) } // Append - this._data.concat(data); - this._nDataBytes += data.sigBytes; + this._data.concat(data) + this._nDataBytes += data.sigBytes }, /** @@ -574,43 +569,43 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ _process: function (doFlush) { // Shortcuts - var data = this._data; - var dataWords = data.words; - var dataSigBytes = data.sigBytes; - var blockSize = this.blockSize; - var blockSizeBytes = blockSize * 4; + var data = this._data + var dataWords = data.words + var dataSigBytes = data.sigBytes + var blockSize = this.blockSize + var blockSizeBytes = blockSize * 4 // Count blocks ready - var nBlocksReady = dataSigBytes / blockSizeBytes; + var nBlocksReady = dataSigBytes / blockSizeBytes if (doFlush) { // Round up to include partial blocks - nBlocksReady = Math.ceil(nBlocksReady); + nBlocksReady = Math.ceil(nBlocksReady) } else { // Round down to include only full blocks, // less the number of blocks that must remain in the buffer - nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); + nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0) } // Count words ready - var nWordsReady = nBlocksReady * blockSize; + var nWordsReady = nBlocksReady * blockSize // Count bytes ready - var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); + var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes) // Process blocks if (nWordsReady) { for (var offset = 0; offset < nWordsReady; offset += blockSize) { // Perform concrete-algorithm logic - this._doProcessBlock(dataWords, offset); + this._doProcessBlock(dataWords, offset) } // Remove processed words - var processedWords = dataWords.splice(0, nWordsReady); - data.sigBytes -= nBytesReady; + var processedWords = dataWords.splice(0, nWordsReady) + data.sigBytes -= nBytesReady } // Return processed words - return new WordArray.init(processedWords, nBytesReady); + return new WordArray.init(processedWords, nBytesReady) }, /** @@ -623,14 +618,14 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var clone = bufferedBlockAlgorithm.clone(); */ clone: function () { - var clone = Base.clone.call(this); - clone._data = this._data.clone(); + var clone = Base.clone.call(this) + clone._data = this._data.clone() - return clone; + return clone }, _minBufferSize: 0 - }); + }) /** * Abstract hasher template. @@ -654,10 +649,10 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ init: function (cfg) { // Apply config defaults - this.cfg = this.cfg.extend(cfg); + this.cfg = this.cfg.extend(cfg) // Set initial values - this.reset(); + this.reset() }, /** @@ -669,10 +664,10 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ reset: function () { // Reset data buffer - BufferedBlockAlgorithm.reset.call(this); + BufferedBlockAlgorithm.reset.call(this) // Perform concrete-hasher logic - this._doReset(); + this._doReset() }, /** @@ -689,13 +684,13 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ update: function (messageUpdate) { // Append - this._append(messageUpdate); + this._append(messageUpdate) // Update the hash - this._process(); + this._process() // Chainable - return this; + return this }, /** @@ -715,16 +710,16 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { finalize: function (messageUpdate) { // Final message update if (messageUpdate) { - this._append(messageUpdate); + this._append(messageUpdate) } // Perform concrete-hasher logic - var hash = this._doFinalize(); + var hash = this._doFinalize() - return hash; + return hash }, - blockSize: 512/32, + blockSize: 512 / 32, /** * Creates a shortcut function to a hasher's object interface. @@ -741,8 +736,8 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ _createHelper: function (hasher) { return function (message, cfg) { - return new hasher.init(cfg).finalize(message); - }; + return new hasher.init(cfg).finalize(message) + } }, /** @@ -760,26 +755,25 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ _createHmacHelper: function (hasher) { return function (message, key) { - return new C_algo.HMAC.init(hasher, key).finalize(message); - }; + return new C_algo.HMAC.init(hasher, key).finalize(message) + } } - }); + }) /** * Algorithm namespace. */ - var C_algo = C.algo = {}; + var C_algo = C.algo = {} - return C; + return C }(Math)); - (function () { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; + var C = CryptoJS + var C_lib = C.lib + var WordArray = C_lib.WordArray + var C_enc = C.enc /** * Base64 encoding strategy. @@ -800,36 +794,36 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ stringify: function (wordArray) { // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var map = this._map; + var words = wordArray.words + var sigBytes = wordArray.sigBytes + var map = this._map // Clamp excess bits - wordArray.clamp(); + wordArray.clamp() // Convert - var base64Chars = []; + var base64Chars = [] for (var i = 0; i < sigBytes; i += 3) { - var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; - var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff - var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + var triplet = (byte1 << 16) | (byte2 << 8) | byte3 for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { - base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)) } } // Add padding - var paddingChar = map.charAt(64); + var paddingChar = map.charAt(64) if (paddingChar) { while (base64Chars.length % 4) { - base64Chars.push(paddingChar); + base64Chars.push(paddingChar) } } - return base64Chars.join(''); + return base64Chars.join('') }, /** @@ -847,57 +841,55 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ parse: function (base64Str) { // Shortcuts - var base64StrLength = base64Str.length; - var map = this._map; - var reverseMap = this._reverseMap; + var base64StrLength = base64Str.length + var map = this._map + var reverseMap = this._reverseMap if (!reverseMap) { - reverseMap = this._reverseMap = []; + reverseMap = this._reverseMap = [] for (var j = 0; j < map.length; j++) { - reverseMap[map.charCodeAt(j)] = j; + reverseMap[map.charCodeAt(j)] = j } } // Ignore padding - var paddingChar = map.charAt(64); + var paddingChar = map.charAt(64) if (paddingChar) { - var paddingIndex = base64Str.indexOf(paddingChar); + var paddingIndex = base64Str.indexOf(paddingChar) if (paddingIndex !== -1) { - base64StrLength = paddingIndex; + base64StrLength = paddingIndex } } // Convert - return parseLoop(base64Str, base64StrLength, reverseMap); - + return parseLoop(base64Str, base64StrLength, reverseMap) }, _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' - }; + } - function parseLoop(base64Str, base64StrLength, reverseMap) { - var words = []; - var nBytes = 0; + function parseLoop (base64Str, base64StrLength, reverseMap) { + var words = [] + var nBytes = 0 for (var i = 0; i < base64StrLength; i++) { if (i % 4) { - var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); - var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); - words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8); - nBytes++; + var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2) + var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2) + words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8) + nBytes++ } } - return WordArray.create(words, nBytes); + return WordArray.create(words, nBytes) } }()); - (function (Math) { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; + var C = CryptoJS + var C_lib = C.lib + var WordArray = C_lib.WordArray + var Hasher = C_lib.Hasher + var C_algo = C.algo // Constants table var T = []; @@ -905,9 +897,9 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { // Compute constants (function () { for (var i = 0; i < 64; i++) { - T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; + T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0 } - }()); + }()) /** * MD5 hash algorithm. @@ -917,194 +909,194 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { this._hash = new WordArray.init([ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476 - ]); + ]) }, _doProcessBlock: function (M, offset) { // Swap endian for (var i = 0; i < 16; i++) { // Shortcuts - var offset_i = offset + i; - var M_offset_i = M[offset_i]; + var offset_i = offset + i + var M_offset_i = M[offset_i] M[offset_i] = ( - (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | - (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) - ); + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ) } // Shortcuts - var H = this._hash.words; + var H = this._hash.words - var M_offset_0 = M[offset + 0]; - var M_offset_1 = M[offset + 1]; - var M_offset_2 = M[offset + 2]; - var M_offset_3 = M[offset + 3]; - var M_offset_4 = M[offset + 4]; - var M_offset_5 = M[offset + 5]; - var M_offset_6 = M[offset + 6]; - var M_offset_7 = M[offset + 7]; - var M_offset_8 = M[offset + 8]; - var M_offset_9 = M[offset + 9]; - var M_offset_10 = M[offset + 10]; - var M_offset_11 = M[offset + 11]; - var M_offset_12 = M[offset + 12]; - var M_offset_13 = M[offset + 13]; - var M_offset_14 = M[offset + 14]; - var M_offset_15 = M[offset + 15]; + var M_offset_0 = M[offset + 0] + var M_offset_1 = M[offset + 1] + var M_offset_2 = M[offset + 2] + var M_offset_3 = M[offset + 3] + var M_offset_4 = M[offset + 4] + var M_offset_5 = M[offset + 5] + var M_offset_6 = M[offset + 6] + var M_offset_7 = M[offset + 7] + var M_offset_8 = M[offset + 8] + var M_offset_9 = M[offset + 9] + var M_offset_10 = M[offset + 10] + var M_offset_11 = M[offset + 11] + var M_offset_12 = M[offset + 12] + var M_offset_13 = M[offset + 13] + var M_offset_14 = M[offset + 14] + var M_offset_15 = M[offset + 15] // Working varialbes - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; + var a = H[0] + var b = H[1] + var c = H[2] + var d = H[3] // Computation - a = FF(a, b, c, d, M_offset_0, 7, T[0]); - d = FF(d, a, b, c, M_offset_1, 12, T[1]); - c = FF(c, d, a, b, M_offset_2, 17, T[2]); - b = FF(b, c, d, a, M_offset_3, 22, T[3]); - a = FF(a, b, c, d, M_offset_4, 7, T[4]); - d = FF(d, a, b, c, M_offset_5, 12, T[5]); - c = FF(c, d, a, b, M_offset_6, 17, T[6]); - b = FF(b, c, d, a, M_offset_7, 22, T[7]); - a = FF(a, b, c, d, M_offset_8, 7, T[8]); - d = FF(d, a, b, c, M_offset_9, 12, T[9]); - c = FF(c, d, a, b, M_offset_10, 17, T[10]); - b = FF(b, c, d, a, M_offset_11, 22, T[11]); - a = FF(a, b, c, d, M_offset_12, 7, T[12]); - d = FF(d, a, b, c, M_offset_13, 12, T[13]); - c = FF(c, d, a, b, M_offset_14, 17, T[14]); - b = FF(b, c, d, a, M_offset_15, 22, T[15]); + a = FF(a, b, c, d, M_offset_0, 7, T[0]) + d = FF(d, a, b, c, M_offset_1, 12, T[1]) + c = FF(c, d, a, b, M_offset_2, 17, T[2]) + b = FF(b, c, d, a, M_offset_3, 22, T[3]) + a = FF(a, b, c, d, M_offset_4, 7, T[4]) + d = FF(d, a, b, c, M_offset_5, 12, T[5]) + c = FF(c, d, a, b, M_offset_6, 17, T[6]) + b = FF(b, c, d, a, M_offset_7, 22, T[7]) + a = FF(a, b, c, d, M_offset_8, 7, T[8]) + d = FF(d, a, b, c, M_offset_9, 12, T[9]) + c = FF(c, d, a, b, M_offset_10, 17, T[10]) + b = FF(b, c, d, a, M_offset_11, 22, T[11]) + a = FF(a, b, c, d, M_offset_12, 7, T[12]) + d = FF(d, a, b, c, M_offset_13, 12, T[13]) + c = FF(c, d, a, b, M_offset_14, 17, T[14]) + b = FF(b, c, d, a, M_offset_15, 22, T[15]) - a = GG(a, b, c, d, M_offset_1, 5, T[16]); - d = GG(d, a, b, c, M_offset_6, 9, T[17]); - c = GG(c, d, a, b, M_offset_11, 14, T[18]); - b = GG(b, c, d, a, M_offset_0, 20, T[19]); - a = GG(a, b, c, d, M_offset_5, 5, T[20]); - d = GG(d, a, b, c, M_offset_10, 9, T[21]); - c = GG(c, d, a, b, M_offset_15, 14, T[22]); - b = GG(b, c, d, a, M_offset_4, 20, T[23]); - a = GG(a, b, c, d, M_offset_9, 5, T[24]); - d = GG(d, a, b, c, M_offset_14, 9, T[25]); - c = GG(c, d, a, b, M_offset_3, 14, T[26]); - b = GG(b, c, d, a, M_offset_8, 20, T[27]); - a = GG(a, b, c, d, M_offset_13, 5, T[28]); - d = GG(d, a, b, c, M_offset_2, 9, T[29]); - c = GG(c, d, a, b, M_offset_7, 14, T[30]); - b = GG(b, c, d, a, M_offset_12, 20, T[31]); + a = GG(a, b, c, d, M_offset_1, 5, T[16]) + d = GG(d, a, b, c, M_offset_6, 9, T[17]) + c = GG(c, d, a, b, M_offset_11, 14, T[18]) + b = GG(b, c, d, a, M_offset_0, 20, T[19]) + a = GG(a, b, c, d, M_offset_5, 5, T[20]) + d = GG(d, a, b, c, M_offset_10, 9, T[21]) + c = GG(c, d, a, b, M_offset_15, 14, T[22]) + b = GG(b, c, d, a, M_offset_4, 20, T[23]) + a = GG(a, b, c, d, M_offset_9, 5, T[24]) + d = GG(d, a, b, c, M_offset_14, 9, T[25]) + c = GG(c, d, a, b, M_offset_3, 14, T[26]) + b = GG(b, c, d, a, M_offset_8, 20, T[27]) + a = GG(a, b, c, d, M_offset_13, 5, T[28]) + d = GG(d, a, b, c, M_offset_2, 9, T[29]) + c = GG(c, d, a, b, M_offset_7, 14, T[30]) + b = GG(b, c, d, a, M_offset_12, 20, T[31]) - a = HH(a, b, c, d, M_offset_5, 4, T[32]); - d = HH(d, a, b, c, M_offset_8, 11, T[33]); - c = HH(c, d, a, b, M_offset_11, 16, T[34]); - b = HH(b, c, d, a, M_offset_14, 23, T[35]); - a = HH(a, b, c, d, M_offset_1, 4, T[36]); - d = HH(d, a, b, c, M_offset_4, 11, T[37]); - c = HH(c, d, a, b, M_offset_7, 16, T[38]); - b = HH(b, c, d, a, M_offset_10, 23, T[39]); - a = HH(a, b, c, d, M_offset_13, 4, T[40]); - d = HH(d, a, b, c, M_offset_0, 11, T[41]); - c = HH(c, d, a, b, M_offset_3, 16, T[42]); - b = HH(b, c, d, a, M_offset_6, 23, T[43]); - a = HH(a, b, c, d, M_offset_9, 4, T[44]); - d = HH(d, a, b, c, M_offset_12, 11, T[45]); - c = HH(c, d, a, b, M_offset_15, 16, T[46]); - b = HH(b, c, d, a, M_offset_2, 23, T[47]); + a = HH(a, b, c, d, M_offset_5, 4, T[32]) + d = HH(d, a, b, c, M_offset_8, 11, T[33]) + c = HH(c, d, a, b, M_offset_11, 16, T[34]) + b = HH(b, c, d, a, M_offset_14, 23, T[35]) + a = HH(a, b, c, d, M_offset_1, 4, T[36]) + d = HH(d, a, b, c, M_offset_4, 11, T[37]) + c = HH(c, d, a, b, M_offset_7, 16, T[38]) + b = HH(b, c, d, a, M_offset_10, 23, T[39]) + a = HH(a, b, c, d, M_offset_13, 4, T[40]) + d = HH(d, a, b, c, M_offset_0, 11, T[41]) + c = HH(c, d, a, b, M_offset_3, 16, T[42]) + b = HH(b, c, d, a, M_offset_6, 23, T[43]) + a = HH(a, b, c, d, M_offset_9, 4, T[44]) + d = HH(d, a, b, c, M_offset_12, 11, T[45]) + c = HH(c, d, a, b, M_offset_15, 16, T[46]) + b = HH(b, c, d, a, M_offset_2, 23, T[47]) - a = II(a, b, c, d, M_offset_0, 6, T[48]); - d = II(d, a, b, c, M_offset_7, 10, T[49]); - c = II(c, d, a, b, M_offset_14, 15, T[50]); - b = II(b, c, d, a, M_offset_5, 21, T[51]); - a = II(a, b, c, d, M_offset_12, 6, T[52]); - d = II(d, a, b, c, M_offset_3, 10, T[53]); - c = II(c, d, a, b, M_offset_10, 15, T[54]); - b = II(b, c, d, a, M_offset_1, 21, T[55]); - a = II(a, b, c, d, M_offset_8, 6, T[56]); - d = II(d, a, b, c, M_offset_15, 10, T[57]); - c = II(c, d, a, b, M_offset_6, 15, T[58]); - b = II(b, c, d, a, M_offset_13, 21, T[59]); - a = II(a, b, c, d, M_offset_4, 6, T[60]); - d = II(d, a, b, c, M_offset_11, 10, T[61]); - c = II(c, d, a, b, M_offset_2, 15, T[62]); - b = II(b, c, d, a, M_offset_9, 21, T[63]); + a = II(a, b, c, d, M_offset_0, 6, T[48]) + d = II(d, a, b, c, M_offset_7, 10, T[49]) + c = II(c, d, a, b, M_offset_14, 15, T[50]) + b = II(b, c, d, a, M_offset_5, 21, T[51]) + a = II(a, b, c, d, M_offset_12, 6, T[52]) + d = II(d, a, b, c, M_offset_3, 10, T[53]) + c = II(c, d, a, b, M_offset_10, 15, T[54]) + b = II(b, c, d, a, M_offset_1, 21, T[55]) + a = II(a, b, c, d, M_offset_8, 6, T[56]) + d = II(d, a, b, c, M_offset_15, 10, T[57]) + c = II(c, d, a, b, M_offset_6, 15, T[58]) + b = II(b, c, d, a, M_offset_13, 21, T[59]) + a = II(a, b, c, d, M_offset_4, 6, T[60]) + d = II(d, a, b, c, M_offset_11, 10, T[61]) + c = II(c, d, a, b, M_offset_2, 15, T[62]) + b = II(b, c, d, a, M_offset_9, 21, T[63]) // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; + H[0] = (H[0] + a) | 0 + H[1] = (H[1] + b) | 0 + H[2] = (H[2] + c) | 0 + H[3] = (H[3] + d) | 0 }, _doFinalize: function () { // Shortcuts - var data = this._data; - var dataWords = data.words; + var data = this._data + var dataWords = data.words - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; + var nBitsTotal = this._nDataBytes * 8 + var nBitsLeft = data.sigBytes * 8 // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32) - var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); - var nBitsTotalL = nBitsTotal; + var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000) + var nBitsTotalL = nBitsTotal dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( - (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | - (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) - ); + (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | + (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) + ) dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( - (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | - (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) - ); + (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | + (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) + ) - data.sigBytes = (dataWords.length + 1) * 4; + data.sigBytes = (dataWords.length + 1) * 4 // Hash final blocks - this._process(); + this._process() // Shortcuts - var hash = this._hash; - var H = hash.words; + var hash = this._hash + var H = hash.words // Swap endian for (var i = 0; i < 4; i++) { // Shortcut - var H_i = H[i]; + var H_i = H[i] - H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | - (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00) } // Return final computed hash - return hash; + return hash }, clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); + var clone = Hasher.clone.call(this) + clone._hash = this._hash.clone() - return clone; + return clone } - }); + }) - function FF(a, b, c, d, x, s, t) { - var n = a + ((b & c) | (~b & d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; + function FF (a, b, c, d, x, s, t) { + var n = a + ((b & c) | (~b & d)) + x + t + return ((n << s) | (n >>> (32 - s))) + b } - function GG(a, b, c, d, x, s, t) { - var n = a + ((b & d) | (c & ~d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; + function GG (a, b, c, d, x, s, t) { + var n = a + ((b & d) | (c & ~d)) + x + t + return ((n << s) | (n >>> (32 - s))) + b } - function HH(a, b, c, d, x, s, t) { - var n = a + (b ^ c ^ d) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; + function HH (a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + x + t + return ((n << s) | (n >>> (32 - s))) + b } - function II(a, b, c, d, x, s, t) { - var n = a + (c ^ (b | ~d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; + function II (a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + x + t + return ((n << s) | (n >>> (32 - s))) + b } /** @@ -1121,7 +1113,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var hash = CryptoJS.MD5('message'); * var hash = CryptoJS.MD5(wordArray); */ - C.MD5 = Hasher._createHelper(MD5); + C.MD5 = Hasher._createHelper(MD5) /** * Shortcut function to the HMAC's object interface. @@ -1137,20 +1129,19 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * * var hmac = CryptoJS.HmacMD5(message, key); */ - C.HmacMD5 = Hasher._createHmacHelper(MD5); + C.HmacMD5 = Hasher._createHmacHelper(MD5) }(Math)); - (function () { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; + var C = CryptoJS + var C_lib = C.lib + var WordArray = C_lib.WordArray + var Hasher = C_lib.Hasher + var C_algo = C.algo // Reusable object - var W = []; + var W = [] /** * SHA-1 hash algorithm. @@ -1161,83 +1152,83 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 - ]); + ]) }, _doProcessBlock: function (M, offset) { // Shortcut - var H = this._hash.words; + var H = this._hash.words // Working variables - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - var e = H[4]; + var a = H[0] + var b = H[1] + var c = H[2] + var d = H[3] + var e = H[4] // Computation for (var i = 0; i < 80; i++) { if (i < 16) { - W[i] = M[offset + i] | 0; + W[i] = M[offset + i] | 0 } else { - var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; - W[i] = (n << 1) | (n >>> 31); + var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16] + W[i] = (n << 1) | (n >>> 31) } - var t = ((a << 5) | (a >>> 27)) + e + W[i]; + var t = ((a << 5) | (a >>> 27)) + e + W[i] if (i < 20) { - t += ((b & c) | (~b & d)) + 0x5a827999; + t += ((b & c) | (~b & d)) + 0x5a827999 } else if (i < 40) { - t += (b ^ c ^ d) + 0x6ed9eba1; + t += (b ^ c ^ d) + 0x6ed9eba1 } else if (i < 60) { - t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; + t += ((b & c) | (b & d) | (c & d)) - 0x70e44324 } else /* if (i < 80) */ { - t += (b ^ c ^ d) - 0x359d3e2a; + t += (b ^ c ^ d) - 0x359d3e2a } - e = d; - d = c; - c = (b << 30) | (b >>> 2); - b = a; - a = t; + e = d + d = c + c = (b << 30) | (b >>> 2) + b = a + a = t } // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - H[4] = (H[4] + e) | 0; + H[0] = (H[0] + a) | 0 + H[1] = (H[1] + b) | 0 + H[2] = (H[2] + c) | 0 + H[3] = (H[3] + d) | 0 + H[4] = (H[4] + e) | 0 }, _doFinalize: function () { // Shortcuts - var data = this._data; - var dataWords = data.words; + var data = this._data + var dataWords = data.words - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; + var nBitsTotal = this._nDataBytes * 8 + var nBitsLeft = data.sigBytes * 8 // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32) + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000) + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal + data.sigBytes = dataWords.length * 4 // Hash final blocks - this._process(); + this._process() // Return final computed hash - return this._hash; + return this._hash }, clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); + var clone = Hasher.clone.call(this) + clone._hash = this._hash.clone() - return clone; + return clone } - }); + }) /** * Shortcut function to the hasher's object interface. @@ -1253,7 +1244,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var hash = CryptoJS.SHA1('message'); * var hash = CryptoJS.SHA1(wordArray); */ - C.SHA1 = Hasher._createHelper(SHA1); + C.SHA1 = Hasher._createHelper(SHA1) /** * Shortcut function to the HMAC's object interface. @@ -1269,156 +1260,155 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * * var hmac = CryptoJS.HmacSHA1(message, key); */ - C.HmacSHA1 = Hasher._createHmacHelper(SHA1); + C.HmacSHA1 = Hasher._createHmacHelper(SHA1) }()); - (function (Math) { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; + var C = CryptoJS + var C_lib = C.lib + var WordArray = C_lib.WordArray + var Hasher = C_lib.Hasher + var C_algo = C.algo // Initialization and round constants tables - var H = []; + var H = [] var K = []; // Compute constants (function () { - function isPrime(n) { - var sqrtN = Math.sqrt(n); + function isPrime (n) { + var sqrtN = Math.sqrt(n) for (var factor = 2; factor <= sqrtN; factor++) { if (!(n % factor)) { - return false; + return false } } - return true; + return true } - function getFractionalBits(n) { - return ((n - (n | 0)) * 0x100000000) | 0; + function getFractionalBits (n) { + return ((n - (n | 0)) * 0x100000000) | 0 } - var n = 2; - var nPrime = 0; + var n = 2 + var nPrime = 0 while (nPrime < 64) { if (isPrime(n)) { if (nPrime < 8) { - H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); + H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)) } - K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); + K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)) - nPrime++; + nPrime++ } - n++; + n++ } - }()); + }()) // Reusable object - var W = []; + var W = [] /** * SHA-256 hash algorithm. */ var SHA256 = C_algo.SHA256 = Hasher.extend({ _doReset: function () { - this._hash = new WordArray.init(H.slice(0)); + this._hash = new WordArray.init(H.slice(0)) }, _doProcessBlock: function (M, offset) { // Shortcut - var H = this._hash.words; + var H = this._hash.words // Working variables - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - var e = H[4]; - var f = H[5]; - var g = H[6]; - var h = H[7]; + var a = H[0] + var b = H[1] + var c = H[2] + var d = H[3] + var e = H[4] + var f = H[5] + var g = H[6] + var h = H[7] // Computation for (var i = 0; i < 64; i++) { if (i < 16) { - W[i] = M[offset + i] | 0; + W[i] = M[offset + i] | 0 } else { - var gamma0x = W[i - 15]; - var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ + var gamma0x = W[i - 15] + var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ ((gamma0x << 14) | (gamma0x >>> 18)) ^ - (gamma0x >>> 3); + (gamma0x >>> 3) - var gamma1x = W[i - 2]; - var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ + var gamma1x = W[i - 2] + var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ ((gamma1x << 13) | (gamma1x >>> 19)) ^ - (gamma1x >>> 10); + (gamma1x >>> 10) - W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; + W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] } - var ch = (e & f) ^ (~e & g); - var maj = (a & b) ^ (a & c) ^ (b & c); + var ch = (e & f) ^ (~e & g) + var maj = (a & b) ^ (a & c) ^ (b & c) - var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); - var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); + var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)) + var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)) - var t1 = h + sigma1 + ch + K[i] + W[i]; - var t2 = sigma0 + maj; + var t1 = h + sigma1 + ch + K[i] + W[i] + var t2 = sigma0 + maj - h = g; - g = f; - f = e; - e = (d + t1) | 0; - d = c; - c = b; - b = a; - a = (t1 + t2) | 0; + h = g + g = f + f = e + e = (d + t1) | 0 + d = c + c = b + b = a + a = (t1 + t2) | 0 } // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - H[4] = (H[4] + e) | 0; - H[5] = (H[5] + f) | 0; - H[6] = (H[6] + g) | 0; - H[7] = (H[7] + h) | 0; + H[0] = (H[0] + a) | 0 + H[1] = (H[1] + b) | 0 + H[2] = (H[2] + c) | 0 + H[3] = (H[3] + d) | 0 + H[4] = (H[4] + e) | 0 + H[5] = (H[5] + f) | 0 + H[6] = (H[6] + g) | 0 + H[7] = (H[7] + h) | 0 }, _doFinalize: function () { // Shortcuts - var data = this._data; - var dataWords = data.words; + var data = this._data + var dataWords = data.words - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; + var nBitsTotal = this._nDataBytes * 8 + var nBitsLeft = data.sigBytes * 8 // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32) + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000) + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal + data.sigBytes = dataWords.length * 4 // Hash final blocks - this._process(); + this._process() // Return final computed hash - return this._hash; + return this._hash }, clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); + var clone = Hasher.clone.call(this) + clone._hash = this._hash.clone() - return clone; + return clone } - }); + }) /** * Shortcut function to the hasher's object interface. @@ -1434,7 +1424,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var hash = CryptoJS.SHA256('message'); * var hash = CryptoJS.SHA256(wordArray); */ - C.SHA256 = Hasher._createHelper(SHA256); + C.SHA256 = Hasher._createHelper(SHA256) /** * Shortcut function to the HMAC's object interface. @@ -1450,16 +1440,15 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * * var hmac = CryptoJS.HmacSHA256(message, key); */ - C.HmacSHA256 = Hasher._createHmacHelper(SHA256); + C.HmacSHA256 = Hasher._createHmacHelper(SHA256) }(Math)); - (function () { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; + var C = CryptoJS + var C_lib = C.lib + var WordArray = C_lib.WordArray + var C_enc = C.enc /** * UTF-16 BE encoding strategy. @@ -1480,17 +1469,17 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ stringify: function (wordArray) { // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; + var words = wordArray.words + var sigBytes = wordArray.sigBytes // Convert - var utf16Chars = []; + var utf16Chars = [] for (var i = 0; i < sigBytes; i += 2) { - var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; - utf16Chars.push(String.fromCharCode(codePoint)); + var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff + utf16Chars.push(String.fromCharCode(codePoint)) } - return utf16Chars.join(''); + return utf16Chars.join('') }, /** @@ -1508,17 +1497,17 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ parse: function (utf16Str) { // Shortcut - var utf16StrLength = utf16Str.length; + var utf16StrLength = utf16Str.length // Convert - var words = []; + var words = [] for (var i = 0; i < utf16StrLength; i++) { - words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); + words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16) } - return WordArray.create(words, utf16StrLength * 2); + return WordArray.create(words, utf16StrLength * 2) } - }; + } /** * UTF-16 LE encoding strategy. @@ -1539,17 +1528,17 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ stringify: function (wordArray) { // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; + var words = wordArray.words + var sigBytes = wordArray.sigBytes // Convert - var utf16Chars = []; + var utf16Chars = [] for (var i = 0; i < sigBytes; i += 2) { - var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); - utf16Chars.push(String.fromCharCode(codePoint)); + var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff) + utf16Chars.push(String.fromCharCode(codePoint)) } - return utf16Chars.join(''); + return utf16Chars.join('') }, /** @@ -1567,49 +1556,48 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ parse: function (utf16Str) { // Shortcut - var utf16StrLength = utf16Str.length; + var utf16StrLength = utf16Str.length // Convert - var words = []; + var words = [] for (var i = 0; i < utf16StrLength; i++) { - words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); + words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)) } - return WordArray.create(words, utf16StrLength * 2); + return WordArray.create(words, utf16StrLength * 2) } - }; + } - function swapEndian(word) { - return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); + function swapEndian (word) { + return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff) } }()); - (function () { // Check if typed arrays are supported - if (typeof ArrayBuffer != 'function') { - return; + if (typeof ArrayBuffer !== 'function') { + return } // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; + var C = CryptoJS + var C_lib = C.lib + var WordArray = C_lib.WordArray // Reference original init - var superInit = WordArray.init; + var superInit = WordArray.init // Augment WordArray.init to handle typed arrays var subInit = WordArray.init = function (typedArray) { // Convert buffers to uint8 if (typedArray instanceof ArrayBuffer) { - typedArray = new Uint8Array(typedArray); + typedArray = new Uint8Array(typedArray) } // Convert other array views to uint8 if ( typedArray instanceof Int8Array || - (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || + (typeof Uint8ClampedArray !== 'undefined' && typedArray instanceof Uint8ClampedArray) || typedArray instanceof Int16Array || typedArray instanceof Uint16Array || typedArray instanceof Int32Array || @@ -1617,32 +1605,31 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { typedArray instanceof Float32Array || typedArray instanceof Float64Array ) { - typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); + typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength) } // Handle Uint8Array if (typedArray instanceof Uint8Array) { // Shortcut - var typedArrayByteLength = typedArray.byteLength; + var typedArrayByteLength = typedArray.byteLength // Extract bytes - var words = []; + var words = [] for (var i = 0; i < typedArrayByteLength; i++) { - words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); + words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8) } // Initialize this word array - superInit.call(this, words, typedArrayByteLength); + superInit.call(this, words, typedArrayByteLength) } else { // Else call normal init - superInit.apply(this, arguments); + superInit.apply(this, arguments) } - }; + } - subInit.prototype = WordArray; + subInit.prototype = WordArray }()); - /** @preserve (c) 2012 by Cédric Mesnil. All rights reserved. @@ -1656,208 +1643,203 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { (function (Math) { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; + var C = CryptoJS + var C_lib = C.lib + var WordArray = C_lib.WordArray + var Hasher = C_lib.Hasher + var C_algo = C.algo // Constants table var _zl = WordArray.create([ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, - 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, - 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, - 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]) var _zr = WordArray.create([ - 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, - 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, - 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, - 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, - 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]) var _sl = WordArray.create([ - 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, - 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, - 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, - 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, - 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]) var _sr = WordArray.create([ - 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, - 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, - 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, - 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, - 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]) - var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); - var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); + var _hl = WordArray.create([0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]) + var _hr = WordArray.create([0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]) /** * RIPEMD160 hash algorithm. */ var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ _doReset: function () { - this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); + this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]) }, _doProcessBlock: function (M, offset) { - // Swap endian for (var i = 0; i < 16; i++) { // Shortcuts - var offset_i = offset + i; - var M_offset_i = M[offset_i]; + var offset_i = offset + i + var M_offset_i = M[offset_i] // Swap M[offset_i] = ( - (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | - (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) - ); + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ) } // Shortcut - var H = this._hash.words; - var hl = _hl.words; - var hr = _hr.words; - var zl = _zl.words; - var zr = _zr.words; - var sl = _sl.words; - var sr = _sr.words; + var H = this._hash.words + var hl = _hl.words + var hr = _hr.words + var zl = _zl.words + var zr = _zr.words + var sl = _sl.words + var sr = _sr.words // Working variables - var al, bl, cl, dl, el; - var ar, br, cr, dr, er; + var al, bl, cl, dl, el + var ar, br, cr, dr, er - ar = al = H[0]; - br = bl = H[1]; - cr = cl = H[2]; - dr = dl = H[3]; - er = el = H[4]; + ar = al = H[0] + br = bl = H[1] + cr = cl = H[2] + dr = dl = H[3] + er = el = H[4] // Computation - var t; + var t for (var i = 0; i < 80; i += 1) { - t = (al + M[offset+zl[i]])|0; - if (i<16){ - t += f1(bl,cl,dl) + hl[0]; - } else if (i<32) { - t += f2(bl,cl,dl) + hl[1]; - } else if (i<48) { - t += f3(bl,cl,dl) + hl[2]; - } else if (i<64) { - t += f4(bl,cl,dl) + hl[3]; - } else {// if (i<80) { - t += f5(bl,cl,dl) + hl[4]; + t = (al + M[offset + zl[i]]) | 0 + if (i < 16) { + t += f1(bl, cl, dl) + hl[0] + } else if (i < 32) { + t += f2(bl, cl, dl) + hl[1] + } else if (i < 48) { + t += f3(bl, cl, dl) + hl[2] + } else if (i < 64) { + t += f4(bl, cl, dl) + hl[3] + } else { // if (i<80) { + t += f5(bl, cl, dl) + hl[4] } - t = t|0; - t = rotl(t,sl[i]); - t = (t+el)|0; - al = el; - el = dl; - dl = rotl(cl, 10); - cl = bl; - bl = t; + t = t | 0 + t = rotl(t, sl[i]) + t = (t + el) | 0 + al = el + el = dl + dl = rotl(cl, 10) + cl = bl + bl = t - t = (ar + M[offset+zr[i]])|0; - if (i<16){ - t += f5(br,cr,dr) + hr[0]; - } else if (i<32) { - t += f4(br,cr,dr) + hr[1]; - } else if (i<48) { - t += f3(br,cr,dr) + hr[2]; - } else if (i<64) { - t += f2(br,cr,dr) + hr[3]; - } else {// if (i<80) { - t += f1(br,cr,dr) + hr[4]; + t = (ar + M[offset + zr[i]]) | 0 + if (i < 16) { + t += f5(br, cr, dr) + hr[0] + } else if (i < 32) { + t += f4(br, cr, dr) + hr[1] + } else if (i < 48) { + t += f3(br, cr, dr) + hr[2] + } else if (i < 64) { + t += f2(br, cr, dr) + hr[3] + } else { // if (i<80) { + t += f1(br, cr, dr) + hr[4] } - t = t|0; - t = rotl(t,sr[i]) ; - t = (t+er)|0; - ar = er; - er = dr; - dr = rotl(cr, 10); - cr = br; - br = t; + t = t | 0 + t = rotl(t, sr[i]) + t = (t + er) | 0 + ar = er + er = dr + dr = rotl(cr, 10) + cr = br + br = t } // Intermediate hash value - t = (H[1] + cl + dr)|0; - H[1] = (H[2] + dl + er)|0; - H[2] = (H[3] + el + ar)|0; - H[3] = (H[4] + al + br)|0; - H[4] = (H[0] + bl + cr)|0; - H[0] = t; + t = (H[1] + cl + dr) | 0 + H[1] = (H[2] + dl + er) | 0 + H[2] = (H[3] + el + ar) | 0 + H[3] = (H[4] + al + br) | 0 + H[4] = (H[0] + bl + cr) | 0 + H[0] = t }, _doFinalize: function () { // Shortcuts - var data = this._data; - var dataWords = data.words; + var data = this._data + var dataWords = data.words - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; + var nBitsTotal = this._nDataBytes * 8 + var nBitsLeft = data.sigBytes * 8 // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32) dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( - (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | - (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) - ); - data.sigBytes = (dataWords.length + 1) * 4; + (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | + (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) + ) + data.sigBytes = (dataWords.length + 1) * 4 // Hash final blocks - this._process(); + this._process() // Shortcuts - var hash = this._hash; - var H = hash.words; + var hash = this._hash + var H = hash.words // Swap endian for (var i = 0; i < 5; i++) { // Shortcut - var H_i = H[i]; + var H_i = H[i] // Swap - H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | - (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00) } // Return final computed hash - return hash; + return hash }, clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); + var clone = Hasher.clone.call(this) + clone._hash = this._hash.clone() - return clone; + return clone } - }); - - - function f1(x, y, z) { - return ((x) ^ (y) ^ (z)); + }) + function f1 (x, y, z) { + return ((x) ^ (y) ^ (z)) } - function f2(x, y, z) { - return (((x)&(y)) | ((~x)&(z))); + function f2 (x, y, z) { + return (((x) & (y)) | ((~x) & (z))) } - function f3(x, y, z) { - return (((x) | (~(y))) ^ (z)); + function f3 (x, y, z) { + return (((x) | (~(y))) ^ (z)) } - function f4(x, y, z) { - return (((x) & (z)) | ((y)&(~(z)))); + function f4 (x, y, z) { + return (((x) & (z)) | ((y) & (~(z)))) } - function f5(x, y, z) { - return ((x) ^ ((y) |(~(z)))); - + function f5 (x, y, z) { + return ((x) ^ ((y) | (~(z)))) } - function rotl(x,n) { - return (x<>>(32-n)); + function rotl (x, n) { + return (x << n) | (x >>> (32 - n)) } - /** * Shortcut function to the hasher's object interface. * @@ -1872,7 +1854,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var hash = CryptoJS.RIPEMD160('message'); * var hash = CryptoJS.RIPEMD160(wordArray); */ - C.RIPEMD160 = Hasher._createHelper(RIPEMD160); + C.RIPEMD160 = Hasher._createHelper(RIPEMD160) /** * Shortcut function to the HMAC's object interface. @@ -1888,18 +1870,17 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * * var hmac = CryptoJS.HmacRIPEMD160(message, key); */ - C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); + C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160) }(Math)); - (function () { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var C_enc = C.enc; - var Utf8 = C_enc.Utf8; - var C_algo = C.algo; + var C = CryptoJS + var C_lib = C.lib + var Base = C_lib.Base + var C_enc = C.enc + var Utf8 = C_enc.Utf8 + var C_algo = C.algo /** * HMAC algorithm. @@ -1917,42 +1898,42 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ init: function (hasher, key) { // Init hasher - hasher = this._hasher = new hasher.init(); + hasher = this._hasher = new hasher.init() // Convert string to WordArray, else assume WordArray already - if (typeof key == 'string') { - key = Utf8.parse(key); + if (typeof key === 'string') { + key = Utf8.parse(key) } // Shortcuts - var hasherBlockSize = hasher.blockSize; - var hasherBlockSizeBytes = hasherBlockSize * 4; + var hasherBlockSize = hasher.blockSize + var hasherBlockSizeBytes = hasherBlockSize * 4 // Allow arbitrary length keys if (key.sigBytes > hasherBlockSizeBytes) { - key = hasher.finalize(key); + key = hasher.finalize(key) } // Clamp excess bits - key.clamp(); + key.clamp() // Clone key for inner and outer pads - var oKey = this._oKey = key.clone(); - var iKey = this._iKey = key.clone(); + var oKey = this._oKey = key.clone() + var iKey = this._iKey = key.clone() // Shortcuts - var oKeyWords = oKey.words; - var iKeyWords = iKey.words; + var oKeyWords = oKey.words + var iKeyWords = iKey.words // XOR keys with pad constants for (var i = 0; i < hasherBlockSize; i++) { - oKeyWords[i] ^= 0x5c5c5c5c; - iKeyWords[i] ^= 0x36363636; + oKeyWords[i] ^= 0x5c5c5c5c + iKeyWords[i] ^= 0x36363636 } - oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; + oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes // Set initial values - this.reset(); + this.reset() }, /** @@ -1964,11 +1945,11 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ reset: function () { // Shortcut - var hasher = this._hasher; + var hasher = this._hasher // Reset - hasher.reset(); - hasher.update(this._iKey); + hasher.reset() + hasher.update(this._iKey) }, /** @@ -1984,10 +1965,10 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * hmacHasher.update(wordArray); */ update: function (messageUpdate) { - this._hasher.update(messageUpdate); + this._hasher.update(messageUpdate) // Chainable - return this; + return this }, /** @@ -2006,28 +1987,27 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ finalize: function (messageUpdate) { // Shortcut - var hasher = this._hasher; + var hasher = this._hasher // Compute HMAC - var innerHash = hasher.finalize(messageUpdate); - hasher.reset(); - var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); + var innerHash = hasher.finalize(messageUpdate) + hasher.reset() + var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)) - return hmac; + return hmac } - }); + }) }()); - (function () { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var SHA1 = C_algo.SHA1; - var HMAC = C_algo.HMAC; + var C = CryptoJS + var C_lib = C.lib + var Base = C_lib.Base + var WordArray = C_lib.WordArray + var C_algo = C.algo + var SHA1 = C_algo.SHA1 + var HMAC = C_algo.HMAC /** * Password-Based Key Derivation Function 2 algorithm. @@ -2041,7 +2021,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * @property {number} iterations The number of iterations to perform. Default: 1 */ cfg: Base.extend({ - keySize: 128/32, + keySize: 128 / 32, hasher: SHA1, iterations: 1 }), @@ -2058,7 +2038,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); */ init: function (cfg) { - this.cfg = this.cfg.extend(cfg); + this.cfg = this.cfg.extend(cfg) }, /** @@ -2075,53 +2055,53 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ compute: function (password, salt) { // Shortcut - var cfg = this.cfg; + var cfg = this.cfg // Init HMAC - var hmac = HMAC.create(cfg.hasher, password); + var hmac = HMAC.create(cfg.hasher, password) // Initial values - var derivedKey = WordArray.create(); - var blockIndex = WordArray.create([0x00000001]); + var derivedKey = WordArray.create() + var blockIndex = WordArray.create([0x00000001]) // Shortcuts - var derivedKeyWords = derivedKey.words; - var blockIndexWords = blockIndex.words; - var keySize = cfg.keySize; - var iterations = cfg.iterations; + var derivedKeyWords = derivedKey.words + var blockIndexWords = blockIndex.words + var keySize = cfg.keySize + var iterations = cfg.iterations // Generate key while (derivedKeyWords.length < keySize) { - var block = hmac.update(salt).finalize(blockIndex); - hmac.reset(); + var block = hmac.update(salt).finalize(blockIndex) + hmac.reset() // Shortcuts - var blockWords = block.words; - var blockWordsLength = blockWords.length; + var blockWords = block.words + var blockWordsLength = blockWords.length // Iterations - var intermediate = block; + var intermediate = block for (var i = 1; i < iterations; i++) { - intermediate = hmac.finalize(intermediate); - hmac.reset(); + intermediate = hmac.finalize(intermediate) + hmac.reset() // Shortcut - var intermediateWords = intermediate.words; + var intermediateWords = intermediate.words // XOR intermediate with block for (var j = 0; j < blockWordsLength; j++) { - blockWords[j] ^= intermediateWords[j]; + blockWords[j] ^= intermediateWords[j] } } - derivedKey.concat(block); - blockIndexWords[0]++; + derivedKey.concat(block) + blockIndexWords[0]++ } - derivedKey.sigBytes = keySize * 4; + derivedKey.sigBytes = keySize * 4 - return derivedKey; + return derivedKey } - }); + }) /** * Computes the Password-Based Key Derivation Function 2. @@ -2141,19 +2121,18 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); */ C.PBKDF2 = function (password, salt, cfg) { - return PBKDF2.create(cfg).compute(password, salt); - }; + return PBKDF2.create(cfg).compute(password, salt) + } }()); - (function () { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var MD5 = C_algo.MD5; + var C = CryptoJS + var C_lib = C.lib + var Base = C_lib.Base + var WordArray = C_lib.WordArray + var C_algo = C.algo + var MD5 = C_algo.MD5 /** * This key derivation function is meant to conform with EVP_BytesToKey. @@ -2168,7 +2147,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * @property {number} iterations The number of iterations to perform. Default: 1 */ cfg: Base.extend({ - keySize: 128/32, + keySize: 128 / 32, hasher: MD5, iterations: 1 }), @@ -2185,7 +2164,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); */ init: function (cfg) { - this.cfg = this.cfg.extend(cfg); + this.cfg = this.cfg.extend(cfg) }, /** @@ -2202,40 +2181,40 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ compute: function (password, salt) { // Shortcut - var cfg = this.cfg; + var cfg = this.cfg // Init hasher - var hasher = cfg.hasher.create(); + var hasher = cfg.hasher.create() // Initial values - var derivedKey = WordArray.create(); + var derivedKey = WordArray.create() // Shortcuts - var derivedKeyWords = derivedKey.words; - var keySize = cfg.keySize; - var iterations = cfg.iterations; + var derivedKeyWords = derivedKey.words + var keySize = cfg.keySize + var iterations = cfg.iterations // Generate key while (derivedKeyWords.length < keySize) { if (block) { - hasher.update(block); + hasher.update(block) } - var block = hasher.update(password).finalize(salt); - hasher.reset(); + var block = hasher.update(password).finalize(salt) + hasher.reset() // Iterations for (var i = 1; i < iterations; i++) { - block = hasher.finalize(block); - hasher.reset(); + block = hasher.finalize(block) + hasher.reset() } - derivedKey.concat(block); + derivedKey.concat(block) } - derivedKey.sigBytes = keySize * 4; + derivedKey.sigBytes = keySize * 4 - return derivedKey; + return derivedKey } - }); + }) /** * Derives a key from a password. @@ -2255,18 +2234,17 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); */ C.EvpKDF = function (password, salt, cfg) { - return EvpKDF.create(cfg).compute(password, salt); - }; + return EvpKDF.create(cfg).compute(password, salt) + } }()); - (function () { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var SHA256 = C_algo.SHA256; + var C = CryptoJS + var C_lib = C.lib + var WordArray = C_lib.WordArray + var C_algo = C.algo + var SHA256 = C_algo.SHA256 /** * SHA-224 hash algorithm. @@ -2276,17 +2254,17 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { this._hash = new WordArray.init([ 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 - ]); + ]) }, _doFinalize: function () { - var hash = SHA256._doFinalize.call(this); + var hash = SHA256._doFinalize.call(this) - hash.sigBytes -= 4; + hash.sigBytes -= 4 - return hash; + return hash } - }); + }) /** * Shortcut function to the hasher's object interface. @@ -2302,7 +2280,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var hash = CryptoJS.SHA224('message'); * var hash = CryptoJS.SHA224(wordArray); */ - C.SHA224 = SHA256._createHelper(SHA224); + C.SHA224 = SHA256._createHelper(SHA224) /** * Shortcut function to the HMAC's object interface. @@ -2318,21 +2296,20 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * * var hmac = CryptoJS.HmacSHA224(message, key); */ - C.HmacSHA224 = SHA256._createHmacHelper(SHA224); + C.HmacSHA224 = SHA256._createHmacHelper(SHA224) }()); - (function (undefined) { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var X32WordArray = C_lib.WordArray; + var C = CryptoJS + var C_lib = C.lib + var Base = C_lib.Base + var X32WordArray = C_lib.WordArray /** * x64 namespace. */ - var C_x64 = C.x64 = {}; + var C_x64 = C.x64 = {} /** * A 64-bit word. @@ -2349,8 +2326,8 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); */ init: function (high, low) { - this.high = high; - this.low = low; + this.high = high + this.low = low } /** @@ -2517,7 +2494,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { // return X64Word.create(high, low); // } - }); + }) /** * An array of 64-bit words. @@ -2547,12 +2524,12 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * ], 10); */ init: function (words, sigBytes) { - words = this.words = words || []; + words = this.words = words || [] if (sigBytes != undefined) { - this.sigBytes = sigBytes; + this.sigBytes = sigBytes } else { - this.sigBytes = words.length * 8; + this.sigBytes = words.length * 8 } }, @@ -2567,18 +2544,18 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { */ toX32: function () { // Shortcuts - var x64Words = this.words; - var x64WordsLength = x64Words.length; + var x64Words = this.words + var x64WordsLength = x64Words.length // Convert - var x32Words = []; + var x32Words = [] for (var i = 0; i < x64WordsLength; i++) { - var x64Word = x64Words[i]; - x32Words.push(x64Word.high); - x32Words.push(x64Word.low); + var x64Word = x64Words[i] + x32Words.push(x64Word.high) + x32Words.push(x64Word.low) } - return X32WordArray.create(x32Words, this.sigBytes); + return X32WordArray.create(x32Words, this.sigBytes) }, /** @@ -2591,94 +2568,93 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var clone = x64WordArray.clone(); */ clone: function () { - var clone = Base.clone.call(this); + var clone = Base.clone.call(this) // Clone "words" array - var words = clone.words = this.words.slice(0); + var words = clone.words = this.words.slice(0) // Clone each X64Word object - var wordsLength = words.length; + var wordsLength = words.length for (var i = 0; i < wordsLength; i++) { - words[i] = words[i].clone(); + words[i] = words[i].clone() } - return clone; + return clone } - }); + }) }()); - (function (Math) { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var C_algo = C.algo; + var C = CryptoJS + var C_lib = C.lib + var WordArray = C_lib.WordArray + var Hasher = C_lib.Hasher + var C_x64 = C.x64 + var X64Word = C_x64.Word + var C_algo = C.algo // Constants tables - var RHO_OFFSETS = []; - var PI_INDEXES = []; + var RHO_OFFSETS = [] + var PI_INDEXES = [] var ROUND_CONSTANTS = []; // Compute Constants (function () { // Compute rho offset constants - var x = 1, y = 0; + var x = 1; var y = 0 for (var t = 0; t < 24; t++) { - RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; + RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64 - var newX = y % 5; - var newY = (2 * x + 3 * y) % 5; - x = newX; - y = newY; + var newX = y % 5 + var newY = (2 * x + 3 * y) % 5 + x = newX + y = newY } // Compute pi index constants for (var x = 0; x < 5; x++) { for (var y = 0; y < 5; y++) { - PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; + PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5 } } // Compute round constants - var LFSR = 0x01; + var LFSR = 0x01 for (var i = 0; i < 24; i++) { - var roundConstantMsw = 0; - var roundConstantLsw = 0; + var roundConstantMsw = 0 + var roundConstantLsw = 0 for (var j = 0; j < 7; j++) { if (LFSR & 0x01) { - var bitPosition = (1 << j) - 1; + var bitPosition = (1 << j) - 1 if (bitPosition < 32) { - roundConstantLsw ^= 1 << bitPosition; + roundConstantLsw ^= 1 << bitPosition } else /* if (bitPosition >= 32) */ { - roundConstantMsw ^= 1 << (bitPosition - 32); + roundConstantMsw ^= 1 << (bitPosition - 32) } } // Compute next LFSR if (LFSR & 0x80) { // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 - LFSR = (LFSR << 1) ^ 0x71; + LFSR = (LFSR << 1) ^ 0x71 } else { - LFSR <<= 1; + LFSR <<= 1 } } - ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); + ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw) } - }()); + }()) // Reusable objects for temporary values var T = []; (function () { for (var i = 0; i < 25; i++) { - T[i] = X64Word.create(); + T[i] = X64Word.create() } - }()); + }()) /** * SHA-3 hash algorithm. @@ -2699,37 +2675,37 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { _doReset: function () { var state = this._state = [] for (var i = 0; i < 25; i++) { - state[i] = new X64Word.init(); + state[i] = new X64Word.init() } - this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; + this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (M, offset) { // Shortcuts - var state = this._state; - var nBlockSizeLanes = this.blockSize / 2; + var state = this._state + var nBlockSizeLanes = this.blockSize / 2 // Absorb for (var i = 0; i < nBlockSizeLanes; i++) { // Shortcuts - var M2i = M[offset + 2 * i]; - var M2i1 = M[offset + 2 * i + 1]; + var M2i = M[offset + 2 * i] + var M2i1 = M[offset + 2 * i + 1] // Swap endian M2i = ( - (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | - (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) - ); + (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | + (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) + ) M2i1 = ( - (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | - (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) - ); + (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | + (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) + ) // Absorb message into state - var lane = state[i]; - lane.high ^= M2i1; - lane.low ^= M2i; + var lane = state[i] + lane.high ^= M2i1 + lane.low ^= M2i } // Rounds @@ -2737,147 +2713,147 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { // Theta for (var x = 0; x < 5; x++) { // Mix column lanes - var tMsw = 0, tLsw = 0; + var tMsw = 0; var tLsw = 0 for (var y = 0; y < 5; y++) { - var lane = state[x + 5 * y]; - tMsw ^= lane.high; - tLsw ^= lane.low; + var lane = state[x + 5 * y] + tMsw ^= lane.high + tLsw ^= lane.low } // Temporary values - var Tx = T[x]; - Tx.high = tMsw; - Tx.low = tLsw; + var Tx = T[x] + Tx.high = tMsw + Tx.low = tLsw } for (var x = 0; x < 5; x++) { // Shortcuts - var Tx4 = T[(x + 4) % 5]; - var Tx1 = T[(x + 1) % 5]; - var Tx1Msw = Tx1.high; - var Tx1Lsw = Tx1.low; + var Tx4 = T[(x + 4) % 5] + var Tx1 = T[(x + 1) % 5] + var Tx1Msw = Tx1.high + var Tx1Lsw = Tx1.low // Mix surrounding columns - var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); - var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); + var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)) + var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)) for (var y = 0; y < 5; y++) { - var lane = state[x + 5 * y]; - lane.high ^= tMsw; - lane.low ^= tLsw; + var lane = state[x + 5 * y] + lane.high ^= tMsw + lane.low ^= tLsw } } // Rho Pi for (var laneIndex = 1; laneIndex < 25; laneIndex++) { // Shortcuts - var lane = state[laneIndex]; - var laneMsw = lane.high; - var laneLsw = lane.low; - var rhoOffset = RHO_OFFSETS[laneIndex]; + var lane = state[laneIndex] + var laneMsw = lane.high + var laneLsw = lane.low + var rhoOffset = RHO_OFFSETS[laneIndex] // Rotate lanes if (rhoOffset < 32) { - var tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); - var tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); + var tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)) + var tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)) } else /* if (rhoOffset >= 32) */ { - var tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); - var tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); + var tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)) + var tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)) } // Transpose lanes - var TPiLane = T[PI_INDEXES[laneIndex]]; - TPiLane.high = tMsw; - TPiLane.low = tLsw; + var TPiLane = T[PI_INDEXES[laneIndex]] + TPiLane.high = tMsw + TPiLane.low = tLsw } // Rho pi at x = y = 0 - var T0 = T[0]; - var state0 = state[0]; - T0.high = state0.high; - T0.low = state0.low; + var T0 = T[0] + var state0 = state[0] + T0.high = state0.high + T0.low = state0.low // Chi for (var x = 0; x < 5; x++) { for (var y = 0; y < 5; y++) { // Shortcuts - var laneIndex = x + 5 * y; - var lane = state[laneIndex]; - var TLane = T[laneIndex]; - var Tx1Lane = T[((x + 1) % 5) + 5 * y]; - var Tx2Lane = T[((x + 2) % 5) + 5 * y]; + var laneIndex = x + 5 * y + var lane = state[laneIndex] + var TLane = T[laneIndex] + var Tx1Lane = T[((x + 1) % 5) + 5 * y] + var Tx2Lane = T[((x + 2) % 5) + 5 * y] // Mix rows - lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); - lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); + lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high) + lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low) } } // Iota - var lane = state[0]; - var roundConstant = ROUND_CONSTANTS[round]; - lane.high ^= roundConstant.high; - lane.low ^= roundConstant.low;; + var lane = state[0] + var roundConstant = ROUND_CONSTANTS[round] + lane.high ^= roundConstant.high + lane.low ^= roundConstant.low } }, _doFinalize: function () { // Shortcuts - var data = this._data; - var dataWords = data.words; - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - var blockSizeBits = this.blockSize * 32; + var data = this._data + var dataWords = data.words + var nBitsTotal = this._nDataBytes * 8 + var nBitsLeft = data.sigBytes * 8 + var blockSizeBits = this.blockSize * 32 // Add padding - dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); - dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; - data.sigBytes = dataWords.length * 4; + dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32) + dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80 + data.sigBytes = dataWords.length * 4 // Hash final blocks - this._process(); + this._process() // Shortcuts - var state = this._state; - var outputLengthBytes = this.cfg.outputLength / 8; - var outputLengthLanes = outputLengthBytes / 8; + var state = this._state + var outputLengthBytes = this.cfg.outputLength / 8 + var outputLengthLanes = outputLengthBytes / 8 // Squeeze - var hashWords = []; + var hashWords = [] for (var i = 0; i < outputLengthLanes; i++) { // Shortcuts - var lane = state[i]; - var laneMsw = lane.high; - var laneLsw = lane.low; + var lane = state[i] + var laneMsw = lane.high + var laneLsw = lane.low // Swap endian laneMsw = ( - (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | - (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) - ); + (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | + (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) + ) laneLsw = ( - (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | - (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) - ); + (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | + (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) + ) // Squeeze state to retrieve hash - hashWords.push(laneLsw); - hashWords.push(laneMsw); + hashWords.push(laneLsw) + hashWords.push(laneMsw) } // Return final computed hash - return new WordArray.init(hashWords, outputLengthBytes); + return new WordArray.init(hashWords, outputLengthBytes) }, clone: function () { - var clone = Hasher.clone.call(this); + var clone = Hasher.clone.call(this) - var state = clone._state = this._state.slice(0); + var state = clone._state = this._state.slice(0) for (var i = 0; i < 25; i++) { - state[i] = state[i].clone(); + state[i] = state[i].clone() } - return clone; + return clone } - }); + }) /** * Shortcut function to the hasher's object interface. @@ -2893,7 +2869,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var hash = CryptoJS.SHA3('message'); * var hash = CryptoJS.SHA3(wordArray); */ - C.SHA3 = Hasher._createHelper(SHA3); + C.SHA3 = Hasher._createHelper(SHA3) /** * Shortcut function to the HMAC's object interface. @@ -2909,22 +2885,21 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * * var hmac = CryptoJS.HmacSHA3(message, key); */ - C.HmacSHA3 = Hasher._createHmacHelper(SHA3); + C.HmacSHA3 = Hasher._createHmacHelper(SHA3) }(Math)); - (function () { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Hasher = C_lib.Hasher; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var X64WordArray = C_x64.WordArray; - var C_algo = C.algo; + var C = CryptoJS + var C_lib = C.lib + var Hasher = C_lib.Hasher + var C_x64 = C.x64 + var X64Word = C_x64.Word + var X64WordArray = C_x64.WordArray + var C_algo = C.algo - function X64Word_create() { - return X64Word.create.apply(X64Word, arguments); + function X64Word_create () { + return X64Word.create.apply(X64Word, arguments) } // Constants @@ -2969,15 +2944,15 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) - ]; + ] // Reusable objects var W = []; (function () { for (var i = 0; i < 80; i++) { - W[i] = X64Word_create(); + W[i] = X64Word_create() } - }()); + }()) /** * SHA-512 hash algorithm. @@ -2989,200 +2964,200 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) - ]); + ]) }, _doProcessBlock: function (M, offset) { // Shortcuts - var H = this._hash.words; + var H = this._hash.words - var H0 = H[0]; - var H1 = H[1]; - var H2 = H[2]; - var H3 = H[3]; - var H4 = H[4]; - var H5 = H[5]; - var H6 = H[6]; - var H7 = H[7]; + var H0 = H[0] + var H1 = H[1] + var H2 = H[2] + var H3 = H[3] + var H4 = H[4] + var H5 = H[5] + var H6 = H[6] + var H7 = H[7] - var H0h = H0.high; - var H0l = H0.low; - var H1h = H1.high; - var H1l = H1.low; - var H2h = H2.high; - var H2l = H2.low; - var H3h = H3.high; - var H3l = H3.low; - var H4h = H4.high; - var H4l = H4.low; - var H5h = H5.high; - var H5l = H5.low; - var H6h = H6.high; - var H6l = H6.low; - var H7h = H7.high; - var H7l = H7.low; + var H0h = H0.high + var H0l = H0.low + var H1h = H1.high + var H1l = H1.low + var H2h = H2.high + var H2l = H2.low + var H3h = H3.high + var H3l = H3.low + var H4h = H4.high + var H4l = H4.low + var H5h = H5.high + var H5l = H5.low + var H6h = H6.high + var H6l = H6.low + var H7h = H7.high + var H7l = H7.low // Working variables - var ah = H0h; - var al = H0l; - var bh = H1h; - var bl = H1l; - var ch = H2h; - var cl = H2l; - var dh = H3h; - var dl = H3l; - var eh = H4h; - var el = H4l; - var fh = H5h; - var fl = H5l; - var gh = H6h; - var gl = H6l; - var hh = H7h; - var hl = H7l; + var ah = H0h + var al = H0l + var bh = H1h + var bl = H1l + var ch = H2h + var cl = H2l + var dh = H3h + var dl = H3l + var eh = H4h + var el = H4l + var fh = H5h + var fl = H5l + var gh = H6h + var gl = H6l + var hh = H7h + var hl = H7l // Rounds for (var i = 0; i < 80; i++) { // Shortcut - var Wi = W[i]; + var Wi = W[i] // Extend message if (i < 16) { - var Wih = Wi.high = M[offset + i * 2] | 0; - var Wil = Wi.low = M[offset + i * 2 + 1] | 0; + var Wih = Wi.high = M[offset + i * 2] | 0 + var Wil = Wi.low = M[offset + i * 2 + 1] | 0 } else { // Gamma0 - var gamma0x = W[i - 15]; - var gamma0xh = gamma0x.high; - var gamma0xl = gamma0x.low; - var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); - var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); + var gamma0x = W[i - 15] + var gamma0xh = gamma0x.high + var gamma0xl = gamma0x.low + var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7) + var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)) // Gamma1 - var gamma1x = W[i - 2]; - var gamma1xh = gamma1x.high; - var gamma1xl = gamma1x.low; - var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); - var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); + var gamma1x = W[i - 2] + var gamma1xh = gamma1x.high + var gamma1xl = gamma1x.low + var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6) + var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)) // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] - var Wi7 = W[i - 7]; - var Wi7h = Wi7.high; - var Wi7l = Wi7.low; + var Wi7 = W[i - 7] + var Wi7h = Wi7.high + var Wi7l = Wi7.low - var Wi16 = W[i - 16]; - var Wi16h = Wi16.high; - var Wi16l = Wi16.low; + var Wi16 = W[i - 16] + var Wi16h = Wi16.high + var Wi16l = Wi16.low - var Wil = gamma0l + Wi7l; - var Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); - var Wil = Wil + gamma1l; - var Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); - var Wil = Wil + Wi16l; - var Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); + var Wil = gamma0l + Wi7l + var Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0) + var Wil = Wil + gamma1l + var Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0) + var Wil = Wil + Wi16l + var Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0) - Wi.high = Wih; - Wi.low = Wil; + Wi.high = Wih + Wi.low = Wil } - var chh = (eh & fh) ^ (~eh & gh); - var chl = (el & fl) ^ (~el & gl); - var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); - var majl = (al & bl) ^ (al & cl) ^ (bl & cl); + var chh = (eh & fh) ^ (~eh & gh) + var chl = (el & fl) ^ (~el & gl) + var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch) + var majl = (al & bl) ^ (al & cl) ^ (bl & cl) - var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); - var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); - var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); - var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); + var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)) + var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)) + var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)) + var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)) // t1 = h + sigma1 + ch + K[i] + W[i] - var Ki = K[i]; - var Kih = Ki.high; - var Kil = Ki.low; + var Ki = K[i] + var Kih = Ki.high + var Kil = Ki.low - var t1l = hl + sigma1l; - var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); - var t1l = t1l + chl; - var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); - var t1l = t1l + Kil; - var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); - var t1l = t1l + Wil; - var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); + var t1l = hl + sigma1l + var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0) + var t1l = t1l + chl + var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0) + var t1l = t1l + Kil + var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0) + var t1l = t1l + Wil + var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0) // t2 = sigma0 + maj - var t2l = sigma0l + majl; - var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); + var t2l = sigma0l + majl + var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0) // Update working variables - hh = gh; - hl = gl; - gh = fh; - gl = fl; - fh = eh; - fl = el; - el = (dl + t1l) | 0; - eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; - dh = ch; - dl = cl; - ch = bh; - cl = bl; - bh = ah; - bl = al; - al = (t1l + t2l) | 0; - ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; + hh = gh + hl = gl + gh = fh + gl = fl + fh = eh + fl = el + el = (dl + t1l) | 0 + eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0 + dh = ch + dl = cl + ch = bh + cl = bl + bh = ah + bl = al + al = (t1l + t2l) | 0 + ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0 } // Intermediate hash value - H0l = H0.low = (H0l + al); - H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); - H1l = H1.low = (H1l + bl); - H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); - H2l = H2.low = (H2l + cl); - H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); - H3l = H3.low = (H3l + dl); - H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); - H4l = H4.low = (H4l + el); - H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); - H5l = H5.low = (H5l + fl); - H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); - H6l = H6.low = (H6l + gl); - H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); - H7l = H7.low = (H7l + hl); - H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); + H0l = H0.low = (H0l + al) + H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)) + H1l = H1.low = (H1l + bl) + H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)) + H2l = H2.low = (H2l + cl) + H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)) + H3l = H3.low = (H3l + dl) + H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)) + H4l = H4.low = (H4l + el) + H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)) + H5l = H5.low = (H5l + fl) + H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)) + H6l = H6.low = (H6l + gl) + H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)) + H7l = H7.low = (H7l + hl) + H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)) }, _doFinalize: function () { // Shortcuts - var data = this._data; - var dataWords = data.words; + var data = this._data + var dataWords = data.words - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; + var nBitsTotal = this._nDataBytes * 8 + var nBitsLeft = data.sigBytes * 8 // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; - data.sigBytes = dataWords.length * 4; + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32) + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000) + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal + data.sigBytes = dataWords.length * 4 // Hash final blocks - this._process(); + this._process() // Convert hash to 32-bit word array before returning - var hash = this._hash.toX32(); + var hash = this._hash.toX32() // Return final computed hash - return hash; + return hash }, clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); + var clone = Hasher.clone.call(this) + clone._hash = this._hash.clone() - return clone; + return clone }, - blockSize: 1024/32 - }); + blockSize: 1024 / 32 + }) /** * Shortcut function to the hasher's object interface. @@ -3198,7 +3173,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var hash = CryptoJS.SHA512('message'); * var hash = CryptoJS.SHA512(wordArray); */ - C.SHA512 = Hasher._createHelper(SHA512); + C.SHA512 = Hasher._createHelper(SHA512) /** * Shortcut function to the HMAC's object interface. @@ -3214,18 +3189,17 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * * var hmac = CryptoJS.HmacSHA512(message, key); */ - C.HmacSHA512 = Hasher._createHmacHelper(SHA512); + C.HmacSHA512 = Hasher._createHmacHelper(SHA512) }()); - (function () { // Shortcuts - var C = CryptoJS; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var X64WordArray = C_x64.WordArray; - var C_algo = C.algo; - var SHA512 = C_algo.SHA512; + var C = CryptoJS + var C_x64 = C.x64 + var X64Word = C_x64.Word + var X64WordArray = C_x64.WordArray + var C_algo = C.algo + var SHA512 = C_algo.SHA512 /** * SHA-384 hash algorithm. @@ -3237,17 +3211,17 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) - ]); + ]) }, _doFinalize: function () { - var hash = SHA512._doFinalize.call(this); + var hash = SHA512._doFinalize.call(this) - hash.sigBytes -= 16; + hash.sigBytes -= 16 - return hash; + return hash } - }); + }) /** * Shortcut function to the hasher's object interface. @@ -3263,7 +3237,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * var hash = CryptoJS.SHA384('message'); * var hash = CryptoJS.SHA384(wordArray); */ - C.SHA384 = SHA512._createHelper(SHA384); + C.SHA384 = SHA512._createHelper(SHA384) /** * Shortcut function to the HMAC's object interface. @@ -3279,25 +3253,24 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { * * var hmac = CryptoJS.HmacSHA384(message, key); */ - C.HmacSHA384 = SHA512._createHmacHelper(SHA384); -}()); - + C.HmacSHA384 = SHA512._createHmacHelper(SHA384) +}()) /** * Cipher core components. */ CryptoJS.lib.Cipher || (function (undefined) { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; - var C_enc = C.enc; - var Utf8 = C_enc.Utf8; - var Base64 = C_enc.Base64; - var C_algo = C.algo; - var EvpKDF = C_algo.EvpKDF; + var C = CryptoJS + var C_lib = C.lib + var Base = C_lib.Base + var WordArray = C_lib.WordArray + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm + var C_enc = C.enc + var Utf8 = C_enc.Utf8 + var Base64 = C_enc.Base64 + var C_algo = C.algo + var EvpKDF = C_algo.EvpKDF /** * Abstract base cipher template. @@ -3330,7 +3303,7 @@ CryptoJS.lib.Cipher || (function (undefined) { * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); */ createEncryptor: function (key, cfg) { - return this.create(this._ENC_XFORM_MODE, key, cfg); + return this.create(this._ENC_XFORM_MODE, key, cfg) }, /** @@ -3348,7 +3321,7 @@ CryptoJS.lib.Cipher || (function (undefined) { * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); */ createDecryptor: function (key, cfg) { - return this.create(this._DEC_XFORM_MODE, key, cfg); + return this.create(this._DEC_XFORM_MODE, key, cfg) }, /** @@ -3364,14 +3337,14 @@ CryptoJS.lib.Cipher || (function (undefined) { */ init: function (xformMode, key, cfg) { // Apply config defaults - this.cfg = this.cfg.extend(cfg); + this.cfg = this.cfg.extend(cfg) // Store transform mode and key - this._xformMode = xformMode; - this._key = key; + this._xformMode = xformMode + this._key = key // Set initial values - this.reset(); + this.reset() }, /** @@ -3383,10 +3356,10 @@ CryptoJS.lib.Cipher || (function (undefined) { */ reset: function () { // Reset data buffer - BufferedBlockAlgorithm.reset.call(this); + BufferedBlockAlgorithm.reset.call(this) // Perform concrete-cipher logic - this._doReset(); + this._doReset() }, /** @@ -3403,10 +3376,10 @@ CryptoJS.lib.Cipher || (function (undefined) { */ process: function (dataUpdate) { // Append - this._append(dataUpdate); + this._append(dataUpdate) // Process available blocks - return this._process(); + return this._process() }, /** @@ -3426,18 +3399,18 @@ CryptoJS.lib.Cipher || (function (undefined) { finalize: function (dataUpdate) { // Final data update if (dataUpdate) { - this._append(dataUpdate); + this._append(dataUpdate) } // Perform concrete-cipher logic - var finalProcessedData = this._doFinalize(); + var finalProcessedData = this._doFinalize() - return finalProcessedData; + return finalProcessedData }, - keySize: 128/32, + keySize: 128 / 32, - ivSize: 128/32, + ivSize: 128 / 32, _ENC_XFORM_MODE: 1, @@ -3457,27 +3430,27 @@ CryptoJS.lib.Cipher || (function (undefined) { * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); */ _createHelper: (function () { - function selectCipherStrategy(key) { - if (typeof key == 'string') { - return PasswordBasedCipher; + function selectCipherStrategy (key) { + if (typeof key === 'string') { + return PasswordBasedCipher } else { - return SerializableCipher; + return SerializableCipher } } return function (cipher) { return { encrypt: function (message, key, cfg) { - return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); + return selectCipherStrategy(key).encrypt(cipher, message, key, cfg) }, decrypt: function (ciphertext, key, cfg) { - return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); + return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg) } - }; - }; + } + } }()) - }); + }) /** * Abstract base stream cipher template. @@ -3487,18 +3460,18 @@ CryptoJS.lib.Cipher || (function (undefined) { var StreamCipher = C_lib.StreamCipher = Cipher.extend({ _doFinalize: function () { // Process partial blocks - var finalProcessedBlocks = this._process(!!'flush'); + var finalProcessedBlocks = this._process(!!'flush') - return finalProcessedBlocks; + return finalProcessedBlocks }, blockSize: 1 - }); + }) /** * Mode namespace. */ - var C_mode = C.mode = {}; + var C_mode = C.mode = {} /** * Abstract base block cipher mode template. @@ -3517,7 +3490,7 @@ CryptoJS.lib.Cipher || (function (undefined) { * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); */ createEncryptor: function (cipher, iv) { - return this.Encryptor.create(cipher, iv); + return this.Encryptor.create(cipher, iv) }, /** @@ -3533,7 +3506,7 @@ CryptoJS.lib.Cipher || (function (undefined) { * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); */ createDecryptor: function (cipher, iv) { - return this.Decryptor.create(cipher, iv); + return this.Decryptor.create(cipher, iv) }, /** @@ -3547,10 +3520,10 @@ CryptoJS.lib.Cipher || (function (undefined) { * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); */ init: function (cipher, iv) { - this._cipher = cipher; - this._iv = iv; + this._cipher = cipher + this._iv = iv } - }); + }) /** * Cipher Block Chaining mode. @@ -3559,7 +3532,7 @@ CryptoJS.lib.Cipher || (function (undefined) { /** * Abstract base CBC mode. */ - var CBC = BlockCipherMode.extend(); + var CBC = BlockCipherMode.extend() /** * CBC encryptor. @@ -3577,17 +3550,17 @@ CryptoJS.lib.Cipher || (function (undefined) { */ processBlock: function (words, offset) { // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; + var cipher = this._cipher + var blockSize = cipher.blockSize // XOR and encrypt - xorBlock.call(this, words, offset, blockSize); - cipher.encryptBlock(words, offset); + xorBlock.call(this, words, offset, blockSize) + cipher.encryptBlock(words, offset) // Remember this block to use with next block - this._prevBlock = words.slice(offset, offset + blockSize); + this._prevBlock = words.slice(offset, offset + blockSize) } - }); + }) /** * CBC decryptor. @@ -3605,48 +3578,48 @@ CryptoJS.lib.Cipher || (function (undefined) { */ processBlock: function (words, offset) { // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; + var cipher = this._cipher + var blockSize = cipher.blockSize // Remember this block to use with next block - var thisBlock = words.slice(offset, offset + blockSize); + var thisBlock = words.slice(offset, offset + blockSize) // Decrypt and XOR - cipher.decryptBlock(words, offset); - xorBlock.call(this, words, offset, blockSize); + cipher.decryptBlock(words, offset) + xorBlock.call(this, words, offset, blockSize) // This block becomes the previous block - this._prevBlock = thisBlock; + this._prevBlock = thisBlock } - }); + }) - function xorBlock(words, offset, blockSize) { + function xorBlock (words, offset, blockSize) { // Shortcut - var iv = this._iv; + var iv = this._iv // Choose mixing block if (iv) { - var block = iv; + var block = iv // Remove IV for subsequent blocks - this._iv = undefined; + this._iv = undefined } else { - var block = this._prevBlock; + var block = this._prevBlock } // XOR blocks for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= block[i]; + words[offset + i] ^= block[i] } } - return CBC; - }()); + return CBC + }()) /** * Padding namespace. */ - var C_pad = C.pad = {}; + var C_pad = C.pad = {} /** * PKCS #5/7 padding strategy. @@ -3666,23 +3639,23 @@ CryptoJS.lib.Cipher || (function (undefined) { */ pad: function (data, blockSize) { // Shortcut - var blockSizeBytes = blockSize * 4; + var blockSizeBytes = blockSize * 4 // Count padding bytes - var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes // Create padding word - var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; + var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes // Create padding - var paddingWords = []; + var paddingWords = [] for (var i = 0; i < nPaddingBytes; i += 4) { - paddingWords.push(paddingWord); + paddingWords.push(paddingWord) } - var padding = WordArray.create(paddingWords, nPaddingBytes); + var padding = WordArray.create(paddingWords, nPaddingBytes) // Add padding - data.concat(padding); + data.concat(padding) }, /** @@ -3698,12 +3671,12 @@ CryptoJS.lib.Cipher || (function (undefined) { */ unpad: function (data) { // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff // Remove padding - data.sigBytes -= nPaddingBytes; + data.sigBytes -= nPaddingBytes } - }; + } /** * Abstract base block cipher template. @@ -3724,58 +3697,58 @@ CryptoJS.lib.Cipher || (function (undefined) { reset: function () { // Reset cipher - Cipher.reset.call(this); + Cipher.reset.call(this) // Shortcuts - var cfg = this.cfg; - var iv = cfg.iv; - var mode = cfg.mode; + var cfg = this.cfg + var iv = cfg.iv + var mode = cfg.mode // Reset block mode if (this._xformMode == this._ENC_XFORM_MODE) { - var modeCreator = mode.createEncryptor; + var modeCreator = mode.createEncryptor } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { - var modeCreator = mode.createDecryptor; + var modeCreator = mode.createDecryptor // Keep at least one block in the buffer for unpadding - this._minBufferSize = 1; + this._minBufferSize = 1 } if (this._mode && this._mode.__creator == modeCreator) { - this._mode.init(this, iv && iv.words); + this._mode.init(this, iv && iv.words) } else { - this._mode = modeCreator.call(mode, this, iv && iv.words); - this._mode.__creator = modeCreator; + this._mode = modeCreator.call(mode, this, iv && iv.words) + this._mode.__creator = modeCreator } }, _doProcessBlock: function (words, offset) { - this._mode.processBlock(words, offset); + this._mode.processBlock(words, offset) }, _doFinalize: function () { // Shortcut - var padding = this.cfg.padding; + var padding = this.cfg.padding // Finalize if (this._xformMode == this._ENC_XFORM_MODE) { // Pad data - padding.pad(this._data, this.blockSize); + padding.pad(this._data, this.blockSize) // Process final blocks - var finalProcessedBlocks = this._process(!!'flush'); + var finalProcessedBlocks = this._process(!!'flush') } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { // Process final blocks - var finalProcessedBlocks = this._process(!!'flush'); + var finalProcessedBlocks = this._process(!!'flush') // Unpad data - padding.unpad(finalProcessedBlocks); + padding.unpad(finalProcessedBlocks) } - return finalProcessedBlocks; + return finalProcessedBlocks }, - blockSize: 128/32 - }); + blockSize: 128 / 32 + }) /** * A collection of cipher parameters. @@ -3811,7 +3784,7 @@ CryptoJS.lib.Cipher || (function (undefined) { * }); */ init: function (cipherParams) { - this.mixIn(cipherParams); + this.mixIn(cipherParams) }, /** @@ -3830,14 +3803,14 @@ CryptoJS.lib.Cipher || (function (undefined) { * var string = cipherParams.toString(CryptoJS.format.OpenSSL); */ toString: function (formatter) { - return (formatter || this.formatter).stringify(this); + return (formatter || this.formatter).stringify(this) } - }); + }) /** * Format namespace. */ - var C_format = C.format = {}; + var C_format = C.format = {} /** * OpenSSL formatting strategy. @@ -3858,17 +3831,17 @@ CryptoJS.lib.Cipher || (function (undefined) { */ stringify: function (cipherParams) { // Shortcuts - var ciphertext = cipherParams.ciphertext; - var salt = cipherParams.salt; + var ciphertext = cipherParams.ciphertext + var salt = cipherParams.salt // Format if (salt) { - var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); + var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext) } else { - var wordArray = ciphertext; + var wordArray = ciphertext } - return wordArray.toString(Base64); + return wordArray.toString(Base64) }, /** @@ -3886,24 +3859,24 @@ CryptoJS.lib.Cipher || (function (undefined) { */ parse: function (openSSLStr) { // Parse base64 - var ciphertext = Base64.parse(openSSLStr); + var ciphertext = Base64.parse(openSSLStr) // Shortcut - var ciphertextWords = ciphertext.words; + var ciphertextWords = ciphertext.words // Test for salt if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { // Extract salt - var salt = WordArray.create(ciphertextWords.slice(2, 4)); + var salt = WordArray.create(ciphertextWords.slice(2, 4)) // Remove salt from ciphertext - ciphertextWords.splice(0, 4); - ciphertext.sigBytes -= 16; + ciphertextWords.splice(0, 4) + ciphertext.sigBytes -= 16 } - return CipherParams.create({ ciphertext: ciphertext, salt: salt }); + return CipherParams.create({ ciphertext: ciphertext, salt: salt }) } - }; + } /** * A cipher wrapper that returns ciphertext as a serializable cipher params object. @@ -3938,14 +3911,14 @@ CryptoJS.lib.Cipher || (function (undefined) { */ encrypt: function (cipher, message, key, cfg) { // Apply config defaults - cfg = this.cfg.extend(cfg); + cfg = this.cfg.extend(cfg) // Encrypt - var encryptor = cipher.createEncryptor(key, cfg); - var ciphertext = encryptor.finalize(message); + var encryptor = cipher.createEncryptor(key, cfg) + var ciphertext = encryptor.finalize(message) // Shortcut - var cipherCfg = encryptor.cfg; + var cipherCfg = encryptor.cfg // Create and return serializable cipher params return CipherParams.create({ @@ -3957,7 +3930,7 @@ CryptoJS.lib.Cipher || (function (undefined) { padding: cipherCfg.padding, blockSize: cipher.blockSize, formatter: cfg.format - }); + }) }, /** @@ -3979,15 +3952,15 @@ CryptoJS.lib.Cipher || (function (undefined) { */ decrypt: function (cipher, ciphertext, key, cfg) { // Apply config defaults - cfg = this.cfg.extend(cfg); + cfg = this.cfg.extend(cfg) // Convert string to CipherParams - ciphertext = this._parse(ciphertext, cfg.format); + ciphertext = this._parse(ciphertext, cfg.format) // Decrypt - var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); + var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext) - return plaintext; + return plaintext }, /** @@ -4006,18 +3979,18 @@ CryptoJS.lib.Cipher || (function (undefined) { * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); */ _parse: function (ciphertext, format) { - if (typeof ciphertext == 'string') { - return format.parse(ciphertext, this); + if (typeof ciphertext === 'string') { + return format.parse(ciphertext, this) } else { - return ciphertext; + return ciphertext } } - }); + }) /** * Key derivation function namespace. */ - var C_kdf = C.kdf = {}; + var C_kdf = C.kdf = {} /** * OpenSSL key derivation function. @@ -4043,20 +4016,20 @@ CryptoJS.lib.Cipher || (function (undefined) { execute: function (password, keySize, ivSize, salt) { // Generate random salt if (!salt) { - salt = WordArray.random(64/8); + salt = WordArray.random(64 / 8) } // Derive key and IV - var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); + var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt) // Separate key and IV - var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); - key.sigBytes = keySize * 4; + var iv = WordArray.create(key.words.slice(keySize), ivSize * 4) + key.sigBytes = keySize * 4 // Return params - return CipherParams.create({ key: key, iv: iv, salt: salt }); + return CipherParams.create({ key: key, iv: iv, salt: salt }) } - }; + } /** * A serializable cipher wrapper that derives the key from a password, @@ -4091,21 +4064,21 @@ CryptoJS.lib.Cipher || (function (undefined) { */ encrypt: function (cipher, message, password, cfg) { // Apply config defaults - cfg = this.cfg.extend(cfg); + cfg = this.cfg.extend(cfg) // Derive key and other params - var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize); + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize) // Add IV to config - cfg.iv = derivedParams.iv; + cfg.iv = derivedParams.iv // Encrypt - var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); + var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg) // Mix in derived params - ciphertext.mixIn(derivedParams); + ciphertext.mixIn(derivedParams) - return ciphertext; + return ciphertext }, /** @@ -4127,107 +4100,104 @@ CryptoJS.lib.Cipher || (function (undefined) { */ decrypt: function (cipher, ciphertext, password, cfg) { // Apply config defaults - cfg = this.cfg.extend(cfg); + cfg = this.cfg.extend(cfg) // Convert string to CipherParams - ciphertext = this._parse(ciphertext, cfg.format); + ciphertext = this._parse(ciphertext, cfg.format) // Derive key and other params - var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt); + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt) // Add IV to config - cfg.iv = derivedParams.iv; + cfg.iv = derivedParams.iv // Decrypt - var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); + var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg) - return plaintext; + return plaintext } - }); -}()); - + }) +}()) /** * Cipher Feedback block mode. */ CryptoJS.mode.CFB = (function () { - var CFB = CryptoJS.lib.BlockCipherMode.extend(); + var CFB = CryptoJS.lib.BlockCipherMode.extend() CFB.Encryptor = CFB.extend({ processBlock: function (words, offset) { // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; + var cipher = this._cipher + var blockSize = cipher.blockSize - generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher) // Remember this block to use with next block - this._prevBlock = words.slice(offset, offset + blockSize); + this._prevBlock = words.slice(offset, offset + blockSize) } - }); + }) CFB.Decryptor = CFB.extend({ processBlock: function (words, offset) { // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; + var cipher = this._cipher + var blockSize = cipher.blockSize // Remember this block to use with next block - var thisBlock = words.slice(offset, offset + blockSize); + var thisBlock = words.slice(offset, offset + blockSize) - generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher) // This block becomes the previous block - this._prevBlock = thisBlock; + this._prevBlock = thisBlock } - }); + }) - function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { + function generateKeystreamAndEncrypt (words, offset, blockSize, cipher) { // Shortcut - var iv = this._iv; + var iv = this._iv // Generate keystream if (iv) { - var keystream = iv.slice(0); + var keystream = iv.slice(0) // Remove IV for subsequent blocks - this._iv = undefined; + this._iv = undefined } else { - var keystream = this._prevBlock; + var keystream = this._prevBlock } - cipher.encryptBlock(keystream, 0); + cipher.encryptBlock(keystream, 0) // Encrypt for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; + words[offset + i] ^= keystream[i] } } - return CFB; -}()); - + return CFB +}()) /** * Electronic Codebook block mode. */ CryptoJS.mode.ECB = (function () { - var ECB = CryptoJS.lib.BlockCipherMode.extend(); + var ECB = CryptoJS.lib.BlockCipherMode.extend() ECB.Encryptor = ECB.extend({ processBlock: function (words, offset) { - this._cipher.encryptBlock(words, offset); + this._cipher.encryptBlock(words, offset) } - }); + }) ECB.Decryptor = ECB.extend({ processBlock: function (words, offset) { - this._cipher.decryptBlock(words, offset); + this._cipher.decryptBlock(words, offset) } - }); - - return ECB; -}()); + }) + return ECB +}()) /** * ANSI X.923 padding strategy. @@ -4235,30 +4205,29 @@ CryptoJS.mode.ECB = (function () { CryptoJS.pad.AnsiX923 = { pad: function (data, blockSize) { // Shortcuts - var dataSigBytes = data.sigBytes; - var blockSizeBytes = blockSize * 4; + var dataSigBytes = data.sigBytes + var blockSizeBytes = blockSize * 4 // Count padding bytes - var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; + var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes // Compute last byte position - var lastBytePos = dataSigBytes + nPaddingBytes - 1; + var lastBytePos = dataSigBytes + nPaddingBytes - 1 // Pad - data.clamp(); - data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); - data.sigBytes += nPaddingBytes; + data.clamp() + data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8) + data.sigBytes += nPaddingBytes }, unpad: function (data) { // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff // Remove padding - data.sigBytes -= nPaddingBytes; + data.sigBytes -= nPaddingBytes } -}; - +} /** * ISO 10126 padding strategy. @@ -4266,25 +4235,24 @@ CryptoJS.pad.AnsiX923 = { CryptoJS.pad.Iso10126 = { pad: function (data, blockSize) { // Shortcut - var blockSizeBytes = blockSize * 4; + var blockSizeBytes = blockSize * 4 // Count padding bytes - var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes // Pad - data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). - concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); + data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)) + .concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)) }, unpad: function (data) { // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff // Remove padding - data.sigBytes -= nPaddingBytes; + data.sigBytes -= nPaddingBytes } -}; - +} /** * ISO/IEC 9797-1 Padding Method 2. @@ -4292,57 +4260,55 @@ CryptoJS.pad.Iso10126 = { CryptoJS.pad.Iso97971 = { pad: function (data, blockSize) { // Add 0x80 byte - data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); + data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)) // Zero pad the rest - CryptoJS.pad.ZeroPadding.pad(data, blockSize); + CryptoJS.pad.ZeroPadding.pad(data, blockSize) }, unpad: function (data) { // Remove zero padding - CryptoJS.pad.ZeroPadding.unpad(data); + CryptoJS.pad.ZeroPadding.unpad(data) // Remove one more byte -- the 0x80 byte - data.sigBytes--; + data.sigBytes-- } -}; - +} /** * Output Feedback block mode. */ CryptoJS.mode.OFB = (function () { - var OFB = CryptoJS.lib.BlockCipherMode.extend(); + var OFB = CryptoJS.lib.BlockCipherMode.extend() var Encryptor = OFB.Encryptor = OFB.extend({ processBlock: function (words, offset) { // Shortcuts var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var keystream = this._keystream; + var blockSize = cipher.blockSize + var iv = this._iv + var keystream = this._keystream // Generate keystream if (iv) { - keystream = this._keystream = iv.slice(0); + keystream = this._keystream = iv.slice(0) // Remove IV for subsequent blocks - this._iv = undefined; + this._iv = undefined } - cipher.encryptBlock(keystream, 0); + cipher.encryptBlock(keystream, 0) // Encrypt for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; + words[offset + i] ^= keystream[i] } } - }); + }) - OFB.Decryptor = Encryptor; - - return OFB; -}()); + OFB.Decryptor = Encryptor + return OFB +}()) /** * A noop padding strategy. @@ -4355,15 +4321,14 @@ CryptoJS.pad.NoPadding = { } }; - (function (undefined) { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var CipherParams = C_lib.CipherParams; - var C_enc = C.enc; - var Hex = C_enc.Hex; - var C_format = C.format; + var C = CryptoJS + var C_lib = C.lib + var CipherParams = C_lib.CipherParams + var C_enc = C.enc + var Hex = C_enc.Hex + var C_format = C.format var HexFormatter = C_format.Hex = { /** @@ -4380,7 +4345,7 @@ CryptoJS.pad.NoPadding = { * var hexString = CryptoJS.format.Hex.stringify(cipherParams); */ stringify: function (cipherParams) { - return cipherParams.ciphertext.toString(Hex); + return cipherParams.ciphertext.toString(Hex) }, /** @@ -4397,85 +4362,84 @@ CryptoJS.pad.NoPadding = { * var cipherParams = CryptoJS.format.Hex.parse(hexString); */ parse: function (input) { - var ciphertext = Hex.parse(input); - return CipherParams.create({ ciphertext: ciphertext }); + var ciphertext = Hex.parse(input) + return CipherParams.create({ ciphertext: ciphertext }) } - }; + } }()); - (function () { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; + var C = CryptoJS + var C_lib = C.lib + var BlockCipher = C_lib.BlockCipher + var C_algo = C.algo // Lookup tables - var SBOX = []; - var INV_SBOX = []; - var SUB_MIX_0 = []; - var SUB_MIX_1 = []; - var SUB_MIX_2 = []; - var SUB_MIX_3 = []; - var INV_SUB_MIX_0 = []; - var INV_SUB_MIX_1 = []; - var INV_SUB_MIX_2 = []; + var SBOX = [] + var INV_SBOX = [] + var SUB_MIX_0 = [] + var SUB_MIX_1 = [] + var SUB_MIX_2 = [] + var SUB_MIX_3 = [] + var INV_SUB_MIX_0 = [] + var INV_SUB_MIX_1 = [] + var INV_SUB_MIX_2 = [] var INV_SUB_MIX_3 = []; // Compute lookup tables (function () { // Compute double table - var d = []; + var d = [] for (var i = 0; i < 256; i++) { if (i < 128) { - d[i] = i << 1; + d[i] = i << 1 } else { - d[i] = (i << 1) ^ 0x11b; + d[i] = (i << 1) ^ 0x11b } } // Walk GF(2^8) - var x = 0; - var xi = 0; + var x = 0 + var xi = 0 for (var i = 0; i < 256; i++) { // Compute sbox - var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); - sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; - SBOX[x] = sx; - INV_SBOX[sx] = x; + var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4) + sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63 + SBOX[x] = sx + INV_SBOX[sx] = x // Compute multiplication - var x2 = d[x]; - var x4 = d[x2]; - var x8 = d[x4]; + var x2 = d[x] + var x4 = d[x2] + var x8 = d[x4] // Compute sub bytes, mix columns tables - var t = (d[sx] * 0x101) ^ (sx * 0x1010100); - SUB_MIX_0[x] = (t << 24) | (t >>> 8); - SUB_MIX_1[x] = (t << 16) | (t >>> 16); - SUB_MIX_2[x] = (t << 8) | (t >>> 24); - SUB_MIX_3[x] = t; + var t = (d[sx] * 0x101) ^ (sx * 0x1010100) + SUB_MIX_0[x] = (t << 24) | (t >>> 8) + SUB_MIX_1[x] = (t << 16) | (t >>> 16) + SUB_MIX_2[x] = (t << 8) | (t >>> 24) + SUB_MIX_3[x] = t // Compute inv sub bytes, inv mix columns tables - var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); - INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); - INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); - INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); - INV_SUB_MIX_3[sx] = t; + var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100) + INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8) + INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16) + INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24) + INV_SUB_MIX_3[sx] = t // Compute next counter if (!x) { - x = xi = 1; + x = xi = 1 } else { - x = x2 ^ d[d[d[x8 ^ x2]]]; - xi ^= d[d[xi]]; + x = x2 ^ d[d[d[x8 ^ x2]]] + xi ^= d[d[xi]] } } - }()); + }()) // Precomputed Rcon lookup - var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; + var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36] /** * AES block cipher algorithm. @@ -4484,127 +4448,127 @@ CryptoJS.pad.NoPadding = { _doReset: function () { // Skip reset of nRounds has been set before and key did not change if (this._nRounds && this._keyPriorReset === this._key) { - return; + return } // Shortcuts - var key = this._keyPriorReset = this._key; - var keyWords = key.words; - var keySize = key.sigBytes / 4; + var key = this._keyPriorReset = this._key + var keyWords = key.words + var keySize = key.sigBytes / 4 // Compute number of rounds - var nRounds = this._nRounds = keySize + 6; + var nRounds = this._nRounds = keySize + 6 // Compute number of key schedule rows - var ksRows = (nRounds + 1) * 4; + var ksRows = (nRounds + 1) * 4 // Compute key schedule - var keySchedule = this._keySchedule = []; + var keySchedule = this._keySchedule = [] for (var ksRow = 0; ksRow < ksRows; ksRow++) { if (ksRow < keySize) { - keySchedule[ksRow] = keyWords[ksRow]; + keySchedule[ksRow] = keyWords[ksRow] } else { - var t = keySchedule[ksRow - 1]; + var t = keySchedule[ksRow - 1] if (!(ksRow % keySize)) { // Rot word - t = (t << 8) | (t >>> 24); + t = (t << 8) | (t >>> 24) // Sub word - t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff] // Mix Rcon - t ^= RCON[(ksRow / keySize) | 0] << 24; + t ^= RCON[(ksRow / keySize) | 0] << 24 } else if (keySize > 6 && ksRow % keySize == 4) { // Sub word - t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff] } - keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; + keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t } } // Compute inv key schedule - var invKeySchedule = this._invKeySchedule = []; + var invKeySchedule = this._invKeySchedule = [] for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { - var ksRow = ksRows - invKsRow; + var ksRow = ksRows - invKsRow if (invKsRow % 4) { - var t = keySchedule[ksRow]; + var t = keySchedule[ksRow] } else { - var t = keySchedule[ksRow - 4]; + var t = keySchedule[ksRow - 4] } if (invKsRow < 4 || ksRow <= 4) { - invKeySchedule[invKsRow] = t; + invKeySchedule[invKsRow] = t } else { invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ - INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; + INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]] } } }, encryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); + this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) }, decryptBlock: function (M, offset) { // Swap 2nd and 4th rows - var t = M[offset + 1]; - M[offset + 1] = M[offset + 3]; - M[offset + 3] = t; + var t = M[offset + 1] + M[offset + 1] = M[offset + 3] + M[offset + 3] = t - this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); + this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX) // Inv swap 2nd and 4th rows - var t = M[offset + 1]; - M[offset + 1] = M[offset + 3]; - M[offset + 3] = t; + var t = M[offset + 1] + M[offset + 1] = M[offset + 3] + M[offset + 3] = t }, _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { // Shortcut - var nRounds = this._nRounds; + var nRounds = this._nRounds // Get input, add round key - var s0 = M[offset] ^ keySchedule[0]; - var s1 = M[offset + 1] ^ keySchedule[1]; - var s2 = M[offset + 2] ^ keySchedule[2]; - var s3 = M[offset + 3] ^ keySchedule[3]; + var s0 = M[offset] ^ keySchedule[0] + var s1 = M[offset + 1] ^ keySchedule[1] + var s2 = M[offset + 2] ^ keySchedule[2] + var s3 = M[offset + 3] ^ keySchedule[3] // Key schedule row counter - var ksRow = 4; + var ksRow = 4 // Rounds for (var round = 1; round < nRounds; round++) { // Shift rows, sub bytes, mix columns, add round key - var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; - var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; - var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; - var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; + var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++] + var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++] + var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++] + var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++] // Update state - s0 = t0; - s1 = t1; - s2 = t2; - s3 = t3; + s0 = t0 + s1 = t1 + s2 = t2 + s3 = t3 } // Shift rows, sub bytes, add round key - var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; - var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; - var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; - var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; + var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++] + var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++] + var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++] + var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++] // Set output - M[offset] = t0; - M[offset + 1] = t1; - M[offset + 2] = t2; - M[offset + 3] = t3; + M[offset] = t0 + M[offset + 1] = t1 + M[offset + 2] = t2 + M[offset + 3] = t3 }, - keySize: 256/32 - }); + keySize: 256 / 32 + }) /** * Shortcut functions to the cipher's object interface. @@ -4614,43 +4578,42 @@ CryptoJS.pad.NoPadding = { * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); */ - C.AES = BlockCipher._createHelper(AES); + C.AES = BlockCipher._createHelper(AES) }()); - (function () { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; + var C = CryptoJS + var C_lib = C.lib + var WordArray = C_lib.WordArray + var BlockCipher = C_lib.BlockCipher + var C_algo = C.algo // Permuted Choice 1 constants var PC1 = [ - 57, 49, 41, 33, 25, 17, 9, 1, + 57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, - 31, 23, 15, 7, 62, 54, 46, 38, - 30, 22, 14, 6, 61, 53, 45, 37, - 29, 21, 13, 5, 28, 20, 12, 4 - ]; + 31, 23, 15, 7, 62, 54, 46, 38, + 30, 22, 14, 6, 61, 53, 45, 37, + 29, 21, 13, 5, 28, 20, 12, 4 + ] // Permuted Choice 2 constants var PC2 = [ - 14, 17, 11, 24, 1, 5, - 3, 28, 15, 6, 21, 10, - 23, 19, 12, 4, 26, 8, - 16, 7, 27, 20, 13, 2, + 14, 17, 11, 24, 1, 5, + 3, 28, 15, 6, 21, 10, + 23, 19, 12, 4, 26, 8, + 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32 - ]; + ] // Cumulative bit shift constants - var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; + var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28] // SBOXes and round permutation constants var SBOX_P = [ @@ -5182,13 +5145,13 @@ CryptoJS.pad.NoPadding = { 0x8000001e: 0x20020, 0x8000001f: 0x8020800 } - ]; + ] // Masks that select the SBOX input var SBOX_MASK = [ 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f - ]; + ] /** * DES block cipher algorithm. @@ -5196,122 +5159,122 @@ CryptoJS.pad.NoPadding = { var DES = C_algo.DES = BlockCipher.extend({ _doReset: function () { // Shortcuts - var key = this._key; - var keyWords = key.words; + var key = this._key + var keyWords = key.words // Select 56 bits according to PC1 - var keyBits = []; + var keyBits = [] for (var i = 0; i < 56; i++) { - var keyBitPos = PC1[i] - 1; - keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; + var keyBitPos = PC1[i] - 1 + keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1 } // Assemble 16 subkeys - var subKeys = this._subKeys = []; + var subKeys = this._subKeys = [] for (var nSubKey = 0; nSubKey < 16; nSubKey++) { // Create subkey - var subKey = subKeys[nSubKey] = []; + var subKey = subKeys[nSubKey] = [] // Shortcut - var bitShift = BIT_SHIFTS[nSubKey]; + var bitShift = BIT_SHIFTS[nSubKey] // Select 48 bits according to PC2 for (var i = 0; i < 24; i++) { // Select from the left 28 key bits - subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); + subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6) // Select from the right 28 key bits - subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); + subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6) } // Since each subkey is applied to an expanded 32-bit input, // the subkey can be broken into 8 values scaled to 32-bits, // which allows the key to be used without expansion - subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); + subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31) for (var i = 1; i < 7; i++) { - subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); + subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3) } - subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); + subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27) } // Compute inverse subkeys - var invSubKeys = this._invSubKeys = []; + var invSubKeys = this._invSubKeys = [] for (var i = 0; i < 16; i++) { - invSubKeys[i] = subKeys[15 - i]; + invSubKeys[i] = subKeys[15 - i] } }, encryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._subKeys); + this._doCryptBlock(M, offset, this._subKeys) }, decryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._invSubKeys); + this._doCryptBlock(M, offset, this._invSubKeys) }, _doCryptBlock: function (M, offset, subKeys) { // Get input - this._lBlock = M[offset]; - this._rBlock = M[offset + 1]; + this._lBlock = M[offset] + this._rBlock = M[offset + 1] // Initial permutation - exchangeLR.call(this, 4, 0x0f0f0f0f); - exchangeLR.call(this, 16, 0x0000ffff); - exchangeRL.call(this, 2, 0x33333333); - exchangeRL.call(this, 8, 0x00ff00ff); - exchangeLR.call(this, 1, 0x55555555); + exchangeLR.call(this, 4, 0x0f0f0f0f) + exchangeLR.call(this, 16, 0x0000ffff) + exchangeRL.call(this, 2, 0x33333333) + exchangeRL.call(this, 8, 0x00ff00ff) + exchangeLR.call(this, 1, 0x55555555) // Rounds for (var round = 0; round < 16; round++) { // Shortcuts - var subKey = subKeys[round]; - var lBlock = this._lBlock; - var rBlock = this._rBlock; + var subKey = subKeys[round] + var lBlock = this._lBlock + var rBlock = this._rBlock // Feistel function - var f = 0; + var f = 0 for (var i = 0; i < 8; i++) { - f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; + f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0] } - this._lBlock = rBlock; - this._rBlock = lBlock ^ f; + this._lBlock = rBlock + this._rBlock = lBlock ^ f } // Undo swap from last round - var t = this._lBlock; - this._lBlock = this._rBlock; - this._rBlock = t; + var t = this._lBlock + this._lBlock = this._rBlock + this._rBlock = t // Final permutation - exchangeLR.call(this, 1, 0x55555555); - exchangeRL.call(this, 8, 0x00ff00ff); - exchangeRL.call(this, 2, 0x33333333); - exchangeLR.call(this, 16, 0x0000ffff); - exchangeLR.call(this, 4, 0x0f0f0f0f); + exchangeLR.call(this, 1, 0x55555555) + exchangeRL.call(this, 8, 0x00ff00ff) + exchangeRL.call(this, 2, 0x33333333) + exchangeLR.call(this, 16, 0x0000ffff) + exchangeLR.call(this, 4, 0x0f0f0f0f) // Set output - M[offset] = this._lBlock; - M[offset + 1] = this._rBlock; + M[offset] = this._lBlock + M[offset + 1] = this._rBlock }, - keySize: 64/32, + keySize: 64 / 32, - ivSize: 64/32, + ivSize: 64 / 32, - blockSize: 64/32 - }); + blockSize: 64 / 32 + }) // Swap bits across the left and right words - function exchangeLR(offset, mask) { - var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; - this._rBlock ^= t; - this._lBlock ^= t << offset; + function exchangeLR (offset, mask) { + var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask + this._rBlock ^= t + this._lBlock ^= t << offset } - function exchangeRL(offset, mask) { - var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; - this._lBlock ^= t; - this._rBlock ^= t << offset; + function exchangeRL (offset, mask) { + var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask + this._lBlock ^= t + this._rBlock ^= t << offset } /** @@ -5322,7 +5285,7 @@ CryptoJS.pad.NoPadding = { * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); */ - C.DES = BlockCipher._createHelper(DES); + C.DES = BlockCipher._createHelper(DES) /** * Triple-DES block cipher algorithm. @@ -5330,33 +5293,33 @@ CryptoJS.pad.NoPadding = { var TripleDES = C_algo.TripleDES = BlockCipher.extend({ _doReset: function () { // Shortcuts - var key = this._key; - var keyWords = key.words; + var key = this._key + var keyWords = key.words // Create DES instances - this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2))); - this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4))); - this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6))); + this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2))) + this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4))) + this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6))) }, encryptBlock: function (M, offset) { - this._des1.encryptBlock(M, offset); - this._des2.decryptBlock(M, offset); - this._des3.encryptBlock(M, offset); + this._des1.encryptBlock(M, offset) + this._des2.decryptBlock(M, offset) + this._des3.encryptBlock(M, offset) }, decryptBlock: function (M, offset) { - this._des3.decryptBlock(M, offset); - this._des2.encryptBlock(M, offset); - this._des1.decryptBlock(M, offset); + this._des3.decryptBlock(M, offset) + this._des2.encryptBlock(M, offset) + this._des1.decryptBlock(M, offset) }, - keySize: 192/32, + keySize: 192 / 32, - ivSize: 64/32, + ivSize: 64 / 32, - blockSize: 64/32 - }); + blockSize: 64 / 32 + }) /** * Shortcut functions to the cipher's object interface. @@ -5366,16 +5329,15 @@ CryptoJS.pad.NoPadding = { * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); */ - C.TripleDES = BlockCipher._createHelper(TripleDES); + C.TripleDES = BlockCipher._createHelper(TripleDES) }()); - (function () { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; + var C = CryptoJS + var C_lib = C.lib + var StreamCipher = C_lib.StreamCipher + var C_algo = C.algo /** * RC4 stream cipher algorithm. @@ -5383,67 +5345,67 @@ CryptoJS.pad.NoPadding = { var RC4 = C_algo.RC4 = StreamCipher.extend({ _doReset: function () { // Shortcuts - var key = this._key; - var keyWords = key.words; - var keySigBytes = key.sigBytes; + var key = this._key + var keyWords = key.words + var keySigBytes = key.sigBytes // Init sbox - var S = this._S = []; + var S = this._S = [] for (var i = 0; i < 256; i++) { - S[i] = i; + S[i] = i } // Key setup for (var i = 0, j = 0; i < 256; i++) { - var keyByteIndex = i % keySigBytes; - var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; + var keyByteIndex = i % keySigBytes + var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff - j = (j + S[i] + keyByte) % 256; + j = (j + S[i] + keyByte) % 256 // Swap - var t = S[i]; - S[i] = S[j]; - S[j] = t; + var t = S[i] + S[i] = S[j] + S[j] = t } // Counters - this._i = this._j = 0; + this._i = this._j = 0 }, _doProcessBlock: function (M, offset) { - M[offset] ^= generateKeystreamWord.call(this); + M[offset] ^= generateKeystreamWord.call(this) }, - keySize: 256/32, + keySize: 256 / 32, ivSize: 0 - }); + }) - function generateKeystreamWord() { + function generateKeystreamWord () { // Shortcuts - var S = this._S; - var i = this._i; - var j = this._j; + var S = this._S + var i = this._i + var j = this._j // Generate keystream word - var keystreamWord = 0; + var keystreamWord = 0 for (var n = 0; n < 4; n++) { - i = (i + 1) % 256; - j = (j + S[i]) % 256; + i = (i + 1) % 256 + j = (j + S[i]) % 256 // Swap - var t = S[i]; - S[i] = S[j]; - S[j] = t; + var t = S[i] + S[i] = S[j] + S[j] = t - keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); + keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8) } // Update counters - this._i = i; - this._j = j; + this._i = i + this._j = j - return keystreamWord; + return keystreamWord } /** @@ -5454,7 +5416,7 @@ CryptoJS.pad.NoPadding = { * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); */ - C.RC4 = StreamCipher._createHelper(RC4); + C.RC4 = StreamCipher._createHelper(RC4) /** * Modified RC4 stream cipher algorithm. @@ -5470,14 +5432,14 @@ CryptoJS.pad.NoPadding = { }), _doReset: function () { - RC4._doReset.call(this); + RC4._doReset.call(this) // Drop for (var i = this.cfg.drop; i > 0; i--) { - generateKeystreamWord.call(this); + generateKeystreamWord.call(this) } } - }); + }) /** * Shortcut functions to the cipher's object interface. @@ -5487,9 +5449,8 @@ CryptoJS.pad.NoPadding = { * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); */ - C.RC4Drop = StreamCipher._createHelper(RC4Drop); -}()); - + C.RC4Drop = StreamCipher._createHelper(RC4Drop) +}()) /** @preserve * Counter block mode compatible with Dr Brian Gladman fileenc.c @@ -5497,109 +5458,93 @@ CryptoJS.pad.NoPadding = { * Jan Hruby jhruby.web@gmail.com */ CryptoJS.mode.CTRGladman = (function () { - var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); + var CTRGladman = CryptoJS.lib.BlockCipherMode.extend() - function incWord(word) - { - if (((word >> 24) & 0xff) === 0xff) { //overflow - var b1 = (word >> 16)&0xff; - var b2 = (word >> 8)&0xff; - var b3 = word & 0xff; + function incWord (word) { + if (((word >> 24) & 0xff) === 0xff) { // overflow + var b1 = (word >> 16) & 0xff + var b2 = (word >> 8) & 0xff + var b3 = word & 0xff if (b1 === 0xff) // overflow b1 { - b1 = 0; - if (b2 === 0xff) - { - b2 = 0; - if (b3 === 0xff) - { - b3 = 0; - } - else - { - ++b3; + b1 = 0 + if (b2 === 0xff) { + b2 = 0 + if (b3 === 0xff) { + b3 = 0 + } else { + ++b3 } + } else { + ++b2 } - else - { - ++b2; - } - } - else - { - ++b1; + } else { + ++b1 } - word = 0; - word += (b1 << 16); - word += (b2 << 8); - word += b3; + word = 0 + word += (b1 << 16) + word += (b2 << 8) + word += b3 + } else { + word += (0x01 << 24) } - else - { - word += (0x01 << 24); - } - return word; + return word } - function incCounter(counter) - { - if ((counter[0] = incWord(counter[0])) === 0) - { + function incCounter (counter) { + if ((counter[0] = incWord(counter[0])) === 0) { // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 - counter[1] = incWord(counter[1]); + counter[1] = incWord(counter[1]) } - return counter; + return counter } var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ processBlock: function (words, offset) { // Shortcuts var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var counter = this._counter; + var blockSize = cipher.blockSize + var iv = this._iv + var counter = this._counter // Generate keystream if (iv) { - counter = this._counter = iv.slice(0); + counter = this._counter = iv.slice(0) // Remove IV for subsequent blocks - this._iv = undefined; + this._iv = undefined } - incCounter(counter); + incCounter(counter) - var keystream = counter.slice(0); - cipher.encryptBlock(keystream, 0); + var keystream = counter.slice(0) + cipher.encryptBlock(keystream, 0) // Encrypt for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; + words[offset + i] ^= keystream[i] } } - }); + }) - CTRGladman.Decryptor = Encryptor; + CTRGladman.Decryptor = Encryptor - return CTRGladman; + return CTRGladman }()); - - - (function () { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; + var C = CryptoJS + var C_lib = C.lib + var StreamCipher = C_lib.StreamCipher + var C_algo = C.algo // Reusable objects - var S = []; - var C_ = []; - var G = []; + var S = [] + var C_ = [] + var G = [] /** * Rabbit stream cipher algorithm @@ -5607,13 +5552,13 @@ CryptoJS.mode.CTRGladman = (function () { var Rabbit = C_algo.Rabbit = StreamCipher.extend({ _doReset: function () { // Shortcuts - var K = this._key.words; - var iv = this.cfg.iv; + var K = this._key.words + var iv = this.cfg.iv // Swap endian for (var i = 0; i < 4; i++) { - K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | - (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); + K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | + (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00) } // Generate initial state values @@ -5622,7 +5567,7 @@ CryptoJS.mode.CTRGladman = (function () { K[1], (K[0] << 16) | (K[3] >>> 16), K[2], (K[1] << 16) | (K[0] >>> 16), K[3], (K[2] << 16) | (K[1] >>> 16) - ]; + ] // Generate initial counter values var C = this._C = [ @@ -5630,125 +5575,125 @@ CryptoJS.mode.CTRGladman = (function () { (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) - ]; + ] // Carry bit - this._b = 0; + this._b = 0 // Iterate the system four times for (var i = 0; i < 4; i++) { - nextState.call(this); + nextState.call(this) } // Modify the counters for (var i = 0; i < 8; i++) { - C[i] ^= X[(i + 4) & 7]; + C[i] ^= X[(i + 4) & 7] } // IV setup if (iv) { // Shortcuts - var IV = iv.words; - var IV_0 = IV[0]; - var IV_1 = IV[1]; + var IV = iv.words + var IV_0 = IV[0] + var IV_1 = IV[1] // Generate four subvectors - var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); - var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); - var i1 = (i0 >>> 16) | (i2 & 0xffff0000); - var i3 = (i2 << 16) | (i0 & 0x0000ffff); + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00) + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00) + var i1 = (i0 >>> 16) | (i2 & 0xffff0000) + var i3 = (i2 << 16) | (i0 & 0x0000ffff) // Modify counter values - C[0] ^= i0; - C[1] ^= i1; - C[2] ^= i2; - C[3] ^= i3; - C[4] ^= i0; - C[5] ^= i1; - C[6] ^= i2; - C[7] ^= i3; + C[0] ^= i0 + C[1] ^= i1 + C[2] ^= i2 + C[3] ^= i3 + C[4] ^= i0 + C[5] ^= i1 + C[6] ^= i2 + C[7] ^= i3 // Iterate the system four times for (var i = 0; i < 4; i++) { - nextState.call(this); + nextState.call(this) } } }, _doProcessBlock: function (M, offset) { // Shortcut - var X = this._X; + var X = this._X // Iterate the system - nextState.call(this); + nextState.call(this) // Generate four keystream words - S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); - S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); - S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); - S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16) + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16) + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16) + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16) for (var i = 0; i < 4; i++) { // Swap endian - S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | - (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00) // Encrypt - M[offset + i] ^= S[i]; + M[offset + i] ^= S[i] } }, - blockSize: 128/32, + blockSize: 128 / 32, - ivSize: 64/32 - }); + ivSize: 64 / 32 + }) - function nextState() { + function nextState () { // Shortcuts - var X = this._X; - var C = this._C; + var X = this._X + var C = this._C // Save old counter values for (var i = 0; i < 8; i++) { - C_[i] = C[i]; + C_[i] = C[i] } // Calculate new counter values - C[0] = (C[0] + 0x4d34d34d + this._b) | 0; - C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; - C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; - C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; - C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; - C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; - C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; - C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; - this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + C[0] = (C[0] + 0x4d34d34d + this._b) | 0 + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0 + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0 + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0 + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0 + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0 + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0 + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0 + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0 // Calculate the g-values for (var i = 0; i < 8; i++) { - var gx = X[i] + C[i]; + var gx = X[i] + C[i] // Construct high and low argument for squaring - var ga = gx & 0xffff; - var gb = gx >>> 16; + var ga = gx & 0xffff + var gb = gx >>> 16 // Calculate high and low result of squaring - var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; - var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0) // High XOR low - G[i] = gh ^ gl; + G[i] = gh ^ gl } // Calculate new state values - X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; - X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; - X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; - X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; - X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; - X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; - X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; - X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0 + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0 + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0 + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0 + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0 + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0 + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0 + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0 } /** @@ -5759,61 +5704,59 @@ CryptoJS.mode.CTRGladman = (function () { * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); */ - C.Rabbit = StreamCipher._createHelper(Rabbit); -}()); - + C.Rabbit = StreamCipher._createHelper(Rabbit) +}()) /** * Counter block mode. */ CryptoJS.mode.CTR = (function () { - var CTR = CryptoJS.lib.BlockCipherMode.extend(); + var CTR = CryptoJS.lib.BlockCipherMode.extend() var Encryptor = CTR.Encryptor = CTR.extend({ processBlock: function (words, offset) { // Shortcuts var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var counter = this._counter; + var blockSize = cipher.blockSize + var iv = this._iv + var counter = this._counter // Generate keystream if (iv) { - counter = this._counter = iv.slice(0); + counter = this._counter = iv.slice(0) // Remove IV for subsequent blocks - this._iv = undefined; + this._iv = undefined } - var keystream = counter.slice(0); - cipher.encryptBlock(keystream, 0); + var keystream = counter.slice(0) + cipher.encryptBlock(keystream, 0) // Increment counter counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 // Encrypt for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; + words[offset + i] ^= keystream[i] } } - }); + }) - CTR.Decryptor = Encryptor; + CTR.Decryptor = Encryptor - return CTR; + return CTR }()); - (function () { // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; + var C = CryptoJS + var C_lib = C.lib + var StreamCipher = C_lib.StreamCipher + var C_algo = C.algo // Reusable objects - var S = []; - var C_ = []; - var G = []; + var S = [] + var C_ = [] + var G = [] /** * Rabbit stream cipher algorithm. @@ -5825,8 +5768,8 @@ CryptoJS.mode.CTR = (function () { var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ _doReset: function () { // Shortcuts - var K = this._key.words; - var iv = this.cfg.iv; + var K = this._key.words + var iv = this.cfg.iv // Generate initial state values var X = this._X = [ @@ -5834,7 +5777,7 @@ CryptoJS.mode.CTR = (function () { K[1], (K[0] << 16) | (K[3] >>> 16), K[2], (K[1] << 16) | (K[0] >>> 16), K[3], (K[2] << 16) | (K[1] >>> 16) - ]; + ] // Generate initial counter values var C = this._C = [ @@ -5842,125 +5785,125 @@ CryptoJS.mode.CTR = (function () { (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) - ]; + ] // Carry bit - this._b = 0; + this._b = 0 // Iterate the system four times for (var i = 0; i < 4; i++) { - nextState.call(this); + nextState.call(this) } // Modify the counters for (var i = 0; i < 8; i++) { - C[i] ^= X[(i + 4) & 7]; + C[i] ^= X[(i + 4) & 7] } // IV setup if (iv) { // Shortcuts - var IV = iv.words; - var IV_0 = IV[0]; - var IV_1 = IV[1]; + var IV = iv.words + var IV_0 = IV[0] + var IV_1 = IV[1] // Generate four subvectors - var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); - var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); - var i1 = (i0 >>> 16) | (i2 & 0xffff0000); - var i3 = (i2 << 16) | (i0 & 0x0000ffff); + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00) + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00) + var i1 = (i0 >>> 16) | (i2 & 0xffff0000) + var i3 = (i2 << 16) | (i0 & 0x0000ffff) // Modify counter values - C[0] ^= i0; - C[1] ^= i1; - C[2] ^= i2; - C[3] ^= i3; - C[4] ^= i0; - C[5] ^= i1; - C[6] ^= i2; - C[7] ^= i3; + C[0] ^= i0 + C[1] ^= i1 + C[2] ^= i2 + C[3] ^= i3 + C[4] ^= i0 + C[5] ^= i1 + C[6] ^= i2 + C[7] ^= i3 // Iterate the system four times for (var i = 0; i < 4; i++) { - nextState.call(this); + nextState.call(this) } } }, _doProcessBlock: function (M, offset) { // Shortcut - var X = this._X; + var X = this._X // Iterate the system - nextState.call(this); + nextState.call(this) // Generate four keystream words - S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); - S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); - S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); - S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16) + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16) + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16) + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16) for (var i = 0; i < 4; i++) { // Swap endian - S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | - (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00) // Encrypt - M[offset + i] ^= S[i]; + M[offset + i] ^= S[i] } }, - blockSize: 128/32, + blockSize: 128 / 32, - ivSize: 64/32 - }); + ivSize: 64 / 32 + }) - function nextState() { + function nextState () { // Shortcuts - var X = this._X; - var C = this._C; + var X = this._X + var C = this._C // Save old counter values for (var i = 0; i < 8; i++) { - C_[i] = C[i]; + C_[i] = C[i] } // Calculate new counter values - C[0] = (C[0] + 0x4d34d34d + this._b) | 0; - C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; - C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; - C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; - C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; - C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; - C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; - C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; - this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + C[0] = (C[0] + 0x4d34d34d + this._b) | 0 + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0 + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0 + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0 + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0 + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0 + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0 + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0 + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0 // Calculate the g-values for (var i = 0; i < 8; i++) { - var gx = X[i] + C[i]; + var gx = X[i] + C[i] // Construct high and low argument for squaring - var ga = gx & 0xffff; - var gb = gx >>> 16; + var ga = gx & 0xffff + var gb = gx >>> 16 // Calculate high and low result of squaring - var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; - var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0) // High XOR low - G[i] = gh ^ gl; + G[i] = gh ^ gl } // Calculate new state values - X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; - X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; - X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; - X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; - X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; - X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; - X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; - X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0 + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0 + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0 + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0 + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0 + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0 + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0 + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0 } /** @@ -5971,9 +5914,8 @@ CryptoJS.mode.CTR = (function () { * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); */ - C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); -}()); - + C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy) +}()) /** * Zero padding strategy. @@ -5981,23 +5923,22 @@ CryptoJS.mode.CTR = (function () { CryptoJS.pad.ZeroPadding = { pad: function (data, blockSize) { // Shortcut - var blockSizeBytes = blockSize * 4; + var blockSizeBytes = blockSize * 4 // Pad - data.clamp(); - data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); + data.clamp() + data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes) }, unpad: function (data) { // Shortcut - var dataWords = data.words; + var dataWords = data.words // Unpad - var i = data.sigBytes - 1; + var i = data.sigBytes - 1 while (!((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { - i--; + i-- } - data.sigBytes = i + 1; + data.sigBytes = i + 1 } -}; - +} diff --git a/jero-web/src/utils/encryption/signMd5Utils.js b/jero-web/src/utils/encryption/signMd5Utils.js index 320ca8da..c618ccb9 100644 --- a/jero-web/src/utils/encryption/signMd5Utils.js +++ b/jero-web/src/utils/encryption/signMd5Utils.js @@ -1,6 +1,6 @@ import md5 from 'md5' -//签名密钥串(前后端要一致,正式发布请自行修改) -const signatureSecret = "dd05f1c54d63749eda95f9fa6d49v442a"; +// 签名密钥串(前后端要一致,正式发布请自行修改) +const signatureSecret = 'dd05f1c54d63749eda95f9fa6d49v442a' export default class signMd5Utils { /** @@ -8,103 +8,102 @@ export default class signMd5Utils { * @param jsonObj 发送参数 */ - static sortAsc(jsonObj) { - let arr = new Array(); - let num = 0; - for (let i in jsonObj) { - arr[num] = i; - num++; + static sortAsc (jsonObj) { + const arr = new Array() + let num = 0 + for (const i in jsonObj) { + arr[num] = i + num++ } - let sortArr = arr.sort(); - let sortObj = {}; - for (let i in sortArr) { - sortObj[sortArr[i]] = jsonObj[sortArr[i]]; + const sortArr = arr.sort() + const sortObj = {} + for (const i in sortArr) { + sortObj[sortArr[i]] = jsonObj[sortArr[i]] } - return sortObj; + return sortObj } - /** * @param url 请求的url,应该包含请求参数(url的?后面的参数) * @param requestParams 请求参数(POST的JSON参数) * @returns {string} 获取签名 */ - static getSign(url, requestParams) { - let urlParams = this.parseQueryString(url); - let jsonObj = this.mergeObject(urlParams, requestParams); - //console.log("sign jsonObj: ",jsonObj) - let requestBody = this.sortAsc(jsonObj); - console.log("sign requestBody: ",requestBody) - return md5(JSON.stringify(requestBody) + signatureSecret).toUpperCase(); + static getSign (url, requestParams) { + const urlParams = this.parseQueryString(url) + const jsonObj = this.mergeObject(urlParams, requestParams) + // console.log("sign jsonObj: ",jsonObj) + const requestBody = this.sortAsc(jsonObj) + console.log('sign requestBody: ', requestBody) + return md5(JSON.stringify(requestBody) + signatureSecret).toUpperCase() } /** * @param url 请求的url * @returns {{}} 将url中请求参数组装成json对象(url的?后面的参数) */ - static parseQueryString(url) { - let urlReg = /^[^\?]+\?([\w\W]+)$/, - paramReg = /([^&=]+)=([\w\W]*?)(&|$|#)/g, - urlArray = urlReg.exec(url), - result = {}; + static parseQueryString (url) { + const urlReg = /^[^\?]+\?([\w\W]+)$/ + const paramReg = /([^&=]+)=([\w\W]*?)(&|$|#)/g + const urlArray = urlReg.exec(url) + const result = {} // 获取URL上最后带逗号的参数变量 sys/dict/getDictItems/sys_user,realname,username - //【这边条件没有encode】带条件参数例子:/sys/dict/getDictItems/sys_user,realname,id,username!='admin'%20order%20by%20create_time - let lastpathVariable = url.substring(url.lastIndexOf('/') + 1); - if(lastpathVariable.includes(",")){ - if(lastpathVariable.includes("?")){ - lastpathVariable = lastpathVariable.substring(0, lastpathVariable.indexOf("?")); + // 【这边条件没有encode】带条件参数例子:/sys/dict/getDictItems/sys_user,realname,id,username!='admin'%20order%20by%20create_time + let lastpathVariable = url.substring(url.lastIndexOf('/') + 1) + if (lastpathVariable.includes(',')) { + if (lastpathVariable.includes('?')) { + lastpathVariable = lastpathVariable.substring(0, lastpathVariable.indexOf('?')) } - //解决Sign 签名校验失败 #2728 - result["x-path-variable"] = decodeURIComponent(lastpathVariable); + // 解决Sign 签名校验失败 #2728 + result['x-path-variable'] = decodeURIComponent(lastpathVariable) } if (urlArray && urlArray[1]) { - let paramString = urlArray[1], paramResult; + const paramString = urlArray[1]; let paramResult while ((paramResult = paramReg.exec(paramString)) != null) { - //数字值转为string类型,前后端加密规则保持一致 - if(this.myIsNaN(paramResult[2])){ + // 数字值转为string类型,前后端加密规则保持一致 + if (this.myIsNaN(paramResult[2])) { paramResult[2] = paramResult[2].toString() } - result[paramResult[1]] = paramResult[2]; + result[paramResult[1]] = paramResult[2] } } - return result; + return result } /** * @returns {*} 将两个对象合并成一个 */ - static mergeObject(objectOne, objectTwo) { + static mergeObject (objectOne, objectTwo) { if (objectTwo && Object.keys(objectTwo).length > 0) { - for (let key in objectTwo) { + for (const key in objectTwo) { if (objectTwo.hasOwnProperty(key) === true) { - //数字值转为string类型,前后端加密规则保持一致 - if(this.myIsNaN(objectTwo[key])){ + // 数字值转为string类型,前后端加密规则保持一致 + if (this.myIsNaN(objectTwo[key])) { objectTwo[key] = objectTwo[key].toString() } - objectOne[key] = objectTwo[key]; + objectOne[key] = objectTwo[key] } } } - return objectOne; + return objectOne } - static urlEncode(param, key, encode) { - if (param == null) return ''; - let paramStr = ''; - let t = typeof (param); + static urlEncode (param, key, encode) { + if (param == null) return '' + let paramStr = '' + const t = typeof (param) if (t == 'string' || t == 'number' || t == 'boolean') { - paramStr += '&' + key + '=' + ((encode == null || encode) ? encodeURIComponent(param) : param); + paramStr += '&' + key + '=' + ((encode == null || encode) ? encodeURIComponent(param) : param) } else { - for (let i in param) { - let k = key == null ? i : key + (param instanceof Array ? '[' + i + ']' : '.' + i); - paramStr += this.urlEncode(param[i], k, encode); + for (const i in param) { + const k = key == null ? i : key + (param instanceof Array ? '[' + i + ']' : '.' + i) + paramStr += this.urlEncode(param[i], k, encode) } } - return paramStr; + return paramStr }; - static getDateTimeToString() { + static getDateTimeToString () { const date_ = new Date() const year = date_.getFullYear() let month = date_.getMonth() + 1 @@ -121,9 +120,9 @@ export default class signMd5Utils { if (msecs < 10) secs = '0' + msecs return year + '' + month + '' + day + '' + hours + '' + mins + '' + secs } - // true:数值型的,false:非数值型 - static myIsNaN(value) { - return typeof value === 'number' && !isNaN(value); - } -} \ No newline at end of file + // true:数值型的,false:非数值型 + static myIsNaN (value) { + return typeof value === 'number' && !isNaN(value) + } +} diff --git a/jero-web/src/utils/filter.js b/jero-web/src/utils/filter.js index 7974e8b6..56e56ec8 100644 --- a/jero-web/src/utils/filter.js +++ b/jero-web/src/utils/filter.js @@ -1,29 +1,29 @@ -import Vue from "vue"; -import * as dayjs from "dayjs"; +import Vue from 'vue' +import * as dayjs from 'dayjs' Vue.filter('NumberFormat', function (value) { if (!value) { return '0' } - let intPartFormat = value.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') //将整数部分逢三一断 + const intPartFormat = value.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断 return intPartFormat }) -Vue.filter('dayjs', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') { +Vue.filter('dayjs', function (dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') { return dayjs(dataStr).format(pattern) }) -Vue.filter('moment', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') { +Vue.filter('moment', function (dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') { return dayjs(dataStr).format(pattern) }) /** 字符串超长截取省略号显示 */ Vue.filter('ellipsis', function (value, vlength = 25) { - if(!value){ - return ""; + if (!value) { + return '' } if (value.length > vlength) { return value.slice(0, vlength) + '...' } return value -}) \ No newline at end of file +}) diff --git a/jero-web/src/utils/hasPermission.js b/jero-web/src/utils/hasPermission.js index 8e7700eb..cc94c711 100644 --- a/jero-web/src/utils/hasPermission.js +++ b/jero-web/src/utils/hasPermission.js @@ -1,131 +1,130 @@ -import { USER_AUTH,SYS_BUTTON_AUTH } from "@/store/mutation-types" +import { USER_AUTH, SYS_BUTTON_AUTH } from '@/store/mutation-types' const hasPermission = { - install (Vue, options) { - Vue.directive('has', { - inserted: (el, binding, vnode)=>{ - //console.time() - //节点权限处理,如果命中则不进行全局权限处理 - if(!filterNodePermission(el, binding, vnode)){ - filterGlobalPermission(el, binding, vnode); - } - } - }); - } -}; + install (Vue, options) { + Vue.directive('has', { + inserted: (el, binding, vnode) => { + // console.time() + // 节点权限处理,如果命中则不进行全局权限处理 + if (!filterNodePermission(el, binding, vnode)) { + filterGlobalPermission(el, binding, vnode) + } + } + }) + } +} /** * 流程节点权限控制 */ -export function filterNodePermission(el, binding, vnode) { - let permissionList = []; +export function filterNodePermission (el, binding, vnode) { + const permissionList = [] try { - let obj = vnode.context.$props.formData; + const obj = vnode.context.$props.formData if (obj) { - let bpmList = obj.permissionList; - for (let bpm of bpmList) { - if(bpm.type != '2') { - permissionList.push(bpm); + const bpmList = obj.permissionList + for (const bpm of bpmList) { + if (bpm.type != '2') { + permissionList.push(bpm) } } - }else{ - return false; + } else { + return false } } catch (e) { - //console.log("页面权限异常----", e); + // console.log("页面权限异常----", e); } - if (permissionList === null || permissionList === "" || permissionList === undefined||permissionList.length<=0) { - //el.parentNode.removeChild(el) - return false; + if (permissionList === null || permissionList === '' || permissionList === undefined || permissionList.length <= 0) { + // el.parentNode.removeChild(el) + return false } - console.log("流程节点页面权限--NODE--"); - let permissions = []; - for (let item of permissionList) { - if(item.type != '2') { - permissions.push(item.action); + console.log('流程节点页面权限--NODE--') + const permissions = [] + for (const item of permissionList) { + if (item.type != '2') { + permissions.push(item.action) } } - //console.log("页面权限----"+permissions); - //console.log("页面权限----"+binding.value); + // console.log("页面权限----"+permissions); + // console.log("页面权限----"+binding.value); if (!permissions.includes(binding.value)) { - //el.parentNode.removeChild(el) - return false; - }else{ - for (let item2 of permissionList) { - if(binding.value === item2.action){ - return true; + // el.parentNode.removeChild(el) + return false + } else { + for (const item2 of permissionList) { + if (binding.value === item2.action) { + return true } } } - return false; + return false } /** * 全局权限控制 */ -export function filterGlobalPermission(el, binding, vnode) { +export function filterGlobalPermission (el, binding, vnode) { + const permissionList = [] + const allPermissionList = [] - let permissionList = []; - let allPermissionList = []; - - //let authList = Vue.ls.get(USER_AUTH); - let authList = JSON.parse(sessionStorage.getItem(USER_AUTH) || "[]"); - for (let auth of authList) { - if(auth.type != '2') { - permissionList.push(auth); + // let authList = Vue.ls.get(USER_AUTH); + const authList = JSON.parse(sessionStorage.getItem(USER_AUTH) || '[]') + for (const auth of authList) { + if (auth.type != '2') { + permissionList.push(auth) } } - //console.log("页面权限--Global--",sessionStorage.getItem(SYS_BUTTON_AUTH)); - let allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || "[]"); - for (let gauth of allAuthList) { - if(gauth.type != '2') { - allPermissionList.push(gauth); + // console.log("页面权限--Global--",sessionStorage.getItem(SYS_BUTTON_AUTH)); + const allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || '[]') + for (const gauth of allAuthList) { + if (gauth.type != '2') { + allPermissionList.push(gauth) } } - //设置全局配置是否有命中 - let invalidFlag = false;//无效命中 - if(allPermissionList != null && allPermissionList != "" && allPermissionList != undefined && allPermissionList.length > 0){ - for (let itemG of allPermissionList) { - if(binding.value === itemG.action){ - if(itemG.status == '0'){ - invalidFlag = true; - break; + // 设置全局配置是否有命中 + let invalidFlag = false// 无效命中 + if (allPermissionList != null && allPermissionList != '' && allPermissionList != undefined && allPermissionList.length > 0) { + for (const itemG of allPermissionList) { + if (binding.value === itemG.action) { + if (itemG.status == '0') { + invalidFlag = true + break } } } } - if(invalidFlag){ - return; + if (invalidFlag) { + return } - if (permissionList === null || permissionList === "" || permissionList === undefined||permissionList.length<=0) { - el.parentNode.removeChild(el); - return; + if (permissionList === null || permissionList === '' || permissionList === undefined || permissionList.length <= 0) { + el.parentNode.removeChild(el) + return } - let permissions = []; - for (let item of permissionList) { - //权限策略1显示2禁用 - if(item.type != '2'){ - //update--begin--autor:wangshuai-----date:20200729------for:按钮权限,授权标识的提示信息是多个用逗号分隔逻辑处理 gitee#I1OUGU------- - if(item.action){ - if(item.action.includes(",")){ - let split = item.action.split(",") - for (let i = 0; i state.app.theme, primaryColor: state => state.app.color, colorWeak: state => state.app.weak, - multipage: state => state.app.multipage,//多页签设置 + multipage: state => state.app.multipage, // 多页签设置 fixedHeader: state => state.app.fixedHeader, fixSiderbar: state => state.app.fixSiderbar, contentWidth: state => state.app.contentWidth, @@ -24,7 +24,7 @@ const mixin = { const mixinDevice = { computed: { ...mapState({ - device: state => state.app.device, + device: state => state.app.device }) }, methods: { @@ -37,4 +37,4 @@ const mixinDevice = { } } -export { mixin, mixinDevice } \ No newline at end of file +export { mixin, mixinDevice } diff --git a/jero-web/src/utils/permissions.js b/jero-web/src/utils/permissions.js index e4b60bcd..f8668bb3 100644 --- a/jero-web/src/utils/permissions.js +++ b/jero-web/src/utils/permissions.js @@ -1,8 +1,8 @@ -export function actionToObject(json) { +export function actionToObject (json) { try { return JSON.parse(json) } catch (e) { console.log('err', e.message) } return [] -} \ No newline at end of file +} diff --git a/jero-web/src/utils/props-util.js b/jero-web/src/utils/props-util.js index 9c942004..eac8e017 100644 --- a/jero-web/src/utils/props-util.js +++ b/jero-web/src/utils/props-util.js @@ -1,24 +1,24 @@ /** * 该文件截取自 "ant-design-vue/es/_util/props-util.js" 文件,并对其做出特殊修改 */ -function classNames() { - let classes = [] +function classNames () { + const classes = [] for (let i = 0; i < arguments.length; i++) { - let arg = arguments[i] + const arg = arguments[i] if (!arg) continue - let argType = typeof arg + const argType = typeof arg if (argType === 'string' || argType === 'number') { classes.push(arg) } else if (Array.isArray(arg) && arg.length) { - let inner = classNames.apply(null, arg) + const inner = classNames.apply(null, arg) if (inner) { classes.push(inner) } } else if (argType === 'object') { - for (let key in arg) { + for (const key in arg) { if (arg.hasOwnProperty(key) && arg[key]) { classes.push(key) } @@ -30,18 +30,17 @@ function classNames() { const camelizeRE = /-(\w)/g -function camelize(str) { +function camelize (str) { return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : '')) } - -function objectCamelize(obj) { - let res = {} +function objectCamelize (obj) { + const res = {} Object.keys(obj).forEach(k => (res[camelize(k)] = obj[k])) return res } -function parseStyleText(cssText = '', camel) { +function parseStyleText (cssText = '', camel) { const res = {} const listDelimiter = /;(?![^(]*\))/g const propertyDelimiter = /:(.+)/ @@ -57,7 +56,7 @@ function parseStyleText(cssText = '', camel) { return res } -export function getClass(ele) { +export function getClass (ele) { let data = {} if (ele.data) { data = ele.data @@ -87,8 +86,7 @@ export function getClass(ele) { return cls } -export function getStyle(ele, camel) { - +export function getStyle (ele, camel) { getClass(ele) let data = {} @@ -112,4 +110,3 @@ export function getStyle(ele, camel) { } return { ...staticStyle, ...style } } - diff --git a/jero-web/src/utils/request.js b/jero-web/src/utils/request.js index af22d562..64554cbc 100644 --- a/jero-web/src/utils/request.js +++ b/jero-web/src/utils/request.js @@ -3,7 +3,7 @@ import axios from 'axios' import store from '@/store' import { VueAxios } from './axios' import router from '@/router/index' -import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types" +import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types' /** * 【指定 axios的 baseURL】 @@ -11,35 +11,35 @@ import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types" * 则映射后端域名,通过 vue.config.js * @type {*|string} */ -let apiBaseUrl = window._CONFIG['domianURL'] || "/jero-boot"; -//console.log("apiBaseUrl= ",apiBaseUrl) +const apiBaseUrl = window._CONFIG.domianURL || '/jero-boot' +// console.log("apiBaseUrl= ",apiBaseUrl) // 创建 axios 实例 const service = axios.create({ - //baseURL: '/jero-boot', + // baseURL: '/jero-boot', baseURL: apiBaseUrl, // api base_url timeout: 10000 // 请求超时时间 }) const err = (error) => { if (error.response) { - let data = error.response.data + const data = error.response.data const token = Vue.ls.get(ACCESS_TOKEN) - console.log("------异常响应------",token) - console.log("------异常响应------",error.response.status) + console.log('------异常响应------', token) + console.log('------异常响应------', error.response.status) switch (error.response.status) { case 403: - Vue.prototype.$Jnotification.error({ message: '系统提示', description: '拒绝访问',duration: 4}) + Vue.prototype.$Jnotification.error({ message: '系统提示', description: '拒绝访问', duration: 4 }) break case 500: - console.log("------error.response------",error.response) + console.log('------error.response------', error.response) // update-begin- --- author:liusq ------ date:20200910 ---- for:处理Blob情况---- - let type=error.response.request.responseType; - if(type === 'blob'){ - blobToJson(data); - break; + const type = error.response.request.responseType + if (type === 'blob') { + blobToJson(data) + break } // update-end- --- author:liusq ------ date:20200910 ---- for:处理Blob情况---- - if(token && data.includes("Token失效")){ + if (token && data.includes('Token失效')) { // update-begin- --- author:scott ------ date:20190225 ---- for:Token失效采用弹框模式,不直接跳转---- if (/wxwork|dingtalk/i.test(navigator.userAgent)) { Vue.prototype.$Jmessage.loading('登录已过期,正在重新登陆', 0) @@ -58,13 +58,13 @@ const err = (error) => { } break case 404: - Vue.prototype.$Jnotification.error({ message: '系统提示', description:'很抱歉,资源未找到!',duration: 4}) + Vue.prototype.$Jnotification.error({ message: '系统提示', description: '很抱歉,资源未找到!', duration: 4 }) break case 504: - Vue.prototype.$Jnotification.error({ message: '系统提示', description: '网络超时'}) + Vue.prototype.$Jnotification.error({ message: '系统提示', description: '网络超时' }) break case 401: - Vue.prototype.$Jnotification.error({ message: '系统提示', description:'未授权,请重新登录',duration: 4}) + Vue.prototype.$Jnotification.error({ message: '系统提示', description: '未授权,请重新登录', duration: 4 }) if (token) { store.dispatch('Logout').then(() => { setTimeout(() => { @@ -83,19 +83,19 @@ const err = (error) => { } } else if (error.message) { if (error.message.includes('timeout')) { - Vue.prototype.$Jnotification.error({message: '系统提示', description: '网络超时'}) + Vue.prototype.$Jnotification.error({ message: '系统提示', description: '网络超时' }) } else { - Vue.prototype.$Jnotification.error({message: '系统提示', description: error.message}) + Vue.prototype.$Jnotification.error({ message: '系统提示', description: error.message }) } } return Promise.reject(error) -}; +} // request interceptor service.interceptors.request.use(config => { const token = Vue.ls.get(ACCESS_TOKEN) if (token) { - config.headers[ 'X-Access-Token' ] = token // 让每个请求携带自定义 token 请根据实际情况自行修改 + config.headers['X-Access-Token'] = token // 让每个请求携带自定义 token 请根据实际情况自行修改 } // update-begin--author:sunjianlei---date:20200723---for 如果当前在low-app环境,并且携带了appId,就向Header里传递appId @@ -105,23 +105,23 @@ service.interceptors.request.use(config => { } // update-end--author:sunjianlei---date:20200723---for 如果当前在low-app环境,并且携带了appId,就向Header里传递appId - //update-begin-author:taoyan date:2020707 for:多租户 + // update-begin-author:taoyan date:2020707 for:多租户 let tenantid = Vue.ls.get(TENANT_ID) if (!tenantid) { - tenantid = 0; + tenantid = 0 } - config.headers[ 'tenant-id' ] = tenantid - //update-end-author:taoyan date:2020707 for:多租户 - if(config.method=='get'){ - if(config.url.indexOf("sys/dict/getDictItems")<0){ + config.headers['tenant-id'] = tenantid + // update-end-author:taoyan date:2020707 for:多租户 + if (config.method == 'get') { + if (config.url.indexOf('sys/dict/getDictItems') < 0) { config.params = { - _t: Date.parse(new Date())/1000, + _t: Date.parse(new Date()) / 1000, ...config.params } } } return config -},(error) => { +}, (error) => { return Promise.reject(error) }) @@ -140,16 +140,16 @@ const installer = { * Blob解析 * @param data */ -function blobToJson(data) { - let fileReader = new FileReader(); - let token = Vue.ls.get(ACCESS_TOKEN); - fileReader.onload = function() { +function blobToJson (data) { + const fileReader = new FileReader() + const token = Vue.ls.get(ACCESS_TOKEN) + fileReader.onload = function () { try { - let jsonData = JSON.parse(this.result); // 说明是普通对象数据,后台转换失败 - console.log("jsonData",jsonData) + const jsonData = JSON.parse(this.result) // 说明是普通对象数据,后台转换失败 + console.log('jsonData', jsonData) if (jsonData.status === 500) { - console.log("token----------》",token) - if(token && jsonData.message.includes("Token失效")){ + console.log('token----------》', token) + if (token && jsonData.message.includes('Token失效')) { Modal.error({ title: '登录已过期', content: '很抱歉,登录已过期,请重新登录', @@ -166,13 +166,13 @@ function blobToJson(data) { } } catch (err) { // 解析成对象失败,说明是正常的文件流 - console.log("blob解析fileReader返回err",err) + console.log('blob解析fileReader返回err', err) } - }; + } fileReader.readAsText(data) } export { installer as VueAxios, service as axios -} \ No newline at end of file +} diff --git a/jero-web/src/utils/rules.js b/jero-web/src/utils/rules.js index 8386e613..7a50e282 100644 --- a/jero-web/src/utils/rules.js +++ b/jero-web/src/utils/rules.js @@ -1,5 +1,5 @@ const validateMobile = (rule, value, callback) => { - let reg = /^1(3|4|5|7|8)\d{9}$/ + const reg = /^1(3|4|5|7|8)\d{9}$/ if (!reg.test(value)) { callback('请输入正确手机号') } else { @@ -7,8 +7,8 @@ const validateMobile = (rule, value, callback) => { } } const validateEn = (rule, value, callback) => { - let reg = /^[_a-zA-Z0-9]+$/ - let reg2 = /^.{4,18}$/ + const reg = /^[_a-zA-Z0-9]+$/ + const reg2 = /^.{4,18}$/ // 长度为6到18个字符 if (value !== '' && !reg.test(value)) { callback('只允许字母、数字、下划线') @@ -66,30 +66,30 @@ export const rules = { // 255位以内的字符 char0to255: /^.{0,255}$/, char0to255Msg: '请输入255位以内的字符', - required: function(min, max) { - let rule = [{ required: true, message: '', trigger: 'blur' }] + required: function (min, max) { + const rule = [{ required: true, message: '', trigger: 'blur' }] if (min) { - let r = { min: min, message: '最小长度' + min + '位字符' } + const r = { min: min, message: '最小长度' + min + '位字符' } rule.push(r) } if (max) { - let m = { max: max, message: '最大长度' + max + '位字符' } + const m = { max: max, message: '最大长度' + max + '位字符' } rule.push(m) } return rule }, - select: function() { - let rule = [{ required: true, message: '', trigger: 'change' }] + select: function () { + const rule = [{ required: true, message: '', trigger: 'change' }] return rule }, - checked: function(min, max) { - let rule = [{ required: true, type: 'array', message: '', trigger: 'change' }] + checked: function (min, max) { + const rule = [{ required: true, type: 'array', message: '', trigger: 'change' }] if (min) { - let r = { type: 'array', min: min, message: '最少选择' + min + '项' } + const r = { type: 'array', min: min, message: '最少选择' + min + '项' } rule.push(r) } if (max) { - let m = { type: 'array', max: max, message: '最多选择' + max + '项' } + const m = { type: 'array', max: max, message: '最多选择' + max + '项' } rule.push(m) } return rule @@ -98,13 +98,10 @@ export const rules = { /** * @description 排序值验证,排序值不可以大于255 */ -export const validateOrder = function(rule, value, callback) { +export const validateOrder = function (rule, value, callback) { if (parseInt(value) > 255) { return callback(new Error('排序值不可以大于255')) } else { callback() } } - - - diff --git a/jero-web/src/utils/storage.js b/jero-web/src/utils/storage.js index b3c29ab3..b1ab04c5 100644 --- a/jero-web/src/utils/storage.js +++ b/jero-web/src/utils/storage.js @@ -7,21 +7,21 @@ */ export const setStore = (name, content, maxAge = null) => { if (!global.window || !name) { - return; + return } if (typeof content !== 'string') { content = JSON.stringify(content) } - let storage = global.window.localStorage + const storage = global.window.localStorage storage.setItem(name, content) if (maxAge && !isNaN(parseInt(maxAge))) { - let timeout = parseInt(new Date().getTime() / 1000) + const timeout = parseInt(new Date().getTime() / 1000) storage.setItem(`${name}_expire`, timeout + maxAge) } -}; +} /** * Get storage @@ -31,16 +31,16 @@ export const setStore = (name, content, maxAge = null) => { */ export const getStore = name => { if (!global.window || !name) { - return; + return } - let content = window.localStorage.getItem(name) - let _expire = window.localStorage.getItem(`${name}_expire`) + const content = window.localStorage.getItem(name) + const _expire = window.localStorage.getItem(`${name}_expire`) if (_expire) { - let now = parseInt(new Date().getTime() / 1000) + const now = parseInt(new Date().getTime() / 1000) if (now > _expire) { - return; + return } } @@ -49,7 +49,7 @@ export const getStore = name => { } catch (e) { return content } -}; +} /** * Clear storage @@ -58,21 +58,20 @@ export const getStore = name => { */ export const clearStore = name => { if (!global.window || !name) { - return; + return } window.localStorage.removeItem(name) window.localStorage.removeItem(`${name}_expire`) -}; +} /** * Clear all storage */ export const clearAll = () => { if (!global.window || !name) { - return; + return } window.localStorage.clear() } - diff --git a/jero-web/src/utils/util.js b/jero-web/src/utils/util.js index 23f06c77..14bb5a7f 100644 --- a/jero-web/src/utils/util.js +++ b/jero-web/src/utils/util.js @@ -4,23 +4,23 @@ import { isURL } from '@/utils/validate' import { ACCESS_TOKEN } from '@/store/mutation-types' import onlineCommons from '@/components/onlineForm/onlineForm' // -export function timeFix() { +export function timeFix () { const time = new Date() const hour = time.getHours() return hour < 9 ? '早上好' : (hour <= 11 ? '上午好' : (hour <= 13 ? '中午好' : (hour < 20 ? '下午好' : '晚上好'))) } -export function welcome() { +export function welcome () { const arr = ['休息一会儿吧', '准备吃什么呢?', '要不要打一把 DOTA', '我猜你可能累了'] - let index = Math.floor((Math.random()*arr.length)) + const index = Math.floor((Math.random() * arr.length)) return arr[index] } /** * 触发 window.resize */ -export function triggerWindowResizeEvent() { - let event = document.createEvent('HTMLEvents') +export function triggerWindowResizeEvent () { + const event = document.createEvent('HTMLEvents') event.initEvent('resize', true, true) event.eventType = 'message' window.dispatchEvent(event) @@ -31,18 +31,18 @@ export function triggerWindowResizeEvent() { * @param obj * @returns {*} */ -export function filterObj(obj) { - if (!(typeof obj == 'object')) { - return; +export function filterObj (obj) { + if (!(typeof obj === 'object')) { + return } - for ( let key in obj) { - if (obj.hasOwnProperty(key) - && (obj[key] == null || obj[key] == undefined || obj[key] === '')) { - delete obj[key]; + for (const key in obj) { + if (obj.hasOwnProperty(key) && + (obj[key] == null || obj[key] == undefined || obj[key] === '')) { + delete obj[key] } } - return obj; + return obj } /** @@ -51,130 +51,130 @@ export function filterObj(obj) { * @param fmt * @returns {*} */ -export function formatDate(value, fmt) { - let regPos = /^\d+(\.\d+)?$/; - if(regPos.test(value)){ - //如果是数字 - let getDate = new Date(value); - let o = { +export function formatDate (value, fmt) { + const regPos = /^\d+(\.\d+)?$/ + if (regPos.test(value)) { + // 如果是数字 + const getDate = new Date(value) + const o = { 'M+': getDate.getMonth() + 1, 'd+': getDate.getDate(), 'h+': getDate.getHours(), 'm+': getDate.getMinutes(), 's+': getDate.getSeconds(), 'q+': Math.floor((getDate.getMonth() + 3) / 3), - 'S': getDate.getMilliseconds() - }; + S: getDate.getMilliseconds() + } if (/(y+)/.test(fmt)) { fmt = fmt.replace(RegExp.$1, (getDate.getFullYear() + '').substr(4 - RegExp.$1.length)) } - for (let k in o) { + for (const k in o) { if (new RegExp('(' + k + ')').test(fmt)) { fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length))) } } - return fmt; - }else{ - //TODO - value = value.trim(); - return value.substr(0,fmt.length); + return fmt + } else { + // TODO + value = value.trim() + return value.substr(0, fmt.length) } } // 生成首页路由 -export function generateIndexRouter(data) { +export function generateIndexRouter (data) { const redirectPath = findFirstRoute(data) - let indexRouter = [{ - path: '/', - name: 'dashboard', - //component: () => import('@/components/layouts/BasicLayout'), - component: resolve => require(['@/components/layouts/TabLayout'], resolve), - meta: { title: '首页' }, - redirect: redirectPath, - children: [ - ...generateChildRouters(data) - ] - },{ - "path": "*", "redirect": "/404", "hidden": true - }] - return indexRouter; + const indexRouter = [{ + path: '/', + name: 'dashboard', + // component: () => import('@/components/layouts/BasicLayout'), + component: resolve => require(['@/components/layouts/TabLayout'], resolve), + meta: { title: '首页' }, + redirect: redirectPath, + children: [ + ...generateChildRouters(data) + ] + }, { + path: '*', redirect: '/404', hidden: true + }] + return indexRouter } // 生成嵌套路由(子路由) -function generateChildRouters (data) { - const routers = []; - for (let item of data) { - let component = ""; - if(item.component.indexOf("layouts")>=0){ - component = "components/"+item.component; - }else{ - component = "views/"+item.component; +function generateChildRouters (data) { + const routers = [] + for (const item of data) { + let component = '' + if (item.component.indexOf('layouts') >= 0) { + component = 'components/' + item.component + } else { + component = 'views/' + item.component } // eslint-disable-next-line let URL = (item.meta.url|| '').replace(/{{([^}}]+)?}}/g, (s1, s2) => eval(s2)) // URL支持{{ window.xxx }}占位符变量 - if (isURL(URL) || (item.meta.url && item.meta.url.indexOf("{{") == 0)) { - item.meta.url = URL; + if (isURL(URL) || (item.meta.url && item.meta.url.indexOf('{{') == 0)) { + item.meta.url = URL } let componentPath - if(item.component=="modules/online/cgform/OnlCgformHeadList"){ + if (item.component == 'modules/online/cgform/OnlCgformHeadList') { componentPath = onlineCommons.OnlCgformHeadList - }else if(item.component=="modules/online/cgform/OnlCgformCopyList"){ + } else if (item.component == 'modules/online/cgform/OnlCgformCopyList') { componentPath = onlineCommons.OnlCgformCopyList - }else if(item.component=="modules/online/cgform/auto/OnlCgformAutoList"){ + } else if (item.component == 'modules/online/cgform/auto/OnlCgformAutoList') { componentPath = onlineCommons.OnlCgformAutoList - }else if(item.component=="modules/online/cgform/auto/OnlCgformTreeList"){ + } else if (item.component == 'modules/online/cgform/auto/OnlCgformTreeList') { componentPath = onlineCommons.OnlCgformTreeList - }else if(item.component=="modules/online/cgform/auto/erp/OnlCgformErpList"){ + } else if (item.component == 'modules/online/cgform/auto/erp/OnlCgformErpList') { componentPath = onlineCommons.OnlCgformErpList - }else if(item.component=="modules/online/cgform/auto/tab/OnlCgformTabList"){ + } else if (item.component == 'modules/online/cgform/auto/tab/OnlCgformTabList') { componentPath = onlineCommons.OnlCgformTabList - }else if(item.component=="modules/online/cgform/auto/innerTable/OnlCgformInnerTableList"){ + } else if (item.component == 'modules/online/cgform/auto/innerTable/OnlCgformInnerTableList') { componentPath = onlineCommons.OnlCgformInnerTableList - }else if(item.component=="modules/online/cgreport/OnlCgreportHeadList"){ + } else if (item.component == 'modules/online/cgreport/OnlCgreportHeadList') { componentPath = onlineCommons.OnlCgreportHeadList - }else if(item.component=="modules/online/cgreport/auto/OnlCgreportAutoList"){ + } else if (item.component == 'modules/online/cgreport/auto/OnlCgreportAutoList') { componentPath = onlineCommons.OnlCgreportAutoList - }else{ - componentPath = resolve => require(['@/' + component+'.vue'], resolve) + } else { + componentPath = resolve => require(['@/' + component + '.vue'], resolve) } - let menu = { + const menu = { path: item.path, name: item.name, - redirect:item.redirect, + redirect: item.redirect, component: componentPath, - //component: resolve => require(['@/' + component+'.vue'], resolve), - hidden:item.hidden, + // component: resolve => require(['@/' + component+'.vue'], resolve), + hidden: item.hidden, meta: { - title:item.meta.title , + title: item.meta.title, icon: item.meta.icon, - url:item.meta.url , - permissionList:item.meta.permissionList, - keepAlive:item.meta.keepAlive, - /*update_begin author:wuxianquan date:20190908 for:赋值 */ - internalOrExternal:item.meta.internalOrExternal, - /*update_end author:wuxianquan date:20190908 for:赋值 */ - componentName:item.meta.componentName + url: item.meta.url, + permissionList: item.meta.permissionList, + keepAlive: item.meta.keepAlive, + /* update_begin author:wuxianquan date:20190908 for:赋值 */ + internalOrExternal: item.meta.internalOrExternal, + /* update_end author:wuxianquan date:20190908 for:赋值 */ + componentName: item.meta.componentName } } - if(item.alwaysShow){ - menu.alwaysShow = true; - menu.redirect = menu.path; + if (item.alwaysShow) { + menu.alwaysShow = true + menu.redirect = menu.path } if (item.children && item.children.length > 0) { - menu.children = [...generateChildRouters( item.children)]; + menu.children = [...generateChildRouters(item.children)] } - //--update-begin----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------ - //判断是否生成路由 - if(item.route && item.route === '0'){ - //console.log(' 不生成路由 item.route: '+item.route); - //console.log(' 不生成路由 item.path: '+item.path); - }else{ - routers.push(menu); + // --update-begin----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------ + // 判断是否生成路由 + if (item.route && item.route === '0') { + // console.log(' 不生成路由 item.route: '+item.route); + // console.log(' 不生成路由 item.path: '+item.path); + } else { + routers.push(menu) } - //--update-end----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------ + // --update-end----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------ } return routers } @@ -184,7 +184,7 @@ function generateChildRouters (data) { * @param obj 被克隆的对象 * @return 克隆后的对象 */ -export function cloneObject(obj) { +export function cloneObject (obj) { return JSON.parse(JSON.stringify(obj)) } @@ -198,18 +198,18 @@ export function cloneObject(obj) { * @param2 最大值 * @return int 生成后的数字 */ -export function randomNumber() { +export function randomNumber () { // 生成 最小值 到 最大值 区间的随机数 const random = (min, max) => { return Math.floor(Math.random() * (max - min + 1) + min) } if (arguments.length === 1) { - let [length] = arguments - // 生成指定长度的随机数字,首位一定不是 0 - let nums = [...Array(length).keys()].map((i) => (i > 0 ? random(0, 9) : random(1, 9))) + const [length] = arguments + // 生成指定长度的随机数字,首位一定不是 0 + const nums = [...Array(length).keys()].map((i) => (i > 0 ? random(0, 9) : random(1, 9))) return parseInt(nums.join('')) } else if (arguments.length >= 2) { - let [min, max] = arguments + const [min, max] = arguments return random(min, max) } else { return Number.NaN @@ -222,12 +222,12 @@ export function randomNumber() { * @param chats 可选字符串区间(只会生成传入的字符串中的字符) * @return string 生成的字符串 */ -export function randomString(length, chats) { +export function randomString (length, chats) { if (!length) length = 1 if (!chats) chats = '0123456789qwertyuioplkjhgfdsazxcvbnm' let str = '' for (let i = 0; i < length; i++) { - let num = randomNumber(0, chats.length - 1) + const num = randomNumber(0, chats.length - 1) str += chats[num] } return str @@ -237,8 +237,8 @@ export function randomString(length, chats) { * 随机生成uuid * @return string 生成的uuid */ -export function randomUUID() { - let chats = '0123456789abcdef' +export function randomUUID () { + const chats = '0123456789abcdef' return randomString(32, chats) } @@ -247,10 +247,10 @@ export function randomUUID() { * @param string * @returns {*} */ -export function underLine2CamelCase(string){ - return string.replace( /_([a-z])/g, function( all, letter ) { - return letter.toUpperCase(); - }); +export function underLine2CamelCase (string) { + return string.replace(/_([a-z])/g, function (all, letter) { + return letter.toUpperCase() + }) } /** @@ -258,11 +258,11 @@ export function underLine2CamelCase(string){ * @param bpmStatus * @returns {*} */ -export function showDealBtn(bpmStatus){ - if(bpmStatus!="1"&&bpmStatus!="3"&&bpmStatus!="4"){ - return true; +export function showDealBtn (bpmStatus) { + if (bpmStatus != '1' && bpmStatus != '3' && bpmStatus != '4') { + return true } - return false; + return false } /** @@ -270,13 +270,13 @@ export function showDealBtn(bpmStatus){ * @param css 要增强的css * @param id style标签的id,可以用来清除旧样式 */ -export function cssExpand(css, id) { - let style = document.createElement('style') - style.type = "text/css" +export function cssExpand (css, id) { + const style = document.createElement('style') + style.type = 'text/css' style.innerHTML = `@charset "UTF-8"; ${css}` // 清除旧样式 if (id) { - let $style = document.getElementById(id) + const $style = document.getElementById(id) if ($style != null) $style.outerHTML = '' style.id = id } @@ -284,7 +284,6 @@ export function cssExpand(css, id) { document.head.appendChild(style) } - /** 用于js增强事件,运行JS代码,可以传参 */ // options 所需参数: // 参数名 类型 说明 @@ -292,18 +291,17 @@ export function cssExpand(css, id) { // event Object event对象 // jsCode String 待执行的js代码 // errorMessage String 执行出错后的提示(控制台) -export function jsExpand(options = {}) { - +export function jsExpand (options = {}) { // 绑定到window上的keyName - let windowKeyName = 'J_CLICK_EVENT_OPTIONS' - if (typeof window[windowKeyName] != 'object') { + const windowKeyName = 'J_CLICK_EVENT_OPTIONS' + if (typeof window[windowKeyName] !== 'object') { window[windowKeyName] = {} } // 随机生成JS增强的执行id,防止冲突 - let id = randomString(16, 'qwertyuioplkjhgfdsazxcvbnm'.toUpperCase()) + const id = randomString(16, 'qwertyuioplkjhgfdsazxcvbnm'.toUpperCase()) // 封装按钮点击事件 - let code = ` + const code = ` (function (o_${id}) { try { (function (globalEvent, vm) { @@ -322,13 +320,13 @@ export function jsExpand(options = {}) { vm: options.vm, event: options.event, // 当执行完成时,无论如何都会调用的回调事件 - done() { + done () { // 执行完后删除新增的 script 标签不会撤销执行结果(已产生的结果不会被撤销) script.outerHTML = '' delete window[windowKeyName]['EVENT_' + id] }, // 当js运行出错的时候调用的事件 - error(e) { + error (e) { console.group(`${options.errorMessage || '用户自定义JS增强代码运行出错'}(${new Date()})`) console.error(e) console.groupEnd() @@ -339,7 +337,6 @@ export function jsExpand(options = {}) { document.body.appendChild(script) } - /** * 重复值验证工具方法 * @@ -352,11 +349,11 @@ export function jsExpand(options = {}) { * @param dataId 数据ID,可空 * @param callback */ -export function validateDuplicateValue(tableName, fieldName, fieldVal, dataId, callback) { +export function validateDuplicateValue (tableName, fieldName, fieldVal, dataId, callback) { if (fieldVal) { - let params = { tableName, fieldName, fieldVal, dataId } + const params = { tableName, fieldName, fieldVal, dataId } api.duplicateCheck(params).then(res => { - res['success'] ? callback() : callback(res['message']) + res.success ? callback() : callback(res.message) }).catch(err => { callback(err.message || err) }) @@ -375,11 +372,11 @@ export function validateDuplicateValue(tableName, fieldName, fieldVal, dataId, c * @param value 被验证的值 * @param callback */ -export function validateCheckRule(ruleCode, value, callback) { +export function validateCheckRule (ruleCode, value, callback) { if (ruleCode && value) { value = encodeURIComponent(value) api.checkRuleByCode({ ruleCode, value }).then(res => { - res['success'] ? callback() : callback(res['message']) + res.success ? callback() : callback(res.message) }).catch(err => { callback(err.message || err) }) @@ -395,8 +392,8 @@ export function validateCheckRule(ruleCode, value, callback) { * @param key 可空,如果比较的是对象,可能存在地址不一样但值实际上是一样的情况,可以传此字段判断对象中唯一的字段,例如 id。不传则直接比较实际值 * @returns {boolean} 成功 push 返回 true,不处理返回 false */ -export function pushIfNotExist(array, value, key) { - for (let item of array) { +export function pushIfNotExist (array, value, key) { + for (const item of array) { if (key && (item[key] === value[key])) { return false } else if (item === value) { @@ -425,7 +422,7 @@ export const failedSymbol = Symbol() * @param promise 可传Promise对象或返回Promise对象的方法 * @returns {Promise} */ -export function alwaysResolve(promise) { +export function alwaysResolve (promise) { return new Promise((resolve, reject) => { let p = promise if (typeof promise === 'function') { @@ -454,10 +451,10 @@ export function alwaysResolve(promise) { * @param delay 防抖的毫秒数 * @returns {Function} */ -export function simpleDebounce(fn, delay = 100) { +export function simpleDebounce (fn, delay = 100) { let timer = null return function () { - let args = arguments + const args = arguments if (timer) { clearTimeout(timer) } @@ -474,8 +471,8 @@ export function simpleDebounce(fn, delay = 100) { * @param replacer 替换后的内容 * @returns {String} 替换后的字符串 */ -export function replaceAll(text, checker, replacer) { - let lastText = text +export function replaceAll (text, checker, replacer) { + const lastText = text text = text.replace(checker, replacer) if (lastText !== text) { return replaceAll(text, checker, replacer) @@ -487,9 +484,9 @@ export function replaceAll(text, checker, replacer) { * 获取事件冒泡路径,兼容 IE11,Edge,Chrome,Firefox,Safari * 目前使用的地方:JEditableTable Span模式 */ -export function getEventPath(event) { - let target = event.target - let path = (event.composedPath && event.composedPath()) || event.path +export function getEventPath (event) { + const target = event.target + const path = (event.composedPath && event.composedPath()) || event.path if (path != null) { return (path.indexOf(window) < 0) ? path.concat(window) : path @@ -499,7 +496,7 @@ export function getEventPath(event) { return [window] } - let getParents = (node, memo) => { + const getParents = (node, memo) => { memo = memo || [] const parentNode = node.parentNode @@ -518,13 +515,13 @@ export function getEventPath(event) { * @param name * @returns {Vue | null|null|Vue} */ -export function getVmParentByName(vm, name) { - let parent = vm.$parent +export function getVmParentByName (vm, name) { + const parent = vm.$parent if (parent && parent.$options) { if (parent.$options.name === name) { return parent } else { - let res = getVmParentByName(parent, name) + const res = getVmParentByName(parent, name) if (res) { return res } @@ -539,7 +536,7 @@ export function getVmParentByName(vm, name) { * @param value 要处理的值 * @param def 默认值,如果value为(null | undefined)则返回的默认值,可不传,默认为'' */ -export function neverNull(value, def) { +export function neverNull (value, def) { return value == null ? (neverNull(def, '')) : value } @@ -550,19 +547,19 @@ export function neverNull(value, def) { * @param value 属性值 * @returns {string} */ -export function removeArrayElement(array, prod, value) { +export function removeArrayElement (array, prod, value) { let index = -1 - for(let i = 0;i=0){ - array.splice(index, 1); + if (index >= 0) { + array.splice(index, 1) } } -export function findFirstRoute(data){ +export function findFirstRoute (data) { if (data[0]) { if (data[0] && data[0].children && data[0].children.length > 0) { return findFirstRoute(data[0].children) @@ -575,7 +572,7 @@ export function findFirstRoute(data){ } /** 判断是否是OAuth2APP环境 */ -export function isOAuth2AppEnv() { +export function isOAuth2AppEnv () { return /wxwork|dingtalk/i.test(navigator.userAgent) } @@ -586,7 +583,7 @@ export function isOAuth2AppEnv() { * @param open 是否自动打开 * @returns {*} */ -export function getReportPrintUrl(url, id, open) { +export function getReportPrintUrl (url, id, open) { // URL支持{{ window.xxx }}占位符变量 url = url.replace(/{{([^}]+)?}}/g, (s1, s2) => eval(s2)) if (url.includes('?')) { diff --git a/jero-web/src/utils/vueBus.js b/jero-web/src/utils/vueBus.js index 95235a03..003452af 100644 --- a/jero-web/src/utils/vueBus.js +++ b/jero-web/src/utils/vueBus.js @@ -1,5 +1,5 @@ -import Bus from 'vue'; -let install = function (Vue) { +import Bus from 'vue' +const install = function (Vue) { Vue.prototype.$bus = new Bus() } -export default { install }; \ No newline at end of file +export default { install } diff --git a/jero-web/src/views/Home.vue b/jero-web/src/views/Home.vue index 6322fda6..4aa87910 100644 --- a/jero-web/src/views/Home.vue +++ b/jero-web/src/views/Home.vue @@ -100,41 +100,41 @@ \ No newline at end of file + diff --git a/jero-web/src/views/account/center/page/App.vue b/jero-web/src/views/account/center/page/App.vue index e563bd27..601d6004 100644 --- a/jero-web/src/views/account/center/page/App.vue +++ b/jero-web/src/views/account/center/page/App.vue @@ -58,25 +58,25 @@ \ No newline at end of file + diff --git a/jero-web/src/views/account/center/page/Article.vue b/jero-web/src/views/account/center/page/Article.vue index 0d743ef5..0bec22f3 100644 --- a/jero-web/src/views/account/center/page/Article.vue +++ b/jero-web/src/views/account/center/page/Article.vue @@ -7,18 +7,18 @@ \ No newline at end of file + diff --git a/jero-web/src/views/account/center/page/Project.vue b/jero-web/src/views/account/center/page/Project.vue index 460e02fd..fa398295 100644 --- a/jero-web/src/views/account/center/page/Project.vue +++ b/jero-web/src/views/account/center/page/Project.vue @@ -7,11 +7,11 @@ \ No newline at end of file + diff --git a/jero-web/src/views/account/center/page/index.js b/jero-web/src/views/account/center/page/index.js index e80351ad..b579b6a3 100644 --- a/jero-web/src/views/account/center/page/index.js +++ b/jero-web/src/views/account/center/page/index.js @@ -2,4 +2,4 @@ import AppPage from './App' import ArticlePage from './Article' import ProjectPage from './Project' -export { AppPage, ArticlePage, ProjectPage } \ No newline at end of file +export { AppPage, ArticlePage, ProjectPage } diff --git a/jero-web/src/views/account/settings/AvatarModal.vue b/jero-web/src/views/account/settings/AvatarModal.vue index 9986088d..36e7f636 100644 --- a/jero-web/src/views/account/settings/AvatarModal.vue +++ b/jero-web/src/views/account/settings/AvatarModal.vue @@ -28,59 +28,57 @@ \ No newline at end of file + diff --git a/jero-web/src/views/account/settings/BaseSetting.vue b/jero-web/src/views/account/settings/BaseSetting.vue index fb6d55ca..6278aa1b 100644 --- a/jero-web/src/views/account/settings/BaseSetting.vue +++ b/jero-web/src/views/account/settings/BaseSetting.vue @@ -70,37 +70,37 @@ \ No newline at end of file + diff --git a/jero-web/src/views/account/settings/Binding.vue b/jero-web/src/views/account/settings/Binding.vue index 273825ba..cbea7fc0 100644 --- a/jero-web/src/views/account/settings/Binding.vue +++ b/jero-web/src/views/account/settings/Binding.vue @@ -8,18 +8,18 @@ \ No newline at end of file + diff --git a/jero-web/src/views/account/settings/Custom.vue b/jero-web/src/views/account/settings/Custom.vue index 8734c6f8..be01901b 100644 --- a/jero-web/src/views/account/settings/Custom.vue +++ b/jero-web/src/views/account/settings/Custom.vue @@ -1,75 +1,75 @@ \ No newline at end of file + diff --git a/jero-web/src/views/account/settings/Index.vue b/jero-web/src/views/account/settings/Index.vue index 5165b24f..234823e6 100644 --- a/jero-web/src/views/account/settings/Index.vue +++ b/jero-web/src/views/account/settings/Index.vue @@ -45,118 +45,118 @@ \ No newline at end of file + diff --git a/jero-web/src/views/account/settings/Notification.vue b/jero-web/src/views/account/settings/Notification.vue index 273825ba..cbea7fc0 100644 --- a/jero-web/src/views/account/settings/Notification.vue +++ b/jero-web/src/views/account/settings/Notification.vue @@ -8,18 +8,18 @@ \ No newline at end of file + diff --git a/jero-web/src/views/account/settings/Security.vue b/jero-web/src/views/account/settings/Security.vue index 35aedb13..e8069181 100644 --- a/jero-web/src/views/account/settings/Security.vue +++ b/jero-web/src/views/account/settings/Security.vue @@ -21,21 +21,21 @@ \ No newline at end of file + diff --git a/jero-web/src/views/dashboard/Analysis.vue b/jero-web/src/views/dashboard/Analysis.vue index 2e16b225..0a4f847c 100644 --- a/jero-web/src/views/dashboard/Analysis.vue +++ b/jero-web/src/views/dashboard/Analysis.vue @@ -15,27 +15,27 @@ \ No newline at end of file +} + diff --git a/jero-web/src/views/dashboard/IndexBdc.vue b/jero-web/src/views/dashboard/IndexBdc.vue index fa8edeab..3d9bbeed 100644 --- a/jero-web/src/views/dashboard/IndexBdc.vue +++ b/jero-web/src/views/dashboard/IndexBdc.vue @@ -166,7 +166,6 @@ - @@ -175,275 +174,275 @@ \ No newline at end of file + diff --git a/jero-web/src/views/dashboard/IndexChart.vue b/jero-web/src/views/dashboard/IndexChart.vue index 60ac1f54..e3c469c7 100644 --- a/jero-web/src/views/dashboard/IndexChart.vue +++ b/jero-web/src/views/dashboard/IndexChart.vue @@ -136,85 +136,85 @@ \ No newline at end of file + diff --git a/jero-web/src/views/dashboard/IndexTask.vue b/jero-web/src/views/dashboard/IndexTask.vue index 76a6b1ab..0394cca9 100644 --- a/jero-web/src/views/dashboard/IndexTask.vue +++ b/jero-web/src/views/dashboard/IndexTask.vue @@ -139,168 +139,165 @@ \ No newline at end of file + diff --git a/jero-web/src/views/dashboard/Monitor.vue b/jero-web/src/views/dashboard/Monitor.vue index 144e237e..2b9c6c1c 100644 --- a/jero-web/src/views/dashboard/Monitor.vue +++ b/jero-web/src/views/dashboard/Monitor.vue @@ -5,11 +5,11 @@ \ No newline at end of file + diff --git a/jero-web/src/views/dashboard/Workplace.vue b/jero-web/src/views/dashboard/Workplace.vue index 57d0a06e..3195a89d 100644 --- a/jero-web/src/views/dashboard/Workplace.vue +++ b/jero-web/src/views/dashboard/Workplace.vue @@ -110,139 +110,138 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/ImagCropper.vue b/jero-web/src/views/demo/ImagCropper.vue index c90d4a23..ccb54b1e 100644 --- a/jero-web/src/views/demo/ImagCropper.vue +++ b/jero-web/src/views/demo/ImagCropper.vue @@ -188,257 +188,257 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/ImagPreview.vue b/jero-web/src/views/demo/ImagPreview.vue index b6309540..0d1bb9a1 100644 --- a/jero-web/src/views/demo/ImagPreview.vue +++ b/jero-web/src/views/demo/ImagPreview.vue @@ -56,49 +56,49 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/ImgDragSort.vue b/jero-web/src/views/demo/ImgDragSort.vue index de78279b..beea5834 100644 --- a/jero-web/src/views/demo/ImgDragSort.vue +++ b/jero-web/src/views/demo/ImgDragSort.vue @@ -25,51 +25,51 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/ImgTurnPage.vue b/jero-web/src/views/demo/ImgTurnPage.vue index 258e095d..70abc957 100644 --- a/jero-web/src/views/demo/ImgTurnPage.vue +++ b/jero-web/src/views/demo/ImgTurnPage.vue @@ -33,115 +33,120 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/InterfaceTest.vue b/jero-web/src/views/demo/InterfaceTest.vue index 8b30f73f..c74685a2 100644 --- a/jero-web/src/views/demo/InterfaceTest.vue +++ b/jero-web/src/views/demo/InterfaceTest.vue @@ -35,58 +35,57 @@ \ No newline at end of file +} + diff --git a/jero-web/src/views/demo/JVXETableDemo.vue b/jero-web/src/views/demo/JVXETableDemo.vue index 9f485616..6a0a6da6 100644 --- a/jero-web/src/views/demo/JVXETableDemo.vue +++ b/jero-web/src/views/demo/JVXETableDemo.vue @@ -19,20 +19,20 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/JVxeDemo/JVxeDemo1.vue b/jero-web/src/views/demo/JVxeDemo/JVxeDemo1.vue index b0aa07b3..b3a4e2b0 100644 --- a/jero-web/src/views/demo/JVxeDemo/JVxeDemo1.vue +++ b/jero-web/src/views/demo/JVxeDemo/JVxeDemo1.vue @@ -36,269 +36,267 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/JVxeDemo/JVxeDemo2.vue b/jero-web/src/views/demo/JVxeDemo/JVxeDemo2.vue index eef44897..7284cd7b 100644 --- a/jero-web/src/views/demo/JVxeDemo/JVxeDemo2.vue +++ b/jero-web/src/views/demo/JVxeDemo/JVxeDemo2.vue @@ -22,163 +22,161 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/JVxeDemo/JVxeDemo3.vue b/jero-web/src/views/demo/JVxeDemo/JVxeDemo3.vue index b61df62a..af2f56f6 100644 --- a/jero-web/src/views/demo/JVxeDemo/JVxeDemo3.vue +++ b/jero-web/src/views/demo/JVxeDemo/JVxeDemo3.vue @@ -17,13 +17,13 @@ import { JVXETypes } from '@/components/jero/JVxeTable' export default { name: 'JVxeDemo3', - data() { + data () { return { // 联动配置 linkageConfig: [ - {requestData: this.requestData, key: 's1'}, + { requestData: this.requestData, key: 's1' }, // 可配置多个联动 - {requestData: this.loadData, key: 'level1',}, + { requestData: this.loadData, key: 'level1' } ], columns: [ { @@ -32,7 +32,7 @@ export default { type: JVXETypes.select, dictCode: 'sex', width: '180px', - placeholder: '请选择${title}', + placeholder: '请选择${title}' }, { title: '省/直辖市/自治区', @@ -41,7 +41,7 @@ export default { width: '180px', placeholder: '请选择${title}', // 联动字段(即下一级的字段) - linkageKey: 's2', + linkageKey: 's2' }, { title: '市', @@ -50,7 +50,7 @@ export default { width: '180px', placeholder: '请选择${title}', // 联动字段(即下一级的字段) - linkageKey: 's3', + linkageKey: 's3' }, { title: '县/区', @@ -58,7 +58,7 @@ export default { type: JVXETypes.select, width: '180px', options: [], - placeholder: '请选择${title}', + placeholder: '请选择${title}' }, { title: '一级', @@ -67,7 +67,7 @@ export default { width: '180px', placeholder: '请选择${title}', // 联动字段(即下一级的字段) - linkageKey: 'level2', + linkageKey: 'level2' }, { title: '二级', @@ -76,80 +76,80 @@ export default { width: '180px', placeholder: '请选择${title}', // 联动字段(即下一级的字段) - linkageKey: 'level3', + linkageKey: 'level3' }, { title: '三级', key: 'level3', type: JVXETypes.select, width: '180px', - placeholder: '请选择${title}', + placeholder: '请选择${title}' } ], dataSource: [ - {sex: '1', s1: '110000', s2: '110100', s3: '110101', level1: '1', level2: '3', level3: '7'}, - {sex: '2', s1: '130000', s2: '130300', s3: '130303', level1: '2', level2: '6', level3: '14'}, + { sex: '1', s1: '110000', s2: '110100', s3: '110101', level1: '1', level2: '3', level3: '7' }, + { sex: '2', s1: '130000', s2: '130300', s3: '130303', level1: '2', level2: '6', level3: '14' } ], // 模拟数据 mockData: [ - {text: '北京市', value: '110000', parent: ''}, - {text: '天津市', value: '120000', parent: ''}, - {text: '河北省', value: '130000', parent: ''}, - {text: '上海市', value: '310000', parent: ''}, + { text: '北京市', value: '110000', parent: '' }, + { text: '天津市', value: '120000', parent: '' }, + { text: '河北省', value: '130000', parent: '' }, + { text: '上海市', value: '310000', parent: '' }, - {text: '北京市', value: '110100', parent: '110000'}, - {text: '天津市市', value: '120100', parent: '120000'}, - {text: '石家庄市', value: '130100', parent: '130000'}, - {text: '唐山市', value: '130200', parent: '130000'}, - {text: '秦皇岛市', value: '130300', parent: '130000'}, - {text: '上海市', value: '310100', parent: '310000'}, + { text: '北京市', value: '110100', parent: '110000' }, + { text: '天津市市', value: '120100', parent: '120000' }, + { text: '石家庄市', value: '130100', parent: '130000' }, + { text: '唐山市', value: '130200', parent: '130000' }, + { text: '秦皇岛市', value: '130300', parent: '130000' }, + { text: '上海市', value: '310100', parent: '310000' }, - {text: '东城区', value: '110101', parent: '110100'}, - {text: '西城区', value: '110102', parent: '110100'}, - {text: '朝阳区', value: '110105', parent: '110100'}, - {text: '和平区', value: '120101', parent: '120100'}, - {text: '河东区', value: '120102', parent: '120100'}, - {text: '河西区', value: '120103', parent: '120100'}, - {text: '黄浦区', value: '310101', parent: '310100'}, - {text: '徐汇区', value: '310104', parent: '310100'}, - {text: '长宁区', value: '310105', parent: '310100'}, - {text: '长安区', value: '130102', parent: '130100'}, - {text: '桥西区', value: '130104', parent: '130100'}, - {text: '新华区', value: '130105', parent: '130100'}, - {text: '路南区', value: '130202', parent: '130200'}, - {text: '路北区', value: '130203', parent: '130200'}, - {text: '古冶区', value: '130204', parent: '130200'}, - {text: '海港区', value: '130302', parent: '130300'}, - {text: '山海关区', value: '130303', parent: '130300'}, - {text: '北戴河区', value: '130304', parent: '130300'}, + { text: '东城区', value: '110101', parent: '110100' }, + { text: '西城区', value: '110102', parent: '110100' }, + { text: '朝阳区', value: '110105', parent: '110100' }, + { text: '和平区', value: '120101', parent: '120100' }, + { text: '河东区', value: '120102', parent: '120100' }, + { text: '河西区', value: '120103', parent: '120100' }, + { text: '黄浦区', value: '310101', parent: '310100' }, + { text: '徐汇区', value: '310104', parent: '310100' }, + { text: '长宁区', value: '310105', parent: '310100' }, + { text: '长安区', value: '130102', parent: '130100' }, + { text: '桥西区', value: '130104', parent: '130100' }, + { text: '新华区', value: '130105', parent: '130100' }, + { text: '路南区', value: '130202', parent: '130200' }, + { text: '路北区', value: '130203', parent: '130200' }, + { text: '古冶区', value: '130204', parent: '130200' }, + { text: '海港区', value: '130302', parent: '130300' }, + { text: '山海关区', value: '130303', parent: '130300' }, + { text: '北戴河区', value: '130304', parent: '130300' } ], mockData1: [ - {id: '1', name: '图书馆', parentId: '0'}, - {id: '2', name: '电影院', parentId: '0'}, + { id: '1', name: '图书馆', parentId: '0' }, + { id: '2', name: '电影院', parentId: '0' }, - {id: '3', name: '一楼', parentId: '1'}, - {id: '4', name: '二楼', parentId: '1'}, - {id: '5', name: '中影星美', parentId: '2'}, - {id: '6', name: '万达国际', parentId: '2'}, + { id: '3', name: '一楼', parentId: '1' }, + { id: '4', name: '二楼', parentId: '1' }, + { id: '5', name: '中影星美', parentId: '2' }, + { id: '6', name: '万达国际', parentId: '2' }, - {id: '7', name: '技术图书', parentId: '3'}, - {id: '8', name: '财务图书', parentId: '3'}, - {id: '9', name: '儿童图书', parentId: '4'}, - {id: '10', name: '励志图书', parentId: '4'}, - {id: '11', name: '1号厅', parentId: '5'}, - {id: '12', name: '2号厅', parentId: '5'}, - {id: '13', name: 'I-MAX厅', parentId: '6'}, - {id: '14', name: '3D厅', parentId: '6'}, - ], + { id: '7', name: '技术图书', parentId: '3' }, + { id: '8', name: '财务图书', parentId: '3' }, + { id: '9', name: '儿童图书', parentId: '4' }, + { id: '10', name: '励志图书', parentId: '4' }, + { id: '11', name: '1号厅', parentId: '5' }, + { id: '12', name: '2号厅', parentId: '5' }, + { id: '13', name: 'I-MAX厅', parentId: '6' }, + { id: '14', name: '3D厅', parentId: '6' } + ] } }, methods: { /** * 模拟从后台查询数据 */ - requestData(parent) { + requestData (parent) { return new Promise((resolve, reject) => { - let data = this.mockData.filter(i => i.parent === parent) + const data = this.mockData.filter(i => i.parent === parent) setTimeout(() => { resolve(data) }, 500) @@ -157,26 +157,26 @@ export default { }, // 模拟加载数据,模拟数据格式不同的情况下如何组装数据 - async loadData(parent) { + async loadData (parent) { return new Promise((resolve, reject) => { - let parentId = parent === '' ? '0' : parent + const parentId = parent === '' ? '0' : parent let data = this.mockData1.filter(i => i.parentId === parentId) data = data.map(item => { return { // 必须包含以下两个字段 value: item.id, - text: item.name, + text: item.name } }) setTimeout(() => { resolve(data) }, 500) }) - }, + } } } \ No newline at end of file + diff --git a/jero-web/src/views/demo/JVxeDemo/demo/JSBCDemo.vue b/jero-web/src/views/demo/JVxeDemo/demo/JSBCDemo.vue index 82392494..59c53b08 100644 --- a/jero-web/src/views/demo/JVxeDemo/demo/JSBCDemo.vue +++ b/jero-web/src/views/demo/JVxeDemo/demo/JSBCDemo.vue @@ -31,204 +31,203 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/JVxeDemo/demo/PopupSubTable.vue b/jero-web/src/views/demo/JVxeDemo/demo/PopupSubTable.vue index e13f41e8..a23c8993 100644 --- a/jero-web/src/views/demo/JVxeDemo/demo/PopupSubTable.vue +++ b/jero-web/src/views/demo/JVxeDemo/demo/PopupSubTable.vue @@ -118,161 +118,161 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/JVxeDemo/demo/SocketReload.vue b/jero-web/src/views/demo/JVxeDemo/demo/SocketReload.vue index 1cc970ea..c9bef7c6 100644 --- a/jero-web/src/views/demo/JVxeDemo/demo/SocketReload.vue +++ b/jero-web/src/views/demo/JVxeDemo/demo/SocketReload.vue @@ -35,85 +35,85 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/JVxeDemo/layout-demo/ErpTemplate.vue b/jero-web/src/views/demo/JVxeDemo/layout-demo/ErpTemplate.vue index 06b4ef75..bab1e8f0 100644 --- a/jero-web/src/views/demo/JVxeDemo/layout-demo/ErpTemplate.vue +++ b/jero-web/src/views/demo/JVxeDemo/layout-demo/ErpTemplate.vue @@ -52,237 +52,236 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/JVxeDemo/layout-demo/Index.vue b/jero-web/src/views/demo/JVxeDemo/layout-demo/Index.vue index 09da8047..dedf0f6f 100644 --- a/jero-web/src/views/demo/JVxeDemo/layout-demo/Index.vue +++ b/jero-web/src/views/demo/JVxeDemo/layout-demo/Index.vue @@ -24,19 +24,19 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/JVxeDemo/layout-demo/Template1.vue b/jero-web/src/views/demo/JVxeDemo/layout-demo/Template1.vue index 76350310..40a228ce 100644 --- a/jero-web/src/views/demo/JVxeDemo/layout-demo/Template1.vue +++ b/jero-web/src/views/demo/JVxeDemo/layout-demo/Template1.vue @@ -60,271 +60,271 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/JVxeDemo/layout-demo/Template2.vue b/jero-web/src/views/demo/JVxeDemo/layout-demo/Template2.vue index 06c93bfe..de21b6cb 100644 --- a/jero-web/src/views/demo/JVxeDemo/layout-demo/Template2.vue +++ b/jero-web/src/views/demo/JVxeDemo/layout-demo/Template2.vue @@ -53,208 +53,207 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/JVxeDemo/layout-demo/Template3.vue b/jero-web/src/views/demo/JVxeDemo/layout-demo/Template3.vue index 08ecbef9..714dcb91 100644 --- a/jero-web/src/views/demo/JVxeDemo/layout-demo/Template3.vue +++ b/jero-web/src/views/demo/JVxeDemo/layout-demo/Template3.vue @@ -52,194 +52,194 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/JVxeDemo/layout-demo/Template4.vue b/jero-web/src/views/demo/JVxeDemo/layout-demo/Template4.vue index b24ba773..6308264a 100644 --- a/jero-web/src/views/demo/JVxeDemo/layout-demo/Template4.vue +++ b/jero-web/src/views/demo/JVxeDemo/layout-demo/Template4.vue @@ -71,277 +71,271 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/JVxeDemo/layout-demo/Template5.vue b/jero-web/src/views/demo/JVxeDemo/layout-demo/Template5.vue index f3e46e9b..42dc6934 100644 --- a/jero-web/src/views/demo/JVxeDemo/layout-demo/Template5.vue +++ b/jero-web/src/views/demo/JVxeDemo/layout-demo/Template5.vue @@ -32,186 +32,185 @@ - \ No newline at end of file + diff --git a/jero-web/src/views/demo/JeroDemoList.vue b/jero-web/src/views/demo/JeroDemoList.vue index 23bc2171..58df0eb0 100644 --- a/jero-web/src/views/demo/JeroDemoList.vue +++ b/jero-web/src/views/demo/JeroDemoList.vue @@ -160,212 +160,213 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/JeroEditableTableExample.vue b/jero-web/src/views/demo/JeroEditableTableExample.vue index 3db38664..5837dadf 100644 --- a/jero-web/src/views/demo/JeroEditableTableExample.vue +++ b/jero-web/src/views/demo/JeroEditableTableExample.vue @@ -21,20 +21,20 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/JeroOrderMainList.vue b/jero-web/src/views/demo/JeroOrderMainList.vue index cac6b0ec..efdbee81 100644 --- a/jero-web/src/views/demo/JeroOrderMainList.vue +++ b/jero-web/src/views/demo/JeroOrderMainList.vue @@ -92,84 +92,84 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/JeroOrderMainListForJEditableTable.vue b/jero-web/src/views/demo/JeroOrderMainListForJEditableTable.vue index 994d8c1a..c01b14f1 100644 --- a/jero-web/src/views/demo/JeroOrderMainListForJEditableTable.vue +++ b/jero-web/src/views/demo/JeroOrderMainListForJEditableTable.vue @@ -100,86 +100,86 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/JeroOrderModalForJVexTable.vue b/jero-web/src/views/demo/JeroOrderModalForJVexTable.vue index ba93f1eb..eade14ee 100644 --- a/jero-web/src/views/demo/JeroOrderModalForJVexTable.vue +++ b/jero-web/src/views/demo/JeroOrderModalForJVexTable.vue @@ -84,229 +84,228 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/JeroPdfView.vue b/jero-web/src/views/demo/JeroPdfView.vue index fb3089aa..9c9d9406 100644 --- a/jero-web/src/views/demo/JeroPdfView.vue +++ b/jero-web/src/views/demo/JeroPdfView.vue @@ -41,82 +41,83 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/JeroTreeTable.vue b/jero-web/src/views/demo/JeroTreeTable.vue index be336b0e..9ddc14b5 100644 --- a/jero-web/src/views/demo/JeroTreeTable.vue +++ b/jero-web/src/views/demo/JeroTreeTable.vue @@ -20,61 +20,61 @@ diff --git a/jero-web/src/views/demo/PrintDemo.vue b/jero-web/src/views/demo/PrintDemo.vue index 2bd6c360..dda6bb3f 100644 --- a/jero-web/src/views/demo/PrintDemo.vue +++ b/jero-web/src/views/demo/PrintDemo.vue @@ -53,83 +53,83 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/RowspanTable.vue b/jero-web/src/views/demo/RowspanTable.vue index 3b27b945..e39cd9d4 100644 --- a/jero-web/src/views/demo/RowspanTable.vue +++ b/jero-web/src/views/demo/RowspanTable.vue @@ -13,259 +13,257 @@ - - diff --git a/jero-web/src/views/demo/SelectDemo.vue b/jero-web/src/views/demo/SelectDemo.vue index f3804bd5..97784686 100644 --- a/jero-web/src/views/demo/SelectDemo.vue +++ b/jero-web/src/views/demo/SelectDemo.vue @@ -4,7 +4,6 @@
- @@ -45,7 +44,6 @@ 选中值:{{ formData.user2}} - @@ -395,7 +393,6 @@ 输入的值(v-model):{{ formData.areaLinkage1 }} - @@ -450,196 +447,205 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/SplitPanel.vue b/jero-web/src/views/demo/SplitPanel.vue index 8d128fba..3a4ace30 100644 --- a/jero-web/src/views/demo/SplitPanel.vue +++ b/jero-web/src/views/demo/SplitPanel.vue @@ -7,26 +7,26 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/TableExpandeSub.vue b/jero-web/src/views/demo/TableExpandeSub.vue index 42f944ca..70e6a60b 100644 --- a/jero-web/src/views/demo/TableExpandeSub.vue +++ b/jero-web/src/views/demo/TableExpandeSub.vue @@ -97,140 +97,140 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/TableTotal.vue b/jero-web/src/views/demo/TableTotal.vue index f7d0bd4a..e86b75aa 100644 --- a/jero-web/src/views/demo/TableTotal.vue +++ b/jero-web/src/views/demo/TableTotal.vue @@ -13,152 +13,151 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/form/BasicForm.vue b/jero-web/src/views/demo/form/BasicForm.vue index 0e4bedc8..2107f749 100644 --- a/jero-web/src/views/demo/form/BasicForm.vue +++ b/jero-web/src/views/demo/form/BasicForm.vue @@ -53,7 +53,7 @@ label="客户" :labelCol="{lg: {span: 7}, sm: {span: 7}}" :wrapperCol="{lg: {span: 10}, sm: {span: 17} }"> - item.key !== key) - this.data = newData - }, - saveRow (key) { - let target = this.data.filter(item => item.key === key)[0] - target.editable = false - target.isNew = false - }, - toggle (key) { - let target = this.data.filter(item => item.key === key)[0] - target.editable = !target.editable - }, - getRowByKey (key, newData) { - const data = this.data - return (newData || data).filter(item => item.key === key)[0] - }, - cancel (key) { - let target = this.data.filter(item => item.key === key)[0] - target.editable = false - }, - handleChange (value, key, column) { - const newData = [...this.data] - const target = newData.filter(item => key === item.key)[0] - if (target) { - target[column] = value - this.data = newData + // table + columns: [ + { + title: '成员姓名', + dataIndex: 'name', + key: 'name', + width: '20%', + scopedSlots: { customRender: 'name' } + }, + { + title: '工号', + dataIndex: 'workId', + key: 'workId', + width: '20%', + scopedSlots: { customRender: 'workId' } + }, + { + title: '所属部门', + dataIndex: 'department', + key: 'department', + width: '40%', + scopedSlots: { customRender: 'department' } + }, + { + title: '操作', + key: 'action', + scopedSlots: { customRender: 'operation' } } - }, - - // 最终全页面提交 - validate () { - this.$refs.repository.form.validateFields((err, values) => { - if (!err) { - this.$notification['error']({ - message: 'Received values of form:', - description: values - }) - } - }) - this.$refs.task.form.validateFields((err, values) => { - if (!err) { - this.$notification['error']({ - message: 'Received values of form:', - description: values - }) - } - }) + ], + data: [ + { + key: '1', + name: '小明', + workId: '001', + editable: false, + department: '行政部' + }, + { + key: '2', + name: '李莉', + workId: '002', + editable: false, + department: 'IT部' + }, + { + key: '3', + name: '王小帅', + workId: '003', + editable: false, + department: '财务部' + } + ] + } + }, + methods: { + handleSubmit (e) { + e.preventDefault() + }, + newMember () { + this.data.push({ + key: '-1', + name: '', + workId: '', + department: '', + editable: true, + isNew: true + }) + }, + remove (key) { + const newData = this.data.filter(item => item.key !== key) + this.data = newData + }, + saveRow (key) { + const target = this.data.filter(item => item.key === key)[0] + target.editable = false + target.isNew = false + }, + toggle (key) { + const target = this.data.filter(item => item.key === key)[0] + target.editable = !target.editable + }, + getRowByKey (key, newData) { + const data = this.data + return (newData || data).filter(item => item.key === key)[0] + }, + cancel (key) { + const target = this.data.filter(item => item.key === key)[0] + target.editable = false + }, + handleChange (value, key, column) { + const newData = [...this.data] + const target = newData.filter(item => key === item.key)[0] + if (target) { + target[column] = value + this.data = newData } + }, + + // 最终全页面提交 + validate () { + this.$refs.repository.form.validateFields((err, values) => { + if (!err) { + this.$notification.error({ + message: 'Received values of form:', + description: values + }) + } + }) + this.$refs.task.form.validateFields((err, values) => { + if (!err) { + this.$notification.error({ + message: 'Received values of form:', + description: values + }) + } + }) } } +} \ No newline at end of file + diff --git a/jero-web/src/views/demo/form/advancedForm/RepositoryForm.vue b/jero-web/src/views/demo/form/advancedForm/RepositoryForm.vue index 0ad1fad1..1db1d017 100644 --- a/jero-web/src/views/demo/form/advancedForm/RepositoryForm.vue +++ b/jero-web/src/views/demo/form/advancedForm/RepositoryForm.vue @@ -78,42 +78,42 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/form/advancedForm/TaskForm.vue b/jero-web/src/views/demo/form/advancedForm/TaskForm.vue index e1af2aeb..de3d8de6 100644 --- a/jero-web/src/views/demo/form/advancedForm/TaskForm.vue +++ b/jero-web/src/views/demo/form/advancedForm/TaskForm.vue @@ -73,35 +73,35 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/form/stepForm/Step1.vue b/jero-web/src/views/demo/form/stepForm/Step1.vue index 384602c4..0ba0f62e 100644 --- a/jero-web/src/views/demo/form/stepForm/Step1.vue +++ b/jero-web/src/views/demo/form/stepForm/Step1.vue @@ -45,16 +45,16 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/form/stepForm/Step2.vue b/jero-web/src/views/demo/form/stepForm/Step2.vue index 5e02c418..a6532215 100644 --- a/jero-web/src/views/demo/form/stepForm/Step2.vue +++ b/jero-web/src/views/demo/form/stepForm/Step2.vue @@ -47,26 +47,26 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/form/stepForm/Step3.vue b/jero-web/src/views/demo/form/stepForm/Step3.vue index b3c87af4..f508cb99 100644 --- a/jero-web/src/views/demo/form/stepForm/Step3.vue +++ b/jero-web/src/views/demo/form/stepForm/Step3.vue @@ -30,27 +30,27 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/form/stepForm/StepForm.vue b/jero-web/src/views/demo/form/stepForm/StepForm.vue index 623d6444..b7bd26aa 100644 --- a/jero-web/src/views/demo/form/stepForm/StepForm.vue +++ b/jero-web/src/views/demo/form/stepForm/StepForm.vue @@ -14,44 +14,44 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/list/CardList.vue b/jero-web/src/views/demo/list/CardList.vue index 4208017e..c05ca383 100644 --- a/jero-web/src/views/demo/list/CardList.vue +++ b/jero-web/src/views/demo/list/CardList.vue @@ -31,31 +31,30 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/list/JTableDemo.vue b/jero-web/src/views/demo/list/JTableDemo.vue index eb08e77f..06c24e00 100644 --- a/jero-web/src/views/demo/list/JTableDemo.vue +++ b/jero-web/src/views/demo/list/JTableDemo.vue @@ -26,13 +26,13 @@ import JTable from '@/components/jero/JTable' export default { name: 'Jtable', components: { - JTable, + JTable }, - data() { + data () { return { isShowPage: true, // 是否显示分页 isCheck: false, // 是否多选 - isShowDropdown: true, //是否开启下拉功能 + isShowDropdown: true, // 是否开启下拉功能 pagination: { current: 1, pageSize: 100, @@ -54,7 +54,7 @@ export default { address2: '西湖区湖底公园1号', address3: '西湖区湖底公园1号', address4: '西湖区湖底公园1号', - address5: '西湖区湖底公园1号', + address5: '西湖区湖底公园1号' }, { key: '2', @@ -65,7 +65,7 @@ export default { address2: '西湖区湖底公园1号', address3: '西湖区湖底公园1号', address4: '西湖区湖底公园1号', - address5: '西湖区湖底公园1号', + address5: '西湖区湖底公园1号' }, { key: '3', @@ -76,7 +76,7 @@ export default { address2: '西湖区湖底公园1号', address3: '西湖区湖底公园1号', address4: '西湖区湖底公园1号', - address5: '西湖区湖底公园1号', + address5: '西湖区湖底公园1号' }, { key: '4', @@ -87,7 +87,7 @@ export default { address2: '西湖区湖底公园1号', address3: '西湖区湖底公园1号', address4: '西湖区湖底公园1号', - address5: '西湖区湖底公园1号', + address5: '西湖区湖底公园1号' }, { key: '5', @@ -98,7 +98,7 @@ export default { address2: '西湖区湖底公园1号', address3: '西湖区湖底公园1号', address4: '西湖区湖底公园1号', - address5: '西湖区湖底公园1号', + address5: '西湖区湖底公园1号' }, { key: '6', @@ -109,8 +109,8 @@ export default { address2: '西湖区湖底公园1号', address3: '西湖区湖底公园1号', address4: '西湖区湖底公园1号', - address5: '西湖区湖底公园1号', - }, + address5: '西湖区湖底公园1号' + } ], columns: [ { @@ -124,8 +124,8 @@ export default { // 1为左侧冻结 // 2为右侧冻结 // 3为不冻结或解冻 - fixedValue: 3, - }, + fixedValue: 3 + } // fixed: 'right' }, @@ -135,9 +135,9 @@ export default { width: 200, slots: { title: '年龄', - fixedValue: 3, + fixedValue: 3 }, - sorter: true, + sorter: true }, { dataIndex: 'address', @@ -145,9 +145,9 @@ export default { width: 200, slots: { title: '住址', - fixedValue: 3, + fixedValue: 3 }, - sorter: (a, b) => a.address.length - b.address.length, + sorter: (a, b) => a.address.length - b.address.length }, { // title: '住址1', @@ -156,8 +156,8 @@ export default { width: 200, slots: { title: '住址1', - fixedValue: 3, - }, + fixedValue: 3 + } }, { // title: '住址2', @@ -166,8 +166,8 @@ export default { width: 200, slots: { title: '住址2', - fixedValue: 3, - }, + fixedValue: 3 + } }, { // title: '住址3', @@ -176,8 +176,8 @@ export default { width: 200, slots: { title: '住址3', - fixedValue: 3, - }, + fixedValue: 3 + } }, { // title: '住址4', @@ -186,8 +186,8 @@ export default { width: 200, slots: { title: '住址4', - fixedValue: 3, - }, + fixedValue: 3 + } }, { // title: '住址5', @@ -196,8 +196,8 @@ export default { width: 500, slots: { title: '住址5', - fixedValue: 3, - }, + fixedValue: 3 + } }, { title: '操作', @@ -206,16 +206,16 @@ export default { width: 500, slots: { // title: '操作', - fixedValue: 2, + fixedValue: 2 }, - scopedSlots: { customRender: 'action' }, - }, - ], + scopedSlots: { customRender: 'action' } + } + ] } }, - mounted() {}, + mounted () {}, watch: {}, - methods: {}, + methods: {} } diff --git a/jero-web/src/views/demo/list/PermissionList.vue b/jero-web/src/views/demo/list/PermissionList.vue index fe2aaffc..c4888877 100644 --- a/jero-web/src/views/demo/list/PermissionList.vue +++ b/jero-web/src/views/demo/list/PermissionList.vue @@ -134,128 +134,128 @@ \ No newline at end of file +} + diff --git a/jero-web/src/views/demo/list/RoleList.vue b/jero-web/src/views/demo/list/RoleList.vue index 7b208eb5..dd81055f 100644 --- a/jero-web/src/views/demo/list/RoleList.vue +++ b/jero-web/src/views/demo/list/RoleList.vue @@ -79,158 +79,157 @@ \ No newline at end of file +} + diff --git a/jero-web/src/views/demo/list/StandardList.vue b/jero-web/src/views/demo/list/StandardList.vue index 4868ce3a..67ed408f 100644 --- a/jero-web/src/views/demo/list/StandardList.vue +++ b/jero-web/src/views/demo/list/StandardList.vue @@ -71,72 +71,72 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/list/TableInnerEditList.vue b/jero-web/src/views/demo/list/TableInnerEditList.vue index 2791c6d6..c3216e1f 100644 --- a/jero-web/src/views/demo/list/TableInnerEditList.vue +++ b/jero-web/src/views/demo/list/TableInnerEditList.vue @@ -123,134 +123,134 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/list/TableList.vue b/jero-web/src/views/demo/list/TableList.vue index 9bccc093..e35e8d23 100644 --- a/jero-web/src/views/demo/list/TableList.vue +++ b/jero-web/src/views/demo/list/TableList.vue @@ -188,139 +188,139 @@ \ No newline at end of file +} + diff --git a/jero-web/src/views/demo/list/UserList.vue b/jero-web/src/views/demo/list/UserList.vue index 9ac5e741..6087e6ac 100644 --- a/jero-web/src/views/demo/list/UserList.vue +++ b/jero-web/src/views/demo/list/UserList.vue @@ -149,105 +149,105 @@ \ No newline at end of file +} + diff --git a/jero-web/src/views/demo/list/modules/RoleModal.vue b/jero-web/src/views/demo/list/modules/RoleModal.vue index 4f9f832d..9cd1d4e5 100644 --- a/jero-web/src/views/demo/list/modules/RoleModal.vue +++ b/jero-web/src/views/demo/list/modules/RoleModal.vue @@ -78,126 +78,125 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/list/search/SearchLayout.vue b/jero-web/src/views/demo/list/search/SearchLayout.vue index 7372018f..345ce069 100644 --- a/jero-web/src/views/demo/list/search/SearchLayout.vue +++ b/jero-web/src/views/demo/list/search/SearchLayout.vue @@ -5,62 +5,62 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/modules/JEditableTable/DefaultTable.vue b/jero-web/src/views/demo/modules/JEditableTable/DefaultTable.vue index bb4ca35d..8e1e3f21 100644 --- a/jero-web/src/views/demo/modules/JEditableTable/DefaultTable.vue +++ b/jero-web/src/views/demo/modules/JEditableTable/DefaultTable.vue @@ -11,7 +11,6 @@ 设置值 - \ No newline at end of file + diff --git a/jero-web/src/views/demo/modules/JEditableTable/JeroOrderModalForJVexTable.vue b/jero-web/src/views/demo/modules/JEditableTable/JeroOrderModalForJVexTable.vue index 8bf4aa37..d15a60c7 100644 --- a/jero-web/src/views/demo/modules/JEditableTable/JeroOrderModalForJVexTable.vue +++ b/jero-web/src/views/demo/modules/JEditableTable/JeroOrderModalForJVexTable.vue @@ -84,229 +84,228 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/modules/JEditableTable/ReadOnlyTable.vue b/jero-web/src/views/demo/modules/JEditableTable/ReadOnlyTable.vue index 27e728cc..9980220e 100644 --- a/jero-web/src/views/demo/modules/JEditableTable/ReadOnlyTable.vue +++ b/jero-web/src/views/demo/modules/JEditableTable/ReadOnlyTable.vue @@ -10,61 +10,61 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/modules/JEditableTable/ThreeLinkage.vue b/jero-web/src/views/demo/modules/JEditableTable/ThreeLinkage.vue index 8e6412f0..a9cc7f43 100644 --- a/jero-web/src/views/demo/modules/JEditableTable/ThreeLinkage.vue +++ b/jero-web/src/views/demo/modules/JEditableTable/ThreeLinkage.vue @@ -11,119 +11,117 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/modules/JeroDemoModal.vue b/jero-web/src/views/demo/modules/JeroDemoModal.vue index 97f26d75..0d17bbb8 100644 --- a/jero-web/src/views/demo/modules/JeroDemoModal.vue +++ b/jero-web/src/views/demo/modules/JeroDemoModal.vue @@ -48,99 +48,96 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/modules/JeroDemoTabsModal.vue b/jero-web/src/views/demo/modules/JeroDemoTabsModal.vue index 837ded06..065e784f 100644 --- a/jero-web/src/views/demo/modules/JeroDemoTabsModal.vue +++ b/jero-web/src/views/demo/modules/JeroDemoTabsModal.vue @@ -103,183 +103,182 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/modules/JeroOrderMainModal.vue b/jero-web/src/views/demo/modules/JeroOrderMainModal.vue index 36689198..25838d9b 100644 --- a/jero-web/src/views/demo/modules/JeroOrderMainModal.vue +++ b/jero-web/src/views/demo/modules/JeroOrderMainModal.vue @@ -138,141 +138,140 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/modules/PdfPreviewModal.vue b/jero-web/src/views/demo/modules/PdfPreviewModal.vue index 1e232e40..7a63097a 100644 --- a/jero-web/src/views/demo/modules/PdfPreviewModal.vue +++ b/jero-web/src/views/demo/modules/PdfPreviewModal.vue @@ -12,45 +12,45 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/modules/SplitPanelA.vue b/jero-web/src/views/demo/modules/SplitPanelA.vue index 96b6b4b5..2d015338 100644 --- a/jero-web/src/views/demo/modules/SplitPanelA.vue +++ b/jero-web/src/views/demo/modules/SplitPanelA.vue @@ -6,22 +6,22 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/modules/SplitPanelB.vue b/jero-web/src/views/demo/modules/SplitPanelB.vue index 9008b002..a1a18a54 100644 --- a/jero-web/src/views/demo/modules/SplitPanelB.vue +++ b/jero-web/src/views/demo/modules/SplitPanelB.vue @@ -6,22 +6,22 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/modules/SplitPanelModal.vue b/jero-web/src/views/demo/modules/SplitPanelModal.vue index a63702a0..675f65cf 100644 --- a/jero-web/src/views/demo/modules/SplitPanelModal.vue +++ b/jero-web/src/views/demo/modules/SplitPanelModal.vue @@ -22,42 +22,42 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/modules/SuperQueryModal.vue b/jero-web/src/views/demo/modules/SuperQueryModal.vue index 87909cfe..a33786cb 100644 --- a/jero-web/src/views/demo/modules/SuperQueryModal.vue +++ b/jero-web/src/views/demo/modules/SuperQueryModal.vue @@ -51,45 +51,45 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/modules/VueCronModal.vue b/jero-web/src/views/demo/modules/VueCronModal.vue index bde3c8d8..a0c832f9 100644 --- a/jero-web/src/views/demo/modules/VueCronModal.vue +++ b/jero-web/src/views/demo/modules/VueCronModal.vue @@ -250,384 +250,384 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/profile/basic/Index.vue b/jero-web/src/views/demo/profile/basic/Index.vue index acea98bf..f4432908 100644 --- a/jero-web/src/views/demo/profile/basic/Index.vue +++ b/jero-web/src/views/demo/profile/basic/Index.vue @@ -43,206 +43,206 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/report/Analysis.vue b/jero-web/src/views/demo/report/Analysis.vue index f2f8d692..146a26f6 100644 --- a/jero-web/src/views/demo/report/Analysis.vue +++ b/jero-web/src/views/demo/report/Analysis.vue @@ -186,443 +186,437 @@ -
\ No newline at end of file + diff --git a/jero-web/src/views/demo/report/ArchivesStatisticst.vue b/jero-web/src/views/demo/report/ArchivesStatisticst.vue index 06674a15..532bf3cd 100644 --- a/jero-web/src/views/demo/report/ArchivesStatisticst.vue +++ b/jero-web/src/views/demo/report/ArchivesStatisticst.vue @@ -33,282 +33,279 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/tablist/JeroOrderDMainList.vue b/jero-web/src/views/demo/tablist/JeroOrderDMainList.vue index 444ea535..abe8b833 100644 --- a/jero-web/src/views/demo/tablist/JeroOrderDMainList.vue +++ b/jero-web/src/views/demo/tablist/JeroOrderDMainList.vue @@ -31,7 +31,6 @@ -
新增 @@ -99,156 +98,156 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/tablist/JeroOrderTicketList.vue b/jero-web/src/views/demo/tablist/JeroOrderTicketList.vue index 555f1994..0766e4c5 100644 --- a/jero-web/src/views/demo/tablist/JeroOrderTicketList.vue +++ b/jero-web/src/views/demo/tablist/JeroOrderTicketList.vue @@ -68,87 +68,90 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/tablist/form/JeroOrderCustomerModal.vue b/jero-web/src/views/demo/tablist/form/JeroOrderCustomerModal.vue index 5b99bc45..2039e84c 100644 --- a/jero-web/src/views/demo/tablist/form/JeroOrderCustomerModal.vue +++ b/jero-web/src/views/demo/tablist/form/JeroOrderCustomerModal.vue @@ -68,163 +68,163 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/tablist/form/JeroOrderDMainModal.vue b/jero-web/src/views/demo/tablist/form/JeroOrderDMainModal.vue index 66125035..281cc72e 100644 --- a/jero-web/src/views/demo/tablist/form/JeroOrderDMainModal.vue +++ b/jero-web/src/views/demo/tablist/form/JeroOrderDMainModal.vue @@ -52,103 +52,103 @@ \ No newline at end of file + diff --git a/jero-web/src/views/demo/tablist/form/JeroOrderTicketModal.vue b/jero-web/src/views/demo/tablist/form/JeroOrderTicketModal.vue index 627223a1..8b777a23 100644 --- a/jero-web/src/views/demo/tablist/form/JeroOrderTicketModal.vue +++ b/jero-web/src/views/demo/tablist/form/JeroOrderTicketModal.vue @@ -59,116 +59,116 @@ \ No newline at end of file + diff --git a/jero-web/src/views/exception/403.vue b/jero-web/src/views/exception/403.vue index e9fc3992..5d69c957 100644 --- a/jero-web/src/views/exception/403.vue +++ b/jero-web/src/views/exception/403.vue @@ -3,15 +3,15 @@ \ No newline at end of file + diff --git a/jero-web/src/views/exception/404.vue b/jero-web/src/views/exception/404.vue index bc747b5e..5fca6c80 100644 --- a/jero-web/src/views/exception/404.vue +++ b/jero-web/src/views/exception/404.vue @@ -3,15 +3,15 @@ \ No newline at end of file + diff --git a/jero-web/src/views/exception/500.vue b/jero-web/src/views/exception/500.vue index a36cabeb..23869d83 100644 --- a/jero-web/src/views/exception/500.vue +++ b/jero-web/src/views/exception/500.vue @@ -3,15 +3,15 @@ \ No newline at end of file + diff --git a/jero-web/src/views/exception/ExceptionPage.vue b/jero-web/src/views/exception/ExceptionPage.vue index 0550d5ef..b2e2ee1b 100644 --- a/jero-web/src/views/exception/ExceptionPage.vue +++ b/jero-web/src/views/exception/ExceptionPage.vue @@ -14,27 +14,27 @@ \ No newline at end of file + diff --git a/jero-web/src/views/exception/type.js b/jero-web/src/views/exception/type.js index ece3936f..32d9049a 100644 --- a/jero-web/src/views/exception/type.js +++ b/jero-web/src/views/exception/type.js @@ -16,4 +16,4 @@ const types = { } } -export default types \ No newline at end of file +export default types diff --git a/jero-web/src/views/modules/message/SysMessageList.vue b/jero-web/src/views/modules/message/SysMessageList.vue index 7e1a9879..802cae69 100644 --- a/jero-web/src/views/modules/message/SysMessageList.vue +++ b/jero-web/src/views/modules/message/SysMessageList.vue @@ -111,93 +111,93 @@ \ No newline at end of file + diff --git a/jero-web/src/views/modules/message/SysMessageTemplateList.vue b/jero-web/src/views/modules/message/SysMessageTemplateList.vue index cfa5921c..d18bc4b6 100644 --- a/jero-web/src/views/modules/message/SysMessageTemplateList.vue +++ b/jero-web/src/views/modules/message/SysMessageTemplateList.vue @@ -89,7 +89,6 @@ - 编辑 @@ -121,98 +120,98 @@ \ No newline at end of file + diff --git a/jero-web/src/views/modules/message/modules/SysMessageModal.vue b/jero-web/src/views/modules/message/modules/SysMessageModal.vue index 9f6231ca..7358cc2b 100644 --- a/jero-web/src/views/modules/message/modules/SysMessageModal.vue +++ b/jero-web/src/views/modules/message/modules/SysMessageModal.vue @@ -84,102 +84,98 @@ \ No newline at end of file + diff --git a/jero-web/src/views/modules/message/modules/SysMessageTemplateModal.vue b/jero-web/src/views/modules/message/modules/SysMessageTemplateModal.vue index 8dd04e24..b8cdc382 100644 --- a/jero-web/src/views/modules/message/modules/SysMessageTemplateModal.vue +++ b/jero-web/src/views/modules/message/modules/SysMessageTemplateModal.vue @@ -81,143 +81,140 @@ \ No newline at end of file + diff --git a/jero-web/src/views/modules/message/modules/SysMessageTestModal.vue b/jero-web/src/views/modules/message/modules/SysMessageTestModal.vue index 78483983..b1ee2b3d 100644 --- a/jero-web/src/views/modules/message/modules/SysMessageTestModal.vue +++ b/jero-web/src/views/modules/message/modules/SysMessageTestModal.vue @@ -49,74 +49,74 @@ \ No newline at end of file + diff --git a/jero-web/src/views/modules/monitor/DiskMonitoring.vue b/jero-web/src/views/modules/monitor/DiskMonitoring.vue index 71e3bcd0..07321cee 100644 --- a/jero-web/src/views/modules/monitor/DiskMonitoring.vue +++ b/jero-web/src/views/modules/monitor/DiskMonitoring.vue @@ -11,39 +11,39 @@ \ No newline at end of file + diff --git a/jero-web/src/views/modules/monitor/JvmInfo.vue b/jero-web/src/views/modules/monitor/JvmInfo.vue index 66e15cfd..8a052cfc 100644 --- a/jero-web/src/views/modules/monitor/JvmInfo.vue +++ b/jero-web/src/views/modules/monitor/JvmInfo.vue @@ -36,134 +36,131 @@ diff --git a/jero-web/src/views/modules/monitor/RedisInfo.vue b/jero-web/src/views/modules/monitor/RedisInfo.vue index 3e7f29eb..28377a27 100644 --- a/jero-web/src/views/modules/monitor/RedisInfo.vue +++ b/jero-web/src/views/modules/monitor/RedisInfo.vue @@ -22,168 +22,166 @@ diff --git a/jero-web/src/views/modules/monitor/SystemInfo.vue b/jero-web/src/views/modules/monitor/SystemInfo.vue index 2d15f111..bc47f3d9 100644 --- a/jero-web/src/views/modules/monitor/SystemInfo.vue +++ b/jero-web/src/views/modules/monitor/SystemInfo.vue @@ -36,102 +36,102 @@ diff --git a/jero-web/src/views/modules/monitor/TomcatInfo.vue b/jero-web/src/views/modules/monitor/TomcatInfo.vue index 0b6344f2..3b860eed 100644 --- a/jero-web/src/views/modules/monitor/TomcatInfo.vue +++ b/jero-web/src/views/modules/monitor/TomcatInfo.vue @@ -37,114 +37,115 @@ diff --git a/jero-web/src/views/modules/oss/OSSFileList.vue b/jero-web/src/views/modules/oss/OSSFileList.vue index 6029c553..82cbd2ce 100644 --- a/jero-web/src/views/modules/oss/OSSFileList.vue +++ b/jero-web/src/views/modules/oss/OSSFileList.vue @@ -76,105 +76,105 @@ \ No newline at end of file + diff --git a/jero-web/src/views/result/Error.vue b/jero-web/src/views/result/Error.vue index 634c4b6e..6ffbfb80 100644 --- a/jero-web/src/views/result/Error.vue +++ b/jero-web/src/views/result/Error.vue @@ -24,22 +24,22 @@ \ No newline at end of file + diff --git a/jero-web/src/views/result/Result.vue b/jero-web/src/views/result/Result.vue index 09278d9b..fa0a83b7 100644 --- a/jero-web/src/views/result/Result.vue +++ b/jero-web/src/views/result/Result.vue @@ -15,28 +15,28 @@ \ No newline at end of file + diff --git a/jero-web/src/views/result/Success.vue b/jero-web/src/views/result/Success.vue index b5061e31..f666b5d5 100644 --- a/jero-web/src/views/result/Success.vue +++ b/jero-web/src/views/result/Success.vue @@ -60,33 +60,33 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/DataLogList.vue b/jero-web/src/views/system/DataLogList.vue index 78ea7e6c..f877a3db 100644 --- a/jero-web/src/views/system/DataLogList.vue +++ b/jero-web/src/views/system/DataLogList.vue @@ -60,79 +60,79 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/DepartList.vue b/jero-web/src/views/system/DepartList.vue index 48fcdd86..1443d509 100644 --- a/jero-web/src/views/system/DepartList.vue +++ b/jero-web/src/views/system/DepartList.vue @@ -144,421 +144,419 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/DepartListSync.vue b/jero-web/src/views/system/DepartListSync.vue index e4be7467..58b8422d 100644 --- a/jero-web/src/views/system/DepartListSync.vue +++ b/jero-web/src/views/system/DepartListSync.vue @@ -138,485 +138,482 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/DepartUserList.vue b/jero-web/src/views/system/DepartUserList.vue index 798f6220..0035d589 100644 --- a/jero-web/src/views/system/DepartUserList.vue +++ b/jero-web/src/views/system/DepartUserList.vue @@ -44,161 +44,160 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/DictDeleteList.vue b/jero-web/src/views/system/DictDeleteList.vue index d0334805..ed1aa1b1 100644 --- a/jero-web/src/views/system/DictDeleteList.vue +++ b/jero-web/src/views/system/DictDeleteList.vue @@ -25,114 +25,113 @@ - \ No newline at end of file + diff --git a/jero-web/src/views/system/DictItemList.vue b/jero-web/src/views/system/DictItemList.vue index 7c0a15ab..d05cab24 100644 --- a/jero-web/src/views/system/DictItemList.vue +++ b/jero-web/src/views/system/DictItemList.vue @@ -78,142 +78,142 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/DictList.vue b/jero-web/src/views/system/DictList.vue index f41a6e8e..d3faa0fc 100644 --- a/jero-web/src/views/system/DictList.vue +++ b/jero-web/src/views/system/DictList.vue @@ -66,143 +66,143 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/LogList.vue b/jero-web/src/views/system/LogList.vue index 6d0d050b..4a7779aa 100644 --- a/jero-web/src/views/system/LogList.vue +++ b/jero-web/src/views/system/LogList.vue @@ -73,73 +73,73 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/NewPermissionList.vue b/jero-web/src/views/system/NewPermissionList.vue index bab21341..f5b4b77e 100644 --- a/jero-web/src/views/system/NewPermissionList.vue +++ b/jero-web/src/views/system/NewPermissionList.vue @@ -80,149 +80,149 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/PermissionDataRuleList.vue b/jero-web/src/views/system/PermissionDataRuleList.vue index 5274e0f1..16e8ae7d 100644 --- a/jero-web/src/views/system/PermissionDataRuleList.vue +++ b/jero-web/src/views/system/PermissionDataRuleList.vue @@ -64,120 +64,120 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/PermissionList.vue b/jero-web/src/views/system/PermissionList.vue index 061d0ddf..3371be96 100644 --- a/jero-web/src/views/system/PermissionList.vue +++ b/jero-web/src/views/system/PermissionList.vue @@ -80,116 +80,116 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/QuartzJobList.vue b/jero-web/src/views/system/QuartzJobList.vue index 71bf78f4..f550e9b9 100644 --- a/jero-web/src/views/system/QuartzJobList.vue +++ b/jero-web/src/views/system/QuartzJobList.vue @@ -74,7 +74,6 @@ - 启动 停止 @@ -109,181 +108,180 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/RoleList.vue b/jero-web/src/views/system/RoleList.vue index 071f44b7..2b22bf81 100644 --- a/jero-web/src/views/system/RoleList.vue +++ b/jero-web/src/views/system/RoleList.vue @@ -86,7 +86,6 @@ -
@@ -98,96 +97,96 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/RoleUserList.vue b/jero-web/src/views/system/RoleUserList.vue index 945b9599..fd3d6e32 100644 --- a/jero-web/src/views/system/RoleUserList.vue +++ b/jero-web/src/views/system/RoleUserList.vue @@ -178,75 +178,75 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/SysAnnouncementList.vue b/jero-web/src/views/system/SysAnnouncementList.vue index 4711feeb..4ac14e63 100644 --- a/jero-web/src/views/system/SysAnnouncementList.vue +++ b/jero-web/src/views/system/SysAnnouncementList.vue @@ -112,56 +112,56 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/SysCategoryList.vue b/jero-web/src/views/system/SysCategoryList.vue index 3471dd4e..132dadf5 100644 --- a/jero-web/src/views/system/SysCategoryList.vue +++ b/jero-web/src/views/system/SysCategoryList.vue @@ -55,284 +55,282 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/SysCheckRuleList.vue b/jero-web/src/views/system/SysCheckRuleList.vue index b83f2e4e..86cc8535 100644 --- a/jero-web/src/views/system/SysCheckRuleList.vue +++ b/jero-web/src/views/system/SysCheckRuleList.vue @@ -108,71 +108,71 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/SysDataSourceList.vue b/jero-web/src/views/system/SysDataSourceList.vue index f60fec08..fad45fb9 100644 --- a/jero-web/src/views/system/SysDataSourceList.vue +++ b/jero-web/src/views/system/SysDataSourceList.vue @@ -100,79 +100,79 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/SysFillRuleList.vue b/jero-web/src/views/system/SysFillRuleList.vue index 84cb3baf..8d1bef5b 100644 --- a/jero-web/src/views/system/SysFillRuleList.vue +++ b/jero-web/src/views/system/SysFillRuleList.vue @@ -97,91 +97,91 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/SysGatewayRouteList.vue b/jero-web/src/views/system/SysGatewayRouteList.vue index 669d2678..aebe64bc 100644 --- a/jero-web/src/views/system/SysGatewayRouteList.vue +++ b/jero-web/src/views/system/SysGatewayRouteList.vue @@ -45,67 +45,67 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/SysUserOnlineList.vue b/jero-web/src/views/system/SysUserOnlineList.vue index e4e37073..9df4ceae 100644 --- a/jero-web/src/views/system/SysUserOnlineList.vue +++ b/jero-web/src/views/system/SysUserOnlineList.vue @@ -61,98 +61,98 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/TenantList.vue b/jero-web/src/views/system/TenantList.vue index fcf86421..069ac9d8 100644 --- a/jero-web/src/views/system/TenantList.vue +++ b/jero-web/src/views/system/TenantList.vue @@ -89,77 +89,76 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/UserAnnouncementList.vue b/jero-web/src/views/system/UserAnnouncementList.vue index 3b69913d..eeab1bc5 100644 --- a/jero-web/src/views/system/UserAnnouncementList.vue +++ b/jero-web/src/views/system/UserAnnouncementList.vue @@ -51,133 +51,133 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/UserList.vue b/jero-web/src/views/system/UserList.vue index c34862a6..aedbe863 100644 --- a/jero-web/src/views/system/UserList.vue +++ b/jero-web/src/views/system/UserList.vue @@ -22,7 +22,6 @@ - \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/AddressListLeft.vue b/jero-web/src/views/system/modules/AddressListLeft.vue index 028a4112..e18af9a7 100644 --- a/jero-web/src/views/system/modules/AddressListLeft.vue +++ b/jero-web/src/views/system/modules/AddressListLeft.vue @@ -17,83 +17,83 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/AddressListRight.vue b/jero-web/src/views/system/modules/AddressListRight.vue index 9e05c659..ce2b71ed 100644 --- a/jero-web/src/views/system/modules/AddressListRight.vue +++ b/jero-web/src/views/system/modules/AddressListRight.vue @@ -10,7 +10,6 @@ - @@ -43,113 +42,113 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/DataLogCompareModal.vue b/jero-web/src/views/system/modules/DataLogCompareModal.vue index e02bb02c..c77dc234 100644 --- a/jero-web/src/views/system/modules/DataLogCompareModal.vue +++ b/jero-web/src/views/system/modules/DataLogCompareModal.vue @@ -32,117 +32,117 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/DataLogModal.vue b/jero-web/src/views/system/modules/DataLogModal.vue index c9f1e9c0..19fdbcdb 100644 --- a/jero-web/src/views/system/modules/DataLogModal.vue +++ b/jero-web/src/views/system/modules/DataLogModal.vue @@ -53,101 +53,100 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/DepartAuthModal.vue b/jero-web/src/views/system/modules/DepartAuthModal.vue index 92aedf0e..91a93e02 100644 --- a/jero-web/src/views/system/modules/DepartAuthModal.vue +++ b/jero-web/src/views/system/modules/DepartAuthModal.vue @@ -52,141 +52,141 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/DepartDataruleModal.vue b/jero-web/src/views/system/modules/DepartDataruleModal.vue index 77298acd..3af56810 100644 --- a/jero-web/src/views/system/modules/DepartDataruleModal.vue +++ b/jero-web/src/views/system/modules/DepartDataruleModal.vue @@ -31,86 +31,86 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/DepartModal.vue b/jero-web/src/views/system/modules/DepartModal.vue index ff229d5b..05ae03b4 100644 --- a/jero-web/src/views/system/modules/DepartModal.vue +++ b/jero-web/src/views/system/modules/DepartModal.vue @@ -91,134 +91,132 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/DepartWindow.vue b/jero-web/src/views/system/modules/DepartWindow.vue index 702c66ab..43916a00 100644 --- a/jero-web/src/views/system/modules/DepartWindow.vue +++ b/jero-web/src/views/system/modules/DepartWindow.vue @@ -35,141 +35,145 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/DeptBaseInfo.vue b/jero-web/src/views/system/modules/DeptBaseInfo.vue index c3bbfb36..ebe54283 100644 --- a/jero-web/src/views/system/modules/DeptBaseInfo.vue +++ b/jero-web/src/views/system/modules/DeptBaseInfo.vue @@ -67,58 +67,57 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/DeptUserInfo.vue b/jero-web/src/views/system/modules/DeptUserInfo.vue index 2016739b..8e2f2872 100644 --- a/jero-web/src/views/system/modules/DeptUserInfo.vue +++ b/jero-web/src/views/system/modules/DeptUserInfo.vue @@ -58,8 +58,6 @@ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> - - 编辑 @@ -84,7 +82,6 @@ - @@ -96,216 +93,214 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/DictItemModal.vue b/jero-web/src/views/system/modules/DictItemModal.vue index 26fabe72..1fcf3cf8 100644 --- a/jero-web/src/views/system/modules/DictItemModal.vue +++ b/jero-web/src/views/system/modules/DictItemModal.vue @@ -56,132 +56,132 @@ diff --git a/jero-web/src/views/system/modules/DictModal.vue b/jero-web/src/views/system/modules/DictModal.vue index 60005885..472e8fba 100644 --- a/jero-web/src/views/system/modules/DictModal.vue +++ b/jero-web/src/views/system/modules/DictModal.vue @@ -42,109 +42,109 @@ \ No newline at end of file +} + diff --git a/jero-web/src/views/system/modules/GateWayRouteModal.vue b/jero-web/src/views/system/modules/GateWayRouteModal.vue index 2a9b9d48..77e34c0a 100644 --- a/jero-web/src/views/system/modules/GateWayRouteModal.vue +++ b/jero-web/src/views/system/modules/GateWayRouteModal.vue @@ -100,192 +100,189 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/PasswordModal.vue b/jero-web/src/views/system/modules/PasswordModal.vue index f9f897e6..a4a1239d 100644 --- a/jero-web/src/views/system/modules/PasswordModal.vue +++ b/jero-web/src/views/system/modules/PasswordModal.vue @@ -30,113 +30,113 @@ \ No newline at end of file +} + diff --git a/jero-web/src/views/system/modules/PermissionDataRuleModal.vue b/jero-web/src/views/system/modules/PermissionDataRuleModal.vue index ed4278bb..2220078b 100644 --- a/jero-web/src/views/system/modules/PermissionDataRuleModal.vue +++ b/jero-web/src/views/system/modules/PermissionDataRuleModal.vue @@ -57,118 +57,118 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/PermissionModal.vue b/jero-web/src/views/system/modules/PermissionModal.vue index c8108c2b..c84367d1 100644 --- a/jero-web/src/views/system/modules/PermissionModal.vue +++ b/jero-web/src/views/system/modules/PermissionModal.vue @@ -27,7 +27,6 @@ - - - \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/QuartzJobModal.vue b/jero-web/src/views/system/modules/QuartzJobModal.vue index f16b8d9d..f053aa34 100644 --- a/jero-web/src/views/system/modules/QuartzJobModal.vue +++ b/jero-web/src/views/system/modules/QuartzJobModal.vue @@ -34,107 +34,106 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/RoleAssignment.vue b/jero-web/src/views/system/modules/RoleAssignment.vue index fb8d287b..7df433b4 100644 --- a/jero-web/src/views/system/modules/RoleAssignment.vue +++ b/jero-web/src/views/system/modules/RoleAssignment.vue @@ -41,17 +41,17 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/RoleModal.vue b/jero-web/src/views/system/modules/RoleModal.vue index a16e5e9e..c5604f52 100644 --- a/jero-web/src/views/system/modules/RoleModal.vue +++ b/jero-web/src/views/system/modules/RoleModal.vue @@ -27,113 +27,113 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/SelectUserListModal.vue b/jero-web/src/views/system/modules/SelectUserListModal.vue index 2cb04133..c0a4a9a4 100644 --- a/jero-web/src/views/system/modules/SelectUserListModal.vue +++ b/jero-web/src/views/system/modules/SelectUserListModal.vue @@ -27,7 +27,6 @@ - \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/SelectUserModal.vue b/jero-web/src/views/system/modules/SelectUserModal.vue index 9e1d8d55..b96ed3e8 100644 --- a/jero-web/src/views/system/modules/SelectUserModal.vue +++ b/jero-web/src/views/system/modules/SelectUserModal.vue @@ -9,7 +9,6 @@ @cancel="handleCancel" cancelText="关闭"> -
@@ -48,211 +47,209 @@
- \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/SysAnnouncementModal.vue b/jero-web/src/views/system/modules/SysAnnouncementModal.vue index 51b7dc39..8b6761f5 100644 --- a/jero-web/src/views/system/modules/SysAnnouncementModal.vue +++ b/jero-web/src/views/system/modules/SysAnnouncementModal.vue @@ -141,219 +141,219 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/SysCategoryModal.vue b/jero-web/src/views/system/modules/SysCategoryModal.vue index 7f74efa3..e1aa55f7 100644 --- a/jero-web/src/views/system/modules/SysCategoryModal.vue +++ b/jero-web/src/views/system/modules/SysCategoryModal.vue @@ -34,125 +34,125 @@ \ No newline at end of file +} + diff --git a/jero-web/src/views/system/modules/SysCheckRuleModal.vue b/jero-web/src/views/system/modules/SysCheckRuleModal.vue index 6b719455..fca110bb 100644 --- a/jero-web/src/views/system/modules/SysCheckRuleModal.vue +++ b/jero-web/src/views/system/modules/SysCheckRuleModal.vue @@ -54,299 +54,299 @@ - \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/SysCheckRuleTestModal.vue b/jero-web/src/views/system/modules/SysCheckRuleTestModal.vue index 6da08425..392ef760 100644 --- a/jero-web/src/views/system/modules/SysCheckRuleTestModal.vue +++ b/jero-web/src/views/system/modules/SysCheckRuleTestModal.vue @@ -26,33 +26,33 @@ - \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/SysDataSourceModal.vue b/jero-web/src/views/system/modules/SysDataSourceModal.vue index 2598c9b9..06d49f21 100644 --- a/jero-web/src/views/system/modules/SysDataSourceModal.vue +++ b/jero-web/src/views/system/modules/SysDataSourceModal.vue @@ -72,210 +72,210 @@ - \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/SysDepartRoleModal.vue b/jero-web/src/views/system/modules/SysDepartRoleModal.vue index 79d7b4b4..ff817534 100644 --- a/jero-web/src/views/system/modules/SysDepartRoleModal.vue +++ b/jero-web/src/views/system/modules/SysDepartRoleModal.vue @@ -154,4 +154,4 @@ - \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/SysFillRuleModal.vue b/jero-web/src/views/system/modules/SysFillRuleModal.vue index bfe80142..775f795e 100644 --- a/jero-web/src/views/system/modules/SysFillRuleModal.vue +++ b/jero-web/src/views/system/modules/SysFillRuleModal.vue @@ -31,108 +31,107 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/SysPositionModal.vue b/jero-web/src/views/system/modules/SysPositionModal.vue index 10a00f61..e6132a02 100644 --- a/jero-web/src/views/system/modules/SysPositionModal.vue +++ b/jero-web/src/views/system/modules/SysPositionModal.vue @@ -48,123 +48,123 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/TenantForm.vue b/jero-web/src/views/system/modules/TenantForm.vue index c4af1889..bb75e70c 100644 --- a/jero-web/src/views/system/modules/TenantForm.vue +++ b/jero-web/src/views/system/modules/TenantForm.vue @@ -8,13 +8,13 @@ - + - + @@ -43,141 +43,140 @@ diff --git a/jero-web/src/views/system/modules/TenantModal.vue b/jero-web/src/views/system/modules/TenantModal.vue index f77660a9..282d97b5 100644 --- a/jero-web/src/views/system/modules/TenantModal.vue +++ b/jero-web/src/views/system/modules/TenantModal.vue @@ -13,47 +13,47 @@ \ No newline at end of file +} + diff --git a/jero-web/src/views/system/modules/UserModal.vue b/jero-web/src/views/system/modules/UserModal.vue index accaa21b..e0a9491c 100644 --- a/jero-web/src/views/system/modules/UserModal.vue +++ b/jero-web/src/views/system/modules/UserModal.vue @@ -138,383 +138,383 @@ \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/UserRecycleBinModal.vue b/jero-web/src/views/system/modules/UserRecycleBinModal.vue index 0e042207..179a37d1 100644 --- a/jero-web/src/views/system/modules/UserRecycleBinModal.vue +++ b/jero-web/src/views/system/modules/UserRecycleBinModal.vue @@ -53,141 +53,141 @@ - \ No newline at end of file + diff --git a/jero-web/src/views/system/modules/UserRoleModal.vue b/jero-web/src/views/system/modules/UserRoleModal.vue index 48b8f970..11741839 100644 --- a/jero-web/src/views/system/modules/UserRoleModal.vue +++ b/jero-web/src/views/system/modules/UserRoleModal.vue @@ -55,133 +55,133 @@ \ No newline at end of file + diff --git a/jero-web/src/views/user/Login.vue b/jero-web/src/views/user/Login.vue index d3476e3f..9de0d6b5 100644 --- a/jero-web/src/views/user/Login.vue +++ b/jero-web/src/views/user/Login.vue @@ -178,236 +178,235 @@ \ No newline at end of file + diff --git a/jero-web/src/views/user/alteration/Alteration.vue b/jero-web/src/views/user/alteration/Alteration.vue index d2b512cb..bbd982e9 100644 --- a/jero-web/src/views/user/alteration/Alteration.vue +++ b/jero-web/src/views/user/alteration/Alteration.vue @@ -14,48 +14,48 @@ \ No newline at end of file + diff --git a/jero-web/src/views/user/alteration/Step1.vue b/jero-web/src/views/user/alteration/Step1.vue index 7cace124..eb8fa2fa 100644 --- a/jero-web/src/views/user/alteration/Step1.vue +++ b/jero-web/src/views/user/alteration/Step1.vue @@ -41,143 +41,142 @@ \ No newline at end of file + diff --git a/jero-web/src/views/user/alteration/Step2.vue b/jero-web/src/views/user/alteration/Step2.vue index a8db118b..e6e71ad4 100644 --- a/jero-web/src/views/user/alteration/Step2.vue +++ b/jero-web/src/views/user/alteration/Step2.vue @@ -48,135 +48,132 @@ \ No newline at end of file + diff --git a/jero-web/src/views/user/alteration/Step3.vue b/jero-web/src/views/user/alteration/Step3.vue index 57b614cd..221b9ef0 100644 --- a/jero-web/src/views/user/alteration/Step3.vue +++ b/jero-web/src/views/user/alteration/Step3.vue @@ -42,82 +42,81 @@ \ No newline at end of file + diff --git a/jero-web/src/views/user/alteration/Step4.vue b/jero-web/src/views/user/alteration/Step4.vue index 59999d75..01089390 100644 --- a/jero-web/src/views/user/alteration/Step4.vue +++ b/jero-web/src/views/user/alteration/Step4.vue @@ -12,44 +12,44 @@ \ No newline at end of file + diff --git a/jero-web/src/views/user/oauth2/OAuth2Login.vue b/jero-web/src/views/user/oauth2/OAuth2Login.vue index e5df295c..3fdbd4e7 100644 --- a/jero-web/src/views/user/oauth2/OAuth2Login.vue +++ b/jero-web/src/views/user/oauth2/OAuth2Login.vue @@ -16,22 +16,22 @@ import { INDEX_MAIN_PAGE_PATH } from '@/store/mutation-types' export default { name: 'OAuth2Login', - data() { + data () { return { env: { thirdApp: false, wxWork: false, - dingtalk: false, - }, + dingtalk: false + } } }, - beforeCreate() { + beforeCreate () { // 如果当前 不是 OAuth2APP环境,就重定向到 /user/login 页面 if (!isOAuth2AppEnv()) { - this.$router.replace({path: '/user/login'}) + this.$router.replace({ path: '/user/login' }) } }, - created() { + created () { this.checkEnv() this.doOAuth2Login() }, @@ -39,7 +39,7 @@ export default { ...mapActions(['ThirdLogin']), /** 检测当前的环境 */ - checkEnv() { + checkEnv () { // 判断当时是否是企业微信环境 if (/wxwork/i.test(navigator.userAgent)) { this.env.thirdApp = true @@ -53,12 +53,12 @@ export default { }, /** 进行OAuth2登录操作 */ - doOAuth2Login() { + doOAuth2Login () { if (this.env.thirdApp) { // 判断是否携带了Token,是就说明登录成功 if (this.$route.query.oauth2LoginToken) { this.thirdType = this.$route.query.thirdType - let token = this.$route.query.oauth2LoginToken + const token = this.$route.query.oauth2LoginToken this.doThirdLogin(token) } else if (this.env.wxWork) { this.doWechatEnterpriseOAuth2Login() @@ -69,8 +69,8 @@ export default { }, // 根据token执行登录 - doThirdLogin(token) { - let param = {} + doThirdLogin (token) { + const param = {} param.thirdType = this.thirdType param.token = token this.ThirdLogin(param).then(res => { @@ -81,50 +81,50 @@ export default { } }) }, - loginSuccess() { + loginSuccess () { // 登陆成功,重定向到主页 - this.$router.replace({path: INDEX_MAIN_PAGE_PATH}) + this.$router.replace({ path: INDEX_MAIN_PAGE_PATH }) // TODO 这个提示是否还需要? this.$notification.success({ message: '欢迎', - description: `${timeFix()},欢迎回来`, + description: `${timeFix()},欢迎回来` }) }, - requestFailed(err) { + requestFailed (err) { this.$error({ title: '登录失败', content: ((err.response || {}).data || {}).message || err.message || '请求出现错误,请稍后再试', okText: '重新登陆', - onOk() { + onOk () { window.location.reload() }, - onCancel() { + onCancel () { window.location.reload() - }, + } }) }, /** 企业微信OAuth2登录 */ - doWechatEnterpriseOAuth2Login() { + doWechatEnterpriseOAuth2Login () { this.sysOAuth2Login('wechat_enterprise') }, /** 钉钉OAuth2登录 */ - doDingTalkOAuth2Login() { + doDingTalkOAuth2Login () { this.sysOAuth2Login('dingtalk') }, /** 后台构造oauth2登录地址 */ - sysOAuth2Login(source) { - let url = `${window._CONFIG['domianURL']}/sys/thirdLogin/oauth2/${source}/login` + sysOAuth2Login (source) { + let url = `${window._CONFIG.domianURL}/sys/thirdLogin/oauth2/${source}/login` url += `?state=${encodeURIComponent(window.location.origin)}` window.location.href = url - }, + } - }, + } } \ No newline at end of file + diff --git a/jero-web/src/views/user/register/Register.vue b/jero-web/src/views/user/register/Register.vue index 58464232..f4b0161d 100644 --- a/jero-web/src/views/user/register/Register.vue +++ b/jero-web/src/views/user/register/Register.vue @@ -91,245 +91,242 @@ \ No newline at end of file + diff --git a/jero-web/src/views/user/register/RegisterResult.vue b/jero-web/src/views/user/register/RegisterResult.vue index 389e140c..c84fb0d6 100644 --- a/jero-web/src/views/user/register/RegisterResult.vue +++ b/jero-web/src/views/user/register/RegisterResult.vue @@ -12,41 +12,41 @@ \ No newline at end of file + diff --git a/jero-web/src/views/user/third/JeroThirdLoginMixin.js b/jero-web/src/views/user/third/JeroThirdLoginMixin.js index edd0116f..b976fbeb 100644 --- a/jero-web/src/views/user/third/JeroThirdLoginMixin.js +++ b/jero-web/src/views/user/third/JeroThirdLoginMixin.js @@ -6,9 +6,9 @@ import { postAction } from '@api/manage' import { timeFix } from '@/utils/util' export const JeroThirdLoginMixin = { - data() { + data () { return { - //第三方登录相关信息 + // 第三方登录相关信息 thirdLoginInfo: '', thirdPasswordShow: false, thirdLoginPassword: '', @@ -16,16 +16,16 @@ export const JeroThirdLoginMixin = { thirdConfirmShow: false, thirdCreateUserLoding: false, thirdLoginState: false, - //绑定手机号弹窗 + // 绑定手机号弹窗 bindingPhoneModal: false, thirdPhone: '', thirdCaptcha: '', - //获取验证码按钮30s之内是否可点击 + // 获取验证码按钮30s之内是否可点击 thirdState: { time: 30, smsSendBtn: false }, - //第三方用户UUID + // 第三方用户UUID thirdUserUuid: '', thirdType: '', url: { @@ -33,34 +33,34 @@ export const JeroThirdLoginMixin = { } } }, - created() { + created () { }, methods: { ...mapActions(['ThirdLogin']), - //第三方登录 - onThirdLogin(source) { - let url = window._CONFIG['domianURL'] + `/sys/thirdLogin/render/${source}` + // 第三方登录 + onThirdLogin (source) { + const url = window._CONFIG.domianURL + `/sys/thirdLogin/render/${source}` window.open(url, `login ${source}`, 'height=500, width=500, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no') - let that = this + const that = this that.thirdType = source that.thirdLoginInfo = '' that.thirdLoginState = false - let receiveMessage = function(event) { - let token = event.data + const receiveMessage = function (event) { + const token = event.data if (typeof token === 'string') { - //如果是字符串类型 说明是token信息 + // 如果是字符串类型 说明是token信息 if (token === '登录失败') { that.$message.warning(token) } else if (token.includes('绑定手机号')) { that.bindingPhoneModal = true - let strings = token.split(',') + const strings = token.split(',') that.thirdUserUuid = strings[1] } else { that.doThirdLogin(token) } } else if (typeof token === 'object') { - //对象类型 说明需要提示是否绑定现有账号 - if (token['isObj'] === true) { + // 对象类型 说明需要提示是否绑定现有账号 + if (token.isObj === true) { that.thirdConfirmShow = true that.thirdLoginInfo = { ...token } } @@ -71,12 +71,12 @@ export const JeroThirdLoginMixin = { window.addEventListener('message', receiveMessage, false) }, // 根据token执行登录 - doThirdLogin(token) { + doThirdLogin (token) { if (this.thirdLoginState === false) { this.thirdLoginState = true - let param={}; - param.thirdType=this.thirdType - param.token=token + const param = {} + param.thirdType = this.thirdType + param.token = token this.ThirdLogin(param).then(res => { if (res.success) { this.loginSuccess() @@ -87,21 +87,21 @@ export const JeroThirdLoginMixin = { } }, // 绑定已有账号 需要输入密码 - thirdLoginUserBind() { + thirdLoginUserBind () { this.thirdLoginPassword = '' this.thirdLoginUser = this.thirdLoginInfo.uuid this.thirdConfirmShow = false this.thirdPasswordShow = true }, - //创建新账号 - thirdLoginUserCreate() { + // 创建新账号 + thirdLoginUserCreate () { this.thirdCreateUserLoding = true // 账号名后面添加两位随机数 - this.thirdLoginInfo['suffix'] = parseInt(Math.random() * 98 + 1) - //this.thirdLoginInfo.operateCode = 123 //测试校验失败 + this.thirdLoginInfo.suffix = parseInt(Math.random() * 98 + 1) + // this.thirdLoginInfo.operateCode = 123 //测试校验失败 postAction('/sys/third/user/create', this.thirdLoginInfo).then(res => { if (res.success) { - let token = res.result + const token = res.result console.log('thirdCreateNewAccount', token) this.doThirdLogin(token) this.thirdConfirmShow = false @@ -113,9 +113,9 @@ export const JeroThirdLoginMixin = { }) }, // 核实密码 - thirdLoginCheckPassword() { - //this.thirdLoginInfo.operateCode = 123 //测试校验失败 - let param = Object.assign({}, this.thirdLoginInfo, { password: this.thirdLoginPassword }) + thirdLoginCheckPassword () { + // this.thirdLoginInfo.operateCode = 123 //测试校验失败 + const param = Object.assign({}, this.thirdLoginInfo, { password: this.thirdLoginPassword }) postAction('/sys/third/user/checkPassword', param).then(res => { if (res.success) { this.thirdLoginNoPassword() @@ -126,19 +126,19 @@ export const JeroThirdLoginMixin = { }) }, // 没有密码 取消操作 - thirdLoginNoPassword() { + thirdLoginNoPassword () { this.thirdPasswordShow = false this.thirdLoginPassword = '' this.thirdLoginUser = '' }, - //获取第三方验证码 - getThirdCaptcha() { - let that = this + // 获取第三方验证码 + getThirdCaptcha () { + const that = this if (!this.thirdPhone) { that.cmsFailed('请输入手机号') } else { this.thirdState.smsSendBtn = true - let interval = window.setInterval(() => { + const interval = window.setInterval(() => { if (that.thirdState.time-- <= 0) { that.thirdState.time = 30 that.thirdState.smsSendBtn = false @@ -146,7 +146,7 @@ export const JeroThirdLoginMixin = { } }, 1000) const hide = this.$message.loading('验证码发送中..', 0) - let smsParams = {} + const smsParams = {} smsParams.mobile = this.thirdPhone smsParams.smsmode = '0' postAction('/sys/sms', smsParams).then(res => { @@ -164,9 +164,9 @@ export const JeroThirdLoginMixin = { }) } }, - //绑定手机号点击确定按钮 - thirdHandleOk() { - let bingingParams = {} + // 绑定手机号点击确定按钮 + thirdHandleOk () { + const bingingParams = {} bingingParams.mobile = this.thirdPhone bingingParams.captcha = this.thirdCaptcha bingingParams.thirdUserUuid = this.thirdUserUuid @@ -183,29 +183,29 @@ export const JeroThirdLoginMixin = { // update-begin- author:sunjianlei --- date:20190812 --- for: 登录成功后不解除禁用按钮,防止多次点击 // this.loginBtn = false // update-end- author:sunjianlei --- date:20190812 --- for: 登录成功后不解除禁用按钮,防止多次点击 - this.$router.push({ path: "/dashboard/analysis" }).catch(()=>{ + this.$router.push({ path: '/dashboard/analysis' }).catch(() => { console.log('登录跳转首页出错,这个错误从哪里来的') }) this.$notification.success({ message: '欢迎', - description: `${timeFix()},欢迎回来`, - }); + description: `${timeFix()},欢迎回来` + }) }, - cmsFailed(err){ - this.$notification[ 'error' ]({ - message: "登录失败", - description:err, - duration: 4, - }); + cmsFailed (err) { + this.$notification.error({ + message: '登录失败', + description: err, + duration: 4 + }) }, requestFailed (err) { - this.$notification[ 'error' ]({ + this.$notification.error({ message: '登录失败', - description: ((err.response || {}).data || {}).message || err.message || "请求出现错误,请稍后再试", - duration: 4, - }); - this.loginBtn = false; - }, + description: ((err.response || {}).data || {}).message || err.message || '请求出现错误,请稍后再试', + duration: 4 + }) + this.loginBtn = false + } } -} \ No newline at end of file +} diff --git a/jero-web/src/views/user/third/ThirdLogin.vue b/jero-web/src/views/user/third/ThirdLogin.vue index 63c31a0f..1c79c448 100644 --- a/jero-web/src/views/user/third/ThirdLogin.vue +++ b/jero-web/src/views/user/third/ThirdLogin.vue @@ -78,17 +78,17 @@ @@ -115,4 +115,4 @@ export default { float: right; } } - \ No newline at end of file +