{
  "version": 3,
  "sources": ["../../../../../shared/node_modules/namespace-emitter/index.js", "../../../../../shared/node_modules/lodash/isObject.js", "../../../../../shared/node_modules/lodash/_freeGlobal.js", "../../../../../shared/node_modules/lodash/_root.js", "../../../../../shared/node_modules/lodash/now.js", "../../../../../shared/node_modules/lodash/_trimmedEndIndex.js", "../../../../../shared/node_modules/lodash/_baseTrim.js", "../../../../../shared/node_modules/lodash/_Symbol.js", "../../../../../shared/node_modules/lodash/_getRawTag.js", "../../../../../shared/node_modules/lodash/_objectToString.js", "../../../../../shared/node_modules/lodash/_baseGetTag.js", "../../../../../shared/node_modules/lodash/isObjectLike.js", "../../../../../shared/node_modules/lodash/isSymbol.js", "../../../../../shared/node_modules/lodash/toNumber.js", "../../../../../shared/node_modules/lodash/debounce.js", "../../../../../shared/node_modules/lodash/throttle.js", "../../../../../shared/node_modules/@transloadit/prettier-bytes/src/prettierBytes.ts", "../../../../../shared/node_modules/wildcard/index.js", "../../../../../shared/node_modules/mime-match/index.js", "../../../../../shared/node_modules/classnames/index.js", "../../../../../shared/node_modules/@uppy/utils/lib/Translator.js", "../../../../../shared/node_modules/@uppy/core/lib/Uppy.js", "../../../../../shared/node_modules/@uppy/core/node_modules/nanoid/non-secure/index.js", "../../../../../shared/node_modules/@uppy/store-default/lib/index.js", "../../../../../shared/node_modules/@uppy/utils/lib/getFileNameAndExtension.js", "../../../../../shared/node_modules/@uppy/utils/lib/mimeTypes.js", "../../../../../shared/node_modules/@uppy/utils/lib/getFileType.js", "../../../../../shared/node_modules/@uppy/utils/lib/generateFileID.js", "../../../../../shared/node_modules/@uppy/core/lib/supportsUploadProgress.js", "../../../../../shared/node_modules/@uppy/core/lib/getFileName.js", "../../../../../shared/node_modules/@uppy/utils/lib/getTimeStamp.js", "../../../../../shared/node_modules/@uppy/core/lib/loggers.js", "../../../../../shared/node_modules/@uppy/core/lib/Restricter.js", "../../../../../shared/node_modules/@uppy/core/lib/locale.js", "../../../../../shared/node_modules/preact/src/constants.js", "../../../../../shared/node_modules/preact/src/util.js", "../../../../../shared/node_modules/preact/src/options.js", "../../../../../shared/node_modules/preact/src/create-element.js", "../../../../../shared/node_modules/preact/src/component.js", "../../../../../shared/node_modules/preact/src/diff/props.js", "../../../../../shared/node_modules/preact/src/create-context.js", "../../../../../shared/node_modules/preact/src/diff/children.js", "../../../../../shared/node_modules/preact/src/diff/index.js", "../../../../../shared/node_modules/preact/src/render.js", "../../../../../shared/node_modules/preact/src/clone-element.js", "../../../../../shared/node_modules/preact/src/diff/catch-error.js", "../../../../../shared/node_modules/@uppy/utils/lib/isDOMElement.js", "../../../../../shared/node_modules/@uppy/utils/lib/findDOMElement.js", "../../../../../shared/node_modules/@uppy/utils/lib/getTextDirection.js", "../../../../../shared/node_modules/@uppy/core/lib/BasePlugin.js", "../../../../../shared/node_modules/@uppy/core/lib/UIPlugin.js", "../../../../../shared/node_modules/@uppy/core/lib/EventManager.js", "../../../../../shared/node_modules/@uppy/utils/lib/RateLimitedQueue.js", "../../../../../shared/node_modules/@uppy/utils/lib/NetworkError.js", "../../../../../shared/node_modules/@uppy/utils/lib/isNetworkError.js", "../../../../../shared/node_modules/@uppy/utils/lib/ProgressTimeout.js", "../../../../../shared/node_modules/@uppy/utils/lib/fetcher.js", "../../../../../shared/node_modules/@uppy/utils/lib/fileFilters.js", "../../../../../shared/node_modules/@uppy/xhr-upload/lib/locale.js", "../../../../../shared/node_modules/@uppy/xhr-upload/lib/index.js", "../../../../../shared/node_modules/@uppy/utils/lib/emaFilter.js", "../../../../../shared/node_modules/@uppy/status-bar/lib/StatusBarStates.js", "../../../../../shared/node_modules/@uppy/status-bar/lib/StatusBarUI.js", "../../../../../shared/node_modules/@uppy/status-bar/lib/calculateProcessingProgress.js", "../../../../../shared/node_modules/@uppy/status-bar/lib/Components.js", "../../../../../shared/node_modules/@uppy/utils/lib/secondsToTime.js", "../../../../../shared/node_modules/@uppy/utils/lib/prettyETA.js", "../../../../../shared/node_modules/@uppy/status-bar/lib/locale.js", "../../../../../shared/node_modules/@uppy/status-bar/lib/StatusBar.js", "../../javascript/manage.js"],
  "sourcesContent": ["/**\n* Create an event emitter with namespaces\n* @name createNamespaceEmitter\n* @example\n* var emitter = require('./index')()\n*\n* emitter.on('*', function () {\n*   console.log('all events emitted', this.event)\n* })\n*\n* emitter.on('example', function () {\n*   console.log('example event emitted')\n* })\n*/\nmodule.exports = function createNamespaceEmitter () {\n  var emitter = {}\n  var _fns = emitter._fns = {}\n\n  /**\n  * Emit an event. Optionally namespace the event. Handlers are fired in the order in which they were added with exact matches taking precedence. Separate the namespace and event with a `:`\n  * @name emit\n  * @param {String} event \u2013 the name of the event, with optional namespace\n  * @param {...*} data \u2013 up to 6 arguments that are passed to the event listener\n  * @example\n  * emitter.emit('example')\n  * emitter.emit('demo:test')\n  * emitter.emit('data', { example: true}, 'a string', 1)\n  */\n  emitter.emit = function emit (event, arg1, arg2, arg3, arg4, arg5, arg6) {\n    var toEmit = getListeners(event)\n\n    if (toEmit.length) {\n      emitAll(event, toEmit, [arg1, arg2, arg3, arg4, arg5, arg6])\n    }\n  }\n\n  /**\n  * Create en event listener.\n  * @name on\n  * @param {String} event\n  * @param {Function} fn\n  * @example\n  * emitter.on('example', function () {})\n  * emitter.on('demo', function () {})\n  */\n  emitter.on = function on (event, fn) {\n    if (!_fns[event]) {\n      _fns[event] = []\n    }\n\n    _fns[event].push(fn)\n  }\n\n  /**\n  * Create en event listener that fires once.\n  * @name once\n  * @param {String} event\n  * @param {Function} fn\n  * @example\n  * emitter.once('example', function () {})\n  * emitter.once('demo', function () {})\n  */\n  emitter.once = function once (event, fn) {\n    function one () {\n      fn.apply(this, arguments)\n      emitter.off(event, one)\n    }\n    this.on(event, one)\n  }\n\n  /**\n  * Stop listening to an event. Stop all listeners on an event by only passing the event name. Stop a single listener by passing that event handler as a callback.\n  * You must be explicit about what will be unsubscribed: `emitter.off('demo')` will unsubscribe an `emitter.on('demo')` listener,\n  * `emitter.off('demo:example')` will unsubscribe an `emitter.on('demo:example')` listener\n  * @name off\n  * @param {String} event\n  * @param {Function} [fn] \u2013 the specific handler\n  * @example\n  * emitter.off('example')\n  * emitter.off('demo', function () {})\n  */\n  emitter.off = function off (event, fn) {\n    var keep = []\n\n    if (event && fn) {\n      var fns = this._fns[event]\n      var i = 0\n      var l = fns ? fns.length : 0\n\n      for (i; i < l; i++) {\n        if (fns[i] !== fn) {\n          keep.push(fns[i])\n        }\n      }\n    }\n\n    keep.length ? this._fns[event] = keep : delete this._fns[event]\n  }\n\n  function getListeners (e) {\n    var out = _fns[e] ? _fns[e] : []\n    var idx = e.indexOf(':')\n    var args = (idx === -1) ? [e] : [e.substring(0, idx), e.substring(idx + 1)]\n\n    var keys = Object.keys(_fns)\n    var i = 0\n    var l = keys.length\n\n    for (i; i < l; i++) {\n      var key = keys[i]\n      if (key === '*') {\n        out = out.concat(_fns[key])\n      }\n\n      if (args.length === 2 && args[0] === key) {\n        out = out.concat(_fns[key])\n        break\n      }\n    }\n\n    return out\n  }\n\n  function emitAll (e, fns, args) {\n    var i = 0\n    var l = fns.length\n\n    for (i; i < l; i++) {\n      if (!fns[i]) break\n      fns[i].event = e\n      fns[i].apply(fns[i], args)\n    }\n  }\n\n  return emitter\n}\n", "/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n", "/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n", "var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n", "var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n *   console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n  return root.Date.now();\n};\n\nmodule.exports = now;\n", "/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n  var index = string.length;\n\n  while (index-- && reWhitespace.test(string.charAt(index))) {}\n  return index;\n}\n\nmodule.exports = trimmedEndIndex;\n", "var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n  return string\n    ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n    : string;\n}\n\nmodule.exports = baseTrim;\n", "var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n", "var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\nmodule.exports = getRawTag;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n", "var Symbol = require('./_Symbol'),\n    getRawTag = require('./_getRawTag'),\n    objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n    undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n", "/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n", "var baseGetTag = require('./_baseGetTag'),\n    isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n", "var baseTrim = require('./_baseTrim'),\n    isObject = require('./isObject'),\n    isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = baseTrim(value);\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n", "var isObject = require('./isObject'),\n    now = require('./now'),\n    toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n    nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n *  Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n *  The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n *   'leading': true,\n *   'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n  var lastArgs,\n      lastThis,\n      maxWait,\n      result,\n      timerId,\n      lastCallTime,\n      lastInvokeTime = 0,\n      leading = false,\n      maxing = false,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  wait = toNumber(wait) || 0;\n  if (isObject(options)) {\n    leading = !!options.leading;\n    maxing = 'maxWait' in options;\n    maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n\n  function invokeFunc(time) {\n    var args = lastArgs,\n        thisArg = lastThis;\n\n    lastArgs = lastThis = undefined;\n    lastInvokeTime = time;\n    result = func.apply(thisArg, args);\n    return result;\n  }\n\n  function leadingEdge(time) {\n    // Reset any `maxWait` timer.\n    lastInvokeTime = time;\n    // Start the timer for the trailing edge.\n    timerId = setTimeout(timerExpired, wait);\n    // Invoke the leading edge.\n    return leading ? invokeFunc(time) : result;\n  }\n\n  function remainingWait(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime,\n        timeWaiting = wait - timeSinceLastCall;\n\n    return maxing\n      ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n      : timeWaiting;\n  }\n\n  function shouldInvoke(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime;\n\n    // Either this is the first call, activity has stopped and we're at the\n    // trailing edge, the system time has gone backwards and we're treating\n    // it as the trailing edge, or we've hit the `maxWait` limit.\n    return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n      (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n  }\n\n  function timerExpired() {\n    var time = now();\n    if (shouldInvoke(time)) {\n      return trailingEdge(time);\n    }\n    // Restart the timer.\n    timerId = setTimeout(timerExpired, remainingWait(time));\n  }\n\n  function trailingEdge(time) {\n    timerId = undefined;\n\n    // Only invoke if we have `lastArgs` which means `func` has been\n    // debounced at least once.\n    if (trailing && lastArgs) {\n      return invokeFunc(time);\n    }\n    lastArgs = lastThis = undefined;\n    return result;\n  }\n\n  function cancel() {\n    if (timerId !== undefined) {\n      clearTimeout(timerId);\n    }\n    lastInvokeTime = 0;\n    lastArgs = lastCallTime = lastThis = timerId = undefined;\n  }\n\n  function flush() {\n    return timerId === undefined ? result : trailingEdge(now());\n  }\n\n  function debounced() {\n    var time = now(),\n        isInvoking = shouldInvoke(time);\n\n    lastArgs = arguments;\n    lastThis = this;\n    lastCallTime = time;\n\n    if (isInvoking) {\n      if (timerId === undefined) {\n        return leadingEdge(lastCallTime);\n      }\n      if (maxing) {\n        // Handle invocations in a tight loop.\n        clearTimeout(timerId);\n        timerId = setTimeout(timerExpired, wait);\n        return invokeFunc(lastCallTime);\n      }\n    }\n    if (timerId === undefined) {\n      timerId = setTimeout(timerExpired, wait);\n    }\n    return result;\n  }\n  debounced.cancel = cancel;\n  debounced.flush = flush;\n  return debounced;\n}\n\nmodule.exports = debounce;\n", "var debounce = require('./debounce'),\n    isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n *  Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n  var leading = true,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  if (isObject(options)) {\n    leading = 'leading' in options ? !!options.leading : leading;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n  return debounce(func, wait, {\n    'leading': leading,\n    'maxWait': wait,\n    'trailing': trailing\n  });\n}\n\nmodule.exports = throttle;\n", "// Adapted from https://github.com/Flet/prettier-bytes/\n// Changing 1000 bytes to 1024, so we can keep uppercase KB vs kB\n// ISC License (c) Dan Flettre https://github.com/Flet/prettier-bytes/blob/master/LICENSE\nexport = function prettierBytes(input: number): string {\n  if (typeof input !== 'number' || Number.isNaN(input)) {\n    throw new TypeError(`Expected a number, got ${typeof input}`)\n  }\n\n  const neg = input < 0\n  let num = Math.abs(input)\n\n  if (neg) {\n    num = -num\n  }\n\n  if (num === 0) {\n    return '0 B'\n  }\n\n  const units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']\n  const exponent = Math.min(Math.floor(Math.log(num) / Math.log(1024)), units.length - 1)\n  const value = Number(num / 1024 ** exponent)\n  const unit = units[exponent]\n\n  return `${value >= 10 || value % 1 === 0 ? Math.round(value) : value.toFixed(1)} ${unit}`\n}\n", "/* jshint node: true */\n'use strict';\n\n/**\n  # wildcard\n\n  Very simple wildcard matching, which is designed to provide the same\n  functionality that is found in the\n  [eve](https://github.com/adobe-webplatform/eve) eventing library.\n\n  ## Usage\n\n  It works with strings:\n\n  <<< examples/strings.js\n\n  Arrays:\n\n  <<< examples/arrays.js\n\n  Objects (matching against keys):\n\n  <<< examples/objects.js\n\n  While the library works in Node, if you are are looking for file-based\n  wildcard matching then you should have a look at:\n\n  <https://github.com/isaacs/node-glob>\n**/\n\nfunction WildcardMatcher(text, separator) {\n  this.text = text = text || '';\n  this.hasWild = ~text.indexOf('*');\n  this.separator = separator;\n  this.parts = text.split(separator);\n}\n\nWildcardMatcher.prototype.match = function(input) {\n  var matches = true;\n  var parts = this.parts;\n  var ii;\n  var partsCount = parts.length;\n  var testParts;\n\n  if (typeof input == 'string' || input instanceof String) {\n    if (!this.hasWild && this.text != input) {\n      matches = false;\n    } else {\n      testParts = (input || '').split(this.separator);\n      for (ii = 0; matches && ii < partsCount; ii++) {\n        if (parts[ii] === '*')  {\n          continue;\n        } else if (ii < testParts.length) {\n          matches = parts[ii] === testParts[ii];\n        } else {\n          matches = false;\n        }\n      }\n\n      // If matches, then return the component parts\n      matches = matches && testParts;\n    }\n  }\n  else if (typeof input.splice == 'function') {\n    matches = [];\n\n    for (ii = input.length; ii--; ) {\n      if (this.match(input[ii])) {\n        matches[matches.length] = input[ii];\n      }\n    }\n  }\n  else if (typeof input == 'object') {\n    matches = {};\n\n    for (var key in input) {\n      if (this.match(key)) {\n        matches[key] = input[key];\n      }\n    }\n  }\n\n  return matches;\n};\n\nmodule.exports = function(text, test, separator) {\n  var matcher = new WildcardMatcher(text, separator || /[\\/\\.]/);\n  if (typeof test != 'undefined') {\n    return matcher.match(test);\n  }\n\n  return matcher;\n};\n", "var wildcard = require('wildcard');\nvar reMimePartSplit = /[\\/\\+\\.]/;\n\n/**\n  # mime-match\n\n  A simple function to checker whether a target mime type matches a mime-type\n  pattern (e.g. image/jpeg matches image/jpeg OR image/*).\n\n  ## Example Usage\n\n  <<< example.js\n\n**/\nmodule.exports = function(target, pattern) {\n  function test(pattern) {\n    var result = wildcard(pattern, target, reMimePartSplit);\n\n    // ensure that we have a valid mime type (should have two parts)\n    return result && result.length >= 2;\n  }\n\n  return pattern ? test(pattern.split(';')[0]) : test;\n};\n", "/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n", "function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\nvar id = 0;\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n// We're using a generic because languages have different plural rules.\n\n// eslint-disable-next-line no-use-before-define\n\nfunction insertReplacement(source, rx, replacement) {\n  const newParts = [];\n  source.forEach(chunk => {\n    // When the source contains multiple placeholders for interpolation,\n    // we should ignore chunks that are not strings, because those\n    // can be JSX objects and will be otherwise incorrectly turned into strings.\n    // Without this condition we\u2019d get this: [object Object] hello [object Object] my <button>\n    if (typeof chunk !== 'string') {\n      return newParts.push(chunk);\n    }\n    return rx[Symbol.split](chunk).forEach((raw, i, list) => {\n      if (raw !== '') {\n        newParts.push(raw);\n      }\n\n      // Interlace with the `replacement` value\n      if (i < list.length - 1) {\n        newParts.push(replacement);\n      }\n    });\n  });\n  return newParts;\n}\n\n/**\n * Takes a string with placeholder variables like `%{smart_count} file selected`\n * and replaces it with values from options `{smart_count: 5}`\n *\n * @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE\n * taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299\n *\n * @param phrase that needs interpolation, with placeholders\n * @param options with values that will be used to replace placeholders\n */\nfunction interpolate(phrase, options) {\n  const dollarRegex = /\\$/g;\n  const dollarBillsYall = '$$$$';\n  let interpolated = [phrase];\n  if (options == null) return interpolated;\n  for (const arg of Object.keys(options)) {\n    if (arg !== '_') {\n      // Ensure replacement value is escaped to prevent special $-prefixed\n      // regex replace tokens. the \"$$$$\" is needed because each \"$\" needs to\n      // be escaped with \"$\" itself, and we need two in the resulting output.\n      let replacement = options[arg];\n      if (typeof replacement === 'string') {\n        replacement = dollarRegex[Symbol.replace](replacement, dollarBillsYall);\n      }\n      // We create a new `RegExp` each time instead of using a more-efficient\n      // string replace so that the same argument can be replaced multiple times\n      // in the same phrase.\n      interpolated = insertReplacement(interpolated, new RegExp(`%\\\\{${arg}\\\\}`, 'g'), replacement);\n    }\n  }\n  return interpolated;\n}\nconst defaultOnMissingKey = key => {\n  throw new Error(`missing string: ${key}`);\n};\n\n/**\n * Translates strings with interpolation & pluralization support.\n * Extensible with custom dictionaries and pluralization functions.\n *\n * Borrows heavily from and inspired by Polyglot https://github.com/airbnb/polyglot.js,\n * basically a stripped-down version of it. Differences: pluralization functions are not hardcoded\n * and can be easily added among with dictionaries, nested objects are used for pluralization\n * as opposed to `||||` delimeter\n *\n * Usage example: `translator.translate('files_chosen', {smart_count: 3})`\n */\nvar _onMissingKey = /*#__PURE__*/_classPrivateFieldLooseKey(\"onMissingKey\");\nvar _apply = /*#__PURE__*/_classPrivateFieldLooseKey(\"apply\");\nexport default class Translator {\n  constructor(locales, _temp) {\n    let {\n      onMissingKey = defaultOnMissingKey\n    } = _temp === void 0 ? {} : _temp;\n    Object.defineProperty(this, _apply, {\n      value: _apply2\n    });\n    Object.defineProperty(this, _onMissingKey, {\n      writable: true,\n      value: void 0\n    });\n    this.locale = {\n      strings: {},\n      pluralize(n) {\n        if (n === 1) {\n          return 0;\n        }\n        return 1;\n      }\n    };\n    if (Array.isArray(locales)) {\n      locales.forEach(_classPrivateFieldLooseBase(this, _apply)[_apply], this);\n    } else {\n      _classPrivateFieldLooseBase(this, _apply)[_apply](locales);\n    }\n    _classPrivateFieldLooseBase(this, _onMissingKey)[_onMissingKey] = onMissingKey;\n  }\n  /**\n   * Public translate method\n   *\n   * @param key\n   * @param options with values that will be used later to replace placeholders in string\n   * @returns string translated (and interpolated)\n   */\n  translate(key, options) {\n    return this.translateArray(key, options).join('');\n  }\n\n  /**\n   * Get a translation and return the translated and interpolated parts as an array.\n   *\n   * @returns The translated and interpolated parts, in order.\n   */\n  translateArray(key, options) {\n    let string = this.locale.strings[key];\n    if (string == null) {\n      _classPrivateFieldLooseBase(this, _onMissingKey)[_onMissingKey](key);\n      string = key;\n    }\n    const hasPluralForms = typeof string === 'object';\n    if (hasPluralForms) {\n      if (options && typeof options.smart_count !== 'undefined') {\n        const plural = this.locale.pluralize(options.smart_count);\n        return interpolate(string[plural], options);\n      }\n      throw new Error('Attempted to use a string with plural forms, but no value was given for %{smart_count}');\n    }\n    if (typeof string !== 'string') {\n      throw new Error(`string was not a string`);\n    }\n    return interpolate(string, options);\n  }\n}\nfunction _apply2(locale) {\n  if (!(locale != null && locale.strings)) {\n    return;\n  }\n  const prevLocale = this.locale;\n  Object.assign(this.locale, {\n    strings: {\n      ...prevLocale.strings,\n      ...locale.strings\n    },\n    pluralize: locale.pluralize || prevLocale.pluralize\n  });\n}", "let _Symbol$for, _Symbol$for2;\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\nvar id = 0;\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n/* eslint-disable max-classes-per-file */\n/* global AggregateError */\n\nimport Translator from '@uppy/utils/lib/Translator';\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore untyped\nimport ee from 'namespace-emitter';\nimport { nanoid } from 'nanoid/non-secure';\nimport throttle from 'lodash/throttle.js';\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore store-default types not always available on that branch\nimport DefaultStore from '@uppy/store-default';\nimport getFileType from '@uppy/utils/lib/getFileType';\nimport getFileNameAndExtension from '@uppy/utils/lib/getFileNameAndExtension';\nimport { getSafeFileId } from '@uppy/utils/lib/generateFileID';\nimport supportsUploadProgress from \"./supportsUploadProgress.js\";\nimport getFileName from \"./getFileName.js\";\nimport { justErrorsLogger, debugLogger } from \"./loggers.js\";\nimport { Restricter, defaultOptions as defaultRestrictionOptions, RestrictionError } from \"./Restricter.js\";\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore We don't want TS to generate types for the package.json\nconst packageJson = {\n  \"version\": \"3.13.1\"\n};\nimport locale from \"./locale.js\";\n\n/*\n * UnknownProviderPlugin can be any Companion plugin (such as Google Drive).\n * As the plugins are passed around throughout Uppy we need a generic type for this.\n * It may seems like duplication, but this type safe. Changing the type of `storage`\n * will error in the `Provider` class of @uppy/companion-client and vice versa.\n *\n * Note that this is the *plugin* class, not a version of the `Provider` class.\n * `Provider` does operate on Companion plugins with `uppy.getPlugin()`.\n */\n\n/*\n * UnknownSearchProviderPlugin can be any search Companion plugin (such as Unsplash).\n * As the plugins are passed around throughout Uppy we need a generic type for this.\n * It may seems like duplication, but this type safe. Changing the type of `title`\n * will error in the `SearchProvider` class of @uppy/companion-client and vice versa.\n *\n * Note that this is the *plugin* class, not a version of the `SearchProvider` class.\n * `SearchProvider` does operate on Companion plugins with `uppy.getPlugin()`.\n */\n\n// TODO: can we use namespaces in other plugins to populate this?\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\n\n// The user facing type for UppyOptions used in uppy.setOptions()\n\n/** @deprecated */\n\nconst defaultUploadState = {\n  totalProgress: 0,\n  allowNewUpload: true,\n  error: null,\n  recoveredState: null\n};\n\n/**\n * Uppy Core module.\n * Manages plugins, state updates, acts as an event bus,\n * adds/removes files and metadata.\n */\nvar _plugins = /*#__PURE__*/_classPrivateFieldLooseKey(\"plugins\");\nvar _restricter = /*#__PURE__*/_classPrivateFieldLooseKey(\"restricter\");\nvar _storeUnsubscribe = /*#__PURE__*/_classPrivateFieldLooseKey(\"storeUnsubscribe\");\nvar _emitter = /*#__PURE__*/_classPrivateFieldLooseKey(\"emitter\");\nvar _preProcessors = /*#__PURE__*/_classPrivateFieldLooseKey(\"preProcessors\");\nvar _uploaders = /*#__PURE__*/_classPrivateFieldLooseKey(\"uploaders\");\nvar _postProcessors = /*#__PURE__*/_classPrivateFieldLooseKey(\"postProcessors\");\nvar _informAndEmit = /*#__PURE__*/_classPrivateFieldLooseKey(\"informAndEmit\");\nvar _checkRequiredMetaFieldsOnFile = /*#__PURE__*/_classPrivateFieldLooseKey(\"checkRequiredMetaFieldsOnFile\");\nvar _checkRequiredMetaFields = /*#__PURE__*/_classPrivateFieldLooseKey(\"checkRequiredMetaFields\");\nvar _assertNewUploadAllowed = /*#__PURE__*/_classPrivateFieldLooseKey(\"assertNewUploadAllowed\");\nvar _transformFile = /*#__PURE__*/_classPrivateFieldLooseKey(\"transformFile\");\nvar _startIfAutoProceed = /*#__PURE__*/_classPrivateFieldLooseKey(\"startIfAutoProceed\");\nvar _checkAndUpdateFileState = /*#__PURE__*/_classPrivateFieldLooseKey(\"checkAndUpdateFileState\");\nvar _addListeners = /*#__PURE__*/_classPrivateFieldLooseKey(\"addListeners\");\nvar _updateOnlineStatus = /*#__PURE__*/_classPrivateFieldLooseKey(\"updateOnlineStatus\");\nvar _requestClientById = /*#__PURE__*/_classPrivateFieldLooseKey(\"requestClientById\");\nvar _createUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"createUpload\");\nvar _getUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"getUpload\");\nvar _removeUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"removeUpload\");\nvar _runUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"runUpload\");\n_Symbol$for = Symbol.for('uppy test: getPlugins');\n_Symbol$for2 = Symbol.for('uppy test: createUpload');\nexport class Uppy {\n  /**\n   * Instantiate Uppy\n   */\n  constructor(_opts) {\n    /**\n     * Run an upload. This picks up where it left off in case the upload is being restored.\n     */\n    Object.defineProperty(this, _runUpload, {\n      value: _runUpload2\n    });\n    /**\n     * Remove an upload, eg. if it has been canceled or completed.\n     *\n     */\n    Object.defineProperty(this, _removeUpload, {\n      value: _removeUpload2\n    });\n    Object.defineProperty(this, _getUpload, {\n      value: _getUpload2\n    });\n    /**\n     * Create an upload for a bunch of files.\n     *\n     */\n    Object.defineProperty(this, _createUpload, {\n      value: _createUpload2\n    });\n    /**\n     * Registers listeners for all global actions, like:\n     * `error`, `file-removed`, `upload-progress`\n     */\n    Object.defineProperty(this, _addListeners, {\n      value: _addListeners2\n    });\n    Object.defineProperty(this, _checkAndUpdateFileState, {\n      value: _checkAndUpdateFileState2\n    });\n    // Schedule an upload if `autoProceed` is enabled.\n    Object.defineProperty(this, _startIfAutoProceed, {\n      value: _startIfAutoProceed2\n    });\n    /**\n     * Create a file state object based on user-provided `addFile()` options.\n     */\n    Object.defineProperty(this, _transformFile, {\n      value: _transformFile2\n    });\n    Object.defineProperty(this, _assertNewUploadAllowed, {\n      value: _assertNewUploadAllowed2\n    });\n    Object.defineProperty(this, _checkRequiredMetaFields, {\n      value: _checkRequiredMetaFields2\n    });\n    Object.defineProperty(this, _checkRequiredMetaFieldsOnFile, {\n      value: _checkRequiredMetaFieldsOnFile2\n    });\n    Object.defineProperty(this, _informAndEmit, {\n      value: _informAndEmit2\n    });\n    Object.defineProperty(this, _plugins, {\n      writable: true,\n      value: Object.create(null)\n    });\n    Object.defineProperty(this, _restricter, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _storeUnsubscribe, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _emitter, {\n      writable: true,\n      value: ee()\n    });\n    Object.defineProperty(this, _preProcessors, {\n      writable: true,\n      value: new Set()\n    });\n    Object.defineProperty(this, _uploaders, {\n      writable: true,\n      value: new Set()\n    });\n    Object.defineProperty(this, _postProcessors, {\n      writable: true,\n      value: new Set()\n    });\n    this.scheduledAutoProceed = null;\n    this.wasOffline = false;\n    // ___Why throttle at 500ms?\n    //    - We must throttle at >250ms for superfocus in Dashboard to work well\n    //    (because animation takes 0.25s, and we want to wait for all animations to be over before refocusing).\n    //    [Practical Check]: if thottle is at 100ms, then if you are uploading a file,\n    //    and click 'ADD MORE FILES', - focus won't activate in Firefox.\n    //    - We must throttle at around >500ms to avoid performance lags.\n    //    [Practical Check] Firefox, try to upload a big file for a prolonged period of time. Laptop will start to heat up.\n    // todo when uploading multiple files, this will cause problems because they share the same throttle,\n    // meaning some files might never get their progress reported (eaten up by progress events from other files)\n    this.calculateProgress = throttle((file, data) => {\n      const fileInState = this.getFile(file == null ? void 0 : file.id);\n      if (file == null || !fileInState) {\n        this.log(`Not setting progress for a file that has been removed: ${file == null ? void 0 : file.id}`);\n        return;\n      }\n      if (fileInState.progress.percentage === 100) {\n        this.log(`Not setting progress for a file that has been already uploaded: ${file.id}`);\n        return;\n      }\n\n      // bytesTotal may be null or zero; in that case we can't divide by it\n      const canHavePercentage = Number.isFinite(data.bytesTotal) && data.bytesTotal > 0;\n      this.setFileState(file.id, {\n        progress: {\n          ...fileInState.progress,\n          bytesUploaded: data.bytesUploaded,\n          bytesTotal: data.bytesTotal,\n          percentage: canHavePercentage ? Math.round(data.bytesUploaded / data.bytesTotal * 100) : 0\n        }\n      });\n      this.calculateTotalProgress();\n    }, 500, {\n      leading: true,\n      trailing: true\n    });\n    Object.defineProperty(this, _updateOnlineStatus, {\n      writable: true,\n      value: this.updateOnlineStatus.bind(this)\n    });\n    // We need to store request clients by a unique ID, so we can share RequestClient instances across files\n    // this allows us to do rate limiting and synchronous operations like refreshing provider tokens\n    // example: refreshing tokens: if each file has their own requestclient,\n    // we don't have any way to synchronize all requests in order to\n    // - block all requests\n    // - refresh the token\n    // - unblock all requests and allow them to run with a the new access token\n    // back when we had a requestclient per file, once an access token expired,\n    // all 6 files would go ahead and refresh the token at the same time\n    // (calling /refresh-token up to 6 times), which will probably fail for some providers\n    Object.defineProperty(this, _requestClientById, {\n      writable: true,\n      value: new Map()\n    });\n    this.defaultLocale = locale;\n    const defaultOptions = {\n      id: 'uppy',\n      autoProceed: false,\n      allowMultipleUploadBatches: true,\n      debug: false,\n      restrictions: defaultRestrictionOptions,\n      meta: {},\n      onBeforeFileAdded: (file, files) => !Object.hasOwn(files, file.id),\n      onBeforeUpload: files => files,\n      store: new DefaultStore(),\n      logger: justErrorsLogger,\n      infoTimeout: 5000\n    };\n    const merged = {\n      ...defaultOptions,\n      ..._opts\n    };\n    // Merge default options with the ones set by user,\n    // making sure to merge restrictions too\n    this.opts = {\n      ...merged,\n      restrictions: {\n        ...defaultOptions.restrictions,\n        ...(_opts && _opts.restrictions)\n      }\n    };\n\n    // Support debug: true for backwards-compatability, unless logger is set in opts\n    // opts instead of this.opts to avoid comparing objects \u2014 we set logger: justErrorsLogger in defaultOptions\n    if (_opts && _opts.logger && _opts.debug) {\n      this.log('You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.', 'warning');\n    } else if (_opts && _opts.debug) {\n      this.opts.logger = debugLogger;\n    }\n    this.log(`Using Core v${Uppy.VERSION}`);\n    this.i18nInit();\n    this.store = this.opts.store;\n    this.setState({\n      ...defaultUploadState,\n      plugins: {},\n      files: {},\n      currentUploads: {},\n      capabilities: {\n        uploadProgress: supportsUploadProgress(),\n        individualCancellation: true,\n        resumableUploads: false\n      },\n      meta: {\n        ...this.opts.meta\n      },\n      info: []\n    });\n    _classPrivateFieldLooseBase(this, _restricter)[_restricter] = new Restricter(() => this.opts, () => this.i18n);\n    _classPrivateFieldLooseBase(this, _storeUnsubscribe)[_storeUnsubscribe] = this.store.subscribe(\n    // eslint-disable-next-line\n    // @ts-ignore Store is incorrectly typed\n    (prevState, nextState, patch) => {\n      // eslint-disable-next-line\n      // @ts-ignore Store is incorrectly typed\n      this.emit('state-update', prevState, nextState, patch);\n      this.updateAll(nextState);\n    });\n\n    // Exposing uppy object on window for debugging and testing\n    if (this.opts.debug && typeof window !== 'undefined') {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-ignore Mutating the global object for debug purposes\n      window[this.opts.id] = this;\n    }\n    _classPrivateFieldLooseBase(this, _addListeners)[_addListeners]();\n  }\n  emit(event) {\n    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter].emit(event, ...args);\n  }\n  on(event, callback) {\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter].on(event, callback);\n    return this;\n  }\n  once(event, callback) {\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter].once(event, callback);\n    return this;\n  }\n  off(event, callback) {\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter].off(event, callback);\n    return this;\n  }\n\n  /**\n   * Iterate on all plugins and run `update` on them.\n   * Called each time state changes.\n   *\n   */\n  updateAll(state) {\n    this.iteratePlugins(plugin => {\n      plugin.update(state);\n    });\n  }\n\n  /**\n   * Updates state with a patch\n   */\n  setState(patch) {\n    // eslint-disable-next-line\n    // @ts-ignore Store is incorrectly typed\n    this.store.setState(patch);\n  }\n\n  /**\n   * Returns current state.\n   */\n  getState() {\n    // eslint-disable-next-line\n    // @ts-ignore Store is incorrectly typed\n    return this.store.getState();\n  }\n  patchFilesState(filesWithNewState) {\n    const existingFilesState = this.getState().files;\n    this.setState({\n      files: {\n        ...existingFilesState,\n        ...Object.fromEntries(Object.entries(filesWithNewState).map(_ref => {\n          let [fileID, newFileState] = _ref;\n          return [fileID, {\n            ...existingFilesState[fileID],\n            ...newFileState\n          }];\n        }))\n      }\n    });\n  }\n\n  /**\n   * Shorthand to set state for a specific file.\n   */\n  setFileState(fileID, state) {\n    if (!this.getState().files[fileID]) {\n      throw new Error(`Can\u2019t set state for ${fileID} (the file could have been removed)`);\n    }\n    this.patchFilesState({\n      [fileID]: state\n    });\n  }\n  i18nInit() {\n    const onMissingKey = key => this.log(`Missing i18n string: ${key}`, 'error');\n    const translator = new Translator([this.defaultLocale, this.opts.locale], {\n      onMissingKey\n    });\n    this.i18n = translator.translate.bind(translator);\n    this.i18nArray = translator.translateArray.bind(translator);\n    this.locale = translator.locale;\n  }\n  setOptions(newOpts) {\n    this.opts = {\n      ...this.opts,\n      ...newOpts,\n      restrictions: {\n        ...this.opts.restrictions,\n        ...(newOpts == null ? void 0 : newOpts.restrictions)\n      }\n    };\n    if (newOpts.meta) {\n      this.setMeta(newOpts.meta);\n    }\n    this.i18nInit();\n    if (newOpts.locale) {\n      this.iteratePlugins(plugin => {\n        plugin.setOptions(newOpts);\n      });\n    }\n\n    // Note: this is not the preact `setState`, it's an internal function that has the same name.\n    this.setState(undefined); // so that UI re-renders with new options\n  }\n\n  // todo next major: remove\n  resetProgress() {\n    const defaultProgress = {\n      percentage: 0,\n      bytesUploaded: 0,\n      uploadComplete: false,\n      uploadStarted: null\n    };\n    const files = {\n      ...this.getState().files\n    };\n    const updatedFiles = {};\n    Object.keys(files).forEach(fileID => {\n      updatedFiles[fileID] = {\n        ...files[fileID],\n        progress: {\n          ...files[fileID].progress,\n          ...defaultProgress\n        }\n      };\n    });\n    this.setState({\n      files: updatedFiles,\n      ...defaultUploadState\n    });\n    this.emit('reset-progress');\n  }\n\n  // @todo next major: rename to `clear()`, make it also cancel ongoing uploads\n  // or throw and say you need to cancel manually\n  clearUploadedFiles() {\n    const {\n      capabilities,\n      currentUploads\n    } = this.getState();\n    if (Object.keys(currentUploads).length > 0 && !capabilities.individualCancellation) {\n      throw new Error('The installed uploader plugin does not allow removing files during an upload.');\n    }\n    this.setState({\n      ...defaultUploadState,\n      files: {}\n    });\n  }\n  addPreProcessor(fn) {\n    _classPrivateFieldLooseBase(this, _preProcessors)[_preProcessors].add(fn);\n  }\n  removePreProcessor(fn) {\n    return _classPrivateFieldLooseBase(this, _preProcessors)[_preProcessors].delete(fn);\n  }\n  addPostProcessor(fn) {\n    _classPrivateFieldLooseBase(this, _postProcessors)[_postProcessors].add(fn);\n  }\n  removePostProcessor(fn) {\n    return _classPrivateFieldLooseBase(this, _postProcessors)[_postProcessors].delete(fn);\n  }\n  addUploader(fn) {\n    _classPrivateFieldLooseBase(this, _uploaders)[_uploaders].add(fn);\n  }\n  removeUploader(fn) {\n    return _classPrivateFieldLooseBase(this, _uploaders)[_uploaders].delete(fn);\n  }\n  setMeta(data) {\n    const updatedMeta = {\n      ...this.getState().meta,\n      ...data\n    };\n    const updatedFiles = {\n      ...this.getState().files\n    };\n    Object.keys(updatedFiles).forEach(fileID => {\n      updatedFiles[fileID] = {\n        ...updatedFiles[fileID],\n        meta: {\n          ...updatedFiles[fileID].meta,\n          ...data\n        }\n      };\n    });\n    this.log('Adding metadata:');\n    this.log(data);\n    this.setState({\n      meta: updatedMeta,\n      files: updatedFiles\n    });\n  }\n  setFileMeta(fileID, data) {\n    const updatedFiles = {\n      ...this.getState().files\n    };\n    if (!updatedFiles[fileID]) {\n      this.log('Was trying to set metadata for a file that has been removed: ', fileID);\n      return;\n    }\n    const newMeta = {\n      ...updatedFiles[fileID].meta,\n      ...data\n    };\n    updatedFiles[fileID] = {\n      ...updatedFiles[fileID],\n      meta: newMeta\n    };\n    this.setState({\n      files: updatedFiles\n    });\n  }\n\n  /**\n   * Get a file object.\n   */\n  getFile(fileID) {\n    return this.getState().files[fileID];\n  }\n\n  /**\n   * Get all files in an array.\n   */\n  getFiles() {\n    const {\n      files\n    } = this.getState();\n    return Object.values(files);\n  }\n  getFilesByIds(ids) {\n    return ids.map(id => this.getFile(id));\n  }\n  getObjectOfFilesPerState() {\n    const {\n      files: filesObject,\n      totalProgress,\n      error\n    } = this.getState();\n    const files = Object.values(filesObject);\n    const inProgressFiles = [];\n    const newFiles = [];\n    const startedFiles = [];\n    const uploadStartedFiles = [];\n    const pausedFiles = [];\n    const completeFiles = [];\n    const erroredFiles = [];\n    const inProgressNotPausedFiles = [];\n    const processingFiles = [];\n    for (const file of files) {\n      const {\n        progress\n      } = file;\n      if (!progress.uploadComplete && progress.uploadStarted) {\n        inProgressFiles.push(file);\n        if (!file.isPaused) {\n          inProgressNotPausedFiles.push(file);\n        }\n      }\n      if (!progress.uploadStarted) {\n        newFiles.push(file);\n      }\n      if (progress.uploadStarted || progress.preprocess || progress.postprocess) {\n        startedFiles.push(file);\n      }\n      if (progress.uploadStarted) {\n        uploadStartedFiles.push(file);\n      }\n      if (file.isPaused) {\n        pausedFiles.push(file);\n      }\n      if (progress.uploadComplete) {\n        completeFiles.push(file);\n      }\n      if (file.error) {\n        erroredFiles.push(file);\n      }\n      if (progress.preprocess || progress.postprocess) {\n        processingFiles.push(file);\n      }\n    }\n    return {\n      newFiles,\n      startedFiles,\n      uploadStartedFiles,\n      pausedFiles,\n      completeFiles,\n      erroredFiles,\n      inProgressFiles,\n      inProgressNotPausedFiles,\n      processingFiles,\n      isUploadStarted: uploadStartedFiles.length > 0,\n      isAllComplete: totalProgress === 100 && completeFiles.length === files.length && processingFiles.length === 0,\n      isAllErrored: !!error && erroredFiles.length === files.length,\n      isAllPaused: inProgressFiles.length !== 0 && pausedFiles.length === inProgressFiles.length,\n      isUploadInProgress: inProgressFiles.length > 0,\n      isSomeGhost: files.some(file => file.isGhost)\n    };\n  }\n  validateRestrictions(file, files) {\n    if (files === void 0) {\n      files = this.getFiles();\n    }\n    try {\n      _classPrivateFieldLooseBase(this, _restricter)[_restricter].validate(files, [file]);\n    } catch (err) {\n      return err;\n    }\n    return null;\n  }\n  checkIfFileAlreadyExists(fileID) {\n    const {\n      files\n    } = this.getState();\n    if (files[fileID] && !files[fileID].isGhost) {\n      return true;\n    }\n    return false;\n  }\n  /**\n   * Add a new file to `state.files`. This will run `onBeforeFileAdded`,\n   * try to guess file type in a clever way, check file against restrictions,\n   * and start an upload if `autoProceed === true`.\n   */\n  addFile(file) {\n    _classPrivateFieldLooseBase(this, _assertNewUploadAllowed)[_assertNewUploadAllowed](file);\n    const {\n      nextFilesState,\n      validFilesToAdd,\n      errors\n    } = _classPrivateFieldLooseBase(this, _checkAndUpdateFileState)[_checkAndUpdateFileState]([file]);\n    const restrictionErrors = errors.filter(error => error.isRestriction);\n    _classPrivateFieldLooseBase(this, _informAndEmit)[_informAndEmit](restrictionErrors);\n    if (errors.length > 0) throw errors[0];\n    this.setState({\n      files: nextFilesState\n    });\n    const [firstValidFileToAdd] = validFilesToAdd;\n    this.emit('file-added', firstValidFileToAdd);\n    this.emit('files-added', validFilesToAdd);\n    this.log(`Added file: ${firstValidFileToAdd.name}, ${firstValidFileToAdd.id}, mime type: ${firstValidFileToAdd.type}`);\n    _classPrivateFieldLooseBase(this, _startIfAutoProceed)[_startIfAutoProceed]();\n    return firstValidFileToAdd.id;\n  }\n\n  /**\n   * Add multiple files to `state.files`. See the `addFile()` documentation.\n   *\n   * If an error occurs while adding a file, it is logged and the user is notified.\n   * This is good for UI plugins, but not for programmatic use.\n   * Programmatic users should usually still use `addFile()` on individual files.\n   */\n  addFiles(fileDescriptors) {\n    _classPrivateFieldLooseBase(this, _assertNewUploadAllowed)[_assertNewUploadAllowed]();\n    const {\n      nextFilesState,\n      validFilesToAdd,\n      errors\n    } = _classPrivateFieldLooseBase(this, _checkAndUpdateFileState)[_checkAndUpdateFileState](fileDescriptors);\n    const restrictionErrors = errors.filter(error => error.isRestriction);\n    _classPrivateFieldLooseBase(this, _informAndEmit)[_informAndEmit](restrictionErrors);\n    const nonRestrictionErrors = errors.filter(error => !error.isRestriction);\n    if (nonRestrictionErrors.length > 0) {\n      let message = 'Multiple errors occurred while adding files:\\n';\n      nonRestrictionErrors.forEach(subError => {\n        message += `\\n * ${subError.message}`;\n      });\n      this.info({\n        message: this.i18n('addBulkFilesFailed', {\n          smart_count: nonRestrictionErrors.length\n        }),\n        details: message\n      }, 'error', this.opts.infoTimeout);\n      if (typeof AggregateError === 'function') {\n        throw new AggregateError(nonRestrictionErrors, message);\n      } else {\n        const err = new Error(message);\n        // @ts-expect-error fallback when AggregateError is not available\n        err.errors = nonRestrictionErrors;\n        throw err;\n      }\n    }\n\n    // OK, we haven't thrown an error, we can start updating state and emitting events now:\n\n    this.setState({\n      files: nextFilesState\n    });\n    validFilesToAdd.forEach(file => {\n      this.emit('file-added', file);\n    });\n    this.emit('files-added', validFilesToAdd);\n    if (validFilesToAdd.length > 5) {\n      this.log(`Added batch of ${validFilesToAdd.length} files`);\n    } else {\n      Object.values(validFilesToAdd).forEach(file => {\n        this.log(`Added file: ${file.name}\\n id: ${file.id}\\n type: ${file.type}`);\n      });\n    }\n    if (validFilesToAdd.length > 0) {\n      _classPrivateFieldLooseBase(this, _startIfAutoProceed)[_startIfAutoProceed]();\n    }\n  }\n  removeFiles(fileIDs, reason) {\n    const {\n      files,\n      currentUploads\n    } = this.getState();\n    const updatedFiles = {\n      ...files\n    };\n    const updatedUploads = {\n      ...currentUploads\n    };\n    const removedFiles = Object.create(null);\n    fileIDs.forEach(fileID => {\n      if (files[fileID]) {\n        removedFiles[fileID] = files[fileID];\n        delete updatedFiles[fileID];\n      }\n    });\n\n    // Remove files from the `fileIDs` list in each upload.\n    function fileIsNotRemoved(uploadFileID) {\n      return removedFiles[uploadFileID] === undefined;\n    }\n    Object.keys(updatedUploads).forEach(uploadID => {\n      const newFileIDs = currentUploads[uploadID].fileIDs.filter(fileIsNotRemoved);\n\n      // Remove the upload if no files are associated with it anymore.\n      if (newFileIDs.length === 0) {\n        delete updatedUploads[uploadID];\n        return;\n      }\n      const {\n        capabilities\n      } = this.getState();\n      if (newFileIDs.length !== currentUploads[uploadID].fileIDs.length && !capabilities.individualCancellation) {\n        throw new Error('The installed uploader plugin does not allow removing files during an upload.');\n      }\n      updatedUploads[uploadID] = {\n        ...currentUploads[uploadID],\n        fileIDs: newFileIDs\n      };\n    });\n    const stateUpdate = {\n      currentUploads: updatedUploads,\n      files: updatedFiles\n    };\n\n    // If all files were removed - allow new uploads,\n    // and clear recoveredState\n    if (Object.keys(updatedFiles).length === 0) {\n      stateUpdate.allowNewUpload = true;\n      stateUpdate.error = null;\n      stateUpdate.recoveredState = null;\n    }\n    this.setState(stateUpdate);\n    this.calculateTotalProgress();\n    const removedFileIDs = Object.keys(removedFiles);\n    removedFileIDs.forEach(fileID => {\n      this.emit('file-removed', removedFiles[fileID], reason);\n    });\n    if (removedFileIDs.length > 5) {\n      this.log(`Removed ${removedFileIDs.length} files`);\n    } else {\n      this.log(`Removed files: ${removedFileIDs.join(', ')}`);\n    }\n  }\n  removeFile(fileID, reason) {\n    this.removeFiles([fileID], reason);\n  }\n  pauseResume(fileID) {\n    if (!this.getState().capabilities.resumableUploads || this.getFile(fileID).progress.uploadComplete) {\n      return undefined;\n    }\n    const wasPaused = this.getFile(fileID).isPaused || false;\n    const isPaused = !wasPaused;\n    this.setFileState(fileID, {\n      isPaused\n    });\n    this.emit('upload-pause', fileID, isPaused);\n    return isPaused;\n  }\n  pauseAll() {\n    const updatedFiles = {\n      ...this.getState().files\n    };\n    const inProgressUpdatedFiles = Object.keys(updatedFiles).filter(file => {\n      return !updatedFiles[file].progress.uploadComplete && updatedFiles[file].progress.uploadStarted;\n    });\n    inProgressUpdatedFiles.forEach(file => {\n      const updatedFile = {\n        ...updatedFiles[file],\n        isPaused: true\n      };\n      updatedFiles[file] = updatedFile;\n    });\n    this.setState({\n      files: updatedFiles\n    });\n    this.emit('pause-all');\n  }\n  resumeAll() {\n    const updatedFiles = {\n      ...this.getState().files\n    };\n    const inProgressUpdatedFiles = Object.keys(updatedFiles).filter(file => {\n      return !updatedFiles[file].progress.uploadComplete && updatedFiles[file].progress.uploadStarted;\n    });\n    inProgressUpdatedFiles.forEach(file => {\n      const updatedFile = {\n        ...updatedFiles[file],\n        isPaused: false,\n        error: null\n      };\n      updatedFiles[file] = updatedFile;\n    });\n    this.setState({\n      files: updatedFiles\n    });\n    this.emit('resume-all');\n  }\n  retryAll() {\n    const updatedFiles = {\n      ...this.getState().files\n    };\n    const filesToRetry = Object.keys(updatedFiles).filter(file => {\n      return updatedFiles[file].error;\n    });\n    filesToRetry.forEach(file => {\n      const updatedFile = {\n        ...updatedFiles[file],\n        isPaused: false,\n        error: null\n      };\n      updatedFiles[file] = updatedFile;\n    });\n    this.setState({\n      files: updatedFiles,\n      error: null\n    });\n    this.emit('retry-all', filesToRetry);\n    if (filesToRetry.length === 0) {\n      return Promise.resolve({\n        successful: [],\n        failed: []\n      });\n    }\n    const uploadID = _classPrivateFieldLooseBase(this, _createUpload)[_createUpload](filesToRetry, {\n      forceAllowNewUpload: true // create new upload even if allowNewUpload: false\n    });\n    return _classPrivateFieldLooseBase(this, _runUpload)[_runUpload](uploadID);\n  }\n  cancelAll(_temp) {\n    let {\n      reason = 'user'\n    } = _temp === void 0 ? {} : _temp;\n    this.emit('cancel-all', {\n      reason\n    });\n\n    // Only remove existing uploads if user is canceling\n    if (reason === 'user') {\n      const {\n        files\n      } = this.getState();\n      const fileIDs = Object.keys(files);\n      if (fileIDs.length) {\n        this.removeFiles(fileIDs, 'cancel-all');\n      }\n      this.setState(defaultUploadState);\n      // todo should we call this.emit('reset-progress') like we do for resetProgress?\n    }\n  }\n  retryUpload(fileID) {\n    this.setFileState(fileID, {\n      error: null,\n      isPaused: false\n    });\n    this.emit('upload-retry', fileID);\n    const uploadID = _classPrivateFieldLooseBase(this, _createUpload)[_createUpload]([fileID], {\n      forceAllowNewUpload: true // create new upload even if allowNewUpload: false\n    });\n    return _classPrivateFieldLooseBase(this, _runUpload)[_runUpload](uploadID);\n  }\n  logout() {\n    this.iteratePlugins(plugin => {\n      var _provider;\n      ;\n      (_provider = plugin.provider) == null || _provider.logout == null || _provider.logout();\n    });\n  }\n  calculateTotalProgress() {\n    // calculate total progress, using the number of files currently uploading,\n    // multiplied by 100 and the summ of individual progress of each file\n    const files = this.getFiles();\n    const inProgress = files.filter(file => {\n      return file.progress.uploadStarted || file.progress.preprocess || file.progress.postprocess;\n    });\n    if (inProgress.length === 0) {\n      this.emit('progress', 0);\n      this.setState({\n        totalProgress: 0\n      });\n      return;\n    }\n    const sizedFiles = inProgress.filter(file => file.progress.bytesTotal != null);\n    const unsizedFiles = inProgress.filter(file => file.progress.bytesTotal == null);\n    if (sizedFiles.length === 0) {\n      const progressMax = inProgress.length * 100;\n      const currentProgress = unsizedFiles.reduce((acc, file) => {\n        return acc + file.progress.percentage;\n      }, 0);\n      const totalProgress = Math.round(currentProgress / progressMax * 100);\n      this.setState({\n        totalProgress\n      });\n      return;\n    }\n    let totalSize = sizedFiles.reduce((acc, file) => {\n      var _file$progress$bytesT;\n      return acc + ((_file$progress$bytesT = file.progress.bytesTotal) != null ? _file$progress$bytesT : 0);\n    }, 0);\n    const averageSize = totalSize / sizedFiles.length;\n    totalSize += averageSize * unsizedFiles.length;\n    let uploadedSize = 0;\n    sizedFiles.forEach(file => {\n      uploadedSize += file.progress.bytesUploaded;\n    });\n    unsizedFiles.forEach(file => {\n      uploadedSize += averageSize * (file.progress.percentage || 0) / 100;\n    });\n    let totalProgress = totalSize === 0 ? 0 : Math.round(uploadedSize / totalSize * 100);\n\n    // hot fix, because:\n    // uploadedSize ended up larger than totalSize, resulting in 1325% total\n    if (totalProgress > 100) {\n      totalProgress = 100;\n    }\n    this.setState({\n      totalProgress\n    });\n    this.emit('progress', totalProgress);\n  }\n  updateOnlineStatus() {\n    var _window$navigator$onL;\n    const online = (_window$navigator$onL = window.navigator.onLine) != null ? _window$navigator$onL : true;\n    if (!online) {\n      this.emit('is-offline');\n      this.info(this.i18n('noInternetConnection'), 'error', 0);\n      this.wasOffline = true;\n    } else {\n      this.emit('is-online');\n      if (this.wasOffline) {\n        this.emit('back-online');\n        this.info(this.i18n('connectedToInternet'), 'success', 3000);\n        this.wasOffline = false;\n      }\n    }\n  }\n  getID() {\n    return this.opts.id;\n  }\n\n  /**\n   * Registers a plugin with Core.\n   */\n  use(Plugin, opts) {\n    if (typeof Plugin !== 'function') {\n      const msg = `Expected a plugin class, but got ${Plugin === null ? 'null' : typeof Plugin}.` + ' Please verify that the plugin was imported and spelled correctly.';\n      throw new TypeError(msg);\n    }\n\n    // Instantiate\n    const plugin = new Plugin(this, opts);\n    const pluginId = plugin.id;\n    if (!pluginId) {\n      throw new Error('Your plugin must have an id');\n    }\n    if (!plugin.type) {\n      throw new Error('Your plugin must have a type');\n    }\n    const existsPluginAlready = this.getPlugin(pluginId);\n    if (existsPluginAlready) {\n      const msg = `Already found a plugin named '${existsPluginAlready.id}'. ` + `Tried to use: '${pluginId}'.\\n` + 'Uppy plugins must have unique `id` options. See https://uppy.io/docs/plugins/#id.';\n      throw new Error(msg);\n    }\n\n    // @ts-expect-error does exist\n    if (Plugin.VERSION) {\n      // @ts-expect-error does exist\n      this.log(`Using ${pluginId} v${Plugin.VERSION}`);\n    }\n    if (plugin.type in _classPrivateFieldLooseBase(this, _plugins)[_plugins]) {\n      _classPrivateFieldLooseBase(this, _plugins)[_plugins][plugin.type].push(plugin);\n    } else {\n      _classPrivateFieldLooseBase(this, _plugins)[_plugins][plugin.type] = [plugin];\n    }\n    plugin.install();\n    this.emit('plugin-added', plugin);\n    return this;\n  }\n\n  /**\n   * Find one Plugin by name.\n   */\n  getPlugin(id) {\n    for (const plugins of Object.values(_classPrivateFieldLooseBase(this, _plugins)[_plugins])) {\n      const foundPlugin = plugins.find(plugin => plugin.id === id);\n      if (foundPlugin != null) return foundPlugin;\n    }\n    return undefined;\n  }\n  [_Symbol$for](type) {\n    return _classPrivateFieldLooseBase(this, _plugins)[_plugins][type];\n  }\n\n  /**\n   * Iterate through all `use`d plugins.\n   *\n   */\n  iteratePlugins(method) {\n    Object.values(_classPrivateFieldLooseBase(this, _plugins)[_plugins]).flat(1).forEach(method);\n  }\n\n  /**\n   * Uninstall and remove a plugin.\n   *\n   * @param {object} instance The plugin instance to remove.\n   */\n  removePlugin(instance) {\n    this.log(`Removing plugin ${instance.id}`);\n    this.emit('plugin-remove', instance);\n    if (instance.uninstall) {\n      instance.uninstall();\n    }\n    const list = _classPrivateFieldLooseBase(this, _plugins)[_plugins][instance.type];\n    // list.indexOf failed here, because Vue3 converted the plugin instance\n    // to a Proxy object, which failed the strict comparison test:\n    // obj !== objProxy\n    const index = list.findIndex(item => item.id === instance.id);\n    if (index !== -1) {\n      list.splice(index, 1);\n    }\n    const state = this.getState();\n    const updatedState = {\n      plugins: {\n        ...state.plugins,\n        [instance.id]: undefined\n      }\n    };\n    this.setState(updatedState);\n  }\n\n  /**\n   * Uninstall all plugins and close down this Uppy instance.\n   */\n  // @todo next major: rename to `destroy`.\n  // Cancel local uploads, cancel remote uploads, DON'T cancel assemblies\n  // document that if you do want to cancel assemblies, you need to call smth manually.\n  // Potentially remove reason, as it\u2019s confusing, just come up with a default behaviour.\n  close(_temp2) {\n    let {\n      reason\n    } = _temp2 === void 0 ? {} : _temp2;\n    this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`);\n    this.cancelAll({\n      reason\n    });\n    _classPrivateFieldLooseBase(this, _storeUnsubscribe)[_storeUnsubscribe]();\n    this.iteratePlugins(plugin => {\n      this.removePlugin(plugin);\n    });\n    if (typeof window !== 'undefined' && window.removeEventListener) {\n      window.removeEventListener('online', _classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus]);\n      window.removeEventListener('offline', _classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus]);\n    }\n  }\n  hideInfo() {\n    const {\n      info\n    } = this.getState();\n    this.setState({\n      info: info.slice(1)\n    });\n    this.emit('info-hidden');\n  }\n\n  /**\n   * Set info message in `state.info`, so that UI plugins like `Informer`\n   * can display the message.\n   */\n  info(message, type, duration) {\n    if (type === void 0) {\n      type = 'info';\n    }\n    if (duration === void 0) {\n      duration = 3000;\n    }\n    const isComplexMessage = typeof message === 'object';\n    this.setState({\n      info: [...this.getState().info, {\n        type,\n        message: isComplexMessage ? message.message : message,\n        details: isComplexMessage ? message.details : null\n      }]\n    });\n    setTimeout(() => this.hideInfo(), duration);\n    this.emit('info-visible');\n  }\n\n  /**\n   * Passes messages to a function, provided in `opts.logger`.\n   * If `opts.logger: Uppy.debugLogger` or `opts.debug: true`, logs to the browser console.\n   */\n  log(message, type) {\n    const {\n      logger\n    } = this.opts;\n    switch (type) {\n      case 'error':\n        logger.error(message);\n        break;\n      case 'warning':\n        logger.warn(message);\n        break;\n      default:\n        logger.debug(message);\n        break;\n    }\n  }\n  registerRequestClient(id, client) {\n    _classPrivateFieldLooseBase(this, _requestClientById)[_requestClientById].set(id, client);\n  }\n\n  /** @protected */\n  getRequestClientForFile(file) {\n    if (!file.remote) throw new Error(`Tried to get RequestClient for a non-remote file ${file.id}`);\n    const requestClient = _classPrivateFieldLooseBase(this, _requestClientById)[_requestClientById].get(file.remote.requestClientId);\n    if (requestClient == null) throw new Error(`requestClientId \"${file.remote.requestClientId}\" not registered for file \"${file.id}\"`);\n    return requestClient;\n  }\n\n  /**\n   * Restore an upload by its ID.\n   */\n  restore(uploadID) {\n    this.log(`Core: attempting to restore upload \"${uploadID}\"`);\n    if (!this.getState().currentUploads[uploadID]) {\n      _classPrivateFieldLooseBase(this, _removeUpload)[_removeUpload](uploadID);\n      return Promise.reject(new Error('Nonexistent upload'));\n    }\n    return _classPrivateFieldLooseBase(this, _runUpload)[_runUpload](uploadID);\n  }\n  [_Symbol$for2]() {\n    // @ts-expect-error https://github.com/microsoft/TypeScript/issues/47595\n    return _classPrivateFieldLooseBase(this, _createUpload)[_createUpload](...arguments);\n  }\n  /**\n   * Add data to an upload's result object.\n   */\n  addResultData(uploadID, data) {\n    if (!_classPrivateFieldLooseBase(this, _getUpload)[_getUpload](uploadID)) {\n      this.log(`Not setting result for an upload that has been removed: ${uploadID}`);\n      return;\n    }\n    const {\n      currentUploads\n    } = this.getState();\n    const currentUpload = {\n      ...currentUploads[uploadID],\n      result: {\n        ...currentUploads[uploadID].result,\n        ...data\n      }\n    };\n    this.setState({\n      currentUploads: {\n        ...currentUploads,\n        [uploadID]: currentUpload\n      }\n    });\n  }\n  /**\n   * Start an upload for all the files that are not currently being uploaded.\n   */\n  upload() {\n    var _classPrivateFieldLoo;\n    if (!((_classPrivateFieldLoo = _classPrivateFieldLooseBase(this, _plugins)[_plugins]['uploader']) != null && _classPrivateFieldLoo.length)) {\n      this.log('No uploader type plugins are used', 'warning');\n    }\n    let {\n      files\n    } = this.getState();\n    const onBeforeUploadResult = this.opts.onBeforeUpload(files);\n    if (onBeforeUploadResult === false) {\n      return Promise.reject(new Error('Not starting the upload because onBeforeUpload returned false'));\n    }\n    if (onBeforeUploadResult && typeof onBeforeUploadResult === 'object') {\n      files = onBeforeUploadResult;\n      // Updating files in state, because uploader plugins receive file IDs,\n      // and then fetch the actual file object from state\n      this.setState({\n        files\n      });\n    }\n    return Promise.resolve().then(() => _classPrivateFieldLooseBase(this, _restricter)[_restricter].validateMinNumberOfFiles(files)).catch(err => {\n      _classPrivateFieldLooseBase(this, _informAndEmit)[_informAndEmit]([err]);\n      throw err;\n    }).then(() => {\n      if (!_classPrivateFieldLooseBase(this, _checkRequiredMetaFields)[_checkRequiredMetaFields](files)) {\n        throw new RestrictionError(this.i18n('missingRequiredMetaField'));\n      }\n    }).catch(err => {\n      // Doing this in a separate catch because we already emited and logged\n      // all the errors in `checkRequiredMetaFields` so we only throw a generic\n      // missing fields error here.\n      throw err;\n    }).then(() => {\n      const {\n        currentUploads\n      } = this.getState();\n      // get a list of files that are currently assigned to uploads\n      const currentlyUploadingFiles = Object.values(currentUploads).flatMap(curr => curr.fileIDs);\n      const waitingFileIDs = [];\n      Object.keys(files).forEach(fileID => {\n        const file = this.getFile(fileID);\n        // if the file hasn't started uploading and hasn't already been assigned to an upload..\n        if (!file.progress.uploadStarted && currentlyUploadingFiles.indexOf(fileID) === -1) {\n          waitingFileIDs.push(file.id);\n        }\n      });\n      const uploadID = _classPrivateFieldLooseBase(this, _createUpload)[_createUpload](waitingFileIDs);\n      return _classPrivateFieldLooseBase(this, _runUpload)[_runUpload](uploadID);\n    }).catch(err => {\n      this.emit('error', err);\n      this.log(err, 'error');\n      throw err;\n    });\n  }\n}\nfunction _informAndEmit2(errors) {\n  for (const error of errors) {\n    if (error.isRestriction) {\n      this.emit('restriction-failed', error.file, error);\n    } else {\n      this.emit('error', error, error.file);\n    }\n    this.log(error, 'warning');\n  }\n  const userFacingErrors = errors.filter(error => error.isUserFacing);\n\n  // don't flood the user: only show the first 4 toasts\n  const maxNumToShow = 4;\n  const firstErrors = userFacingErrors.slice(0, maxNumToShow);\n  const additionalErrors = userFacingErrors.slice(maxNumToShow);\n  firstErrors.forEach(_ref2 => {\n    let {\n      message,\n      details = ''\n    } = _ref2;\n    this.info({\n      message,\n      details\n    }, 'error', this.opts.infoTimeout);\n  });\n  if (additionalErrors.length > 0) {\n    this.info({\n      message: this.i18n('additionalRestrictionsFailed', {\n        count: additionalErrors.length\n      })\n    });\n  }\n}\nfunction _checkRequiredMetaFieldsOnFile2(file) {\n  const {\n    missingFields,\n    error\n  } = _classPrivateFieldLooseBase(this, _restricter)[_restricter].getMissingRequiredMetaFields(file);\n  if (missingFields.length > 0) {\n    this.setFileState(file.id, {\n      missingRequiredMetaFields: missingFields\n    });\n    this.log(error.message);\n    this.emit('restriction-failed', file, error);\n    return false;\n  }\n  return true;\n}\nfunction _checkRequiredMetaFields2(files) {\n  let success = true;\n  for (const file of Object.values(files)) {\n    if (!_classPrivateFieldLooseBase(this, _checkRequiredMetaFieldsOnFile)[_checkRequiredMetaFieldsOnFile](file)) {\n      success = false;\n    }\n  }\n  return success;\n}\nfunction _assertNewUploadAllowed2(file) {\n  const {\n    allowNewUpload\n  } = this.getState();\n  if (allowNewUpload === false) {\n    const error = new RestrictionError(this.i18n('noMoreFilesAllowed'), {\n      file\n    });\n    _classPrivateFieldLooseBase(this, _informAndEmit)[_informAndEmit]([error]);\n    throw error;\n  }\n}\nfunction _transformFile2(fileDescriptorOrFile) {\n  // Uppy expects files in { name, type, size, data } format.\n  // If the actual File object is passed from input[type=file] or drag-drop,\n  // we normalize it to match Uppy file object\n  const file = fileDescriptorOrFile instanceof File ? {\n    name: fileDescriptorOrFile.name,\n    type: fileDescriptorOrFile.type,\n    size: fileDescriptorOrFile.size,\n    data: fileDescriptorOrFile\n  } : fileDescriptorOrFile;\n  const fileType = getFileType(file);\n  const fileName = getFileName(fileType, file);\n  const fileExtension = getFileNameAndExtension(fileName).extension;\n  const id = getSafeFileId(file, this.getID());\n  const meta = file.meta || {};\n  meta.name = fileName;\n  meta.type = fileType;\n\n  // `null` means the size is unknown.\n  const size = Number.isFinite(file.data.size) ? file.data.size : null;\n  return {\n    source: file.source || '',\n    id,\n    name: fileName,\n    extension: fileExtension || '',\n    meta: {\n      ...this.getState().meta,\n      ...meta\n    },\n    type: fileType,\n    data: file.data,\n    progress: {\n      percentage: 0,\n      bytesUploaded: 0,\n      bytesTotal: size,\n      uploadComplete: false,\n      uploadStarted: null\n    },\n    size,\n    isGhost: false,\n    isRemote: file.isRemote || false,\n    // TODO: this should not be a string\n    // @ts-expect-error wrong\n    remote: file.remote || '',\n    preview: file.preview\n  };\n}\nfunction _startIfAutoProceed2() {\n  if (this.opts.autoProceed && !this.scheduledAutoProceed) {\n    this.scheduledAutoProceed = setTimeout(() => {\n      this.scheduledAutoProceed = null;\n      this.upload().catch(err => {\n        if (!err.isRestriction) {\n          this.log(err.stack || err.message || err);\n        }\n      });\n    }, 4);\n  }\n}\nfunction _checkAndUpdateFileState2(filesToAdd) {\n  const {\n    files: existingFiles\n  } = this.getState();\n\n  // create a copy of the files object only once\n  const nextFilesState = {\n    ...existingFiles\n  };\n  const validFilesToAdd = [];\n  const errors = [];\n  for (const fileToAdd of filesToAdd) {\n    try {\n      var _existingFiles$newFil;\n      let newFile = _classPrivateFieldLooseBase(this, _transformFile)[_transformFile](fileToAdd);\n\n      // If a file has been recovered (Golden Retriever), but we were unable to recover its data (probably too large),\n      // users are asked to re-select these half-recovered files and then this method will be called again.\n      // In order to keep the progress, meta and everything else, we keep the existing file,\n      // but we replace `data`, and we remove `isGhost`, because the file is no longer a ghost now\n      const isGhost = (_existingFiles$newFil = existingFiles[newFile.id]) == null ? void 0 : _existingFiles$newFil.isGhost;\n      if (isGhost) {\n        const existingFileState = existingFiles[newFile.id];\n        newFile = {\n          ...existingFileState,\n          isGhost: false,\n          data: fileToAdd.data\n        };\n        this.log(`Replaced the blob in the restored ghost file: ${newFile.name}, ${newFile.id}`);\n      }\n      const onBeforeFileAddedResult = this.opts.onBeforeFileAdded(newFile, nextFilesState);\n      if (!onBeforeFileAddedResult && this.checkIfFileAlreadyExists(newFile.id)) {\n        throw new RestrictionError(this.i18n('noDuplicates', {\n          fileName: newFile.name\n        }), {\n          file: fileToAdd\n        });\n      }\n\n      // Pass through reselected files from Golden Retriever\n      if (onBeforeFileAddedResult === false && !isGhost) {\n        // Don\u2019t show UI info for this error, as it should be done by the developer\n        throw new RestrictionError('Cannot add the file because onBeforeFileAdded returned false.', {\n          isUserFacing: false,\n          file: fileToAdd\n        });\n      } else if (typeof onBeforeFileAddedResult === 'object' && onBeforeFileAddedResult !== null) {\n        newFile = onBeforeFileAddedResult;\n      }\n      _classPrivateFieldLooseBase(this, _restricter)[_restricter].validateSingleFile(newFile);\n\n      // need to add it to the new local state immediately, so we can use the state to validate the next files too\n      nextFilesState[newFile.id] = newFile;\n      validFilesToAdd.push(newFile);\n    } catch (err) {\n      errors.push(err);\n    }\n  }\n  try {\n    // need to run this separately because it's much more slow, so if we run it inside the for-loop it will be very slow\n    // when many files are added\n    _classPrivateFieldLooseBase(this, _restricter)[_restricter].validateAggregateRestrictions(Object.values(existingFiles), validFilesToAdd);\n  } catch (err) {\n    errors.push(err);\n\n    // If we have any aggregate error, don't allow adding this batch\n    return {\n      nextFilesState: existingFiles,\n      validFilesToAdd: [],\n      errors\n    };\n  }\n  return {\n    nextFilesState,\n    validFilesToAdd,\n    errors\n  };\n}\nfunction _addListeners2() {\n  // Type inference only works for inline functions so we have to type it again\n  const errorHandler = (error, file, response) => {\n    let errorMsg = error.message || 'Unknown error';\n    if (error.details) {\n      errorMsg += ` ${error.details}`;\n    }\n    this.setState({\n      error: errorMsg\n    });\n    if (file != null && file.id in this.getState().files) {\n      this.setFileState(file.id, {\n        error: errorMsg,\n        response\n      });\n    }\n  };\n  this.on('error', errorHandler);\n  this.on('upload-error', (file, error, response) => {\n    errorHandler(error, file, response);\n    if (typeof error === 'object' && error.message) {\n      var _file$name;\n      this.log(error.message, 'error');\n      const newError = new Error(this.i18n('failedToUpload', {\n        file: (_file$name = file == null ? void 0 : file.name) != null ? _file$name : ''\n      })); // we may want a new custom error here\n      newError.isUserFacing = true; // todo maybe don't do this with all errors?\n      newError.details = error.message;\n      if (error.details) {\n        newError.details += ` ${error.details}`;\n      }\n      _classPrivateFieldLooseBase(this, _informAndEmit)[_informAndEmit]([newError]);\n    } else {\n      _classPrivateFieldLooseBase(this, _informAndEmit)[_informAndEmit]([error]);\n    }\n  });\n  let uploadStalledWarningRecentlyEmitted = null;\n  this.on('upload-stalled', (error, files) => {\n    const {\n      message\n    } = error;\n    const details = files.map(file => file.meta.name).join(', ');\n    if (!uploadStalledWarningRecentlyEmitted) {\n      this.info({\n        message,\n        details\n      }, 'warning', this.opts.infoTimeout);\n      uploadStalledWarningRecentlyEmitted = setTimeout(() => {\n        uploadStalledWarningRecentlyEmitted = null;\n      }, this.opts.infoTimeout);\n    }\n    this.log(`${message} ${details}`.trim(), 'warning');\n  });\n  this.on('upload', () => {\n    this.setState({\n      error: null\n    });\n  });\n  const onUploadStarted = files => {\n    const filesFiltered = files.filter(file => {\n      const exists = file != null && this.getFile(file.id);\n      if (!exists) this.log(`Not setting progress for a file that has been removed: ${file == null ? void 0 : file.id}`);\n      return exists;\n    });\n    const filesState = Object.fromEntries(filesFiltered.map(file => [file.id, {\n      progress: {\n        uploadStarted: Date.now(),\n        uploadComplete: false,\n        percentage: 0,\n        bytesUploaded: 0,\n        bytesTotal: file.size\n      }\n    }]));\n    this.patchFilesState(filesState);\n  };\n  this.on('upload-start', files => {\n    files.forEach(file => {\n      // todo backward compat, remove this event in a next major\n      this.emit('upload-started', file);\n    });\n    onUploadStarted(files);\n  });\n  this.on('upload-progress', this.calculateProgress);\n  this.on('upload-success', (file, uploadResp) => {\n    if (file == null || !this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file == null ? void 0 : file.id}`);\n      return;\n    }\n    const currentProgress = this.getFile(file.id).progress;\n    this.setFileState(file.id, {\n      progress: {\n        ...currentProgress,\n        postprocess: _classPrivateFieldLooseBase(this, _postProcessors)[_postProcessors].size > 0 ? {\n          mode: 'indeterminate'\n        } : undefined,\n        uploadComplete: true,\n        percentage: 100,\n        bytesUploaded: currentProgress.bytesTotal\n      },\n      response: uploadResp,\n      uploadURL: uploadResp.uploadURL,\n      isPaused: false\n    });\n\n    // Remote providers sometimes don't tell us the file size,\n    // but we can know how many bytes we uploaded once the upload is complete.\n    if (file.size == null) {\n      this.setFileState(file.id, {\n        size: uploadResp.bytesUploaded || currentProgress.bytesTotal\n      });\n    }\n    this.calculateTotalProgress();\n  });\n  this.on('preprocess-progress', (file, progress) => {\n    if (file == null || !this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file == null ? void 0 : file.id}`);\n      return;\n    }\n    this.setFileState(file.id, {\n      progress: {\n        ...this.getFile(file.id).progress,\n        preprocess: progress\n      }\n    });\n  });\n  this.on('preprocess-complete', file => {\n    if (file == null || !this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file == null ? void 0 : file.id}`);\n      return;\n    }\n    const files = {\n      ...this.getState().files\n    };\n    files[file.id] = {\n      ...files[file.id],\n      progress: {\n        ...files[file.id].progress\n      }\n    };\n    delete files[file.id].progress.preprocess;\n    this.setState({\n      files\n    });\n  });\n  this.on('postprocess-progress', (file, progress) => {\n    if (file == null || !this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file == null ? void 0 : file.id}`);\n      return;\n    }\n    this.setFileState(file.id, {\n      progress: {\n        ...this.getState().files[file.id].progress,\n        postprocess: progress\n      }\n    });\n  });\n  this.on('postprocess-complete', file => {\n    if (file == null || !this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file == null ? void 0 : file.id}`);\n      return;\n    }\n    const files = {\n      ...this.getState().files\n    };\n    files[file.id] = {\n      ...files[file.id],\n      progress: {\n        ...files[file.id].progress\n      }\n    };\n    delete files[file.id].progress.postprocess;\n    this.setState({\n      files\n    });\n  });\n  this.on('restored', () => {\n    // Files may have changed--ensure progress is still accurate.\n    this.calculateTotalProgress();\n  });\n\n  // @ts-expect-error should fix itself when dashboard it typed (also this doesn't belong here)\n  this.on('dashboard:file-edit-complete', file => {\n    if (file) {\n      _classPrivateFieldLooseBase(this, _checkRequiredMetaFieldsOnFile)[_checkRequiredMetaFieldsOnFile](file);\n    }\n  });\n\n  // show informer if offline\n  if (typeof window !== 'undefined' && window.addEventListener) {\n    window.addEventListener('online', _classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus]);\n    window.addEventListener('offline', _classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus]);\n    setTimeout(_classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus], 3000);\n  }\n}\nfunction _createUpload2(fileIDs, opts) {\n  if (opts === void 0) {\n    opts = {};\n  }\n  // uppy.retryAll sets this to true \u2014 when retrying we want to ignore `allowNewUpload: false`\n  const {\n    forceAllowNewUpload = false\n  } = opts;\n  const {\n    allowNewUpload,\n    currentUploads\n  } = this.getState();\n  if (!allowNewUpload && !forceAllowNewUpload) {\n    throw new Error('Cannot create a new upload: already uploading.');\n  }\n  const uploadID = nanoid();\n  this.emit('upload', {\n    id: uploadID,\n    fileIDs\n  });\n  this.setState({\n    allowNewUpload: this.opts.allowMultipleUploadBatches !== false && this.opts.allowMultipleUploads !== false,\n    currentUploads: {\n      ...currentUploads,\n      [uploadID]: {\n        fileIDs,\n        step: 0,\n        result: {}\n      }\n    }\n  });\n  return uploadID;\n}\nfunction _getUpload2(uploadID) {\n  const {\n    currentUploads\n  } = this.getState();\n  return currentUploads[uploadID];\n}\nfunction _removeUpload2(uploadID) {\n  const currentUploads = {\n    ...this.getState().currentUploads\n  };\n  delete currentUploads[uploadID];\n  this.setState({\n    currentUploads\n  });\n}\nasync function _runUpload2(uploadID) {\n  const getCurrentUpload = () => {\n    const {\n      currentUploads\n    } = this.getState();\n    return currentUploads[uploadID];\n  };\n  let currentUpload = getCurrentUpload();\n  const steps = [..._classPrivateFieldLooseBase(this, _preProcessors)[_preProcessors], ..._classPrivateFieldLooseBase(this, _uploaders)[_uploaders], ..._classPrivateFieldLooseBase(this, _postProcessors)[_postProcessors]];\n  try {\n    for (let step = currentUpload.step || 0; step < steps.length; step++) {\n      if (!currentUpload) {\n        break;\n      }\n      const fn = steps[step];\n      this.setState({\n        currentUploads: {\n          ...this.getState().currentUploads,\n          [uploadID]: {\n            ...currentUpload,\n            step\n          }\n        }\n      });\n      const {\n        fileIDs\n      } = currentUpload;\n\n      // TODO give this the `updatedUpload` object as its only parameter maybe?\n      // Otherwise when more metadata may be added to the upload this would keep getting more parameters\n      await fn(fileIDs, uploadID);\n\n      // Update currentUpload value in case it was modified asynchronously.\n      currentUpload = getCurrentUpload();\n    }\n  } catch (err) {\n    _classPrivateFieldLooseBase(this, _removeUpload)[_removeUpload](uploadID);\n    throw err;\n  }\n\n  // Set result data.\n  if (currentUpload) {\n    // Mark postprocessing step as complete if necessary; this addresses a case where we might get\n    // stuck in the postprocessing UI while the upload is fully complete.\n    // If the postprocessing steps do not do any work, they may not emit postprocessing events at\n    // all, and never mark the postprocessing as complete. This is fine on its own but we\n    // introduced code in the @uppy/core upload-success handler to prepare postprocessing progress\n    // state if any postprocessors are registered. That is to avoid a \"flash of completed state\"\n    // before the postprocessing plugins can emit events.\n    //\n    // So, just in case an upload with postprocessing plugins *has* completed *without* emitting\n    // postprocessing completion, we do it instead.\n    currentUpload.fileIDs.forEach(fileID => {\n      const file = this.getFile(fileID);\n      if (file && file.progress.postprocess) {\n        this.emit('postprocess-complete', file);\n      }\n    });\n    const files = currentUpload.fileIDs.map(fileID => this.getFile(fileID));\n    const successful = files.filter(file => !file.error);\n    const failed = files.filter(file => file.error);\n    this.addResultData(uploadID, {\n      successful,\n      failed,\n      uploadID\n    });\n\n    // Update currentUpload value in case it was modified asynchronously.\n    currentUpload = getCurrentUpload();\n  }\n  // Emit completion events.\n  // This is in a separate function so that the `currentUploads` variable\n  // always refers to the latest state. In the handler right above it refers\n  // to an outdated object without the `.result` property.\n  let result;\n  if (currentUpload) {\n    result = currentUpload.result;\n    this.emit('complete', result);\n    _classPrivateFieldLooseBase(this, _removeUpload)[_removeUpload](uploadID);\n  }\n  if (result == null) {\n    this.log(`Not setting result for an upload that has been removed: ${uploadID}`);\n  }\n  return result;\n}\nUppy.VERSION = packageJson.version;\nexport default Uppy;", "let urlAlphabet =\n  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\nexport let customAlphabet = (alphabet, defaultSize = 21) => {\n  return (size = defaultSize) => {\n    let id = ''\n    let i = size\n    while (i--) {\n      id += alphabet[(Math.random() * alphabet.length) | 0]\n    }\n    return id\n  }\n}\nexport let nanoid = (size = 21) => {\n  let id = ''\n  let i = size\n  while (i--) {\n    id += urlAlphabet[(Math.random() * 64) | 0]\n  }\n  return id\n}\n", "function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\nvar id = 0;\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore We don't want TS to generate types for the package.json\nconst packageJson = {\n  \"version\": \"3.2.2\"\n};\nvar _callbacks = /*#__PURE__*/_classPrivateFieldLooseKey(\"callbacks\");\nvar _publish = /*#__PURE__*/_classPrivateFieldLooseKey(\"publish\");\n/**\n * Default store that keeps state in a simple object.\n */\nclass DefaultStore {\n  constructor() {\n    Object.defineProperty(this, _publish, {\n      value: _publish2\n    });\n    this.state = {};\n    Object.defineProperty(this, _callbacks, {\n      writable: true,\n      value: new Set()\n    });\n  }\n  getState() {\n    return this.state;\n  }\n  setState(patch) {\n    const prevState = {\n      ...this.state\n    };\n    const nextState = {\n      ...this.state,\n      ...patch\n    };\n    this.state = nextState;\n    _classPrivateFieldLooseBase(this, _publish)[_publish](prevState, nextState, patch);\n  }\n  subscribe(listener) {\n    _classPrivateFieldLooseBase(this, _callbacks)[_callbacks].add(listener);\n    return () => {\n      _classPrivateFieldLooseBase(this, _callbacks)[_callbacks].delete(listener);\n    };\n  }\n}\nfunction _publish2() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n  _classPrivateFieldLooseBase(this, _callbacks)[_callbacks].forEach(listener => {\n    listener(...args);\n  });\n}\nDefaultStore.VERSION = packageJson.version;\nexport default DefaultStore;", "/**\n * Takes a full filename string and returns an object {name, extension}\n */\nexport default function getFileNameAndExtension(fullFileName) {\n  const lastDot = fullFileName.lastIndexOf('.');\n  // these count as no extension: \"no-dot\", \"trailing-dot.\"\n  if (lastDot === -1 || lastDot === fullFileName.length - 1) {\n    return {\n      name: fullFileName,\n      extension: undefined\n    };\n  }\n  return {\n    name: fullFileName.slice(0, lastDot),\n    extension: fullFileName.slice(lastDot + 1)\n  };\n}", "// ___Why not add the mime-types package?\n//    It's 19.7kB gzipped, and we only need mime types for well-known extensions (for file previews).\n// ___Where to take new extensions from?\n//    https://github.com/jshttp/mime-db/blob/master/db.json\n\nexport default {\n  __proto__: null,\n  md: 'text/markdown',\n  markdown: 'text/markdown',\n  mp4: 'video/mp4',\n  mp3: 'audio/mp3',\n  svg: 'image/svg+xml',\n  jpg: 'image/jpeg',\n  png: 'image/png',\n  webp: 'image/webp',\n  gif: 'image/gif',\n  heic: 'image/heic',\n  heif: 'image/heif',\n  yaml: 'text/yaml',\n  yml: 'text/yaml',\n  csv: 'text/csv',\n  tsv: 'text/tab-separated-values',\n  tab: 'text/tab-separated-values',\n  avi: 'video/x-msvideo',\n  mks: 'video/x-matroska',\n  mkv: 'video/x-matroska',\n  mov: 'video/quicktime',\n  dicom: 'application/dicom',\n  doc: 'application/msword',\n  docm: 'application/vnd.ms-word.document.macroenabled.12',\n  docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n  dot: 'application/msword',\n  dotm: 'application/vnd.ms-word.template.macroenabled.12',\n  dotx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',\n  xla: 'application/vnd.ms-excel',\n  xlam: 'application/vnd.ms-excel.addin.macroenabled.12',\n  xlc: 'application/vnd.ms-excel',\n  xlf: 'application/x-xliff+xml',\n  xlm: 'application/vnd.ms-excel',\n  xls: 'application/vnd.ms-excel',\n  xlsb: 'application/vnd.ms-excel.sheet.binary.macroenabled.12',\n  xlsm: 'application/vnd.ms-excel.sheet.macroenabled.12',\n  xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n  xlt: 'application/vnd.ms-excel',\n  xltm: 'application/vnd.ms-excel.template.macroenabled.12',\n  xltx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',\n  xlw: 'application/vnd.ms-excel',\n  txt: 'text/plain',\n  text: 'text/plain',\n  conf: 'text/plain',\n  log: 'text/plain',\n  pdf: 'application/pdf',\n  zip: 'application/zip',\n  '7z': 'application/x-7z-compressed',\n  rar: 'application/x-rar-compressed',\n  tar: 'application/x-tar',\n  gz: 'application/gzip',\n  dmg: 'application/x-apple-diskimage'\n};", "import getFileNameAndExtension from \"./getFileNameAndExtension.js\";\nimport mimeTypes from \"./mimeTypes.js\";\nexport default function getFileType(file) {\n  var _getFileNameAndExtens;\n  if (file.type) return file.type;\n  const fileExtension = file.name ? (_getFileNameAndExtens = getFileNameAndExtension(file.name).extension) == null ? void 0 : _getFileNameAndExtens.toLowerCase() : null;\n  if (fileExtension && fileExtension in mimeTypes) {\n    // else, see if we can map extension to a mime type\n    return mimeTypes[fileExtension];\n  }\n  // if all fails, fall back to a generic byte stream type\n  return 'application/octet-stream';\n}", "import getFileType from \"./getFileType.js\";\nfunction encodeCharacter(character) {\n  return character.charCodeAt(0).toString(32);\n}\nfunction encodeFilename(name) {\n  let suffix = '';\n  return name.replace(/[^A-Z0-9]/gi, character => {\n    suffix += `-${encodeCharacter(character)}`;\n    return '/';\n  }) + suffix;\n}\n\n/**\n * Takes a file object and turns it into fileID, by converting file.name to lowercase,\n * removing extra characters and adding type, size and lastModified\n */\nexport default function generateFileID(file, instanceId) {\n  // It's tempting to do `[items].filter(Boolean).join('-')` here, but that\n  // is slower! simple string concatenation is fast\n\n  let id = instanceId || 'uppy';\n  if (typeof file.name === 'string') {\n    id += `-${encodeFilename(file.name.toLowerCase())}`;\n  }\n  if (file.type !== undefined) {\n    id += `-${file.type}`;\n  }\n  if (file.meta && typeof file.meta.relativePath === 'string') {\n    id += `-${encodeFilename(file.meta.relativePath.toLowerCase())}`;\n  }\n  if (file.data.size !== undefined) {\n    id += `-${file.data.size}`;\n  }\n  if (file.data.lastModified !== undefined) {\n    id += `-${file.data.lastModified}`;\n  }\n  return id;\n}\n\n// If the provider has a stable, unique ID, then we can use that to identify the file.\n// Then we don't have to generate our own ID, and we can add the same file many times if needed (different path)\nfunction hasFileStableId(file) {\n  if (!file.isRemote || !file.remote) return false;\n  // These are the providers that it seems like have stable IDs for their files. The other's I haven't checked yet.\n  const stableIdProviders = new Set(['box', 'dropbox', 'drive', 'facebook', 'unsplash']);\n  return stableIdProviders.has(file.remote.provider);\n}\nexport function getSafeFileId(file, instanceId) {\n  if (hasFileStableId(file)) return file.id;\n  const fileType = getFileType(file);\n  return generateFileID({\n    ...file,\n    type: fileType\n  }, instanceId);\n}", "// Edge 15.x does not fire 'progress' events on uploads.\n// See https://github.com/transloadit/uppy/issues/945\n// And https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12224510/\nexport default function supportsUploadProgress(userAgent) {\n  // Allow passing in userAgent for tests\n  if (userAgent == null && typeof navigator !== 'undefined') {\n    // eslint-disable-next-line no-param-reassign\n    userAgent = navigator.userAgent;\n  }\n  // Assume it works because basically everything supports progress events.\n  if (!userAgent) return true;\n  const m = /Edge\\/(\\d+\\.\\d+)/.exec(userAgent);\n  if (!m) return true;\n  const edgeVersion = m[1];\n  const version = edgeVersion.split('.', 2);\n  const major = parseInt(version[0], 10);\n  const minor = parseInt(version[1], 10);\n\n  // Worked before:\n  // Edge 40.15063.0.0\n  // Microsoft EdgeHTML 15.15063\n  if (major < 15 || major === 15 && minor < 15063) {\n    return true;\n  }\n\n  // Fixed in:\n  // Microsoft EdgeHTML 18.18218\n  if (major > 18 || major === 18 && minor >= 18218) {\n    return true;\n  }\n\n  // other versions don't work.\n  return false;\n}", "export default function getFileName(fileType, fileDescriptor) {\n  if (fileDescriptor.name) {\n    return fileDescriptor.name;\n  }\n  if (fileType.split('/')[0] === 'image') {\n    return `${fileType.split('/')[0]}.${fileType.split('/')[1]}`;\n  }\n  return 'noname';\n}", "/**\n * Adds zero to strings shorter than two characters.\n */\nfunction pad(number) {\n  return number < 10 ? `0${number}` : number.toString();\n}\n\n/**\n * Returns a timestamp in the format of `hours:minutes:seconds`\n */\nexport default function getTimeStamp() {\n  const date = new Date();\n  const hours = pad(date.getHours());\n  const minutes = pad(date.getMinutes());\n  const seconds = pad(date.getSeconds());\n  return `${hours}:${minutes}:${seconds}`;\n}", "/* eslint-disable no-console */\nimport getTimeStamp from '@uppy/utils/lib/getTimeStamp';\n\n// Swallow all logs, except errors.\n// default if logger is not set or debug: false\nconst justErrorsLogger = {\n  debug: () => {},\n  warn: () => {},\n  error: function () {\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n    return console.error(`[Uppy] [${getTimeStamp()}]`, ...args);\n  }\n};\n\n// Print logs to console with namespace + timestamp,\n// set by logger: Uppy.debugLogger or debug: true\nconst debugLogger = {\n  debug: function () {\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n    return console.debug(`[Uppy] [${getTimeStamp()}]`, ...args);\n  },\n  warn: function () {\n    for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n      args[_key3] = arguments[_key3];\n    }\n    return console.warn(`[Uppy] [${getTimeStamp()}]`, ...args);\n  },\n  error: function () {\n    for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n      args[_key4] = arguments[_key4];\n    }\n    return console.error(`[Uppy] [${getTimeStamp()}]`, ...args);\n  }\n};\nexport { justErrorsLogger, debugLogger };", "/* eslint-disable @typescript-eslint/ban-ts-comment */\n/* eslint-disable max-classes-per-file, class-methods-use-this */\nimport prettierBytes from '@transloadit/prettier-bytes';\n// @ts-ignore untyped\nimport match from 'mime-match';\n\n/**\n * The minimal required properties to be present from UppyFile in order to validate it.\n */\n\nconst defaultOptions = {\n  maxFileSize: null,\n  minFileSize: null,\n  maxTotalFileSize: null,\n  maxNumberOfFiles: null,\n  minNumberOfFiles: null,\n  allowedFileTypes: null,\n  requiredMetaFields: []\n};\nclass RestrictionError extends Error {\n  constructor(message, opts) {\n    var _opts$isUserFacing;\n    super(message);\n    this.isRestriction = true;\n    this.isUserFacing = (_opts$isUserFacing = opts == null ? void 0 : opts.isUserFacing) != null ? _opts$isUserFacing : true;\n    if (opts != null && opts.file) {\n      this.file = opts.file; // only some restriction errors are related to a particular file\n    }\n  }\n}\nclass Restricter {\n  constructor(getOpts, getI18n) {\n    this.getI18n = getI18n;\n    this.getOpts = () => {\n      var _opts$restrictions;\n      const opts = getOpts();\n      if (((_opts$restrictions = opts.restrictions) == null ? void 0 : _opts$restrictions.allowedFileTypes) != null && !Array.isArray(opts.restrictions.allowedFileTypes)) {\n        throw new TypeError('`restrictions.allowedFileTypes` must be an array');\n      }\n      return opts;\n    };\n  }\n\n  // Because these operations are slow, we cannot run them for every file (if we are adding multiple files)\n  validateAggregateRestrictions(existingFiles, addingFiles) {\n    const {\n      maxTotalFileSize,\n      maxNumberOfFiles\n    } = this.getOpts().restrictions;\n    if (maxNumberOfFiles) {\n      const nonGhostFiles = existingFiles.filter(f => !f.isGhost);\n      if (nonGhostFiles.length + addingFiles.length > maxNumberOfFiles) {\n        throw new RestrictionError(`${this.getI18n()('youCanOnlyUploadX', {\n          smart_count: maxNumberOfFiles\n        })}`);\n      }\n    }\n    if (maxTotalFileSize) {\n      const totalFilesSize = [...existingFiles, ...addingFiles].reduce((total, f) => {\n        var _f$size;\n        return total + ((_f$size = f.size) != null ? _f$size : 0);\n      }, 0);\n      if (totalFilesSize > maxTotalFileSize) {\n        throw new RestrictionError(this.getI18n()('aggregateExceedsSize', {\n          sizeAllowed: prettierBytes(maxTotalFileSize),\n          size: prettierBytes(totalFilesSize)\n        }));\n      }\n    }\n  }\n  validateSingleFile(file) {\n    const {\n      maxFileSize,\n      minFileSize,\n      allowedFileTypes\n    } = this.getOpts().restrictions;\n    if (allowedFileTypes) {\n      const isCorrectFileType = allowedFileTypes.some(type => {\n        // check if this is a mime-type\n        if (type.includes('/')) {\n          if (!file.type) return false;\n          return match(file.type.replace(/;.*?$/, ''), type);\n        }\n\n        // otherwise this is likely an extension\n        if (type[0] === '.' && file.extension) {\n          return file.extension.toLowerCase() === type.slice(1).toLowerCase();\n        }\n        return false;\n      });\n      if (!isCorrectFileType) {\n        const allowedFileTypesString = allowedFileTypes.join(', ');\n        throw new RestrictionError(this.getI18n()('youCanOnlyUploadFileTypes', {\n          types: allowedFileTypesString\n        }), {\n          file\n        });\n      }\n    }\n\n    // We can't check maxFileSize if the size is unknown.\n    if (maxFileSize && file.size != null && file.size > maxFileSize) {\n      throw new RestrictionError(this.getI18n()('exceedsSize', {\n        size: prettierBytes(maxFileSize),\n        file: file.name\n      }), {\n        file\n      });\n    }\n\n    // We can't check minFileSize if the size is unknown.\n    if (minFileSize && file.size != null && file.size < minFileSize) {\n      throw new RestrictionError(this.getI18n()('inferiorSize', {\n        size: prettierBytes(minFileSize)\n      }), {\n        file\n      });\n    }\n  }\n  validate(existingFiles, addingFiles) {\n    addingFiles.forEach(addingFile => {\n      this.validateSingleFile(addingFile);\n    });\n    this.validateAggregateRestrictions(existingFiles, addingFiles);\n  }\n  validateMinNumberOfFiles(files) {\n    const {\n      minNumberOfFiles\n    } = this.getOpts().restrictions;\n    if (minNumberOfFiles && Object.keys(files).length < minNumberOfFiles) {\n      throw new RestrictionError(this.getI18n()('youHaveToAtLeastSelectX', {\n        smart_count: minNumberOfFiles\n      }));\n    }\n  }\n  getMissingRequiredMetaFields(file) {\n    const error = new RestrictionError(this.getI18n()('missingRequiredMetaFieldOnFile', {\n      fileName: file.name\n    }));\n    const {\n      requiredMetaFields\n    } = this.getOpts().restrictions;\n    const missingFields = [];\n    for (const field of requiredMetaFields) {\n      if (!Object.hasOwn(file.meta, field) || file.meta[field] === '') {\n        missingFields.push(field);\n      }\n    }\n    return {\n      missingFields,\n      error\n    };\n  }\n}\nexport { Restricter, defaultOptions, RestrictionError };", "export default {\n  strings: {\n    addBulkFilesFailed: {\n      0: 'Failed to add %{smart_count} file due to an internal error',\n      1: 'Failed to add %{smart_count} files due to internal errors'\n    },\n    youCanOnlyUploadX: {\n      0: 'You can only upload %{smart_count} file',\n      1: 'You can only upload %{smart_count} files'\n    },\n    youHaveToAtLeastSelectX: {\n      0: 'You have to select at least %{smart_count} file',\n      1: 'You have to select at least %{smart_count} files'\n    },\n    aggregateExceedsSize: 'You selected %{size} of files, but maximum allowed size is %{sizeAllowed}',\n    exceedsSize: '%{file} exceeds maximum allowed size of %{size}',\n    missingRequiredMetaField: 'Missing required meta fields',\n    missingRequiredMetaFieldOnFile: 'Missing required meta fields in %{fileName}',\n    inferiorSize: 'This file is smaller than the allowed size of %{size}',\n    youCanOnlyUploadFileTypes: 'You can only upload: %{types}',\n    noMoreFilesAllowed: 'Cannot add more files',\n    noDuplicates: \"Cannot add the duplicate file '%{fileName}', it already exists\",\n    companionError: 'Connection with Companion failed',\n    authAborted: 'Authentication aborted',\n    companionUnauthorizeHint: 'To unauthorize to your %{provider} account, please go to %{url}',\n    failedToUpload: 'Failed to upload %{file}',\n    noInternetConnection: 'No Internet connection',\n    connectedToInternet: 'Connected to the Internet',\n    // Strings for remote providers\n    noFilesFound: 'You have no files or folders here',\n    noSearchResults: 'Unfortunately, there are no results for this search',\n    selectX: {\n      0: 'Select %{smart_count}',\n      1: 'Select %{smart_count}'\n    },\n    allFilesFromFolderNamed: 'All files from folder %{name}',\n    openFolderNamed: 'Open folder %{name}',\n    cancel: 'Cancel',\n    logOut: 'Log out',\n    filter: 'Filter',\n    resetFilter: 'Reset filter',\n    loading: 'Loading...',\n    loadedXFiles: 'Loaded %{numFiles} files',\n    authenticateWithTitle: 'Please authenticate with %{pluginName} to select files',\n    authenticateWith: 'Connect to %{pluginName}',\n    signInWithGoogle: 'Sign in with Google',\n    searchImages: 'Search for images',\n    enterTextToSearch: 'Enter text to search for images',\n    search: 'Search',\n    resetSearch: 'Reset search',\n    emptyFolderAdded: 'No files were added from empty folder',\n    addedNumFiles: 'Added %{numFiles} file(s)',\n    folderAlreadyAdded: 'The folder \"%{folder}\" was already added',\n    folderAdded: {\n      0: 'Added %{smart_count} file from %{folder}',\n      1: 'Added %{smart_count} files from %{folder}'\n    },\n    additionalRestrictionsFailed: '%{count} additional restrictions were not fulfilled',\n    unnamed: 'Unnamed'\n  }\n};", "/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Indicates that this node needs to be inserted while patching children */\nexport const INSERT_VNODE = 1 << 2;\n/** Indicates a VNode has been matched with another VNode in the diff */\nexport const MATCHED = 1 << 1;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(MODE_HYDRATE | MODE_SUSPENDED);\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nexport const XHTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nexport const MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n\nexport const NULL = null;\nexport const UNDEFINED = undefined;\nexport const EMPTY_OBJ = /** @type {any} */ ({});\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n", "import { EMPTY_ARR } from './constants';\n\nexport const isArray = Array.isArray;\n\n/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\t// @ts-expect-error We change the type of `obj` to be `O & P`\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {import('./index').ContainerNode} node The node to remove\n */\nexport function removeNode(node) {\n\tif (node && node.parentNode) node.parentNode.removeChild(node);\n}\n\nexport const slice = EMPTY_ARR.slice;\n", "import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n", "import { slice } from './util';\nimport options from './options';\nimport { NULL, UNDEFINED } from './constants';\n\nlet vnodeId = 0;\n\n/**\n * Create an virtual node (used for JSX)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component constructor for this\n * virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array<import('.').ComponentChildren>} [children] The children of the\n * virtual node\n * @returns {import('./internal').VNode}\n */\nexport function createElement(type, props, children) {\n\tlet normalizedProps = {},\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\t// If a Component VNode, check for and apply defaultProps\n\t// Note: type may be undefined in development, must never error here.\n\tif (typeof type == 'function' && type.defaultProps != NULL) {\n\t\tfor (i in type.defaultProps) {\n\t\t\tif (normalizedProps[i] === UNDEFINED) {\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn createVNode(type, normalizedProps, key, ref, NULL);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * Constructor for this virtual node\n * @param {object | string | number | null} props The properties of this virtual node.\n * If this virtual node represents a text node, this is the text of the node (string or number).\n * @param {string | number | null} key The key for this virtual node, used when\n * diffing it against its children\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {import('./internal').VNode}\n */\nexport function createVNode(type, props, key, ref, original) {\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\n\t// Do not inline into createElement and coerceToVNode!\n\t/** @type {import('./internal').VNode} */\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_children: NULL,\n\t\t_parent: NULL,\n\t\t_depth: 0,\n\t\t_dom: NULL,\n\t\t_component: NULL,\n\t\tconstructor: UNDEFINED,\n\t\t_original: original == NULL ? ++vnodeId : original,\n\t\t_index: -1,\n\t\t_flags: 0\n\t};\n\n\t// Only invoke the vnode hook if this was *not* a direct copy:\n\tif (original == NULL && options.vnode != NULL) options.vnode(vnode);\n\n\treturn vnode;\n}\n\nexport function createRef() {\n\treturn { current: NULL };\n}\n\nexport function Fragment(props) {\n\treturn props.children;\n}\n\n/**\n * Check if a the argument is a valid Preact VNode.\n * @param {*} vnode\n * @returns {vnode is VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != NULL && vnode.constructor == UNDEFINED;\n", "import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\nimport { MODE_HYDRATE, NULL } from './constants';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function BaseComponent(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nBaseComponent.prototype.setState = function (update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != NULL && this._nextState != this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == NULL) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nBaseComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](https://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {ComponentChildren | void}\n */\nBaseComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == NULL) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._index + 1)\n\t\t\t: NULL;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != NULL && sibling._dom != NULL) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : NULL;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tlet oldVNode = component._vnode,\n\t\toldDom = oldVNode._dom,\n\t\tcommitQueue = [],\n\t\trefQueue = [];\n\n\tif (component._parentDom) {\n\t\tconst newVNode = assign({}, oldVNode);\n\t\tnewVNode._original = oldVNode._original + 1;\n\t\tif (options.vnode) options.vnode(newVNode);\n\n\t\tdiff(\n\t\t\tcomponent._parentDom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tcomponent._parentDom.namespaceURI,\n\t\t\toldVNode._flags & MODE_HYDRATE ? [oldDom] : NULL,\n\t\t\tcommitQueue,\n\t\t\toldDom == NULL ? getDomSibling(oldVNode) : oldDom,\n\t\t\t!!(oldVNode._flags & MODE_HYDRATE),\n\t\t\trefQueue\n\t\t);\n\n\t\tnewVNode._original = oldVNode._original;\n\t\tnewVNode._parent._children[newVNode._index] = newVNode;\n\t\tcommitRoot(commitQueue, newVNode, refQueue);\n\n\t\tif (newVNode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(newVNode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != NULL && vnode._component != NULL) {\n\t\tvnode._dom = vnode._component.base = NULL;\n\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child != NULL && child._dom != NULL) {\n\t\t\t\tvnode._dom = vnode._component.base = child._dom;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array<import('./internal').Component>}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce != options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/**\n * @param {import('./internal').Component} a\n * @param {import('./internal').Component} b\n */\nconst depthSort = (a, b) => a._vnode._depth - b._vnode._depth;\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\tlet c,\n\t\tl = 1;\n\n\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t// process() calls from getting scheduled while `queue` is still being consumed.\n\twhile (rerenderQueue.length) {\n\t\t// Keep the rerender queue sorted by (depth, insertion order). The queue\n\t\t// will initially be sorted on the first iteration only if it has more than 1 item.\n\t\t//\n\t\t// New items can be added to the queue e.g. when rerendering a provider, so we want to\n\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t// single pass\n\t\tif (rerenderQueue.length > l) {\n\t\t\trerenderQueue.sort(depthSort);\n\t\t}\n\n\t\tc = rerenderQueue.shift();\n\t\tl = rerenderQueue.length;\n\n\t\tif (c._dirty) {\n\t\t\trenderComponent(c);\n\t\t}\n\t}\n\tprocess._rerenderCount = 0;\n}\n\nprocess._rerenderCount = 0;\n", "import { IS_NON_DIMENSIONAL, NULL, SVG_NAMESPACE } from '../constants';\nimport options from '../options';\n\nfunction setStyle(style, key, value) {\n\tif (key[0] == '-') {\n\t\tstyle.setProperty(key, value == NULL ? '' : value);\n\t} else if (value == NULL) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\nconst CAPTURE_REGEX = /(PointerCapture)$|Capture$/i;\n\n// A logical clock to solve issues like https://github.com/preactjs/preact/issues/3927.\n// When the DOM performs an event it leaves micro-ticks in between bubbling up which means that\n// an event can trigger on a newly reated DOM-node while the event bubbles up.\n//\n// Originally inspired by Vue\n// (https://github.com/vuejs/core/blob/caeb8a68811a1b0f79/packages/runtime-dom/src/modules/events.ts#L90-L101),\n// but modified to use a logical clock instead of Date.now() in case event handlers get attached\n// and events get dispatched during the same millisecond.\n//\n// The clock is incremented after each new event dispatch. This allows 1 000 000 new events\n// per second for over 280 years before the value reaches Number.MAX_SAFE_INTEGER (2**53 - 1).\nlet eventClock = 0;\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {string} namespace Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, namespace) {\n\tlet useCapture;\n\n\to: if (name == 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] != oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] == 'o' && name[1] == 'n') {\n\t\tuseCapture = name != (name = name.replace(CAPTURE_REGEX, '$1'));\n\t\tconst lowerCaseName = name.toLowerCase();\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (lowerCaseName in dom || name == 'onFocusOut' || name == 'onFocusIn')\n\t\t\tname = lowerCaseName.slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tvalue._attached = eventClock;\n\t\t\t\tdom.addEventListener(\n\t\t\t\t\tname,\n\t\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\t\tuseCapture\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tvalue._attached = oldValue._attached;\n\t\t\t}\n\t\t} else {\n\t\t\tdom.removeEventListener(\n\t\t\t\tname,\n\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\tuseCapture\n\t\t\t);\n\t\t}\n\t} else {\n\t\tif (namespace == SVG_NAMESPACE) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname != 'width' &&\n\t\t\tname != 'height' &&\n\t\t\tname != 'href' &&\n\t\t\tname != 'list' &&\n\t\t\tname != 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname != 'tabIndex' &&\n\t\t\tname != 'download' &&\n\t\t\tname != 'rowSpan' &&\n\t\t\tname != 'colSpan' &&\n\t\t\tname != 'role' &&\n\t\t\tname != 'popover' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == NULL ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// aria- and data- attributes have no boolean representation.\n\t\t// A `false` value is different from the attribute not being\n\t\t// present, so we can't remove it. For non-boolean aria\n\t\t// attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost too many bytes. On top of\n\t\t// that other frameworks generally stringify `false`.\n\n\t\tif (typeof value == 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != NULL && (value !== false || name[4] == '-')) {\n\t\t\tdom.setAttribute(name, name == 'popover' && value == true ? '' : value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Create an event proxy function.\n * @param {boolean} useCapture Is the event handler for the capture phase.\n * @private\n */\nfunction createEventProxy(useCapture) {\n\t/**\n\t * Proxy an event to hooked event handlers\n\t * @param {import('../internal').PreactEvent} e The event object from the browser\n\t * @private\n\t */\n\treturn function (e) {\n\t\tif (this._listeners) {\n\t\t\tconst eventHandler = this._listeners[e.type + useCapture];\n\t\t\tif (e._dispatched == NULL) {\n\t\t\t\te._dispatched = eventClock++;\n\n\t\t\t\t// When `e._dispatched` is smaller than the time when the targeted event\n\t\t\t\t// handler was attached we know we have bubbled up to an element that was added\n\t\t\t\t// during patching the DOM.\n\t\t\t} else if (e._dispatched < eventHandler._attached) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn eventHandler(options.event ? options.event(e) : e);\n\t\t}\n\t};\n}\n\nconst eventProxy = createEventProxy(false);\nconst eventProxyCapture = createEventProxy(true);\n", "import { enqueueRender } from './component';\nimport { NULL } from './constants';\n\nexport let i = 0;\n\nexport function createContext(defaultValue) {\n\tfunction Context(props) {\n\t\tif (!this.getChildContext) {\n\t\t\t/** @type {Set<import('./internal').Component> | null} */\n\t\t\tlet subs = new Set();\n\t\t\tlet ctx = {};\n\t\t\tctx[Context._id] = this;\n\n\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\tthis.componentWillUnmount = () => {\n\t\t\t\tsubs = NULL;\n\t\t\t};\n\n\t\t\tthis.shouldComponentUpdate = function (_props) {\n\t\t\t\t// @ts-expect-error even\n\t\t\t\tif (this.props.value != _props.value) {\n\t\t\t\t\tsubs.forEach(c => {\n\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis.sub = c => {\n\t\t\t\tsubs.add(c);\n\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\tif (subs) {\n\t\t\t\t\t\tsubs.delete(c);\n\t\t\t\t\t}\n\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\n\t\treturn props.children;\n\t}\n\n\tContext._id = '__cC' + i++;\n\tContext._defaultValue = defaultValue;\n\n\t/** @type {import('./internal').FunctionComponent} */\n\tContext.Consumer = (props, contextValue) => {\n\t\treturn props.children(contextValue);\n\t};\n\n\t// we could also get rid of _contextRef entirely\n\tContext.Provider =\n\t\tContext._contextRef =\n\t\tContext.Consumer.contextType =\n\t\t\tContext;\n\n\treturn Context;\n}\n", "import { diff, unmount, applyRef } from './index';\nimport { createVNode, Fragment } from '../create-element';\nimport {\n\tEMPTY_OBJ,\n\tEMPTY_ARR,\n\tINSERT_VNODE,\n\tMATCHED,\n\tUNDEFINED,\n\tNULL\n} from '../constants';\nimport { isArray } from '../util';\nimport { getDomSibling } from '../component';\n\n/**\n * @typedef {import('../internal').ComponentChildren} ComponentChildren\n * @typedef {import('../internal').Component} Component\n * @typedef {import('../internal').PreactElement} PreactElement\n * @typedef {import('../internal').VNode} VNode\n */\n\n/**\n * Diff the children of a virtual node\n * @param {PreactElement} parentDom The DOM element whose children are being\n * diffed\n * @param {ComponentChildren[]} renderResult\n * @param {VNode} newParentVNode The new virtual node whose children should be\n * diff'ed against oldParentVNode\n * @param {VNode} oldParentVNode The old virtual node whose children should be\n * diff'ed against newParentVNode\n * @param {object} globalContext The current context object - modified by\n * getChildContext\n * @param {string} namespace Current namespace of the DOM node (HTML, SVG, or MathML)\n * @param {Array<PreactElement>} excessDomChildren\n * @param {Array<Component>} commitQueue List of components which have callbacks\n * to invoke in commitRoot\n * @param {PreactElement} oldDom The current attached DOM element any new dom\n * elements should be placed around. Likely `null` on first render (except when\n * hydrating). Can be a sibling DOM element when diffing Fragments that have\n * siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {any[]} refQueue an array of elements needed to invoke refs\n */\nexport function diffChildren(\n\tparentDom,\n\trenderResult,\n\tnewParentVNode,\n\toldParentVNode,\n\tglobalContext,\n\tnamespace,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\tlet i,\n\t\t/** @type {VNode} */\n\t\toldVNode,\n\t\t/** @type {VNode} */\n\t\tchildVNode,\n\t\t/** @type {PreactElement} */\n\t\tnewDom,\n\t\t/** @type {PreactElement} */\n\t\tfirstChildDom;\n\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\n\t// as EMPTY_OBJ._children should be `undefined`.\n\t/** @type {VNode[]} */\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\n\n\tlet newChildrenLength = renderResult.length;\n\n\toldDom = constructNewChildrenArray(\n\t\tnewParentVNode,\n\t\trenderResult,\n\t\toldChildren,\n\t\toldDom,\n\t\tnewChildrenLength\n\t);\n\n\tfor (i = 0; i < newChildrenLength; i++) {\n\t\tchildVNode = newParentVNode._children[i];\n\t\tif (childVNode == NULL) continue;\n\n\t\t// At this point, constructNewChildrenArray has assigned _index to be the\n\t\t// matchingIndex for this VNode's oldVNode (or -1 if there is no oldVNode).\n\t\tif (childVNode._index == -1) {\n\t\t\toldVNode = EMPTY_OBJ;\n\t\t} else {\n\t\t\toldVNode = oldChildren[childVNode._index] || EMPTY_OBJ;\n\t\t}\n\n\t\t// Update childVNode._index to its final index\n\t\tchildVNode._index = i;\n\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\tlet result = diff(\n\t\t\tparentDom,\n\t\t\tchildVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tnamespace,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\toldDom,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\n\t\t// Adjust DOM nodes\n\t\tnewDom = childVNode._dom;\n\t\tif (childVNode.ref && oldVNode.ref != childVNode.ref) {\n\t\t\tif (oldVNode.ref) {\n\t\t\t\tapplyRef(oldVNode.ref, NULL, childVNode);\n\t\t\t}\n\t\t\trefQueue.push(\n\t\t\t\tchildVNode.ref,\n\t\t\t\tchildVNode._component || newDom,\n\t\t\t\tchildVNode\n\t\t\t);\n\t\t}\n\n\t\tif (firstChildDom == NULL && newDom != NULL) {\n\t\t\tfirstChildDom = newDom;\n\t\t}\n\n\t\tif (\n\t\t\tchildVNode._flags & INSERT_VNODE ||\n\t\t\toldVNode._children === childVNode._children\n\t\t) {\n\t\t\toldDom = insert(childVNode, oldDom, parentDom);\n\t\t} else if (typeof childVNode.type == 'function' && result !== UNDEFINED) {\n\t\t\toldDom = result;\n\t\t} else if (newDom) {\n\t\t\toldDom = newDom.nextSibling;\n\t\t}\n\n\t\t// Unset diffing flags\n\t\tchildVNode._flags &= ~(INSERT_VNODE | MATCHED);\n\t}\n\n\tnewParentVNode._dom = firstChildDom;\n\n\treturn oldDom;\n}\n\n/**\n * @param {VNode} newParentVNode\n * @param {ComponentChildren[]} renderResult\n * @param {VNode[]} oldChildren\n */\nfunction constructNewChildrenArray(\n\tnewParentVNode,\n\trenderResult,\n\toldChildren,\n\toldDom,\n\tnewChildrenLength\n) {\n\t/** @type {number} */\n\tlet i;\n\t/** @type {VNode} */\n\tlet childVNode;\n\t/** @type {VNode} */\n\tlet oldVNode;\n\n\tlet oldChildrenLength = oldChildren.length,\n\t\tremainingOldChildren = oldChildrenLength;\n\n\tlet skew = 0;\n\n\tnewParentVNode._children = new Array(newChildrenLength);\n\tfor (i = 0; i < newChildrenLength; i++) {\n\t\t// @ts-expect-error We are reusing the childVNode variable to hold both the\n\t\t// pre and post normalized childVNode\n\t\tchildVNode = renderResult[i];\n\n\t\tif (\n\t\t\tchildVNode == NULL ||\n\t\t\ttypeof childVNode == 'boolean' ||\n\t\t\ttypeof childVNode == 'function'\n\t\t) {\n\t\t\tnewParentVNode._children[i] = NULL;\n\t\t\tcontinue;\n\t\t}\n\t\t// If this newVNode is being reused (e.g. <div>{reuse}{reuse}</div>) in the same diff,\n\t\t// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have\n\t\t// it's own DOM & etc. pointers\n\t\telse if (\n\t\t\ttypeof childVNode == 'string' ||\n\t\t\ttypeof childVNode == 'number' ||\n\t\t\t// eslint-disable-next-line valid-typeof\n\t\t\ttypeof childVNode == 'bigint' ||\n\t\t\tchildVNode.constructor == String\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tNULL,\n\t\t\t\tchildVNode,\n\t\t\t\tNULL,\n\t\t\t\tNULL,\n\t\t\t\tNULL\n\t\t\t);\n\t\t} else if (isArray(childVNode)) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tFragment,\n\t\t\t\t{ children: childVNode },\n\t\t\t\tNULL,\n\t\t\t\tNULL,\n\t\t\t\tNULL\n\t\t\t);\n\t\t} else if (childVNode.constructor == UNDEFINED && childVNode._depth > 0) {\n\t\t\t// VNode is already in use, clone it. This can happen in the following\n\t\t\t// scenario:\n\t\t\t//   const reuse = <div />\n\t\t\t//   <div>{reuse}<span />{reuse}</div>\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tchildVNode.type,\n\t\t\t\tchildVNode.props,\n\t\t\t\tchildVNode.key,\n\t\t\t\tchildVNode.ref ? childVNode.ref : NULL,\n\t\t\t\tchildVNode._original\n\t\t\t);\n\t\t} else {\n\t\t\tchildVNode = newParentVNode._children[i] = childVNode;\n\t\t}\n\n\t\tconst skewedIndex = i + skew;\n\t\tchildVNode._parent = newParentVNode;\n\t\tchildVNode._depth = newParentVNode._depth + 1;\n\n\t\t// Temporarily store the matchingIndex on the _index property so we can pull\n\t\t// out the oldVNode in diffChildren. We'll override this to the VNode's\n\t\t// final index after using this property to get the oldVNode\n\t\tconst matchingIndex = (childVNode._index = findMatchingIndex(\n\t\t\tchildVNode,\n\t\t\toldChildren,\n\t\t\tskewedIndex,\n\t\t\tremainingOldChildren\n\t\t));\n\n\t\toldVNode = NULL;\n\t\tif (matchingIndex != -1) {\n\t\t\toldVNode = oldChildren[matchingIndex];\n\t\t\tremainingOldChildren--;\n\t\t\tif (oldVNode) {\n\t\t\t\toldVNode._flags |= MATCHED;\n\t\t\t}\n\t\t}\n\n\t\t// Here, we define isMounting for the purposes of the skew diffing\n\t\t// algorithm. Nodes that are unsuspending are considered mounting and we detect\n\t\t// this by checking if oldVNode._original == null\n\t\tconst isMounting = oldVNode == NULL || oldVNode._original == NULL;\n\n\t\tif (isMounting) {\n\t\t\tif (matchingIndex == -1) {\n\t\t\t\t// When the array of children is growing we need to decrease the skew\n\t\t\t\t// as we are adding a new element to the array.\n\t\t\t\t// Example:\n\t\t\t\t// [1, 2, 3] --> [0, 1, 2, 3]\n\t\t\t\t// oldChildren   newChildren\n\t\t\t\t//\n\t\t\t\t// The new element is at index 0, so our skew is 0,\n\t\t\t\t// we need to decrease the skew as we are adding a new element.\n\t\t\t\t// The decrease will cause us to compare the element at position 1\n\t\t\t\t// with value 1 with the element at position 0 with value 0.\n\t\t\t\t//\n\t\t\t\t// A linear concept is applied when the array is shrinking,\n\t\t\t\t// if the length is unchanged we can assume that no skew\n\t\t\t\t// changes are needed.\n\t\t\t\tif (newChildrenLength > oldChildrenLength) {\n\t\t\t\t\tskew--;\n\t\t\t\t} else if (newChildrenLength < oldChildrenLength) {\n\t\t\t\t\tskew++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If we are mounting a DOM VNode, mark it for insertion\n\t\t\tif (typeof childVNode.type != 'function') {\n\t\t\t\tchildVNode._flags |= INSERT_VNODE;\n\t\t\t}\n\t\t} else if (matchingIndex != skewedIndex) {\n\t\t\t// When we move elements around i.e. [0, 1, 2] --> [1, 0, 2]\n\t\t\t// --> we diff 1, we find it at position 1 while our skewed index is 0 and our skew is 0\n\t\t\t//     we set the skew to 1 as we found an offset.\n\t\t\t// --> we diff 0, we find it at position 0 while our skewed index is at 2 and our skew is 1\n\t\t\t//     this makes us increase the skew again.\n\t\t\t// --> we diff 2, we find it at position 2 while our skewed index is at 4 and our skew is 2\n\t\t\t//\n\t\t\t// this becomes an optimization question where currently we see a 1 element offset as an insertion\n\t\t\t// or deletion i.e. we optimize for [0, 1, 2] --> [9, 0, 1, 2]\n\t\t\t// while a more than 1 offset we see as a swap.\n\t\t\t// We could probably build heuristics for having an optimized course of action here as well, but\n\t\t\t// might go at the cost of some bytes.\n\t\t\t//\n\t\t\t// If we wanted to optimize for i.e. only swaps we'd just do the last two code-branches and have\n\t\t\t// only the first item be a re-scouting and all the others fall in their skewed counter-part.\n\t\t\t// We could also further optimize for swaps\n\t\t\tif (matchingIndex == skewedIndex - 1) {\n\t\t\t\tskew--;\n\t\t\t} else if (matchingIndex == skewedIndex + 1) {\n\t\t\t\tskew++;\n\t\t\t} else {\n\t\t\t\tif (matchingIndex > skewedIndex) {\n\t\t\t\t\tskew--;\n\t\t\t\t} else {\n\t\t\t\t\tskew++;\n\t\t\t\t}\n\n\t\t\t\t// Move this VNode's DOM if the original index (matchingIndex) doesn't\n\t\t\t\t// match the new skew index (i + new skew)\n\t\t\t\t// In the former two branches we know that it matches after skewing\n\t\t\t\tchildVNode._flags |= INSERT_VNODE;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove remaining oldChildren if there are any. Loop forwards so that as we\n\t// unmount DOM from the beginning of the oldChildren, we can adjust oldDom to\n\t// point to the next child, which needs to be the first DOM node that won't be\n\t// unmounted.\n\tif (remainingOldChildren) {\n\t\tfor (i = 0; i < oldChildrenLength; i++) {\n\t\t\toldVNode = oldChildren[i];\n\t\t\tif (oldVNode != NULL && (oldVNode._flags & MATCHED) == 0) {\n\t\t\t\tif (oldVNode._dom == oldDom) {\n\t\t\t\t\toldDom = getDomSibling(oldVNode);\n\t\t\t\t}\n\n\t\t\t\tunmount(oldVNode, oldVNode);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn oldDom;\n}\n\n/**\n * @param {VNode} parentVNode\n * @param {PreactElement} oldDom\n * @param {PreactElement} parentDom\n * @returns {PreactElement}\n */\nfunction insert(parentVNode, oldDom, parentDom) {\n\t// Note: VNodes in nested suspended trees may be missing _children.\n\n\tif (typeof parentVNode.type == 'function') {\n\t\tlet children = parentVNode._children;\n\t\tfor (let i = 0; children && i < children.length; i++) {\n\t\t\tif (children[i]) {\n\t\t\t\t// If we enter this code path on sCU bailout, where we copy\n\t\t\t\t// oldVNode._children to newVNode._children, we need to update the old\n\t\t\t\t// children's _parent pointer to point to the newVNode (parentVNode\n\t\t\t\t// here).\n\t\t\t\tchildren[i]._parent = parentVNode;\n\t\t\t\toldDom = insert(children[i], oldDom, parentDom);\n\t\t\t}\n\t\t}\n\n\t\treturn oldDom;\n\t} else if (parentVNode._dom != oldDom) {\n\t\tif (oldDom && parentVNode.type && !parentDom.contains(oldDom)) {\n\t\t\toldDom = getDomSibling(parentVNode);\n\t\t}\n\t\tparentDom.insertBefore(parentVNode._dom, oldDom || NULL);\n\t\toldDom = parentVNode._dom;\n\t}\n\n\tdo {\n\t\toldDom = oldDom && oldDom.nextSibling;\n\t} while (oldDom != NULL && oldDom.nodeType == 8);\n\n\treturn oldDom;\n}\n\n/**\n * Flatten and loop through the children of a virtual node\n * @param {ComponentChildren} children The unflattened children of a virtual\n * node\n * @returns {VNode[]}\n */\nexport function toChildArray(children, out) {\n\tout = out || [];\n\tif (children == NULL || typeof children == 'boolean') {\n\t} else if (isArray(children)) {\n\t\tchildren.some(child => {\n\t\t\ttoChildArray(child, out);\n\t\t});\n\t} else {\n\t\tout.push(children);\n\t}\n\treturn out;\n}\n\n/**\n * @param {VNode} childVNode\n * @param {VNode[]} oldChildren\n * @param {number} skewedIndex\n * @param {number} remainingOldChildren\n * @returns {number}\n */\nfunction findMatchingIndex(\n\tchildVNode,\n\toldChildren,\n\tskewedIndex,\n\tremainingOldChildren\n) {\n\tconst key = childVNode.key;\n\tconst type = childVNode.type;\n\tlet oldVNode = oldChildren[skewedIndex];\n\n\t// We only need to perform a search if there are more children\n\t// (remainingOldChildren) to search. However, if the oldVNode we just looked\n\t// at skewedIndex was not already used in this diff, then there must be at\n\t// least 1 other (so greater than 1) remainingOldChildren to attempt to match\n\t// against. So the following condition checks that ensuring\n\t// remainingOldChildren > 1 if the oldVNode is not already used/matched. Else\n\t// if the oldVNode was null or matched, then there could needs to be at least\n\t// 1 (aka `remainingOldChildren > 0`) children to find and compare against.\n\t//\n\t// If there is an unkeyed functional VNode, that isn't a built-in like our Fragment,\n\t// we should not search as we risk re-using state of an unrelated VNode. (reverted for now)\n\tlet shouldSearch =\n\t\t// (typeof type != 'function' || type === Fragment || key) &&\n\t\tremainingOldChildren >\n\t\t(oldVNode != NULL && (oldVNode._flags & MATCHED) == 0 ? 1 : 0);\n\n\tif (\n\t\t(oldVNode === NULL && childVNode.key == null) ||\n\t\t(oldVNode &&\n\t\t\tkey == oldVNode.key &&\n\t\t\ttype == oldVNode.type &&\n\t\t\t(oldVNode._flags & MATCHED) == 0)\n\t) {\n\t\treturn skewedIndex;\n\t} else if (shouldSearch) {\n\t\tlet x = skewedIndex - 1;\n\t\tlet y = skewedIndex + 1;\n\t\twhile (x >= 0 || y < oldChildren.length) {\n\t\t\tif (x >= 0) {\n\t\t\t\toldVNode = oldChildren[x];\n\t\t\t\tif (\n\t\t\t\t\toldVNode &&\n\t\t\t\t\t(oldVNode._flags & MATCHED) == 0 &&\n\t\t\t\t\tkey == oldVNode.key &&\n\t\t\t\t\ttype == oldVNode.type\n\t\t\t\t) {\n\t\t\t\t\treturn x;\n\t\t\t\t}\n\t\t\t\tx--;\n\t\t\t}\n\n\t\t\tif (y < oldChildren.length) {\n\t\t\t\toldVNode = oldChildren[y];\n\t\t\t\tif (\n\t\t\t\t\toldVNode &&\n\t\t\t\t\t(oldVNode._flags & MATCHED) == 0 &&\n\t\t\t\t\tkey == oldVNode.key &&\n\t\t\t\t\ttype == oldVNode.type\n\t\t\t\t) {\n\t\t\t\t\treturn y;\n\t\t\t\t}\n\t\t\t\ty++;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn -1;\n}\n", "import {\n\tEMPTY_OBJ,\n\tMATH_NAMESPACE,\n\tMODE_HYDRATE,\n\tMODE_SUSPENDED,\n\tNULL,\n\tRESET_MODE,\n\tSVG_NAMESPACE,\n\tUNDEFINED,\n\tXHTML_NAMESPACE\n} from '../constants';\nimport { BaseComponent, getDomSibling } from '../component';\nimport { Fragment } from '../create-element';\nimport { diffChildren } from './children';\nimport { setProperty } from './props';\nimport { assign, isArray, removeNode, slice } from '../util';\nimport options from '../options';\n\n/**\n * @typedef {import('../internal').ComponentChildren} ComponentChildren\n * @typedef {import('../internal').Component} Component\n * @typedef {import('../internal').PreactElement} PreactElement\n * @typedef {import('../internal').VNode} VNode\n */\n\n/**\n * @template {any} T\n * @typedef {import('../internal').Ref<T>} Ref<T>\n */\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {PreactElement} parentDom The parent of the DOM element\n * @param {VNode} newVNode The new virtual node\n * @param {VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object. Modified by\n * getChildContext\n * @param {string} namespace Current namespace of the DOM node (HTML, SVG, or MathML)\n * @param {Array<PreactElement>} excessDomChildren\n * @param {Array<Component>} commitQueue List of components which have callbacks\n * to invoke in commitRoot\n * @param {PreactElement} oldDom The current attached DOM element any new dom\n * elements should be placed around. Likely `null` on first render (except when\n * hydrating). Can be a sibling DOM element when diffing Fragments that have\n * siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {any[]} refQueue an array of elements needed to invoke refs\n */\nexport function diff(\n\tparentDom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tnamespace,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\t/** @type {any} */\n\tlet tmp,\n\t\tnewType = newVNode.type;\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (newVNode.constructor != UNDEFINED) return NULL;\n\n\t// If the previous diff bailed out, resume creating/hydrating.\n\tif (oldVNode._flags & MODE_SUSPENDED) {\n\t\tisHydrating = !!(oldVNode._flags & MODE_HYDRATE);\n\t\toldDom = newVNode._dom = oldVNode._dom;\n\t\texcessDomChildren = [oldDom];\n\t}\n\n\tif ((tmp = options._diff)) tmp(newVNode);\n\n\touter: if (typeof newType == 'function') {\n\t\ttry {\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\n\t\t\tlet newProps = newVNode.props;\n\t\t\tconst isClassComponent =\n\t\t\t\t'prototype' in newType && newType.prototype.render;\n\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\ttmp = newType.contextType;\n\t\t\tlet provider = tmp && globalContext[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: globalContext;\n\n\t\t\t// Get component and set it to `c`\n\t\t\tif (oldVNode._component) {\n\t\t\t\tc = newVNode._component = oldVNode._component;\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\n\t\t\t} else {\n\t\t\t\t// Instantiate the new component\n\t\t\t\tif (isClassComponent) {\n\t\t\t\t\t// @ts-expect-error The check above verifies that newType is suppose to be constructed\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\n\t\t\t\t} else {\n\t\t\t\t\t// @ts-expect-error Trust me, Component implements the interface we want\n\t\t\t\t\tnewVNode._component = c = new BaseComponent(\n\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t);\n\t\t\t\t\tc.constructor = newType;\n\t\t\t\t\tc.render = doRender;\n\t\t\t\t}\n\t\t\t\tif (provider) provider.sub(c);\n\n\t\t\t\tc.props = newProps;\n\t\t\t\tif (!c.state) c.state = {};\n\t\t\t\tc.context = componentContext;\n\t\t\t\tc._globalContext = globalContext;\n\t\t\t\tisNew = c._dirty = true;\n\t\t\t\tc._renderCallbacks = [];\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t}\n\n\t\t\t// Invoke getDerivedStateFromProps\n\t\t\tif (isClassComponent && c._nextState == NULL) {\n\t\t\t\tc._nextState = c.state;\n\t\t\t}\n\n\t\t\tif (isClassComponent && newType.getDerivedStateFromProps != NULL) {\n\t\t\t\tif (c._nextState == c.state) {\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\n\t\t\t\t}\n\n\t\t\t\tassign(\n\t\t\t\t\tc._nextState,\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\toldProps = c.props;\n\t\t\toldState = c.state;\n\t\t\tc._vnode = newVNode;\n\n\t\t\t// Invoke pre-render lifecycle methods\n\t\t\tif (isNew) {\n\t\t\t\tif (\n\t\t\t\t\tisClassComponent &&\n\t\t\t\t\tnewType.getDerivedStateFromProps == NULL &&\n\t\t\t\t\tc.componentWillMount != NULL\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillMount();\n\t\t\t\t}\n\n\t\t\t\tif (isClassComponent && c.componentDidMount != NULL) {\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tisClassComponent &&\n\t\t\t\t\tnewType.getDerivedStateFromProps == NULL &&\n\t\t\t\t\tnewProps !== oldProps &&\n\t\t\t\t\tc.componentWillReceiveProps != NULL\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(!c._force &&\n\t\t\t\t\t\tc.shouldComponentUpdate != NULL &&\n\t\t\t\t\t\tc.shouldComponentUpdate(\n\t\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\t\tc._nextState,\n\t\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t\t) === false) ||\n\t\t\t\t\tnewVNode._original == oldVNode._original\n\t\t\t\t) {\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\t\tif (newVNode._original != oldVNode._original) {\n\t\t\t\t\t\t// When we are dealing with a bail because of sCU we have to update\n\t\t\t\t\t\t// the props, state and dirty-state.\n\t\t\t\t\t\t// when we are dealing with strict-equality we don't as the child could still\n\t\t\t\t\t\t// be dirtied see #3883\n\t\t\t\t\t\tc.props = newProps;\n\t\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t\t\tc._dirty = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t\tnewVNode._children.some(vnode => {\n\t\t\t\t\t\tif (vnode) vnode._parent = newVNode;\n\t\t\t\t\t});\n\n\t\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t\t}\n\t\t\t\t\tc._stateCallbacks = [];\n\n\t\t\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\t\t\tcommitQueue.push(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\n\t\t\t\tif (c.componentWillUpdate != NULL) {\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (isClassComponent && c.componentDidUpdate != NULL) {\n\t\t\t\t\tc._renderCallbacks.push(() => {\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.context = componentContext;\n\t\t\tc.props = newProps;\n\t\t\tc._parentDom = parentDom;\n\t\t\tc._force = false;\n\n\t\t\tlet renderHook = options._render,\n\t\t\t\tcount = 0;\n\t\t\tif (isClassComponent) {\n\t\t\t\tc.state = c._nextState;\n\t\t\t\tc._dirty = false;\n\n\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t}\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t} else {\n\t\t\t\tdo {\n\t\t\t\t\tc._dirty = false;\n\t\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\t\t// Handle setState called in render, see #2553\n\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t} while (c._dirty && ++count < 25);\n\t\t\t}\n\n\t\t\t// Handle setState called in render, see #2553\n\t\t\tc.state = c._nextState;\n\n\t\t\tif (c.getChildContext != NULL) {\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (isClassComponent && !isNew && c.getSnapshotBeforeUpdate != NULL) {\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t\t}\n\n\t\t\tlet isTopLevelFragment =\n\t\t\t\ttmp != NULL && tmp.type === Fragment && tmp.key == NULL;\n\t\t\tlet renderResult = tmp;\n\n\t\t\tif (isTopLevelFragment) {\n\t\t\t\trenderResult = cloneNode(tmp.props.children);\n\t\t\t}\n\n\t\t\toldDom = diffChildren(\n\t\t\t\tparentDom,\n\t\t\t\tisArray(renderResult) ? renderResult : [renderResult],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tnamespace,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\toldDom,\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\tc.base = newVNode._dom;\n\n\t\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\t\t\tnewVNode._flags &= RESET_MODE;\n\n\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\tcommitQueue.push(c);\n\t\t\t}\n\n\t\t\tif (clearProcessingException) {\n\t\t\t\tc._pendingError = c._processingException = NULL;\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tnewVNode._original = NULL;\n\t\t\t// if hydrating or creating initial tree, bailout preserves DOM:\n\t\t\tif (isHydrating || excessDomChildren != NULL) {\n\t\t\t\tif (e.then) {\n\t\t\t\t\tnewVNode._flags |= isHydrating\n\t\t\t\t\t\t? MODE_HYDRATE | MODE_SUSPENDED\n\t\t\t\t\t\t: MODE_SUSPENDED;\n\n\t\t\t\t\twhile (oldDom && oldDom.nodeType == 8 && oldDom.nextSibling) {\n\t\t\t\t\t\toldDom = oldDom.nextSibling;\n\t\t\t\t\t}\n\n\t\t\t\t\texcessDomChildren[excessDomChildren.indexOf(oldDom)] = NULL;\n\t\t\t\t\tnewVNode._dom = oldDom;\n\t\t\t\t} else {\n\t\t\t\t\tfor (let i = excessDomChildren.length; i--; ) {\n\t\t\t\t\t\tremoveNode(excessDomChildren[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t}\n\t\t\toptions._catchError(e, newVNode, oldVNode);\n\t\t}\n\t} else if (\n\t\texcessDomChildren == NULL &&\n\t\tnewVNode._original == oldVNode._original\n\t) {\n\t\tnewVNode._children = oldVNode._children;\n\t\tnewVNode._dom = oldVNode._dom;\n\t} else {\n\t\toldDom = newVNode._dom = diffElementNodes(\n\t\t\toldVNode._dom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tnamespace,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\t}\n\n\tif ((tmp = options.diffed)) tmp(newVNode);\n\n\treturn newVNode._flags & MODE_SUSPENDED ? undefined : oldDom;\n}\n\n/**\n * @param {Array<Component>} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {VNode} root\n */\nexport function commitRoot(commitQueue, root, refQueue) {\n\tfor (let i = 0; i < refQueue.length; i++) {\n\t\tapplyRef(refQueue[i], refQueue[++i], refQueue[++i]);\n\t}\n\n\tif (options._commit) options._commit(root, commitQueue);\n\n\tcommitQueue.some(c => {\n\t\ttry {\n\t\t\t// @ts-expect-error Reuse the commitQueue variable here so the type changes\n\t\t\tcommitQueue = c._renderCallbacks;\n\t\t\tc._renderCallbacks = [];\n\t\t\tcommitQueue.some(cb => {\n\t\t\t\t// @ts-expect-error See above comment on commitQueue\n\t\t\t\tcb.call(c);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t});\n}\n\nfunction cloneNode(node) {\n\tif (\n\t\ttypeof node != 'object' ||\n\t\tnode == NULL ||\n\t\t(node._depth && node._depth > 0)\n\t) {\n\t\treturn node;\n\t}\n\n\tif (isArray(node)) {\n\t\treturn node.map(cloneNode);\n\t}\n\n\treturn assign({}, node);\n}\n\n/**\n * Diff two virtual nodes representing DOM element\n * @param {PreactElement} dom The DOM element representing the virtual nodes\n * being diffed\n * @param {VNode} newVNode The new virtual node\n * @param {VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object\n * @param {string} namespace Current namespace of the DOM node (HTML, SVG, or MathML)\n * @param {Array<PreactElement>} excessDomChildren\n * @param {Array<Component>} commitQueue List of components which have callbacks\n * to invoke in commitRoot\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {any[]} refQueue an array of elements needed to invoke refs\n * @returns {PreactElement}\n */\nfunction diffElementNodes(\n\tdom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tnamespace,\n\texcessDomChildren,\n\tcommitQueue,\n\tisHydrating,\n\trefQueue\n) {\n\tlet oldProps = oldVNode.props;\n\tlet newProps = newVNode.props;\n\tlet nodeType = /** @type {string} */ (newVNode.type);\n\t/** @type {any} */\n\tlet i;\n\t/** @type {{ __html?: string }} */\n\tlet newHtml;\n\t/** @type {{ __html?: string }} */\n\tlet oldHtml;\n\t/** @type {ComponentChildren} */\n\tlet newChildren;\n\tlet value;\n\tlet inputValue;\n\tlet checked;\n\n\t// Tracks entering and exiting namespaces when descending through the tree.\n\tif (nodeType == 'svg') namespace = SVG_NAMESPACE;\n\telse if (nodeType == 'math') namespace = MATH_NAMESPACE;\n\telse if (!namespace) namespace = XHTML_NAMESPACE;\n\n\tif (excessDomChildren != NULL) {\n\t\tfor (i = 0; i < excessDomChildren.length; i++) {\n\t\t\tvalue = excessDomChildren[i];\n\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\n\t\t\t// argument matches an element in excessDomChildren, remove it from\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\n\t\t\tif (\n\t\t\t\tvalue &&\n\t\t\t\t'setAttribute' in value == !!nodeType &&\n\t\t\t\t(nodeType ? value.localName == nodeType : value.nodeType == 3)\n\t\t\t) {\n\t\t\t\tdom = value;\n\t\t\t\texcessDomChildren[i] = NULL;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom == NULL) {\n\t\tif (nodeType == NULL) {\n\t\t\treturn document.createTextNode(newProps);\n\t\t}\n\n\t\tdom = document.createElementNS(\n\t\t\tnamespace,\n\t\t\tnodeType,\n\t\t\tnewProps.is && newProps\n\t\t);\n\n\t\t// we are creating a new node, so we can assume this is a new subtree (in\n\t\t// case we are hydrating), this deopts the hydrate\n\t\tif (isHydrating) {\n\t\t\tif (options._hydrationMismatch)\n\t\t\t\toptions._hydrationMismatch(newVNode, excessDomChildren);\n\t\t\tisHydrating = false;\n\t\t}\n\t\t// we created a new parent, so none of the previously attached children can be reused:\n\t\texcessDomChildren = NULL;\n\t}\n\n\tif (nodeType == NULL) {\n\t\t// During hydration, we still have to split merged text from SSR'd HTML.\n\t\tif (oldProps !== newProps && (!isHydrating || dom.data != newProps)) {\n\t\t\tdom.data = newProps;\n\t\t}\n\t} else {\n\t\t// If excessDomChildren was not null, repopulate it with the current element's children:\n\t\texcessDomChildren = excessDomChildren && slice.call(dom.childNodes);\n\n\t\toldProps = oldVNode.props || EMPTY_OBJ;\n\n\t\t// If we are in a situation where we are not hydrating but are using\n\t\t// existing DOM (e.g. replaceNode) we should read the existing DOM\n\t\t// attributes to diff them\n\t\tif (!isHydrating && excessDomChildren != NULL) {\n\t\t\toldProps = {};\n\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\n\t\t\t\tvalue = dom.attributes[i];\n\t\t\t\toldProps[value.name] = value.value;\n\t\t\t}\n\t\t}\n\n\t\tfor (i in oldProps) {\n\t\t\tvalue = oldProps[i];\n\t\t\tif (i == 'children') {\n\t\t\t} else if (i == 'dangerouslySetInnerHTML') {\n\t\t\t\toldHtml = value;\n\t\t\t} else if (!(i in newProps)) {\n\t\t\t\tif (\n\t\t\t\t\t(i == 'value' && 'defaultValue' in newProps) ||\n\t\t\t\t\t(i == 'checked' && 'defaultChecked' in newProps)\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tsetProperty(dom, i, NULL, value, namespace);\n\t\t\t}\n\t\t}\n\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\n\t\t// @TODO we should warn in debug mode when props don't match here.\n\t\tfor (i in newProps) {\n\t\t\tvalue = newProps[i];\n\t\t\tif (i == 'children') {\n\t\t\t\tnewChildren = value;\n\t\t\t} else if (i == 'dangerouslySetInnerHTML') {\n\t\t\t\tnewHtml = value;\n\t\t\t} else if (i == 'value') {\n\t\t\t\tinputValue = value;\n\t\t\t} else if (i == 'checked') {\n\t\t\t\tchecked = value;\n\t\t\t} else if (\n\t\t\t\t(!isHydrating || typeof value == 'function') &&\n\t\t\t\toldProps[i] !== value\n\t\t\t) {\n\t\t\t\tsetProperty(dom, i, value, oldProps[i], namespace);\n\t\t\t}\n\t\t}\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\t\tif (\n\t\t\t\t!isHydrating &&\n\t\t\t\t(!oldHtml ||\n\t\t\t\t\t(newHtml.__html != oldHtml.__html && newHtml.__html != dom.innerHTML))\n\t\t\t) {\n\t\t\t\tdom.innerHTML = newHtml.__html;\n\t\t\t}\n\n\t\t\tnewVNode._children = [];\n\t\t} else {\n\t\t\tif (oldHtml) dom.innerHTML = '';\n\n\t\t\tdiffChildren(\n\t\t\t\t// @ts-expect-error\n\t\t\t\tnewVNode.type == 'template' ? dom.content : dom,\n\t\t\t\tisArray(newChildren) ? newChildren : [newChildren],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tnodeType == 'foreignObject' ? XHTML_NAMESPACE : namespace,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\texcessDomChildren\n\t\t\t\t\t? excessDomChildren[0]\n\t\t\t\t\t: oldVNode._children && getDomSibling(oldVNode, 0),\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\t// Remove children that are not part of any vnode.\n\t\t\tif (excessDomChildren != NULL) {\n\t\t\t\tfor (i = excessDomChildren.length; i--; ) {\n\t\t\t\t\tremoveNode(excessDomChildren[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// As above, don't diff props during hydration\n\t\tif (!isHydrating) {\n\t\t\ti = 'value';\n\t\t\tif (nodeType == 'progress' && inputValue == NULL) {\n\t\t\t\tdom.removeAttribute('value');\n\t\t\t} else if (\n\t\t\t\tinputValue != UNDEFINED &&\n\t\t\t\t// #2756 For the <progress>-element the initial value is 0,\n\t\t\t\t// despite the attribute not being present. When the attribute\n\t\t\t\t// is missing the progress bar is treated as indeterminate.\n\t\t\t\t// To fix that we'll always update it when it is 0 for progress elements\n\t\t\t\t(inputValue !== dom[i] ||\n\t\t\t\t\t(nodeType == 'progress' && !inputValue) ||\n\t\t\t\t\t// This is only for IE 11 to fix <select> value not being updated.\n\t\t\t\t\t// To avoid a stale select value we need to set the option.value\n\t\t\t\t\t// again, which triggers IE11 to re-evaluate the select value\n\t\t\t\t\t(nodeType == 'option' && inputValue != oldProps[i]))\n\t\t\t) {\n\t\t\t\tsetProperty(dom, i, inputValue, oldProps[i], namespace);\n\t\t\t}\n\n\t\t\ti = 'checked';\n\t\t\tif (checked != UNDEFINED && checked != dom[i]) {\n\t\t\t\tsetProperty(dom, i, checked, oldProps[i], namespace);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn dom;\n}\n\n/**\n * Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {Ref<any> & { _unmount?: unknown }} ref\n * @param {any} value\n * @param {VNode} vnode\n */\nexport function applyRef(ref, value, vnode) {\n\ttry {\n\t\tif (typeof ref == 'function') {\n\t\t\tlet hasRefUnmount = typeof ref._unmount == 'function';\n\t\t\tif (hasRefUnmount) {\n\t\t\t\t// @ts-ignore TS doesn't like moving narrowing checks into variables\n\t\t\t\tref._unmount();\n\t\t\t}\n\n\t\t\tif (!hasRefUnmount || value != NULL) {\n\t\t\t\t// Store the cleanup function on the function\n\t\t\t\t// instance object itself to avoid shape\n\t\t\t\t// transitioning vnode\n\t\t\t\tref._unmount = ref(value);\n\t\t\t}\n\t\t} else ref.current = value;\n\t} catch (e) {\n\t\toptions._catchError(e, vnode);\n\t}\n}\n\n/**\n * Unmount a virtual node from the tree and apply DOM changes\n * @param {VNode} vnode The virtual node to unmount\n * @param {VNode} parentVNode The parent of the VNode that initiated the unmount\n * @param {boolean} [skipRemove] Flag that indicates that a parent node of the\n * current element is already detached from the DOM.\n */\nexport function unmount(vnode, parentVNode, skipRemove) {\n\tlet r;\n\tif (options.unmount) options.unmount(vnode);\n\n\tif ((r = vnode.ref)) {\n\t\tif (!r.current || r.current == vnode._dom) {\n\t\t\tapplyRef(r, NULL, parentVNode);\n\t\t}\n\t}\n\n\tif ((r = vnode._component) != NULL) {\n\t\tif (r.componentWillUnmount) {\n\t\t\ttry {\n\t\t\t\tr.componentWillUnmount();\n\t\t\t} catch (e) {\n\t\t\t\toptions._catchError(e, parentVNode);\n\t\t\t}\n\t\t}\n\n\t\tr.base = r._parentDom = NULL;\n\t}\n\n\tif ((r = vnode._children)) {\n\t\tfor (let i = 0; i < r.length; i++) {\n\t\t\tif (r[i]) {\n\t\t\t\tunmount(\n\t\t\t\t\tr[i],\n\t\t\t\t\tparentVNode,\n\t\t\t\t\tskipRemove || typeof vnode.type != 'function'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!skipRemove) {\n\t\tremoveNode(vnode._dom);\n\t}\n\n\tvnode._component = vnode._parent = vnode._dom = UNDEFINED;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n", "import { EMPTY_OBJ, NULL } from './constants';\nimport { commitRoot, diff } from './diff/index';\nimport { createElement, Fragment } from './create-element';\nimport options from './options';\nimport { slice } from './util';\n\n/**\n * Render a Preact virtual node into a DOM element\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to render into\n * @param {import('./internal').PreactElement | object} [replaceNode] Optional: Attempt to re-use an\n * existing DOM tree rooted at `replaceNode`\n */\nexport function render(vnode, parentDom, replaceNode) {\n\t// https://github.com/preactjs/preact/issues/3794\n\tif (parentDom == document) {\n\t\tparentDom = document.documentElement;\n\t}\n\n\tif (options._root) options._root(vnode, parentDom);\n\n\t// We abuse the `replaceNode` parameter in `hydrate()` to signal if we are in\n\t// hydration mode or not by passing the `hydrate` function instead of a DOM\n\t// element..\n\tlet isHydrating = typeof replaceNode == 'function';\n\n\t// To be able to support calling `render()` multiple times on the same\n\t// DOM node, we need to obtain a reference to the previous tree. We do\n\t// this by assigning a new `_children` property to DOM nodes which points\n\t// to the last rendered tree. By default this property is not present, which\n\t// means that we are mounting a new tree for the first time.\n\tlet oldVNode = isHydrating\n\t\t? NULL\n\t\t: (replaceNode && replaceNode._children) || parentDom._children;\n\n\tvnode = ((!isHydrating && replaceNode) || parentDom)._children =\n\t\tcreateElement(Fragment, NULL, [vnode]);\n\n\t// List of effects that need to be called after diffing.\n\tlet commitQueue = [],\n\t\trefQueue = [];\n\tdiff(\n\t\tparentDom,\n\t\t// Determine the new vnode tree and store it on the DOM element on\n\t\t// our custom `_children` property.\n\t\tvnode,\n\t\toldVNode || EMPTY_OBJ,\n\t\tEMPTY_OBJ,\n\t\tparentDom.namespaceURI,\n\t\t!isHydrating && replaceNode\n\t\t\t? [replaceNode]\n\t\t\t: oldVNode\n\t\t\t\t? NULL\n\t\t\t\t: parentDom.firstChild\n\t\t\t\t\t? slice.call(parentDom.childNodes)\n\t\t\t\t\t: NULL,\n\t\tcommitQueue,\n\t\t!isHydrating && replaceNode\n\t\t\t? replaceNode\n\t\t\t: oldVNode\n\t\t\t\t? oldVNode._dom\n\t\t\t\t: parentDom.firstChild,\n\t\tisHydrating,\n\t\trefQueue\n\t);\n\n\t// Flush all queued effects\n\tcommitRoot(commitQueue, vnode, refQueue);\n}\n\n/**\n * Update an existing DOM element with data from a Preact virtual node\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to update\n */\nexport function hydrate(vnode, parentDom) {\n\trender(vnode, parentDom, hydrate);\n}\n", "import { assign, slice } from './util';\nimport { createVNode } from './create-element';\nimport { NULL, UNDEFINED } from './constants';\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its\n * children.\n * @param {import('./internal').VNode} vnode The virtual DOM element to clone\n * @param {object} props Attributes/props to add when cloning\n * @param {Array<import('./internal').ComponentChildren>} rest Any additional arguments will be used\n * as replacement children.\n * @returns {import('./internal').VNode}\n */\nexport function cloneElement(vnode, props, children) {\n\tlet normalizedProps = assign({}, vnode.props),\n\t\tkey,\n\t\tref,\n\t\ti;\n\n\tlet defaultProps;\n\n\tif (vnode.type && vnode.type.defaultProps) {\n\t\tdefaultProps = vnode.type.defaultProps;\n\t}\n\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse if (props[i] === UNDEFINED && defaultProps != UNDEFINED) {\n\t\t\tnormalizedProps[i] = defaultProps[i];\n\t\t} else {\n\t\t\tnormalizedProps[i] = props[i];\n\t\t}\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\treturn createVNode(\n\t\tvnode.type,\n\t\tnormalizedProps,\n\t\tkey || vnode.key,\n\t\tref || vnode.ref,\n\t\tNULL\n\t);\n}\n", "import { NULL } from '../constants';\n\n/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw the error that was caught (except\n * for unmounting when this parameter is the highest parent that was being\n * unmounted)\n * @param {import('../internal').VNode} [oldVNode]\n * @param {import('../internal').ErrorInfo} [errorInfo]\n */\nexport function _catchError(error, vnode, oldVNode, errorInfo) {\n\t/** @type {import('../internal').Component} */\n\tlet component,\n\t\t/** @type {import('../internal').ComponentType} */\n\t\tctor,\n\t\t/** @type {boolean} */\n\t\thandled;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tctor = component.constructor;\n\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != NULL) {\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != NULL) {\n\t\t\t\t\tcomponent.componentDidCatch(error, errorInfo || {});\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\n\t\t\t\tif (handled) {\n\t\t\t\t\treturn (component._pendingError = component);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n", "/**\n * Check if an object is a DOM element. Duck-typing based on `nodeType`.\n */\nexport default function isDOMElement(obj) {\n  if (typeof obj !== 'object' || obj === null) return false;\n  if (!('nodeType' in obj)) return false;\n  return obj.nodeType === Node.ELEMENT_NODE;\n}", "import isDOMElement from \"./isDOMElement.js\";\nfunction findDOMElement(element, context) {\n  if (context === void 0) {\n    context = document;\n  }\n  if (typeof element === 'string') {\n    return context.querySelector(element);\n  }\n  if (isDOMElement(element)) {\n    return element;\n  }\n  return null;\n}\nexport default findDOMElement;", "/**\n * Get the declared text direction for an element.\n */\n\nfunction getTextDirection(element) {\n  var _element;\n  // There is another way to determine text direction using getComputedStyle(), as done here:\n  // https://github.com/pencil-js/text-direction/blob/2a235ce95089b3185acec3b51313cbba921b3811/text-direction.js\n  //\n  // We do not use that approach because we are interested specifically in the _declared_ text direction.\n  // If no text direction is declared, we have to provide our own explicit text direction so our\n  // bidirectional CSS style sheets work.\n  while (element && !element.dir) {\n    // eslint-disable-next-line no-param-reassign\n    element = element.parentNode;\n  }\n  return (_element = element) == null ? void 0 : _element.dir;\n}\nexport default getTextDirection;", "/* eslint-disable class-methods-use-this */\n\n/**\n * Core plugin logic that all plugins share.\n *\n * BasePlugin does not contain DOM rendering so it can be used for plugins\n * without a user interface.\n *\n * See `Plugin` for the extended version with Preact rendering for interfaces.\n */\n\nimport Translator from '@uppy/utils/lib/Translator';\n\n/**\n * DefinePluginOpts marks all of the passed AlwaysDefinedKeys as \u201Crequired\u201D or \u201Calways defined\u201D.\n */\n\nexport default class BasePlugin {\n  constructor(uppy, opts) {\n    this.uppy = uppy;\n    this.opts = opts != null ? opts : {};\n  }\n  getPluginState() {\n    const {\n      plugins\n    } = this.uppy.getState();\n    return (plugins == null ? void 0 : plugins[this.id]) || {};\n  }\n  setPluginState(update) {\n    const {\n      plugins\n    } = this.uppy.getState();\n    this.uppy.setState({\n      plugins: {\n        ...plugins,\n        [this.id]: {\n          ...plugins[this.id],\n          ...update\n        }\n      }\n    });\n  }\n  setOptions(newOpts) {\n    this.opts = {\n      ...this.opts,\n      ...newOpts\n    };\n    this.setPluginState(undefined); // so that UI re-renders with new options\n    this.i18nInit();\n  }\n  i18nInit() {\n    const translator = new Translator([this.defaultLocale, this.uppy.locale, this.opts.locale]);\n    this.i18n = translator.translate.bind(translator);\n    this.i18nArray = translator.translateArray.bind(translator);\n    this.setPluginState(undefined); // so that UI re-renders and we see the updated locale\n  }\n\n  /**\n   * Extendable methods\n   * ==================\n   * These methods are here to serve as an overview of the extendable methods as well as\n   * making them not conditional in use, such as `if (this.afterUpdate)`.\n   */\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  addTarget(plugin) {\n    throw new Error(\"Extend the addTarget method to add your plugin to another plugin's target\");\n  }\n  install() {}\n  uninstall() {}\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  update(state) {}\n\n  // Called after every state update, after everything's mounted. Debounced.\n  afterUpdate() {}\n}", "function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\nvar id = 0;\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n/* eslint-disable class-methods-use-this */\nimport { render } from 'preact';\nimport findDOMElement from '@uppy/utils/lib/findDOMElement';\nimport getTextDirection from '@uppy/utils/lib/getTextDirection';\nimport BasePlugin from \"./BasePlugin.js\";\n/**\n * Defer a frequent call to the microtask queue.\n */\nfunction debounce(fn) {\n  let calling = null;\n  let latestArgs;\n  return function () {\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n    latestArgs = args;\n    if (!calling) {\n      calling = Promise.resolve().then(() => {\n        calling = null;\n        // At this point `args` may be different from the most\n        // recent state, if multiple calls happened since this task\n        // was queued. So we use the `latestArgs`, which definitely\n        // is the most recent call.\n        return fn(...latestArgs);\n      });\n    }\n    return calling;\n  };\n}\n\n/**\n * UIPlugin is the extended version of BasePlugin to incorporate rendering with Preact.\n * Use this for plugins that need a user interface.\n *\n * For plugins without an user interface, see BasePlugin.\n */\nvar _updateUI = /*#__PURE__*/_classPrivateFieldLooseKey(\"updateUI\");\nclass UIPlugin extends BasePlugin {\n  constructor() {\n    super(...arguments);\n    Object.defineProperty(this, _updateUI, {\n      writable: true,\n      value: void 0\n    });\n  }\n  getTargetPlugin(target // eslint-disable-line no-use-before-define\n  ) {\n    let targetPlugin;\n    if (typeof (target == null ? void 0 : target.addTarget) === 'function') {\n      // Targeting a plugin *instance*\n      targetPlugin = target;\n      if (!(targetPlugin instanceof UIPlugin)) {\n        // eslint-disable-next-line no-console\n        console.warn(new Error('The provided plugin is not an instance of UIPlugin. This is an indication of a bug with the way Uppy is bundled.', {\n          cause: {\n            targetPlugin,\n            UIPlugin\n          }\n        }));\n      }\n    } else if (typeof target === 'function') {\n      // Targeting a plugin type\n      const Target = target;\n      // Find the target plugin instance.\n      this.uppy.iteratePlugins(p => {\n        if (p instanceof Target) {\n          targetPlugin = p;\n        }\n      });\n    }\n    return targetPlugin;\n  }\n\n  /**\n   * Check if supplied `target` is a DOM element or an `object`.\n   * If it\u2019s an object \u2014 target is a plugin, and we search `plugins`\n   * for a plugin with same name and return its target.\n   */\n  mount(target,\n  // eslint-disable-line no-use-before-define\n  plugin) {\n    const callerPluginName = plugin.id;\n    const targetElement = findDOMElement(target);\n    if (targetElement) {\n      this.isTargetDOMEl = true;\n      // When target is <body> with a single <div> element,\n      // Preact thinks it\u2019s the Uppy root element in there when doing a diff,\n      // and destroys it. So we are creating a fragment (could be empty div)\n      const uppyRootElement = document.createElement('div');\n      uppyRootElement.classList.add('uppy-Root');\n\n      // API for plugins that require a synchronous rerender.\n      _classPrivateFieldLooseBase(this, _updateUI)[_updateUI] = debounce(state => {\n        // plugin could be removed, but this.rerender is debounced below,\n        // so it could still be called even after uppy.removePlugin or uppy.close\n        // hence the check\n        if (!this.uppy.getPlugin(this.id)) return;\n        render(this.render(state), uppyRootElement);\n        this.afterUpdate();\n      });\n      this.uppy.log(`Installing ${callerPluginName} to a DOM element '${target}'`);\n      if (this.opts.replaceTargetContent) {\n        // Doing render(h(null), targetElement), which should have been\n        // a better way, since because the component might need to do additional cleanup when it is removed,\n        // stopped working \u2014 Preact just adds null into target, not replacing\n        targetElement.innerHTML = '';\n      }\n      render(this.render(this.uppy.getState()), uppyRootElement);\n      this.el = uppyRootElement;\n      targetElement.appendChild(uppyRootElement);\n\n      // Set the text direction if the page has not defined one.\n      uppyRootElement.dir = this.opts.direction || getTextDirection(uppyRootElement) || 'ltr';\n      this.onMount();\n      return this.el;\n    }\n    const targetPlugin = this.getTargetPlugin(target);\n    if (targetPlugin) {\n      this.uppy.log(`Installing ${callerPluginName} to ${targetPlugin.id}`);\n      this.parent = targetPlugin;\n      this.el = targetPlugin.addTarget(plugin);\n      this.onMount();\n      return this.el;\n    }\n    this.uppy.log(`Not installing ${callerPluginName}`);\n    let message = `Invalid target option given to ${callerPluginName}.`;\n    if (typeof target === 'function') {\n      message += ' The given target is not a Plugin class. ' + \"Please check that you're not specifying a React Component instead of a plugin. \" + 'If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: ' + 'run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.';\n    } else {\n      message += 'If you meant to target an HTML element, please make sure that the element exists. ' + 'Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. ' + '(see https://github.com/transloadit/uppy/issues/1042)\\n\\n' + 'If you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.';\n    }\n    throw new Error(message);\n  }\n\n  /**\n   * Called when plugin is mounted, whether in DOM or into another plugin.\n   * Needed because sometimes plugins are mounted separately/after `install`,\n   * so this.el and this.parent might not be available in `install`.\n   * This is the case with @uppy/react plugins, for example.\n   */\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  render(state) {\n    throw new Error('Extend the render method to add your plugin to a DOM element');\n  }\n  update(state) {\n    if (this.el != null) {\n      var _classPrivateFieldLoo, _classPrivateFieldLoo2;\n      (_classPrivateFieldLoo = (_classPrivateFieldLoo2 = _classPrivateFieldLooseBase(this, _updateUI))[_updateUI]) == null || _classPrivateFieldLoo.call(_classPrivateFieldLoo2, state);\n    }\n  }\n  unmount() {\n    if (this.isTargetDOMEl) {\n      var _this$el;\n      (_this$el = this.el) == null || _this$el.remove();\n    }\n    this.onUnmount();\n  }\n  onMount() {}\n  onUnmount() {}\n}\nexport default UIPlugin;", "function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\nvar id = 0;\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\nvar _uppy = /*#__PURE__*/_classPrivateFieldLooseKey(\"uppy\");\nvar _events = /*#__PURE__*/_classPrivateFieldLooseKey(\"events\");\n/**\n * Create a wrapper around an event emitter with a `remove` method to remove\n * all events that were added using the wrapped emitter.\n */\nexport default class EventManager {\n  constructor(uppy) {\n    Object.defineProperty(this, _uppy, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _events, {\n      writable: true,\n      value: []\n    });\n    _classPrivateFieldLooseBase(this, _uppy)[_uppy] = uppy;\n  }\n\n  /** @deprecated */\n\n  on(event, fn) {\n    _classPrivateFieldLooseBase(this, _events)[_events].push([event, fn]);\n    return _classPrivateFieldLooseBase(this, _uppy)[_uppy].on(event, fn);\n  }\n  remove() {\n    for (const [event, fn] of _classPrivateFieldLooseBase(this, _events)[_events].splice(0)) {\n      _classPrivateFieldLooseBase(this, _uppy)[_uppy].off(event, fn);\n    }\n  }\n  onFilePause(fileID, cb) {\n    this.on('upload-pause', (targetFileID, isPaused) => {\n      if (fileID === targetFileID) {\n        cb(isPaused);\n      }\n    });\n  }\n  onFileRemove(fileID, cb) {\n    this.on('file-removed', file => {\n      if (fileID === file.id) cb(file.id);\n    });\n  }\n  onPause(fileID, cb) {\n    this.on('upload-pause', (targetFileID, isPaused) => {\n      if (fileID === targetFileID) {\n        // const isPaused = this.#uppy.pauseResume(fileID)\n        cb(isPaused);\n      }\n    });\n  }\n  onRetry(fileID, cb) {\n    this.on('upload-retry', targetFileID => {\n      if (fileID === targetFileID) {\n        cb();\n      }\n    });\n  }\n  onRetryAll(fileID, cb) {\n    this.on('retry-all', () => {\n      if (!_classPrivateFieldLooseBase(this, _uppy)[_uppy].getFile(fileID)) return;\n      cb();\n    });\n  }\n  onPauseAll(fileID, cb) {\n    this.on('pause-all', () => {\n      if (!_classPrivateFieldLooseBase(this, _uppy)[_uppy].getFile(fileID)) return;\n      cb();\n    });\n  }\n  onCancelAll(fileID, eventHandler) {\n    var _this = this;\n    this.on('cancel-all', function () {\n      if (!_classPrivateFieldLooseBase(_this, _uppy)[_uppy].getFile(fileID)) return;\n      eventHandler(...arguments);\n    });\n  }\n  onResumeAll(fileID, cb) {\n    this.on('resume-all', () => {\n      if (!_classPrivateFieldLooseBase(this, _uppy)[_uppy].getFile(fileID)) return;\n      cb();\n    });\n  }\n}", "function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\nvar id = 0;\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\nfunction createCancelError(cause) {\n  return new Error('Cancelled', {\n    cause\n  });\n}\nfunction abortOn(signal) {\n  if (signal != null) {\n    var _this$then;\n    const abortPromise = () => this.abort(signal.reason);\n    signal.addEventListener('abort', abortPromise, {\n      once: true\n    });\n    const removeAbortListener = () => {\n      signal.removeEventListener('abort', abortPromise);\n    };\n    (_this$then = this.then) == null || _this$then.call(this, removeAbortListener, removeAbortListener);\n  }\n  return this;\n}\nvar _activeRequests = /*#__PURE__*/_classPrivateFieldLooseKey(\"activeRequests\");\nvar _queuedHandlers = /*#__PURE__*/_classPrivateFieldLooseKey(\"queuedHandlers\");\nvar _paused = /*#__PURE__*/_classPrivateFieldLooseKey(\"paused\");\nvar _pauseTimer = /*#__PURE__*/_classPrivateFieldLooseKey(\"pauseTimer\");\nvar _downLimit = /*#__PURE__*/_classPrivateFieldLooseKey(\"downLimit\");\nvar _upperLimit = /*#__PURE__*/_classPrivateFieldLooseKey(\"upperLimit\");\nvar _rateLimitingTimer = /*#__PURE__*/_classPrivateFieldLooseKey(\"rateLimitingTimer\");\nvar _call = /*#__PURE__*/_classPrivateFieldLooseKey(\"call\");\nvar _queueNext = /*#__PURE__*/_classPrivateFieldLooseKey(\"queueNext\");\nvar _next = /*#__PURE__*/_classPrivateFieldLooseKey(\"next\");\nvar _queue = /*#__PURE__*/_classPrivateFieldLooseKey(\"queue\");\nvar _dequeue = /*#__PURE__*/_classPrivateFieldLooseKey(\"dequeue\");\nvar _resume = /*#__PURE__*/_classPrivateFieldLooseKey(\"resume\");\nvar _increaseLimit = /*#__PURE__*/_classPrivateFieldLooseKey(\"increaseLimit\");\nexport class RateLimitedQueue {\n  constructor(limit) {\n    Object.defineProperty(this, _dequeue, {\n      value: _dequeue2\n    });\n    Object.defineProperty(this, _queue, {\n      value: _queue2\n    });\n    Object.defineProperty(this, _next, {\n      value: _next2\n    });\n    Object.defineProperty(this, _queueNext, {\n      value: _queueNext2\n    });\n    Object.defineProperty(this, _call, {\n      value: _call2\n    });\n    Object.defineProperty(this, _activeRequests, {\n      writable: true,\n      value: 0\n    });\n    Object.defineProperty(this, _queuedHandlers, {\n      writable: true,\n      value: []\n    });\n    Object.defineProperty(this, _paused, {\n      writable: true,\n      value: false\n    });\n    Object.defineProperty(this, _pauseTimer, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _downLimit, {\n      writable: true,\n      value: 1\n    });\n    Object.defineProperty(this, _upperLimit, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _rateLimitingTimer, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _resume, {\n      writable: true,\n      value: () => this.resume()\n    });\n    Object.defineProperty(this, _increaseLimit, {\n      writable: true,\n      value: () => {\n        if (_classPrivateFieldLooseBase(this, _paused)[_paused]) {\n          _classPrivateFieldLooseBase(this, _rateLimitingTimer)[_rateLimitingTimer] = setTimeout(_classPrivateFieldLooseBase(this, _increaseLimit)[_increaseLimit], 0);\n          return;\n        }\n        _classPrivateFieldLooseBase(this, _downLimit)[_downLimit] = this.limit;\n        this.limit = Math.ceil((_classPrivateFieldLooseBase(this, _upperLimit)[_upperLimit] + _classPrivateFieldLooseBase(this, _downLimit)[_downLimit]) / 2);\n        for (let i = _classPrivateFieldLooseBase(this, _downLimit)[_downLimit]; i <= this.limit; i++) {\n          _classPrivateFieldLooseBase(this, _queueNext)[_queueNext]();\n        }\n        if (_classPrivateFieldLooseBase(this, _upperLimit)[_upperLimit] - _classPrivateFieldLooseBase(this, _downLimit)[_downLimit] > 3) {\n          _classPrivateFieldLooseBase(this, _rateLimitingTimer)[_rateLimitingTimer] = setTimeout(_classPrivateFieldLooseBase(this, _increaseLimit)[_increaseLimit], 2000);\n        } else {\n          _classPrivateFieldLooseBase(this, _downLimit)[_downLimit] = Math.floor(_classPrivateFieldLooseBase(this, _downLimit)[_downLimit] / 2);\n        }\n      }\n    });\n    if (typeof limit !== 'number' || limit === 0) {\n      this.limit = Infinity;\n    } else {\n      this.limit = limit;\n    }\n  }\n  run(fn, queueOptions) {\n    if (!_classPrivateFieldLooseBase(this, _paused)[_paused] && _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] < this.limit) {\n      return _classPrivateFieldLooseBase(this, _call)[_call](fn);\n    }\n    return _classPrivateFieldLooseBase(this, _queue)[_queue](fn, queueOptions);\n  }\n  wrapSyncFunction(fn, queueOptions) {\n    var _this = this;\n    return function () {\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n      const queuedRequest = _this.run(() => {\n        fn(...args);\n        queueMicrotask(() => queuedRequest.done());\n        return () => {};\n      }, queueOptions);\n      return {\n        abortOn,\n        abort() {\n          queuedRequest.abort();\n        }\n      };\n    };\n  }\n  wrapPromiseFunction(fn, queueOptions) {\n    var _this2 = this;\n    return function () {\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n      let queuedRequest;\n      const outerPromise = new Promise((resolve, reject) => {\n        queuedRequest = _this2.run(() => {\n          let cancelError;\n          let innerPromise;\n          try {\n            innerPromise = Promise.resolve(fn(...args));\n          } catch (err) {\n            innerPromise = Promise.reject(err);\n          }\n          innerPromise.then(result => {\n            if (cancelError) {\n              reject(cancelError);\n            } else {\n              queuedRequest.done();\n              resolve(result);\n            }\n          }, err => {\n            if (cancelError) {\n              reject(cancelError);\n            } else {\n              queuedRequest.done();\n              reject(err);\n            }\n          });\n          return cause => {\n            cancelError = createCancelError(cause);\n          };\n        }, queueOptions);\n      });\n      outerPromise.abort = cause => {\n        queuedRequest.abort(cause);\n      };\n      outerPromise.abortOn = abortOn;\n      return outerPromise;\n    };\n  }\n  resume() {\n    _classPrivateFieldLooseBase(this, _paused)[_paused] = false;\n    clearTimeout(_classPrivateFieldLooseBase(this, _pauseTimer)[_pauseTimer]);\n    for (let i = 0; i < this.limit; i++) {\n      _classPrivateFieldLooseBase(this, _queueNext)[_queueNext]();\n    }\n  }\n  /**\n   * Freezes the queue for a while or indefinitely.\n   *\n   * @param {number | null } [duration] Duration for the pause to happen, in milliseconds.\n   *                                    If omitted, the queue won't resume automatically.\n   */\n  pause(duration) {\n    if (duration === void 0) {\n      duration = null;\n    }\n    _classPrivateFieldLooseBase(this, _paused)[_paused] = true;\n    clearTimeout(_classPrivateFieldLooseBase(this, _pauseTimer)[_pauseTimer]);\n    if (duration != null) {\n      _classPrivateFieldLooseBase(this, _pauseTimer)[_pauseTimer] = setTimeout(_classPrivateFieldLooseBase(this, _resume)[_resume], duration);\n    }\n  }\n\n  /**\n   * Pauses the queue for a duration, and lower the limit of concurrent requests\n   * when the queue resumes. When the queue resumes, it tries to progressively\n   * increase the limit in `this.#increaseLimit` until another call is made to\n   * `this.rateLimit`.\n   * Call this function when using the RateLimitedQueue for network requests and\n   * the remote server responds with 429 HTTP code.\n   *\n   * @param {number} duration in milliseconds.\n   */\n  rateLimit(duration) {\n    clearTimeout(_classPrivateFieldLooseBase(this, _rateLimitingTimer)[_rateLimitingTimer]);\n    this.pause(duration);\n    if (this.limit > 1 && Number.isFinite(this.limit)) {\n      _classPrivateFieldLooseBase(this, _upperLimit)[_upperLimit] = this.limit - 1;\n      this.limit = _classPrivateFieldLooseBase(this, _downLimit)[_downLimit];\n      _classPrivateFieldLooseBase(this, _rateLimitingTimer)[_rateLimitingTimer] = setTimeout(_classPrivateFieldLooseBase(this, _increaseLimit)[_increaseLimit], duration);\n    }\n  }\n  get isPaused() {\n    return _classPrivateFieldLooseBase(this, _paused)[_paused];\n  }\n}\nfunction _call2(fn) {\n  _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] += 1;\n  let done = false;\n  let cancelActive;\n  try {\n    cancelActive = fn();\n  } catch (err) {\n    _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] -= 1;\n    throw err;\n  }\n  return {\n    abort: cause => {\n      if (done) return;\n      done = true;\n      _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] -= 1;\n      cancelActive == null || cancelActive(cause);\n      _classPrivateFieldLooseBase(this, _queueNext)[_queueNext]();\n    },\n    done: () => {\n      if (done) return;\n      done = true;\n      _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] -= 1;\n      _classPrivateFieldLooseBase(this, _queueNext)[_queueNext]();\n    }\n  };\n}\nfunction _queueNext2() {\n  // Do it soon but not immediately, this allows clearing out the entire queue synchronously\n  // one by one without continuously _advancing_ it (and starting new tasks before immediately\n  // aborting them)\n  queueMicrotask(() => _classPrivateFieldLooseBase(this, _next)[_next]());\n}\nfunction _next2() {\n  if (_classPrivateFieldLooseBase(this, _paused)[_paused] || _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] >= this.limit) {\n    return;\n  }\n  if (_classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].length === 0) {\n    return;\n  }\n\n  // Dispatch the next request, and update the abort/done handlers\n  // so that cancelling it does the Right Thing (and doesn't just try\n  // to dequeue an already-running request).\n  const next = _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].shift();\n  if (next == null) {\n    throw new Error('Invariant violation: next is null');\n  }\n  const handler = _classPrivateFieldLooseBase(this, _call)[_call](next.fn);\n  next.abort = handler.abort;\n  next.done = handler.done;\n}\nfunction _queue2(fn, options) {\n  const handler = {\n    fn,\n    priority: (options == null ? void 0 : options.priority) || 0,\n    abort: () => {\n      _classPrivateFieldLooseBase(this, _dequeue)[_dequeue](handler);\n    },\n    done: () => {\n      throw new Error('Cannot mark a queued request as done: this indicates a bug');\n    }\n  };\n  const index = _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].findIndex(other => {\n    return handler.priority > other.priority;\n  });\n  if (index === -1) {\n    _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].push(handler);\n  } else {\n    _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].splice(index, 0, handler);\n  }\n  return handler;\n}\nfunction _dequeue2(handler) {\n  const index = _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].indexOf(handler);\n  if (index !== -1) {\n    _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].splice(index, 1);\n  }\n}\nexport const internalRateLimitedQueue = Symbol('__queue');", "class NetworkError extends Error {\n  constructor(error, xhr) {\n    if (xhr === void 0) {\n      xhr = null;\n    }\n    super(`This looks like a network error, the endpoint might be blocked by an internet provider or a firewall.`);\n    this.cause = error;\n    this.isNetworkError = true;\n    this.request = xhr;\n  }\n}\nexport default NetworkError;", "function isNetworkError(xhr) {\n  if (!xhr) {\n    return false;\n  }\n  return xhr.readyState !== 0 && xhr.readyState !== 4 || xhr.status === 0;\n}\nexport default isNetworkError;", "function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\nvar id = 0;\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\nvar _aliveTimer = /*#__PURE__*/_classPrivateFieldLooseKey(\"aliveTimer\");\nvar _isDone = /*#__PURE__*/_classPrivateFieldLooseKey(\"isDone\");\nvar _onTimedOut = /*#__PURE__*/_classPrivateFieldLooseKey(\"onTimedOut\");\nvar _timeout = /*#__PURE__*/_classPrivateFieldLooseKey(\"timeout\");\n/**\n * Helper to abort upload requests if there has not been any progress for `timeout` ms.\n * Create an instance using `timer = new ProgressTimeout(10000, onTimeout)`\n * Call `timer.progress()` to signal that there has been progress of any kind.\n * Call `timer.done()` when the upload has completed.\n */\nclass ProgressTimeout {\n  constructor(timeout,\n  // eslint-disable-next-line no-shadow\n  timeoutHandler) {\n    Object.defineProperty(this, _aliveTimer, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _isDone, {\n      writable: true,\n      value: false\n    });\n    Object.defineProperty(this, _onTimedOut, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _timeout, {\n      writable: true,\n      value: void 0\n    });\n    _classPrivateFieldLooseBase(this, _timeout)[_timeout] = timeout;\n    _classPrivateFieldLooseBase(this, _onTimedOut)[_onTimedOut] = () => timeoutHandler(timeout);\n  }\n  progress() {\n    // Some browsers fire another progress event when the upload is\n    // cancelled, so we have to ignore progress after the timer was\n    // told to stop.\n    if (_classPrivateFieldLooseBase(this, _isDone)[_isDone]) return;\n    if (_classPrivateFieldLooseBase(this, _timeout)[_timeout] > 0) {\n      clearTimeout(_classPrivateFieldLooseBase(this, _aliveTimer)[_aliveTimer]);\n      _classPrivateFieldLooseBase(this, _aliveTimer)[_aliveTimer] = setTimeout(_classPrivateFieldLooseBase(this, _onTimedOut)[_onTimedOut], _classPrivateFieldLooseBase(this, _timeout)[_timeout]);\n    }\n  }\n  done() {\n    if (!_classPrivateFieldLooseBase(this, _isDone)[_isDone]) {\n      clearTimeout(_classPrivateFieldLooseBase(this, _aliveTimer)[_aliveTimer]);\n      _classPrivateFieldLooseBase(this, _aliveTimer)[_aliveTimer] = undefined;\n      _classPrivateFieldLooseBase(this, _isDone)[_isDone] = true;\n    }\n  }\n}\nexport default ProgressTimeout;", "import NetworkError from \"./NetworkError.js\";\nimport ProgressTimeout from \"./ProgressTimeout.js\";\nconst noop = () => {};\n/**\n * Fetches data from a specified URL using XMLHttpRequest, with optional retry functionality and progress tracking.\n *\n * @param url The URL to send the request to.\n * @param options Optional settings for the fetch operation.\n */\nexport function fetcher(url, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  const {\n    body = null,\n    headers = {},\n    method = 'GET',\n    onBeforeRequest = noop,\n    onUploadProgress = noop,\n    shouldRetry = () => true,\n    onAfterRequest = noop,\n    onTimeout = noop,\n    responseType,\n    retries = 3,\n    signal = null,\n    timeout = 30000,\n    withCredentials = false\n  } = options;\n\n  // 300 ms, 600 ms, 1200 ms, 2400 ms, 4800 ms\n  const delay = attempt => 0.3 * 2 ** (attempt - 1) * 1000;\n  const timer = new ProgressTimeout(timeout, onTimeout);\n  function requestWithRetry(retryCount) {\n    if (retryCount === void 0) {\n      retryCount = 0;\n    }\n    // eslint-disable-next-line no-async-promise-executor\n    return new Promise(async (resolve, reject) => {\n      const xhr = new XMLHttpRequest();\n      xhr.open(method, url, true);\n      xhr.withCredentials = withCredentials;\n      if (responseType) {\n        xhr.responseType = responseType;\n      }\n      signal == null || signal.addEventListener('abort', () => {\n        xhr.abort();\n        // Using DOMException for abort errors aligns with\n        // the convention established by the Fetch API.\n        reject(new DOMException('Aborted', 'AbortError'));\n      });\n      xhr.onload = async () => {\n        await onAfterRequest(xhr, retryCount);\n        if (xhr.status >= 200 && xhr.status < 300) {\n          timer.done();\n          resolve(xhr);\n        } else if (shouldRetry(xhr) && retryCount < retries) {\n          setTimeout(() => {\n            requestWithRetry(retryCount + 1).then(resolve, reject);\n          }, delay(retryCount));\n        } else {\n          timer.done();\n          reject(new NetworkError(xhr.statusText, xhr));\n        }\n      };\n      xhr.onerror = () => {\n        if (shouldRetry(xhr) && retryCount < retries) {\n          setTimeout(() => {\n            requestWithRetry(retryCount + 1).then(resolve, reject);\n          }, delay(retryCount));\n        } else {\n          timer.done();\n          reject(new NetworkError(xhr.statusText, xhr));\n        }\n      };\n      xhr.upload.onprogress = event => {\n        timer.progress();\n        onUploadProgress(event);\n      };\n      if (headers) {\n        Object.keys(headers).forEach(key => {\n          xhr.setRequestHeader(key, headers[key]);\n        });\n      }\n      await onBeforeRequest(xhr, retryCount);\n      xhr.send(body);\n    });\n  }\n  return requestWithRetry();\n}", "export function filterNonFailedFiles(files) {\n  const hasError = file => 'error' in file && !!file.error;\n  return files.filter(file => !hasError(file));\n}\n\n// Don't double-emit upload-started for Golden Retriever-restored files that were already started\nexport function filterFilesToEmitUploadStarted(files) {\n  return files.filter(file => {\n    var _file$progress;\n    return !((_file$progress = file.progress) != null && _file$progress.uploadStarted) || !file.isRestored;\n  });\n}", "export default {\n  strings: {\n    // Shown in the Informer if an upload is being canceled because it stalled for too long.\n    uploadStalled: 'Upload has not made any progress for %{seconds} seconds. You may want to retry it.'\n  }\n};", "function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\nvar id = 0;\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\nimport BasePlugin from '@uppy/core/lib/BasePlugin.js';\nimport EventManager from '@uppy/core/lib/EventManager.js';\nimport { RateLimitedQueue, internalRateLimitedQueue\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore untyped\n} from '@uppy/utils/lib/RateLimitedQueue';\nimport NetworkError from '@uppy/utils/lib/NetworkError';\nimport isNetworkError from '@uppy/utils/lib/isNetworkError';\nimport { fetcher } from '@uppy/utils/lib/fetcher';\nimport { filterNonFailedFiles, filterFilesToEmitUploadStarted } from '@uppy/utils/lib/fileFilters';\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore We don't want TS to generate types for the package.json\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore We don't want TS to generate types for the package.json\nconst packageJson = {\n  \"version\": \"3.6.8\"\n};\nimport locale from \"./locale.js\";\nfunction buildResponseError(xhr, err) {\n  let error = err;\n  // No error message\n  if (!error) error = new Error('Upload error');\n  // Got an error message string\n  if (typeof error === 'string') error = new Error(error);\n  // Got something else\n  if (!(error instanceof Error)) {\n    error = Object.assign(new Error('Upload error'), {\n      data: error\n    });\n  }\n  if (isNetworkError(xhr)) {\n    error = new NetworkError(error, xhr);\n    return error;\n  }\n\n  // @ts-expect-error request can only be set on NetworkError\n  // but we use NetworkError to distinguish between errors.\n  error.request = xhr;\n  return error;\n}\n\n/**\n * Set `data.type` in the blob to `file.meta.type`,\n * because we might have detected a more accurate file type in Uppy\n * https://stackoverflow.com/a/50875615\n */\nfunction setTypeInBlob(file) {\n  const dataWithUpdatedType = file.data.slice(0, file.data.size, file.meta.type);\n  return dataWithUpdatedType;\n}\nconst defaultOptions = {\n  formData: true,\n  fieldName: 'file',\n  method: 'post',\n  allowedMetaFields: null,\n  responseUrlFieldName: 'url',\n  bundle: false,\n  headers: {},\n  timeout: 30 * 1000,\n  limit: 5,\n  withCredentials: false,\n  responseType: '',\n  getResponseData(responseText) {\n    let parsedResponse = {};\n    try {\n      parsedResponse = JSON.parse(responseText);\n    } catch {\n      // ignore\n    }\n    // We don't have access to the B (Body) generic here\n    // so we have to cast it to any. The user facing types\n    // remain correct, this is only to please the merging of default options.\n    return parsedResponse;\n  },\n  getResponseError(_, response) {\n    let error = new Error('Upload error');\n    if (isNetworkError(response)) {\n      error = new NetworkError(error, response);\n    }\n    return error;\n  },\n  validateStatus(status) {\n    return status >= 200 && status < 300;\n  }\n};\nvar _getFetcher = /*#__PURE__*/_classPrivateFieldLooseKey(\"getFetcher\");\nvar _uploadLocalFile = /*#__PURE__*/_classPrivateFieldLooseKey(\"uploadLocalFile\");\nvar _uploadBundle = /*#__PURE__*/_classPrivateFieldLooseKey(\"uploadBundle\");\nvar _getCompanionClientArgs = /*#__PURE__*/_classPrivateFieldLooseKey(\"getCompanionClientArgs\");\nvar _uploadFiles = /*#__PURE__*/_classPrivateFieldLooseKey(\"uploadFiles\");\nvar _handleUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"handleUpload\");\nexport default class XHRUpload extends BasePlugin {\n  constructor(uppy, _opts) {\n    super(uppy, {\n      ...defaultOptions,\n      fieldName: _opts.bundle ? 'files[]' : 'file',\n      ..._opts\n    });\n    Object.defineProperty(this, _uploadFiles, {\n      value: _uploadFiles2\n    });\n    Object.defineProperty(this, _getCompanionClientArgs, {\n      value: _getCompanionClientArgs2\n    });\n    Object.defineProperty(this, _uploadBundle, {\n      value: _uploadBundle2\n    });\n    Object.defineProperty(this, _uploadLocalFile, {\n      value: _uploadLocalFile2\n    });\n    Object.defineProperty(this, _getFetcher, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _handleUpload, {\n      writable: true,\n      value: async fileIDs => {\n        if (fileIDs.length === 0) {\n          this.uppy.log('[XHRUpload] No files to upload!');\n          return;\n        }\n\n        // No limit configured by the user, and no RateLimitedQueue passed in by a \"parent\" plugin\n        // (basically just AwsS3) using the internal symbol\n        // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n        // @ts-ignore untyped internal\n        if (this.opts.limit === 0 && !this.opts[internalRateLimitedQueue]) {\n          this.uppy.log('[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0', 'warning');\n        }\n        this.uppy.log('[XHRUpload] Uploading...');\n        const files = this.uppy.getFilesByIds(fileIDs);\n        const filesFiltered = filterNonFailedFiles(files);\n        const filesToEmit = filterFilesToEmitUploadStarted(filesFiltered);\n        this.uppy.emit('upload-start', filesToEmit);\n        if (this.opts.bundle) {\n          // if bundle: true, we don\u2019t support remote uploads\n          const isSomeFileRemote = filesFiltered.some(file => file.isRemote);\n          if (isSomeFileRemote) {\n            throw new Error('Can\u2019t upload remote files when the `bundle: true` option is set');\n          }\n          if (typeof this.opts.headers === 'function') {\n            throw new TypeError('`headers` may not be a function when the `bundle: true` option is set');\n          }\n          await _classPrivateFieldLooseBase(this, _uploadBundle)[_uploadBundle](filesFiltered);\n        } else {\n          await _classPrivateFieldLooseBase(this, _uploadFiles)[_uploadFiles](filesFiltered);\n        }\n      }\n    });\n    this.type = 'uploader';\n    this.id = this.opts.id || 'XHRUpload';\n    this.defaultLocale = locale;\n    this.i18nInit();\n\n    // Simultaneous upload limiting is shared across all uploads with this plugin.\n    if (internalRateLimitedQueue in this.opts) {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-ignore untyped internal\n      this.requests = this.opts[internalRateLimitedQueue];\n    } else {\n      this.requests = new RateLimitedQueue(this.opts.limit);\n    }\n    if (this.opts.bundle && !this.opts.formData) {\n      throw new Error('`opts.formData` must be true when `opts.bundle` is enabled.');\n    }\n    if (this.opts.bundle && typeof this.opts.headers === 'function') {\n      throw new Error('`opts.headers` can not be a function when the `bundle: true` option is set.');\n    }\n    if ((_opts == null ? void 0 : _opts.allowedMetaFields) === undefined && 'metaFields' in this.opts) {\n      throw new Error('The `metaFields` option has been renamed to `allowedMetaFields`.');\n    }\n    this.uploaderEvents = Object.create(null);\n    /**\n     * xhr-upload wrapper for `fetcher` to handle user options\n     * `validateStatus`, `getResponseError`, `getResponseData`\n     * and to emit `upload-progress`, `upload-error`, and `upload-success` events.\n     */\n    _classPrivateFieldLooseBase(this, _getFetcher)[_getFetcher] = files => {\n      return async (url, options) => {\n        try {\n          var _options$method;\n          const res = await fetcher(url, {\n            ...options,\n            method: options == null || (_options$method = options.method) == null ? void 0 : _options$method.toUpperCase(),\n            onTimeout: timeout => {\n              const seconds = Math.ceil(timeout / 1000);\n              const error = new Error(this.i18n('uploadStalled', {\n                seconds\n              }));\n              this.uppy.emit('upload-stalled', error, files);\n            },\n            onUploadProgress: event => {\n              if (event.lengthComputable) {\n                for (const file of files) {\n                  this.uppy.emit('upload-progress', file, {\n                    // TODO: do not send `uploader` in next major\n                    // @ts-expect-error we can't type this and we should remove it\n                    uploader: this,\n                    bytesUploaded: event.loaded / event.total * file.size,\n                    bytesTotal: file.size\n                  });\n                }\n              }\n            }\n          });\n          if (!this.opts.validateStatus(res.status, res.responseText, res)) {\n            throw new NetworkError(res.statusText, res);\n          }\n          const body = this.opts.getResponseData(res.responseText, res);\n          const uploadURL = body == null ? void 0 : body[this.opts.responseUrlFieldName];\n          for (const file of files) {\n            this.uppy.emit('upload-success', file, {\n              status: res.status,\n              body,\n              uploadURL\n            });\n          }\n          return res;\n        } catch (error) {\n          if (error.name === 'AbortError') {\n            return undefined;\n          }\n          if (error instanceof NetworkError) {\n            const request = error.request;\n            const customError = buildResponseError(request, this.opts.getResponseError(request.responseText, request));\n            for (const file of files) {\n              this.uppy.emit('upload-error', file, customError);\n            }\n          }\n          throw error;\n        }\n      };\n    };\n  }\n  getOptions(file) {\n    const overrides = this.uppy.getState().xhrUpload;\n    const {\n      headers\n    } = this.opts;\n    const opts = {\n      ...this.opts,\n      ...(overrides || {}),\n      ...(file.xhrUpload || {}),\n      headers: {}\n    };\n    // Support for `headers` as a function, only in the XHRUpload settings.\n    // Options set by other plugins in Uppy state or on the files themselves are still merged in afterward.\n    //\n    // ```js\n    // headers: (file) => ({ expires: file.meta.expires })\n    // ```\n    if (typeof headers === 'function') {\n      opts.headers = headers(file);\n    } else {\n      Object.assign(opts.headers, this.opts.headers);\n    }\n    if (overrides) {\n      Object.assign(opts.headers, overrides.headers);\n    }\n    if (file.xhrUpload) {\n      Object.assign(opts.headers, file.xhrUpload.headers);\n    }\n    return opts;\n  }\n\n  // eslint-disable-next-line class-methods-use-this\n  addMetadata(formData, meta, opts) {\n    const allowedMetaFields = Array.isArray(opts.allowedMetaFields) ? opts.allowedMetaFields : Object.keys(meta); // Send along all fields by default.\n\n    allowedMetaFields.forEach(item => {\n      const value = meta[item];\n      if (Array.isArray(value)) {\n        // In this case we don't transform `item` to add brackets, it's up to\n        // the user to add the brackets so it won't be overridden.\n        value.forEach(subItem => formData.append(item, subItem));\n      } else {\n        formData.append(item, value);\n      }\n    });\n  }\n  createFormDataUpload(file, opts) {\n    const formPost = new FormData();\n    this.addMetadata(formPost, file.meta, opts);\n    const dataWithUpdatedType = setTypeInBlob(file);\n    if (file.name) {\n      formPost.append(opts.fieldName, dataWithUpdatedType, file.meta.name);\n    } else {\n      formPost.append(opts.fieldName, dataWithUpdatedType);\n    }\n    return formPost;\n  }\n  createBundledUpload(files, opts) {\n    const formPost = new FormData();\n    const {\n      meta\n    } = this.uppy.getState();\n    this.addMetadata(formPost, meta, opts);\n    files.forEach(file => {\n      const options = this.getOptions(file);\n      const dataWithUpdatedType = setTypeInBlob(file);\n      if (file.name) {\n        formPost.append(options.fieldName, dataWithUpdatedType, file.name);\n      } else {\n        formPost.append(options.fieldName, dataWithUpdatedType);\n      }\n    });\n    return formPost;\n  }\n  install() {\n    if (this.opts.bundle) {\n      const {\n        capabilities\n      } = this.uppy.getState();\n      this.uppy.setState({\n        capabilities: {\n          ...capabilities,\n          individualCancellation: false\n        }\n      });\n    }\n    this.uppy.addUploader(_classPrivateFieldLooseBase(this, _handleUpload)[_handleUpload]);\n  }\n  uninstall() {\n    if (this.opts.bundle) {\n      const {\n        capabilities\n      } = this.uppy.getState();\n      this.uppy.setState({\n        capabilities: {\n          ...capabilities,\n          individualCancellation: true\n        }\n      });\n    }\n    this.uppy.removeUploader(_classPrivateFieldLooseBase(this, _handleUpload)[_handleUpload]);\n  }\n}\nasync function _uploadLocalFile2(file) {\n  const events = new EventManager(this.uppy);\n  const controller = new AbortController();\n  const uppyFetch = this.requests.wrapPromiseFunction(async () => {\n    const opts = this.getOptions(file);\n    const fetch = _classPrivateFieldLooseBase(this, _getFetcher)[_getFetcher]([file]);\n    const body = opts.formData ? this.createFormDataUpload(file, opts) : file.data;\n    return fetch(opts.endpoint, {\n      ...opts,\n      body,\n      signal: controller.signal\n    });\n  });\n  events.onFileRemove(file.id, () => controller.abort());\n  events.onCancelAll(file.id, _ref => {\n    let {\n      reason\n    } = _ref;\n    if (reason === 'user') {\n      controller.abort();\n    }\n  });\n  try {\n    await uppyFetch().abortOn(controller.signal);\n  } catch (error) {\n    // TODO: create formal error with name 'AbortError' (this comes from RateLimitedQueue)\n    if (error.message !== 'Cancelled') {\n      throw error;\n    }\n  } finally {\n    events.remove();\n  }\n}\nasync function _uploadBundle2(files) {\n  const controller = new AbortController();\n  const uppyFetch = this.requests.wrapPromiseFunction(async () => {\n    var _this$uppy$getState$x;\n    const optsFromState = (_this$uppy$getState$x = this.uppy.getState().xhrUpload) != null ? _this$uppy$getState$x : {};\n    const fetch = _classPrivateFieldLooseBase(this, _getFetcher)[_getFetcher](files);\n    const body = this.createBundledUpload(files, {\n      ...this.opts,\n      ...optsFromState\n    });\n    return fetch(this.opts.endpoint, {\n      // headers can't be a function with bundle: true\n      ...this.opts,\n      body,\n      signal: controller.signal\n    });\n  });\n  function abort() {\n    controller.abort();\n  }\n\n  // We only need to abort on cancel all because\n  // individual cancellations are not possible with bundle: true\n  this.uppy.once('cancel-all', abort);\n  try {\n    await uppyFetch().abortOn(controller.signal);\n  } catch (error) {\n    // TODO: create formal error with name 'AbortError' (this comes from RateLimitedQueue)\n    if (error.message !== 'Cancelled') {\n      throw error;\n    }\n  } finally {\n    this.uppy.off('cancel-all', abort);\n  }\n}\nfunction _getCompanionClientArgs2(file) {\n  var _file$remote;\n  const opts = this.getOptions(file);\n  const allowedMetaFields = Array.isArray(opts.allowedMetaFields) ? opts.allowedMetaFields\n  // Send along all fields by default.\n  : Object.keys(file.meta);\n  return {\n    ...((_file$remote = file.remote) == null ? void 0 : _file$remote.body),\n    protocol: 'multipart',\n    endpoint: opts.endpoint,\n    size: file.data.size,\n    fieldname: opts.fieldName,\n    metadata: Object.fromEntries(allowedMetaFields.map(name => [name, file.meta[name]])),\n    httpMethod: opts.method,\n    useFormData: opts.formData,\n    headers: opts.headers\n  };\n}\nasync function _uploadFiles2(files) {\n  await Promise.allSettled(files.map(file => {\n    if (file.isRemote) {\n      const getQueue = () => this.requests;\n      const controller = new AbortController();\n      const removedHandler = removedFile => {\n        if (removedFile.id === file.id) controller.abort();\n      };\n      this.uppy.on('file-removed', removedHandler);\n      const uploadPromise = this.uppy.getRequestClientForFile(file).uploadRemoteFile(file, _classPrivateFieldLooseBase(this, _getCompanionClientArgs)[_getCompanionClientArgs](file), {\n        signal: controller.signal,\n        getQueue\n      });\n      this.requests.wrapSyncFunction(() => {\n        this.uppy.off('file-removed', removedHandler);\n      }, {\n        priority: -1\n      })();\n      return uploadPromise;\n    }\n    return _classPrivateFieldLooseBase(this, _uploadLocalFile)[_uploadLocalFile](file);\n  }));\n}\n// eslint-disable-next-line global-require\nXHRUpload.VERSION = packageJson.version;", "/**\n * Low-pass filter using Exponential Moving Averages (aka exponential smoothing)\n * Filters a sequence of values by updating the mixing the previous output value\n * with the new input using the exponential window function\n *\n * @param newValue the n-th value of the sequence\n * @param previousSmoothedValue the exponential average of the first n-1 values\n * @param halfLife value of `dt` to move the smoothed value halfway between `previousFilteredValue` and `newValue`\n * @param dt time elapsed between adding the (n-1)th and the n-th values\n * @returns the exponential average of the first n values\n */\nexport default function emaFilter(newValue, previousSmoothedValue, halfLife, dt) {\n  if (halfLife === 0 || newValue === previousSmoothedValue) return newValue;\n  if (dt === 0) return previousSmoothedValue;\n  return newValue + (previousSmoothedValue - newValue) * 2 ** (-dt / halfLife);\n}", "export default {\n  STATE_ERROR: 'error',\n  STATE_WAITING: 'waiting',\n  STATE_PREPROCESSING: 'preprocessing',\n  STATE_UPLOADING: 'uploading',\n  STATE_POSTPROCESSING: 'postprocessing',\n  STATE_COMPLETE: 'complete'\n};", "import { h } from 'preact';\nimport classNames from 'classnames';\nimport statusBarStates from \"./StatusBarStates.js\";\nimport calculateProcessingProgress from \"./calculateProcessingProgress.js\";\nimport { UploadBtn, RetryBtn, CancelBtn, PauseResumeButton, DoneBtn, ProgressBarProcessing, ProgressBarError, ProgressBarUploading, ProgressBarComplete } from \"./Components.js\";\nconst {\n  STATE_ERROR,\n  STATE_WAITING,\n  STATE_PREPROCESSING,\n  STATE_UPLOADING,\n  STATE_POSTPROCESSING,\n  STATE_COMPLETE\n} = statusBarStates;\n// TODO: rename the function to StatusBarUI on the next major.\nexport default function StatusBar(props) {\n  const {\n    newFiles,\n    allowNewUpload,\n    isUploadInProgress,\n    isAllPaused,\n    resumableUploads,\n    error,\n    hideUploadButton,\n    hidePauseResumeButton,\n    hideCancelButton,\n    hideRetryButton,\n    recoveredState,\n    uploadState,\n    totalProgress,\n    files,\n    supportsUploadProgress,\n    hideAfterFinish,\n    isSomeGhost,\n    doneButtonHandler,\n    isUploadStarted,\n    i18n,\n    startUpload,\n    uppy,\n    isAllComplete,\n    showProgressDetails,\n    numUploads,\n    complete,\n    totalSize,\n    totalETA,\n    totalUploadedSize\n  } = props;\n  function getProgressValue() {\n    switch (uploadState) {\n      case STATE_POSTPROCESSING:\n      case STATE_PREPROCESSING:\n        {\n          const progress = calculateProcessingProgress(files);\n          if (progress.mode === 'determinate') {\n            return progress.value * 100;\n          }\n          return totalProgress;\n        }\n      case STATE_ERROR:\n        {\n          return null;\n        }\n      case STATE_UPLOADING:\n        {\n          if (!supportsUploadProgress) {\n            return null;\n          }\n          return totalProgress;\n        }\n      default:\n        return totalProgress;\n    }\n  }\n  function getIsIndeterminate() {\n    switch (uploadState) {\n      case STATE_POSTPROCESSING:\n      case STATE_PREPROCESSING:\n        {\n          const {\n            mode\n          } = calculateProcessingProgress(files);\n          return mode === 'indeterminate';\n        }\n      case STATE_UPLOADING:\n        {\n          if (!supportsUploadProgress) {\n            return true;\n          }\n          return false;\n        }\n      default:\n        return false;\n    }\n  }\n  function getIsHidden() {\n    if (recoveredState) {\n      return false;\n    }\n    switch (uploadState) {\n      case STATE_WAITING:\n        return hideUploadButton || newFiles === 0;\n      case STATE_COMPLETE:\n        return hideAfterFinish;\n      default:\n        return false;\n    }\n  }\n  const progressValue = getProgressValue();\n  const isHidden = getIsHidden();\n  const width = progressValue != null ? progressValue : 100;\n  const showUploadBtn = !error && newFiles && !isUploadInProgress && !isAllPaused && allowNewUpload && !hideUploadButton;\n  const showCancelBtn = !hideCancelButton && uploadState !== STATE_WAITING && uploadState !== STATE_COMPLETE;\n  const showPauseResumeBtn = resumableUploads && !hidePauseResumeButton && uploadState === STATE_UPLOADING;\n  const showRetryBtn = error && !isAllComplete && !hideRetryButton;\n  const showDoneBtn = doneButtonHandler && uploadState === STATE_COMPLETE;\n  const progressClassNames = classNames('uppy-StatusBar-progress', {\n    'is-indeterminate': getIsIndeterminate()\n  });\n  const statusBarClassNames = classNames('uppy-StatusBar', `is-${uploadState}`, {\n    'has-ghosts': isSomeGhost\n  });\n  return h(\"div\", {\n    className: statusBarClassNames,\n    \"aria-hidden\": isHidden\n  }, h(\"div\", {\n    className: progressClassNames,\n    style: {\n      width: `${width}%`\n    },\n    role: \"progressbar\",\n    \"aria-label\": `${width}%`,\n    \"aria-valuetext\": `${width}%`,\n    \"aria-valuemin\": 0,\n    \"aria-valuemax\": 100,\n    \"aria-valuenow\": progressValue\n  }), (() => {\n    switch (uploadState) {\n      case STATE_PREPROCESSING:\n      case STATE_POSTPROCESSING:\n        return h(ProgressBarProcessing, {\n          progress: calculateProcessingProgress(files)\n        });\n      case STATE_COMPLETE:\n        return h(ProgressBarComplete, {\n          i18n: i18n\n        });\n      case STATE_ERROR:\n        return h(ProgressBarError, {\n          error: error,\n          i18n: i18n,\n          numUploads: numUploads,\n          complete: complete\n        });\n      case STATE_UPLOADING:\n        return h(ProgressBarUploading, {\n          i18n: i18n,\n          supportsUploadProgress: supportsUploadProgress,\n          totalProgress: totalProgress,\n          showProgressDetails: showProgressDetails,\n          isUploadStarted: isUploadStarted,\n          isAllComplete: isAllComplete,\n          isAllPaused: isAllPaused,\n          newFiles: newFiles,\n          numUploads: numUploads,\n          complete: complete,\n          totalUploadedSize: totalUploadedSize,\n          totalSize: totalSize,\n          totalETA: totalETA,\n          startUpload: startUpload\n        });\n      default:\n        return null;\n    }\n  })(), h(\"div\", {\n    className: \"uppy-StatusBar-actions\"\n  }, recoveredState || showUploadBtn ? h(UploadBtn, {\n    newFiles: newFiles,\n    isUploadStarted: isUploadStarted,\n    recoveredState: recoveredState,\n    i18n: i18n,\n    isSomeGhost: isSomeGhost,\n    startUpload: startUpload,\n    uploadState: uploadState\n  }) : null, showRetryBtn ? h(RetryBtn, {\n    i18n: i18n,\n    uppy: uppy\n  }) : null, showPauseResumeBtn ? h(PauseResumeButton, {\n    isAllPaused: isAllPaused,\n    i18n: i18n,\n    isAllComplete: isAllComplete,\n    resumableUploads: resumableUploads,\n    uppy: uppy\n  }) : null, showCancelBtn ? h(CancelBtn, {\n    i18n: i18n,\n    uppy: uppy\n  }) : null, showDoneBtn ? h(DoneBtn, {\n    i18n: i18n,\n    doneButtonHandler: doneButtonHandler\n  }) : null));\n}\nStatusBar.defaultProps = {\n  doneButtonHandler: undefined,\n  hideAfterFinish: false,\n  hideCancelButton: false,\n  hidePauseResumeButton: false,\n  hideRetryButton: false,\n  hideUploadButton: undefined,\n  showProgressDetails: undefined\n};", "export default function calculateProcessingProgress(files) {\n  const values = [];\n  let mode = 'indeterminate';\n  let message;\n  for (const {\n    progress\n  } of Object.values(files)) {\n    const {\n      preprocess,\n      postprocess\n    } = progress;\n    // In the future we should probably do this differently. For now we'll take the\n    // mode and message from the first file\u2026\n    if (message == null && (preprocess || postprocess)) {\n      ;\n      ({\n        mode,\n        message\n      } = preprocess || postprocess);\n    }\n    if ((preprocess == null ? void 0 : preprocess.mode) === 'determinate') values.push(preprocess.value);\n    if ((postprocess == null ? void 0 : postprocess.mode) === 'determinate') values.push(postprocess.value);\n  }\n  const value = values.reduce((total, progressValue) => {\n    return total + progressValue / values.length;\n  }, 0);\n  return {\n    mode,\n    message,\n    value\n  };\n}", "import { h } from 'preact';\nimport classNames from 'classnames';\nimport prettierBytes from '@transloadit/prettier-bytes';\nimport prettyETA from '@uppy/utils/lib/prettyETA';\nimport statusBarStates from \"./StatusBarStates.js\";\nconst DOT = `\\u00B7`;\nconst renderDot = () => ` ${DOT} `;\nfunction UploadBtn(props) {\n  const {\n    newFiles,\n    isUploadStarted,\n    recoveredState,\n    i18n,\n    uploadState,\n    isSomeGhost,\n    startUpload\n  } = props;\n  const uploadBtnClassNames = classNames('uppy-u-reset', 'uppy-c-btn', 'uppy-StatusBar-actionBtn', 'uppy-StatusBar-actionBtn--upload', {\n    'uppy-c-btn-primary': uploadState === statusBarStates.STATE_WAITING\n  }, {\n    'uppy-StatusBar-actionBtn--disabled': isSomeGhost\n  });\n  const uploadBtnText = newFiles && isUploadStarted && !recoveredState ? i18n('uploadXNewFiles', {\n    smart_count: newFiles\n  }) : i18n('uploadXFiles', {\n    smart_count: newFiles\n  });\n  return h(\"button\", {\n    type: \"button\",\n    className: uploadBtnClassNames,\n    \"aria-label\": i18n('uploadXFiles', {\n      smart_count: newFiles\n    }),\n    onClick: startUpload,\n    disabled: isSomeGhost,\n    \"data-uppy-super-focusable\": true\n  }, uploadBtnText);\n}\nfunction RetryBtn(props) {\n  const {\n    i18n,\n    uppy\n  } = props;\n  return h(\"button\", {\n    type: \"button\",\n    className: \"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--retry\",\n    \"aria-label\": i18n('retryUpload'),\n    onClick: () => uppy.retryAll().catch(() => {\n      /* Error reported and handled via an event */\n    }),\n    \"data-uppy-super-focusable\": true,\n    \"data-cy\": \"retry\"\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"8\",\n    height: \"10\",\n    viewBox: \"0 0 8 10\"\n  }, h(\"path\", {\n    d: \"M4 2.408a2.75 2.75 0 1 0 2.75 2.75.626.626 0 0 1 1.25.018v.023a4 4 0 1 1-4-4.041V.25a.25.25 0 0 1 .389-.208l2.299 1.533a.25.25 0 0 1 0 .416l-2.3 1.533A.25.25 0 0 1 4 3.316v-.908z\"\n  })), i18n('retry'));\n}\nfunction CancelBtn(props) {\n  const {\n    i18n,\n    uppy\n  } = props;\n  return h(\"button\", {\n    type: \"button\",\n    className: \"uppy-u-reset uppy-StatusBar-actionCircleBtn\",\n    title: i18n('cancel'),\n    \"aria-label\": i18n('cancel'),\n    onClick: () => uppy.cancelAll(),\n    \"data-cy\": \"cancel\",\n    \"data-uppy-super-focusable\": true\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"16\",\n    height: \"16\",\n    viewBox: \"0 0 16 16\"\n  }, h(\"g\", {\n    fill: \"none\",\n    fillRule: \"evenodd\"\n  }, h(\"circle\", {\n    fill: \"#888\",\n    cx: \"8\",\n    cy: \"8\",\n    r: \"8\"\n  }), h(\"path\", {\n    fill: \"#FFF\",\n    d: \"M9.283 8l2.567 2.567-1.283 1.283L8 9.283 5.433 11.85 4.15 10.567 6.717 8 4.15 5.433 5.433 4.15 8 6.717l2.567-2.567 1.283 1.283z\"\n  }))));\n}\nfunction PauseResumeButton(props) {\n  const {\n    isAllPaused,\n    i18n,\n    isAllComplete,\n    resumableUploads,\n    uppy\n  } = props;\n  const title = isAllPaused ? i18n('resume') : i18n('pause');\n  function togglePauseResume() {\n    if (isAllComplete) return;\n    if (!resumableUploads) {\n      uppy.cancelAll();\n      return;\n    }\n    if (isAllPaused) {\n      uppy.resumeAll();\n      return;\n    }\n    uppy.pauseAll();\n  }\n  return h(\"button\", {\n    title: title,\n    \"aria-label\": title,\n    className: \"uppy-u-reset uppy-StatusBar-actionCircleBtn\",\n    type: \"button\",\n    onClick: togglePauseResume,\n    \"data-cy\": \"togglePauseResume\",\n    \"data-uppy-super-focusable\": true\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"16\",\n    height: \"16\",\n    viewBox: \"0 0 16 16\"\n  }, h(\"g\", {\n    fill: \"none\",\n    fillRule: \"evenodd\"\n  }, h(\"circle\", {\n    fill: \"#888\",\n    cx: \"8\",\n    cy: \"8\",\n    r: \"8\"\n  }), h(\"path\", {\n    fill: \"#FFF\",\n    d: isAllPaused ? 'M6 4.25L11.5 8 6 11.75z' : 'M5 4.5h2v7H5v-7zm4 0h2v7H9v-7z'\n  }))));\n}\nfunction DoneBtn(props) {\n  const {\n    i18n,\n    doneButtonHandler\n  } = props;\n  return h(\"button\", {\n    type: \"button\",\n    className: \"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--done\",\n    onClick: doneButtonHandler,\n    \"data-uppy-super-focusable\": true\n  }, i18n('done'));\n}\nfunction LoadingSpinner() {\n  return h(\"svg\", {\n    className: \"uppy-StatusBar-spinner\",\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    width: \"14\",\n    height: \"14\"\n  }, h(\"path\", {\n    d: \"M13.983 6.547c-.12-2.509-1.64-4.893-3.939-5.936-2.48-1.127-5.488-.656-7.556 1.094C.524 3.367-.398 6.048.162 8.562c.556 2.495 2.46 4.52 4.94 5.183 2.932.784 5.61-.602 7.256-3.015-1.493 1.993-3.745 3.309-6.298 2.868-2.514-.434-4.578-2.349-5.153-4.84a6.226 6.226 0 0 1 2.98-6.778C6.34.586 9.74 1.1 11.373 3.493c.407.596.693 1.282.842 1.988.127.598.073 1.197.161 1.794.078.525.543 1.257 1.15.864.525-.341.49-1.05.456-1.592-.007-.15.02.3 0 0\",\n    fillRule: \"evenodd\"\n  }));\n}\nfunction ProgressBarProcessing(props) {\n  const {\n    progress\n  } = props;\n  const {\n    value,\n    mode,\n    message\n  } = progress;\n  const dot = `\\u00B7`;\n  return h(\"div\", {\n    className: \"uppy-StatusBar-content\"\n  }, h(LoadingSpinner, null), mode === 'determinate' ? `${Math.round(value * 100)}% ${dot} ` : '', message);\n}\nfunction ProgressDetails(props) {\n  const {\n    numUploads,\n    complete,\n    totalUploadedSize,\n    totalSize,\n    totalETA,\n    i18n\n  } = props;\n  const ifShowFilesUploadedOfTotal = numUploads > 1;\n  return h(\"div\", {\n    className: \"uppy-StatusBar-statusSecondary\"\n  }, ifShowFilesUploadedOfTotal && i18n('filesUploadedOfTotal', {\n    complete,\n    smart_count: numUploads\n  }), h(\"span\", {\n    className: \"uppy-StatusBar-additionalInfo\"\n  }, ifShowFilesUploadedOfTotal && renderDot(), i18n('dataUploadedOfTotal', {\n    complete: prettierBytes(totalUploadedSize),\n    total: prettierBytes(totalSize)\n  }), renderDot(), i18n('xTimeLeft', {\n    time: prettyETA(totalETA)\n  })));\n}\nfunction FileUploadCount(props) {\n  const {\n    i18n,\n    complete,\n    numUploads\n  } = props;\n  return h(\"div\", {\n    className: \"uppy-StatusBar-statusSecondary\"\n  }, i18n('filesUploadedOfTotal', {\n    complete,\n    smart_count: numUploads\n  }));\n}\nfunction UploadNewlyAddedFiles(props) {\n  const {\n    i18n,\n    newFiles,\n    startUpload\n  } = props;\n  const uploadBtnClassNames = classNames('uppy-u-reset', 'uppy-c-btn', 'uppy-StatusBar-actionBtn', 'uppy-StatusBar-actionBtn--uploadNewlyAdded');\n  return h(\"div\", {\n    className: \"uppy-StatusBar-statusSecondary\"\n  }, h(\"div\", {\n    className: \"uppy-StatusBar-statusSecondaryHint\"\n  }, i18n('xMoreFilesAdded', {\n    smart_count: newFiles\n  })), h(\"button\", {\n    type: \"button\",\n    className: uploadBtnClassNames,\n    \"aria-label\": i18n('uploadXFiles', {\n      smart_count: newFiles\n    }),\n    onClick: startUpload\n  }, i18n('upload')));\n}\nfunction ProgressBarUploading(props) {\n  const {\n    i18n,\n    supportsUploadProgress,\n    totalProgress,\n    showProgressDetails,\n    isUploadStarted,\n    isAllComplete,\n    isAllPaused,\n    newFiles,\n    numUploads,\n    complete,\n    totalUploadedSize,\n    totalSize,\n    totalETA,\n    startUpload\n  } = props;\n  const showUploadNewlyAddedFiles = newFiles && isUploadStarted;\n  if (!isUploadStarted || isAllComplete) {\n    return null;\n  }\n  const title = isAllPaused ? i18n('paused') : i18n('uploading');\n  function renderProgressDetails() {\n    if (!isAllPaused && !showUploadNewlyAddedFiles && showProgressDetails) {\n      if (supportsUploadProgress) {\n        return h(ProgressDetails, {\n          numUploads: numUploads,\n          complete: complete,\n          totalUploadedSize: totalUploadedSize,\n          totalSize: totalSize,\n          totalETA: totalETA,\n          i18n: i18n\n        });\n      }\n      return h(FileUploadCount, {\n        i18n: i18n,\n        complete: complete,\n        numUploads: numUploads\n      });\n    }\n    return null;\n  }\n  return h(\"div\", {\n    className: \"uppy-StatusBar-content\",\n    \"aria-label\": title,\n    title: title\n  }, !isAllPaused ? h(LoadingSpinner, null) : null, h(\"div\", {\n    className: \"uppy-StatusBar-status\"\n  }, h(\"div\", {\n    className: \"uppy-StatusBar-statusPrimary\"\n  }, supportsUploadProgress ? `${title}: ${totalProgress}%` : title), renderProgressDetails(), showUploadNewlyAddedFiles ? h(UploadNewlyAddedFiles, {\n    i18n: i18n,\n    newFiles: newFiles,\n    startUpload: startUpload\n  }) : null));\n}\nfunction ProgressBarComplete(props) {\n  const {\n    i18n\n  } = props;\n  return h(\"div\", {\n    className: \"uppy-StatusBar-content\",\n    role: \"status\",\n    title: i18n('complete')\n  }, h(\"div\", {\n    className: \"uppy-StatusBar-status\"\n  }, h(\"div\", {\n    className: \"uppy-StatusBar-statusPrimary\"\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-StatusBar-statusIndicator uppy-c-icon\",\n    width: \"15\",\n    height: \"11\",\n    viewBox: \"0 0 15 11\"\n  }, h(\"path\", {\n    d: \"M.414 5.843L1.627 4.63l3.472 3.472L13.202 0l1.212 1.213L5.1 10.528z\"\n  })), i18n('complete'))));\n}\nfunction ProgressBarError(props) {\n  const {\n    error,\n    i18n,\n    complete,\n    numUploads\n  } = props;\n  function displayErrorAlert() {\n    const errorMessage = `${i18n('uploadFailed')} \\n\\n ${error}`;\n    // eslint-disable-next-line no-alert\n    alert(errorMessage); // TODO: move to custom alert implementation\n  }\n  return h(\"div\", {\n    className: \"uppy-StatusBar-content\",\n    title: i18n('uploadFailed')\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-StatusBar-statusIndicator uppy-c-icon\",\n    width: \"11\",\n    height: \"11\",\n    viewBox: \"0 0 11 11\"\n  }, h(\"path\", {\n    d: \"M4.278 5.5L0 1.222 1.222 0 5.5 4.278 9.778 0 11 1.222 6.722 5.5 11 9.778 9.778 11 5.5 6.722 1.222 11 0 9.778z\"\n  })), h(\"div\", {\n    className: \"uppy-StatusBar-status\"\n  }, h(\"div\", {\n    className: \"uppy-StatusBar-statusPrimary\"\n  }, i18n('uploadFailed'), h(\"button\", {\n    className: \"uppy-u-reset uppy-StatusBar-details\",\n    \"aria-label\": i18n('showErrorDetails'),\n    \"data-microtip-position\": \"top-right\",\n    \"data-microtip-size\": \"medium\",\n    onClick: displayErrorAlert,\n    type: \"button\"\n  }, \"?\")), h(FileUploadCount, {\n    i18n: i18n,\n    complete: complete,\n    numUploads: numUploads\n  })));\n}\nexport { UploadBtn, RetryBtn, CancelBtn, PauseResumeButton, DoneBtn, LoadingSpinner, ProgressDetails, ProgressBarProcessing, ProgressBarError, ProgressBarUploading, ProgressBarComplete };", "export default function secondsToTime(rawSeconds) {\n  const hours = Math.floor(rawSeconds / 3600) % 24;\n  const minutes = Math.floor(rawSeconds / 60) % 60;\n  const seconds = Math.floor(rawSeconds % 60);\n  return {\n    hours,\n    minutes,\n    seconds\n  };\n}", "import secondsToTime from \"./secondsToTime.js\";\nexport default function prettyETA(seconds) {\n  const time = secondsToTime(seconds);\n\n  // Only display hours and minutes if they are greater than 0 but always\n  // display minutes if hours is being displayed\n  // Display a leading zero if the there is a preceding unit: 1m 05s, but 5s\n  const hoursStr = time.hours === 0 ? '' : `${time.hours}h`;\n  const minutesStr = time.minutes === 0 ? '' : `${time.hours === 0 ? time.minutes : ` ${time.minutes.toString(10).padStart(2, '0')}`}m`;\n  const secondsStr = time.hours !== 0 ? '' : `${time.minutes === 0 ? time.seconds : ` ${time.seconds.toString(10).padStart(2, '0')}`}s`;\n  return `${hoursStr}${minutesStr}${secondsStr}`;\n}", "export default {\n  strings: {\n    // Shown in the status bar while files are being uploaded.\n    uploading: 'Uploading',\n    // Shown in the status bar once all files have been uploaded.\n    complete: 'Complete',\n    // Shown in the status bar if an upload failed.\n    uploadFailed: 'Upload failed',\n    // Shown in the status bar while the upload is paused.\n    paused: 'Paused',\n    // Used as the label for the button that retries an upload.\n    retry: 'Retry',\n    // Used as the label for the button that cancels an upload.\n    cancel: 'Cancel',\n    // Used as the label for the button that pauses an upload.\n    pause: 'Pause',\n    // Used as the label for the button that resumes an upload.\n    resume: 'Resume',\n    // Used as the label for the button that resets the upload state after an upload\n    done: 'Done',\n    // When `showProgressDetails` is set, shows the number of files that have been fully uploaded so far.\n    filesUploadedOfTotal: {\n      0: '%{complete} of %{smart_count} file uploaded',\n      1: '%{complete} of %{smart_count} files uploaded'\n    },\n    // When `showProgressDetails` is set, shows the amount of bytes that have been uploaded so far.\n    dataUploadedOfTotal: '%{complete} of %{total}',\n    // When `showProgressDetails` is set, shows an estimation of how long the upload will take to complete.\n    xTimeLeft: '%{time} left',\n    // Used as the label for the button that starts an upload.\n    uploadXFiles: {\n      0: 'Upload %{smart_count} file',\n      1: 'Upload %{smart_count} files'\n    },\n    // Used as the label for the button that starts an upload, if another upload has been started in the past\n    // and new files were added later.\n    uploadXNewFiles: {\n      0: 'Upload +%{smart_count} file',\n      1: 'Upload +%{smart_count} files'\n    },\n    upload: 'Upload',\n    retryUpload: 'Retry upload',\n    xMoreFilesAdded: {\n      0: '%{smart_count} more file added',\n      1: '%{smart_count} more files added'\n    },\n    showErrorDetails: 'Show error details'\n  }\n};", "function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\nvar id = 0;\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\nimport { UIPlugin } from '@uppy/core';\nimport emaFilter from '@uppy/utils/lib/emaFilter';\nimport getTextDirection from '@uppy/utils/lib/getTextDirection';\nimport statusBarStates from \"./StatusBarStates.js\";\nimport StatusBarUI from \"./StatusBarUI.js\";\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore We don't want TS to generate types for the package.json\nconst packageJson = {\n  \"version\": \"3.3.3\"\n};\nimport locale from \"./locale.js\";\nconst speedFilterHalfLife = 2000;\nconst ETAFilterHalfLife = 2000;\nfunction getUploadingState(error, isAllComplete, recoveredState, files) {\n  if (error) {\n    return statusBarStates.STATE_ERROR;\n  }\n  if (isAllComplete) {\n    return statusBarStates.STATE_COMPLETE;\n  }\n  if (recoveredState) {\n    return statusBarStates.STATE_WAITING;\n  }\n  let state = statusBarStates.STATE_WAITING;\n  const fileIDs = Object.keys(files);\n  for (let i = 0; i < fileIDs.length; i++) {\n    const {\n      progress\n    } = files[fileIDs[i]];\n    // If ANY files are being uploaded right now, show the uploading state.\n    if (progress.uploadStarted && !progress.uploadComplete) {\n      return statusBarStates.STATE_UPLOADING;\n    }\n    // If files are being preprocessed AND postprocessed at this time, we show the\n    // preprocess state. If any files are being uploaded we show uploading.\n    if (progress.preprocess) {\n      state = statusBarStates.STATE_PREPROCESSING;\n    }\n    // If NO files are being preprocessed or uploaded right now, but some files are\n    // being postprocessed, show the postprocess state.\n    if (progress.postprocess && state !== statusBarStates.STATE_PREPROCESSING) {\n      state = statusBarStates.STATE_POSTPROCESSING;\n    }\n  }\n  return state;\n}\n\n// set default options, must be kept in sync with @uppy/react/src/StatusBar.js\nconst defaultOptions = {\n  target: 'body',\n  hideUploadButton: false,\n  hideRetryButton: false,\n  hidePauseResumeButton: false,\n  hideCancelButton: false,\n  showProgressDetails: false,\n  hideAfterFinish: true,\n  doneButtonHandler: null\n};\n\n/**\n * StatusBar: renders a status bar with upload/pause/resume/cancel/retry buttons,\n * progress percentage and time remaining.\n */\nvar _lastUpdateTime = /*#__PURE__*/_classPrivateFieldLooseKey(\"lastUpdateTime\");\nvar _previousUploadedBytes = /*#__PURE__*/_classPrivateFieldLooseKey(\"previousUploadedBytes\");\nvar _previousSpeed = /*#__PURE__*/_classPrivateFieldLooseKey(\"previousSpeed\");\nvar _previousETA = /*#__PURE__*/_classPrivateFieldLooseKey(\"previousETA\");\nvar _computeSmoothETA = /*#__PURE__*/_classPrivateFieldLooseKey(\"computeSmoothETA\");\nvar _onUploadStart = /*#__PURE__*/_classPrivateFieldLooseKey(\"onUploadStart\");\nexport default class StatusBar extends UIPlugin {\n  constructor(uppy, opts) {\n    super(uppy, {\n      ...defaultOptions,\n      ...opts\n    });\n    Object.defineProperty(this, _computeSmoothETA, {\n      value: _computeSmoothETA2\n    });\n    Object.defineProperty(this, _lastUpdateTime, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _previousUploadedBytes, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _previousSpeed, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _previousETA, {\n      writable: true,\n      value: void 0\n    });\n    this.startUpload = () => {\n      return this.uppy.upload().catch(() => {\n        // Error logged in Core\n      });\n    };\n    Object.defineProperty(this, _onUploadStart, {\n      writable: true,\n      value: () => {\n        const {\n          recoveredState\n        } = this.uppy.getState();\n        _classPrivateFieldLooseBase(this, _previousSpeed)[_previousSpeed] = null;\n        _classPrivateFieldLooseBase(this, _previousETA)[_previousETA] = null;\n        if (recoveredState) {\n          _classPrivateFieldLooseBase(this, _previousUploadedBytes)[_previousUploadedBytes] = Object.values(recoveredState.files).reduce((pv, _ref) => {\n            let {\n              progress\n            } = _ref;\n            return pv + progress.bytesUploaded;\n          }, 0);\n\n          // We don't set `#lastUpdateTime` at this point because the upload won't\n          // actually resume until the user asks for it.\n\n          this.uppy.emit('restore-confirmed');\n          return;\n        }\n        _classPrivateFieldLooseBase(this, _lastUpdateTime)[_lastUpdateTime] = performance.now();\n        _classPrivateFieldLooseBase(this, _previousUploadedBytes)[_previousUploadedBytes] = 0;\n      }\n    });\n    this.id = this.opts.id || 'StatusBar';\n    this.title = 'StatusBar';\n    this.type = 'progressindicator';\n    this.defaultLocale = locale;\n    this.i18nInit();\n    this.render = this.render.bind(this);\n    this.install = this.install.bind(this);\n  }\n  render(state) {\n    const {\n      capabilities,\n      files,\n      allowNewUpload,\n      totalProgress,\n      error,\n      recoveredState\n    } = state;\n    const {\n      newFiles,\n      startedFiles,\n      completeFiles,\n      isUploadStarted,\n      isAllComplete,\n      isAllErrored,\n      isAllPaused,\n      isUploadInProgress,\n      isSomeGhost\n    } = this.uppy.getObjectOfFilesPerState();\n\n    // If some state was recovered, we want to show Upload button/counter\n    // for all the files, because in this case it\u2019s not an Upload button,\n    // but \u201CConfirm Restore Button\u201D\n    const newFilesOrRecovered = recoveredState ? Object.values(files) : newFiles;\n    const resumableUploads = !!capabilities.resumableUploads;\n    const supportsUploadProgress = capabilities.uploadProgress !== false;\n    let totalSize = 0;\n    let totalUploadedSize = 0;\n    startedFiles.forEach(file => {\n      totalSize += file.progress.bytesTotal || 0;\n      totalUploadedSize += file.progress.bytesUploaded || 0;\n    });\n    const totalETA = _classPrivateFieldLooseBase(this, _computeSmoothETA)[_computeSmoothETA]({\n      uploaded: totalUploadedSize,\n      total: totalSize,\n      remaining: totalSize - totalUploadedSize\n    });\n    return StatusBarUI({\n      error,\n      uploadState: getUploadingState(error, isAllComplete, recoveredState, state.files || {}),\n      allowNewUpload,\n      totalProgress,\n      totalSize,\n      totalUploadedSize,\n      isAllComplete: false,\n      isAllPaused,\n      // @ts-expect-error TODO: remove this in 4.x branch\n      isAllErrored,\n      isUploadStarted,\n      isUploadInProgress,\n      isSomeGhost,\n      recoveredState,\n      complete: completeFiles.length,\n      newFiles: newFilesOrRecovered.length,\n      numUploads: startedFiles.length,\n      totalETA,\n      files,\n      i18n: this.i18n,\n      uppy: this.uppy,\n      startUpload: this.startUpload,\n      doneButtonHandler: this.opts.doneButtonHandler,\n      resumableUploads,\n      supportsUploadProgress,\n      showProgressDetails: this.opts.showProgressDetails,\n      hideUploadButton: this.opts.hideUploadButton,\n      hideRetryButton: this.opts.hideRetryButton,\n      hidePauseResumeButton: this.opts.hidePauseResumeButton,\n      hideCancelButton: this.opts.hideCancelButton,\n      hideAfterFinish: this.opts.hideAfterFinish,\n      // ts-expect-error TODO: remove this in 4.x branch\n      isTargetDOMEl: this.isTargetDOMEl\n    });\n  }\n  onMount() {\n    // Set the text direction if the page has not defined one.\n    const element = this.el;\n    const direction = getTextDirection(element);\n    if (!direction) {\n      element.dir = 'ltr';\n    }\n  }\n  install() {\n    const {\n      target\n    } = this.opts;\n    if (target) {\n      this.mount(target, this);\n    }\n    this.uppy.on('upload', _classPrivateFieldLooseBase(this, _onUploadStart)[_onUploadStart]);\n\n    // To cover the use case where the status bar is installed while the upload\n    // has started, we set `lastUpdateTime` right away.\n    _classPrivateFieldLooseBase(this, _lastUpdateTime)[_lastUpdateTime] = performance.now();\n    _classPrivateFieldLooseBase(this, _previousUploadedBytes)[_previousUploadedBytes] = this.uppy.getFiles().reduce((pv, file) => pv + file.progress.bytesUploaded, 0);\n  }\n  uninstall() {\n    this.unmount();\n    this.uppy.off('upload', _classPrivateFieldLooseBase(this, _onUploadStart)[_onUploadStart]);\n  }\n}\nfunction _computeSmoothETA2(totalBytes) {\n  var _classPrivateFieldLoo, _classPrivateFieldLoo2;\n  if (totalBytes.total === 0 || totalBytes.remaining === 0) {\n    return 0;\n  }\n\n  // When state is restored, lastUpdateTime is still nullish at this point.\n  (_classPrivateFieldLoo2 = (_classPrivateFieldLoo = _classPrivateFieldLooseBase(this, _lastUpdateTime))[_lastUpdateTime]) != null ? _classPrivateFieldLoo2 : _classPrivateFieldLoo[_lastUpdateTime] = performance.now();\n  const dt = performance.now() - _classPrivateFieldLooseBase(this, _lastUpdateTime)[_lastUpdateTime];\n  if (dt === 0) {\n    var _classPrivateFieldLoo3;\n    return Math.round(((_classPrivateFieldLoo3 = _classPrivateFieldLooseBase(this, _previousETA)[_previousETA]) != null ? _classPrivateFieldLoo3 : 0) / 100) / 10;\n  }\n  const uploadedBytesSinceLastTick = totalBytes.uploaded - _classPrivateFieldLooseBase(this, _previousUploadedBytes)[_previousUploadedBytes];\n  _classPrivateFieldLooseBase(this, _previousUploadedBytes)[_previousUploadedBytes] = totalBytes.uploaded;\n\n  // uploadedBytesSinceLastTick can be negative in some cases (packet loss?)\n  // in which case, we wait for next tick to update ETA.\n  if (uploadedBytesSinceLastTick <= 0) {\n    var _classPrivateFieldLoo4;\n    return Math.round(((_classPrivateFieldLoo4 = _classPrivateFieldLooseBase(this, _previousETA)[_previousETA]) != null ? _classPrivateFieldLoo4 : 0) / 100) / 10;\n  }\n  const currentSpeed = uploadedBytesSinceLastTick / dt;\n  const filteredSpeed = _classPrivateFieldLooseBase(this, _previousSpeed)[_previousSpeed] == null ? currentSpeed : emaFilter(currentSpeed, _classPrivateFieldLooseBase(this, _previousSpeed)[_previousSpeed], speedFilterHalfLife, dt);\n  _classPrivateFieldLooseBase(this, _previousSpeed)[_previousSpeed] = filteredSpeed;\n  const instantETA = totalBytes.remaining / filteredSpeed;\n  const updatedPreviousETA = Math.max(_classPrivateFieldLooseBase(this, _previousETA)[_previousETA] - dt, 0);\n  const filteredETA = _classPrivateFieldLooseBase(this, _previousETA)[_previousETA] == null ? instantETA : emaFilter(instantETA, updatedPreviousETA, ETAFilterHalfLife, dt);\n  _classPrivateFieldLooseBase(this, _previousETA)[_previousETA] = filteredETA;\n  _classPrivateFieldLooseBase(this, _lastUpdateTime)[_lastUpdateTime] = performance.now();\n  return Math.round(filteredETA / 100) / 10;\n}\nStatusBar.VERSION = packageJson.version;", "// Entry point to initialize bigger libraries that are essential to managing functionalities only\n// the idea is that most users will simply consume the app and don't need to load this\n\n// Uppy\nimport Uppy from '@uppy/core'\n// import FileInput from '@uppy/file-input'\nimport XHRUpload from '@uppy/xhr-upload'\n// import Form from '@uppy/form'\nimport StatusBar from '@uppy/status-bar'\n\nimport '@uppy/core/dist/style.css'\nimport '@uppy/status-bar/dist/style.css'\n\nwindow.Uppy = Uppy\n// window.UppyFileInput = FileInput\nwindow.UppyXHRUpload = XHRUpload\n// window.UppyForm = Form\nwindow.UppyStatusBar = StatusBar\n"],
  "mappings": "+hBAAA,IAAAA,GAAAC,EAAA,CAAAC,GAAAC,KAAA,CAcAA,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K,GAA8B,EAAG,CACnC,IAAIC,EACJ,OAAO,KAAK,QAAQA,EAAyB7D,EAA4B,KAAMuB,CAAY,EAAEA,CAAY,IAAM,KAAOsC,EAAyB,GAAK,GAAG,EAAI,EAC7J,CACA,IAAMC,EAAeF,EAA6BF,EAC5CK,EAAgB/D,EAA4B,KAAMsB,EAAc,EAAEA,EAAc,GAAK,KAAOwC,EAAeE,GAAUF,EAAc9D,EAA4B,KAAMsB,EAAc,EAAEA,EAAc,EAAGf,GAAqBmD,CAAE,EACnO1D,EAA4B,KAAMsB,EAAc,EAAEA,EAAc,EAAIyC,EACpE,IAAME,EAAaV,EAAW,UAAYQ,EACpCG,EAAqB,KAAK,IAAIlE,EAA4B,KAAMuB,CAAY,EAAEA,CAAY,EAAImC,EAAI,CAAC,EACnGS,EAAcnE,EAA4B,KAAMuB,CAAY,EAAEA,CAAY,GAAK,KAAO0C,EAAaD,GAAUC,EAAYC,EAAoB1D,GAAmBkD,CAAE,EACxK,OAAA1D,EAA4B,KAAMuB,CAAY,EAAEA,CAAY,EAAI4C,EAChEnE,EAA4B,KAAMoB,CAAe,EAAEA,CAAe,EAAI,YAAY,IAAI,EAC/E,KAAK,MAAM+C,EAAc,GAAG,EAAI,EACzC,CACAzC,GAAU,QAAUpB,GAAY,QChQhC,OAAO,KAAO8D,GAEd,OAAO,cAAgBC,GAEvB,OAAO,cAAgBC",
  "names": ["require_namespace_emitter", "__commonJSMin", "exports", "module", "emitter", "_fns", "event", "arg1", "arg2", "arg3", "arg4", "arg5", "arg6", "toEmit", "getListeners", "emitAll", "fn", "one", "keep", "fns", "i", "e", "out", "idx", "args", "keys", "key", "l", "require_isObject", "__commonJSMin", "exports", "module", "isObject", "value", "type", "require_freeGlobal", "__commonJSMin", "exports", "module", "freeGlobal", "require_root", "__commonJSMin", "exports", "module", "freeGlobal", "freeSelf", "root", "require_now", "__commonJSMin", "exports", "module", "root", "now", "require_trimmedEndIndex", "__commonJSMin", "exports", "module", "reWhitespace", "trimmedEndIndex", "string", "index", "require_baseTrim", "__commonJSMin", "exports", "module", "trimmedEndIndex", "reTrimStart", "baseTrim", "string", "require_Symbol", "__commonJSMin", "exports", "module", "root", "Symbol", "require_getRawTag", "__commonJSMin", "exports", "module", "Symbol", "objectProto", "hasOwnProperty", "nativeObjectToString", "symToStringTag", "getRawTag", "value", "isOwn", "tag", "unmasked", "result", "require_objectToString", "__commonJSMin", "exports", "module", "objectProto", "nativeObjectToString", "objectToString", "value", "require_baseGetTag", "__commonJSMin", "exports", "module", "Symbol", "getRawTag", "objectToString", "nullTag", "undefinedTag", "symToStringTag", "baseGetTag", "value", "require_isObjectLike", "__commonJSMin", "exports", "module", "isObjectLike", "value", "require_isSymbol", "__commonJSMin", "exports", "module", "baseGetTag", "isObjectLike", "symbolTag", "isSymbol", "value", "require_toNumber", "__commonJSMin", "exports", "module", "baseTrim", "isObject", "isSymbol", "NAN", "reIsBadHex", "reIsBinary", "reIsOctal", "freeParseInt", "toNumber", "value", "other", "isBinary", "require_debounce", "__commonJSMin", "exports", "module", "isObject", "now", "toNumber", "FUNC_ERROR_TEXT", "nativeMax", "nativeMin", "debounce", "func", "wait", "options", "lastArgs", "lastThis", "maxWait", "result", "timerId", "lastCallTime", "lastInvokeTime", "leading", "maxing", "trailing", "invokeFunc", "time", "args", "thisArg", "leadingEdge", "timerExpired", "remainingWait", "timeSinceLastCall", "timeSinceLastInvoke", "timeWaiting", "shouldInvoke", "trailingEdge", "cancel", "flush", "debounced", "isInvoking", "require_throttle", "__commonJSMin", "exports", "module", "debounce", "isObject", "FUNC_ERROR_TEXT", "throttle", "func", "wait", "options", "leading", "trailing", "module", "input", "neg", "num", "units", "exponent", "value", "unit", "require_wildcard", "__commonJSMin", "exports", "module", "WildcardMatcher", "text", "separator", "input", "matches", "parts", "ii", "partsCount", "testParts", "key", "test", "matcher", "require_mime_match", "__commonJSMin", "exports", "module", "wildcard", "reMimePartSplit", "target", "pattern", "test", "result", "require_classnames", "__commonJSMin", "exports", "module", "hasOwn", "classNames", "classes", "i", "arg", "appendClass", "parseValue", "key", "value", "newClass", "_classPrivateFieldLooseBase", "receiver", "privateKey", "id", "_classPrivateFieldLooseKey", "name", "insertReplacement", "source", "rx", "replacement", "newParts", "chunk", "raw", "i", "list", "interpolate", "phrase", "options", "dollarRegex", "dollarBillsYall", "interpolated", "arg", "defaultOnMissingKey", "key", "_onMissingKey", "_apply", "Translator", "locales", "_temp", "onMissingKey", "_apply2", "n", "string", "plural", "locale", "prevLocale", "import_namespace_emitter", "urlAlphabet", "nanoid", "size", "id", "i", "urlAlphabet", "import_throttle", "_classPrivateFieldLooseBase", "receiver", "privateKey", "id", "_classPrivateFieldLooseKey", "name", "packageJson", "_callbacks", "_publish", "DefaultStore", "_publish2", "patch", "prevState", "nextState", "listener", "_len", "args", "_key", "lib_default", "getFileNameAndExtension", "fullFileName", "lastDot", "mimeTypes_default", "getFileType", "file", "_getFileNameAndExtens", "fileExtension", "getFileNameAndExtension", "mimeTypes_default", "encodeCharacter", "character", "encodeFilename", "name", "suffix", "generateFileID", "file", "instanceId", "id", "hasFileStableId", "getSafeFileId", "fileType", "getFileType", "supportsUploadProgress", "userAgent", "m", "version", "major", "minor", "getFileName", "fileType", "fileDescriptor", "pad", "number", "getTimeStamp", "date", "hours", "minutes", "seconds", "justErrorsLogger", "_len", "args", "_key", "getTimeStamp", "debugLogger", "_len2", "_key2", "_len3", "_key3", "_len4", "_key4", "import_prettier_bytes", "import_mime_match", "defaultOptions", "RestrictionError", "message", "opts", "_opts$isUserFacing", "Restricter", "getOpts", "getI18n", "_opts$restrictions", "existingFiles", "addingFiles", "maxTotalFileSize", "maxNumberOfFiles", "f", "totalFilesSize", "total", "_f$size", "prettierBytes", "file", "maxFileSize", "minFileSize", "allowedFileTypes", "type", "match", "allowedFileTypesString", "addingFile", "files", "minNumberOfFiles", "error", "requiredMetaFields", "missingFields", "field", "locale_default", "_Symbol$for", "_Symbol$for2", "_classPrivateFieldLooseBase", "receiver", "privateKey", "id", "_classPrivateFieldLooseKey", "name", "packageJson", "defaultUploadState", "_plugins", "_restricter", "_storeUnsubscribe", "_emitter", "_preProcessors", "_uploaders", "_postProcessors", "_informAndEmit", "_checkRequiredMetaFieldsOnFile", "_checkRequiredMetaFields", "_assertNewUploadAllowed", "_transformFile", "_startIfAutoProceed", "_checkAndUpdateFileState", "_addListeners", "_updateOnlineStatus", "_requestClientById", "_createUpload", "_getUpload", "_removeUpload", "_runUpload", "Uppy", "_Uppy", "_opts", "_runUpload2", "_removeUpload2", "_getUpload2", "_createUpload2", "_addListeners2", "_checkAndUpdateFileState2", "_startIfAutoProceed2", "_transformFile2", "_assertNewUploadAllowed2", "_checkRequiredMetaFields2", "_checkRequiredMetaFieldsOnFile2", "_informAndEmit2", "ee", "throttle", "file", "data", "fileInState", "canHavePercentage", "locale_default", "defaultOptions", "files", "lib_default", "justErrorsLogger", "merged", "debugLogger", "supportsUploadProgress", "Restricter", "prevState", "nextState", "patch", "event", "_len", "args", "_key", "callback", "state", "plugin", "filesWithNewState", "existingFilesState", "_ref", "fileID", "newFileState", "onMissingKey", "key", "translator", "Translator", "newOpts", "defaultProgress", "updatedFiles", "capabilities", "currentUploads", "fn", "updatedMeta", "newMeta", "ids", "filesObject", "totalProgress", "error", "inProgressFiles", "newFiles", "startedFiles", "uploadStartedFiles", "pausedFiles", "completeFiles", "erroredFiles", "inProgressNotPausedFiles", "processingFiles", "progress", "err", "nextFilesState", "validFilesToAdd", "errors", "restrictionErrors", "firstValidFileToAdd", "fileDescriptors", "nonRestrictionErrors", "message", "subError", "fileIDs", "reason", "updatedUploads", "removedFiles", "fileIsNotRemoved", "uploadFileID", "uploadID", "newFileIDs", "stateUpdate", "removedFileIDs", "isPaused", "updatedFile", "filesToRetry", "_temp", "_provider", "inProgress", "sizedFiles", "unsizedFiles", "progressMax", "currentProgress", "acc", "totalSize", "_file$progress$bytesT", "averageSize", "uploadedSize", "_window$navigator$onL", "Plugin", "opts", "msg", "pluginId", "existsPluginAlready", "plugins", "foundPlugin", "type", "method", "instance", "list", "index", "item", "updatedState", "_temp2", "info", "duration", "isComplexMessage", "logger", "client", "requestClient", "currentUpload", "_classPrivateFieldLoo", "onBeforeUploadResult", "RestrictionError", "currentlyUploadingFiles", "curr", "waitingFileIDs", "userFacingErrors", "maxNumToShow", "firstErrors", "additionalErrors", "_ref2", "details", "missingFields", "success", "allowNewUpload", "fileDescriptorOrFile", "fileType", "getFileType", "fileName", "getFileName", "fileExtension", "getFileNameAndExtension", "getSafeFileId", "meta", "size", "filesToAdd", "existingFiles", "fileToAdd", "_existingFiles$newFil", "newFile", "isGhost", "onBeforeFileAddedResult", "errorHandler", "response", "errorMsg", "_file$name", "newError", "uploadStalledWarningRecentlyEmitted", "onUploadStarted", "filesFiltered", "exists", "filesState", "uploadResp", "forceAllowNewUpload", "nanoid", "getCurrentUpload", "steps", "step", "successful", "failed", "result", "Uppy_default", "slice", "options", "vnodeId", "isValidElement", "rerenderQueue", "prevDebounce", "defer", "depthSort", "CAPTURE_REGEX", "eventClock", "eventProxy", "eventProxyCapture", "i", "EMPTY_OBJ", "EMPTY_ARR", "IS_NON_DIMENSIONAL", "isArray", "Array", "assign", "obj", "props", "removeNode", "node", "parentNode", "removeChild", "createElement", "type", "children", "key", "ref", "normalizedProps", "arguments", "length", "call", "defaultProps", "createVNode", "original", "vnode", "__k", "__", "__b", "__e", "__c", "constructor", "__v", "__i", "__u", "Fragment", "props", "children", "BaseComponent", "context", "this", "getDomSibling", "vnode", "childIndex", "__", "__i", "sibling", "__k", "length", "__e", "type", "updateParentDomPointers", "i", "child", "__c", "base", "enqueueRender", "c", "__d", "rerenderQueue", "push", "process", "__r", "prevDebounce", "options", "debounceRendering", "defer", "component", "newVNode", "oldVNode", "oldDom", "commitQueue", "refQueue", "l", "sort", "depthSort", "shift", "__v", "__P", "assign", "diff", "__n", "namespaceURI", "__u", "commitRoot", "diffChildren", "parentDom", "renderResult", "newParentVNode", "oldParentVNode", "globalContext", "namespace", "excessDomChildren", "isHydrating", "childVNode", "newDom", "firstChildDom", "result", "oldChildren", "EMPTY_ARR", "newChildrenLength", "constructNewChildrenArray", "EMPTY_OBJ", "ref", "applyRef", "insert", "nextSibling", "skewedIndex", "matchingIndex", "oldChildrenLength", "remainingOldChildren", "skew", "Array", "constructor", "String", "createVNode", "isArray", "undefined", "__b", "key", "findMatchingIndex", "unmount", "parentVNode", "contains", "insertBefore", "nodeType", "findMatchingIndex", "childVNode", "oldChildren", "skewedIndex", "remainingOldChildren", "x", "y", "key", "type", "oldVNode", "__u", "length", "setStyle", "style", "value", "setProperty", "IS_NON_DIMENSIONAL", "test", "dom", "name", "oldValue", "namespace", "useCapture", "lowerCaseName", "o", "cssText", "replace", "CAPTURE_REGEX", "toLowerCase", "slice", "l", "_attached", "eventClock", "addEventListener", "eventProxyCapture", "eventProxy", "removeEventListener", "e", "removeAttribute", "setAttribute", "createEventProxy", "this", "eventHandler", "_dispatched", "options", "event", "diff", "parentDom", "newVNode", "globalContext", "excessDomChildren", "commitQueue", "oldDom", "isHydrating", "refQueue", "tmp", "c", "isNew", "oldProps", "oldState", "snapshot", "clearProcessingException", "newProps", "isClassComponent", "provider", "componentContext", "i", "renderHook", "count", "renderResult", "newType", "constructor", "undefined", "__e", "__b", "outer", "props", "prototype", "render", "contextType", "__c", "__", "__E", "BaseComponent", "doRender", "sub", "state", "context", "__n", "__d", "__h", "_sb", "__s", "getDerivedStateFromProps", "assign", "__v", "componentWillMount", "componentDidMount", "push", "componentWillReceiveProps", "shouldComponentUpdate", "__k", "some", "vnode", "componentWillUpdate", "componentDidUpdate", "__P", "__r", "getChildContext", "getSnapshotBeforeUpdate", "Fragment", "cloneNode", "children", "diffChildren", "isArray", "base", "then", "MODE_HYDRATE", "nodeType", "nextSibling", "indexOf", "removeNode", "diffElementNodes", "diffed", "commitRoot", "root", "applyRef", "cb", "call", "node", "map", "newHtml", "oldHtml", "newChildren", "inputValue", "checked", "localName", "document", "createTextNode", "createElementNS", "is", "__m", "data", "childNodes", "EMPTY_OBJ", "attributes", "__html", "innerHTML", "content", "getDomSibling", "ref", "hasRefUnmount", "current", "unmount", "parentVNode", "skipRemove", "r", "componentWillUnmount", "replaceNode", "documentElement", "createElement", "namespaceURI", "firstChild", "slice", "EMPTY_ARR", "options", "__e", "error", "vnode", "oldVNode", "errorInfo", "component", "ctor", "handled", "__", "__c", "constructor", "getDerivedStateFromError", "setState", "__d", "componentDidCatch", "__E", "e", "vnodeId", "isValidElement", "undefined", "BaseComponent", "prototype", "update", "callback", "s", "this", "__s", "state", "assign", "props", "__v", "_sb", "push", "enqueueRender", "forceUpdate", "__h", "render", "Fragment", "rerenderQueue", "defer", "Promise", "then", "bind", "resolve", "setTimeout", "depthSort", "a", "b", "__b", "process", "__r", "CAPTURE_REGEX", "eventClock", "eventProxy", "createEventProxy", "eventProxyCapture", "i", "isDOMElement", "obj", "findDOMElement", "element", "context", "isDOMElement", "findDOMElement_default", "getTextDirection", "element", "_element", "getTextDirection_default", "BasePlugin", "uppy", "opts", "plugins", "update", "newOpts", "translator", "Translator", "plugin", "state", "_classPrivateFieldLooseBase", "receiver", "privateKey", "id", "_classPrivateFieldLooseKey", "name", "debounce", "fn", "calling", "latestArgs", "_len", "args", "_key", "_updateUI", "UIPlugin", "_UIPlugin", "BasePlugin", "target", "targetPlugin", "Target", "p", "plugin", "callerPluginName", "targetElement", "findDOMElement_default", "uppyRootElement", "state", "E", "getTextDirection_default", "message", "_classPrivateFieldLoo", "_classPrivateFieldLoo2", "_this$el", "UIPlugin_default", "_classPrivateFieldLooseBase", "receiver", "privateKey", "id", "_classPrivateFieldLooseKey", "name", "_uppy", "_events", "EventManager", "uppy", "event", "fn", "fileID", "cb", "targetFileID", "isPaused", "file", "eventHandler", "_this", "_classPrivateFieldLooseBase", "receiver", "privateKey", "id", "_classPrivateFieldLooseKey", "name", "createCancelError", "cause", "abortOn", "signal", "_this$then", "abortPromise", "removeAbortListener", "_activeRequests", "_queuedHandlers", "_paused", "_pauseTimer", "_downLimit", "_upperLimit", "_rateLimitingTimer", "_call", "_queueNext", "_next", "_queue", "_dequeue", "_resume", "_increaseLimit", "RateLimitedQueue", "limit", "_dequeue2", "_queue2", "_next2", "_queueNext2", "_call2", "i", "fn", "queueOptions", "_this", "_len", "args", "_key", "queuedRequest", "_this2", "_len2", "_key2", "outerPromise", "resolve", "reject", "cancelError", "innerPromise", "err", "result", "duration", "done", "cancelActive", "next", "handler", "options", "index", "other", "internalRateLimitedQueue", "NetworkError", "error", "xhr", "NetworkError_default", "isNetworkError", "xhr", "isNetworkError_default", "_classPrivateFieldLooseBase", "receiver", "privateKey", "id", "_classPrivateFieldLooseKey", "name", "_aliveTimer", "_isDone", "_onTimedOut", "_timeout", "ProgressTimeout", "timeout", "timeoutHandler", "ProgressTimeout_default", "noop", "fetcher", "url", "options", "body", "headers", "method", "onBeforeRequest", "onUploadProgress", "shouldRetry", "onAfterRequest", "onTimeout", "responseType", "retries", "signal", "timeout", "withCredentials", "delay", "attempt", "timer", "ProgressTimeout_default", "requestWithRetry", "retryCount", "resolve", "reject", "xhr", "NetworkError_default", "event", "key", "filterNonFailedFiles", "files", "hasError", "file", "filterFilesToEmitUploadStarted", "_file$progress", "locale_default", "_classPrivateFieldLooseBase", "receiver", "privateKey", "id", "_classPrivateFieldLooseKey", "name", "packageJson", "buildResponseError", "xhr", "err", "error", "isNetworkError_default", "NetworkError_default", "setTypeInBlob", "file", "defaultOptions", "responseText", "parsedResponse", "_", "response", "status", "_getFetcher", "_uploadLocalFile", "_uploadBundle", "_getCompanionClientArgs", "_uploadFiles", "_handleUpload", "XHRUpload", "BasePlugin", "uppy", "_opts", "_uploadFiles2", "_getCompanionClientArgs2", "_uploadBundle2", "_uploadLocalFile2", "fileIDs", "internalRateLimitedQueue", "files", "filesFiltered", "filterNonFailedFiles", "filesToEmit", "filterFilesToEmitUploadStarted", "locale_default", "RateLimitedQueue", "url", "options", "_options$method", "res", "fetcher", "timeout", "seconds", "event", "body", "uploadURL", "request", "customError", "overrides", "headers", "opts", "formData", "meta", "item", "value", "subItem", "formPost", "dataWithUpdatedType", "capabilities", "events", "EventManager", "controller", "uppyFetch", "fetch", "_ref", "reason", "_this$uppy$getState$x", "optsFromState", "abort", "_file$remote", "allowedMetaFields", "getQueue", "removedHandler", "removedFile", "uploadPromise", "emaFilter", "newValue", "previousSmoothedValue", "halfLife", "dt", "StatusBarStates_default", "import_classnames", "calculateProcessingProgress", "files", "values", "mode", "message", "progress", "preprocess", "postprocess", "value", "total", "progressValue", "import_classnames", "import_prettier_bytes", "secondsToTime", "rawSeconds", "hours", "minutes", "seconds", "prettyETA", "seconds", "time", "secondsToTime", "hoursStr", "minutesStr", "secondsStr", "DOT", "renderDot", "UploadBtn", "props", "newFiles", "isUploadStarted", "recoveredState", "i18n", "uploadState", "isSomeGhost", "startUpload", "uploadBtnClassNames", "classNames", "StatusBarStates_default", "uploadBtnText", "_", "RetryBtn", "uppy", "CancelBtn", "PauseResumeButton", "isAllPaused", "isAllComplete", "resumableUploads", "title", "togglePauseResume", "DoneBtn", "doneButtonHandler", "LoadingSpinner", "ProgressBarProcessing", "progress", "value", "mode", "message", "ProgressDetails", "numUploads", "complete", "totalUploadedSize", "totalSize", "totalETA", "ifShowFilesUploadedOfTotal", "prettierBytes", "prettyETA", "FileUploadCount", "UploadNewlyAddedFiles", "ProgressBarUploading", "supportsUploadProgress", "totalProgress", "showProgressDetails", "showUploadNewlyAddedFiles", "renderProgressDetails", "ProgressBarComplete", "ProgressBarError", "error", "displayErrorAlert", "errorMessage", "STATE_ERROR", "STATE_WAITING", "STATE_PREPROCESSING", "STATE_UPLOADING", "STATE_POSTPROCESSING", "STATE_COMPLETE", "StatusBarStates_default", "StatusBar", "props", "newFiles", "allowNewUpload", "isUploadInProgress", "isAllPaused", "resumableUploads", "error", "hideUploadButton", "hidePauseResumeButton", "hideCancelButton", "hideRetryButton", "recoveredState", "uploadState", "totalProgress", "files", "supportsUploadProgress", "hideAfterFinish", "isSomeGhost", "doneButtonHandler", "isUploadStarted", "i18n", "startUpload", "uppy", "isAllComplete", "showProgressDetails", "numUploads", "complete", "totalSize", "totalETA", "totalUploadedSize", "getProgressValue", "progress", "calculateProcessingProgress", "getIsIndeterminate", "mode", "getIsHidden", "progressValue", "isHidden", "width", "showUploadBtn", "showCancelBtn", "showPauseResumeBtn", "showRetryBtn", "showDoneBtn", "progressClassNames", "classNames", "statusBarClassNames", "_", "ProgressBarProcessing", "ProgressBarComplete", "ProgressBarError", "ProgressBarUploading", "UploadBtn", "RetryBtn", "PauseResumeButton", "CancelBtn", "DoneBtn", "locale_default", "_classPrivateFieldLooseBase", "receiver", "privateKey", "id", "_classPrivateFieldLooseKey", "name", "packageJson", "speedFilterHalfLife", "ETAFilterHalfLife", "getUploadingState", "error", "isAllComplete", "recoveredState", "files", "StatusBarStates_default", "state", "fileIDs", "i", "progress", "defaultOptions", "_lastUpdateTime", "_previousUploadedBytes", "_previousSpeed", "_previousETA", "_computeSmoothETA", "_onUploadStart", "StatusBar", "UIPlugin_default", "uppy", "opts", "_computeSmoothETA2", "pv", "_ref", "locale_default", "capabilities", "allowNewUpload", "totalProgress", "newFiles", "startedFiles", "completeFiles", "isUploadStarted", "isAllErrored", "isAllPaused", "isUploadInProgress", "isSomeGhost", "newFilesOrRecovered", "resumableUploads", "supportsUploadProgress", "totalSize", "totalUploadedSize", "file", "totalETA", "element", "getTextDirection_default", "target", "totalBytes", "_classPrivateFieldLoo", "_classPrivateFieldLoo2", "dt", "_classPrivateFieldLoo3", "uploadedBytesSinceLastTick", "_classPrivateFieldLoo4", "currentSpeed", "filteredSpeed", "emaFilter", "instantETA", "updatedPreviousETA", "filteredETA", "Uppy_default", "XHRUpload", "StatusBar"]
}
