@wangeditor-next/editor 5.6.56 → 5.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -0
- package/dist/basic-modules/src/modules/color/render-style.d.ts +3 -1
- package/dist/basic-modules/src/modules/color/style-to-html.d.ts +3 -1
- package/dist/basic-modules/src/modules/font-size-family/render-style.d.ts +3 -1
- package/dist/basic-modules/src/modules/font-size-family/style-to-html.d.ts +3 -1
- package/dist/basic-modules/src/modules/image/elem-to-html.d.ts +2 -1
- package/dist/basic-modules/src/modules/indent/render-style.d.ts +3 -1
- package/dist/basic-modules/src/modules/indent/style-to-html.d.ts +2 -1
- package/dist/basic-modules/src/modules/justify/render-style.d.ts +3 -1
- package/dist/basic-modules/src/modules/justify/style-to-html.d.ts +2 -1
- package/dist/basic-modules/src/modules/line-height/render-style.d.ts +3 -1
- package/dist/basic-modules/src/modules/line-height/style-to-html.d.ts +2 -1
- package/dist/basic-modules/src/utils/style-class.d.ts +14 -0
- package/dist/basic-modules/src/utils/vdom.d.ts +14 -0
- package/dist/core/src/config/interface.d.ts +33 -1
- package/dist/core/src/config/style-mode.d.ts +8 -0
- package/dist/core/src/editor/dom-editor.d.ts +9 -0
- package/dist/core/src/index.d.ts +13 -2
- package/dist/core/src/render/element/renderStyle.d.ts +3 -1
- package/dist/core/src/render/index.d.ts +2 -2
- package/dist/core/src/render/text/renderStyle.d.ts +3 -1
- package/dist/core/src/to-html/index.d.ts +2 -2
- package/dist/core/src/upload/createUploader.d.ts +7 -3
- package/dist/core/src/upload/createUppyUploader.d.ts +7 -0
- package/dist/core/src/upload/index.d.ts +4 -3
- package/dist/core/src/upload/interface.d.ts +37 -9
- package/dist/core/src/upload.d.ts +5 -0
- package/dist/core.js +13 -0
- package/dist/core.js.map +1 -0
- package/dist/core.mjs +13 -0
- package/dist/core.mjs.map +1 -0
- package/dist/css/style.css +4 -4
- package/dist/editor/src/core.d.ts +54 -0
- package/dist/editor/src/index.d.ts +3 -2
- package/dist/editor/src/upload.d.ts +6 -0
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/list-module/src/module/elem-to-html.d.ts +2 -1
- package/dist/list-module/src/module/style-class.d.ts +6 -0
- package/dist/table-module/src/module/elem-to-html.d.ts +3 -2
- package/dist/table-module/src/module/style-to-html.d.ts +2 -1
- package/dist/upload.js +13 -0
- package/dist/upload.js.map +1 -0
- package/dist/upload.mjs +13 -0
- package/dist/upload.mjs.map +1 -0
- package/dist/video-module/src/module/elem-to-html.d.ts +2 -1
- package/dist/video-module/src/utils/dom.d.ts +1 -1
- package/package.json +18 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.js","sources":["../../../node_modules/.pnpm/@uppy+core@2.3.4/node_modules/@uppy/core/lib/loggers.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/getTimeStamp.js","../../../node_modules/.pnpm/nanoid@3.3.11/node_modules/nanoid/non-secure/index.cjs","../../../node_modules/.pnpm/@transloadit+prettier-bytes@0.0.7/node_modules/@transloadit/prettier-bytes/prettierBytes.js","../../../node_modules/.pnpm/wildcard@1.1.2/node_modules/wildcard/index.js","../../../node_modules/.pnpm/@uppy+core@2.3.4/node_modules/@uppy/core/lib/Restricter.js","../../../node_modules/.pnpm/mime-match@1.0.2/node_modules/mime-match/index.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/hasProperty.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/Translator.js","../../../node_modules/.pnpm/namespace-emitter@2.0.1/node_modules/namespace-emitter/index.js","../../../node_modules/.pnpm/lodash.throttle@4.1.1/node_modules/lodash.throttle/index.js","../../../node_modules/.pnpm/@uppy+store-default@2.1.1/node_modules/@uppy/store-default/lib/index.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/getFileNameAndExtension.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/mimeTypes.js","../../../node_modules/.pnpm/@uppy+core@2.3.4/node_modules/@uppy/core/lib/Uppy.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/getFileType.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/generateFileID.js","../../../node_modules/.pnpm/@uppy+core@2.3.4/node_modules/@uppy/core/lib/supportsUploadProgress.js","../../../node_modules/.pnpm/@uppy+core@2.3.4/node_modules/@uppy/core/lib/getFileName.js","../../../node_modules/.pnpm/@uppy+core@2.3.4/node_modules/@uppy/core/lib/locale.js","../../../node_modules/.pnpm/preact@10.27.2/node_modules/preact/dist/preact.module.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/findDOMElement.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/isDOMElement.js","../../../node_modules/.pnpm/@uppy+core@2.3.4/node_modules/@uppy/core/lib/BasePlugin.js","../../../node_modules/.pnpm/@uppy+core@2.3.4/node_modules/@uppy/core/lib/UIPlugin.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/getTextDirection.js","../../../node_modules/.pnpm/@uppy+core@2.3.4/node_modules/@uppy/core/lib/index.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/NetworkError.js","../../../node_modules/.pnpm/@uppy+companion-client@2.2.2/node_modules/@uppy/companion-client/lib/RequestClient.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/fetchWithNetworkError.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/ErrorWithCause.js","../../../node_modules/.pnpm/@uppy+companion-client@2.2.2/node_modules/@uppy/companion-client/lib/AuthError.js","../../../node_modules/.pnpm/@uppy+companion-client@2.2.2/node_modules/@uppy/companion-client/lib/tokenStorage.js","../../../node_modules/.pnpm/@uppy+companion-client@2.2.2/node_modules/@uppy/companion-client/lib/index.js","../../../node_modules/.pnpm/@uppy+companion-client@2.2.2/node_modules/@uppy/companion-client/lib/Provider.js","../../../node_modules/.pnpm/@uppy+companion-client@2.2.2/node_modules/@uppy/companion-client/lib/SearchProvider.js","../../../node_modules/.pnpm/@uppy+companion-client@2.2.2/node_modules/@uppy/companion-client/lib/Socket.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/RateLimitedQueue.js","../../../node_modules/.pnpm/@uppy+xhr-upload@2.1.3_@uppy+core@2.3.4/node_modules/@uppy/xhr-upload/lib/locale.js","../../../node_modules/.pnpm/@uppy+xhr-upload@2.1.3_@uppy+core@2.3.4/node_modules/@uppy/xhr-upload/lib/index.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/emitSocketProgress.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/getSocketHost.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/settle.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/EventTracker.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/ProgressTimeout.js","../../../node_modules/.pnpm/@uppy+utils@4.1.3/node_modules/@uppy/utils/lib/isNetworkError.js","../../../node_modules/.pnpm/lodash.foreach@4.5.0/node_modules/lodash.foreach/index.js","../../core/src/utils/util.ts","../../core/src/upload/createUppyUploader.ts","../../core/src/upload/createUploader.ts"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.justErrorsLogger = exports.debugLogger = void 0;\n\n/* eslint-disable no-console */\nconst getTimeStamp = require(\"@uppy/utils/lib/getTimeStamp\"); // Swallow all logs, except errors.\n// default if logger is not set or debug: false\n\n\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\n return console.error(`[Uppy] [${getTimeStamp()}]`, ...args);\n }\n}; // Print logs to console with namespace + timestamp,\n// set by logger: Uppy.debugLogger or debug: true\n\nexports.justErrorsLogger = justErrorsLogger;\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\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\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\n return console.error(`[Uppy] [${getTimeStamp()}]`, ...args);\n }\n};\nexports.debugLogger = debugLogger;","\"use strict\";\n\n/**\n * Adds zero to strings shorter than two characters.\n *\n * @param {number} number\n * @returns {string}\n */\nfunction pad(number) {\n return number < 10 ? `0${number}` : number.toString();\n}\n/**\n * Returns a timestamp in the format of `hours:minutes:seconds`\n */\n\n\nfunction 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}\n\nmodule.exports = getTimeStamp;","// This alphabet uses `A-Za-z0-9_-` symbols.\n// The order of characters is optimized for better gzip and brotli compression.\n// References to the same file (works both for gzip and brotli):\n// `'use`, `andom`, and `rict'`\n// References to the brotli default dictionary:\n// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`\nlet urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\n\nlet customAlphabet = (alphabet, defaultSize = 21) => {\n return (size = defaultSize) => {\n let id = ''\n // A compact alternative for `for (var i = 0; i < step; i++)`.\n let i = size | 0\n while (i--) {\n // `| 0` is more compact and faster than `Math.floor()`.\n id += alphabet[(Math.random() * alphabet.length) | 0]\n }\n return id\n }\n}\n\nlet nanoid = (size = 21) => {\n let id = ''\n // A compact alternative for `for (var i = 0; i < step; i++)`.\n let i = size | 0\n while (i--) {\n // `| 0` is more compact and faster than `Math.floor()`.\n id += urlAlphabet[(Math.random() * 64) | 0]\n }\n return id\n}\n\nmodule.exports = { nanoid, customAlphabet }\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\nmodule.exports = function prettierBytes (num) {\n if (typeof num !== 'number' || isNaN(num)) {\n throw new TypeError('Expected a number, got ' + typeof num)\n }\n\n var neg = num < 0\n var units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']\n\n if (neg) {\n num = -num\n }\n\n if (num < 1) {\n return (neg ? '-' : '') + num + ' B'\n }\n\n var exponent = Math.min(Math.floor(Math.log(num) / Math.log(1024)), units.length - 1)\n num = Number(num / Math.pow(1024, exponent))\n var unit = units[exponent]\n\n if (num >= 10 || num % 1 === 0) {\n // Do not show decimals when the number is two-digit, or if the number has no\n // decimal component.\n return (neg ? '-' : '') + num.toFixed(0) + ' ' + unit\n } else {\n return (neg ? '-' : '') + num.toFixed(1) + ' ' + unit\n }\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","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultOptions = exports.RestrictionError = exports.Restricter = void 0;\n\n/* eslint-disable max-classes-per-file, class-methods-use-this */\n\n/* global AggregateError */\nconst prettierBytes = require(\"@transloadit/prettier-bytes\");\n\nconst match = require(\"mime-match\");\n\nconst defaultOptions = {\n maxFileSize: null,\n minFileSize: null,\n maxTotalFileSize: null,\n maxNumberOfFiles: null,\n minNumberOfFiles: null,\n allowedFileTypes: null,\n requiredMetaFields: []\n};\nexports.defaultOptions = defaultOptions;\n\nclass RestrictionError extends Error {\n constructor() {\n super(...arguments);\n this.isRestriction = true;\n }\n\n}\n\nexports.RestrictionError = RestrictionError;\n\nif (typeof AggregateError === 'undefined') {\n // eslint-disable-next-line no-global-assign\n // TODO: remove this \"polyfill\" in the next major.\n globalThis.AggregateError = class AggregateError extends Error {\n constructor(errors, message) {\n super(message);\n this.errors = errors;\n }\n\n };\n}\n\nclass Restricter {\n constructor(getOpts, i18n) {\n this.i18n = i18n;\n\n this.getOpts = () => {\n const opts = getOpts();\n\n if (opts.restrictions.allowedFileTypes != null && !Array.isArray(opts.restrictions.allowedFileTypes)) {\n throw new TypeError('`restrictions.allowedFileTypes` must be an array');\n }\n\n return opts;\n };\n }\n\n validate(file, files) {\n const {\n maxFileSize,\n minFileSize,\n maxTotalFileSize,\n maxNumberOfFiles,\n allowedFileTypes\n } = this.getOpts().restrictions;\n\n if (maxNumberOfFiles) {\n const nonGhostFiles = files.filter(f => !f.isGhost);\n\n if (nonGhostFiles.length + 1 > maxNumberOfFiles) {\n throw new RestrictionError(`${this.i18n('youCanOnlyUploadX', {\n smart_count: maxNumberOfFiles\n })}`);\n }\n }\n\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 } // otherwise this is likely an extension\n\n\n if (type[0] === '.' && file.extension) {\n return file.extension.toLowerCase() === type.slice(1).toLowerCase();\n }\n\n return false;\n });\n\n if (!isCorrectFileType) {\n const allowedFileTypesString = allowedFileTypes.join(', ');\n throw new RestrictionError(this.i18n('youCanOnlyUploadFileTypes', {\n types: allowedFileTypesString\n }));\n }\n } // We can't check maxTotalFileSize if the size is unknown.\n\n\n if (maxTotalFileSize && file.size != null) {\n const totalFilesSize = files.reduce((total, f) => total + f.size, file.size);\n\n if (totalFilesSize > maxTotalFileSize) {\n throw new RestrictionError(this.i18n('exceedsSize', {\n size: prettierBytes(maxTotalFileSize),\n file: file.name\n }));\n }\n } // We can't check maxFileSize if the size is unknown.\n\n\n if (maxFileSize && file.size != null && file.size > maxFileSize) {\n throw new RestrictionError(this.i18n('exceedsSize', {\n size: prettierBytes(maxFileSize),\n file: file.name\n }));\n } // We can't check minFileSize if the size is unknown.\n\n\n if (minFileSize && file.size != null && file.size < minFileSize) {\n throw new RestrictionError(this.i18n('inferiorSize', {\n size: prettierBytes(minFileSize)\n }));\n }\n }\n\n validateMinNumberOfFiles(files) {\n const {\n minNumberOfFiles\n } = this.getOpts().restrictions;\n\n if (Object.keys(files).length < minNumberOfFiles) {\n throw new RestrictionError(this.i18n('youHaveToAtLeastSelectX', {\n smart_count: minNumberOfFiles\n }));\n }\n }\n\n getMissingRequiredMetaFields(file) {\n const error = new RestrictionError(this.i18n('missingRequiredMetaFieldOnFile', {\n fileName: file.name\n }));\n const {\n requiredMetaFields\n } = this.getOpts().restrictions; // TODO: migrate to Object.hasOwn in the next major.\n\n const own = Object.prototype.hasOwnProperty;\n const missingFields = [];\n\n for (const field of requiredMetaFields) {\n if (!own.call(file.meta, field) || file.meta[field] === '') {\n missingFields.push(field);\n }\n }\n\n return {\n missingFields,\n error\n };\n }\n\n}\n\nexports.Restricter = Restricter;","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","\"use strict\";\n\nfunction has(object, key) {\n return Object.prototype.hasOwnProperty.call(object, key);\n}\n\nmodule.exports = has;","\"use strict\";\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst has = require(\"./hasProperty.js\");\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’d get this: [object Object] hello [object Object] my <button>\n if (typeof chunk !== 'string') {\n return newParts.push(chunk);\n }\n\n return rx[Symbol.split](chunk).forEach((raw, i, list) => {\n if (raw !== '') {\n newParts.push(raw);\n } // Interlace with the `replacement` value\n\n\n if (i < list.length - 1) {\n newParts.push(replacement);\n }\n });\n });\n return newParts;\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 {string} phrase that needs interpolation, with placeholders\n * @param {object} options with values that will be used to replace placeholders\n * @returns {any[]} interpolated\n */\n\n\nfunction interpolate(phrase, options) {\n const dollarRegex = /\\$/g;\n const dollarBillsYall = '$$$$';\n let interpolated = [phrase];\n if (options == null) return interpolated;\n\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\n if (typeof replacement === 'string') {\n replacement = dollarRegex[Symbol.replace](replacement, dollarBillsYall);\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\n\n interpolated = insertReplacement(interpolated, new RegExp(`%\\\\{${arg}\\\\}`, 'g'), replacement);\n }\n }\n\n return interpolated;\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 */\n\n\nvar _apply = /*#__PURE__*/_classPrivateFieldLooseKey(\"apply\");\n\nclass Translator {\n /**\n * @param {object|Array<object>} locales - locale or list of locales.\n */\n constructor(locales) {\n Object.defineProperty(this, _apply, {\n value: _apply2\n });\n this.locale = {\n strings: {},\n\n pluralize(n) {\n if (n === 1) {\n return 0;\n }\n\n return 1;\n }\n\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 }\n\n /**\n * Public translate method\n *\n * @param {string} key\n * @param {object} 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 * Get a translation and return the translated and interpolated parts as an array.\n *\n * @param {string} key\n * @param {object} options with values that will be used to replace placeholders\n * @returns {Array} The translated and interpolated parts, in order.\n */\n\n\n translateArray(key, options) {\n if (!has(this.locale.strings, key)) {\n throw new Error(`missing string: ${key}`);\n }\n\n const string = this.locale.strings[key];\n const hasPluralForms = typeof string === 'object';\n\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\n throw new Error('Attempted to use a string with plural forms, but no value was given for %{smart_count}');\n }\n\n return interpolate(string, options);\n }\n\n}\n\nfunction _apply2(locale) {\n if (!(locale != null && locale.strings)) {\n return;\n }\n\n const prevLocale = this.locale;\n this.locale = { ...prevLocale,\n strings: { ...prevLocale.strings,\n ...locale.strings\n }\n };\n this.locale.pluralize = locale.pluralize || prevLocale.pluralize;\n}\n\nmodule.exports = Translator;","/**\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 – the name of the event, with optional namespace\n * @param {...*} data – 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] – 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 * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\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/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\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\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 objectToString = objectProto.toString;\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 * 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\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 result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\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 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\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\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 && (type == 'object' || type == 'function');\n}\n\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 && typeof value == 'object';\n}\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) && objectToString.call(value) == symbolTag);\n}\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 = value.replace(reTrim, '');\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 = throttle;\n","\"use strict\";\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst packageJson = {\n \"version\": \"2.1.1\"\n};\n/**\n * Default store that keeps state in a simple object.\n */\n\nvar _publish = /*#__PURE__*/_classPrivateFieldLooseKey(\"publish\");\n\nclass DefaultStore {\n constructor() {\n Object.defineProperty(this, _publish, {\n value: _publish2\n });\n this.state = {};\n this.callbacks = []; // TODO: use a Set instead, make it a private prop\n }\n\n getState() {\n return this.state;\n }\n\n setState(patch) {\n const prevState = { ...this.state\n };\n const nextState = { ...this.state,\n ...patch\n };\n this.state = nextState;\n\n _classPrivateFieldLooseBase(this, _publish)[_publish](prevState, nextState, patch);\n }\n\n subscribe(listener) {\n this.callbacks.push(listener);\n return () => {\n // Remove the listener.\n this.callbacks.splice(this.callbacks.indexOf(listener), 1);\n };\n }\n\n} // TODO: export the class instead in the next major.\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\n this.callbacks.forEach(listener => {\n listener(...args);\n });\n}\n\nDefaultStore.VERSION = packageJson.version;\n\nfunction defaultStore() {\n return new DefaultStore();\n}\n\nmodule.exports = defaultStore;","\"use strict\";\n\nfunction getFileNameAndExtension(fullFileName) {\n const lastDot = fullFileName.lastIndexOf('.'); // these count as no extension: \"no-dot\", \"trailing-dot.\"\n\n if (lastDot === -1 || lastDot === fullFileName.length - 1) {\n return {\n name: fullFileName,\n extension: undefined\n };\n }\n\n return {\n name: fullFileName.slice(0, lastDot),\n extension: fullFileName.slice(lastDot + 1)\n };\n}\n\n/**\n * Takes a full filename string and returns an object {name, extension}\n *\n * @param {string} fullFileName\n * @returns {object} {name, extension}\n */\nmodule.exports = getFileNameAndExtension;","\"use strict\";\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\nmodule.exports = {\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 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};","\"use strict\";\n\nvar _nonSecure = require(\"nanoid/non-secure\");\n\nvar _loggers = require(\"./loggers.js\");\n\nvar _Restricter = require(\"./Restricter.js\");\n\nlet _Symbol$for, _Symbol$for2;\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\n/* eslint-disable max-classes-per-file */\n\n/* global AggregateError */\nconst Translator = require(\"@uppy/utils/lib/Translator\");\n\nconst ee = require(\"namespace-emitter\");\n\nconst throttle = require(\"lodash.throttle\");\n\nconst DefaultStore = require(\"@uppy/store-default\");\n\nconst getFileType = require(\"@uppy/utils/lib/getFileType\");\n\nconst getFileNameAndExtension = require(\"@uppy/utils/lib/getFileNameAndExtension\");\n\nconst generateFileID = require(\"@uppy/utils/lib/generateFileID\");\n\nconst supportsUploadProgress = require(\"./supportsUploadProgress.js\");\n\nconst getFileName = require(\"./getFileName.js\");\n\nconst packageJson = {\n \"version\": \"2.3.4\"\n};\n\nconst locale = require(\"./locale.js\");\n/**\n * Uppy Core module.\n * Manages plugins, state updates, acts as an event bus,\n * adds/removes files and metadata.\n */\n\n\nvar _plugins = /*#__PURE__*/_classPrivateFieldLooseKey(\"plugins\");\n\nvar _restricter = /*#__PURE__*/_classPrivateFieldLooseKey(\"restricter\");\n\nvar _storeUnsubscribe = /*#__PURE__*/_classPrivateFieldLooseKey(\"storeUnsubscribe\");\n\nvar _emitter = /*#__PURE__*/_classPrivateFieldLooseKey(\"emitter\");\n\nvar _preProcessors = /*#__PURE__*/_classPrivateFieldLooseKey(\"preProcessors\");\n\nvar _uploaders = /*#__PURE__*/_classPrivateFieldLooseKey(\"uploaders\");\n\nvar _postProcessors = /*#__PURE__*/_classPrivateFieldLooseKey(\"postProcessors\");\n\nvar _informAndEmit = /*#__PURE__*/_classPrivateFieldLooseKey(\"informAndEmit\");\n\nvar _checkRequiredMetaFieldsOnFile = /*#__PURE__*/_classPrivateFieldLooseKey(\"checkRequiredMetaFieldsOnFile\");\n\nvar _checkRequiredMetaFields = /*#__PURE__*/_classPrivateFieldLooseKey(\"checkRequiredMetaFields\");\n\nvar _assertNewUploadAllowed = /*#__PURE__*/_classPrivateFieldLooseKey(\"assertNewUploadAllowed\");\n\nvar _checkAndCreateFileStateObject = /*#__PURE__*/_classPrivateFieldLooseKey(\"checkAndCreateFileStateObject\");\n\nvar _startIfAutoProceed = /*#__PURE__*/_classPrivateFieldLooseKey(\"startIfAutoProceed\");\n\nvar _addListeners = /*#__PURE__*/_classPrivateFieldLooseKey(\"addListeners\");\n\nvar _updateOnlineStatus = /*#__PURE__*/_classPrivateFieldLooseKey(\"updateOnlineStatus\");\n\nvar _createUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"createUpload\");\n\nvar _getUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"getUpload\");\n\nvar _removeUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"removeUpload\");\n\nvar _runUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"runUpload\");\n\n_Symbol$for = Symbol.for('uppy test: getPlugins');\n_Symbol$for2 = Symbol.for('uppy test: createUpload');\n\nclass Uppy {\n /** @type {Record<string, BasePlugin[]>} */\n\n /**\n * Instantiate Uppy\n *\n * @param {object} opts — Uppy options\n */\n constructor(_opts) {\n Object.defineProperty(this, _runUpload, {\n value: _runUpload2\n });\n Object.defineProperty(this, _removeUpload, {\n value: _removeUpload2\n });\n Object.defineProperty(this, _getUpload, {\n value: _getUpload2\n });\n Object.defineProperty(this, _createUpload, {\n value: _createUpload2\n });\n Object.defineProperty(this, _addListeners, {\n value: _addListeners2\n });\n Object.defineProperty(this, _startIfAutoProceed, {\n value: _startIfAutoProceed2\n });\n Object.defineProperty(this, _checkAndCreateFileStateObject, {\n value: _checkAndCreateFileStateObject2\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 Object.defineProperty(this, _updateOnlineStatus, {\n writable: true,\n value: this.updateOnlineStatus.bind(this)\n });\n this.defaultLocale = locale;\n const defaultOptions = {\n id: 'uppy',\n autoProceed: false,\n\n /**\n * @deprecated The method should not be used\n */\n allowMultipleUploads: true,\n allowMultipleUploadBatches: true,\n debug: false,\n restrictions: _Restricter.defaultOptions,\n meta: {},\n onBeforeFileAdded: currentFile => currentFile,\n onBeforeUpload: files => files,\n store: DefaultStore(),\n logger: _loggers.justErrorsLogger,\n infoTimeout: 5000\n }; // Merge default options with the ones set by user,\n // making sure to merge restrictions too\n\n this.opts = { ...defaultOptions,\n ..._opts,\n restrictions: { ...defaultOptions.restrictions,\n ...(_opts && _opts.restrictions)\n }\n }; // Support debug: true for backwards-compatability, unless logger is set in opts\n // opts instead of this.opts to avoid comparing objects — we set logger: justErrorsLogger in defaultOptions\n\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 = _loggers.debugLogger;\n }\n\n this.log(`Using Core v${this.constructor.VERSION}`);\n this.i18nInit(); // ___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\n this.calculateProgress = throttle(this.calculateProgress.bind(this), 500, {\n leading: true,\n trailing: true\n });\n this.store = this.opts.store;\n this.setState({\n plugins: {},\n files: {},\n currentUploads: {},\n allowNewUpload: true,\n capabilities: {\n uploadProgress: supportsUploadProgress(),\n individualCancellation: true,\n resumableUploads: false\n },\n totalProgress: 0,\n meta: { ...this.opts.meta\n },\n info: [],\n recoveredState: null\n });\n _classPrivateFieldLooseBase(this, _restricter)[_restricter] = new _Restricter.Restricter(() => this.opts, this.i18n);\n _classPrivateFieldLooseBase(this, _storeUnsubscribe)[_storeUnsubscribe] = this.store.subscribe((prevState, nextState, patch) => {\n this.emit('state-update', prevState, nextState, patch);\n this.updateAll(nextState);\n }); // Exposing uppy object on window for debugging and testing\n\n if (this.opts.debug && typeof window !== 'undefined') {\n window[this.opts.id] = this;\n }\n\n _classPrivateFieldLooseBase(this, _addListeners)[_addListeners]();\n }\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\n _classPrivateFieldLooseBase(this, _emitter)[_emitter].emit(event, ...args);\n }\n\n on(event, callback) {\n _classPrivateFieldLooseBase(this, _emitter)[_emitter].on(event, callback);\n\n return this;\n }\n\n once(event, callback) {\n _classPrivateFieldLooseBase(this, _emitter)[_emitter].once(event, callback);\n\n return this;\n }\n\n off(event, callback) {\n _classPrivateFieldLooseBase(this, _emitter)[_emitter].off(event, callback);\n\n return this;\n }\n /**\n * Iterate on all plugins and run `update` on them.\n * Called each time state changes.\n *\n */\n\n\n updateAll(state) {\n this.iteratePlugins(plugin => {\n plugin.update(state);\n });\n }\n /**\n * Updates state with a patch\n *\n * @param {object} patch {foo: 'bar'}\n */\n\n\n setState(patch) {\n this.store.setState(patch);\n }\n /**\n * Returns current state.\n *\n * @returns {object}\n */\n\n\n getState() {\n return this.store.getState();\n }\n /**\n * Back compat for when uppy.state is used instead of uppy.getState().\n *\n * @deprecated\n */\n\n\n get state() {\n // Here, state is a non-enumerable property.\n return this.getState();\n }\n /**\n * Shorthand to set state for a specific file.\n */\n\n\n setFileState(fileID, state) {\n if (!this.getState().files[fileID]) {\n throw new Error(`Can’t set state for ${fileID} (the file could have been removed)`);\n }\n\n this.setState({\n files: { ...this.getState().files,\n [fileID]: { ...this.getState().files[fileID],\n ...state\n }\n }\n });\n }\n\n i18nInit() {\n const translator = new Translator([this.defaultLocale, this.opts.locale]);\n this.i18n = translator.translate.bind(translator);\n this.i18nArray = translator.translateArray.bind(translator);\n this.locale = translator.locale;\n }\n\n setOptions(newOpts) {\n this.opts = { ...this.opts,\n ...newOpts,\n restrictions: { ...this.opts.restrictions,\n ...(newOpts && newOpts.restrictions)\n }\n };\n\n if (newOpts.meta) {\n this.setMeta(newOpts.meta);\n }\n\n this.i18nInit();\n\n if (newOpts.locale) {\n this.iteratePlugins(plugin => {\n plugin.setOptions();\n });\n } // Note: this is not the preact `setState`, it's an internal function that has the same name.\n\n\n this.setState(); // so that UI re-renders with new options\n }\n\n resetProgress() {\n const defaultProgress = {\n percentage: 0,\n bytesUploaded: 0,\n uploadComplete: false,\n uploadStarted: null\n };\n const files = { ...this.getState().files\n };\n const updatedFiles = {};\n Object.keys(files).forEach(fileID => {\n const updatedFile = { ...files[fileID]\n };\n updatedFile.progress = { ...updatedFile.progress,\n ...defaultProgress\n };\n updatedFiles[fileID] = updatedFile;\n });\n this.setState({\n files: updatedFiles,\n totalProgress: 0\n });\n this.emit('reset-progress');\n }\n\n addPreProcessor(fn) {\n _classPrivateFieldLooseBase(this, _preProcessors)[_preProcessors].add(fn);\n }\n\n removePreProcessor(fn) {\n return _classPrivateFieldLooseBase(this, _preProcessors)[_preProcessors].delete(fn);\n }\n\n addPostProcessor(fn) {\n _classPrivateFieldLooseBase(this, _postProcessors)[_postProcessors].add(fn);\n }\n\n removePostProcessor(fn) {\n return _classPrivateFieldLooseBase(this, _postProcessors)[_postProcessors].delete(fn);\n }\n\n addUploader(fn) {\n _classPrivateFieldLooseBase(this, _uploaders)[_uploaders].add(fn);\n }\n\n removeUploader(fn) {\n return _classPrivateFieldLooseBase(this, _uploaders)[_uploaders].delete(fn);\n }\n\n setMeta(data) {\n const updatedMeta = { ...this.getState().meta,\n ...data\n };\n const updatedFiles = { ...this.getState().files\n };\n Object.keys(updatedFiles).forEach(fileID => {\n updatedFiles[fileID] = { ...updatedFiles[fileID],\n meta: { ...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\n setFileMeta(fileID, data) {\n const updatedFiles = { ...this.getState().files\n };\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\n const newMeta = { ...updatedFiles[fileID].meta,\n ...data\n };\n updatedFiles[fileID] = { ...updatedFiles[fileID],\n meta: newMeta\n };\n this.setState({\n files: updatedFiles\n });\n }\n /**\n * Get a file object.\n *\n * @param {string} fileID The ID of the file object to return.\n */\n\n\n getFile(fileID) {\n return this.getState().files[fileID];\n }\n /**\n * Get all files in an array.\n */\n\n\n getFiles() {\n const {\n files\n } = this.getState();\n return Object.values(files);\n }\n\n getObjectOfFilesPerState() {\n const {\n files: filesObject,\n totalProgress,\n error\n } = this.getState();\n const files = Object.values(filesObject);\n const inProgressFiles = files.filter(_ref => {\n let {\n progress\n } = _ref;\n return !progress.uploadComplete && progress.uploadStarted;\n });\n const newFiles = files.filter(file => !file.progress.uploadStarted);\n const startedFiles = files.filter(file => file.progress.uploadStarted || file.progress.preprocess || file.progress.postprocess);\n const uploadStartedFiles = files.filter(file => file.progress.uploadStarted);\n const pausedFiles = files.filter(file => file.isPaused);\n const completeFiles = files.filter(file => file.progress.uploadComplete);\n const erroredFiles = files.filter(file => file.error);\n const inProgressNotPausedFiles = inProgressFiles.filter(file => !file.isPaused);\n const processingFiles = files.filter(file => file.progress.preprocess || file.progress.postprocess);\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 /*\n * @constructs\n * @param { Error } error\n * @param { undefined } file\n */\n\n /*\n * @constructs\n * @param { RestrictionError } error\n * @param { UppyFile | undefined } file\n */\n\n\n validateRestrictions(file, files) {\n if (files === void 0) {\n files = this.getFiles();\n }\n\n // TODO: directly return the Restriction error in next major version.\n // we create RestrictionError's just to discard immediately, which doesn't make sense.\n try {\n _classPrivateFieldLooseBase(this, _restricter)[_restricter].validate(file, files);\n\n return {\n result: true\n };\n } catch (err) {\n return {\n result: false,\n reason: err.message\n };\n }\n }\n\n checkIfFileAlreadyExists(fileID) {\n const {\n files\n } = this.getState();\n\n if (files[fileID] && !files[fileID].isGhost) {\n return true;\n }\n\n return false;\n }\n /**\n * Create a file state object based on user-provided `addFile()` options.\n *\n * Note this is extremely side-effectful and should only be done when a file state object\n * will be added to state immediately afterward!\n *\n * The `files` value is passed in because it may be updated by the caller without updating the store.\n */\n\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 * @param {object} file object to add\n * @returns {string} id for the added file\n */\n addFile(file) {\n _classPrivateFieldLooseBase(this, _assertNewUploadAllowed)[_assertNewUploadAllowed](file);\n\n const {\n files\n } = this.getState();\n\n let newFile = _classPrivateFieldLooseBase(this, _checkAndCreateFileStateObject)[_checkAndCreateFileStateObject](files, file); // Users are asked to re-select recovered files without data,\n // and to keep the progress, meta and everthing else, we only replace said data\n\n\n if (files[newFile.id] && files[newFile.id].isGhost) {\n newFile = { ...files[newFile.id],\n data: file.data,\n isGhost: false\n };\n this.log(`Replaced the blob in the restored ghost file: ${newFile.name}, ${newFile.id}`);\n }\n\n this.setState({\n files: { ...files,\n [newFile.id]: newFile\n }\n });\n this.emit('file-added', newFile);\n this.emit('files-added', [newFile]);\n this.log(`Added file: ${newFile.name}, ${newFile.id}, mime type: ${newFile.type}`);\n\n _classPrivateFieldLooseBase(this, _startIfAutoProceed)[_startIfAutoProceed]();\n\n return newFile.id;\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\n\n addFiles(fileDescriptors) {\n _classPrivateFieldLooseBase(this, _assertNewUploadAllowed)[_assertNewUploadAllowed](); // create a copy of the files object only once\n\n\n const files = { ...this.getState().files\n };\n const newFiles = [];\n const errors = [];\n\n for (let i = 0; i < fileDescriptors.length; i++) {\n try {\n let newFile = _classPrivateFieldLooseBase(this, _checkAndCreateFileStateObject)[_checkAndCreateFileStateObject](files, fileDescriptors[i]); // Users are asked to re-select recovered files without data,\n // and to keep the progress, meta and everthing else, we only replace said data\n\n\n if (files[newFile.id] && files[newFile.id].isGhost) {\n newFile = { ...files[newFile.id],\n data: fileDescriptors[i].data,\n isGhost: false\n };\n this.log(`Replaced blob in a ghost file: ${newFile.name}, ${newFile.id}`);\n }\n\n files[newFile.id] = newFile;\n newFiles.push(newFile);\n } catch (err) {\n if (!err.isRestriction) {\n errors.push(err);\n }\n }\n }\n\n this.setState({\n files\n });\n newFiles.forEach(newFile => {\n this.emit('file-added', newFile);\n });\n this.emit('files-added', newFiles);\n\n if (newFiles.length > 5) {\n this.log(`Added batch of ${newFiles.length} files`);\n } else {\n Object.keys(newFiles).forEach(fileID => {\n this.log(`Added file: ${newFiles[fileID].name}\\n id: ${newFiles[fileID].id}\\n type: ${newFiles[fileID].type}`);\n });\n }\n\n if (newFiles.length > 0) {\n _classPrivateFieldLooseBase(this, _startIfAutoProceed)[_startIfAutoProceed]();\n }\n\n if (errors.length > 0) {\n let message = 'Multiple errors occurred while adding files:\\n';\n errors.forEach(subError => {\n message += `\\n * ${subError.message}`;\n });\n this.info({\n message: this.i18n('addBulkFilesFailed', {\n smart_count: errors.length\n }),\n details: message\n }, 'error', this.opts.infoTimeout);\n\n if (typeof AggregateError === 'function') {\n throw new AggregateError(errors, message);\n } else {\n const err = new Error(message);\n err.errors = errors;\n throw err;\n }\n }\n }\n\n removeFiles(fileIDs, reason) {\n const {\n files,\n currentUploads\n } = this.getState();\n const updatedFiles = { ...files\n };\n const updatedUploads = { ...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 }); // Remove files from the `fileIDs` list in each upload.\n\n function fileIsNotRemoved(uploadFileID) {\n return removedFiles[uploadFileID] === undefined;\n }\n\n Object.keys(updatedUploads).forEach(uploadID => {\n const newFileIDs = currentUploads[uploadID].fileIDs.filter(fileIsNotRemoved); // Remove the upload if no files are associated with it anymore.\n\n if (newFileIDs.length === 0) {\n delete updatedUploads[uploadID];\n return;\n }\n\n const {\n capabilities\n } = this.getState();\n\n if (newFileIDs.length !== currentUploads[uploadID].fileIDs.length && !capabilities.individualCancellation) {\n throw new Error('individualCancellation is disabled');\n }\n\n updatedUploads[uploadID] = { ...currentUploads[uploadID],\n fileIDs: newFileIDs\n };\n });\n const stateUpdate = {\n currentUploads: updatedUploads,\n files: updatedFiles\n }; // If all files were removed - allow new uploads,\n // and clear recoveredState\n\n if (Object.keys(updatedFiles).length === 0) {\n stateUpdate.allowNewUpload = true;\n stateUpdate.error = null;\n stateUpdate.recoveredState = null;\n }\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\n if (removedFileIDs.length > 5) {\n this.log(`Removed ${removedFileIDs.length} files`);\n } else {\n this.log(`Removed files: ${removedFileIDs.join(', ')}`);\n }\n }\n\n removeFile(fileID, reason) {\n if (reason === void 0) {\n reason = null;\n }\n\n this.removeFiles([fileID], reason);\n }\n\n pauseResume(fileID) {\n if (!this.getState().capabilities.resumableUploads || this.getFile(fileID).uploadComplete) {\n return undefined;\n }\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\n pauseAll() {\n const updatedFiles = { ...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 = { ...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\n resumeAll() {\n const updatedFiles = { ...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 = { ...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\n retryAll() {\n const updatedFiles = { ...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 = { ...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\n if (filesToRetry.length === 0) {\n return Promise.resolve({\n successful: [],\n failed: []\n });\n }\n\n const uploadID = _classPrivateFieldLooseBase(this, _createUpload)[_createUpload](filesToRetry, {\n forceAllowNewUpload: true // create new upload even if allowNewUpload: false\n\n });\n\n return _classPrivateFieldLooseBase(this, _runUpload)[_runUpload](uploadID);\n }\n\n cancelAll(_temp) {\n let {\n reason = 'user'\n } = _temp === void 0 ? {} : _temp;\n this.emit('cancel-all', {\n reason\n }); // Only remove existing uploads if user is canceling\n\n if (reason === 'user') {\n const {\n files\n } = this.getState();\n const fileIDs = Object.keys(files);\n\n if (fileIDs.length) {\n this.removeFiles(fileIDs, 'cancel-all');\n }\n\n this.setState({\n totalProgress: 0,\n error: null,\n recoveredState: null\n });\n }\n }\n\n retryUpload(fileID) {\n this.setFileState(fileID, {\n error: null,\n isPaused: false\n });\n this.emit('upload-retry', fileID);\n\n const uploadID = _classPrivateFieldLooseBase(this, _createUpload)[_createUpload]([fileID], {\n forceAllowNewUpload: true // create new upload even if allowNewUpload: false\n\n });\n\n return _classPrivateFieldLooseBase(this, _runUpload)[_runUpload](uploadID);\n } // todo remove in next major. what is the point of the reset method when we have cancelAll or vice versa?\n\n\n reset() {\n this.cancelAll(...arguments);\n }\n\n logout() {\n this.iteratePlugins(plugin => {\n if (plugin.provider && plugin.provider.logout) {\n plugin.provider.logout();\n }\n });\n }\n\n calculateProgress(file, data) {\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 } // bytesTotal may be null or zero; in that case we can't divide by it\n\n\n const canHavePercentage = Number.isFinite(data.bytesTotal) && data.bytesTotal > 0;\n this.setFileState(file.id, {\n progress: { ...this.getFile(file.id).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 }\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\n if (inProgress.length === 0) {\n this.emit('progress', 0);\n this.setState({\n totalProgress: 0\n });\n return;\n }\n\n const sizedFiles = inProgress.filter(file => file.progress.bytesTotal != null);\n const unsizedFiles = inProgress.filter(file => file.progress.bytesTotal == null);\n\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\n let totalSize = sizedFiles.reduce((acc, file) => {\n return acc + file.progress.bytesTotal;\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); // hot fix, because:\n // uploadedSize ended up larger than totalSize, resulting in 1325% total\n\n if (totalProgress > 100) {\n totalProgress = 100;\n }\n\n this.setState({\n totalProgress\n });\n this.emit('progress', totalProgress);\n }\n /**\n * Registers listeners for all global actions, like:\n * `error`, `file-removed`, `upload-progress`\n */\n\n\n updateOnlineStatus() {\n const online = typeof window.navigator.onLine !== 'undefined' ? window.navigator.onLine : true;\n\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\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\n getID() {\n return this.opts.id;\n }\n /**\n * Registers a plugin with Core.\n *\n * @param {object} Plugin object\n * @param {object} [opts] object with options to be passed to Plugin\n * @returns {object} self for chaining\n */\n // eslint-disable-next-line no-shadow\n\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 } // Instantiate\n\n\n const plugin = new Plugin(this, opts);\n const pluginId = plugin.id;\n\n if (!pluginId) {\n throw new Error('Your plugin must have an id');\n }\n\n if (!plugin.type) {\n throw new Error('Your plugin must have a type');\n }\n\n const existsPluginAlready = this.getPlugin(pluginId);\n\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 if (Plugin.VERSION) {\n this.log(`Using ${pluginId} v${Plugin.VERSION}`);\n }\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\n plugin.install();\n return this;\n }\n /**\n * Find one Plugin by name.\n *\n * @param {string} id plugin id\n * @returns {BasePlugin|undefined}\n */\n\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\n return undefined;\n }\n\n [_Symbol$for](type) {\n return _classPrivateFieldLooseBase(this, _plugins)[_plugins][type];\n }\n /**\n * Iterate through all `use`d plugins.\n *\n * @param {Function} method that will be run on each plugin\n */\n\n\n iteratePlugins(method) {\n Object.values(_classPrivateFieldLooseBase(this, _plugins)[_plugins]).flat(1).forEach(method);\n }\n /**\n * Uninstall and remove a plugin.\n *\n * @param {object} instance The plugin instance to remove.\n */\n\n\n removePlugin(instance) {\n this.log(`Removing plugin ${instance.id}`);\n this.emit('plugin-remove', instance);\n\n if (instance.uninstall) {\n instance.uninstall();\n }\n\n const list = _classPrivateFieldLooseBase(this, _plugins)[_plugins][instance.type]; // 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\n\n const index = list.findIndex(item => item.id === instance.id);\n\n if (index !== -1) {\n list.splice(index, 1);\n }\n\n const state = this.getState();\n const updatedState = {\n plugins: { ...state.plugins,\n [instance.id]: undefined\n }\n };\n this.setState(updatedState);\n }\n /**\n * Uninstall all plugins and close down this Uppy instance.\n */\n\n\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\n _classPrivateFieldLooseBase(this, _storeUnsubscribe)[_storeUnsubscribe]();\n\n this.iteratePlugins(plugin => {\n this.removePlugin(plugin);\n });\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\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 * Set info message in `state.info`, so that UI plugins like `Informer`\n * can display the message.\n *\n * @param {string | object} message Message to be displayed by the informer\n * @param {string} [type]\n * @param {number} [duration]\n */\n\n\n info(message, type, duration) {\n if (type === void 0) {\n type = 'info';\n }\n\n if (duration === void 0) {\n duration = 3000;\n }\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 * 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 * @param {string|object} message to log\n * @param {string} [type] optional `error` or `warning`\n */\n\n\n log(message, type) {\n const {\n logger\n } = this.opts;\n\n switch (type) {\n case 'error':\n logger.error(message);\n break;\n\n case 'warning':\n logger.warn(message);\n break;\n\n default:\n logger.debug(message);\n break;\n }\n }\n /**\n * Restore an upload by its ID.\n */\n\n\n restore(uploadID) {\n this.log(`Core: attempting to restore upload \"${uploadID}\"`);\n\n if (!this.getState().currentUploads[uploadID]) {\n _classPrivateFieldLooseBase(this, _removeUpload)[_removeUpload](uploadID);\n\n return Promise.reject(new Error('Nonexistent upload'));\n }\n\n return _classPrivateFieldLooseBase(this, _runUpload)[_runUpload](uploadID);\n }\n /**\n * Create an upload for a bunch of files.\n *\n * @param {Array<string>} fileIDs File IDs to include in this upload.\n * @returns {string} ID of this upload.\n */\n\n\n [_Symbol$for2]() {\n return _classPrivateFieldLooseBase(this, _createUpload)[_createUpload](...arguments);\n }\n\n /**\n * Add data to an upload's result object.\n *\n * @param {string} uploadID The ID of the upload.\n * @param {object} data Data properties to add to the 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\n const {\n currentUploads\n } = this.getState();\n const currentUpload = { ...currentUploads[uploadID],\n result: { ...currentUploads[uploadID].result,\n ...data\n }\n };\n this.setState({\n currentUploads: { ...currentUploads,\n [uploadID]: currentUpload\n }\n });\n }\n /**\n * Remove an upload, eg. if it has been canceled or completed.\n *\n * @param {string} uploadID The ID of the upload.\n */\n\n\n /**\n * Start an upload for all the files that are not currently being uploaded.\n *\n * @returns {Promise}\n */\n upload() {\n var _classPrivateFieldLoo;\n\n if (!((_classPrivateFieldLoo = _classPrivateFieldLooseBase(this, _plugins)[_plugins].uploader) != null && _classPrivateFieldLoo.length)) {\n this.log('No uploader type plugins are used', 'warning');\n }\n\n let {\n files\n } = this.getState();\n const onBeforeUploadResult = this.opts.onBeforeUpload(files);\n\n if (onBeforeUploadResult === false) {\n return Promise.reject(new Error('Not starting the upload because onBeforeUpload returned false'));\n }\n\n if (onBeforeUploadResult && typeof onBeforeUploadResult === 'object') {\n files = onBeforeUploadResult; // Updating files in state, because uploader plugins receive file IDs,\n // and then fetch the actual file object from state\n\n this.setState({\n files\n });\n }\n\n return Promise.resolve().then(() => _classPrivateFieldLooseBase(this, _restricter)[_restricter].validateMinNumberOfFiles(files)).catch(err => {\n _classPrivateFieldLooseBase(this, _informAndEmit)[_informAndEmit](err);\n\n throw err;\n }).then(() => {\n if (!_classPrivateFieldLooseBase(this, _checkRequiredMetaFields)[_checkRequiredMetaFields](files)) {\n throw new _Restricter.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(); // get a list of files that are currently assigned to uploads\n\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); // if the file hasn't started uploading and hasn't already been assigned to an upload..\n\n if (!file.progress.uploadStarted && currentlyUploadingFiles.indexOf(fileID) === -1) {\n waitingFileIDs.push(file.id);\n }\n });\n\n const uploadID = _classPrivateFieldLooseBase(this, _createUpload)[_createUpload](waitingFileIDs);\n\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\n}\n\nfunction _informAndEmit2(error, file) {\n const {\n message,\n details = ''\n } = error;\n\n if (error.isRestriction) {\n this.emit('restriction-failed', file, error);\n } else {\n this.emit('error', error);\n }\n\n this.info({\n message,\n details\n }, 'error', this.opts.infoTimeout);\n this.log(`${message} ${details}`.trim(), 'error');\n}\n\nfunction _checkRequiredMetaFieldsOnFile2(file) {\n const {\n missingFields,\n error\n } = _classPrivateFieldLooseBase(this, _restricter)[_restricter].getMissingRequiredMetaFields(file);\n\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\n return true;\n}\n\nfunction _checkRequiredMetaFields2(files) {\n let success = true;\n\n for (const file of Object.values(files)) {\n if (!_classPrivateFieldLooseBase(this, _checkRequiredMetaFieldsOnFile)[_checkRequiredMetaFieldsOnFile](file)) {\n success = false;\n }\n }\n\n return success;\n}\n\nfunction _assertNewUploadAllowed2(file) {\n const {\n allowNewUpload\n } = this.getState();\n\n if (allowNewUpload === false) {\n const error = new _Restricter.RestrictionError(this.i18n('noMoreFilesAllowed'));\n\n _classPrivateFieldLooseBase(this, _informAndEmit)[_informAndEmit](error, file);\n\n throw error;\n }\n}\n\nfunction _checkAndCreateFileStateObject2(files, fileDescriptor) {\n const fileType = getFileType(fileDescriptor);\n const fileName = getFileName(fileType, fileDescriptor);\n const fileExtension = getFileNameAndExtension(fileName).extension;\n const isRemote = Boolean(fileDescriptor.isRemote);\n const fileID = generateFileID({ ...fileDescriptor,\n type: fileType\n });\n\n if (this.checkIfFileAlreadyExists(fileID)) {\n const error = new _Restricter.RestrictionError(this.i18n('noDuplicates', {\n fileName\n }));\n\n _classPrivateFieldLooseBase(this, _informAndEmit)[_informAndEmit](error, fileDescriptor);\n\n throw error;\n }\n\n const meta = fileDescriptor.meta || {};\n meta.name = fileName;\n meta.type = fileType; // `null` means the size is unknown.\n\n const size = Number.isFinite(fileDescriptor.data.size) ? fileDescriptor.data.size : null;\n let newFile = {\n source: fileDescriptor.source || '',\n id: fileID,\n name: fileName,\n extension: fileExtension || '',\n meta: { ...this.getState().meta,\n ...meta\n },\n type: fileType,\n data: fileDescriptor.data,\n progress: {\n percentage: 0,\n bytesUploaded: 0,\n bytesTotal: size,\n uploadComplete: false,\n uploadStarted: null\n },\n size,\n isRemote,\n remote: fileDescriptor.remote || '',\n preview: fileDescriptor.preview\n };\n const onBeforeFileAddedResult = this.opts.onBeforeFileAdded(newFile, files);\n\n if (onBeforeFileAddedResult === false) {\n // Don’t show UI info for this error, as it should be done by the developer\n const error = new _Restricter.RestrictionError('Cannot add the file because onBeforeFileAdded returned false.');\n this.emit('restriction-failed', fileDescriptor, error);\n throw error;\n } else if (typeof onBeforeFileAddedResult === 'object' && onBeforeFileAddedResult !== null) {\n newFile = onBeforeFileAddedResult;\n }\n\n try {\n const filesArray = Object.keys(files).map(i => files[i]);\n\n _classPrivateFieldLooseBase(this, _restricter)[_restricter].validate(newFile, filesArray);\n } catch (err) {\n _classPrivateFieldLooseBase(this, _informAndEmit)[_informAndEmit](err, newFile);\n\n throw err;\n }\n\n return newFile;\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}\n\nfunction _addListeners2() {\n /**\n * @param {Error} error\n * @param {object} [file]\n * @param {object} [response]\n */\n const errorHandler = (error, file, response) => {\n let errorMsg = error.message || 'Unknown error';\n\n if (error.details) {\n errorMsg += ` ${error.details}`;\n }\n\n this.setState({\n error: errorMsg\n });\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\n this.on('error', errorHandler);\n this.on('upload-error', (file, error, response) => {\n errorHandler(error, file, response);\n\n if (typeof error === 'object' && error.message) {\n const newError = new Error(error.message);\n newError.details = error.message;\n\n if (error.details) {\n newError.details += ` ${error.details}`;\n }\n\n newError.message = this.i18n('failedToUpload', {\n file: file == null ? void 0 : file.name\n });\n\n _classPrivateFieldLooseBase(this, _informAndEmit)[_informAndEmit](newError);\n } else {\n _classPrivateFieldLooseBase(this, _informAndEmit)[_informAndEmit](error);\n }\n });\n this.on('upload', () => {\n this.setState({\n error: null\n });\n });\n this.on('upload-started', 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\n this.setFileState(file.id, {\n progress: {\n uploadStarted: Date.now(),\n uploadComplete: false,\n percentage: 0,\n bytesUploaded: 0,\n bytesTotal: file.size\n }\n });\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\n const currentProgress = this.getFile(file.id).progress;\n this.setFileState(file.id, {\n progress: { ...currentProgress,\n postprocess: _classPrivateFieldLooseBase(this, _postProcessors)[_postProcessors].size > 0 ? {\n mode: 'indeterminate'\n } : null,\n uploadComplete: true,\n percentage: 100,\n bytesUploaded: currentProgress.bytesTotal\n },\n response: uploadResp,\n uploadURL: uploadResp.uploadURL,\n isPaused: false\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\n if (file.size == null) {\n this.setFileState(file.id, {\n size: uploadResp.bytesUploaded || currentProgress.bytesTotal\n });\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\n this.setFileState(file.id, {\n progress: { ...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\n const files = { ...this.getState().files\n };\n files[file.id] = { ...files[file.id],\n progress: { ...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\n this.setFileState(file.id, {\n progress: { ...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\n const files = { ...this.getState().files\n };\n files[file.id] = { ...files[file.id],\n progress: { ...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 this.on('dashboard:file-edit-complete', file => {\n if (file) {\n _classPrivateFieldLooseBase(this, _checkRequiredMetaFieldsOnFile)[_checkRequiredMetaFieldsOnFile](file);\n }\n }); // show informer if offline\n\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}\n\nfunction _createUpload2(fileIDs, opts) {\n if (opts === void 0) {\n opts = {};\n }\n\n // uppy.retryAll sets this to true — 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\n if (!allowNewUpload && !forceAllowNewUpload) {\n throw new Error('Cannot create a new upload: already uploading.');\n }\n\n const uploadID = (0, _nonSecure.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: { ...currentUploads,\n [uploadID]: {\n fileIDs,\n step: 0,\n result: {}\n }\n }\n });\n return uploadID;\n}\n\nfunction _getUpload2(uploadID) {\n const {\n currentUploads\n } = this.getState();\n return currentUploads[uploadID];\n}\n\nfunction _removeUpload2(uploadID) {\n const currentUploads = { ...this.getState().currentUploads\n };\n delete currentUploads[uploadID];\n this.setState({\n currentUploads\n });\n}\n\nasync function _runUpload2(uploadID) {\n let {\n currentUploads\n } = this.getState();\n let currentUpload = currentUploads[uploadID];\n const restoreStep = currentUpload.step || 0;\n const steps = [..._classPrivateFieldLooseBase(this, _preProcessors)[_preProcessors], ..._classPrivateFieldLooseBase(this, _uploaders)[_uploaders], ..._classPrivateFieldLooseBase(this, _postProcessors)[_postProcessors]];\n\n try {\n for (let step = restoreStep; step < steps.length; step++) {\n if (!currentUpload) {\n break;\n }\n\n const fn = steps[step];\n const updatedUpload = { ...currentUpload,\n step\n };\n this.setState({\n currentUploads: { ...currentUploads,\n [uploadID]: updatedUpload\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\n await fn(updatedUpload.fileIDs, uploadID); // Update currentUpload value in case it was modified asynchronously.\n\n currentUploads = this.getState().currentUploads;\n currentUpload = currentUploads[uploadID];\n }\n } catch (err) {\n _classPrivateFieldLooseBase(this, _removeUpload)[_removeUpload](uploadID);\n\n throw err;\n } // Set result data.\n\n\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\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 await this.addResultData(uploadID, {\n successful,\n failed,\n uploadID\n }); // Update currentUpload value in case it was modified asynchronously.\n\n currentUploads = this.getState().currentUploads;\n currentUpload = currentUploads[uploadID];\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\n\n let result;\n\n if (currentUpload) {\n result = currentUpload.result;\n this.emit('complete', result);\n\n _classPrivateFieldLooseBase(this, _removeUpload)[_removeUpload](uploadID);\n }\n\n if (result == null) {\n this.log(`Not setting result for an upload that has been removed: ${uploadID}`);\n }\n\n return result;\n}\n\nUppy.VERSION = packageJson.version;\nmodule.exports = Uppy;","\"use strict\";\n\nconst getFileNameAndExtension = require(\"./getFileNameAndExtension.js\");\n\nconst mimeTypes = require(\"./mimeTypes.js\");\n\nfunction getFileType(file) {\n var _getFileNameAndExtens;\n\n if (file.type) return file.type;\n const fileExtension = file.name ? (_getFileNameAndExtens = getFileNameAndExtension(file.name).extension) == null ? void 0 : _getFileNameAndExtens.toLowerCase() : null;\n\n if (fileExtension && fileExtension in mimeTypes) {\n // else, see if we can map extension to a mime type\n return mimeTypes[fileExtension];\n } // if all fails, fall back to a generic byte stream type\n\n\n return 'application/octet-stream';\n}\n\nmodule.exports = getFileType;","\"use strict\";\n\nfunction encodeCharacter(character) {\n return character.charCodeAt(0).toString(32);\n}\n\nfunction encodeFilename(name) {\n let suffix = '';\n return name.replace(/[^A-Z0-9]/ig, character => {\n suffix += `-${encodeCharacter(character)}`;\n return '/';\n }) + suffix;\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 *\n * @param {object} file\n * @returns {string} the fileID\n */\n\n\nfunction generateFileID(file) {\n // It's tempting to do `[items].filter(Boolean).join('-')` here, but that\n // is slower! simple string concatenation is fast\n let id = 'uppy';\n\n if (typeof file.name === 'string') {\n id += `-${encodeFilename(file.name.toLowerCase())}`;\n }\n\n if (file.type !== undefined) {\n id += `-${file.type}`;\n }\n\n if (file.meta && typeof file.meta.relativePath === 'string') {\n id += `-${encodeFilename(file.meta.relativePath.toLowerCase())}`;\n }\n\n if (file.data.size !== undefined) {\n id += `-${file.data.size}`;\n }\n\n if (file.data.lastModified !== undefined) {\n id += `-${file.data.lastModified}`;\n }\n\n return id;\n}\n\nmodule.exports = generateFileID;","\"use strict\";\n\nfunction 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 } // Assume it works because basically everything supports progress events.\n\n\n if (!userAgent) return true;\n const m = /Edge\\/(\\d+\\.\\d+)/.exec(userAgent);\n if (!m) return true;\n const edgeVersion = m[1];\n let [major, minor] = edgeVersion.split('.');\n major = parseInt(major, 10);\n minor = parseInt(minor, 10); // Worked before:\n // Edge 40.15063.0.0\n // Microsoft EdgeHTML 15.15063\n\n if (major < 15 || major === 15 && minor < 15063) {\n return true;\n } // Fixed in:\n // Microsoft EdgeHTML 18.18218\n\n\n if (major > 18 || major === 18 && minor >= 18218) {\n return true;\n } // other versions don't work.\n\n\n return false;\n}\n\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/\nmodule.exports = supportsUploadProgress;","\"use strict\";\n\nfunction getFileName(fileType, fileDescriptor) {\n if (fileDescriptor.name) {\n return fileDescriptor.name;\n }\n\n if (fileType.split('/')[0] === 'image') {\n return `${fileType.split('/')[0]}.${fileType.split('/')[1]}`;\n }\n\n return 'noname';\n}\n\nmodule.exports = getFileName;","\"use strict\";\n\nmodule.exports = {\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 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 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 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 emptyFolderAdded: 'No files were added from empty folder',\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 }\n};","var n,l,u,t,i,r,o,e,f,c,s,a,h,p={},v=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,w=Array.isArray;function d(n,l){for(var u in l)n[u]=l[u];return n}function g(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function _(l,u,t){var i,r,o,e={};for(o in u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:e[o]=u[o];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===e[o]&&(e[o]=l.defaultProps[o]);return m(l,e,i,r,null)}function m(n,t,i,r,o){var e={type:n,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u:o,__i:-1,__u:0};return null==o&&null!=l.vnode&&l.vnode(e),e}function b(){return{current:null}}function k(n){return n.children}function x(n,l){this.props=n,this.context=l}function S(n,l){if(null==l)return n.__?S(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return\"function\"==typeof n.type?S(n):null}function C(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C(n)}}function M(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!$.__r++||r!=l.debounceRendering)&&((r=l.debounceRendering)||o)($)}function $(){for(var n,u,t,r,o,f,c,s=1;i.length;)i.length>s&&i.sort(e),n=i.shift(),s=i.length,n.__d&&(t=void 0,r=void 0,o=(r=(u=n).__v).__e,f=[],c=[],u.__P&&((t=d({},r)).__v=r.__v+1,l.vnode&&l.vnode(t),O(u.__P,t,r,u.__n,u.__P.namespaceURI,32&r.__u?[o]:null,f,null==o?S(r):o,!!(32&r.__u),c),t.__v=r.__v,t.__.__k[t.__i]=t,N(f,t,c),r.__e=r.__=null,t.__e!=o&&C(t)));$.__r=0}function I(n,l,u,t,i,r,o,e,f,c,s){var a,h,y,w,d,g,_,m=t&&t.__k||v,b=l.length;for(f=P(u,l,m,f,b),a=0;a<b;a++)null!=(y=u.__k[a])&&(h=-1==y.__i?p:m[y.__i]||p,y.__i=a,g=O(n,y,h,i,r,o,e,f,c,s),w=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&B(h.ref,null,y),s.push(y.ref,y.__c||w,y)),null==d&&null!=w&&(d=w),(_=!!(4&y.__u))||h.__k===y.__k?f=A(y,f,n,_):\"function\"==typeof y.type&&void 0!==g?f=g:w&&(f=w.nextSibling),y.__u&=-7);return u.__e=d,f}function P(n,l,u,t,i){var r,o,e,f,c,s=u.length,a=s,h=0;for(n.__k=new Array(i),r=0;r<i;r++)null!=(o=l[r])&&\"boolean\"!=typeof o&&\"function\"!=typeof o?(f=r+h,(o=n.__k[r]=\"string\"==typeof o||\"number\"==typeof o||\"bigint\"==typeof o||o.constructor==String?m(null,o,null,null,null):w(o)?m(k,{children:o},null,null,null):null==o.constructor&&o.__b>0?m(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=n,o.__b=n.__b+1,e=null,-1!=(c=o.__i=L(o,u,f,a))&&(a--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>s?h--:i<s&&h++),\"function\"!=typeof o.type&&(o.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,o.__u|=4))):n.__k[r]=null;if(a)for(r=0;r<s;r++)null!=(e=u[r])&&0==(2&e.__u)&&(e.__e==t&&(t=S(e)),D(e,e));return t}function A(n,l,u,t){var i,r;if(\"function\"==typeof n.type){for(i=n.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=n,l=A(i[r],l,u,t));return l}n.__e!=l&&(t&&(l&&n.type&&!l.parentNode&&(l=S(n)),u.insertBefore(n.__e,l||null)),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8==l.nodeType);return l}function H(n,l){return l=l||[],null==n||\"boolean\"==typeof n||(w(n)?n.some(function(n){H(n,l)}):l.push(n)),l}function L(n,l,u,t){var i,r,o,e=n.key,f=n.type,c=l[u],s=null!=c&&0==(2&c.__u);if(null===c&&null==n.key||s&&e==c.key&&f==c.type)return u;if(t>(s?1:0))for(i=u-1,r=u+1;i>=0||r<l.length;)if(null!=(c=l[o=i>=0?i--:r++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return o;return-1}function T(n,l,u){\"-\"==l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||y.test(l)?u:u+\"px\"}function j(n,l,u,t,i){var r,o;n:if(\"style\"==l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof t&&(n.style.cssText=t=\"\"),t)for(l in t)u&&l in u||T(n.style,l,\"\");if(u)for(l in u)t&&u[l]==t[l]||T(n.style,l,u[l])}else if(\"o\"==l[0]&&\"n\"==l[1])r=l!=(l=l.replace(f,\"$1\")),o=l.toLowerCase(),l=o in n||\"onFocusOut\"==l||\"onFocusIn\"==l?o.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?t?u.u=t.u:(u.u=c,n.addEventListener(l,r?a:s,r)):n.removeEventListener(l,r?a:s,r);else{if(\"http://www.w3.org/2000/svg\"==i)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!=l&&\"height\"!=l&&\"href\"!=l&&\"list\"!=l&&\"form\"!=l&&\"tabIndex\"!=l&&\"download\"!=l&&\"rowSpan\"!=l&&\"colSpan\"!=l&&\"role\"!=l&&\"popover\"!=l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&\"-\"!=l[4]?n.removeAttribute(l):n.setAttribute(l,\"popover\"==l&&1==u?\"\":u))}}function F(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=c++;else if(u.t<t.u)return;return t(l.event?l.event(u):u)}}}function O(n,u,t,i,r,o,e,f,c,s){var a,h,p,v,y,_,m,b,S,C,M,$,P,A,H,L,T,j=u.type;if(null!=u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),o=[f=u.__e=t.__e]),(a=l.__b)&&a(u);n:if(\"function\"==typeof j)try{if(b=u.props,S=\"prototype\"in j&&j.prototype.render,C=(a=j.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?m=(h=u.__c=t.__c).__=h.__E:(S?u.__c=h=new j(b,M):(u.__c=h=new x(b,M),h.constructor=j,h.render=E),C&&C.sub(h),h.props=b,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),S&&null==h.__s&&(h.__s=h.state),S&&null!=j.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d({},h.__s)),d(h.__s,j.getDerivedStateFromProps(b,h.__s))),v=h.props,y=h.state,h.__v=u,p)S&&null==j.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),S&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(S&&null==j.getDerivedStateFromProps&&b!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)||u.__v==t.__v){for(u.__v!=t.__v&&(h.props=b,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u)}),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),S&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,_)})}if(h.context=M,h.props=b,h.__P=n,h.__e=!1,P=l.__r,A=0,S){for(h.state=h.__s,h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[]}else do{h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(i=d(d({},i),h.getChildContext())),S&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,y)),L=a,null!=a&&a.type===k&&null==a.key&&(L=V(a.props.children)),f=I(n,w(L)?L:[L],u,t,i,r,o,e,f,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&e.push(h),m&&(h.__E=h.__=null)}catch(n){if(u.__v=null,c||null!=o)if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;o[o.indexOf(f)]=null,u.__e=f}else{for(T=o.length;T--;)g(o[T]);z(u)}else u.__e=t.__e,u.__k=t.__k,n.then||z(u);l.__e(n,u,t)}else null==o&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=q(t.__e,u,t,i,r,o,e,c,s);return(a=l.diffed)&&a(u),128&u.__u?void 0:f}function z(n){n&&n.__c&&(n.__c.__e=!0),n&&n.__k&&n.__k.forEach(z)}function N(n,u,t){for(var i=0;i<t.length;i++)B(t[i],t[++i],t[++i]);l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function V(n){return\"object\"!=typeof n||null==n||n.__b&&n.__b>0?n:w(n)?n.map(V):d({},n)}function q(u,t,i,r,o,e,f,c,s){var a,h,v,y,d,_,m,b=i.props,k=t.props,x=t.type;if(\"svg\"==x?o=\"http://www.w3.org/2000/svg\":\"math\"==x?o=\"http://www.w3.org/1998/Math/MathML\":o||(o=\"http://www.w3.org/1999/xhtml\"),null!=e)for(a=0;a<e.length;a++)if((d=e[a])&&\"setAttribute\"in d==!!x&&(x?d.localName==x:3==d.nodeType)){u=d,e[a]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(o,x,k.is&&k),c&&(l.__m&&l.__m(t,e),c=!1),e=null}if(null==x)b===k||c&&u.data==k||(u.data=k);else{if(e=e&&n.call(u.childNodes),b=i.props||p,!c&&null!=e)for(b={},a=0;a<u.attributes.length;a++)b[(d=u.attributes[a]).name]=d.value;for(a in b)if(d=b[a],\"children\"==a);else if(\"dangerouslySetInnerHTML\"==a)v=d;else if(!(a in k)){if(\"value\"==a&&\"defaultValue\"in k||\"checked\"==a&&\"defaultChecked\"in k)continue;j(u,a,null,d,o)}for(a in k)d=k[a],\"children\"==a?y=d:\"dangerouslySetInnerHTML\"==a?h=d:\"value\"==a?_=d:\"checked\"==a?m=d:c&&\"function\"!=typeof d||b[a]===d||j(u,a,d,b[a],o);if(h)c||v&&(h.__html==v.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(v&&(u.innerHTML=\"\"),I(\"template\"==t.type?u.content:u,w(y)?y:[y],t,i,r,\"foreignObject\"==x?\"http://www.w3.org/1999/xhtml\":o,e,f,e?e[0]:i.__k&&S(i,0),c,s),null!=e)for(a=e.length;a--;)g(e[a]);c||(a=\"value\",\"progress\"==x&&null==_?u.removeAttribute(\"value\"):null!=_&&(_!==u[a]||\"progress\"==x&&!_||\"option\"==x&&_!=b[a])&&j(u,a,_,b[a],o),a=\"checked\",null!=m&&m!=u[a]&&j(u,a,m,b[a],o))}return u}function B(n,u,t){try{if(\"function\"==typeof n){var i=\"function\"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u))}else n.current=u}catch(n){l.__e(n,t)}}function D(n,u,t){var i,r;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||B(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null}if(i=n.__k)for(r=0;r<i.length;r++)i[r]&&D(i[r],u,t||\"function\"!=typeof n.type);t||g(n.__e),n.__c=n.__=n.__e=void 0}function E(n,l,u){return this.constructor(n,u)}function G(u,t,i){var r,o,e,f;t==document&&(t=document.documentElement),l.__&&l.__(u,t),o=(r=\"function\"==typeof i)?null:i&&i.__k||t.__k,e=[],f=[],O(t,u=(!r&&i||t).__k=_(k,null,[u]),o||p,p,t.namespaceURI,!r&&i?[i]:o?null:t.firstChild?n.call(t.childNodes):null,e,!r&&i?i:o?o.__e:t.firstChild,r,f),N(e,u,f)}function J(n,l){G(n,l,J)}function K(l,u,t){var i,r,o,e,f=d({},l.props);for(o in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:f[o]=void 0===u[o]&&null!=e?e[o]:u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),m(l.type,f,i||l.key,r||l.ref,null)}function Q(n){function l(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l.__c]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&u.forEach(function(n){n.__e=!0,M(n)})},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n)}}),n.children}return l.__c=\"__cC\"+h++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=v.slice,l={__e:function(n,l,u,t){for(var i,r,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),o=i.__d),o)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&null==n.constructor},x.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=d({},this.state),\"function\"==typeof n&&(n=n(d({},u),this.props)),n&&d(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M(this))},x.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M(this))},x.prototype.render=k,i=[],o=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},$.__r=0,f=/(PointerCapture)$|Capture$/i,c=0,s=F(!1),a=F(!0),h=0;export{x as Component,k as Fragment,K as cloneElement,Q as createContext,_ as createElement,b as createRef,_ as h,J as hydrate,t as isValidElement,l as options,G as render,H as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","\"use strict\";\n\nconst isDOMElement = require(\"./isDOMElement.js\");\n/**\n * Find a DOM element.\n *\n * @param {Node|string} element\n * @returns {Node|null}\n */\n\n\nfunction findDOMElement(element, context) {\n if (context === void 0) {\n context = document;\n }\n\n if (typeof element === 'string') {\n return context.querySelector(element);\n }\n\n if (isDOMElement(element)) {\n return element;\n }\n\n return null;\n}\n\nmodule.exports = findDOMElement;","\"use strict\";\n\nfunction isDOMElement(obj) {\n return (obj == null ? void 0 : obj.nodeType) === Node.ELEMENT_NODE;\n}\n\n/**\n * Check if an object is a DOM element. Duck-typing based on `nodeType`.\n *\n * @param {*} obj\n */\nmodule.exports = isDOMElement;","\"use strict\";\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 */\nconst Translator = require(\"@uppy/utils/lib/Translator\");\n\nclass BasePlugin {\n constructor(uppy, opts) {\n if (opts === void 0) {\n opts = {};\n }\n\n this.uppy = uppy;\n this.opts = opts;\n }\n\n getPluginState() {\n const {\n plugins\n } = this.uppy.getState();\n return plugins[this.id] || {};\n }\n\n setPluginState(update) {\n const {\n plugins\n } = this.uppy.getState();\n this.uppy.setState({\n plugins: { ...plugins,\n [this.id]: { ...plugins[this.id],\n ...update\n }\n }\n });\n }\n\n setOptions(newOpts) {\n this.opts = { ...this.opts,\n ...newOpts\n };\n this.setPluginState(); // so that UI re-renders with new options\n\n this.i18nInit();\n }\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(); // so that UI re-renders and we see the updated locale\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 // eslint-disable-next-line class-methods-use-this\n\n\n addTarget() {\n throw new Error('Extend the addTarget method to add your plugin to another plugin\\'s target');\n } // eslint-disable-next-line class-methods-use-this\n\n\n install() {} // eslint-disable-next-line class-methods-use-this\n\n\n uninstall() {}\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\n\n render() {\n throw new Error('Extend the render method to add your plugin to a DOM element');\n } // TODO: remove in the next major version. It's not feasible to\n // try to use plugins with other frameworks.\n // eslint-disable-next-line class-methods-use-this\n\n\n update() {} // Called after every state update, after everything's mounted. Debounced.\n // eslint-disable-next-line class-methods-use-this\n\n\n afterUpdate() {}\n\n}\n\nmodule.exports = BasePlugin;","\"use strict\";\n\nvar _preact = require(\"preact\");\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst findDOMElement = require(\"@uppy/utils/lib/findDOMElement\");\n\nconst getTextDirection = require(\"@uppy/utils/lib/getTextDirection\");\n\nconst BasePlugin = require(\"./BasePlugin.js\");\n/**\n * Defer a frequent call to the microtask queue.\n *\n * @param {() => T} fn\n * @returns {Promise<T>}\n */\n\n\nfunction debounce(fn) {\n let calling = null;\n let latestArgs = null;\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\n latestArgs = args;\n\n if (!calling) {\n calling = Promise.resolve().then(() => {\n calling = null; // 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\n return fn(...latestArgs);\n });\n }\n\n return calling;\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 */\n\n\nvar _updateUI = /*#__PURE__*/_classPrivateFieldLooseKey(\"updateUI\");\n\nclass UIPlugin extends BasePlugin {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, _updateUI, {\n writable: true,\n value: void 0\n });\n }\n\n /**\n * Check if supplied `target` is a DOM element or an `object`.\n * If it’s an object — target is a plugin, and we search `plugins`\n * for a plugin with same name and return its target.\n */\n mount(target, plugin) {\n const callerPluginName = plugin.id;\n const targetElement = findDOMElement(target);\n\n if (targetElement) {\n this.isTargetDOMEl = true; // When target is <body> with a single <div> element,\n // Preact thinks it’s 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\n const uppyRootElement = document.createElement('div');\n uppyRootElement.classList.add('uppy-Root'); // API for plugins that require a synchronous rerender.\n\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 (0, _preact.render)(this.render(state), uppyRootElement);\n this.afterUpdate();\n });\n this.uppy.log(`Installing ${callerPluginName} to a DOM element '${target}'`);\n\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 — Preact just adds null into target, not replacing\n targetElement.innerHTML = '';\n }\n\n (0, _preact.render)(this.render(this.uppy.getState()), uppyRootElement);\n this.el = uppyRootElement;\n targetElement.appendChild(uppyRootElement); // Set the text direction if the page has not defined one.\n\n uppyRootElement.dir = this.opts.direction || getTextDirection(uppyRootElement) || 'ltr';\n this.onMount();\n return this.el;\n }\n\n let targetPlugin;\n\n if (typeof target === 'object' && target instanceof UIPlugin) {\n // Targeting a plugin *instance*\n targetPlugin = target;\n } else if (typeof target === 'function') {\n // Targeting a plugin type\n const Target = target; // Find the target plugin instance.\n\n this.uppy.iteratePlugins(p => {\n if (p instanceof Target) {\n targetPlugin = p;\n }\n });\n }\n\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\n this.uppy.log(`Not installing ${callerPluginName}`);\n let message = `Invalid target option given to ${callerPluginName}.`;\n\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\n throw new Error(message);\n }\n\n update(state) {\n if (this.el != null) {\n var _classPrivateFieldLoo, _classPrivateFieldLoo2;\n\n (_classPrivateFieldLoo = (_classPrivateFieldLoo2 = _classPrivateFieldLooseBase(this, _updateUI))[_updateUI]) == null ? void 0 : _classPrivateFieldLoo.call(_classPrivateFieldLoo2, state);\n }\n }\n\n unmount() {\n if (this.isTargetDOMEl) {\n var _this$el;\n\n (_this$el = this.el) == null ? void 0 : _this$el.remove();\n }\n\n this.onUnmount();\n } // eslint-disable-next-line class-methods-use-this\n\n\n onMount() {} // eslint-disable-next-line class-methods-use-this\n\n\n onUnmount() {}\n\n}\n\nmodule.exports = UIPlugin;","\"use strict\";\n\n/**\n * Get the declared text direction for an element.\n *\n * @param {Node} element\n * @returns {string|undefined}\n */\nfunction getTextDirection(element) {\n var _element;\n\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\n return (_element = element) == null ? void 0 : _element.dir;\n}\n\nmodule.exports = getTextDirection;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Uppy = exports.UIPlugin = exports.BasePlugin = void 0;\nObject.defineProperty(exports, \"debugLogger\", {\n enumerable: true,\n get: function () {\n return _loggers.debugLogger;\n }\n});\n\nvar _loggers = require(\"./loggers.js\");\n\nmodule.exports = require('./Uppy.js');\n\nconst _0 = require(\"./UIPlugin.js\");\n\nexports.UIPlugin = _0;\n\nconst _1 = require(\"./BasePlugin.js\");\n\nexports.BasePlugin = _1;\n\n// TODO: remove all the following in the next major\n\n/* eslint-disable import/first */\nconst Uppy = require(\"./Uppy.js\");\n\nexports.Uppy = Uppy;\n\nconst UIPlugin = require(\"./UIPlugin.js\");\n\nconst BasePlugin = require(\"./BasePlugin.js\");\n\n// Backward compatibility: we want those to keep being accessible as static\n// properties of `Uppy` to avoid a breaking change.\nUppy.Uppy = Uppy;\nUppy.UIPlugin = UIPlugin;\nUppy.BasePlugin = BasePlugin;\nUppy.debugLogger = _loggers.debugLogger;","\"use strict\";\n\nclass NetworkError extends Error {\n constructor(error, xhr) {\n if (xhr === void 0) {\n xhr = null;\n }\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\n}\n\nmodule.exports = NetworkError;","'use strict';\n\nlet _Symbol$for;\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst fetchWithNetworkError = require(\"@uppy/utils/lib/fetchWithNetworkError\");\n\nconst ErrorWithCause = require(\"@uppy/utils/lib/ErrorWithCause\");\n\nconst AuthError = require(\"./AuthError.js\");\n\nconst packageJson = {\n \"version\": \"2.2.2\"\n}; // Remove the trailing slash so we can always safely append /xyz.\n\nfunction stripSlash(url) {\n return url.replace(/\\/$/, '');\n}\n\nasync function handleJSONResponse(res) {\n if (res.status === 401) {\n throw new AuthError();\n }\n\n const jsonPromise = res.json();\n\n if (res.status < 200 || res.status > 300) {\n let errMsg = `Failed request with status: ${res.status}. ${res.statusText}`;\n\n try {\n const errData = await jsonPromise;\n errMsg = errData.message ? `${errMsg} message: ${errData.message}` : errMsg;\n errMsg = errData.requestId ? `${errMsg} request-Id: ${errData.requestId}` : errMsg;\n } finally {\n // eslint-disable-next-line no-unsafe-finally\n throw new Error(errMsg);\n }\n }\n\n return jsonPromise;\n}\n\nvar _companionHeaders = /*#__PURE__*/_classPrivateFieldLooseKey(\"companionHeaders\");\n\nvar _getPostResponseFunc = /*#__PURE__*/_classPrivateFieldLooseKey(\"getPostResponseFunc\");\n\nvar _getUrl = /*#__PURE__*/_classPrivateFieldLooseKey(\"getUrl\");\n\nvar _errorHandler = /*#__PURE__*/_classPrivateFieldLooseKey(\"errorHandler\");\n\n_Symbol$for = Symbol.for('uppy test: getCompanionHeaders');\n\nclass RequestClient {\n constructor(uppy, opts) {\n Object.defineProperty(this, _errorHandler, {\n value: _errorHandler2\n });\n Object.defineProperty(this, _getUrl, {\n value: _getUrl2\n });\n Object.defineProperty(this, _companionHeaders, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _getPostResponseFunc, {\n writable: true,\n value: skip => response => skip ? response : this.onReceiveResponse(response)\n });\n this.uppy = uppy;\n this.opts = opts;\n this.onReceiveResponse = this.onReceiveResponse.bind(this);\n this.allowedHeaders = ['accept', 'content-type', 'uppy-auth-token'];\n this.preflightDone = false;\n _classPrivateFieldLooseBase(this, _companionHeaders)[_companionHeaders] = opts == null ? void 0 : opts.companionHeaders;\n }\n\n setCompanionHeaders(headers) {\n _classPrivateFieldLooseBase(this, _companionHeaders)[_companionHeaders] = headers;\n }\n\n [_Symbol$for]() {\n return _classPrivateFieldLooseBase(this, _companionHeaders)[_companionHeaders];\n }\n\n get hostname() {\n const {\n companion\n } = this.uppy.getState();\n const host = this.opts.companionUrl;\n return stripSlash(companion && companion[host] ? companion[host] : host);\n }\n\n headers() {\n return Promise.resolve({ ...RequestClient.defaultHeaders,\n ..._classPrivateFieldLooseBase(this, _companionHeaders)[_companionHeaders]\n });\n }\n\n onReceiveResponse(response) {\n const state = this.uppy.getState();\n const companion = state.companion || {};\n const host = this.opts.companionUrl;\n const {\n headers\n } = response; // Store the self-identified domain name for the Companion instance we just hit.\n\n if (headers.has('i-am') && headers.get('i-am') !== companion[host]) {\n this.uppy.setState({\n companion: { ...companion,\n [host]: headers.get('i-am')\n }\n });\n }\n\n return response;\n }\n\n preflight(path) {\n if (this.preflightDone) {\n return Promise.resolve(this.allowedHeaders.slice());\n }\n\n return fetch(_classPrivateFieldLooseBase(this, _getUrl)[_getUrl](path), {\n method: 'OPTIONS'\n }).then(response => {\n if (response.headers.has('access-control-allow-headers')) {\n this.allowedHeaders = response.headers.get('access-control-allow-headers').split(',').map(headerName => headerName.trim().toLowerCase());\n }\n\n this.preflightDone = true;\n return this.allowedHeaders.slice();\n }).catch(err => {\n this.uppy.log(`[CompanionClient] unable to make preflight request ${err}`, 'warning');\n this.preflightDone = true;\n return this.allowedHeaders.slice();\n });\n }\n\n preflightAndHeaders(path) {\n return Promise.all([this.preflight(path), this.headers()]).then(_ref => {\n let [allowedHeaders, headers] = _ref;\n // filter to keep only allowed Headers\n Object.keys(headers).forEach(header => {\n if (!allowedHeaders.includes(header.toLowerCase())) {\n this.uppy.log(`[CompanionClient] excluding disallowed header ${header}`);\n delete headers[header]; // eslint-disable-line no-param-reassign\n }\n });\n return headers;\n });\n }\n\n get(path, skipPostResponse) {\n const method = 'get';\n return this.preflightAndHeaders(path).then(headers => fetchWithNetworkError(_classPrivateFieldLooseBase(this, _getUrl)[_getUrl](path), {\n method,\n headers,\n credentials: this.opts.companionCookiesRule || 'same-origin'\n })).then(_classPrivateFieldLooseBase(this, _getPostResponseFunc)[_getPostResponseFunc](skipPostResponse)).then(handleJSONResponse).catch(_classPrivateFieldLooseBase(this, _errorHandler)[_errorHandler](method, path));\n }\n\n post(path, data, skipPostResponse) {\n const method = 'post';\n return this.preflightAndHeaders(path).then(headers => fetchWithNetworkError(_classPrivateFieldLooseBase(this, _getUrl)[_getUrl](path), {\n method,\n headers,\n credentials: this.opts.companionCookiesRule || 'same-origin',\n body: JSON.stringify(data)\n })).then(_classPrivateFieldLooseBase(this, _getPostResponseFunc)[_getPostResponseFunc](skipPostResponse)).then(handleJSONResponse).catch(_classPrivateFieldLooseBase(this, _errorHandler)[_errorHandler](method, path));\n }\n\n delete(path, data, skipPostResponse) {\n const method = 'delete';\n return this.preflightAndHeaders(path).then(headers => fetchWithNetworkError(`${this.hostname}/${path}`, {\n method,\n headers,\n credentials: this.opts.companionCookiesRule || 'same-origin',\n body: data ? JSON.stringify(data) : null\n })).then(_classPrivateFieldLooseBase(this, _getPostResponseFunc)[_getPostResponseFunc](skipPostResponse)).then(handleJSONResponse).catch(_classPrivateFieldLooseBase(this, _errorHandler)[_errorHandler](method, path));\n }\n\n}\n\nfunction _getUrl2(url) {\n if (/^(https?:|)\\/\\//.test(url)) {\n return url;\n }\n\n return `${this.hostname}/${url}`;\n}\n\nfunction _errorHandler2(method, path) {\n return err => {\n var _err;\n\n if (!((_err = err) != null && _err.isAuthError)) {\n // eslint-disable-next-line no-param-reassign\n err = new ErrorWithCause(`Could not ${method} ${_classPrivateFieldLooseBase(this, _getUrl)[_getUrl](path)}`, {\n cause: err\n });\n }\n\n return Promise.reject(err);\n };\n}\n\nRequestClient.VERSION = packageJson.version;\nRequestClient.defaultHeaders = {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n 'Uppy-Versions': `@uppy/companion-client=${RequestClient.VERSION}`\n};\nmodule.exports = RequestClient;","\"use strict\";\n\nconst NetworkError = require(\"./NetworkError.js\");\n/**\n * Wrapper around window.fetch that throws a NetworkError when appropriate\n */\n\n\nfunction fetchWithNetworkError() {\n return fetch(...arguments).catch(err => {\n if (err.name === 'AbortError') {\n throw err;\n } else {\n throw new NetworkError(err);\n }\n });\n}\n\nmodule.exports = fetchWithNetworkError;","\"use strict\";\n\nconst hasProperty = require(\"./hasProperty.js\");\n\nclass ErrorWithCause extends Error {\n constructor(message, options) {\n if (options === void 0) {\n options = {};\n }\n\n super(message);\n this.cause = options.cause;\n\n if (this.cause && hasProperty(this.cause, 'isNetworkError')) {\n this.isNetworkError = this.cause.isNetworkError;\n }\n }\n\n}\n\nmodule.exports = ErrorWithCause;","'use strict';\n\nclass AuthError extends Error {\n constructor() {\n super('Authorization required');\n this.name = 'AuthError';\n this.isAuthError = true;\n }\n\n}\n\nmodule.exports = AuthError;","'use strict';\n/**\n * This module serves as an Async wrapper for LocalStorage\n */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getItem = getItem;\nexports.removeItem = removeItem;\nexports.setItem = setItem;\n\nfunction setItem(key, value) {\n return new Promise(resolve => {\n localStorage.setItem(key, value);\n resolve();\n });\n}\n\nfunction getItem(key) {\n return Promise.resolve(localStorage.getItem(key));\n}\n\nfunction removeItem(key) {\n return new Promise(resolve => {\n localStorage.removeItem(key);\n resolve();\n });\n}","'use strict';\n/**\n * Manages communications with Companion\n */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Socket = exports.SearchProvider = exports.RequestClient = exports.Provider = void 0;\n\nconst _0 = require(\"./RequestClient.js\");\n\nexports.RequestClient = _0;\n\nconst _1 = require(\"./Provider.js\");\n\nexports.Provider = _1;\n\nconst _2 = require(\"./SearchProvider.js\");\n\nexports.SearchProvider = _2;\n\nconst _3 = require(\"./Socket.js\");\n\nexports.Socket = _3;","'use strict';\n\nvar tokenStorage = require(\"./tokenStorage.js\");\n\nconst RequestClient = require(\"./RequestClient.js\");\n\nconst getName = id => {\n return id.split('-').map(s => s.charAt(0).toUpperCase() + s.slice(1)).join(' ');\n};\n\nclass Provider extends RequestClient {\n constructor(uppy, opts) {\n super(uppy, opts);\n this.provider = opts.provider;\n this.id = this.provider;\n this.name = this.opts.name || getName(this.id);\n this.pluginId = this.opts.pluginId;\n this.tokenKey = `companion-${this.pluginId}-auth-token`;\n this.companionKeysParams = this.opts.companionKeysParams;\n this.preAuthToken = null;\n }\n\n headers() {\n return Promise.all([super.headers(), this.getAuthToken()]).then(_ref => {\n let [headers, token] = _ref;\n const authHeaders = {};\n\n if (token) {\n authHeaders['uppy-auth-token'] = token;\n }\n\n if (this.companionKeysParams) {\n authHeaders['uppy-credentials-params'] = btoa(JSON.stringify({\n params: this.companionKeysParams\n }));\n }\n\n return { ...headers,\n ...authHeaders\n };\n });\n }\n\n onReceiveResponse(response) {\n response = super.onReceiveResponse(response); // eslint-disable-line no-param-reassign\n\n const plugin = this.uppy.getPlugin(this.pluginId);\n const oldAuthenticated = plugin.getPluginState().authenticated;\n const authenticated = oldAuthenticated ? response.status !== 401 : response.status < 400;\n plugin.setPluginState({\n authenticated\n });\n return response;\n }\n\n setAuthToken(token) {\n return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey, token);\n }\n\n getAuthToken() {\n return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey);\n }\n /**\n * Ensure we have a preauth token if necessary. Attempts to fetch one if we don't,\n * or rejects if loading one fails.\n */\n\n\n async ensurePreAuth() {\n if (this.companionKeysParams && !this.preAuthToken) {\n await this.fetchPreAuthToken();\n\n if (!this.preAuthToken) {\n throw new Error('Could not load authentication data required for third-party login. Please try again later.');\n }\n }\n }\n\n authUrl(queries) {\n if (queries === void 0) {\n queries = {};\n }\n\n const params = new URLSearchParams(queries);\n\n if (this.preAuthToken) {\n params.set('uppyPreAuthToken', this.preAuthToken);\n }\n\n return `${this.hostname}/${this.id}/connect?${params}`;\n }\n\n fileUrl(id) {\n return `${this.hostname}/${this.id}/get/${id}`;\n }\n\n async fetchPreAuthToken() {\n if (!this.companionKeysParams) {\n return;\n }\n\n try {\n const res = await this.post(`${this.id}/preauth/`, {\n params: this.companionKeysParams\n });\n this.preAuthToken = res.token;\n } catch (err) {\n this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${err}`, 'warning');\n }\n }\n\n list(directory) {\n return this.get(`${this.id}/list/${directory || ''}`);\n }\n\n logout() {\n return this.get(`${this.id}/logout`).then(response => Promise.all([response, this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)])).then(_ref2 => {\n let [response] = _ref2;\n return response;\n });\n }\n\n static initPlugin(plugin, opts, defaultOpts) {\n /* eslint-disable no-param-reassign */\n plugin.type = 'acquirer';\n plugin.files = [];\n\n if (defaultOpts) {\n plugin.opts = { ...defaultOpts,\n ...opts\n };\n }\n\n if (opts.serverUrl || opts.serverPattern) {\n throw new Error('`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`');\n }\n\n if (opts.companionAllowedHosts) {\n const pattern = opts.companionAllowedHosts; // validate companionAllowedHosts param\n\n if (typeof pattern !== 'string' && !Array.isArray(pattern) && !(pattern instanceof RegExp)) {\n throw new TypeError(`${plugin.id}: the option \"companionAllowedHosts\" must be one of string, Array, RegExp`);\n }\n\n plugin.opts.companionAllowedHosts = pattern;\n } else if (/^(?!https?:\\/\\/).*$/i.test(opts.companionUrl)) {\n // does not start with https://\n plugin.opts.companionAllowedHosts = `https://${opts.companionUrl.replace(/^\\/\\//, '')}`;\n } else {\n plugin.opts.companionAllowedHosts = new URL(opts.companionUrl).origin;\n }\n\n plugin.storage = plugin.opts.storage || tokenStorage;\n /* eslint-enable no-param-reassign */\n }\n\n}\n\nmodule.exports = Provider;","'use strict';\n\nconst RequestClient = require(\"./RequestClient.js\");\n\nconst getName = id => {\n return id.split('-').map(s => s.charAt(0).toUpperCase() + s.slice(1)).join(' ');\n};\n\nclass SearchProvider extends RequestClient {\n constructor(uppy, opts) {\n super(uppy, opts);\n this.provider = opts.provider;\n this.id = this.provider;\n this.name = this.opts.name || getName(this.id);\n this.pluginId = this.opts.pluginId;\n }\n\n fileUrl(id) {\n return `${this.hostname}/search/${this.id}/get/${id}`;\n }\n\n search(text, queries) {\n return this.get(`search/${this.id}/list?q=${encodeURIComponent(text)}${queries ? `&${queries}` : ''}`);\n }\n\n}\n\nmodule.exports = SearchProvider;","\"use strict\";\n\nlet _Symbol$for, _Symbol$for2;\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst ee = require(\"namespace-emitter\");\n\nvar _queued = /*#__PURE__*/_classPrivateFieldLooseKey(\"queued\");\n\nvar _emitter = /*#__PURE__*/_classPrivateFieldLooseKey(\"emitter\");\n\nvar _isOpen = /*#__PURE__*/_classPrivateFieldLooseKey(\"isOpen\");\n\nvar _socket = /*#__PURE__*/_classPrivateFieldLooseKey(\"socket\");\n\nvar _handleMessage = /*#__PURE__*/_classPrivateFieldLooseKey(\"handleMessage\");\n\n_Symbol$for = Symbol.for('uppy test: getSocket');\n_Symbol$for2 = Symbol.for('uppy test: getQueued');\n\nclass UppySocket {\n constructor(opts) {\n Object.defineProperty(this, _queued, {\n writable: true,\n value: []\n });\n Object.defineProperty(this, _emitter, {\n writable: true,\n value: ee()\n });\n Object.defineProperty(this, _isOpen, {\n writable: true,\n value: false\n });\n Object.defineProperty(this, _socket, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _handleMessage, {\n writable: true,\n value: e => {\n try {\n const message = JSON.parse(e.data);\n this.emit(message.action, message.payload);\n } catch (err) {\n // TODO: use a more robust error handler.\n console.log(err); // eslint-disable-line no-console\n }\n }\n });\n this.opts = opts;\n\n if (!opts || opts.autoOpen !== false) {\n this.open();\n }\n }\n\n get isOpen() {\n return _classPrivateFieldLooseBase(this, _isOpen)[_isOpen];\n }\n\n [_Symbol$for]() {\n return _classPrivateFieldLooseBase(this, _socket)[_socket];\n }\n\n [_Symbol$for2]() {\n return _classPrivateFieldLooseBase(this, _queued)[_queued];\n }\n\n open() {\n _classPrivateFieldLooseBase(this, _socket)[_socket] = new WebSocket(this.opts.target);\n\n _classPrivateFieldLooseBase(this, _socket)[_socket].onopen = () => {\n _classPrivateFieldLooseBase(this, _isOpen)[_isOpen] = true;\n\n while (_classPrivateFieldLooseBase(this, _queued)[_queued].length > 0 && _classPrivateFieldLooseBase(this, _isOpen)[_isOpen]) {\n const first = _classPrivateFieldLooseBase(this, _queued)[_queued].shift();\n\n this.send(first.action, first.payload);\n }\n };\n\n _classPrivateFieldLooseBase(this, _socket)[_socket].onclose = () => {\n _classPrivateFieldLooseBase(this, _isOpen)[_isOpen] = false;\n };\n\n _classPrivateFieldLooseBase(this, _socket)[_socket].onmessage = _classPrivateFieldLooseBase(this, _handleMessage)[_handleMessage];\n }\n\n close() {\n var _classPrivateFieldLoo;\n\n (_classPrivateFieldLoo = _classPrivateFieldLooseBase(this, _socket)[_socket]) == null ? void 0 : _classPrivateFieldLoo.close();\n }\n\n send(action, payload) {\n // attach uuid\n if (!_classPrivateFieldLooseBase(this, _isOpen)[_isOpen]) {\n _classPrivateFieldLooseBase(this, _queued)[_queued].push({\n action,\n payload\n });\n\n return;\n }\n\n _classPrivateFieldLooseBase(this, _socket)[_socket].send(JSON.stringify({\n action,\n payload\n }));\n }\n\n on(action, handler) {\n _classPrivateFieldLooseBase(this, _emitter)[_emitter].on(action, handler);\n }\n\n emit(action, payload) {\n _classPrivateFieldLooseBase(this, _emitter)[_emitter].emit(action, payload);\n }\n\n once(action, handler) {\n _classPrivateFieldLooseBase(this, _emitter)[_emitter].once(action, handler);\n }\n\n}\n\nmodule.exports = UppySocket;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.internalRateLimitedQueue = exports.RateLimitedQueue = void 0;\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nfunction createCancelError() {\n return new Error('Cancelled');\n}\n\nvar _activeRequests = /*#__PURE__*/_classPrivateFieldLooseKey(\"activeRequests\");\n\nvar _queuedHandlers = /*#__PURE__*/_classPrivateFieldLooseKey(\"queuedHandlers\");\n\nvar _paused = /*#__PURE__*/_classPrivateFieldLooseKey(\"paused\");\n\nvar _pauseTimer = /*#__PURE__*/_classPrivateFieldLooseKey(\"pauseTimer\");\n\nvar _downLimit = /*#__PURE__*/_classPrivateFieldLooseKey(\"downLimit\");\n\nvar _upperLimit = /*#__PURE__*/_classPrivateFieldLooseKey(\"upperLimit\");\n\nvar _rateLimitingTimer = /*#__PURE__*/_classPrivateFieldLooseKey(\"rateLimitingTimer\");\n\nvar _call = /*#__PURE__*/_classPrivateFieldLooseKey(\"call\");\n\nvar _queueNext = /*#__PURE__*/_classPrivateFieldLooseKey(\"queueNext\");\n\nvar _next = /*#__PURE__*/_classPrivateFieldLooseKey(\"next\");\n\nvar _queue = /*#__PURE__*/_classPrivateFieldLooseKey(\"queue\");\n\nvar _dequeue = /*#__PURE__*/_classPrivateFieldLooseKey(\"dequeue\");\n\nvar _resume = /*#__PURE__*/_classPrivateFieldLooseKey(\"resume\");\n\nvar _increaseLimit = /*#__PURE__*/_classPrivateFieldLooseKey(\"increaseLimit\");\n\nclass 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\n _classPrivateFieldLooseBase(this, _downLimit)[_downLimit] = this.limit;\n this.limit = Math.ceil((_classPrivateFieldLooseBase(this, _upperLimit)[_upperLimit] + _classPrivateFieldLooseBase(this, _downLimit)[_downLimit]) / 2);\n\n for (let i = _classPrivateFieldLooseBase(this, _downLimit)[_downLimit]; i <= this.limit; i++) {\n _classPrivateFieldLooseBase(this, _queueNext)[_queueNext]();\n }\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\n if (typeof limit !== 'number' || limit === 0) {\n this.limit = Infinity;\n } else {\n this.limit = limit;\n }\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\n return _classPrivateFieldLooseBase(this, _queue)[_queue](fn, queueOptions);\n }\n\n wrapPromiseFunction(fn, queueOptions) {\n var _this = this;\n\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\n let queuedRequest;\n const outerPromise = new Promise((resolve, reject) => {\n queuedRequest = _this.run(() => {\n let cancelError;\n let innerPromise;\n\n try {\n innerPromise = Promise.resolve(fn(...args));\n } catch (err) {\n innerPromise = Promise.reject(err);\n }\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 () => {\n cancelError = createCancelError();\n };\n }, queueOptions);\n });\n\n outerPromise.abort = () => {\n queuedRequest.abort();\n };\n\n return outerPromise;\n };\n }\n\n resume() {\n _classPrivateFieldLooseBase(this, _paused)[_paused] = false;\n clearTimeout(_classPrivateFieldLooseBase(this, _pauseTimer)[_pauseTimer]);\n\n for (let i = 0; i < this.limit; i++) {\n _classPrivateFieldLooseBase(this, _queueNext)[_queueNext]();\n }\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\n _classPrivateFieldLooseBase(this, _paused)[_paused] = true;\n clearTimeout(_classPrivateFieldLooseBase(this, _pauseTimer)[_pauseTimer]);\n\n if (duration != null) {\n _classPrivateFieldLooseBase(this, _pauseTimer)[_pauseTimer] = setTimeout(_classPrivateFieldLooseBase(this, _resume)[_resume], duration);\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\n\n rateLimit(duration) {\n clearTimeout(_classPrivateFieldLooseBase(this, _rateLimitingTimer)[_rateLimitingTimer]);\n this.pause(duration);\n\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\n get isPaused() {\n return _classPrivateFieldLooseBase(this, _paused)[_paused];\n }\n\n}\n\nexports.RateLimitedQueue = RateLimitedQueue;\n\nfunction _call2(fn) {\n _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] += 1;\n let done = false;\n let cancelActive;\n\n try {\n cancelActive = fn();\n } catch (err) {\n _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] -= 1;\n throw err;\n }\n\n return {\n abort: () => {\n if (done) return;\n done = true;\n _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] -= 1;\n cancelActive();\n\n _classPrivateFieldLooseBase(this, _queueNext)[_queueNext]();\n },\n done: () => {\n if (done) return;\n done = true;\n _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] -= 1;\n\n _classPrivateFieldLooseBase(this, _queueNext)[_queueNext]();\n }\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}\n\nfunction _next2() {\n if (_classPrivateFieldLooseBase(this, _paused)[_paused] || _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] >= this.limit) {\n return;\n }\n\n if (_classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].length === 0) {\n return;\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\n\n const next = _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].shift();\n\n const handler = _classPrivateFieldLooseBase(this, _call)[_call](next.fn);\n\n next.abort = handler.abort;\n next.done = handler.done;\n}\n\nfunction _queue2(fn, options) {\n if (options === void 0) {\n options = {};\n }\n\n const handler = {\n fn,\n priority: 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\n const index = _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].findIndex(other => {\n return handler.priority > other.priority;\n });\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\n return handler;\n}\n\nfunction _dequeue2(handler) {\n const index = _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].indexOf(handler);\n\n if (index !== -1) {\n _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].splice(index, 1);\n }\n}\n\nconst internalRateLimitedQueue = Symbol('__queue');\nexports.internalRateLimitedQueue = internalRateLimitedQueue;","\"use strict\";\n\nmodule.exports = {\n strings: {\n // Shown in the Informer if an upload is being canceled because it stalled for too long.\n timedOut: 'Upload stalled for %{seconds} seconds, aborting.'\n }\n};","\"use strict\";\n\nvar _nonSecure = require(\"nanoid/non-secure\");\n\nvar _companionClient = require(\"@uppy/companion-client\");\n\nvar _RateLimitedQueue = require(\"@uppy/utils/lib/RateLimitedQueue\");\n\nconst BasePlugin = require(\"@uppy/core/lib/BasePlugin\");\n\nconst emitSocketProgress = require(\"@uppy/utils/lib/emitSocketProgress\");\n\nconst getSocketHost = require(\"@uppy/utils/lib/getSocketHost\");\n\nconst settle = require(\"@uppy/utils/lib/settle\");\n\nconst EventTracker = require(\"@uppy/utils/lib/EventTracker\");\n\nconst ProgressTimeout = require(\"@uppy/utils/lib/ProgressTimeout\");\n\nconst NetworkError = require(\"@uppy/utils/lib/NetworkError\");\n\nconst isNetworkError = require(\"@uppy/utils/lib/isNetworkError\");\n\nconst packageJson = {\n \"version\": \"2.1.3\"\n};\n\nconst locale = require(\"./locale.js\");\n\nfunction buildResponseError(xhr, err) {\n let error = err; // No error message\n\n if (!error) error = new Error('Upload error'); // Got an error message string\n\n if (typeof error === 'string') error = new Error(error); // Got something else\n\n if (!(error instanceof Error)) {\n error = Object.assign(new Error('Upload error'), {\n data: error\n });\n }\n\n if (isNetworkError(xhr)) {\n error = new NetworkError(error, xhr);\n return error;\n }\n\n error.request = xhr;\n return error;\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 *\n * @param {object} file File object with `data`, `size` and `meta` properties\n * @returns {object} blob updated with the new `type` set from `file.meta.type`\n */\n\n\nfunction setTypeInBlob(file) {\n const dataWithUpdatedType = file.data.slice(0, file.data.size, file.meta.type);\n return dataWithUpdatedType;\n}\n\nclass XHRUpload extends BasePlugin {\n // eslint-disable-next-line global-require\n constructor(uppy, opts) {\n super(uppy, opts);\n this.type = 'uploader';\n this.id = this.opts.id || 'XHRUpload';\n this.title = 'XHRUpload';\n this.defaultLocale = locale; // Default options\n\n const defaultOptions = {\n formData: true,\n fieldName: opts.bundle ? 'files[]' : 'file',\n method: 'post',\n metaFields: null,\n responseUrlFieldName: 'url',\n bundle: false,\n headers: {},\n timeout: 30 * 1000,\n limit: 5,\n withCredentials: false,\n responseType: '',\n\n /**\n * @param {string} responseText the response body string\n */\n getResponseData(responseText) {\n let parsedResponse = {};\n\n try {\n parsedResponse = JSON.parse(responseText);\n } catch (err) {\n uppy.log(err);\n }\n\n return parsedResponse;\n },\n\n /**\n *\n * @param {string} _ the response body string\n * @param {XMLHttpRequest | respObj} response the response object (XHR or similar)\n */\n getResponseError(_, response) {\n let error = new Error('Upload error');\n\n if (isNetworkError(response)) {\n error = new NetworkError(error, response);\n }\n\n return error;\n },\n\n /**\n * Check if the response from the upload endpoint indicates that the upload was successful.\n *\n * @param {number} status the response status code\n */\n validateStatus(status) {\n return status >= 200 && status < 300;\n }\n\n };\n this.opts = { ...defaultOptions,\n ...opts\n };\n this.i18nInit();\n this.handleUpload = this.handleUpload.bind(this); // Simultaneous upload limiting is shared across all uploads with this plugin.\n\n if (_RateLimitedQueue.internalRateLimitedQueue in this.opts) {\n this.requests = this.opts[_RateLimitedQueue.internalRateLimitedQueue];\n } else {\n this.requests = new _RateLimitedQueue.RateLimitedQueue(this.opts.limit);\n }\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\n this.uploaderEvents = Object.create(null);\n }\n\n getOptions(file) {\n const overrides = this.uppy.getState().xhrUpload;\n const {\n headers\n } = this.opts;\n const opts = { ...this.opts,\n ...(overrides || {}),\n ...(file.xhrUpload || {}),\n headers: {}\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\n if (typeof headers === 'function') {\n opts.headers = headers(file);\n } else {\n Object.assign(opts.headers, this.opts.headers);\n }\n\n if (overrides) {\n Object.assign(opts.headers, overrides.headers);\n }\n\n if (file.xhrUpload) {\n Object.assign(opts.headers, file.xhrUpload.headers);\n }\n\n return opts;\n } // eslint-disable-next-line class-methods-use-this\n\n\n addMetadata(formData, meta, opts) {\n const metaFields = Array.isArray(opts.metaFields) ? opts.metaFields : Object.keys(meta); // Send along all fields by default.\n\n metaFields.forEach(item => {\n formData.append(item, meta[item]);\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\n if (file.name) {\n formPost.append(opts.fieldName, dataWithUpdatedType, file.meta.name);\n } else {\n formPost.append(opts.fieldName, dataWithUpdatedType);\n }\n\n return formPost;\n }\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\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\n upload(file, current, total) {\n const opts = this.getOptions(file);\n this.uppy.log(`uploading ${current} of ${total}`);\n return new Promise((resolve, reject) => {\n this.uppy.emit('upload-started', file);\n const data = opts.formData ? this.createFormDataUpload(file, opts) : file.data;\n const xhr = new XMLHttpRequest();\n this.uploaderEvents[file.id] = new EventTracker(this.uppy);\n let queuedRequest;\n const timer = new ProgressTimeout(opts.timeout, () => {\n xhr.abort();\n queuedRequest.done();\n const error = new Error(this.i18n('timedOut', {\n seconds: Math.ceil(opts.timeout / 1000)\n }));\n this.uppy.emit('upload-error', file, error);\n reject(error);\n });\n const id = (0, _nonSecure.nanoid)();\n xhr.upload.addEventListener('loadstart', () => {\n this.uppy.log(`[XHRUpload] ${id} started`);\n });\n xhr.upload.addEventListener('progress', ev => {\n this.uppy.log(`[XHRUpload] ${id} progress: ${ev.loaded} / ${ev.total}`); // Begin checking for timeouts when progress starts, instead of loading,\n // to avoid timing out requests on browser concurrency queue\n\n timer.progress();\n\n if (ev.lengthComputable) {\n this.uppy.emit('upload-progress', file, {\n uploader: this,\n bytesUploaded: ev.loaded,\n bytesTotal: ev.total\n });\n }\n });\n xhr.addEventListener('load', () => {\n this.uppy.log(`[XHRUpload] ${id} finished`);\n timer.done();\n queuedRequest.done();\n\n if (this.uploaderEvents[file.id]) {\n this.uploaderEvents[file.id].remove();\n this.uploaderEvents[file.id] = null;\n }\n\n if (opts.validateStatus(xhr.status, xhr.responseText, xhr)) {\n const body = opts.getResponseData(xhr.responseText, xhr);\n const uploadURL = body[opts.responseUrlFieldName];\n const uploadResp = {\n status: xhr.status,\n body,\n uploadURL\n };\n this.uppy.emit('upload-success', file, uploadResp);\n\n if (uploadURL) {\n this.uppy.log(`Download ${file.name} from ${uploadURL}`);\n }\n\n return resolve(file);\n }\n\n const body = opts.getResponseData(xhr.responseText, xhr);\n const error = buildResponseError(xhr, opts.getResponseError(xhr.responseText, xhr));\n const response = {\n status: xhr.status,\n body\n };\n this.uppy.emit('upload-error', file, error, response);\n return reject(error);\n });\n xhr.addEventListener('error', () => {\n this.uppy.log(`[XHRUpload] ${id} errored`);\n timer.done();\n queuedRequest.done();\n\n if (this.uploaderEvents[file.id]) {\n this.uploaderEvents[file.id].remove();\n this.uploaderEvents[file.id] = null;\n }\n\n const error = buildResponseError(xhr, opts.getResponseError(xhr.responseText, xhr));\n this.uppy.emit('upload-error', file, error);\n return reject(error);\n });\n xhr.open(opts.method.toUpperCase(), opts.endpoint, true); // IE10 does not allow setting `withCredentials` and `responseType`\n // before `open()` is called.\n\n xhr.withCredentials = opts.withCredentials;\n\n if (opts.responseType !== '') {\n xhr.responseType = opts.responseType;\n }\n\n queuedRequest = this.requests.run(() => {\n this.uppy.emit('upload-started', file); // When using an authentication system like JWT, the bearer token goes as a header. This\n // header needs to be fresh each time the token is refreshed so computing and setting the\n // headers just before the upload starts enables this kind of authentication to work properly.\n // Otherwise, half-way through the list of uploads the token could be stale and the upload would fail.\n\n const currentOpts = this.getOptions(file);\n Object.keys(currentOpts.headers).forEach(header => {\n xhr.setRequestHeader(header, currentOpts.headers[header]);\n });\n xhr.send(data);\n return () => {\n timer.done();\n xhr.abort();\n };\n });\n this.onFileRemove(file.id, () => {\n queuedRequest.abort();\n reject(new Error('File removed'));\n });\n this.onCancelAll(file.id, _ref => {\n let {\n reason\n } = _ref;\n\n if (reason === 'user') {\n queuedRequest.abort();\n }\n\n reject(new Error('Upload cancelled'));\n });\n });\n }\n\n uploadRemote(file) {\n const opts = this.getOptions(file);\n return new Promise((resolve, reject) => {\n this.uppy.emit('upload-started', file);\n const fields = {};\n const metaFields = Array.isArray(opts.metaFields) ? opts.metaFields // Send along all fields by default.\n : Object.keys(file.meta);\n metaFields.forEach(name => {\n fields[name] = file.meta[name];\n });\n const Client = file.remote.providerOptions.provider ? _companionClient.Provider : _companionClient.RequestClient;\n const client = new Client(this.uppy, file.remote.providerOptions);\n client.post(file.remote.url, { ...file.remote.body,\n endpoint: opts.endpoint,\n size: file.data.size,\n fieldname: opts.fieldName,\n metadata: fields,\n httpMethod: opts.method,\n useFormData: opts.formData,\n headers: opts.headers\n }).then(res => {\n const {\n token\n } = res;\n const host = getSocketHost(file.remote.companionUrl);\n const socket = new _companionClient.Socket({\n target: `${host}/api/${token}`,\n autoOpen: false\n });\n this.uploaderEvents[file.id] = new EventTracker(this.uppy);\n let queuedRequest;\n this.onFileRemove(file.id, () => {\n socket.send('cancel', {});\n queuedRequest.abort();\n resolve(`upload ${file.id} was removed`);\n });\n this.onCancelAll(file.id, function (_temp) {\n let {\n reason\n } = _temp === void 0 ? {} : _temp;\n\n if (reason === 'user') {\n socket.send('cancel', {});\n queuedRequest.abort();\n }\n\n resolve(`upload ${file.id} was canceled`);\n });\n this.onRetry(file.id, () => {\n socket.send('pause', {});\n socket.send('resume', {});\n });\n this.onRetryAll(file.id, () => {\n socket.send('pause', {});\n socket.send('resume', {});\n });\n socket.on('progress', progressData => emitSocketProgress(this, progressData, file));\n socket.on('success', data => {\n const body = opts.getResponseData(data.response.responseText, data.response);\n const uploadURL = body[opts.responseUrlFieldName];\n const uploadResp = {\n status: data.response.status,\n body,\n uploadURL\n };\n this.uppy.emit('upload-success', file, uploadResp);\n queuedRequest.done();\n\n if (this.uploaderEvents[file.id]) {\n this.uploaderEvents[file.id].remove();\n this.uploaderEvents[file.id] = null;\n }\n\n return resolve();\n });\n socket.on('error', errData => {\n const resp = errData.response;\n const error = resp ? opts.getResponseError(resp.responseText, resp) : Object.assign(new Error(errData.error.message), {\n cause: errData.error\n });\n this.uppy.emit('upload-error', file, error);\n queuedRequest.done();\n\n if (this.uploaderEvents[file.id]) {\n this.uploaderEvents[file.id].remove();\n this.uploaderEvents[file.id] = null;\n }\n\n reject(error);\n });\n queuedRequest = this.requests.run(() => {\n socket.open();\n\n if (file.isPaused) {\n socket.send('pause', {});\n }\n\n return () => socket.close();\n });\n }).catch(err => {\n this.uppy.emit('upload-error', file, err);\n reject(err);\n });\n });\n }\n\n uploadBundle(files) {\n return new Promise((resolve, reject) => {\n const {\n endpoint\n } = this.opts;\n const {\n method\n } = this.opts;\n const optsFromState = this.uppy.getState().xhrUpload;\n const formData = this.createBundledUpload(files, { ...this.opts,\n ...(optsFromState || {})\n });\n const xhr = new XMLHttpRequest();\n\n const emitError = error => {\n files.forEach(file => {\n this.uppy.emit('upload-error', file, error);\n });\n };\n\n const timer = new ProgressTimeout(this.opts.timeout, () => {\n xhr.abort();\n const error = new Error(this.i18n('timedOut', {\n seconds: Math.ceil(this.opts.timeout / 1000)\n }));\n emitError(error);\n reject(error);\n });\n xhr.upload.addEventListener('loadstart', () => {\n this.uppy.log('[XHRUpload] started uploading bundle');\n timer.progress();\n });\n xhr.upload.addEventListener('progress', ev => {\n timer.progress();\n if (!ev.lengthComputable) return;\n files.forEach(file => {\n this.uppy.emit('upload-progress', file, {\n uploader: this,\n bytesUploaded: ev.loaded / ev.total * file.size,\n bytesTotal: file.size\n });\n });\n });\n xhr.addEventListener('load', ev => {\n timer.done();\n\n if (this.opts.validateStatus(ev.target.status, xhr.responseText, xhr)) {\n const body = this.opts.getResponseData(xhr.responseText, xhr);\n const uploadResp = {\n status: ev.target.status,\n body\n };\n files.forEach(file => {\n this.uppy.emit('upload-success', file, uploadResp);\n });\n return resolve();\n }\n\n const error = this.opts.getResponseError(xhr.responseText, xhr) || new Error('Upload error');\n error.request = xhr;\n emitError(error);\n return reject(error);\n });\n xhr.addEventListener('error', () => {\n timer.done();\n const error = this.opts.getResponseError(xhr.responseText, xhr) || new Error('Upload error');\n emitError(error);\n return reject(error);\n });\n this.uppy.on('cancel-all', function (_temp2) {\n let {\n reason\n } = _temp2 === void 0 ? {} : _temp2;\n if (reason !== 'user') return;\n timer.done();\n xhr.abort();\n });\n xhr.open(method.toUpperCase(), endpoint, true); // IE10 does not allow setting `withCredentials` and `responseType`\n // before `open()` is called.\n\n xhr.withCredentials = this.opts.withCredentials;\n\n if (this.opts.responseType !== '') {\n xhr.responseType = this.opts.responseType;\n }\n\n Object.keys(this.opts.headers).forEach(header => {\n xhr.setRequestHeader(header, this.opts.headers[header]);\n });\n xhr.send(formData);\n files.forEach(file => {\n this.uppy.emit('upload-started', file);\n });\n });\n }\n\n uploadFiles(files) {\n const promises = files.map((file, i) => {\n const current = parseInt(i, 10) + 1;\n const total = files.length;\n\n if (file.error) {\n return Promise.reject(new Error(file.error));\n }\n\n if (file.isRemote) {\n return this.uploadRemote(file, current, total);\n }\n\n return this.upload(file, current, total);\n });\n return settle(promises);\n }\n\n onFileRemove(fileID, cb) {\n this.uploaderEvents[fileID].on('file-removed', file => {\n if (fileID === file.id) cb(file.id);\n });\n }\n\n onRetry(fileID, cb) {\n this.uploaderEvents[fileID].on('upload-retry', targetFileID => {\n if (fileID === targetFileID) {\n cb();\n }\n });\n }\n\n onRetryAll(fileID, cb) {\n this.uploaderEvents[fileID].on('retry-all', () => {\n if (!this.uppy.getFile(fileID)) return;\n cb();\n });\n }\n\n onCancelAll(fileID, eventHandler) {\n var _this = this;\n\n this.uploaderEvents[fileID].on('cancel-all', function () {\n if (!_this.uppy.getFile(fileID)) return;\n eventHandler(...arguments);\n });\n }\n\n handleUpload(fileIDs) {\n if (fileIDs.length === 0) {\n this.uppy.log('[XHRUpload] No files to upload!');\n return Promise.resolve();\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\n\n if (this.opts.limit === 0 && !this.opts[_RateLimitedQueue.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\n this.uppy.log('[XHRUpload] Uploading...');\n const files = fileIDs.map(fileID => this.uppy.getFile(fileID));\n\n if (this.opts.bundle) {\n // if bundle: true, we don’t support remote uploads\n const isSomeFileRemote = files.some(file => file.isRemote);\n\n if (isSomeFileRemote) {\n throw new Error('Can’t upload remote files when the `bundle: true` option is set');\n }\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\n return this.uploadBundle(files);\n }\n\n return this.uploadFiles(files).then(() => null);\n }\n\n install() {\n if (this.opts.bundle) {\n const {\n capabilities\n } = this.uppy.getState();\n this.uppy.setState({\n capabilities: { ...capabilities,\n individualCancellation: false\n }\n });\n }\n\n this.uppy.addUploader(this.handleUpload);\n }\n\n uninstall() {\n if (this.opts.bundle) {\n const {\n capabilities\n } = this.uppy.getState();\n this.uppy.setState({\n capabilities: { ...capabilities,\n individualCancellation: true\n }\n });\n }\n\n this.uppy.removeUploader(this.handleUpload);\n }\n\n}\n\nXHRUpload.VERSION = packageJson.version;\nmodule.exports = XHRUpload;","\"use strict\";\n\nconst throttle = require(\"lodash.throttle\");\n\nfunction emitSocketProgress(uploader, progressData, file) {\n const {\n progress,\n bytesUploaded,\n bytesTotal\n } = progressData;\n\n if (progress) {\n uploader.uppy.log(`Upload progress: ${progress}`);\n uploader.uppy.emit('upload-progress', file, {\n uploader,\n bytesUploaded,\n bytesTotal\n });\n }\n}\n\nmodule.exports = throttle(emitSocketProgress, 300, {\n leading: true,\n trailing: true\n});","\"use strict\";\n\nfunction getSocketHost(url) {\n // get the host domain\n const regex = /^(?:https?:\\/\\/|\\/\\/)?(?:[^@\\n]+@)?(?:www\\.)?([^\\n]+)/i;\n const host = regex.exec(url)[1];\n const socketProtocol = /^http:\\/\\//i.test(url) ? 'ws' : 'wss';\n return `${socketProtocol}://${host}`;\n}\n\nmodule.exports = getSocketHost;","\"use strict\";\n\nfunction settle(promises) {\n const resolutions = [];\n const rejections = [];\n\n function resolved(value) {\n resolutions.push(value);\n }\n\n function rejected(error) {\n rejections.push(error);\n }\n\n const wait = Promise.all(promises.map(promise => promise.then(resolved, rejected)));\n return wait.then(() => {\n return {\n successful: resolutions,\n failed: rejections\n };\n });\n}\n\nmodule.exports = settle;","\"use strict\";\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nvar _emitter = /*#__PURE__*/_classPrivateFieldLooseKey(\"emitter\");\n\nvar _events = /*#__PURE__*/_classPrivateFieldLooseKey(\"events\");\n\nclass EventTracker {\n constructor(emitter) {\n Object.defineProperty(this, _emitter, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _events, {\n writable: true,\n value: []\n });\n _classPrivateFieldLooseBase(this, _emitter)[_emitter] = emitter;\n }\n\n on(event, fn) {\n _classPrivateFieldLooseBase(this, _events)[_events].push([event, fn]);\n\n return _classPrivateFieldLooseBase(this, _emitter)[_emitter].on(event, fn);\n }\n\n remove() {\n for (const [event, fn] of _classPrivateFieldLooseBase(this, _events)[_events].splice(0)) {\n _classPrivateFieldLooseBase(this, _emitter)[_emitter].off(event, fn);\n }\n }\n\n}\n\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 */\nmodule.exports = EventTracker;","\"use strict\";\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nvar _aliveTimer = /*#__PURE__*/_classPrivateFieldLooseKey(\"aliveTimer\");\n\nvar _isDone = /*#__PURE__*/_classPrivateFieldLooseKey(\"isDone\");\n\nvar _onTimedOut = /*#__PURE__*/_classPrivateFieldLooseKey(\"onTimedOut\");\n\nvar _timeout = /*#__PURE__*/_classPrivateFieldLooseKey(\"timeout\");\n\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, 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;\n }\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\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\n done() {\n if (!_classPrivateFieldLooseBase(this, _isDone)[_isDone]) {\n clearTimeout(_classPrivateFieldLooseBase(this, _aliveTimer)[_aliveTimer]);\n _classPrivateFieldLooseBase(this, _aliveTimer)[_aliveTimer] = null;\n _classPrivateFieldLooseBase(this, _isDone)[_isDone] = true;\n }\n }\n\n}\n\nmodule.exports = ProgressTimeout;","\"use strict\";\n\nfunction isNetworkError(xhr) {\n if (!xhr) {\n return false;\n }\n\n return xhr.readyState !== 0 && xhr.readyState !== 4 || xhr.status === 0;\n}\n\nmodule.exports = isNetworkError;","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]';\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\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 objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _([1, 2]).forEach(function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, typeof iteratee == 'function' ? iteratee : identity);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\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 `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\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 array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\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 array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an 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 an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\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 a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\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 valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\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 && (type == 'object' || type == 'function');\n}\n\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 && typeof value == 'object';\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = forEach;\n","/**\n * @description 工具函数\n * @author wangfupeng\n */\n\nimport forEach from 'lodash.foreach'\nimport { nanoid } from 'nanoid'\n\ntype PromiseCallback = (value: void) => void | PromiseLike<void>\n\n/**\n * 获取随机数字符串\n * @param prefix 前缀\n * @returns 随机数字符串\n */\nexport function genRandomStr(prefix: string = 'r'): string {\n return `${prefix}-${nanoid()}`\n}\n\nexport function promiseResolveThen(fn: Function) {\n Promise.resolve().then(fn as PromiseCallback)\n}\n\n/**\n * 追加 url query 参数\n * @param url url\n * @param data data\n */\nexport function addQueryToUrl(url: string, data: object): string {\n let [urlWithoutHash, hash] = url.split('#')\n\n // 拼接 query string\n const queryArr: string[] = []\n forEach(data, (val, key) => {\n queryArr.push(`${key}=${val}`)\n })\n const queryStr = queryArr.join('&')\n\n // 拼接到 url\n if (urlWithoutHash.indexOf('?') > 0) {\n // 已有 query\n urlWithoutHash = `${urlWithoutHash}&${queryStr}`\n } else {\n // 没有 query\n urlWithoutHash = `${urlWithoutHash}?${queryStr}`\n }\n\n // 返回拼接好的 url\n if (hash) {\n return `${urlWithoutHash}#${hash}`\n } else {\n return urlWithoutHash\n }\n}\n\n/**\n * 替换 html 特殊字符,如 > 替换为 >\n * @param str html str\n */\nexport function replaceHtmlSpecialSymbols(str: string) {\n return (\n str\n /**\n * 遇到两个空格时才替换,一个空格不替换\n * 两个英文单词之间有一个空格,就不用替换,否则无法默认换行 issue #4403\n */\n .replace(/ {2}/g, ' ')\n\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/®/g, '®')\n .replace(/©/g, '©')\n .replace(/™/g, '™')\n )\n}\n\n/**\n *【反转】替换 html 特殊字符,如 > 替换为 >\n * @param str html str\n */\nexport function deReplaceHtmlSpecialSymbols(str: string) {\n return str\n .replace(/ /g, ' ')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/®/g, '®')\n .replace(/©/g, '©')\n .replace(/™/g, '™')\n .replace(/"/g, '\"')\n}\n\nexport const toString = (val: unknown): string => Object.prototype.toString.call(val)\n","/**\n * @description create default uppy uploader\n * @author wangfupeng\n */\n\nimport Uppy from '@uppy/core'\nimport XHRUpload from '@uppy/xhr-upload'\n\nimport { addQueryToUrl } from '../utils/util'\nimport type { IUploadConfig, IUploader, IUploadResultFile } from './interface'\n\nfunction getUploadResultFile(file?: IUploadResultFile | null): IUploadResultFile {\n if (file) { return file }\n\n return { name: '' }\n}\n\nfunction createUppyUploader(config: IUploadConfig): IUploader {\n const {\n server = '',\n fieldName = '',\n maxFileSize = 10 * 1024 * 1024, // 10M\n maxNumberOfFiles = 100, // 最多多少个文件\n meta = {},\n metaWithUrl = false,\n headers = {},\n withCredentials = false,\n timeout = 10 * 1000, // 10s\n onBeforeUpload = files => files,\n onSuccess = (_file, _res) => {\n /* on success */\n },\n onError = (file, err, res?) => {\n console.error(`${file.name} upload error`, err, res)\n },\n onProgress = _progress => {\n /* on progress */\n },\n } = config\n\n if (!server) {\n throw new Error('Cannot get upload server address\\n没有配置上传地址')\n }\n if (!fieldName) {\n throw new Error('Cannot get fieldName\\n没有配置 fieldName')\n }\n\n let url = server\n\n if (metaWithUrl) {\n url = addQueryToUrl(url, meta)\n }\n\n const uppy = new Uppy({\n onBeforeUpload: files => onBeforeUpload(files) as any,\n restrictions: {\n maxFileSize,\n maxNumberOfFiles,\n },\n meta,\n ...config.uppyConfig,\n }).use(XHRUpload, {\n endpoint: url,\n headers,\n formData: true,\n fieldName,\n bundle: false,\n withCredentials,\n timeout,\n ...config.xhrConfig,\n })\n\n uppy.on('upload-success', (file, response) => {\n const { body = {} } = response ?? {}\n const uploadFile = getUploadResultFile(file as IUploadResultFile | undefined)\n\n try {\n onSuccess(uploadFile, body)\n } catch (err) {\n console.error('wangEditor upload file - onSuccess error', err)\n }\n })\n\n uppy.on('progress', progress => {\n if (progress < 1) { return }\n onProgress(progress)\n })\n\n uppy.on('upload-error', (file, error, response) => {\n const uploadFile = getUploadResultFile(file as IUploadResultFile | undefined)\n\n try {\n onError(uploadFile, error, response)\n } catch (err) {\n console.error('wangEditor upload file - onError error', err)\n }\n })\n\n uppy.on('restriction-failed', (file, error) => {\n const uploadFile = getUploadResultFile(file as IUploadResultFile | undefined)\n\n try {\n onError(uploadFile, error, undefined)\n } catch (err) {\n console.error('wangEditor upload file - onError error', err)\n }\n })\n\n return uppy\n}\n\nexport default createUppyUploader\n","/**\n * @description gen uploader\n * @author wangfupeng\n */\n\nimport type Uppy from '@uppy/core'\n\nimport type { IDomEditor } from '../editor/interface'\nimport createUppyUploader from './createUppyUploader'\nimport type { IUploadAdapter, IUploadConfig, IUploader } from './interface'\n\ntype IUploadConfigWithAdapter = IUploadConfig & {\n uploadAdapter: IUploadAdapter\n}\n\nfunction createUploader<T extends IUploadConfig>(\n config: T,\n editor?: IDomEditor,\n): T extends IUploadConfigWithAdapter ? IUploader : Uppy {\n if (config.uploadAdapter) {\n return config.uploadAdapter({ config, editor }) as T extends IUploadConfigWithAdapter ? IUploader : Uppy\n }\n\n return createUppyUploader(config) as T extends IUploadConfigWithAdapter ? IUploader : Uppy\n}\n\nexport default createUploader\n"],"names":["Object","defineProperty","loggers","value","justErrorsLogger","debugLogger","getTimeStamp","pad","number","toString","getTimeStamp_1","date","Date","getHours","getMinutes","getSeconds","require$$0","debug","warn","error","_len","arguments","length","args","Array","_key","console","_len2","_key2","_len3","_key3","_len4","_key4","nonSecure","nanoid","size","id","i","Math","random","customAlphabet","alphabet","defaultSize","prettierBytes","num","isNaN","TypeError","neg","units","exponent","min","floor","log","Number","pow","unit","toFixed","WildcardMatcher","text","separator","this","hasWild","indexOf","parts","split","prototype","match","input","ii","testParts","matches","partsCount","String","splice","key","wildcard","test","matcher","Restricter_1","defaultOptions","RestrictionError","Restricter","reMimePartSplit","mimeMatch","target","pattern","result","require$$1","maxFileSize","minFileSize","maxTotalFileSize","maxNumberOfFiles","minNumberOfFiles","allowedFileTypes","requiredMetaFields","Error","constructor","super","isRestriction","AggregateError","globalThis","errors","message","getOpts","i18n","opts","restrictions","isArray","validate","file","files","nonGhostFiles","filter","f","isGhost","smart_count","some","type","includes","replace","extension","toLowerCase","slice","allowedFileTypesString","join","types","totalFilesSize","reduce","total","name","validateMinNumberOfFiles","keys","getMissingRequiredMetaFields","fileName","own","hasOwnProperty","missingFields","field","call","meta","push","hasProperty","object","_classPrivateFieldLooseBase","receiver","privateKey","_classPrivateFieldLooseKey","has","insertReplacement","source","rx","replacement","newParts","forEach","chunk","Symbol","raw","list","interpolate","phrase","options","dollarRegex","interpolated","arg","RegExp","_apply","_apply2","locale","strings","prevLocale","pluralize","Translator_1","locales","n","translate","translateArray","string","namespaceEmitter","emitter","_fns","emit","event","arg1","arg2","arg3","arg4","arg5","arg6","toEmit","e","out","idx","substring","l","concat","getListeners","fns","apply","emitAll","on","fn","once","one","off","keep","FUNC_ERROR_TEXT","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","freeGlobal","global","freeSelf","self","root","Function","objectToString","nativeMax","max","nativeMin","now","debounce","func","wait","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","thisArg","undefined","shouldInvoke","timeSinceLastCall","timerExpired","trailingEdge","setTimeout","remainingWait","debounced","isInvoking","leadingEdge","toNumber","isObject","cancel","clearTimeout","flush","isObjectLike","isSymbol","other","valueOf","isBinary","lodash_throttle","_publish","DefaultStore","_publish2","state","callbacks","getState","setState","patch","prevState","nextState","subscribe","listener","VERSION","lib","getFileNameAndExtension_1","fullFileName","lastDot","lastIndexOf","mimeTypes","md","markdown","mp4","mp3","svg","jpg","png","gif","heic","heif","yaml","yml","csv","tsv","tab","avi","mks","mkv","mov","dicom","doc","docm","docx","dot","dotm","dotx","xla","xlam","xlc","xlf","xlm","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xlw","txt","conf","pdf","zip","rar","tar","gz","dmg","_nonSecure","_loggers","_Restricter","require$$2","_Symbol$for","_Symbol$for2","Translator","require$$3","ee","require$$4","throttle","require$$5","require$$6","getFileType","getFileNameAndExtension","getFileType_1","_getFileNameAndExtens","fileExtension","require$$7","require$$8","generateFileID","encodeFilename","suffix","character","charCodeAt","encodeCharacter","generateFileID_1","relativePath","data","lastModified","require$$9","supportsUploadProgress","supportsUploadProgress_1","userAgent","navigator","m","exec","edgeVersion","major","minor","getFileName","getFileName_1","fileType","fileDescriptor","addBulkFilesFailed","youCanOnlyUploadX","youHaveToAtLeastSelectX","exceedsSize","missingRequiredMetaField","missingRequiredMetaFieldOnFile","inferiorSize","youCanOnlyUploadFileTypes","noMoreFilesAllowed","noDuplicates","companionError","authAborted","companionUnauthorizeHint","failedToUpload","noInternetConnection","connectedToInternet","noFilesFound","selectX","allFilesFromFolderNamed","openFolderNamed","logOut","resetFilter","loading","authenticateWithTitle","authenticateWith","signInWithGoogle","searchImages","enterTextToSearch","search","emptyFolderAdded","folderAlreadyAdded","folderAdded","_plugins","_restricter","_storeUnsubscribe","_emitter","_preProcessors","_uploaders","_postProcessors","_informAndEmit","_checkRequiredMetaFieldsOnFile","_checkRequiredMetaFields","_assertNewUploadAllowed","_checkAndCreateFileStateObject","_startIfAutoProceed","_addListeners","_updateOnlineStatus","_createUpload","_getUpload","_removeUpload","_runUpload","for","Uppy","_opts","_runUpload2","_removeUpload2","_getUpload2","_createUpload2","_addListeners2","_startIfAutoProceed2","_checkAndCreateFileStateObject2","_assertNewUploadAllowed2","_checkRequiredMetaFields2","_checkRequiredMetaFieldsOnFile2","_informAndEmit2","writable","create","Set","updateOnlineStatus","bind","defaultLocale","autoProceed","allowMultipleUploads","allowMultipleUploadBatches","onBeforeFileAdded","currentFile","onBeforeUpload","store","logger","infoTimeout","i18nInit","calculateProgress","plugins","currentUploads","allowNewUpload","capabilities","uploadProgress","individualCancellation","resumableUploads","totalProgress","info","recoveredState","updateAll","window","callback","iteratePlugins","plugin","update","setFileState","fileID","translator","i18nArray","setOptions","newOpts","setMeta","resetProgress","defaultProgress","percentage","bytesUploaded","uploadComplete","uploadStarted","updatedFiles","updatedFile","progress","addPreProcessor","add","removePreProcessor","delete","addPostProcessor","removePostProcessor","addUploader","removeUploader","updatedMeta","setFileMeta","newMeta","getFile","getFiles","values","getObjectOfFilesPerState","filesObject","inProgressFiles","_ref","newFiles","startedFiles","preprocess","postprocess","uploadStartedFiles","pausedFiles","isPaused","completeFiles","erroredFiles","inProgressNotPausedFiles","processingFiles","isUploadStarted","isAllComplete","isAllErrored","isAllPaused","isUploadInProgress","isSomeGhost","validateRestrictions","err","reason","checkIfFileAlreadyExists","addFile","newFile","addFiles","fileDescriptors","subError","details","removeFiles","fileIDs","updatedUploads","removedFiles","fileIsNotRemoved","uploadFileID","uploadID","newFileIDs","stateUpdate","calculateTotalProgress","removedFileIDs","removeFile","pauseResume","pauseAll","resumeAll","retryAll","filesToRetry","Promise","resolve","successful","failed","forceAllowNewUpload","cancelAll","_temp","retryUpload","reset","logout","provider","canHavePercentage","isFinite","bytesTotal","round","inProgress","sizedFiles","unsizedFiles","progressMax","currentProgress","acc","totalSize","averageSize","uploadedSize","onLine","wasOffline","getID","use","Plugin","pluginId","existsPluginAlready","getPlugin","msg","install","foundPlugin","find","method","flat","removePlugin","instance","uninstall","index","findIndex","item","updatedState","close","_temp2","removeEventListener","hideInfo","duration","isComplexMessage","restore","reject","addResultData","currentUpload","upload","_classPrivateFieldLoo","uploader","onBeforeUploadResult","then","catch","currentlyUploadingFiles","flatMap","curr","waitingFileIDs","trim","missingRequiredMetaFields","success","isRemote","Boolean","remote","preview","onBeforeFileAddedResult","filesArray","map","scheduledAutoProceed","stack","errorHandler","response","errorMsg","newError","uploadResp","mode","uploadURL","addEventListener","step","async","restoreStep","steps","updatedUpload","Uppy_1","u","t","r","o","c","s","a","h","p","v","y","w","d","g","parentNode","removeChild","_","children","defaultProps","props","ref","__k","__","__b","__e","__c","__v","__i","__u","vnode","k","x","context","S","C","base","M","__d","$","__r","debounceRendering","sort","shift","__P","O","__n","namespaceURI","N","I","b","P","B","A","nextSibling","L","D","insertBefore","nodeType","T","setProperty","j","style","cssText","removeAttribute","setAttribute","F","H","render","contextType","__E","E","sub","__h","_sb","__s","getDerivedStateFromProps","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","componentDidUpdate","getChildContext","getSnapshotBeforeUpdate","V","z","q","diffed","localName","document","createTextNode","createElementNS","is","__m","childNodes","attributes","__html","innerHTML","content","current","unmount","componentWillUnmount","G","documentElement","firstChild","getDerivedStateFromError","componentDidCatch","forceUpdate","Provider","__l","Consumer","J","isDOMElement","isDOMElement_1","obj","Node","ELEMENT_NODE","findDOMElement_1","element","querySelector","BasePlugin_1","uppy","getPluginState","setPluginState","addTarget","afterUpdate","_preact","findDOMElement","getTextDirection","getTextDirection_1","_element","dir","BasePlugin","_updateUI","UIPlugin","mount","callerPluginName","targetElement","isTargetDOMEl","uppyRootElement","createElement","classList","calling","latestArgs","replaceTargetContent","el","appendChild","direction","onMount","targetPlugin","Target","parent","_classPrivateFieldLoo2","_this$el","remove","onUnmount","UIPlugin_1","exports","enumerable","get","module","_0","_1","NetworkError","xhr","cause","isNetworkError","request","NetworkError_1","fetchWithNetworkError","fetchWithNetworkError_1","fetch","ErrorWithCause","ErrorWithCause_1","AuthError","isAuthError","AuthError_1","handleJSONResponse","res","status","jsonPromise","json","errMsg","statusText","errData","requestId","_companionHeaders","_getPostResponseFunc","_getUrl","_errorHandler","RequestClient","_errorHandler2","_getUrl2","skip","onReceiveResponse","allowedHeaders","preflightDone","companionHeaders","setCompanionHeaders","headers","hostname","companion","host","companionUrl","defaultHeaders","preflight","path","headerName","preflightAndHeaders","all","header","skipPostResponse","credentials","companionCookiesRule","post","body","JSON","stringify","url","_err","Accept","RequestClient_1","tokenStorage","getItem","localStorage","removeItem","setItem","Socket","Provider_1","charAt","toUpperCase","tokenKey","companionKeysParams","preAuthToken","getAuthToken","token","authHeaders","btoa","params","authenticated","setAuthToken","storage","ensurePreAuth","fetchPreAuthToken","authUrl","queries","URLSearchParams","set","fileUrl","directory","_ref2","initPlugin","defaultOpts","serverUrl","serverPattern","companionAllowedHosts","URL","origin","_2","SearchProvider_1","encodeURIComponent","SearchProvider","_3","_queued","_isOpen","_socket","_handleMessage","parse","action","payload","autoOpen","open","isOpen","WebSocket","onopen","first","send","onclose","onmessage","handler","RateLimitedQueue_1","internalRateLimitedQueue","RateLimitedQueue","_activeRequests","_queuedHandlers","_paused","_pauseTimer","_downLimit","_upperLimit","_rateLimitingTimer","_call","_queueNext","_next","_queue","_dequeue","_resume","_increaseLimit","_call2","cancelActive","done","abort","_queueNext2","queueMicrotask","_next2","limit","next","_queue2","priority","_dequeue2","resume","ceil","Infinity","run","queueOptions","wrapPromiseFunction","_this","queuedRequest","outerPromise","cancelError","innerPromise","pause","rateLimit","timedOut","_companionClient","_RateLimitedQueue","emitSocketProgress","emitSocketProgress_1","progressData","getSocketHost","getSocketHost_1","settle","settle_1","promises","resolutions","rejections","resolved","rejected","promise","EventTracker","_events","EventTracker_1","ProgressTimeout","_aliveTimer","_isDone","_onTimedOut","_timeout","ProgressTimeout_1","timeout","timeoutHandler","isNetworkError_1","readyState","require$$11","buildResponseError","assign","setTypeInBlob","XHRUpload","title","formData","fieldName","bundle","metaFields","responseUrlFieldName","withCredentials","responseType","getResponseData","responseText","parsedResponse","getResponseError","validateStatus","handleUpload","requests","uploaderEvents","getOptions","overrides","xhrUpload","addMetadata","append","createFormDataUpload","formPost","FormData","dataWithUpdatedType","createBundledUpload","XMLHttpRequest","timer","seconds","ev","loaded","lengthComputable","endpoint","currentOpts","setRequestHeader","onFileRemove","onCancelAll","uploadRemote","fields","providerOptions","fieldname","metadata","httpMethod","useFormData","socket","onRetry","onRetryAll","resp","uploadBundle","optsFromState","emitError","uploadFiles","cb","targetFileID","eventHandler","MAX_SAFE_INTEGER","argsTag","funcTag","genTag","reIsUint","arrayEach","array","iteratee","transform","objectProto","propertyIsEnumerable","nativeKeys","arrayLikeKeys","inherited","isArrayLike","isArrayLikeObject","isArguments","baseTimes","skipIndexes","isIndex","eachFunc","baseEach","baseFor","collection","iterable","keysFunc","baseKeys","Ctor","proto","isLength","tag","isFunction","identity","lodash_foreach","addQueryToUrl","_a","__read","urlWithoutHash","hash","queryArr","val","queryStr","getUploadResultFile","config","editor","uploadAdapter","server","_b","_c","_d","_e","_f","metaWithUrl","_g","_h","_j","_k","_l","onSuccess","_file","_res","_m","onError","_o","onProgress","_progress","__assign","uppyConfig","xhrConfig","uploadFile","createUppyUploader"],"mappings":"yzCAEAA,OAAOC,eAAeC,EAAS,aAAc,CAC3CC,OAAO,IAETD,EAAAE,iBAA2BF,EAAAG,iBAAsB,EAGjD,MAAMC,2BCAN,SAASC,EAAIC,GACX,OAAOA,EAAS,GAAK,IAAIA,IAAWA,EAAOC,UAC7C,YAcAC,EARA,WACE,MAAMC,EAAO,IAAIC,KAIjB,MAAO,GAHOL,EAAII,EAAKE,eACPN,EAAII,EAAKG,iBACTP,EAAII,EAAKI,eAE3B,EDdqBC,GAIfZ,EAAmB,CACvBa,MAAO,OACPC,KAAM,OACNC,MAAO,WACL,IAAK,IAAIC,EAAOC,UAAUC,OAAQC,EAAO,IAAIC,MAAMJ,GAAOK,EAAO,EAAGA,EAAOL,EAAMK,IAC/EF,EAAKE,GAAQJ,UAAUI,GAGzB,OAAOC,QAAQP,MAAM,WAAWb,UAAsBiB,EAC1D,GAIArB,EAAAE,iBAA2BA,EAC3B,MAAMC,EAAc,CAClBY,MAAO,WACL,IAAK,IAAIU,EAAQN,UAAUC,OAAQC,EAAO,IAAIC,MAAMG,GAAQC,EAAQ,EAAGA,EAAQD,EAAOC,IACpFL,EAAKK,GAASP,UAAUO,GAG1B,OAAOF,QAAQT,MAAM,WAAWX,UAAsBiB,EAC1D,EACEL,KAAM,WACJ,IAAK,IAAIW,EAAQR,UAAUC,OAAQC,EAAO,IAAIC,MAAMK,GAAQC,EAAQ,EAAGA,EAAQD,EAAOC,IACpFP,EAAKO,GAAST,UAAUS,GAG1B,OAAOJ,QAAQR,KAAK,WAAWZ,UAAsBiB,EACzD,EACEJ,MAAO,WACL,IAAK,IAA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