|
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ |
|
module.exports = function (it) { |
|
if (typeof it != 'function') { |
|
throw TypeError(String(it) + ' is not a function'); |
|
} return it; |
|
}; |
|
|
|
},{}],2:[function(require,module,exports){ |
|
var isObject = require('../internals/is-object'); |
|
|
|
module.exports = function (it) { |
|
if (!isObject(it) && it !== null) { |
|
throw TypeError("Can't set " + String(it) + ' as a prototype'); |
|
} return it; |
|
}; |
|
|
|
},{"../internals/is-object":37}],3:[function(require,module,exports){ |
|
var wellKnownSymbol = require('../internals/well-known-symbol'); |
|
var create = require('../internals/object-create'); |
|
var definePropertyModule = require('../internals/object-define-property'); |
|
|
|
var UNSCOPABLES = wellKnownSymbol('unscopables'); |
|
var ArrayPrototype = Array.prototype; |
|
|
|
|
|
|
|
if (ArrayPrototype[UNSCOPABLES] == undefined) { |
|
definePropertyModule.f(ArrayPrototype, UNSCOPABLES, { |
|
configurable: true, |
|
value: create(null) |
|
}); |
|
} |
|
|
|
|
|
module.exports = function (key) { |
|
ArrayPrototype[UNSCOPABLES][key] = true; |
|
}; |
|
|
|
},{"../internals/object-create":45,"../internals/object-define-property":47,"../internals/well-known-symbol":77}],4:[function(require,module,exports){ |
|
module.exports = function (it, Constructor, name) { |
|
if (!(it instanceof Constructor)) { |
|
throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation'); |
|
} return it; |
|
}; |
|
|
|
},{}],5:[function(require,module,exports){ |
|
var isObject = require('../internals/is-object'); |
|
|
|
module.exports = function (it) { |
|
if (!isObject(it)) { |
|
throw TypeError(String(it) + ' is not an object'); |
|
} return it; |
|
}; |
|
|
|
},{"../internals/is-object":37}],6:[function(require,module,exports){ |
|
'use strict'; |
|
var bind = require('../internals/function-bind-context'); |
|
var toObject = require('../internals/to-object'); |
|
var callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing'); |
|
var isArrayIteratorMethod = require('../internals/is-array-iterator-method'); |
|
var toLength = require('../internals/to-length'); |
|
var createProperty = require('../internals/create-property'); |
|
var getIteratorMethod = require('../internals/get-iterator-method'); |
|
|
|
|
|
|
|
module.exports = function from(arrayLike ) { |
|
var O = toObject(arrayLike); |
|
var C = typeof this == 'function' ? this : Array; |
|
var argumentsLength = arguments.length; |
|
var mapfn = argumentsLength > 1 ? arguments[1] : undefined; |
|
var mapping = mapfn !== undefined; |
|
var iteratorMethod = getIteratorMethod(O); |
|
var index = 0; |
|
var length, result, step, iterator, next, value; |
|
if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2); |
|
|
|
if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) { |
|
iterator = iteratorMethod.call(O); |
|
next = iterator.next; |
|
result = new C(); |
|
for (;!(step = next.call(iterator)).done; index++) { |
|
value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value; |
|
createProperty(result, index, value); |
|
} |
|
} else { |
|
length = toLength(O.length); |
|
result = new C(length); |
|
for (;length > index; index++) { |
|
value = mapping ? mapfn(O[index], index) : O[index]; |
|
createProperty(result, index, value); |
|
} |
|
} |
|
result.length = index; |
|
return result; |
|
}; |
|
|
|
},{"../internals/call-with-safe-iteration-closing":8,"../internals/create-property":16,"../internals/function-bind-context":23,"../internals/get-iterator-method":25,"../internals/is-array-iterator-method":35,"../internals/to-length":71,"../internals/to-object":72}],7:[function(require,module,exports){ |
|
var toIndexedObject = require('../internals/to-indexed-object'); |
|
var toLength = require('../internals/to-length'); |
|
var toAbsoluteIndex = require('../internals/to-absolute-index'); |
|
|
|
|
|
var createMethod = function (IS_INCLUDES) { |
|
return function ($this, el, fromIndex) { |
|
var O = toIndexedObject($this); |
|
var length = toLength(O.length); |
|
var index = toAbsoluteIndex(fromIndex, length); |
|
var value; |
|
|
|
|
|
if (IS_INCLUDES && el != el) while (length > index) { |
|
value = O[index++]; |
|
|
|
if (value != value) return true; |
|
|
|
} else for (;length > index; index++) { |
|
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; |
|
} return !IS_INCLUDES && -1; |
|
}; |
|
}; |
|
|
|
module.exports = { |
|
|
|
|
|
includes: createMethod(true), |
|
|
|
|
|
indexOf: createMethod(false) |
|
}; |
|
|
|
},{"../internals/to-absolute-index":68,"../internals/to-indexed-object":69,"../internals/to-length":71}],8:[function(require,module,exports){ |
|
var anObject = require('../internals/an-object'); |
|
|
|
|
|
module.exports = function (iterator, fn, value, ENTRIES) { |
|
try { |
|
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); |
|
|
|
} catch (error) { |
|
var returnMethod = iterator['return']; |
|
if (returnMethod !== undefined) anObject(returnMethod.call(iterator)); |
|
throw error; |
|
} |
|
}; |
|
|
|
},{"../internals/an-object":5}],9:[function(require,module,exports){ |
|
var toString = {}.toString; |
|
|
|
module.exports = function (it) { |
|
return toString.call(it).slice(8, -1); |
|
}; |
|
|
|
},{}],10:[function(require,module,exports){ |
|
var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support'); |
|
var classofRaw = require('../internals/classof-raw'); |
|
var wellKnownSymbol = require('../internals/well-known-symbol'); |
|
|
|
var TO_STRING_TAG = wellKnownSymbol('toStringTag'); |
|
|
|
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; |
|
|
|
|
|
var tryGet = function (it, key) { |
|
try { |
|
return it[key]; |
|
} catch (error) { } |
|
}; |
|
|
|
|
|
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) { |
|
var O, tag, result; |
|
return it === undefined ? 'Undefined' : it === null ? 'Null' |
|
|
|
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag |
|
|
|
: CORRECT_ARGUMENTS ? classofRaw(O) |
|
|
|
: (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result; |
|
}; |
|
|
|
},{"../internals/classof-raw":9,"../internals/to-string-tag-support":74,"../internals/well-known-symbol":77}],11:[function(require,module,exports){ |
|
var has = require('../internals/has'); |
|
var ownKeys = require('../internals/own-keys'); |
|
var getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor'); |
|
var definePropertyModule = require('../internals/object-define-property'); |
|
|
|
module.exports = function (target, source) { |
|
var keys = ownKeys(source); |
|
var defineProperty = definePropertyModule.f; |
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; |
|
for (var i = 0; i < keys.length; i++) { |
|
var key = keys[i]; |
|
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); |
|
} |
|
}; |
|
|
|
},{"../internals/has":28,"../internals/object-define-property":47,"../internals/object-get-own-property-descriptor":48,"../internals/own-keys":56}],12:[function(require,module,exports){ |
|
var fails = require('../internals/fails'); |
|
|
|
module.exports = !fails(function () { |
|
function F() { } |
|
F.prototype.constructor = null; |
|
return Object.getPrototypeOf(new F()) !== F.prototype; |
|
}); |
|
|
|
},{"../internals/fails":22}],13:[function(require,module,exports){ |
|
'use strict'; |
|
var IteratorPrototype = require('../internals/iterators-core').IteratorPrototype; |
|
var create = require('../internals/object-create'); |
|
var createPropertyDescriptor = require('../internals/create-property-descriptor'); |
|
var setToStringTag = require('../internals/set-to-string-tag'); |
|
var Iterators = require('../internals/iterators'); |
|
|
|
var returnThis = function () { return this; }; |
|
|
|
module.exports = function (IteratorConstructor, NAME, next) { |
|
var TO_STRING_TAG = NAME + ' Iterator'; |
|
IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) }); |
|
setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true); |
|
Iterators[TO_STRING_TAG] = returnThis; |
|
return IteratorConstructor; |
|
}; |
|
|
|
},{"../internals/create-property-descriptor":15,"../internals/iterators":40,"../internals/iterators-core":39,"../internals/object-create":45,"../internals/set-to-string-tag":62}],14:[function(require,module,exports){ |
|
var DESCRIPTORS = require('../internals/descriptors'); |
|
var definePropertyModule = require('../internals/object-define-property'); |
|
var createPropertyDescriptor = require('../internals/create-property-descriptor'); |
|
|
|
module.exports = DESCRIPTORS ? function (object, key, value) { |
|
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value)); |
|
} : function (object, key, value) { |
|
object[key] = value; |
|
return object; |
|
}; |
|
|
|
},{"../internals/create-property-descriptor":15,"../internals/descriptors":18,"../internals/object-define-property":47}],15:[function(require,module,exports){ |
|
module.exports = function (bitmap, value) { |
|
return { |
|
enumerable: !(bitmap & 1), |
|
configurable: !(bitmap & 2), |
|
writable: !(bitmap & 4), |
|
value: value |
|
}; |
|
}; |
|
|
|
},{}],16:[function(require,module,exports){ |
|
'use strict'; |
|
var toPrimitive = require('../internals/to-primitive'); |
|
var definePropertyModule = require('../internals/object-define-property'); |
|
var createPropertyDescriptor = require('../internals/create-property-descriptor'); |
|
|
|
module.exports = function (object, key, value) { |
|
var propertyKey = toPrimitive(key); |
|
if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value)); |
|
else object[propertyKey] = value; |
|
}; |
|
|
|
},{"../internals/create-property-descriptor":15,"../internals/object-define-property":47,"../internals/to-primitive":73}],17:[function(require,module,exports){ |
|
'use strict'; |
|
var $ = require('../internals/export'); |
|
var createIteratorConstructor = require('../internals/create-iterator-constructor'); |
|
var getPrototypeOf = require('../internals/object-get-prototype-of'); |
|
var setPrototypeOf = require('../internals/object-set-prototype-of'); |
|
var setToStringTag = require('../internals/set-to-string-tag'); |
|
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); |
|
var redefine = require('../internals/redefine'); |
|
var wellKnownSymbol = require('../internals/well-known-symbol'); |
|
var IS_PURE = require('../internals/is-pure'); |
|
var Iterators = require('../internals/iterators'); |
|
var IteratorsCore = require('../internals/iterators-core'); |
|
|
|
var IteratorPrototype = IteratorsCore.IteratorPrototype; |
|
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS; |
|
var ITERATOR = wellKnownSymbol('iterator'); |
|
var KEYS = 'keys'; |
|
var VALUES = 'values'; |
|
var ENTRIES = 'entries'; |
|
|
|
var returnThis = function () { return this; }; |
|
|
|
module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { |
|
createIteratorConstructor(IteratorConstructor, NAME, next); |
|
|
|
var getIterationMethod = function (KIND) { |
|
if (KIND === DEFAULT && defaultIterator) return defaultIterator; |
|
if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND]; |
|
switch (KIND) { |
|
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; |
|
case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; |
|
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; |
|
} return function () { return new IteratorConstructor(this); }; |
|
}; |
|
|
|
var TO_STRING_TAG = NAME + ' Iterator'; |
|
var INCORRECT_VALUES_NAME = false; |
|
var IterablePrototype = Iterable.prototype; |
|
var nativeIterator = IterablePrototype[ITERATOR] |
|
|| IterablePrototype['@@iterator'] |
|
|| DEFAULT && IterablePrototype[DEFAULT]; |
|
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); |
|
var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; |
|
var CurrentIteratorPrototype, methods, KEY; |
|
|
|
|
|
if (anyNativeIterator) { |
|
CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable())); |
|
if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { |
|
if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { |
|
if (setPrototypeOf) { |
|
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype); |
|
} else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') { |
|
createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis); |
|
} |
|
} |
|
|
|
setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true); |
|
if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis; |
|
} |
|
} |
|
|
|
|
|
if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { |
|
INCORRECT_VALUES_NAME = true; |
|
defaultIterator = function values() { return nativeIterator.call(this); }; |
|
} |
|
|
|
|
|
if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) { |
|
createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator); |
|
} |
|
Iterators[NAME] = defaultIterator; |
|
|
|
|
|
if (DEFAULT) { |
|
methods = { |
|
values: getIterationMethod(VALUES), |
|
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), |
|
entries: getIterationMethod(ENTRIES) |
|
}; |
|
if (FORCED) for (KEY in methods) { |
|
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { |
|
redefine(IterablePrototype, KEY, methods[KEY]); |
|
} |
|
} else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); |
|
} |
|
|
|
return methods; |
|
}; |
|
|
|
},{"../internals/create-iterator-constructor":13,"../internals/create-non-enumerable-property":14,"../internals/export":21,"../internals/is-pure":38,"../internals/iterators":40,"../internals/iterators-core":39,"../internals/object-get-prototype-of":51,"../internals/object-set-prototype-of":55,"../internals/redefine":59,"../internals/set-to-string-tag":62,"../internals/well-known-symbol":77}],18:[function(require,module,exports){ |
|
var fails = require('../internals/fails'); |
|
|
|
|
|
module.exports = !fails(function () { |
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; |
|
}); |
|
|
|
},{"../internals/fails":22}],19:[function(require,module,exports){ |
|
var global = require('../internals/global'); |
|
var isObject = require('../internals/is-object'); |
|
|
|
var document = global.document; |
|
|
|
var EXISTS = isObject(document) && isObject(document.createElement); |
|
|
|
module.exports = function (it) { |
|
return EXISTS ? document.createElement(it) : {}; |
|
}; |
|
|
|
},{"../internals/global":27,"../internals/is-object":37}],20:[function(require,module,exports){ |
|
|
|
module.exports = [ |
|
'constructor', |
|
'hasOwnProperty', |
|
'isPrototypeOf', |
|
'propertyIsEnumerable', |
|
'toLocaleString', |
|
'toString', |
|
'valueOf' |
|
]; |
|
|
|
},{}],21:[function(require,module,exports){ |
|
var global = require('../internals/global'); |
|
var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f; |
|
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); |
|
var redefine = require('../internals/redefine'); |
|
var setGlobal = require('../internals/set-global'); |
|
var copyConstructorProperties = require('../internals/copy-constructor-properties'); |
|
var isForced = require('../internals/is-forced'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = function (options, source) { |
|
var TARGET = options.target; |
|
var GLOBAL = options.global; |
|
var STATIC = options.stat; |
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor; |
|
if (GLOBAL) { |
|
target = global; |
|
} else if (STATIC) { |
|
target = global[TARGET] || setGlobal(TARGET, {}); |
|
} else { |
|
target = (global[TARGET] || {}).prototype; |
|
} |
|
if (target) for (key in source) { |
|
sourceProperty = source[key]; |
|
if (options.noTargetGet) { |
|
descriptor = getOwnPropertyDescriptor(target, key); |
|
targetProperty = descriptor && descriptor.value; |
|
} else targetProperty = target[key]; |
|
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); |
|
|
|
if (!FORCED && targetProperty !== undefined) { |
|
if (typeof sourceProperty === typeof targetProperty) continue; |
|
copyConstructorProperties(sourceProperty, targetProperty); |
|
} |
|
|
|
if (options.sham || (targetProperty && targetProperty.sham)) { |
|
createNonEnumerableProperty(sourceProperty, 'sham', true); |
|
} |
|
|
|
redefine(target, key, sourceProperty, options); |
|
} |
|
}; |
|
|
|
},{"../internals/copy-constructor-properties":11,"../internals/create-non-enumerable-property":14,"../internals/global":27,"../internals/is-forced":36,"../internals/object-get-own-property-descriptor":48,"../internals/redefine":59,"../internals/set-global":61}],22:[function(require,module,exports){ |
|
module.exports = function (exec) { |
|
try { |
|
return !!exec(); |
|
} catch (error) { |
|
return true; |
|
} |
|
}; |
|
|
|
},{}],23:[function(require,module,exports){ |
|
var aFunction = require('../internals/a-function'); |
|
|
|
|
|
module.exports = function (fn, that, length) { |
|
aFunction(fn); |
|
if (that === undefined) return fn; |
|
switch (length) { |
|
case 0: return function () { |
|
return fn.call(that); |
|
}; |
|
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 () { |
|
return fn.apply(that, arguments); |
|
}; |
|
}; |
|
|
|
},{"../internals/a-function":1}],24:[function(require,module,exports){ |
|
var path = require('../internals/path'); |
|
var global = require('../internals/global'); |
|
|
|
var aFunction = function (variable) { |
|
return typeof variable == 'function' ? variable : undefined; |
|
}; |
|
|
|
module.exports = function (namespace, method) { |
|
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace]) |
|
: path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method]; |
|
}; |
|
|
|
},{"../internals/global":27,"../internals/path":57}],25:[function(require,module,exports){ |
|
var classof = require('../internals/classof'); |
|
var Iterators = require('../internals/iterators'); |
|
var wellKnownSymbol = require('../internals/well-known-symbol'); |
|
|
|
var ITERATOR = wellKnownSymbol('iterator'); |
|
|
|
module.exports = function (it) { |
|
if (it != undefined) return it[ITERATOR] |
|
|| it['@@iterator'] |
|
|| Iterators[classof(it)]; |
|
}; |
|
|
|
},{"../internals/classof":10,"../internals/iterators":40,"../internals/well-known-symbol":77}],26:[function(require,module,exports){ |
|
var anObject = require('../internals/an-object'); |
|
var getIteratorMethod = require('../internals/get-iterator-method'); |
|
|
|
module.exports = function (it) { |
|
var iteratorMethod = getIteratorMethod(it); |
|
if (typeof iteratorMethod != 'function') { |
|
throw TypeError(String(it) + ' is not iterable'); |
|
} return anObject(iteratorMethod.call(it)); |
|
}; |
|
|
|
},{"../internals/an-object":5,"../internals/get-iterator-method":25}],27:[function(require,module,exports){ |
|
(function (global){ |
|
var check = function (it) { |
|
return it && it.Math == Math && it; |
|
}; |
|
|
|
|
|
module.exports = |
|
|
|
check(typeof globalThis == 'object' && globalThis) || |
|
check(typeof window == 'object' && window) || |
|
check(typeof self == 'object' && self) || |
|
check(typeof global == 'object' && global) || |
|
|
|
Function('return this')(); |
|
|
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) |
|
},{}],28:[function(require,module,exports){ |
|
var hasOwnProperty = {}.hasOwnProperty; |
|
|
|
module.exports = function (it, key) { |
|
return hasOwnProperty.call(it, key); |
|
}; |
|
|
|
},{}],29:[function(require,module,exports){ |
|
module.exports = {}; |
|
|
|
},{}],30:[function(require,module,exports){ |
|
var getBuiltIn = require('../internals/get-built-in'); |
|
|
|
module.exports = getBuiltIn('document', 'documentElement'); |
|
|
|
},{"../internals/get-built-in":24}],31:[function(require,module,exports){ |
|
var DESCRIPTORS = require('../internals/descriptors'); |
|
var fails = require('../internals/fails'); |
|
var createElement = require('../internals/document-create-element'); |
|
|
|
|
|
module.exports = !DESCRIPTORS && !fails(function () { |
|
return Object.defineProperty(createElement('div'), 'a', { |
|
get: function () { return 7; } |
|
}).a != 7; |
|
}); |
|
|
|
},{"../internals/descriptors":18,"../internals/document-create-element":19,"../internals/fails":22}],32:[function(require,module,exports){ |
|
var fails = require('../internals/fails'); |
|
var classof = require('../internals/classof-raw'); |
|
|
|
var split = ''.split; |
|
|
|
|
|
module.exports = fails(function () { |
|
|
|
|
|
return !Object('z').propertyIsEnumerable(0); |
|
}) ? function (it) { |
|
return classof(it) == 'String' ? split.call(it, '') : Object(it); |
|
} : Object; |
|
|
|
},{"../internals/classof-raw":9,"../internals/fails":22}],33:[function(require,module,exports){ |
|
var store = require('../internals/shared-store'); |
|
|
|
var functionToString = Function.toString; |
|
|
|
|
|
if (typeof store.inspectSource != 'function') { |
|
store.inspectSource = function (it) { |
|
return functionToString.call(it); |
|
}; |
|
} |
|
|
|
module.exports = store.inspectSource; |
|
|
|
},{"../internals/shared-store":64}],34:[function(require,module,exports){ |
|
var NATIVE_WEAK_MAP = require('../internals/native-weak-map'); |
|
var global = require('../internals/global'); |
|
var isObject = require('../internals/is-object'); |
|
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); |
|
var objectHas = require('../internals/has'); |
|
var sharedKey = require('../internals/shared-key'); |
|
var hiddenKeys = require('../internals/hidden-keys'); |
|
|
|
var WeakMap = global.WeakMap; |
|
var set, get, has; |
|
|
|
var enforce = function (it) { |
|
return has(it) ? get(it) : set(it, {}); |
|
}; |
|
|
|
var getterFor = function (TYPE) { |
|
return function (it) { |
|
var state; |
|
if (!isObject(it) || (state = get(it)).type !== TYPE) { |
|
throw TypeError('Incompatible receiver, ' + TYPE + ' required'); |
|
} return state; |
|
}; |
|
}; |
|
|
|
if (NATIVE_WEAK_MAP) { |
|
var store = new WeakMap(); |
|
var wmget = store.get; |
|
var wmhas = store.has; |
|
var wmset = store.set; |
|
set = function (it, metadata) { |
|
wmset.call(store, it, metadata); |
|
return metadata; |
|
}; |
|
get = function (it) { |
|
return wmget.call(store, it) || {}; |
|
}; |
|
has = function (it) { |
|
return wmhas.call(store, it); |
|
}; |
|
} else { |
|
var STATE = sharedKey('state'); |
|
hiddenKeys[STATE] = true; |
|
set = function (it, metadata) { |
|
createNonEnumerableProperty(it, STATE, metadata); |
|
return metadata; |
|
}; |
|
get = function (it) { |
|
return objectHas(it, STATE) ? it[STATE] : {}; |
|
}; |
|
has = function (it) { |
|
return objectHas(it, STATE); |
|
}; |
|
} |
|
|
|
module.exports = { |
|
set: set, |
|
get: get, |
|
has: has, |
|
enforce: enforce, |
|
getterFor: getterFor |
|
}; |
|
|
|
},{"../internals/create-non-enumerable-property":14,"../internals/global":27,"../internals/has":28,"../internals/hidden-keys":29,"../internals/is-object":37,"../internals/native-weak-map":43,"../internals/shared-key":63}],35:[function(require,module,exports){ |
|
var wellKnownSymbol = require('../internals/well-known-symbol'); |
|
var Iterators = require('../internals/iterators'); |
|
|
|
var ITERATOR = wellKnownSymbol('iterator'); |
|
var ArrayPrototype = Array.prototype; |
|
|
|
|
|
module.exports = function (it) { |
|
return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it); |
|
}; |
|
|
|
},{"../internals/iterators":40,"../internals/well-known-symbol":77}],36:[function(require,module,exports){ |
|
var fails = require('../internals/fails'); |
|
|
|
var replacement = /#|\.prototype\./; |
|
|
|
var isForced = function (feature, detection) { |
|
var value = data[normalize(feature)]; |
|
return value == POLYFILL ? true |
|
: value == NATIVE ? false |
|
: typeof detection == 'function' ? fails(detection) |
|
: !!detection; |
|
}; |
|
|
|
var normalize = isForced.normalize = function (string) { |
|
return String(string).replace(replacement, '.').toLowerCase(); |
|
}; |
|
|
|
var data = isForced.data = {}; |
|
var NATIVE = isForced.NATIVE = 'N'; |
|
var POLYFILL = isForced.POLYFILL = 'P'; |
|
|
|
module.exports = isForced; |
|
|
|
},{"../internals/fails":22}],37:[function(require,module,exports){ |
|
module.exports = function (it) { |
|
return typeof it === 'object' ? it !== null : typeof it === 'function'; |
|
}; |
|
|
|
},{}],38:[function(require,module,exports){ |
|
module.exports = false; |
|
|
|
},{}],39:[function(require,module,exports){ |
|
'use strict'; |
|
var getPrototypeOf = require('../internals/object-get-prototype-of'); |
|
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); |
|
var has = require('../internals/has'); |
|
var wellKnownSymbol = require('../internals/well-known-symbol'); |
|
var IS_PURE = require('../internals/is-pure'); |
|
|
|
var ITERATOR = wellKnownSymbol('iterator'); |
|
var BUGGY_SAFARI_ITERATORS = false; |
|
|
|
var returnThis = function () { return this; }; |
|
|
|
|
|
|
|
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; |
|
|
|
if ([].keys) { |
|
arrayIterator = [].keys(); |
|
|
|
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true; |
|
else { |
|
PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator)); |
|
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype; |
|
} |
|
} |
|
|
|
if (IteratorPrototype == undefined) IteratorPrototype = {}; |
|
|
|
|
|
if (!IS_PURE && !has(IteratorPrototype, ITERATOR)) { |
|
createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis); |
|
} |
|
|
|
module.exports = { |
|
IteratorPrototype: IteratorPrototype, |
|
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS |
|
}; |
|
|
|
},{"../internals/create-non-enumerable-property":14,"../internals/has":28,"../internals/is-pure":38,"../internals/object-get-prototype-of":51,"../internals/well-known-symbol":77}],40:[function(require,module,exports){ |
|
arguments[4][29][0].apply(exports,arguments) |
|
},{"dup":29}],41:[function(require,module,exports){ |
|
var fails = require('../internals/fails'); |
|
|
|
module.exports = !!Object.getOwnPropertySymbols && !fails(function () { |
|
|
|
|
|
return !String(Symbol()); |
|
}); |
|
|
|
},{"../internals/fails":22}],42:[function(require,module,exports){ |
|
var fails = require('../internals/fails'); |
|
var wellKnownSymbol = require('../internals/well-known-symbol'); |
|
var IS_PURE = require('../internals/is-pure'); |
|
|
|
var ITERATOR = wellKnownSymbol('iterator'); |
|
|
|
module.exports = !fails(function () { |
|
var url = new URL('b?a=1&b=2&c=3', 'http://a'); |
|
var searchParams = url.searchParams; |
|
var result = ''; |
|
url.pathname = 'c%20d'; |
|
searchParams.forEach(function (value, key) { |
|
searchParams['delete']('b'); |
|
result += key + value; |
|
}); |
|
return (IS_PURE && !url.toJSON) |
|
|| !searchParams.sort |
|
|| url.href !== 'http://a/c%20d?a=1&c=3' |
|
|| searchParams.get('c') !== '3' |
|
|| String(new URLSearchParams('?a=1')) !== 'a=1' |
|
|| !searchParams[ITERATOR] |
|
|
|
|| new URL('https://a@b').username !== 'a' |
|
|| new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b' |
|
|
|
|| new URL('http://тест').host !== 'xn--e1aybc' |
|
|
|
|| new URL('http://a#б').hash !== '#%D0%B1' |
|
|
|
|| result !== 'a1c3' |
|
|
|
|| new URL('http://x', undefined).host !== 'x'; |
|
}); |
|
|
|
},{"../internals/fails":22,"../internals/is-pure":38,"../internals/well-known-symbol":77}],43:[function(require,module,exports){ |
|
var global = require('../internals/global'); |
|
var inspectSource = require('../internals/inspect-source'); |
|
|
|
var WeakMap = global.WeakMap; |
|
|
|
module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap)); |
|
|
|
},{"../internals/global":27,"../internals/inspect-source":33}],44:[function(require,module,exports){ |
|
'use strict'; |
|
var DESCRIPTORS = require('../internals/descriptors'); |
|
var fails = require('../internals/fails'); |
|
var objectKeys = require('../internals/object-keys'); |
|
var getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols'); |
|
var propertyIsEnumerableModule = require('../internals/object-property-is-enumerable'); |
|
var toObject = require('../internals/to-object'); |
|
var IndexedObject = require('../internals/indexed-object'); |
|
|
|
var nativeAssign = Object.assign; |
|
var defineProperty = Object.defineProperty; |
|
|
|
|
|
|
|
module.exports = !nativeAssign || fails(function () { |
|
|
|
if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', { |
|
enumerable: true, |
|
get: function () { |
|
defineProperty(this, 'b', { |
|
value: 3, |
|
enumerable: false |
|
}); |
|
} |
|
}), { b: 2 })).b !== 1) return true; |
|
|
|
var A = {}; |
|
var B = {}; |
|
|
|
var symbol = Symbol(); |
|
var alphabet = 'abcdefghijklmnopqrst'; |
|
A[symbol] = 7; |
|
alphabet.split('').forEach(function (chr) { B[chr] = chr; }); |
|
return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet; |
|
}) ? function assign(target, source) { |
|
var T = toObject(target); |
|
var argumentsLength = arguments.length; |
|
var index = 1; |
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; |
|
var propertyIsEnumerable = propertyIsEnumerableModule.f; |
|
while (argumentsLength > index) { |
|
var S = IndexedObject(arguments[index++]); |
|
var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S); |
|
var length = keys.length; |
|
var j = 0; |
|
var key; |
|
while (length > j) { |
|
key = keys[j++]; |
|
if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key]; |
|
} |
|
} return T; |
|
} : nativeAssign; |
|
|
|
},{"../internals/descriptors":18,"../internals/fails":22,"../internals/indexed-object":32,"../internals/object-get-own-property-symbols":50,"../internals/object-keys":53,"../internals/object-property-is-enumerable":54,"../internals/to-object":72}],45:[function(require,module,exports){ |
|
var anObject = require('../internals/an-object'); |
|
var defineProperties = require('../internals/object-define-properties'); |
|
var enumBugKeys = require('../internals/enum-bug-keys'); |
|
var hiddenKeys = require('../internals/hidden-keys'); |
|
var html = require('../internals/html'); |
|
var documentCreateElement = require('../internals/document-create-element'); |
|
var sharedKey = require('../internals/shared-key'); |
|
|
|
var GT = '>'; |
|
var LT = '<'; |
|
var PROTOTYPE = 'prototype'; |
|
var SCRIPT = 'script'; |
|
var IE_PROTO = sharedKey('IE_PROTO'); |
|
|
|
var EmptyConstructor = function () { }; |
|
|
|
var scriptTag = function (content) { |
|
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; |
|
}; |
|
|
|
|
|
var NullProtoObjectViaActiveX = function (activeXDocument) { |
|
activeXDocument.write(scriptTag('')); |
|
activeXDocument.close(); |
|
var temp = activeXDocument.parentWindow.Object; |
|
activeXDocument = null; |
|
return temp; |
|
}; |
|
|
|
|
|
var NullProtoObjectViaIFrame = function () { |
|
|
|
var iframe = documentCreateElement('iframe'); |
|
var JS = 'java' + SCRIPT + ':'; |
|
var iframeDocument; |
|
iframe.style.display = 'none'; |
|
html.appendChild(iframe); |
|
|
|
iframe.src = String(JS); |
|
iframeDocument = iframe.contentWindow.document; |
|
iframeDocument.open(); |
|
iframeDocument.write(scriptTag('document.F=Object')); |
|
iframeDocument.close(); |
|
return iframeDocument.F; |
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
var activeXDocument; |
|
var NullProtoObject = function () { |
|
try { |
|
|
|
activeXDocument = document.domain && new ActiveXObject('htmlfile'); |
|
} catch (error) { } |
|
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame(); |
|
var length = enumBugKeys.length; |
|
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; |
|
return NullProtoObject(); |
|
}; |
|
|
|
hiddenKeys[IE_PROTO] = true; |
|
|
|
|
|
|
|
module.exports = Object.create || function create(O, Properties) { |
|
var result; |
|
if (O !== null) { |
|
EmptyConstructor[PROTOTYPE] = anObject(O); |
|
result = new EmptyConstructor(); |
|
EmptyConstructor[PROTOTYPE] = null; |
|
|
|
result[IE_PROTO] = O; |
|
} else result = NullProtoObject(); |
|
return Properties === undefined ? result : defineProperties(result, Properties); |
|
}; |
|
|
|
},{"../internals/an-object":5,"../internals/document-create-element":19,"../internals/enum-bug-keys":20,"../internals/hidden-keys":29,"../internals/html":30,"../internals/object-define-properties":46,"../internals/shared-key":63}],46:[function(require,module,exports){ |
|
var DESCRIPTORS = require('../internals/descriptors'); |
|
var definePropertyModule = require('../internals/object-define-property'); |
|
var anObject = require('../internals/an-object'); |
|
var objectKeys = require('../internals/object-keys'); |
|
|
|
|
|
|
|
module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) { |
|
anObject(O); |
|
var keys = objectKeys(Properties); |
|
var length = keys.length; |
|
var index = 0; |
|
var key; |
|
while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]); |
|
return O; |
|
}; |
|
|
|
},{"../internals/an-object":5,"../internals/descriptors":18,"../internals/object-define-property":47,"../internals/object-keys":53}],47:[function(require,module,exports){ |
|
var DESCRIPTORS = require('../internals/descriptors'); |
|
var IE8_DOM_DEFINE = require('../internals/ie8-dom-define'); |
|
var anObject = require('../internals/an-object'); |
|
var toPrimitive = require('../internals/to-primitive'); |
|
|
|
var nativeDefineProperty = Object.defineProperty; |
|
|
|
|
|
|
|
exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) { |
|
anObject(O); |
|
P = toPrimitive(P, true); |
|
anObject(Attributes); |
|
if (IE8_DOM_DEFINE) try { |
|
return nativeDefineProperty(O, P, Attributes); |
|
} catch (error) { } |
|
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); |
|
if ('value' in Attributes) O[P] = Attributes.value; |
|
return O; |
|
}; |
|
|
|
},{"../internals/an-object":5,"../internals/descriptors":18,"../internals/ie8-dom-define":31,"../internals/to-primitive":73}],48:[function(require,module,exports){ |
|
var DESCRIPTORS = require('../internals/descriptors'); |
|
var propertyIsEnumerableModule = require('../internals/object-property-is-enumerable'); |
|
var createPropertyDescriptor = require('../internals/create-property-descriptor'); |
|
var toIndexedObject = require('../internals/to-indexed-object'); |
|
var toPrimitive = require('../internals/to-primitive'); |
|
var has = require('../internals/has'); |
|
var IE8_DOM_DEFINE = require('../internals/ie8-dom-define'); |
|
|
|
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; |
|
|
|
|
|
|
|
exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { |
|
O = toIndexedObject(O); |
|
P = toPrimitive(P, true); |
|
if (IE8_DOM_DEFINE) try { |
|
return nativeGetOwnPropertyDescriptor(O, P); |
|
} catch (error) { } |
|
if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]); |
|
}; |
|
|
|
},{"../internals/create-property-descriptor":15,"../internals/descriptors":18,"../internals/has":28,"../internals/ie8-dom-define":31,"../internals/object-property-is-enumerable":54,"../internals/to-indexed-object":69,"../internals/to-primitive":73}],49:[function(require,module,exports){ |
|
var internalObjectKeys = require('../internals/object-keys-internal'); |
|
var enumBugKeys = require('../internals/enum-bug-keys'); |
|
|
|
var hiddenKeys = enumBugKeys.concat('length', 'prototype'); |
|
|
|
|
|
|
|
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { |
|
return internalObjectKeys(O, hiddenKeys); |
|
}; |
|
|
|
},{"../internals/enum-bug-keys":20,"../internals/object-keys-internal":52}],50:[function(require,module,exports){ |
|
exports.f = Object.getOwnPropertySymbols; |
|
|
|
},{}],51:[function(require,module,exports){ |
|
var has = require('../internals/has'); |
|
var toObject = require('../internals/to-object'); |
|
var sharedKey = require('../internals/shared-key'); |
|
var CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter'); |
|
|
|
var IE_PROTO = sharedKey('IE_PROTO'); |
|
var ObjectPrototype = Object.prototype; |
|
|
|
|
|
|
|
module.exports = CORRECT_PROTOTYPE_GETTER ? 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 ? ObjectPrototype : null; |
|
}; |
|
|
|
},{"../internals/correct-prototype-getter":12,"../internals/has":28,"../internals/shared-key":63,"../internals/to-object":72}],52:[function(require,module,exports){ |
|
var has = require('../internals/has'); |
|
var toIndexedObject = require('../internals/to-indexed-object'); |
|
var indexOf = require('../internals/array-includes').indexOf; |
|
var hiddenKeys = require('../internals/hidden-keys'); |
|
|
|
module.exports = function (object, names) { |
|
var O = toIndexedObject(object); |
|
var i = 0; |
|
var result = []; |
|
var key; |
|
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); |
|
|
|
while (names.length > i) if (has(O, key = names[i++])) { |
|
~indexOf(result, key) || result.push(key); |
|
} |
|
return result; |
|
}; |
|
|
|
},{"../internals/array-includes":7,"../internals/has":28,"../internals/hidden-keys":29,"../internals/to-indexed-object":69}],53:[function(require,module,exports){ |
|
var internalObjectKeys = require('../internals/object-keys-internal'); |
|
var enumBugKeys = require('../internals/enum-bug-keys'); |
|
|
|
|
|
|
|
module.exports = Object.keys || function keys(O) { |
|
return internalObjectKeys(O, enumBugKeys); |
|
}; |
|
|
|
},{"../internals/enum-bug-keys":20,"../internals/object-keys-internal":52}],54:[function(require,module,exports){ |
|
'use strict'; |
|
var nativePropertyIsEnumerable = {}.propertyIsEnumerable; |
|
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; |
|
|
|
|
|
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); |
|
|
|
|
|
|
|
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) { |
|
var descriptor = getOwnPropertyDescriptor(this, V); |
|
return !!descriptor && descriptor.enumerable; |
|
} : nativePropertyIsEnumerable; |
|
|
|
},{}],55:[function(require,module,exports){ |
|
var anObject = require('../internals/an-object'); |
|
var aPossiblePrototype = require('../internals/a-possible-prototype'); |
|
|
|
|
|
|
|
|
|
|
|
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () { |
|
var CORRECT_SETTER = false; |
|
var test = {}; |
|
var setter; |
|
try { |
|
setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set; |
|
setter.call(test, []); |
|
CORRECT_SETTER = test instanceof Array; |
|
} catch (error) { } |
|
return function setPrototypeOf(O, proto) { |
|
anObject(O); |
|
aPossiblePrototype(proto); |
|
if (CORRECT_SETTER) setter.call(O, proto); |
|
else O.__proto__ = proto; |
|
return O; |
|
}; |
|
}() : undefined); |
|
|
|
},{"../internals/a-possible-prototype":2,"../internals/an-object":5}],56:[function(require,module,exports){ |
|
var getBuiltIn = require('../internals/get-built-in'); |
|
var getOwnPropertyNamesModule = require('../internals/object-get-own-property-names'); |
|
var getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols'); |
|
var anObject = require('../internals/an-object'); |
|
|
|
|
|
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { |
|
var keys = getOwnPropertyNamesModule.f(anObject(it)); |
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; |
|
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; |
|
}; |
|
|
|
},{"../internals/an-object":5,"../internals/get-built-in":24,"../internals/object-get-own-property-names":49,"../internals/object-get-own-property-symbols":50}],57:[function(require,module,exports){ |
|
var global = require('../internals/global'); |
|
|
|
module.exports = global; |
|
|
|
},{"../internals/global":27}],58:[function(require,module,exports){ |
|
var redefine = require('../internals/redefine'); |
|
|
|
module.exports = function (target, src, options) { |
|
for (var key in src) redefine(target, key, src[key], options); |
|
return target; |
|
}; |
|
|
|
},{"../internals/redefine":59}],59:[function(require,module,exports){ |
|
var global = require('../internals/global'); |
|
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); |
|
var has = require('../internals/has'); |
|
var setGlobal = require('../internals/set-global'); |
|
var inspectSource = require('../internals/inspect-source'); |
|
var InternalStateModule = require('../internals/internal-state'); |
|
|
|
var getInternalState = InternalStateModule.get; |
|
var enforceInternalState = InternalStateModule.enforce; |
|
var TEMPLATE = String(String).split('String'); |
|
|
|
(module.exports = function (O, key, value, options) { |
|
var unsafe = options ? !!options.unsafe : false; |
|
var simple = options ? !!options.enumerable : false; |
|
var noTargetGet = options ? !!options.noTargetGet : false; |
|
if (typeof value == 'function') { |
|
if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key); |
|
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : ''); |
|
} |
|
if (O === global) { |
|
if (simple) O[key] = value; |
|
else setGlobal(key, value); |
|
return; |
|
} else if (!unsafe) { |
|
delete O[key]; |
|
} else if (!noTargetGet && O[key]) { |
|
simple = true; |
|
} |
|
if (simple) O[key] = value; |
|
else createNonEnumerableProperty(O, key, value); |
|
|
|
})(Function.prototype, 'toString', function toString() { |
|
return typeof this == 'function' && getInternalState(this).source || inspectSource(this); |
|
}); |
|
|
|
},{"../internals/create-non-enumerable-property":14,"../internals/global":27,"../internals/has":28,"../internals/inspect-source":33,"../internals/internal-state":34,"../internals/set-global":61}],60:[function(require,module,exports){ |
|
|
|
|
|
module.exports = function (it) { |
|
if (it == undefined) throw TypeError("Can't call method on " + it); |
|
return it; |
|
}; |
|
|
|
},{}],61:[function(require,module,exports){ |
|
var global = require('../internals/global'); |
|
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); |
|
|
|
module.exports = function (key, value) { |
|
try { |
|
createNonEnumerableProperty(global, key, value); |
|
} catch (error) { |
|
global[key] = value; |
|
} return value; |
|
}; |
|
|
|
},{"../internals/create-non-enumerable-property":14,"../internals/global":27}],62:[function(require,module,exports){ |
|
var defineProperty = require('../internals/object-define-property').f; |
|
var has = require('../internals/has'); |
|
var wellKnownSymbol = require('../internals/well-known-symbol'); |
|
|
|
var TO_STRING_TAG = wellKnownSymbol('toStringTag'); |
|
|
|
module.exports = function (it, TAG, STATIC) { |
|
if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) { |
|
defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG }); |
|
} |
|
}; |
|
|
|
},{"../internals/has":28,"../internals/object-define-property":47,"../internals/well-known-symbol":77}],63:[function(require,module,exports){ |
|
var shared = require('../internals/shared'); |
|
var uid = require('../internals/uid'); |
|
|
|
var keys = shared('keys'); |
|
|
|
module.exports = function (key) { |
|
return keys[key] || (keys[key] = uid(key)); |
|
}; |
|
|
|
},{"../internals/shared":65,"../internals/uid":75}],64:[function(require,module,exports){ |
|
var global = require('../internals/global'); |
|
var setGlobal = require('../internals/set-global'); |
|
|
|
var SHARED = '__core-js_shared__'; |
|
var store = global[SHARED] || setGlobal(SHARED, {}); |
|
|
|
module.exports = store; |
|
|
|
},{"../internals/global":27,"../internals/set-global":61}],65:[function(require,module,exports){ |
|
var IS_PURE = require('../internals/is-pure'); |
|
var store = require('../internals/shared-store'); |
|
|
|
(module.exports = function (key, value) { |
|
return store[key] || (store[key] = value !== undefined ? value : {}); |
|
})('versions', []).push({ |
|
version: '3.6.4', |
|
mode: IS_PURE ? 'pure' : 'global', |
|
copyright: '© 2020 Denis Pushkarev (zloirock.ru)' |
|
}); |
|
|
|
},{"../internals/is-pure":38,"../internals/shared-store":64}],66:[function(require,module,exports){ |
|
var toInteger = require('../internals/to-integer'); |
|
var requireObjectCoercible = require('../internals/require-object-coercible'); |
|
|
|
|
|
var createMethod = function (CONVERT_TO_STRING) { |
|
return function ($this, pos) { |
|
var S = String(requireObjectCoercible($this)); |
|
var position = toInteger(pos); |
|
var size = S.length; |
|
var first, second; |
|
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; |
|
first = S.charCodeAt(position); |
|
return first < 0xD800 || first > 0xDBFF || position + 1 === size |
|
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF |
|
? CONVERT_TO_STRING ? S.charAt(position) : first |
|
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; |
|
}; |
|
}; |
|
|
|
module.exports = { |
|
|
|
|
|
codeAt: createMethod(false), |
|
|
|
|
|
charAt: createMethod(true) |
|
}; |
|
|
|
},{"../internals/require-object-coercible":60,"../internals/to-integer":70}],67:[function(require,module,exports){ |
|
'use strict'; |
|
|
|
var maxInt = 2147483647; |
|
var base = 36; |
|
var tMin = 1; |
|
var tMax = 26; |
|
var skew = 38; |
|
var damp = 700; |
|
var initialBias = 72; |
|
var initialN = 128; |
|
var delimiter = '-'; |
|
var regexNonASCII = /[^\0-\u007E]/; |
|
var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; |
|
var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process'; |
|
var baseMinusTMin = base - tMin; |
|
var floor = Math.floor; |
|
var stringFromCharCode = String.fromCharCode; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ucs2decode = function (string) { |
|
var output = []; |
|
var counter = 0; |
|
var length = string.length; |
|
while (counter < length) { |
|
var value = string.charCodeAt(counter++); |
|
if (value >= 0xD800 && value <= 0xDBFF && counter < length) { |
|
|
|
var extra = string.charCodeAt(counter++); |
|
if ((extra & 0xFC00) == 0xDC00) { |
|
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); |
|
} else { |
|
|
|
|
|
output.push(value); |
|
counter--; |
|
} |
|
} else { |
|
output.push(value); |
|
} |
|
} |
|
return output; |
|
}; |
|
|
|
|
|
|
|
|
|
var digitToBasic = function (digit) { |
|
|
|
|
|
return digit + 22 + 75 * (digit < 26); |
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var adapt = function (delta, numPoints, firstTime) { |
|
var k = 0; |
|
delta = firstTime ? floor(delta / damp) : delta >> 1; |
|
delta += floor(delta / numPoints); |
|
for (; delta > baseMinusTMin * tMax >> 1; k += base) { |
|
delta = floor(delta / baseMinusTMin); |
|
} |
|
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); |
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
var encode = function (input) { |
|
var output = []; |
|
|
|
|
|
input = ucs2decode(input); |
|
|
|
|
|
var inputLength = input.length; |
|
|
|
|
|
var n = initialN; |
|
var delta = 0; |
|
var bias = initialBias; |
|
var i, currentValue; |
|
|
|
|
|
for (i = 0; i < input.length; i++) { |
|
currentValue = input[i]; |
|
if (currentValue < 0x80) { |
|
output.push(stringFromCharCode(currentValue)); |
|
} |
|
} |
|
|
|
var basicLength = output.length; |
|
var handledCPCount = basicLength; |
|
|
|
|
|
if (basicLength) { |
|
output.push(delimiter); |
|
} |
|
|
|
|
|
while (handledCPCount < inputLength) { |
|
|
|
var m = maxInt; |
|
for (i = 0; i < input.length; i++) { |
|
currentValue = input[i]; |
|
if (currentValue >= n && currentValue < m) { |
|
m = currentValue; |
|
} |
|
} |
|
|
|
|
|
var handledCPCountPlusOne = handledCPCount + 1; |
|
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { |
|
throw RangeError(OVERFLOW_ERROR); |
|
} |
|
|
|
delta += (m - n) * handledCPCountPlusOne; |
|
n = m; |
|
|
|
for (i = 0; i < input.length; i++) { |
|
currentValue = input[i]; |
|
if (currentValue < n && ++delta > maxInt) { |
|
throw RangeError(OVERFLOW_ERROR); |
|
} |
|
if (currentValue == n) { |
|
|
|
var q = delta; |
|
for (var k = base; ; k += base) { |
|
var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); |
|
if (q < t) break; |
|
var qMinusT = q - t; |
|
var baseMinusT = base - t; |
|
output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT))); |
|
q = floor(qMinusT / baseMinusT); |
|
} |
|
|
|
output.push(stringFromCharCode(digitToBasic(q))); |
|
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); |
|
delta = 0; |
|
++handledCPCount; |
|
} |
|
} |
|
|
|
++delta; |
|
++n; |
|
} |
|
return output.join(''); |
|
}; |
|
|
|
module.exports = function (input) { |
|
var encoded = []; |
|
var labels = input.toLowerCase().replace(regexSeparators, '\u002E').split('.'); |
|
var i, label; |
|
for (i = 0; i < labels.length; i++) { |
|
label = labels[i]; |
|
encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label); |
|
} |
|
return encoded.join('.'); |
|
}; |
|
|
|
},{}],68:[function(require,module,exports){ |
|
var toInteger = require('../internals/to-integer'); |
|
|
|
var max = Math.max; |
|
var min = Math.min; |
|
|
|
|
|
|
|
|
|
module.exports = function (index, length) { |
|
var integer = toInteger(index); |
|
return integer < 0 ? max(integer + length, 0) : min(integer, length); |
|
}; |
|
|
|
},{"../internals/to-integer":70}],69:[function(require,module,exports){ |
|
|
|
var IndexedObject = require('../internals/indexed-object'); |
|
var requireObjectCoercible = require('../internals/require-object-coercible'); |
|
|
|
module.exports = function (it) { |
|
return IndexedObject(requireObjectCoercible(it)); |
|
}; |
|
|
|
},{"../internals/indexed-object":32,"../internals/require-object-coercible":60}],70:[function(require,module,exports){ |
|
var ceil = Math.ceil; |
|
var floor = Math.floor; |
|
|
|
|
|
|
|
module.exports = function (argument) { |
|
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); |
|
}; |
|
|
|
},{}],71:[function(require,module,exports){ |
|
var toInteger = require('../internals/to-integer'); |
|
|
|
var min = Math.min; |
|
|
|
|
|
|
|
module.exports = function (argument) { |
|
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; |
|
}; |
|
|
|
},{"../internals/to-integer":70}],72:[function(require,module,exports){ |
|
var requireObjectCoercible = require('../internals/require-object-coercible'); |
|
|
|
|
|
|
|
module.exports = function (argument) { |
|
return Object(requireObjectCoercible(argument)); |
|
}; |
|
|
|
},{"../internals/require-object-coercible":60}],73:[function(require,module,exports){ |
|
var isObject = require('../internals/is-object'); |
|
|
|
|
|
|
|
|
|
|
|
module.exports = function (input, PREFERRED_STRING) { |
|
if (!isObject(input)) return input; |
|
var fn, val; |
|
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; |
|
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; |
|
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; |
|
throw TypeError("Can't convert object to primitive value"); |
|
}; |
|
|
|
},{"../internals/is-object":37}],74:[function(require,module,exports){ |
|
var wellKnownSymbol = require('../internals/well-known-symbol'); |
|
|
|
var TO_STRING_TAG = wellKnownSymbol('toStringTag'); |
|
var test = {}; |
|
|
|
test[TO_STRING_TAG] = 'z'; |
|
|
|
module.exports = String(test) === '[object z]'; |
|
|
|
},{"../internals/well-known-symbol":77}],75:[function(require,module,exports){ |
|
var id = 0; |
|
var postfix = Math.random(); |
|
|
|
module.exports = function (key) { |
|
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); |
|
}; |
|
|
|
},{}],76:[function(require,module,exports){ |
|
var NATIVE_SYMBOL = require('../internals/native-symbol'); |
|
|
|
module.exports = NATIVE_SYMBOL |
|
|
|
&& !Symbol.sham |
|
|
|
&& typeof Symbol.iterator == 'symbol'; |
|
|
|
},{"../internals/native-symbol":41}],77:[function(require,module,exports){ |
|
var global = require('../internals/global'); |
|
var shared = require('../internals/shared'); |
|
var has = require('../internals/has'); |
|
var uid = require('../internals/uid'); |
|
var NATIVE_SYMBOL = require('../internals/native-symbol'); |
|
var USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid'); |
|
|
|
var WellKnownSymbolsStore = shared('wks'); |
|
var Symbol = global.Symbol; |
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid; |
|
|
|
module.exports = function (name) { |
|
if (!has(WellKnownSymbolsStore, name)) { |
|
if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name]; |
|
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); |
|
} return WellKnownSymbolsStore[name]; |
|
}; |
|
|
|
},{"../internals/global":27,"../internals/has":28,"../internals/native-symbol":41,"../internals/shared":65,"../internals/uid":75,"../internals/use-symbol-as-uid":76}],78:[function(require,module,exports){ |
|
'use strict'; |
|
var toIndexedObject = require('../internals/to-indexed-object'); |
|
var addToUnscopables = require('../internals/add-to-unscopables'); |
|
var Iterators = require('../internals/iterators'); |
|
var InternalStateModule = require('../internals/internal-state'); |
|
var defineIterator = require('../internals/define-iterator'); |
|
|
|
var ARRAY_ITERATOR = 'Array Iterator'; |
|
var setInternalState = InternalStateModule.set; |
|
var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = defineIterator(Array, 'Array', function (iterated, kind) { |
|
setInternalState(this, { |
|
type: ARRAY_ITERATOR, |
|
target: toIndexedObject(iterated), |
|
index: 0, |
|
kind: kind |
|
}); |
|
|
|
|
|
}, function () { |
|
var state = getInternalState(this); |
|
var target = state.target; |
|
var kind = state.kind; |
|
var index = state.index++; |
|
if (!target || index >= target.length) { |
|
state.target = undefined; |
|
return { value: undefined, done: true }; |
|
} |
|
if (kind == 'keys') return { value: index, done: false }; |
|
if (kind == 'values') return { value: target[index], done: false }; |
|
return { value: [index, target[index]], done: false }; |
|
}, 'values'); |
|
|
|
|
|
|
|
|
|
Iterators.Arguments = Iterators.Array; |
|
|
|
|
|
addToUnscopables('keys'); |
|
addToUnscopables('values'); |
|
addToUnscopables('entries'); |
|
|
|
},{"../internals/add-to-unscopables":3,"../internals/define-iterator":17,"../internals/internal-state":34,"../internals/iterators":40,"../internals/to-indexed-object":69}],79:[function(require,module,exports){ |
|
'use strict'; |
|
var charAt = require('../internals/string-multibyte').charAt; |
|
var InternalStateModule = require('../internals/internal-state'); |
|
var defineIterator = require('../internals/define-iterator'); |
|
|
|
var STRING_ITERATOR = 'String Iterator'; |
|
var setInternalState = InternalStateModule.set; |
|
var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR); |
|
|
|
|
|
|
|
defineIterator(String, 'String', function (iterated) { |
|
setInternalState(this, { |
|
type: STRING_ITERATOR, |
|
string: String(iterated), |
|
index: 0 |
|
}); |
|
|
|
|
|
}, function next() { |
|
var state = getInternalState(this); |
|
var string = state.string; |
|
var index = state.index; |
|
var point; |
|
if (index >= string.length) return { value: undefined, done: true }; |
|
point = charAt(string, index); |
|
state.index += point.length; |
|
return { value: point, done: false }; |
|
}); |
|
|
|
},{"../internals/define-iterator":17,"../internals/internal-state":34,"../internals/string-multibyte":66}],80:[function(require,module,exports){ |
|
'use strict'; |
|
|
|
require('../modules/es.array.iterator'); |
|
var $ = require('../internals/export'); |
|
var getBuiltIn = require('../internals/get-built-in'); |
|
var USE_NATIVE_URL = require('../internals/native-url'); |
|
var redefine = require('../internals/redefine'); |
|
var redefineAll = require('../internals/redefine-all'); |
|
var setToStringTag = require('../internals/set-to-string-tag'); |
|
var createIteratorConstructor = require('../internals/create-iterator-constructor'); |
|
var InternalStateModule = require('../internals/internal-state'); |
|
var anInstance = require('../internals/an-instance'); |
|
var hasOwn = require('../internals/has'); |
|
var bind = require('../internals/function-bind-context'); |
|
var classof = require('../internals/classof'); |
|
var anObject = require('../internals/an-object'); |
|
var isObject = require('../internals/is-object'); |
|
var create = require('../internals/object-create'); |
|
var createPropertyDescriptor = require('../internals/create-property-descriptor'); |
|
var getIterator = require('../internals/get-iterator'); |
|
var getIteratorMethod = require('../internals/get-iterator-method'); |
|
var wellKnownSymbol = require('../internals/well-known-symbol'); |
|
|
|
var $fetch = getBuiltIn('fetch'); |
|
var Headers = getBuiltIn('Headers'); |
|
var ITERATOR = wellKnownSymbol('iterator'); |
|
var URL_SEARCH_PARAMS = 'URLSearchParams'; |
|
var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator'; |
|
var setInternalState = InternalStateModule.set; |
|
var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS); |
|
var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR); |
|
|
|
var plus = /\+/g; |
|
var sequences = Array(4); |
|
|
|
var percentSequence = function (bytes) { |
|
return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi')); |
|
}; |
|
|
|
var percentDecode = function (sequence) { |
|
try { |
|
return decodeURIComponent(sequence); |
|
} catch (error) { |
|
return sequence; |
|
} |
|
}; |
|
|
|
var deserialize = function (it) { |
|
var result = it.replace(plus, ' '); |
|
var bytes = 4; |
|
try { |
|
return decodeURIComponent(result); |
|
} catch (error) { |
|
while (bytes) { |
|
result = result.replace(percentSequence(bytes--), percentDecode); |
|
} |
|
return result; |
|
} |
|
}; |
|
|
|
var find = /[!'()~]|%20/g; |
|
|
|
var replace = { |
|
'!': '%21', |
|
"'": '%27', |
|
'(': '%28', |
|
')': '%29', |
|
'~': '%7E', |
|
'%20': '+' |
|
}; |
|
|
|
var replacer = function (match) { |
|
return replace[match]; |
|
}; |
|
|
|
var serialize = function (it) { |
|
return encodeURIComponent(it).replace(find, replacer); |
|
}; |
|
|
|
var parseSearchParams = function (result, query) { |
|
if (query) { |
|
var attributes = query.split('&'); |
|
var index = 0; |
|
var attribute, entry; |
|
while (index < attributes.length) { |
|
attribute = attributes[index++]; |
|
if (attribute.length) { |
|
entry = attribute.split('='); |
|
result.push({ |
|
key: deserialize(entry.shift()), |
|
value: deserialize(entry.join('=')) |
|
}); |
|
} |
|
} |
|
} |
|
}; |
|
|
|
var updateSearchParams = function (query) { |
|
this.entries.length = 0; |
|
parseSearchParams(this.entries, query); |
|
}; |
|
|
|
var validateArgumentsLength = function (passed, required) { |
|
if (passed < required) throw TypeError('Not enough arguments'); |
|
}; |
|
|
|
var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) { |
|
setInternalState(this, { |
|
type: URL_SEARCH_PARAMS_ITERATOR, |
|
iterator: getIterator(getInternalParamsState(params).entries), |
|
kind: kind |
|
}); |
|
}, 'Iterator', function next() { |
|
var state = getInternalIteratorState(this); |
|
var kind = state.kind; |
|
var step = state.iterator.next(); |
|
var entry = step.value; |
|
if (!step.done) { |
|
step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value]; |
|
} return step; |
|
}); |
|
|
|
|
|
|
|
var URLSearchParamsConstructor = function URLSearchParams() { |
|
anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS); |
|
var init = arguments.length > 0 ? arguments[0] : undefined; |
|
var that = this; |
|
var entries = []; |
|
var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key; |
|
|
|
setInternalState(that, { |
|
type: URL_SEARCH_PARAMS, |
|
entries: entries, |
|
updateURL: function () { }, |
|
updateSearchParams: updateSearchParams |
|
}); |
|
|
|
if (init !== undefined) { |
|
if (isObject(init)) { |
|
iteratorMethod = getIteratorMethod(init); |
|
if (typeof iteratorMethod === 'function') { |
|
iterator = iteratorMethod.call(init); |
|
next = iterator.next; |
|
while (!(step = next.call(iterator)).done) { |
|
entryIterator = getIterator(anObject(step.value)); |
|
entryNext = entryIterator.next; |
|
if ( |
|
(first = entryNext.call(entryIterator)).done || |
|
(second = entryNext.call(entryIterator)).done || |
|
!entryNext.call(entryIterator).done |
|
) throw TypeError('Expected sequence with length 2'); |
|
entries.push({ key: first.value + '', value: second.value + '' }); |
|
} |
|
} else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' }); |
|
} else { |
|
parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + ''); |
|
} |
|
} |
|
}; |
|
|
|
var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype; |
|
|
|
redefineAll(URLSearchParamsPrototype, { |
|
|
|
|
|
append: function append(name, value) { |
|
validateArgumentsLength(arguments.length, 2); |
|
var state = getInternalParamsState(this); |
|
state.entries.push({ key: name + '', value: value + '' }); |
|
state.updateURL(); |
|
}, |
|
|
|
|
|
'delete': function (name) { |
|
validateArgumentsLength(arguments.length, 1); |
|
var state = getInternalParamsState(this); |
|
var entries = state.entries; |
|
var key = name + ''; |
|
var index = 0; |
|
while (index < entries.length) { |
|
if (entries[index].key === key) entries.splice(index, 1); |
|
else index++; |
|
} |
|
state.updateURL(); |
|
}, |
|
|
|
|
|
get: function get(name) { |
|
validateArgumentsLength(arguments.length, 1); |
|
var entries = getInternalParamsState(this).entries; |
|
var key = name + ''; |
|
var index = 0; |
|
for (; index < entries.length; index++) { |
|
if (entries[index].key === key) return entries[index].value; |
|
} |
|
return null; |
|
}, |
|
|
|
|
|
getAll: function getAll(name) { |
|
validateArgumentsLength(arguments.length, 1); |
|
var entries = getInternalParamsState(this).entries; |
|
var key = name + ''; |
|
var result = []; |
|
var index = 0; |
|
for (; index < entries.length; index++) { |
|
if (entries[index].key === key) result.push(entries[index].value); |
|
} |
|
return result; |
|
}, |
|
|
|
|
|
has: function has(name) { |
|
validateArgumentsLength(arguments.length, 1); |
|
var entries = getInternalParamsState(this).entries; |
|
var key = name + ''; |
|
var index = 0; |
|
while (index < entries.length) { |
|
if (entries[index++].key === key) return true; |
|
} |
|
return false; |
|
}, |
|
|
|
|
|
set: function set(name, value) { |
|
validateArgumentsLength(arguments.length, 1); |
|
var state = getInternalParamsState(this); |
|
var entries = state.entries; |
|
var found = false; |
|
var key = name + ''; |
|
var val = value + ''; |
|
var index = 0; |
|
var entry; |
|
for (; index < entries.length; index++) { |
|
entry = entries[index]; |
|
if (entry.key === key) { |
|
if (found) entries.splice(index--, 1); |
|
else { |
|
found = true; |
|
entry.value = val; |
|
} |
|
} |
|
} |
|
if (!found) entries.push({ key: key, value: val }); |
|
state.updateURL(); |
|
}, |
|
|
|
|
|
sort: function sort() { |
|
var state = getInternalParamsState(this); |
|
var entries = state.entries; |
|
|
|
var slice = entries.slice(); |
|
var entry, entriesIndex, sliceIndex; |
|
entries.length = 0; |
|
for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) { |
|
entry = slice[sliceIndex]; |
|
for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) { |
|
if (entries[entriesIndex].key > entry.key) { |
|
entries.splice(entriesIndex, 0, entry); |
|
break; |
|
} |
|
} |
|
if (entriesIndex === sliceIndex) entries.push(entry); |
|
} |
|
state.updateURL(); |
|
}, |
|
|
|
forEach: function forEach(callback ) { |
|
var entries = getInternalParamsState(this).entries; |
|
var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3); |
|
var index = 0; |
|
var entry; |
|
while (index < entries.length) { |
|
entry = entries[index++]; |
|
boundFunction(entry.value, entry.key, this); |
|
} |
|
}, |
|
|
|
keys: function keys() { |
|
return new URLSearchParamsIterator(this, 'keys'); |
|
}, |
|
|
|
values: function values() { |
|
return new URLSearchParamsIterator(this, 'values'); |
|
}, |
|
|
|
entries: function entries() { |
|
return new URLSearchParamsIterator(this, 'entries'); |
|
} |
|
}, { enumerable: true }); |
|
|
|
|
|
redefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries); |
|
|
|
|
|
|
|
redefine(URLSearchParamsPrototype, 'toString', function toString() { |
|
var entries = getInternalParamsState(this).entries; |
|
var result = []; |
|
var index = 0; |
|
var entry; |
|
while (index < entries.length) { |
|
entry = entries[index++]; |
|
result.push(serialize(entry.key) + '=' + serialize(entry.value)); |
|
} return result.join('&'); |
|
}, { enumerable: true }); |
|
|
|
setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS); |
|
|
|
$({ global: true, forced: !USE_NATIVE_URL }, { |
|
URLSearchParams: URLSearchParamsConstructor |
|
}); |
|
|
|
|
|
|
|
if (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') { |
|
$({ global: true, enumerable: true, forced: true }, { |
|
fetch: function fetch(input ) { |
|
var args = [input]; |
|
var init, body, headers; |
|
if (arguments.length > 1) { |
|
init = arguments[1]; |
|
if (isObject(init)) { |
|
body = init.body; |
|
if (classof(body) === URL_SEARCH_PARAMS) { |
|
headers = init.headers ? new Headers(init.headers) : new Headers(); |
|
if (!headers.has('content-type')) { |
|
headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8'); |
|
} |
|
init = create(init, { |
|
body: createPropertyDescriptor(0, String(body)), |
|
headers: createPropertyDescriptor(0, headers) |
|
}); |
|
} |
|
} |
|
args.push(init); |
|
} return $fetch.apply(this, args); |
|
} |
|
}); |
|
} |
|
|
|
module.exports = { |
|
URLSearchParams: URLSearchParamsConstructor, |
|
getState: getInternalParamsState |
|
}; |
|
|
|
},{"../internals/an-instance":4,"../internals/an-object":5,"../internals/classof":10,"../internals/create-iterator-constructor":13,"../internals/create-property-descriptor":15,"../internals/export":21,"../internals/function-bind-context":23,"../internals/get-built-in":24,"../internals/get-iterator":26,"../internals/get-iterator-method":25,"../internals/has":28,"../internals/internal-state":34,"../internals/is-object":37,"../internals/native-url":42,"../internals/object-create":45,"../internals/redefine":59,"../internals/redefine-all":58,"../internals/set-to-string-tag":62,"../internals/well-known-symbol":77,"../modules/es.array.iterator":78}],81:[function(require,module,exports){ |
|
'use strict'; |
|
|
|
require('../modules/es.string.iterator'); |
|
var $ = require('../internals/export'); |
|
var DESCRIPTORS = require('../internals/descriptors'); |
|
var USE_NATIVE_URL = require('../internals/native-url'); |
|
var global = require('../internals/global'); |
|
var defineProperties = require('../internals/object-define-properties'); |
|
var redefine = require('../internals/redefine'); |
|
var anInstance = require('../internals/an-instance'); |
|
var has = require('../internals/has'); |
|
var assign = require('../internals/object-assign'); |
|
var arrayFrom = require('../internals/array-from'); |
|
var codeAt = require('../internals/string-multibyte').codeAt; |
|
var toASCII = require('../internals/string-punycode-to-ascii'); |
|
var setToStringTag = require('../internals/set-to-string-tag'); |
|
var URLSearchParamsModule = require('../modules/web.url-search-params'); |
|
var InternalStateModule = require('../internals/internal-state'); |
|
|
|
var NativeURL = global.URL; |
|
var URLSearchParams = URLSearchParamsModule.URLSearchParams; |
|
var getInternalSearchParamsState = URLSearchParamsModule.getState; |
|
var setInternalState = InternalStateModule.set; |
|
var getInternalURLState = InternalStateModule.getterFor('URL'); |
|
var floor = Math.floor; |
|
var pow = Math.pow; |
|
|
|
var INVALID_AUTHORITY = 'Invalid authority'; |
|
var INVALID_SCHEME = 'Invalid scheme'; |
|
var INVALID_HOST = 'Invalid host'; |
|
var INVALID_PORT = 'Invalid port'; |
|
|
|
var ALPHA = /[A-Za-z]/; |
|
var ALPHANUMERIC = /[\d+\-.A-Za-z]/; |
|
var DIGIT = /\d/; |
|
var HEX_START = /^(0x|0X)/; |
|
var OCT = /^[0-7]+$/; |
|
var DEC = /^\d+$/; |
|
var HEX = /^[\dA-Fa-f]+$/; |
|
|
|
var FORBIDDEN_HOST_CODE_POINT = /[\u0000\u0009\u000A\u000D #%/:?@[\\]]/; |
|
|
|
var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\u0000\u0009\u000A\u000D #/:?@[\\]]/; |
|
|
|
var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g; |
|
|
|
var TAB_AND_NEW_LINE = /[\u0009\u000A\u000D]/g; |
|
var EOF; |
|
|
|
var parseHost = function (url, input) { |
|
var result, codePoints, index; |
|
if (input.charAt(0) == '[') { |
|
if (input.charAt(input.length - 1) != ']') return INVALID_HOST; |
|
result = parseIPv6(input.slice(1, -1)); |
|
if (!result) return INVALID_HOST; |
|
url.host = result; |
|
|
|
} else if (!isSpecial(url)) { |
|
if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST; |
|
result = ''; |
|
codePoints = arrayFrom(input); |
|
for (index = 0; index < codePoints.length; index++) { |
|
result += percentEncode(codePoints[index], C0ControlPercentEncodeSet); |
|
} |
|
url.host = result; |
|
} else { |
|
input = toASCII(input); |
|
if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST; |
|
result = parseIPv4(input); |
|
if (result === null) return INVALID_HOST; |
|
url.host = result; |
|
} |
|
}; |
|
|
|
var parseIPv4 = function (input) { |
|
var parts = input.split('.'); |
|
var partsLength, numbers, index, part, radix, number, ipv4; |
|
if (parts.length && parts[parts.length - 1] == '') { |
|
parts.pop(); |
|
} |
|
partsLength = parts.length; |
|
if (partsLength > 4) return input; |
|
numbers = []; |
|
for (index = 0; index < partsLength; index++) { |
|
part = parts[index]; |
|
if (part == '') return input; |
|
radix = 10; |
|
if (part.length > 1 && part.charAt(0) == '0') { |
|
radix = HEX_START.test(part) ? 16 : 8; |
|
part = part.slice(radix == 8 ? 1 : 2); |
|
} |
|
if (part === '') { |
|
number = 0; |
|
} else { |
|
if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input; |
|
number = parseInt(part, radix); |
|
} |
|
numbers.push(number); |
|
} |
|
for (index = 0; index < partsLength; index++) { |
|
number = numbers[index]; |
|
if (index == partsLength - 1) { |
|
if (number >= pow(256, 5 - partsLength)) return null; |
|
} else if (number > 255) return null; |
|
} |
|
ipv4 = numbers.pop(); |
|
for (index = 0; index < numbers.length; index++) { |
|
ipv4 += numbers[index] * pow(256, 3 - index); |
|
} |
|
return ipv4; |
|
}; |
|
|
|
|
|
var parseIPv6 = function (input) { |
|
var address = [0, 0, 0, 0, 0, 0, 0, 0]; |
|
var pieceIndex = 0; |
|
var compress = null; |
|
var pointer = 0; |
|
var value, length, numbersSeen, ipv4Piece, number, swaps, swap; |
|
|
|
var char = function () { |
|
return input.charAt(pointer); |
|
}; |
|
|
|
if (char() == ':') { |
|
if (input.charAt(1) != ':') return; |
|
pointer += 2; |
|
pieceIndex++; |
|
compress = pieceIndex; |
|
} |
|
while (char()) { |
|
if (pieceIndex == 8) return; |
|
if (char() == ':') { |
|
if (compress !== null) return; |
|
pointer++; |
|
pieceIndex++; |
|
compress = pieceIndex; |
|
continue; |
|
} |
|
value = length = 0; |
|
while (length < 4 && HEX.test(char())) { |
|
value = value * 16 + parseInt(char(), 16); |
|
pointer++; |
|
length++; |
|
} |
|
if (char() == '.') { |
|
if (length == 0) return; |
|
pointer -= length; |
|
if (pieceIndex > 6) return; |
|
numbersSeen = 0; |
|
while (char()) { |
|
ipv4Piece = null; |
|
if (numbersSeen > 0) { |
|
if (char() == '.' && numbersSeen < 4) pointer++; |
|
else return; |
|
} |
|
if (!DIGIT.test(char())) return; |
|
while (DIGIT.test(char())) { |
|
number = parseInt(char(), 10); |
|
if (ipv4Piece === null) ipv4Piece = number; |
|
else if (ipv4Piece == 0) return; |
|
else ipv4Piece = ipv4Piece * 10 + number; |
|
if (ipv4Piece > 255) return; |
|
pointer++; |
|
} |
|
address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece; |
|
numbersSeen++; |
|
if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++; |
|
} |
|
if (numbersSeen != 4) return; |
|
break; |
|
} else if (char() == ':') { |
|
pointer++; |
|
if (!char()) return; |
|
} else if (char()) return; |
|
address[pieceIndex++] = value; |
|
} |
|
if (compress !== null) { |
|
swaps = pieceIndex - compress; |
|
pieceIndex = 7; |
|
while (pieceIndex != 0 && swaps > 0) { |
|
swap = address[pieceIndex]; |
|
address[pieceIndex--] = address[compress + swaps - 1]; |
|
address[compress + --swaps] = swap; |
|
} |
|
} else if (pieceIndex != 8) return; |
|
return address; |
|
}; |
|
|
|
var findLongestZeroSequence = function (ipv6) { |
|
var maxIndex = null; |
|
var maxLength = 1; |
|
var currStart = null; |
|
var currLength = 0; |
|
var index = 0; |
|
for (; index < 8; index++) { |
|
if (ipv6[index] !== 0) { |
|
if (currLength > maxLength) { |
|
maxIndex = currStart; |
|
maxLength = currLength; |
|
} |
|
currStart = null; |
|
currLength = 0; |
|
} else { |
|
if (currStart === null) currStart = index; |
|
++currLength; |
|
} |
|
} |
|
if (currLength > maxLength) { |
|
maxIndex = currStart; |
|
maxLength = currLength; |
|
} |
|
return maxIndex; |
|
}; |
|
|
|
var serializeHost = function (host) { |
|
var result, index, compress, ignore0; |
|
|
|
if (typeof host == 'number') { |
|
result = []; |
|
for (index = 0; index < 4; index++) { |
|
result.unshift(host % 256); |
|
host = floor(host / 256); |
|
} return result.join('.'); |
|
|
|
} else if (typeof host == 'object') { |
|
result = ''; |
|
compress = findLongestZeroSequence(host); |
|
for (index = 0; index < 8; index++) { |
|
if (ignore0 && host[index] === 0) continue; |
|
if (ignore0) ignore0 = false; |
|
if (compress === index) { |
|
result += index ? ':' : '::'; |
|
ignore0 = true; |
|
} else { |
|
result += host[index].toString(16); |
|
if (index < 7) result += ':'; |
|
} |
|
} |
|
return '[' + result + ']'; |
|
} return host; |
|
}; |
|
|
|
var C0ControlPercentEncodeSet = {}; |
|
var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, { |
|
' ': 1, '"': 1, '<': 1, '>': 1, '`': 1 |
|
}); |
|
var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, { |
|
'#': 1, '?': 1, '{': 1, '}': 1 |
|
}); |
|
var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, { |
|
'/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1 |
|
}); |
|
|
|
var percentEncode = function (char, set) { |
|
var code = codeAt(char, 0); |
|
return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char); |
|
}; |
|
|
|
var specialSchemes = { |
|
ftp: 21, |
|
file: null, |
|
http: 80, |
|
https: 443, |
|
ws: 80, |
|
wss: 443 |
|
}; |
|
|
|
var isSpecial = function (url) { |
|
return has(specialSchemes, url.scheme); |
|
}; |
|
|
|
var includesCredentials = function (url) { |
|
return url.username != '' || url.password != ''; |
|
}; |
|
|
|
var cannotHaveUsernamePasswordPort = function (url) { |
|
return !url.host || url.cannotBeABaseURL || url.scheme == 'file'; |
|
}; |
|
|
|
var isWindowsDriveLetter = function (string, normalized) { |
|
var second; |
|
return string.length == 2 && ALPHA.test(string.charAt(0)) |
|
&& ((second = string.charAt(1)) == ':' || (!normalized && second == '|')); |
|
}; |
|
|
|
var startsWithWindowsDriveLetter = function (string) { |
|
var third; |
|
return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && ( |
|
string.length == 2 || |
|
((third = string.charAt(2)) === '/' || third === '\\' || third === '?' || third === '#') |
|
); |
|
}; |
|
|
|
var shortenURLsPath = function (url) { |
|
var path = url.path; |
|
var pathSize = path.length; |
|
if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) { |
|
path.pop(); |
|
} |
|
}; |
|
|
|
var isSingleDot = function (segment) { |
|
return segment === '.' || segment.toLowerCase() === '%2e'; |
|
}; |
|
|
|
var isDoubleDot = function (segment) { |
|
segment = segment.toLowerCase(); |
|
return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e'; |
|
}; |
|
|
|
|
|
var SCHEME_START = {}; |
|
var SCHEME = {}; |
|
var NO_SCHEME = {}; |
|
var SPECIAL_RELATIVE_OR_AUTHORITY = {}; |
|
var PATH_OR_AUTHORITY = {}; |
|
var RELATIVE = {}; |
|
var RELATIVE_SLASH = {}; |
|
var SPECIAL_AUTHORITY_SLASHES = {}; |
|
var SPECIAL_AUTHORITY_IGNORE_SLASHES = {}; |
|
var AUTHORITY = {}; |
|
var HOST = {}; |
|
var HOSTNAME = {}; |
|
var PORT = {}; |
|
var FILE = {}; |
|
var FILE_SLASH = {}; |
|
var FILE_HOST = {}; |
|
var PATH_START = {}; |
|
var PATH = {}; |
|
var CANNOT_BE_A_BASE_URL_PATH = {}; |
|
var QUERY = {}; |
|
var FRAGMENT = {}; |
|
|
|
|
|
var parseURL = function (url, input, stateOverride, base) { |
|
var state = stateOverride || SCHEME_START; |
|
var pointer = 0; |
|
var buffer = ''; |
|
var seenAt = false; |
|
var seenBracket = false; |
|
var seenPasswordToken = false; |
|
var codePoints, char, bufferCodePoints, failure; |
|
|
|
if (!stateOverride) { |
|
url.scheme = ''; |
|
url.username = ''; |
|
url.password = ''; |
|
url.host = null; |
|
url.port = null; |
|
url.path = []; |
|
url.query = null; |
|
url.fragment = null; |
|
url.cannotBeABaseURL = false; |
|
input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, ''); |
|
} |
|
|
|
input = input.replace(TAB_AND_NEW_LINE, ''); |
|
|
|
codePoints = arrayFrom(input); |
|
|
|
while (pointer <= codePoints.length) { |
|
char = codePoints[pointer]; |
|
switch (state) { |
|
case SCHEME_START: |
|
if (char && ALPHA.test(char)) { |
|
buffer += char.toLowerCase(); |
|
state = SCHEME; |
|
} else if (!stateOverride) { |
|
state = NO_SCHEME; |
|
continue; |
|
} else return INVALID_SCHEME; |
|
break; |
|
|
|
case SCHEME: |
|
if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) { |
|
buffer += char.toLowerCase(); |
|
} else if (char == ':') { |
|
if (stateOverride && ( |
|
(isSpecial(url) != has(specialSchemes, buffer)) || |
|
(buffer == 'file' && (includesCredentials(url) || url.port !== null)) || |
|
(url.scheme == 'file' && !url.host) |
|
)) return; |
|
url.scheme = buffer; |
|
if (stateOverride) { |
|
if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null; |
|
return; |
|
} |
|
buffer = ''; |
|
if (url.scheme == 'file') { |
|
state = FILE; |
|
} else if (isSpecial(url) && base && base.scheme == url.scheme) { |
|
state = SPECIAL_RELATIVE_OR_AUTHORITY; |
|
} else if (isSpecial(url)) { |
|
state = SPECIAL_AUTHORITY_SLASHES; |
|
} else if (codePoints[pointer + 1] == '/') { |
|
state = PATH_OR_AUTHORITY; |
|
pointer++; |
|
} else { |
|
url.cannotBeABaseURL = true; |
|
url.path.push(''); |
|
state = CANNOT_BE_A_BASE_URL_PATH; |
|
} |
|
} else if (!stateOverride) { |
|
buffer = ''; |
|
state = NO_SCHEME; |
|
pointer = 0; |
|
continue; |
|
} else return INVALID_SCHEME; |
|
break; |
|
|
|
case NO_SCHEME: |
|
if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME; |
|
if (base.cannotBeABaseURL && char == '#') { |
|
url.scheme = base.scheme; |
|
url.path = base.path.slice(); |
|
url.query = base.query; |
|
url.fragment = ''; |
|
url.cannotBeABaseURL = true; |
|
state = FRAGMENT; |
|
break; |
|
} |
|
state = base.scheme == 'file' ? FILE : RELATIVE; |
|
continue; |
|
|
|
case SPECIAL_RELATIVE_OR_AUTHORITY: |
|
if (char == '/' && codePoints[pointer + 1] == '/') { |
|
state = SPECIAL_AUTHORITY_IGNORE_SLASHES; |
|
pointer++; |
|
} else { |
|
state = RELATIVE; |
|
continue; |
|
} break; |
|
|
|
case PATH_OR_AUTHORITY: |
|
if (char == '/') { |
|
state = AUTHORITY; |
|
break; |
|
} else { |
|
state = PATH; |
|
continue; |
|
} |
|
|
|
case RELATIVE: |
|
url.scheme = base.scheme; |
|
if (char == EOF) { |
|
url.username = base.username; |
|
url.password = base.password; |
|
url.host = base.host; |
|
url.port = base.port; |
|
url.path = base.path.slice(); |
|
url.query = base.query; |
|
} else if (char == '/' || (char == '\\' && isSpecial(url))) { |
|
state = RELATIVE_SLASH; |
|
} else if (char == '?') { |
|
url.username = base.username; |
|
url.password = base.password; |
|
url.host = base.host; |
|
url.port = base.port; |
|
url.path = base.path.slice(); |
|
url.query = ''; |
|
state = QUERY; |
|
} else if (char == '#') { |
|
url.username = base.username; |
|
url.password = base.password; |
|
url.host = base.host; |
|
url.port = base.port; |
|
url.path = base.path.slice(); |
|
url.query = base.query; |
|
url.fragment = ''; |
|
state = FRAGMENT; |
|
} else { |
|
url.username = base.username; |
|
url.password = base.password; |
|
url.host = base.host; |
|
url.port = base.port; |
|
url.path = base.path.slice(); |
|
url.path.pop(); |
|
state = PATH; |
|
continue; |
|
} break; |
|
|
|
case RELATIVE_SLASH: |
|
if (isSpecial(url) && (char == '/' || char == '\\')) { |
|
state = SPECIAL_AUTHORITY_IGNORE_SLASHES; |
|
} else if (char == '/') { |
|
state = AUTHORITY; |
|
} else { |
|
url.username = base.username; |
|
url.password = base.password; |
|
url.host = base.host; |
|
url.port = base.port; |
|
state = PATH; |
|
continue; |
|
} break; |
|
|
|
case SPECIAL_AUTHORITY_SLASHES: |
|
state = SPECIAL_AUTHORITY_IGNORE_SLASHES; |
|
if (char != '/' || buffer.charAt(pointer + 1) != '/') continue; |
|
pointer++; |
|
break; |
|
|
|
case SPECIAL_AUTHORITY_IGNORE_SLASHES: |
|
if (char != '/' && char != '\\') { |
|
state = AUTHORITY; |
|
continue; |
|
} break; |
|
|
|
case AUTHORITY: |
|
if (char == '@') { |
|
if (seenAt) buffer = '%40' + buffer; |
|
seenAt = true; |
|
bufferCodePoints = arrayFrom(buffer); |
|
for (var i = 0; i < bufferCodePoints.length; i++) { |
|
var codePoint = bufferCodePoints[i]; |
|
if (codePoint == ':' && !seenPasswordToken) { |
|
seenPasswordToken = true; |
|
continue; |
|
} |
|
var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet); |
|
if (seenPasswordToken) url.password += encodedCodePoints; |
|
else url.username += encodedCodePoints; |
|
} |
|
buffer = ''; |
|
} else if ( |
|
char == EOF || char == '/' || char == '?' || char == '#' || |
|
(char == '\\' && isSpecial(url)) |
|
) { |
|
if (seenAt && buffer == '') return INVALID_AUTHORITY; |
|
pointer -= arrayFrom(buffer).length + 1; |
|
buffer = ''; |
|
state = HOST; |
|
} else buffer += char; |
|
break; |
|
|
|
case HOST: |
|
case HOSTNAME: |
|
if (stateOverride && url.scheme == 'file') { |
|
state = FILE_HOST; |
|
continue; |
|
} else if (char == ':' && !seenBracket) { |
|
if (buffer == '') return INVALID_HOST; |
|
failure = parseHost(url, buffer); |
|
if (failure) return failure; |
|
buffer = ''; |
|
state = PORT; |
|
if (stateOverride == HOSTNAME) return; |
|
} else if ( |
|
char == EOF || char == '/' || char == '?' || char == '#' || |
|
(char == '\\' && isSpecial(url)) |
|
) { |
|
if (isSpecial(url) && buffer == '') return INVALID_HOST; |
|
if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return; |
|
failure = parseHost(url, buffer); |
|
if (failure) return failure; |
|
buffer = ''; |
|
state = PATH_START; |
|
if (stateOverride) return; |
|
continue; |
|
} else { |
|
if (char == '[') seenBracket = true; |
|
else if (char == ']') seenBracket = false; |
|
buffer += char; |
|
} break; |
|
|
|
case PORT: |
|
if (DIGIT.test(char)) { |
|
buffer += char; |
|
} else if ( |
|
char == EOF || char == '/' || char == '?' || char == '#' || |
|
(char == '\\' && isSpecial(url)) || |
|
stateOverride |
|
) { |
|
if (buffer != '') { |
|
var port = parseInt(buffer, 10); |
|
if (port > 0xFFFF) return INVALID_PORT; |
|
url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port; |
|
buffer = ''; |
|
} |
|
if (stateOverride) return; |
|
state = PATH_START; |
|
continue; |
|
} else return INVALID_PORT; |
|
break; |
|
|
|
case FILE: |
|
url.scheme = 'file'; |
|
if (char == '/' || char == '\\') state = FILE_SLASH; |
|
else if (base && base.scheme == 'file') { |
|
if (char == EOF) { |
|
url.host = base.host; |
|
url.path = base.path.slice(); |
|
url.query = base.query; |
|
} else if (char == '?') { |
|
url.host = base.host; |
|
url.path = base.path.slice(); |
|
url.query = ''; |
|
state = QUERY; |
|
} else if (char == '#') { |
|
url.host = base.host; |
|
url.path = base.path.slice(); |
|
url.query = base.query; |
|
url.fragment = ''; |
|
state = FRAGMENT; |
|
} else { |
|
if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) { |
|
url.host = base.host; |
|
url.path = base.path.slice(); |
|
shortenURLsPath(url); |
|
} |
|
state = PATH; |
|
continue; |
|
} |
|
} else { |
|
state = PATH; |
|
continue; |
|
} break; |
|
|
|
case FILE_SLASH: |
|
if (char == '/' || char == '\\') { |
|
state = FILE_HOST; |
|
break; |
|
} |
|
if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) { |
|
if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]); |
|
else url.host = base.host; |
|
} |
|
state = PATH; |
|
continue; |
|
|
|
case FILE_HOST: |
|
if (char == EOF || char == '/' || char == '\\' || char == '?' || char == '#') { |
|
if (!stateOverride && isWindowsDriveLetter(buffer)) { |
|
state = PATH; |
|
} else if (buffer == '') { |
|
url.host = ''; |
|
if (stateOverride) return; |
|
state = PATH_START; |
|
} else { |
|
failure = parseHost(url, buffer); |
|
if (failure) return failure; |
|
if (url.host == 'localhost') url.host = ''; |
|
if (stateOverride) return; |
|
buffer = ''; |
|
state = PATH_START; |
|
} continue; |
|
} else buffer += char; |
|
break; |
|
|
|
case PATH_START: |
|
if (isSpecial(url)) { |
|
state = PATH; |
|
if (char != '/' && char != '\\') continue; |
|
} else if (!stateOverride && char == '?') { |
|
url.query = ''; |
|
state = QUERY; |
|
} else if (!stateOverride && char == '#') { |
|
url.fragment = ''; |
|
state = FRAGMENT; |
|
} else if (char != EOF) { |
|
state = PATH; |
|
if (char != '/') continue; |
|
} break; |
|
|
|
case PATH: |
|
if ( |
|
char == EOF || char == '/' || |
|
(char == '\\' && isSpecial(url)) || |
|
(!stateOverride && (char == '?' || char == '#')) |
|
) { |
|
if (isDoubleDot(buffer)) { |
|
shortenURLsPath(url); |
|
if (char != '/' && !(char == '\\' && isSpecial(url))) { |
|
url.path.push(''); |
|
} |
|
} else if (isSingleDot(buffer)) { |
|
if (char != '/' && !(char == '\\' && isSpecial(url))) { |
|
url.path.push(''); |
|
} |
|
} else { |
|
if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) { |
|
if (url.host) url.host = ''; |
|
buffer = buffer.charAt(0) + ':'; |
|
} |
|
url.path.push(buffer); |
|
} |
|
buffer = ''; |
|
if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) { |
|
while (url.path.length > 1 && url.path[0] === '') { |
|
url.path.shift(); |
|
} |
|
} |
|
if (char == '?') { |
|
url.query = ''; |
|
state = QUERY; |
|
} else if (char == '#') { |
|
url.fragment = ''; |
|
state = FRAGMENT; |
|
} |
|
} else { |
|
buffer += percentEncode(char, pathPercentEncodeSet); |
|
} break; |
|
|
|
case CANNOT_BE_A_BASE_URL_PATH: |
|
if (char == '?') { |
|
url.query = ''; |
|
state = QUERY; |
|
} else if (char == '#') { |
|
url.fragment = ''; |
|
state = FRAGMENT; |
|
} else if (char != EOF) { |
|
url.path[0] += percentEncode(char, C0ControlPercentEncodeSet); |
|
} break; |
|
|
|
case QUERY: |
|
if (!stateOverride && char == '#') { |
|
url.fragment = ''; |
|
state = FRAGMENT; |
|
} else if (char != EOF) { |
|
if (char == "'" && isSpecial(url)) url.query += '%27'; |
|
else if (char == '#') url.query += '%23'; |
|
else url.query += percentEncode(char, C0ControlPercentEncodeSet); |
|
} break; |
|
|
|
case FRAGMENT: |
|
if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet); |
|
break; |
|
} |
|
|
|
pointer++; |
|
} |
|
}; |
|
|
|
|
|
|
|
var URLConstructor = function URL(url ) { |
|
var that = anInstance(this, URLConstructor, 'URL'); |
|
var base = arguments.length > 1 ? arguments[1] : undefined; |
|
var urlString = String(url); |
|
var state = setInternalState(that, { type: 'URL' }); |
|
var baseState, failure; |
|
if (base !== undefined) { |
|
if (base instanceof URLConstructor) baseState = getInternalURLState(base); |
|
else { |
|
failure = parseURL(baseState = {}, String(base)); |
|
if (failure) throw TypeError(failure); |
|
} |
|
} |
|
failure = parseURL(state, urlString, null, baseState); |
|
if (failure) throw TypeError(failure); |
|
var searchParams = state.searchParams = new URLSearchParams(); |
|
var searchParamsState = getInternalSearchParamsState(searchParams); |
|
searchParamsState.updateSearchParams(state.query); |
|
searchParamsState.updateURL = function () { |
|
state.query = String(searchParams) || null; |
|
}; |
|
if (!DESCRIPTORS) { |
|
that.href = serializeURL.call(that); |
|
that.origin = getOrigin.call(that); |
|
that.protocol = getProtocol.call(that); |
|
that.username = getUsername.call(that); |
|
that.password = getPassword.call(that); |
|
that.host = getHost.call(that); |
|
that.hostname = getHostname.call(that); |
|
that.port = getPort.call(that); |
|
that.pathname = getPathname.call(that); |
|
that.search = getSearch.call(that); |
|
that.searchParams = getSearchParams.call(that); |
|
that.hash = getHash.call(that); |
|
} |
|
}; |
|
|
|
var URLPrototype = URLConstructor.prototype; |
|
|
|
var serializeURL = function () { |
|
var url = getInternalURLState(this); |
|
var scheme = url.scheme; |
|
var username = url.username; |
|
var password = url.password; |
|
var host = url.host; |
|
var port = url.port; |
|
var path = url.path; |
|
var query = url.query; |
|
var fragment = url.fragment; |
|
var output = scheme + ':'; |
|
if (host !== null) { |
|
output += '//'; |
|
if (includesCredentials(url)) { |
|
output += username + (password ? ':' + password : '') + '@'; |
|
} |
|
output += serializeHost(host); |
|
if (port !== null) output += ':' + port; |
|
} else if (scheme == 'file') output += '//'; |
|
output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : ''; |
|
if (query !== null) output += '?' + query; |
|
if (fragment !== null) output += '#' + fragment; |
|
return output; |
|
}; |
|
|
|
var getOrigin = function () { |
|
var url = getInternalURLState(this); |
|
var scheme = url.scheme; |
|
var port = url.port; |
|
if (scheme == 'blob') try { |
|
return new URL(scheme.path[0]).origin; |
|
} catch (error) { |
|
return 'null'; |
|
} |
|
if (scheme == 'file' || !isSpecial(url)) return 'null'; |
|
return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : ''); |
|
}; |
|
|
|
var getProtocol = function () { |
|
return getInternalURLState(this).scheme + ':'; |
|
}; |
|
|
|
var getUsername = function () { |
|
return getInternalURLState(this).username; |
|
}; |
|
|
|
var getPassword = function () { |
|
return getInternalURLState(this).password; |
|
}; |
|
|
|
var getHost = function () { |
|
var url = getInternalURLState(this); |
|
var host = url.host; |
|
var port = url.port; |
|
return host === null ? '' |
|
: port === null ? serializeHost(host) |
|
: serializeHost(host) + ':' + port; |
|
}; |
|
|
|
var getHostname = function () { |
|
var host = getInternalURLState(this).host; |
|
return host === null ? '' : serializeHost(host); |
|
}; |
|
|
|
var getPort = function () { |
|
var port = getInternalURLState(this).port; |
|
return port === null ? '' : String(port); |
|
}; |
|
|
|
var getPathname = function () { |
|
var url = getInternalURLState(this); |
|
var path = url.path; |
|
return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : ''; |
|
}; |
|
|
|
var getSearch = function () { |
|
var query = getInternalURLState(this).query; |
|
return query ? '?' + query : ''; |
|
}; |
|
|
|
var getSearchParams = function () { |
|
return getInternalURLState(this).searchParams; |
|
}; |
|
|
|
var getHash = function () { |
|
var fragment = getInternalURLState(this).fragment; |
|
return fragment ? '#' + fragment : ''; |
|
}; |
|
|
|
var accessorDescriptor = function (getter, setter) { |
|
return { get: getter, set: setter, configurable: true, enumerable: true }; |
|
}; |
|
|
|
if (DESCRIPTORS) { |
|
defineProperties(URLPrototype, { |
|
|
|
|
|
href: accessorDescriptor(serializeURL, function (href) { |
|
var url = getInternalURLState(this); |
|
var urlString = String(href); |
|
var failure = parseURL(url, urlString); |
|
if (failure) throw TypeError(failure); |
|
getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query); |
|
}), |
|
|
|
|
|
origin: accessorDescriptor(getOrigin), |
|
|
|
|
|
protocol: accessorDescriptor(getProtocol, function (protocol) { |
|
var url = getInternalURLState(this); |
|
parseURL(url, String(protocol) + ':', SCHEME_START); |
|
}), |
|
|
|
|
|
username: accessorDescriptor(getUsername, function (username) { |
|
var url = getInternalURLState(this); |
|
var codePoints = arrayFrom(String(username)); |
|
if (cannotHaveUsernamePasswordPort(url)) return; |
|
url.username = ''; |
|
for (var i = 0; i < codePoints.length; i++) { |
|
url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet); |
|
} |
|
}), |
|
|
|
|
|
password: accessorDescriptor(getPassword, function (password) { |
|
var url = getInternalURLState(this); |
|
var codePoints = arrayFrom(String(password)); |
|
if (cannotHaveUsernamePasswordPort(url)) return; |
|
url.password = ''; |
|
for (var i = 0; i < codePoints.length; i++) { |
|
url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet); |
|
} |
|
}), |
|
|
|
|
|
host: accessorDescriptor(getHost, function (host) { |
|
var url = getInternalURLState(this); |
|
if (url.cannotBeABaseURL) return; |
|
parseURL(url, String(host), HOST); |
|
}), |
|
|
|
|
|
hostname: accessorDescriptor(getHostname, function (hostname) { |
|
var url = getInternalURLState(this); |
|
if (url.cannotBeABaseURL) return; |
|
parseURL(url, String(hostname), HOSTNAME); |
|
}), |
|
|
|
|
|
port: accessorDescriptor(getPort, function (port) { |
|
var url = getInternalURLState(this); |
|
if (cannotHaveUsernamePasswordPort(url)) return; |
|
port = String(port); |
|
if (port == '') url.port = null; |
|
else parseURL(url, port, PORT); |
|
}), |
|
|
|
|
|
pathname: accessorDescriptor(getPathname, function (pathname) { |
|
var url = getInternalURLState(this); |
|
if (url.cannotBeABaseURL) return; |
|
url.path = []; |
|
parseURL(url, pathname + '', PATH_START); |
|
}), |
|
|
|
|
|
search: accessorDescriptor(getSearch, function (search) { |
|
var url = getInternalURLState(this); |
|
search = String(search); |
|
if (search == '') { |
|
url.query = null; |
|
} else { |
|
if ('?' == search.charAt(0)) search = search.slice(1); |
|
url.query = ''; |
|
parseURL(url, search, QUERY); |
|
} |
|
getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query); |
|
}), |
|
|
|
|
|
searchParams: accessorDescriptor(getSearchParams), |
|
|
|
|
|
hash: accessorDescriptor(getHash, function (hash) { |
|
var url = getInternalURLState(this); |
|
hash = String(hash); |
|
if (hash == '') { |
|
url.fragment = null; |
|
return; |
|
} |
|
if ('#' == hash.charAt(0)) hash = hash.slice(1); |
|
url.fragment = ''; |
|
parseURL(url, hash, FRAGMENT); |
|
}) |
|
}); |
|
} |
|
|
|
|
|
|
|
redefine(URLPrototype, 'toJSON', function toJSON() { |
|
return serializeURL.call(this); |
|
}, { enumerable: true }); |
|
|
|
|
|
|
|
redefine(URLPrototype, 'toString', function toString() { |
|
return serializeURL.call(this); |
|
}, { enumerable: true }); |
|
|
|
if (NativeURL) { |
|
var nativeCreateObjectURL = NativeURL.createObjectURL; |
|
var nativeRevokeObjectURL = NativeURL.revokeObjectURL; |
|
|
|
|
|
|
|
if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) { |
|
return nativeCreateObjectURL.apply(NativeURL, arguments); |
|
}); |
|
|
|
|
|
|
|
if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) { |
|
return nativeRevokeObjectURL.apply(NativeURL, arguments); |
|
}); |
|
} |
|
|
|
setToStringTag(URLConstructor, 'URL'); |
|
|
|
$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, { |
|
URL: URLConstructor |
|
}); |
|
|
|
},{"../internals/an-instance":4,"../internals/array-from":6,"../internals/descriptors":18,"../internals/export":21,"../internals/global":27,"../internals/has":28,"../internals/internal-state":34,"../internals/native-url":42,"../internals/object-assign":44,"../internals/object-define-properties":46,"../internals/redefine":59,"../internals/set-to-string-tag":62,"../internals/string-multibyte":66,"../internals/string-punycode-to-ascii":67,"../modules/es.string.iterator":79,"../modules/web.url-search-params":80}],82:[function(require,module,exports){ |
|
'use strict'; |
|
var $ = require('../internals/export'); |
|
|
|
|
|
|
|
$({ target: 'URL', proto: true, enumerable: true }, { |
|
toJSON: function toJSON() { |
|
return URL.prototype.toString.call(this); |
|
} |
|
}); |
|
|
|
},{"../internals/export":21}],83:[function(require,module,exports){ |
|
require('../modules/web.url'); |
|
require('../modules/web.url.to-json'); |
|
require('../modules/web.url-search-params'); |
|
var path = require('../internals/path'); |
|
|
|
module.exports = path.URL; |
|
|
|
},{"../internals/path":57,"../modules/web.url":81,"../modules/web.url-search-params":80,"../modules/web.url.to-json":82}]},{},[83]); |
|
|