@micromag/viewer-build 0.3.474 → 0.3.477

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 (47) hide show
  1. package/build/asset-manifest.json +23 -23
  2. package/build/index.html +1 -1
  3. package/build/static/js/101.370dc920.chunk.js +1 -0
  4. package/build/static/js/110.f8dfd454.chunk.js +1 -0
  5. package/build/static/js/170.d58d9899.chunk.js +1 -0
  6. package/build/static/js/269.442a4a52.chunk.js +1 -0
  7. package/build/static/js/312.b144c987.chunk.js +1 -0
  8. package/build/static/js/328.0c9a66a7.chunk.js +1 -0
  9. package/build/static/js/377.e18ec07b.chunk.js +1 -0
  10. package/build/static/js/490.5dcc394f.chunk.js +1 -0
  11. package/build/static/js/525.3e219ea4.js +2 -0
  12. package/build/static/js/544.c39f2028.chunk.js +1 -0
  13. package/build/static/js/66.c72532b7.chunk.js +2 -0
  14. package/build/static/js/763.2e34f58e.chunk.js +1 -0
  15. package/build/static/js/90.d13e94a4.chunk.js +1 -0
  16. package/build/static/js/939.60db97aa.chunk.js +1 -0
  17. package/build/static/js/96.dbeb97ca.chunk.js +2 -0
  18. package/build/static/js/972.26ea9886.chunk.js +1 -0
  19. package/build/static/js/990.797c408d.chunk.js +1 -0
  20. package/build/static/js/998.310c35e6.chunk.js +1 -0
  21. package/build/static/js/main.2ae2417b.js +2 -0
  22. package/build/static/js/runtime~main.43faca21.js +1 -0
  23. package/package.json +6 -6
  24. package/build/static/js/101.2e46a68e.chunk.js +0 -1
  25. package/build/static/js/110.97f6466e.chunk.js +0 -1
  26. package/build/static/js/170.521231d8.chunk.js +0 -1
  27. package/build/static/js/212.4dead6eb.js +0 -2
  28. package/build/static/js/269.93a0e94e.chunk.js +0 -1
  29. package/build/static/js/312.89ce3861.chunk.js +0 -1
  30. package/build/static/js/328.b8a2c3b7.chunk.js +0 -1
  31. package/build/static/js/377.c2ae2cae.chunk.js +0 -1
  32. package/build/static/js/490.afe84570.chunk.js +0 -1
  33. package/build/static/js/544.c6e33d23.chunk.js +0 -1
  34. package/build/static/js/66.e8eaa59a.chunk.js +0 -2
  35. package/build/static/js/763.7dcb377d.chunk.js +0 -1
  36. package/build/static/js/90.9c41e456.chunk.js +0 -1
  37. package/build/static/js/939.adcc064e.chunk.js +0 -1
  38. package/build/static/js/96.f15fcbb9.chunk.js +0 -2
  39. package/build/static/js/972.1828ddb5.chunk.js +0 -1
  40. package/build/static/js/990.d9598426.chunk.js +0 -1
  41. package/build/static/js/998.8b31cc77.chunk.js +0 -1
  42. package/build/static/js/main.e4f2b684.js +0 -2
  43. package/build/static/js/runtime~main.5c0faae5.js +0 -1
  44. /package/build/static/js/{212.4dead6eb.js.LICENSE.txt → 525.3e219ea4.js.LICENSE.txt} +0 -0
  45. /package/build/static/js/{66.e8eaa59a.chunk.js.LICENSE.txt → 66.c72532b7.chunk.js.LICENSE.txt} +0 -0
  46. /package/build/static/js/{96.f15fcbb9.chunk.js.LICENSE.txt → 96.dbeb97ca.chunk.js.LICENSE.txt} +0 -0
  47. /package/build/static/js/{main.e4f2b684.js.LICENSE.txt → main.2ae2417b.js.LICENSE.txt} +0 -0
@@ -1,33 +1,33 @@
1
1
  {
2
2
  "files": {
3
3
  "main.css": "/static/css/main.ed378dee.css",
4
- "main.js": "/static/js/main.e4f2b684.js",
5
- "runtime~main.js": "/static/js/runtime~main.5c0faae5.js",
6
- "static/js/377.c2ae2cae.chunk.js": "/static/js/377.c2ae2cae.chunk.js",
7
- "static/js/328.b8a2c3b7.chunk.js": "/static/js/328.b8a2c3b7.chunk.js",
8
- "static/js/101.2e46a68e.chunk.js": "/static/js/101.2e46a68e.chunk.js",
9
- "static/js/763.7dcb377d.chunk.js": "/static/js/763.7dcb377d.chunk.js",
10
- "static/js/170.521231d8.chunk.js": "/static/js/170.521231d8.chunk.js",
11
- "static/js/110.97f6466e.chunk.js": "/static/js/110.97f6466e.chunk.js",
12
- "static/js/312.89ce3861.chunk.js": "/static/js/312.89ce3861.chunk.js",
13
- "static/js/972.1828ddb5.chunk.js": "/static/js/972.1828ddb5.chunk.js",
14
- "static/js/990.d9598426.chunk.js": "/static/js/990.d9598426.chunk.js",
15
- "static/js/998.8b31cc77.chunk.js": "/static/js/998.8b31cc77.chunk.js",
16
- "static/js/66.e8eaa59a.chunk.js": "/static/js/66.e8eaa59a.chunk.js",
17
- "static/js/90.9c41e456.chunk.js": "/static/js/90.9c41e456.chunk.js",
18
- "static/js/490.afe84570.chunk.js": "/static/js/490.afe84570.chunk.js",
19
- "static/js/939.adcc064e.chunk.js": "/static/js/939.adcc064e.chunk.js",
20
- "static/js/96.f15fcbb9.chunk.js": "/static/js/96.f15fcbb9.chunk.js",
21
- "static/js/269.93a0e94e.chunk.js": "/static/js/269.93a0e94e.chunk.js",
22
- "static/js/544.c6e33d23.chunk.js": "/static/js/544.c6e33d23.chunk.js",
23
- "static/js/212.4dead6eb.js": "/static/js/212.4dead6eb.js",
4
+ "main.js": "/static/js/main.2ae2417b.js",
5
+ "runtime~main.js": "/static/js/runtime~main.43faca21.js",
6
+ "static/js/377.e18ec07b.chunk.js": "/static/js/377.e18ec07b.chunk.js",
7
+ "static/js/328.0c9a66a7.chunk.js": "/static/js/328.0c9a66a7.chunk.js",
8
+ "static/js/101.370dc920.chunk.js": "/static/js/101.370dc920.chunk.js",
9
+ "static/js/763.2e34f58e.chunk.js": "/static/js/763.2e34f58e.chunk.js",
10
+ "static/js/170.d58d9899.chunk.js": "/static/js/170.d58d9899.chunk.js",
11
+ "static/js/110.f8dfd454.chunk.js": "/static/js/110.f8dfd454.chunk.js",
12
+ "static/js/312.b144c987.chunk.js": "/static/js/312.b144c987.chunk.js",
13
+ "static/js/972.26ea9886.chunk.js": "/static/js/972.26ea9886.chunk.js",
14
+ "static/js/990.797c408d.chunk.js": "/static/js/990.797c408d.chunk.js",
15
+ "static/js/998.310c35e6.chunk.js": "/static/js/998.310c35e6.chunk.js",
16
+ "static/js/66.c72532b7.chunk.js": "/static/js/66.c72532b7.chunk.js",
17
+ "static/js/90.d13e94a4.chunk.js": "/static/js/90.d13e94a4.chunk.js",
18
+ "static/js/490.5dcc394f.chunk.js": "/static/js/490.5dcc394f.chunk.js",
19
+ "static/js/939.60db97aa.chunk.js": "/static/js/939.60db97aa.chunk.js",
20
+ "static/js/96.dbeb97ca.chunk.js": "/static/js/96.dbeb97ca.chunk.js",
21
+ "static/js/269.442a4a52.chunk.js": "/static/js/269.442a4a52.chunk.js",
22
+ "static/js/544.c39f2028.chunk.js": "/static/js/544.c39f2028.chunk.js",
23
+ "static/js/525.3e219ea4.js": "/static/js/525.3e219ea4.js",
24
24
  "static/media/png": "/static/media/f21db7431692d889.3f599fa556b406bbed82.png",
25
25
  "index.html": "/index.html"
26
26
  },
27
27
  "entrypoints": [
28
- "static/js/runtime~main.5c0faae5.js",
29
- "static/js/212.4dead6eb.js",
28
+ "static/js/runtime~main.43faca21.js",
29
+ "static/js/525.3e219ea4.js",
30
30
  "static/css/main.ed378dee.css",
31
- "static/js/main.e4f2b684.js"
31
+ "static/js/main.2ae2417b.js"
32
32
  ]
33
33
  }
