@micromag/viewer-build 0.4.100 → 0.4.101

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.
Files changed (31) hide show
  1. package/build/asset-manifest.json +7 -22
  2. package/build/index.html +1 -1
  3. package/build/static/js/466.4afd6913.js +2 -0
  4. package/build/static/js/{66.a4491af0.js.LICENSE.txt → 466.4afd6913.js.LICENSE.txt} +2 -4
  5. package/build/static/js/66.0cdd7e66.chunk.js +2 -0
  6. package/build/static/js/main.689c6af3.js +2 -0
  7. package/build/static/js/runtime~main.e20d8240.js +1 -0
  8. package/package.json +4 -4
  9. package/build/static/css/66.cf2dc07c.css +0 -5
  10. package/build/static/js/160.0718cb47.chunk.js +0 -1
  11. package/build/static/js/231.23d6045b.chunk.js +0 -1
  12. package/build/static/js/268.f9b85afc.chunk.js +0 -1
  13. package/build/static/js/270.85f114b4.chunk.js +0 -1
  14. package/build/static/js/278.1bc9b3a8.chunk.js +0 -1
  15. package/build/static/js/359.8b129b69.chunk.js +0 -1
  16. package/build/static/js/50.37bde52c.chunk.js +0 -1
  17. package/build/static/js/51.24437974.chunk.js +0 -2
  18. package/build/static/js/51.24437974.chunk.js.LICENSE.txt +0 -10
  19. package/build/static/js/543.a221a89d.chunk.js +0 -1
  20. package/build/static/js/558.01ab5aca.chunk.js +0 -1
  21. package/build/static/js/6.41624dfe.chunk.js +0 -1
  22. package/build/static/js/66.a4491af0.js +0 -2
  23. package/build/static/js/685.1eafae9a.chunk.js +0 -2
  24. package/build/static/js/699.abf614c9.chunk.js +0 -2
  25. package/build/static/js/699.abf614c9.chunk.js.LICENSE.txt +0 -12
  26. package/build/static/js/951.cb178734.chunk.js +0 -2
  27. package/build/static/js/951.cb178734.chunk.js.LICENSE.txt +0 -10
  28. package/build/static/js/main.ad607bea.js +0 -2
  29. package/build/static/js/runtime~main.c8067dd1.js +0 -1
  30. /package/build/static/js/{685.1eafae9a.chunk.js.LICENSE.txt → 66.0cdd7e66.chunk.js.LICENSE.txt} +0 -0
  31. /package/build/static/js/{main.ad607bea.js.LICENSE.txt → main.689c6af3.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[359],{8359:function(e,o,i){i.r(o);const r={strings:{},pluralize(e){return 1===e?0:1}};r.strings={addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},addedNumFiles:"Added %{numFiles} file(s)",addingMoreFiles:"Adding more files",additionalRestrictionsFailed:"%{count} additional restrictions were not fulfilled",addMore:"Add more",addMoreFiles:"Add more files",aggregateExceedsSize:"You selected %{size} of files, but maximum allowed size is %{sizeAllowed}",allFilesFromFolderNamed:"All files from folder %{name}",allowAccessDescription:"In order to take pictures or record video with your camera, please allow camera access for this site.",allowAccessTitle:"Please allow access to your camera",allowAudioAccessDescription:"In order to record audio, please allow microphone access for this site.",allowAudioAccessTitle:"Please allow access to your microphone",aspectRatioLandscape:"Crop landscape (16:9)",aspectRatioPortrait:"Crop portrait (9:16)",aspectRatioSquare:"Crop square",authAborted:"Authentication aborted",authenticate:"Connect",authenticateWith:"Connect to %{pluginName}",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",back:"Back",browse:"browse",browseFiles:"browse files",browseFolders:"browse folders",cancel:"Cancel",cancelUpload:"Cancel upload",closeModal:"Close Modal",companionError:"Connection with Companion failed",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",complete:"Complete",compressedX:"Saved %{size} by compressing images",compressingImages:"Compressing images...",connectedToInternet:"Connected to the Internet",copyLink:"Copy link",copyLinkToClipboardFallback:"Copy the URL below",copyLinkToClipboardSuccess:"Link copied to clipboard.",creatingAssembly:"Preparing upload...",creatingAssemblyFailed:"Transloadit: Could not create Assembly",dashboardTitle:"Uppy Dashboard",dashboardWindowTitle:"Uppy Dashboard Window (Press escape to close)",dataUploadedOfTotal:"%{complete} of %{total}",dataUploadedOfUnknown:"%{complete} of unknown",discardMediaFile:"Discard Media",discardRecordedFile:"Discard recorded file",done:"Done",dropHereOr:"Drop here or %{browse}",dropHint:"Drop your files here",dropPasteBoth:"Drop files here, %{browseFiles} or %{browseFolders}",dropPasteFiles:"Drop files here or %{browseFiles}",dropPasteFolders:"Drop files here or %{browseFolders}",dropPasteImportBoth:"Drop files here, %{browseFiles}, %{browseFolders} or import from:",dropPasteImportFiles:"Drop files here, %{browseFiles} or import from:",dropPasteImportFolders:"Drop files here, %{browseFolders} or import from:",editFile:"Edit file",editFileWithFilename:"Edit file %{file}",editImage:"Edit image",editing:"Editing %{file}",emptyFolderAdded:"No files were added from empty folder",encoding:"Encoding...",enterCorrectUrl:"Incorrect URL: Please make sure you are entering a direct link to a file",enterTextToSearch:"Enter text to search for images",enterUrlToImport:"Enter URL to import a file",error:"Error",exceedsSize:"%{file} exceeds maximum allowed size of %{size}",failedToAddFiles:"Failed to add files",failedToFetch:"Companion failed to fetch this URL, please make sure it’s correct",failedToUpload:"Failed to upload %{file}",filesUploadedOfTotal:{0:"%{complete} of %{smart_count} file uploaded",1:"%{complete} of %{smart_count} files uploaded"},filter:"Filter",finishEditingFile:"Finish editing file",flipHorizontal:"Flip horizontally",folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"},folderAlreadyAdded:'The folder "%{folder}" was already added',generateImage:"Generate image",generateImagePlaceholder:"A serene sunset over a mountain lake, with pine trees reflecting in the water",generating1:"AI is thinking...",generating2:"Crunching pixels...",generating3:"Summoning images...",generating4:"AI is working...",generating5:"Creating magic...",generatingThumbnails:"Generating thumbnails...",import:"Import",importFiles:"Import files from:",importFrom:"Import from %{name}",inferiorSize:"This file is smaller than the allowed size of %{size}",loadedXFiles:"Loaded %{numFiles} files",loading:"Loading...",logIn:"Log in",logOut:"Log out",micDisabled:"Microphone access denied by user",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",missingRequiredMetaFields:{0:"Missing required meta field: %{fields}.",1:"Missing required meta fields: %{fields}."},myDevice:"My Device",noAudioDescription:"In order to record audio, please connect a microphone or another audio input device",noAudioTitle:"Microphone Not Available",noCameraDescription:"In order to take pictures or record video, please connect a camera device",noCameraTitle:"Camera Not Available",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",noFilesFound:"You have no files or folders here",noInternetConnection:"No Internet connection",noMoreFilesAllowed:"Cannot add more files",noSearchResults:"Unfortunately, there are no results for this search",openFolderNamed:"Open folder %{name}",pause:"Pause",paused:"Paused",pauseUpload:"Pause upload",pickFiles:"Pick files",pickPhotos:"Pick photos",pleaseWait:"Please wait",pluginNameAudio:"Audio",pluginNameBox:"Box",pluginNameCamera:"Camera",pluginNameDropbox:"Dropbox",pluginNameFacebook:"Facebook",pluginNameGoogleDrive:"Google Drive",pluginNameGoogleDrivePicker:"Google Drive",pluginNameGooglePhotosPicker:"Google Photos",pluginNameInstagram:"Instagram",pluginNameOneDrive:"OneDrive",pluginNameScreenCapture:"Screencast",pluginNameUnsplash:"Unsplash",pluginNameUrl:"Link",pluginNameWebdav:"WebDAV",pluginNameZoom:"Zoom",pluginWebdavInputLabel:"WebDAV URL for a file (e.g. from ownCloud or Nextcloud)",poweredBy:"Powered by %{uppy}",processingXFiles:{0:"Processing %{smart_count} file",1:"Processing %{smart_count} files"},recording:"Recording",recordingLength:"Recording length %{recording_length}",recordingStoppedMaxSize:"Recording stopped because the file size is about to exceed the limit",recordVideoBtn:"Record Video",recoveredAllFiles:"We restored all files. You can now resume the upload.",recoveredXFiles:{0:"We could not fully recover 1 file. Please re-select it and resume the upload.",1:"We could not fully recover %{smart_count} files. Please re-select them and resume the upload."},removeFile:"Remove file",reSelect:"Re-select",resetFilter:"Reset filter",resetSearch:"Reset search",resume:"Resume",resumeUpload:"Resume upload",retry:"Retry",retryUpload:"Retry upload",revert:"Reset",rotate:"Rotate 90°",save:"Save",saveChanges:"Save changes",search:"Search",searchImages:"Search for images",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},sessionRestored:"Session restored",showErrorDetails:"Show error details",signInWithGoogle:"Sign in with Google",smile:"Smile!",startAudioRecording:"Begin audio recording",startCapturing:"Begin screen capturing",startRecording:"Begin video recording",stopAudioRecording:"Stop audio recording",stopCapturing:"Stop screen capturing",stopRecording:"Stop video recording",streamActive:"Stream active",streamPassive:"Stream passive",submitRecordedFile:"Submit recorded file",takePicture:"Take a picture",takePictureBtn:"Take Picture",takeScreenshot:"Take Screenshot",unnamed:"Unnamed",upload:"Upload",uploadComplete:"Upload complete",uploadFailed:"Upload failed",uploading:"Uploading",uploadingXFiles:{0:"Uploading %{smart_count} file",1:"Uploading %{smart_count} files"},uploadPaused:"Upload paused",uploadStalled:"Upload has not made any progress for %{seconds} seconds. You may want to retry it.",uploadXFiles:{0:"Upload %{smart_count} file",1:"Upload %{smart_count} files"},uploadXNewFiles:{0:"Upload +%{smart_count} file",1:"Upload +%{smart_count} files"},xFilesSelected:{0:"%{smart_count} file selected",1:"%{smart_count} files selected"},xMoreFilesAdded:{0:"%{smart_count} more file added",1:"%{smart_count} more files added"},xTimeLeft:"%{time} left",youCanOnlyUploadFileTypes:"You can only upload: %{types}",youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},zoomIn:"Zoom in",zoomOut:"Zoom out"},"undefined"!=typeof Uppy&&(globalThis.Uppy.locales.en_US=r),o.default=r}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[50],{6050:function(e,r,i){i.r(r);const s={strings:{},pluralize(e){return e<=1?0:1}};s.strings={addBulkFilesFailed:{0:"L’ajout de %{smart_count} fichier a échoué en raison d’une erreur interne",1:"L’ajout de %{smart_count} fichiers a échoué en raison d’erreurs internes"},addedNumFiles:"%{numFiles} fichier(s) ajouté(s)",addingMoreFiles:"Ajout de fichiers",additionalRestrictionsFailed:"%{count} restrictions supplémentaires n’ont pas été respectées",addMore:"Ajouter d’autres",addMoreFiles:"Ajouter d’autres fichiers",aggregateExceedsSize:"Vous avez sélectionné %{size} de fichiers, mais la taille maximale autorisée est %{sizeAllowed}",allFilesFromFolderNamed:"Tous les fichiers du dossier %{name}",allowAccessDescription:"Pour prendre des photos ou enregistrer une vidéo, veuillez autoriser l’accès à votre caméra pour ce site.",allowAccessTitle:"Veuillez autoriser l’accès à votre caméra",allowAudioAccessDescription:"Pour enregistrer de l’audio, veuillez autoriser l’accès au microphone pour ce site.",allowAudioAccessTitle:"Veuillez autoriser l’accès au microphone",aspectRatioLandscape:"Recadrer en paysage (16:9)",aspectRatioPortrait:"Recadrer en portrait (9:16)",aspectRatioSquare:"Recadrer pour obtenir une photo carrée",authAborted:"Authentification interrompue",authenticateWith:"Se connecter à %{pluginName}",authenticateWithTitle:"Veuillez vous authentifier avec %{pluginName} pour sélectionner les fichiers",back:"Retour",browse:"naviguer",browseFiles:"naviguer dans les fichiers",browseFolders:"naviguer dans les dossiers",cancel:"Annuler",cancelUpload:"Annuler le téléversement",closeModal:"Fermer la fenêtre",companionError:"Connexion à Companion a échoué",companionUnauthorizeHint:"Pour vous déconnecter de votre compte %{provider}, veuillez aller à %{url}",complete:"Terminé",compressedX:"%{size} économisé(s) par la compression",compressingImages:"Compression des images…",connectedToInternet:"Connecté à Internet",copyLink:"Copier le lien",copyLinkToClipboardFallback:"Copier le lien ci-dessous",copyLinkToClipboardSuccess:"Lien copié",creatingAssembly:"Préparation du téléversement…",creatingAssemblyFailed:"Transloadit: Impossible de créer Assembly",dashboardTitle:"Téléverseur de fichiers",dashboardWindowTitle:"Fenêtre de téléversement de fichiers (Appuyez sur Échap pour fermer)",dataUploadedOfTotal:"%{complete} sur %{total}",discardRecordedFile:"Supprimer le fichier enregistré",done:"Terminé",dropHint:"Déposez vos fichiers ici",dropPasteBoth:"Déposer les fichiers ici, coller ou %{browse}",dropPasteFiles:"Déposer les fichiers ici, coller ou %{browse}",dropPasteFolders:"Déposer les fichiers ici, coller ou %{browse}",dropPasteImportBoth:"Déposer les fichiers ici, coller, %{browse} ou importer de",dropPasteImportFiles:"Déposer les fichiers ici, coller, %{browse} ou importer de",dropPasteImportFolders:"Déposer les fichiers ici, coller, %{browse} ou importer de",editFile:"Modifier le fichier",editImage:"Modifier l’image",editFileWithFilename:"Modifier le fichier %{file}",editing:"Modification en cours de %{file}",emptyFolderAdded:"Aucun fichier n’a été ajouté depuis un dossier vide",encoding:"Traitement…",enterCorrectUrl:"Lien incorrect: Assurez-vous que vous entrez un lien direct vers le fichier",enterTextToSearch:"Entrez un texte pour rechercher des images",enterUrlToImport:"Entrez le lien pour importer un fichier",error:"Erreur",exceedsSize:"Le fichier %{file} dépasse la taille maximale autorisée de %{size}",failedToFetch:"Companion a échoué à récupérer ce lien, assurez-vous qu’il est correct",failedToUpload:"Le téléversement de %{file} a échoué",fileSource:"Fichier source: %{name}",filesUploadedOfTotal:{0:"%{complete} sur %{smart_count} fichier téléversé",1:"%{complete} sur %{smart_count} fichiers téléversés"},filter:"Filtrer",finishEditingFile:"Terminer l’édition du fichier",flipHorizontal:"Retourner horizontalement",folderAdded:{0:"%{smart_count} fichier ajouté de %{folder}",1:"%{smart_count} fichiers ajoutés de %{folder}"},folderAlreadyAdded:'Le dossier "%{folder}" a déjà été ajouté',generatingThumbnails:"Génération des vignettes…",import:"Importer",importFiles:"Importer des fichiers depuis :",importFrom:"Importer de %{name}",inferiorSize:"Ce fichier est plus petit que la taille autorisée de %{size}",loadedXFiles:"Chargé %{numFiles} fichiers",loading:"Chargement…",logOut:"Déconnexion",micDisabled:"Accès au micro refusé par l’utilisateur",missingRequiredMetaField:"Champ méta requis manquant",missingRequiredMetaFieldOnFile:"Champs méta requis manquants dans %{fileName}",missingRequiredMetaFields:{0:"Champ méta requis manquant : %{fields}.",1:"Champs méta requis manquants : %{fields}."},myDevice:"Mon Appareil",noAudioDescription:"Pour enregistrer de l’audio, veuillez connecter un microphone ou un autre appareil d’entrée audio",noAudioTitle:"Microphone non disponible",noCameraDescription:"Pour prendre des photos ou enregistrer une vidéo, veuillez connecter une caméra",noDuplicates:'Impossible d’ajouter le fichier "%{fileName}", il existe déjà',noFilesFound:"Vous n’avez aucun fichier ou dossier ici",noInternetConnection:"Pas de connexion à Internet",noMoreFilesAllowed:"Impossible d’ajouter de nouveaux fichiers: en cours de chargement ",noSearchResults:"Malheureusement, il n’y a aucun résultat pour cette recherche",openFolderNamed:"Ouvrir %{name}",pause:"Pause",pauseUpload:"Mettre en pause le téléversement",paused:"En pause",poweredBy:"Propulsé par %{uppy}",processingXFiles:{0:"Traitement de %{smart_count} fichier",1:"Traitement de %{smart_count} fichiers"},recording:"Enregistrement",recordingLength:"Durée d’enregistrement %{recording_length}",recordingStoppedMaxSize:"L’enregistrement s’est arrété car la taille du fichier dépasse la limite",recordVideoBtn:"Enregistrer une vidéo",recoveredAllFiles:"Nous avons restauré tous les fichiers. Vous pouvez maintenant reprendre le téléversement.",recoveredXFiles:{0:"Nous n’avons pas pu récupérer entièrement 1 fichier. Veuillez le resélectionner et reprendre le téléversement.",1:"Nous n’avons pas pu récupérer entièrement %{smart_count} fichiers. Veuillez les resélectionner et reprendre le téléversement."},removeFile:"Effacer le fichier %{file}",resetFilter:"Réinitialiser filtre",resume:"Reprendre",resumeUpload:"Reprendre le téléversement",retry:"Réessayer",retryUpload:"Réessayer le téléversement",reSelect:"Resélectionner",save:"Sauvegarder",saveChanges:"Sauvegarder les modifications",selectFileNamed:"Sélectionner le fichier %{name}",selectX:{0:"Sélectionner %{smart_count}",1:"Sélectionner %{smart_count}"},sessionRestored:"Session restaurée",signInWithGoogle:"Se connecter avec Google",smile:"Souriez !",startRecording:"Commencer l’enregistrement vidéo",stopRecording:"Arrêter l’enregistrement vidéo",streamActive:"Stream actif",streamPassive:"Stream passif",submitRecordedFile:"Envoyer la vidéo enregistrée",takePicture:"Prendre une photo",takePictureBtn:"Prendre une photo",timedOut:"Téléversement bloqué durant %{seconds} secondes, annulation.",unselectFileNamed:"Désélectionner le fichier %{name}",upload:"Téléverser",uploadComplete:"Téléversement terminé",uploadFailed:"Le téléversement a échoué",uploadPaused:"Téléversement mis en pause",uploadStalled:"Téléversement bloqué depuis %{seconds} secondes. Il est peut-être nécessaire de recommencer l’opération.",uploadXFiles:{0:"Téléverser %{smart_count} fichier",1:"Téléverser %{smart_count} fichiers"},uploadXNewFiles:{0:"Téléverser +%{smart_count} fichier",1:"Téléverser +%{smart_count} fichiers"},uploading:"Téléversement en cours",uploadingXFiles:{0:"Téléversement de %{smart_count} fichier",1:"Téléversement de %{smart_count} fichiers"},xFilesSelected:{0:"%{smart_count} fichier sélectionné",1:"%{smart_count} fichiers sélectionnés"},xMoreFilesAdded:{0:"%{smart_count} autre fichier ajouté",1:"%{smart_count} autres fichiers ajoutés"},xTimeLeft:"%{time} restantes",youCanOnlyUploadFileTypes:"Vous pouvez seulement téléverser: %{types}",youCanOnlyUploadX:{0:"Vous pouvez seulement téléverser %{smart_count} fichier",1:"Vous pouvez seulement téléverser %{smart_count} fichiers"},youHaveToAtLeastSelectX:{0:"Vous devez sélectionner au moins %{smart_count} fichier",1:"Vous devez sélectionner au moins %{smart_count} fichiers"}},"undefined"!=typeof Uppy&&(globalThis.Uppy.locales.fr_FR=s),r.default=s}}]);
@@ -1,2 +0,0 @@
1
- /*! For license information please see 51.24437974.chunk.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[51],{2729:function(t,e,s){s.d(e,{A:function(){return o}});var n=s(9491);class o{uppy;opts;id;defaultLocale;i18n;i18nArray;type;VERSION;constructor(t,e){this.uppy=t,this.opts=e??{}}getPluginState(){const{plugins:t}=this.uppy.getState();return t?.[this.id]||{}}setPluginState(t){const{plugins:e}=this.uppy.getState();this.uppy.setState({plugins:{...e,[this.id]:{...e[this.id],...t}}})}setOptions(t){this.opts={...this.opts,...t},this.setPluginState(void 0),this.i18nInit()}i18nInit(){const t=new n.A([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.setPluginState(void 0)}addTarget(t){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}update(t){}afterUpdate(){}}},4528:function(t,e,s){s.d(e,{A:function(){return n}});class n{#t;#e=[];constructor(t){this.#t=t}on(t,e){return this.#e.push([t,e]),this.#t.on(t,e)}remove(){for(const[t,e]of this.#e.splice(0))this.#t.off(t,e)}onFilePause(t,e){this.on("upload-pause",(s,n)=>{t===s?.id&&e(n)})}onFileRemove(t,e){this.on("file-removed",s=>{t===s.id&&e(s.id)})}onPause(t,e){this.on("upload-pause",(s,n)=>{t===s?.id&&e(n)})}onRetry(t,e){this.on("upload-retry",s=>{t===s?.id&&e()})}onRetryAll(t,e){this.on("retry-all",()=>{this.#t.getFile(t)&&e()})}onPauseAll(t,e){this.on("pause-all",()=>{this.#t.getFile(t)&&e()})}onCancelAll(t,e){this.on("cancel-all",(...s)=>{this.#t.getFile(t)&&e(...s)})}onResumeAll(t,e){this.on("resume-all",()=>{this.#t.getFile(t)&&e()})}}},6681:function(t,e){class s extends Error{cause;isNetworkError;request;constructor(t,e=null){super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=t,this.isNetworkError=!0,this.request=e}}e.A=s},9491:function(t,e,s){function n(t,e,s){const n=[];return t.forEach(t=>"string"!=typeof t?n.push(t):e[Symbol.split](t).forEach((t,e,o)=>{""!==t&&n.push(t),e<o.length-1&&n.push(s)})),n}function o(t,e){const s=/\$/g;let o=[t];if(null==e)return o;for(const t of Object.keys(e))if("_"!==t){let r=e[t];"string"==typeof r&&(r=s[Symbol.replace](r,"$$$$")),o=n(o,new RegExp(`%\\{${t}\\}`,"g"),r)}return o}s.d(e,{A:function(){return i}});const r=t=>{throw new Error(`missing string: ${t}`)};class i{locale;constructor(t,{onMissingKey:e=r}={}){this.locale={strings:{},pluralize(t){return 1===t?0:1}},Array.isArray(t)?t.forEach(this.#s,this):this.#s(t),this.#n=e}#n;#s(t){if(!t?.strings)return;const e=this.locale;Object.assign(this.locale,{strings:{...e.strings,...t.strings},pluralize:t.pluralize||e.pluralize})}translate(t,e){return this.translateArray(t,e).join("")}translateArray(t,e){let s=this.locale.strings[t];if(null==s&&(this.#n(t),s=t),"object"==typeof s){if(e&&void 0!==e.smart_count)return o(s[this.locale.pluralize(e.smart_count)],e);throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}if("string"!=typeof s)throw new Error("string was not a string");return o(s,e)}}},8284:function(t,e,s){s.d(e,{S:function(){return i},e:function(){return r}});const n=t=>"error"in t&&!!t.error,o=t=>t.progress.uploadComplete;function r(t){return t.filter(t=>!n(t)&&!o(t))}function i(t){return t.filter(t=>!t.progress?.uploadStarted||!t.isRestored)}},2289:function(t,e,s){function n(t,e){return!0===t?Object.keys(e):Array.isArray(t)?t:[]}s.d(e,{A:function(){return n}})},7853:function(t,e){e.A=function(t){return!!t&&4===t.readyState&&0===t.status}},9051:function(t,e,s){s.r(e),s.d(e,{default:function(){return g}});var n=s(2729),o=s(4528),r=s(7853),i=s(6681);class a{#o=[];#r=0;#i;#a=!1;constructor(t){const e=t?.concurrency;this.#i="number"!=typeof e||0===e?1/0:e}add(t){const e=new AbortController;let s,n;const o=new Promise((t,e)=>{s=t,n=e}),r={run:()=>t(e.signal),resolve:s,reject:n,controller:e};return e.signal.addEventListener("abort",()=>{const t=this.#o.indexOf(r);-1!==t&&(this.#o.splice(t,1),n(e.signal.reason??new DOMException("Aborted","AbortError")))},{once:!0}),o.abort=t=>{e.abort(t??new DOMException("Aborted","AbortError"))},o.abortOn=t=>{if(t){const e=()=>o.abort(t.reason);t.addEventListener("abort",e,{once:!0}),o.then(()=>t.removeEventListener("abort",e),()=>t.removeEventListener("abort",e))}return o},!this.#a&&this.#r<this.#i?this.#l(r):this.#o.push(r),o}#l(t){if(this.#r++,t.controller.signal.aborted)return this.#r--,t.reject(t.controller.signal.reason??new DOMException("Aborted","AbortError")),void this.#u();let e;try{e=t.run()}catch(t){e=Promise.reject(t)}e.then(e=>{t.controller.signal.aborted?t.reject(t.controller.signal.reason??new DOMException("Aborted","AbortError")):t.resolve(e)},e=>{t.reject(e)}).finally(()=>{this.#r--,this.#u()})}#u(){queueMicrotask(()=>{if(!(this.#a||this.#r>=this.#i))for(;this.#o.length>0;){const t=this.#o.shift();if(!t.controller.signal.aborted)return void this.#l(t)}})}pause(){this.#a=!0}resume(){this.#a=!1;const t=this.#i-this.#r;for(let e=0;e<t;e++)this.#u()}clear(t){const e=this.#o.splice(0),s=t??new DOMException("Cleared","AbortError");for(const t of e)t.controller.abort(s),t.reject(s)}get concurrency(){return this.#i}set concurrency(t){if(this.#i="number"!=typeof t||0===t?1/0:t,!this.#a){const t=this.#i-this.#r;for(let e=0;e<t;e++)this.#u()}}get pending(){return this.#o.length}get running(){return this.#r}get isPaused(){return this.#a}wrapPromiseFunction(t){return(...e)=>this.add(s=>t(...e))}}var l=class{#p;#d=!1;#h;#c;constructor(t,e){this.#c=t,this.#h=()=>e(t)}progress(){this.#d||this.#c>0&&(clearTimeout(this.#p),this.#p=setTimeout(this.#h,this.#c))}done(){this.#d||(clearTimeout(this.#p),this.#p=void 0,this.#d=!0)}};const u=()=>{};var p=s(2289),d=s(8284),h={strings:{uploadStalled:"Upload has not made any progress for %{seconds} seconds. You may want to retry it."}};function c(t,e){let s=e;return s||(s=new Error("Upload error")),"string"==typeof s&&(s=new Error(s)),s instanceof Error||(s=Object.assign(new Error("Upload error"),{data:s})),(0,r.A)(t)?(s=new i.A(s,t),s):(s.request=t,s)}function f(t){return t.data.slice(0,t.data.size,t.meta.type)}const y={formData:!0,fieldName:"file",method:"post",allowedMetaFields:!0,bundle:!1,headers:{},timeout:3e4,limit:5,withCredentials:!1,responseType:""};class g extends n.A{static VERSION="5.2.0";#f;#o;uploaderEvents;constructor(t,e){if(super(t,{...y,fieldName:e.bundle?"files[]":"file",...e}),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.defaultLocale=h,this.i18nInit(),this.#o=new a({concurrency:this.opts.limit}),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");if(this.opts.bundle&&"function"==typeof this.opts.headers)throw new Error("`opts.headers` can not be a function when the `bundle: true` option is set.");if(void 0===e?.allowedMetaFields&&"metaFields"in this.opts)throw new Error("The `metaFields` option has been renamed to `allowedMetaFields`.");this.uploaderEvents=Object.create(null),this.#f=t=>async(e,s)=>{try{const n=await function(t,e={}){const{body:s=null,headers:n={},method:o="GET",onBeforeRequest:r=u,onUploadProgress:a=u,shouldRetry:p=()=>!0,onAfterResponse:d=u,onTimeout:h=u,responseType:c,retries:f=3,signal:y=null,timeout:g=3e4,withCredentials:m=!1}=e,b=t=>.3*2**(t-1)*1e3,w=new l(g,h);return function e(l=0){return new Promise(async(u,h)=>{const g=new XMLHttpRequest,A=t=>{p(g)&&l<f?setTimeout(()=>{e(l+1).then(u,h)},b(l)):(w.done(),h(t))};function v(){g.abort(),h(new DOMException("Aborted","AbortError"))}g.open(o,t,!0),g.withCredentials=m,c&&(g.responseType=c),g.onload=async()=>{try{await d(g,l)}catch(t){return t.request=g,void A(t)}g.status>=200&&g.status<300?(w.done(),u(g)):p(g)&&l<f?setTimeout(()=>{e(l+1).then(u,h)},b(l)):(w.done(),h(new i.A(g.statusText,g)))},g.onerror=()=>A(new i.A(g.statusText,g)),g.upload.onprogress=t=>{w.progress(),a(t)},n&&Object.keys(n).forEach(t=>{g.setRequestHeader(t,n[t])}),y?.addEventListener("abort",v),y?.aborted?v():(await r(g,l),g.send(s))})}()}(e,{...s,onBeforeRequest:(e,s)=>this.opts.onBeforeRequest?.(e,s,t),shouldRetry:this.opts.shouldRetry,onAfterResponse:this.opts.onAfterResponse,onTimeout:e=>{const s=Math.ceil(e/1e3),n=new Error(this.i18n("uploadStalled",{seconds:s}));this.uppy.emit("upload-stalled",n,t)},onUploadProgress:e=>{if(e.lengthComputable)for(const{id:s}of t){const t=this.uppy.getFile(s);null!=t&&this.uppy.emit("upload-progress",t,{uploadStarted:t.progress.uploadStarted??0,bytesUploaded:e.loaded/e.total*t.size,bytesTotal:t.size})}}});let o=await(this.opts.getResponseData?.(n));if("json"===n.responseType)o??=n.response;else try{o??=JSON.parse(n.responseText)}catch(t){throw new Error("@uppy/xhr-upload expects a JSON response (with a `url` property). To parse non-JSON responses, use `getResponseData` to turn your response into JSON.",{cause:t})}const r="string"==typeof o?.url?o.url:void 0;for(const{id:e}of t)this.uppy.emit("upload-success",this.uppy.getFile(e),{status:n.status,body:o,uploadURL:r});return n}catch(e){if("AbortError"===e.name)return;const s=e.request;for(const n of t)this.uppy.emit("upload-error",this.uppy.getFile(n.id),c(s,e),s);throw e}}}getOptions(t){const e=this.uppy.getState().xhrUpload,{headers:s}=this.opts,n={...this.opts,...e||{},...t.xhrUpload||{},headers:{}};return"function"==typeof s?n.headers=s(t):Object.assign(n.headers,this.opts.headers),e&&Object.assign(n.headers,e.headers),t.xhrUpload&&Object.assign(n.headers,t.xhrUpload.headers),n}addMetadata(t,e,s){(0,p.A)(s.allowedMetaFields,e).forEach(s=>{const n=e[s];Array.isArray(n)?n.forEach(e=>t.append(s,e)):t.append(s,n)})}createFormDataUpload(t,e){const s=new FormData;this.addMetadata(s,t.meta,e);const n=f(t);return t.name?s.append(e.fieldName,n,t.meta.name):s.append(e.fieldName,n),s}createBundledUpload(t,e){const s=new FormData,{meta:n}=this.uppy.getState();return this.addMetadata(s,n,e),t.forEach(t=>{const e=this.getOptions(t),n=f(t);t.name?s.append(e.fieldName,n,t.name):s.append(e.fieldName,n)}),s}async#y(t){const e=new o.A(this.uppy),s=new AbortController;e.onFileRemove(t.id,()=>s.abort()),e.onCancelAll(t.id,()=>s.abort());try{await this.#o.add(async e=>{const n=this.getOptions(t),o=this.#f([t]),r=n.formData?this.createFormDataUpload(t,n):t.data;return o("string"==typeof n.endpoint?n.endpoint:await n.endpoint(t),{...n,body:r,signal:AbortSignal.any([e,s.signal])})})}catch(t){if("AbortError"===t.name)return;throw t}finally{e.remove()}}async#g(t){const e=new AbortController;function s(){e.abort()}this.uppy.once("cancel-all",s);try{await this.#o.add(async s=>{const n=this.uppy.getState().xhrUpload??{},o=this.#f(t),r=this.createBundledUpload(t,{...this.opts,...n});return o("string"==typeof this.opts.endpoint?this.opts.endpoint:await this.opts.endpoint(t),{...this.opts,body:r,signal:AbortSignal.any([s,e.signal])})})}catch(t){if("AbortError"===t.name)return;throw t}finally{this.uppy.off("cancel-all",s)}}#m(t){const e=this.getOptions(t),s=(0,p.A)(e.allowedMetaFields,t.meta);return{...t.remote?.body,protocol:"multipart",endpoint:e.endpoint,size:t.data.size,fieldname:e.fieldName,metadata:Object.fromEntries(s.map(e=>[e,t.meta[e]])),httpMethod:e.method,useFormData:e.formData,headers:e.headers}}async#b(t){await Promise.allSettled(t.map(t=>{if(t.isRemote){const e=()=>this.#o,s=new AbortController,n=e=>{e.id===t.id&&s.abort()};return this.uppy.on("file-removed",n),this.uppy.getRequestClientForFile(t).uploadRemoteFile(t,this.#m(t),{signal:s.signal,getQueue:e}).finally(()=>{this.uppy.off("file-removed",n)})}return this.#y(t)}))}#w=async t=>{if(0===t.length)return void this.uppy.log("[XHRUpload] No files to upload!");0===this.opts.limit&&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"),this.uppy.log("[XHRUpload] Uploading...");const e=this.uppy.getFilesByIds(t),s=(0,d.e)(e),n=(0,d.S)(s);if(this.uppy.emit("upload-start",n),this.opts.bundle){if(s.some(t=>t.isRemote))throw new Error("Can’t upload remote files when the `bundle: true` option is set");if("function"==typeof this.opts.headers)throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");await this.#g(s)}else await this.#b(s)};install(){if(this.opts.bundle){const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,individualCancellation:!1}})}this.uppy.addUploader(this.#w)}uninstall(){if(this.opts.bundle){const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,individualCancellation:!0}})}this.uppy.removeUploader(this.#w)}}}}]);
@@ -1,10 +0,0 @@
1
- /**
2
- * Takes a string with placeholder variables like `%{smart_count} file selected`
3
- * and replaces it with values from options `{smart_count: 5}`
4
- *
5
- * @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE
6
- * taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299
7
- *
8
- * @param phrase that needs interpolation, with placeholders
9
- * @param options with values that will be used to replace placeholders
10
- */
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[543],{9543:function(i,o,s){s.r(o),s.d(o,{default:function(){return c}});var t=s(9028),e=s(50),r=s(6317),n=s(5538),a=s(760),l=s(8653),p=(s(5181),"5.1.0"),h={strings:{pluginNameDropbox:"Dropbox"}};class c extends a.A{static VERSION=p;icon;provider;view;storage;files;rootFolderId=null;constructor(i,o){super(i,o),this.id=this.opts.id||"Dropbox",this.type="acquirer",this.storage=this.opts.storage||e,this.files=[],this.icon=()=>(0,t.Y)("svg",{className:"uppy-DashboardTab-iconDropbox","aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32",children:(0,t.Y)("path",{d:"M10.5 7.5L5 10.955l5.5 3.454 5.5-3.454 5.5 3.454 5.5-3.454L21.5 7.5 16 10.955zM10.5 21.319L5 17.864l5.5-3.455 5.5 3.455zM16 17.864l5.5-3.455 5.5 3.455-5.5 3.455zM16 25.925l-5.5-3.455 5.5-3.454 5.5 3.454z",fill:"currentcolor",fillRule:"nonzero"})}),this.opts.companionAllowedHosts=(0,r.A)(this.opts.companionAllowedHosts,this.opts.companionUrl),this.provider=new n.A(i,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionKeysParams:this.opts.companionKeysParams,companionCookiesRule:this.opts.companionCookiesRule,provider:"dropbox",pluginId:this.id,supportsRefreshToken:!0}),this.defaultLocale=h,this.i18nInit(),this.title=this.i18n("pluginNameDropbox"),this.render=this.render.bind(this)}install(){this.view=new l.A(this,{provider:this.provider,loadAllFiles:!0,virtualList:!0,supportsSearch:!0});const{target:i}=this.opts;i&&this.mount(i,this)}uninstall(){this.view.tearDown(),this.unmount()}render(i){return this.view.render(i)}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[558],{6558:function(A,s,i){i.r(s),i.d(s,{default:function(){return c}});var e=i(9028),a=i(50),n=i(6317),r=i(5538),t=i(760),o=i(8653),l=(i(5181),"5.1.0"),p={strings:{pluginNameInstagram:"Instagram"}};class c extends t.A{static VERSION=l;icon;provider;view;storage;files;rootFolderId="recent";constructor(A,s){super(A,s),this.type="acquirer",this.files=[],this.storage=this.opts.storage||a,this.id=this.opts.id||"Instagram",this.icon=()=>(0,e.FD)("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32",children:[(0,e.Y)("defs",{children:(0,e.Y)("path",{d:"M16.825 5l.483-.001.799.002c1.168.005 1.598.021 2.407.057 1.17.05 1.97.235 2.67.506.725.28 1.34.655 1.951 1.265.613.61.99 1.223 1.273 1.946.273.7.46 1.498.516 2.67l.025.552.008.205c.029.748.037 1.51.042 3.777l.001.846v.703l-.001.398a50.82 50.82 0 01-.058 2.588c-.05 1.17-.235 1.97-.506 2.67a5.394 5.394 0 01-1.265 1.951c-.61.613-1.222.99-1.946 1.273-.699.273-1.498.46-2.668.516-.243.012-.451.022-.656.03l-.204.007c-.719.026-1.512.034-3.676.038l-.847.001h-1.1a50.279 50.279 0 01-2.587-.059c-1.171-.05-1.971-.235-2.671-.506a5.394 5.394 0 01-1.951-1.265 5.385 5.385 0 01-1.272-1.946c-.274-.699-.46-1.498-.517-2.668a88.15 88.15 0 01-.03-.656l-.007-.205c-.026-.718-.034-1.512-.038-3.674v-2.129c.006-1.168.022-1.597.058-2.406.051-1.171.235-1.971.506-2.672a5.39 5.39 0 011.265-1.95 5.381 5.381 0 011.946-1.272c.699-.274 1.498-.462 2.669-.517l.656-.03.204-.007c.718-.026 1.511-.034 3.674-.038zm.678 1.981h-1.226l-.295.001c-2.307.005-3.016.013-3.777.043l-.21.009-.457.02c-1.072.052-1.654.232-2.042.383-.513.2-.879.44-1.263.825a3.413 3.413 0 00-.82 1.267c-.15.388-.33.97-.375 2.043a48.89 48.89 0 00-.056 2.482v.398 1.565c.006 2.937.018 3.285.073 4.444.05 1.073.231 1.654.382 2.043.2.512.44.878.825 1.263.386.383.753.621 1.267.82.388.15.97.328 2.043.374.207.01.388.017.563.024l.208.007a63.28 63.28 0 002.109.026h1.564c2.938-.006 3.286-.019 4.446-.073 1.071-.051 1.654-.232 2.04-.383.514-.2.88-.44 1.264-.825.384-.386.622-.753.82-1.266.15-.389.328-.971.375-2.044.039-.88.054-1.292.057-2.723v-1.15-.572c-.006-2.936-.019-3.284-.074-4.445-.05-1.071-.23-1.654-.382-2.04-.2-.515-.44-.88-.825-1.264a3.405 3.405 0 00-1.267-.82c-.388-.15-.97-.328-2.042-.375a48.987 48.987 0 00-2.535-.056zm-1.515 3.37a5.65 5.65 0 11.021 11.299 5.65 5.65 0 01-.02-11.3zm.004 1.982a3.667 3.667 0 10.015 7.334 3.667 3.667 0 00-.015-7.334zm5.865-3.536a1.32 1.32 0 11.005 2.64 1.32 1.32 0 01-.005-2.64z",id:"a"})}),(0,e.FD)("g",{fill:"none","fill-rule":"evenodd",children:[(0,e.Y)("mask",{id:"b",fill:"#fff",children:(0,e.Y)("use",{xlinkHref:"#a"})}),(0,e.Y)("image",{mask:"url(#b)",x:"4",y:"4",width:"24",height:"24",xlinkHref:"data:image/png;base64,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"})]})]}),this.defaultLocale=p,this.i18nInit(),this.title=this.i18n("pluginNameInstagram"),this.opts.companionAllowedHosts=(0,n.A)(this.opts.companionAllowedHosts,this.opts.companionUrl),this.provider=new r.A(A,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionKeysParams:this.opts.companionKeysParams,companionCookiesRule:this.opts.companionCookiesRule,provider:"instagram",pluginId:this.id,supportsRefreshToken:!1}),this.render=this.render.bind(this)}install(){this.view=new o.A(this,{provider:this.provider,viewType:"grid",showTitles:!1,showFilter:!1,showBreadcrumbs:!1});const{target:A}=this.opts;A&&this.mount(A,this)}uninstall(){this.view.tearDown(),this.unmount()}render(A){return this.view.render(A)}}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[6],{7301:function(e){"use strict";e.exports=function(e){if("number"!=typeof e||Number.isNaN(e))throw new TypeError("Expected a number, got "+typeof e);const t=e<0;let s=Math.abs(e);if(t&&(s=-s),0===s)return"0 B";const i=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],r=Math.min(Math.floor(Math.log(s)/Math.log(1024)),i.length-1),o=Number(s/1024**r),n=i[r];return`${o>=10||o%1==0?Math.round(o):o.toFixed(1)} ${n}`}},4967:function(e,t,s){var i="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g;e.exports=i},8942:function(e,t,s){var i=s(4967),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();e.exports=o},2784:function(e,t,s){var i=s(1580),r=s(4495),o=s(6131),n=Math.max,l=Math.min;e.exports=function(e,t,s){var a,d,u,h,c,p,g=0,f=!1,m=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function w(t){var s=a,i=d;return a=d=void 0,g=t,h=e.apply(i,s)}function F(e){var s=e-p;return void 0===p||s>=t||s<0||m&&e-g>=u}function v(){var e=r();if(F(e))return S(e);c=setTimeout(v,function(e){var s=t-(e-p);return m?l(s,u-(e-g)):s}(e))}function S(e){return c=void 0,y&&a?w(e):(a=d=void 0,h)}function b(){var e=r(),s=F(e);if(a=arguments,d=this,p=e,s){if(void 0===c)return function(e){return g=e,c=setTimeout(v,t),f?w(e):h}(p);if(m)return clearTimeout(c),c=setTimeout(v,t),w(p)}return void 0===c&&(c=setTimeout(v,t)),h}return t=o(t)||0,i(s)&&(f=!!s.leading,u=(m="maxWait"in s)?n(o(s.maxWait)||0,t):u,y="trailing"in s?!!s.trailing:y),b.cancel=function(){void 0!==c&&clearTimeout(c),g=0,a=p=d=c=void 0},b.flush=function(){return void 0===c?h:S(r())},b}},4495:function(e,t,s){var i=s(8942);e.exports=function(){return i.Date.now()}},7331:function(e,t,s){var i=s(2784),r=s(1580);e.exports=function(e,t,s){var o=!0,n=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return r(s)&&(o="leading"in s?!!s.leading:o,n="trailing"in s?!!s.trailing:n),i(e,t,{leading:o,maxWait:t,trailing:n})}},6131:function(e){e.exports=function(e){return e}},1566:function(e,t,s){var i=s(7764),r=/[\/\+\.]/;e.exports=function(e,t){function s(t){var s=i(t,e,r);return s&&s.length>=2}return t?s(t.split(";")[0]):s}},2162:function(e){e.exports=function(){var e={},t=e._fns={};return e.emit=function(e,s,i,r,o,n,l){var a=function(e){for(var s=t[e]?t[e]:[],i=e.indexOf(":"),r=-1===i?[e]:[e.substring(0,i),e.substring(i+1)],o=Object.keys(t),n=0,l=o.length;n<l;n++){var a=o[n];if("*"===a&&(s=s.concat(t[a])),2===r.length&&r[0]===a){s=s.concat(t[a]);break}}return s}(e);a.length&&function(e,t,s){for(var i=0,r=t.length;i<r&&t[i];i++)t[i].event=e,t[i].apply(t[i],s)}(e,a,[s,i,r,o,n,l])},e.on=function(e,s){t[e]||(t[e]=[]),t[e].push(s)},e.once=function(t,s){this.on(t,function i(){s.apply(this,arguments),e.off(t,i)})},e.off=function(e,t){var s=[];if(e&&t)for(var i=this._fns[e],r=0,o=i?i.length:0;r<o;r++)i[r]!==t&&s.push(i[r]);s.length?this._fns[e]=s:delete this._fns[e]},e}},7764:function(e){"use strict";function t(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}t.prototype.match=function(e){var t,s,i=!0,r=this.parts,o=r.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(s=(e||"").split(this.separator),t=0;i&&t<o;t++)"*"!==r[t]&&(i=t<s.length&&r[t]===s[t]);i=i&&s}else i=!1;else if("function"==typeof e.splice)for(i=[],t=e.length;t--;)this.match(e[t])&&(i[i.length]=e[t]);else if("object"==typeof e)for(var n in i={},e)this.match(n)&&(i[n]=e[n]);return i},e.exports=function(e,s,i){var r=new t(e,i||/[\/\.]/);return void 0!==s?r.match(s):r}},4528:function(e,t,s){"use strict";s.d(t,{A:function(){return i}});class i{#e;#t=[];constructor(e){this.#e=e}on(e,t){return this.#t.push([e,t]),this.#e.on(e,t)}remove(){for(const[e,t]of this.#t.splice(0))this.#e.off(e,t)}onFilePause(e,t){this.on("upload-pause",(s,i)=>{e===s?.id&&t(i)})}onFileRemove(e,t){this.on("file-removed",s=>{e===s.id&&t(s.id)})}onPause(e,t){this.on("upload-pause",(s,i)=>{e===s?.id&&t(i)})}onRetry(e,t){this.on("upload-retry",s=>{e===s?.id&&t()})}onRetryAll(e,t){this.on("retry-all",()=>{this.#e.getFile(e)&&t()})}onPauseAll(e,t){this.on("pause-all",()=>{this.#e.getFile(e)&&t()})}onCancelAll(e,t){this.on("cancel-all",(...s)=>{this.#e.getFile(e)&&t(...s)})}onResumeAll(e,t){this.on("resume-all",()=>{this.#e.getFile(e)&&t()})}}},8006:function(e,t,s){"use strict";s.r(t),s.d(t,{BasePlugin:function(){return i.A},EventManager:function(){return r.A},RestrictionError:function(){return c},UIPlugin:function(){return g.A},Uppy:function(){return T},debugLogger:function(){return a},default:function(){return T}});var i=s(2729),r=s(4528);function o(e){return e<10?`0${e}`:e.toString()}function n(){const e=new Date;return`${o(e.getHours())}:${o(e.getMinutes())}:${o(e.getSeconds())}`}const l={debug:()=>{},warn:()=>{},error:(...e)=>console.error(`[Uppy] [${n()}]`,...e)},a={debug:(...e)=>console.debug(`[Uppy] [${n()}]`,...e),warn:(...e)=>console.warn(`[Uppy] [${n()}]`,...e),error:(...e)=>console.error(`[Uppy] [${n()}]`,...e)};var d=s(7301),u=s(1566);const h={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class c extends Error{isUserFacing;file;constructor(e,t){super(e),this.isUserFacing=t?.isUserFacing??!0,t?.file&&(this.file=t.file)}isRestriction=!0}class p{getI18n;getOpts;constructor(e,t){this.getI18n=t,this.getOpts=()=>{const t=e();if(null!=t.restrictions?.allowedFileTypes&&!Array.isArray(t.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return t}}validateAggregateRestrictions(e,t){const{maxTotalFileSize:s,maxNumberOfFiles:i}=this.getOpts().restrictions;if(i&&e.filter(e=>!e.isGhost).length+t.length>i)throw new c(`${this.getI18n()("youCanOnlyUploadX",{smart_count:i})}`);if(s){const i=[...e,...t].reduce((e,t)=>e+(t.size??0),0);if(i>s)throw new c(this.getI18n()("aggregateExceedsSize",{sizeAllowed:d(s),size:d(i)}))}}validateSingleFile(e){const{maxFileSize:t,minFileSize:s,allowedFileTypes:i}=this.getOpts().restrictions;if(i&&!i.some(t=>t.includes("/")?!!e.type&&u(e.type.replace(/;.*?$/,""),t):!("."!==t[0]||!e.extension)&&e.extension.toLowerCase()===t.slice(1).toLowerCase())){const t=i.join(", ");throw new c(this.getI18n()("youCanOnlyUploadFileTypes",{types:t}),{file:e})}if(t&&null!=e.size&&e.size>t)throw new c(this.getI18n()("exceedsSize",{size:d(t),file:e.name??this.getI18n()("unnamed")}),{file:e});if(s&&null!=e.size&&e.size<s)throw new c(this.getI18n()("inferiorSize",{size:d(s)}),{file:e})}validate(e,t){t.forEach(e=>{this.validateSingleFile(e)}),this.validateAggregateRestrictions(e,t)}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(t&&Object.keys(e).length<t)throw new c(this.getI18n()("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new c(this.getI18n()("missingRequiredMetaFieldOnFile",{fileName:e.name??this.getI18n()("unnamed")})),{requiredMetaFields:s}=this.getOpts().restrictions,i=[];for(const t of s)Object.hasOwn(e.meta,t)&&""!==e.meta[t]||i.push(t);return{missingFields:i,error:t}}}var g=s(760),f=class{static VERSION="5.0.0";state={};#s=new Set;getState(){return this.state}setState(e){const t={...this.state},s={...this.state,...e};this.state=s,this.#i(t,s,e)}subscribe(e){return this.#s.add(e),()=>{this.#s.delete(e)}}#i(...e){this.#s.forEach(t=>{t(...e)})}},m=s(9491),y=s(7623),w=s(6506),F=s(5417),v=s(7331),S=s(2162),b=s(590),A={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},aggregateExceedsSize:"You selected %{size} of files, but maximum allowed size is %{sizeAllowed}",exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",noSearchResults:"Unfortunately, there are no results for this search",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",logIn:"Log in",pickFiles:"Pick files",pickPhotos:"Pick photos",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",loadedXFiles:"Loaded %{numFiles} files",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",resetSearch:"Reset search",emptyFolderAdded:"No files were added from empty folder",addedNumFiles:"Added %{numFiles} file(s)",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"},additionalRestrictionsFailed:"%{count} additional restrictions were not fulfilled",unnamed:"Unnamed",pleaseWait:"Please wait"}};function U(e){if(null==e&&"undefined"!=typeof navigator&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const s=t[1].split(".",2),i=parseInt(s[0],10),r=parseInt(s[1],10);return i<15||15===i&&r<15063||i>18||18===i&&r>=18218}const P={totalProgress:0,allowNewUpload:!0,error:null,recoveredState:null};class O{static VERSION="5.2.0";#r=Object.create(null);#o;#n;#l=S();#a=new Set;#d=new Set;#u=new Set;defaultLocale;locale;opts;store;i18n;i18nArray;scheduledAutoProceed=null;wasOffline=!1;constructor(e){this.defaultLocale=A;const t={id:"uppy",autoProceed:!1,allowMultipleUploadBatches:!0,debug:!1,restrictions:h,meta:{},onBeforeFileAdded:(e,t)=>!Object.hasOwn(t,e.id),onBeforeUpload:e=>e,store:new f,logger:l,infoTimeout:5e3},s={...t,...e};this.opts={...s,restrictions:{...t.restrictions,...e?.restrictions}},e?.logger&&e.debug?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"):e?.debug&&(this.opts.logger=a),this.log(`Using Core v${O.VERSION}`),this.i18nInit(),this.store=this.opts.store,this.setState({...P,plugins:{},files:{},currentUploads:{},capabilities:{uploadProgress:U(),individualCancellation:!0,resumableUploads:!1},meta:{...this.opts.meta},info:[]}),this.#o=new p(()=>this.opts,()=>this.i18n),this.#n=this.store.subscribe((e,t,s)=>{this.emit("state-update",e,t,s),this.updateAll(t)}),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),this.#h()}emit(e,...t){this.#l.emit(e,...t)}on(e,t){return this.#l.on(e,t),this}once(e,t){return this.#l.once(e,t),this}off(e,t){return this.#l.off(e,t),this}updateAll(e){this.iteratePlugins(t=>{t.update(e)})}setState(e){this.store.setState(e)}getState(){return this.store.getState()}patchFilesState(e){const t=this.getState().files;this.setState({files:{...t,...Object.fromEntries(Object.entries(e).map(([e,s])=>[e,{...t[e],...s}]))}})}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.patchFilesState({[e]:t})}i18nInit(){const e=new m.A([this.defaultLocale,this.opts.locale],{onMissingKey:e=>this.log(`Missing i18n string: ${e}`,"error")});this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e?.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(t=>{t.setOptions(e)}),this.setState(void 0)}resetProgress(){const e={percentage:0,bytesUploaded:!1,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},s=Object.create(null);Object.keys(t).forEach(i=>{s[i]={...t[i],progress:{...t[i].progress,...e},tus:void 0,transloadit:void 0}}),this.setState({files:s,...P})}clear(){const{capabilities:e,currentUploads:t}=this.getState();if(Object.keys(t).length>0&&!e.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");this.setState({...P,files:{}})}addPreProcessor(e){this.#a.add(e)}removePreProcessor(e){return this.#a.delete(e)}addPostProcessor(e){this.#u.add(e)}removePostProcessor(e){return this.#u.delete(e)}addUploader(e){this.#d.add(e)}removeUploader(e){return this.#d.delete(e)}setMeta(e){const t={...this.getState().meta,...e},s={...this.getState().files};Object.keys(s).forEach(t=>{s[t]={...s[t],meta:{...s[t].meta,...e}}}),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:s})}setFileMeta(e,t){const s={...this.getState().files};if(!s[e])return void this.log(`Was trying to set metadata for a file that has been removed: ${e}`);const i={...s[e].meta,...t};s[e]={...s[e],meta:i},this.setState({files:s})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getFilesByIds(e){return e.map(e=>this.getFile(e))}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:s}=this.getState(),i=Object.values(e),r=[],o=[],n=[],l=[],a=[],d=[],u=[],h=[],c=[];for(const e of i){const{progress:t}=e;!t.uploadComplete&&t.uploadStarted&&(r.push(e),e.isPaused||h.push(e)),t.uploadStarted||o.push(e),(t.uploadStarted||t.preprocess||t.postprocess)&&n.push(e),t.uploadStarted&&l.push(e),e.isPaused&&a.push(e),t.uploadComplete&&d.push(e),e.error&&u.push(e),(t.preprocess||t.postprocess)&&c.push(e)}return{newFiles:o,startedFiles:n,uploadStartedFiles:l,pausedFiles:a,completeFiles:d,erroredFiles:u,inProgressFiles:r,inProgressNotPausedFiles:h,processingFiles:c,isUploadStarted:l.length>0,isAllComplete:100===t&&d.length===i.length&&0===c.length,isAllErrored:!!s&&u.length===i.length,isAllPaused:0!==r.length&&a.length===r.length,isUploadInProgress:r.length>0,isSomeGhost:i.some(e=>e.isGhost)}}#c(e){for(const t of e)t.isRestriction?this.emit("restriction-failed",t.file,t):this.emit("error",t,t.file),this.log(t,"warning");const t=e.filter(e=>e.isUserFacing),s=t.slice(0,4),i=t.slice(4);s.forEach(({message:e,details:t=""})=>{this.info({message:e,details:t},"error",this.opts.infoTimeout)}),i.length>0&&this.info({message:this.i18n("additionalRestrictionsFailed",{count:i.length})})}validateRestrictions(e,t=this.getFiles()){try{this.#o.validate(t,[e])}catch(e){return e}return null}validateSingleFile(e){try{this.#o.validateSingleFile(e)}catch(e){return e.message}return null}validateAggregateRestrictions(e){const t=this.getFiles();try{this.#o.validateAggregateRestrictions(t,e)}catch(e){return e.message}return null}#p(e){const{missingFields:t,error:s}=this.#o.getMissingRequiredMetaFields(e);return t.length>0?(this.setFileState(e.id,{missingRequiredMetaFields:t,error:s.message}),this.log(s.message),this.emit("restriction-failed",e,s),!1):(0===t.length&&e.missingRequiredMetaFields&&this.setFileState(e.id,{missingRequiredMetaFields:[]}),!0)}#g(e){let t=!0;for(const s of Object.values(e))this.#p(s)||(t=!1);return t}#f(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new c(this.i18n("noMoreFilesAllowed"),{file:e});throw this.#c([t]),t}}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}#m(e){const t=e instanceof File?{name:e.name,type:e.type,size:e.size,data:e,meta:{},isRemote:!1,source:void 0,preview:void 0}:e,s=(0,y.A)(t),i=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}(s,t),r=(0,w.A)(i).extension,o=(0,F.N)(t,this.getID()),n={...t.meta,name:i,type:s},l=Number.isFinite(t.data.size)?t.data.size:null;return{source:t.source||"",id:o,name:i,extension:r||"",meta:{...this.getState().meta,...n},type:s,progress:{percentage:0,bytesUploaded:!1,bytesTotal:l,uploadComplete:!1,uploadStarted:null},size:l,isGhost:!1,...t.isRemote?{isRemote:!0,remote:t.remote,data:t.data}:{isRemote:!1,data:t.data},preview:t.preview}}#y(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(e=>{e.isRestriction||this.log(e.stack||e.message||e)})},4))}#w(e){let{files:t}=this.getState(),s={...t};const i=[],r=[];for(const o of e)try{let e=this.#m(o);this.#f(e);const r=t[e.id],n=r?.isGhost;if(n&&!e.isRemote){if(null==e.data)throw new Error("File data is missing");e={...r,isGhost:!1,data:e.data},this.log(`Replaced the blob in the restored ghost file: ${e.name}, ${e.id}`)}const l=this.opts.onBeforeFileAdded(e,s);if(t=this.getState().files,s={...t,...s},!l&&this.checkIfFileAlreadyExists(e.id))throw new c(this.i18n("noDuplicates",{fileName:e.name??this.i18n("unnamed")}),{file:e});if(!1===l&&!n)throw new c("Cannot add the file because onBeforeFileAdded returned false.",{isUserFacing:!1,file:e});"object"==typeof l&&null!==l&&(e=l),this.#o.validateSingleFile(e),s[e.id]=e,i.push(e)}catch(e){r.push(e)}try{this.#o.validateAggregateRestrictions(Object.values(t),i)}catch(e){return r.push(e),{nextFilesState:t,validFilesToAdd:[],errors:r}}return{nextFilesState:s,validFilesToAdd:i,errors:r}}addFile(e){const{nextFilesState:t,validFilesToAdd:s,errors:i}=this.#w([e]),r=i.filter(e=>e.isRestriction);if(this.#c(r),i.length>0)throw i[0];this.setState({files:t});const[o]=s;return this.emit("file-added",o),this.emit("files-added",s),this.log(`Added file: ${o.name}, ${o.id}, mime type: ${o.type}`),this.#y(),o.id}addFiles(e){const{nextFilesState:t,validFilesToAdd:s,errors:i}=this.#w(e),r=i.filter(e=>e.isRestriction);this.#c(r);const o=i.filter(e=>!e.isRestriction);if(o.length>0){let e="Multiple errors occurred while adding files:\n";if(o.forEach(t=>{e+=`\n * ${t.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:o.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(o,e);{const t=new Error(e);throw t.errors=o,t}}this.setState({files:t}),s.forEach(e=>{this.emit("file-added",e)}),this.emit("files-added",s),s.length>5?this.log(`Added batch of ${s.length} files`):Object.values(s).forEach(e=>{this.log(`Added file: ${e.name}\n id: ${e.id}\n type: ${e.type}`)}),s.length>0&&this.#y()}removeFiles(e){const{files:t,currentUploads:s}=this.getState(),i={...t},r={...s},o=Object.create(null);function n(e){return void 0===o[e]}e.forEach(e=>{t[e]&&(o[e]=t[e],delete i[e])}),Object.keys(r).forEach(e=>{const t=s[e].fileIDs.filter(n);if(0===t.length)return void delete r[e];const{capabilities:i}=this.getState();if(t.length!==s[e].fileIDs.length&&!i.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");r[e]={...s[e],fileIDs:t}});const l={currentUploads:r,files:i};0===Object.keys(i).length&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.#F();const a=Object.keys(o);a.forEach(e=>{this.emit("file-removed",o[e])}),a.length>5?this.log(`Removed ${a.length} files`):this.log(`Removed files: ${a.join(", ")}`)}removeFile(e){this.removeFiles([e])}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).progress.uploadComplete)return;const t=this.getFile(e),s=!t.isPaused;return this.setFileState(e,{isPaused:s}),this.emit("upload-pause",t,s),s}pauseAll(){const e={...this.getState().files};Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{const s={...e[t],isPaused:!0};e[t]=s}),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{const s={...e[t],isPaused:!1,error:null};e[t]=s}),this.setState({files:e}),this.emit("resume-all")}#v(){const{files:e}=this.getState();return Object.keys(e).filter(t=>{const s=e[t];return s.error&&(!s.missingRequiredMetaFields||0===s.missingRequiredMetaFields.length)})}async#S(){const e=this.#v(),t={...this.getState().files};if(e.forEach(e=>{t[e]={...t[e],isPaused:!1,error:null}}),this.setState({files:t,error:null}),this.emit("retry-all",this.getFilesByIds(e)),0===e.length)return{successful:[],failed:[]};const s=this.#b(e,{forceAllowNewUpload:!0});return this.#A(s)}async retryAll(){const e=await this.#S();return this.emit("complete",e),e}cancelAll(){this.emit("cancel-all");const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t),this.setState(P)}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",this.getFile(e));const t=this.#b([e],{forceAllowNewUpload:!0});return this.#A(t)}logout(){this.iteratePlugins(e=>{e.provider?.logout?.()})}#U=(e,t)=>{const s=e?this.getFile(e.id):void 0;if(null==e||!s)return void this.log(`Not setting progress for a file that has been removed: ${e?.id}`);if(100===s.progress.percentage)return void this.log(`Not setting progress for a file that has been already uploaded: ${e.id}`);const i={bytesTotal:t.bytesTotal,percentage:null!=t.bytesTotal&&Number.isFinite(t.bytesTotal)&&t.bytesTotal>0?Math.round(t.bytesUploaded/t.bytesTotal*100):void 0};null!=s.progress.uploadStarted?this.setFileState(e.id,{progress:{...s.progress,...i,bytesUploaded:t.bytesUploaded}}):this.setFileState(e.id,{progress:{...s.progress,...i}}),this.#F()};#P(){const e=this.#O();let t=null;null!=e&&(t=Math.round(100*e),t>100?t=100:t<0&&(t=0)),this.emit("progress",t??0),this.setState({totalProgress:t??0})}#F=v(()=>this.#P(),500,{leading:!0,trailing:!0});[Symbol.for("uppy test: updateTotalProgress")](){return this.#P()}#O(){const e=this.getFiles().filter(e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess);if(0===e.length)return 0;if(e.every(e=>e.progress.uploadComplete))return 1;const t=e=>null!=e.progress.bytesTotal&&0!==e.progress.bytesTotal,s=e.filter(t),i=e.filter(e=>!t(e));if(s.every(e=>e.progress.uploadComplete)&&i.length>0&&!i.every(e=>e.progress.uploadComplete))return null;const r=s.reduce((e,t)=>e+(t.progress.bytesTotal??0),0),o=s.reduce((e,t)=>e+(t.progress.bytesUploaded||0),0);return 0===r?0:o/r}#h(){const e=(e,t,s)=>{let i=e.message||"Unknown error";e.details&&(i+=` ${e.details}`),this.setState({error:i}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:i,response:s})};this.on("error",e),this.on("upload-error",(t,s,i)=>{if(e(s,t,i),"object"==typeof s&&s.message){this.log(s.message,"error");const e=new Error(this.i18n("failedToUpload",{file:t?.name??""}));e.isUserFacing=!0,e.details=s.message,s.details&&(e.details+=` ${s.details}`),this.#c([e])}else this.#c([s])});let t=null;this.on("upload-stalled",(e,s)=>{const{message:i}=e,r=s.map(e=>e.meta.name).join(", ");t||(this.info({message:i,details:r},"warning",this.opts.infoTimeout),t=setTimeout(()=>{t=null},this.opts.infoTimeout)),this.log(`${i} ${r}`.trim(),"warning")}),this.on("upload",()=>{this.setState({error:null})}),this.on("upload-start",e=>{const t=e.filter(e=>{const t=null!=e&&this.getFile(e.id);return t||this.log(`Not setting progress for a file that has been removed: ${e?.id}`),t}),s=Object.fromEntries(t.map(e=>[e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,bytesUploaded:0,bytesTotal:e.size}}]));this.patchFilesState(s)}),this.on("upload-progress",this.#U),this.on("upload-success",(e,t)=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e?.id}`);const s=this.getFile(e.id).progress,i=this.#u.size>0;this.setFileState(e.id,{progress:{...s,postprocess:i?{mode:"indeterminate"}:void 0,uploadComplete:!0,...!i&&{complete:!0},percentage:100,bytesUploaded:s.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||s.bytesTotal}),this.#F()}),this.on("preprocess-progress",(e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${e?.id}`)}),this.on("preprocess-complete",e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e?.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})}),this.on("postprocess-progress",(e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${e?.id}`)}),this.on("postprocess-complete",e=>{const t=e&&this.getFile(e.id);if(null==t)return void this.log(`Not setting progress for a file that has been removed: ${e?.id}`);const{postprocess:s,...i}=t.progress;this.patchFilesState({[t.id]:{progress:{...i,complete:!0}}})}),this.on("restored",()=>{this.#F()}),this.on("dashboard:file-edit-complete",e=>{e&&this.#p(e)}),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",this.#T),window.addEventListener("offline",this.#T),setTimeout(this.#T,3e3))}updateOnlineStatus(){window.navigator.onLine??1?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}#T=this.updateOnlineStatus.bind(this);getID(){return this.opts.id}use(e,...t){if("function"!=typeof e)throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`);const s=new e(this,...t),i=s.id;if(!i)throw new Error("Your plugin must have an id");if(!s.type)throw new Error("Your plugin must have a type");const r=this.getPlugin(i);if(r){const e=`Already found a plugin named '${r.id}'. Tried to use: '${i}'.\nUppy plugins must have unique \`id\` options.`;throw new Error(e)}return e.VERSION&&this.log(`Using ${i} v${e.VERSION}`),s.type in this.#r?this.#r[s.type].push(s):this.#r[s.type]=[s],s.install(),this.emit("plugin-added",s),this}getPlugin(e){for(const t of Object.values(this.#r)){const s=t.find(t=>t.id===e);if(null!=s)return s}}[Symbol.for("uppy test: getPlugins")](e){return this.#r[e]}iteratePlugins(e){Object.values(this.#r).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=this.#r[e.type],s=t.findIndex(t=>t.id===e.id);-1!==s&&t.splice(s,1);const i={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(i)}destroy(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll(),this.#n(),this.iteratePlugins(e=>{this.removePlugin(e)}),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",this.#T),window.removeEventListener("offline",this.#T))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t="info",s=3e3){const i="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:i?e.message:e,details:i?e.details:null}]}),setTimeout(()=>this.hideInfo(),s),this.emit("info-visible")}log(e,t){const{logger:s}=this.opts;switch(t){case"error":s.error(e);break;case"warning":s.warn(e);break;default:s.debug(e)}}#E=new Map;registerRequestClient(e,t){this.#E.set(e,t)}getRequestClientForFile(e){if(!("remote"in e)||!e.remote)throw new Error(`Tried to get RequestClient for a non-remote file ${e.id}`);const t=this.#E.get(e.remote.requestClientId);if(null==t)throw new Error(`requestClientId "${e.remote.requestClientId}" not registered for file "${e.id}"`);return t}async restore(e){this.log(`Core: Running restored upload "${e}"`);const t=await this.#A(e);return this.emit("complete",t),t}#b(e,t={}){const{forceAllowNewUpload:s=!1}=t,{allowNewUpload:i,currentUploads:r}=this.getState();if(!i&&!s)throw new Error("Cannot create a new upload: already uploading.");const o=(0,b.A)();return this.emit("upload",o,this.getFilesByIds(e)),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...r,[o]:{fileIDs:e,step:0,result:{}}}}),o}[Symbol.for("uppy test: createUpload")](...e){return this.#b(...e)}#R(e){const{currentUploads:t}=this.getState();return t[e]}addResultData(e,t){if(!this.#R(e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:s}=this.getState(),i={...s[e],result:{...s[e].result,...t}};this.setState({currentUploads:{...s,[e]:i}})}#I(e){const{[e]:t,...s}=this.getState().currentUploads;this.setState({currentUploads:s})}async#A(e){const t=()=>{const{currentUploads:t}=this.getState();return t[e]};let s=t();if(!s)throw new Error("Nonexistent upload");const i=[...this.#a,...this.#d,...this.#u];try{for(let r=s.step||0;r<i.length;r++){const o=i[r];this.setState({currentUploads:{...this.getState().currentUploads,[e]:{...s,step:r}}});const{fileIDs:n}=s;if(await o(n,e),s=t(),!s)break}}catch(t){throw this.#I(e),t}if(s){s.fileIDs.forEach(e=>{const t=this.getFile(e);t?.progress.postprocess&&this.emit("postprocess-complete",t)});const i=s.fileIDs.map(e=>this.getFile(e)),r=i.filter(e=>!e.error),o=i.filter(e=>e.error);this.addResultData(e,{successful:r,failed:o,uploadID:e}),s=t()}let r;return s&&(r=s.result,this.#I(e)),null==r&&(this.log(`Not setting result for an upload that has been removed: ${e}`),r={successful:[],failed:[],uploadID:e}),r}async upload(){this.#r.uploader?.length||this.log("No uploader type plugins are used","warning");let{files:e}=this.getState();if(this.#v().length>0){const t=await this.#S();if(!(this.getFiles().filter(e=>null==e.progress.uploadStarted).length>0))return this.emit("complete",t),t;({files:e}=this.getState())}const t=this.opts.onBeforeUpload(e);if(!1===t)throw new Error("Not starting the upload because onBeforeUpload returned false");t&&"object"==typeof t&&(e=t,this.setState({files:e}));try{if(this.#o.validateMinNumberOfFiles(e),!this.#g(e))throw new c(this.i18n("missingRequiredMetaField"));const{currentUploads:t}=this.getState(),s=Object.values(t).flatMap(e=>e.fileIDs),i=Object.keys(e).filter(e=>{const t=this.getFile(e);return t&&!t.progress.uploadStarted&&!s.includes(e)}),r=this.#b(i),o=await this.#A(r);return this.emit("complete",o),o}catch(e){throw this.#c([e]),e}}}var T=O},5417:function(e,t,s){"use strict";s.d(t,{N:function(){return o}});var i=s(7623);function r(e){let t="";return e.replace(/[^A-Z0-9]/gi,e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/"))+t}function o(e,t){if(function(e){return!(!e.isRemote||!e.remote)&&new Set(["box","dropbox","drive","facebook","unsplash"]).has(e.remote.provider)}(e))return e.id;const s=(0,i.A)(e);return function(e,t){let s=t||"uppy";return"string"==typeof e.name&&(s+=`-${r(e.name.toLowerCase())}`),void 0!==e.type&&(s+=`-${e.type}`),e.meta&&"string"==typeof e.meta.relativePath&&(s+=`-${r(e.meta.relativePath.toLowerCase())}`),void 0!==e.data?.size&&(s+=`-${e.data.size}`),void 0!==e.data.lastModified&&(s+=`-${e.data.lastModified}`),s}({...e,type:s},t)}},6506:function(e,t,s){"use strict";function i(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}s.d(t,{A:function(){return i}})},7623:function(e,t,s){"use strict";s.d(t,{A:function(){return o}});var i=s(6506),r=s(7544);function o(e){if(e.type)return e.type;const t=e.name?(0,i.A)(e.name).extension?.toLowerCase():null;return t&&t in r.A?r.A[t]:"application/octet-stream"}},590:function(e,t,s){"use strict";s.d(t,{A:function(){return i}});let i=(e=21)=>{let t="",s=0|e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}}}]);