vendor: 187,833 bytes, lines 1-6015
1(function webpackUniversalModuleDefinition(root, factory) { 2 if(typeof exports === 'object' && typeof module === 'object') 3 module.exports = factory(); 4 else if(typeof define === 'function' && define.amd) 5 define([], factory); 6 else { 7 var a = factory(); 8 for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; 9 } 10})(self, function() { 11return /******/ (function() { // webpackBootstrap 12/******/ var __webpack_modules__ = ({ 13 14/***/ 3099: 15/***/ (function(module) { 16 17module.exports = function (it) { 18 if (typeof it != 'function') { 19 throw TypeError(String(it) + ' is not a function'); 20 } return it; 21}; 22 23 24/***/ }), 25 26/***/ 6077: 27/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 28 29var isObject = __webpack_require__(111); 30 31module.exports = function (it) { 32 if (!isObject(it) && it !== null) { 33 throw TypeError("Can't set " + String(it) + ' as a prototype'); 34 } return it; 35}; 36 37 38/***/ }), 39 40/***/ 1223: 41/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 42 43var wellKnownSymbol = __webpack_require__(5112); 44var create = __webpack_require__(30); 45var definePropertyModule = __webpack_require__(3070); 46 47var UNSCOPABLES = wellKnownSymbol('unscopables'); 48var ArrayPrototype = Array.prototype; 49 50// Array.prototype[@@unscopables] 51// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables 52if (ArrayPrototype[UNSCOPABLES] == undefined) { 53 definePropertyModule.f(ArrayPrototype, UNSCOPABLES, { 54 configurable: true, 55 value: create(null) 56 }); 57} 58 59// add a key to Array.prototype[@@unscopables] 60module.exports = function (key) { 61 ArrayPrototype[UNSCOPABLES][key] = true; 62}; 63 64 65/***/ }), 66 67/***/ 1530: 68/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 69 70"use strict"; 71 72var charAt = __webpack_require__(8710).charAt; 73 74// `AdvanceStringIndex` abstract operation 75// https://tc39.es/ecma262/#sec-advancestringindex 76module.exports = function (S, index, unicode) { 77 return index + (unicode ? charAt(S, index).length : 1); 78}; 79 80 81/***/ }), 82 83/***/ 5787: 84/***/ (function(module) { 85 86module.exports = function (it, Constructor, name) { 87 if (!(it instanceof Constructor)) { 88 throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation'); 89 } return it; 90}; 91 92 93/***/ }), 94 95/***/ 9670: 96/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 97 98var isObject = __webpack_require__(111); 99 100module.exports = function (it) { 101 if (!isObject(it)) { 102 throw TypeError(String(it) + ' is not an object'); 103 } return it; 104}; 105 106 107/***/ }), 108 109/***/ 4019: 110/***/ (function(module) { 111 112module.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined'; 113 114 115/***/ }), 116 117/***/ 260: 118/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 119 120"use strict"; 121 122var NATIVE_ARRAY_BUFFER = __webpack_require__(4019); 123var DESCRIPTORS = __webpack_require__(9781); 124var global = __webpack_require__(7854); 125var isObject = __webpack_require__(111); 126var has = __webpack_require__(6656); 127var classof = __webpack_require__(648); 128var createNonEnumerableProperty = __webpack_require__(8880); 129var redefine = __webpack_require__(1320); 130var defineProperty = __webpack_require__(3070).f; 131var getPrototypeOf = __webpack_require__(9518); 132var setPrototypeOf = __webpack_require__(7674); 133var wellKnownSymbol = __webpack_require__(5112); 134var uid = __webpack_require__(9711); 135 136var Int8Array = global.Int8Array; 137var Int8ArrayPrototype = Int8Array && Int8Array.prototype; 138var Uint8ClampedArray = global.Uint8ClampedArray; 139var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype; 140var TypedArray = Int8Array && getPrototypeOf(Int8Array); 141var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype); 142var ObjectPrototype = Object.prototype; 143var isPrototypeOf = ObjectPrototype.isPrototypeOf; 144 145var TO_STRING_TAG = wellKnownSymbol('toStringTag'); 146var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG'); 147// Fixing native typed arrays in Opera Presto crashes the browser, see #595 148var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera'; 149var TYPED_ARRAY_TAG_REQIRED = false; 150var NAME; 151 152var TypedArrayConstructorsList = { 153 Int8Array: 1, 154 Uint8Array: 1, 155 Uint8ClampedArray: 1, 156 Int16Array: 2, 157 Uint16Array: 2, 158 Int32Array: 4, 159 Uint32Array: 4, 160 Float32Array: 4, 161 Float64Array: 8 162}; 163 164var BigIntArrayConstructorsList = { 165 BigInt64Array: 8, 166 BigUint64Array: 8 167}; 168 169var isView = function isView(it) { 170 if (!isObject(it)) return false; 171 var klass = classof(it); 172 return klass === 'DataView' 173 || has(TypedArrayConstructorsList, klass) 174 || has(BigIntArrayConstructorsList, klass); 175}; 176 177var isTypedArray = function (it) { 178 if (!isObject(it)) return false; 179 var klass = classof(it); 180 return has(TypedArrayConstructorsList, klass) 181 || has(BigIntArrayConstructorsList, klass); 182}; 183 184var aTypedArray = function (it) { 185 if (isTypedArray(it)) return it; 186 throw TypeError('Target is not a typed array'); 187}; 188 189var aTypedArrayConstructor = function (C) { 190 if (setPrototypeOf) { 191 if (isPrototypeOf.call(TypedArray, C)) return C; 192 } else for (var ARRAY in TypedArrayConstructorsList) if (has(TypedArrayConstructorsList, NAME)) { 193 var TypedArrayConstructor = global[ARRAY]; 194 if (TypedArrayConstructor && (C === TypedArrayConstructor || isPrototypeOf.call(TypedArrayConstructor, C))) { 195 return C; 196 } 197 } throw TypeError('Target is not a typed array constructor'); 198}; 199 200var exportTypedArrayMethod = function (KEY, property, forced) { 201 if (!DESCRIPTORS) return; 202 if (forced) for (var ARRAY in TypedArrayConstructorsList) { 203 var TypedArrayConstructor = global[ARRAY]; 204 if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) { 205 delete TypedArrayConstructor.prototype[KEY]; 206 } 207 } 208 if (!TypedArrayPrototype[KEY] || forced) { 209 redefine(TypedArrayPrototype, KEY, forced ? property 210 : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property); 211 } 212}; 213 214var exportTypedArrayStaticMethod = function (KEY, property, forced) { 215 var ARRAY, TypedArrayConstructor; 216 if (!DESCRIPTORS) return; 217 if (setPrototypeOf) { 218 if (forced) for (ARRAY in TypedArrayConstructorsList) { 219 TypedArrayConstructor = global[ARRAY]; 220 if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) { 221 delete TypedArrayConstructor[KEY]; 222 } 223 } 224 if (!TypedArray[KEY] || forced) { 225 // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable 226 try { 227 return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8Array[KEY] || property); 228 } catch (error) { /* empty */ } 229 } else return; 230 } 231 for (ARRAY in TypedArrayConstructorsList) { 232 TypedArrayConstructor = global[ARRAY]; 233 if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) { 234 redefine(TypedArrayConstructor, KEY, property); 235 } 236 } 237}; 238 239for (NAME in TypedArrayConstructorsList) { 240 if (!global[NAME]) NATIVE_ARRAY_BUFFER_VIEWS = false; 241} 242 243// WebKit bug - typed arrays constructors prototype is Object.prototype 244if (!NATIVE_ARRAY_BUFFER_VIEWS || typeof TypedArray != 'function' || TypedArray === Function.prototype) { 245 // eslint-disable-next-line no-shadow -- safe 246 TypedArray = function TypedArray() { 247 throw TypeError('Incorrect invocation'); 248 }; 249 if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) { 250 if (global[NAME]) setPrototypeOf(global[NAME], TypedArray); 251 } 252} 253 254if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) { 255 TypedArrayPrototype = TypedArray.prototype; 256 if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) { 257 if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype); 258 } 259} 260 261// WebKit bug - one more object in Uint8ClampedArray prototype chain 262if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) { 263 setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype); 264} 265 266if (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) { 267 TYPED_ARRAY_TAG_REQIRED = true; 268 defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () { 269 return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined; 270 } }); 271 for (NAME in TypedArrayConstructorsList) if (global[NAME]) { 272 createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME); 273 } 274} 275 276module.exports = { 277 NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS, 278 TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG, 279 aTypedArray: aTypedArray, 280 aTypedArrayConstructor: aTypedArrayConstructor, 281 exportTypedArrayMethod: exportTypedArrayMethod, 282 exportTypedArrayStaticMethod: exportTypedArrayStaticMethod, 283 isView: isView, 284 isTypedArray: isTypedArray, 285 TypedArray: TypedArray, 286 TypedArrayPrototype: TypedArrayPrototype 287}; 288 289 290/***/ }), 291 292/***/ 3331: 293/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 294 295"use strict"; 296 297var global = __webpack_require__(7854); 298var DESCRIPTORS = __webpack_require__(9781); 299var NATIVE_ARRAY_BUFFER = __webpack_require__(4019); 300var createNonEnumerableProperty = __webpack_require__(8880); 301var redefineAll = __webpack_require__(2248); 302var fails = __webpack_require__(7293); 303var anInstance = __webpack_require__(5787); 304var toInteger = __webpack_require__(9958); 305var toLength = __webpack_require__(7466); 306var toIndex = __webpack_require__(7067); 307var IEEE754 = __webpack_require__(1179); 308var getPrototypeOf = __webpack_require__(9518); 309var setPrototypeOf = __webpack_require__(7674); 310var getOwnPropertyNames = __webpack_require__(8006).f; 311var defineProperty = __webpack_require__(3070).f; 312var arrayFill = __webpack_require__(1285); 313var setToStringTag = __webpack_require__(8003); 314var InternalStateModule = __webpack_require__(9909); 315 316var getInternalState = InternalStateModule.get; 317var setInternalState = InternalStateModule.set; 318var ARRAY_BUFFER = 'ArrayBuffer'; 319var DATA_VIEW = 'DataView'; 320var PROTOTYPE = 'prototype'; 321var WRONG_LENGTH = 'Wrong length'; 322var WRONG_INDEX = 'Wrong index'; 323var NativeArrayBuffer = global[ARRAY_BUFFER]; 324var $ArrayBuffer = NativeArrayBuffer; 325var $DataView = global[DATA_VIEW]; 326var $DataViewPrototype = $DataView && $DataView[PROTOTYPE]; 327var ObjectPrototype = Object.prototype; 328var RangeError = global.RangeError; 329 330var packIEEE754 = IEEE754.pack; 331var unpackIEEE754 = IEEE754.unpack; 332 333var packInt8 = function (number) { 334 return [number & 0xFF]; 335}; 336 337var packInt16 = function (number) { 338 return [number & 0xFF, number >> 8 & 0xFF]; 339}; 340 341var packInt32 = function (number) { 342 return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF]; 343}; 344 345var unpackInt32 = function (buffer) { 346 return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0]; 347}; 348 349var packFloat32 = function (number) { 350 return packIEEE754(number, 23, 4); 351}; 352 353var packFloat64 = function (number) { 354 return packIEEE754(number, 52, 8); 355}; 356 357var addGetter = function (Constructor, key) { 358 defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } }); 359}; 360 361var get = function (view, count, index, isLittleEndian) { 362 var intIndex = toIndex(index); 363 var store = getInternalState(view); 364 if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX); 365 var bytes = getInternalState(store.buffer).bytes; 366 var start = intIndex + store.byteOffset; 367 var pack = bytes.slice(start, start + count); 368 return isLittleEndian ? pack : pack.reverse(); 369}; 370 371var set = function (view, count, index, conversion, value, isLittleEndian) { 372 var intIndex = toIndex(index); 373 var store = getInternalState(view); 374 if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX); 375 var bytes = getInternalState(store.buffer).bytes; 376 var start = intIndex + store.byteOffset; 377 var pack = conversion(+value); 378 for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1]; 379}; 380 381if (!NATIVE_ARRAY_BUFFER) { 382 $ArrayBuffer = function ArrayBuffer(length) { 383 anInstance(this, $ArrayBuffer, ARRAY_BUFFER); 384 var byteLength = toIndex(length); 385 setInternalState(this, { 386 bytes: arrayFill.call(new Array(byteLength), 0), 387 byteLength: byteLength 388 }); 389 if (!DESCRIPTORS) this.byteLength = byteLength; 390 }; 391 392 $DataView = function DataView(buffer, byteOffset, byteLength) { 393 anInstance(this, $DataView, DATA_VIEW); 394 anInstance(buffer, $ArrayBuffer, DATA_VIEW); 395 var bufferLength = getInternalState(buffer).byteLength; 396 var offset = toInteger(byteOffset); 397 if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset'); 398 byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); 399 if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); 400 setInternalState(this, { 401 buffer: buffer, 402 byteLength: byteLength, 403 byteOffset: offset 404 }); 405 if (!DESCRIPTORS) { 406 this.buffer = buffer; 407 this.byteLength = byteLength; 408 this.byteOffset = offset; 409 } 410 }; 411 412 if (DESCRIPTORS) { 413 addGetter($ArrayBuffer, 'byteLength'); 414 addGetter($DataView, 'buffer'); 415 addGetter($DataView, 'byteLength'); 416 addGetter($DataView, 'byteOffset'); 417 } 418 419 redefineAll($DataView[PROTOTYPE], { 420 getInt8: function getInt8(byteOffset) { 421 return get(this, 1, byteOffset)[0] << 24 >> 24; 422 }, 423 getUint8: function getUint8(byteOffset) { 424 return get(this, 1, byteOffset)[0]; 425 }, 426 getInt16: function getInt16(byteOffset /* , littleEndian */) { 427 var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined); 428 return (bytes[1] << 8 | bytes[0]) << 16 >> 16; 429 }, 430 getUint16: function getUint16(byteOffset /* , littleEndian */) { 431 var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined); 432 return bytes[1] << 8 | bytes[0]; 433 }, 434 getInt32: function getInt32(byteOffset /* , littleEndian */) { 435 return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)); 436 }, 437 getUint32: function getUint32(byteOffset /* , littleEndian */) { 438 return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0; 439 }, 440 getFloat32: function getFloat32(byteOffset /* , littleEndian */) { 441 return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23); 442 }, 443 getFloat64: function getFloat64(byteOffset /* , littleEndian */) { 444 return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52); 445 }, 446 setInt8: function setInt8(byteOffset, value) { 447 set(this, 1, byteOffset, packInt8, value); 448 }, 449 setUint8: function setUint8(byteOffset, value) { 450 set(this, 1, byteOffset, packInt8, value); 451 }, 452 setInt16: function setInt16(byteOffset, value /* , littleEndian */) { 453 set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined); 454 }, 455 setUint16: function setUint16(byteOffset, value /* , littleEndian */) { 456 set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined); 457 }, 458 setInt32: function setInt32(byteOffset, value /* , littleEndian */) { 459 set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined); 460 }, 461 setUint32: function setUint32(byteOffset, value /* , littleEndian */) { 462 set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined); 463 }, 464 setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { 465 set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined); 466 }, 467 setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { 468 set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined); 469 } 470 }); 471} else { 472 /* eslint-disable no-new -- required for testing */ 473 if (!fails(function () { 474 NativeArrayBuffer(1); 475 }) || !fails(function () { 476 new NativeArrayBuffer(-1); 477 }) || fails(function () { 478 new NativeArrayBuffer(); 479 new NativeArrayBuffer(1.5); 480 new NativeArrayBuffer(NaN); 481 return NativeArrayBuffer.name != ARRAY_BUFFER; 482 })) { 483 /* eslint-enable no-new -- required for testing */ 484 $ArrayBuffer = function ArrayBuffer(length) { 485 anInstance(this, $ArrayBuffer); 486 return new NativeArrayBuffer(toIndex(length)); 487 }; 488 var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE]; 489 for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) { 490 if (!((key = keys[j++]) in $ArrayBuffer)) { 491 createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]); 492 } 493 } 494 ArrayBufferPrototype.constructor = $ArrayBuffer; 495 } 496 497 // WebKit bug - the same parent prototype for typed arrays and data view 498 if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) { 499 setPrototypeOf($DataViewPrototype, ObjectPrototype); 500 } 501 502 // iOS Safari 7.x bug 503 var testView = new $DataView(new $ArrayBuffer(2)); 504 var nativeSetInt8 = $DataViewPrototype.setInt8; 505 testView.setInt8(0, 2147483648); 506 testView.setInt8(1, 2147483649); 507 if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, { 508 setInt8: function setInt8(byteOffset, value) { 509 nativeSetInt8.call(this, byteOffset, value << 24 >> 24); 510 }, 511 setUint8: function setUint8(byteOffset, value) { 512 nativeSetInt8.call(this, byteOffset, value << 24 >> 24); 513 } 514 }, { unsafe: true }); 515} 516 517setToStringTag($ArrayBuffer, ARRAY_BUFFER); 518setToStringTag($DataView, DATA_VIEW); 519 520module.exports = { 521 ArrayBuffer: $ArrayBuffer, 522 DataView: $DataView 523}; 524 525 526/***/ }), 527 528/***/ 1048: 529/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 530 531"use strict"; 532 533var toObject = __webpack_require__(7908); 534var toAbsoluteIndex = __webpack_require__(1400); 535var toLength = __webpack_require__(7466); 536 537var min = Math.min; 538 539// `Array.prototype.copyWithin` method implementation 540// https://tc39.es/ecma262/#sec-array.prototype.copywithin 541module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { 542 var O = toObject(this); 543 var len = toLength(O.length); 544 var to = toAbsoluteIndex(target, len); 545 var from = toAbsoluteIndex(start, len); 546 var end = arguments.length > 2 ? arguments[2] : undefined; 547 var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); 548 var inc = 1; 549 if (from < to && to < from + count) { 550 inc = -1; 551 from += count - 1; 552 to += count - 1; 553 } 554 while (count-- > 0) { 555 if (from in O) O[to] = O[from]; 556 else delete O[to]; 557 to += inc; 558 from += inc; 559 } return O; 560}; 561 562 563/***/ }), 564 565/***/ 1285: 566/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 567 568"use strict"; 569 570var toObject = __webpack_require__(7908); 571var toAbsoluteIndex = __webpack_require__(1400); 572var toLength = __webpack_require__(7466); 573 574// `Array.prototype.fill` method implementation 575// https://tc39.es/ecma262/#sec-array.prototype.fill 576module.exports = function fill(value /* , start = 0, end = @length */) { 577 var O = toObject(this); 578 var length = toLength(O.length); 579 var argumentsLength = arguments.length; 580 var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length); 581 var end = argumentsLength > 2 ? arguments[2] : undefined; 582 var endPos = end === undefined ? length : toAbsoluteIndex(end, length); 583 while (endPos > index) O[index++] = value; 584 return O; 585}; 586 587 588/***/ }), 589 590/***/ 8533: 591/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 592 593"use strict"; 594 595var $forEach = __webpack_require__(2092).forEach; 596var arrayMethodIsStrict = __webpack_require__(9341); 597 598var STRICT_METHOD = arrayMethodIsStrict('forEach'); 599 600// `Array.prototype.forEach` method implementation 601// https://tc39.es/ecma262/#sec-array.prototype.foreach 602module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) { 603 return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); 604} : [].forEach; 605 606 607/***/ }), 608 609/***/ 8457: 610/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 611 612"use strict"; 613 614var bind = __webpack_require__(9974); 615var toObject = __webpack_require__(7908); 616var callWithSafeIterationClosing = __webpack_require__(3411); 617var isArrayIteratorMethod = __webpack_require__(7659); 618var toLength = __webpack_require__(7466); 619var createProperty = __webpack_require__(6135); 620var getIteratorMethod = __webpack_require__(1246); 621 622// `Array.from` method implementation 623// https://tc39.es/ecma262/#sec-array.from 624module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { 625 var O = toObject(arrayLike); 626 var C = typeof this == 'function' ? this : Array; 627 var argumentsLength = arguments.length; 628 var mapfn = argumentsLength > 1 ? arguments[1] : undefined; 629 var mapping = mapfn !== undefined; 630 var iteratorMethod = getIteratorMethod(O); 631 var index = 0; 632 var length, result, step, iterator, next, value; 633 if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2); 634 // if the target is not iterable or it's an array with the default iterator - use a simple case 635 if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) { 636 iterator = iteratorMethod.call(O); 637 next = iterator.next; 638 result = new C(); 639 for (;!(step = next.call(iterator)).done; index++) { 640 value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value; 641 createProperty(result, index, value); 642 } 643 } else { 644 length = toLength(O.length); 645 result = new C(length); 646 for (;length > index; index++) { 647 value = mapping ? mapfn(O[index], index) : O[index]; 648 createProperty(result, index, value); 649 } 650 } 651 result.length = index; 652 return result; 653}; 654 655 656/***/ }), 657 658/***/ 1318: 659/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 660 661var toIndexedObject = __webpack_require__(5656); 662var toLength = __webpack_require__(7466); 663var toAbsoluteIndex = __webpack_require__(1400); 664 665// `Array.prototype.{ indexOf, includes }` methods implementation 666var createMethod = function (IS_INCLUDES) { 667 return function ($this, el, fromIndex) { 668 var O = toIndexedObject($this); 669 var length = toLength(O.length); 670 var index = toAbsoluteIndex(fromIndex, length); 671 var value; 672 // Array#includes uses SameValueZero equality algorithm 673 // eslint-disable-next-line no-self-compare -- NaN check 674 if (IS_INCLUDES && el != el) while (length > index) { 675 value = O[index++]; 676 // eslint-disable-next-line no-self-compare -- NaN check 677 if (value != value) return true; 678 // Array#indexOf ignores holes, Array#includes - not 679 } else for (;length > index; index++) { 680 if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; 681 } return !IS_INCLUDES && -1; 682 }; 683}; 684 685module.exports = { 686 // `Array.prototype.includes` method 687 // https://tc39.es/ecma262/#sec-array.prototype.includes 688 includes: createMethod(true), 689 // `Array.prototype.indexOf` method 690 // https://tc39.es/ecma262/#sec-array.prototype.indexof 691 indexOf: createMethod(false) 692}; 693 694 695/***/ }), 696 697/***/ 2092: 698/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 699 700var bind = __webpack_require__(9974); 701var IndexedObject = __webpack_require__(8361); 702var toObject = __webpack_require__(7908); 703var toLength = __webpack_require__(7466); 704var arraySpeciesCreate = __webpack_require__(5417); 705 706var push = [].push; 707 708// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation 709var createMethod = function (TYPE) { 710 var IS_MAP = TYPE == 1; 711 var IS_FILTER = TYPE == 2; 712 var IS_SOME = TYPE == 3; 713 var IS_EVERY = TYPE == 4; 714 var IS_FIND_INDEX = TYPE == 6; 715 var IS_FILTER_OUT = TYPE == 7; 716 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; 717 return function ($this, callbackfn, that, specificCreate) { 718 var O = toObject($this); 719 var self = IndexedObject(O); 720 var boundFunction = bind(callbackfn, that, 3); 721 var length = toLength(self.length); 722 var index = 0; 723 var create = specificCreate || arraySpeciesCreate; 724 var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined; 725 var value, result; 726 for (;length > index; index++) if (NO_HOLES || index in self) { 727 value = self[index]; 728 result = boundFunction(value, index, O); 729 if (TYPE) { 730 if (IS_MAP) target[index] = result; // map 731 else if (result) switch (TYPE) { 732 case 3: return true; // some 733 case 5: return value; // find 734 case 6: return index; // findIndex 735 case 2: push.call(target, value); // filter 736 } else switch (TYPE) { 737 case 4: return false; // every 738 case 7: push.call(target, value); // filterOut 739 } 740 } 741 } 742 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; 743 }; 744}; 745 746module.exports = { 747 // `Array.prototype.forEach` method 748 // https://tc39.es/ecma262/#sec-array.prototype.foreach 749 forEach: createMethod(0), 750 // `Array.prototype.map` method 751 // https://tc39.es/ecma262/#sec-array.prototype.map 752 map: createMethod(1), 753 // `Array.prototype.filter` method 754 // https://tc39.es/ecma262/#sec-array.prototype.filter 755 filter: createMethod(2), 756 // `Array.prototype.some` method 757 // https://tc39.es/ecma262/#sec-array.prototype.some 758 some: createMethod(3), 759 // `Array.prototype.every` method 760 // https://tc39.es/ecma262/#sec-array.prototype.every 761 every: createMethod(4), 762 // `Array.prototype.find` method 763 // https://tc39.es/ecma262/#sec-array.prototype.find 764 find: createMethod(5), 765 // `Array.prototype.findIndex` method 766 // https://tc39.es/ecma262/#sec-array.prototype.findIndex 767 findIndex: createMethod(6), 768 // `Array.prototype.filterOut` method 769 // https://github.com/tc39/proposal-array-filtering 770 filterOut: createMethod(7) 771}; 772 773 774/***/ }), 775 776/***/ 6583: 777/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 778 779"use strict"; 780 781var toIndexedObject = __webpack_require__(5656); 782var toInteger = __webpack_require__(9958); 783var toLength = __webpack_require__(7466); 784var arrayMethodIsStrict = __webpack_require__(9341); 785 786var min = Math.min; 787var nativeLastIndexOf = [].lastIndexOf; 788var NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0; 789var STRICT_METHOD = arrayMethodIsStrict('lastIndexOf'); 790var FORCED = NEGATIVE_ZERO || !STRICT_METHOD; 791 792// `Array.prototype.lastIndexOf` method implementation 793// https://tc39.es/ecma262/#sec-array.prototype.lastindexof 794module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { 795 // convert -0 to +0 796 if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0; 797 var O = toIndexedObject(this); 798 var length = toLength(O.length); 799 var index = length - 1; 800 if (arguments.length > 1) index = min(index, toInteger(arguments[1])); 801 if (index < 0) index = length + index; 802 for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0; 803 return -1; 804} : nativeLastIndexOf; 805 806 807/***/ }), 808 809/***/ 1194: 810/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 811 812var fails = __webpack_require__(7293); 813var wellKnownSymbol = __webpack_require__(5112); 814var V8_VERSION = __webpack_require__(7392); 815 816var SPECIES = wellKnownSymbol('species'); 817 818module.exports = function (METHOD_NAME) { 819 // We can't use this feature detection in V8 since it causes 820 // deoptimization and serious performance degradation 821 // https://github.com/zloirock/core-js/issues/677 822 return V8_VERSION >= 51 || !fails(function () { 823 var array = []; 824 var constructor = array.constructor = {}; 825 constructor[SPECIES] = function () { 826 return { foo: 1 }; 827 }; 828 return array[METHOD_NAME](Boolean).foo !== 1; 829 }); 830}; 831 832 833/***/ }), 834 835/***/ 9341: 836/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 837 838"use strict"; 839 840var fails = __webpack_require__(7293); 841 842module.exports = function (METHOD_NAME, argument) { 843 var method = [][METHOD_NAME]; 844 return !!method && fails(function () { 845 // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing 846 method.call(null, argument || function () { throw 1; }, 1); 847 }); 848}; 849 850 851/***/ }), 852 853/***/ 3671: 854/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 855 856var aFunction = __webpack_require__(3099); 857var toObject = __webpack_require__(7908); 858var IndexedObject = __webpack_require__(8361); 859var toLength = __webpack_require__(7466); 860 861// `Array.prototype.{ reduce, reduceRight }` methods implementation 862var createMethod = function (IS_RIGHT) { 863 return function (that, callbackfn, argumentsLength, memo) { 864 aFunction(callbackfn); 865 var O = toObject(that); 866 var self = IndexedObject(O); 867 var length = toLength(O.length); 868 var index = IS_RIGHT ? length - 1 : 0; 869 var i = IS_RIGHT ? -1 : 1; 870 if (argumentsLength < 2) while (true) { 871 if (index in self) { 872 memo = self[index]; 873 index += i; 874 break; 875 } 876 index += i; 877 if (IS_RIGHT ? index < 0 : length <= index) { 878 throw TypeError('Reduce of empty array with no initial value'); 879 } 880 } 881 for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) { 882 memo = callbackfn(memo, self[index], index, O); 883 } 884 return memo; 885 }; 886}; 887 888module.exports = { 889 // `Array.prototype.reduce` method 890 // https://tc39.es/ecma262/#sec-array.prototype.reduce 891 left: createMethod(false), 892 // `Array.prototype.reduceRight` method 893 // https://tc39.es/ecma262/#sec-array.prototype.reduceright 894 right: createMethod(true) 895}; 896 897 898/***/ }), 899 900/***/ 5417: 901/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 902 903var isObject = __webpack_require__(111); 904var isArray = __webpack_require__(3157); 905var wellKnownSymbol = __webpack_require__(5112); 906 907var SPECIES = wellKnownSymbol('species'); 908 909// `ArraySpeciesCreate` abstract operation 910// https://tc39.es/ecma262/#sec-arrayspeciescreate 911module.exports = function (originalArray, length) { 912 var C; 913 if (isArray(originalArray)) { 914 C = originalArray.constructor; 915 // cross-realm fallback 916 if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; 917 else if (isObject(C)) { 918 C = C[SPECIES]; 919 if (C === null) C = undefined; 920 } 921 } return new (C === undefined ? Array : C)(length === 0 ? 0 : length); 922}; 923 924 925/***/ }), 926 927/***/ 3411: 928/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 929 930var anObject = __webpack_require__(9670); 931var iteratorClose = __webpack_require__(9212); 932 933// call something on iterator step with safe closing on error 934module.exports = function (iterator, fn, value, ENTRIES) { 935 try { 936 return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); 937 // 7.4.6 IteratorClose(iterator, completion) 938 } catch (error) { 939 iteratorClose(iterator); 940 throw error; 941 } 942}; 943 944 945/***/ }), 946 947/***/ 7072: 948/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 949 950var wellKnownSymbol = __webpack_require__(5112); 951 952var ITERATOR = wellKnownSymbol('iterator'); 953var SAFE_CLOSING = false; 954 955try { 956 var called = 0; 957 var iteratorWithReturn = { 958 next: function () { 959 return { done: !!called++ }; 960 }, 961 'return': function () { 962 SAFE_CLOSING = true; 963 } 964 }; 965 iteratorWithReturn[ITERATOR] = function () { 966 return this; 967 }; 968 // eslint-disable-next-line no-throw-literal -- required for testing 969 Array.from(iteratorWithReturn, function () { throw 2; }); 970} catch (error) { /* empty */ } 971 972module.exports = function (exec, SKIP_CLOSING) { 973 if (!SKIP_CLOSING && !SAFE_CLOSING) return false; 974 var ITERATION_SUPPORT = false; 975 try { 976 var object = {}; 977 object[ITERATOR] = function () { 978 return { 979 next: function () { 980 return { done: ITERATION_SUPPORT = true }; 981 } 982 }; 983 }; 984 exec(object); 985 } catch (error) { /* empty */ } 986 return ITERATION_SUPPORT; 987}; 988 989 990/***/ }), 991 992/***/ 4326: 993/***/ (function(module) { 994 995var toString = {}.toString; 996 997module.exports = function (it) { 998 return toString.call(it).slice(8, -1); 999}; 1000 1001 1002/***/ }), 1003 1004/***/ 648: 1005/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1006 1007var TO_STRING_TAG_SUPPORT = __webpack_require__(1694); 1008var classofRaw = __webpack_require__(4326); 1009var wellKnownSymbol = __webpack_require__(5112); 1010 1011var TO_STRING_TAG = wellKnownSymbol('toStringTag'); 1012// ES3 wrong here 1013var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; 1014 1015// fallback for IE11 Script Access Denied error 1016var tryGet = function (it, key) { 1017 try { 1018 return it[key]; 1019 } catch (error) { /* empty */ } 1020}; 1021 1022// getting tag from ES6+ `Object.prototype.toString` 1023module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) { 1024 var O, tag, result; 1025 return it === undefined ? 'Undefined' : it === null ? 'Null' 1026 // @@toStringTag case 1027 : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag 1028 // builtinTag case 1029 : CORRECT_ARGUMENTS ? classofRaw(O) 1030 // ES3 arguments fallback 1031 : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result; 1032}; 1033 1034 1035/***/ }), 1036 1037/***/ 9920: 1038/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1039 1040var has = __webpack_require__(6656); 1041var ownKeys = __webpack_require__(3887); 1042var getOwnPropertyDescriptorModule = __webpack_require__(1236); 1043var definePropertyModule = __webpack_require__(3070); 1044 1045module.exports = function (target, source) { 1046 var keys = ownKeys(source); 1047 var defineProperty = definePropertyModule.f; 1048 var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; 1049 for (var i = 0; i < keys.length; i++) { 1050 var key = keys[i]; 1051 if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); 1052 } 1053}; 1054 1055 1056/***/ }), 1057 1058/***/ 8544: 1059/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1060 1061var fails = __webpack_require__(7293); 1062 1063module.exports = !fails(function () { 1064 function F() { /* empty */ } 1065 F.prototype.constructor = null; 1066 return Object.getPrototypeOf(new F()) !== F.prototype; 1067}); 1068 1069 1070/***/ }), 1071 1072/***/ 4994: 1073/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1074 1075"use strict"; 1076 1077var IteratorPrototype = __webpack_require__(3383).IteratorPrototype; 1078var create = __webpack_require__(30); 1079var createPropertyDescriptor = __webpack_require__(9114); 1080var setToStringTag = __webpack_require__(8003); 1081var Iterators = __webpack_require__(7497); 1082 1083var returnThis = function () { return this; }; 1084 1085module.exports = function (IteratorConstructor, NAME, next) { 1086 var TO_STRING_TAG = NAME + ' Iterator'; 1087 IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) }); 1088 setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true); 1089 Iterators[TO_STRING_TAG] = returnThis; 1090 return IteratorConstructor; 1091}; 1092 1093 1094/***/ }), 1095 1096/***/ 8880: 1097/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1098 1099var DESCRIPTORS = __webpack_require__(9781); 1100var definePropertyModule = __webpack_require__(3070); 1101var createPropertyDescriptor = __webpack_require__(9114); 1102 1103module.exports = DESCRIPTORS ? function (object, key, value) { 1104 return definePropertyModule.f(object, key, createPropertyDescriptor(1, value)); 1105} : function (object, key, value) { 1106 object[key] = value; 1107 return object; 1108}; 1109 1110 1111/***/ }), 1112 1113/***/ 9114: 1114/***/ (function(module) { 1115 1116module.exports = function (bitmap, value) { 1117 return { 1118 enumerable: !(bitmap & 1), 1119 configurable: !(bitmap & 2), 1120 writable: !(bitmap & 4), 1121 value: value 1122 }; 1123}; 1124 1125 1126/***/ }), 1127 1128/***/ 6135: 1129/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1130 1131"use strict"; 1132 1133var toPrimitive = __webpack_require__(7593); 1134var definePropertyModule = __webpack_require__(3070); 1135var createPropertyDescriptor = __webpack_require__(9114); 1136 1137module.exports = function (object, key, value) { 1138 var propertyKey = toPrimitive(key); 1139 if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value)); 1140 else object[propertyKey] = value; 1141}; 1142 1143 1144/***/ }), 1145 1146/***/ 654: 1147/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1148 1149"use strict"; 1150 1151var $ = __webpack_require__(2109); 1152var createIteratorConstructor = __webpack_require__(4994); 1153var getPrototypeOf = __webpack_require__(9518); 1154var setPrototypeOf = __webpack_require__(7674); 1155var setToStringTag = __webpack_require__(8003); 1156var createNonEnumerableProperty = __webpack_require__(8880); 1157var redefine = __webpack_require__(1320); 1158var wellKnownSymbol = __webpack_require__(5112); 1159var IS_PURE = __webpack_require__(1913); 1160var Iterators = __webpack_require__(7497); 1161var IteratorsCore = __webpack_require__(3383); 1162 1163var IteratorPrototype = IteratorsCore.IteratorPrototype; 1164var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS; 1165var ITERATOR = wellKnownSymbol('iterator'); 1166var KEYS = 'keys'; 1167var VALUES = 'values'; 1168var ENTRIES = 'entries'; 1169 1170var returnThis = function () { return this; }; 1171 1172module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { 1173 createIteratorConstructor(IteratorConstructor, NAME, next); 1174 1175 var getIterationMethod = function (KIND) { 1176 if (KIND === DEFAULT && defaultIterator) return defaultIterator; 1177 if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND]; 1178 switch (KIND) { 1179 case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; 1180 case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; 1181 case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; 1182 } return function () { return new IteratorConstructor(this); }; 1183 }; 1184 1185 var TO_STRING_TAG = NAME + ' Iterator'; 1186 var INCORRECT_VALUES_NAME = false; 1187 var IterablePrototype = Iterable.prototype; 1188 var nativeIterator = IterablePrototype[ITERATOR] 1189 || IterablePrototype['@@iterator'] 1190 || DEFAULT && IterablePrototype[DEFAULT]; 1191 var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); 1192 var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; 1193 var CurrentIteratorPrototype, methods, KEY; 1194 1195 // fix native 1196 if (anyNativeIterator) { 1197 CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable())); 1198 if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { 1199 if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { 1200 if (setPrototypeOf) { 1201 setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype); 1202 } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') { 1203 createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis); 1204 } 1205 } 1206 // Set @@toStringTag to native iterators 1207 setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true); 1208 if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis; 1209 } 1210 } 1211 1212 // fix Array#{values, @@iterator}.name in V8 / FF 1213 if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { 1214 INCORRECT_VALUES_NAME = true; 1215 defaultIterator = function values() { return nativeIterator.call(this); }; 1216 } 1217 1218 // define iterator 1219 if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) { 1220 createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator); 1221 } 1222 Iterators[NAME] = defaultIterator; 1223 1224 // export additional methods 1225 if (DEFAULT) { 1226 methods = { 1227 values: getIterationMethod(VALUES), 1228 keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), 1229 entries: getIterationMethod(ENTRIES) 1230 }; 1231 if (FORCED) for (KEY in methods) { 1232 if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { 1233 redefine(IterablePrototype, KEY, methods[KEY]); 1234 } 1235 } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); 1236 } 1237 1238 return methods; 1239}; 1240 1241 1242/***/ }), 1243 1244/***/ 9781: 1245/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1246 1247var fails = __webpack_require__(7293); 1248 1249// Detect IE8's incomplete defineProperty implementation 1250module.exports = !fails(function () { 1251 return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; 1252}); 1253 1254 1255/***/ }), 1256 1257/***/ 317: 1258/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1259 1260var global = __webpack_require__(7854); 1261var isObject = __webpack_require__(111); 1262 1263var document = global.document; 1264// typeof document.createElement is 'object' in old IE 1265var EXISTS = isObject(document) && isObject(document.createElement); 1266 1267module.exports = function (it) { 1268 return EXISTS ? document.createElement(it) : {}; 1269}; 1270 1271 1272/***/ }), 1273 1274/***/ 8324: 1275/***/ (function(module) { 1276 1277// iterable DOM collections 1278// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods 1279module.exports = { 1280 CSSRuleList: 0, 1281 CSSStyleDeclaration: 0, 1282 CSSValueList: 0, 1283 ClientRectList: 0, 1284 DOMRectList: 0, 1285 DOMStringList: 0, 1286 DOMTokenList: 1, 1287 DataTransferItemList: 0, 1288 FileList: 0, 1289 HTMLAllCollection: 0, 1290 HTMLCollection: 0, 1291 HTMLFormElement: 0, 1292 HTMLSelectElement: 0, 1293 MediaList: 0, 1294 MimeTypeArray: 0, 1295 NamedNodeMap: 0, 1296 NodeList: 1, 1297 PaintRequestList: 0, 1298 Plugin: 0, 1299 PluginArray: 0, 1300 SVGLengthList: 0, 1301 SVGNumberList: 0, 1302 SVGPathSegList: 0, 1303 SVGPointList: 0, 1304 SVGStringList: 0, 1305 SVGTransformList: 0, 1306 SourceBufferList: 0, 1307 StyleSheetList: 0, 1308 TextTrackCueList: 0, 1309 TextTrackList: 0, 1310 TouchList: 0 1311}; 1312 1313 1314/***/ }), 1315 1316/***/ 8113: 1317/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1318 1319var getBuiltIn = __webpack_require__(5005); 1320 1321module.exports = getBuiltIn('navigator', 'userAgent') || ''; 1322 1323 1324/***/ }), 1325 1326/***/ 7392: 1327/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1328 1329var global = __webpack_require__(7854); 1330var userAgent = __webpack_require__(8113); 1331 1332var process = global.process; 1333var versions = process && process.versions; 1334var v8 = versions && versions.v8; 1335var match, version; 1336 1337if (v8) { 1338 match = v8.split('.'); 1339 version = match[0] + match[1]; 1340} else if (userAgent) { 1341 match = userAgent.match(/Edge\/(\d+)/); 1342 if (!match || match[1] >= 74) { 1343 match = userAgent.match(/Chrome\/(\d+)/); 1344 if (match) version = match[1]; 1345 } 1346} 1347 1348module.exports = version && +version; 1349 1350 1351/***/ }), 1352 1353/***/ 748: 1354/***/ (function(module) { 1355 1356// IE8- don't enum bug keys 1357module.exports = [ 1358 'constructor', 1359 'hasOwnProperty', 1360 'isPrototypeOf', 1361 'propertyIsEnumerable', 1362 'toLocaleString', 1363 'toString', 1364 'valueOf' 1365]; 1366 1367 1368/***/ }), 1369 1370/***/ 2109: 1371/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1372 1373var global = __webpack_require__(7854); 1374var getOwnPropertyDescriptor = __webpack_require__(1236).f; 1375var createNonEnumerableProperty = __webpack_require__(8880); 1376var redefine = __webpack_require__(1320); 1377var setGlobal = __webpack_require__(3505); 1378var copyConstructorProperties = __webpack_require__(9920); 1379var isForced = __webpack_require__(4705); 1380 1381/* 1382 options.target - name of the target object 1383 options.global - target is the global object 1384 options.stat - export as static methods of target 1385 options.proto - export as prototype methods of target 1386 options.real - real prototype method for the `pure` version 1387 options.forced - export even if the native feature is available 1388 options.bind - bind methods to the target, required for the `pure` version 1389 options.wrap - wrap constructors to preventing global pollution, required for the `pure` version 1390 options.unsafe - use the simple assignment of property instead of delete + defineProperty 1391 options.sham - add a flag to not completely full polyfills 1392 options.enumerable - export as enumerable property 1393 options.noTargetGet - prevent calling a getter on target 1394*/ 1395module.exports = function (options, source) { 1396 var TARGET = options.target; 1397 var GLOBAL = options.global; 1398 var STATIC = options.stat; 1399 var FORCED, target, key, targetProperty, sourceProperty, descriptor; 1400 if (GLOBAL) { 1401 target = global; 1402 } else if (STATIC) { 1403 target = global[TARGET] || setGlobal(TARGET, {}); 1404 } else { 1405 target = (global[TARGET] || {}).prototype; 1406 } 1407 if (target) for (key in source) { 1408 sourceProperty = source[key]; 1409 if (options.noTargetGet) { 1410 descriptor = getOwnPropertyDescriptor(target, key); 1411 targetProperty = descriptor && descriptor.value; 1412 } else targetProperty = target[key]; 1413 FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); 1414 // contained in target 1415 if (!FORCED && targetProperty !== undefined) { 1416 if (typeof sourceProperty === typeof targetProperty) continue; 1417 copyConstructorProperties(sourceProperty, targetProperty); 1418 } 1419 // add a flag to not completely full polyfills 1420 if (options.sham || (targetProperty && targetProperty.sham)) { 1421 createNonEnumerableProperty(sourceProperty, 'sham', true); 1422 } 1423 // extend global 1424 redefine(target, key, sourceProperty, options); 1425 } 1426}; 1427 1428 1429/***/ }), 1430 1431/***/ 7293: 1432/***/ (function(module) { 1433 1434module.exports = function (exec) { 1435 try { 1436 return !!exec(); 1437 } catch (error) { 1438 return true; 1439 } 1440}; 1441 1442 1443/***/ }), 1444 1445/***/ 7007: 1446/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1447 1448"use strict"; 1449 1450// TODO: Remove from `core-js@4` since it's moved to entry points 1451__webpack_require__(4916); 1452var redefine = __webpack_require__(1320); 1453var fails = __webpack_require__(7293); 1454var wellKnownSymbol = __webpack_require__(5112); 1455var regexpExec = __webpack_require__(2261); 1456var createNonEnumerableProperty = __webpack_require__(8880); 1457 1458var SPECIES = wellKnownSymbol('species'); 1459 1460var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { 1461 // #replace needs built-in support for named groups. 1462 // #match works fine because it just return the exec results, even if it has 1463 // a "grops" property. 1464 var re = /./; 1465 re.exec = function () { 1466 var result = []; 1467 result.groups = { a: '7' }; 1468 return result; 1469 }; 1470 return ''.replace(re, '$<a>') !== '7'; 1471}); 1472 1473// IE <= 11 replaces $0 with the whole match, as if it was $& 1474// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0 1475var REPLACE_KEEPS_$0 = (function () { 1476 return 'a'.replace(/./, '$0') === '$0'; 1477})(); 1478 1479var REPLACE = wellKnownSymbol('replace'); 1480// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string 1481var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () { 1482 if (/./[REPLACE]) { 1483 return /./[REPLACE]('a', '$0') === ''; 1484 } 1485 return false; 1486})(); 1487 1488// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec 1489// Weex JS has frozen built-in prototypes, so use try / catch wrapper 1490var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { 1491 // eslint-disable-next-line regexp/no-empty-group -- required for testing 1492 var re = /(?:)/; 1493 var originalExec = re.exec; 1494 re.exec = function () { return originalExec.apply(this, arguments); }; 1495 var result = 'ab'.split(re); 1496 return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; 1497}); 1498 1499module.exports = function (KEY, length, exec, sham) { 1500 var SYMBOL = wellKnownSymbol(KEY); 1501 1502 var DELEGATES_TO_SYMBOL = !fails(function () { 1503 // String methods call symbol-named RegEp methods 1504 var O = {}; 1505 O[SYMBOL] = function () { return 7; }; 1506 return ''[KEY](O) != 7; 1507 }); 1508 1509 var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () { 1510 // Symbol-named RegExp methods call .exec 1511 var execCalled = false; 1512 var re = /a/; 1513 1514 if (KEY === 'split') { 1515 // We can't use real regex here since it causes deoptimization 1516 // and serious performance degradation in V8 1517 // https://github.com/zloirock/core-js/issues/306 1518 re = {}; 1519 // RegExp[@@split] doesn't call the regex's exec method, but first creates 1520 // a new one. We need to return the patched regex when creating the new one. 1521 re.constructor = {}; 1522 re.constructor[SPECIES] = function () { return re; }; 1523 re.flags = ''; 1524 re[SYMBOL] = /./[SYMBOL]; 1525 } 1526 1527 re.exec = function () { execCalled = true; return null; }; 1528 1529 re[SYMBOL](''); 1530 return !execCalled; 1531 }); 1532 1533 if ( 1534 !DELEGATES_TO_SYMBOL || 1535 !DELEGATES_TO_EXEC || 1536 (KEY === 'replace' && !( 1537 REPLACE_SUPPORTS_NAMED_GROUPS && 1538 REPLACE_KEEPS_$0 && 1539 !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE 1540 )) || 1541 (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) 1542 ) { 1543 var nativeRegExpMethod = /./[SYMBOL]; 1544 var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { 1545 if (regexp.exec === regexpExec) { 1546 if (DELEGATES_TO_SYMBOL && !forceStringMethod) { 1547 // The native String method already delegates to @@method (this 1548 // polyfilled function), leasing to infinite recursion. 1549 // We avoid it by directly calling the native @@method method. 1550 return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; 1551 } 1552 return { done: true, value: nativeMethod.call(str, regexp, arg2) }; 1553 } 1554 return { done: false }; 1555 }, { 1556 REPLACE_KEEPS_$0: REPLACE_KEEPS_$0, 1557 REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE 1558 }); 1559 var stringMethod = methods[0]; 1560 var regexMethod = methods[1]; 1561 1562 redefine(String.prototype, KEY, stringMethod); 1563 redefine(RegExp.prototype, SYMBOL, length == 2 1564 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) 1565 // 21.2.5.11 RegExp.prototype[@@split](string, limit) 1566 ? function (string, arg) { return regexMethod.call(string, this, arg); } 1567 // 21.2.5.6 RegExp.prototype[@@match](string) 1568 // 21.2.5.9 RegExp.prototype[@@search](string) 1569 : function (string) { return regexMethod.call(string, this); } 1570 ); 1571 } 1572 1573 if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true); 1574}; 1575 1576 1577/***/ }), 1578 1579/***/ 9974: 1580/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1581 1582var aFunction = __webpack_require__(3099); 1583 1584// optional / simple context binding 1585module.exports = function (fn, that, length) { 1586 aFunction(fn); 1587 if (that === undefined) return fn; 1588 switch (length) { 1589 case 0: return function () { 1590 return fn.call(that); 1591 }; 1592 case 1: return function (a) { 1593 return fn.call(that, a); 1594 }; 1595 case 2: return function (a, b) { 1596 return fn.call(that, a, b); 1597 }; 1598 case 3: return function (a, b, c) { 1599 return fn.call(that, a, b, c); 1600 }; 1601 } 1602 return function (/* ...args */) { 1603 return fn.apply(that, arguments); 1604 }; 1605}; 1606 1607 1608/***/ }), 1609 1610/***/ 5005: 1611/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1612 1613var path = __webpack_require__(857); 1614var global = __webpack_require__(7854); 1615 1616var aFunction = function (variable) { 1617 return typeof variable == 'function' ? variable : undefined; 1618}; 1619 1620module.exports = function (namespace, method) { 1621 return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace]) 1622 : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method]; 1623}; 1624 1625 1626/***/ }), 1627 1628/***/ 1246: 1629/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1630 1631var classof = __webpack_require__(648); 1632var Iterators = __webpack_require__(7497); 1633var wellKnownSymbol = __webpack_require__(5112); 1634 1635var ITERATOR = wellKnownSymbol('iterator'); 1636 1637module.exports = function (it) { 1638 if (it != undefined) return it[ITERATOR] 1639 || it['@@iterator'] 1640 || Iterators[classof(it)]; 1641}; 1642 1643 1644/***/ }), 1645 1646/***/ 8554: 1647/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1648 1649var anObject = __webpack_require__(9670); 1650var getIteratorMethod = __webpack_require__(1246); 1651 1652module.exports = function (it) { 1653 var iteratorMethod = getIteratorMethod(it); 1654 if (typeof iteratorMethod != 'function') { 1655 throw TypeError(String(it) + ' is not iterable'); 1656 } return anObject(iteratorMethod.call(it)); 1657}; 1658 1659 1660/***/ }), 1661 1662/***/ 647: 1663/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1664 1665var toObject = __webpack_require__(7908); 1666 1667var floor = Math.floor; 1668var replace = ''.replace; 1669var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g; 1670var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g; 1671 1672// https://tc39.es/ecma262/#sec-getsubstitution 1673module.exports = function (matched, str, position, captures, namedCaptures, replacement) { 1674 var tailPos = position + matched.length; 1675 var m = captures.length; 1676 var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; 1677 if (namedCaptures !== undefined) { 1678 namedCaptures = toObject(namedCaptures); 1679 symbols = SUBSTITUTION_SYMBOLS; 1680 } 1681 return replace.call(replacement, symbols, function (match, ch) { 1682 var capture; 1683 switch (ch.charAt(0)) { 1684 case '$': return '$'; 1685 case '&': return matched; 1686 case '`': return str.slice(0, position); 1687 case "'": return str.slice(tailPos); 1688 case '<': 1689 capture = namedCaptures[ch.slice(1, -1)]; 1690 break; 1691 default: // \d\d? 1692 var n = +ch; 1693 if (n === 0) return match; 1694 if (n > m) { 1695 var f = floor(n / 10); 1696 if (f === 0) return match; 1697 if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); 1698 return match; 1699 } 1700 capture = captures[n - 1]; 1701 } 1702 return capture === undefined ? '' : capture; 1703 }); 1704}; 1705 1706 1707/***/ }), 1708 1709/***/ 7854: 1710/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1711 1712var check = function (it) { 1713 return it && it.Math == Math && it; 1714}; 1715 1716// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 1717module.exports = 1718 /* global globalThis -- safe */ 1719 check(typeof globalThis == 'object' && globalThis) || 1720 check(typeof window == 'object' && window) || 1721 check(typeof self == 'object' && self) || 1722 check(typeof __webpack_require__.g == 'object' && __webpack_require__.g) || 1723 // eslint-disable-next-line no-new-func -- fallback 1724 (function () { return this; })() || Function('return this')(); 1725 1726 1727/***/ }), 1728 1729/***/ 6656: 1730/***/ (function(module) { 1731 1732var hasOwnProperty = {}.hasOwnProperty; 1733 1734module.exports = function (it, key) { 1735 return hasOwnProperty.call(it, key); 1736}; 1737 1738 1739/***/ }), 1740 1741/***/ 3501: 1742/***/ (function(module) { 1743 1744module.exports = {}; 1745 1746 1747/***/ }), 1748 1749/***/ 490: 1750/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1751 1752var getBuiltIn = __webpack_require__(5005); 1753 1754module.exports = getBuiltIn('document', 'documentElement'); 1755 1756 1757/***/ }), 1758 1759/***/ 4664: 1760/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1761 1762var DESCRIPTORS = __webpack_require__(9781); 1763var fails = __webpack_require__(7293); 1764var createElement = __webpack_require__(317); 1765 1766// Thank's IE8 for his funny defineProperty 1767module.exports = !DESCRIPTORS && !fails(function () { 1768 return Object.defineProperty(createElement('div'), 'a', { 1769 get: function () { return 7; } 1770 }).a != 7; 1771}); 1772 1773 1774/***/ }), 1775 1776/***/ 1179: 1777/***/ (function(module) { 1778 1779// IEEE754 conversions based on https://github.com/feross/ieee754 1780var abs = Math.abs; 1781var pow = Math.pow; 1782var floor = Math.floor; 1783var log = Math.log; 1784var LN2 = Math.LN2; 1785 1786var pack = function (number, mantissaLength, bytes) { 1787 var buffer = new Array(bytes); 1788 var exponentLength = bytes * 8 - mantissaLength - 1; 1789 var eMax = (1 << exponentLength) - 1; 1790 var eBias = eMax >> 1; 1791 var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0; 1792 var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0; 1793 var index = 0; 1794 var exponent, mantissa, c; 1795 number = abs(number); 1796 // eslint-disable-next-line no-self-compare -- NaN check 1797 if (number != number || number === Infinity) { 1798 // eslint-disable-next-line no-self-compare -- NaN check 1799 mantissa = number != number ? 1 : 0; 1800 exponent = eMax; 1801 } else { 1802 exponent = floor(log(number) / LN2); 1803 if (number * (c = pow(2, -exponent)) < 1) { 1804 exponent--; 1805 c *= 2; 1806 } 1807 if (exponent + eBias >= 1) { 1808 number += rt / c; 1809 } else { 1810 number += rt * pow(2, 1 - eBias); 1811 } 1812 if (number * c >= 2) { 1813 exponent++; 1814 c /= 2; 1815 } 1816 if (exponent + eBias >= eMax) { 1817 mantissa = 0; 1818 exponent = eMax; 1819 } else if (exponent + eBias >= 1) { 1820 mantissa = (number * c - 1) * pow(2, mantissaLength); 1821 exponent = exponent + eBias; 1822 } else { 1823 mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength); 1824 exponent = 0; 1825 } 1826 } 1827 for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8); 1828 exponent = exponent << mantissaLength | mantissa; 1829 exponentLength += mantissaLength; 1830 for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8); 1831 buffer[--index] |= sign * 128; 1832 return buffer; 1833}; 1834 1835var unpack = function (buffer, mantissaLength) { 1836 var bytes = buffer.length; 1837 var exponentLength = bytes * 8 - mantissaLength - 1; 1838 var eMax = (1 << exponentLength) - 1; 1839 var eBias = eMax >> 1; 1840 var nBits = exponentLength - 7; 1841 var index = bytes - 1; 1842 var sign = buffer[index--]; 1843 var exponent = sign & 127; 1844 var mantissa; 1845 sign >>= 7; 1846 for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8); 1847 mantissa = exponent & (1 << -nBits) - 1; 1848 exponent >>= -nBits; 1849 nBits += mantissaLength; 1850 for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8); 1851 if (exponent === 0) { 1852 exponent = 1 - eBias; 1853 } else if (exponent === eMax) { 1854 return mantissa ? NaN : sign ? -Infinity : Infinity; 1855 } else { 1856 mantissa = mantissa + pow(2, mantissaLength); 1857 exponent = exponent - eBias; 1858 } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength); 1859}; 1860 1861module.exports = { 1862 pack: pack, 1863 unpack: unpack 1864}; 1865 1866 1867/***/ }), 1868 1869/***/ 8361: 1870/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1871 1872var fails = __webpack_require__(7293); 1873var classof = __webpack_require__(4326); 1874 1875var split = ''.split; 1876 1877// fallback for non-array-like ES3 and non-enumerable old V8 strings 1878module.exports = fails(function () { 1879 // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 1880 // eslint-disable-next-line no-prototype-builtins -- safe 1881 return !Object('z').propertyIsEnumerable(0); 1882}) ? function (it) { 1883 return classof(it) == 'String' ? split.call(it, '') : Object(it); 1884} : Object; 1885 1886 1887/***/ }), 1888 1889/***/ 9587: 1890/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1891 1892var isObject = __webpack_require__(111); 1893var setPrototypeOf = __webpack_require__(7674); 1894 1895// makes subclassing work correct for wrapped built-ins 1896module.exports = function ($this, dummy, Wrapper) { 1897 var NewTarget, NewTargetPrototype; 1898 if ( 1899 // it can work only with native `setPrototypeOf` 1900 setPrototypeOf && 1901 // we haven't completely correct pre-ES6 way for getting `new.target`, so use this 1902 typeof (NewTarget = dummy.constructor) == 'function' && 1903 NewTarget !== Wrapper && 1904 isObject(NewTargetPrototype = NewTarget.prototype) && 1905 NewTargetPrototype !== Wrapper.prototype 1906 ) setPrototypeOf($this, NewTargetPrototype); 1907 return $this; 1908}; 1909 1910 1911/***/ }), 1912 1913/***/ 2788: 1914/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1915 1916var store = __webpack_require__(5465); 1917 1918var functionToString = Function.toString; 1919 1920// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper 1921if (typeof store.inspectSource != 'function') { 1922 store.inspectSource = function (it) { 1923 return functionToString.call(it); 1924 }; 1925} 1926 1927module.exports = store.inspectSource; 1928 1929 1930/***/ }), 1931 1932/***/ 9909: 1933/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 1934 1935var NATIVE_WEAK_MAP = __webpack_require__(8536); 1936var global = __webpack_require__(7854); 1937var isObject = __webpack_require__(111); 1938var createNonEnumerableProperty = __webpack_require__(8880); 1939var objectHas = __webpack_require__(6656); 1940var shared = __webpack_require__(5465); 1941var sharedKey = __webpack_require__(6200); 1942var hiddenKeys = __webpack_require__(3501); 1943 1944var WeakMap = global.WeakMap; 1945var set, get, has; 1946 1947var enforce = function (it) { 1948 return has(it) ? get(it) : set(it, {}); 1949}; 1950 1951var getterFor = function (TYPE) { 1952 return function (it) { 1953 var state; 1954 if (!isObject(it) || (state = get(it)).type !== TYPE) { 1955 throw TypeError('Incompatible receiver, ' + TYPE + ' required'); 1956 } return state; 1957 }; 1958}; 1959 1960if (NATIVE_WEAK_MAP) { 1961 var store = shared.state || (shared.state = new WeakMap()); 1962 var wmget = store.get; 1963 var wmhas = store.has; 1964 var wmset = store.set; 1965 set = function (it, metadata) { 1966 metadata.facade = it; 1967 wmset.call(store, it, metadata); 1968 return metadata; 1969 }; 1970 get = function (it) { 1971 return wmget.call(store, it) || {}; 1972 }; 1973 has = function (it) { 1974 return wmhas.call(store, it); 1975 }; 1976} else { 1977 var STATE = sharedKey('state'); 1978 hiddenKeys[STATE] = true; 1979 set = function (it, metadata) { 1980 metadata.facade = it; 1981 createNonEnumerableProperty(it, STATE, metadata); 1982 return metadata; 1983 }; 1984 get = function (it) { 1985 return objectHas(it, STATE) ? it[STATE] : {}; 1986 }; 1987 has = function (it) { 1988 return objectHas(it, STATE); 1989 }; 1990} 1991 1992module.exports = { 1993 set: set, 1994 get: get, 1995 has: has, 1996 enforce: enforce, 1997 getterFor: getterFor 1998}; 1999 2000 2001/***/ }), 2002 2003/***/ 7659: 2004/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2005 2006var wellKnownSymbol = __webpack_require__(5112); 2007var Iterators = __webpack_require__(7497); 2008 2009var ITERATOR = wellKnownSymbol('iterator'); 2010var ArrayPrototype = Array.prototype; 2011 2012// check on default Array iterator 2013module.exports = function (it) { 2014 return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it); 2015}; 2016 2017 2018/***/ }), 2019 2020/***/ 3157: 2021/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2022 2023var classof = __webpack_require__(4326); 2024 2025// `IsArray` abstract operation 2026// https://tc39.es/ecma262/#sec-isarray 2027module.exports = Array.isArray || function isArray(arg) { 2028 return classof(arg) == 'Array'; 2029}; 2030 2031 2032/***/ }), 2033 2034/***/ 4705: 2035/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2036 2037var fails = __webpack_require__(7293); 2038 2039var replacement = /#|\.prototype\./; 2040 2041var isForced = function (feature, detection) { 2042 var value = data[normalize(feature)]; 2043 return value == POLYFILL ? true 2044 : value == NATIVE ? false 2045 : typeof detection == 'function' ? fails(detection) 2046 : !!detection; 2047}; 2048 2049var normalize = isForced.normalize = function (string) { 2050 return String(string).replace(replacement, '.').toLowerCase(); 2051}; 2052 2053var data = isForced.data = {}; 2054var NATIVE = isForced.NATIVE = 'N'; 2055var POLYFILL = isForced.POLYFILL = 'P'; 2056 2057module.exports = isForced; 2058 2059 2060/***/ }), 2061 2062/***/ 111: 2063/***/ (function(module) { 2064 2065module.exports = function (it) { 2066 return typeof it === 'object' ? it !== null : typeof it === 'function'; 2067}; 2068 2069 2070/***/ }), 2071 2072/***/ 1913: 2073/***/ (function(module) { 2074 2075module.exports = false; 2076 2077 2078/***/ }), 2079 2080/***/ 7850: 2081/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2082 2083var isObject = __webpack_require__(111); 2084var classof = __webpack_require__(4326); 2085var wellKnownSymbol = __webpack_require__(5112); 2086 2087var MATCH = wellKnownSymbol('match'); 2088 2089// `IsRegExp` abstract operation 2090// https://tc39.es/ecma262/#sec-isregexp 2091module.exports = function (it) { 2092 var isRegExp; 2093 return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp'); 2094}; 2095 2096 2097/***/ }), 2098 2099/***/ 9212: 2100/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2101 2102var anObject = __webpack_require__(9670); 2103 2104module.exports = function (iterator) { 2105 var returnMethod = iterator['return']; 2106 if (returnMethod !== undefined) { 2107 return anObject(returnMethod.call(iterator)).value; 2108 } 2109}; 2110 2111 2112/***/ }), 2113 2114/***/ 3383: 2115/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2116 2117"use strict"; 2118 2119var fails = __webpack_require__(7293); 2120var getPrototypeOf = __webpack_require__(9518); 2121var createNonEnumerableProperty = __webpack_require__(8880); 2122var has = __webpack_require__(6656); 2123var wellKnownSymbol = __webpack_require__(5112); 2124var IS_PURE = __webpack_require__(1913); 2125 2126var ITERATOR = wellKnownSymbol('iterator'); 2127var BUGGY_SAFARI_ITERATORS = false; 2128 2129var returnThis = function () { return this; }; 2130 2131// `%IteratorPrototype%` object 2132// https://tc39.es/ecma262/#sec-%iteratorprototype%-object 2133var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; 2134 2135if ([].keys) { 2136 arrayIterator = [].keys(); 2137 // Safari 8 has buggy iterators w/o `next` 2138 if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true; 2139 else { 2140 PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator)); 2141 if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype; 2142 } 2143} 2144 2145var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () { 2146 var test = {}; 2147 // FF44- legacy iterators case 2148 return IteratorPrototype[ITERATOR].call(test) !== test; 2149}); 2150 2151if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {}; 2152 2153// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() 2154if ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) { 2155 createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis); 2156} 2157 2158module.exports = { 2159 IteratorPrototype: IteratorPrototype, 2160 BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS 2161}; 2162 2163 2164/***/ }), 2165 2166/***/ 7497: 2167/***/ (function(module) { 2168 2169module.exports = {}; 2170 2171 2172/***/ }), 2173 2174/***/ 133: 2175/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2176 2177var fails = __webpack_require__(7293); 2178 2179module.exports = !!Object.getOwnPropertySymbols && !fails(function () { 2180 // Chrome 38 Symbol has incorrect toString conversion 2181 /* global Symbol -- required for testing */ 2182 return !String(Symbol()); 2183}); 2184 2185 2186/***/ }), 2187 2188/***/ 590: 2189/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2190 2191var fails = __webpack_require__(7293); 2192var wellKnownSymbol = __webpack_require__(5112); 2193var IS_PURE = __webpack_require__(1913); 2194 2195var ITERATOR = wellKnownSymbol('iterator'); 2196 2197module.exports = !fails(function () { 2198 var url = new URL('b?a=1&b=2&c=3', 'http://a'); 2199 var searchParams = url.searchParams; 2200 var result = ''; 2201 url.pathname = 'c%20d'; 2202 searchParams.forEach(function (value, key) { 2203 searchParams['delete']('b'); 2204 result += key + value; 2205 }); 2206 return (IS_PURE && !url.toJSON) 2207 || !searchParams.sort 2208 || url.href !== 'http://a/c%20d?a=1&c=3' 2209 || searchParams.get('c') !== '3' 2210 || String(new URLSearchParams('?a=1')) !== 'a=1' 2211 || !searchParams[ITERATOR] 2212 // throws in Edge 2213 || new URL('https://a@b').username !== 'a' 2214 || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b' 2215 // not punycoded in Edge 2216 || new URL('http://ÑеÑÑ').host !== 'xn--e1aybc' 2217 // not escaped in Chrome 62- 2218 || new URL('http://a#б').hash !== '#%D0%B1' 2219 // fails in Chrome 66- 2220 || result !== 'a1c3' 2221 // throws in Safari 2222 || new URL('http://x', undefined).host !== 'x'; 2223}); 2224 2225 2226/***/ }), 2227 2228/***/ 8536: 2229/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2230 2231var global = __webpack_require__(7854); 2232var inspectSource = __webpack_require__(2788); 2233 2234var WeakMap = global.WeakMap; 2235 2236module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap)); 2237 2238 2239/***/ }), 2240 2241/***/ 1574: 2242/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2243 2244"use strict"; 2245 2246var DESCRIPTORS = __webpack_require__(9781); 2247var fails = __webpack_require__(7293); 2248var objectKeys = __webpack_require__(1956); 2249var getOwnPropertySymbolsModule = __webpack_require__(5181); 2250var propertyIsEnumerableModule = __webpack_require__(5296); 2251var toObject = __webpack_require__(7908); 2252var IndexedObject = __webpack_require__(8361); 2253 2254var nativeAssign = Object.assign; 2255var defineProperty = Object.defineProperty; 2256 2257// `Object.assign` method 2258// https://tc39.es/ecma262/#sec-object.assign 2259module.exports = !nativeAssign || fails(function () { 2260 // should have correct order of operations (Edge bug) 2261 if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', { 2262 enumerable: true, 2263 get: function () { 2264 defineProperty(this, 'b', { 2265 value: 3, 2266 enumerable: false 2267 }); 2268 } 2269 }), { b: 2 })).b !== 1) return true; 2270 // should work with symbols and should have deterministic property order (V8 bug) 2271 var A = {}; 2272 var B = {}; 2273 /* global Symbol -- required for testing */ 2274 var symbol = Symbol(); 2275 var alphabet = 'abcdefghijklmnopqrst'; 2276 A[symbol] = 7; 2277 alphabet.split('').forEach(function (chr) { B[chr] = chr; }); 2278 return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet; 2279}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length` 2280 var T = toObject(target); 2281 var argumentsLength = arguments.length; 2282 var index = 1; 2283 var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; 2284 var propertyIsEnumerable = propertyIsEnumerableModule.f; 2285 while (argumentsLength > index) { 2286 var S = IndexedObject(arguments[index++]); 2287 var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S); 2288 var length = keys.length; 2289 var j = 0; 2290 var key; 2291 while (length > j) { 2292 key = keys[j++]; 2293 if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key]; 2294 } 2295 } return T; 2296} : nativeAssign; 2297 2298 2299/***/ }), 2300 2301/***/ 30: 2302/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2303 2304var anObject = __webpack_require__(9670); 2305var defineProperties = __webpack_require__(6048); 2306var enumBugKeys = __webpack_require__(748); 2307var hiddenKeys = __webpack_require__(3501); 2308var html = __webpack_require__(490); 2309var documentCreateElement = __webpack_require__(317); 2310var sharedKey = __webpack_require__(6200); 2311 2312var GT = '>'; 2313var LT = '<'; 2314var PROTOTYPE = 'prototype'; 2315var SCRIPT = 'script'; 2316var IE_PROTO = sharedKey('IE_PROTO'); 2317 2318var EmptyConstructor = function () { /* empty */ }; 2319 2320var scriptTag = function (content) { 2321 return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; 2322}; 2323 2324// Create object with fake `null` prototype: use ActiveX Object with cleared prototype 2325var NullProtoObjectViaActiveX = function (activeXDocument) { 2326 activeXDocument.write(scriptTag('')); 2327 activeXDocument.close(); 2328 var temp = activeXDocument.parentWindow.Object; 2329 activeXDocument = null; // avoid memory leak 2330 return temp; 2331}; 2332 2333// Create object with fake `null` prototype: use iframe Object with cleared prototype 2334var NullProtoObjectViaIFrame = function () { 2335 // Thrash, waste and sodomy: IE GC bug 2336 var iframe = documentCreateElement('iframe'); 2337 var JS = 'java' + SCRIPT + ':'; 2338 var iframeDocument; 2339 iframe.style.display = 'none'; 2340 html.appendChild(iframe); 2341 // https://github.com/zloirock/core-js/issues/475 2342 iframe.src = String(JS); 2343 iframeDocument = iframe.contentWindow.document; 2344 iframeDocument.open(); 2345 iframeDocument.write(scriptTag('document.F=Object')); 2346 iframeDocument.close(); 2347 return iframeDocument.F; 2348}; 2349 2350// Check for document.domain and active x support 2351// No need to use active x approach when document.domain is not set 2352// see https://github.com/es-shims/es5-shim/issues/150 2353// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 2354// avoid IE GC bug 2355var activeXDocument; 2356var NullProtoObject = function () { 2357 try { 2358 /* global ActiveXObject -- old IE */ 2359 activeXDocument = document.domain && new ActiveXObject('htmlfile'); 2360 } catch (error) { /* ignore */ } 2361 NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame(); 2362 var length = enumBugKeys.length; 2363 while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; 2364 return NullProtoObject(); 2365}; 2366 2367hiddenKeys[IE_PROTO] = true; 2368 2369// `Object.create` method 2370// https://tc39.es/ecma262/#sec-object.create 2371module.exports = Object.create || function create(O, Properties) { 2372 var result; 2373 if (O !== null) { 2374 EmptyConstructor[PROTOTYPE] = anObject(O); 2375 result = new EmptyConstructor(); 2376 EmptyConstructor[PROTOTYPE] = null; 2377 // add "__proto__" for Object.getPrototypeOf polyfill 2378 result[IE_PROTO] = O; 2379 } else result = NullProtoObject(); 2380 return Properties === undefined ? result : defineProperties(result, Properties); 2381}; 2382 2383 2384/***/ }), 2385 2386/***/ 6048: 2387/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2388 2389var DESCRIPTORS = __webpack_require__(9781); 2390var definePropertyModule = __webpack_require__(3070); 2391var anObject = __webpack_require__(9670); 2392var objectKeys = __webpack_require__(1956); 2393 2394// `Object.defineProperties` method 2395// https://tc39.es/ecma262/#sec-object.defineproperties 2396module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) { 2397 anObject(O); 2398 var keys = objectKeys(Properties); 2399 var length = keys.length; 2400 var index = 0; 2401 var key; 2402 while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]); 2403 return O; 2404}; 2405 2406 2407/***/ }), 2408 2409/***/ 3070: 2410/***/ (function(__unused_webpack_module, exports, __webpack_require__) { 2411 2412var DESCRIPTORS = __webpack_require__(9781); 2413var IE8_DOM_DEFINE = __webpack_require__(4664); 2414var anObject = __webpack_require__(9670); 2415var toPrimitive = __webpack_require__(7593); 2416 2417var nativeDefineProperty = Object.defineProperty; 2418 2419// `Object.defineProperty` method 2420// https://tc39.es/ecma262/#sec-object.defineproperty 2421exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) { 2422 anObject(O); 2423 P = toPrimitive(P, true); 2424 anObject(Attributes); 2425 if (IE8_DOM_DEFINE) try { 2426 return nativeDefineProperty(O, P, Attributes); 2427 } catch (error) { /* empty */ } 2428 if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); 2429 if ('value' in Attributes) O[P] = Attributes.value; 2430 return O; 2431}; 2432 2433 2434/***/ }), 2435 2436/***/ 1236: 2437/***/ (function(__unused_webpack_module, exports, __webpack_require__) { 2438 2439var DESCRIPTORS = __webpack_require__(9781); 2440var propertyIsEnumerableModule = __webpack_require__(5296); 2441var createPropertyDescriptor = __webpack_require__(9114); 2442var toIndexedObject = __webpack_require__(5656); 2443var toPrimitive = __webpack_require__(7593); 2444var has = __webpack_require__(6656); 2445var IE8_DOM_DEFINE = __webpack_require__(4664); 2446 2447var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; 2448 2449// `Object.getOwnPropertyDescriptor` method 2450// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor 2451exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { 2452 O = toIndexedObject(O); 2453 P = toPrimitive(P, true); 2454 if (IE8_DOM_DEFINE) try { 2455 return nativeGetOwnPropertyDescriptor(O, P); 2456 } catch (error) { /* empty */ } 2457 if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]); 2458}; 2459 2460 2461/***/ }), 2462 2463/***/ 8006: 2464/***/ (function(__unused_webpack_module, exports, __webpack_require__) { 2465 2466var internalObjectKeys = __webpack_require__(6324); 2467var enumBugKeys = __webpack_require__(748); 2468 2469var hiddenKeys = enumBugKeys.concat('length', 'prototype'); 2470 2471// `Object.getOwnPropertyNames` method 2472// https://tc39.es/ecma262/#sec-object.getownpropertynames 2473exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { 2474 return internalObjectKeys(O, hiddenKeys); 2475}; 2476 2477 2478/***/ }), 2479 2480/***/ 5181: 2481/***/ (function(__unused_webpack_module, exports) { 2482 2483exports.f = Object.getOwnPropertySymbols; 2484 2485 2486/***/ }), 2487 2488/***/ 9518: 2489/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2490 2491var has = __webpack_require__(6656); 2492var toObject = __webpack_require__(7908); 2493var sharedKey = __webpack_require__(6200); 2494var CORRECT_PROTOTYPE_GETTER = __webpack_require__(8544); 2495 2496var IE_PROTO = sharedKey('IE_PROTO'); 2497var ObjectPrototype = Object.prototype; 2498 2499// `Object.getPrototypeOf` method 2500// https://tc39.es/ecma262/#sec-object.getprototypeof 2501module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) { 2502 O = toObject(O); 2503 if (has(O, IE_PROTO)) return O[IE_PROTO]; 2504 if (typeof O.constructor == 'function' && O instanceof O.constructor) { 2505 return O.constructor.prototype; 2506 } return O instanceof Object ? ObjectPrototype : null; 2507}; 2508 2509 2510/***/ }), 2511 2512/***/ 6324: 2513/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2514 2515var has = __webpack_require__(6656); 2516var toIndexedObject = __webpack_require__(5656); 2517var indexOf = __webpack_require__(1318).indexOf; 2518var hiddenKeys = __webpack_require__(3501); 2519 2520module.exports = function (object, names) { 2521 var O = toIndexedObject(object); 2522 var i = 0; 2523 var result = []; 2524 var key; 2525 for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); 2526 // Don't enum bug & hidden keys 2527 while (names.length > i) if (has(O, key = names[i++])) { 2528 ~indexOf(result, key) || result.push(key); 2529 } 2530 return result; 2531}; 2532 2533 2534/***/ }), 2535 2536/***/ 1956: 2537/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2538 2539var internalObjectKeys = __webpack_require__(6324); 2540var enumBugKeys = __webpack_require__(748); 2541 2542// `Object.keys` method 2543// https://tc39.es/ecma262/#sec-object.keys 2544module.exports = Object.keys || function keys(O) { 2545 return internalObjectKeys(O, enumBugKeys); 2546}; 2547 2548 2549/***/ }), 2550 2551/***/ 5296: 2552/***/ (function(__unused_webpack_module, exports) { 2553 2554"use strict"; 2555 2556var nativePropertyIsEnumerable = {}.propertyIsEnumerable; 2557var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; 2558 2559// Nashorn ~ JDK8 bug 2560var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); 2561 2562// `Object.prototype.propertyIsEnumerable` method implementation 2563// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable 2564exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) { 2565 var descriptor = getOwnPropertyDescriptor(this, V); 2566 return !!descriptor && descriptor.enumerable; 2567} : nativePropertyIsEnumerable; 2568 2569 2570/***/ }), 2571 2572/***/ 7674: 2573/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2574 2575/* eslint-disable no-proto -- safe */ 2576var anObject = __webpack_require__(9670); 2577var aPossiblePrototype = __webpack_require__(6077); 2578 2579// `Object.setPrototypeOf` method 2580// https://tc39.es/ecma262/#sec-object.setprototypeof 2581// Works with __proto__ only. Old v8 can't work with null proto objects. 2582module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () { 2583 var CORRECT_SETTER = false; 2584 var test = {}; 2585 var setter; 2586 try { 2587 setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set; 2588 setter.call(test, []); 2589 CORRECT_SETTER = test instanceof Array; 2590 } catch (error) { /* empty */ } 2591 return function setPrototypeOf(O, proto) { 2592 anObject(O); 2593 aPossiblePrototype(proto); 2594 if (CORRECT_SETTER) setter.call(O, proto); 2595 else O.__proto__ = proto; 2596 return O; 2597 }; 2598}() : undefined); 2599 2600 2601/***/ }), 2602 2603/***/ 288: 2604/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2605 2606"use strict"; 2607 2608var TO_STRING_TAG_SUPPORT = __webpack_require__(1694); 2609var classof = __webpack_require__(648); 2610 2611// `Object.prototype.toString` method implementation 2612// https://tc39.es/ecma262/#sec-object.prototype.tostring 2613module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() { 2614 return '[object ' + classof(this) + ']'; 2615}; 2616 2617 2618/***/ }), 2619 2620/***/ 3887: 2621/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2622 2623var getBuiltIn = __webpack_require__(5005); 2624var getOwnPropertyNamesModule = __webpack_require__(8006); 2625var getOwnPropertySymbolsModule = __webpack_require__(5181); 2626var anObject = __webpack_require__(9670); 2627 2628// all object keys, includes non-enumerable and symbols 2629module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { 2630 var keys = getOwnPropertyNamesModule.f(anObject(it)); 2631 var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; 2632 return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; 2633}; 2634 2635 2636/***/ }), 2637 2638/***/ 857: 2639/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2640 2641var global = __webpack_require__(7854); 2642 2643module.exports = global; 2644 2645 2646/***/ }), 2647 2648/***/ 2248: 2649/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2650 2651var redefine = __webpack_require__(1320); 2652 2653module.exports = function (target, src, options) { 2654 for (var key in src) redefine(target, key, src[key], options); 2655 return target; 2656}; 2657 2658 2659/***/ }), 2660 2661/***/ 1320: 2662/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2663 2664var global = __webpack_require__(7854); 2665var createNonEnumerableProperty = __webpack_require__(8880); 2666var has = __webpack_require__(6656); 2667var setGlobal = __webpack_require__(3505); 2668var inspectSource = __webpack_require__(2788); 2669var InternalStateModule = __webpack_require__(9909); 2670 2671var getInternalState = InternalStateModule.get; 2672var enforceInternalState = InternalStateModule.enforce; 2673var TEMPLATE = String(String).split('String'); 2674 2675(module.exports = function (O, key, value, options) { 2676 var unsafe = options ? !!options.unsafe : false; 2677 var simple = options ? !!options.enumerable : false; 2678 var noTargetGet = options ? !!options.noTargetGet : false; 2679 var state; 2680 if (typeof value == 'function') { 2681 if (typeof key == 'string' && !has(value, 'name')) { 2682 createNonEnumerableProperty(value, 'name', key); 2683 } 2684 state = enforceInternalState(value); 2685 if (!state.source) { 2686 state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); 2687 } 2688 } 2689 if (O === global) { 2690 if (simple) O[key] = value; 2691 else setGlobal(key, value); 2692 return; 2693 } else if (!unsafe) { 2694 delete O[key]; 2695 } else if (!noTargetGet && O[key]) { 2696 simple = true; 2697 } 2698 if (simple) O[key] = value; 2699 else createNonEnumerableProperty(O, key, value); 2700// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative 2701})(Function.prototype, 'toString', function toString() { 2702 return typeof this == 'function' && getInternalState(this).source || inspectSource(this); 2703}); 2704 2705 2706/***/ }), 2707 2708/***/ 7651: 2709/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2710 2711var classof = __webpack_require__(4326); 2712var regexpExec = __webpack_require__(2261); 2713 2714// `RegExpExec` abstract operation 2715// https://tc39.es/ecma262/#sec-regexpexec 2716module.exports = function (R, S) { 2717 var exec = R.exec; 2718 if (typeof exec === 'function') { 2719 var result = exec.call(R, S); 2720 if (typeof result !== 'object') { 2721 throw TypeError('RegExp exec method returned something other than an Object or null'); 2722 } 2723 return result; 2724 } 2725 2726 if (classof(R) !== 'RegExp') { 2727 throw TypeError('RegExp#exec called on incompatible receiver'); 2728 } 2729 2730 return regexpExec.call(R, S); 2731}; 2732 2733 2734 2735/***/ }), 2736 2737/***/ 2261: 2738/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2739 2740"use strict"; 2741 2742var regexpFlags = __webpack_require__(7066); 2743var stickyHelpers = __webpack_require__(2999); 2744 2745var nativeExec = RegExp.prototype.exec; 2746// This always refers to the native implementation, because the 2747// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, 2748// which loads this file before patching the method. 2749var nativeReplace = String.prototype.replace; 2750 2751var patchedExec = nativeExec; 2752 2753var UPDATES_LAST_INDEX_WRONG = (function () { 2754 var re1 = /a/; 2755 var re2 = /b*/g; 2756 nativeExec.call(re1, 'a'); 2757 nativeExec.call(re2, 'a'); 2758 return re1.lastIndex !== 0 || re2.lastIndex !== 0; 2759})(); 2760 2761var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET; 2762 2763// nonparticipating capturing group, copied from es5-shim's String#split patch. 2764// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing 2765var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; 2766 2767var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y; 2768 2769if (PATCH) { 2770 patchedExec = function exec(str) { 2771 var re = this; 2772 var lastIndex, reCopy, match, i; 2773 var sticky = UNSUPPORTED_Y && re.sticky; 2774 var flags = regexpFlags.call(re); 2775 var source = re.source; 2776 var charsAdded = 0; 2777 var strCopy = str; 2778 2779 if (sticky) { 2780 flags = flags.replace('y', ''); 2781 if (flags.indexOf('g') === -1) { 2782 flags += 'g'; 2783 } 2784 2785 strCopy = String(str).slice(re.lastIndex); 2786 // Support anchored sticky behavior. 2787 if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) { 2788 source = '(?: ' + source + ')'; 2789 strCopy = ' ' + strCopy; 2790 charsAdded++; 2791 } 2792 // ^(? + rx + ) is needed, in combination with some str slicing, to 2793 // simulate the 'y' flag. 2794 reCopy = new RegExp('^(?:' + source + ')', flags); 2795 } 2796 2797 if (NPCG_INCLUDED) { 2798 reCopy = new RegExp('^' + source + '$(?!\\s)', flags); 2799 } 2800 if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; 2801 2802 match = nativeExec.call(sticky ? reCopy : re, strCopy); 2803 2804 if (sticky) { 2805 if (match) { 2806 match.input = match.input.slice(charsAdded); 2807 match[0] = match[0].slice(charsAdded); 2808 match.index = re.lastIndex; 2809 re.lastIndex += match[0].length; 2810 } else re.lastIndex = 0; 2811 } else if (UPDATES_LAST_INDEX_WRONG && match) { 2812 re.lastIndex = re.global ? match.index + match[0].length : lastIndex; 2813 } 2814 if (NPCG_INCLUDED && match && match.length > 1) { 2815 // Fix browsers whose `exec` methods don't consistently return `undefined` 2816 // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ 2817 nativeReplace.call(match[0], reCopy, function () { 2818 for (i = 1; i < arguments.length - 2; i++) { 2819 if (arguments[i] === undefined) match[i] = undefined; 2820 } 2821 }); 2822 } 2823 2824 return match; 2825 }; 2826} 2827 2828module.exports = patchedExec; 2829 2830 2831/***/ }), 2832 2833/***/ 7066: 2834/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2835 2836"use strict"; 2837 2838var anObject = __webpack_require__(9670); 2839 2840// `RegExp.prototype.flags` getter implementation 2841// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags 2842module.exports = function () { 2843 var that = anObject(this); 2844 var result = ''; 2845 if (that.global) result += 'g'; 2846 if (that.ignoreCase) result += 'i'; 2847 if (that.multiline) result += 'm'; 2848 if (that.dotAll) result += 's'; 2849 if (that.unicode) result += 'u'; 2850 if (that.sticky) result += 'y'; 2851 return result; 2852}; 2853 2854 2855/***/ }), 2856 2857/***/ 2999: 2858/***/ (function(__unused_webpack_module, exports, __webpack_require__) { 2859 2860"use strict"; 2861 2862 2863var fails = __webpack_require__(7293); 2864 2865// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError, 2866// so we use an intermediate function. 2867function RE(s, f) { 2868 return RegExp(s, f); 2869} 2870 2871exports.UNSUPPORTED_Y = fails(function () { 2872 // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError 2873 var re = RE('a', 'y'); 2874 re.lastIndex = 2; 2875 return re.exec('abcd') != null; 2876}); 2877 2878exports.BROKEN_CARET = fails(function () { 2879 // https://bugzilla.mozilla.org/show_bug.cgi?id=773687 2880 var re = RE('^r', 'gy'); 2881 re.lastIndex = 2; 2882 return re.exec('str') != null; 2883}); 2884 2885 2886/***/ }), 2887 2888/***/ 4488: 2889/***/ (function(module) { 2890 2891// `RequireObjectCoercible` abstract operation 2892// https://tc39.es/ecma262/#sec-requireobjectcoercible 2893module.exports = function (it) { 2894 if (it == undefined) throw TypeError("Can't call method on " + it); 2895 return it; 2896}; 2897 2898 2899/***/ }), 2900 2901/***/ 3505: 2902/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2903 2904var global = __webpack_require__(7854); 2905var createNonEnumerableProperty = __webpack_require__(8880); 2906 2907module.exports = function (key, value) { 2908 try { 2909 createNonEnumerableProperty(global, key, value); 2910 } catch (error) { 2911 global[key] = value; 2912 } return value; 2913}; 2914 2915 2916/***/ }), 2917 2918/***/ 6340: 2919/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2920 2921"use strict"; 2922 2923var getBuiltIn = __webpack_require__(5005); 2924var definePropertyModule = __webpack_require__(3070); 2925var wellKnownSymbol = __webpack_require__(5112); 2926var DESCRIPTORS = __webpack_require__(9781); 2927 2928var SPECIES = wellKnownSymbol('species'); 2929 2930module.exports = function (CONSTRUCTOR_NAME) { 2931 var Constructor = getBuiltIn(CONSTRUCTOR_NAME); 2932 var defineProperty = definePropertyModule.f; 2933 2934 if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) { 2935 defineProperty(Constructor, SPECIES, { 2936 configurable: true, 2937 get: function () { return this; } 2938 }); 2939 } 2940}; 2941 2942 2943/***/ }), 2944 2945/***/ 8003: 2946/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2947 2948var defineProperty = __webpack_require__(3070).f; 2949var has = __webpack_require__(6656); 2950var wellKnownSymbol = __webpack_require__(5112); 2951 2952var TO_STRING_TAG = wellKnownSymbol('toStringTag'); 2953 2954module.exports = function (it, TAG, STATIC) { 2955 if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) { 2956 defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG }); 2957 } 2958}; 2959 2960 2961/***/ }), 2962 2963/***/ 6200: 2964/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2965 2966var shared = __webpack_require__(2309); 2967var uid = __webpack_require__(9711); 2968 2969var keys = shared('keys'); 2970 2971module.exports = function (key) { 2972 return keys[key] || (keys[key] = uid(key)); 2973}; 2974 2975 2976/***/ }), 2977 2978/***/ 5465: 2979/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2980 2981var global = __webpack_require__(7854); 2982var setGlobal = __webpack_require__(3505); 2983 2984var SHARED = '__core-js_shared__'; 2985var store = global[SHARED] || setGlobal(SHARED, {}); 2986 2987module.exports = store; 2988 2989 2990/***/ }), 2991 2992/***/ 2309: 2993/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 2994 2995var IS_PURE = __webpack_require__(1913); 2996var store = __webpack_require__(5465); 2997 2998(module.exports = function (key, value) { 2999 return store[key] || (store[key] = value !== undefined ? value : {}); 3000})('versions', []).push({ 3001 version: '3.9.0', 3002 mode: IS_PURE ? 'pure' : 'global', 3003 copyright: '© 2021 Denis Pushkarev (zloirock.ru)' 3004}); 3005 3006 3007/***/ }), 3008 3009/***/ 6707: 3010/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3011 3012var anObject = __webpack_require__(9670); 3013var aFunction = __webpack_require__(3099); 3014var wellKnownSymbol = __webpack_require__(5112); 3015 3016var SPECIES = wellKnownSymbol('species'); 3017 3018// `SpeciesConstructor` abstract operation 3019// https://tc39.es/ecma262/#sec-speciesconstructor 3020module.exports = function (O, defaultConstructor) { 3021 var C = anObject(O).constructor; 3022 var S; 3023 return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S); 3024}; 3025 3026 3027/***/ }), 3028 3029/***/ 8710: 3030/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3031 3032var toInteger = __webpack_require__(9958); 3033var requireObjectCoercible = __webpack_require__(4488); 3034 3035// `String.prototype.{ codePointAt, at }` methods implementation 3036var createMethod = function (CONVERT_TO_STRING) { 3037 return function ($this, pos) { 3038 var S = String(requireObjectCoercible($this)); 3039 var position = toInteger(pos); 3040 var size = S.length; 3041 var first, second; 3042 if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; 3043 first = S.charCodeAt(position); 3044 return first < 0xD800 || first > 0xDBFF || position + 1 === size 3045 || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF 3046 ? CONVERT_TO_STRING ? S.charAt(position) : first 3047 : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; 3048 }; 3049}; 3050 3051module.exports = { 3052 // `String.prototype.codePointAt` method 3053 // https://tc39.es/ecma262/#sec-string.prototype.codepointat 3054 codeAt: createMethod(false), 3055 // `String.prototype.at` method 3056 // https://github.com/mathiasbynens/String.prototype.at 3057 charAt: createMethod(true) 3058}; 3059 3060 3061/***/ }), 3062 3063/***/ 3197: 3064/***/ (function(module) { 3065 3066"use strict"; 3067 3068// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js 3069var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 3070var base = 36; 3071var tMin = 1; 3072var tMax = 26; 3073var skew = 38; 3074var damp = 700; 3075var initialBias = 72; 3076var initialN = 128; // 0x80 3077var delimiter = '-'; // '\x2D' 3078var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars 3079var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators 3080var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process'; 3081var baseMinusTMin = base - tMin; 3082var floor = Math.floor; 3083var stringFromCharCode = String.fromCharCode; 3084 3085/** 3086 * Creates an array containing the numeric code points of each Unicode 3087 * character in the string. While JavaScript uses UCS-2 internally, 3088 * this function will convert a pair of surrogate halves (each of which 3089 * UCS-2 exposes as separate characters) into a single code point, 3090 * matching UTF-16. 3091 */ 3092var ucs2decode = function (string) { 3093 var output = []; 3094 var counter = 0; 3095 var length = string.length; 3096 while (counter < length) { 3097 var value = string.charCodeAt(counter++); 3098 if (value >= 0xD800 && value <= 0xDBFF && counter < length) { 3099 // It's a high surrogate, and there is a next character. 3100 var extra = string.charCodeAt(counter++); 3101 if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. 3102 output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); 3103 } else { 3104 // It's an unmatched surrogate; only append this code unit, in case the 3105 // next code unit is the high surrogate of a surrogate pair. 3106 output.push(value); 3107 counter--; 3108 } 3109 } else { 3110 output.push(value); 3111 } 3112 } 3113 return output; 3114}; 3115 3116/** 3117 * Converts a digit/integer into a basic code point. 3118 */ 3119var digitToBasic = function (digit) { 3120 // 0..25 map to ASCII a..z or A..Z 3121 // 26..35 map to ASCII 0..9 3122 return digit + 22 + 75 * (digit < 26); 3123}; 3124 3125/** 3126 * Bias adaptation function as per section 3.4 of RFC 3492. 3127 * https://tools.ietf.org/html/rfc3492#section-3.4 3128 */ 3129var adapt = function (delta, numPoints, firstTime) { 3130 var k = 0; 3131 delta = firstTime ? floor(delta / damp) : delta >> 1; 3132 delta += floor(delta / numPoints); 3133 for (; delta > baseMinusTMin * tMax >> 1; k += base) { 3134 delta = floor(delta / baseMinusTMin); 3135 } 3136 return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); 3137}; 3138 3139/** 3140 * Converts a string of Unicode symbols (e.g. a domain name label) to a 3141 * Punycode string of ASCII-only symbols. 3142 */ 3143// eslint-disable-next-line max-statements -- TODO 3144var encode = function (input) { 3145 var output = []; 3146 3147 // Convert the input in UCS-2 to an array of Unicode code points. 3148 input = ucs2decode(input); 3149 3150 // Cache the length. 3151 var inputLength = input.length; 3152 3153 // Initialize the state. 3154 var n = initialN; 3155 var delta = 0; 3156 var bias = initialBias; 3157 var i, currentValue; 3158 3159 // Handle the basic code points. 3160 for (i = 0; i < input.length; i++) { 3161 currentValue = input[i]; 3162 if (currentValue < 0x80) { 3163 output.push(stringFromCharCode(currentValue)); 3164 } 3165 } 3166 3167 var basicLength = output.length; // number of basic code points. 3168 var handledCPCount = basicLength; // number of code points that have been handled; 3169 3170 // Finish the basic string with a delimiter unless it's empty. 3171 if (basicLength) { 3172 output.push(delimiter); 3173 } 3174 3175 // Main encoding loop: 3176 while (handledCPCount < inputLength) { 3177 // All non-basic code points < n have been handled already. Find the next larger one: 3178 var m = maxInt; 3179 for (i = 0; i < input.length; i++) { 3180 currentValue = input[i]; 3181 if (currentValue >= n && currentValue < m) { 3182 m = currentValue; 3183 } 3184 } 3185 3186 // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow. 3187 var handledCPCountPlusOne = handledCPCount + 1; 3188 if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { 3189 throw RangeError(OVERFLOW_ERROR); 3190 } 3191 3192 delta += (m - n) * handledCPCountPlusOne; 3193 n = m; 3194 3195 for (i = 0; i < input.length; i++) { 3196 currentValue = input[i]; 3197 if (currentValue < n && ++delta > maxInt) { 3198 throw RangeError(OVERFLOW_ERROR); 3199 } 3200 if (currentValue == n) { 3201 // Represent delta as a generalized variable-length integer. 3202 var q = delta; 3203 for (var k = base; /* no condition */; k += base) { 3204 var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); 3205 if (q < t) break; 3206 var qMinusT = q - t; 3207 var baseMinusT = base - t; 3208 output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT))); 3209 q = floor(qMinusT / baseMinusT); 3210 } 3211 3212 output.push(stringFromCharCode(digitToBasic(q))); 3213 bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); 3214 delta = 0; 3215 ++handledCPCount; 3216 } 3217 } 3218 3219 ++delta; 3220 ++n; 3221 } 3222 return output.join(''); 3223}; 3224 3225module.exports = function (input) { 3226 var encoded = []; 3227 var labels = input.toLowerCase().replace(regexSeparators, '\u002E').split('.'); 3228 var i, label; 3229 for (i = 0; i < labels.length; i++) { 3230 label = labels[i]; 3231 encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label); 3232 } 3233 return encoded.join('.'); 3234}; 3235 3236 3237/***/ }), 3238 3239/***/ 6091: 3240/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3241 3242var fails = __webpack_require__(7293); 3243var whitespaces = __webpack_require__(1361); 3244 3245var non = '\u200B\u0085\u180E'; 3246 3247// check that a method works with the correct list 3248// of whitespaces and has a correct name 3249module.exports = function (METHOD_NAME) { 3250 return fails(function () { 3251 return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME; 3252 }); 3253}; 3254 3255 3256/***/ }), 3257 3258/***/ 3111: 3259/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3260 3261var requireObjectCoercible = __webpack_require__(4488); 3262var whitespaces = __webpack_require__(1361); 3263 3264var whitespace = '[' + whitespaces + ']'; 3265var ltrim = RegExp('^' + whitespace + whitespace + '*'); 3266var rtrim = RegExp(whitespace + whitespace + '*$'); 3267 3268// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation 3269var createMethod = function (TYPE) { 3270 return function ($this) { 3271 var string = String(requireObjectCoercible($this)); 3272 if (TYPE & 1) string = string.replace(ltrim, ''); 3273 if (TYPE & 2) string = string.replace(rtrim, ''); 3274 return string; 3275 }; 3276}; 3277 3278module.exports = { 3279 // `String.prototype.{ trimLeft, trimStart }` methods 3280 // https://tc39.es/ecma262/#sec-string.prototype.trimstart 3281 start: createMethod(1), 3282 // `String.prototype.{ trimRight, trimEnd }` methods 3283 // https://tc39.es/ecma262/#sec-string.prototype.trimend 3284 end: createMethod(2), 3285 // `String.prototype.trim` method 3286 // https://tc39.es/ecma262/#sec-string.prototype.trim 3287 trim: createMethod(3) 3288}; 3289 3290 3291/***/ }), 3292 3293/***/ 1400: 3294/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3295 3296var toInteger = __webpack_require__(9958); 3297 3298var max = Math.max; 3299var min = Math.min; 3300 3301// Helper for a popular repeating case of the spec: 3302// Let integer be ? ToInteger(index). 3303// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). 3304module.exports = function (index, length) { 3305 var integer = toInteger(index); 3306 return integer < 0 ? max(integer + length, 0) : min(integer, length); 3307}; 3308 3309 3310/***/ }), 3311 3312/***/ 7067: 3313/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3314 3315var toInteger = __webpack_require__(9958); 3316var toLength = __webpack_require__(7466); 3317 3318// `ToIndex` abstract operation 3319// https://tc39.es/ecma262/#sec-toindex 3320module.exports = function (it) { 3321 if (it === undefined) return 0; 3322 var number = toInteger(it); 3323 var length = toLength(number); 3324 if (number !== length) throw RangeError('Wrong length or index'); 3325 return length; 3326}; 3327 3328 3329/***/ }), 3330 3331/***/ 5656: 3332/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3333 3334// toObject with fallback for non-array-like ES3 strings 3335var IndexedObject = __webpack_require__(8361); 3336var requireObjectCoercible = __webpack_require__(4488); 3337 3338module.exports = function (it) { 3339 return IndexedObject(requireObjectCoercible(it)); 3340}; 3341 3342 3343/***/ }), 3344 3345/***/ 9958: 3346/***/ (function(module) { 3347 3348var ceil = Math.ceil; 3349var floor = Math.floor; 3350 3351// `ToInteger` abstract operation 3352// https://tc39.es/ecma262/#sec-tointeger 3353module.exports = function (argument) { 3354 return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); 3355}; 3356 3357 3358/***/ }), 3359 3360/***/ 7466: 3361/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3362 3363var toInteger = __webpack_require__(9958); 3364 3365var min = Math.min; 3366 3367// `ToLength` abstract operation 3368// https://tc39.es/ecma262/#sec-tolength 3369module.exports = function (argument) { 3370 return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 3371}; 3372 3373 3374/***/ }), 3375 3376/***/ 7908: 3377/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3378 3379var requireObjectCoercible = __webpack_require__(4488); 3380 3381// `ToObject` abstract operation 3382// https://tc39.es/ecma262/#sec-toobject 3383module.exports = function (argument) { 3384 return Object(requireObjectCoercible(argument)); 3385}; 3386 3387 3388/***/ }), 3389 3390/***/ 4590: 3391/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3392 3393var toPositiveInteger = __webpack_require__(3002); 3394 3395module.exports = function (it, BYTES) { 3396 var offset = toPositiveInteger(it); 3397 if (offset % BYTES) throw RangeError('Wrong offset'); 3398 return offset; 3399}; 3400 3401 3402/***/ }), 3403 3404/***/ 3002: 3405/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3406 3407var toInteger = __webpack_require__(9958); 3408 3409module.exports = function (it) { 3410 var result = toInteger(it); 3411 if (result < 0) throw RangeError("The argument can't be less than 0"); 3412 return result; 3413}; 3414 3415 3416/***/ }), 3417 3418/***/ 7593: 3419/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3420 3421var isObject = __webpack_require__(111); 3422 3423// `ToPrimitive` abstract operation 3424// https://tc39.es/ecma262/#sec-toprimitive 3425// instead of the ES6 spec version, we didn't implement @@toPrimitive case 3426// and the second argument - flag - preferred type is a string 3427module.exports = function (input, PREFERRED_STRING) { 3428 if (!isObject(input)) return input; 3429 var fn, val; 3430 if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; 3431 if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; 3432 if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; 3433 throw TypeError("Can't convert object to primitive value"); 3434}; 3435 3436 3437/***/ }), 3438 3439/***/ 1694: 3440/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3441 3442var wellKnownSymbol = __webpack_require__(5112); 3443 3444var TO_STRING_TAG = wellKnownSymbol('toStringTag'); 3445var test = {}; 3446 3447test[TO_STRING_TAG] = 'z'; 3448 3449module.exports = String(test) === '[object z]'; 3450 3451 3452/***/ }), 3453 3454/***/ 9843: 3455/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3456 3457"use strict"; 3458 3459var $ = __webpack_require__(2109); 3460var global = __webpack_require__(7854); 3461var DESCRIPTORS = __webpack_require__(9781); 3462var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(3832); 3463var ArrayBufferViewCore = __webpack_require__(260); 3464var ArrayBufferModule = __webpack_require__(3331); 3465var anInstance = __webpack_require__(5787); 3466var createPropertyDescriptor = __webpack_require__(9114); 3467var createNonEnumerableProperty = __webpack_require__(8880); 3468var toLength = __webpack_require__(7466); 3469var toIndex = __webpack_require__(7067); 3470var toOffset = __webpack_require__(4590); 3471var toPrimitive = __webpack_require__(7593); 3472var has = __webpack_require__(6656); 3473var classof = __webpack_require__(648); 3474var isObject = __webpack_require__(111); 3475var create = __webpack_require__(30); 3476var setPrototypeOf = __webpack_require__(7674); 3477var getOwnPropertyNames = __webpack_require__(8006).f; 3478var typedArrayFrom = __webpack_require__(7321); 3479var forEach = __webpack_require__(2092).forEach; 3480var setSpecies = __webpack_require__(6340); 3481var definePropertyModule = __webpack_require__(3070); 3482var getOwnPropertyDescriptorModule = __webpack_require__(1236); 3483var InternalStateModule = __webpack_require__(9909); 3484var inheritIfRequired = __webpack_require__(9587); 3485 3486var getInternalState = InternalStateModule.get; 3487var setInternalState = InternalStateModule.set; 3488var nativeDefineProperty = definePropertyModule.f; 3489var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; 3490var round = Math.round; 3491var RangeError = global.RangeError; 3492var ArrayBuffer = ArrayBufferModule.ArrayBuffer; 3493var DataView = ArrayBufferModule.DataView; 3494var NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS; 3495var TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG; 3496var TypedArray = ArrayBufferViewCore.TypedArray; 3497var TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype; 3498var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor; 3499var isTypedArray = ArrayBufferViewCore.isTypedArray; 3500var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; 3501var WRONG_LENGTH = 'Wrong length'; 3502 3503var fromList = function (C, list) { 3504 var index = 0; 3505 var length = list.length; 3506 var result = new (aTypedArrayConstructor(C))(length); 3507 while (length > index) result[index] = list[index++]; 3508 return result; 3509}; 3510 3511var addGetter = function (it, key) { 3512 nativeDefineProperty(it, key, { get: function () { 3513 return getInternalState(this)[key]; 3514 } }); 3515}; 3516 3517var isArrayBuffer = function (it) { 3518 var klass; 3519 return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer'; 3520}; 3521 3522var isTypedArrayIndex = function (target, key) { 3523 return isTypedArray(target) 3524 && typeof key != 'symbol' 3525 && key in target 3526 && String(+key) == String(key); 3527}; 3528 3529var wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) { 3530 return isTypedArrayIndex(target, key = toPrimitive(key, true)) 3531 ? createPropertyDescriptor(2, target[key]) 3532 : nativeGetOwnPropertyDescriptor(target, key); 3533}; 3534 3535var wrappedDefineProperty = function defineProperty(target, key, descriptor) { 3536 if (isTypedArrayIndex(target, key = toPrimitive(key, true)) 3537 && isObject(descriptor) 3538 && has(descriptor, 'value') 3539 && !has(descriptor, 'get') 3540 && !has(descriptor, 'set') 3541 // TODO: add validation descriptor w/o calling accessors 3542 && !descriptor.configurable 3543 && (!has(descriptor, 'writable') || descriptor.writable) 3544 && (!has(descriptor, 'enumerable') || descriptor.enumerable) 3545 ) { 3546 target[key] = descriptor.value; 3547 return target; 3548 } return nativeDefineProperty(target, key, descriptor); 3549}; 3550 3551if (DESCRIPTORS) { 3552 if (!NATIVE_ARRAY_BUFFER_VIEWS) { 3553 getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor; 3554 definePropertyModule.f = wrappedDefineProperty; 3555 addGetter(TypedArrayPrototype, 'buffer'); 3556 addGetter(TypedArrayPrototype, 'byteOffset'); 3557 addGetter(TypedArrayPrototype, 'byteLength'); 3558 addGetter(TypedArrayPrototype, 'length'); 3559 } 3560 3561 $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, { 3562 getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor, 3563 defineProperty: wrappedDefineProperty 3564 }); 3565 3566 module.exports = function (TYPE, wrapper, CLAMPED) { 3567 var BYTES = TYPE.match(/\d+$/)[0] / 8; 3568 var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array'; 3569 var GETTER = 'get' + TYPE; 3570 var SETTER = 'set' + TYPE; 3571 var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME]; 3572 var TypedArrayConstructor = NativeTypedArrayConstructor; 3573 var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype; 3574 var exported = {}; 3575 3576 var getter = function (that, index) { 3577 var data = getInternalState(that); 3578 return data.view[GETTER](index * BYTES + data.byteOffset, true); 3579 }; 3580 3581 var setter = function (that, index, value) { 3582 var data = getInternalState(that); 3583 if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF; 3584 data.view[SETTER](index * BYTES + data.byteOffset, value, true); 3585 }; 3586 3587 var addElement = function (that, index) { 3588 nativeDefineProperty(that, index, { 3589 get: function () { 3590 return getter(this, index); 3591 }, 3592 set: function (value) { 3593 return setter(this, index, value); 3594 }, 3595 enumerable: true 3596 }); 3597 }; 3598 3599 if (!NATIVE_ARRAY_BUFFER_VIEWS) { 3600 TypedArrayConstructor = wrapper(function (that, data, offset, $length) { 3601 anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME); 3602 var index = 0; 3603 var byteOffset = 0; 3604 var buffer, byteLength, length; 3605 if (!isObject(data)) { 3606 length = toIndex(data); 3607 byteLength = length * BYTES; 3608 buffer = new ArrayBuffer(byteLength); 3609 } else if (isArrayBuffer(data)) { 3610 buffer = data; 3611 byteOffset = toOffset(offset, BYTES); 3612 var $len = data.byteLength; 3613 if ($length === undefined) { 3614 if ($len % BYTES) throw RangeError(WRONG_LENGTH); 3615 byteLength = $len - byteOffset; 3616 if (byteLength < 0) throw RangeError(WRONG_LENGTH); 3617 } else { 3618 byteLength = toLength($length) * BYTES; 3619 if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH); 3620 } 3621 length = byteLength / BYTES; 3622 } else if (isTypedArray(data)) { 3623 return fromList(TypedArrayConstructor, data); 3624 } else { 3625 return typedArrayFrom.call(TypedArrayConstructor, data); 3626 } 3627 setInternalState(that, { 3628 buffer: buffer, 3629 byteOffset: byteOffset, 3630 byteLength: byteLength, 3631 length: length, 3632 view: new DataView(buffer) 3633 }); 3634 while (index < length) addElement(that, index++); 3635 }); 3636 3637 if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray); 3638 TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype); 3639 } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) { 3640 TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) { 3641 anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME); 3642 return inheritIfRequired(function () { 3643 if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data)); 3644 if (isArrayBuffer(data)) return $length !== undefined 3645 ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length) 3646 : typedArrayOffset !== undefined 3647 ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES)) 3648 : new NativeTypedArrayConstructor(data); 3649 if (isTypedArray(data)) return fromList(TypedArrayConstructor, data); 3650 return typedArrayFrom.call(TypedArrayConstructor, data); 3651 }(), dummy, TypedArrayConstructor); 3652 }); 3653 3654 if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray); 3655 forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) { 3656 if (!(key in TypedArrayConstructor)) { 3657 createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]); 3658 } 3659 }); 3660 TypedArrayConstructor.prototype = TypedArrayConstructorPrototype; 3661 } 3662 3663 if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) { 3664 createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor); 3665 } 3666 3667 if (TYPED_ARRAY_TAG) { 3668 createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME); 3669 } 3670 3671 exported[CONSTRUCTOR_NAME] = TypedArrayConstructor; 3672 3673 $({ 3674 global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS 3675 }, exported); 3676 3677 if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) { 3678 createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES); 3679 } 3680 3681 if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) { 3682 createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES); 3683 } 3684 3685 setSpecies(CONSTRUCTOR_NAME); 3686 }; 3687} else module.exports = function () { /* empty */ }; 3688 3689 3690/***/ }), 3691 3692/***/ 3832: 3693/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3694 3695/* eslint-disable no-new -- required for testing */ 3696var global = __webpack_require__(7854); 3697var fails = __webpack_require__(7293); 3698var checkCorrectnessOfIteration = __webpack_require__(7072); 3699var NATIVE_ARRAY_BUFFER_VIEWS = __webpack_require__(260).NATIVE_ARRAY_BUFFER_VIEWS; 3700 3701var ArrayBuffer = global.ArrayBuffer; 3702var Int8Array = global.Int8Array; 3703 3704module.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () { 3705 Int8Array(1); 3706}) || !fails(function () { 3707 new Int8Array(-1); 3708}) || !checkCorrectnessOfIteration(function (iterable) { 3709 new Int8Array(); 3710 new Int8Array(null); 3711 new Int8Array(1.5); 3712 new Int8Array(iterable); 3713}, true) || fails(function () { 3714 // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill 3715 return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1; 3716}); 3717 3718 3719/***/ }), 3720 3721/***/ 3074: 3722/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3723 3724var aTypedArrayConstructor = __webpack_require__(260).aTypedArrayConstructor; 3725var speciesConstructor = __webpack_require__(6707); 3726 3727module.exports = function (instance, list) { 3728 var C = speciesConstructor(instance, instance.constructor); 3729 var index = 0; 3730 var length = list.length; 3731 var result = new (aTypedArrayConstructor(C))(length); 3732 while (length > index) result[index] = list[index++]; 3733 return result; 3734}; 3735 3736 3737/***/ }), 3738 3739/***/ 7321: 3740/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3741 3742var toObject = __webpack_require__(7908); 3743var toLength = __webpack_require__(7466); 3744var getIteratorMethod = __webpack_require__(1246); 3745var isArrayIteratorMethod = __webpack_require__(7659); 3746var bind = __webpack_require__(9974); 3747var aTypedArrayConstructor = __webpack_require__(260).aTypedArrayConstructor; 3748 3749module.exports = function from(source /* , mapfn, thisArg */) { 3750 var O = toObject(source); 3751 var argumentsLength = arguments.length; 3752 var mapfn = argumentsLength > 1 ? arguments[1] : undefined; 3753 var mapping = mapfn !== undefined; 3754 var iteratorMethod = getIteratorMethod(O); 3755 var i, length, result, step, iterator, next; 3756 if (iteratorMethod != undefined && !isArrayIteratorMethod(iteratorMethod)) { 3757 iterator = iteratorMethod.call(O); 3758 next = iterator.next; 3759 O = []; 3760 while (!(step = next.call(iterator)).done) { 3761 O.push(step.value); 3762 } 3763 } 3764 if (mapping && argumentsLength > 2) { 3765 mapfn = bind(mapfn, arguments[2], 2); 3766 } 3767 length = toLength(O.length); 3768 result = new (aTypedArrayConstructor(this))(length); 3769 for (i = 0; length > i; i++) { 3770 result[i] = mapping ? mapfn(O[i], i) : O[i]; 3771 } 3772 return result; 3773}; 3774 3775 3776/***/ }), 3777 3778/***/ 9711: 3779/***/ (function(module) { 3780 3781var id = 0; 3782var postfix = Math.random(); 3783 3784module.exports = function (key) { 3785 return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); 3786}; 3787 3788 3789/***/ }), 3790 3791/***/ 3307: 3792/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3793 3794var NATIVE_SYMBOL = __webpack_require__(133); 3795 3796module.exports = NATIVE_SYMBOL 3797 /* global Symbol -- safe */ 3798 && !Symbol.sham 3799 && typeof Symbol.iterator == 'symbol'; 3800 3801 3802/***/ }), 3803 3804/***/ 5112: 3805/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3806 3807var global = __webpack_require__(7854); 3808var shared = __webpack_require__(2309); 3809var has = __webpack_require__(6656); 3810var uid = __webpack_require__(9711); 3811var NATIVE_SYMBOL = __webpack_require__(133); 3812var USE_SYMBOL_AS_UID = __webpack_require__(3307); 3813 3814var WellKnownSymbolsStore = shared('wks'); 3815var Symbol = global.Symbol; 3816var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid; 3817 3818module.exports = function (name) { 3819 if (!has(WellKnownSymbolsStore, name)) { 3820 if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name]; 3821 else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); 3822 } return WellKnownSymbolsStore[name]; 3823}; 3824 3825 3826/***/ }), 3827 3828/***/ 1361: 3829/***/ (function(module) { 3830 3831// a string of all valid unicode whitespaces 3832module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' + 3833 '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; 3834 3835 3836/***/ }), 3837 3838/***/ 8264: 3839/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 3840 3841"use strict"; 3842 3843var $ = __webpack_require__(2109); 3844var global = __webpack_require__(7854); 3845var arrayBufferModule = __webpack_require__(3331); 3846var setSpecies = __webpack_require__(6340); 3847 3848var ARRAY_BUFFER = 'ArrayBuffer'; 3849var ArrayBuffer = arrayBufferModule[ARRAY_BUFFER]; 3850var NativeArrayBuffer = global[ARRAY_BUFFER]; 3851 3852// `ArrayBuffer` constructor 3853// https://tc39.es/ecma262/#sec-arraybuffer-constructor 3854$({ global: true, forced: NativeArrayBuffer !== ArrayBuffer }, { 3855 ArrayBuffer: ArrayBuffer 3856}); 3857 3858setSpecies(ARRAY_BUFFER); 3859 3860 3861/***/ }), 3862 3863/***/ 2222: 3864/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 3865 3866"use strict"; 3867 3868var $ = __webpack_require__(2109); 3869var fails = __webpack_require__(7293); 3870var isArray = __webpack_require__(3157); 3871var isObject = __webpack_require__(111); 3872var toObject = __webpack_require__(7908); 3873var toLength = __webpack_require__(7466); 3874var createProperty = __webpack_require__(6135); 3875var arraySpeciesCreate = __webpack_require__(5417); 3876var arrayMethodHasSpeciesSupport = __webpack_require__(1194); 3877var wellKnownSymbol = __webpack_require__(5112); 3878var V8_VERSION = __webpack_require__(7392); 3879 3880var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); 3881var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; 3882var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; 3883 3884// We can't use this feature detection in V8 since it causes 3885// deoptimization and serious performance degradation 3886// https://github.com/zloirock/core-js/issues/679 3887var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () { 3888 var array = []; 3889 array[IS_CONCAT_SPREADABLE] = false; 3890 return array.concat()[0] !== array; 3891}); 3892 3893var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); 3894 3895var isConcatSpreadable = function (O) { 3896 if (!isObject(O)) return false; 3897 var spreadable = O[IS_CONCAT_SPREADABLE]; 3898 return spreadable !== undefined ? !!spreadable : isArray(O); 3899}; 3900 3901var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; 3902 3903// `Array.prototype.concat` method 3904// https://tc39.es/ecma262/#sec-array.prototype.concat 3905// with adding support of @@isConcatSpreadable and @@species 3906$({ target: 'Array', proto: true, forced: FORCED }, { 3907 // eslint-disable-next-line no-unused-vars -- required for `.length` 3908 concat: function concat(arg) { 3909 var O = toObject(this); 3910 var A = arraySpeciesCreate(O, 0); 3911 var n = 0; 3912 var i, k, length, len, E; 3913 for (i = -1, length = arguments.length; i < length; i++) { 3914 E = i === -1 ? O : arguments[i]; 3915 if (isConcatSpreadable(E)) { 3916 len = toLength(E.length); 3917 if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); 3918 for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); 3919 } else { 3920 if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); 3921 createProperty(A, n++, E); 3922 } 3923 } 3924 A.length = n; 3925 return A; 3926 } 3927}); 3928 3929 3930/***/ }), 3931 3932/***/ 7327: 3933/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 3934 3935"use strict"; 3936 3937var $ = __webpack_require__(2109); 3938var $filter = __webpack_require__(2092).filter; 3939var arrayMethodHasSpeciesSupport = __webpack_require__(1194); 3940 3941var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter'); 3942 3943// `Array.prototype.filter` method 3944// https://tc39.es/ecma262/#sec-array.prototype.filter 3945// with adding support of @@species 3946$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { 3947 filter: function filter(callbackfn /* , thisArg */) { 3948 return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); 3949 } 3950}); 3951 3952 3953/***/ }), 3954 3955/***/ 2772: 3956/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 3957 3958"use strict"; 3959 3960var $ = __webpack_require__(2109); 3961var $indexOf = __webpack_require__(1318).indexOf; 3962var arrayMethodIsStrict = __webpack_require__(9341); 3963 3964var nativeIndexOf = [].indexOf; 3965 3966var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0; 3967var STRICT_METHOD = arrayMethodIsStrict('indexOf'); 3968 3969// `Array.prototype.indexOf` method 3970// https://tc39.es/ecma262/#sec-array.prototype.indexof 3971$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, { 3972 indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { 3973 return NEGATIVE_ZERO 3974 // convert -0 to +0 3975 ? nativeIndexOf.apply(this, arguments) || 0 3976 : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined); 3977 } 3978}); 3979 3980 3981/***/ }), 3982 3983/***/ 6992: 3984/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 3985 3986"use strict"; 3987 3988var toIndexedObject = __webpack_require__(5656); 3989var addToUnscopables = __webpack_require__(1223); 3990var Iterators = __webpack_require__(7497); 3991var InternalStateModule = __webpack_require__(9909); 3992var defineIterator = __webpack_require__(654); 3993 3994var ARRAY_ITERATOR = 'Array Iterator'; 3995var setInternalState = InternalStateModule.set; 3996var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR); 3997 3998// `Array.prototype.entries` method 3999// https://tc39.es/ecma262/#sec-array.prototype.entries 4000// `Array.prototype.keys` method 4001// https://tc39.es/ecma262/#sec-array.prototype.keys 4002// `Array.prototype.values` method 4003// https://tc39.es/ecma262/#sec-array.prototype.values 4004// `Array.prototype[@@iterator]` method 4005// https://tc39.es/ecma262/#sec-array.prototype-@@iterator 4006// `CreateArrayIterator` internal method 4007// https://tc39.es/ecma262/#sec-createarrayiterator 4008module.exports = defineIterator(Array, 'Array', function (iterated, kind) { 4009 setInternalState(this, { 4010 type: ARRAY_ITERATOR, 4011 target: toIndexedObject(iterated), // target 4012 index: 0, // next index 4013 kind: kind // kind 4014 }); 4015// `%ArrayIteratorPrototype%.next` method 4016// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next 4017}, function () { 4018 var state = getInternalState(this); 4019 var target = state.target; 4020 var kind = state.kind; 4021 var index = state.index++; 4022 if (!target || index >= target.length) { 4023 state.target = undefined; 4024 return { value: undefined, done: true }; 4025 } 4026 if (kind == 'keys') return { value: index, done: false }; 4027 if (kind == 'values') return { value: target[index], done: false }; 4028 return { value: [index, target[index]], done: false }; 4029}, 'values'); 4030 4031// argumentsList[@@iterator] is %ArrayProto_values% 4032// https://tc39.es/ecma262/#sec-createunmappedargumentsobject 4033// https://tc39.es/ecma262/#sec-createmappedargumentsobject 4034Iterators.Arguments = Iterators.Array; 4035 4036// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables 4037addToUnscopables('keys'); 4038addToUnscopables('values'); 4039addToUnscopables('entries'); 4040 4041 4042/***/ }), 4043 4044/***/ 1249: 4045/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4046 4047"use strict"; 4048 4049var $ = __webpack_require__(2109); 4050var $map = __webpack_require__(2092).map; 4051var arrayMethodHasSpeciesSupport = __webpack_require__(1194); 4052 4053var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map'); 4054 4055// `Array.prototype.map` method 4056// https://tc39.es/ecma262/#sec-array.prototype.map 4057// with adding support of @@species 4058$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { 4059 map: function map(callbackfn /* , thisArg */) { 4060 return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); 4061 } 4062}); 4063 4064 4065/***/ }), 4066 4067/***/ 7042: 4068/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4069 4070"use strict"; 4071 4072var $ = __webpack_require__(2109); 4073var isObject = __webpack_require__(111); 4074var isArray = __webpack_require__(3157); 4075var toAbsoluteIndex = __webpack_require__(1400); 4076var toLength = __webpack_require__(7466); 4077var toIndexedObject = __webpack_require__(5656); 4078var createProperty = __webpack_require__(6135); 4079var wellKnownSymbol = __webpack_require__(5112); 4080var arrayMethodHasSpeciesSupport = __webpack_require__(1194); 4081 4082var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice'); 4083 4084var SPECIES = wellKnownSymbol('species'); 4085var nativeSlice = [].slice; 4086var max = Math.max; 4087 4088// `Array.prototype.slice` method 4089// https://tc39.es/ecma262/#sec-array.prototype.slice 4090// fallback for not array-like ES3 strings and DOM objects 4091$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { 4092 slice: function slice(start, end) { 4093 var O = toIndexedObject(this); 4094 var length = toLength(O.length); 4095 var k = toAbsoluteIndex(start, length); 4096 var fin = toAbsoluteIndex(end === undefined ? length : end, length); 4097 // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible 4098 var Constructor, result, n; 4099 if (isArray(O)) { 4100 Constructor = O.constructor; 4101 // cross-realm fallback 4102 if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) { 4103 Constructor = undefined; 4104 } else if (isObject(Constructor)) { 4105 Constructor = Constructor[SPECIES]; 4106 if (Constructor === null) Constructor = undefined; 4107 } 4108 if (Constructor === Array || Constructor === undefined) { 4109 return nativeSlice.call(O, k, fin); 4110 } 4111 } 4112 result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0)); 4113 for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]); 4114 result.length = n; 4115 return result; 4116 } 4117}); 4118 4119 4120/***/ }), 4121 4122/***/ 561: 4123/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4124 4125"use strict"; 4126 4127var $ = __webpack_require__(2109); 4128var toAbsoluteIndex = __webpack_require__(1400); 4129var toInteger = __webpack_require__(9958); 4130var toLength = __webpack_require__(7466); 4131var toObject = __webpack_require__(7908); 4132var arraySpeciesCreate = __webpack_require__(5417); 4133var createProperty = __webpack_require__(6135); 4134var arrayMethodHasSpeciesSupport = __webpack_require__(1194); 4135 4136var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice'); 4137 4138var max = Math.max; 4139var min = Math.min; 4140var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; 4141var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded'; 4142 4143// `Array.prototype.splice` method 4144// https://tc39.es/ecma262/#sec-array.prototype.splice 4145// with adding support of @@species 4146$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { 4147 splice: function splice(start, deleteCount /* , ...items */) { 4148 var O = toObject(this); 4149 var len = toLength(O.length); 4150 var actualStart = toAbsoluteIndex(start, len); 4151 var argumentsLength = arguments.length; 4152 var insertCount, actualDeleteCount, A, k, from, to; 4153 if (argumentsLength === 0) { 4154 insertCount = actualDeleteCount = 0; 4155 } else if (argumentsLength === 1) { 4156 insertCount = 0; 4157 actualDeleteCount = len - actualStart; 4158 } else { 4159 insertCount = argumentsLength - 2; 4160 actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart); 4161 } 4162 if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) { 4163 throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED); 4164 } 4165 A = arraySpeciesCreate(O, actualDeleteCount); 4166 for (k = 0; k < actualDeleteCount; k++) { 4167 from = actualStart + k; 4168 if (from in O) createProperty(A, k, O[from]); 4169 } 4170 A.length = actualDeleteCount; 4171 if (insertCount < actualDeleteCount) { 4172 for (k = actualStart; k < len - actualDeleteCount; k++) { 4173 from = k + actualDeleteCount; 4174 to = k + insertCount; 4175 if (from in O) O[to] = O[from]; 4176 else delete O[to]; 4177 } 4178 for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1]; 4179 } else if (insertCount > actualDeleteCount) { 4180 for (k = len - actualDeleteCount; k > actualStart; k--) { 4181 from = k + actualDeleteCount - 1; 4182 to = k + insertCount - 1; 4183 if (from in O) O[to] = O[from]; 4184 else delete O[to]; 4185 } 4186 } 4187 for (k = 0; k < insertCount; k++) { 4188 O[k + actualStart] = arguments[k + 2]; 4189 } 4190 O.length = len - actualDeleteCount + insertCount; 4191 return A; 4192 } 4193}); 4194 4195 4196/***/ }), 4197 4198/***/ 8309: 4199/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4200 4201var DESCRIPTORS = __webpack_require__(9781); 4202var defineProperty = __webpack_require__(3070).f; 4203 4204var FunctionPrototype = Function.prototype; 4205var FunctionPrototypeToString = FunctionPrototype.toString; 4206var nameRE = /^\s*function ([^ (]*)/; 4207var NAME = 'name'; 4208 4209// Function instances `.name` property 4210// https://tc39.es/ecma262/#sec-function-instances-name 4211if (DESCRIPTORS && !(NAME in FunctionPrototype)) { 4212 defineProperty(FunctionPrototype, NAME, { 4213 configurable: true, 4214 get: function () { 4215 try { 4216 return FunctionPrototypeToString.call(this).match(nameRE)[1]; 4217 } catch (error) { 4218 return ''; 4219 } 4220 } 4221 }); 4222} 4223 4224 4225/***/ }), 4226 4227/***/ 489: 4228/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4229 4230var $ = __webpack_require__(2109); 4231var fails = __webpack_require__(7293); 4232var toObject = __webpack_require__(7908); 4233var nativeGetPrototypeOf = __webpack_require__(9518); 4234var CORRECT_PROTOTYPE_GETTER = __webpack_require__(8544); 4235 4236var FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); }); 4237 4238// `Object.getPrototypeOf` method 4239// https://tc39.es/ecma262/#sec-object.getprototypeof 4240$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, { 4241 getPrototypeOf: function getPrototypeOf(it) { 4242 return nativeGetPrototypeOf(toObject(it)); 4243 } 4244}); 4245 4246 4247 4248/***/ }), 4249 4250/***/ 1539: 4251/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4252 4253var TO_STRING_TAG_SUPPORT = __webpack_require__(1694); 4254var redefine = __webpack_require__(1320); 4255var toString = __webpack_require__(288); 4256 4257// `Object.prototype.toString` method 4258// https://tc39.es/ecma262/#sec-object.prototype.tostring 4259if (!TO_STRING_TAG_SUPPORT) { 4260 redefine(Object.prototype, 'toString', toString, { unsafe: true }); 4261} 4262 4263 4264/***/ }), 4265 4266/***/ 4916: 4267/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4268 4269"use strict"; 4270 4271var $ = __webpack_require__(2109); 4272var exec = __webpack_require__(2261); 4273 4274// `RegExp.prototype.exec` method 4275// https://tc39.es/ecma262/#sec-regexp.prototype.exec 4276$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, { 4277 exec: exec 4278}); 4279 4280 4281/***/ }), 4282 4283/***/ 9714: 4284/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4285 4286"use strict"; 4287 4288var redefine = __webpack_require__(1320); 4289var anObject = __webpack_require__(9670); 4290var fails = __webpack_require__(7293); 4291var flags = __webpack_require__(7066); 4292 4293var TO_STRING = 'toString'; 4294var RegExpPrototype = RegExp.prototype; 4295var nativeToString = RegExpPrototype[TO_STRING]; 4296 4297var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); 4298// FF44- RegExp#toString has a wrong name 4299var INCORRECT_NAME = nativeToString.name != TO_STRING; 4300 4301// `RegExp.prototype.toString` method 4302// https://tc39.es/ecma262/#sec-regexp.prototype.tostring 4303if (NOT_GENERIC || INCORRECT_NAME) { 4304 redefine(RegExp.prototype, TO_STRING, function toString() { 4305 var R = anObject(this); 4306 var p = String(R.source); 4307 var rf = R.flags; 4308 var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf); 4309 return '/' + p + '/' + f; 4310 }, { unsafe: true }); 4311} 4312 4313 4314/***/ }), 4315 4316/***/ 8783: 4317/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4318 4319"use strict"; 4320 4321var charAt = __webpack_require__(8710).charAt; 4322var InternalStateModule = __webpack_require__(9909); 4323var defineIterator = __webpack_require__(654); 4324 4325var STRING_ITERATOR = 'String Iterator'; 4326var setInternalState = InternalStateModule.set; 4327var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR); 4328 4329// `String.prototype[@@iterator]` method 4330// https://tc39.es/ecma262/#sec-string.prototype-@@iterator 4331defineIterator(String, 'String', function (iterated) { 4332 setInternalState(this, { 4333 type: STRING_ITERATOR, 4334 string: String(iterated), 4335 index: 0 4336 }); 4337// `%StringIteratorPrototype%.next` method 4338// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next 4339}, function next() { 4340 var state = getInternalState(this); 4341 var string = state.string; 4342 var index = state.index; 4343 var point; 4344 if (index >= string.length) return { value: undefined, done: true }; 4345 point = charAt(string, index); 4346 state.index += point.length; 4347 return { value: point, done: false }; 4348}); 4349 4350 4351/***/ }), 4352 4353/***/ 4723: 4354/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4355 4356"use strict"; 4357 4358var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007); 4359var anObject = __webpack_require__(9670); 4360var toLength = __webpack_require__(7466); 4361var requireObjectCoercible = __webpack_require__(4488); 4362var advanceStringIndex = __webpack_require__(1530); 4363var regExpExec = __webpack_require__(7651); 4364 4365// @@match logic 4366fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) { 4367 return [ 4368 // `String.prototype.match` method 4369 // https://tc39.es/ecma262/#sec-string.prototype.match 4370 function match(regexp) { 4371 var O = requireObjectCoercible(this); 4372 var matcher = regexp == undefined ? undefined : regexp[MATCH]; 4373 return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); 4374 }, 4375 // `RegExp.prototype[@@match]` method 4376 // https://tc39.es/ecma262/#sec-regexp.prototype-@@match 4377 function (regexp) { 4378 var res = maybeCallNative(nativeMatch, regexp, this); 4379 if (res.done) return res.value; 4380 4381 var rx = anObject(regexp); 4382 var S = String(this); 4383 4384 if (!rx.global) return regExpExec(rx, S); 4385 4386 var fullUnicode = rx.unicode; 4387 rx.lastIndex = 0; 4388 var A = []; 4389 var n = 0; 4390 var result; 4391 while ((result = regExpExec(rx, S)) !== null) { 4392 var matchStr = String(result[0]); 4393 A[n] = matchStr; 4394 if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); 4395 n++; 4396 } 4397 return n === 0 ? null : A; 4398 } 4399 ]; 4400}); 4401 4402 4403/***/ }), 4404 4405/***/ 5306: 4406/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4407 4408"use strict"; 4409 4410var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007); 4411var anObject = __webpack_require__(9670); 4412var toLength = __webpack_require__(7466); 4413var toInteger = __webpack_require__(9958); 4414var requireObjectCoercible = __webpack_require__(4488); 4415var advanceStringIndex = __webpack_require__(1530); 4416var getSubstitution = __webpack_require__(647); 4417var regExpExec = __webpack_require__(7651); 4418 4419var max = Math.max; 4420var min = Math.min; 4421 4422var maybeToString = function (it) { 4423 return it === undefined ? it : String(it); 4424}; 4425 4426// @@replace logic 4427fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) { 4428 var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE; 4429 var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0; 4430 var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0'; 4431 4432 return [ 4433 // `String.prototype.replace` method 4434 // https://tc39.es/ecma262/#sec-string.prototype.replace 4435 function replace(searchValue, replaceValue) { 4436 var O = requireObjectCoercible(this); 4437 var replacer = searchValue == undefined ? undefined : searchValue[REPLACE]; 4438 return replacer !== undefined 4439 ? replacer.call(searchValue, O, replaceValue) 4440 : nativeReplace.call(String(O), searchValue, replaceValue); 4441 }, 4442 // `RegExp.prototype[@@replace]` method 4443 // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace 4444 function (regexp, replaceValue) { 4445 if ( 4446 (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) || 4447 (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1) 4448 ) { 4449 var res = maybeCallNative(nativeReplace, regexp, this, replaceValue); 4450 if (res.done) return res.value; 4451 } 4452 4453 var rx = anObject(regexp); 4454 var S = String(this); 4455 4456 var functionalReplace = typeof replaceValue === 'function'; 4457 if (!functionalReplace) replaceValue = String(replaceValue); 4458 4459 var global = rx.global; 4460 if (global) { 4461 var fullUnicode = rx.unicode; 4462 rx.lastIndex = 0; 4463 } 4464 var results = []; 4465 while (true) { 4466 var result = regExpExec(rx, S); 4467 if (result === null) break; 4468 4469 results.push(result); 4470 if (!global) break; 4471 4472 var matchStr = String(result[0]); 4473 if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); 4474 } 4475 4476 var accumulatedResult = ''; 4477 var nextSourcePosition = 0; 4478 for (var i = 0; i < results.length; i++) { 4479 result = results[i]; 4480 4481 var matched = String(result[0]); 4482 var position = max(min(toInteger(result.index), S.length), 0); 4483 var captures = []; 4484 // NOTE: This is equivalent to 4485 // captures = result.slice(1).map(maybeToString) 4486 // but for some reason `nativeSlice.call(result, 1, result.length)` (called in 4487 // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and 4488 // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. 4489 for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); 4490 var namedCaptures = result.groups; 4491 if (functionalReplace) { 4492 var replacerArgs = [matched].concat(captures, position, S); 4493 if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); 4494 var replacement = String(replaceValue.apply(undefined, replacerArgs)); 4495 } else { 4496 replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); 4497 } 4498 if (position >= nextSourcePosition) { 4499 accumulatedResult += S.slice(nextSourcePosition, position) + replacement; 4500 nextSourcePosition = position + matched.length; 4501 } 4502 } 4503 return accumulatedResult + S.slice(nextSourcePosition); 4504 } 4505 ]; 4506}); 4507 4508 4509/***/ }), 4510 4511/***/ 3123: 4512/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4513 4514"use strict"; 4515 4516var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007); 4517var isRegExp = __webpack_require__(7850); 4518var anObject = __webpack_require__(9670); 4519var requireObjectCoercible = __webpack_require__(4488); 4520var speciesConstructor = __webpack_require__(6707); 4521var advanceStringIndex = __webpack_require__(1530); 4522var toLength = __webpack_require__(7466); 4523var callRegExpExec = __webpack_require__(7651); 4524var regexpExec = __webpack_require__(2261); 4525var fails = __webpack_require__(7293); 4526 4527var arrayPush = [].push; 4528var min = Math.min; 4529var MAX_UINT32 = 0xFFFFFFFF; 4530 4531// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError 4532var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); }); 4533 4534// @@split logic 4535fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) { 4536 var internalSplit; 4537 if ( 4538 'abbc'.split(/(b)*/)[1] == 'c' || 4539 // eslint-disable-next-line regexp/no-empty-group -- required for testing 4540 'test'.split(/(?:)/, -1).length != 4 || 4541 'ab'.split(/(?:ab)*/).length != 2 || 4542 '.'.split(/(.?)(.?)/).length != 4 || 4543 // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing 4544 '.'.split(/()()/).length > 1 || 4545 ''.split(/.?/).length 4546 ) { 4547 // based on es5-shim implementation, need to rework it 4548 internalSplit = function (separator, limit) { 4549 var string = String(requireObjectCoercible(this)); 4550 var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; 4551 if (lim === 0) return []; 4552 if (separator === undefined) return [string]; 4553 // If `separator` is not a regex, use native split 4554 if (!isRegExp(separator)) { 4555 return nativeSplit.call(string, separator, lim); 4556 } 4557 var output = []; 4558 var flags = (separator.ignoreCase ? 'i' : '') + 4559 (separator.multiline ? 'm' : '') + 4560 (separator.unicode ? 'u' : '') + 4561 (separator.sticky ? 'y' : ''); 4562 var lastLastIndex = 0; 4563 // Make `global` and avoid `lastIndex` issues by working with a copy 4564 var separatorCopy = new RegExp(separator.source, flags + 'g'); 4565 var match, lastIndex, lastLength; 4566 while (match = regexpExec.call(separatorCopy, string)) { 4567 lastIndex = separatorCopy.lastIndex; 4568 if (lastIndex > lastLastIndex) { 4569 output.push(string.slice(lastLastIndex, match.index)); 4570 if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1)); 4571 lastLength = match[0].length; 4572 lastLastIndex = lastIndex; 4573 if (output.length >= lim) break; 4574 } 4575 if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop 4576 } 4577 if (lastLastIndex === string.length) { 4578 if (lastLength || !separatorCopy.test('')) output.push(''); 4579 } else output.push(string.slice(lastLastIndex)); 4580 return output.length > lim ? output.slice(0, lim) : output; 4581 }; 4582 // Chakra, V8 4583 } else if ('0'.split(undefined, 0).length) { 4584 internalSplit = function (separator, limit) { 4585 return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit); 4586 }; 4587 } else internalSplit = nativeSplit; 4588 4589 return [ 4590 // `String.prototype.split` method 4591 // https://tc39.es/ecma262/#sec-string.prototype.split 4592 function split(separator, limit) { 4593 var O = requireObjectCoercible(this); 4594 var splitter = separator == undefined ? undefined : separator[SPLIT]; 4595 return splitter !== undefined 4596 ? splitter.call(separator, O, limit) 4597 : internalSplit.call(String(O), separator, limit); 4598 }, 4599 // `RegExp.prototype[@@split]` method 4600 // https://tc39.es/ecma262/#sec-regexp.prototype-@@split 4601 // 4602 // NOTE: This cannot be properly polyfilled in engines that don't support 4603 // the 'y' flag. 4604 function (regexp, limit) { 4605 var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit); 4606 if (res.done) return res.value; 4607 4608 var rx = anObject(regexp); 4609 var S = String(this); 4610 var C = speciesConstructor(rx, RegExp); 4611 4612 var unicodeMatching = rx.unicode; 4613 var flags = (rx.ignoreCase ? 'i' : '') + 4614 (rx.multiline ? 'm' : '') + 4615 (rx.unicode ? 'u' : '') + 4616 (SUPPORTS_Y ? 'y' : 'g'); 4617 4618 // ^(? + rx + ) is needed, in combination with some S slicing, to 4619 // simulate the 'y' flag. 4620 var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); 4621 var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; 4622 if (lim === 0) return []; 4623 if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; 4624 var p = 0; 4625 var q = 0; 4626 var A = []; 4627 while (q < S.length) { 4628 splitter.lastIndex = SUPPORTS_Y ? q : 0; 4629 var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); 4630 var e; 4631 if ( 4632 z === null || 4633 (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p 4634 ) { 4635 q = advanceStringIndex(S, q, unicodeMatching); 4636 } else { 4637 A.push(S.slice(p, q)); 4638 if (A.length === lim) return A; 4639 for (var i = 1; i <= z.length - 1; i++) { 4640 A.push(z[i]); 4641 if (A.length === lim) return A; 4642 } 4643 q = p = e; 4644 } 4645 } 4646 A.push(S.slice(p)); 4647 return A; 4648 } 4649 ]; 4650}, !SUPPORTS_Y); 4651 4652 4653/***/ }), 4654 4655/***/ 3210: 4656/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4657 4658"use strict"; 4659 4660var $ = __webpack_require__(2109); 4661var $trim = __webpack_require__(3111).trim; 4662var forcedStringTrimMethod = __webpack_require__(6091); 4663 4664// `String.prototype.trim` method 4665// https://tc39.es/ecma262/#sec-string.prototype.trim 4666$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, { 4667 trim: function trim() { 4668 return $trim(this); 4669 } 4670}); 4671 4672 4673/***/ }), 4674 4675/***/ 2990: 4676/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4677 4678"use strict"; 4679 4680var ArrayBufferViewCore = __webpack_require__(260); 4681var $copyWithin = __webpack_require__(1048); 4682 4683var aTypedArray = ArrayBufferViewCore.aTypedArray; 4684var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 4685 4686// `%TypedArray%.prototype.copyWithin` method 4687// https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin 4688exportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) { 4689 return $copyWithin.call(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined); 4690}); 4691 4692 4693/***/ }), 4694 4695/***/ 8927: 4696/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4697 4698"use strict"; 4699 4700var ArrayBufferViewCore = __webpack_require__(260); 4701var $every = __webpack_require__(2092).every; 4702 4703var aTypedArray = ArrayBufferViewCore.aTypedArray; 4704var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 4705 4706// `%TypedArray%.prototype.every` method 4707// https://tc39.es/ecma262/#sec-%typedarray%.prototype.every 4708exportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) { 4709 return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); 4710}); 4711 4712 4713/***/ }), 4714 4715/***/ 3105: 4716/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4717 4718"use strict"; 4719 4720var ArrayBufferViewCore = __webpack_require__(260); 4721var $fill = __webpack_require__(1285); 4722 4723var aTypedArray = ArrayBufferViewCore.aTypedArray; 4724var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 4725 4726// `%TypedArray%.prototype.fill` method 4727// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill 4728// eslint-disable-next-line no-unused-vars -- required for `.length` 4729exportTypedArrayMethod('fill', function fill(value /* , start, end */) { 4730 return $fill.apply(aTypedArray(this), arguments); 4731}); 4732 4733 4734/***/ }), 4735 4736/***/ 5035: 4737/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4738 4739"use strict"; 4740 4741var ArrayBufferViewCore = __webpack_require__(260); 4742var $filter = __webpack_require__(2092).filter; 4743var fromSpeciesAndList = __webpack_require__(3074); 4744 4745var aTypedArray = ArrayBufferViewCore.aTypedArray; 4746var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 4747 4748// `%TypedArray%.prototype.filter` method 4749// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter 4750exportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) { 4751 var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); 4752 return fromSpeciesAndList(this, list); 4753}); 4754 4755 4756/***/ }), 4757 4758/***/ 7174: 4759/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4760 4761"use strict"; 4762 4763var ArrayBufferViewCore = __webpack_require__(260); 4764var $findIndex = __webpack_require__(2092).findIndex; 4765 4766var aTypedArray = ArrayBufferViewCore.aTypedArray; 4767var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 4768 4769// `%TypedArray%.prototype.findIndex` method 4770// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex 4771exportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) { 4772 return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined); 4773}); 4774 4775 4776/***/ }), 4777 4778/***/ 4345: 4779/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4780 4781"use strict"; 4782 4783var ArrayBufferViewCore = __webpack_require__(260); 4784var $find = __webpack_require__(2092).find; 4785 4786var aTypedArray = ArrayBufferViewCore.aTypedArray; 4787var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 4788 4789// `%TypedArray%.prototype.find` method 4790// https://tc39.es/ecma262/#sec-%typedarray%.prototype.find 4791exportTypedArrayMethod('find', function find(predicate /* , thisArg */) { 4792 return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined); 4793}); 4794 4795 4796/***/ }), 4797 4798/***/ 2846: 4799/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4800 4801"use strict"; 4802 4803var ArrayBufferViewCore = __webpack_require__(260); 4804var $forEach = __webpack_require__(2092).forEach; 4805 4806var aTypedArray = ArrayBufferViewCore.aTypedArray; 4807var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 4808 4809// `%TypedArray%.prototype.forEach` method 4810// https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach 4811exportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) { 4812 $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); 4813}); 4814 4815 4816/***/ }), 4817 4818/***/ 4731: 4819/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4820 4821"use strict"; 4822 4823var ArrayBufferViewCore = __webpack_require__(260); 4824var $includes = __webpack_require__(1318).includes; 4825 4826var aTypedArray = ArrayBufferViewCore.aTypedArray; 4827var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 4828 4829// `%TypedArray%.prototype.includes` method 4830// https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes 4831exportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) { 4832 return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); 4833}); 4834 4835 4836/***/ }), 4837 4838/***/ 7209: 4839/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4840 4841"use strict"; 4842 4843var ArrayBufferViewCore = __webpack_require__(260); 4844var $indexOf = __webpack_require__(1318).indexOf; 4845 4846var aTypedArray = ArrayBufferViewCore.aTypedArray; 4847var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 4848 4849// `%TypedArray%.prototype.indexOf` method 4850// https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof 4851exportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) { 4852 return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); 4853}); 4854 4855 4856/***/ }), 4857 4858/***/ 6319: 4859/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4860 4861"use strict"; 4862 4863var global = __webpack_require__(7854); 4864var ArrayBufferViewCore = __webpack_require__(260); 4865var ArrayIterators = __webpack_require__(6992); 4866var wellKnownSymbol = __webpack_require__(5112); 4867 4868var ITERATOR = wellKnownSymbol('iterator'); 4869var Uint8Array = global.Uint8Array; 4870var arrayValues = ArrayIterators.values; 4871var arrayKeys = ArrayIterators.keys; 4872var arrayEntries = ArrayIterators.entries; 4873var aTypedArray = ArrayBufferViewCore.aTypedArray; 4874var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 4875var nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR]; 4876 4877var CORRECT_ITER_NAME = !!nativeTypedArrayIterator 4878 && (nativeTypedArrayIterator.name == 'values' || nativeTypedArrayIterator.name == undefined); 4879 4880var typedArrayValues = function values() { 4881 return arrayValues.call(aTypedArray(this)); 4882}; 4883 4884// `%TypedArray%.prototype.entries` method 4885// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries 4886exportTypedArrayMethod('entries', function entries() { 4887 return arrayEntries.call(aTypedArray(this)); 4888}); 4889// `%TypedArray%.prototype.keys` method 4890// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys 4891exportTypedArrayMethod('keys', function keys() { 4892 return arrayKeys.call(aTypedArray(this)); 4893}); 4894// `%TypedArray%.prototype.values` method 4895// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values 4896exportTypedArrayMethod('values', typedArrayValues, !CORRECT_ITER_NAME); 4897// `%TypedArray%.prototype[@@iterator]` method 4898// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator 4899exportTypedArrayMethod(ITERATOR, typedArrayValues, !CORRECT_ITER_NAME); 4900 4901 4902/***/ }), 4903 4904/***/ 8867: 4905/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4906 4907"use strict"; 4908 4909var ArrayBufferViewCore = __webpack_require__(260); 4910 4911var aTypedArray = ArrayBufferViewCore.aTypedArray; 4912var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 4913var $join = [].join; 4914 4915// `%TypedArray%.prototype.join` method 4916// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join 4917// eslint-disable-next-line no-unused-vars -- required for `.length` 4918exportTypedArrayMethod('join', function join(separator) { 4919 return $join.apply(aTypedArray(this), arguments); 4920}); 4921 4922 4923/***/ }), 4924 4925/***/ 7789: 4926/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4927 4928"use strict"; 4929 4930var ArrayBufferViewCore = __webpack_require__(260); 4931var $lastIndexOf = __webpack_require__(6583); 4932 4933var aTypedArray = ArrayBufferViewCore.aTypedArray; 4934var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 4935 4936// `%TypedArray%.prototype.lastIndexOf` method 4937// https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof 4938// eslint-disable-next-line no-unused-vars -- required for `.length` 4939exportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) { 4940 return $lastIndexOf.apply(aTypedArray(this), arguments); 4941}); 4942 4943 4944/***/ }), 4945 4946/***/ 3739: 4947/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4948 4949"use strict"; 4950 4951var ArrayBufferViewCore = __webpack_require__(260); 4952var $map = __webpack_require__(2092).map; 4953var speciesConstructor = __webpack_require__(6707); 4954 4955var aTypedArray = ArrayBufferViewCore.aTypedArray; 4956var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor; 4957var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 4958 4959// `%TypedArray%.prototype.map` method 4960// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map 4961exportTypedArrayMethod('map', function map(mapfn /* , thisArg */) { 4962 return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) { 4963 return new (aTypedArrayConstructor(speciesConstructor(O, O.constructor)))(length); 4964 }); 4965}); 4966 4967 4968/***/ }), 4969 4970/***/ 4483: 4971/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4972 4973"use strict"; 4974 4975var ArrayBufferViewCore = __webpack_require__(260); 4976var $reduceRight = __webpack_require__(3671).right; 4977 4978var aTypedArray = ArrayBufferViewCore.aTypedArray; 4979var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 4980 4981// `%TypedArray%.prototype.reduceRicht` method 4982// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright 4983exportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) { 4984 return $reduceRight(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); 4985}); 4986 4987 4988/***/ }), 4989 4990/***/ 9368: 4991/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 4992 4993"use strict"; 4994 4995var ArrayBufferViewCore = __webpack_require__(260); 4996var $reduce = __webpack_require__(3671).left; 4997 4998var aTypedArray = ArrayBufferViewCore.aTypedArray; 4999var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 5000 5001// `%TypedArray%.prototype.reduce` method 5002// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce 5003exportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) { 5004 return $reduce(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); 5005}); 5006 5007 5008/***/ }), 5009 5010/***/ 2056: 5011/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 5012 5013"use strict"; 5014 5015var ArrayBufferViewCore = __webpack_require__(260); 5016 5017var aTypedArray = ArrayBufferViewCore.aTypedArray; 5018var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 5019var floor = Math.floor; 5020 5021// `%TypedArray%.prototype.reverse` method 5022// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse 5023exportTypedArrayMethod('reverse', function reverse() { 5024 var that = this; 5025 var length = aTypedArray(that).length; 5026 var middle = floor(length / 2); 5027 var index = 0; 5028 var value; 5029 while (index < middle) { 5030 value = that[index]; 5031 that[index++] = that[--length]; 5032 that[length] = value; 5033 } return that; 5034}); 5035 5036 5037/***/ }), 5038 5039/***/ 3462: 5040/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 5041 5042"use strict"; 5043 5044var ArrayBufferViewCore = __webpack_require__(260); 5045var toLength = __webpack_require__(7466); 5046var toOffset = __webpack_require__(4590); 5047var toObject = __webpack_require__(7908); 5048var fails = __webpack_require__(7293); 5049 5050var aTypedArray = ArrayBufferViewCore.aTypedArray; 5051var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 5052 5053var FORCED = fails(function () { 5054 /* global Int8Array -- safe */ 5055 new Int8Array(1).set({}); 5056}); 5057 5058// `%TypedArray%.prototype.set` method 5059// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set 5060exportTypedArrayMethod('set', function set(arrayLike /* , offset */) { 5061 aTypedArray(this); 5062 var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1); 5063 var length = this.length; 5064 var src = toObject(arrayLike); 5065 var len = toLength(src.length); 5066 var index = 0; 5067 if (len + offset > length) throw RangeError('Wrong length'); 5068 while (index < len) this[offset + index] = src[index++]; 5069}, FORCED); 5070 5071 5072/***/ }), 5073 5074/***/ 678: 5075/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 5076 5077"use strict"; 5078 5079var ArrayBufferViewCore = __webpack_require__(260); 5080var speciesConstructor = __webpack_require__(6707); 5081var fails = __webpack_require__(7293); 5082 5083var aTypedArray = ArrayBufferViewCore.aTypedArray; 5084var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor; 5085var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 5086var $slice = [].slice; 5087 5088var FORCED = fails(function () { 5089 /* global Int8Array -- safe */ 5090 new Int8Array(1).slice(); 5091}); 5092 5093// `%TypedArray%.prototype.slice` method 5094// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice 5095exportTypedArrayMethod('slice', function slice(start, end) { 5096 var list = $slice.call(aTypedArray(this), start, end); 5097 var C = speciesConstructor(this, this.constructor); 5098 var index = 0; 5099 var length = list.length; 5100 var result = new (aTypedArrayConstructor(C))(length); 5101 while (length > index) result[index] = list[index++]; 5102 return result; 5103}, FORCED); 5104 5105 5106/***/ }), 5107 5108/***/ 7462: 5109/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 5110 5111"use strict"; 5112 5113var ArrayBufferViewCore = __webpack_require__(260); 5114var $some = __webpack_require__(2092).some; 5115 5116var aTypedArray = ArrayBufferViewCore.aTypedArray; 5117var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 5118 5119// `%TypedArray%.prototype.some` method 5120// https://tc39.es/ecma262/#sec-%typedarray%.prototype.some 5121exportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) { 5122 return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); 5123}); 5124 5125 5126/***/ }), 5127 5128/***/ 3824: 5129/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 5130 5131"use strict"; 5132 5133var ArrayBufferViewCore = __webpack_require__(260); 5134 5135var aTypedArray = ArrayBufferViewCore.aTypedArray; 5136var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 5137var $sort = [].sort; 5138 5139// `%TypedArray%.prototype.sort` method 5140// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort 5141exportTypedArrayMethod('sort', function sort(comparefn) { 5142 return $sort.call(aTypedArray(this), comparefn); 5143}); 5144 5145 5146/***/ }), 5147 5148/***/ 5021: 5149/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 5150 5151"use strict"; 5152 5153var ArrayBufferViewCore = __webpack_require__(260); 5154var toLength = __webpack_require__(7466); 5155var toAbsoluteIndex = __webpack_require__(1400); 5156var speciesConstructor = __webpack_require__(6707); 5157 5158var aTypedArray = ArrayBufferViewCore.aTypedArray; 5159var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 5160 5161// `%TypedArray%.prototype.subarray` method 5162// https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray 5163exportTypedArrayMethod('subarray', function subarray(begin, end) { 5164 var O = aTypedArray(this); 5165 var length = O.length; 5166 var beginIndex = toAbsoluteIndex(begin, length); 5167 return new (speciesConstructor(O, O.constructor))( 5168 O.buffer, 5169 O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT, 5170 toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex) 5171 ); 5172}); 5173 5174 5175/***/ }), 5176 5177/***/ 2974: 5178/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 5179 5180"use strict"; 5181 5182var global = __webpack_require__(7854); 5183var ArrayBufferViewCore = __webpack_require__(260); 5184var fails = __webpack_require__(7293); 5185 5186var Int8Array = global.Int8Array; 5187var aTypedArray = ArrayBufferViewCore.aTypedArray; 5188var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; 5189var $toLocaleString = [].toLocaleString; 5190var $slice = [].slice; 5191 5192// iOS Safari 6.x fails here 5193var TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () { 5194 $toLocaleString.call(new Int8Array(1)); 5195}); 5196 5197var FORCED = fails(function () { 5198 return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString(); 5199}) || !fails(function () { 5200 Int8Array.prototype.toLocaleString.call([1, 2]); 5201}); 5202 5203// `%TypedArray%.prototype.toLocaleString` method 5204// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring 5205exportTypedArrayMethod('toLocaleString', function toLocaleString() { 5206 return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments); 5207}, FORCED); 5208 5209 5210/***/ }), 5211 5212/***/ 5016: 5213/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 5214 5215"use strict"; 5216 5217var exportTypedArrayMethod = __webpack_require__(260).exportTypedArrayMethod; 5218var fails = __webpack_require__(7293); 5219var global = __webpack_require__(7854); 5220 5221var Uint8Array = global.Uint8Array; 5222var Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {}; 5223var arrayToString = [].toString; 5224var arrayJoin = [].join; 5225 5226if (fails(function () { arrayToString.call({}); })) { 5227 arrayToString = function toString() { 5228 return arrayJoin.call(this); 5229 }; 5230} 5231 5232var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString; 5233 5234// `%TypedArray%.prototype.toString` method 5235// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring 5236exportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD); 5237 5238 5239/***/ }), 5240 5241/***/ 2472: 5242/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 5243 5244var createTypedArrayConstructor = __webpack_require__(9843); 5245 5246// `Uint8Array` constructor 5247// https://tc39.es/ecma262/#sec-typedarray-objects 5248createTypedArrayConstructor('Uint8', function (init) { 5249 return function Uint8Array(data, byteOffset, length) { 5250 return init(this, data, byteOffset, length); 5251 }; 5252}); 5253 5254 5255/***/ }), 5256 5257/***/ 4747: 5258/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 5259 5260var global = __webpack_require__(7854); 5261var DOMIterables = __webpack_require__(8324); 5262var forEach = __webpack_require__(8533); 5263var createNonEnumerableProperty = __webpack_require__(8880); 5264 5265for (var COLLECTION_NAME in DOMIterables) { 5266 var Collection = global[COLLECTION_NAME]; 5267 var CollectionPrototype = Collection && Collection.prototype; 5268 // some Chrome versions have non-configurable methods on DOMTokenList 5269 if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try { 5270 createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach); 5271 } catch (error) { 5272 CollectionPrototype.forEach = forEach; 5273 } 5274} 5275 5276 5277/***/ }), 5278 5279/***/ 3948: 5280/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 5281 5282var global = __webpack_require__(7854); 5283var DOMIterables = __webpack_require__(8324); 5284var ArrayIteratorMethods = __webpack_require__(6992); 5285var createNonEnumerableProperty = __webpack_require__(8880); 5286var wellKnownSymbol = __webpack_require__(5112); 5287 5288var ITERATOR = wellKnownSymbol('iterator'); 5289var TO_STRING_TAG = wellKnownSymbol('toStringTag'); 5290var ArrayValues = ArrayIteratorMethods.values; 5291 5292for (var COLLECTION_NAME in DOMIterables) { 5293 var Collection = global[COLLECTION_NAME]; 5294 var CollectionPrototype = Collection && Collection.prototype; 5295 if (CollectionPrototype) { 5296 // some Chrome versions have non-configurable methods on DOMTokenList 5297 if (CollectionPrototype[ITERATOR] !== ArrayValues) try { 5298 createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues); 5299 } catch (error) { 5300 CollectionPrototype[ITERATOR] = ArrayValues; 5301 } 5302 if (!CollectionPrototype[TO_STRING_TAG]) { 5303 createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME); 5304 } 5305 if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) { 5306 // some Chrome versions have non-configurable methods on DOMTokenList 5307 if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try { 5308 createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]); 5309 } catch (error) { 5310 CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME]; 5311 } 5312 } 5313 } 5314} 5315 5316 5317/***/ }), 5318 5319/***/ 1637: 5320/***/ (function(module, __unused_webpack_exports, __webpack_require__) { 5321 5322"use strict"; 5323 5324// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` 5325__webpack_require__(6992); 5326var $ = __webpack_require__(2109); 5327var getBuiltIn = __webpack_require__(5005); 5328var USE_NATIVE_URL = __webpack_require__(590); 5329var redefine = __webpack_require__(1320); 5330var redefineAll = __webpack_require__(2248); 5331var setToStringTag = __webpack_require__(8003); 5332var createIteratorConstructor = __webpack_require__(4994); 5333var InternalStateModule = __webpack_require__(9909); 5334var anInstance = __webpack_require__(5787); 5335var hasOwn = __webpack_require__(6656); 5336var bind = __webpack_require__(9974); 5337var classof = __webpack_require__(648); 5338var anObject = __webpack_require__(9670); 5339var isObject = __webpack_require__(111); 5340var create = __webpack_require__(30); 5341var createPropertyDescriptor = __webpack_require__(9114); 5342var getIterator = __webpack_require__(8554); 5343var getIteratorMethod = __webpack_require__(1246); 5344var wellKnownSymbol = __webpack_require__(5112); 5345 5346var $fetch = getBuiltIn('fetch'); 5347var Headers = getBuiltIn('Headers'); 5348var ITERATOR = wellKnownSymbol('iterator'); 5349var URL_SEARCH_PARAMS = 'URLSearchParams'; 5350var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator'; 5351var setInternalState = InternalStateModule.set; 5352var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS); 5353var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR); 5354 5355var plus = /\+/g; 5356var sequences = Array(4); 5357 5358var percentSequence = function (bytes) { 5359 return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi')); 5360}; 5361 5362var percentDecode = function (sequence) { 5363 try { 5364 return decodeURIComponent(sequence); 5365 } catch (error) { 5366 return sequence; 5367 } 5368}; 5369 5370var deserialize = function (it) { 5371 var result = it.replace(plus, ' '); 5372 var bytes = 4; 5373 try { 5374 return decodeURIComponent(result); 5375 } catch (error) { 5376 while (bytes) { 5377 result = result.replace(percentSequence(bytes--), percentDecode); 5378 } 5379 return result; 5380 } 5381}; 5382 5383var find = /[!'()~]|%20/g; 5384 5385var replace = { 5386 '!': '%21', 5387 "'": '%27', 5388 '(': '%28', 5389 ')': '%29', 5390 '~': '%7E', 5391 '%20': '+' 5392}; 5393 5394var replacer = function (match) { 5395 return replace[match]; 5396}; 5397 5398var serialize = function (it) { 5399 return encodeURIComponent(it).replace(find, replacer); 5400}; 5401 5402var parseSearchParams = function (result, query) { 5403 if (query) { 5404 var attributes = query.split('&'); 5405 var index = 0; 5406 var attribute, entry; 5407 while (index < attributes.length) { 5408 attribute = attributes[index++]; 5409 if (attribute.length) { 5410 entry = attribute.split('='); 5411 result.push({ 5412 key: deserialize(entry.shift()), 5413 value: deserialize(entry.join('=')) 5414 }); 5415 } 5416 } 5417 } 5418}; 5419 5420var updateSearchParams = function (query) { 5421 this.entries.length = 0; 5422 parseSearchParams(this.entries, query); 5423}; 5424 5425var validateArgumentsLength = function (passed, required) { 5426 if (passed < required) throw TypeError('Not enough arguments'); 5427}; 5428 5429var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) { 5430 setInternalState(this, { 5431 type: URL_SEARCH_PARAMS_ITERATOR, 5432 iterator: getIterator(getInternalParamsState(params).entries), 5433 kind: kind 5434 }); 5435}, 'Iterator', function next() { 5436 var state = getInternalIteratorState(this); 5437 var kind = state.kind; 5438 var step = state.iterator.next(); 5439 var entry = step.value; 5440 if (!step.done) { 5441 step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value]; 5442 } return step; 5443}); 5444 5445// `URLSearchParams` constructor 5446// https://url.spec.whatwg.org/#interface-urlsearchparams 5447var URLSearchParamsConstructor = function URLSearchParams(/* init */) { 5448 anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS); 5449 var init = arguments.length > 0 ? arguments[0] : undefined; 5450 var that = this; 5451 var entries = []; 5452 var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key; 5453 5454 setInternalState(that, { 5455 type: URL_SEARCH_PARAMS, 5456 entries: entries, 5457 updateURL: function () { /* empty */ }, 5458 updateSearchParams: updateSearchParams 5459 }); 5460 5461 if (init !== undefined) { 5462 if (isObject(init)) { 5463 iteratorMethod = getIteratorMethod(init); 5464 if (typeof iteratorMethod === 'function') { 5465 iterator = iteratorMethod.call(init); 5466 next = iterator.next; 5467 while (!(step = next.call(iterator)).done) { 5468 entryIterator = getIterator(anObject(step.value)); 5469 entryNext = entryIterator.next; 5470 if ( 5471 (first = entryNext.call(entryIterator)).done || 5472 (second = entryNext.call(entryIterator)).done || 5473 !entryNext.call(entryIterator).done 5474 ) throw TypeError('Expected sequence with length 2'); 5475 entries.push({ key: first.value + '', value: second.value + '' }); 5476 } 5477 } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' }); 5478 } else { 5479 parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + ''); 5480 } 5481 } 5482}; 5483 5484var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype; 5485 5486redefineAll(URLSearchParamsPrototype, { 5487 // `URLSearchParams.prototype.append` method 5488 // https://url.spec.whatwg.org/#dom-urlsearchparams-append 5489 append: function append(name, value) { 5490 validateArgumentsLength(arguments.length, 2); 5491 var state = getInternalParamsState(this); 5492 state.entries.push({ key: name + '', value: value + '' }); 5493 state.updateURL(); 5494 }, 5495 // `URLSearchParams.prototype.delete` method 5496 // https://url.spec.whatwg.org/#dom-urlsearchparams-delete 5497 'delete': function (name) { 5498 validateArgumentsLength(arguments.length, 1); 5499 var state = getInternalParamsState(this); 5500 var entries = state.entries; 5501 var key = name + ''; 5502 var index = 0; 5503 while (index < entries.length) { 5504 if (entries[index].key === key) entries.splice(index, 1); 5505 else index++; 5506 } 5507 state.updateURL(); 5508 }, 5509 // `URLSearchParams.prototype.get` method 5510 // https://url.spec.whatwg.org/#dom-urlsearchparams-get 5511 get: function get(name) { 5512 validateArgumentsLength(arguments.length, 1); 5513 var entries = getInternalParamsState(this).entries; 5514 var key = name + ''; 5515 var index = 0; 5516 for (; index < entries.length; index++) { 5517 if (entries[index].key === key) return entries[index].value; 5518 } 5519 return null; 5520 }, 5521 // `URLSearchParams.prototype.getAll` method 5522 // https://url.spec.whatwg.org/#dom-urlsearchparams-getall 5523 getAll: function getAll(name) { 5524 validateArgumentsLength(arguments.length, 1); 5525 var entries = getInternalParamsState(this).entries; 5526 var key = name + ''; 5527 var result = []; 5528 var index = 0; 5529 for (; index < entries.length; index++) { 5530 if (entries[index].key === key) result.push(entries[index].value); 5531 } 5532 return result; 5533 }, 5534 // `URLSearchParams.prototype.has` method 5535 // https://url.spec.whatwg.org/#dom-urlsearchparams-has 5536 has: function has(name) { 5537 validateArgumentsLength(arguments.length, 1); 5538 var entries = getInternalParamsState(this).entries; 5539 var key = name + ''; 5540 var index = 0; 5541 while (index < entries.length) { 5542 if (entries[index++].key === key) return true; 5543 } 5544 return false; 5545 }, 5546 // `URLSearchParams.prototype.set` method 5547 // https://url.spec.whatwg.org/#dom-urlsearchparams-set 5548 set: function set(name, value) { 5549 validateArgumentsLength(arguments.length, 1); 5550 var state = getInternalParamsState(this); 5551 var entries = state.entries; 5552 var found = false; 5553 var key = name + ''; 5554 var val = value + ''; 5555 var index = 0; 5556 var entry; 5557 for (; index < entries.length; index++) { 5558 entry = entries[index]; 5559 if (entry.key === key) { 5560 if (found) entries.splice(index--, 1); 5561 else { 5562 found = true; 5563 entry.value = val; 5564 } 5565 } 5566 } 5567 if (!found) entries.push({ key: key, value: val }); 5568 state.updateURL(); 5569 }, 5570 // `URLSearchParams.prototype.sort` method 5571 // https://url.spec.whatwg.org/#dom-urlsearchparams-sort 5572 sort: function sort() { 5573 var state = getInternalParamsState(this); 5574 var entries = state.entries; 5575 // Array#sort is not stable in some engines 5576 var slice = entries.slice(); 5577 var entry, entriesIndex, sliceIndex; 5578 entries.length = 0; 5579 for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) { 5580 entry = slice[sliceIndex]; 5581 for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) { 5582 if (entries[entriesIndex].key > entry.key) { 5583 entries.splice(entriesIndex, 0, entry); 5584 break; 5585 } 5586 } 5587 if (entriesIndex === sliceIndex) entries.push(entry); 5588 } 5589 state.updateURL(); 5590 }, 5591 // `URLSearchParams.prototype.forEach` method 5592 forEach: function forEach(callback /* , thisArg */) { 5593 var entries = getInternalParamsState(this).entries; 5594 var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3); 5595 var index = 0; 5596 var entry; 5597 while (index < entries.length) { 5598 entry = entries[index++]; 5599 boundFunction(entry.value, entry.key, this); 5600 } 5601 }, 5602 // `URLSearchParams.prototype.keys` method 5603 keys: function keys() { 5604 return new URLSearchParamsIterator(this, 'keys'); 5605 }, 5606 // `URLSearchParams.prototype.values` method 5607 values: function values() { 5608 return new URLSearchParamsIterator(this, 'values'); 5609 }, 5610 // `URLSearchParams.prototype.entries` method 5611 entries: function entries() { 5612 return new URLSearchParamsIterator(this, 'entries'); 5613 } 5614}, { enumerable: true }); 5615 5616// `URLSearchParams.prototype[@@iterator]` method 5617redefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries); 5618 5619// `URLSearchParams.prototype.toString` method 5620// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior 5621redefine(URLSearchParamsPrototype, 'toString', function toString() { 5622 var entries = getInternalParamsState(this).entries; 5623 var result = []; 5624 var index = 0; 5625 var entry; 5626 while (index < entries.length) { 5627 entry = entries[index++]; 5628 result.push(serialize(entry.key) + '=' + serialize(entry.value)); 5629 } return result.join('&'); 5630}, { enumerable: true }); 5631 5632setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS); 5633 5634$({ global: true, forced: !USE_NATIVE_URL }, { 5635 URLSearchParams: URLSearchParamsConstructor 5636}); 5637 5638// Wrap `fetch` for correct work with polyfilled `URLSearchParams` 5639// https://github.com/zloirock/core-js/issues/674 5640if (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') { 5641 $({ global: true, enumerable: true, forced: true }, { 5642 fetch: function fetch(input /* , init */) { 5643 var args = [input]; 5644 var init, body, headers; 5645 if (arguments.length > 1) { 5646 init = arguments[1]; 5647 if (isObject(init)) { 5648 body = init.body; 5649 if (classof(body) === URL_SEARCH_PARAMS) { 5650 headers = init.headers ? new Headers(init.headers) : new Headers(); 5651 if (!headers.has('content-type')) { 5652 headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8'); 5653 } 5654 init = create(init, { 5655 body: createPropertyDescriptor(0, String(body)), 5656 headers: createPropertyDescriptor(0, headers) 5657 }); 5658 } 5659 } 5660 args.push(init); 5661 } return $fetch.apply(this, args); 5662 } 5663 }); 5664} 5665 5666module.exports = { 5667 URLSearchParams: URLSearchParamsConstructor, 5668 getState: getInternalParamsState 5669}; 5670 5671 5672/***/ }), 5673 5674/***/ 285: 5675/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 5676 5677"use strict"; 5678 5679// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` 5680__webpack_require__(8783); 5681var $ = __webpack_require__(2109); 5682var DESCRIPTORS = __webpack_require__(9781); 5683var USE_NATIVE_URL = __webpack_require__(590); 5684var global = __webpack_require__(7854); 5685var defineProperties = __webpack_require__(6048); 5686var redefine = __webpack_require__(1320); 5687var anInstance = __webpack_require__(5787); 5688var has = __webpack_require__(6656); 5689var assign = __webpack_require__(1574); 5690var arrayFrom = __webpack_require__(8457); 5691var codeAt = __webpack_require__(8710).codeAt; 5692var toASCII = __webpack_require__(3197); 5693var setToStringTag = __webpack_require__(8003); 5694var URLSearchParamsModule = __webpack_require__(1637); 5695var InternalStateModule = __webpack_require__(9909); 5696 5697var NativeURL = global.URL; 5698var URLSearchParams = URLSearchParamsModule.URLSearchParams; 5699var getInternalSearchParamsState = URLSearchParamsModule.getState; 5700var setInternalState = InternalStateModule.set; 5701var getInternalURLState = InternalStateModule.getterFor('URL'); 5702var floor = Math.floor; 5703var pow = Math.pow; 5704 5705var INVALID_AUTHORITY = 'Invalid authority'; 5706var INVALID_SCHEME = 'Invalid scheme'; 5707var INVALID_HOST = 'Invalid host'; 5708var INVALID_PORT = 'Invalid port'; 5709 5710var ALPHA = /[A-Za-z]/; 5711var ALPHANUMERIC = /[\d+-.A-Za-z]/; 5712var DIGIT = /\d/; 5713var HEX_START = /^(0x|0X)/; 5714var OCT = /^[0-7]+$/; 5715var DEC = /^\d+$/; 5716var HEX = /^[\dA-Fa-f]+$/; 5717/* eslint-disable no-control-regex -- safe */ 5718var FORBIDDEN_HOST_CODE_POINT = /[\u0000\t\u000A\u000D #%/:?@[\\]]/; 5719var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\u0000\t\u000A\u000D #/:?@[\\]]/; 5720var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g; 5721var TAB_AND_NEW_LINE = /[\t\u000A\u000D]/g; 5722/* eslint-enable no-control-regex -- safe */ 5723var EOF; 5724 5725var parseHost = function (url, input) { 5726 var result, codePoints, index; 5727 if (input.charAt(0) == '[') { 5728 if (input.charAt(input.length - 1) != ']') return INVALID_HOST; 5729 result = parseIPv6(input.slice(1, -1)); 5730 if (!result) return INVALID_HOST; 5731 url.host = result; 5732 // opaque host 5733 } else if (!isSpecial(url)) { 5734 if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST; 5735 result = ''; 5736 codePoints = arrayFrom(input); 5737 for (index = 0; index < codePoints.length; index++) { 5738 result += percentEncode(codePoints[index], C0ControlPercentEncodeSet); 5739 } 5740 url.host = result; 5741 } else { 5742 input = toASCII(input); 5743 if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST; 5744 result = parseIPv4(input); 5745 if (result === null) return INVALID_HOST; 5746 url.host = result; 5747 } 5748}; 5749 5750var parseIPv4 = function (input) { 5751 var parts = input.split('.'); 5752 var partsLength, numbers, index, part, radix, number, ipv4; 5753 if (parts.length && parts[parts.length - 1] == '') { 5754 parts.pop(); 5755 } 5756 partsLength = parts.length; 5757 if (partsLength > 4) return input; 5758 numbers = []; 5759 for (index = 0; index < partsLength; index++) { 5760 part = parts[index]; 5761 if (part == '') return input; 5762 radix = 10; 5763 if (part.length > 1 && part.charAt(0) == '0') { 5764 radix = HEX_START.test(part) ? 16 : 8; 5765 part = part.slice(radix == 8 ? 1 : 2); 5766 } 5767 if (part === '') { 5768 number = 0; 5769 } else { 5770 if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input; 5771 number = parseInt(part, radix); 5772 } 5773 numbers.push(number); 5774 } 5775 for (index = 0; index < partsLength; index++) { 5776 number = numbers[index]; 5777 if (index == partsLength - 1) { 5778 if (number >= pow(256, 5 - partsLength)) return null; 5779 } else if (number > 255) return null; 5780 } 5781 ipv4 = numbers.pop(); 5782 for (index = 0; index < numbers.length; index++) { 5783 ipv4 += numbers[index] * pow(256, 3 - index); 5784 } 5785 return ipv4; 5786}; 5787 5788// eslint-disable-next-line max-statements -- TODO 5789var parseIPv6 = function (input) { 5790 var address = [0, 0, 0, 0, 0, 0, 0, 0]; 5791 var pieceIndex = 0; 5792 var compress = null; 5793 var pointer = 0; 5794 var value, length, numbersSeen, ipv4Piece, number, swaps, swap; 5795 5796 var char = function () { 5797 return input.charAt(pointer); 5798 }; 5799 5800 if (char() == ':') { 5801 if (input.charAt(1) != ':') return; 5802 pointer += 2; 5803 pieceIndex++; 5804 compress = pieceIndex; 5805 } 5806 while (char()) { 5807 if (pieceIndex == 8) return; 5808 if (char() == ':') { 5809 if (compress !== null) return; 5810 pointer++; 5811 pieceIndex++; 5812 compress = pieceIndex; 5813 continue; 5814 } 5815 value = length = 0; 5816 while (length < 4 && HEX.test(char())) { 5817 value = value * 16 + parseInt(char(), 16); 5818 pointer++; 5819 length++; 5820 } 5821 if (char() == '.') { 5822 if (length == 0) return; 5823 pointer -= length; 5824 if (pieceIndex > 6) return; 5825 numbersSeen = 0; 5826 while (char()) { 5827 ipv4Piece = null; 5828 if (numbersSeen > 0) { 5829 if (char() == '.' && numbersSeen < 4) pointer++; 5830 else return; 5831 } 5832 if (!DIGIT.test(char())) return; 5833 while (DIGIT.test(char())) { 5834 number = parseInt(char(), 10); 5835 if (ipv4Piece === null) ipv4Piece = number; 5836 else if (ipv4Piece == 0) return; 5837 else ipv4Piece = ipv4Piece * 10 + number; 5838 if (ipv4Piece > 255) return; 5839 pointer++; 5840 } 5841 address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece; 5842 numbersSeen++; 5843 if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++; 5844 } 5845 if (numbersSeen != 4) return; 5846 break; 5847 } else if (char() == ':') { 5848 pointer++; 5849 if (!char()) return; 5850 } else if (char()) return; 5851 address[pieceIndex++] = value; 5852 } 5853 if (compress !== null) { 5854 swaps = pieceIndex - compress; 5855 pieceIndex = 7; 5856 while (pieceIndex != 0 && swaps > 0) { 5857 swap = address[pieceIndex]; 5858 address[pieceIndex--] = address[compress + swaps - 1]; 5859 address[compress + --swaps] = swap; 5860 } 5861 } else if (pieceIndex != 8) return; 5862 return address; 5863}; 5864 5865var findLongestZeroSequence = function (ipv6) { 5866 var maxIndex = null; 5867 var maxLength = 1; 5868 var currStart = null; 5869 var currLength = 0; 5870 var index = 0; 5871 for (; index < 8; index++) { 5872 if (ipv6[index] !== 0) { 5873 if (currLength > maxLength) { 5874 maxIndex = currStart; 5875 maxLength = currLength; 5876 } 5877 currStart = null; 5878 currLength = 0; 5879 } else { 5880 if (currStart === null) currStart = index; 5881 ++currLength; 5882 } 5883 } 5884 if (currLength > maxLength) { 5885 maxIndex = currStart; 5886 maxLength = currLength; 5887 } 5888 return maxIndex; 5889}; 5890 5891var serializeHost = function (host) { 5892 var result, index, compress, ignore0; 5893 // ipv4 5894 if (typeof host == 'number') { 5895 result = []; 5896 for (index = 0; index < 4; index++) { 5897 result.unshift(host % 256); 5898 host = floor(host / 256); 5899 } return result.join('.'); 5900 // ipv6 5901 } else if (typeof host == 'object') { 5902 result = ''; 5903 compress = findLongestZeroSequence(host); 5904 for (index = 0; index < 8; index++) { 5905 if (ignore0 && host[index] === 0) continue; 5906 if (ignore0) ignore0 = false; 5907 if (compress === index) { 5908 result += index ? ':' : '::'; 5909 ignore0 = true; 5910 } else { 5911 result += host[index].toString(16); 5912 if (index < 7) result += ':'; 5913 } 5914 } 5915 return '[' + result + ']'; 5916 } return host; 5917}; 5918 5919var C0ControlPercentEncodeSet = {}; 5920var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, { 5921 ' ': 1, '"': 1, '<': 1, '>': 1, '`': 1 5922}); 5923var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, { 5924 '#': 1, '?': 1, '{': 1, '}': 1 5925}); 5926var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, { 5927 '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1 5928}); 5929 5930var percentEncode = function (char, set) { 5931 var code = codeAt(char, 0); 5932 return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char); 5933}; 5934 5935var specialSchemes = { 5936 ftp: 21, 5937 file: null, 5938 http: 80, 5939 https: 443, 5940 ws: 80, 5941 wss: 443 5942}; 5943 5944var isSpecial = function (url) { 5945 return has(specialSchemes, url.scheme); 5946}; 5947 5948var includesCredentials = function (url) { 5949 return url.username != '' || url.password != ''; 5950}; 5951 5952var cannotHaveUsernamePasswordPort = function (url) { 5953 return !url.host || url.cannotBeABaseURL || url.scheme == 'file'; 5954}; 5955 5956var isWindowsDriveLetter = function (string, normalized) { 5957 var second; 5958 return string.length == 2 && ALPHA.test(string.charAt(0)) 5959 && ((second = string.charAt(1)) == ':' || (!normalized && second == '|')); 5960}; 5961 5962var startsWithWindowsDriveLetter = function (string) { 5963 var third; 5964 return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && ( 5965 string.length == 2 || 5966 ((third = string.charAt(2)) === '/' || third === '\\' || third === '?' || third === '#') 5967 ); 5968}; 5969 5970var shortenURLsPath = function (url) { 5971 var path = url.path; 5972 var pathSize = path.length; 5973 if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) { 5974 path.pop(); 5975 } 5976}; 5977 5978var isSingleDot = function (segment) { 5979 return segment === '.' || segment.toLowerCase() === '%2e'; 5980}; 5981 5982var isDoubleDot = function (segment) { 5983 segment = segment.toLowerCase(); 5984 return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e'; 5985}; 5986 5987// States: 5988var SCHEME_START = {}; 5989var SCHEME = {}; 5990var NO_SCHEME = {}; 5991var SPECIAL_RELATIVE_OR_AUTHORITY = {}; 5992var PATH_OR_AUTHORITY = {}; 5993var RELATIVE = {}; 5994var RELATIVE_SLASH = {}; 5995var SPECIAL_AUTHORITY_SLASHES = {}; 5996var SPECIAL_AUTHORITY_IGNORE_SLASHES = {}; 5997var AUTHORITY = {}; 5998var HOST = {}; 5999var HOSTNAME = {}; 6000var PORT = {}; 6001var FILE = {}; 6002var FILE_SLASH = {}; 6003var FILE_HOST = {}; 6004var PATH_START = {}; 6005var PATH = {}; 6006var CANNOT_BE_A_BASE_URL_PATH = {}; 6007var QUERY = {}; 6008var FRAGMENT = {}; 6009 6010// eslint-disable-next-line max-statements -- TODO 6011var parseURL = function (url, input, stateOverride, base) { 6012 var state = stateOverride || SCHEME_START; 6013 var pointer = 0; 6014 var buffer = ''; 6015 var seenAt = false;
vendor: 20,710 bytes, lines 6016-6634
6016 var seenBracket = false; 6017 var seenPasswordToken = false; 6018 var codePoints, char, bufferCodePoints, failure; 6019 6020 if (!stateOverride) { 6021 url.scheme = ''; 6022 url.username = ''; 6023 url.password = ''; 6024 url.host = null; 6025 url.port = null; 6026 url.path = []; 6027 url.query = null; 6028 url.fragment = null; 6029 url.cannotBeABaseURL = false; 6030 input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, ''); 6031 } 6032 6033 input = input.replace(TAB_AND_NEW_LINE, ''); 6034 6035 codePoints = arrayFrom(input); 6036 6037 while (pointer <= codePoints.length) { 6038 char = codePoints[pointer]; 6039 switch (state) { 6040 case SCHEME_START: 6041 if (char && ALPHA.test(char)) { 6042 buffer += char.toLowerCase(); 6043 state = SCHEME; 6044 } else if (!stateOverride) { 6045 state = NO_SCHEME; 6046 continue; 6047 } else return INVALID_SCHEME; 6048 break; 6049 6050 case SCHEME: 6051 if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) { 6052 buffer += char.toLowerCase(); 6053 } else if (char == ':') { 6054 if (stateOverride && ( 6055 (isSpecial(url) != has(specialSchemes, buffer)) || 6056 (buffer == 'file' && (includesCredentials(url) || url.port !== null)) || 6057 (url.scheme == 'file' && !url.host) 6058 )) return; 6059 url.scheme = buffer; 6060 if (stateOverride) { 6061 if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null; 6062 return; 6063 } 6064 buffer = ''; 6065 if (url.scheme == 'file') { 6066 state = FILE; 6067 } else if (isSpecial(url) && base && base.scheme == url.scheme) { 6068 state = SPECIAL_RELATIVE_OR_AUTHORITY; 6069 } else if (isSpecial(url)) { 6070 state = SPECIAL_AUTHORITY_SLASHES; 6071 } else if (codePoints[pointer + 1] == '/') { 6072 state = PATH_OR_AUTHORITY; 6073 pointer++; 6074 } else { 6075 url.cannotBeABaseURL = true; 6076 url.path.push(''); 6077 state = CANNOT_BE_A_BASE_URL_PATH; 6078 } 6079 } else if (!stateOverride) { 6080 buffer = ''; 6081 state = NO_SCHEME; 6082 pointer = 0; 6083 continue; 6084 } else return INVALID_SCHEME; 6085 break; 6086 6087 case NO_SCHEME: 6088 if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME; 6089 if (base.cannotBeABaseURL && char == '#') { 6090 url.scheme = base.scheme; 6091 url.path = base.path.slice(); 6092 url.query = base.query; 6093 url.fragment = ''; 6094 url.cannotBeABaseURL = true; 6095 state = FRAGMENT; 6096 break; 6097 } 6098 state = base.scheme == 'file' ? FILE : RELATIVE; 6099 continue; 6100 6101 case SPECIAL_RELATIVE_OR_AUTHORITY: 6102 if (char == '/' && codePoints[pointer + 1] == '/') { 6103 state = SPECIAL_AUTHORITY_IGNORE_SLASHES; 6104 pointer++; 6105 } else { 6106 state = RELATIVE; 6107 continue; 6108 } break; 6109 6110 case PATH_OR_AUTHORITY: 6111 if (char == '/') { 6112 state = AUTHORITY; 6113 break; 6114 } else { 6115 state = PATH; 6116 continue; 6117 } 6118 6119 case RELATIVE: 6120 url.scheme = base.scheme; 6121 if (char == EOF) { 6122 url.username = base.username; 6123 url.password = base.password; 6124 url.host = base.host; 6125 url.port = base.port; 6126 url.path = base.path.slice(); 6127 url.query = base.query; 6128 } else if (char == '/' || (char == '\\' && isSpecial(url))) { 6129 state = RELATIVE_SLASH; 6130 } else if (char == '?') { 6131 url.username = base.username; 6132 url.password = base.password; 6133 url.host = base.host; 6134 url.port = base.port; 6135 url.path = base.path.slice(); 6136 url.query = ''; 6137 state = QUERY; 6138 } else if (char == '#') { 6139 url.username = base.username; 6140 url.password = base.password; 6141 url.host = base.host; 6142 url.port = base.port; 6143 url.path = base.path.slice(); 6144 url.query = base.query; 6145 url.fragment = ''; 6146 state = FRAGMENT; 6147 } else { 6148 url.username = base.username; 6149 url.password = base.password; 6150 url.host = base.host; 6151 url.port = base.port; 6152 url.path = base.path.slice(); 6153 url.path.pop(); 6154 state = PATH; 6155 continue; 6156 } break; 6157 6158 case RELATIVE_SLASH: 6159 if (isSpecial(url) && (char == '/' || char == '\\')) { 6160 state = SPECIAL_AUTHORITY_IGNORE_SLASHES; 6161 } else if (char == '/') { 6162 state = AUTHORITY; 6163 } else { 6164 url.username = base.username; 6165 url.password = base.password; 6166 url.host = base.host; 6167 url.port = base.port; 6168 state = PATH; 6169 continue; 6170 } break; 6171 6172 case SPECIAL_AUTHORITY_SLASHES: 6173 state = SPECIAL_AUTHORITY_IGNORE_SLASHES; 6174 if (char != '/' || buffer.charAt(pointer + 1) != '/') continue; 6175 pointer++; 6176 break; 6177 6178 case SPECIAL_AUTHORITY_IGNORE_SLASHES: 6179 if (char != '/' && char != '\\') { 6180 state = AUTHORITY; 6181 continue; 6182 } break; 6183 6184 case AUTHORITY: 6185 if (char == '@') { 6186 if (seenAt) buffer = '%40' + buffer; 6187 seenAt = true; 6188 bufferCodePoints = arrayFrom(buffer); 6189 for (var i = 0; i < bufferCodePoints.length; i++) { 6190 var codePoint = bufferCodePoints[i]; 6191 if (codePoint == ':' && !seenPasswordToken) { 6192 seenPasswordToken = true; 6193 continue; 6194 } 6195 var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet); 6196 if (seenPasswordToken) url.password += encodedCodePoints; 6197 else url.username += encodedCodePoints; 6198 } 6199 buffer = ''; 6200 } else if ( 6201 char == EOF || char == '/' || char == '?' || char == '#' || 6202 (char == '\\' && isSpecial(url)) 6203 ) { 6204 if (seenAt && buffer == '') return INVALID_AUTHORITY; 6205 pointer -= arrayFrom(buffer).length + 1; 6206 buffer = ''; 6207 state = HOST; 6208 } else buffer += char; 6209 break; 6210 6211 case HOST: 6212 case HOSTNAME: 6213 if (stateOverride && url.scheme == 'file') { 6214 state = FILE_HOST; 6215 continue; 6216 } else if (char == ':' && !seenBracket) { 6217 if (buffer == '') return INVALID_HOST; 6218 failure = parseHost(url, buffer); 6219 if (failure) return failure; 6220 buffer = ''; 6221 state = PORT; 6222 if (stateOverride == HOSTNAME) return; 6223 } else if ( 6224 char == EOF || char == '/' || char == '?' || char == '#' || 6225 (char == '\\' && isSpecial(url)) 6226 ) { 6227 if (isSpecial(url) && buffer == '') return INVALID_HOST; 6228 if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return; 6229 failure = parseHost(url, buffer); 6230 if (failure) return failure; 6231 buffer = ''; 6232 state = PATH_START; 6233 if (stateOverride) return; 6234 continue; 6235 } else { 6236 if (char == '[') seenBracket = true; 6237 else if (char == ']') seenBracket = false; 6238 buffer += char; 6239 } break; 6240 6241 case PORT: 6242 if (DIGIT.test(char)) { 6243 buffer += char; 6244 } else if ( 6245 char == EOF || char == '/' || char == '?' || char == '#' || 6246 (char == '\\' && isSpecial(url)) || 6247 stateOverride 6248 ) { 6249 if (buffer != '') { 6250 var port = parseInt(buffer, 10); 6251 if (port > 0xFFFF) return INVALID_PORT; 6252 url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port; 6253 buffer = ''; 6254 } 6255 if (stateOverride) return; 6256 state = PATH_START; 6257 continue; 6258 } else return INVALID_PORT; 6259 break; 6260 6261 case FILE: 6262 url.scheme = 'file'; 6263 if (char == '/' || char == '\\') state = FILE_SLASH; 6264 else if (base && base.scheme == 'file') { 6265 if (char == EOF) { 6266 url.host = base.host; 6267 url.path = base.path.slice(); 6268 url.query = base.query; 6269 } else if (char == '?') { 6270 url.host = base.host; 6271 url.path = base.path.slice(); 6272 url.query = ''; 6273 state = QUERY; 6274 } else if (char == '#') { 6275 url.host = base.host; 6276 url.path = base.path.slice(); 6277 url.query = base.query; 6278 url.fragment = ''; 6279 state = FRAGMENT; 6280 } else { 6281 if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) { 6282 url.host = base.host; 6283 url.path = base.path.slice(); 6284 shortenURLsPath(url); 6285 } 6286 state = PATH; 6287 continue; 6288 } 6289 } else { 6290 state = PATH; 6291 continue; 6292 } break; 6293 6294 case FILE_SLASH: 6295 if (char == '/' || char == '\\') { 6296 state = FILE_HOST; 6297 break; 6298 } 6299 if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) { 6300 if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]); 6301 else url.host = base.host; 6302 } 6303 state = PATH; 6304 continue; 6305 6306 case FILE_HOST: 6307 if (char == EOF || char == '/' || char == '\\' || char == '?' || char == '#') { 6308 if (!stateOverride && isWindowsDriveLetter(buffer)) { 6309 state = PATH; 6310 } else if (buffer == '') { 6311 url.host = ''; 6312 if (stateOverride) return; 6313 state = PATH_START; 6314 } else { 6315 failure = parseHost(url, buffer); 6316 if (failure) return failure; 6317 if (url.host == 'localhost') url.host = ''; 6318 if (stateOverride) return; 6319 buffer = ''; 6320 state = PATH_START; 6321 } continue; 6322 } else buffer += char; 6323 break; 6324 6325 case PATH_START: 6326 if (isSpecial(url)) { 6327 state = PATH; 6328 if (char != '/' && char != '\\') continue; 6329 } else if (!stateOverride && char == '?') { 6330 url.query = ''; 6331 state = QUERY; 6332 } else if (!stateOverride && char == '#') { 6333 url.fragment = ''; 6334 state = FRAGMENT; 6335 } else if (char != EOF) { 6336 state = PATH; 6337 if (char != '/') continue; 6338 } break; 6339 6340 case PATH: 6341 if ( 6342 char == EOF || char == '/' || 6343 (char == '\\' && isSpecial(url)) || 6344 (!stateOverride && (char == '?' || char == '#')) 6345 ) { 6346 if (isDoubleDot(buffer)) { 6347 shortenURLsPath(url); 6348 if (char != '/' && !(char == '\\' && isSpecial(url))) { 6349 url.path.push(''); 6350 } 6351 } else if (isSingleDot(buffer)) { 6352 if (char != '/' && !(char == '\\' && isSpecial(url))) { 6353 url.path.push(''); 6354 } 6355 } else { 6356 if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) { 6357 if (url.host) url.host = ''; 6358 buffer = buffer.charAt(0) + ':'; // normalize windows drive letter 6359 } 6360 url.path.push(buffer); 6361 } 6362 buffer = ''; 6363 if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) { 6364 while (url.path.length > 1 && url.path[0] === '') { 6365 url.path.shift(); 6366 } 6367 } 6368 if (char == '?') { 6369 url.query = ''; 6370 state = QUERY; 6371 } else if (char == '#') { 6372 url.fragment = ''; 6373 state = FRAGMENT; 6374 } 6375 } else { 6376 buffer += percentEncode(char, pathPercentEncodeSet); 6377 } break; 6378 6379 case CANNOT_BE_A_BASE_URL_PATH: 6380 if (char == '?') { 6381 url.query = ''; 6382 state = QUERY; 6383 } else if (char == '#') { 6384 url.fragment = ''; 6385 state = FRAGMENT; 6386 } else if (char != EOF) { 6387 url.path[0] += percentEncode(char, C0ControlPercentEncodeSet); 6388 } break; 6389 6390 case QUERY: 6391 if (!stateOverride && char == '#') { 6392 url.fragment = ''; 6393 state = FRAGMENT; 6394 } else if (char != EOF) { 6395 if (char == "'" && isSpecial(url)) url.query += '%27'; 6396 else if (char == '#') url.query += '%23'; 6397 else url.query += percentEncode(char, C0ControlPercentEncodeSet); 6398 } break; 6399 6400 case FRAGMENT: 6401 if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet); 6402 break; 6403 } 6404 6405 pointer++; 6406 } 6407}; 6408 6409// `URL` constructor 6410// https://url.spec.whatwg.org/#url-class 6411var URLConstructor = function URL(url /* , base */) { 6412 var that = anInstance(this, URLConstructor, 'URL'); 6413 var base = arguments.length > 1 ? arguments[1] : undefined; 6414 var urlString = String(url); 6415 var state = setInternalState(that, { type: 'URL' }); 6416 var baseState, failure; 6417 if (base !== undefined) { 6418 if (base instanceof URLConstructor) baseState = getInternalURLState(base); 6419 else { 6420 failure = parseURL(baseState = {}, String(base)); 6421 if (failure) throw TypeError(failure); 6422 } 6423 } 6424 failure = parseURL(state, urlString, null, baseState); 6425 if (failure) throw TypeError(failure); 6426 var searchParams = state.searchParams = new URLSearchParams(); 6427 var searchParamsState = getInternalSearchParamsState(searchParams); 6428 searchParamsState.updateSearchParams(state.query); 6429 searchParamsState.updateURL = function () { 6430 state.query = String(searchParams) || null; 6431 }; 6432 if (!DESCRIPTORS) { 6433 that.href = serializeURL.call(that); 6434 that.origin = getOrigin.call(that); 6435 that.protocol = getProtocol.call(that); 6436 that.username = getUsername.call(that); 6437 that.password = getPassword.call(that); 6438 that.host = getHost.call(that); 6439 that.hostname = getHostname.call(that); 6440 that.port = getPort.call(that); 6441 that.pathname = getPathname.call(that); 6442 that.search = getSearch.call(that); 6443 that.searchParams = getSearchParams.call(that); 6444 that.hash = getHash.call(that); 6445 } 6446}; 6447 6448var URLPrototype = URLConstructor.prototype; 6449 6450var serializeURL = function () { 6451 var url = getInternalURLState(this); 6452 var scheme = url.scheme; 6453 var username = url.username; 6454 var password = url.password; 6455 var host = url.host; 6456 var port = url.port; 6457 var path = url.path; 6458 var query = url.query; 6459 var fragment = url.fragment; 6460 var output = scheme + ':'; 6461 if (host !== null) { 6462 output += '//'; 6463 if (includesCredentials(url)) { 6464 output += username + (password ? ':' + password : '') + '@'; 6465 } 6466 output += serializeHost(host); 6467 if (port !== null) output += ':' + port; 6468 } else if (scheme == 'file') output += '//'; 6469 output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : ''; 6470 if (query !== null) output += '?' + query; 6471 if (fragment !== null) output += '#' + fragment; 6472 return output; 6473}; 6474 6475var getOrigin = function () { 6476 var url = getInternalURLState(this); 6477 var scheme = url.scheme; 6478 var port = url.port; 6479 if (scheme == 'blob') try { 6480 return new URL(scheme.path[0]).origin; 6481 } catch (error) { 6482 return 'null'; 6483 } 6484 if (scheme == 'file' || !isSpecial(url)) return 'null'; 6485 return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : ''); 6486}; 6487 6488var getProtocol = function () { 6489 return getInternalURLState(this).scheme + ':'; 6490}; 6491 6492var getUsername = function () { 6493 return getInternalURLState(this).username; 6494}; 6495 6496var getPassword = function () { 6497 return getInternalURLState(this).password; 6498}; 6499 6500var getHost = function () { 6501 var url = getInternalURLState(this); 6502 var host = url.host; 6503 var port = url.port; 6504 return host === null ? '' 6505 : port === null ? serializeHost(host) 6506 : serializeHost(host) + ':' + port; 6507}; 6508 6509var getHostname = function () { 6510 var host = getInternalURLState(this).host; 6511 return host === null ? '' : serializeHost(host); 6512}; 6513 6514var getPort = function () { 6515 var port = getInternalURLState(this).port; 6516 return port === null ? '' : String(port); 6517}; 6518 6519var getPathname = function () { 6520 var url = getInternalURLState(this); 6521 var path = url.path; 6522 return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : ''; 6523}; 6524 6525var getSearch = function () { 6526 var query = getInternalURLState(this).query; 6527 return query ? '?' + query : ''; 6528}; 6529 6530var getSearchParams = function () { 6531 return getInternalURLState(this).searchParams; 6532}; 6533 6534var getHash = function () { 6535 var fragment = getInternalURLState(this).fragment; 6536 return fragment ? '#' + fragment : ''; 6537}; 6538 6539var accessorDescriptor = function (getter, setter) { 6540 return { get: getter, set: setter, configurable: true, enumerable: true }; 6541}; 6542 6543if (DESCRIPTORS) { 6544 defineProperties(URLPrototype, { 6545 // `URL.prototype.href` accessors pair 6546 // https://url.spec.whatwg.org/#dom-url-href 6547 href: accessorDescriptor(serializeURL, function (href) { 6548 var url = getInternalURLState(this); 6549 var urlString = String(href); 6550 var failure = parseURL(url, urlString); 6551 if (failure) throw TypeError(failure); 6552 getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query); 6553 }), 6554 // `URL.prototype.origin` getter 6555 // https://url.spec.whatwg.org/#dom-url-origin 6556 origin: accessorDescriptor(getOrigin), 6557 // `URL.prototype.protocol` accessors pair 6558 // https://url.spec.whatwg.org/#dom-url-protocol 6559 protocol: accessorDescriptor(getProtocol, function (protocol) { 6560 var url = getInternalURLState(this); 6561 parseURL(url, String(protocol) + ':', SCHEME_START); 6562 }), 6563 // `URL.prototype.username` accessors pair 6564 // https://url.spec.whatwg.org/#dom-url-username 6565 username: accessorDescriptor(getUsername, function (username) { 6566 var url = getInternalURLState(this); 6567 var codePoints = arrayFrom(String(username)); 6568 if (cannotHaveUsernamePasswordPort(url)) return; 6569 url.username = ''; 6570 for (var i = 0; i < codePoints.length; i++) { 6571 url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet); 6572 } 6573 }), 6574 // `URL.prototype.password` accessors pair 6575 // https://url.spec.whatwg.org/#dom-url-password 6576 password: accessorDescriptor(getPassword, function (password) { 6577 var url = getInternalURLState(this); 6578 var codePoints = arrayFrom(String(password)); 6579 if (cannotHaveUsernamePasswordPort(url)) return; 6580 url.password = ''; 6581 for (var i = 0; i < codePoints.length; i++) { 6582 url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet); 6583 } 6584 }), 6585 // `URL.prototype.host` accessors pair 6586 // https://url.spec.whatwg.org/#dom-url-host 6587 host: accessorDescriptor(getHost, function (host) { 6588 var url = getInternalURLState(this); 6589 if (url.cannotBeABaseURL) return; 6590 parseURL(url, String(host), HOST); 6591 }), 6592 // `URL.prototype.hostname` accessors pair 6593 // https://url.spec.whatwg.org/#dom-url-hostname 6594 hostname: accessorDescriptor(getHostname, function (hostname) { 6595 var url = getInternalURLState(this); 6596 if (url.cannotBeABaseURL) return; 6597 parseURL(url, String(hostname), HOSTNAME); 6598 }), 6599 // `URL.prototype.port` accessors pair 6600 // https://url.spec.whatwg.org/#dom-url-port 6601 port: accessorDescriptor(getPort, function (port) { 6602 var url = getInternalURLState(this); 6603 if (cannotHaveUsernamePasswordPort(url)) return; 6604 port = String(port); 6605 if (port == '') url.port = null; 6606 else parseURL(url, port, PORT); 6607 }), 6608 // `URL.prototype.pathname` accessors pair 6609 // https://url.spec.whatwg.org/#dom-url-pathname 6610 pathname: accessorDescriptor(getPathname, function (pathname) { 6611 var url = getInternalURLState(this); 6612 if (url.cannotBeABaseURL) return; 6613 url.path = []; 6614 parseURL(url, pathname + '', PATH_START); 6615 }), 6616 // `URL.prototype.search` accessors pair 6617 // https://url.spec.whatwg.org/#dom-url-search 6618 search: accessorDescriptor(getSearch, function (search) { 6619 var url = getInternalURLState(this); 6620 search = String(search); 6621 if (search == '') { 6622 url.query = null; 6623 } else { 6624 if ('?' == search.charAt(0)) search = search.slice(1); 6625 url.query = ''; 6626 parseURL(url, search, QUERY); 6627 } 6628 getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query); 6629 }), 6630 // `URL.prototype.searchParams` getter 6631 // https://url.spec.whatwg.org/#dom-url-searchparams 6632 searchParams: accessorDescriptor(getSearchParams), 6633 // `URL.prototype.hash` accessors pair 6634 // https://url.spec.whatwg.org/#dom-url-hash
vendor: 13,774 bytes, lines 6635-6899
6635 hash: accessorDescriptor(getHash, function (hash) { 6636 var url = getInternalURLState(this); 6637 hash = String(hash); 6638 if (hash == '') { 6639 url.fragment = null; 6640 return; 6641 } 6642 if ('#' == hash.charAt(0)) hash = hash.slice(1); 6643 url.fragment = ''; 6644 parseURL(url, hash, FRAGMENT); 6645 }) 6646 }); 6647} 6648 6649// `URL.prototype.toJSON` method 6650// https://url.spec.whatwg.org/#dom-url-tojson 6651redefine(URLPrototype, 'toJSON', function toJSON() { 6652 return serializeURL.call(this); 6653}, { enumerable: true }); 6654 6655// `URL.prototype.toString` method 6656// https://url.spec.whatwg.org/#URL-stringification-behavior 6657redefine(URLPrototype, 'toString', function toString() { 6658 return serializeURL.call(this); 6659}, { enumerable: true }); 6660 6661if (NativeURL) { 6662 var nativeCreateObjectURL = NativeURL.createObjectURL; 6663 var nativeRevokeObjectURL = NativeURL.revokeObjectURL; 6664 // `URL.createObjectURL` method 6665 // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL 6666 // eslint-disable-next-line no-unused-vars -- required for `.length` 6667 if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) { 6668 return nativeCreateObjectURL.apply(NativeURL, arguments); 6669 }); 6670 // `URL.revokeObjectURL` method 6671 // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL 6672 // eslint-disable-next-line no-unused-vars -- required for `.length` 6673 if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) { 6674 return nativeRevokeObjectURL.apply(NativeURL, arguments); 6675 }); 6676} 6677 6678setToStringTag(URLConstructor, 'URL'); 6679 6680$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, { 6681 URL: URLConstructor 6682}); 6683 6684 6685/***/ }) 6686 6687/******/ }); 6688/************************************************************************/ 6689/******/ // The module cache 6690/******/ var __webpack_module_cache__ = {}; 6691/******/ 6692/******/ // The require function 6693/******/ function __webpack_require__(moduleId) { 6694/******/ // Check if module is in cache 6695/******/ if(__webpack_module_cache__[moduleId]) { 6696/******/ return __webpack_module_cache__[moduleId].exports; 6697/******/ } 6698/******/ // Create a new module (and put it into the cache) 6699/******/ var module = __webpack_module_cache__[moduleId] = { 6700/******/ // no module.id needed 6701/******/ // no module.loaded needed 6702/******/ exports: {} 6703/******/ }; 6704/******/ 6705/******/ // Execute the module function 6706/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 6707/******/ 6708/******/ // Return the exports of the module 6709/******/ return module.exports; 6710/******/ } 6711/******/ 6712/************************************************************************/ 6713/******/ /* webpack/runtime/define property getters */ 6714/******/ !function() { 6715/******/ // define getter functions for harmony exports 6716/******/ __webpack_require__.d = function(exports, definition) { 6717/******/ for(var key in definition) { 6718/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 6719/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 6720/******/ } 6721/******/ } 6722/******/ }; 6723/******/ }(); 6724/******/ 6725/******/ /* webpack/runtime/global */ 6726/******/ !function() { 6727/******/ __webpack_require__.g = (function() { 6728/******/ if (typeof globalThis === 'object') return globalThis; 6729/******/ try { 6730/******/ return this || new Function('return this')(); 6731/******/ } catch (e) { 6732/******/ if (typeof window === 'object') return window; 6733/******/ } 6734/******/ })(); 6735/******/ }(); 6736/******/ 6737/******/ /* webpack/runtime/hasOwnProperty shorthand */ 6738/******/ !function() { 6739/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } 6740/******/ }(); 6741/******/ 6742/******/ /* webpack/runtime/make namespace object */ 6743/******/ !function() { 6744/******/ // define __esModule on exports 6745/******/ __webpack_require__.r = function(exports) { 6746/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 6747/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 6748/******/ } 6749/******/ Object.defineProperty(exports, '__esModule', { value: true }); 6750/******/ }; 6751/******/ }(); 6752/******/ 6753/************************************************************************/ 6754var __webpack_exports__ = {}; 6755// This entry need to be wrapped in an IIFE because it need to be in strict mode. 6756!function() { 6757"use strict"; 6758// ESM COMPAT FLAG 6759__webpack_require__.r(__webpack_exports__); 6760 6761// EXPORTS 6762__webpack_require__.d(__webpack_exports__, { 6763 "Dropzone": function() { return /* reexport */ Dropzone; }, 6764 "default": function() { return /* binding */ dropzone_dist; } 6765}); 6766 6767// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js 6768var es_array_concat = __webpack_require__(2222); 6769// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js 6770var es_array_filter = __webpack_require__(7327); 6771// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.index-of.js 6772var es_array_index_of = __webpack_require__(2772); 6773// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js 6774var es_array_iterator = __webpack_require__(6992); 6775// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js 6776var es_array_map = __webpack_require__(1249); 6777// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js 6778var es_array_slice = __webpack_require__(7042); 6779// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js 6780var es_array_splice = __webpack_require__(561); 6781// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array-buffer.constructor.js 6782var es_array_buffer_constructor = __webpack_require__(8264); 6783// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js 6784var es_function_name = __webpack_require__(8309); 6785// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-prototype-of.js 6786var es_object_get_prototype_of = __webpack_require__(489); 6787// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js 6788var es_object_to_string = __webpack_require__(1539); 6789// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js 6790var es_regexp_exec = __webpack_require__(4916); 6791// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.to-string.js 6792var es_regexp_to_string = __webpack_require__(9714); 6793// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js 6794var es_string_iterator = __webpack_require__(8783); 6795// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js 6796var es_string_match = __webpack_require__(4723); 6797// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js 6798var es_string_replace = __webpack_require__(5306); 6799// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js 6800var es_string_split = __webpack_require__(3123); 6801// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.trim.js 6802var es_string_trim = __webpack_require__(3210); 6803// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.uint8-array.js 6804var es_typed_array_uint8_array = __webpack_require__(2472); 6805// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.copy-within.js 6806var es_typed_array_copy_within = __webpack_require__(2990); 6807// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.every.js 6808var es_typed_array_every = __webpack_require__(8927); 6809// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.fill.js 6810var es_typed_array_fill = __webpack_require__(3105); 6811// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.filter.js 6812var es_typed_array_filter = __webpack_require__(5035); 6813// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find.js 6814var es_typed_array_find = __webpack_require__(4345); 6815// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find-index.js 6816var es_typed_array_find_index = __webpack_require__(7174); 6817// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.for-each.js 6818var es_typed_array_for_each = __webpack_require__(2846); 6819// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.includes.js 6820var es_typed_array_includes = __webpack_require__(4731); 6821// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.index-of.js 6822var es_typed_array_index_of = __webpack_require__(7209); 6823// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.iterator.js 6824var es_typed_array_iterator = __webpack_require__(6319); 6825// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.join.js 6826var es_typed_array_join = __webpack_require__(8867); 6827// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.last-index-of.js 6828var es_typed_array_last_index_of = __webpack_require__(7789); 6829// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.map.js 6830var es_typed_array_map = __webpack_require__(3739); 6831// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce.js 6832var es_typed_array_reduce = __webpack_require__(9368); 6833// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce-right.js 6834var es_typed_array_reduce_right = __webpack_require__(4483); 6835// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reverse.js 6836var es_typed_array_reverse = __webpack_require__(2056); 6837// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.set.js 6838var es_typed_array_set = __webpack_require__(3462); 6839// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.slice.js 6840var es_typed_array_slice = __webpack_require__(678); 6841// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.some.js 6842var es_typed_array_some = __webpack_require__(7462); 6843// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.sort.js 6844var es_typed_array_sort = __webpack_require__(3824); 6845// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.subarray.js 6846var es_typed_array_subarray = __webpack_require__(5021); 6847// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-locale-string.js 6848var es_typed_array_to_locale_string = __webpack_require__(2974); 6849// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-string.js 6850var es_typed_array_to_string = __webpack_require__(5016); 6851// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js 6852var web_dom_collections_for_each = __webpack_require__(4747); 6853// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js 6854var web_dom_collections_iterator = __webpack_require__(3948); 6855// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.js 6856var web_url = __webpack_require__(285); 6857;// CONCATENATED MODULE: ./src/emitter.js 6858 6859 6860function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } 6861 6862function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 6863 6864function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } 6865 6866function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 6867 6868function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 6869 6870function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 6871 6872// The Emitter class provides the ability to call `.on()` on Dropzone to listen 6873// to events. 6874// It is strongly based on component's emitter class, and I removed the 6875// functionality because of the dependency hell with different frameworks. 6876var Emitter = /*#__PURE__*/function () { 6877 function Emitter() { 6878 _classCallCheck(this, Emitter); 6879 } 6880 6881 _createClass(Emitter, [{ 6882 key: "on", 6883 value: // Add an event listener for given event 6884 function on(event, fn) { 6885 this._callbacks = this._callbacks || {}; // Create namespace for this event 6886 6887 if (!this._callbacks[event]) { 6888 this._callbacks[event] = []; 6889 } 6890 6891 this._callbacks[event].push(fn); 6892 6893 return this; 6894 } 6895 }, { 6896 key: "emit", 6897 value: function emit(event) { 6898 this._callbacks = this._callbacks || {}; 6899 var callbacks = this._callbacks[event];
6900 6901 for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 6902 args[_key - 1] = arguments[_key]; 6903 } 6904 6905 if (callbacks) { 6906 var _iterator = _createForOfIteratorHelper(callbacks, true), 6907 _step; 6908 6909 try { 6910 for (_iterator.s(); !(_step = _iterator.n()).done;) { 6911 var callback = _step.value; 6912 callback.apply(this, args); 6913 } 6914 } catch (err) { 6915 _iterator.e(err); 6916 } finally { 6917 _iterator.f(); 6918 } 6919 } // trigger a corresponding DOM event 6920 6921 6922 if (this.element) { 6923 this.element.dispatchEvent(this.makeEvent("dropzone:" + event, { 6924 args: args 6925 })); 6926 } 6927 6928 return this
vendor: 25,544 bytes, lines 6928-7613
6928; 6929 } 6930 }, { 6931 key: "makeEvent", 6932 value: function makeEvent(eventName, detail) { 6933 var params = { 6934 bubbles: true, 6935 cancelable: true, 6936 detail: detail 6937 }; 6938 6939 if (typeof window.CustomEvent === "function") { 6940 return new CustomEvent(eventName, params); 6941 } else { 6942 // IE 11 support 6943 // https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent 6944 var evt = document.createEvent("CustomEvent"); 6945 evt.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail); 6946 return evt; 6947 } 6948 } // Remove event listener for given event. If fn is not provided, all event 6949 // listeners for that event will be removed. If neither is provided, all 6950 // event listeners will be removed. 6951 6952 }, { 6953 key: "off", 6954 value: function off(event, fn) { 6955 if (!this._callbacks || arguments.length === 0) { 6956 this._callbacks = {}; 6957 return this; 6958 } // specific event 6959 6960 6961 var callbacks = this._callbacks[event]; 6962 6963 if (!callbacks) { 6964 return this; 6965 } // remove all handlers 6966 6967 6968 if (arguments.length === 1) { 6969 delete this._callbacks[event]; 6970 return this; 6971 } // remove specific handler 6972 6973 6974 for (var i = 0; i < callbacks.length; i++) { 6975 var callback = callbacks[i]; 6976 6977 if (callback === fn) { 6978 callbacks.splice(i, 1); 6979 break; 6980 } 6981 } 6982 6983 return this; 6984 } 6985 }]); 6986 6987 return Emitter; 6988}(); 6989 6990 6991;// CONCATENATED MODULE: ./src/preview-template.html 6992// Module 6993var code = "<div class=\"dz-preview dz-file-preview\"> <div class=\"dz-image\"><img data-dz-thumbnail/></div> <div class=\"dz-details\"> <div class=\"dz-size\"><span data-dz-size></span></div> <div class=\"dz-filename\"><span data-dz-name></span></div> </div> <div class=\"dz-progress\"> <span class=\"dz-upload\" data-dz-uploadprogress></span> </div> <div class=\"dz-error-message\"><span data-dz-errormessage></span></div> <div class=\"dz-success-mark\"> <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"> <title>Check</title> <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"> <path d=\"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" stroke-opacity=\"0.198794158\" stroke=\"#747474\" fill-opacity=\"0.816519475\" fill=\"#FFFFFF\"></path> </g> </svg> </div> <div class=\"dz-error-mark\"> <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"> <title>Error</title> <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"> <g stroke=\"#747474\" stroke-opacity=\"0.198794158\" fill=\"#FFFFFF\" fill-opacity=\"0.816519475\"> <path d=\"M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\"></path> </g> </g> </svg> </div> </div> "; 6994// Exports 6995/* harmony default export */ var preview_template = (code); 6996;// CONCATENATED MODULE: ./src/options.js 6997 6998 6999 7000 7001 7002function options_createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = options_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } 7003 7004function options_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return options_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return options_arrayLikeToArray(o, minLen); } 7005 7006function options_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } 7007 7008 7009 7010var defaultOptions = { 7011 /** 7012 * Has to be specified on elements other than form (or when the form 7013 * doesn't have an `action` attribute). You can also 7014 * provide a function that will be called with `files` and 7015 * must return the url (since `v3.12.0`) 7016 */ 7017 url: null, 7018 7019 /** 7020 * Can be changed to `"put"` if necessary. You can also provide a function 7021 * that will be called with `files` and must return the method (since `v3.12.0`). 7022 */ 7023 method: "post", 7024 7025 /** 7026 * Will be set on the XHRequest. 7027 */ 7028 withCredentials: false, 7029 7030 /** 7031 * The timeout for the XHR requests in milliseconds (since `v4.4.0`). 7032 * If set to null or 0, no timeout is going to be set. 7033 */ 7034 timeout: null, 7035 7036 /** 7037 * How many file uploads to process in parallel (See the 7038 * Enqueuing file uploads documentation section for more info) 7039 */ 7040 parallelUploads: 2, 7041 7042 /** 7043 * Whether to send multiple files in one request. If 7044 * this it set to true, then the fallback file input element will 7045 * have the `multiple` attribute as well. This option will 7046 * also trigger additional events (like `processingmultiple`). See the events 7047 * documentation section for more information. 7048 */ 7049 uploadMultiple: false, 7050 7051 /** 7052 * Whether you want files to be uploaded in chunks to your server. This can't be 7053 * used in combination with `uploadMultiple`. 7054 * 7055 * See [chunksUploaded](#config-chunksUploaded) for the callback to finalise an upload. 7056 */ 7057 chunking: false, 7058 7059 /** 7060 * If `chunking` is enabled, this defines whether **every** file should be chunked, 7061 * even if the file size is below chunkSize. This means, that the additional chunk 7062 * form data will be submitted and the `chunksUploaded` callback will be invoked. 7063 */ 7064 forceChunking: false, 7065 7066 /** 7067 * If `chunking` is `true`, then this defines the chunk size in bytes. 7068 */ 7069 chunkSize: 2000000, 7070 7071 /** 7072 * If `true`, the individual chunks of a file are being uploaded simultaneously. 7073 */ 7074 parallelChunkUploads: false, 7075 7076 /** 7077 * Whether a chunk should be retried if it fails. 7078 */ 7079 retryChunks: false, 7080 7081 /** 7082 * If `retryChunks` is true, how many times should it be retried. 7083 */ 7084 retryChunksLimit: 3, 7085 7086 /** 7087 * The maximum filesize (in bytes) that is allowed to be uploaded. 7088 */ 7089 maxFilesize: 256, 7090 7091 /** 7092 * The name of the file param that gets transferred. 7093 * **NOTE**: If you have the option `uploadMultiple` set to `true`, then 7094 * Dropzone will append `[]` to the name. 7095 */ 7096 paramName: "file", 7097 7098 /** 7099 * Whether thumbnails for images should be generated 7100 */ 7101 createImageThumbnails: true, 7102 7103 /** 7104 * In MB. When the filename exceeds this limit, the thumbnail will not be generated. 7105 */ 7106 maxThumbnailFilesize: 10, 7107 7108 /** 7109 * If `null`, the ratio of the image will be used to calculate it. 7110 */ 7111 thumbnailWidth: 120, 7112 7113 /** 7114 * The same as `thumbnailWidth`. If both are null, images will not be resized. 7115 */ 7116 thumbnailHeight: 120, 7117 7118 /** 7119 * How the images should be scaled down in case both, `thumbnailWidth` and `thumbnailHeight` are provided. 7120 * Can be either `contain` or `crop`. 7121 */ 7122 thumbnailMethod: "crop", 7123 7124 /** 7125 * If set, images will be resized to these dimensions before being **uploaded**. 7126 * If only one, `resizeWidth` **or** `resizeHeight` is provided, the original aspect 7127 * ratio of the file will be preserved. 7128 * 7129 * The `options.transformFile` function uses these options, so if the `transformFile` function 7130 * is overridden, these options don't do anything. 7131 */ 7132 resizeWidth: null, 7133 7134 /** 7135 * See `resizeWidth`. 7136 */ 7137 resizeHeight: null, 7138 7139 /** 7140 * The mime type of the resized image (before it gets uploaded to the server). 7141 * If `null` the original mime type will be used. To force jpeg, for example, use `image/jpeg`. 7142 * See `resizeWidth` for more information. 7143 */ 7144 resizeMimeType: null, 7145 7146 /** 7147 * The quality of the resized images. See `resizeWidth`. 7148 */ 7149 resizeQuality: 0.8, 7150 7151 /** 7152 * How the images should be scaled down in case both, `resizeWidth` and `resizeHeight` are provided. 7153 * Can be either `contain` or `crop`. 7154 */ 7155 resizeMethod: "contain", 7156 7157 /** 7158 * The base that is used to calculate the **displayed** filesize. You can 7159 * change this to 1024 if you would rather display kibibytes, mebibytes, 7160 * etc... 1024 is technically incorrect, because `1024 bytes` are `1 kibibyte` 7161 * not `1 kilobyte`. You can change this to `1024` if you don't care about 7162 * validity. 7163 */ 7164 filesizeBase: 1000, 7165 7166 /** 7167 * If not `null` defines how many files this Dropzone handles. If it exceeds, 7168 * the event `maxfilesexceeded` will be called. The dropzone element gets the 7169 * class `dz-max-files-reached` accordingly so you can provide visual 7170 * feedback. 7171 */ 7172 maxFiles: null, 7173 7174 /** 7175 * An optional object to send additional headers to the server. Eg: 7176 * `{ "My-Awesome-Header": "header value" }` 7177 */ 7178 headers: null, 7179 7180 /** 7181 * If `true`, the dropzone element itself will be clickable, if `false` 7182 * nothing will be clickable. 7183 * 7184 * You can also pass an HTML element, a CSS selector (for multiple elements) 7185 * or an array of those. In that case, all of those elements will trigger an 7186 * upload when clicked. 7187 */ 7188 clickable: true, 7189 7190 /** 7191 * Whether hidden files in directories should be ignored. 7192 */ 7193 ignoreHiddenFiles: true, 7194 7195 /** 7196 * The default implementation of `accept` checks the file's mime type or 7197 * extension against this list. This is a comma separated list of mime 7198 * types or file extensions. 7199 * 7200 * Eg.: `image/*,application/pdf,.psd` 7201 * 7202 * If the Dropzone is `clickable` this option will also be used as 7203 * [`accept`](https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept) 7204 * parameter on the hidden file input as well. 7205 */ 7206 acceptedFiles: null, 7207 7208 /** 7209 * **Deprecated!** 7210 * Use acceptedFiles instead. 7211 */ 7212 acceptedMimeTypes: null, 7213 7214 /** 7215 * If false, files will be added to the queue but the queue will not be 7216 * processed automatically. 7217 * This can be useful if you need some additional user input before sending 7218 * files (or if you want want all files sent at once). 7219 * If you're ready to send the file simply call `myDropzone.processQueue()`. 7220 * 7221 * See the [enqueuing file uploads](#enqueuing-file-uploads) documentation 7222 * section for more information. 7223 */ 7224 autoProcessQueue: true, 7225 7226 /** 7227 * If false, files added to the dropzone will not be queued by default. 7228 * You'll have to call `enqueueFile(file)` manually. 7229 */ 7230 autoQueue: true, 7231 7232 /** 7233 * If `true`, this will add a link to every file preview to remove or cancel (if 7234 * already uploading) the file. The `dictCancelUpload`, `dictCancelUploadConfirmation` 7235 * and `dictRemoveFile` options are used for the wording. 7236 */ 7237 addRemoveLinks: false, 7238 7239 /** 7240 * Defines where to display the file previews â if `null` the 7241 * Dropzone element itself is used. Can be a plain `HTMLElement` or a CSS 7242 * selector. The element should have the `dropzone-previews` class so 7243 * the previews are displayed properly. 7244 */ 7245 previewsContainer: null, 7246 7247 /** 7248 * Set this to `true` if you don't want previews to be shown. 7249 */ 7250 disablePreviews: false, 7251 7252 /** 7253 * This is the element the hidden input field (which is used when clicking on the 7254 * dropzone to trigger file selection) will be appended to. This might 7255 * be important in case you use frameworks to switch the content of your page. 7256 * 7257 * Can be a selector string, or an element directly. 7258 */ 7259 hiddenInputContainer: "body", 7260 7261 /** 7262 * If null, no capture type will be specified 7263 * If camera, mobile devices will skip the file selection and choose camera 7264 * If microphone, mobile devices will skip the file selection and choose the microphone 7265 * If camcorder, mobile devices will skip the file selection and choose the camera in video mode 7266 * On apple devices multiple must be set to false. AcceptedFiles may need to 7267 * be set to an appropriate mime type (e.g. "image/*", "audio/*", or "video/*"). 7268 */ 7269 capture: null, 7270 7271 /** 7272 * **Deprecated**. Use `renameFile` instead. 7273 */ 7274 renameFilename: null, 7275 7276 /** 7277 * A function that is invoked before the file is uploaded to the server and renames the file. 7278 * This function gets the `File` as argument and can use the `file.name`. The actual name of the 7279 * file that gets used during the upload can be accessed through `file.upload.filename`. 7280 */ 7281 renameFile: null, 7282 7283 /** 7284 * If `true` the fallback will be forced. This is very useful to test your server 7285 * implementations first and make sure that everything works as 7286 * expected without dropzone if you experience problems, and to test 7287 * how your fallbacks will look. 7288 */ 7289 forceFallback: false, 7290 7291 /** 7292 * The text used before any files are dropped. 7293 */ 7294 dictDefaultMessage: "Drop files here to upload", 7295 7296 /** 7297 * The text that replaces the default message text it the browser is not supported. 7298 */ 7299 dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.", 7300 7301 /** 7302 * The text that will be added before the fallback form. 7303 * If you provide a fallback element yourself, or if this option is `null` this will 7304 * be ignored. 7305 */ 7306 dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.", 7307 7308 /** 7309 * If the filesize is too big. 7310 * `{{filesize}}` and `{{maxFilesize}}` will be replaced with the respective configuration values. 7311 */ 7312 dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.", 7313 7314 /** 7315 * If the file doesn't match the file type. 7316 */ 7317 dictInvalidFileType: "You can't upload files of this type.", 7318 7319 /** 7320 * If the server response was invalid. 7321 * `{{statusCode}}` will be replaced with the servers status code. 7322 */ 7323 dictResponseError: "Server responded with {{statusCode}} code.", 7324 7325 /** 7326 * If `addRemoveLinks` is true, the text to be used for the cancel upload link. 7327 */ 7328 dictCancelUpload: "Cancel upload", 7329 7330 /** 7331 * The text that is displayed if an upload was manually canceled 7332 */ 7333 dictUploadCanceled: "Upload canceled.", 7334 7335 /** 7336 * If `addRemoveLinks` is true, the text to be used for confirmation when cancelling upload. 7337 */ 7338 dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?", 7339 7340 /** 7341 * If `addRemoveLinks` is true, the text to be used to remove a file. 7342 */ 7343 dictRemoveFile: "Remove file", 7344 7345 /** 7346 * If this is not null, then the user will be prompted before removing a file. 7347 */ 7348 dictRemoveFileConfirmation: null, 7349 7350 /** 7351 * Displayed if `maxFiles` is st and exceeded. 7352 * The string `{{maxFiles}}` will be replaced by the configuration value. 7353 */ 7354 dictMaxFilesExceeded: "You can not upload any more files.", 7355 7356 /** 7357 * Allows you to translate the different units. Starting with `tb` for terabytes and going down to 7358 * `b` for bytes. 7359 */ 7360 dictFileSizeUnits: { 7361 tb: "TB", 7362 gb: "GB", 7363 mb: "MB", 7364 kb: "KB", 7365 b: "b" 7366 }, 7367 7368 /** 7369 * Called when dropzone initialized 7370 * You can add event listeners here 7371 */ 7372 init: function init() {}, 7373 7374 /** 7375 * Can be an **object** of additional parameters to transfer to the server, **or** a `Function` 7376 * that gets invoked with the `files`, `xhr` and, if it's a chunked upload, `chunk` arguments. In case 7377 * of a function, this needs to return a map. 7378 * 7379 * The default implementation does nothing for normal uploads, but adds relevant information for 7380 * chunked uploads. 7381 * 7382 * This is the same as adding hidden input fields in the form element. 7383 */ 7384 params: function params(files, xhr, chunk) { 7385 if (chunk) { 7386 return { 7387 dzuuid: chunk.file.upload.uuid, 7388 dzchunkindex: chunk.index, 7389 dztotalfilesize: chunk.file.size, 7390 dzchunksize: this.options.chunkSize, 7391 dztotalchunkcount: chunk.file.upload.totalChunkCount, 7392 dzchunkbyteoffset: chunk.index * this.options.chunkSize 7393 }; 7394 } 7395 }, 7396 7397 /** 7398 * A function that gets a [file](https://developer.mozilla.org/en-US/docs/DOM/File) 7399 * and a `done` function as parameters. 7400 * 7401 * If the done function is invoked without arguments, the file is "accepted" and will 7402 * be processed. If you pass an error message, the file is rejected, and the error 7403 * message will be displayed. 7404 * This function will not be called if the file is too big or doesn't match the mime types. 7405 */ 7406 accept: function accept(file, done) { 7407 return done(); 7408 }, 7409 7410 /** 7411 * The callback that will be invoked when all chunks have been uploaded for a file. 7412 * It gets the file for which the chunks have been uploaded as the first parameter, 7413 * and the `done` function as second. `done()` needs to be invoked when everything 7414 * needed to finish the upload process is done. 7415 */ 7416 chunksUploaded: function chunksUploaded(file, done) { 7417 done(); 7418 }, 7419 7420 /** 7421 * Gets called when the browser is not supported. 7422 * The default implementation shows the fallback input field and adds 7423 * a text. 7424 */ 7425 fallback: function fallback() { 7426 // This code should pass in IE7... :( 7427 var messageElement; 7428 this.element.className = "".concat(this.element.className, " dz-browser-not-supported"); 7429 7430 var _iterator = options_createForOfIteratorHelper(this.element.getElementsByTagName("div"), true), 7431 _step; 7432 7433 try { 7434 for (_iterator.s(); !(_step = _iterator.n()).done;) { 7435 var child = _step.value; 7436 7437 if (/(^| )dz-message($| )/.test(child.className)) { 7438 messageElement = child; 7439 child.className = "dz-message"; // Removes the 'dz-default' class 7440 7441 break; 7442 } 7443 } 7444 } catch (err) { 7445 _iterator.e(err); 7446 } finally { 7447 _iterator.f(); 7448 } 7449 7450 if (!messageElement) { 7451 messageElement = Dropzone.createElement('<div class="dz-message"><span></span></div>'); 7452 this.element.appendChild(messageElement); 7453 } 7454 7455 var span = messageElement.getElementsByTagName("span")[0]; 7456 7457 if (span) { 7458 if (span.textContent != null) { 7459 span.textContent = this.options.dictFallbackMessage; 7460 } else if (span.innerText != null) { 7461 span.innerText = this.options.dictFallbackMessage; 7462 } 7463 } 7464 7465 return this.element.appendChild(this.getFallbackForm()); 7466 }, 7467 7468 /** 7469 * Gets called to calculate the thumbnail dimensions. 7470 * 7471 * It gets `file`, `width` and `height` (both may be `null`) as parameters and must return an object containing: 7472 * 7473 * - `srcWidth` & `srcHeight` (required) 7474 * - `trgWidth` & `trgHeight` (required) 7475 * - `srcX` & `srcY` (optional, default `0`) 7476 * - `trgX` & `trgY` (optional, default `0`) 7477 * 7478 * Those values are going to be used by `ctx.drawImage()`. 7479 */ 7480 resize: function resize(file, width, height, resizeMethod) { 7481 var info = { 7482 srcX: 0, 7483 srcY: 0, 7484 srcWidth: file.width, 7485 srcHeight: file.height 7486 }; 7487 var srcRatio = file.width / file.height; // Automatically calculate dimensions if not specified 7488 7489 if (width == null && height == null) { 7490 width = info.srcWidth; 7491 height = info.srcHeight; 7492 } else if (width == null) { 7493 width = height * srcRatio; 7494 } else if (height == null) { 7495 height = width / srcRatio; 7496 } // Make sure images aren't upscaled 7497 7498 7499 width = Math.min(width, info.srcWidth); 7500 height = Math.min(height, info.srcHeight); 7501 var trgRatio = width / height; 7502 7503 if (info.srcWidth > width || info.srcHeight > height) { 7504 // Image is bigger and needs rescaling 7505 if (resizeMethod === "crop") { 7506 if (srcRatio > trgRatio) { 7507 info.srcHeight = file.height; 7508 info.srcWidth = info.srcHeight * trgRatio; 7509 } else { 7510 info.srcWidth = file.width; 7511 info.srcHeight = info.srcWidth / trgRatio; 7512 } 7513 } else if (resizeMethod === "contain") { 7514 // Method 'contain' 7515 if (srcRatio > trgRatio) { 7516 height = width / srcRatio; 7517 } else { 7518 width = height * srcRatio; 7519 } 7520 } else { 7521 throw new Error("Unknown resizeMethod '".concat(resizeMethod, "'")); 7522 } 7523 } 7524 7525 info.srcX = (file.width - info.srcWidth) / 2; 7526 info.srcY = (file.height - info.srcHeight) / 2; 7527 info.trgWidth = width; 7528 info.trgHeight = height; 7529 return info; 7530 }, 7531 7532 /** 7533 * Can be used to transform the file (for example, resize an image if necessary). 7534 * 7535 * The default implementation uses `resizeWidth` and `resizeHeight` (if provided) and resizes 7536 * images according to those dimensions. 7537 * 7538 * Gets the `file` as the first parameter, and a `done()` function as the second, that needs 7539 * to be invoked with the file when the transformation is done. 7540 */ 7541 transformFile: function transformFile(file, done) { 7542 if ((this.options.resizeWidth || this.options.resizeHeight) && file.type.match(/image.*/)) { 7543 return this.resizeImage(file, this.options.resizeWidth, this.options.resizeHeight, this.options.resizeMethod, done); 7544 } else { 7545 return done(file); 7546 } 7547 }, 7548 7549 /** 7550 * A string that contains the template used for each dropped 7551 * file. Change it to fulfill your needs but make sure to properly 7552 * provide all elements. 7553 * 7554 * If you want to use an actual HTML element instead of providing a String 7555 * as a config option, you could create a div with the id `tpl`, 7556 * put the template inside it and provide the element like this: 7557 * 7558 * document 7559 * .querySelector('#tpl') 7560 * .innerHTML 7561 * 7562 */ 7563 previewTemplate: preview_template, 7564 7565 /* 7566 Those functions register themselves to the events on init and handle all 7567 the user interface specific stuff. Overwriting them won't break the upload 7568 but can break the way it's displayed. 7569 You can overwrite them if you don't like the default behavior. If you just 7570 want to add an additional event handler, register it on the dropzone object 7571 and don't overwrite those options. 7572 */ 7573 // Those are self explanatory and simply concern the DragnDrop. 7574 drop: function drop(e) { 7575 return this.element.classList.remove("dz-drag-hover"); 7576 }, 7577 dragstart: function dragstart(e) {}, 7578 dragend: function dragend(e) { 7579 return this.element.classList.remove("dz-drag-hover"); 7580 }, 7581 dragenter: function dragenter(e) { 7582 return this.element.classList.add("dz-drag-hover"); 7583 }, 7584 dragover: function dragover(e) { 7585 return this.element.classList.add("dz-drag-hover"); 7586 }, 7587 dragleave: function dragleave(e) { 7588 return this.element.classList.remove("dz-drag-hover"); 7589 }, 7590 paste: function paste(e) {}, 7591 // Called whenever there are no files left in the dropzone anymore, and the 7592 // dropzone should be displayed as if in the initial state. 7593 reset: function reset() { 7594 return this.element.classList.remove("dz-started"); 7595 }, 7596 // Called when a file is added to the queue 7597 // Receives `file` 7598 addedfile: function addedfile(file) { 7599 var _this = this; 7600 7601 if (this.element === this.previewsContainer) { 7602 this.element.classList.add("dz-started"); 7603 } 7604 7605 if (this.previewsContainer && !this.options.disablePreviews) { 7606 file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim()); 7607 file.previewTemplate = file.previewElement; // Backwards compatibility 7608 7609 this.previewsContainer.appendChild(file.previewElement); 7610 7611 var _iterator2 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-name]"), true), 7612 _step2; 7613
vendor: 5,964 bytes, lines 7614-7788
7614 try { 7615 for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { 7616 var node = _step2.value; 7617 node.textContent = file.name; 7618 } 7619 } catch (err) { 7620 _iterator2.e(err); 7621 } finally { 7622 _iterator2.f(); 7623 } 7624 7625 var _iterator3 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-size]"), true), 7626 _step3; 7627 7628 try { 7629 for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { 7630 node = _step3.value; 7631 node.innerHTML = this.filesize(file.size); 7632 } 7633 } catch (err) { 7634 _iterator3.e(err); 7635 } finally { 7636 _iterator3.f(); 7637 } 7638 7639 if (this.options.addRemoveLinks) { 7640 file._removeLink = Dropzone.createElement("<a class=\"dz-remove\" href=\"javascript:undefined;\" data-dz-remove>".concat(this.options.dictRemoveFile, "</a>")); 7641 file.previewElement.appendChild(file._removeLink); 7642 } 7643 7644 var removeFileEvent = function removeFileEvent(e) { 7645 e.preventDefault(); 7646 e.stopPropagation(); 7647 7648 if (file.status === Dropzone.UPLOADING) { 7649 return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function () { 7650 return _this.removeFile(file); 7651 }); 7652 } else { 7653 if (_this.options.dictRemoveFileConfirmation) { 7654 return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function () { 7655 return _this.removeFile(file); 7656 }); 7657 } else { 7658 return _this.removeFile(file); 7659 } 7660 } 7661 }; 7662 7663 var _iterator4 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-remove]"), true), 7664 _step4; 7665 7666 try { 7667 for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { 7668 var removeLink = _step4.value; 7669 removeLink.addEventListener("click", removeFileEvent); 7670 } 7671 } catch (err) { 7672 _iterator4.e(err); 7673 } finally { 7674 _iterator4.f(); 7675 } 7676 } 7677 }, 7678 // Called whenever a file is removed. 7679 removedfile: function removedfile(file) { 7680 if (file.previewElement != null && file.previewElement.parentNode != null) { 7681 file.previewElement.parentNode.removeChild(file.previewElement); 7682 } 7683 7684 return this._updateMaxFilesReachedClass(); 7685 }, 7686 // Called when a thumbnail has been generated 7687 // Receives `file` and `dataUrl` 7688 thumbnail: function thumbnail(file, dataUrl) { 7689 if (file.previewElement) { 7690 file.previewElement.classList.remove("dz-file-preview"); 7691 7692 var _iterator5 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-thumbnail]"), true), 7693 _step5; 7694 7695 try { 7696 for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { 7697 var thumbnailElement = _step5.value; 7698 thumbnailElement.alt = file.name; 7699 thumbnailElement.src = dataUrl; 7700 } 7701 } catch (err) { 7702 _iterator5.e(err); 7703 } finally { 7704 _iterator5.f(); 7705 } 7706 7707 return setTimeout(function () { 7708 return file.previewElement.classList.add("dz-image-preview"); 7709 }, 1); 7710 } 7711 }, 7712 // Called whenever an error occurs 7713 // Receives `file` and `message` 7714 error: function error(file, message) { 7715 if (file.previewElement) { 7716 file.previewElement.classList.add("dz-error"); 7717 7718 if (typeof message !== "string" && message.error) { 7719 message = message.error; 7720 } 7721 7722 var _iterator6 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-errormessage]"), true), 7723 _step6; 7724 7725 try { 7726 for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { 7727 var node = _step6.value; 7728 node.textContent = message; 7729 } 7730 } catch (err) { 7731 _iterator6.e(err); 7732 } finally { 7733 _iterator6.f(); 7734 } 7735 } 7736 }, 7737 errormultiple: function errormultiple() {}, 7738 // Called when a file gets processed. Since there is a cue, not all added 7739 // files are processed immediately. 7740 // Receives `file` 7741 processing: function processing(file) { 7742 if (file.previewElement) { 7743 file.previewElement.classList.add("dz-processing"); 7744 7745 if (file._removeLink) { 7746 return file._removeLink.innerHTML = this.options.dictCancelUpload; 7747 } 7748 } 7749 }, 7750 processingmultiple: function processingmultiple() {}, 7751 // Called whenever the upload progress gets updated. 7752 // Receives `file`, `progress` (percentage 0-100) and `bytesSent`. 7753 // To get the total number of bytes of the file, use `file.size` 7754 uploadprogress: function uploadprogress(file, progress, bytesSent) { 7755 if (file.previewElement) { 7756 var _iterator7 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-uploadprogress]"), true), 7757 _step7; 7758 7759 try { 7760 for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) { 7761 var node = _step7.value; 7762 node.nodeName === "PROGRESS" ? node.value = progress : node.style.width = "".concat(progress, "%"); 7763 } 7764 } catch (err) { 7765 _iterator7.e(err); 7766 } finally { 7767 _iterator7.f(); 7768 } 7769 } 7770 }, 7771 // Called whenever the total upload progress gets updated. 7772 // Called with totalUploadProgress (0-100), totalBytes and totalBytesSent 7773 totaluploadprogress: function totaluploadprogress() {}, 7774 // Called just before the file is sent. Gets the `xhr` object as second 7775 // parameter, so you can modify it (for example to add a CSRF token) and a 7776 // `formData` object to add additional information. 7777 sending: function sending() {}, 7778 sendingmultiple: function sendingmultiple() {}, 7779 // When the complete upload is finished and successful 7780 // Receives `file` 7781 success: function success(file) { 7782 if (file.previewElement) { 7783 return file.previewElement.classList.add("dz-success"); 7784 } 7785 }, 7786 successmultiple: function successmultiple() {}, 7787 // When the upload is canceled. 7788 canceled: function canceled(file) {
vendor: 11,412 bytes, lines 7789-8062
7789 return this.emit("error", file, this.options.dictUploadCanceled); 7790 }, 7791 canceledmultiple: function canceledmultiple() {}, 7792 // When the upload is finished, either with success or an error. 7793 // Receives `file` 7794 complete: function complete(file) { 7795 if (file._removeLink) { 7796 file._removeLink.innerHTML = this.options.dictRemoveFile; 7797 } 7798 7799 if (file.previewElement) { 7800 return file.previewElement.classList.add("dz-complete"); 7801 } 7802 }, 7803 completemultiple: function completemultiple() {}, 7804 maxfilesexceeded: function maxfilesexceeded() {}, 7805 maxfilesreached: function maxfilesreached() {}, 7806 queuecomplete: function queuecomplete() {}, 7807 addedfiles: function addedfiles() {} 7808}; 7809/* harmony default export */ var src_options = (defaultOptions); 7810;// CONCATENATED MODULE: ./src/dropzone.js 7811function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859function dropzone_createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = dropzone_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } 7860 7861function dropzone_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return dropzone_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return dropzone_arrayLikeToArray(o, minLen); } 7862 7863function dropzone_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } 7864 7865function dropzone_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 7866 7867function dropzone_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 7868 7869function dropzone_createClass(Constructor, protoProps, staticProps) { if (protoProps) dropzone_defineProperties(Constructor.prototype, protoProps); if (staticProps) dropzone_defineProperties(Constructor, staticProps); return Constructor; } 7870 7871function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 7872 7873function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 7874 7875function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } 7876 7877function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 7878 7879function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 7880 7881function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } 7882 7883function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 7884 7885 7886 7887 7888var Dropzone = /*#__PURE__*/function (_Emitter) { 7889 _inherits(Dropzone, _Emitter); 7890 7891 var _super = _createSuper(Dropzone); 7892 7893 function Dropzone(el, options) { 7894 var _this; 7895 7896 dropzone_classCallCheck(this, Dropzone); 7897 7898 _this = _super.call(this); 7899 var fallback, left; 7900 _this.element = el; // For backwards compatibility since the version was in the prototype previously 7901 7902 _this.version = Dropzone.version; 7903 _this.clickableElements = []; 7904 _this.listeners = []; 7905 _this.files = []; // All files 7906 7907 if (typeof _this.element === "string") { 7908 _this.element = document.querySelector(_this.element); 7909 } // Not checking if instance of HTMLElement or Element since IE9 is extremely weird. 7910 7911 7912 if (!_this.element || _this.element.nodeType == null) { 7913 throw new Error("Invalid dropzone element."); 7914 } 7915 7916 if (_this.element.dropzone) { 7917 throw new Error("Dropzone already attached."); 7918 } // Now add this dropzone to the instances. 7919 7920 7921 Dropzone.instances.push(_assertThisInitialized(_this)); // Put the dropzone inside the element itself. 7922 7923 _this.element.dropzone = _assertThisInitialized(_this); 7924 var elementOptions = (left = Dropzone.optionsForElement(_this.element)) != null ? left : {}; 7925 _this.options = Dropzone.extend({}, src_options, elementOptions, options != null ? options : {}); 7926 _this.options.previewTemplate = _this.options.previewTemplate.replace(/\n*/g, ""); // If the browser failed, just call the fallback and leave 7927 7928 if (_this.options.forceFallback || !Dropzone.isBrowserSupported()) { 7929 return _possibleConstructorReturn(_this, _this.options.fallback.call(_assertThisInitialized(_this))); 7930 } // @options.url = @element.getAttribute "action" unless @options.url? 7931 7932 7933 if (_this.options.url == null) { 7934 _this.options.url = _this.element.getAttribute("action"); 7935 } 7936 7937 if (!_this.options.url) { 7938 throw new Error("No URL provided."); 7939 } 7940 7941 if (_this.options.acceptedFiles && _this.options.acceptedMimeTypes) { 7942 throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated."); 7943 } 7944 7945 if (_this.options.uploadMultiple && _this.options.chunking) { 7946 throw new Error("You cannot set both: uploadMultiple and chunking."); 7947 } // Backwards compatibility 7948 7949 7950 if (_this.options.acceptedMimeTypes) { 7951 _this.options.acceptedFiles = _this.options.acceptedMimeTypes; 7952 delete _this.options.acceptedMimeTypes; 7953 } // Backwards compatibility 7954 7955 7956 if (_this.options.renameFilename != null) { 7957 _this.options.renameFile = function (file) { 7958 return _this.options.renameFilename.call(_assertThisInitialized(_this), file.name, file); 7959 }; 7960 } 7961 7962 if (typeof _this.options.method === "string") { 7963 _this.options.method = _this.options.method.toUpperCase(); 7964 } 7965 7966 if ((fallback = _this.getExistingFallback()) && fallback.parentNode) { 7967 // Remove the fallback 7968 fallback.parentNode.removeChild(fallback); 7969 } // Display previews in the previewsContainer element or the Dropzone element unless explicitly set to false 7970 7971 7972 if (_this.options.previewsContainer !== false) { 7973 if (_this.options.previewsContainer) { 7974 _this.previewsContainer = Dropzone.getElement(_this.options.previewsContainer, "previewsContainer"); 7975 } else { 7976 _this.previewsContainer = _this.element; 7977 } 7978 } 7979 7980 if (_this.options.clickable) { 7981 if (_this.options.clickable === true) { 7982 _this.clickableElements = [_this.element]; 7983 } else { 7984 _this.clickableElements = Dropzone.getElements(_this.options.clickable, "clickable"); 7985 } 7986 } 7987 7988 _this.init(); 7989 7990 return _this; 7991 } // Returns all files that have been accepted 7992 7993 7994 dropzone_createClass(Dropzone, [{ 7995 key: "getAcceptedFiles", 7996 value: function getAcceptedFiles() { 7997 return this.files.filter(function (file) { 7998 return file.accepted; 7999 }).map(function (file) { 8000 return file; 8001 }); 8002 } // Returns all files that have been rejected 8003 // Not sure when that's going to be useful, but added for completeness. 8004 8005 }, { 8006 key: "getRejectedFiles", 8007 value: function getRejectedFiles() { 8008 return this.files.filter(function (file) { 8009 return !file.accepted; 8010 }).map(function (file) { 8011 return file; 8012 }); 8013 } 8014 }, { 8015 key: "getFilesWithStatus", 8016 value: function getFilesWithStatus(status) { 8017 return this.files.filter(function (file) { 8018 return file.status === status; 8019 }).map(function (file) { 8020 return file; 8021 }); 8022 } // Returns all files that are in the queue 8023 8024 }, { 8025 key: "getQueuedFiles", 8026 value: function getQueuedFiles() { 8027 return this.getFilesWithStatus(Dropzone.QUEUED); 8028 } 8029 }, { 8030 key: "getUploadingFiles", 8031 value: function getUploadingFiles() { 8032 return this.getFilesWithStatus(Dropzone.UPLOADING); 8033 } 8034 }, { 8035 key: "getAddedFiles", 8036 value: function getAddedFiles() { 8037 return this.getFilesWithStatus(Dropzone.ADDED); 8038 } // Files that are either queued or uploading 8039 8040 }, { 8041 key: "getActiveFiles", 8042 value: function getActiveFiles() { 8043 return this.files.filter(function (file) { 8044 return file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED; 8045 }).map(function (file) { 8046 return file; 8047 }); 8048 } // The function that gets called when Dropzone is initialized. You 8049 // can (and should) setup event listeners inside this function. 8050 8051 }, { 8052 key: "init", 8053 value: function init() { 8054 var _this2 = this; 8055 8056 // In case it isn't set already 8057 if (this.element.tagName === "form") { 8058 this.element.setAttribute("enctype", "multipart/form-data"); 8059 } 8060 8061 if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) { 8062 this.element.appendChild(Dropzone.createElement("<div class=\"dz-default dz-message\"><
8062span class=\"dz-button\" >".concat(this.options.dictDefaultMessage, "</spa
vendor: 25,958 bytes, lines 8062-8849
8062n></div>"))); 8063 } 8064 8065 if (this.clickableElements.length) { 8066 var setupHiddenFileInput = function setupHiddenFileInput() { 8067 if (_this2.hiddenFileInput) { 8068 _this2.hiddenFileInput.parentNode.removeChild(_this2.hiddenFileInput); 8069 } 8070 8071 _this2.hiddenFileInput = document.createElement("input"); 8072 8073 _this2.hiddenFileInput.setAttribute("type", "file"); 8074 8075 if (_this2.options.maxFiles === null || _this2.options.maxFiles > 1) { 8076 _this2.hiddenFileInput.setAttribute("multiple", "multiple"); 8077 } 8078 8079 _this2.hiddenFileInput.className = "dz-hidden-input"; 8080 8081 if (_this2.options.acceptedFiles !== null) { 8082 _this2.hiddenFileInput.setAttribute("accept", _this2.options.acceptedFiles); 8083 } 8084 8085 if (_this2.options.capture !== null) { 8086 _this2.hiddenFileInput.setAttribute("capture", _this2.options.capture); 8087 } // Making sure that no one can "tab" into this field. 8088 8089 8090 _this2.hiddenFileInput.setAttribute("tabindex", "-1"); // Not setting `display="none"` because some browsers don't accept clicks 8091 // on elements that aren't displayed. 8092 8093 8094 _this2.hiddenFileInput.style.visibility = "hidden"; 8095 _this2.hiddenFileInput.style.position = "absolute"; 8096 _this2.hiddenFileInput.style.top = "0"; 8097 _this2.hiddenFileInput.style.left = "0"; 8098 _this2.hiddenFileInput.style.height = "0"; 8099 _this2.hiddenFileInput.style.width = "0"; 8100 Dropzone.getElement(_this2.options.hiddenInputContainer, "hiddenInputContainer").appendChild(_this2.hiddenFileInput); 8101 8102 _this2.hiddenFileInput.addEventListener("change", function () { 8103 var files = _this2.hiddenFileInput.files; 8104 8105 if (files.length) { 8106 var _iterator = dropzone_createForOfIteratorHelper(files, true), 8107 _step; 8108 8109 try { 8110 for (_iterator.s(); !(_step = _iterator.n()).done;) { 8111 var file = _step.value; 8112 8113 _this2.addFile(file); 8114 } 8115 } catch (err) { 8116 _iterator.e(err); 8117 } finally { 8118 _iterator.f(); 8119 } 8120 } 8121 8122 _this2.emit("addedfiles", files); 8123 8124 setupHiddenFileInput(); 8125 }); 8126 }; 8127 8128 setupHiddenFileInput(); 8129 } 8130 8131 this.URL = window.URL !== null ? window.URL : window.webkitURL; // Setup all event listeners on the Dropzone object itself. 8132 // They're not in @setupEventListeners() because they shouldn't be removed 8133 // again when the dropzone gets disabled. 8134 8135 var _iterator2 = dropzone_createForOfIteratorHelper(this.events, true), 8136 _step2; 8137 8138 try { 8139 for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { 8140 var eventName = _step2.value; 8141 this.on(eventName, this.options[eventName]); 8142 } 8143 } catch (err) { 8144 _iterator2.e(err); 8145 } finally { 8146 _iterator2.f(); 8147 } 8148 8149 this.on("uploadprogress", function () { 8150 return _this2.updateTotalUploadProgress(); 8151 }); 8152 this.on("removedfile", function () { 8153 return _this2.updateTotalUploadProgress(); 8154 }); 8155 this.on("canceled", function (file) { 8156 return _this2.emit("complete", file); 8157 }); // Emit a `queuecomplete` event if all files finished uploading. 8158 8159 this.on("complete", function (file) { 8160 if (_this2.getAddedFiles().length === 0 && _this2.getUploadingFiles().length === 0 && _this2.getQueuedFiles().length === 0) { 8161 // This needs to be deferred so that `queuecomplete` really triggers after `complete` 8162 return setTimeout(function () { 8163 return _this2.emit("queuecomplete"); 8164 }, 0); 8165 } 8166 }); 8167 8168 var containsFiles = function containsFiles(e) { 8169 if (e.dataTransfer.types) { 8170 // Because e.dataTransfer.types is an Object in 8171 // IE, we need to iterate like this instead of 8172 // using e.dataTransfer.types.some() 8173 for (var i = 0; i < e.dataTransfer.types.length; i++) { 8174 if (e.dataTransfer.types[i] === "Files") return true; 8175 } 8176 } 8177 8178 return false; 8179 }; 8180 8181 var noPropagation = function noPropagation(e) { 8182 // If there are no files, we don't want to stop 8183 // propagation so we don't interfere with other 8184 // drag and drop behaviour. 8185 if (!containsFiles(e)) return; 8186 e.stopPropagation(); 8187 8188 if (e.preventDefault) { 8189 return e.preventDefault(); 8190 } else { 8191 return e.returnValue = false; 8192 } 8193 }; // Create the listeners 8194 8195 8196 this.listeners = [{ 8197 element: this.element, 8198 events: { 8199 dragstart: function dragstart(e) { 8200 return _this2.emit("dragstart", e); 8201 }, 8202 dragenter: function dragenter(e) { 8203 noPropagation(e); 8204 return _this2.emit("dragenter", e); 8205 }, 8206 dragover: function dragover(e) { 8207 // Makes it possible to drag files from chrome's download bar 8208 // http://stackoverflow.com/questions/19526430/drag-and-drop-file-uploads-from-chrome-downloads-bar 8209 // Try is required to prevent bug in Internet Explorer 11 (SCRIPT65535 exception) 8210 var efct; 8211 8212 try { 8213 efct = e.dataTransfer.effectAllowed; 8214 } catch (error) {} 8215 8216 e.dataTransfer.dropEffect = "move" === efct || "linkMove" === efct ? "move" : "copy"; 8217 noPropagation(e); 8218 return _this2.emit("dragover", e); 8219 }, 8220 dragleave: function dragleave(e) { 8221 return _this2.emit("dragleave", e); 8222 }, 8223 drop: function drop(e) { 8224 noPropagation(e); 8225 return _this2.drop(e); 8226 }, 8227 dragend: function dragend(e) { 8228 return _this2.emit("dragend", e); 8229 } 8230 } // This is disabled right now, because the browsers don't implement it properly. 8231 // "paste": (e) => 8232 // noPropagation e 8233 // @paste e 8234 8235 }]; 8236 this.clickableElements.forEach(function (clickableElement) { 8237 return _this2.listeners.push({ 8238 element: clickableElement, 8239 events: { 8240 click: function click(evt) { 8241 // Only the actual dropzone or the message element should trigger file selection 8242 if (clickableElement !== _this2.element || evt.target === _this2.element || Dropzone.elementInside(evt.target, _this2.element.querySelector(".dz-message"))) { 8243 _this2.hiddenFileInput.click(); // Forward the click 8244 8245 } 8246 8247 return true; 8248 } 8249 } 8250 }); 8251 }); 8252 this.enable(); 8253 return this.options.init.call(this); 8254 } // Not fully tested yet 8255 8256 }, { 8257 key: "destroy", 8258 value: function destroy() { 8259 this.disable(); 8260 this.removeAllFiles(true); 8261 8262 if (this.hiddenFileInput != null ? this.hiddenFileInput.parentNode : undefined) { 8263 this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput); 8264 this.hiddenFileInput = null; 8265 } 8266 8267 delete this.element.dropzone; 8268 return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1); 8269 } 8270 }, { 8271 key: "updateTotalUploadProgress", 8272 value: function updateTotalUploadProgress() { 8273 var totalUploadProgress; 8274 var totalBytesSent = 0; 8275 var totalBytes = 0; 8276 var activeFiles = this.getActiveFiles(); 8277 8278 if (activeFiles.length) { 8279 var _iterator3 = dropzone_createForOfIteratorHelper(this.getActiveFiles(), true), 8280 _step3; 8281 8282 try { 8283 for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { 8284 var file = _step3.value; 8285 totalBytesSent += file.upload.bytesSent; 8286 totalBytes += file.upload.total; 8287 } 8288 } catch (err) { 8289 _iterator3.e(err); 8290 } finally { 8291 _iterator3.f(); 8292 } 8293 8294 totalUploadProgress = 100 * totalBytesSent / totalBytes; 8295 } else { 8296 totalUploadProgress = 100; 8297 } 8298 8299 return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent); 8300 } // @options.paramName can be a function taking one parameter rather than a string. 8301 // A parameter name for a file is obtained simply by calling this with an index number. 8302 8303 }, { 8304 key: "_getParamName", 8305 value: function _getParamName(n) { 8306 if (typeof this.options.paramName === "function") { 8307 return this.options.paramName(n); 8308 } else { 8309 return "".concat(this.options.paramName).concat(this.options.uploadMultiple ? "[".concat(n, "]") : ""); 8310 } 8311 } // If @options.renameFile is a function, 8312 // the function will be used to rename the file.name before appending it to the formData 8313 8314 }, { 8315 key: "_renameFile", 8316 value: function _renameFile(file) { 8317 if (typeof this.options.renameFile !== "function") { 8318 return file.name; 8319 } 8320 8321 return this.options.renameFile(file); 8322 } // Returns a form that can be used as fallback if the browser does not support DragnDrop 8323 // 8324 // If the dropzone is already a form, only the input field and button are returned. Otherwise a complete form element is provided. 8325 // This code has to pass in IE7 :( 8326 8327 }, { 8328 key: "getFallbackForm", 8329 value: function getFallbackForm() { 8330 var existingFallback, form; 8331 8332 if (existingFallback = this.getExistingFallback()) { 8333 return existingFallback; 8334 } 8335 8336 var fieldsString = '<div class="dz-fallback">'; 8337 8338 if (this.options.dictFallbackText) { 8339 fieldsString += "<p>".concat(this.options.dictFallbackText, "</p>"); 8340 } 8341 8342 fieldsString += "<input type=\"file\" name=\"".concat(this._getParamName(0), "\" ").concat(this.options.uploadMultiple ? 'multiple="multiple"' : undefined, " /><input type=\"submit\" value=\"Upload!\"></div>"); 8343 var fields = Dropzone.createElement(fieldsString); 8344 8345 if (this.element.tagName !== "FORM") { 8346 form = Dropzone.createElement("<form action=\"".concat(this.options.url, "\" enctype=\"multipart/form-data\" method=\"").concat(this.options.method, "\"></form>")); 8347 form.appendChild(fields); 8348 } else { 8349 // Make sure that the enctype and method attributes are set properly 8350 this.element.setAttribute("enctype", "multipart/form-data"); 8351 this.element.setAttribute("method", this.options.method); 8352 } 8353 8354 return form != null ? form : fields; 8355 } // Returns the fallback elements if they exist already 8356 // 8357 // This code has to pass in IE7 :( 8358 8359 }, { 8360 key: "getExistingFallback", 8361 value: function getExistingFallback() { 8362 var getFallback = function getFallback(elements) { 8363 var _iterator4 = dropzone_createForOfIteratorHelper(elements, true), 8364 _step4; 8365 8366 try { 8367 for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { 8368 var el = _step4.value; 8369 8370 if (/(^| )fallback($| )/.test(el.className)) { 8371 return el; 8372 } 8373 } 8374 } catch (err) { 8375 _iterator4.e(err); 8376 } finally { 8377 _iterator4.f(); 8378 } 8379 }; 8380 8381 for (var _i = 0, _arr = ["div", "form"]; _i < _arr.length; _i++) { 8382 var tagName = _arr[_i]; 8383 var fallback; 8384 8385 if (fallback = getFallback(this.element.getElementsByTagName(tagName))) { 8386 return fallback; 8387 } 8388 } 8389 } // Activates all listeners stored in @listeners 8390 8391 }, { 8392 key: "setupEventListeners", 8393 value: function setupEventListeners() { 8394 return this.listeners.map(function (elementListeners) { 8395 return function () { 8396 var result = []; 8397 8398 for (var event in elementListeners.events) { 8399 var listener = elementListeners.events[event]; 8400 result.push(elementListeners.element.addEventListener(event, listener, false)); 8401 } 8402 8403 return result; 8404 }(); 8405 }); 8406 } // Deactivates all listeners stored in @listeners 8407 8408 }, { 8409 key: "removeEventListeners", 8410 value: function removeEventListeners() { 8411 return this.listeners.map(function (elementListeners) { 8412 return function () { 8413 var result = []; 8414 8415 for (var event in elementListeners.events) { 8416 var listener = elementListeners.events[event]; 8417 result.push(elementListeners.element.removeEventListener(event, listener, false)); 8418 } 8419 8420 return result; 8421 }(); 8422 }); 8423 } // Removes all event listeners and cancels all files in the queue or being processed. 8424 8425 }, { 8426 key: "disable", 8427 value: function disable() { 8428 var _this3 = this; 8429 8430 this.clickableElements.forEach(function (element) { 8431 return element.classList.remove("dz-clickable"); 8432 }); 8433 this.removeEventListeners(); 8434 this.disabled = true; 8435 return this.files.map(function (file) { 8436 return _this3.cancelUpload(file); 8437 }); 8438 } 8439 }, { 8440 key: "enable", 8441 value: function enable() { 8442 delete this.disabled; 8443 this.clickableElements.forEach(function (element) { 8444 return element.classList.add("dz-clickable"); 8445 }); 8446 return this.setupEventListeners(); 8447 } // Returns a nicely formatted filesize 8448 8449 }, { 8450 key: "filesize", 8451 value: function filesize(size) { 8452 var selectedSize = 0; 8453 var selectedUnit = "b"; 8454 8455 if (size > 0) { 8456 var units = ["tb", "gb", "mb", "kb", "b"]; 8457 8458 for (var i = 0; i < units.length; i++) { 8459 var unit = units[i]; 8460 var cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10; 8461 8462 if (size >= cutoff) { 8463 selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i); 8464 selectedUnit = unit; 8465 break; 8466 } 8467 } 8468 8469 selectedSize = Math.round(10 * selectedSize) / 10; // Cutting of digits 8470 } 8471 8472 return "<strong>".concat(selectedSize, "</strong> ").concat(this.options.dictFileSizeUnits[selectedUnit]); 8473 } // Adds or removes the `dz-max-files-reached` class from the form. 8474 8475 }, { 8476 key: "_updateMaxFilesReachedClass", 8477 value: function _updateMaxFilesReachedClass() { 8478 if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) { 8479 if (this.getAcceptedFiles().length === this.options.maxFiles) { 8480 this.emit("maxfilesreached", this.files); 8481 } 8482 8483 return this.element.classList.add("dz-max-files-reached"); 8484 } else { 8485 return this.element.classList.remove("dz-max-files-reached"); 8486 } 8487 } 8488 }, { 8489 key: "drop", 8490 value: function drop(e) { 8491 if (!e.dataTransfer) { 8492 return; 8493 } 8494 8495 this.emit("drop", e); // Convert the FileList to an Array 8496 // This is necessary for IE11 8497 8498 var files = []; 8499 8500 for (var i = 0; i < e.dataTransfer.files.length; i++) { 8501 files[i] = e.dataTransfer.files[i]; 8502 } // Even if it's a folder, files.length will contain the folders. 8503 8504 8505 if (files.length) { 8506 var items = e.dataTransfer.items; 8507 8508 if (items && items.length && items[0].webkitGetAsEntry != null) { 8509 // The browser supports dropping of folders, so handle items instead of files 8510 this._addFilesFromItems(items); 8511 } else { 8512 this.handleFiles(files); 8513 } 8514 } 8515 8516 this.emit("addedfiles", files); 8517 } 8518 }, { 8519 key: "paste", 8520 value: function paste(e) { 8521 if (__guard__(e != null ? e.clipboardData : undefined, function (x) { 8522 return x.items; 8523 }) == null) { 8524 return; 8525 } 8526 8527 this.emit("paste", e); 8528 var items = e.clipboardData.items; 8529 8530 if (items.length) { 8531 return this._addFilesFromItems(items); 8532 } 8533 } 8534 }, { 8535 key: "handleFiles", 8536 value: function handleFiles(files) { 8537 var _iterator5 = dropzone_createForOfIteratorHelper(files, true), 8538 _step5; 8539 8540 try { 8541 for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { 8542 var file = _step5.value; 8543 this.addFile(file); 8544 } 8545 } catch (err) { 8546 _iterator5.e(err); 8547 } finally { 8548 _iterator5.f(); 8549 } 8550 } // When a folder is dropped (or files are pasted), items must be handled 8551 // instead of files. 8552 8553 }, { 8554 key: "_addFilesFromItems", 8555 value: function _addFilesFromItems(items) { 8556 var _this4 = this; 8557 8558 return function () { 8559 var result = []; 8560 8561 var _iterator6 = dropzone_createForOfIteratorHelper(items, true), 8562 _step6; 8563 8564 try { 8565 for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { 8566 var item = _step6.value; 8567 var entry; 8568 8569 if (item.webkitGetAsEntry != null && (entry = item.webkitGetAsEntry())) { 8570 if (entry.isFile) { 8571 result.push(_this4.addFile(item.getAsFile())); 8572 } else if (entry.isDirectory) { 8573 // Append all files from that directory to files 8574 result.push(_this4._addFilesFromDirectory(entry, entry.name)); 8575 } else { 8576 result.push(undefined); 8577 } 8578 } else if (item.getAsFile != null) { 8579 if (item.kind == null || item.kind === "file") { 8580 result.push(_this4.addFile(item.getAsFile())); 8581 } else { 8582 result.push(undefined); 8583 } 8584 } else { 8585 result.push(undefined); 8586 } 8587 } 8588 } catch (err) { 8589 _iterator6.e(err); 8590 } finally { 8591 _iterator6.f(); 8592 } 8593 8594 return result; 8595 }(); 8596 } // Goes through the directory, and adds each file it finds recursively 8597 8598 }, { 8599 key: "_addFilesFromDirectory", 8600 value: function _addFilesFromDirectory(directory, path) { 8601 var _this5 = this; 8602 8603 var dirReader = directory.createReader(); 8604 8605 var errorHandler = function errorHandler(error) { 8606 return __guardMethod__(console, "log", function (o) { 8607 return o.log(error); 8608 }); 8609 }; 8610 8611 var readEntries = function readEntries() { 8612 return dirReader.readEntries(function (entries) { 8613 if (entries.length > 0) { 8614 var _iterator7 = dropzone_createForOfIteratorHelper(entries, true), 8615 _step7; 8616 8617 try { 8618 for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) { 8619 var entry = _step7.value; 8620 8621 if (entry.isFile) { 8622 entry.file(function (file) { 8623 if (_this5.options.ignoreHiddenFiles && file.name.substring(0, 1) === ".") { 8624 return; 8625 } 8626 8627 file.fullPath = "".concat(path, "/").concat(file.name); 8628 return _this5.addFile(file); 8629 }); 8630 } else if (entry.isDirectory) { 8631 _this5._addFilesFromDirectory(entry, "".concat(path, "/").concat(entry.name)); 8632 } 8633 } // Recursively call readEntries() again, since browser only handle 8634 // the first 100 entries. 8635 // See: https://developer.mozilla.org/en-US/docs/Web/API/DirectoryReader#readEntries 8636 8637 } catch (err) { 8638 _iterator7.e(err); 8639 } finally { 8640 _iterator7.f(); 8641 } 8642 8643 readEntries(); 8644 } 8645 8646 return null; 8647 }, errorHandler); 8648 }; 8649 8650 return readEntries(); 8651 } // If `done()` is called without argument the file is accepted 8652 // If you call it with an error message, the file is rejected 8653 // (This allows for asynchronous validation) 8654 // 8655 // This function checks the filesize, and if the file.type passes the 8656 // `acceptedFiles` check. 8657 8658 }, { 8659 key: "accept", 8660 value: function accept(file, done) { 8661 if (this.options.maxFilesize && file.size > this.options.maxFilesize * 1024 * 1024) { 8662 done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize)); 8663 } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) { 8664 done(this.options.dictInvalidFileType); 8665 } else if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) { 8666 done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles)); 8667 this.emit("maxfilesexceeded", file); 8668 } else { 8669 this.options.accept.call(this, file, done); 8670 } 8671 } 8672 }, { 8673 key: "addFile", 8674 value: function addFile(file) { 8675 var _this6 = this; 8676 8677 file.upload = { 8678 uuid: Dropzone.uuidv4(), 8679 progress: 0, 8680 // Setting the total upload size to file.size for the beginning 8681 // It's actual different than the size to be transmitted. 8682 total: file.size, 8683 bytesSent: 0, 8684 filename: this._renameFile(file) // Not setting chunking information here, because the acutal data â and 8685 // thus the chunks â might change if `options.transformFile` is set 8686 // and does something to the data. 8687 8688 }; 8689 this.files.push(file); 8690 file.status = Dropzone.ADDED; 8691 this.emit("addedfile", file); 8692 8693 this._enqueueThumbnail(file); 8694 8695 this.accept(file, function (error) { 8696 if (error) { 8697 file.accepted = false; 8698 8699 _this6._errorProcessing([file], error); // Will set the file.status 8700 8701 } else { 8702 file.accepted = true; 8703 8704 if (_this6.options.autoQueue) { 8705 _this6.enqueueFile(file); 8706 } // Will set .accepted = true 8707 8708 } 8709 8710 _this6._updateMaxFilesReachedClass(); 8711 }); 8712 } // Wrapper for enqueueFile 8713 8714 }, { 8715 key: "enqueueFiles", 8716 value: function enqueueFiles(files) { 8717 var _iterator8 = dropzone_createForOfIteratorHelper(files, true), 8718 _step8; 8719 8720 try { 8721 for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) { 8722 var file = _step8.value; 8723 this.enqueueFile(file); 8724 } 8725 } catch (err) { 8726 _iterator8.e(err); 8727 } finally { 8728 _iterator8.f(); 8729 } 8730 8731 return null; 8732 } 8733 }, { 8734 key: "enqueueFile", 8735 value: function enqueueFile(file) { 8736 var _this7 = this; 8737 8738 if (file.status === Dropzone.ADDED && file.accepted === true) { 8739 file.status = Dropzone.QUEUED; 8740 8741 if (this.options.autoProcessQueue) { 8742 return setTimeout(function () { 8743 return _this7.processQueue(); 8744 }, 0); // Deferring the call 8745 } 8746 } else { 8747 throw new Error("This file can't be queued because it has already been processed or was rejected."); 8748 } 8749 } 8750 }, { 8751 key: "_enqueueThumbnail", 8752 value: function _enqueueThumbnail(file) { 8753 var _this8 = this; 8754 8755 if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) { 8756 this._thumbnailQueue.push(file); 8757 8758 return setTimeout(function () { 8759 return _this8._processThumbnailQueue(); 8760 }, 0); // Deferring the call 8761 } 8762 } 8763 }, { 8764 key: "_processThumbnailQueue", 8765 value: function _processThumbnailQueue() { 8766 var _this9 = this; 8767 8768 if (this._processingThumbnail || this._thumbnailQueue.length === 0) { 8769 return; 8770 } 8771 8772 this._processingThumbnail = true; 8773 8774 var file = this._thumbnailQueue.shift(); 8775 8776 return this.createThumbnail(file, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.thumbnailMethod, true, function (dataUrl) { 8777 _this9.emit("thumbnail", file, dataUrl); 8778 8779 _this9._processingThumbnail = false; 8780 return _this9._processThumbnailQueue(); 8781 }); 8782 } // Can be called by the user to remove a file 8783 8784 }, { 8785 key: "removeFile", 8786 value: function removeFile(file) { 8787 if (file.status === Dropzone.UPLOADING) { 8788 this.cancelUpload(file); 8789 } 8790 8791 this.files = without(this.files, file); 8792 this.emit("removedfile", file); 8793 8794 if (this.files.length === 0) { 8795 return this.emit("reset"); 8796 } 8797 } // Removes all files that aren't currently processed from the list 8798 8799 }, { 8800 key: "removeAllFiles", 8801 value: function removeAllFiles(cancelIfNecessary) { 8802 // Create a copy of files since removeFile() changes the @files array. 8803 if (cancelIfNecessary == null) { 8804 cancelIfNecessary = false; 8805 } 8806 8807 var _iterator9 = dropzone_createForOfIteratorHelper(this.files.slice(), true), 8808 _step9; 8809 8810 try { 8811 for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) { 8812 var file = _step9.value; 8813 8814 if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) { 8815 this.removeFile(file); 8816 } 8817 } 8818 } catch (err) { 8819 _iterator9.e(err); 8820 } finally { 8821 _iterator9.f(); 8822 } 8823 8824 return null; 8825 } // Resizes an image before it gets sent to the server. This function is the default behavior of 8826 // `options.transformFile` if `resizeWidth` or `resizeHeight` are set. The callback is invoked with 8827 // the resized blob. 8828 8829 }, { 8830 key: "resizeImage", 8831 value: function resizeImage(file, width, height, resizeMethod, callback) { 8832 var _this10 = this; 8833 8834 return this.createThumbnail(file, width, height, resizeMethod, true, function (dataUrl, canvas) { 8835 if (canvas == null) { 8836 // The image has not been resized 8837 return callback(file); 8838 } else { 8839 var resizeMimeType = _this10.options.resizeMimeType; 8840 8841 if (resizeMimeType == null) { 8842 resizeMimeType = file.type; 8843 } 8844 8845 var resizedDataURL = canvas.toDataURL(resizeMimeType, _this10.options.resizeQuality); 8846 8847 if (resizeMimeType === "image/jpeg" || resizeMimeType === "image/jpg") { 8848 // Now add the original EXIF information 8849 resizedDataURL =
vendor: 7,233 bytes, lines 8849-9074
8849ExifRestore.restore(file.dataURL, resizedDataURL); 8850 } 8851 8852 return callback(Dropzone.dataURItoBlob(resizedDataURL)); 8853 } 8854 }); 8855 } 8856 }, { 8857 key: "createThumbnail", 8858 value: function createThumbnail(file, width, height, resizeMethod, fixOrientation, callback) { 8859 var _this11 = this; 8860 8861 var fileReader = new FileReader(); 8862 8863 fileReader.onload = function () { 8864 file.dataURL = fileReader.result; // Don't bother creating a thumbnail for SVG images since they're vector 8865 8866 if (file.type === "image/svg+xml") { 8867 if (callback != null) { 8868 callback(fileReader.result); 8869 } 8870 8871 return; 8872 } 8873 8874 _this11.createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback); 8875 }; 8876 8877 fileReader.readAsDataURL(file); 8878 } // `mockFile` needs to have these attributes: 8879 // 8880 // { name: 'name', size: 12345, imageUrl: '' } 8881 // 8882 // `callback` will be invoked when the image has been downloaded and displayed. 8883 // `crossOrigin` will be added to the `img` tag when accessing the file. 8884 8885 }, { 8886 key: "displayExistingFile", 8887 value: function displayExistingFile(mockFile, imageUrl, callback, crossOrigin) { 8888 var _this12 = this; 8889 8890 var resizeThumbnail = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; 8891 this.emit("addedfile", mockFile); 8892 this.emit("complete", mockFile); 8893 8894 if (!resizeThumbnail) { 8895 this.emit("thumbnail", mockFile, imageUrl); 8896 if (callback) callback(); 8897 } else { 8898 var onDone = function onDone(thumbnail) { 8899 _this12.emit("thumbnail", mockFile, thumbnail); 8900 8901 if (callback) callback(); 8902 }; 8903 8904 mockFile.dataURL = imageUrl; 8905 this.createThumbnailFromUrl(mockFile, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.thumbnailMethod, this.options.fixOrientation, onDone, crossOrigin); 8906 } 8907 } 8908 }, { 8909 key: "createThumbnailFromUrl", 8910 value: function createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback, crossOrigin) { 8911 var _this13 = this; 8912 8913 // Not using `new Image` here because of a bug in latest Chrome versions. 8914 // See https://github.com/enyo/dropzone/pull/226 8915 var img = document.createElement("img"); 8916 8917 if (crossOrigin) { 8918 img.crossOrigin = crossOrigin; 8919 } // fixOrientation is not needed anymore with browsers handling imageOrientation 8920 8921 8922 fixOrientation = getComputedStyle(document.body)["imageOrientation"] == "from-image" ? false : fixOrientation; 8923 8924 img.onload = function () { 8925 var loadExif = function loadExif(callback) { 8926 return callback(1); 8927 }; 8928 8929 if (typeof EXIF !== "undefined" && EXIF !== null && fixOrientation) { 8930 loadExif = function loadExif(callback) { 8931 return EXIF.getData(img, function () { 8932 return callback(EXIF.getTag(this, "Orientation")); 8933 }); 8934 }; 8935 } 8936 8937 return loadExif(function (orientation) { 8938 file.width = img.width; 8939 file.height = img.height; 8940 8941 var resizeInfo = _this13.options.resize.call(_this13, file, width, height, resizeMethod); 8942 8943 var canvas = document.createElement("canvas"); 8944 var ctx = canvas.getContext("2d"); 8945 canvas.width = resizeInfo.trgWidth; 8946 canvas.height = resizeInfo.trgHeight; 8947 8948 if (orientation > 4) { 8949 canvas.width = resizeInfo.trgHeight; 8950 canvas.height = resizeInfo.trgWidth; 8951 } 8952 8953 switch (orientation) { 8954 case 2: 8955 // horizontal flip 8956 ctx.translate(canvas.width, 0); 8957 ctx.scale(-1, 1); 8958 break; 8959 8960 case 3: 8961 // 180° rotate left 8962 ctx.translate(canvas.width, canvas.height); 8963 ctx.rotate(Math.PI); 8964 break; 8965 8966 case 4: 8967 // vertical flip 8968 ctx.translate(0, canvas.height); 8969 ctx.scale(1, -1); 8970 break; 8971 8972 case 5: 8973 // vertical flip + 90 rotate right 8974 ctx.rotate(0.5 * Math.PI); 8975 ctx.scale(1, -1); 8976 break; 8977 8978 case 6: 8979 // 90° rotate right 8980 ctx.rotate(0.5 * Math.PI); 8981 ctx.translate(0, -canvas.width); 8982 break; 8983 8984 case 7: 8985 // horizontal flip + 90 rotate right 8986 ctx.rotate(0.5 * Math.PI); 8987 ctx.translate(canvas.height, -canvas.width); 8988 ctx.scale(-1, 1); 8989 break; 8990 8991 case 8: 8992 // 90° rotate left 8993 ctx.rotate(-0.5 * Math.PI); 8994 ctx.translate(-canvas.height, 0); 8995 break; 8996 } // This is a bugfix for iOS' scaling bug. 8997 8998 8999 drawImageIOSFix(ctx, img, resizeInfo.srcX != null ? resizeInfo.srcX : 0, resizeInfo.srcY != null ? resizeInfo.srcY : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, resizeInfo.trgX != null ? resizeInfo.trgX : 0, resizeInfo.trgY != null ? resizeInfo.trgY : 0, resizeInfo.trgWidth, resizeInfo.trgHeight); 9000 var thumbnail = canvas.toDataURL("image/png"); 9001 9002 if (callback != null) { 9003 return callback(thumbnail, canvas); 9004 } 9005 }); 9006 }; 9007 9008 if (callback != null) { 9009 img.onerror = callback; 9010 } 9011 9012 return img.src = file.dataURL; 9013 } // Goes through the queue and processes files if there aren't too many already. 9014 9015 }, { 9016 key: "processQueue", 9017 value: function processQueue() { 9018 var parallelUploads = this.options.parallelUploads; 9019 var processingLength = this.getUploadingFiles().length; 9020 var i = processingLength; // There are already at least as many files uploading than should be 9021 9022 if (processingLength >= parallelUploads) { 9023 return; 9024 } 9025 9026 var queuedFiles = this.getQueuedFiles(); 9027 9028 if (!(queuedFiles.length > 0)) { 9029 return; 9030 } 9031 9032 if (this.options.uploadMultiple) { 9033 // The files should be uploaded in one request 9034 return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength)); 9035 } else { 9036 while (i < parallelUploads) { 9037 if (!queuedFiles.length) { 9038 return; 9039 } // Nothing left to process 9040 9041 9042 this.processFile(queuedFiles.shift()); 9043 i++; 9044 } 9045 } 9046 } // Wrapper for `processFiles` 9047 9048 }, { 9049 key: "processFile", 9050 value: function processFile(file) { 9051 return this.processFiles([file]); 9052 } // Loads the file, then calls finishedLoading() 9053 9054 }, { 9055 key: "processFiles", 9056 value: function processFiles(files) { 9057 var _iterator10 = dropzone_createForOfIteratorHelper(files, true), 9058 _step10; 9059 9060 try { 9061 for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) { 9062 var file = _step10.value; 9063 file.processing = true; // Backwards compatibility 9064 9065 file.status = Dropzone.UPLOADING; 9066 this.emit("processing", file); 9067 } 9068 } catch (err) { 9069 _iterator10.e(err); 9070 } finally { 9071 _iterator10.f(); 9072 } 9073 9074 if (this.options.uploadMultiple) {
vendor: 20,826 bytes, lines 9075-9689
9075 this.emit("processingmultiple", files); 9076 } 9077 9078 return this.uploadFiles(files); 9079 } 9080 }, { 9081 key: "_getFilesWithXhr", 9082 value: function _getFilesWithXhr(xhr) { 9083 var files; 9084 return files = this.files.filter(function (file) { 9085 return file.xhr === xhr; 9086 }).map(function (file) { 9087 return file; 9088 }); 9089 } // Cancels the file upload and sets the status to CANCELED 9090 // **if** the file is actually being uploaded. 9091 // If it's still in the queue, the file is being removed from it and the status 9092 // set to CANCELED. 9093 9094 }, { 9095 key: "cancelUpload", 9096 value: function cancelUpload(file) { 9097 if (file.status === Dropzone.UPLOADING) { 9098 var groupedFiles = this._getFilesWithXhr(file.xhr); 9099 9100 var _iterator11 = dropzone_createForOfIteratorHelper(groupedFiles, true), 9101 _step11; 9102 9103 try { 9104 for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) { 9105 var groupedFile = _step11.value; 9106 groupedFile.status = Dropzone.CANCELED; 9107 } 9108 } catch (err) { 9109 _iterator11.e(err); 9110 } finally { 9111 _iterator11.f(); 9112 } 9113 9114 if (typeof file.xhr !== "undefined") { 9115 file.xhr.abort(); 9116 } 9117 9118 var _iterator12 = dropzone_createForOfIteratorHelper(groupedFiles, true), 9119 _step12; 9120 9121 try { 9122 for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) { 9123 var _groupedFile = _step12.value; 9124 this.emit("canceled", _groupedFile); 9125 } 9126 } catch (err) { 9127 _iterator12.e(err); 9128 } finally { 9129 _iterator12.f(); 9130 } 9131 9132 if (this.options.uploadMultiple) { 9133 this.emit("canceledmultiple", groupedFiles); 9134 } 9135 } else if (file.status === Dropzone.ADDED || file.status === Dropzone.QUEUED) { 9136 file.status = Dropzone.CANCELED; 9137 this.emit("canceled", file); 9138 9139 if (this.options.uploadMultiple) { 9140 this.emit("canceledmultiple", [file]); 9141 } 9142 } 9143 9144 if (this.options.autoProcessQueue) { 9145 return this.processQueue(); 9146 } 9147 } 9148 }, { 9149 key: "resolveOption", 9150 value: function resolveOption(option) { 9151 if (typeof option === "function") { 9152 for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 9153 args[_key - 1] = arguments[_key]; 9154 } 9155 9156 return option.apply(this, args); 9157 } 9158 9159 return option; 9160 } 9161 }, { 9162 key: "uploadFile", 9163 value: function uploadFile(file) { 9164 return this.uploadFiles([file]); 9165 } 9166 }, { 9167 key: "uploadFiles", 9168 value: function uploadFiles(files) { 9169 var _this14 = this; 9170 9171 this._transformFiles(files, function (transformedFiles) { 9172 if (_this14.options.chunking) { 9173 // Chunking is not allowed to be used with `uploadMultiple` so we know 9174 // that there is only __one__file. 9175 var transformedFile = transformedFiles[0]; 9176 files[0].upload.chunked = _this14.options.chunking && (_this14.options.forceChunking || transformedFile.size > _this14.options.chunkSize); 9177 files[0].upload.totalChunkCount = Math.ceil(transformedFile.size / _this14.options.chunkSize); 9178 } 9179 9180 if (files[0].upload.chunked) { 9181 // This file should be sent in chunks! 9182 // If the chunking option is set, we **know** that there can only be **one** file, since 9183 // uploadMultiple is not allowed with this option. 9184 var file = files[0]; 9185 var _transformedFile = transformedFiles[0]; 9186 var startedChunkCount = 0; 9187 file.upload.chunks = []; 9188 9189 var handleNextChunk = function handleNextChunk() { 9190 var chunkIndex = 0; // Find the next item in file.upload.chunks that is not defined yet. 9191 9192 while (file.upload.chunks[chunkIndex] !== undefined) { 9193 chunkIndex++; 9194 } // This means, that all chunks have already been started. 9195 9196 9197 if (chunkIndex >= file.upload.totalChunkCount) return; 9198 startedChunkCount++; 9199 var start = chunkIndex * _this14.options.chunkSize; 9200 var end = Math.min(start + _this14.options.chunkSize, _transformedFile.size); 9201 var dataBlock = { 9202 name: _this14._getParamName(0), 9203 data: _transformedFile.webkitSlice ? _transformedFile.webkitSlice(start, end) : _transformedFile.slice(start, end), 9204 filename: file.upload.filename, 9205 chunkIndex: chunkIndex 9206 }; 9207 file.upload.chunks[chunkIndex] = { 9208 file: file, 9209 index: chunkIndex, 9210 dataBlock: dataBlock, 9211 // In case we want to retry. 9212 status: Dropzone.UPLOADING, 9213 progress: 0, 9214 retries: 0 // The number of times this block has been retried. 9215 9216 }; 9217 9218 _this14._uploadData(files, [dataBlock]); 9219 }; 9220 9221 file.upload.finishedChunkUpload = function (chunk, response) { 9222 var allFinished = true; 9223 chunk.status = Dropzone.SUCCESS; // Clear the data from the chunk 9224 9225 chunk.dataBlock = null; // Leaving this reference to xhr intact here will cause memory leaks in some browsers 9226 9227 chunk.xhr = null; 9228 9229 for (var i = 0; i < file.upload.totalChunkCount; i++) { 9230 if (file.upload.chunks[i] === undefined) { 9231 return handleNextChunk(); 9232 } 9233 9234 if (file.upload.chunks[i].status !== Dropzone.SUCCESS) { 9235 allFinished = false; 9236 } 9237 } 9238 9239 if (allFinished) { 9240 _this14.options.chunksUploaded(file, function () { 9241 _this14._finished(files, response, null); 9242 }); 9243 } 9244 }; 9245 9246 if (_this14.options.parallelChunkUploads) { 9247 for (var i = 0; i < file.upload.totalChunkCount; i++) { 9248 handleNextChunk(); 9249 } 9250 } else { 9251 handleNextChunk(); 9252 } 9253 } else { 9254 var dataBlocks = []; 9255 9256 for (var _i2 = 0; _i2 < files.length; _i2++) { 9257 dataBlocks[_i2] = { 9258 name: _this14._getParamName(_i2), 9259 data: transformedFiles[_i2], 9260 filename: files[_i2].upload.filename 9261 }; 9262 } 9263 9264 _this14._uploadData(files, dataBlocks); 9265 } 9266 }); 9267 } /// Returns the right chunk for given file and xhr 9268 9269 }, { 9270 key: "_getChunk", 9271 value: function _getChunk(file, xhr) { 9272 for (var i = 0; i < file.upload.totalChunkCount; i++) { 9273 if (file.upload.chunks[i] !== undefined && file.upload.chunks[i].xhr === xhr) { 9274 return file.upload.chunks[i]; 9275 } 9276 } 9277 } // This function actually uploads the file(s) to the server. 9278 // If dataBlocks contains the actual data to upload (meaning, that this could either be transformed 9279 // files, or individual chunks for chunked upload). 9280 9281 }, { 9282 key: "_uploadData", 9283 value: function _uploadData(files, dataBlocks) { 9284 var _this15 = this; 9285 9286 var xhr = new XMLHttpRequest(); // Put the xhr object in the file objects to be able to reference it later. 9287 9288 var _iterator13 = dropzone_createForOfIteratorHelper(files, true), 9289 _step13; 9290 9291 try { 9292 for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) { 9293 var file = _step13.value; 9294 file.xhr = xhr; 9295 } 9296 } catch (err) { 9297 _iterator13.e(err); 9298 } finally { 9299 _iterator13.f(); 9300 } 9301 9302 if (files[0].upload.chunked) { 9303 // Put the xhr object in the right chunk object, so it can be associated later, and found with _getChunk 9304 files[0].upload.chunks[dataBlocks[0].chunkIndex].xhr = xhr; 9305 } 9306 9307 var method = this.resolveOption(this.options.method, files); 9308 var url = this.resolveOption(this.options.url, files); 9309 xhr.open(method, url, true); // Setting the timeout after open because of IE11 issue: https://gitlab.com/meno/dropzone/issues/8 9310 9311 var timeout = this.resolveOption(this.options.timeout, files); 9312 if (timeout) xhr.timeout = this.resolveOption(this.options.timeout, files); // Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179 9313 9314 xhr.withCredentials = !!this.options.withCredentials; 9315 9316 xhr.onload = function (e) { 9317 _this15._finishedUploading(files, xhr, e); 9318 }; 9319 9320 xhr.ontimeout = function () { 9321 _this15._handleUploadError(files, xhr, "Request timedout after ".concat(_this15.options.timeout / 1000, " seconds")); 9322 }; 9323 9324 xhr.onerror = function () { 9325 _this15._handleUploadError(files, xhr); 9326 }; // Some browsers do not have the .upload property 9327 9328 9329 var progressObj = xhr.upload != null ? xhr.upload : xhr; 9330 9331 progressObj.onprogress = function (e) { 9332 return _this15._updateFilesUploadProgress(files, xhr, e); 9333 }; 9334 9335 var headers = { 9336 Accept: "application/json", 9337 "Cache-Control": "no-cache", 9338 "X-Requested-With": "XMLHttpRequest" 9339 }; 9340 9341 if (this.options.headers) { 9342 Dropzone.extend(headers, this.options.headers); 9343 } 9344 9345 for (var headerName in headers) { 9346 var headerValue = headers[headerName]; 9347 9348 if (headerValue) { 9349 xhr.setRequestHeader(headerName, headerValue); 9350 } 9351 } 9352 9353 var formData = new FormData(); // Adding all @options parameters 9354 9355 if (this.options.params) { 9356 var additionalParams = this.options.params; 9357 9358 if (typeof additionalParams === "function") { 9359 additionalParams = additionalParams.call(this, files, xhr, files[0].upload.chunked ? this._getChunk(files[0], xhr) : null); 9360 } 9361 9362 for (var key in additionalParams) { 9363 var value = additionalParams[key]; 9364 9365 if (Array.isArray(value)) { 9366 // The additional parameter contains an array, 9367 // so lets iterate over it to attach each value 9368 // individually. 9369 for (var i = 0; i < value.length; i++) { 9370 formData.append(key, value[i]); 9371 } 9372 } else { 9373 formData.append(key, value); 9374 } 9375 } 9376 } // Let the user add additional data if necessary 9377 9378 9379 var _iterator14 = dropzone_createForOfIteratorHelper(files, true), 9380 _step14; 9381 9382 try { 9383 for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) { 9384 var _file = _step14.value; 9385 this.emit("sending", _file, xhr, formData); 9386 } 9387 } catch (err) { 9388 _iterator14.e(err); 9389 } finally { 9390 _iterator14.f(); 9391 } 9392 9393 if (this.options.uploadMultiple) { 9394 this.emit("sendingmultiple", files, xhr, formData); 9395 } 9396 9397 this._addFormElementData(formData); // Finally add the files 9398 // Has to be last because some servers (eg: S3) expect the file to be the last parameter 9399 9400 9401 for (var _i3 = 0; _i3 < dataBlocks.length; _i3++) { 9402 var dataBlock = dataBlocks[_i3]; 9403 formData.append(dataBlock.name, dataBlock.data, dataBlock.filename); 9404 } 9405 9406 this.submitRequest(xhr, formData, files); 9407 } // Transforms all files with this.options.transformFile and invokes done with the transformed files when done. 9408 9409 }, { 9410 key: "_transformFiles", 9411 value: function _transformFiles(files, done) { 9412 var _this16 = this; 9413 9414 var transformedFiles = []; // Clumsy way of handling asynchronous calls, until I get to add a proper Future library. 9415 9416 var doneCounter = 0; 9417 9418 var _loop = function _loop(i) { 9419 _this16.options.transformFile.call(_this16, files[i], function (transformedFile) { 9420 transformedFiles[i] = transformedFile; 9421 9422 if (++doneCounter === files.length) { 9423 done(transformedFiles); 9424 } 9425 }); 9426 }; 9427 9428 for (var i = 0; i < files.length; i++) { 9429 _loop(i); 9430 } 9431 } // Takes care of adding other input elements of the form to the AJAX request 9432 9433 }, { 9434 key: "_addFormElementData", 9435 value: function _addFormElementData(formData) { 9436 // Take care of other input elements 9437 if (this.element.tagName === "FORM") { 9438 var _iterator15 = dropzone_createForOfIteratorHelper(this.element.querySelectorAll("input, textarea, select, button"), true), 9439 _step15; 9440 9441 try { 9442 for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) { 9443 var input = _step15.value; 9444 var inputName = input.getAttribute("name"); 9445 var inputType = input.getAttribute("type"); 9446 if (inputType) inputType = inputType.toLowerCase(); // If the input doesn't have a name, we can't use it. 9447 9448 if (typeof inputName === "undefined" || inputName === null) continue; 9449 9450 if (input.tagName === "SELECT" && input.hasAttribute("multiple")) { 9451 // Possibly multiple values 9452 var _iterator16 = dropzone_createForOfIteratorHelper(input.options, true), 9453 _step16; 9454 9455 try { 9456 for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) { 9457 var option = _step16.value; 9458 9459 if (option.selected) { 9460 formData.append(inputName, option.value); 9461 } 9462 } 9463 } catch (err) { 9464 _iterator16.e(err); 9465 } finally { 9466 _iterator16.f(); 9467 } 9468 } else if (!inputType || inputType !== "checkbox" && inputType !== "radio" || input.checked) { 9469 formData.append(inputName, input.value); 9470 } 9471 } 9472 } catch (err) { 9473 _iterator15.e(err); 9474 } finally { 9475 _iterator15.f(); 9476 } 9477 } 9478 } // Invoked when there is new progress information about given files. 9479 // If e is not provided, it is assumed that the upload is finished. 9480 9481 }, { 9482 key: "_updateFilesUploadProgress", 9483 value: function _updateFilesUploadProgress(files, xhr, e) { 9484 if (!files[0].upload.chunked) { 9485 // Handle file uploads without chunking 9486 var _iterator17 = dropzone_createForOfIteratorHelper(files, true), 9487 _step17; 9488 9489 try { 9490 for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) { 9491 var file = _step17.value; 9492 9493 if (file.upload.total && file.upload.bytesSent && file.upload.bytesSent == file.upload.total) { 9494 // If both, the `total` and `bytesSent` have already been set, and 9495 // they are equal (meaning progress is at 100%), we can skip this 9496 // file, since an upload progress shouldn't go down. 9497 continue; 9498 } 9499 9500 if (e) { 9501 file.upload.progress = 100 * e.loaded / e.total; 9502 file.upload.total = e.total; 9503 file.upload.bytesSent = e.loaded; 9504 } else { 9505 // No event, so we're at 100% 9506 file.upload.progress = 100; 9507 file.upload.bytesSent = file.upload.total; 9508 } 9509 9510 this.emit("uploadprogress", file, file.upload.progress, file.upload.bytesSent); 9511 } 9512 } catch (err) { 9513 _iterator17.e(err); 9514 } finally { 9515 _iterator17.f(); 9516 } 9517 } else { 9518 // Handle chunked file uploads 9519 // Chunked upload is not compatible with uploading multiple files in one 9520 // request, so we know there's only one file. 9521 var _file2 = files[0]; // Since this is a chunked upload, we need to update the appropriate chunk 9522 // progress. 9523 9524 var chunk = this._getChunk(_file2, xhr); 9525 9526 if (e) { 9527 chunk.progress = 100 * e.loaded / e.total; 9528 chunk.total = e.total; 9529 chunk.bytesSent = e.loaded; 9530 } else { 9531 // No event, so we're at 100% 9532 chunk.progress = 100; 9533 chunk.bytesSent = chunk.total; 9534 } // Now tally the *file* upload progress from its individual chunks 9535 9536 9537 _file2.upload.progress = 0; 9538 _file2.upload.total = 0; 9539 _file2.upload.bytesSent = 0; 9540 9541 for (var i = 0; i < _file2.upload.totalChunkCount; i++) { 9542 if (_file2.upload.chunks[i] && typeof _file2.upload.chunks[i].progress !== "undefined") { 9543 _file2.upload.progress += _file2.upload.chunks[i].progress; 9544 _file2.upload.total += _file2.upload.chunks[i].total; 9545 _file2.upload.bytesSent += _file2.upload.chunks[i].bytesSent; 9546 } 9547 } // Since the process is a percentage, we need to divide by the amount of 9548 // chunks we've used. 9549 9550 9551 _file2.upload.progress = _file2.upload.progress / _file2.upload.totalChunkCount; 9552 this.emit("uploadprogress", _file2, _file2.upload.progress, _file2.upload.bytesSent); 9553 } 9554 } 9555 }, { 9556 key: "_finishedUploading", 9557 value: function _finishedUploading(files, xhr, e) { 9558 var response; 9559 9560 if (files[0].status === Dropzone.CANCELED) { 9561 return; 9562 } 9563 9564 if (xhr.readyState !== 4) { 9565 return; 9566 } 9567 9568 if (xhr.responseType !== "arraybuffer" && xhr.responseType !== "blob") { 9569 response = xhr.responseText; 9570 9571 if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) { 9572 try { 9573 response = JSON.parse(response); 9574 } catch (error) { 9575 e = error; 9576 response = "Invalid JSON response from server."; 9577 } 9578 } 9579 } 9580 9581 this._updateFilesUploadProgress(files, xhr); 9582 9583 if (!(200 <= xhr.status && xhr.status < 300)) { 9584 this._handleUploadError(files, xhr, response); 9585 } else { 9586 if (files[0].upload.chunked) { 9587 files[0].upload.finishedChunkUpload(this._getChunk(files[0], xhr), response); 9588 } else { 9589 this._finished(files, response, e); 9590 } 9591 } 9592 } 9593 }, { 9594 key: "_handleUploadError", 9595 value: function _handleUploadError(files, xhr, response) { 9596 if (files[0].status === Dropzone.CANCELED) { 9597 return; 9598 } 9599 9600 if (files[0].upload.chunked && this.options.retryChunks) { 9601 var chunk = this._getChunk(files[0], xhr); 9602 9603 if (chunk.retries++ < this.options.retryChunksLimit) { 9604 this._uploadData(files, [chunk.dataBlock]); 9605 9606 return; 9607 } else { 9608 console.warn("Retried this chunk too often. Giving up."); 9609 } 9610 } 9611 9612 this._errorProcessing(files, response || this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr); 9613 } 9614 }, { 9615 key: "submitRequest", 9616 value: function submitRequest(xhr, formData, files) { 9617 if (xhr.readyState != 1) { 9618 console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED."); 9619 return; 9620 } 9621 9622 xhr.send(formData); 9623 } // Called internally when processing is finished. 9624 // Individual callbacks have to be called in the appropriate sections. 9625 9626 }, { 9627 key: "_finished", 9628 value: function _finished(files, responseText, e) { 9629 var _iterator18 = dropzone_createForOfIteratorHelper(files, true), 9630 _step18; 9631 9632 try { 9633 for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) { 9634 var file = _step18.value; 9635 file.status = Dropzone.SUCCESS; 9636 this.emit("success", file, responseText, e); 9637 this.emit("complete", file); 9638 } 9639 } catch (err) { 9640 _iterator18.e(err); 9641 } finally { 9642 _iterator18.f(); 9643 } 9644 9645 if (this.options.uploadMultiple) { 9646 this.emit("successmultiple", files, responseText, e); 9647 this.emit("completemultiple", files); 9648 } 9649 9650 if (this.options.autoProcessQueue) { 9651 return this.processQueue(); 9652 } 9653 } // Called internally when processing is finished. 9654 // Individual callbacks have to be called in the appropriate sections. 9655 9656 }, { 9657 key: "_errorProcessing", 9658 value: function _errorProcessing(files, message, xhr) { 9659 var _iterator19 = dropzone_createForOfIteratorHelper(files, true), 9660 _step19; 9661 9662 try { 9663 for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) { 9664 var file = _step19.value; 9665 file.status = Dropzone.ERROR; 9666 this.emit("error", file, message, xhr); 9667 this.emit("complete", file); 9668 } 9669 } catch (err) { 9670 _iterator19.e(err); 9671 } finally { 9672 _iterator19.f(); 9673 } 9674 9675 if (this.options.uploadMultiple) { 9676 this.emit("errormultiple", files, message, xhr); 9677 this.emit("completemultiple", files); 9678 } 9679 9680 if (this.options.autoProcessQueue) { 9681 return this.processQueue(); 9682 } 9683 } 9684 }], [{ 9685 key: "initClass", 9686 value: function initClass() { 9687 // Exposing the emitter class, mainly for tests 9688 this.prototype.Emitter = Emitter; 9689 /*
9689 9690 This is a list of all available events you can register on a dropzone object. 9691 You can register an event handler like this: 9692 dropzone.on("dragEnter", function() { }); 9693 */ 9694 9695 this.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "addedfile", "addedfiles", "removedfile", "thumbnail", "error", "errormultiple", "processing", "processingmultiple", "uploadprogress", "totaluploadprogress", "sending", "sendingmultiple", "success", "successmultiple", "canceled", "canceledmultiple", "complete", "completemultiple", "reset", "maxfilesexceeded", "maxfilesreached", "queuecomplete"]; 9696 this.prototype._thumbnailQueue = []; 9697 this.prototype._processingThumbnail = false; 9698 } // global utility 9699 9700 }, { 9701 key: "extend", 9702 value: function extend(target) { 9703 for (var _len2 = arguments.length, objects = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { 9704 objects[_key2 - 1] = arguments[_key2]; 9705 } 9706 9707 for (var _i4 = 0, _objects = objects; _i4 < _objects.length; _i4++) { 9708 var object = _objects[_i4]; 9709 9710 for (var key in object) { 9711 var val = object[key]; 9712 target[key] = val; 9713 } 9714 } 9715 9716 return target; 9717 } 9718 }, { 9719 key: "uuidv4", 9720 value: function uuidv4() { 9721 return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { 9722 var r = Math.random() * 16 | 0, 9723 v = c === "x" ? r : r & 0x3 | 0x8; 9724 return v.toString(16); 9725 }); 9726 } 9727 }]); 9728 9729 return Dropzone; 9730}(Emitter); 9731 9732 9733Dropzone.initClass(); 9734Dropzone.version = "5.9.3
vendor: 9,117 bytes, lines 9734-10050
9734"; // This is a map of options for your different dropzones. Add configurations 9735// to this object for your different dropzone elemens. 9736// 9737// Example: 9738// 9739// Dropzone.options.myDropzoneElementId = { maxFilesize: 1 }; 9740// 9741// To disable autoDiscover for a specific element, you can set `false` as an option: 9742// 9743// Dropzone.options.myDisabledElementId = false; 9744// 9745// And in html: 9746// 9747// <form action="/upload" id="my-dropzone-element-id" class="dropzone"></form> 9748 9749Dropzone.options = {}; // Returns the options for an element or undefined if none available. 9750 9751Dropzone.optionsForElement = function (element) { 9752 // Get the `Dropzone.options.elementId` for this element if it exists 9753 if (element.getAttribute("id")) { 9754 return Dropzone.options[camelize(element.getAttribute("id"))]; 9755 } else { 9756 return undefined; 9757 } 9758}; // Holds a list of all dropzone instances 9759 9760 9761Dropzone.instances = []; // Returns the dropzone for given element if any 9762 9763Dropzone.forElement = function (element) { 9764 if (typeof element === "string") { 9765 element = document.querySelector(element); 9766 } 9767 9768 if ((element != null ? element.dropzone : undefined) == null) { 9769 throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone."); 9770 } 9771 9772 return element.dropzone; 9773}; // Set to false if you don't want Dropzone to automatically find and attach to .dropzone elements. 9774 9775 9776Dropzone.autoDiscover = true; // Looks for all .dropzone elements and creates a dropzone for them 9777 9778Dropzone.discover = function () { 9779 var dropzones; 9780 9781 if (document.querySelectorAll) { 9782 dropzones = document.querySelectorAll(".dropzone"); 9783 } else { 9784 dropzones = []; // IE :( 9785 9786 var checkElements = function checkElements(elements) { 9787 return function () { 9788 var result = []; 9789 9790 var _iterator20 = dropzone_createForOfIteratorHelper(elements, true), 9791 _step20; 9792 9793 try { 9794 for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) { 9795 var el = _step20.value; 9796 9797 if (/(^| )dropzone($| )/.test(el.className)) { 9798 result.push(dropzones.push(el)); 9799 } else { 9800 result.push(undefined); 9801 } 9802 } 9803 } catch (err) { 9804 _iterator20.e(err); 9805 } finally { 9806 _iterator20.f(); 9807 } 9808 9809 return result; 9810 }(); 9811 }; 9812 9813 checkElements(document.getElementsByTagName("div")); 9814 checkElements(document.getElementsByTagName("form")); 9815 } 9816 9817 return function () { 9818 var result = []; 9819 9820 var _iterator21 = dropzone_createForOfIteratorHelper(dropzones, true), 9821 _step21; 9822 9823 try { 9824 for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) { 9825 var dropzone = _step21.value; 9826 9827 // Create a dropzone unless auto discover has been disabled for specific element 9828 if (Dropzone.optionsForElement(dropzone) !== false) { 9829 result.push(new Dropzone(dropzone)); 9830 } else { 9831 result.push(undefined); 9832 } 9833 } 9834 } catch (err) { 9835 _iterator21.e(err); 9836 } finally { 9837 _iterator21.f(); 9838 } 9839 9840 return result; 9841 }(); 9842}; // Some browsers support drag and drog functionality, but not correctly. 9843// 9844// So I created a blocklist of userAgents. Yes, yes. Browser sniffing, I know. 9845// But what to do when browsers *theoretically* support an API, but crash 9846// when using it. 9847// 9848// This is a list of regular expressions tested against navigator.userAgent 9849// 9850// ** It should only be used on browser that *do* support the API, but 9851// incorrectly ** 9852 9853 9854Dropzone.blockedBrowsers = [// The mac os and windows phone version of opera 12 seems to have a problem with the File drag'n'drop API. 9855/opera.*(Macintosh|Windows Phone).*version\/12/i]; // Checks if the browser is supported 9856 9857Dropzone.isBrowserSupported = function () { 9858 var capableBrowser = true; 9859 9860 if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) { 9861 if (!("classList" in document.createElement("a"))) { 9862 capableBrowser = false; 9863 } else { 9864 if (Dropzone.blacklistedBrowsers !== undefined) { 9865 // Since this has been renamed, this makes sure we don't break older 9866 // configuration. 9867 Dropzone.blockedBrowsers = Dropzone.blacklistedBrowsers; 9868 } // The browser supports the API, but may be blocked. 9869 9870 9871 var _iterator22 = dropzone_createForOfIteratorHelper(Dropzone.blockedBrowsers, true), 9872 _step22; 9873 9874 try { 9875 for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) { 9876 var regex = _step22.value; 9877 9878 if (regex.test(navigator.userAgent)) { 9879 capableBrowser = false; 9880 continue; 9881 } 9882 } 9883 } catch (err) { 9884 _iterator22.e(err); 9885 } finally { 9886 _iterator22.f(); 9887 } 9888 } 9889 } else { 9890 capableBrowser = false; 9891 } 9892 9893 return capableBrowser; 9894}; 9895 9896Dropzone.dataURItoBlob = function (dataURI) { 9897 // convert base64 to raw binary data held in a string 9898 // doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this 9899 var byteString = atob(dataURI.split(",")[1]); // separate out the mime component 9900 9901 var mimeString = dataURI.split(",")[0].split(":")[1].split(";")[0]; // write the bytes of the string to an ArrayBuffer 9902 9903 var ab = new ArrayBuffer(byteString.length); 9904 var ia = new Uint8Array(ab); 9905 9906 for (var i = 0, end = byteString.length, asc = 0 <= end; asc ? i <= end : i >= end; asc ? i++ : i--) { 9907 ia[i] = byteString.charCodeAt(i); 9908 } // write the ArrayBuffer to a blob 9909 9910 9911 return new Blob([ab], { 9912 type: mimeString 9913 }); 9914}; // Returns an array without the rejected item 9915 9916 9917var without = function without(list, rejectedItem) { 9918 return list.filter(function (item) { 9919 return item !== rejectedItem; 9920 }).map(function (item) { 9921 return item; 9922 }); 9923}; // abc-def_ghi -> abcDefGhi 9924 9925 9926var camelize = function camelize(str) { 9927 return str.replace(/[\-_](\w)/g, function (match) { 9928 return match.charAt(1).toUpperCase(); 9929 }); 9930}; // Creates an element from string 9931 9932 9933Dropzone.createElement = function (string) { 9934 var div = document.createElement("div"); 9935 div.innerHTML = string; 9936 return div.childNodes[0]; 9937}; // Tests if given element is inside (or simply is) the container 9938 9939 9940Dropzone.elementInside = function (element, container) { 9941 if (element === container) { 9942 return true; 9943 } // Coffeescript doesn't support do/while loops 9944 9945 9946 while (element = element.parentNode) { 9947 if (element === container) { 9948 return true; 9949 } 9950 } 9951 9952 return false; 9953}; 9954 9955Dropzone.getElement = function (el, name) { 9956 var element; 9957 9958 if (typeof el === "string") { 9959 element = document.querySelector(el); 9960 } else if (el.nodeType != null) { 9961 element = el; 9962 } 9963 9964 if (element == null) { 9965 throw new Error("Invalid `".concat(name, "` option provided. Please provide a CSS selector or a plain HTML element.")); 9966 } 9967 9968 return element; 9969}; 9970 9971Dropzone.getElements = function (els, name) { 9972 var el, elements; 9973 9974 if (els instanceof Array) { 9975 elements = []; 9976 9977 try { 9978 var _iterator23 = dropzone_createForOfIteratorHelper(els, true), 9979 _step23; 9980 9981 try { 9982 for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) { 9983 el = _step23.value; 9984 elements.push(this.getElement(el, name)); 9985 } 9986 } catch (err) { 9987 _iterator23.e(err); 9988 } finally { 9989 _iterator23.f(); 9990 } 9991 } catch (e) { 9992 elements = null; 9993 } 9994 } else if (typeof els === "string") { 9995 elements = []; 9996 9997 var _iterator24 = dropzone_createForOfIteratorHelper(document.querySelectorAll(els), true), 9998 _step24; 9999 10000 try { 10001 for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) { 10002 el = _step24.value; 10003 elements.push(el); 10004 } 10005 } catch (err) { 10006 _iterator24.e(err); 10007 } finally { 10008 _iterator24.f(); 10009 } 10010 } else if (els.nodeType != null) { 10011 elements = [els]; 10012 } 10013 10014 if (elements == null || !elements.length) { 10015 throw new Error("Invalid `".concat(name, "` option provided. Please provide a CSS selector, a plain HTML element or a list of those.")); 10016 } 10017 10018 return elements; 10019}; // Asks the user the question and calls accepted or rejected accordingly 10020// 10021// The default implementation just uses `window.confirm` and then calls the 10022// appropriate callback. 10023 10024 10025Dropzone.confirm = function (question, accepted, rejected) { 10026 if (window.confirm(question)) { 10027 return accepted(); 10028 } else if (rejected != null) { 10029 return rejected(); 10030 } 10031}; // Validates the mime type like this: 10032// 10033// https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept 10034 10035 10036Dropzone.isValidFile = function (file, acceptedFiles) { 10037 if (!acceptedFiles) { 10038 return true; 10039 } // If there are no accepted mime types, it's OK 10040 10041 10042 acceptedFiles = acceptedFiles.split(","); 10043 var mimeType = file.type; 10044 var baseMimeType = mimeType.replace(/\/.*$/, ""); 10045 10046 var _iterator25 = dropzone_createForOfIteratorHelper(acceptedFiles, true), 10047 _step25; 10048 10049 try { 10050 for (_iterator25.s();
vendor: 10,317 bytes, lines 10050-10441
10050 !(_step25 = _iterator25.n()).done;) { 10051 var validType = _step25.value; 10052 validType = validType.trim(); 10053 10054 if (validType.charAt(0) === ".") { 10055 if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) { 10056 return true; 10057 } 10058 } else if (/\/\*$/.test(validType)) { 10059 // This is something like a image/* mime type 10060 if (baseMimeType === validType.replace(/\/.*$/, "")) { 10061 return true; 10062 } 10063 } else { 10064 if (mimeType === validType) { 10065 return true; 10066 } 10067 } 10068 } 10069 } catch (err) { 10070 _iterator25.e(err); 10071 } finally { 10072 _iterator25.f(); 10073 } 10074 10075 return false; 10076}; // Augment jQuery 10077 10078 10079if (typeof jQuery !== "undefined" && jQuery !== null) { 10080 jQuery.fn.dropzone = function (options) { 10081 return this.each(function () { 10082 return new Dropzone(this, options); 10083 }); 10084 }; 10085} // Dropzone file status codes 10086 10087 10088Dropzone.ADDED = "added"; 10089Dropzone.QUEUED = "queued"; // For backwards compatibility. Now, if a file is accepted, it's either queued 10090// or uploading. 10091 10092Dropzone.ACCEPTED = Dropzone.QUEUED; 10093Dropzone.UPLOADING = "uploading"; 10094Dropzone.PROCESSING = Dropzone.UPLOADING; // alias 10095 10096Dropzone.CANCELED = "canceled"; 10097Dropzone.ERROR = "error"; 10098Dropzone.SUCCESS = "success"; 10099/* 10100 10101 Bugfix for iOS 6 and 7 10102 Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios 10103 based on the work of https://github.com/stomita/ios-imagefile-megapixel 10104 10105 */ 10106// Detecting vertical squash in loaded image. 10107// Fixes a bug which squash image vertically while drawing into canvas for some images. 10108// This is a bug in iOS6 devices. This function from https://github.com/stomita/ios-imagefile-megapixel 10109 10110var detectVerticalSquash = function detectVerticalSquash(img) { 10111 var iw = img.naturalWidth; 10112 var ih = img.naturalHeight; 10113 var canvas = document.createElement("canvas"); 10114 canvas.width = 1; 10115 canvas.height = ih; 10116 var ctx = canvas.getContext("2d"); 10117 ctx.drawImage(img, 0, 0); 10118 10119 var _ctx$getImageData = ctx.getImageData(1, 0, 1, ih), 10120 data = _ctx$getImageData.data; // search image edge pixel position in case it is squashed vertically. 10121 10122 10123 var sy = 0; 10124 var ey = ih; 10125 var py = ih; 10126 10127 while (py > sy) { 10128 var alpha = data[(py - 1) * 4 + 3]; 10129 10130 if (alpha === 0) { 10131 ey = py; 10132 } else { 10133 sy = py; 10134 } 10135 10136 py = ey + sy >> 1; 10137 } 10138 10139 var ratio = py / ih; 10140 10141 if (ratio === 0) { 10142 return 1; 10143 } else { 10144 return ratio; 10145 } 10146}; // A replacement for context.drawImage 10147// (args are for source and destination). 10148 10149 10150var drawImageIOSFix = function drawImageIOSFix(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) { 10151 var vertSquashRatio = detectVerticalSquash(img); 10152 return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio); 10153}; // Based on MinifyJpeg 10154// Source: http://www.perry.cz/files/ExifRestorer.js 10155// http://elicon.blog57.fc2.com/blog-entry-206.html 10156 10157 10158var ExifRestore = /*#__PURE__*/function () { 10159 function ExifRestore() { 10160 dropzone_classCallCheck(this, ExifRestore); 10161 } 10162 10163 dropzone_createClass(ExifRestore, null, [{ 10164 key: "initClass", 10165 value: function initClass() { 10166 this.KEY_STR = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; 10167 } 10168 }, { 10169 key: "encode64", 10170 value: function encode64(input) { 10171 var output = ""; 10172 var chr1 = undefined; 10173 var chr2 = undefined; 10174 var chr3 = ""; 10175 var enc1 = undefined; 10176 var enc2 = undefined; 10177 var enc3 = undefined; 10178 var enc4 = ""; 10179 var i = 0; 10180 10181 while (true) { 10182 chr1 = input[i++]; 10183 chr2 = input[i++]; 10184 chr3 = input[i++]; 10185 enc1 = chr1 >> 2; 10186 enc2 = (chr1 & 3) << 4 | chr2 >> 4; 10187 enc3 = (chr2 & 15) << 2 | chr3 >> 6; 10188 enc4 = chr3 & 63; 10189 10190 if (isNaN(chr2)) { 10191 enc3 = enc4 = 64; 10192 } else if (isNaN(chr3)) { 10193 enc4 = 64; 10194 } 10195 10196 output = output + this.KEY_STR.charAt(enc1) + this.KEY_STR.charAt(enc2) + this.KEY_STR.charAt(enc3) + this.KEY_STR.charAt(enc4); 10197 chr1 = chr2 = chr3 = ""; 10198 enc1 = enc2 = enc3 = enc4 = ""; 10199 10200 if (!(i < input.length)) { 10201 break; 10202 } 10203 } 10204 10205 return output; 10206 } 10207 }, { 10208 key: "restore", 10209 value: function restore(origFileBase64, resizedFileBase64) { 10210 if (!origFileBase64.match("data:image/jpeg;base64,")) { 10211 return resizedFileBase64; 10212 } 10213 10214 var rawImage = this.decode64(origFileBase64.replace("data:image/jpeg;base64,", "")); 10215 var segments = this.slice2Segments(rawImage); 10216 var image = this.exifManipulation(resizedFileBase64, segments); 10217 return "data:image/jpeg;base64,".concat(this.encode64(image)); 10218 } 10219 }, { 10220 key: "exifManipulation", 10221 value: function exifManipulation(resizedFileBase64, segments) { 10222 var exifArray = this.getExifArray(segments); 10223 var newImageArray = this.insertExif(resizedFileBase64, exifArray); 10224 var aBuffer = new Uint8Array(newImageArray); 10225 return aBuffer; 10226 } 10227 }, { 10228 key: "getExifArray", 10229 value: function getExifArray(segments) { 10230 var seg = undefined; 10231 var x = 0; 10232 10233 while (x < segments.length) { 10234 seg = segments[x]; 10235 10236 if (seg[0] === 255 & seg[1] === 225) { 10237 return seg; 10238 } 10239 10240 x++; 10241 } 10242 10243 return []; 10244 } 10245 }, { 10246 key: "insertExif", 10247 value: function insertExif(resizedFileBase64, exifArray) { 10248 var imageData = resizedFileBase64.replace("data:image/jpeg;base64,", ""); 10249 var buf = this.decode64(imageData); 10250 var separatePoint = buf.indexOf(255, 3); 10251 var mae = buf.slice(0, separatePoint); 10252 var ato = buf.slice(separatePoint); 10253 var array = mae; 10254 array = array.concat(exifArray); 10255 array = array.concat(ato); 10256 return array; 10257 } 10258 }, { 10259 key: "slice2Segments", 10260 value: function slice2Segments(rawImageArray) { 10261 var head = 0; 10262 var segments = []; 10263 10264 while (true) { 10265 var length; 10266 10267 if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 218) { 10268 break; 10269 } 10270 10271 if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 216) { 10272 head += 2; 10273 } else { 10274 length = rawImageArray[head + 2] * 256 + rawImageArray[head + 3]; 10275 var endPoint = head + length + 2; 10276 var seg = rawImageArray.slice(head, endPoint); 10277 segments.push(seg); 10278 head = endPoint; 10279 } 10280 10281 if (head > rawImageArray.length) { 10282 break; 10283 } 10284 } 10285 10286 return segments; 10287 } 10288 }, { 10289 key: "decode64", 10290 value: function decode64(input) { 10291 var output = ""; 10292 var chr1 = undefined; 10293 var chr2 = undefined; 10294 var chr3 = ""; 10295 var enc1 = undefined; 10296 var enc2 = undefined; 10297 var enc3 = undefined; 10298 var enc4 = ""; 10299 var i = 0; 10300 var buf = []; // remove all characters that are not A-Z, a-z, 0-9, +, /, or = 10301 10302 var base64test = /[^A-Za-z0-9\+\/\=]/g; 10303 10304 if (base64test.exec(input)) { 10305 console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."); 10306 } 10307 10308 input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); 10309 10310 while (true) { 10311 enc1 = this.KEY_STR.indexOf(input.charAt(i++)); 10312 enc2 = this.KEY_STR.indexOf(input.charAt(i++)); 10313 enc3 = this.KEY_STR.indexOf(input.charAt(i++)); 10314 enc4 = this.KEY_STR.indexOf(input.charAt(i++)); 10315 chr1 = enc1 << 2 | enc2 >> 4; 10316 chr2 = (enc2 & 15) << 4 | enc3 >> 2; 10317 chr3 = (enc3 & 3) << 6 | enc4; 10318 buf.push(chr1); 10319 10320 if (enc3 !== 64) { 10321 buf.push(chr2); 10322 } 10323 10324 if (enc4 !== 64) { 10325 buf.push(chr3); 10326 } 10327 10328 chr1 = chr2 = chr3 = ""; 10329 enc1 = enc2 = enc3 = enc4 = ""; 10330 10331 if (!(i < input.length)) { 10332 break; 10333 } 10334 } 10335 10336 return buf; 10337 } 10338 }]); 10339 10340 return ExifRestore; 10341}(); 10342 10343ExifRestore.initClass(); 10344/* 10345 * contentloaded.js 10346 * 10347 * Author: Diego Perini (diego.perini at gmail.com) 10348 * Summary: cross-browser wrapper for DOMContentLoaded 10349 * Updated: 20101020 10350 * License: MIT 10351 * Version: 1.2 10352 * 10353 * URL: 10354 * http://javascript.nwbox.com/ContentLoaded/ 10355 * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE 10356 */ 10357// @win window reference 10358// @fn function reference 10359 10360var contentLoaded = function contentLoaded(win, fn) { 10361 var done = false; 10362 var top = true; 10363 var doc = win.document; 10364 var root = doc.documentElement; 10365 var add = doc.addEventListener ? "addEventListener" : "attachEvent"; 10366 var rem = doc.addEventListener ? "removeEventListener" : "detachEvent"; 10367 var pre = doc.addEventListener ? "" : "on"; 10368 10369 var init = function init(e) { 10370 if (e.type === "readystatechange" && doc.readyState !== "complete") { 10371 return; 10372 } 10373 10374 (e.type === "load" ? win : doc)[rem](pre + e.type, init, false); 10375 10376 if (!done && (done = true)) { 10377 return fn.call(win, e.type || e); 10378 } 10379 }; 10380 10381 var poll = function poll() { 10382 try { 10383 root.doScroll("left"); 10384 } catch (e) { 10385 setTimeout(poll, 50); 10386 return; 10387 } 10388 10389 return init("poll"); 10390 }; 10391 10392 if (doc.readyState !== "complete") { 10393 if (doc.createEventObject && root.doScroll) { 10394 try { 10395 top = !win.frameElement; 10396 } catch (error) {} 10397 10398 if (top) { 10399 poll(); 10400 } 10401 } 10402 10403 doc[add](pre + "DOMContentLoaded", init, false); 10404 doc[add](pre + "readystatechange", init, false); 10405 return win[add](pre + "load", init, false); 10406 } 10407}; // As a single function to be able to write tests. 10408 10409 10410Dropzone._autoDiscoverFunction = function () { 10411 if (Dropzone.autoDiscover) { 10412 return Dropzone.discover(); 10413 } 10414}; 10415 10416contentLoaded(window, Dropzone._autoDiscoverFunction); 10417 10418function __guard__(value, transform) { 10419 return typeof value !== "undefined" && value !== null ? transform(value) : undefined; 10420} 10421 10422function __guardMethod__(obj, methodName, transform) { 10423 if (typeof obj !== "undefined" && obj !== null && typeof obj[methodName] === "function") { 10424 return transform(obj, methodName); 10425 } else { 10426 return undefined; 10427 } 10428} 10429 10430 10431;// CONCATENATED MODULE: ./tool/dropzone.dist.js 10432 /// Make Dropzone a global variable. 10433 10434window.Dropzone = Dropzone; 10435/* harmony default export */ var dropzone_dist = (Dropzone); 10436 10437}(); 10438/******/ return __webpack_exports__; 10439/******/ })() 10440; 10441});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.