package/build/index.html CHANGED
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Micromag</title><script defer="defer" src="/static/js/runtime~main.5c0faae5.js"></script><script defer="defer" src="/static/js/212.4dead6eb.js"></script><script defer="defer" src="/static/js/main.e4f2b684.js"></script><link href="/static/css/main.ed378dee.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Micromag</title><script defer="defer" src="/static/js/runtime~main.43faca21.js"></script><script defer="defer" src="/static/js/525.3e219ea4.js"></script><script defer="defer" src="/static/js/main.2ae2417b.js"></script><link href="/static/css/main.ed378dee.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[101],{36101:function(e){const o={pluralize(e){return 1===e?0:1},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"},addingMoreFiles:"Adding more files",addMore:"Add more",addMoreFiles:"Add more files",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",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",chooseFiles:"Choose files",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}",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}",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",exceedsSize:"%{file} exceeds maximum allowed size of %{size}",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 horizontal",folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"},folderAlreadyAdded:'The folder "%{folder}" was already added',generatingThumbnails:"Generating thumbnails...",import:"Import",importFiles:"Import files from:",importFrom:"Import from %{name}",inferiorSize:"This file is smaller than the allowed size of %{size}",loading:"Loading...",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",openFolderNamed:"Open folder %{name}",pause:"Pause",paused:"Paused",pauseUpload:"Pause upload",pluginNameAudio:"Audio",pluginNameBox:"Box",pluginNameCamera:"Camera",pluginNameDropbox:"Dropbox",pluginNameFacebook:"Facebook",pluginNameGoogleDrive:"Google Drive",pluginNameInstagram:"Instagram",pluginNameOneDrive:"OneDrive",pluginNameZoom:"Zoom",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",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",resume:"Resume",resumeUpload:"Resume upload",retry:"Retry",retryUpload:"Retry upload",revert:"Revert",rotate:"Rotate",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",timedOut:"Upload stalled for %{seconds} seconds, aborting.",upload:"Upload",uploadComplete:"Upload complete",uploadFailed:"Upload failed",uploading:"Uploading",uploadingXFiles:{0:"Uploading %{smart_count} file",1:"Uploading %{smart_count} files"},uploadPaused:"Upload paused",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=o),e.exports=o}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[110],{18618:function(i,e,s){var t=s(5181),n=s(95377),r=s(27372),o=s(71628);const a=s(89170);class h extends n.UIPlugin{constructor(i,e){super(i,e),this.id=this.opts.id||"Instagram",r.Provider.initPlugin(this,e),this.icon=()=>(0,t.h)("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},(0,t.h)("g",{fill:"none",fillRule:"evenodd"},(0,t.h)("rect",{className:"uppy-ProviderIconBg",fill:"#E1306C",width:"32",height:"32",rx:"16"}),(0,t.h)("path",{d:"M16 8.622c2.403 0 2.688.009 3.637.052.877.04 1.354.187 1.67.31.392.144.745.374 1.036.673.299.29.529.644.673 1.035.123.317.27.794.31 1.671.043.95.052 1.234.052 3.637s-.009 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.671a2.98 2.98 0 0 1-1.708 1.708c-.317.123-.794.27-1.671.31-.95.043-1.234.053-3.637.053s-2.688-.01-3.637-.053c-.877-.04-1.354-.187-1.671-.31a2.788 2.788 0 0 1-1.035-.673 2.788 2.788 0 0 1-.673-1.035c-.123-.317-.27-.794-.31-1.671-.043-.949-.052-1.234-.052-3.637s.009-2.688.052-3.637c.04-.877.187-1.354.31-1.67.144-.392.374-.745.673-1.036.29-.299.644-.529 1.035-.673.317-.123.794-.27 1.671-.31.95-.043 1.234-.052 3.637-.052zM16 7c-2.444 0-2.75.01-3.71.054-.959.044-1.613.196-2.185.419-.6.225-1.145.58-1.594 1.038-.458.45-.813.993-1.039 1.594-.222.572-.374 1.226-.418 2.184C7.01 13.25 7 13.556 7 16s.01 2.75.054 3.71c.044.959.196 1.613.419 2.185.226.6.58 1.145 1.038 1.594.45.458.993.813 1.594 1.038.572.223 1.227.375 2.184.419.96.044 1.267.054 3.711.054s2.75-.01 3.71-.054c.959-.044 1.613-.196 2.185-.419a4.602 4.602 0 0 0 2.632-2.632c.223-.572.375-1.226.419-2.184.044-.96.054-1.267.054-3.711s-.01-2.75-.054-3.71c-.044-.959-.196-1.613-.419-2.185A4.412 4.412 0 0 0 23.49 8.51a4.412 4.412 0 0 0-1.594-1.039c-.572-.222-1.226-.374-2.184-.418C18.75 7.01 18.444 7 16 7zm0 4.5a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9zm0 7.421a2.921 2.921 0 1 1 0-5.842 2.921 2.921 0 0 1 0 5.842zm4.875-6.671a1.125 1.125 0 1 1 0-2.25 1.125 1.125 0 0 1 0 2.25z",fill:"#FFF"}))),this.defaultLocale=a,this.i18nInit(),this.title=this.i18n("pluginNameInstagram"),this.provider=new r.Provider(i,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionKeysParams:this.opts.companionKeysParams,companionCookiesRule:this.opts.companionCookiesRule,provider:"instagram",pluginId:this.id}),this.onFirstRender=this.onFirstRender.bind(this),this.render=this.render.bind(this)}install(){this.view=new o.ProviderViews(this,{provider:this.provider,viewType:"grid",showTitles:!1,showFilter:!1,showBreadcrumbs:!1});const{target:i}=this.opts;i&&this.mount(i,this)}uninstall(){this.view.tearDown(),this.unmount()}onFirstRender(){return Promise.all([this.provider.fetchPreAuthToken(),this.view.getFolder("recent")])}render(i){return this.view.render(i)}}h.VERSION="2.1.2",i.exports=h},24110:function(i,e,s){i.exports=s(18618)},89170:function(i){i.exports={strings:{pluginNameInstagram:"Instagram"}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[170],{8668:function(i,e,t){var s=t(95377),o=t(27372),n=t(71628),r=t(5181);const h=t(14470);class l extends s.UIPlugin{constructor(i,e){super(i,e),this.id=this.opts.id||"Facebook",o.Provider.initPlugin(this,e),this.title=this.opts.title||"Facebook",this.icon=()=>(0,r.h)("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},(0,r.h)("g",{fill:"none",fillRule:"evenodd"},(0,r.h)("rect",{className:"uppy-ProviderIconBg",width:"32",height:"32",rx:"16",fill:"#3C5A99"}),(0,r.h)("path",{d:"M17.842 26v-8.667h2.653l.398-3.377h-3.051v-2.157c0-.978.248-1.644 1.527-1.644H21V7.132A19.914 19.914 0 0 0 18.623 7c-2.352 0-3.963 1.574-3.963 4.465v2.49H12v3.378h2.66V26h3.182z",fill:"#FFF",fillRule:"nonzero"}))),this.provider=new o.Provider(i,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionKeysParams:this.opts.companionKeysParams,companionCookiesRule:this.opts.companionCookiesRule,provider:"facebook",pluginId:this.id}),this.defaultLocale=h,this.i18nInit(),this.title=this.i18n("pluginNameFacebook"),this.onFirstRender=this.onFirstRender.bind(this),this.render=this.render.bind(this)}install(){this.view=new n.ProviderViews(this,{provider:this.provider});const{target:i}=this.opts;i&&this.mount(i,this)}uninstall(){this.view.tearDown(),this.unmount()}onFirstRender(){return Promise.all([this.provider.fetchPreAuthToken(),this.view.getFolder()])}render(i){const e={};return this.getPluginState().files.length&&!this.getPluginState().folders.length&&(e.viewType="grid",e.showFilter=!1,e.showTitles=!1),this.view.render(i,e)}}l.VERSION="2.0.8",i.exports=l},73170:function(i,e,t){i.exports=t(8668)},14470:function(i){i.exports={strings:{pluginNameFacebook:"Facebook"}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[269],{456:function(e){class t extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}e.exports=t},14799:function(e,t,i){var r=i(69568);const s=i(96934);e.exports=class extends s{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null}headers(){return Promise.all([super.headers(),this.getAuthToken()]).then((e=>{let[t,i]=e;const r={};return i&&(r["uppy-auth-token"]=i),this.companionKeysParams&&(r["uppy-credentials-params"]=btoa(JSON.stringify({params:this.companionKeysParams}))),{...t,...r}}))}onReceiveResponse(e){e=super.onReceiveResponse(e);const t=this.uppy.getPlugin(this.pluginId),i=t.getPluginState().authenticated?401!==e.status:e.status<400;return t.setPluginState({authenticated:i}),e}setAuthToken(e){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,e)}getAuthToken(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)}async ensurePreAuth(){if(this.companionKeysParams&&!this.preAuthToken&&(await this.fetchPreAuthToken(),!this.preAuthToken))throw new Error("Could not load authentication data required for third-party login. Please try again later.")}authUrl(e){void 0===e&&(e={});const t=new URLSearchParams(e);return this.preAuthToken&&t.set("uppyPreAuthToken",this.preAuthToken),`${this.hostname}/${this.id}/connect?${t}`}fileUrl(e){return`${this.hostname}/${this.id}/get/${e}`}async fetchPreAuthToken(){if(this.companionKeysParams)try{const e=await this.post(`${this.id}/preauth/`,{params:this.companionKeysParams});this.preAuthToken=e.token}catch(e){this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${e}`,"warning")}}list(e){return this.get(`${this.id}/list/${e||""}`)}logout(){return this.get(`${this.id}/logout`).then((e=>Promise.all([e,this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)]))).then((e=>{let[t]=e;return t}))}static initPlugin(e,t,i){if(e.type="acquirer",e.files=[],i&&(e.opts={...i,...t}),t.serverUrl||t.serverPattern)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.`");if(t.companionAllowedHosts){const i=t.companionAllowedHosts;if(!("string"==typeof i||Array.isArray(i)||i instanceof RegExp))throw new TypeError(`${e.id}: the option "companionAllowedHosts" must be one of string, Array, RegExp`);e.opts.companionAllowedHosts=i}else/^(?!https?:\/\/).*$/i.test(t.companionUrl)?e.opts.companionAllowedHosts=`https://${t.companionUrl.replace(/^\/\//,"")}`:e.opts.companionAllowedHosts=new URL(t.companionUrl).origin;e.storage=e.opts.storage||r}}},96934:function(e,t,i){let r;function s(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var n=0;function o(e){return"__private_"+n+++"_"+e}const l=i(22019),a=i(89518),h=i(456);async function c(e){if(401===e.status)throw new h;const t=e.json();if(e.status<200||e.status>300){let i=`Failed request with status: ${e.status}. ${e.statusText}`;try{const e=await t;i=e.message?`${i} message: ${e.message}`:i,i=e.requestId?`${i} request-Id: ${e.requestId}`:i}finally{throw new Error(i)}}return t}var u=o("companionHeaders"),p=o("getPostResponseFunc"),d=o("getUrl"),g=o("errorHandler");r=Symbol.for("uppy test: getCompanionHeaders");class m{constructor(e,t){Object.defineProperty(this,g,{value:f}),Object.defineProperty(this,d,{value:y}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,p,{writable:!0,value:e=>t=>e?t:this.onReceiveResponse(t)}),this.uppy=e,this.opts=t,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1,s(this,u)[u]=null==t?void 0:t.companionHeaders}setCompanionHeaders(e){s(this,u)[u]=e}[r](){return s(this,u)[u]}get hostname(){const{companion:e}=this.uppy.getState(),t=this.opts.companionUrl;return(e&&e[t]?e[t]:t).replace(/\/$/,"")}headers(){return Promise.resolve({...m.defaultHeaders,...s(this,u)[u]})}onReceiveResponse(e){const t=this.uppy.getState().companion||{},i=this.opts.companionUrl,{headers:r}=e;return r.has("i-am")&&r.get("i-am")!==t[i]&&this.uppy.setState({companion:{...t,[i]:r.get("i-am")}}),e}preflight(e){return this.preflightDone?Promise.resolve(this.allowedHeaders.slice()):fetch(s(this,d)[d](e),{method:"OPTIONS"}).then((e=>(e.headers.has("access-control-allow-headers")&&(this.allowedHeaders=e.headers.get("access-control-allow-headers").split(",").map((e=>e.trim().toLowerCase()))),this.preflightDone=!0,this.allowedHeaders.slice()))).catch((e=>(this.uppy.log(`[CompanionClient] unable to make preflight request ${e}`,"warning"),this.preflightDone=!0,this.allowedHeaders.slice())))}preflightAndHeaders(e){return Promise.all([this.preflight(e),this.headers()]).then((e=>{let[t,i]=e;return Object.keys(i).forEach((e=>{t.includes(e.toLowerCase())||(this.uppy.log(`[CompanionClient] excluding disallowed header ${e}`),delete i[e])})),i}))}get(e,t){return this.preflightAndHeaders(e).then((t=>l(s(this,d)[d](e),{method:"get",headers:t,credentials:this.opts.companionCookiesRule||"same-origin"}))).then(s(this,p)[p](t)).then(c).catch(s(this,g)[g]("get",e))}post(e,t,i){const r="post";return this.preflightAndHeaders(e).then((i=>l(s(this,d)[d](e),{method:r,headers:i,credentials:this.opts.companionCookiesRule||"same-origin",body:JSON.stringify(t)}))).then(s(this,p)[p](i)).then(c).catch(s(this,g)[g](r,e))}delete(e,t,i){const r="delete";return this.preflightAndHeaders(e).then((i=>l(`${this.hostname}/${e}`,{method:r,headers:i,credentials:this.opts.companionCookiesRule||"same-origin",body:t?JSON.stringify(t):null}))).then(s(this,p)[p](i)).then(c).catch(s(this,g)[g](r,e))}}function y(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}function f(e,t){return i=>{var r;return null!=(r=i)&&r.isAuthError||(i=new a(`Could not ${e} ${s(this,d)[d](t)}`,{cause:i})),Promise.reject(i)}}m.VERSION="2.2.2",m.defaultHeaders={Accept:"application/json","Content-Type":"application/json","Uppy-Versions":`@uppy/companion-client=${m.VERSION}`},e.exports=m},87339:function(e,t,i){const r=i(96934);e.exports=class extends r{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "),this.pluginId=this.opts.pluginId}fileUrl(e){return`${this.hostname}/search/${this.id}/get/${e}`}search(e,t){return this.get(`search/${this.id}/list?q=${encodeURIComponent(e)}${t?`&${t}`:""}`)}}},17727:function(e,t,i){let r,s;function n(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var o=0;function l(e){return"__private_"+o+++"_"+e}const a=i(2162);var h=l("queued"),c=l("emitter"),u=l("isOpen"),p=l("socket"),d=l("handleMessage");r=Symbol.for("uppy test: getSocket"),s=Symbol.for("uppy test: getQueued"),e.exports=class{constructor(e){Object.defineProperty(this,h,{writable:!0,value:[]}),Object.defineProperty(this,c,{writable:!0,value:a()}),Object.defineProperty(this,u,{writable:!0,value:!1}),Object.defineProperty(this,p,{writable:!0,value:void 0}),Object.defineProperty(this,d,{writable:!0,value:e=>{try{const t=JSON.parse(e.data);this.emit(t.action,t.payload)}catch(e){console.log(e)}}}),this.opts=e,e&&!1===e.autoOpen||this.open()}get isOpen(){return n(this,u)[u]}[r](){return n(this,p)[p]}[s](){return n(this,h)[h]}open(){n(this,p)[p]=new WebSocket(this.opts.target),n(this,p)[p].onopen=()=>{for(n(this,u)[u]=!0;n(this,h)[h].length>0&&n(this,u)[u];){const e=n(this,h)[h].shift();this.send(e.action,e.payload)}},n(this,p)[p].onclose=()=>{n(this,u)[u]=!1},n(this,p)[p].onmessage=n(this,d)[d]}close(){var e;null==(e=n(this,p)[p])||e.close()}send(e,t){n(this,u)[u]?n(this,p)[p].send(JSON.stringify({action:e,payload:t})):n(this,h)[h].push({action:e,payload:t})}on(e,t){n(this,c)[c].on(e,t)}emit(e,t){n(this,c)[c].emit(e,t)}once(e,t){n(this,c)[c].once(e,t)}}},27372:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Socket=t.SearchProvider=t.RequestClient=t.Provider=void 0;const r=i(96934);t.RequestClient=r;const s=i(14799);t.Provider=s;const n=i(87339);t.SearchProvider=n;const o=i(17727);t.Socket=o},69568:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getItem=function(e){return Promise.resolve(localStorage.getItem(e))},t.removeItem=function(e){return new Promise((t=>{localStorage.removeItem(e),t()}))},t.setItem=function(e,t){return new Promise((i=>{localStorage.setItem(e,t),i()}))}},8858:function(e,t,i){var r=i(5181);const s=e=>{const{getFolder:t,title:i,isLast:s}=e;return(0,r.h)(r.Fragment,null,(0,r.h)("button",{type:"button",className:"uppy-u-reset",onClick:t},i),s?"":" / ")};e.exports=e=>{const{getFolder:t,title:i,breadcrumbsIcon:n,directories:o}=e;return(0,r.h)("div",{className:"uppy-Provider-breadcrumbs"},(0,r.h)("div",{className:"uppy-Provider-breadcrumbsIcon"},n),o.map(((e,n)=>(0,r.h)(s,{key:e.id,getFolder:()=>t(e.id),title:0===n?i:e.title,isLast:n+1===o.length}))))}},11640:function(e,t,i){var r=i(5181);const s=i(53373),n=i(58592),o=i(79936),l=i(56686),a=i(91654);e.exports=function(e){const{currentSelection:t,folders:i,files:h,uppyFiles:c,viewType:u,headerComponent:p,showBreadcrumbs:d,isChecked:g,toggleCheckbox:m,recordShiftKeyPress:y,handleScroll:f,showTitles:v,i18n:P,validateRestrictions:w,showFilter:b,filterQuery:S,filterInput:k,getNextFolder:I,cancel:x,done:F,columns:C}=e,N=t.length;return(0,r.h)("div",{className:s("uppy-ProviderBrowser",`uppy-ProviderBrowser-viewType--${u}`)},(0,r.h)("div",{className:"uppy-ProviderBrowser-header"},(0,r.h)("div",{className:s("uppy-ProviderBrowser-headerBar",!d&&"uppy-ProviderBrowser-headerBar--simple")},p)),b&&(0,r.h)(o,{i18n:P,filterQuery:S,filterInput:k}),i.length||h.length?(0,r.h)("div",{className:"uppy-ProviderBrowser-body"},(0,r.h)("ul",{className:"uppy-ProviderBrowser-list",onScroll:f,role:"listbox",tabIndex:"-1"},i.map((e=>{var t;return a({columns:C,showTitles:v,viewType:u,i18n:P,id:e.id,title:e.name,getItemIcon:()=>e.icon,isChecked:g(e),toggleCheckbox:t=>m(t,e),recordShiftKeyPress:y,type:"folder",isDisabled:null==(t=g(e))?void 0:t.loading,isCheckboxDisabled:"shared-with-me"===e.id,handleFolderClick:()=>I(e)})})),h.map((e=>{const i=w(n(e),[...c,...t]);return a({id:e.id,title:e.name,author:e.author,getItemIcon:()=>e.icon,isChecked:g(e),toggleCheckbox:t=>m(t,e),recordShiftKeyPress:y,columns:C,showTitles:v,viewType:u,i18n:P,type:"file",isDisabled:!i.result&&!g(e),restrictionReason:i.reason})})))):(0,r.h)("div",{className:"uppy-Provider-empty"},P("noFilesFound")),N>0&&(0,r.h)(l,{selected:N,done:F,cancel:x,i18n:P}))}},43873:function(e,t,i){var r=i(5181);class s extends r.Component{componentWillUnmount(){const{onUnmount:e}=this.props;e()}render(){const{children:e}=this.props;return(0,r.toChildArray)(e)[0]}}e.exports=s},79936:function(e,t,i){var r=i(5181);class s extends r.Component{constructor(e){super(e),this.preventEnterPress=this.preventEnterPress.bind(this)}preventEnterPress(e){13===e.keyCode&&(e.stopPropagation(),e.preventDefault())}render(){const{i18n:e,filterInput:t,filterQuery:i}=this.props;return(0,r.h)("div",{className:"uppy-ProviderBrowser-filter"},(0,r.h)("input",{className:"uppy-u-reset uppy-ProviderBrowser-filterInput",type:"text",placeholder:e("filter"),"aria-label":e("filter"),onKeyUp:this.preventEnterPress,onKeyDown:this.preventEnterPress,onKeyPress:this.preventEnterPress,onInput:e=>i(e),value:t}),(0,r.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-ProviderBrowser-filterIcon",width:"12",height:"12",viewBox:"0 0 12 12"},(0,r.h)("path",{d:"M8.638 7.99l3.172 3.172a.492.492 0 1 1-.697.697L7.91 8.656a4.977 4.977 0 0 1-2.983.983C2.206 9.639 0 7.481 0 4.819 0 2.158 2.206 0 4.927 0c2.721 0 4.927 2.158 4.927 4.82a4.74 4.74 0 0 1-1.216 3.17zm-3.71.685c2.176 0 3.94-1.726 3.94-3.856 0-2.129-1.764-3.855-3.94-3.855C2.75.964.984 2.69.984 4.819c0 2.13 1.765 3.856 3.942 3.856z"})),t&&(0,r.h)("button",{className:"uppy-u-reset uppy-ProviderBrowser-filterClose",type:"button","aria-label":e("resetFilter"),title:e("resetFilter"),onClick:i},(0,r.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",viewBox:"0 0 19 19"},(0,r.h)("path",{d:"M17.318 17.232L9.94 9.854 9.586 9.5l-.354.354-7.378 7.378h.707l-.62-.62v.706L9.318 9.94l.354-.354-.354-.354L1.94 1.854v.707l.62-.62h-.706l7.378 7.378.354.354.354-.354 7.378-7.378h-.707l.622.62v-.706L9.854 9.232l-.354.354.354.354 7.378 7.378.708-.707-7.38-7.378v.708l7.38-7.38.353-.353-.353-.353-.622-.622-.353-.353-.354.352-7.378 7.38h.708L2.56 1.23 2.208.88l-.353.353-.622.62-.353.355.352.353 7.38 7.38v-.708l-7.38 7.38-.353.353.352.353.622.622.353.353.354-.353 7.38-7.38h-.708l7.38 7.38z"}))))}}e.exports=s},56686:function(e,t,i){var r=i(5181);e.exports=e=>{let{cancel:t,done:i,i18n:s,selected:n}=e;return(0,r.h)("div",{className:"uppy-ProviderBrowser-footer"},(0,r.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary",onClick:i,type:"button"},s("selectX",{smart_count:n})),(0,r.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-link",onClick:t,type:"button"},s("cancel")))}},70128:function(e,t,i){var r=i(5181);e.exports=function(e){const{className:t,isDisabled:i,restrictionReason:s,isChecked:n,title:o,itemIconEl:l,showTitles:a,toggleCheckbox:h,recordShiftKeyPress:c,id:u,children:p}=e;return(0,r.h)("li",{className:t,title:i?s:null},(0,r.h)("input",{type:"checkbox",className:`uppy-u-reset uppy-ProviderBrowserItem-checkbox ${n?"uppy-ProviderBrowserItem-checkbox--is-checked":""} uppy-ProviderBrowserItem-checkbox--grid`,onChange:h,onKeyDown:c,name:"listitem",id:u,checked:n,disabled:i,"data-uppy-super-focusable":!0}),(0,r.h)("label",{htmlFor:u,"aria-label":o,className:"uppy-u-reset uppy-ProviderBrowserItem-inner"},(0,r.h)("span",{className:"uppy-ProviderBrowserItem-inner-relative"},l,a&&o,p)))}},77941:function(e,t,i){var r=i(5181);function s(){return(0,r.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:11,height:14.5,viewBox:"0 0 44 58"},(0,r.h)("path",{d:"M27.437.517a1 1 0 0 0-.094.03H4.25C2.037.548.217 2.368.217 4.58v48.405c0 2.212 1.82 4.03 4.03 4.03H39.03c2.21 0 4.03-1.818 4.03-4.03V15.61a1 1 0 0 0-.03-.28 1 1 0 0 0 0-.093 1 1 0 0 0-.03-.032 1 1 0 0 0 0-.03 1 1 0 0 0-.032-.063 1 1 0 0 0-.03-.063 1 1 0 0 0-.032 0 1 1 0 0 0-.03-.063 1 1 0 0 0-.032-.03 1 1 0 0 0-.03-.063 1 1 0 0 0-.063-.062l-14.593-14a1 1 0 0 0-.062-.062A1 1 0 0 0 28 .708a1 1 0 0 0-.374-.157 1 1 0 0 0-.156 0 1 1 0 0 0-.03-.03l-.003-.003zM4.25 2.547h22.218v9.97c0 2.21 1.82 4.03 4.03 4.03h10.564v36.438a2.02 2.02 0 0 1-2.032 2.032H4.25c-1.13 0-2.032-.9-2.032-2.032V4.58c0-1.13.902-2.032 2.03-2.032zm24.218 1.345l10.375 9.937.75.718H30.5c-1.13 0-2.032-.9-2.032-2.03V3.89z"}))}function n(){return(0,r.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",style:{minWidth:16,marginRight:3},viewBox:"0 0 276.157 276.157"},(0,r.h)("path",{d:"M273.08 101.378c-3.3-4.65-8.86-7.32-15.254-7.32h-24.34V67.59c0-10.2-8.3-18.5-18.5-18.5h-85.322c-3.63 0-9.295-2.875-11.436-5.805l-6.386-8.735c-4.982-6.814-15.104-11.954-23.546-11.954H58.73c-9.292 0-18.638 6.608-21.737 15.372l-2.033 5.752c-.958 2.71-4.72 5.37-7.596 5.37H18.5C8.3 49.09 0 57.39 0 67.59v167.07c0 .886.16 1.73.443 2.52.152 3.306 1.18 6.424 3.053 9.064 3.3 4.652 8.86 7.32 15.255 7.32h188.487c11.395 0 23.27-8.425 27.035-19.18l40.677-116.188c2.11-6.035 1.43-12.164-1.87-16.816zM18.5 64.088h8.864c9.295 0 18.64-6.607 21.738-15.37l2.032-5.75c.96-2.712 4.722-5.373 7.597-5.373h29.565c3.63 0 9.295 2.876 11.437 5.806l6.386 8.735c4.982 6.815 15.104 11.954 23.546 11.954h85.322c1.898 0 3.5 1.602 3.5 3.5v26.47H69.34c-11.395 0-23.27 8.423-27.035 19.178L15 191.23V67.59c0-1.898 1.603-3.5 3.5-3.5zm242.29 49.15l-40.676 116.188c-1.674 4.78-7.812 9.135-12.877 9.135H18.75c-1.447 0-2.576-.372-3.02-.997-.442-.625-.422-1.814.057-3.18l40.677-116.19c1.674-4.78 7.812-9.134 12.877-9.134h188.487c1.448 0 2.577.372 3.02.997.443.625.423 1.814-.056 3.18z"}))}function o(){return(0,r.h)("svg",{"aria-hidden":"true",focusable:"false",style:{width:16,marginRight:4},viewBox:"0 0 58 58"},(0,r.h)("path",{d:"M36.537 28.156l-11-7a1.005 1.005 0 0 0-1.02-.033C24.2 21.3 24 21.635 24 22v14a1 1 0 0 0 1.537.844l11-7a1.002 1.002 0 0 0 0-1.688zM26 34.18V23.82L34.137 29 26 34.18z"}),(0,r.h)("path",{d:"M57 6H1a1 1 0 0 0-1 1v44a1 1 0 0 0 1 1h56a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1zM10 28H2v-9h8v9zm-8 2h8v9H2v-9zm10 10V8h34v42H12V40zm44-12h-8v-9h8v9zm-8 2h8v9h-8v-9zm8-22v9h-8V8h8zM2 8h8v9H2V8zm0 42v-9h8v9H2zm54 0h-8v-9h8v9z"}))}e.exports=e=>{const{itemIconString:t}=e;if(null!==t)switch(t){case"file":return(0,r.h)(s,null);case"folder":return(0,r.h)(n,null);case"video":return(0,r.h)(o,null);default:{const{alt:i}=e;return(0,r.h)("img",{src:t,alt:i})}}}},94504:function(e,t,i){var r=i(5181);e.exports=function(e){const{className:t,isDisabled:i,restrictionReason:s,isCheckboxDisabled:n,isChecked:o,toggleCheckbox:l,recordShiftKeyPress:a,type:h,id:c,itemIconEl:u,title:p,handleFolderClick:d,showTitles:g,i18n:m}=e;return(0,r.h)("li",{className:t,title:i?s:null},n?null:(0,r.h)("input",{type:"checkbox",className:"uppy-u-reset uppy-ProviderBrowserItem-checkbox "+(o?"uppy-ProviderBrowserItem-checkbox--is-checked":""),onChange:l,onKeyDown:a,name:"listitem",id:c,checked:o,"aria-label":"file"===h?null:m("allFilesFromFolderNamed",{name:p}),disabled:i,"data-uppy-super-focusable":!0}),"file"===h?(0,r.h)("label",{htmlFor:c,className:"uppy-u-reset uppy-ProviderBrowserItem-inner"},(0,r.h)("div",{className:"uppy-ProviderBrowserItem-iconWrap"},u),g&&p):(0,r.h)("button",{type:"button",className:"uppy-u-reset uppy-ProviderBrowserItem-inner",onClick:d,"aria-label":m("openFolderNamed",{name:p})},(0,r.h)("div",{className:"uppy-ProviderBrowserItem-iconWrap"},u),g&&(0,r.h)("span",null,p)))}},91654:function(e,t,i){var r=i(5181);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},s.apply(this,arguments)}const n=i(53373),o=i(77941),l=i(70128),a=i(94504);e.exports=e=>{const{author:t,getItemIcon:i,isChecked:h,isDisabled:c,viewType:u}=e,p=i(),d=n("uppy-ProviderBrowserItem",{"uppy-ProviderBrowserItem--selected":h},{"uppy-ProviderBrowserItem--disabled":c},{"uppy-ProviderBrowserItem--noPreview":"video"===p}),g=(0,r.h)(o,{itemIconString:p});switch(u){case"grid":return(0,r.h)(l,s({},e,{className:d,itemIconEl:g}));case"list":return(0,r.h)(a,s({},e,{className:d,itemIconEl:g}));case"unsplash":return(0,r.h)(l,s({},e,{className:d,itemIconEl:g}),(0,r.h)("a",{href:`${t.url}?utm_source=Companion&utm_medium=referral`,target:"_blank",rel:"noopener noreferrer",className:"uppy-ProviderBrowserItem-author"},t.name));default:throw new Error(`There is no such type ${u}`)}}},49649:function(e,t,i){var r=i(5181);e.exports=e=>{let{i18n:t}=e;return(0,r.h)("div",{className:"uppy-Provider-loading"},(0,r.h)("span",null,t("loading")))}},13946:function(e,t,i){var r=i(5181);function s(){return(0,r.h)("svg",{width:"26",height:"26",viewBox:"0 0 26 26",xmlns:"http://www.w3.org/2000/svg"},(0,r.h)("g",{fill:"none","fill-rule":"evenodd"},(0,r.h)("circle",{fill:"#FFF",cx:"13",cy:"13",r:"13"}),(0,r.h)("path",{d:"M21.64 13.205c0-.639-.057-1.252-.164-1.841H13v3.481h4.844a4.14 4.14 0 01-1.796 2.716v2.259h2.908c1.702-1.567 2.684-3.875 2.684-6.615z",fill:"#4285F4","fill-rule":"nonzero"}),(0,r.h)("path",{d:"M13 22c2.43 0 4.467-.806 5.956-2.18l-2.908-2.259c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H4.957v2.332A8.997 8.997 0 0013 22z",fill:"#34A853","fill-rule":"nonzero"}),(0,r.h)("path",{d:"M7.964 14.71A5.41 5.41 0 017.682 13c0-.593.102-1.17.282-1.71V8.958H4.957A8.996 8.996 0 004 13c0 1.452.348 2.827.957 4.042l3.007-2.332z",fill:"#FBBC05","fill-rule":"nonzero"}),(0,r.h)("path",{d:"M13 7.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C17.463 4.891 15.426 4 13 4a8.997 8.997 0 00-8.043 4.958l3.007 2.332C8.672 9.163 10.656 7.58 13 7.58z",fill:"#EA4335","fill-rule":"nonzero"}),(0,r.h)("path",{d:"M4 4h18v18H4z"})))}e.exports=function(e){const{pluginName:t,pluginIcon:i,i18nArray:n,handleAuth:o}=e,l="Google Drive"===t,a=(0,r.h)("span",{className:"uppy-Provider-authTitleName"},t,(0,r.h)("br",null));return(0,r.h)("div",{className:"uppy-Provider-auth"},(0,r.h)("div",{className:"uppy-Provider-authIcon"},i()),(0,r.h)("div",{className:"uppy-Provider-authTitle"},n("authenticateWithTitle",{pluginName:a})),l?(0,r.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn uppy-Provider-btn-google",onClick:o,"data-uppy-super-focusable":!0},(0,r.h)(s,null),n("signInWithGoogle")):(0,r.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn",onClick:o,"data-uppy-super-focusable":!0},n("authenticateWith",{pluginName:t})))}},88728:function(e,t,i){const r=i(51254),s=i(8858);e.exports=e=>{const t=[];return e.showBreadcrumbs&&t.push(s({getFolder:e.getFolder,directories:e.directories,breadcrumbsIcon:e.pluginIcon&&e.pluginIcon(),title:e.title})),t.push(r({logout:e.logout,username:e.username,i18n:e.i18n})),t}},42149:function(e,t,i){var r=i(5181);function s(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var n=0;function o(e){return"__private_"+n+++"_"+e}const l=i(13946),a=i(88728),h=i(11640),c=i(49649),u=i(43873),p=i(57683);function d(e){return"string"==typeof e?new RegExp(`^${e}$`):e instanceof RegExp?e:void 0}var g=o("updateFilesAndFolders");class m extends p{constructor(e,t){super(e,t),Object.defineProperty(this,g,{value:y}),this.opts={viewType:"list",showTitles:!0,showFilter:!0,showBreadcrumbs:!0,...t},this.filterQuery=this.filterQuery.bind(this),this.getFolder=this.getFolder.bind(this),this.getNextFolder=this.getNextFolder.bind(this),this.logout=this.logout.bind(this),this.handleAuth=this.handleAuth.bind(this),this.handleScroll=this.handleScroll.bind(this),this.listAllFiles=this.listAllFiles.bind(this),this.donePicking=this.donePicking.bind(this),this.render=this.render.bind(this),this.plugin.setPluginState({authenticated:!1,files:[],folders:[],directories:[],filterInput:"",isSearchVisible:!1,currentSelection:[]})}tearDown(){}getFolder(e,t){return this.sharedHandler.loaderWrapper(this.provider.list(e),(i=>{let r;const n=this.plugin.getPluginState(),o=n.directories.findIndex((t=>e===t.id));r=-1!==o?n.directories.slice(0,o+1):n.directories.concat([{id:e,title:t}]),this.username=i.username||this.username,s(this,g)[g](i,[],[]),this.plugin.setPluginState({directories:r})}),this.handleError)}getNextFolder(e){this.getFolder(e.requestPath,e.name),this.lastCheckbox=void 0}logout(){this.provider.logout().then((e=>{if(e.ok){if(!e.revoked){const t=this.plugin.uppy.i18n("companionUnauthorizeHint",{provider:this.plugin.title,url:e.manual_revoke_url});this.plugin.uppy.info(t,"info",7e3)}const t={authenticated:!1,files:[],folders:[],directories:[]};this.plugin.setPluginState(t)}})).catch(this.handleError)}filterQuery(e){const t=this.plugin.getPluginState();this.plugin.setPluginState({...t,filterInput:e?e.target.value:""})}addFolder(e){const t=this.providerFileToId(e),i={...this.plugin.getPluginState().selectedFolders};if(!(t in i)||!i[t].loading)return i[t]={loading:!0,files:[]},this.plugin.setPluginState({selectedFolders:{...i}}),this.listAllFiles(e.requestPath).then((r=>{let s=0;r.forEach((e=>{const t=this.providerFileToId(e);this.plugin.uppy.checkIfFileAlreadyExists(t)||s++})),s>0&&r.forEach((e=>this.addFile(e)));const n=r.map(this.providerFileToId);let o;i[t]={loading:!1,files:n},this.plugin.setPluginState({selectedFolders:i}),o=0===s?this.plugin.uppy.i18n("folderAlreadyAdded",{folder:e.name}):r.length?this.plugin.uppy.i18n("folderAdded",{smart_count:s,folder:e.name}):this.plugin.uppy.i18n("emptyFolderAdded"),this.plugin.uppy.info(o)})).catch((e=>{const i={...this.plugin.getPluginState().selectedFolders};delete i[t],this.plugin.setPluginState({selectedFolders:i}),this.handleError(e)}))}async handleAuth(){await this.provider.ensurePreAuth();const e=btoa(JSON.stringify({origin:location.origin})),t=`@uppy/provider-views=${m.VERSION}`,i=this.provider.authUrl({state:e,uppyVersions:t}),r=window.open(i,"_blank"),s=e=>{if(e.source!==r)return void this.plugin.uppy.log("rejecting event from unknown source");var t,i;t=e.origin,i=this.plugin.opts.companionAllowedHosts,(Array.isArray(i)?i.map(d):[d(i)]).some((e=>(null==e?void 0:e.test(t))||(null==e?void 0:e.test(`${t}/`))))&&e.source===r||this.plugin.uppy.log(`rejecting event from ${e.origin} vs allowed pattern ${this.plugin.opts.companionAllowedHosts}`);const n="string"==typeof e.data?JSON.parse(e.data):e.data;if(n.error){this.plugin.uppy.log("auth aborted","warning");const{uppy:e}=this.plugin,t=e.i18n("authAborted");e.info({message:t},"warning",5e3)}else n.token?(r.close(),window.removeEventListener("message",s),this.provider.setAuthToken(n.token),this.preFirstRender()):this.plugin.uppy.log("did not receive token from auth window","error")};window.addEventListener("message",s)}async handleScroll(e){const t=this.nextPagePath||null;if(this.shouldHandleScroll(e)&&t){this.isHandlingScroll=!0;try{const e=await this.provider.list(t),{files:i,folders:r}=this.plugin.getPluginState();s(this,g)[g](e,i,r)}catch(e){this.handleError(e)}finally{this.isHandlingScroll=!1}}}async listAllFiles(e,t){void 0===t&&(t=null),t=t||[];const i=await this.provider.list(e);i.items.forEach((e=>{e.isFolder?this.addFolder(e):t.push(e)}));const r=i.nextPagePath;return r?this.listAllFiles(r,t):t}donePicking(){const{currentSelection:e}=this.plugin.getPluginState(),t=e.map((e=>e.isFolder?this.addFolder(e):this.addFile(e)));this.sharedHandler.loaderWrapper(Promise.all(t),(()=>{this.clearSelection()}),(()=>{}))}render(e,t){var i=this;void 0===t&&(t={});const{authenticated:s,didFirstRender:n}=this.plugin.getPluginState();n||this.preFirstRender();const o={...this.opts,...t},{files:p,folders:d,filterInput:g,loading:m,currentSelection:y}=this.plugin.getPluginState(),{isChecked:f,toggleCheckbox:v,recordShiftKeyPress:P,filterItems:w}=this.sharedHandler,b=""!==g,S={showBreadcrumbs:o.showBreadcrumbs,getFolder:this.getFolder,directories:this.plugin.getPluginState().directories,pluginIcon:this.plugin.icon,title:this.plugin.title,logout:this.logout,username:this.username,i18n:this.plugin.uppy.i18n},k={isChecked:f,toggleCheckbox:v,recordShiftKeyPress:P,currentSelection:y,files:b?w(p):p,folders:b?w(d):d,username:this.username,getNextFolder:this.getNextFolder,getFolder:this.getFolder,filterItems:this.sharedHandler.filterItems,filterQuery:this.filterQuery,logout:this.logout,handleScroll:this.handleScroll,listAllFiles:this.listAllFiles,done:this.donePicking,cancel:this.cancelPicking,headerComponent:a(S),title:this.plugin.title,viewType:o.viewType,showTitles:o.showTitles,showFilter:o.showFilter,showBreadcrumbs:o.showBreadcrumbs,pluginIcon:this.plugin.icon,i18n:this.plugin.uppy.i18n,uppyFiles:this.plugin.uppy.getFiles(),validateRestrictions:function(){return i.plugin.uppy.validateRestrictions(...arguments)}};return m?(0,r.h)(u,{onUnmount:this.clearSelection},(0,r.h)(c,{i18n:this.plugin.uppy.i18n})):s?(0,r.h)(u,{onUnmount:this.clearSelection},(0,r.h)(h,k)):(0,r.h)(u,{onUnmount:this.clearSelection},(0,r.h)(l,{pluginName:this.plugin.title,pluginIcon:this.plugin.icon,handleAuth:this.handleAuth,i18n:this.plugin.uppy.i18n,i18nArray:this.plugin.uppy.i18nArray}))}}function y(e,t,i){this.nextPagePath=e.nextPagePath,e.items.forEach((e=>{e.isFolder?i.push(e):t.push(e)})),this.plugin.setPluginState({folders:i,files:t})}m.VERSION="2.1.3",e.exports=m},51254:function(e,t,i){var r=i(5181);e.exports=e=>{let{i18n:t,logout:i,username:s}=e;return[(0,r.h)("span",{className:"uppy-ProviderBrowser-user",key:"username"},s),(0,r.h)("button",{type:"button",onClick:i,className:"uppy-u-reset uppy-ProviderBrowser-userLogout",key:"logout"},t("logOut"))]}},3601:function(e,t,i){e.exports=i(42149)},97268:function(e,t,i){var r=i(5181);e.exports=e=>{const{searchTerm:t,i18n:i,search:s}=e;return(0,r.h)("div",{class:"uppy-ProviderBrowser-search"},(0,r.h)("input",{class:"uppy-u-reset uppy-ProviderBrowser-searchInput",type:"text",placeholder:i("search"),"aria-label":i("search"),value:t,onKeyUp:e=>{13===e.keyCode&&(e.stopPropagation(),e.preventDefault(),s(e.target.value))},"data-uppy-super-focusable":!0}),(0,r.h)("svg",{"aria-hidden":"true",focusable:"false",class:"uppy-c-icon uppy-ProviderBrowser-searchIcon",width:"12",height:"12",viewBox:"0 0 12 12"},(0,r.h)("path",{d:"M8.638 7.99l3.172 3.172a.492.492 0 1 1-.697.697L7.91 8.656a4.977 4.977 0 0 1-2.983.983C2.206 9.639 0 7.481 0 4.819 0 2.158 2.206 0 4.927 0c2.721 0 4.927 2.158 4.927 4.82a4.74 4.74 0 0 1-1.216 3.17zm-3.71.685c2.176 0 3.94-1.726 3.94-3.856 0-2.129-1.764-3.855-3.94-3.855C2.75.964.984 2.69.984 4.819c0 2.13 1.765 3.856 3.942 3.856z"})))}},1864:function(e,t,i){var r=i(5181);e.exports=e=>{let t,{i18n:i,search:s}=e;const n=()=>{t.value&&s(t.value)};return(0,r.h)("div",{className:"uppy-SearchProvider"},(0,r.h)("input",{className:"uppy-u-reset uppy-c-textInput uppy-SearchProvider-input",type:"search","aria-label":i("enterTextToSearch"),placeholder:i("enterTextToSearch"),onKeyUp:e=>{13===e.keyCode&&n()},ref:e=>{t=e},"data-uppy-super-focusable":!0}),(0,r.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-SearchProvider-searchButton",type:"button",onClick:n},i("searchImages")))}},89689:function(e,t,i){var r=i(5181);function s(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var n=0;function o(e){return"__private_"+n+++"_"+e}const l=i(1864),a=i(11640),h=i(49649),c=i(97268),u=i(43873),p=i(57683);var d=o("updateFilesAndInputMode");class g extends p{constructor(e,t){super(e,t),Object.defineProperty(this,d,{value:m}),this.opts={viewType:"grid",showTitles:!1,showFilter:!1,showBreadcrumbs:!1,...t},this.search=this.search.bind(this),this.triggerSearchInput=this.triggerSearchInput.bind(this),this.addFile=this.addFile.bind(this),this.handleScroll=this.handleScroll.bind(this),this.donePicking=this.donePicking.bind(this),this.render=this.render.bind(this),this.plugin.setPluginState({isInputMode:!0,files:[],folders:[],directories:[],filterInput:"",currentSelection:[],searchTerm:null})}tearDown(){}clearSelection(){this.plugin.setPluginState({currentSelection:[],isInputMode:!0,files:[],searchTerm:null})}search(e){const{searchTerm:t}=this.plugin.getPluginState();if(!e||e!==t)return this.sharedHandler.loaderWrapper(this.provider.search(e),(e=>{s(this,d)[d](e,[])}),this.handleError)}triggerSearchInput(){this.plugin.setPluginState({isInputMode:!0})}async handleScroll(e){const t=this.nextPageQuery||null;if(this.shouldHandleScroll(e)&&t){this.isHandlingScroll=!0;try{const{files:e,searchTerm:i}=this.plugin.getPluginState(),r=await this.provider.search(i,t);s(this,d)[d](r,e)}catch(e){this.handleError(e)}finally{this.isHandlingScroll=!1}}}donePicking(){const{currentSelection:e}=this.plugin.getPluginState(),t=e.map((e=>this.addFile(e)));this.sharedHandler.loaderWrapper(Promise.all(t),(()=>{this.clearSelection()}),(()=>{}))}render(e,t){var i=this;void 0===t&&(t={});const{didFirstRender:s,isInputMode:n,searchTerm:o}=this.plugin.getPluginState();s||this.preFirstRender();const p={...this.opts,...t},{files:d,folders:g,filterInput:m,loading:y,currentSelection:f}=this.plugin.getPluginState(),{isChecked:v,toggleCheckbox:P,filterItems:w}=this.sharedHandler,b=""!==m,S={isChecked:v,toggleCheckbox:P,currentSelection:f,files:b?w(d):d,folders:b?w(g):g,handleScroll:this.handleScroll,done:this.donePicking,cancel:this.cancelPicking,headerComponent:c({search:this.search,i18n:this.plugin.uppy.i18n,searchTerm:o}),title:this.plugin.title,viewType:p.viewType,showTitles:p.showTitles,showFilter:p.showFilter,showBreadcrumbs:p.showBreadcrumbs,pluginIcon:this.plugin.icon,i18n:this.plugin.uppy.i18n,uppyFiles:this.plugin.uppy.getFiles(),validateRestrictions:function(){return i.plugin.uppy.validateRestrictions(...arguments)}};return y?(0,r.h)(u,{onUnmount:this.clearSelection},(0,r.h)(h,{i18n:this.plugin.uppy.i18n})):n?(0,r.h)(u,{onUnmount:this.clearSelection},(0,r.h)(l,{search:this.search,i18n:this.plugin.uppy.i18n})):(0,r.h)(u,{onUnmount:this.clearSelection},(0,r.h)(a,S))}}function m(e,t){this.nextPageQuery=e.nextPageQuery,e.items.forEach((e=>{t.push(e)})),this.plugin.setPluginState({isInputMode:!1,files:t,searchTerm:e.searchedFor})}g.VERSION="2.1.3",e.exports=g},90197:function(e,t,i){e.exports=i(89689)},33843:function(e,t,i){const r=i(58592);e.exports=class{constructor(e){this.plugin=e,this.filterItems=this.filterItems.bind(this),this.toggleCheckbox=this.toggleCheckbox.bind(this),this.recordShiftKeyPress=this.recordShiftKeyPress.bind(this),this.isChecked=this.isChecked.bind(this),this.loaderWrapper=this.loaderWrapper.bind(this)}filterItems(e){const t=this.plugin.getPluginState();return t.filterInput&&""!==t.filterInput?e.filter((e=>-1!==e.name.toLowerCase().indexOf(t.filterInput.toLowerCase()))):e}recordShiftKeyPress(e){this.isShiftKeyPressed=e.shiftKey}toggleCheckbox(e,t){e.stopPropagation(),e.preventDefault(),e.currentTarget.focus();const{folders:i,files:s}=this.plugin.getPluginState(),n=this.filterItems(i.concat(s));if(this.lastCheckbox&&this.isShiftKeyPressed){const e=n.indexOf(this.lastCheckbox),i=n.indexOf(t),s=e<i?n.slice(e,i+1):n.slice(i,e+1),o=[];for(const e of s){const{uppy:t}=this.plugin,i=t.validateRestrictions(r(e),[...t.getFiles(),...o]);i.result?o.push(e):t.info({message:i.reason},"error",t.opts.infoTimeout)}return void this.plugin.setPluginState({currentSelection:o})}this.lastCheckbox=t;const{currentSelection:o}=this.plugin.getPluginState();this.isChecked(t)?this.plugin.setPluginState({currentSelection:o.filter((e=>e.id!==t.id))}):this.plugin.setPluginState({currentSelection:o.concat([t])})}isChecked(e){const{currentSelection:t}=this.plugin.getPluginState();return t.some((t=>t.id===e.id))}loaderWrapper(e,t,i){e.then((e=>{this.plugin.setPluginState({loading:!1}),t(e)})).catch((e=>{this.plugin.setPluginState({loading:!1}),i(e)})),this.plugin.setPluginState({loading:!0})}}},57683:function(e,t,i){const r=i(95569),s=i(30537),n=i(6063),o=i(33843);e.exports=class{constructor(e,t){this.plugin=e,this.provider=t.provider,this.sharedHandler=new o(e),this.isHandlingScroll=!1,this.preFirstRender=this.preFirstRender.bind(this),this.handleError=this.handleError.bind(this),this.addFile=this.addFile.bind(this),this.clearSelection=this.clearSelection.bind(this),this.cancelPicking=this.cancelPicking.bind(this)}providerFileToId(e){return n({data:e,name:e.name||e.id,type:e.mimetype})}preFirstRender(){this.plugin.setPluginState({didFirstRender:!0}),this.plugin.onFirstRender()}shouldHandleScroll(e){const{scrollHeight:t,scrollTop:i,offsetHeight:r}=e.target;return t-(i+r)<50&&!this.isHandlingScroll}clearSelection(){this.plugin.setPluginState({currentSelection:[]})}cancelPicking(){this.clearSelection();const e=this.plugin.uppy.getPlugin("Dashboard");e&&e.hideAllPanels()}handleError(e){const{uppy:t}=this.plugin,i=t.i18n("companionError");t.log(e.toString()),e.isAuthError||t.info({message:i,details:e.toString()},"error",5e3)}addFile(e){const t={id:this.providerFileToId(e),source:this.plugin.id,data:e,name:e.name||e.id,type:e.mimeType,isRemote:!0,meta:{},body:{fileId:e.id},remote:{companionUrl:this.plugin.opts.companionUrl,url:`${this.provider.fileUrl(e.requestPath)}`,body:{fileId:e.id},providerOptions:this.provider.opts,providerName:this.provider.name}},i=r(t);i&&s(i)&&(t.preview=e.thumbnail),e.author&&(null!=e.author.name&&(t.meta.authorName=String(e.author.name)),e.author.url&&(t.meta.authorUrl=e.author.url)),this.plugin.uppy.log("Adding remote file");try{return this.plugin.uppy.addFile(t),!0}catch(e){return e.isRestriction||this.plugin.uppy.log(e),!1}}}},71628:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SearchProviderViews=t.ProviderViews=void 0;const r=i(3601);t.ProviderViews=r;const s=i(90197);t.SearchProviderViews=s},89518:function(e,t,i){const r=i(80766);class s extends Error{constructor(e,t){void 0===t&&(t={}),super(e),this.cause=t.cause,this.cause&&r(this.cause,"isNetworkError")&&(this.isNetworkError=this.cause.isNetworkError)}}e.exports=s},65891:function(e){class t extends Error{constructor(e,t){void 0===t&&(t=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=e,this.isNetworkError=!0,this.request=t}}e.exports=t},22019:function(e,t,i){const r=i(65891);e.exports=function(){return fetch(...arguments).catch((e=>{throw"AbortError"===e.name?e:new r(e)}))}},30537:function(e){e.exports=function(e){return!!e&&/^[^/]+\/(jpe?g|gif|png|svg|svg\+xml|bmp|webp|avif)$/.test(e)}},58592:function(e,t,i){const r=i(67476);e.exports=function(e){return{...e,type:e.mimeType,extension:e.name?r(e.name).extension:null}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[312],{5318:function(i,e,t){var o=t(95377),s=t(27372),r=t(71628),n=t(5181);const h=t(52196);class l extends o.UIPlugin{constructor(i,e){super(i,e),this.id=this.opts.id||"Dropbox",s.Provider.initPlugin(this,e),this.title=this.opts.title||"Dropbox",this.icon=()=>(0,n.h)("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},(0,n.h)("g",{fill:"none",fillRule:"evenodd"},(0,n.h)("rect",{className:"uppy-ProviderIconBg",fill:"#0D2481",width:"32",height:"32",rx:"16"}),(0,n.h)("path",{d:"M11 8l5 3.185-5 3.186-5-3.186L11 8zm10 0l5 3.185-5 3.186-5-3.186L21 8zM6 17.556l5-3.185 5 3.185-5 3.186-5-3.186zm15-3.185l5 3.185-5 3.186-5-3.186 5-3.185zm-10 7.432l5-3.185 5 3.185-5 3.186-5-3.186z",fill:"#FFF",fillRule:"nonzero"}))),this.provider=new s.Provider(i,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionKeysParams:this.opts.companionKeysParams,companionCookiesRule:this.opts.companionCookiesRule,provider:"dropbox",pluginId:this.id}),this.defaultLocale=h,this.i18nInit(),this.title=this.i18n("pluginNameDropbox"),this.onFirstRender=this.onFirstRender.bind(this),this.render=this.render.bind(this)}install(){this.view=new r.ProviderViews(this,{provider:this.provider});const{target:i}=this.opts;i&&this.mount(i,this)}uninstall(){this.view.tearDown(),this.unmount()}onFirstRender(){return Promise.all([this.provider.fetchPreAuthToken(),this.view.getFolder()])}render(i){return this.view.render(i)}}l.VERSION="2.0.8",i.exports=l},5312:function(i,e,t){i.exports=t(5318)},52196:function(i){i.exports={strings:{pluginNameDropbox:"Dropbox"}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[328],{39328:function(e){const r={pluralize(e){return 1===e?0:1},strings:{addBulkFilesFailed:{0:"L'ajout de %{smart_count} fichier a échoué",1:"L'ajout de %{smart_count} fichiers a échoué"},addMore:"Ajouter d'autres",addMoreFiles:"Ajouter d'autres fichiers",addingMoreFiles:"En train d'ajouter des fichiers",allFilesFromFolderNamed:"Tous les fichiers du dossier %{name}",allowAccessDescription:"Pour prendre des photos ou enregistrer une vidéo avec votre caméra, veuillez autoriser l'accès à votre caméra pour ce site.",allowAccessTitle:"Veuillez autoriser l'accès à votre caméra",authAborted:"Authentification interrompue",authenticateWith:"Se connecter à %{pluginName}",authenticateWithTitle:"Veuillez vous authentifier avec %{pluginName} pour sélectionner les fichiers",back:"Retour",browse:"naviguer",browseFiles:"naviguer",cancel:"Annuler",cancelUpload:"Annuler téléchargement",chooseFiles:"Choisir des fichiers",closeModal:"Fermer 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 lien",copyLinkToClipboardFallback:"Copier le lien ci-dessous",copyLinkToClipboardSuccess:"Lien copié",creatingAssembly:"Préparation du téléchargement...",creatingAssemblyFailed:"Transloadit: Impossible de créer Assembly",dashboardTitle:"Téléchargeur de fichier",dashboardWindowTitle:"Fenêtre de téléchargeur de fichier (Appuyez sur echap pour fermer)",dataUploadedOfTotal:"%{complete} sur %{total}",done:"Terminé",dropHereOr:"Déposer les fichiers ici ou %{browse}",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",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",enterUrlToImport:"Entrez le lien pour importer un fichier",exceedsSize:"Ce fichier 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échargement de %{file} a échoué",fileSource:"Fichier source: %{name}",filesUploadedOfTotal:{0:"%{complete} sur %{smart_count} fichier téléchargé",1:"%{complete} sur %{smart_count} fichiers téléchargés",2:"%{complete} sur %{smart_count} fichiers téléchargés"},filter:"Filtrer",finishEditingFile:"Terminer l'édition du fichier",folderAdded:{0:"%{smart_count} fichier ajouté de %{folder}",1:"%{smart_count} fichiers ajoutés de %{folder}",2:"%{smart_count} fichiers ajoutés de %{folder}"},generatingThumbnails:"Generating thumbnails...",import:"Importer",importFrom:"Importer de %{name}",loading:"Chargement...",logOut:"Déconnexion",micDisabled:"Accès au micro refusé par l'utilisateur",myDevice:"Mon Appareil",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 ",openFolderNamed:"Ouvrir %{name}",pause:"Pause",pauseUpload:"Mettre en pause le téléchargement",paused:"En pause",poweredBy:"Propulsé par %{uppy}",processingXFiles:{0:"Traitement de %{smart_count} fichier",1:"Traitement de %{smart_count} fichiers",2:"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",removeFile:"Effacer le fichier %{file}",resetFilter:"Réinitialiser filtre",resume:"Reprendre",resumeUpload:"Reprendre le téléchargement",retry:"Réessayer",retryUpload:"Réessayer le téléchargement",save:"Sauvegarder",saveChanges:"Sauvegarder les modifications",selectFileNamed:"Sélectionner le fichier %{name}",selectX:{0:"Sélectionner %{smart_count}",1:"Sélectionner %{smart_count}",2:"Sélectionner %{smart_count}"},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",timedOut:"Téléchargement bloqué durant %{seconds} secondes, annulation.",unselectFileNamed:"Désélectionner le fichier %{name}",upload:"Télécharger",uploadComplete:"Téléchargement terminé",uploadFailed:"Le téléchargement a échoué",uploadPaused:"Téléchargement mis en pause",uploadXFiles:{0:"Télécharger %{smart_count} fichier",1:"Télécharger %{smart_count} fichiers",2:"Télécharger %{smart_count} fichiers"},uploadXNewFiles:{0:"Télécharger +%{smart_count} fichier",1:"Télécharger +%{smart_count} fichiers",2:"Télécharger +%{smart_count} fichiers"},uploading:"Téléchargement en cours",uploadingXFiles:{0:"Téléchargement de %{smart_count} fichier",1:"Téléchargement de %{smart_count} fichiers",2:"Téléchargement de %{smart_count} fichiers"},xFilesSelected:{0:"%{smart_count} fichier sélectionné",1:"%{smart_count} fichiers sélectionnés",2:"%{smart_count} fichiers sélectionnés"},xMoreFilesAdded:{0:"%{smart_count} autre fichier ajouté",1:"%{smart_count} autres fichiers ajoutés",2:"%{smart_count} autres fichiers ajoutés"},xTimeLeft:"%{time} restantes",youCanOnlyUploadFileTypes:"Vous pouvez seulement télécharger: %{types}",youCanOnlyUploadX:{0:"Vous pouvez seulement télécharger %{smart_count} fichier",1:"Vous pouvez seulement télécharger %{smart_count} fichiers",2:"Vous pouvez seulement télécharger %{smart_count} fichiers"},youHaveToAtLeastSelectX:{0:"Vous devez sélectionner au moins %{smart_count} fichier",1:"Vous devez sélectionner au moins %{smart_count} fichiers",2:"Vous devez sélectionner au moins %{smart_count} fichiers"}}};"undefined"!=typeof Uppy&&(globalThis.Uppy.locales.fr_FR=r),e.exports=r}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[377],{48761:function(e){e.exports=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,i=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var s=Math.min(Math.floor(Math.log(e)/Math.log(1024)),i.length-1);e=Number(e/Math.pow(1024,s));var o=i[s];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+o:(t?"-":"")+e.toFixed(1)+" "+o}},91566:function(e,t,i){var s=i(67764),o=/[\/\+\.]/;e.exports=function(e,t){function i(t){var i=s(t,e,o);return i&&i.length>=2}return t?i(t.split(";")[0]):i}},5181:function(e,t,i){"use strict";i.r(t),i.d(t,{Component:function(){return S},Fragment:function(){return w},cloneElement:function(){return G},createContext:function(){return H},createElement:function(){return v},createRef:function(){return b},h:function(){return v},hydrate:function(){return W},isValidElement:function(){return n},options:function(){return o},render:function(){return q},toChildArray:function(){return C}});var s,o,r,n,l,a,u,d,c,p={},h=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function _(e,t){for(var i in t)e[i]=t[i];return e}function m(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,i){var o,r,n,l={};for(n in t)"key"==n?o=t[n]:"ref"==n?r=t[n]:l[n]=t[n];if(arguments.length>2&&(l.children=arguments.length>3?s.call(arguments,2):i),"function"==typeof e&&null!=e.defaultProps)for(n in e.defaultProps)void 0===l[n]&&(l[n]=e.defaultProps[n]);return y(e,l,o,r,null)}function y(e,t,i,s,n){var l={type:e,props:t,key:i,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==n?++r:n,__i:-1,__u:0};return null==n&&null!=o.vnode&&o.vnode(l),l}function b(){return{current:null}}function w(e){return e.children}function S(e,t){this.props=e,this.context=t}function x(e,t){if(null==t)return e.__?x(e.__,e.__i+1):null;for(var i;t<e.__k.length;t++)if(null!=(i=e.__k[t])&&null!=i.__e)return i.__e;return"function"==typeof e.type?x(e):null}function P(e,t,i){var s,r=e.__v,n=r.__e,l=e.__P;if(l)return(s=_({},r)).__v=r.__v+1,o.vnode&&o.vnode(s),I(l,s,r,e.__n,void 0!==l.ownerSVGElement,32&r.__u?[n]:null,t,null==n?x(r):n,!!(32&r.__u),i),s.__v=r.__v,s.__.__k[s.__i]=s,s.__d=void 0,s.__e!=n&&F(s),s}function F(e){var t,i;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(i=e.__k[t])&&null!=i.__e){e.__e=e.__c.base=i.__e;break}return F(e)}}function O(e){(!e.__d&&(e.__d=!0)&&l.push(e)&&!U.__r++||a!==o.debounceRendering)&&((a=o.debounceRendering)||u)(U)}function U(){var e,t,i,s=[],r=[];for(l.sort(d);e=l.shift();)e.__d&&(i=l.length,t=P(e,s,r)||t,0===i||l.length>i?(R(s,t,r),r.length=s.length=0,t=void 0,l.sort(d)):t&&o.__c&&o.__c(t,h));t&&R(s,t,r),U.__r=0}function k(e,t,i,s,o,r,n,l,a,u,d){var c,f,g,_,m,v=s&&s.__k||h,y=t.length;for(i.__d=a,E(i,t,v),a=i.__d,c=0;c<y;c++)null!=(g=i.__k[c])&&"boolean"!=typeof g&&"function"!=typeof g&&(f=-1===g.__i?p:v[g.__i]||p,g.__i=c,I(e,g,f,o,r,n,l,a,u,d),_=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&z(f.ref,null,g),d.push(g.ref,g.__c||_,g)),null==m&&null!=_&&(m=_),65536&g.__u||f.__k===g.__k?a=T(g,a,e):"function"==typeof g.type&&void 0!==g.__d?a=g.__d:_&&(a=_.nextSibling),g.__d=void 0,g.__u&=-196609);i.__d=a,i.__e=m}function E(e,t,i){var s,o,r,n,l,a=t.length,u=i.length,d=u,c=0;for(e.__k=[],s=0;s<a;s++)n=s+c,null!=(o=e.__k[s]=null==(o=t[s])||"boolean"==typeof o||"function"==typeof o?null:"string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?y(null,o,null,null,null):g(o)?y(w,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?y(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,l=A(o,i,n,d),o.__i=l,r=null,-1!==l&&(d--,(r=i[l])&&(r.__u|=131072)),null==r||null===r.__v?(-1==l&&c--,"function"!=typeof o.type&&(o.__u|=65536)):l!==n&&(l===n+1?c++:l>n?d>a-n?c+=l-n:c--:l<n?l==n-1&&(c=l-n):c=0,l!==s+c&&(o.__u|=65536))):(r=i[n])&&null==r.key&&r.__e&&0==(131072&r.__u)&&(r.__e==e.__d&&(e.__d=x(r)),D(r,r,!1),i[n]=null,d--);if(d)for(s=0;s<u;s++)null!=(r=i[s])&&0==(131072&r.__u)&&(r.__e==e.__d&&(e.__d=x(r)),D(r,r))}function T(e,t,i){var s,o;if("function"==typeof e.type){for(s=e.__k,o=0;s&&o<s.length;o++)s[o]&&(s[o].__=e,t=T(s[o],t,i));return t}e.__e!=t&&(i.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function C(e,t){return t=t||[],null==e||"boolean"==typeof e||(g(e)?e.some((function(e){C(e,t)})):t.push(e)),t}function A(e,t,i,s){var o=e.key,r=e.type,n=i-1,l=i+1,a=t[i];if(null===a||a&&o==a.key&&r===a.type&&0==(131072&a.__u))return i;if(s>(null!=a&&0==(131072&a.__u)?1:0))for(;n>=0||l<t.length;){if(n>=0){if((a=t[n])&&0==(131072&a.__u)&&o==a.key&&r===a.type)return n;n--}if(l<t.length){if((a=t[l])&&0==(131072&a.__u)&&o==a.key&&r===a.type)return l;l++}}return-1}function j(e,t,i){"-"===t[0]?e.setProperty(t,null==i?"":i):e[t]=null==i?"":"number"!=typeof i||f.test(t)?i:i+"px"}function $(e,t,i,s,o){var r;e:if("style"===t)if("string"==typeof i)e.style.cssText=i;else{if("string"==typeof s&&(e.style.cssText=s=""),s)for(t in s)i&&t in i||j(e.style,t,"");if(i)for(t in i)s&&i[t]===s[t]||j(e.style,t,i[t])}else if("o"===t[0]&&"n"===t[1])r=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=i,i?s?i.u=s.u:(i.u=Date.now(),e.addEventListener(t,r?N:M,r)):e.removeEventListener(t,r?N:M,r);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==i?"":i;break e}catch(e){}"function"==typeof i||(null==i||!1===i&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,i))}}function M(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(o.event?o.event(e):e)}}function N(e){if(this.l)return this.l[e.type+!0](o.event?o.event(e):e)}function I(e,t,i,s,r,n,l,a,u,d){var c,p,h,f,m,v,y,b,x,P,F,O,U,E,T,C=t.type;if(void 0!==t.constructor)return null;128&i.__u&&(u=!!(32&i.__u),n=[a=t.__e=i.__e]),(c=o.__b)&&c(t);e:if("function"==typeof C)try{if(b=t.props,x=(c=C.contextType)&&s[c.__c],P=c?x?x.props.value:c.__:s,i.__c?y=(p=t.__c=i.__c).__=p.__E:("prototype"in C&&C.prototype.render?t.__c=p=new C(b,P):(t.__c=p=new S(b,P),p.constructor=C,p.render=B),x&&x.sub(p),p.props=b,p.state||(p.state={}),p.context=P,p.__n=s,h=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=C.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=_({},p.__s)),_(p.__s,C.getDerivedStateFromProps(b,p.__s))),f=p.props,m=p.state,p.__v=t,h)null==C.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==C.getDerivedStateFromProps&&b!==f&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(b,P),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(b,p.__s,P)||t.__v===i.__v)){for(t.__v!==i.__v&&(p.props=b,p.state=p.__s,p.__d=!1),t.__e=i.__e,t.__k=i.__k,t.__k.forEach((function(e){e&&(e.__=t)})),F=0;F<p._sb.length;F++)p.__h.push(p._sb[F]);p._sb=[],p.__h.length&&l.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(b,p.__s,P),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(f,m,v)}))}if(p.context=P,p.props=b,p.__P=e,p.__e=!1,O=o.__r,U=0,"prototype"in C&&C.prototype.render){for(p.state=p.__s,p.__d=!1,O&&O(t),c=p.render(p.props,p.state,p.context),E=0;E<p._sb.length;E++)p.__h.push(p._sb[E]);p._sb=[]}else do{p.__d=!1,O&&O(t),c=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++U<25);p.state=p.__s,null!=p.getChildContext&&(s=_(_({},s),p.getChildContext())),h||null==p.getSnapshotBeforeUpdate||(v=p.getSnapshotBeforeUpdate(f,m)),k(e,g(T=null!=c&&c.type===w&&null==c.key?c.props.children:c)?T:[T],t,i,s,r,n,l,a,u,d),p.base=t.__e,t.__u&=-161,p.__h.length&&l.push(p),y&&(p.__E=p.__=null)}catch(e){t.__v=null,u||null!=n?(t.__e=a,t.__u|=u?160:32,n[n.indexOf(a)]=null):(t.__e=i.__e,t.__k=i.__k),o.__e(e,t,i)}else null==n&&t.__v===i.__v?(t.__k=i.__k,t.__e=i.__e):t.__e=L(i.__e,t,i,s,r,n,l,u,d);(c=o.diffed)&&c(t)}function R(e,t,i){for(var s=0;s<i.length;s++)z(i[s],i[++s],i[++s]);o.__c&&o.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){o.__e(e,t.__v)}}))}function L(e,t,i,o,r,n,l,a,u){var d,c,h,f,_,v,y,b=i.props,w=t.props,S=t.type;if("svg"===S&&(r=!0),null!=n)for(d=0;d<n.length;d++)if((_=n[d])&&"setAttribute"in _==!!S&&(S?_.localName===S:3===_.nodeType)){e=_,n[d]=null;break}if(null==e){if(null===S)return document.createTextNode(w);e=r?document.createElementNS("http://www.w3.org/2000/svg",S):document.createElement(S,w.is&&w),n=null,a=!1}if(null===S)b===w||a&&e.data===w||(e.data=w);else{if(n=n&&s.call(e.childNodes),b=i.props||p,!a&&null!=n)for(b={},d=0;d<e.attributes.length;d++)b[(_=e.attributes[d]).name]=_.value;for(d in b)_=b[d],"children"==d||("dangerouslySetInnerHTML"==d?h=_:"key"===d||d in w||$(e,d,null,_,r));for(d in w)_=w[d],"children"==d?f=_:"dangerouslySetInnerHTML"==d?c=_:"value"==d?v=_:"checked"==d?y=_:"key"===d||a&&"function"!=typeof _||b[d]===_||$(e,d,_,b[d],r);if(c)a||h&&(c.__html===h.__html||c.__html===e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(h&&(e.innerHTML=""),k(e,g(f)?f:[f],t,i,o,r&&"foreignObject"!==S,n,l,n?n[0]:i.__k&&x(i,0),a,u),null!=n)for(d=n.length;d--;)null!=n[d]&&m(n[d]);a||(d="value",void 0!==v&&(v!==e[d]||"progress"===S&&!v||"option"===S&&v!==b[d])&&$(e,d,v,b[d],!1),d="checked",void 0!==y&&y!==e[d]&&$(e,d,y,b[d],!1))}return e}function z(e,t,i){try{"function"==typeof e?e(t):e.current=t}catch(e){o.__e(e,i)}}function D(e,t,i){var s,r;if(o.unmount&&o.unmount(e),(s=e.ref)&&(s.current&&s.current!==e.__e||z(s,null,t)),null!=(s=e.__c)){if(s.componentWillUnmount)try{s.componentWillUnmount()}catch(e){o.__e(e,t)}s.base=s.__P=null,e.__c=void 0}if(s=e.__k)for(r=0;r<s.length;r++)s[r]&&D(s[r],t,i||"function"!=typeof e.type);i||null==e.__e||m(e.__e),e.__=e.__e=e.__d=void 0}function B(e,t,i){return this.constructor(e,i)}function q(e,t,i){var r,n,l,a;o.__&&o.__(e,t),n=(r="function"==typeof i)?null:i&&i.__k||t.__k,l=[],a=[],I(t,e=(!r&&i||t).__k=v(w,null,[e]),n||p,p,void 0!==t.ownerSVGElement,!r&&i?[i]:n?null:t.firstChild?s.call(t.childNodes):null,l,!r&&i?i:n?n.__e:t.firstChild,r,a),e.__d=void 0,R(l,e,a)}function W(e,t){q(e,t,W)}function G(e,t,i){var o,r,n,l,a=_({},e.props);for(n in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),t)"key"==n?o=t[n]:"ref"==n?r=t[n]:a[n]=void 0===t[n]&&void 0!==l?l[n]:t[n];return arguments.length>2&&(a.children=arguments.length>3?s.call(arguments,2):i),y(e.type,a,o||e.key,r||e.ref,null)}function H(e,t){var i={__c:t="__cC"+c++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var i,s;return this.getChildContext||(i=[],(s={})[t]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&i.some((function(e){e.__e=!0,O(e)}))},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}),e.children}};return i.Provider.__=i.Consumer.contextType=i}s=h.slice,o={__e:function(e,t,i,s){for(var o,r,n;t=t.__;)if((o=t.__c)&&!o.__)try{if((r=o.constructor)&&null!=r.getDerivedStateFromError&&(o.setState(r.getDerivedStateFromError(e)),n=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,s||{}),n=o.__d),n)return o.__E=o}catch(t){e=t}throw e}},r=0,n=function(e){return null!=e&&null==e.constructor},S.prototype.setState=function(e,t){var i;i=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=_({},this.state),"function"==typeof e&&(e=e(_({},i),this.props)),e&&_(i,e),null!=e&&this.__v&&(t&&this._sb.push(t),O(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),O(this))},S.prototype.render=w,l=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d=function(e,t){return e.__v.__b-t.__v.__b},U.__r=0,c=0},67764: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,i,s=!0,o=this.parts,r=o.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(i=(e||"").split(this.separator),t=0;s&&t<r;t++)"*"!==o[t]&&(s=t<i.length&&o[t]===i[t]);s=s&&i}else s=!1;else if("function"==typeof e.splice)for(s=[],t=e.length;t--;)this.match(e[t])&&(s[s.length]=e[t]);else if("object"==typeof e)for(var n in s={},e)this.match(n)&&(s[n]=e[n]);return s},e.exports=function(e,i,s){var o=new t(e,s||/[\/\.]/);return void 0!==i?o.match(i):o}},73982:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=t.RestrictionError=t.Restricter=void 0;const s=i(48761),o=i(91566);t.defaultOptions={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class r extends Error{constructor(){super(...arguments),this.isRestriction=!0}}t.RestrictionError=r,"undefined"==typeof AggregateError&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}}),t.Restricter=class{constructor(e,t){this.i18n=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}}validate(e,t){const{maxFileSize:i,minFileSize:n,maxTotalFileSize:l,maxNumberOfFiles:a,allowedFileTypes:u}=this.getOpts().restrictions;if(a&&t.filter((e=>!e.isGhost)).length+1>a)throw new r(`${this.i18n("youCanOnlyUploadX",{smart_count:a})}`);if(u&&!u.some((t=>t.includes("/")?!!e.type&&o(e.type.replace(/;.*?$/,""),t):!("."!==t[0]||!e.extension)&&e.extension.toLowerCase()===t.slice(1).toLowerCase()))){const e=u.join(", ");throw new r(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}if(l&&null!=e.size&&t.reduce(((e,t)=>e+t.size),e.size)>l)throw new r(this.i18n("exceedsSize",{size:s(l),file:e.name}));if(i&&null!=e.size&&e.size>i)throw new r(this.i18n("exceedsSize",{size:s(i),file:e.name}));if(n&&null!=e.size&&e.size<n)throw new r(this.i18n("inferiorSize",{size:s(n)}))}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(Object.keys(e).length<t)throw new r(this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new r(this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:i}=this.getOpts().restrictions,s=Object.prototype.hasOwnProperty,o=[];for(const t of i)s.call(e.meta,t)&&""!==e.meta[t]||o.push(t);return{missingFields:o,error:t}}}},44780:function(e,t,i){"use strict";var s=i(5181);function o(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var r=0;function n(e){return"__private_"+r+++"_"+e}const l=i(7324),a=i(75727),u=i(92291);var d=n("updateUI");class c extends u{constructor(){super(...arguments),Object.defineProperty(this,d,{writable:!0,value:void 0})}mount(e,t){const i=t.id,r=l(e);if(r){this.isTargetDOMEl=!0;const t=document.createElement("div");return t.classList.add("uppy-Root"),o(this,d)[d]=function(e){let t=null,i=null;return function(){for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return i=o,t||(t=Promise.resolve().then((()=>(t=null,e(...i))))),t}}((e=>{this.uppy.getPlugin(this.id)&&((0,s.render)(this.render(e),t),this.afterUpdate())})),this.uppy.log(`Installing ${i} to a DOM element '${e}'`),this.opts.replaceTargetContent&&(r.innerHTML=""),(0,s.render)(this.render(this.uppy.getState()),t),this.el=t,r.appendChild(t),t.dir=this.opts.direction||a(t)||"ltr",this.onMount(),this.el}let n;if("object"==typeof e&&e instanceof c)n=e;else if("function"==typeof e){const t=e;this.uppy.iteratePlugins((e=>{e instanceof t&&(n=e)}))}if(n)return this.uppy.log(`Installing ${i} to ${n.id}`),this.parent=n,this.el=n.addTarget(t),this.onMount(),this.el;this.uppy.log(`Not installing ${i}`);let u=`Invalid target option given to ${i}.`;throw u+="function"==typeof e?" 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.":"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\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(u)}update(e){var t,i;null!=this.el&&(null==(t=(i=o(this,d))[d])||t.call(i,e))}unmount(){var e;this.isTargetDOMEl&&(null==(e=this.el)||e.remove()),this.onUnmount()}onMount(){}onUnmount(){}}e.exports=c},53051:function(e,t,i){"use strict";var s=i(30945),o=i(55716),r=i(73982);let n,l;function a(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var u=0;function d(e){return"__private_"+u+++"_"+e}const c=i(32653),p=i(2162),h=i(53871),f=i(68783),g=i(95569),_=i(67476),m=i(6063),v=i(57195),y=i(65104),b=i(31163);var w=d("plugins"),S=d("restricter"),x=d("storeUnsubscribe"),P=d("emitter"),F=d("preProcessors"),O=d("uploaders"),U=d("postProcessors"),k=d("informAndEmit"),E=d("checkRequiredMetaFieldsOnFile"),T=d("checkRequiredMetaFields"),C=d("assertNewUploadAllowed"),A=d("checkAndCreateFileStateObject"),j=d("startIfAutoProceed"),$=d("addListeners"),M=d("updateOnlineStatus"),N=d("createUpload"),I=d("getUpload"),R=d("removeUpload"),L=d("runUpload");n=Symbol.for("uppy test: getPlugins"),l=Symbol.for("uppy test: createUpload");class z{constructor(e){Object.defineProperty(this,L,{value:K}),Object.defineProperty(this,R,{value:Z}),Object.defineProperty(this,I,{value:X}),Object.defineProperty(this,N,{value:V}),Object.defineProperty(this,$,{value:Y}),Object.defineProperty(this,j,{value:H}),Object.defineProperty(this,A,{value:G}),Object.defineProperty(this,C,{value:W}),Object.defineProperty(this,T,{value:q}),Object.defineProperty(this,E,{value:B}),Object.defineProperty(this,k,{value:D}),Object.defineProperty(this,w,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,S,{writable:!0,value:void 0}),Object.defineProperty(this,x,{writable:!0,value:void 0}),Object.defineProperty(this,P,{writable:!0,value:p()}),Object.defineProperty(this,F,{writable:!0,value:new Set}),Object.defineProperty(this,O,{writable:!0,value:new Set}),Object.defineProperty(this,U,{writable:!0,value:new Set}),Object.defineProperty(this,M,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=b;const t={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:r.defaultOptions,meta:{},onBeforeFileAdded:e=>e,onBeforeUpload:e=>e,store:f(),logger:o.justErrorsLogger,infoTimeout:5e3};this.opts={...t,...e,restrictions:{...t.restrictions,...e&&e.restrictions}},e&&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&&e.debug&&(this.opts.logger=o.debugLogger),this.log(`Using Core v${this.constructor.VERSION}`),this.i18nInit(),this.calculateProgress=h(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:v(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),a(this,S)[S]=new r.Restricter((()=>this.opts),this.i18n),a(this,x)[x]=this.store.subscribe(((e,t,i)=>{this.emit("state-update",e,t,i),this.updateAll(t)})),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),a(this,$)[$]()}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];a(this,P)[P].emit(e,...i)}on(e,t){return a(this,P)[P].on(e,t),this}once(e,t){return a(this,P)[P].once(e,t),this}off(e,t){return a(this,P)[P].off(e,t),this}updateAll(e){this.iteratePlugins((t=>{t.update(e)}))}setState(e){this.store.setState(e)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.setState({files:{...this.getState().files,[e]:{...this.getState().files[e],...t}}})}i18nInit(){const e=new c([this.defaultLocale,this.opts.locale]);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&&e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins((e=>{e.setOptions()})),this.setState()}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},i={};Object.keys(t).forEach((s=>{const o={...t[s]};o.progress={...o.progress,...e},i[s]=o})),this.setState({files:i,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(e){a(this,F)[F].add(e)}removePreProcessor(e){return a(this,F)[F].delete(e)}addPostProcessor(e){a(this,U)[U].add(e)}removePostProcessor(e){return a(this,U)[U].delete(e)}addUploader(e){a(this,O)[O].add(e)}removeUploader(e){return a(this,O)[O].delete(e)}setMeta(e){const t={...this.getState().meta,...e},i={...this.getState().files};Object.keys(i).forEach((t=>{i[t]={...i[t],meta:{...i[t].meta,...e}}})),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:i})}setFileMeta(e,t){const i={...this.getState().files};if(!i[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const s={...i[e].meta,...t};i[e]={...i[e],meta:s},this.setState({files:i})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:i}=this.getState(),s=Object.values(e),o=s.filter((e=>{let{progress:t}=e;return!t.uploadComplete&&t.uploadStarted})),r=s.filter((e=>!e.progress.uploadStarted)),n=s.filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess)),l=s.filter((e=>e.progress.uploadStarted)),a=s.filter((e=>e.isPaused)),u=s.filter((e=>e.progress.uploadComplete)),d=s.filter((e=>e.error)),c=o.filter((e=>!e.isPaused)),p=s.filter((e=>e.progress.preprocess||e.progress.postprocess));return{newFiles:r,startedFiles:n,uploadStartedFiles:l,pausedFiles:a,completeFiles:u,erroredFiles:d,inProgressFiles:o,inProgressNotPausedFiles:c,processingFiles:p,isUploadStarted:l.length>0,isAllComplete:100===t&&u.length===s.length&&0===p.length,isAllErrored:!!i&&d.length===s.length,isAllPaused:0!==o.length&&a.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:s.some((e=>e.isGhost))}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{return a(this,S)[S].validate(e,t),{result:!0}}catch(e){return{result:!1,reason:e.message}}}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){a(this,C)[C](e);const{files:t}=this.getState();let i=a(this,A)[A](t,e);return t[i.id]&&t[i.id].isGhost&&(i={...t[i.id],data:e.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${i.name}, ${i.id}`)),this.setState({files:{...t,[i.id]:i}}),this.emit("file-added",i),this.emit("files-added",[i]),this.log(`Added file: ${i.name}, ${i.id}, mime type: ${i.type}`),a(this,j)[j](),i.id}addFiles(e){a(this,C)[C]();const t={...this.getState().files},i=[],s=[];for(let o=0;o<e.length;o++)try{let s=a(this,A)[A](t,e[o]);t[s.id]&&t[s.id].isGhost&&(s={...t[s.id],data:e[o].data,isGhost:!1},this.log(`Replaced blob in a ghost file: ${s.name}, ${s.id}`)),t[s.id]=s,i.push(s)}catch(e){e.isRestriction||s.push(e)}if(this.setState({files:t}),i.forEach((e=>{this.emit("file-added",e)})),this.emit("files-added",i),i.length>5?this.log(`Added batch of ${i.length} files`):Object.keys(i).forEach((e=>{this.log(`Added file: ${i[e].name}\n id: ${i[e].id}\n type: ${i[e].type}`)})),i.length>0&&a(this,j)[j](),s.length>0){let e="Multiple errors occurred while adding files:\n";if(s.forEach((t=>{e+=`\n * ${t.message}`})),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:s.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(s,e);{const t=new Error(e);throw t.errors=s,t}}}removeFiles(e,t){const{files:i,currentUploads:s}=this.getState(),o={...i},r={...s},n=Object.create(null);function l(e){return void 0===n[e]}e.forEach((e=>{i[e]&&(n[e]=i[e],delete o[e])})),Object.keys(r).forEach((e=>{const t=s[e].fileIDs.filter(l);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("individualCancellation is disabled");r[e]={...s[e],fileIDs:t}}));const a={currentUploads:r,files:o};0===Object.keys(o).length&&(a.allowNewUpload=!0,a.error=null,a.recoveredState=null),this.setState(a),this.calculateTotalProgress();const u=Object.keys(n);u.forEach((e=>{this.emit("file-removed",n[e],t)})),u.length>5?this.log(`Removed ${u.length} files`):this.log(`Removed files: ${u.join(", ")}`)}removeFile(e,t){void 0===t&&(t=null),this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).uploadComplete)return;const t=!this.getFile(e).isPaused;return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}pauseAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const i={...e[t],isPaused:!0};e[t]=i})),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 i={...e[t],isPaused:!1,error:null};e[t]=i})),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},t=Object.keys(e).filter((t=>e[t].error));if(t.forEach((t=>{const i={...e[t],isPaused:!1,error:null};e[t]=i})),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const i=a(this,N)[N](t,{forceAllowNewUpload:!0});return a(this,L)[L](i)}cancelAll(e){let{reason:t="user"}=void 0===e?{}:e;if(this.emit("cancel-all",{reason:t}),"user"===t){const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=a(this,N)[N]([e],{forceAllowNewUpload:!0});return a(this,L)[L](t)}reset(){this.cancelAll(...arguments)}logout(){this.iteratePlugins((e=>{e.provider&&e.provider.logout&&e.provider.logout()}))}calculateProgress(e,t){if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const i=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:i?Math.round(t.bytesUploaded/t.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const e=this.getFiles().filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess));if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const t=e.filter((e=>null!=e.progress.bytesTotal)),i=e.filter((e=>null==e.progress.bytesTotal));if(0===t.length){const t=100*e.length,s=i.reduce(((e,t)=>e+t.progress.percentage),0),o=Math.round(s/t*100);return void this.setState({totalProgress:o})}let s=t.reduce(((e,t)=>e+t.progress.bytesTotal),0);const o=s/t.length;s+=o*i.length;let r=0;t.forEach((e=>{r+=e.progress.bytesUploaded})),i.forEach((e=>{r+=o*(e.progress.percentage||0)/100}));let n=0===s?0:Math.round(r/s*100);n>100&&(n=100),this.setState({totalProgress:n}),this.emit("progress",n)}updateOnlineStatus(){void 0===window.navigator.onLine||window.navigator.onLine?(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)}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 i=new e(this,t),s=i.id;if(!s)throw new Error("Your plugin must have an id");if(!i.type)throw new Error("Your plugin must have a type");const o=this.getPlugin(s);if(o){const e=`Already found a plugin named '${o.id}'. Tried to use: '${s}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(e)}return e.VERSION&&this.log(`Using ${s} v${e.VERSION}`),i.type in a(this,w)[w]?a(this,w)[w][i.type].push(i):a(this,w)[w][i.type]=[i],i.install(),this}getPlugin(e){for(const t of Object.values(a(this,w)[w])){const i=t.find((t=>t.id===e));if(null!=i)return i}}[n](e){return a(this,w)[w][e]}iteratePlugins(e){Object.values(a(this,w)[w]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=a(this,w)[w][e.type],i=t.findIndex((t=>t.id===e.id));-1!==i&&t.splice(i,1);const s={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(s)}close(e){let{reason:t}=void 0===e?{}:e;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:t}),a(this,x)[x](),this.iteratePlugins((e=>{this.removePlugin(e)})),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",a(this,M)[M]),window.removeEventListener("offline",a(this,M)[M]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,i){void 0===t&&(t="info"),void 0===i&&(i=3e3);const s="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:s?e.message:e,details:s?e.details:null}]}),setTimeout((()=>this.hideInfo()),i),this.emit("info-visible")}log(e,t){const{logger:i}=this.opts;switch(t){case"error":i.error(e);break;case"warning":i.warn(e);break;default:i.debug(e)}}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?a(this,L)[L](e):(a(this,R)[R](e),Promise.reject(new Error("Nonexistent upload")))}[l](){return a(this,N)[N](...arguments)}addResultData(e,t){if(!a(this,I)[I](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:i}=this.getState(),s={...i[e],result:{...i[e].result,...t}};this.setState({currentUploads:{...i,[e]:s}})}upload(){var e;null!=(e=a(this,w)[w].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const i=this.opts.onBeforeUpload(t);return!1===i?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(i&&"object"==typeof i&&(t=i,this.setState({files:t})),Promise.resolve().then((()=>a(this,S)[S].validateMinNumberOfFiles(t))).catch((e=>{throw a(this,k)[k](e),e})).then((()=>{if(!a(this,T)[T](t))throw new r.RestrictionError(this.i18n("missingRequiredMetaField"))})).catch((e=>{throw e})).then((()=>{const{currentUploads:e}=this.getState(),i=Object.values(e).flatMap((e=>e.fileIDs)),s=[];Object.keys(t).forEach((e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==i.indexOf(e)||s.push(t.id)}));const o=a(this,N)[N](s);return a(this,L)[L](o)})).catch((e=>{throw this.emit("error",e),this.log(e,"error"),e})))}}function D(e,t){const{message:i,details:s=""}=e;e.isRestriction?this.emit("restriction-failed",t,e):this.emit("error",e),this.info({message:i,details:s},"error",this.opts.infoTimeout),this.log(`${i} ${s}`.trim(),"error")}function B(e){const{missingFields:t,error:i}=a(this,S)[S].getMissingRequiredMetaFields(e);return!(t.length>0&&(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(i.message),this.emit("restriction-failed",e,i),1))}function q(e){let t=!0;for(const i of Object.values(e))a(this,E)[E](i)||(t=!1);return t}function W(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new r.RestrictionError(this.i18n("noMoreFilesAllowed"));throw a(this,k)[k](t,e),t}}function G(e,t){const i=g(t),s=y(i,t),o=_(s).extension,n=Boolean(t.isRemote),l=m({...t,type:i});if(this.checkIfFileAlreadyExists(l)){const e=new r.RestrictionError(this.i18n("noDuplicates",{fileName:s}));throw a(this,k)[k](e,t),e}const u=t.meta||{};u.name=s,u.type=i;const d=Number.isFinite(t.data.size)?t.data.size:null;let c={source:t.source||"",id:l,name:s,extension:o||"",meta:{...this.getState().meta,...u},type:i,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:d,uploadComplete:!1,uploadStarted:null},size:d,isRemote:n,remote:t.remote||"",preview:t.preview};const p=this.opts.onBeforeFileAdded(c,e);if(!1===p){const e=new r.RestrictionError("Cannot add the file because onBeforeFileAdded returned false.");throw this.emit("restriction-failed",t,e),e}"object"==typeof p&&null!==p&&(c=p);try{const t=Object.keys(e).map((t=>e[t]));a(this,S)[S].validate(c,t)}catch(e){throw a(this,k)[k](e,c),e}return c}function H(){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))}function Y(){const e=(e,t,i)=>{let s=e.message||"Unknown error";e.details&&(s+=` ${e.details}`),this.setState({error:s}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:s,response:i})};this.on("error",e),this.on("upload-error",((t,i,s)=>{if(e(i,t,s),"object"==typeof i&&i.message){const e=new Error(i.message);e.details=i.message,i.details&&(e.details+=` ${i.details}`),e.message=this.i18n("failedToUpload",{file:null==t?void 0:t.name}),a(this,k)[k](e)}else a(this,k)[k](i)})),this.on("upload",(()=>{this.setState({error:null})})),this.on("upload-started",(e=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("upload-progress",this.calculateProgress),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: ${null==e?void 0:e.id}`);const i=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...i,postprocess:a(this,U)[U].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:i.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||i.bytesTotal}),this.calculateTotalProgress()})),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: ${null==e?void 0: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: ${null==e?void 0: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: ${null==e?void 0:e.id}`)})),this.on("postprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.postprocess,this.setState({files:t})})),this.on("restored",(()=>{this.calculateTotalProgress()})),this.on("dashboard:file-edit-complete",(e=>{e&&a(this,E)[E](e)})),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",a(this,M)[M]),window.addEventListener("offline",a(this,M)[M]),setTimeout(a(this,M)[M],3e3))}function V(e,t){void 0===t&&(t={});const{forceAllowNewUpload:i=!1}=t,{allowNewUpload:o,currentUploads:r}=this.getState();if(!o&&!i)throw new Error("Cannot create a new upload: already uploading.");const n=(0,s.nanoid)();return this.emit("upload",{id:n,fileIDs:e}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...r,[n]:{fileIDs:e,step:0,result:{}}}}),n}function X(e){const{currentUploads:t}=this.getState();return t[e]}function Z(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function K(e){let{currentUploads:t}=this.getState(),i=t[e];const s=i.step||0,o=[...a(this,F)[F],...a(this,O)[O],...a(this,U)[U]];try{for(let r=s;r<o.length&&i;r++){const s=o[r],n={...i,step:r};this.setState({currentUploads:{...t,[e]:n}}),await s(n.fileIDs,e),t=this.getState().currentUploads,i=t[e]}}catch(t){throw a(this,R)[R](e),t}if(i){i.fileIDs.forEach((e=>{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)}));const s=i.fileIDs.map((e=>this.getFile(e))),o=s.filter((e=>!e.error)),r=s.filter((e=>e.error));await this.addResultData(e,{successful:o,failed:r,uploadID:e}),t=this.getState().currentUploads,i=t[e]}let r;return i&&(r=i.result,this.emit("complete",r),a(this,R)[R](e)),null==r&&this.log(`Not setting result for an upload that has been removed: ${e}`),r}z.VERSION="2.3.4",e.exports=z},65104:function(e){"use strict";e.exports=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}},95377:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Uppy=t.UIPlugin=t.BasePlugin=void 0,Object.defineProperty(t,"debugLogger",{enumerable:!0,get:function(){return s.debugLogger}});var s=i(55716);e.exports=i(53051);const o=i(44780);t.UIPlugin=o;const r=i(92291);t.BasePlugin=r;const n=i(53051);t.Uppy=n;const l=i(44780),a=i(92291);n.Uppy=n,n.UIPlugin=l,n.BasePlugin=a,n.debugLogger=s.debugLogger},31163:function(e){"use strict";e.exports={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"},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",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",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",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}}},55716:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.justErrorsLogger=t.debugLogger=void 0;const s=i(82167),o={debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.error(`[Uppy] [${s()}]`,...t)}};t.justErrorsLogger=o;const r={debug:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.debug(`[Uppy] [${s()}]`,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.warn(`[Uppy] [${s()}]`,...t)},error:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.error(`[Uppy] [${s()}]`,...t)}};t.debugLogger=r},57195:function(e){"use strict";e.exports=function(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 i=t[1];let[s,o]=i.split(".");return s=parseInt(s,10),o=parseInt(o,10),s<15||15===s&&o<15063||s>18||18===s&&o>=18218}},68783:function(e){"use strict";var t=0;function i(e){return"__private_"+t+++"_"+e}var s=i("publish");class o{constructor(){Object.defineProperty(this,s,{value:r}),this.state={},this.callbacks=[]}getState(){return this.state}setState(e){const t={...this.state},i={...this.state,...e};this.state=i,function(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(this,s)[s](t,i,e)}subscribe(e){return this.callbacks.push(e),()=>{this.callbacks.splice(this.callbacks.indexOf(e),1)}}}function r(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.callbacks.forEach((e=>{e(...t)}))}o.VERSION="2.1.1",e.exports=function(){return new o}},7324:function(e,t,i){"use strict";const s=i(56039);e.exports=function(e,t){return void 0===t&&(t=document),"string"==typeof e?t.querySelector(e):s(e)?e:null}},6063:function(e){"use strict";function t(e){let t="";return e.replace(/[^A-Z0-9]/gi,(e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/")))+t}e.exports=function(e){let i="uppy";return"string"==typeof e.name&&(i+=`-${t(e.name.toLowerCase())}`),void 0!==e.type&&(i+=`-${e.type}`),e.meta&&"string"==typeof e.meta.relativePath&&(i+=`-${t(e.meta.relativePath.toLowerCase())}`),void 0!==e.data.size&&(i+=`-${e.data.size}`),void 0!==e.data.lastModified&&(i+=`-${e.data.lastModified}`),i}},67476:function(e){"use strict";e.exports=function(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)}}},95569:function(e,t,i){"use strict";const s=i(67476),o=i(39838);e.exports=function(e){var t;if(e.type)return e.type;const i=e.name?null==(t=s(e.name).extension)?void 0:t.toLowerCase():null;return i&&i in o?o[i]:"application/octet-stream"}},75727:function(e){"use strict";e.exports=function(e){for(var t;e&&!e.dir;)e=e.parentNode;return null==(t=e)?void 0:t.dir}},82167:function(e){"use strict";function t(e){return e<10?`0${e}`:e.toString()}e.exports=function(){const e=new Date;return`${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`}},56039:function(e){"use strict";e.exports=function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE}},39838:function(e){"use strict";e.exports={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"}},30945:function(e){e.exports={nanoid:(e=21)=>{let t="",i=e;for(;i--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(i=t)=>{let s="",o=i;for(;o--;)s+=e[Math.random()*e.length|0];return s}}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[490],{56490:function(t,n,i){var e;!function(){function o(t,n,i){return t.call.apply(t.bind,arguments)}function a(t,n,i){if(!t)throw Error();if(2<arguments.length){var e=Array.prototype.slice.call(arguments,2);return function(){var i=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(i,e),t.apply(n,i)}}return function(){return t.apply(n,arguments)}}function s(t,n,i){return(s=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?o:a).apply(null,arguments)}var r=Date.now||function(){return+new Date};function c(t,n){this.a=t,this.o=n||t,this.c=this.o.document}var f=!!window.FontFace;function h(t,n,i,e){if(n=t.c.createElement(n),i)for(var o in i)i.hasOwnProperty(o)&&("style"==o?n.style.cssText=i[o]:n.setAttribute(o,i[o]));return e&&n.appendChild(t.c.createTextNode(e)),n}function l(t,n,i){(t=t.c.getElementsByTagName(n)[0])||(t=document.documentElement),t.insertBefore(i,t.lastChild)}function u(t){t.parentNode&&t.parentNode.removeChild(t)}function p(t,n,i){n=n||[],i=i||[];for(var e=t.className.split(/\s+/),o=0;o<n.length;o+=1){for(var a=!1,s=0;s<e.length;s+=1)if(n[o]===e[s]){a=!0;break}a||e.push(n[o])}for(n=[],o=0;o<e.length;o+=1){for(a=!1,s=0;s<i.length;s+=1)if(e[o]===i[s]){a=!0;break}a||n.push(e[o])}t.className=n.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function g(t,n){for(var i=t.className.split(/\s+/),e=0,o=i.length;e<o;e++)if(i[e]==n)return!0;return!1}function d(t,n,i){function e(){r&&o&&a&&(r(s),r=null)}n=h(t,"link",{rel:"stylesheet",href:n,media:"all"});var o=!1,a=!0,s=null,r=i||null;f?(n.onload=function(){o=!0,e()},n.onerror=function(){o=!0,s=Error("Stylesheet failed to load"),e()}):setTimeout((function(){o=!0,e()}),0),l(t,"head",n)}function v(t,n,i,e){var o=t.c.getElementsByTagName("head")[0];if(o){var a=h(t,"script",{src:n}),s=!1;return a.onload=a.onreadystatechange=function(){s||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(s=!0,i&&i(null),a.onload=a.onreadystatechange=null,"HEAD"==a.parentNode.tagName&&o.removeChild(a))},o.appendChild(a),setTimeout((function(){s||(s=!0,i&&i(Error("Script load timeout")))}),e||5e3),a}return null}function m(){this.a=0,this.c=null}function w(t){return t.a++,function(){t.a--,b(t)}}function y(t,n){t.c=n,b(t)}function b(t){0==t.a&&t.c&&(t.c(),t.c=null)}function _(t){this.a=t||"-"}function x(t,n){this.c=t,this.f=4,this.a="n";var i=(n||"n4").match(/^([nio])([1-9])$/i);i&&(this.a=i[1],this.f=parseInt(i[2],10))}function j(t){var n=[];t=t.split(/,\s*/);for(var i=0;i<t.length;i++){var e=t[i].replace(/['"]/g,"");-1!=e.indexOf(" ")||/^\d/.test(e)?n.push("'"+e+"'"):n.push(e)}return n.join(",")}function k(t){return t.a+t.f}function T(t){var n="normal";return"o"===t.a?n="oblique":"i"===t.a&&(n="italic"),n}function S(t){var n=4,i="n",e=null;return t&&((e=t.match(/(normal|oblique|italic)/i))&&e[1]&&(i=e[1].substr(0,1).toLowerCase()),(e=t.match(/([1-9]00|normal|bold)/i))&&e[1]&&(/bold/i.test(e[1])?n=7:/[1-9]00/.test(e[1])&&(n=parseInt(e[1].substr(0,1),10)))),i+n}function C(t,n){this.c=t,this.f=t.o.document.documentElement,this.h=n,this.a=new _("-"),this.j=!1!==n.events,this.g=!1!==n.classes}function A(t){if(t.g){var n=g(t.f,t.a.c("wf","active")),i=[],e=[t.a.c("wf","loading")];n||i.push(t.a.c("wf","inactive")),p(t.f,i,e)}N(t,"inactive")}function N(t,n,i){t.j&&t.h[n]&&(i?t.h[n](i.c,k(i)):t.h[n]())}function E(){this.c={}}function I(t,n){this.c=t,this.f=n,this.a=h(this.c,"span",{"aria-hidden":"true"},this.f)}function O(t){l(t.c,"body",t.a)}function P(t){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+j(t.c)+";font-style:"+T(t)+";font-weight:"+t.f+"00;"}function W(t,n,i,e,o,a){this.g=t,this.j=n,this.a=e,this.c=i,this.f=o||3e3,this.h=a||void 0}function B(t,n,i,e,o,a,s){this.v=t,this.B=n,this.c=i,this.a=e,this.s=s||"BESbswy",this.f={},this.w=o||3e3,this.u=a||null,this.m=this.j=this.h=this.g=null,this.g=new I(this.c,this.s),this.h=new I(this.c,this.s),this.j=new I(this.c,this.s),this.m=new I(this.c,this.s),t=P(t=new x(this.a.c+",serif",k(this.a))),this.g.a.style.cssText=t,t=P(t=new x(this.a.c+",sans-serif",k(this.a))),this.h.a.style.cssText=t,t=P(t=new x("serif",k(this.a))),this.j.a.style.cssText=t,t=P(t=new x("sans-serif",k(this.a))),this.m.a.style.cssText=t,O(this.g),O(this.h),O(this.j),O(this.m)}_.prototype.c=function(t){for(var n=[],i=0;i<arguments.length;i++)n.push(arguments[i].replace(/[\W_]+/g,"").toLowerCase());return n.join(this.a)},W.prototype.start=function(){var t=this.c.o.document,n=this,i=r(),e=new Promise((function(e,o){!function a(){r()-i>=n.f?o():t.fonts.load(function(t){return T(t)+" "+t.f+"00 300px "+j(t.c)}(n.a),n.h).then((function(t){1<=t.length?e():setTimeout(a,25)}),(function(){o()}))}()})),o=null,a=new Promise((function(t,i){o=setTimeout(i,n.f)}));Promise.race([a,e]).then((function(){o&&(clearTimeout(o),o=null),n.g(n.a)}),(function(){n.j(n.a)}))};var F={D:"serif",C:"sans-serif"},L=null;function D(){if(null===L){var t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);L=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return L}function $(t,n,i){for(var e in F)if(F.hasOwnProperty(e)&&n===t.f[F[e]]&&i===t.f[F[e]])return!0;return!1}function q(t){var n,i=t.g.a.offsetWidth,e=t.h.a.offsetWidth;(n=i===t.f.serif&&e===t.f["sans-serif"])||(n=D()&&$(t,i,e)),n?r()-t.A>=t.w?D()&&$(t,i,e)&&(null===t.u||t.u.hasOwnProperty(t.a.c))?H(t,t.v):H(t,t.B):function(t){setTimeout(s((function(){q(this)}),t),50)}(t):H(t,t.v)}function H(t,n){setTimeout(s((function(){u(this.g.a),u(this.h.a),u(this.j.a),u(this.m.a),n(this.a)}),t),0)}function M(t,n,i){this.c=t,this.a=n,this.f=0,this.m=this.j=!1,this.s=i}B.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=r(),q(this)};var z=null;function G(t){0==--t.f&&t.j&&(t.m?((t=t.a).g&&p(t.f,[t.a.c("wf","active")],[t.a.c("wf","loading"),t.a.c("wf","inactive")]),N(t,"active")):A(t.a))}function K(t){this.j=t,this.a=new E,this.h=0,this.f=this.g=!0}function R(t,n,i,e,o){var a=0==--t.h;(t.f||t.g)&&setTimeout((function(){var t=o||null,r=e||{};if(0===i.length&&a)A(n.a);else{n.f+=i.length,a&&(n.j=a);var c,f=[];for(c=0;c<i.length;c++){var h=i[c],l=r[h.c],u=n.a,g=h;if(u.g&&p(u.f,[u.a.c("wf",g.c,k(g).toString(),"loading")]),N(u,"fontloading",g),u=null,null===z)if(window.FontFace){g=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var d=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);z=g?42<parseInt(g[1],10):!d}else z=!1;u=z?new W(s(n.g,n),s(n.h,n),n.c,h,n.s,l):new B(s(n.g,n),s(n.h,n),n.c,h,n.s,t,l),f.push(u)}for(c=0;c<f.length;c++)f[c].start()}}),0)}function U(t,n){this.c=t,this.a=n}function V(t,n){this.c=t,this.a=n}function X(t,n){this.c=t||J,this.a=[],this.f=[],this.g=n||""}M.prototype.g=function(t){var n=this.a;n.g&&p(n.f,[n.a.c("wf",t.c,k(t).toString(),"active")],[n.a.c("wf",t.c,k(t).toString(),"loading"),n.a.c("wf",t.c,k(t).toString(),"inactive")]),N(n,"fontactive",t),this.m=!0,G(this)},M.prototype.h=function(t){var n=this.a;if(n.g){var i=g(n.f,n.a.c("wf",t.c,k(t).toString(),"active")),e=[],o=[n.a.c("wf",t.c,k(t).toString(),"loading")];i||e.push(n.a.c("wf",t.c,k(t).toString(),"inactive")),p(n.f,e,o)}N(n,"fontinactive",t),G(this)},K.prototype.load=function(t){this.c=new c(this.j,t.context||this.j),this.g=!1!==t.events,this.f=!1!==t.classes,function(t,n,i){var e=[],o=i.timeout;!function(t){t.g&&p(t.f,[t.a.c("wf","loading")]),N(t,"loading")}(n),e=function(t,n,i){var e,o=[];for(e in n)if(n.hasOwnProperty(e)){var a=t.c[e];a&&o.push(a(n[e],i))}return o}(t.a,i,t.c);var a=new M(t.c,n,o);for(t.h=e.length,n=0,i=e.length;n<i;n++)e[n].load((function(n,i,e){R(t,a,n,i,e)}))}(this,new C(this.c,t),t)},U.prototype.load=function(t){function n(){if(a["__mti_fntLst"+e]){var i,o=a["__mti_fntLst"+e](),s=[];if(o)for(var r=0;r<o.length;r++){var c=o[r].fontfamily;null!=o[r].fontStyle&&null!=o[r].fontWeight?(i=o[r].fontStyle+o[r].fontWeight,s.push(new x(c,i))):s.push(new x(c))}t(s)}else setTimeout((function(){n()}),50)}var i=this,e=i.a.projectId,o=i.a.version;if(e){var a=i.c.o;v(this.c,(i.a.api||"https://fast.fonts.net/jsapi")+"/"+e+".js"+(o?"?v="+o:""),(function(o){o?t([]):(a["__MonotypeConfiguration__"+e]=function(){return i.a},n())})).id="__MonotypeAPIScript__"+e}else t([])},V.prototype.load=function(t){var n,i,e=this.a.urls||[],o=this.a.families||[],a=this.a.testStrings||{},s=new m;for(n=0,i=e.length;n<i;n++)d(this.c,e[n],w(s));var r=[];for(n=0,i=o.length;n<i;n++)if((e=o[n].split(":"))[1])for(var c=e[1].split(","),f=0;f<c.length;f+=1)r.push(new x(e[0],c[f]));else r.push(new x(e[0]));y(s,(function(){t(r,a)}))};var J="https://fonts.googleapis.com/css";function Q(t){this.f=t,this.a=[],this.c={}}var Y={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},Z={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},tt={i:"i",italic:"i",n:"n",normal:"n"},nt=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function it(t,n){this.c=t,this.a=n}var et={Arimo:!0,Cousine:!0,Tinos:!0};function ot(t,n){this.c=t,this.a=n}function at(t,n){this.c=t,this.f=n,this.a=[]}it.prototype.load=function(t){var n=new m,i=this.c,e=new X(this.a.api,this.a.text),o=this.a.families;!function(t,n){for(var i=n.length,e=0;e<i;e++){var o=n[e].split(":");3==o.length&&t.f.push(o.pop());var a="";2==o.length&&""!=o[1]&&(a=":"),t.a.push(o.join(a))}}(e,o);var a=new Q(o);!function(t){for(var n=t.f.length,i=0;i<n;i++){var e=t.f[i].split(":"),o=e[0].replace(/\+/g," "),a=["n4"];if(2<=e.length){var s;if(s=[],r=e[1])for(var r,c=(r=r.split(",")).length,f=0;f<c;f++){var h;if((h=r[f]).match(/^[\w-]+$/))if(null==(l=nt.exec(h.toLowerCase())))h="";else{if(h=null==(h=l[2])||""==h?"n":tt[h],null==(l=l[1])||""==l)l="4";else var l=Z[l]||(isNaN(l)?"4":l.substr(0,1));h=[h,l].join("")}else h="";h&&s.push(h)}0<s.length&&(a=s),3==e.length&&(s=[],0<(e=(e=e[2])?e.split(","):s).length&&(e=Y[e[0]])&&(t.c[o]=e))}for(t.c[o]||(e=Y[o])&&(t.c[o]=e),e=0;e<a.length;e+=1)t.a.push(new x(o,a[e]))}}(a),d(i,function(t){if(0==t.a.length)throw Error("No fonts to load!");if(-1!=t.c.indexOf("kit="))return t.c;for(var n=t.a.length,i=[],e=0;e<n;e++)i.push(t.a[e].replace(/ /g,"+"));return n=t.c+"?family="+i.join("%7C"),0<t.f.length&&(n+="&subset="+t.f.join(",")),0<t.g.length&&(n+="&text="+encodeURIComponent(t.g)),n}(e),w(n)),y(n,(function(){t(a.a,a.c,et)}))},ot.prototype.load=function(t){var n=this.a.id,i=this.c.o;n?v(this.c,(this.a.api||"https://use.typekit.net")+"/"+n+".js",(function(n){if(n)t([]);else if(i.Typekit&&i.Typekit.config&&i.Typekit.config.fn){n=i.Typekit.config.fn;for(var e=[],o=0;o<n.length;o+=2)for(var a=n[o],s=n[o+1],r=0;r<s.length;r++)e.push(new x(a,s[r]));try{i.Typekit.load({events:!1,classes:!1,async:!0})}catch(t){}t(e)}}),2e3):t([])},at.prototype.load=function(t){var n=this.f.id,i=this.c.o,e=this;n?(i.__webfontfontdeckmodule__||(i.__webfontfontdeckmodule__={}),i.__webfontfontdeckmodule__[n]=function(n,i){for(var o=0,a=i.fonts.length;o<a;++o){var s=i.fonts[o];e.a.push(new x(s.name,S("font-weight:"+s.weight+";font-style:"+s.style)))}t(e.a)},v(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(t){return t.o.location.hostname||t.a.location.hostname}(this.c)+"/"+n+".js",(function(n){n&&t([])}))):t([])};var st=new K(window);st.a.c.custom=function(t,n){return new V(n,t)},st.a.c.fontdeck=function(t,n){return new at(n,t)},st.a.c.monotype=function(t,n){return new U(n,t)},st.a.c.typekit=function(t,n){return new ot(n,t)},st.a.c.google=function(t,n){return new it(n,t)};var rt={load:s(st.load,st)};void 0===(e=function(){return rt}.call(n,i,n,t))||(t.exports=e)}()}}]);