From 6d745f1e8c7b870524e01ee7a4886db38634e2ae Mon Sep 17 00:00:00 2001 From: Thedro Neely Date: Sat, 6 Jan 2024 19:16:12 -0500 Subject: app/partials: Unify headers Make easier to maintain. Use native upload and add htm. --- app/views/index.view.php | 2 +- app/views/partials/footer.php | 2 - app/views/partials/head.css.php | 15 + app/views/partials/head.discovery.php | 5 + app/views/partials/head.js.php | 1 + app/views/partials/head.manifests.php | 7 + app/views/partials/head.meta.php | 11 + app/views/partials/header.error.php | 5 - app/views/partials/header.php | 19 +- app/views/partials/header.posts.php | 7 +- app/views/partials/header.resume.php | 22 ++ app/views/partials/header.upload.php | 18 + app/views/resume.view.php | 26 +- app/views/snippets/favicons.php | 7 - app/views/snippets/rss.php | 5 - app/views/snippets/stylesheets.php | 15 - app/views/upload.view.php | 23 +- public/css/tdro-dark.css | 13 + public/css/tdro.css | 109 ++++-- public/css/uppy.min.css | 1 - public/js/app.js | 638 +++++++++++++++++++--------------- public/js/htm.3.1.1.min.mjs | 1 + public/js/upload.js | 38 ++ public/js/uppy.min.js | 2 - 24 files changed, 587 insertions(+), 405 deletions(-) create mode 100644 app/views/partials/head.css.php create mode 100644 app/views/partials/head.discovery.php create mode 100644 app/views/partials/head.js.php create mode 100644 app/views/partials/head.manifests.php create mode 100644 app/views/partials/head.meta.php delete mode 100644 app/views/partials/header.error.php create mode 100644 app/views/partials/header.resume.php create mode 100644 app/views/partials/header.upload.php delete mode 100644 app/views/snippets/favicons.php delete mode 100644 app/views/snippets/rss.php delete mode 100644 app/views/snippets/stylesheets.php delete mode 100644 public/css/uppy.min.css create mode 100644 public/js/htm.3.1.1.min.mjs create mode 100644 public/js/upload.js delete mode 100644 public/js/uppy.min.js diff --git a/app/views/index.view.php b/app/views/index.view.php index 1331140..8bfa2c1 100644 --- a/app/views/index.view.php +++ b/app/views/index.view.php @@ -8,7 +8,7 @@
-

Web Developer

+

Web Developer

In it for the long haul

diff --git a/app/views/partials/footer.php b/app/views/partials/footer.php index 0a7b37b..fe9d9d3 100644 --- a/app/views/partials/footer.php +++ b/app/views/partials/footer.php @@ -35,5 +35,3 @@

- - diff --git a/app/views/partials/head.css.php b/app/views/partials/head.css.php new file mode 100644 index 0000000..62b2ad9 --- /dev/null +++ b/app/views/partials/head.css.php @@ -0,0 +1,15 @@ + + +color() === 'dark') { ?> + + + + diff --git a/app/views/partials/head.discovery.php b/app/views/partials/head.discovery.php new file mode 100644 index 0000000..a37df92 --- /dev/null +++ b/app/views/partials/head.discovery.php @@ -0,0 +1,5 @@ + + + + + diff --git a/app/views/partials/head.js.php b/app/views/partials/head.js.php new file mode 100644 index 0000000..f1ccc3a --- /dev/null +++ b/app/views/partials/head.js.php @@ -0,0 +1 @@ + diff --git a/app/views/partials/head.manifests.php b/app/views/partials/head.manifests.php new file mode 100644 index 0000000..f052ee5 --- /dev/null +++ b/app/views/partials/head.manifests.php @@ -0,0 +1,7 @@ + + + + + + + diff --git a/app/views/partials/head.meta.php b/app/views/partials/head.meta.php new file mode 100644 index 0000000..9f92e77 --- /dev/null +++ b/app/views/partials/head.meta.php @@ -0,0 +1,11 @@ + + <?php echo $title = $title ?? 'Portfolio - '; ?> + Thedro Neely + + + + + + + + diff --git a/app/views/partials/header.error.php b/app/views/partials/header.error.php deleted file mode 100644 index 5e11869..0000000 --- a/app/views/partials/header.error.php +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/app/views/partials/header.php b/app/views/partials/header.php index e5439be..c52ca19 100644 --- a/app/views/partials/header.php +++ b/app/views/partials/header.php @@ -1,9 +1,15 @@ - + -<?php echo $title = $title ?? 'Portfolio - '; ?>Thedro Neely + + <?php echo $title = $title ?? 'Portfolio - '; ?>Thedro Neely + @@ -12,10 +18,9 @@ - - - - - + + + + diff --git a/app/views/partials/header.posts.php b/app/views/partials/header.posts.php index d98d3c4..a473e24 100644 --- a/app/views/partials/header.posts.php +++ b/app/views/partials/header.posts.php @@ -1,6 +1,7 @@ + + + + +Resume - Thedro Neely + + + + + + + + + + + + + diff --git a/app/views/partials/header.upload.php b/app/views/partials/header.upload.php new file mode 100644 index 0000000..3710280 --- /dev/null +++ b/app/views/partials/header.upload.php @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/app/views/resume.view.php b/app/views/resume.view.php index dd3d3e8..ede40eb 100644 --- a/app/views/resume.view.php +++ b/app/views/resume.view.php @@ -1,28 +1,6 @@ - - + - - - Resume - Thedro Neely - - - - - - - - - - - - - - - - - - - + diff --git a/app/views/snippets/favicons.php b/app/views/snippets/favicons.php deleted file mode 100644 index f052ee5..0000000 --- a/app/views/snippets/favicons.php +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/app/views/snippets/rss.php b/app/views/snippets/rss.php deleted file mode 100644 index a37df92..0000000 --- a/app/views/snippets/rss.php +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/app/views/snippets/stylesheets.php b/app/views/snippets/stylesheets.php deleted file mode 100644 index 62b2ad9..0000000 --- a/app/views/snippets/stylesheets.php +++ /dev/null @@ -1,15 +0,0 @@ - - -color() === 'dark') { ?> - - - - diff --git a/app/views/upload.view.php b/app/views/upload.view.php index f504d5b..d4f913f 100644 --- a/app/views/upload.view.php +++ b/app/views/upload.view.php @@ -1,32 +1,11 @@ - + -
-
- -

Upload Files

-
-
-
-
- - - - - - - diff --git a/public/css/tdro-dark.css b/public/css/tdro-dark.css index e8238a4..8cc8fd4 100644 --- a/public/css/tdro-dark.css +++ b/public/css/tdro-dark.css @@ -92,6 +92,13 @@ input[type="button"] { box-shadow: none; } +::file-selector-button, +::-webkit-file-upload-button { + color: #fff; + background-color: #004766; + box-shadow: none; +} + button:hover, button-anchor a:hover, pagination-controller a, @@ -226,6 +233,12 @@ contact-page aside { border-color: #008fcc; } +upload-box form, +upload-box footer, +upload-box header { + border-color: #004766; +} + /* ---------------------------------------------------------- */ input::placeholder, diff --git a/public/css/tdro.css b/public/css/tdro.css index 77a3e6d..68af551 100644 --- a/public/css/tdro.css +++ b/public/css/tdro.css @@ -63,10 +63,8 @@ h2:target a, h3:target a, a:focus img, code-block[id^="code-block"]:target language-label a, -:focus:not(article-thumbnail a):not(abstract-thumbnail a):not(figure - > a):not(nav column-middle a):not(tile-item a), -:focus-visible:not(article-thumbnail a):not(abstract-thumbnail a):not(figure - > a):not(nav column-middle a):not(tile-item a) { +:focus:not(article-thumbnail a):not(abstract-thumbnail a):not(figure > a):not(nav column-middle a):not(tile-item a), +:focus-visible:not(article-thumbnail a):not(abstract-thumbnail a):not(figure > a):not(nav column-middle a):not(tile-item a) { border-radius: 0.25rem; box-shadow: 0 0 0 0.125rem #4992d0; outline: none; @@ -306,9 +304,9 @@ pagination-controller a { } button, +button-anchor a, input[type="submit"], input[type="button"], -button-anchor a, pagination-controller a { align-items: center; border: 0 solid transparent; @@ -319,6 +317,23 @@ pagination-controller a { padding: 0.25rem 1rem; } +::file-selector-button, +::-webkit-file-upload-button { + background-color: #f2f2f2; + border-color: transparent; + border-radius: 0.25rem; + border-style: solid; + border-width: 0; + box-shadow: 0 1px 1px #aaa; + cursor: pointer; + font-size: 1rem; + height: 2rem; + padding: 0.25rem 1rem; + width: 100%; + margin: 1rem 0; + display: block; +} + button svg, button-anchor a svg { stroke-width: 1.5px; @@ -588,10 +603,6 @@ recent-projects article-thumbnail { flex: none; } -upload-page h1 { - text-align: center; -} - article-subsection h1, contact-page article h1, abstracts-page article-list h1 { @@ -1032,6 +1043,17 @@ small-caps[intro] { text-transform: none; } +html[data-page="resume"]::-webkit-scrollbar { + height: 0; + width: 0; + scrollbar-width: none; +} + +body[data-page="resume"] { + margin: 0; + max-width: 100%; +} + resume-page { display: flex; min-height: 100vh; @@ -1164,6 +1186,50 @@ resume-page timeline-content { padding: 1rem 0 0 2rem; } +upload-box h1, +upload-box h2 { + text-align: center; +} + +upload-box header { + display: flex; + align-items: center; +} + +upload-box header p { + margin: 0 1rem; +} + +upload-box footer { + display: flex; +} + +upload-box footer, +upload-box header { + padding: 1rem; + margin: 0; +} + +upload-box form, +upload-box footer, +upload-box header { + border-color: #ddd; + border-style: solid; + border-width: 1px; +} + +upload-box form { + border-radius: 0.5rem; +} + +upload-box input[type="file"] { + border: 1px dashed #999; + display: block; + padding: 10rem 2rem; + text-align-last: center; + width: 100%; +} + /* ----- Attributes ----- */ [hidden] { @@ -1175,11 +1241,6 @@ resume-page timeline-content { cursor: not-allowed; } -[data-resume] { - margin: 0; - max-width: 100%; -} - /* ----- Context Menu ----- */ input[type="checkbox"]:checked ~ context-menu { @@ -1860,22 +1921,6 @@ margin-note[image] a:focus { } } -/* ----- Uppy CSS ----- */ - -.uppy-Dashboard-inner { - background-color: #fff !important; - border: 1px solid #aaa !important; - margin: 0 auto; -} - -.uppy-DashboardAddFiles { - border: 2px dashed #aaa !important; -} - -.uppy-DashboardTab { - padding: 0.5rem !important; -} - /* ----- Colors ----- */ ::selection { @@ -1934,9 +1979,9 @@ textarea { button, button-anchor a, -pagination-controller a, input[type="submit"], -input[type="button"] { +input[type="button"], +pagination-controller a { background-color: #f2f2f2; box-shadow: 0 1px 1px #aaa; } diff --git a/public/css/uppy.min.css b/public/css/uppy.min.css deleted file mode 100644 index 440bd74..0000000 --- a/public/css/uppy.min.css +++ /dev/null @@ -1 +0,0 @@ -.uppy-Root{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:left;position:relative;color:#333}.uppy-Root *,.uppy-Root :after,.uppy-Root :before{box-sizing:inherit}.uppy-Root [hidden]{display:none}.UppyIcon{max-width:100%;max-height:100%;fill:currentColor;display:inline-block;overflow:hidden}.UppyIcon--svg-baseline{bottom:-.125em;position:relative}.uppy-u-reset{-webkit-appearance:none;line-height:1;padding:0;color:inherit;-webkit-backface-visibility:visible;backface-visibility:visible;background:none;border:none;border-collapse:separate;border-image:none;border-radius:0;border-spacing:0;box-shadow:none;clear:none;cursor:auto;display:inline;empty-cells:show;float:none;font-family:inherit;font-size:inherit;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none;left:auto;letter-spacing:normal;list-style:none;margin:0;max-height:none;max-width:none;min-height:0;min-width:0;opacity:1;outline:medium none invert;overflow:visible;overflow-x:visible;overflow-y:visible;text-align:left;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;top:auto;transform:none;transform-origin:50% 50% 0;transform-style:flat;transition:none 0s ease 0s;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;z-index:auto}.uppy-c-textInput{border:1px solid #ddd;border-radius:4px;font-size:14px;line-height:1.5;padding:6px 8px;background-color:#fff}.uppy-size--md .uppy-c-textInput{padding:8px 10px}.uppy-c-textInput:focus{border-color:rgba(34,117,215,.6);outline:none;box-shadow:0 0 0 3px rgba(34,117,215,.15)}.uppy-c-btn{display:inline-block;text-align:center;white-space:nowrap;vertical-align:middle;font-family:inherit;font-size:16px;line-height:1;font-weight:500;transition:background-color .3s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.uppy-c-btn:not(:disabled):not(.disabled){cursor:pointer}.uppy-c-btn::-moz-focus-inner{border:0}.uppy-c-btn-primary{font-size:14px;padding:10px 18px;border-radius:4px;background-color:#2275d7;color:#fff}.uppy-size--md .uppy-c-btn-primary{padding:13px 22px}.uppy-c-btn-primary:hover{background-color:#1b5dab}.uppy-c-btn-primary:focus{outline:none;box-shadow:0 0 0 3px rgba(34,117,215,.4)}.uppy-c-btn-link{font-size:14px;line-height:1;padding:10px 15px;border-radius:4px;background-color:transparent;color:#525252}.uppy-size--md .uppy-c-btn-link{padding:13px 18px}.uppy-c-btn-link:hover{color:#333}.uppy-c-btn-link:focus{outline:none;box-shadow:0 0 0 3px rgba(34,117,215,.25)}.uppy-c-btn--small{font-size:.9em;padding:7px 16px;border-radius:2px}.uppy-size--md .uppy-c-btn--small{padding:8px 10px;border-radius:2px}.uppy-Informer{position:absolute;bottom:60px;left:0;right:0;text-align:center;opacity:1;transform:none;transition:all .25s ease-in;z-index:1005}.uppy-Informer[aria-hidden=true]{opacity:0;transform:translateY(350%);transition:all .3s ease-in;z-index:-1000}.uppy-Informer p{display:inline-block;margin:0;font-size:12px;line-height:1.4;font-weight:400;padding:6px 15px;background-color:#757575;color:#fff;border-radius:18px;max-width:90%}.uppy-size--md .uppy-Informer p{font-size:14px;line-height:1.3;max-width:500px;padding:10px 20px}.uppy-Informer span{line-height:12px;width:13px;height:13px;display:inline-block;vertical-align:middle;color:#525252;background-color:#fff;border-radius:50%;position:relative;top:-1px;left:3px;font-size:10px;margin-left:-1px}.uppy-Informer span:hover{cursor:help}.uppy-Informer span:after{line-height:1.3;word-wrap:break-word}.uppy-Root [aria-label][role~=tooltip]{position:relative}.uppy-Root [aria-label][role~=tooltip]:after,.uppy-Root [aria-label][role~=tooltip]:before{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden;will-change:transform;opacity:0;pointer-events:none;transition:all var(--microtip-transition-duration,.18s) var(--microtip-transition-easing,ease-in-out) var(--microtip-transition-delay,0s);position:absolute;box-sizing:border-box;z-index:10;transform-origin:top}.uppy-Root [aria-label][role~=tooltip]:before{background-size:100% auto!important;content:""}.uppy-Root [aria-label][role~=tooltip]:after{background:rgba(17,17,17,.9);border-radius:4px;color:#fff;content:attr(aria-label);font-size:var(--microtip-font-size,13px);font-weight:var(--microtip-font-weight,normal);text-transform:var(--microtip-text-transform,none);padding:.5em 1em;white-space:nowrap;box-sizing:content-box}.uppy-Root [aria-label][role~=tooltip]:focus:after,.uppy-Root [aria-label][role~=tooltip]:focus:before,.uppy-Root [aria-label][role~=tooltip]:hover:after,.uppy-Root [aria-label][role~=tooltip]:hover:before{opacity:1;pointer-events:auto}.uppy-Root [role~=tooltip][data-microtip-position|=top]:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M2.658 0h32.004c-6 0-11.627 12.002-16.002 12.002C14.285 12.002 8.594 0 2.658 0z'/%3E%3C/svg%3E") no-repeat;height:6px;width:18px;margin-bottom:5px}.uppy-Root [role~=tooltip][data-microtip-position|=top]:after{margin-bottom:11px}.uppy-Root [role~=tooltip][data-microtip-position|=top]:before{transform:translate3d(-50%,0,0);bottom:100%;left:50%}.uppy-Root [role~=tooltip][data-microtip-position|=top]:hover:before{transform:translate3d(-50%,-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position|=top]:after{transform:translate3d(-50%,0,0);bottom:100%;left:50%}.uppy-Root [role~=tooltip][data-microtip-position=top]:hover:after{transform:translate3d(-50%,-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-left]:after{transform:translate3d(calc(-100% + 16px),0,0);bottom:100%}.uppy-Root [role~=tooltip][data-microtip-position=top-left]:hover:after{transform:translate3d(calc(-100% + 16px),-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-right]:after{transform:translate3d(-16px,0,0);bottom:100%}.uppy-Root [role~=tooltip][data-microtip-position=top-right]:hover:after{transform:translate3d(-16px,-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M33.342 12H1.338c6 0 11.627-12.002 16.002-12.002C21.715-.002 27.406 12 33.342 12z'/%3E%3C/svg%3E") no-repeat;height:6px;width:18px;margin-top:5px;margin-bottom:0}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:after{margin-top:11px}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:before{transform:translate3d(-50%,-10px,0);bottom:auto;left:50%;top:100%}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:hover:before{transform:translate3d(-50%,0,0)}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:after{transform:translate3d(-50%,-10px,0);top:100%;left:50%}.uppy-Root [role~=tooltip][data-microtip-position=bottom]:hover:after{transform:translate3d(-50%,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-left]:after{transform:translate3d(calc(-100% + 16px),-10px,0);top:100%}.uppy-Root [role~=tooltip][data-microtip-position=bottom-left]:hover:after{transform:translate3d(calc(-100% + 16px),0,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-right]:after{transform:translate3d(-16px,-10px,0);top:100%}.uppy-Root [role~=tooltip][data-microtip-position=bottom-right]:hover:after{transform:translate3d(-16px,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=left]:after,.uppy-Root [role~=tooltip][data-microtip-position=left]:before{bottom:auto;left:auto;right:100%;top:50%;transform:translate3d(10px,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=left]:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='36'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M0 33.342V1.338c0 6 12.002 11.627 12.002 16.002C12.002 21.715 0 27.406 0 33.342z'/%3E%3C/svg%3E") no-repeat;height:18px;width:6px;margin-right:5px;margin-bottom:0}.uppy-Root [role~=tooltip][data-microtip-position=left]:after{margin-right:11px}.uppy-Root [role~=tooltip][data-microtip-position=left]:hover:after,.uppy-Root [role~=tooltip][data-microtip-position=left]:hover:before{transform:translate3d(0,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=right]:after,.uppy-Root [role~=tooltip][data-microtip-position=right]:before{bottom:auto;left:100%;top:50%;transform:translate3d(-10px,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=right]:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='36'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M12 2.658v32.004c0-6-12.002-11.627-12.002-16.002C-.002 14.285 12 8.594 12 2.658z'/%3E%3C/svg%3E") no-repeat;height:18px;width:6px;margin-bottom:0;margin-left:5px}.uppy-Root [role~=tooltip][data-microtip-position=right]:after{margin-left:11px}.uppy-Root [role~=tooltip][data-microtip-position=right]:hover:after,.uppy-Root [role~=tooltip][data-microtip-position=right]:hover:before{transform:translate3d(0,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-size=small]:after{white-space:normal;width:80px}.uppy-Root [role~=tooltip][data-microtip-size=medium]:after{white-space:normal;width:150px}.uppy-Root [role~=tooltip][data-microtip-size=large]:after{white-space:normal;width:260px}.uppy-StatusBar{display:-ms-flexbox;display:flex;position:relative;height:40px;line-height:40px;font-size:12px;font-weight:400;color:#fff;background-color:#fff;z-index:1001;transition:height .2s}.uppy-size--md .uppy-StatusBar{height:46px}.uppy-StatusBar:before{content:"";position:absolute;left:0;right:0;top:0;bottom:0;width:100%;height:2px;background-color:#eaeaea}.uppy-StatusBar[aria-hidden=true]{overflow-y:hidden;height:0}.uppy-StatusBar.is-complete .uppy-StatusBar-progress{background-color:#1bb240}.uppy-StatusBar.is-error .uppy-StatusBar-progress{background-color:#e32437}.uppy-StatusBar.is-complete .uppy-StatusBar-statusIndicator{color:#1bb240}.uppy-StatusBar.is-error .uppy-StatusBar-statusIndicator{color:#e32437}.uppy-StatusBar:not([aria-hidden=true]).is-waiting{background-color:#fff;height:65px;border-top:1px solid #eaeaea}.uppy-StatusBar-progress{background-color:#2275d7;height:2px;position:absolute;z-index:1001;transition:background-color,width .3s ease-out}.uppy-StatusBar-progress.is-indeterminate{background-size:64px 64px;background-image:linear-gradient(45deg,rgba(0,0,0,.3) 25%,transparent 0,transparent 50%,rgba(0,0,0,.3) 0,rgba(0,0,0,.3) 75%,transparent 0,transparent);animation:uppy-StatusBar-ProgressStripes 1s linear infinite}@keyframes uppy-StatusBar-ProgressStripes{0%{background-position:0 0}to{background-position:64px 0}}.uppy-StatusBar.is-postprocessing .uppy-StatusBar-progress,.uppy-StatusBar.is-preprocessing .uppy-StatusBar-progress{background-color:#f6a623}.uppy-StatusBar.is-waiting .uppy-StatusBar-progress{display:none}.uppy-StatusBar-content{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:relative;z-index:1002;padding-left:10px;white-space:nowrap;text-overflow:ellipsis;color:#333;height:100%}.uppy-size--md .uppy-StatusBar-content{padding-left:15px}.uppy-StatusBar-status{line-height:1.4;font-weight:400;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;padding-right:.3em}.uppy-Root:not(.uppy-size--md) .uppy-StatusBar-additionalInfo{display:none}.uppy-StatusBar-statusPrimary{font-weight:500}.uppy-StatusBar-statusSecondary{margin-top:1px;font-size:11px;line-height:1.2;display:inline-block;color:#757575;white-space:nowrap}.uppy-StatusBar-statusSecondaryHint{display:inline-block;vertical-align:middle;margin-right:5px;line-height:1}.uppy-size--md .uppy-StatusBar-statusSecondaryHint{margin-right:8px}.uppy-StatusBar-statusIndicator{position:relative;top:1px;color:#525252;margin-right:7px}.uppy-StatusBar-statusIndicator svg{vertical-align:text-bottom}.uppy-StatusBar-actions{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;top:0;bottom:0;right:10px;z-index:1004}.uppy-StatusBar.is-waiting .uppy-StatusBar-actions{width:100%;position:static;padding:0 15px;background-color:#fafafa}.uppy-StatusBar-actionCircleBtn{line-height:1;cursor:pointer;margin:3px;opacity:.9}.uppy-StatusBar-actionCircleBtn:focus{outline:none}.uppy-StatusBar-actionCircleBtn::-moz-focus-inner{border:0}.uppy-StatusBar-actionCircleBtn:focus{box-shadow:0 0 0 3px rgba(34,117,215,.5)}.uppy-StatusBar-actionCircleBtn:hover{opacity:1}.uppy-StatusBar-actionCircleBtn:focus{border-radius:50%}.uppy-StatusBar-actionCircleBtn svg{vertical-align:bottom}.uppy-StatusBar-actionBtn{display:inline-block;vertical-align:middle;font-size:10px;line-height:inherit;color:#2275d7}.uppy-size--md .uppy-StatusBar-actionBtn{font-size:11px}.uppy-StatusBar-actionBtn--retry{height:16px;border-radius:8px;margin-right:6px;background-color:#ff4b23;line-height:1;color:#fff;padding:1px 6px 3px 18px;position:relative}.uppy-StatusBar-actionBtn--retry:focus{outline:none}.uppy-StatusBar-actionBtn--retry::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--retry:focus{box-shadow:0 0 0 3px rgba(34,117,215,.5)}.uppy-StatusBar-actionBtn--retry:hover{background-color:#f92d00}.uppy-StatusBar-actionBtn--retry svg{position:absolute;top:3px;left:6px}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{font-size:14px;width:100%;padding:15px 10px;color:#fff;background-color:#1bb240;line-height:1}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload:hover{background-color:#148630}.uppy-size--md .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{padding:13px 22px;width:auto}.uppy-StatusBar:not(.is-waiting) .uppy-StatusBar-actionBtn--upload{background-color:transparent;color:#2275d7}.uppy-StatusBar-actionBtn--uploadNewlyAdded{padding-right:3px;padding-left:3px;padding-bottom:1px;border-radius:3px}.uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{outline:none}.uppy-StatusBar-actionBtn--uploadNewlyAdded::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{box-shadow:0 0 0 3px rgba(34,117,215,.5)}.uppy-StatusBar-details{line-height:12px;width:13px;height:13px;display:inline-block;vertical-align:middle;color:#fff;background-color:#939393;border-radius:50%;position:relative;top:0;left:2px;font-size:10px;font-weight:600;text-align:center;cursor:help}.uppy-StatusBar-details:after{line-height:1.3;word-wrap:break-word}.uppy-StatusBar-spinner{animation-name:uppy-StatusBar-spinnerAnimation;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear;margin-right:10px;fill:#2275d7}.uppy-StatusBar.is-postprocessing .uppy-StatusBar-spinner,.uppy-StatusBar.is-preprocessing .uppy-StatusBar-spinner{fill:#f6a623}@keyframes uppy-StatusBar-spinnerAnimation{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.uppy-ProviderBrowser-viewType--grid ul.uppy-ProviderBrowser-list{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:start;align-items:flex-start;padding:6px}.uppy-ProviderBrowser-viewType--grid ul.uppy-ProviderBrowser-list:after{content:"";-ms-flex:auto;flex:auto}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem{width:50%;position:relative;margin:0}.uppy-size--md .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem{width:33.3333%}.uppy-size--lg .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem{width:25%}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem:before{content:"";padding-top:100%;display:block}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--selected img,.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--selected svg{opacity:.85}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner{background-color:hsla(0,0%,57.6%,.3)}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview svg{fill:rgba(0,0,0,.7);width:30%;height:30%}.uppy-ProviderBrowser-viewType--grid button.uppy-ProviderBrowserItem-inner{border-radius:4px;overflow:hidden;position:absolute;top:7px;left:7px;right:7px;bottom:7px;text-align:center}.uppy-ProviderBrowser-viewType--grid button.uppy-ProviderBrowserItem-inner:focus{outline:none;box-shadow:0 0 0 3px rgba(34,117,215,.9)}.uppy-ProviderBrowser-viewType--grid button.uppy-ProviderBrowserItem-inner img,.uppy-ProviderBrowser-viewType--grid button.uppy-ProviderBrowserItem-inner svg{width:100%;height:100%;object-fit:cover;border-radius:4px}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-fakeCheckbox{position:absolute;top:16px;right:16px;width:26px;height:26px;background-color:#2275d7;border-radius:50%;z-index:1002;opacity:0}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-fakeCheckbox:after{width:12px;height:7px;left:7px;top:8px}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-fakeCheckbox--is-checked{opacity:1}.uppy-ProviderBrowser-viewType--list{background-color:#fff}.uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:7px 15px;margin:0}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-fakeCheckbox{margin-right:15px;height:17px;width:17px;border-radius:3px;background-color:#fff;border:1px solid #cfcfcf}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-fakeCheckbox:focus{border:1px solid #2275d7;box-shadow:0 0 0 3px rgba(34,117,215,.25);outline:none}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-fakeCheckbox:after{opacity:0;height:5px;width:9px;left:3px;top:4px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-fakeCheckbox--is-checked{background-color:#2275d7;border-color:#2275d7}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-fakeCheckbox--is-checked:after{opacity:1}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:2px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner:focus{outline:none;text-decoration:underline}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner img,.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner svg{margin-right:8px;max-width:20px;max-height:20px}.uppy-ProviderBrowserItem-fakeCheckbox{position:relative;cursor:pointer}.uppy-ProviderBrowserItem-fakeCheckbox:after{content:"";position:absolute;cursor:pointer;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg)}.uppy-DashboardContent-panelBody{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex:1;flex:1}.uppy-Provider-auth,.uppy-Provider-empty,.uppy-Provider-error,.uppy-Provider-loading{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-flow:column wrap;flex-flow:column wrap;-ms-flex:1;flex:1;color:#939393}.uppy-Provider-empty{color:#939393}.uppy-Provider-authIcon svg{width:100px;height:75px;margin-bottom:15px}.uppy-Provider-authTitle{font-size:17px;line-height:1.4;font-weight:400;margin-bottom:30px;padding:0 15px;max-width:500px;text-align:center;color:#757575}.uppy-size--md .uppy-Provider-authTitle{font-size:20px}.uppy-Provider-breadcrumbs{-ms-flex:1;flex:1;color:#525252;font-size:12px;margin-bottom:10px;text-align:left}.uppy-size--md .uppy-Provider-breadcrumbs{margin-bottom:0}.uppy-Provider-breadcrumbsIcon{display:inline-block;color:#525252;vertical-align:middle;margin-right:4px;line-height:1}.uppy-Provider-breadcrumbsIcon svg{width:13px;height:13px;fill:#525252}.uppy-Provider-breadcrumbs button{display:inline-block;line-height:inherit;padding:4px;border-radius:3px}.uppy-Provider-breadcrumbs button:focus{outline:none}.uppy-Provider-breadcrumbs button::-moz-focus-inner{border:0}.uppy-Provider-breadcrumbs button:hover{color:#1b5dab}.uppy-Provider-breadcrumbs button:focus{background-color:#eceef2}.uppy-Provider-breadcrumbs button:hover{text-decoration:underline;cursor:pointer}.uppy-ProviderBrowser{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;font-size:14px;font-weight:400;height:100%}.uppy-ProviderBrowser-user{margin:0 8px 0 0;font-weight:500;color:#333}.uppy-ProviderBrowser-user:after{content:"\00B7";position:relative;left:4px;color:#939393;font-weight:400}.uppy-ProviderBrowser-header{z-index:1001;border-bottom:1px solid #eaeaea;position:relative}.uppy-ProviderBrowser-headerBar{padding:7px 15px;background-color:#fafafa;z-index:1001;color:#757575;line-height:1.4;font-size:12px}.uppy-size--md .uppy-ProviderBrowser-headerBar{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.uppy-ProviderBrowser-headerBar--simple{text-align:center;display:block;-ms-flex-pack:center;justify-content:center}.uppy-ProviderBrowser-headerBar--simple .uppy-Provider-breadcrumbsWrap{-ms-flex:none;flex:none;display:inline-block;vertical-align:middle}.uppy-ProviderBrowser-search{width:100%;background-color:#fff;position:relative;height:30px;margin-top:10px;margin-bottom:5px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.uppy-ProviderBrowser-searchIcon{position:absolute;width:12px;height:12px;left:16px;z-index:1002;color:#bbb}.uppy-ProviderBrowser-searchInput{width:100%;height:30px;background-color:transparent;outline:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:12px;line-height:1.4;border:0;margin:0 8px;padding-left:27px;z-index:1001;border-radius:4px}.uppy-ProviderBrowser-searchInput:focus{outline:0;background-color:#f4f4f4}.uppy-ProviderBrowser-searchClose{position:absolute;width:22px;height:22px;padding:6px;right:12px;top:4px;z-index:1002;color:#939393;cursor:pointer}.uppy-ProviderBrowser-searchClose:hover{color:#757575}.uppy-ProviderBrowser-searchClose svg{vertical-align:text-top}.uppy-ProviderBrowser-searchInput:-ms-input-placeholder{color:#939393;opacity:1}.uppy-ProviderBrowser-searchInput::-ms-input-placeholder{color:#939393;opacity:1}.uppy-ProviderBrowser-searchInput::placeholder{color:#939393;opacity:1}.uppy-ProviderBrowser-userLogout{cursor:pointer;line-height:inherit;color:#2275d7;padding:4px;border-radius:3px}.uppy-ProviderBrowser-userLogout:focus{outline:none}.uppy-ProviderBrowser-userLogout::-moz-focus-inner{border:0}.uppy-ProviderBrowser-userLogout:hover{color:#1b5dab}.uppy-ProviderBrowser-userLogout:focus{background-color:#eceef2}.uppy-ProviderBrowser-userLogout:hover{text-decoration:underline}.uppy-ProviderBrowser-body{-ms-flex:1;flex:1;position:relative}.uppy-ProviderBrowser-list{-ms-flex:1;flex:1;position:relative;display:block;width:100%;height:100%;background-color:#fff;border-spacing:0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;position:absolute;top:0;bottom:0;left:0;right:0;list-style:none;margin:0;padding:0}.uppy-ProviderBrowserItem-inner{cursor:pointer;font-weight:500;font-size:13px}.uppy-ProviderBrowser-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:#fff;height:65px;border-top:1px solid #eaeaea;padding:0 15px}.uppy-ProviderBrowser-footer button{margin-right:8px}.uppy-DashboardItem-previewInnerWrap{width:100%;height:100%;overflow:hidden;position:relative;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;box-shadow:0 0 2px 0 rgba(0,0,0,.4);border-radius:3px}.uppy-size--md .uppy-DashboardItem-previewInnerWrap{box-shadow:0 1px 2px rgba(0,0,0,.15)}.uppy-DashboardItem-previewInnerWrap:after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;background-color:rgba(0,0,0,.65);display:none;z-index:1001}.uppy-DashboardItem-previewLink{position:absolute;left:0;right:0;top:0;bottom:0;z-index:1002}.uppy-DashboardItem-previewLink:focus{box-shadow:inset 0 0 0 3px #76abe9}.uppy-DashboardItem-preview img.uppy-DashboardItem-previewImg{width:100%;height:100%;object-fit:cover;transform:translateZ(0);border-radius:3px}.uppy-DashboardItem-progress{display:none;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:1002;color:#fff;text-align:center;width:120px;transition:all .35 ease}.uppy-DashboardItem-progressIndicator{display:inline-block;width:38px;height:38px;opacity:.9;cursor:pointer}.uppy-DashboardItem-progressIndicator:focus{outline:none}.uppy-DashboardItem-progressIndicator::-moz-focus-inner{border:0}.uppy-DashboardItem-progressIndicator:focus svg.retry,.uppy-DashboardItem-progressIndicator:focus svg.UppyIcon-progressCircle .bg{fill:#76abe9}svg.UppyIcon-progressCircle{width:100%;height:100%}svg.UppyIcon-progressCircle .bg{stroke:hsla(0,0%,100%,.4);opacity:0}svg.UppyIcon-progressCircle .progress{stroke:#fff;transition:stroke-dashoffset .5s ease-out;opacity:0}svg.UppyIcon-progressCircle .play{stroke:#fff;display:none}svg.UppyIcon-progressCircle .cancel,svg.UppyIcon-progressCircle .pause,svg.UppyIcon-progressCircle .play{fill:#fff;opacity:0;transition:all .2s}svg.UppyIcon-progressCircle .pause{stroke:#fff;display:none}svg.UppyIcon-progressCircle .check{opacity:0;fill:#fff;transition:all .2s}svg.UppyIcon.retry{fill:#fff}.uppy-DashboardItem.is-complete .uppy-DashboardItem-progress{transform:none;top:-9px;right:-8px;left:auto;width:auto}.uppy-DashboardItem.is-complete .uppy-DashboardItem-progress,.uppy-DashboardItem.is-error .uppy-DashboardItem-progress,.uppy-DashboardItem.is-inprogress .uppy-DashboardItem-progress{display:block}.uppy-DashboardItem.is-error .uppy-DashboardItem-progressIndicator{width:18px;height:18px}.uppy-size--md .uppy-DashboardItem.is-error .uppy-DashboardItem-progressIndicator{width:28px;height:28px}.uppy-DashboardItem.is-complete .uppy-DashboardItem-progressIndicator{width:18px;height:18px;opacity:1}.uppy-size--md .uppy-DashboardItem.is-complete .uppy-DashboardItem-progressIndicator{width:22px;height:22px}.uppy-DashboardItem.is-paused svg.UppyIcon-progressCircle .pause{opacity:0}.uppy-DashboardItem.is-paused svg.UppyIcon-progressCircle .play{opacity:1}.uppy-DashboardItem.is-noIndividualCancellation .uppy-DashboardItem-progressIndicator{cursor:default}.uppy-DashboardItem.is-noIndividualCancellation .cancel{display:none}.uppy-DashboardItem.is-processing .uppy-DashboardItem-progress{opacity:0}.uppy-DashboardItem.is-complete .uppy-DashboardItem-progressIndicator{cursor:default}.uppy-DashboardItem.is-complete .progress{stroke:#1bb240;fill:#1bb240;opacity:1}.uppy-DashboardItem.is-complete .check{opacity:1}.uppy-size--md .uppy-DashboardItem-progressIndicator{width:55px;height:55px}.uppy-DashboardItem.is-resumable .pause,.uppy-DashboardItem.is-resumable .play{display:block}.uppy-DashboardItem.is-resumable .cancel{display:none}.uppy-DashboardItem.is-inprogress .bg,.uppy-DashboardItem.is-inprogress .cancel,.uppy-DashboardItem.is-inprogress .pause,.uppy-DashboardItem.is-inprogress .progress{opacity:1}.uppy-DashboardItem-fileInfo{padding-right:5px}.uppy-DashboardItem-name{font-size:12px;line-height:1.3;font-weight:500;margin-bottom:4px;word-break:break-all;word-wrap:anywhere}.uppy-DashboardItem-status{font-size:11px;line-height:1.3;font-weight:400;color:#757575}.uppy-DashboardItem-statusSize{display:inline-block;vertical-align:bottom;text-transform:uppercase}.uppy-DashboardItem-sourceIcon{display:inline-block;vertical-align:bottom;color:#bbb}.uppy-DashboardItem-sourceIcon:not(:first-child){position:relative;margin-left:14px}.uppy-DashboardItem-sourceIcon svg,.uppy-DashboardItem-sourceIcon svg *{max-width:100%;max-height:100%;display:inline-block;vertical-align:text-bottom;overflow:hidden;fill:currentColor;width:11px;height:12px}.uppy-DashboardItem-action{cursor:pointer;color:#939393}.uppy-DashboardItem-action:focus{outline:none}.uppy-DashboardItem-action::-moz-focus-inner{border:0}.uppy-DashboardItem-action:focus{box-shadow:0 0 0 3px rgba(34,117,215,.5)}.uppy-DashboardItem-action:hover{opacity:1;color:#1f1f1f}.uppy-DashboardItem-action--remove{color:#1f1f1f;opacity:.95}.uppy-Dashboard:not(.uppy-size--md) .uppy-DashboardItem-actionWrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.uppy-Dashboard:not(.uppy-size--md) .uppy-DashboardItem-action{width:22px;height:22px;padding:3px;margin-left:3px}.uppy-Dashboard:not(.uppy-size--md) .uppy-DashboardItem-action:focus{border-radius:3px}.uppy-size--md .uppy-DashboardItem-action--copyLink,.uppy-size--md .uppy-DashboardItem-action--edit{width:16px;height:16px;padding:0}.uppy-size--md .uppy-DashboardItem-action--copyLink:focus,.uppy-size--md .uppy-DashboardItem-action--edit:focus{border-radius:3px}.uppy-size--md .uppy-DashboardItem-action--remove{z-index:1002;position:absolute;top:-8px;right:-8px;width:18px;height:18px;padding:0}.uppy-size--md .uppy-DashboardItem-action--remove:focus{border-radius:50%}.uppy-Dashboard:not(.uppy-size--md) .uppy-DashboardItem{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-bottom:1px solid #eaeaea;padding:10px 0 10px 10px}.uppy-size--md .uppy-DashboardItem{position:relative;display:block;float:left;margin:5px 15px;width:calc(33.333% - 30px);height:215px}.uppy-size--lg .uppy-DashboardItem{margin:5px 15px;width:calc(25% - 30px);height:190px}.uppy-size--xl .uppy-DashboardItem{width:calc(20% - 30px);height:210px}.uppy-DashboardItem-preview{position:relative}.uppy-Dashboard:not(.uppy-size--md) .uppy-DashboardItem-preview{-ms-flex-negative:0;flex-shrink:0;-ms-flex-positive:0;flex-grow:0;width:50px;height:50px}.uppy-size--md .uppy-DashboardItem-preview{width:100%;height:140px}.uppy-size--lg .uppy-DashboardItem-preview{height:120px}.uppy-size--xl .uppy-DashboardItem-preview{height:140px}.uppy-DashboardItem-fileInfoAndButtons{-ms-flex-positive:1;flex-grow:1;padding-right:8px;padding-left:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.uppy-size--md .uppy-DashboardItem-fileInfoAndButtons{-ms-flex-align:start;align-items:flex-start;width:100%;padding:9px 0 0}.uppy-DashboardItem-fileInfo{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1}.uppy-DashboardItem-actionWrapper{-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}.uppy-DashboardItem.is-inprogress .uppy-DashboardItem-previewInnerWrap:after{display:block}.uppy-DashboardItem.is-error .uppy-DashboardItem-previewInnerWrap:after{display:block}.uppy-DashboardItem.is-inprogress:not(.is-resumable) .uppy-DashboardItem-action--remove{display:none}.uppy-Dashboard-FileCard{width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0;z-index:1005;box-shadow:0 0 10px 4px rgba(0,0,0,.1);background-color:#fff;border-radius:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.uppy-Dashboard-FileCard .uppy-DashboardContent-bar{border-top-left-radius:5px;border-top-right-radius:5px}.uppy-Dashboard-FileCard .uppy-Dashboard-FileCard-actions{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.uppy-Dashboard-FileCard-inner{height:100%;-ms-flex-positive:1;flex-grow:1;-ms-flex-direction:column;flex-direction:column}.uppy-Dashboard-FileCard-inner,.uppy-Dashboard-FileCard-preview{-ms-flex-negative:1;flex-shrink:1;min-height:0;display:-ms-flexbox;display:flex}.uppy-Dashboard-FileCard-preview{height:60%;-ms-flex-positive:0;flex-grow:0;border-bottom:1px solid #eaeaea;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.uppy-Dashboard-FileCard-preview img.uppy-DashboardItem-previewImg{max-width:90%;max-height:90%;object-fit:cover;-ms-flex:0 0 auto;flex:0 0 auto;border-radius:3px;box-shadow:0 3px 20px rgba(0,0,0,.15)}.uppy-Dashboard-FileCard-info{height:40%;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;padding:30px 20px 20px;overflow-y:auto;-webkit-overflow-scrolling:touch}.uppy-Dashboard-FileCard-fieldset{font-size:0;border:0;padding:0;max-width:640px;margin:auto auto 12px}.uppy-Dashboard-FileCard-label{display:inline-block;vertical-align:middle;width:22%;font-size:12px;color:#525252}.uppy-size--md .uppy-Dashboard-FileCard-label{font-size:14px}.uppy-Dashboard-FileCard-input{display:inline-block;vertical-align:middle;width:78%}.uppy-Dashboard-FileCard-actions{height:55px;-ms-flex-negative:0;flex-shrink:0;-ms-flex-positive:0;flex-grow:0;border-top:1px solid #eaeaea;padding:0 15px;background-color:#fafafa;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.uppy-size--md .uppy-Dashboard-FileCard-actions{height:65px}.uppy-Dashboard-FileCard-actionsBtn{margin-right:10px}.uppy-transition-slideDownUp-enter{opacity:.01;transform:translate3d(0,-105%,0);transition:transform .25s ease-in-out,opacity .25s ease-in-out}.uppy-transition-slideDownUp-enter.uppy-transition-slideDownUp-enter-active{opacity:1;transform:translateZ(0)}.uppy-transition-slideDownUp-leave{opacity:1;transform:translateZ(0);transition:transform .25s ease-in-out,opacity .25s ease-in-out}.uppy-transition-slideDownUp-leave.uppy-transition-slideDownUp-leave-active{opacity:.01;transform:translate3d(0,-105%,0)}.uppy-Dashboard--modal{z-index:1001}.uppy-Dashboard--modal[aria-hidden=true]{display:none}@keyframes uppy-Dashboard-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes uppy-Dashboard-fadeOut{0%{opacity:1}to{opacity:0}}@keyframes uppy-Dashboard-slideDownAndFadeIn{0%{transform:translate3d(-50%,-70%,0);opacity:0}to{transform:translate3d(-50%,-50%,0);opacity:1}}@keyframes uppy-Dashboard-slideDownAndFadeIn--small{0%{transform:translate3d(0,-20%,0);opacity:0}to{transform:translateZ(0);opacity:1}}@keyframes uppy-Dashboard-slideUpFadeOut{0%{transform:translate3d(-50%,-50%,0);opacity:1}to{transform:translate3d(-50%,-70%,0);opacity:0}}@keyframes uppy-Dashboard-slideUpFadeOut--small{0%{transform:translateZ(0);opacity:1}to{transform:translate3d(0,-20%,0);opacity:0}}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideDownAndFadeIn--small .3s cubic-bezier(0,0,.2,1)}@media only screen and (min-width:820px){.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideDownAndFadeIn .3s cubic-bezier(0,0,.2,1)}}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-overlay{animation:uppy-Dashboard-fadeIn .3s cubic-bezier(0,0,.2,1)}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideUpFadeOut--small .3s cubic-bezier(0,0,.2,1)}@media only screen and (min-width:820px){.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideUpFadeOut .3s cubic-bezier(0,0,.2,1)}}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-overlay{animation:uppy-Dashboard-fadeOut .3s cubic-bezier(0,0,.2,1)}.uppy-Dashboard-isFixed{overflow:hidden;height:100vh}.uppy-Dashboard--modal .uppy-Dashboard-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.5);z-index:1001}.uppy-Dashboard-inner{position:relative;background-color:#fafafa;max-width:100%;max-height:100%;min-height:450px;outline:none;border:1px solid #eaeaea;border-radius:5px}.uppy-size--md .uppy-Dashboard-inner{min-height:auto}@media only screen and (min-width:820px){.uppy-Dashboard-inner{width:750px;height:550px}}.uppy-Dashboard--modal .uppy-Dashboard-inner{z-index:1002}.uppy-Dashboard-innerWrap{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;overflow:hidden;position:relative;border-radius:5px;opacity:0}.uppy-Dashboard--isInnerWrapVisible .uppy-Dashboard-innerWrap{opacity:1}.uppy-Dashboard--modal .uppy-Dashboard-inner{position:fixed;top:35px;left:15px;right:15px;bottom:15px;border:none}@media only screen and (min-width:820px){.uppy-Dashboard--modal .uppy-Dashboard-inner{top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 5px 15px 4px rgba(0,0,0,.15)}}.uppy-Dashboard-close{display:block;position:absolute;top:-33px;right:-2px;cursor:pointer;color:hsla(0,0%,100%,.9);font-size:27px;z-index:1005}.uppy-Dashboard-close:focus{outline:none}.uppy-Dashboard-close::-moz-focus-inner{border:0}.uppy-Dashboard-close:focus{color:#8cb8ed}@media only screen and (min-width:820px){.uppy-Dashboard-close{font-size:35px;top:-10px;right:-35px}}.uppy-DashboardAddFiles{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;height:100%;position:relative;text-align:center;-ms-flex:1;flex:1}.uppy-size--md .uppy-DashboardAddFiles{margin:7px;border-radius:3px;border:1px dashed #dfdfdf}.uppy-Dashboard-AddFilesPanel .uppy-DashboardAddFiles{border:none}.uppy-Dashboard--modal .uppy-DashboardAddFiles{border-color:#cfcfcf}.uppy-DashboardTabs{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.uppy-size--md .uppy-DashboardTabs{-ms-flex-align:center;align-items:center}.uppy-DashboardTabs-title{font-size:14px;line-height:30px;font-weight:400;margin:0;padding:0;text-align:center;color:#525252}.uppy-size--md .uppy-DashboardTabs-title{font-size:16px;line-height:40px}.uppy-DashboardAddFiles-info{padding-top:15px;padding-bottom:15px}.uppy-size--md .uppy-DashboardAddFiles-info{position:absolute;bottom:30px;left:0;right:0;padding-top:30px;padding-bottom:0}.uppy-Dashboard-browse{cursor:pointer;color:rgba(34,117,215,.9)}.uppy-Dashboard-browse:focus{outline:none}.uppy-Dashboard-browse::-moz-focus-inner{border:0}.uppy-Dashboard-browse:focus,.uppy-Dashboard-browse:hover{border-bottom:2px solid #2275d7}.uppy-DashboardTabs-list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:300px;overflow-x:auto;-webkit-overflow-scrolling:touch;margin-top:10px;padding:2px 0}.uppy-size--md .uppy-DashboardTabs-list{-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;max-width:600px;overflow-x:initial;margin-top:15px;padding-top:0}.uppy-DashboardTab{width:100%;display:inline-block;text-align:center;border-bottom:1px solid #eaeaea;padding:0 2px}.uppy-size--md .uppy-DashboardTab{width:auto;margin-bottom:20px;border-bottom:none;padding:0}.uppy-DashboardTab-btn{width:100%;height:100%;cursor:pointer;border:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;color:#525252;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:12px 15px;line-height:1;text-align:center}.uppy-size--md .uppy-DashboardTab-btn{width:86px;margin-right:1px;-ms-flex-direction:column;flex-direction:column;padding:10px 3px;border-radius:5px}.uppy-DashboardTab-btn::-moz-focus-inner{border:0}.uppy-DashboardTab-btn:hover{background-color:#f1f3f6}.uppy-DashboardTab-btn:active,.uppy-DashboardTab-btn:focus{background-color:#eceef2;outline:none}.uppy-DashboardTab-btn svg{margin-right:10px}.uppy-size--md .uppy-DashboardTab-btn svg{margin-right:0}.uppy-DashboardTab-btn svg{max-width:100%;max-height:100%;display:inline-block;vertical-align:text-top;overflow:hidden;transition:transform .15s ease-in-out}.uppy-DashboardTab-name{font-size:14px;font-weight:500}.uppy-size--md .uppy-DashboardTab-name{font-size:11px;line-height:14px;margin-top:8px;margin-bottom:0}.uppy-DashboardTab svg{width:18px;height:18px;vertical-align:middle}.uppy-size--md .uppy-DashboardTab svg{width:27px;height:27px}.uppy-Dashboard-input{width:.1px;height:.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1}.uppy-DashboardContent-bar{-ms-flex-negative:0;flex-shrink:0;height:40px;width:100%;padding:0 10px;z-index:1004;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;position:relative;border-bottom:1px solid #eaeaea;background-color:#fafafa}.uppy-size--md .uppy-DashboardContent-bar{height:50px;padding:0 15px}.uppy-DashboardContent-title{position:absolute;top:0;left:0;right:0;text-align:center;font-size:12px;line-height:40px;font-weight:500;width:100%;max-width:170px;text-overflow:ellipsis;white-space:nowrap;overflow-x:hidden;margin:auto}.uppy-size--md .uppy-DashboardContent-title{font-size:14px;line-height:50px;max-width:300px}.uppy-DashboardContent-back{background:none;-webkit-appearance:none;font-family:inherit;font-size:inherit;line-height:1;border:0;color:inherit;border-radius:3px;font-size:12px;font-weight:400;cursor:pointer;color:#2275d7;padding:7px 6px;margin:0 0 0 -6px}.uppy-DashboardContent-back:focus{outline:none}.uppy-DashboardContent-back::-moz-focus-inner{border:0}.uppy-DashboardContent-back:hover{color:#1b5dab}.uppy-DashboardContent-back:focus{background-color:#eceef2}.uppy-size--md .uppy-DashboardContent-back{font-size:14px}.uppy-DashboardContent-addMore{background:none;-webkit-appearance:none;font-family:inherit;font-size:inherit;line-height:1;border:0;color:inherit;border-radius:3px;font-weight:500;cursor:pointer;color:#2275d7;width:29px;height:29px;padding:7px 8px;margin:0 -5px 0 0}.uppy-DashboardContent-addMore:focus{outline:none}.uppy-DashboardContent-addMore::-moz-focus-inner{border:0}.uppy-DashboardContent-addMore:hover{color:#1b5dab}.uppy-DashboardContent-addMore:focus{background-color:#eceef2}.uppy-size--md .uppy-DashboardContent-addMore{font-size:14px;width:auto;height:auto;margin-right:-8px}.uppy-DashboardContent-addMore svg{vertical-align:baseline;margin-right:4px}.uppy-size--md .uppy-DashboardContent-addMore svg{width:11px;height:11px}.uppy-DashboardContent-addMoreCaption{display:none}.uppy-size--md .uppy-DashboardContent-addMoreCaption{display:inline}.uppy-DashboardContent-panel{background-color:#f5f5f5;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.uppy-Dashboard-AddFilesPanel,.uppy-DashboardContent-panel{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden;z-index:1005;border-radius:5px;display:-ms-flexbox;display:flex}.uppy-Dashboard-AddFilesPanel{background:#fafafa;background:linear-gradient(0deg,#fafafa 35%,hsla(0,0%,98%,.85));box-shadow:0 0 10px 5px rgba(0,0,0,.15);-ms-flex-direction:column;flex-direction:column}.uppy-Dashboard--isAddFilesPanelVisible .uppy-Dashboard-files{filter:blur(2px)}.uppy-Dashboard-progress{position:absolute;bottom:0;left:0;width:100%;height:12%}.uppy-Dashboard-progressBarContainer.is-active{z-index:1004;position:absolute;top:0;left:0;width:100%;height:100%}.uppy-Dashboard-filesContainer{position:relative;overflow-y:hidden;margin:0;-ms-flex:1;flex:1}.uppy-Dashboard-filesContainer:after{content:"";display:table;clear:both}.uppy-Dashboard-files{margin:0;padding:0 0 10px;overflow-y:auto;-webkit-overflow-scrolling:touch;-ms-flex:1;flex:1}.uppy-size--md .uppy-Dashboard-files{padding-top:10px}.uppy-Dashboard-dropFilesHereHint{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;visibility:hidden;position:absolute;top:7px;right:7px;bottom:7px;left:7px;padding-top:90px;border:1px dashed #2275d7;border-radius:3px;z-index:2000;text-align:center;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='48' height='48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 1v1C11.85 2 2 11.85 2 24s9.85 22 22 22 22-9.85 22-22S36.15 2 24 2V1zm0 0V0c13.254 0 24 10.746 24 24S37.254 48 24 48 0 37.254 0 24 10.746 0 24 0v1zm7.707 19.293a.999.999 0 1 1-1.414 1.414L25 16.414V34a1 1 0 1 1-2 0V16.414l-5.293 5.293a.999.999 0 1 1-1.414-1.414l7-7a.999.999 0 0 1 1.414 0l7 7z' fill='%232275D7'/%3E%3C/svg%3E");background-position:50% 50%;background-repeat:no-repeat;color:#707070;font-size:16px}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-dropFilesHereHint{visibility:visible}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-files,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-progressindicators,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-DashboardContent-bar{opacity:.15}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-DashboardAddFiles{opacity:.03}.uppy-Dashboard-dropFilesTitle{max-width:300px;text-align:center;font-size:16px;line-height:1.35;font-weight:400;color:#525252;margin:auto;padding:0 15px}.uppy-size--md .uppy-Dashboard-dropFilesTitle{max-width:470px;font-size:27px}.uppy-Dashboard-note{font-size:14px;line-height:1.25;text-align:center;color:#757575;max-width:350px;margin:auto;padding:0 15px}.uppy-size--md .uppy-Dashboard-note{font-size:16px;line-height:1.35;max-width:600px}a.uppy-Dashboard-poweredBy{display:inline-block;text-align:center;font-size:11px;color:#939393;text-decoration:none;margin-top:8px}.uppy-Dashboard-poweredByIcon{stroke:#939393;fill:none;margin-left:1px;margin-right:1px;position:relative;top:1px;opacity:.9;vertical-align:text-top}.uppy-DashboardItem-previewIcon{width:25px;height:25px;z-index:100;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.uppy-size--md .uppy-DashboardItem-previewIcon{width:38px;height:38px}.uppy-DashboardItem-previewIcon svg{width:100%;height:100%}.uppy-DashboardItem-previewIconWrap{height:76px;max-height:75%;position:relative}.uppy-DashboardItem-previewIconBg{width:100%;height:100%;filter:drop-shadow(rgba(0,0,0,.1) 0 1px 1px)}.uppy-Dashboard-upload{position:relative;width:50px;height:50px}.uppy-size--md .uppy-Dashboard-upload{width:60px;height:60px}.uppy-Dashboard-upload .UppyIcon{position:relative;top:1px;width:50%}.uppy-Dashboard-uploadCount{position:absolute;top:-12px;right:-12px;background-color:#1bb240;color:#fff;border-radius:50%;width:16px;height:16px;line-height:16px;font-size:8px}.uppy-size--md .uppy-Dashboard-uploadCount{width:18px;height:18px;line-height:18px;font-size:9px}.uppy-DragDrop-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:7px;background-color:#fff;cursor:pointer;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;max-width:100%}.uppy-DragDrop-container:focus{outline:none;box-shadow:0 0 0 3px rgba(34,117,215,.4)}.uppy-DragDrop-container::-moz-focus-inner{border:0}.uppy-DragDrop-inner{margin:0;text-align:center;padding:80px 20px;line-height:1.4}.uppy-DragDrop-input{width:.1px;height:.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1}.uppy-DragDrop-arrow{width:60px;height:60px;fill:#e0e0e0;margin-bottom:17px}.uppy-DragDrop--is-dragdrop-supported{border:2px dashed #adadad}.uppy-DragDrop--isDraggingOver{border:2px dashed #2275d7;background:#eaeaea}.uppy-DragDrop--isDraggingOver .uppy-DragDrop-arrow{fill:#939393}.uppy-DragDrop-label{display:block;cursor:pointer;font-size:1.15em;margin-bottom:5px}.uppy-DragDrop-note{font-size:1em;color:#adadad}.uppy-DragDrop-browse{color:#2275d7}.uppy-FileInput-container{margin-bottom:15px}.uppy-FileInput-btn{background:none;-webkit-appearance:none;font-family:inherit;font-size:inherit;line-height:1;margin:0;color:inherit;font-family:sans-serif;font-size:.85em;padding:10px 15px;color:#14457f;border:1px solid #14457f;border-radius:8px;cursor:pointer}.uppy-FileInput-btn:hover{background-color:#14457f;color:#fff}.uppy-ProgressBar{position:absolute;top:0;left:0;width:100%;height:3px;z-index:10000;transition:height .2s}.uppy-ProgressBar[aria-hidden=true]{height:0}.uppy-ProgressBar-inner{background-color:#2275d7;box-shadow:0 0 10px rgba(34,117,215,.7);height:100%;width:0;transition:width .4s ease}.uppy-ProgressBar-percentage{display:none;text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff}.uppy-Url{width:100%;height:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}.uppy-Url-input{width:90%;max-width:650px;margin-bottom:15px}.uppy-size--md .uppy-Url-input{margin-bottom:20px}.uppy-Url-importButton{padding:13px 25px}.uppy-size--md .uppy-Url-importButton{padding:13px 30px}.uppy-Webcam-container{width:100%;height:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column}.uppy-Webcam-videoContainer{width:100%;-ms-flex:1;flex:1;-ms-flex-positive:1;flex-grow:1;overflow:hidden;background-color:#333;text-align:center;position:relative}.uppy-Webcam-video{max-width:100%;max-height:100%;position:absolute;top:0;right:0;bottom:0;left:0;margin:auto}.uppy-Webcam-video--mirrored{transform:scaleX(-1)}.uppy-Webcam-buttonContainer{width:100%;height:75px;border-top:1px solid #eaeaea;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:0 20px}.uppy-Webcam-button{width:45px;height:45px;border-radius:50%;background-color:#e32437;color:#fff;cursor:pointer;transition:all .3s}.uppy-Webcam-button svg{width:30px;height:30px;max-width:100%;max-height:100%;display:inline-block;vertical-align:text-top;overflow:hidden;fill:currentColor}.uppy-size--md .uppy-Webcam-button{width:60px;height:60px}.uppy-Webcam-button:hover{background-color:#d31b2d}.uppy-Webcam-button:focus{outline:none;box-shadow:0 0 0 .2rem rgba(34,117,215,.5)}.uppy-Webcam-button--picture{margin-right:12px}.uppy-Webcam-permissons{padding:15px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-flow:column wrap;flex-flow:column wrap;height:100%;-ms-flex:1;flex:1}.uppy-Webcam-permissons p{max-width:450px;line-height:1.3}.uppy-Webcam-title{font-size:22px;line-height:1.35;font-weight:400;margin:0 0 5px;padding:0 15px;max-width:500px;text-align:center;color:#333}.uppy-Webcam-permissons p{text-align:center;line-height:1.45;color:#939393;margin:0}.uppy-Webcam-permissonsIcon svg{width:100px;height:75px;color:#bbb;margin-bottom:30px} \ No newline at end of file diff --git a/public/js/app.js b/public/js/app.js index b8413e6..0d540ce 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1,108 +1,108 @@ /** * General Functions */ -function posf (f, a) { for (var i=0; i < a.length; i++) { if (f(a[i])) {return i;} } return -1; } -function apos (x, a) { return (typeof x == 'function') ? posf(x,a) : Array.prototype.indexOf.call(a,x); } -function arem (a, x) { var i = apos(x, a); if (i >= 0) { a.splice(i, 1); } return a; } -function afind (x, a) { var i = apos(x, a); return (i >= 0) ? a[i] : null; } -function addClass (el, cl) { if (el) { var a = el.className.split(' '); if (!afind(cl, a)) { a.unshift(cl); el.className = a.join(' '); } } } -function remClass (el, cl) { if (el) { var a = el.className.split(' '); arem(a, cl); el.className = a.join(' '); } } -function runOnce(action) { runOnce = function(){}; action(); } - -/* - * Context Menu functions - */ -function contextMenuHide(element) { - for (var i = 0; i < element.length; i++) { - element[i].checked = false; +function once(action) { once = function(){}; action(); } + +function contextMenuHide(elements) { + for (var i = 0; i < elements.length; i++) { + elements[i].checked = false; } } -function contextMenuHideOutside(element, event) { - for (var i = 0; i < element.length; i++) { - let notClicked = !element[i].contains(event.target); - if (notClicked && contextMenuInputs[i].checked === true) { contextMenuHide(contextMenuInputs); } +function contextMenuHideOutside(elements, targets, event) { + for (var i = 0; i < elements.length; i++) { + let notClicked = !elements[i].contains(event.target); + if (notClicked && targets[i].checked === true) { contextMenuHide(targets); } } } /** * Remove url query string and hash */ -var url = window.location.href.split('?')[0]; -window.history.replaceState(null, '', url); +var url = self.location.href.split('?')[0]; +self.history.replaceState(null, '', url); /** * Load events */ -var settings = { pager: {} }; - -window.addEventListener('DOMContentLoaded', function() { - if (history.scrollRestoration) { history.scrollRestoration = 'manual'; } - if (localStorage['settings']) { settings = JSON.parse(localStorage['settings']); } - var hash = document.getElementById(location.hash.slice(1)); - var hashInURL = window.location.href.indexOf("#") >= 0; - if (hashInURL && document.body.contains(hash)) { - settings['pager'][url] = window.pageYOffset; - localStorage['settings'] = JSON.stringify(settings); - hash.scrollIntoView(); - return; - } - if (settings['pager'][url] > 0) { window.scrollTo(0, settings['pager'][url]); return; } - settings['pager'][url] = window.pageYOffset; - localStorage['settings'] = JSON.stringify(settings); -}); - -/* - * Click events - */ -document.addEventListener('click', function(event) { - contextMenuHideOutside(contextMenus, event); -}); - -/* - * Touch start events - */ -document.addEventListener('touchstart', function(event) { - contextMenuHideOutside(contextMenus, event); -}); - -/** - * Scroll events - */ -var previousPosition = window.pageYOffset; -var navbar = document.getElementById("navbar"); -var navbarHeight = navbar.offsetHeight; -var scrolls = 0; - -var contextMenus = document.getElementsByTagName('context-menu-container'); -var contextMenuInputs = document.querySelectorAll('context-menu-container input'); - -window.addEventListener('scroll', function() { - - contextMenuHide(contextMenuInputs); - - var currentPosition = window.pageYOffset; - var velocity = previousPosition - currentPosition; +var pager = {}; + +self.addEventListener('DOMContentLoaded', function() { + (function () { + if (history.scrollRestoration) { history.scrollRestoration = 'manual'; } + if (localStorage['pager']) { pager = JSON.parse(localStorage['pager']); } + var hash = self.location.hash.slice(1) && document.getElementById(self.location.hash.slice(1)); + var hashInURL = self.location.href.indexOf("#") >= 0; + if (hashInURL && document.body.contains(hash)) { + pager[url] = self.pageYOffset; + localStorage['pager'] = JSON.stringify(pager); + return hash.scrollIntoView(); + } + if (pager[url] > 0) { return self.scrollTo(0, pager[url]); } + pager[url] = self.pageYOffset; + localStorage['pager'] = JSON.stringify(pager); + })(); + + /** + * Scroll events + */ + var scrolls = 0; + var previousPosition = self.pageYOffset; + var navbar = document.getElementById("navbar"); + var navbarHeight = navbar.offsetHeight; + + var contextMenus = document.getElementsByTagName('context-menu-container'); + var contextMenuInputs = document.querySelectorAll('context-menu-container input'); + + self.addEventListener('scroll', function() { + contextMenuHide(contextMenuInputs); + + var currentPosition = self.pageYOffset; + var velocity = previousPosition - currentPosition; + + pager[url] = currentPosition; + localStorage['pager'] = JSON.stringify(pager); + + if (scrolls > 3) { + if (velocity > 75 || currentPosition < navbarHeight) { + navbar.classList.remove('hide'); + } else if (velocity < -25) { + navbar.classList.add('hide'); + } else if (currentPosition > navbarHeight) { + once(function () { navbar.classList.add('hide'); }); + } + } + previousPosition = currentPosition; + scrolls++; + }); - settings['pager'][url] = currentPosition; - localStorage['settings'] = JSON.stringify(settings); + /* + * Click events + */ + self.addEventListener('click', function(event) { + contextMenuHideOutside(contextMenus, contextMenuInputs, event); + }); - if (scrolls > 3) { - if (velocity > 75 || currentPosition < navbarHeight) { - remClass(navbar, 'hide'); - } else if (velocity < -25) { - addClass(navbar, 'hide'); - } else if (currentPosition > navbarHeight) { - runOnce(function () { addClass(navbar, 'hide'); }); - } - } + /* + * Touch start events + */ + self.addEventListener('touchstart', function(event) { + contextMenuHideOutside(contextMenus, contextMenuInputs, event); + }); - previousPosition = currentPosition; - scrolls++; -}); + /* + * Hash change events + */ + self.addEventListener("hashchange", function () { + document.getElementById(self.location.hash.slice(1)).scrollIntoView(); + }); -window.addEventListener("hashchange", function () { - document.getElementById(location.hash.slice(1)).scrollIntoView(); + /** + * Activate Medium Zoom + */ + var imageZoom = mediumZoom('[data-image-zoom]'); + imageZoom.on('open', function() { navbar.classList.add('hide'); }); + imageZoom.on('close', function() { navbar.classList.remove('hide'); }); }); /** @@ -594,248 +594,328 @@ window.addEventListener("hashchange", function () { return mediumZoom; }); - -/** - * Activate Medium Zoom - */ -var imageZoom = mediumZoom('[data-image-zoom]'); -imageZoom.on('open', function() { addClass(navbar, 'hide'); }); -imageZoom.on('close', function() { remClass(navbar, 'hide'); }); - - -/** - * Instant Page v3.0.0 - (C) 2019 Alexandre Dieulot - https://instant.page/license - */ -let mouseoverTimer; -let lastTouchTimestamp; -const prefetches = new Set(); -const prefetchElement = document.createElement('link'); -const isSupported = prefetchElement.relList && prefetchElement.relList.supports && prefetchElement.relList.supports('prefetch') - && window.IntersectionObserver && 'isIntersecting' in IntersectionObserverEntry.prototype; -const allowQueryString = 'instantAllowQueryString' in document.body.dataset; -const allowExternalLinks = 'instantAllowExternalLinks' in document.body.dataset; -const useWhitelist = 'instantWhitelist' in document.body.dataset; - -let delayOnHover = 65; -let useMousedown = false; -let useMousedownOnly = false; -let useViewport = false; -if ('instantIntensity' in document.body.dataset) { - const intensity = document.body.dataset.instantIntensity; - - if (intensity.substr(0, 'mousedown'.length) == 'mousedown') { - useMousedown = true; - if (intensity == 'mousedown-only') { - useMousedownOnly = true; - } - } - else if (intensity.substr(0, 'viewport'.length) == 'viewport') { - if (!(navigator.connection && (navigator.connection.saveData || navigator.connection.effectiveType.includes('2g')))) { - if (intensity == "viewport") { - /* Biggest iPhone resolution (which we want): 414 × 896 = 370944 +(function () { + self.addEventListener("DOMContentLoaded", function () { + /*! instant.page v5.1.0 - (C) 2019-2020 Alexandre Dieulot - https://instant.page/license */ + + let mouseoverTimer; + let lastTouchTimestamp; + const prefetches = new Set(); + const prefetchElement = document.createElement("link"); + const isSupported = prefetchElement.relList && + prefetchElement.relList.supports && + prefetchElement.relList.supports("prefetch") && + window.IntersectionObserver && + "isIntersecting" in IntersectionObserverEntry.prototype; + const allowQueryString = "instantAllowQueryString" in document.body.dataset; + const allowExternalLinks = "instantAllowExternalLinks" in + document.body.dataset; + const useWhitelist = "instantWhitelist" in document.body.dataset; + const mousedownShortcut = "instantMousedownShortcut" in + document.body.dataset; + const DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION = 1111; + + let delayOnHover = 65; + let useMousedown = false; + let useMousedownOnly = false; + let useViewport = false; + + if ("instantIntensity" in document.body.dataset) { + const intensity = document.body.dataset.instantIntensity; + + if (intensity.substr(0, "mousedown".length) == "mousedown") { + useMousedown = true; + if (intensity == "mousedown-only") { + useMousedownOnly = true; + } + } else if (intensity.substr(0, "viewport".length) == "viewport") { + if ( + !(navigator.connection && + (navigator.connection.saveData || + (navigator.connection.effectiveType && + navigator.connection.effectiveType.includes("2g")))) + ) { + if (intensity == "viewport") { + /* Biggest iPhone resolution (which we want): 414 × 896 = 370944 * Small 7" tablet resolution (which we don’t want): 600 × 1024 = 614400 * Note that the viewport (which we check here) is smaller than the resolution due to the UI’s chrome */ - if (document.documentElement.clientWidth * document.documentElement.clientHeight < 450000) { - useViewport = true; + if ( + document.documentElement.clientWidth * + document.documentElement.clientHeight < 450000 + ) { + useViewport = true; + } + } else if (intensity == "viewport-all") { + useViewport = true; + } + } + } else { + const milliseconds = parseInt(intensity); + if (!isNaN(milliseconds)) { + delayOnHover = milliseconds; } } - else if (intensity == "viewport-all") { - useViewport = true; - } - } - } - else { - const milliseconds = parseInt(intensity); - if (!isNaN(milliseconds)) { - delayOnHover = milliseconds; } - } -} -if (isSupported) { - const eventListenersOptions = { - capture: true, - passive: true, - }; + if (isSupported) { + const eventListenersOptions = { + capture: true, + passive: true, + }; - if (!useMousedownOnly) { - document.addEventListener('touchstart', touchstartListener, eventListenersOptions); - } + if (!useMousedownOnly) { + document.addEventListener( + "touchstart", + touchstartListener, + eventListenersOptions, + ); + } - if (!useMousedown) { - document.addEventListener('mouseover', mouseoverListener, eventListenersOptions); - } - else { - document.addEventListener('mousedown', mousedownListener, eventListenersOptions); - } + if (!useMousedown) { + document.addEventListener( + "mouseover", + mouseoverListener, + eventListenersOptions, + ); + } else if (!mousedownShortcut) { + document.addEventListener( + "mousedown", + mousedownListener, + eventListenersOptions, + ); + } + + if (mousedownShortcut) { + document.addEventListener( + "mousedown", + mousedownShortcutListener, + eventListenersOptions, + ); + } + + if (useViewport) { + let triggeringFunction; + if (window.requestIdleCallback) { + triggeringFunction = function (callback) { + requestIdleCallback(callback, { + timeout: 1500, + }); + }; + } else { + triggeringFunction = function (callback) { + callback(); + }; + } - if (useViewport) { - let triggeringFunction; - if (window.requestIdleCallback) { - triggeringFunction = function(callback) { - requestIdleCallback(callback, { - timeout: 1500, + triggeringFunction(function () { + const intersectionObserver = new IntersectionObserver( + function (entries) { + entries.forEach(function (entry) { + if (entry.isIntersecting) { + const linkElement = entry.target; + intersectionObserver.unobserve(linkElement); + preload(linkElement.href); + } + }); + }, + ); + + document.querySelectorAll("a").forEach(function (linkElement) { + if (isPreloadable(linkElement)) { + intersectionObserver.observe(linkElement); + } + }); }); - }; + } } - else { - triggeringFunction = function(callback) { - callback(); - }; + + function touchstartListener(event) { + /* Chrome on Android calls mouseover before touchcancel so `lastTouchTimestamp` + * must be assigned on touchstart to be measured on mouseover. */ + lastTouchTimestamp = performance.now(); + + const linkElement = event.target.closest("a"); + + if (!isPreloadable(linkElement)) { + return; + } + + preload(linkElement.href); } - triggeringFunction(function() { - const intersectionObserver = new IntersectionObserver(function(entries) { - entries.forEach(function(entry) { - if (entry.isIntersecting) { - const linkElement = entry.target; - intersectionObserver.unobserve(linkElement); - preload(linkElement.href); - } - }); - }); + function mouseoverListener(event) { + if ( + performance.now() - lastTouchTimestamp < + DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION + ) { + return; + } - document.querySelectorAll('a').forEach(function(linkElement) { - if (isPreloadable(linkElement)) { - intersectionObserver.observe(linkElement); - } - }); - }); - } -} + const linkElement = event.target.closest("a"); -function touchstartListener(event) { - /* Chrome on Android calls mouseover before touchcancel so `lastTouchTimestamp` - * must be assigned on touchstart to be measured on mouseover. */ - lastTouchTimestamp = performance.now(); + if (!isPreloadable(linkElement)) { + return; + } - const linkElement = event.target.closest('a'); + linkElement.addEventListener("mouseout", mouseoutListener, { + passive: true, + }); - if (!isPreloadable(linkElement)) { - return; - } + mouseoverTimer = setTimeout(function () { + preload(linkElement.href); + mouseoverTimer = undefined; + }, delayOnHover); + } - preload(linkElement.href); -} + function mousedownListener(event) { + const linkElement = event.target.closest("a"); -function mouseoverListener(event) { - if (performance.now() - lastTouchTimestamp < 1100) { - return; - } + if (!isPreloadable(linkElement)) { + return; + } - const linkElement = event.target.closest('a'); + preload(linkElement.href); + } - if (!isPreloadable(linkElement)) { - return; - } + function mouseoutListener(event) { + if ( + event.relatedTarget && + event.target.closest("a") == event.relatedTarget.closest("a") + ) { + return; + } - linkElement.addEventListener('mouseout', mouseoutListener, {passive: true}); + if (mouseoverTimer) { + clearTimeout(mouseoverTimer); + mouseoverTimer = undefined; + } + } - mouseoverTimer = setTimeout(function() { - preload(linkElement.href); - mouseoverTimer = undefined; - }, delayOnHover); -} + function mousedownShortcutListener(event) { + if ( + performance.now() - lastTouchTimestamp < + DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION + ) { + return; + } -function mousedownListener(event) { - const linkElement = event.target.closest('a'); + const linkElement = event.target.closest("a"); - if (!isPreloadable(linkElement)) { - return; - } + if (event.which > 1 || event.metaKey || event.ctrlKey) { + return; + } - preload(linkElement.href); -} + if (!linkElement) { + return; + } -function mouseoutListener(event) { - if (event.relatedTarget && event.target.closest('a') == event.relatedTarget.closest('a')) { - return; - } + linkElement.addEventListener("click", function (event) { + if (event.detail == 1337) { + return; + } - if (mouseoverTimer) { - clearTimeout(mouseoverTimer); - mouseoverTimer = undefined; - } -} + event.preventDefault(); + }, { capture: true, passive: false, once: true }); -function isPreloadable(linkElement) { - if (!linkElement || !linkElement.href) { - return; - } + const customEvent = new MouseEvent("click", { + view: window, + bubbles: true, + cancelable: false, + detail: 1337, + }); + linkElement.dispatchEvent(customEvent); + } - if (useWhitelist && !('instant' in linkElement.dataset)) { - return; - } + function isPreloadable(linkElement) { + if (!linkElement || !linkElement.href) { + return; + } - if (!allowExternalLinks && linkElement.origin != location.origin && !('instant' in linkElement.dataset)) { - return; - } + if (useWhitelist && !("instant" in linkElement.dataset)) { + return; + } - if (!['http:', 'https:'].includes(linkElement.protocol)) { - return; - } + if ( + !allowExternalLinks && linkElement.origin != location.origin && + !("instant" in linkElement.dataset) + ) { + return; + } - if (linkElement.protocol == 'http:' && location.protocol == 'https:') { - return; - } + if (!["http:", "https:"].includes(linkElement.protocol)) { + return; + } - if (!allowQueryString && linkElement.search && !('instant' in linkElement.dataset)) { - return; - } + if (linkElement.protocol == "http:" && location.protocol == "https:") { + return; + } - if (linkElement.hash && linkElement.pathname + linkElement.search == location.pathname + location.search) { - return; - } + if ( + !allowQueryString && linkElement.search && + !("instant" in linkElement.dataset) + ) { + return; + } - if ('noInstant' in linkElement.dataset) { - return; - } + if ( + linkElement.hash && + linkElement.pathname + linkElement.search == + location.pathname + location.search + ) { + return; + } - return true; -} + if ("noInstant" in linkElement.dataset) { + return; + } -function preload(url) { - if (prefetches.has(url)) { - return; - } + return true; + } + + function preload(url) { + if (prefetches.has(url)) { + return; + } - const prefetcher = document.createElement('link'); - prefetcher.rel = 'prefetch'; - prefetcher.href = url; - document.head.appendChild(prefetcher); + const prefetcher = document.createElement("link"); + prefetcher.rel = "prefetch"; + prefetcher.href = url; + document.head.appendChild(prefetcher); - prefetches.add(url); -} + prefetches.add(url); + } + }); +})(); /** * Dictionary Access Copyright (C) 2006, Paul Lutus https://arachnoid.com/javascript/dictionary_access.js GPLv2+ */ (function () { - const options = - "targetWindow,width=700,height=500,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes"; + self.addEventListener("DOMContentLoaded", function () { + const options = "targetWindow,width=700,height=500,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes"; - self.addEventListener("keydown", function (event) { - if (event.repeat && event.key === "d") { - selection(dictionary); - } - }); + self.addEventListener("keydown", function (event) { + if (event.repeat && event.key === "d") { + selection(dictionary); + } + }); - function selection(execute) { - let phrase = "" + window.getSelection(); - phrase = phrase.replace(/[!.:?,;"]/g, ""); - phrase = phrase.replace(/^\s*(\S*?)\s*$/g, "$1"); - if (phrase && phrase > "" && phrase.length > 1) { - execute(phrase); + function selection(execute) { + let phrase = "" + window.getSelection(); + phrase = phrase.replace(/[!.:?,;"]/g, ""); + phrase = phrase.replace(/^\s*(\S*?)\s*$/g, "$1"); + if (phrase && phrase > "" && phrase.length > 1) { + execute(phrase); + } } - } - function dictionary(word) { - window.open( - "https://www.merriam-webster.com/dictionary/" + - encodeURIComponent(word), - "Definitions", - options, - ); - } + function dictionary(word) { + window.open( + "https://www.merriam-webster.com/dictionary/" + encodeURIComponent(word), + "Definitions", + options, + ); + } + }); })(); diff --git a/public/js/htm.3.1.1.min.mjs b/public/js/htm.3.1.1.min.mjs new file mode 100644 index 0000000..e24f87b --- /dev/null +++ b/public/js/htm.3.1.1.min.mjs @@ -0,0 +1 @@ +var e,n,_,t,o,r,u,l={},i=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function s(e,n){for(var _ in n)e[_]=n[_];return e}function f(e){var n=e.parentNode;n&&n.removeChild(e)}function a(n,_,t){var o,r,u,l={};for(u in _)"key"==u?o=_[u]:"ref"==u?r=_[u]:l[u]=_[u];if(arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):t),"function"==typeof n&&null!=n.defaultProps)for(u in n.defaultProps)void 0===l[u]&&(l[u]=n.defaultProps[u]);return p(n,l,o,r,null)}function p(e,t,o,r,u){var l={type:e,props:t,key:o,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==u?++_:u};return null!=n.vnode&&n.vnode(l),l}function h(e){return e.children}function d(e,n){this.props=e,this.context=n}function v(e,n){if(null==n)return e.__?v(e.__,e.__.__k.indexOf(e)+1):null;for(var _;n0?p(m.type,m.props,m.key,null,m.__v):m)){if(m.__=_,m.__b=_.__b+1,null===(y=H[a])||y&&m.key==y.key&&m.type===y.type)H[a]=void 0;else for(d=0;d=t.__.length&&t.__.push({}),t.__[e]}function G(e){return R=1,z(ie,e)}function z(e,n,_){var t=j(L++,2);return t.t=e,t.__c||(t.__=[_?_(n):ie(void 0,n),function(e){var n=t.t(t.__[0],e);t.__[0]!==n&&(t.__=[n,t.__[1]],t.__c.setState({}))}],t.__c=N),t.__}function J(e,_){var t=j(L++,3);!n.__s&&le(t.__H,_)&&(t.__=e,t.__H=_,N.__H.__h.push(t))}function K(e,_){var t=j(L++,4);!n.__s&&le(t.__H,_)&&(t.__=e,t.__H=_,N.__h.push(t))}function Q(e){return R=5,Y(function(){return{current:e}},[])}function X(e,n,_){R=6,K(function(){"function"==typeof e?e(n()):e&&(e.current=n())},null==_?_:_.concat(e))}function Y(e,n){var _=j(L++,7);return le(_.__H,n)&&(_.__=e(),_.__H=n,_.__h=e),_.__}function Z(e,n){return R=8,Y(function(){return e},n)}function ee(e){var n=N.context[e.__c],_=j(L++,9);return _.c=e,n?(null==_.__&&(_.__=!0,n.sub(N)),n.props.value):e.__}function ne(e,_){n.useDebugValue&&n.useDebugValue(_?_(e):e)}function _e(e){var n=j(L++,10),_=G();return n.__=e,N.componentDidCatch||(N.componentDidCatch=function(e){n.__&&n.__(e),_[1](e)}),[_[0],function(){_[1](void 0)}]}function te(){I.forEach(function(e){if(e.__P)try{e.__H.__h.forEach(re),e.__H.__h.forEach(ue),e.__H.__h=[]}catch(_){e.__H.__h=[],n.__e(_,e.__v)}}),I=[]}n.__b=function(e){N=null,O&&O(e)},n.__r=function(e){V&&V(e),L=0;var n=(N=e.__c).__H;n&&(n.__h.forEach(re),n.__h.forEach(ue),n.__h=[])},n.diffed=function(e){q&&q(e);var _=e.__c;_&&_.__H&&_.__H.__h.length&&(1!==I.push(_)&&W===n.requestAnimationFrame||((W=n.requestAnimationFrame)||function(e){var n,_=function(){clearTimeout(t),oe&&cancelAnimationFrame(n),setTimeout(e)},t=setTimeout(_,100);oe&&(n=requestAnimationFrame(_))})(te)),N=void 0},n.__c=function(e,_){_.some(function(e){try{e.__h.forEach(re),e.__h=e.__h.filter(function(e){return!e.__||ue(e)})}catch(t){_.some(function(e){e.__h&&(e.__h=[])}),_=[],n.__e(t,e.__v)}}),B&&B(e,_)},n.unmount=function(e){$&&$(e);var _=e.__c;if(_&&_.__H)try{_.__H.__.forEach(re)}catch(e){n.__e(e,_.__v)}};var oe="function"==typeof requestAnimationFrame;function re(e){var n=N;"function"==typeof e.__c&&e.__c(),N=n}function ue(e){var n=N;e.__c=e.__(),N=n}function le(e,n){return!e||e.length!==n.length||n.some(function(n,_){return n!==e[_]})}function ie(e,n){return"function"==typeof n?n(e):n}var ce=function(e,n,_,t){var o;n[0]=0;for(var r=1;r=5&&((o||!e&&5===t)&&(u.push(t,0,o,_),t=6),e&&(u.push(t,e,0,_),t=6)),o=""},i=0;i"===n?(t=1,o=""):o=n+o[0]:r?n===r?r="":o+=n:'"'===n||"'"===n?r=n:">"===n?(l(),t=1):t&&("="===n?(t=5,_=o,o=""):"/"===n&&(t<5||">"===e[i][c+1])?(l(),3===t&&(u=u[0]),t=u,(u=u[0]).push(2,0,t),t=0):" "===n||"\t"===n||"\n"===n||"\r"===n?(l(),t=2):o+=n),3===t&&"!--"===o&&(t=4,u=u[0])}return l(),u}(e)),n),arguments,[])).length>1?n:n[0]}.bind(a);export{a as h,fe as html,M as render,d as Component,F as createContext,G as useState,z as useReducer,J as useEffect,K as useLayoutEffect,Q as useRef,X as useImperativeHandle,Y as useMemo,Z as useCallback,ee as useContext,ne as useDebugValue,_e as useErrorBoundary}; diff --git a/public/js/upload.js b/public/js/upload.js new file mode 100644 index 0000000..ad48e5f --- /dev/null +++ b/public/js/upload.js @@ -0,0 +1,38 @@ +import { html, Component, render } from '/js/htm.3.1.1.min.mjs'; + +class UploadForm extends Component { + + addFiles(event) { + const { files = [ ] } = this.state; + this.setState({ files: [...event.target.files] }); + } + + render({ page }, { files = [] }) { + return html` +
+
+ +

Upload Files

+

Drag files here or browse

+
+ +
+ +
+
+
+
+
+ `; + } +} + +render(html`<${UploadForm} />`, document.body); diff --git a/public/js/uppy.min.js b/public/js/uppy.min.js deleted file mode 100644 index b6beb78..0000000 --- a/public/js/uppy.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Uppy=e()}}(function(){var define,module,exports,_$browser_52={},cachedSetTimeout,cachedClearTimeout,process=_$browser_52={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex1)for(var r=1;r-1};function o(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function i(e){return"string"!=typeof e&&(e=String(e)),e}function s(e){var r={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(r[Symbol.iterator]=function(){return r}),r}function a(e){this.map={},e instanceof a?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function u(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function c(e){var t=new FileReader,r=u(t);return t.readAsArrayBuffer(e),r}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function d(){return this.bodyUsed=!1,this._initBody=function(e){var r;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:t.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:t.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():t.arrayBuffer&&t.blob&&(r=e)&&DataView.prototype.isPrototypeOf(r)?(this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):t.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||n(e))?this._bodyArrayBuffer=p(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(c)}),this.text=function(){var e,t,r,n=l(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=u(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function f(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function g(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new a(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},d.call(_.prototype),d.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new a(this.headers),url:this.url})},g.error=function(){var e=new g(null,{status:0,statusText:""});return e.type="error",e};var m=[301,302,303,307,308];g.redirect=function(e,t){if(-1===m.indexOf(t))throw new RangeError("Invalid status code");return new g(null,{status:t,headers:{location:e}})},e.DOMException=self.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function y(r,n){return new Promise(function(o,i){var s=new _(r,n);if(s.signal&&s.signal.aborted)return i(new e.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function u(){l.abort()}l.onload=function(){var e,t,r={status:l.status,statusText:l.statusText,headers:(e=l.getAllResponseHeaders()||"",t=new a,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();t.append(n,o)}}),t)};r.url="responseURL"in l?l.responseURL:r.headers.get("X-Request-URL");var n="response"in l?l.response:l.responseText;o(new g(n,r))},l.onerror=function(){i(new TypeError("Network request failed"))},l.ontimeout=function(){i(new TypeError("Network request failed"))},l.onabort=function(){i(new e.DOMException("Aborted","AbortError"))},l.open(s.method,s.url,!0),"include"===s.credentials?l.withCredentials=!0:"omit"===s.credentials&&(l.withCredentials=!1),"responseType"in l&&t.blob&&(l.responseType="blob"),s.headers.forEach(function(e,t){l.setRequestHeader(t,e)}),s.signal&&(s.signal.addEventListener("abort",u),l.onreadystatechange=function(){4===l.readyState&&s.signal.removeEventListener("abort",u)}),l.send(void 0===s._bodyInit?null:s._bodyInit)})}y.polyfill=!0,self.fetch||(self.fetch=y,self.Headers=a,self.Request=_,self.Response=g),e.Headers=a,e.Request=_,e.Response=g,e.fetch=y,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof _$fetchUmd_85.exports?factory(_$fetchUmd_85.exports):"function"==typeof define&&define.amd?define(["exports"],factory):factory(__global_85.WHATWGFetch={}),_$fetchUmd_85=_$fetchUmd_85.exports;var defaultOptions={limit:1,onStart:function(){},onProgress:function(){},onPartComplete:function(){},onSuccess:function(){},onError:function(e){throw e}};function remove(e,t){var r=e.indexOf(t);-1!==r&&e.splice(r,1)}var MultipartUploader=function(){function e(e,t){this.options=_extends({},defaultOptions,t),this.file=e,this.key=this.options.key||null,this.uploadId=this.options.uploadId||null,this.parts=this.options.parts||[],this.isPaused=!1,this.chunks=null,this.chunkState=null,this.uploading=[],this._initChunks()}var t=e.prototype;return t._initChunks=function(){for(var e=[],t=Math.max(Math.ceil(this.file.size/1e4),5242880),r=0;r=t))break}r.forEach(function(t){e._uploadPart(t)})}}},t._uploadPart=function(e){var t=this,r=this.chunks[e];return this.chunkState[e].busy=!0,Promise.resolve().then(function(){return t.options.prepareUploadPart({key:t.key,uploadId:t.uploadId,body:r,number:e+1})}).then(function(e){if("object"!=typeof e||!e||"string"!=typeof e.url)throw new TypeError("AwsS3/Multipart: Got incorrect result from 'prepareUploadPart()', expected an object '{ url }'.");return e}).then(function(r){var n=r.url;t._uploadPartBytes(e,n)},function(e){t._onError(e)})},t._onPartProgress=function(e,t,r){this.chunkState[e].uploaded=t;var n=this.chunkState.reduce(function(e,t){return e+t.uploaded},0);this.options.onProgress(n,this.file.size)},t._onPartComplete=function(e,t){this.chunkState[e].etag=t,this.chunkState[e].done=!0;var r={PartNumber:e+1,ETag:t};this.parts.push(r),this.options.onPartComplete(r),this._uploadParts()},t._uploadPartBytes=function(e,t){var r=this,n=this.chunks[e],o=new XMLHttpRequest;o.open("PUT",t,!0),o.responseType="text",this.uploading.push(o),o.upload.addEventListener("progress",function(t){t.lengthComputable&&r._onPartProgress(e,t.loaded,t.total)}),o.addEventListener("abort",function(t){remove(r.uploading,t.target),r.chunkState[e].busy=!1}),o.addEventListener("load",function(t){if(remove(r.uploading,t.target),r.chunkState[e].busy=!1,t.target.status<200||t.target.status>=300)r._onError(new Error("Non 2xx"));else{r._onPartProgress(e,n.size,n.size);var o=t.target.getResponseHeader("ETag");null!==o?r._onPartComplete(e,o):r._onError(new Error("AwsS3/Multipart: Could not read the ETag header. This likely means CORS is not configured correctly on the S3 Bucket. Seee https://uppy.io/docs/aws-s3-multipart#S3-Bucket-Configuration for instructions."))}}),o.addEventListener("error",function(t){remove(r.uploading,t.target),r.chunkState[e].busy=!1;var n=new Error("Unknown error");n.source=t.target,r._onError(n)}),o.send(n)},t._completeUpload=function(){var e=this;return this.parts.sort(function(e,t){return e.PartNumber-t.PartNumber}),Promise.resolve().then(function(){return e.options.completeMultipartUpload({key:e.key,uploadId:e.uploadId,parts:e.parts})}).then(function(t){e.options.onSuccess(t)},function(t){e._onError(t)})},t._abortUpload=function(){this.uploading.slice().forEach(function(e){e.abort()}),this.options.abortMultipartUpload({key:this.key,uploadId:this.uploadId}),this.uploading=[]},t._onError=function(e){this.options.onError(e)},t.start=function(){this.isPaused=!1,this.uploadId?this._resumeUpload():this._createUpload()},t.pause=function(){this.uploading.slice().forEach(function(e){e.abort()}),this.isPaused=!0},t.abort=function(e){if(void 0===e&&(e={}),!e.really)return this.pause();this._abortUpload()},e}(),_$MultipartUploader_88=MultipartUploader,_$package_90={version:"1.2.0"};function _wrapNativeSuper(e){var t="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(n,e)})(e)}function _construct(e,t,r){return(_construct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&_setPrototypeOf(o,r.prototype),o}).apply(null,arguments)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var AuthError=function(e){var t,r;function n(){var t;return(t=e.call(this,"Authorization required")||this).name="AuthError",t.isAuthError=!0,t}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n}(_wrapNativeSuper(Error)),_$AuthError_93=AuthError,_$package_99={version:"1.2.0"},_class,_temp;function ___extends_95(){return(___extends_95=Object.assign||function(e){for(var t=1;t300){var t="Failed request with status: "+e.status+". "+e.statusText;return e.json().then(function(e){throw t=e.message?t+" message: "+e.message:t,t=e.requestId?t+" request-Id: "+e.requestId:t,new Error(t)}).catch(function(){throw new Error(t)})}return e.json()},n.preflight=function(e){var t=this;return new Promise(function(r,n){if(t.preflightDone)return r(t.allowedHeaders.slice());fetch(t._getUrl(e),{method:"OPTIONS"}).then(function(e){e.headers.has("access-control-allow-headers")&&(t.allowedHeaders=e.headers.get("access-control-allow-headers").split(",").map(function(e){return e.trim().toLowerCase()})),t.preflightDone=!0,r(t.allowedHeaders.slice())}).catch(function(e){t.uppy.log("[CompanionClient] unable to make preflight request "+e,"warning"),t.preflightDone=!0,r(t.allowedHeaders.slice())})})},n.preflightAndHeaders=function(e){var t=this;return Promise.all([this.preflight(e),this.headers()]).then(function(e){var r=e[0],n=e[1];return Object.keys(n).forEach(function(e){-1===r.indexOf(e.toLowerCase())&&(t.uppy.log("[CompanionClient] excluding unallowed header "+e),delete n[e])}),n})},n.get=function(e,t){var r=this;return new Promise(function(n,o){r.preflightAndHeaders(e).then(function(i){fetch(r._getUrl(e),{method:"get",headers:i,credentials:"same-origin"}).then(r._getPostResponseFunc(t)).then(function(e){return r._json(e).then(n)}).catch(function(t){t=t.isAuthError?t:new Error("Could not get "+r._getUrl(e)+". "+t),o(t)})}).catch(o)})},n.post=function(e,t,r){var n=this;return new Promise(function(o,i){n.preflightAndHeaders(e).then(function(s){fetch(n._getUrl(e),{method:"post",headers:s,credentials:"same-origin",body:JSON.stringify(t)}).then(n._getPostResponseFunc(r)).then(function(e){return n._json(e).then(o)}).catch(function(t){t=t.isAuthError?t:new Error("Could not post "+n._getUrl(e)+". "+t),i(t)})}).catch(i)})},n.delete=function(e,t,r){var n=this;return new Promise(function(o,i){n.preflightAndHeaders(e).then(function(s){fetch(n.hostname+"/"+e,{method:"delete",headers:s,credentials:"same-origin",body:t?JSON.stringify(t):null}).then(n._getPostResponseFunc(r)).then(function(e){return n._json(e).then(o)}).catch(function(t){t=t.isAuthError?t:new Error("Could not delete "+n._getUrl(e)+". "+t),i(t)})}).catch(i)})},t=e,(r=[{key:"hostname",get:function(){var e=this.uppy.getState().companion,t=this.opts.companionUrl;return(e&&e[t]?e[t]:t).replace(/\/$/,"")}},{key:"defaultHeaders",get:function(){return{Accept:"application/json","Content-Type":"application/json","Uppy-Versions":"@uppy/companion-client="+e.VERSION}}}])&&_defineProperties(t.prototype,r),e}(),_class.VERSION=_$package_99.version,_temp),_$tokenStorage_98={};function ___extends_94(){return(___extends_94=Object.assign||function(e){for(var t=1;t0&&t.isOpen;){var r=t.queued[0];t.send(r.action,r.payload),t.queued=t.queued.slice(1)}},this.socket.onclose=function(e){t.isOpen=!1},this._handleMessage=this._handleMessage.bind(this),this.socket.onmessage=this._handleMessage,this.close=this.close.bind(this),this.emit=this.emit.bind(this),this.on=this.on.bind(this),this.once=this.once.bind(this),this.send=this.send.bind(this)}var t=e.prototype;return t.close=function(){return this.socket.close()},t.send=function(e,t){this.isOpen?this.socket.send(JSON.stringify({action:e,payload:t})):this.queued.push({action:e,payload:t})},t.on=function(e,t){this.emitter.on(e,t)},t.emit=function(e,t){this.emitter.emit(e,t)},t.once=function(e,t){this.emitter.once(e,t)},t._handleMessage=function(e){try{var t=JSON.parse(e.data);this.emit(t.action,t.payload)}catch(e){console.log(e)}},e}(),_$lib_97={RequestClient:_$RequestClient_95,Provider:_$Provider_94,Socket:_$Socket_96},_$pad_16=function(e,t){var r="000000000"+e;return r.substr(r.length-t)},env="object"==typeof window?window:self,globalCount=Object.keys(env).length,clientId=_$pad_16(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+globalCount.toString(36),4),_$fingerprintBrowser_14=function(){return clientId},getRandomValue,crypto=window.crypto||window.msCrypto;if(crypto){var lim=Math.pow(2,32)-1;getRandomValue=function(){return Math.abs(crypto.getRandomValues(new Uint32Array(1))[0]/lim)}}else getRandomValue=Math.random;var _$getRandomValue_15=getRandomValue,_$cuid_13={},c=0,blockSize=4,base=36,discreteValues=Math.pow(base,blockSize);function randomBlock(){return _$pad_16((_$getRandomValue_15()*discreteValues<<0).toString(base),blockSize)}function safeCounter(){return c=c=7&&t<=10},cuid.fingerprint=_$fingerprintBrowser_14,_$cuid_13=cuid;var _$lodashThrottle_44={};(function(e){var t="Expected a function",r=NaN,n="[object Symbol]",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,u="object"==typeof e&&e&&e.Object===Object&&e,c="object"==typeof self&&self&&self.Object===Object&&self,p=u||c||Function("return this")(),d=Object.prototype.toString,h=Math.max,_=Math.min,f=function(){return p.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&d.call(e)==n}(e))return r;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var u=s.test(e);return u||a.test(e)?l(e.slice(2),u?2:8):i.test(e)?r:+e}_$lodashThrottle_44=function(e,r,n){var o=!0,i=!0;if("function"!=typeof e)throw new TypeError(t);return g(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),function(e,r,n){var o,i,s,a,l,u,c=0,p=!1,d=!1,y=!0;if("function"!=typeof e)throw new TypeError(t);function v(t){var r=o,n=i;return o=i=void 0,c=t,a=e.apply(n,r)}function b(e){var t=e-u;return void 0===u||t>=r||t<0||d&&e-c>=s}function w(){var e=f();if(b(e))return S(e);l=setTimeout(w,function(e){var t=r-(e-u);return d?_(t,s-(e-c)):t}(e))}function S(e){return l=void 0,y&&o?v(e):(o=i=void 0,a)}function P(){var e=f(),t=b(e);if(o=arguments,i=this,u=e,t){if(void 0===l)return function(e){return c=e,l=setTimeout(w,r),p?v(e):a}(u);if(d)return l=setTimeout(w,r),v(u)}return void 0===l&&(l=setTimeout(w,r)),a}return r=m(r)||0,g(n)&&(p=!!n.leading,s=(d="maxWait"in n)?h(m(n.maxWait)||0,r):s,y="trailing"in n?!!n.trailing:y),P.cancel=function(){void 0!==l&&clearTimeout(l),c=0,o=u=i=l=void 0},P.flush=function(){return void 0===l?a:S(f())},P}(e,r,{leading:o,maxWait:r,trailing:i})}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var _$wildcard_86={};function WildcardMatcher(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}WildcardMatcher.prototype.match=function(e){var t,r,n=!0,o=this.parts,i=o.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(r=(e||"").split(this.separator),t=0;n&&t=2}return t?r(t.split(";")[0]):r},_$preact_51={exports:{}};!function(){"use strict";function e(){}function t(t,r){var n,o,i,s,a=S;for(s=arguments.length;s-- >2;)w.push(arguments[s]);for(r&&null!=r.children&&(w.length||w.push(r.children),delete r.children);w.length;)if((o=w.pop())&&void 0!==o.pop)for(s=o.length;s--;)w.push(o[s]);else"boolean"==typeof o&&(o=null),(i="function"!=typeof t)&&(null==o?o="":"number"==typeof o?o=String(o):"string"!=typeof o&&(i=!1)),i&&n?a[a.length-1]+=o:a===S?a=[o]:a.push(o),n=i;var l=new e;return l.nodeName=t,l.children=a,l.attributes=null==r?void 0:r,l.key=null==r?void 0:r.key,void 0!==b.vnode&&b.vnode(l),l}function r(e,t){for(var r in t)e[r]=t[r];return e}function n(e){!e.__d&&(e.__d=!0)&&1==E.push(e)&&(b.debounceRendering||P)(o)}function o(){var e,t=E;for(E=[];e=t.pop();)e.__d&&m(e)}function i(e,t){return e.__n===t||e.nodeName.toLowerCase()===t.toLowerCase()}function s(e){var t=r({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var o in n)void 0===t[o]&&(t[o]=n[o]);return t}function a(e){var t=e.parentNode;t&&t.removeChild(e)}function l(e,t,r,n,o){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)r&&r(null),n&&n(e);else if("class"!==t||o)if("style"===t){if(n&&"string"!=typeof n&&"string"!=typeof r||(e.style.cssText=n||""),n&&"object"==typeof n){if("string"!=typeof r)for(var i in r)i in n||(e.style[i]="");for(var i in n)e.style[i]="number"==typeof n[i]&&!1===C.test(i)?n[i]+"px":n[i]}}else if("dangerouslySetInnerHTML"===t)n&&(e.innerHTML=n.__html||"");else if("o"==t[0]&&"n"==t[1]){var s=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),n?r||e.addEventListener(t,u,s):e.removeEventListener(t,u,s),(e.__l||(e.__l={}))[t]=n}else if("list"!==t&&"type"!==t&&!o&&t in e)!function(e,t,r){try{e[t]=r}catch(e){}}(e,t,null==n?"":n),null!=n&&!1!==n||e.removeAttribute(t);else{var a=o&&t!==(t=t.replace(/^xlink:?/,""));null==n||!1===n?a?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof n&&(a?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):e.setAttribute(t,n))}else e.className=n||""}function u(e){return this.__l[e.type](b.event&&b.event(e)||e)}function c(){for(var e;e=T.pop();)b.afterMount&&b.afterMount(e),e.componentDidMount&&e.componentDidMount()}function p(e,t,r,n,o,u){k++||($=null!=o&&void 0!==o.ownerSVGElement,F=null!=e&&!("__preactattr_"in e));var p=function e(t,r,n,o,u){var c=t,p=$;if(null!=r&&"boolean"!=typeof r||(r=""),"string"==typeof r||"number"==typeof r)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||u)?t.nodeValue!=r&&(t.nodeValue=r):(c=document.createTextNode(r),t&&(t.parentNode&&t.parentNode.replaceChild(c,t),d(t,!0))),c.__preactattr_=!0,c;var h,f,m=r.nodeName;if("function"==typeof m)return function(e,t,r,n){for(var o=e&&e._component,i=o,a=e,l=o&&e._componentConstructor===t.nodeName,u=l,c=s(t);o&&!u&&(o=o.__u);)u=o.constructor===t.nodeName;return o&&u&&(!n||o._component)?(g(o,c,3,r,n),e=o.base):(i&&!l&&(y(i),e=a=null),o=_(t.nodeName,c,r),e&&!o.__b&&(o.__b=e,a=null),g(o,c,1,r,n),e=o.base,a&&e!==a&&(a._component=null,d(a,!1))),e}(t,r,n,o);if($="svg"===m||"foreignObject"!==m&&$,m=String(m),(!t||!i(t,m))&&(h=m,(f=$?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h)).__n=h,c=f,t)){for(;t.firstChild;)c.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(c,t),d(t,!0)}var v=c.firstChild,b=c.__preactattr_,w=r.children;if(null==b){b=c.__preactattr_={};for(var S=c.attributes,P=S.length;P--;)b[S[P].name]=S[P].value}return!F&&w&&1===w.length&&"string"==typeof w[0]&&null!=v&&void 0!==v.splitText&&null==v.nextSibling?v.nodeValue!=w[0]&&(v.nodeValue=w[0]):(w&&w.length||null!=v)&&function(t,r,n,o,s){var l,u,c,p,h,_,f,g,m=t.childNodes,y=[],v={},b=0,w=0,S=m.length,P=0,C=r?r.length:0;if(0!==S)for(var E=0;E2?[].slice.call(arguments,2):e.children)},Component:v,render:function(e,t,r){return p(r,e,{},!1,t,!1)},rerender:o,options:b};_$preact_51.exports=x}(),_$preact_51=_$preact_51.exports;var _$isDOMElement_209=function(e){return e&&"object"==typeof e&&e.nodeType===Node.ELEMENT_NODE},_$findDOMElement_197=function(e,t){return void 0===t&&(t=document),"string"==typeof e?t.querySelector(e):"object"==typeof e&&_$isDOMElement_209(e)?e:void 0};function ___extends_100(){return(___extends_100=Object.assign||function(e){for(var t=1;t tag initializing Uppy\n comes at the bottom of the page, before the closing tag (see https://github.com/transloadit/uppy/issues/1042).")},t.render=function(e){throw new Error("Extend the render method to add your plugin to a DOM element")},t.addTarget=function(e){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")},t.unmount=function(){this.isTargetDOMEl&&this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},t.install=function(){},t.uninstall=function(){this.unmount()},e}();function __pad_208(e){return 2!==e.length?0+e:e}var _$getTimeStamp_208=function(){var e=new Date;return __pad_208(e.getHours().toString())+":"+__pad_208(e.getMinutes().toString())+":"+__pad_208(e.getSeconds().toString())},debugLogger={debug:function(){for(var e=console.debug||console.log,t=arguments.length,r=new Array(t),n=0;n18||18===n&&o>=18218},_$package_104={version:"1.2.0"},_$package_172={version:"1.1.0"},_$lib_171={};function ___extends_171(){return(___extends_171=Object.assign||function(e){for(var t=1;t=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+o:(t?"-":"")+e.toFixed(1)+" "+o},_$lib_101={};function ___extends_101(){return(___extends_101=Object.assign||function(e){for(var t=1;tn)throw new RestrictionError(""+this.i18n("youCanOnlyUploadX",{smart_count:n}));if(o&&!o.some(function(t){return t.indexOf("/")>-1?!!e.type&&_$mimeMatch_46(e.type,t):"."===t[0]&&e.extension.toLowerCase()===t.substr(1).toLowerCase()})){var i=o.join(", ");throw new RestrictionError(this.i18n("youCanOnlyUploadFileTypes",{types:i}))}if(r&&null!=e.data.size&&e.data.size>r)throw new RestrictionError(this.i18n("exceedsSize")+" "+_$prettyBytes_216(r))},n.addFile=function(e){var t,r=this,n=this.getState(),o=n.files,i=function(e){var t="object"==typeof e?e:new Error(e);throw r.log(t.message),r.info(t.message,"error",5e3),t};!1===n.allowNewUpload&&i(new Error("Cannot add new files: already uploading."));var s=_$getFileType_204(e);e.type=s;var a=this.opts.onBeforeFileAdded(e,o);if(!1!==a){var l;"object"==typeof a&&a&&(e=a),l=e.name?e.name:"image"===s.split("/")[0]?s.split("/")[0]+"."+s.split("/")[1]:"noname";var u=_$getFileNameAndExtension_203(l).extension,c=e.isRemote||!1,p=_$generateFileID_198(e),d=e.meta||{};d.name=l,d.type=s;var h=isFinite(e.data.size)?e.data.size:null,_={source:e.source||"",id:p,name:l,extension:u||"",meta:___extends_101({},this.getState().meta,d),type:s,data:e.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:h,uploadComplete:!1,uploadStarted:null},size:h,isRemote:c,remote:e.remote||"",preview:e.preview};try{this._checkRestrictions(_)}catch(e){this.emit("restriction-failed",_,e),i(e)}this.setState({files:___extends_101({},o,(t={},t[p]=_,t))}),this.emit("file-added",_),this.log("Added file: "+l+", "+p+", mime type: "+s),this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(function(){r.scheduledAutoProceed=null,r.upload().catch(function(e){e.isRestriction||r.uppy.log(e.stack||e.message||e)})},4))}else this.log("Not adding file because onBeforeFileAdded returned false")},n.removeFile=function(e){var t=this,r=this.getState(),n=r.files,o=r.currentUploads,i=___extends_101({},n),s=i[e];delete i[e];var a=___extends_101({},o),l=[];Object.keys(a).forEach(function(t){var r=o[t].fileIDs.filter(function(t){return t!==e});0!==r.length?a[t]=___extends_101({},o[t],{fileIDs:r}):l.push(t)}),this.setState({currentUploads:a,files:i}),l.forEach(function(e){t._removeUpload(e)}),this._calculateTotalProgress(),this.emit("file-removed",s),this.log("File removed: "+s.id)},n.pauseResume=function(e){if(this.getState().capabilities.resumableUploads&&!this.getFile(e).uploadComplete){var t=!this.getFile(e).isPaused;return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}},n.pauseAll=function(){var e=___extends_101({},this.getState().files);Object.keys(e).filter(function(t){return!e[t].progress.uploadComplete&&e[t].progress.uploadStarted}).forEach(function(t){var r=___extends_101({},e[t],{isPaused:!0});e[t]=r}),this.setState({files:e}),this.emit("pause-all")},n.resumeAll=function(){var e=___extends_101({},this.getState().files);Object.keys(e).filter(function(t){return!e[t].progress.uploadComplete&&e[t].progress.uploadStarted}).forEach(function(t){var r=___extends_101({},e[t],{isPaused:!1,error:null});e[t]=r}),this.setState({files:e}),this.emit("resume-all")},n.retryAll=function(){var e=___extends_101({},this.getState().files),t=Object.keys(e).filter(function(t){return e[t].error});t.forEach(function(t){var r=___extends_101({},e[t],{isPaused:!1,error:null});e[t]=r}),this.setState({files:e,error:null}),this.emit("retry-all",t);var r=this._createUpload(t);return this._runUpload(r)},n.cancelAll=function(){var e=this;this.emit("cancel-all"),Object.keys(this.getState().files).forEach(function(t){e.removeFile(t)}),this.setState({allowNewUpload:!0,totalProgress:0,error:null})},n.retryUpload=function(e){var t=___extends_101({},this.getState().files),r=___extends_101({},t[e],{error:null,isPaused:!1});t[e]=r,this.setState({files:t}),this.emit("upload-retry",e);var n=this._createUpload([e]);return this._runUpload(n)},n.reset=function(){this.cancelAll()},n._calculateProgress=function(e,t){if(this.getFile(e.id)){var r=isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:___extends_101({},this.getFile(e.id).progress,{bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:r?Math.round(t.bytesUploaded/t.bytesTotal*100):0})}),this._calculateTotalProgress()}else this.log("Not setting progress for a file that has been removed: "+e.id)},n._calculateTotalProgress=function(){var e=this.getFiles().filter(function(e){return e.progress.uploadStarted});if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});var t=e.filter(function(e){return null!=e.progress.bytesTotal}),r=e.filter(function(e){return null==e.progress.bytesTotal});if(0!==t.length){var n=t.reduce(function(e,t){return e+t.progress.bytesTotal},0),o=n/t.length;n+=o*r.length;var i=0;t.forEach(function(e){i+=e.progress.bytesUploaded}),r.forEach(function(e){i+=o*(e.progress.percentage||0)/100});var s=0===n?0:Math.round(i/n*100);s>100&&(s=100),this.setState({totalProgress:s}),this.emit("progress",s)}else{var a=100*e.length,l=r.reduce(function(e,t){return e+t.progress.percentage},0),u=Math.round(l/a*100);this.setState({totalProgress:u})}},n._addListeners=function(){var e=this;this.on("error",function(t){e.setState({error:t.message})}),this.on("upload-error",function(t,r,n){e.setFileState(t.id,{error:r.message,response:n}),e.setState({error:r.message});var o=e.i18n("failedToUpload",{file:t.name});"object"==typeof r&&r.message&&(o={message:o,details:r.message}),e.info(o,"error",5e3)}),this.on("upload",function(){e.setState({error:null})}),this.on("upload-started",function(t,r){e.getFile(t.id)?e.setFileState(t.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:t.size}}):e.log("Not setting progress for a file that has been removed: "+t.id)}),this.on("upload-progress",this._calculateProgress),this.on("upload-success",function(t,r){var n=e.getFile(t.id).progress;e.setFileState(t.id,{progress:___extends_101({},n,{uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal}),response:r,uploadURL:r.uploadURL,isPaused:!1}),e._calculateTotalProgress()}),this.on("preprocess-progress",function(t,r){e.getFile(t.id)?e.setFileState(t.id,{progress:___extends_101({},e.getFile(t.id).progress,{preprocess:r})}):e.log("Not setting progress for a file that has been removed: "+t.id)}),this.on("preprocess-complete",function(t){if(e.getFile(t.id)){var r=___extends_101({},e.getState().files);r[t.id]=___extends_101({},r[t.id],{progress:___extends_101({},r[t.id].progress)}),delete r[t.id].progress.preprocess,e.setState({files:r})}else e.log("Not setting progress for a file that has been removed: "+t.id)}),this.on("postprocess-progress",function(t,r){e.getFile(t.id)?e.setFileState(t.id,{progress:___extends_101({},e.getState().files[t.id].progress,{postprocess:r})}):e.log("Not setting progress for a file that has been removed: "+t.id)}),this.on("postprocess-complete",function(t){if(e.getFile(t.id)){var r=___extends_101({},e.getState().files);r[t.id]=___extends_101({},r[t.id],{progress:___extends_101({},r[t.id].progress)}),delete r[t.id].progress.postprocess,e.setState({files:r})}else e.log("Not setting progress for a file that has been removed: "+t.id)}),this.on("restored",function(){e._calculateTotalProgress()}),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",function(){return e.updateOnlineStatus()}),window.addEventListener("offline",function(){return e.updateOnlineStatus()}),setTimeout(function(){return e.updateOnlineStatus()},3e3))},n.updateOnlineStatus=function(){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)},n.getID=function(){return this.opts.id},n.use=function(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.");var r=new e(this,t),n=r.id;if(this.plugins[r.type]=this.plugins[r.type]||[],!n)throw new Error("Your plugin must have an id");if(!r.type)throw new Error("Your plugin must have a type");var o=this.getPlugin(n);if(o){var i="Already found a plugin named '"+o.id+"'. Tried to use: '"+n+"'.\nUppy plugins must have unique 'id' options. See https://uppy.io/docs/plugins/#id.";throw new Error(i)}return e.VERSION&&this.log("Using "+n+" v"+e.VERSION),this.plugins[r.type].push(r),r.install(),this},n.getPlugin=function(e){var t=null;return this.iteratePlugins(function(r){if(r.id===e)return t=r,!1}),t},n.iteratePlugins=function(e){var t=this;Object.keys(this.plugins).forEach(function(r){t.plugins[r].forEach(e)})},n.removePlugin=function(e){this.log("Removing plugin "+e.id),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();var t=this.plugins[e.type].slice(),r=t.indexOf(e);-1!==r&&(t.splice(r,1),this.plugins[e.type]=t);var n=this.getState();delete n.plugins[e.id],this.setState(n)},n.close=function(){var e=this;this.log("Closing Uppy instance "+this.opts.id+": removing all files and uninstalling plugins"),this.reset(),this._storeUnsubscribe(),this.iteratePlugins(function(t){e.removePlugin(t)})},n.info=function(e,t,r){void 0===t&&(t="info"),void 0===r&&(r=3e3);var n="object"==typeof e;this.setState({info:{isHidden:!1,type:t,message:n?e.message:e,details:n?e.details:null}}),this.emit("info-visible"),clearTimeout(this.infoTimeoutID),this.infoTimeoutID=0!==r?setTimeout(this.hideInfo,r):void 0},n.hideInfo=function(){var e=___extends_101({},this.getState().info,{isHidden:!0});this.setState({info:e}),this.emit("info-hidden")},n.log=function(e,t){var r=this.opts.logger;switch(t){case"error":r.error(e);break;case"warning":r.warn(e);break;default:r.debug(e)}},n.run=function(){return this.log("Calling run() is no longer necessary.","warning"),this},n.restore=function(e){return this.log('Core: attempting to restore upload "'+e+'"'),this.getState().currentUploads[e]?this._runUpload(e):(this._removeUpload(e),Promise.reject(new Error("Nonexistent upload")))},n._createUpload=function(e){var t,r=this.getState(),n=r.allowNewUpload,o=r.currentUploads;if(!n)throw new Error("Cannot create a new upload: already uploading.");var i=_$cuid_13();return this.emit("upload",{id:i,fileIDs:e}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploads,currentUploads:___extends_101({},o,(t={},t[i]={fileIDs:e,step:0,result:{}},t))}),i},n._getUpload=function(e){return this.getState().currentUploads[e]},n.addResultData=function(e,t){var r;if(this._getUpload(e)){var n=this.getState().currentUploads,o=___extends_101({},n[e],{result:___extends_101({},n[e].result,t)});this.setState({currentUploads:___extends_101({},n,(r={},r[e]=o,r))})}else this.log("Not setting result for an upload that has been removed: "+e)},n._removeUpload=function(e){var t=___extends_101({},this.getState().currentUploads);delete t[e],this.setState({currentUploads:t})},n._runUpload=function(e){var t=this,r=this.getState().currentUploads[e].step,n=[].concat(this.preProcessors,this.uploaders,this.postProcessors),o=Promise.resolve();return n.forEach(function(n,i){i=e?new Promise(function(e,t){r.push(function(){l().then(e,t)})}):l()}};function n(){t--;var e=r.shift();e&&e()}},___class_89,___temp_89;function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ___extends_89(){return(___extends_89=Object.assign||function(e){for(var t=1;t=200&&e<300}};if(n.opts=___extends_229({},o,r),n.translator=new _$Translator_192([n.defaultLocale,n.uppy.locale,n.opts.locale]),n.i18n=n.translator.translate.bind(n.translator),n.i18nArray=n.translator.translateArray.bind(n.translator),n.handleUpload=n.handleUpload.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),"number"==typeof n.opts.limit&&0!==n.opts.limit?n.limitUploads=_$limitPromises_214(n.opts.limit):n.limitUploads=function(e){return e},n.opts.bundle&&!n.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");return n}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var o=n.prototype;return o.getOptions=function(e){var t=this.uppy.getState().xhrUpload,r=___extends_229({},this.opts,t||{},e.xhrUpload||{},{headers:{}});return ___extends_229(r.headers,this.opts.headers),t&&___extends_229(r.headers,t.headers),e.xhrUpload&&___extends_229(r.headers,e.xhrUpload.headers),r},o.createProgressTimeout=function(e,t){var r=this.uppy,n=this,o=!1;function i(){r.log("[XHRUpload] timed out");var o=new Error(n.i18n("timedOut",{seconds:Math.ceil(e/1e3)}));t(o)}var s=null;return{progress:function(){o||e>0&&(s&&clearTimeout(s),s=setTimeout(i,e))},done:function(){r.log("[XHRUpload] timer done"),s&&(clearTimeout(s),s=null),o=!0}}},o.addMetadata=function(e,t,r){(Array.isArray(r.metaFields)?r.metaFields:Object.keys(t)).forEach(function(r){e.append(r,t[r])})},o.createFormDataUpload=function(e,t){var r=new FormData;this.addMetadata(r,e.meta,t);var n=setTypeInBlob(e);return e.name?r.append(t.fieldName,n,e.meta.name):r.append(t.fieldName,n),r},o.createBundledUpload=function(e,t){var r=this,n=new FormData,o=this.uppy.getState().meta;return this.addMetadata(n,o,t),e.forEach(function(e){var t=r.getOptions(e),o=setTypeInBlob(e);e.name?n.append(t.fieldName,o,e.name):n.append(t.fieldName,o)}),n},o.createBareUpload=function(e,t){return e.data},o.upload=function(e,t,r){var n=this,o=this.getOptions(e);return this.uppy.log("uploading "+t+" of "+r),new Promise(function(t,r){var i=o.formData?n.createFormDataUpload(e,o):n.createBareUpload(e,o),s=n.createProgressTimeout(o.timeout,function(t){a.abort(),n.uppy.emit("upload-error",e,t),r(t)}),a=new XMLHttpRequest,l=_$cuid_13();a.upload.addEventListener("loadstart",function(e){n.uppy.log("[XHRUpload] "+l+" started")}),a.upload.addEventListener("progress",function(t){n.uppy.log("[XHRUpload] "+l+" progress: "+t.loaded+" / "+t.total),s.progress(),t.lengthComputable&&n.uppy.emit("upload-progress",e,{uploader:n,bytesUploaded:t.loaded,bytesTotal:t.total})}),a.addEventListener("load",function(i){if(n.uppy.log("[XHRUpload] "+l+" finished"),s.done(),o.validateStatus(i.target.status,a.responseText,a)){var u=o.getResponseData(a.responseText,a),c=u[o.responseUrlFieldName],p={status:i.target.status,body:u,uploadURL:c};return n.uppy.emit("upload-success",e,p),c&&n.uppy.log("Download "+e.name+" from "+c),t(e)}var d=o.getResponseData(a.responseText,a),h=buildResponseError(a,o.getResponseError(a.responseText,a)),_={status:i.target.status,body:d};return n.uppy.emit("upload-error",e,h,_),r(h)}),a.addEventListener("error",function(t){n.uppy.log("[XHRUpload] "+l+" errored"),s.done();var i=buildResponseError(a,o.getResponseError(a.responseText,a));return n.uppy.emit("upload-error",e,i),r(i)}),a.open(o.method.toUpperCase(),o.endpoint,!0),a.withCredentials=o.withCredentials,""!==o.responseType&&(a.responseType=o.responseType),Object.keys(o.headers).forEach(function(e){a.setRequestHeader(e,o.headers[e])}),a.send(i),n.uppy.on("file-removed",function(t){t.id===e.id&&(s.done(),a.abort(),r(new Error("File removed")))}),n.uppy.on("cancel-all",function(){s.done(),a.abort(),r(new Error("Upload cancelled"))})})},o.uploadRemote=function(e,t,r){var n=this,o=this.getOptions(e);return new Promise(function(t,r){var i={};(Array.isArray(o.metaFields)?o.metaFields:Object.keys(e.meta)).forEach(function(t){i[t]=e.meta[t]}),new(e.remote.providerOptions.provider?__Provider_229:__RequestClient_229)(n.uppy,e.remote.providerOptions).post(e.remote.url,___extends_229({},e.remote.body,{endpoint:o.endpoint,size:e.data.size,fieldname:o.fieldName,metadata:i,headers:o.headers})).then(function(i){var s=i.token,a=_$getSocketHost_206(e.remote.companionUrl),l=new __Socket_229({target:a+"/api/"+s});l.on("progress",function(t){return _$emitSocketProgress_195(n,t,e)}),l.on("success",function(r){var i=o.getResponseData(r.response.responseText,r.response),s=i[o.responseUrlFieldName],a={status:r.response.status,body:i,uploadURL:s};return n.uppy.emit("upload-success",e,a),l.close(),t()}),l.on("error",function(t){var i=t.response,s=i?o.getResponseError(i.responseText,i):___extends_229(new Error(t.error.message),{cause:t.error});n.uppy.emit("upload-error",e,s),r(s)})})})},o.uploadBundle=function(e){var t=this;return new Promise(function(r,n){var o=t.opts.endpoint,i=t.opts.method,s=t.uppy.getState().xhrUpload,a=t.createBundledUpload(e,___extends_229({},t.opts,s||{})),l=new XMLHttpRequest,u=t.createProgressTimeout(t.opts.timeout,function(e){l.abort(),c(e),n(e)}),c=function(r){e.forEach(function(e){t.uppy.emit("upload-error",e,r)})};l.upload.addEventListener("loadstart",function(e){t.uppy.log("[XHRUpload] started uploading bundle"),u.progress()}),l.upload.addEventListener("progress",function(r){u.progress(),r.lengthComputable&&e.forEach(function(e){t.uppy.emit("upload-progress",e,{uploader:t,bytesUploaded:r.loaded/r.total*e.size,bytesTotal:e.size})})}),l.addEventListener("load",function(o){if(u.done(),t.opts.validateStatus(o.target.status,l.responseText,l)){var i=t.opts.getResponseData(l.responseText,l),s={status:o.target.status,body:i};return e.forEach(function(e){t.uppy.emit("upload-success",e,s)}),r()}var a=t.opts.getResponseError(l.responseText,l)||new Error("Upload error");return a.request=l,c(a),n(a)}),l.addEventListener("error",function(e){u.done();var r=t.opts.getResponseError(l.responseText,l)||new Error("Upload error");return c(r),n(r)}),t.uppy.on("cancel-all",function(){u.done(),l.abort()}),l.open(i.toUpperCase(),o,!0),l.withCredentials=t.opts.withCredentials,""!==t.opts.responseType&&(l.responseType=t.opts.responseType),Object.keys(t.opts.headers).forEach(function(e){l.setRequestHeader(e,t.opts.headers[e])}),l.send(a),e.forEach(function(e){t.uppy.emit("upload-started",e)})})},o.uploadFiles=function(e){var t=this,r=e.map(function(r,n){var o=parseInt(n,10)+1,i=e.length;return r.error?function(){return Promise.reject(new Error(r.error))}:r.isRemote?(t.uppy.emit("upload-started",r),t.uploadRemote.bind(t,r,o,i)):(t.uppy.emit("upload-started",r),t.upload.bind(t,r,o,i))}).map(function(e){return t.limitUploads(e)()});return _$settle_219(r)},o.handleUpload=function(e){var t=this;if(0===e.length)return this.uppy.log("[XHRUpload] No files to upload!"),Promise.resolve();this.uppy.log("[XHRUpload] Uploading...");var r=e.map(function(e){return t.uppy.getFile(e)});return this.opts.bundle?this.uploadBundle(r):this.uploadFiles(r).then(function(){return null})},o.install=function(){if(this.opts.bundle){var e=this.uppy.getState().capabilities;this.uppy.setState({capabilities:___extends_229({},e,{individualCancellation:!1})})}this.uppy.addUploader(this.handleUpload)},o.uninstall=function(){if(this.opts.bundle){var e=this.uppy.getState().capabilities;this.uppy.setState({capabilities:___extends_229({},e,{individualCancellation:!0})})}this.uppy.removeUploader(this.handleUpload)},n}(__Plugin_229),___class_229.VERSION=_$package_230.version,___temp_229),___class_91,___temp_91;function ___assertThisInitialized_91(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ___extends_91(){return(___extends_91=Object.assign||function(e){for(var t=1;t"),n=e.indexOf("",r);return-1!==r&&-1!==n?e.slice(r+t.length+2,n):""}function __assertServerError_91(e){if(e&&e.error){var t=new Error(e.message);throw ___extends_91(t,e.error),t}return e}var _$lib_91=(___temp_91=___class_91=function(e){var t,r;function n(t,r){var n;(n=e.call(this,t,r)||this).type="uploader",n.id=n.opts.id||"AwsS3",n.title="AWS S3",n.defaultLocale={strings:{preparingUpload:"Preparing upload..."}};var o={timeout:3e4,limit:0,getUploadParameters:n.getUploadParameters.bind(___assertThisInitialized_91(n))};return n.opts=___extends_91({},o,r),n.translator=new _$Translator_192([n.defaultLocale,n.uppy.locale,n.opts.locale]),n.i18n=n.translator.translate.bind(n.translator),n.i18nArray=n.translator.translateArray.bind(n.translator),n.client=new __RequestClient_91(t,r),n.prepareUpload=n.prepareUpload.bind(___assertThisInitialized_91(n)),"number"==typeof n.opts.limit&&0!==n.opts.limit?n.limitRequests=_$limitPromises_214(n.opts.limit):n.limitRequests=function(e){return e},n}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var o=n.prototype;return o.getUploadParameters=function(e){if(!this.opts.companionUrl)throw new Error("Expected a `companionUrl` option containing a Companion address.");var t=encodeURIComponent(e.meta.name),r=encodeURIComponent(e.meta.type);return this.client.get("s3/params?filename="+t+"&type="+r).then(__assertServerError_91)},o.validateParameters=function(e,t){if("object"!=typeof t||!t||"string"!=typeof t.url||"object"!=typeof t.fields&&null!=t.fields||null!=t.method&&!/^(put|post)$/i.test(t.method)){var r=new TypeError("AwsS3: got incorrect result from 'getUploadParameters()' for file '"+e.name+"', expected an object '{ url, method, fields, headers }'.\nSee https://uppy.io/docs/aws-s3/#getUploadParameters-file for more on the expected format.");throw console.error(r),r}return t},o.prepareUpload=function(e){var t=this;e.forEach(function(e){var r=t.uppy.getFile(e);t.uppy.emit("preprocess-progress",r,{mode:"determinate",message:t.i18n("preparingUpload"),value:0})});var r=this.limitRequests(this.opts.getUploadParameters);return Promise.all(e.map(function(e){var n=t.uppy.getFile(e);return Promise.resolve().then(function(){return r(n)}).then(function(e){return t.validateParameters(n,e)}).then(function(e){return t.uppy.emit("preprocess-progress",n,{mode:"determinate",message:t.i18n("preparingUpload"),value:1}),e}).catch(function(e){t.uppy.emit("upload-error",n,e)})})).then(function(r){var n={};e.forEach(function(e,o){var i=t.uppy.getFile(e);if(i&&!i.error){var s=r[o],a=s.method,l=void 0===a?"post":a,u=s.url,c=s.fields,p=s.headers,d={method:l,formData:"post"===l.toLowerCase(),endpoint:u,metaFields:c?Object.keys(c):[]};p&&(d.headers=p);var h=___extends_91({},i,{meta:___extends_91({},i.meta,c),xhrUpload:d});n[e]=h}}),t.uppy.setState({files:___extends_91({},t.uppy.getState().files,n)}),e.forEach(function(e){var r=t.uppy.getFile(e);t.uppy.emit("preprocess-complete",r)})})},o.install=function(){var e=this.uppy.log;this.uppy.addPreProcessor(this.prepareUpload);var t=!1,r={fieldName:"file",responseUrlFieldName:"location",timeout:this.opts.timeout,limit:this.opts.limit,responseType:"text",getResponseData:function(r,n){return isXml(n)?{location:_$resolveUrl_56(n.responseURL,getXmlValue(r,"Location")),bucket:getXmlValue(r,"Bucket"),key:getXmlValue(r,"Key"),etag:getXmlValue(r,"ETag")}:"POST"===this.method.toUpperCase()?(t||(e("[AwsS3] No response data found, make sure to set the success_action_status AWS SDK option to 201. See https://uppy.io/docs/aws-s3/#POST-Uploads","warning"),t=!0),{location:null}):n.responseURL?{location:n.responseURL.replace(/\?.*$/,"")}:{location:null}},getResponseError:function(e,t){if(isXml(t)){var r=getXmlValue(e,"Message");return new Error(r)}}};this.opts.getResponseData&&(r.getResponseData=this.opts.getResponseData),this.uppy.use(_$lib_229,r)},o.uninstall=function(){var e=this.uppy.getPlugin("XHRUpload");this.uppy.removePlugin(e),this.uppy.removePreProcessor(this.prepareUpload)},n}(__Plugin_91),___class_91.VERSION=_$package_92.version,___temp_91);function areInputsEqual(e,t){if(e.length!==t.length)return!1;for(var r=0;r0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;a.some(function(e){return!!~r.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),c=function(e,t){for(var r=0,n=Object.keys(t);r0},e}(),w="undefined"!=typeof WeakMap?new WeakMap:new t,S=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=u.getInstance(),n=new b(t,r,this);w.set(this,n)};return["observe","unobserve","disconnect"].forEach(function(e){S.prototype[e]=function(){var t;return(t=w.get(this))[e].apply(t,arguments)}}),void 0!==n.ResizeObserver?n.ResizeObserver:S})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),_$ResizeObserver_55=_$ResizeObserver_55.exports;var _$classnames_9={exports:{}};!function(){"use strict";var e={}.hasOwnProperty;function t(){for(var r=[],n=0;n=0;)o=o.replace(t,u);e.className=o.trim()}}var _={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},f=[];"undefined"!=typeof window&&function(){var e=document.createElement("div").style;for(var t in"AnimationEvent"in window||delete _.animationend.animation,"TransitionEvent"in window||delete _.transitionend.transition,_){var r=_[t];for(var n in r)if(n in e){f.push(r[n]);break}}}();var g=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},m=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},y=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},v=function(e){function t(){var n,o;g(this,t);for(var i=arguments.length,s=Array(i),a=0;a=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(t,["component","transitionName","transitionEnter","transitionLeave","transitionEnterTimeout","transitionLeaveTimeout","children"])),s=r.children;return e.h(o,i,n(s).map(this.renderChild))},o}(e.Component);return b.defaultProps={component:"span",transitionEnter:!0,transitionLeave:!0},b},"object"==typeof _$preactCssTransitionGroup_50.exports?_$preactCssTransitionGroup_50.exports=__factory_50(_$preact_51):"function"==typeof define&&define.amd?define(["preact"],__factory_50):__global_50.PreactCSSTransitionGroup=__factory_50(__global_50.preact),_$preactCssTransitionGroup_50=_$preactCssTransitionGroup_50.exports;var h=_$preact_51.h,_$icons_119={defaultPickerIcon:function(){return h("svg",{"aria-hidden":"true",focusable:"false",width:"30",height:"30",viewBox:"0 0 30 30"},h("path",{d:"M15 30c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15zm4.258-12.676v6.846h-8.426v-6.846H5.204l9.82-12.364 9.82 12.364H19.26z"}))},iconRetry:function(){return h("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon retry",width:"28",height:"31",viewBox:"0 0 16 19"},h("path",{d:"M16 11a8 8 0 1 1-8-8v2a6 6 0 1 0 6 6h2z"}),h("path",{d:"M7.9 3H10v2H7.9z"}),h("path",{d:"M8.536.5l3.535 3.536-1.414 1.414L7.12 1.914z"}),h("path",{d:"M10.657 2.621l1.414 1.415L8.536 7.57 7.12 6.157z"}))},localIcon:function(){return h("svg",{"aria-hidden":"true",focusable:"false",fill:"#607d8b",width:"27",height:"25",viewBox:"0 0 27 25"},h("path",{d:"M5.586 9.288a.313.313 0 0 0 .282.176h4.84v3.922c0 1.514 1.25 2.24 2.792 2.24 1.54 0 2.79-.726 2.79-2.24V9.464h4.84c.122 0 .23-.068.284-.176a.304.304 0 0 0-.046-.324L13.735.106a.316.316 0 0 0-.472 0l-7.63 8.857a.302.302 0 0 0-.047.325z"}),h("path",{d:"M24.3 5.093c-.218-.76-.54-1.187-1.208-1.187h-4.856l1.018 1.18h3.948l2.043 11.038h-7.193v2.728H9.114v-2.725h-7.36l2.66-11.04h3.33l1.018-1.18H3.907c-.668 0-1.06.46-1.21 1.186L0 16.456v7.062C0 24.338.676 25 1.51 25h23.98c.833 0 1.51-.663 1.51-1.482v-7.062L24.3 5.093z"}))},iconAudio:function(){return h("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"25",height:"25",viewBox:"0 0 25 25"},h("path",{d:"M9.5 18.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V7.25a.5.5 0 0 1 .379-.485l9-2.25A.5.5 0 0 1 18.5 5v11.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V8.67l-8 2v7.97zm8-11v-2l-8 2v2l8-2zM7 19.64c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1zm9-2c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1z",fill:"#049BCF","fill-rule":"nonzero"}))},iconVideo:function(){return h("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"25",height:"25",viewBox:"0 0 25 25"},h("path",{d:"M16 11.834l4.486-2.691A1 1 0 0 1 22 10v6a1 1 0 0 1-1.514.857L16 14.167V17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2.834zM15 9H5v8h10V9zm1 4l5 3v-6l-5 3z",fill:"#19AF67","fill-rule":"nonzero"}))},iconPDF:function(){return h("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"25",height:"25",viewBox:"0 0 25 25"},h("path",{d:"M9.766 8.295c-.691-1.843-.539-3.401.747-3.726 1.643-.414 2.505.938 2.39 3.299-.039.79-.194 1.662-.537 3.148.324.49.66.967 1.055 1.51.17.231.382.488.629.757 1.866-.128 3.653.114 4.918.655 1.487.635 2.192 1.685 1.614 2.84-.566 1.133-1.839 1.084-3.416.249-1.141-.604-2.457-1.634-3.51-2.707a13.467 13.467 0 0 0-2.238.426c-1.392 4.051-4.534 6.453-5.707 4.572-.986-1.58 1.38-4.206 4.914-5.375.097-.322.185-.656.264-1.001.08-.353.306-1.31.407-1.737-.678-1.059-1.2-2.031-1.53-2.91zm2.098 4.87c-.033.144-.068.287-.104.427l.033-.01-.012.038a14.065 14.065 0 0 1 1.02-.197l-.032-.033.052-.004a7.902 7.902 0 0 1-.208-.271c-.197-.27-.38-.526-.555-.775l-.006.028-.002-.003c-.076.323-.148.632-.186.8zm5.77 2.978c1.143.605 1.832.632 2.054.187.26-.519-.087-1.034-1.113-1.473-.911-.39-2.175-.608-3.55-.608.845.766 1.787 1.459 2.609 1.894zM6.559 18.789c.14.223.693.16 1.425-.413.827-.648 1.61-1.747 2.208-3.206-2.563 1.064-4.102 2.867-3.633 3.62zm5.345-10.97c.088-1.793-.351-2.48-1.146-2.28-.473.119-.564 1.05-.056 2.405.213.566.52 1.188.908 1.859.18-.858.268-1.453.294-1.984z",fill:"#E2514A","fill-rule":"nonzero"}))},iconFile:function(){return h("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"25",height:"25",viewBox:"0 0 25 25"},h("g",{fill:"#A7AFB7","fill-rule":"nonzero"},h("path",{d:"M5.5 22a.5.5 0 0 1-.5-.5v-18a.5.5 0 0 1 .5-.5h10.719a.5.5 0 0 1 .367.16l3.281 3.556a.5.5 0 0 1 .133.339V21.5a.5.5 0 0 1-.5.5h-14zm.5-1h13V7.25L16 4H6v17z"}),h("path",{d:"M15 4v3a1 1 0 0 0 1 1h3V7h-3V4h-1z"})))},iconText:function(){return h("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"25",height:"25",viewBox:"0 0 25 25"},h("path",{d:"M4.5 7h13a.5.5 0 1 1 0 1h-13a.5.5 0 0 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h10a.5.5 0 1 1 0 1h-10a.5.5 0 1 1 0-1z",fill:"#5A5E69","fill-rule":"nonzero"}))},iconCopyLink:function(){return h("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"14",height:"14",viewBox:"0 0 14 12"},h("path",{d:"M7.94 7.703a2.613 2.613 0 0 1-.626 2.681l-.852.851a2.597 2.597 0 0 1-1.849.766A2.616 2.616 0 0 1 2.764 7.54l.852-.852a2.596 2.596 0 0 1 2.69-.625L5.267 7.099a1.44 1.44 0 0 0-.833.407l-.852.851a1.458 1.458 0 0 0 1.03 2.486c.39 0 .755-.152 1.03-.426l.852-.852c.231-.231.363-.522.406-.824l1.04-1.038zm4.295-5.937A2.596 2.596 0 0 0 10.387 1c-.698 0-1.355.272-1.849.766l-.852.851a2.614 2.614 0 0 0-.624 2.688l1.036-1.036c.041-.304.173-.6.407-.833l.852-.852c.275-.275.64-.426 1.03-.426a1.458 1.458 0 0 1 1.03 2.486l-.852.851a1.442 1.442 0 0 1-.824.406l-1.04 1.04a2.596 2.596 0 0 0 2.683-.628l.851-.85a2.616 2.616 0 0 0 0-3.697zm-6.88 6.883a.577.577 0 0 0 .82 0l3.474-3.474a.579.579 0 1 0-.819-.82L5.355 7.83a.579.579 0 0 0 0 .819z"}))},iconPencil:function(){return h("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"14",height:"14",viewBox:"0 0 14 14"},h("g",{"fill-rule":"evenodd"},h("path",{d:"M1.5 10.793h2.793A1 1 0 0 0 5 10.5L11.5 4a1 1 0 0 0 0-1.414L9.707.793a1 1 0 0 0-1.414 0l-6.5 6.5A1 1 0 0 0 1.5 8v2.793zm1-1V8L9 1.5l1.793 1.793-6.5 6.5H2.5z","fill-rule":"nonzero"}),h("rect",{x:"1",y:"12.293",width:"11",height:"1",rx:".5"}),h("path",{"fill-rule":"nonzero",d:"M6.793 2.5L9.5 5.207l.707-.707L7.5 1.793z"})))},iconCross:function(){return h("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"18",height:"18",viewBox:"0 0 18 18"},h("path",{d:"M9 0C4.034 0 0 4.034 0 9s4.034 9 9 9 9-4.034 9-9-4.034-9-9-9z"}),h("path",{fill:"#FFF",d:"M13 12.222l-.778.778L9 9.778 5.778 13 5 12.222 8.222 9 5 5.778 5.778 5 9 8.222 12.222 5l.778.778L9.778 9z"}))},iconPlus:function(){return h("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"15",height:"15",viewBox:"0 0 15 15"},h("path",{d:"M8 6.5h6a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5H8v6a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V8h-6a.5.5 0 0 1-.5-.5V7a.5.5 0 0 1 .5-.5h6v-6A.5.5 0 0 1 7 0h.5a.5.5 0 0 1 .5.5v6z"}))}};function ___assertThisInitialized_105(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var localIcon=_$icons_119.localIcon,__h_105=_$preact_51.h,AddFiles=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).triggerFileInputClick=r.triggerFileInputClick.bind(___assertThisInitialized_105(r)),r.handleFileInputChange=r.handleFileInputChange.bind(___assertThisInitialized_105(r)),r.renderPoweredByUppy=r.renderPoweredByUppy.bind(___assertThisInitialized_105(r)),r.renderHiddenFileInput=r.renderHiddenFileInput.bind(___assertThisInitialized_105(r)),r.renderDropPasteBrowseTagline=r.renderDropPasteBrowseTagline.bind(___assertThisInitialized_105(r)),r.renderMyDeviceAcquirer=r.renderMyDeviceAcquirer.bind(___assertThisInitialized_105(r)),r.renderAcquirer=r.renderAcquirer.bind(___assertThisInitialized_105(r)),r}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var o=n.prototype;return o.triggerFileInputClick=function(){this.fileInput.click()},o.handleFileInputChange=function(e){this.props.handleInputChange(e),e.target.value=null},o.renderPoweredByUppy=function(){return __h_105("a",{tabindex:"-1",href:"https://uppy.io",rel:"noreferrer noopener",target:"_blank",class:"uppy-Dashboard-poweredBy"},this.props.i18n("poweredBy")+" ",__h_105("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon uppy-Dashboard-poweredByIcon",width:"11",height:"11",viewBox:"0 0 11 11"},__h_105("path",{d:"M7.365 10.5l-.01-4.045h2.612L5.5.806l-4.467 5.65h2.604l.01 4.044h3.718z","fill-rule":"evenodd"})),__h_105("span",{class:"uppy-Dashboard-poweredByUppy"},"Uppy"))},o.renderHiddenFileInput=function(){var e=this;return __h_105("input",{class:"uppy-Dashboard-input",hidden:!0,"aria-hidden":"true",tabindex:-1,type:"file",name:"files[]",multiple:1!==this.props.maxNumberOfFiles,onchange:this.handleFileInputChange,accept:this.props.allowedFileTypes,ref:function(t){e.fileInput=t}})},o.renderDropPasteBrowseTagline=function(){var e=__h_105("button",{type:"button",class:"uppy-u-reset uppy-Dashboard-browse",onclick:this.triggerFileInputClick},this.props.i18n("browse"));return __h_105("div",{class:"uppy-Dashboard-dropFilesTitle"},0===this.props.acquirers.length?this.props.i18nArray("dropPaste",{browse:e}):this.props.i18nArray("dropPasteImport",{browse:e}))},o.renderMyDeviceAcquirer=function(){return __h_105("div",{class:"uppy-DashboardTab",role:"presentation"},__h_105("button",{type:"button",class:"uppy-DashboardTab-btn",role:"tab",tabindex:0,"data-uppy-super-focusable":!0,onclick:this.triggerFileInputClick},localIcon(),__h_105("div",{class:"uppy-DashboardTab-name"},this.props.i18n("myDevice"))))},o.renderAcquirer=function(e){var t=this;return __h_105("div",{class:"uppy-DashboardTab",role:"presentation"},__h_105("button",{type:"button",class:"uppy-DashboardTab-btn",role:"tab",tabindex:0,"aria-controls":"uppy-DashboardContent-panel--"+e.id,"aria-selected":this.props.activePickerPanel.id===e.id,"data-uppy-super-focusable":!0,onclick:function(){return t.props.showPanel(e.id)}},e.icon(),__h_105("div",{class:"uppy-DashboardTab-name"},e.name)))},o.render=function(){var e=this;return __h_105("div",{class:"uppy-DashboardAddFiles"},this.renderHiddenFileInput(),__h_105("div",{class:"uppy-DashboardTabs"},this.renderDropPasteBrowseTagline(),this.props.acquirers.length>0&&__h_105("div",{class:"uppy-DashboardTabs-list",role:"tablist"},this.renderMyDeviceAcquirer(),this.props.acquirers.map(function(t){return e.renderAcquirer(t)}))),__h_105("div",{class:"uppy-DashboardAddFiles-info"},this.props.note&&__h_105("div",{class:"uppy-Dashboard-note"},this.props.note),this.props.proudlyDisplayPoweredByUppy&&this.renderPoweredByUppy(this.props)))},n}(_$preact_51.Component),_$AddFiles_105=AddFiles,__h_106=_$preact_51.h,_$AddFilesPanel_106=function(e){return __h_106("div",{class:"uppy-Dashboard-AddFilesPanel","data-uppy-panelType":"AddFiles","aria-hidden":e.showAddFilesPanel},__h_106("div",{class:"uppy-DashboardContent-bar"},__h_106("div",{class:"uppy-DashboardContent-title",role:"heading","aria-level":"h1"},e.i18n("addingMoreFiles")),__h_106("button",{class:"uppy-DashboardContent-back",type:"button",onclick:function(t){return e.toggleAddFilesPanel(!1)}},e.i18n("back"))),__h_106(_$AddFiles_105,e))},iconFile=_$icons_119.iconFile,iconText=_$icons_119.iconText,iconAudio=_$icons_119.iconAudio,iconVideo=_$icons_119.iconVideo,iconPDF=_$icons_119.iconPDF,_$getFileTypeIcon_124=function(e){var t={color:"#838999",icon:iconFile()};if(!e)return t;var r=e.split("/")[0],n=e.split("/")[1];return"text"===r?{color:"#5a5e69",icon:iconText()}:"audio"===r?{color:"#068dbb",icon:iconAudio()}:"video"===r?{color:"#19af67",icon:iconVideo()}:"application"===r&&"pdf"===n?{color:"#e25149",icon:iconPDF()}:"image"===r?{color:"#f2f2f2",icon:""}:t},__h_116=_$preact_51.h,_$FilePreview_116=function(e){var t=e.file;if(t.preview)return __h_116("img",{class:"uppy-DashboardItem-previewImg",alt:t.name,src:t.preview});var r=_$getFileTypeIcon_124(t.type),n=r.color,o=r.icon;return __h_116("div",{class:"uppy-DashboardItem-previewIconWrap"},__h_116("span",{class:"uppy-DashboardItem-previewIcon",style:{color:n}},o),__h_116("svg",{"aria-hidden":"true",focusable:"false",class:"uppy-DashboardItem-previewIconBg",width:"58",height:"76",viewBox:"0 0 58 76"},__h_116("rect",{fill:"#FFF",width:"58",height:"76",rx:"3","fill-rule":"evenodd"})))},_$ignoreEvent_125=function(e){var t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t?(e.preventDefault(),e.stopPropagation()):e.stopPropagation()};function ___extends_108(){return(___extends_108=Object.assign||function(e){for(var t=1;t0&&__h_109("button",{class:"uppy-u-reset uppy-DashboardItem-action uppy-DashboardItem-action--edit",type:"button","aria-label":e.i18n("editFile")+" "+e.file.meta.name,title:e.i18n("editFile"),onclick:function(t){return e.toggleFileCard(e.file.id)}},iconPencil())}(e),renderCopyLinkButton(e),function(e){return e.showRemoveButton&&__h_109("button",{class:"uppy-u-reset uppy-DashboardItem-action uppy-DashboardItem-action--remove",type:"button","aria-label":e.i18n("removeFile"),title:e.i18n("removeFile"),onclick:function(){return e.removeFile(e.file.id)}},iconCross())}(e))},_$truncateString_128=function(e,t){if(e.length<=t)return e;if(t<="...".length)return e.substr(0,t);var r=t-"...".length,n=Math.ceil(r/2),o=Math.floor(r/2);return e.substr(0,n)+"..."+e.substr(e.length-o)},__h_110=_$preact_51.h,renderFileSource=function(e){return e.file.source&&e.file.source!==e.id&&__h_110("div",{class:"uppy-DashboardItem-sourceIcon"},e.acquirers.map(function(t){if(t.id===e.file.source)return function(e,t){return __h_110("span",{title:t.i18n("fileSource",{name:e.name})},e.icon())}(t,e)}))},_$FileInfo_110=function(e){return __h_110("div",{class:"uppy-DashboardItem-fileInfo"},function(e){var t;return t=e.containerWidth<=352?35:e.containerWidth<=576?60:30,__h_110("div",{class:"uppy-DashboardItem-name",title:e.file.meta.name},_$truncateString_128(e.file.meta.name,t))}(e),__h_110("div",{class:"uppy-DashboardItem-status"},function(e){return e.file.data.size&&__h_110("div",{class:"uppy-DashboardItem-statusSize"},_$prettyBytes_216(e.file.data.size))}(e),renderFileSource(e)))},__h_111=_$preact_51.h,_$FilePreviewAndLink_111=function(e){return __h_111("div",{class:"uppy-DashboardItem-previewInnerWrap",style:{backgroundColor:_$getFileTypeIcon_124(e.file.type).color}},e.showLinkToFileUploadResult&&e.file.uploadURL&&__h_111("a",{class:"uppy-DashboardItem-previewLink",href:e.file.uploadURL,rel:"noreferrer noopener",target:"_blank","aria-label":e.file.meta.name}),__h_111(_$FilePreview_116,{file:e.file}))},__h_112=_$preact_51.h,circleLength=2*Math.PI*15,_$PauseResumeCancelIcon_112=function(e){return __h_112("svg",{"aria-hidden":"true",focusable:"false",width:"70",height:"70",viewBox:"0 0 36 36",class:"UppyIcon UppyIcon-progressCircle"},__h_112("g",{class:"progress-group"},__h_112("circle",{class:"bg",r:"15",cx:"18",cy:"18","stroke-width":"2",fill:"none"}),__h_112("circle",{class:"progress",r:"15",cx:"18",cy:"18",transform:"rotate(-90, 18, 18)","stroke-width":"2",fill:"none","stroke-dasharray":circleLength,"stroke-dashoffset":circleLength-circleLength/100*e.progress})),!e.hidePauseResumeCancelButtons&&__h_112("g",null,__h_112("polygon",{class:"play",transform:"translate(3, 3)",points:"12 20 12 10 20 15"}),__h_112("g",{class:"pause",transform:"translate(14.5, 13)"},__h_112("rect",{x:"0",y:"0",width:"2",height:"10",rx:"0"}),__h_112("rect",{x:"5",y:"0",width:"2",height:"10",rx:"0"})),__h_112("polygon",{class:"cancel",transform:"translate(2, 2)",points:"19.8856516 11.0625 16 14.9481516 12.1019737 11.0625 11.0625 12.1143484 14.9481516 16 11.0625 19.8980263 12.1019737 20.9375 16 17.0518484 19.8856516 20.9375 20.9375 19.8980263 17.0518484 16 20.9375 12"})),__h_112("polygon",{class:"check",transform:"translate(2, 3)",points:"14 22.5 7 15.2457065 8.99985857 13.1732815 14 18.3547104 22.9729883 9 25 11.1005634"}))},__h_113=_$preact_51.h,iconRetry=_$icons_119.iconRetry;function progressIndicatorTitle(e){return e.isUploaded?e.i18n("uploadComplete"):e.error?e.i18n("retryUpload"):e.resumableUploads?e.file.isPaused?e.i18n("resumeUpload"):e.i18n("pauseUpload"):e.individualCancellation?e.i18n("cancelUpload"):""}var _$FileProgress_113=function(e){return e.hideRetryButton&&e.error?__h_113("div",{class:"uppy-DashboardItem-progress"}):e.isUploaded||e.hidePauseResumeCancelButtons&&!e.error?__h_113("div",{class:"uppy-DashboardItem-progress"},__h_113("div",{class:"uppy-DashboardItem-progressIndicator"},__h_113(_$PauseResumeCancelIcon_112,{progress:e.file.progress.percentage,hidePauseResumeCancelButtons:e.hidePauseResumeCancelButtons}))):__h_113("div",{class:"uppy-DashboardItem-progress"},__h_113("button",{class:"uppy-u-reset uppy-DashboardItem-progressIndicator",type:"button","aria-label":progressIndicatorTitle(e),title:progressIndicatorTitle(e),onclick:function(){return function(e){e.isUploaded||(!e.error||e.hideRetryButton?e.hidePauseResumeCancelButtons||(e.resumableUploads?e.pauseUpload(e.file.id):e.individualCancellation&&e.cancelUpload(e.file.id)):e.retryUpload(e.file.id))}(e)}},e.error?e.hideRetryButton?null:iconRetry():__h_113(_$PauseResumeCancelIcon_112,{progress:e.file.progress.percentage,hidePauseResumeCancelButtons:e.hidePauseResumeCancelButtons})))},_$isShallowEqual_41=function(e,t){if(e===t)return!0;for(var r in e)if(!(r in t))return!1;for(var r in t)if(e[r]!==t[r])return!1;return!0};function ___extends_126(){return(___extends_126=Object.assign||function(e){for(var t=1;t576},{"uppy-size--lg":e.containerWidth>700},{"uppy-size--xl":e.containerWidth>900},{"uppy-Dashboard--isAddFilesPanelVisible":e.showAddFilesPanel},{"uppy-Dashboard--isInnerWrapVisible":e.areInsidesReadyToBeVisible});return __h_107("div",{class:r,"aria-hidden":e.inline?"false":e.isHidden,"aria-label":e.inline?e.i18n("dashboardTitle"):e.i18n("dashboardWindowTitle"),onpaste:e.handlePaste,onDragOver:e.handleDragOver,onDragLeave:e.handleDragLeave,onDrop:e.handleDrop},__h_107("div",{class:"uppy-Dashboard-overlay",tabindex:-1,onclick:e.handleClickOutside}),__h_107("div",{class:"uppy-Dashboard-inner","aria-modal":!e.inline&&"true",role:!e.inline&&"dialog",style:{width:e.inline&&e.width?e.width:"",height:e.inline&&e.height?e.height:""}},e.inline?null:__h_107("button",{class:"uppy-u-reset uppy-Dashboard-close",type:"button","aria-label":e.i18n("closeModal"),title:e.i18n("closeModal"),onclick:e.closeModal},__h_107("span",{"aria-hidden":"true"},"\xd7")),__h_107("div",{class:"uppy-Dashboard-innerWrap"},__h_107("div",{class:"uppy-Dashboard-dropFilesHereHint"},e.i18n("dropHint")),!t&&e.showSelectedFiles&&__h_107(_$PickerPanelTopBar_118,e),e.showSelectedFiles?__h_107(t?_$AddFiles_105:_$FileList_115,e):__h_107(_$AddFiles_105,e),__h_107(TransitionWrapper,null,e.showAddFilesPanel?__h_107(_$AddFilesPanel_106,___extends_107({key:"AddFilesPanel"},e)):null),__h_107(TransitionWrapper,null,e.fileCardFor?__h_107(_$FileCard_108,___extends_107({key:"FileCard"},e)):null),__h_107(TransitionWrapper,null,e.activePickerPanel?__h_107(_$PickerPanelContent_117,___extends_107({key:"PickerPanelContent"},e)):null),__h_107("div",{class:"uppy-Dashboard-progressindicators"},e.progressindicators.map(function(t){return e.getPlugin(t.id).render(e.state)})))))},_$lodashDebounce_43={};(function(e){var t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,l="object"==typeof e&&e&&e.Object===Object&&e,u="object"==typeof self&&self&&self.Object===Object&&self,c=l||u||Function("return this")(),p=Object.prototype.toString,d=Math.max,h=Math.min,_=function(){return c.Date.now()};function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&p.call(e)==r}(e))return t;if(f(e)){var l="function"==typeof e.valueOf?e.valueOf():e;e=f(l)?l+"":l}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var u=i.test(e);return u||s.test(e)?a(e.slice(2),u?2:8):o.test(e)?t:+e}_$lodashDebounce_43=function(e,t,r){var n,o,i,s,a,l,u=0,c=!1,p=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var r=n,i=o;return n=o=void 0,u=t,s=e.apply(i,r)}function v(e){var r=e-l;return void 0===l||r>=t||r<0||p&&e-u>=i}function b(){var e=_();if(v(e))return w(e);a=setTimeout(b,function(e){var r=t-(e-l);return p?h(r,i-(e-u)):r}(e))}function w(e){return a=void 0,m&&n?y(e):(n=o=void 0,s)}function S(){var e=_(),r=v(e);if(n=arguments,o=this,l=e,r){if(void 0===a)return function(e){return u=e,a=setTimeout(b,t),c?y(e):s}(l);if(p)return a=setTimeout(b,t),y(l)}return void 0===a&&(a=setTimeout(b,t)),s}return t=g(t)||0,f(r)&&(c=!!r.leading,i=(p="maxWait"in r)?d(g(r.maxWait)||0,t):i,m="trailing"in r?!!r.trailing:m),S.cancel=function(){void 0!==a&&clearTimeout(a),u=0,n=l=o=a=void 0},S.flush=function(){return void 0===a?s:w(_())},S}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var _$getActiveOverlayEl_123=function(e,t){if(t){var r=e.querySelector('[data-uppy-paneltype="'+t+'"]');if(r)return r}return e},_$FOCUSABLE_ELEMENTS_191=['a[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','area[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])',"input:not([disabled]):not([inert]):not([aria-hidden])","select:not([disabled]):not([inert]):not([aria-hidden])","textarea:not([disabled]):not([inert]):not([aria-hidden])","button:not([disabled]):not([inert]):not([aria-hidden])",'iframe:not([tabindex^="-"]):not([inert]):not([aria-hidden])','object:not([tabindex^="-"]):not([inert]):not([aria-hidden])','embed:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[contenteditable]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[tabindex]:not([tabindex^="-"]):not([inert]):not([aria-hidden])'],_$createSuperFocus_122=function(){var e=!1;return _$lodashDebounce_43(function(t,r){var n=_$getActiveOverlayEl_123(t,r),o=n.contains(document.activeElement);if(!o||!e){var i=n.querySelector("[data-uppy-super-focusable]");if(!o||i)if(i)i.focus({preventScroll:!0}),e=!0;else{var s=n.querySelector(_$FOCUSABLE_ELEMENTS_191);s&&s.focus({preventScroll:!0}),e=!1}}},260)},_$toArray_220=function(e){return Array.prototype.slice.call(e||[],0)};function focusOnFirstNode(e,t){var r=t[0];r&&(r.focus(),e.preventDefault())}function trapFocus(e,t,r){var n=_$getActiveOverlayEl_123(r,t),o=_$toArray_220(n.querySelectorAll(_$FOCUSABLE_ELEMENTS_191)),i=o.indexOf(document.activeElement);!function(e){return e.contains(document.activeElement)}(n)?focusOnFirstNode(e,o):e.shiftKey&&0===i?function(e,t){var r=o[o.length-1];r&&(r.focus(),e.preventDefault())}(e):e.shiftKey||i!==o.length-1||focusOnFirstNode(e,o)}var _$trapFocus_127={forModal:function(e,t,r){trapFocus(e,t,r)},forInline:function(e,t,r){null===t||trapFocus(e,t,r)}},_$package_129={version:"1.2.0"},_$package_147={version:"1.2.0"},___class_146,___temp_146;function ___extends_146(){return(___extends_146=Object.assign||function(e){for(var t=1;t0||_===_$StatusBarStates_168.STATE_COMPLETE&&e.hideAfterFinish,v=!u&&o&&!s&&!a&&i&&!c,b=!d&&_!==_$StatusBarStates_168.STATE_WAITING&&_!==_$StatusBarStates_168.STATE_COMPLETE,w=l&&!p&&_!==_$StatusBarStates_168.STATE_WAITING&&_!==_$StatusBarStates_168.STATE_PREPROCESSING&&_!==_$StatusBarStates_168.STATE_POSTPROCESSING&&_!==_$StatusBarStates_168.STATE_COMPLETE,S=u&&!h,P="uppy-StatusBar-progress\n "+(t?"is-"+t:""),C=_$classnames_9({"uppy-Root":e.isTargetDOMEl},"uppy-StatusBar","is-"+_);return __h_167("div",{class:C,"aria-hidden":y},__h_167("div",{class:P,style:{width:m+"%"},role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":f}),r,__h_167("div",{class:"uppy-StatusBar-actions"},v?__h_167(UploadBtn,___extends_167({},e,{uploadState:_})):null,S?__h_167(RetryBtn,e):null,w?__h_167(PauseResumeButton,e):null,b?__h_167(CancelBtn,e):null))},UploadBtn=function(e){var t=_$classnames_9("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--upload",{"uppy-c-btn-primary":e.uploadState===_$StatusBarStates_168.STATE_WAITING});return __h_167("button",{type:"button",class:t,"aria-label":e.i18n("uploadXFiles",{smart_count:e.newFiles}),onclick:e.startUpload,"data-uppy-super-focusable":!0},e.newFiles&&e.isUploadStarted?e.i18n("uploadXNewFiles",{smart_count:e.newFiles}):e.i18n("uploadXFiles",{smart_count:e.newFiles}))},RetryBtn=function(e){return __h_167("button",{type:"button",class:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--retry","aria-label":e.i18n("retryUpload"),onclick:e.retryAll,"data-uppy-super-focusable":!0},__h_167("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"8",height:"10",viewBox:"0 0 8 10"},__h_167("path",{d:"M4 2.408a2.75 2.75 0 1 0 2.75 2.75.626.626 0 0 1 1.25.018v.023a4 4 0 1 1-4-4.041V.25a.25.25 0 0 1 .389-.208l2.299 1.533a.25.25 0 0 1 0 .416l-2.3 1.533A.25.25 0 0 1 4 3.316v-.908z"})),e.i18n("retry"))},CancelBtn=function(e){return __h_167("button",{type:"button",class:"uppy-u-reset uppy-StatusBar-actionCircleBtn",title:e.i18n("cancel"),"aria-label":e.i18n("cancel"),onclick:e.cancelAll,"data-uppy-super-focusable":!0},__h_167("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"16",height:"16",viewBox:"0 0 16 16"},__h_167("g",{fill:"none","fill-rule":"evenodd"},__h_167("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),__h_167("path",{fill:"#FFF",d:"M9.283 8l2.567 2.567-1.283 1.283L8 9.283 5.433 11.85 4.15 10.567 6.717 8 4.15 5.433 5.433 4.15 8 6.717l2.567-2.567 1.283 1.283z"}))))},PauseResumeButton=function(e){var t=e.isAllPaused,r=(0,e.i18n)(t?"resume":"pause");return __h_167("button",{title:r,"aria-label":r,class:"uppy-u-reset uppy-StatusBar-actionCircleBtn",type:"button",onclick:function(){return function(e){if(!e.isAllComplete)return e.resumableUploads?e.isAllPaused?e.resumeAll():e.pauseAll():e.cancelAll()}(e)},"data-uppy-super-focusable":!0},__h_167("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"16",height:"16",viewBox:"0 0 16 16"},__h_167("g",{fill:"none","fill-rule":"evenodd"},__h_167("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),__h_167("path",t?{fill:"#FFF",d:"M6 4.25L11.5 8 6 11.75z"}:{d:"M5 4.5h2v7H5v-7zm4 0h2v7H9v-7z",fill:"#FFF"}))))},LoadingSpinner=function(){return __h_167("svg",{"aria-hidden":"true",focusable:"false",class:"uppy-StatusBar-spinner",width:"14",height:"14"},__h_167("path",{d:"M13.983 6.547c-.12-2.509-1.64-4.893-3.939-5.936-2.48-1.127-5.488-.656-7.556 1.094C.524 3.367-.398 6.048.162 8.562c.556 2.495 2.46 4.52 4.94 5.183 2.932.784 5.61-.602 7.256-3.015-1.493 1.993-3.745 3.309-6.298 2.868-2.514-.434-4.578-2.349-5.153-4.84a6.226 6.226 0 0 1 2.98-6.778C6.34.586 9.74 1.1 11.373 3.493c.407.596.693 1.282.842 1.988.127.598.073 1.197.161 1.794.078.525.543 1.257 1.15.864.525-.341.49-1.05.456-1.592-.007-.15.02.3 0 0","fill-rule":"evenodd"}))},ProgressBarProcessing=function(e){var t=Math.round(100*e.value);return __h_167("div",{class:"uppy-StatusBar-content"},__h_167(LoadingSpinner,null),"determinate"===e.mode?t+"% \xb7 ":"",e.message)},UnknownProgressDetails=function(e){return __h_167("div",{class:"uppy-StatusBar-statusSecondary"},e.i18n("filesUploadedOfTotal",{complete:e.complete,smart_count:e.numUploads}))},UploadNewlyAddedFiles=function(e){var t=_$classnames_9("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--uploadNewlyAdded");return __h_167("div",{class:"uppy-StatusBar-statusSecondary"},__h_167("div",{class:"uppy-StatusBar-statusSecondaryHint"},e.i18n("xMoreFilesAdded",{smart_count:e.newFiles})),__h_167("button",{type:"button",class:t,"aria-label":e.i18n("uploadXFiles",{smart_count:e.newFiles}),onclick:e.startUpload},e.i18n("upload")))},ThrottledProgressDetails=_$lodashThrottle_44(function(e){var t=e.numUploads>1;return __h_167("div",{class:"uppy-StatusBar-statusSecondary"},t&&e.i18n("filesUploadedOfTotal",{complete:e.complete,smart_count:e.numUploads}),__h_167("span",{class:"uppy-StatusBar-additionalInfo"},t&&" \xb7 ",e.i18n("dataUploadedOfTotal",{complete:_$prettyBytes_216(e.totalUploadedSize),total:_$prettyBytes_216(e.totalSize)})," \xb7 ",e.i18n("xTimeLeft",{time:_$prettyETA_217(e.totalETA)})))},500,{leading:!0,trailing:!0}),ProgressBarUploading=function(e){if(!e.isUploadStarted||e.isAllComplete)return null;var t=e.isAllPaused?e.i18n("paused"):e.i18n("uploading"),r=e.newFiles&&e.isUploadStarted;return __h_167("div",{class:"uppy-StatusBar-content","aria-label":t,title:t},e.isAllPaused?null:__h_167(LoadingSpinner,null),__h_167("div",{class:"uppy-StatusBar-status"},__h_167("div",{class:"uppy-StatusBar-statusPrimary"},e.supportsUploadProgress?t+": "+e.totalProgress+"%":t),e.isAllPaused||r||!e.showProgressDetails?null:e.supportsUploadProgress?__h_167(ThrottledProgressDetails,e):__h_167(UnknownProgressDetails,e),r?__h_167(UploadNewlyAddedFiles,e):null))},ProgressBarComplete=function(e){e.totalProgress;var t=e.i18n;return __h_167("div",{class:"uppy-StatusBar-content",role:"status",title:t("complete")},__h_167("div",{class:"uppy-StatusBar-status"},__h_167("div",{class:"uppy-StatusBar-statusPrimary"},__h_167("svg",{"aria-hidden":"true",focusable:"false",class:"uppy-StatusBar-statusIndicator UppyIcon",width:"15",height:"11",viewBox:"0 0 15 11"},__h_167("path",{d:"M.414 5.843L1.627 4.63l3.472 3.472L13.202 0l1.212 1.213L5.1 10.528z"})),t("complete"))))},ProgressBarError=function(e){var t=e.error,r=(e.retryAll,e.hideRetryButton,e.i18n);return __h_167("div",{class:"uppy-StatusBar-content",role:"alert",title:r("uploadFailed")},__h_167("div",{class:"uppy-StatusBar-status"},__h_167("div",{class:"uppy-StatusBar-statusPrimary"},__h_167("svg",{"aria-hidden":"true",focusable:"false",class:"uppy-StatusBar-statusIndicator UppyIcon",width:"11",height:"11",viewBox:"0 0 11 11"},__h_167("path",{d:"M4.278 5.5L0 1.222 1.222 0 5.5 4.278 9.778 0 11 1.222 6.722 5.5 11 9.778 9.778 11 5.5 6.722 1.222 11 0 9.778z"})),r("uploadFailed"))),__h_167("span",{class:"uppy-StatusBar-details","aria-label":t,"data-microtip-position":"top-right","data-microtip-size":"medium",role:"tooltip"},"?"))},_$package_170={version:"1.2.0"},_$getBytesRemaining_199=function(e){return e.bytesTotal-e.bytesUploaded},_$getSpeed_207=function(e){if(!e.bytesUploaded)return 0;var t=new Date-e.uploadStarted;return e.bytesUploaded/(t/1e3)},___class_169,___temp_169;function ___extends_169(){return(___extends_169=Object.assign||function(e){for(var t=1;t0,b=100===o&&c.length===Object.keys(r).length&&0===f.length,w=v&&p.length===l.length,S=0!==d.length&&u.length===d.length,P=d.length>0,C=t.resumableUploads||!1,E=!1!==t.uploadProgress;return _$StatusBar_167({error:i,uploadState:this.getUploadingState(w,b,e.files||{}),allowNewUpload:n,totalProgress:o,totalSize:m,totalUploadedSize:y,isAllComplete:b,isAllPaused:S,isAllErrored:w,isUploadStarted:v,isUploadInProgress:P,complete:c.length,newFiles:a.length,numUploads:_.length,totalETA:g,files:r,i18n:this.i18n,pauseAll:this.uppy.pauseAll,resumeAll:this.uppy.resumeAll,retryAll:this.uppy.retryAll,cancelAll:this.uppy.cancelAll,startUpload:this.startUpload,resumableUploads:C,supportsUploadProgress:E,showProgressDetails:this.opts.showProgressDetails,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,hideAfterFinish:this.opts.hideAfterFinish,isTargetDOMEl:this.isTargetDOMEl})},o.install=function(){var e=this.opts.target;e&&this.mount(e,this)},o.uninstall=function(){this.unmount()},n}(__Plugin_169),___class_169.VERSION=_$package_170.version,___temp_169),_$exif_34={exports:{}};(function(){var e=!1,t=function(e){return e instanceof t?e:this instanceof t?void(this.EXIFwrapped=e):new t(e)};void 0!==_$exif_34.exports?(_$exif_34.exports&&(_$exif_34.exports=_$exif_34.exports=t),_$exif_34.exports.EXIF=t):this.EXIF=t;var r=t.Tags={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},o=t.TiffTags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},i=t.GPSTags={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},s=t.IFD1Tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:"ResolutionUnit",513:"JpegIFOffset",514:"JpegIFByteCount",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite"},a=t.StringValues={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}};function l(e){return!!e.exifdata}function u(r,n){function o(o){var i=c(o);r.exifdata=i||{};var s=function(t){var r=new DataView(t);if(e&&console.log("Got file of length "+t.byteLength),255!=r.getUint8(0)||216!=r.getUint8(1))return e&&console.log("Not a valid JPEG"),!1;for(var n=2,o=t.byteLength,i=function(e,t){return 56===e.getUint8(t)&&66===e.getUint8(t+1)&&73===e.getUint8(t+2)&&77===e.getUint8(t+3)&&4===e.getUint8(t+4)&&4===e.getUint8(t+5)};n")+8,c=(l=l.substring(l.indexOf("4?h:t+8,s=[],l=0;l4?h:t+8,d-1);case 3:if(1==d)return e.getUint16(t+8,!o);for(i=d>2?h:t+8,s=[],l=0;le.byteLength)return{};var i=h(e,t,t+o,s,n);if(i.Compression)switch(i.Compression){case 6:if(i.JpegIFOffset&&i.JpegIFByteCount){var a=t+i.JpegIFOffset,l=i.JpegIFByteCount;i.blob=new Blob([new Uint8Array(e.buffer,a,l)],{type:"image/jpeg"})}break;case 1:console.log("Thumbnail image format is TIFF, which is not implemented.");break;default:console.log("Unknown thumbnail image format '%s'",i.Compression)}else 2==i.PhotometricInterpretation&&console.log("Thumbnail image format is RGB, which is not implemented.");return i}(t,_,g,l),u}function m(e){var t={};if(1==e.nodeType){if(e.attributes.length>0){t["@attributes"]={};for(var r=0;r0)for(var r=0;r4096&&(r=4096,n=Math.round(r/t)),n>4096&&(n=4096,r=Math.round(t*n)),e.width>r){var o=document.createElement("canvas");o.width=r,o.height=n,o.getContext("2d").drawImage(e,0,0,r,n),e=o}return e},o.resizeImage=function(e,t,r){e=this.protect(e);var n=Math.ceil(Math.log(e.width/t)*Math.LOG2E);n<1&&(n=1);for(var o=t*Math.pow(2,n-1),i=r*Math.pow(2,n-1);n--;){var s=document.createElement("canvas");s.width=o,s.height=i,s.getContext("2d").drawImage(e,0,0,o,i),e=s,o=Math.round(o/2),i=Math.round(i/2)}return e},o.rotateImage=function(e,t){var r=e.width,n=e.height;90!==t.rotation&&270!==t.rotation||(r=e.height,n=e.width);var o=document.createElement("canvas");o.width=r,o.height=n;var i=o.getContext("2d");return i.translate(r/2,n/2),i.rotate(t.rotation*Math.PI/180),i.scale(t.xScale,t.yScale),i.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),o},o.canvasToBlob=function(e,t,r){try{e.getContext("2d").getImageData(0,0,1,1)}catch(e){if(18===e.code)return Promise.reject(new Error("cannot read image, probably an svg with external resources"))}return e.toBlob?new Promise(function(n){e.toBlob(n,t,r)}).then(function(e){if(null===e)throw new Error("cannot read image, probably an svg with external resources");return e}):Promise.resolve().then(function(){return _$dataURItoBlob_194(e.toDataURL(t,r),{})}).then(function(e){if(null===e)throw new Error("could not extract blob, probably an old browser");return e})},o.setPreviewURL=function(e,t){this.uppy.setFileState(e,{preview:t})},o.addToQueue=function(e){this.queue.push(e),!1===this.queueProcessing&&this.processQueue()},o.processQueue=function(){var e=this;if(this.queueProcessing=!0,this.queue.length>0){var t=this.queue.shift();return this.requestThumbnail(t).catch(function(e){}).then(function(){return e.processQueue()})}this.queueProcessing=!1,this.uppy.log("[ThumbnailGenerator] Emptied thumbnail queue"),this.uppy.emit("thumbnail:all-generated")},o.requestThumbnail=function(e){var t=this;return _$isPreviewSupported_212(e.type)&&!e.isRemote?this.createThumbnail(e,this.opts.thumbnailWidth,this.opts.thumbnailHeight).then(function(r){t.setPreviewURL(e.id,r),t.uppy.log("[ThumbnailGenerator] Generated thumbnail for "+e.id),t.uppy.emit("thumbnail:generated",t.uppy.getFile(e.id),r)}).catch(function(r){t.uppy.log("[ThumbnailGenerator] Failed thumbnail for "+e.id+":","warning"),t.uppy.log(r,"warning"),t.uppy.emit("thumbnail:error",t.uppy.getFile(e.id),r)}):Promise.resolve()},o.onFileAdded=function(e){e.preview||this.addToQueue(e)},o.onFileRemoved=function(e){var t=this.queue.indexOf(e);-1!==t&&this.queue.splice(t,1),e.preview&&_$isObjectURL_211(e.preview)&&URL.revokeObjectURL(e.preview)},o.onRestored=function(){var e=this,t=this.uppy.getState().files;Object.keys(t).forEach(function(t){var r=e.uppy.getFile(t);r.isRestored&&(r.preview&&!_$isObjectURL_211(r.preview)||e.addToQueue(r))})},o.install=function(){this.uppy.on("file-added",this.onFileAdded),this.uppy.on("file-removed",this.onFileRemoved),this.uppy.on("restored",this.onRestored)},o.uninstall=function(){this.uppy.off("file-added",this.onFileAdded),this.uppy.off("file-removed",this.onFileRemoved),this.uppy.off("restored",this.onRestored)},n}(__Plugin_176),___class_176.VERSION=_$package_177.version,___temp_176),_$findAllDOMElements_196=function(e){if("string"==typeof e){var t=[].slice.call(document.querySelectorAll(e));return t.length>0?t:null}if("object"==typeof e&&_$isDOMElement_209(e))return[e]},_$fallbackApi_201=function(e){var t=_$toArray_220(e.files);return Promise.resolve(t)};function recursivelyAddFilesFromDirectory(e,t,r){!function e(t,r,n){t.readEntries(function(o){var i=[].concat(r,o);o.length?setTimeout(function(){e(t,i,n)},0):n(i)},function(){return n(r)})}(r.createReader(),[],function(r){var n=r.map(function(e){return createPromiseToAddFileOrParseDirectory(t,e)});Promise.all(n).then(function(){return e()})})}function createPromiseToAddFileOrParseDirectory(e,t){return new Promise(function(r){t.isFile?function(e,t,r){r.file(function(n){n.relativePath=function(e){return e.fullPath&&e.fullPath!=="/"+e.name?e.fullPath:null}(r),t.push(n),e()},function(){return e()})}(r,e,t):t.isDirectory&&recursivelyAddFilesFromDirectory(r,e,t)})}var _$webkitGetAsEntryApi_202=function(e){var t=[],r=[];return _$toArray_220(e.items).forEach(function(e){var n=e.webkitGetAsEntry();n&&r.push(createPromiseToAddFileOrParseDirectory(t,n))}),Promise.all(r).then(function(){return t})},_$getDroppedFiles_200=function(e){return e.items&&e.items[0]&&"webkitGetAsEntry"in e.items[0]?_$webkitGetAsEntryApi_202(e):_$fallbackApi_201(e)},___class_120,___temp_120;function ___extends_120(){return(___extends_120=Object.assign||function(e){for(var t=1;t=n.length)break;s=n[i++]}else{if((i=n.next()).done)break;s=i.value}var a=s.contentRect,l=a.width,u=a.height;e.uppy.log("[Dashboard] resized: "+l+" / "+u),e.setPluginState({containerWidth:l,containerHeight:u,areInsidesReadyToBeVisible:!0})}}),this.resizeObserver.observe(this.el.querySelector(".uppy-Dashboard-inner")),this.makeDashboardInsidesVisibleAnywayTimeout=setTimeout(function(){e.getPluginState().areInsidesReadyToBeVisible||(e.uppy.log("[Dashboard] resize event didn't fire on time: defaulted to mobile layout"),e.setPluginState({areInsidesReadyToBeVisible:!0}))},1e3)},o.stopListeningToResize=function(){this.resizeObserver.disconnect(),clearTimeout(this.makeDashboardInsidesVisibleAnywayTimeout)},o.recordIfFocusedOnUppyRecently=function(e){this.el.contains(e.target)?this.ifFocusedOnUppyRecently=!0:(this.ifFocusedOnUppyRecently=!1,this.superFocus.cancel())},o.updateBrowserHistory=function(){var e;history.state&&history.state[this.modalName]||history.pushState(___extends_120({},history.state,((e={})[this.modalName]=!0,e)),""),window.addEventListener("popstate",this.handlePopState,!1)},o.handlePopState=function(e){!this.isModalOpen()||e.state&&e.state[this.modalName]||this.closeModal({manualClose:!1}),!this.isModalOpen()&&e.state&&e.state[this.modalName]&&history.go(-1)},o.handleKeyDownInModal=function(e){27===e.keyCode&&this.requestCloseModal(e),9===e.keyCode&&_$trapFocus_127.forModal(e,this.getPluginState().activeOverlayType,this.el)},o.handleClickOutside=function(){this.opts.closeModalOnClickOutside&&this.requestCloseModal()},o.handlePaste=function(e){var t=this;this.uppy.iteratePlugins(function(t){"acquirer"===t.type&&t.handleRootPaste&&t.handleRootPaste(e)}),_$toArray_220(e.clipboardData.files).forEach(function(e){t.uppy.log("[Dashboard] File pasted"),t.addFile(e)})},o.handleInputChange=function(e){var t=this;e.preventDefault(),_$toArray_220(e.target.files).forEach(function(e){return t.addFile(e)})},o.handleDragOver=function(e){e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!0})},o.handleDragLeave=function(e){var t=this;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.removeDragOverClassTimeout=setTimeout(function(){t.setPluginState({isDraggingOver:!1})},50)},o.handleDrop=function(e,t){var r=this;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),e.dataTransfer.dropEffect="copy",this.setPluginState({isDraggingOver:!1}),this.uppy.iteratePlugins(function(t){"acquirer"===t.type&&t.handleRootDrop&&t.handleRootDrop(e)}),_$getDroppedFiles_200(e.dataTransfer).then(function(e){e.length>0&&(r.uppy.log("[Dashboard] Files were dropped"),e.forEach(function(e){return r.addFile(e)}))})},o.handleKeyDownInInline=function(e){9===e.keyCode&&_$trapFocus_127.forInline(e,this.getPluginState().activeOverlayType,this.el)},o.handlePasteOnBody=function(e){this.el.contains(document.activeElement)&&this.handlePaste(e)},o.handleComplete=function(e){var t=e.failed;e.uploadID,this.opts.closeAfterFinish&&0===t.length&&this.requestCloseModal()},o.initEvents=function(){var e=this,t=_$findAllDOMElements_196(this.opts.trigger);!this.opts.inline&&t&&t.forEach(function(t){return t.addEventListener("click",e.openModal)}),this.opts.inline||t||this.uppy.log("Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options unless you are planning to call openModal() method yourself","error"),this.startListeningToResize(),document.addEventListener("paste",this.handlePasteOnBody),this.uppy.on("plugin-remove",this.removeTarget),this.uppy.on("file-added",this.hideAllPanels),this.uppy.on("dashboard:modal-closed",this.hideAllPanels),this.uppy.on("complete",this.handleComplete),document.addEventListener("focus",this.recordIfFocusedOnUppyRecently,!0),document.addEventListener("click",this.recordIfFocusedOnUppyRecently,!0),this.opts.inline&&this.el.addEventListener("keydown",this.handleKeyDownInInline)},o.removeEvents=function(){var e=this,t=_$findAllDOMElements_196(this.opts.trigger);!this.opts.inline&&t&&t.forEach(function(t){return t.removeEventListener("click",e.openModal)}),this.stopListeningToResize(),document.removeEventListener("paste",this.handlePasteOnBody),window.removeEventListener("popstate",this.handlePopState,!1),this.uppy.off("plugin-remove",this.removeTarget),this.uppy.off("file-added",this.hideAllPanels),this.uppy.off("dashboard:modal-closed",this.hideAllPanels),this.uppy.off("complete",this.handleComplete),document.removeEventListener("focus",this.recordIfFocusedOnUppyRecently),document.removeEventListener("click",this.recordIfFocusedOnUppyRecently),this.opts.inline&&this.el.removeEventListener("keydown",this.handleKeyDownInInline)},o.superFocusOnEachUpdate=function(){var e=this.el.contains(document.activeElement),t=document.activeElement===document.querySelector("body")||null===document.activeElement,r=this.uppy.getState().info.isHidden,n=!this.opts.inline;r&&(n||e||t&&this.ifFocusedOnUppyRecently)?this.superFocus(this.el,this.getPluginState().activeOverlayType):this.superFocus.cancel()},o.afterUpdate=function(){this.superFocusOnEachUpdate()},o.render=function(e){var t=this.getPluginState(),r=e.files,n=e.capabilities,o=e.allowNewUpload,i=Object.keys(r).filter(function(e){return!r[e].progress.uploadStarted}),s=Object.keys(r).filter(function(e){return r[e].progress.uploadStarted}),a=Object.keys(r).filter(function(e){return r[e].isPaused}),l=Object.keys(r).filter(function(e){return r[e].progress.uploadComplete}),u=Object.keys(r).filter(function(e){return r[e].error}),c=Object.keys(r).filter(function(e){return!r[e].progress.uploadComplete&&r[e].progress.uploadStarted}),p=c.filter(function(e){return!r[e].isPaused}),d=Object.keys(r).filter(function(e){return r[e].progress.preprocess||r[e].progress.postprocess}),h=s.length>0,_=100===e.totalProgress&&l.length===Object.keys(r).length&&0===d.length,f=h&&u.length===s.length,g=0!==c.length&&a.length===c.length,m=this._getAcquirers(t.targets),y=this._getProgressIndicators(t.targets);return _$Dashboard_107({state:e,isHidden:t.isHidden,files:r,newFiles:i,uploadStartedFiles:s,completeFiles:l,erroredFiles:u,inProgressFiles:c,inProgressNotPausedFiles:p,processingFiles:d,isUploadStarted:h,isAllComplete:_,isAllErrored:f,isAllPaused:g,totalFileCount:Object.keys(r).length,totalProgress:e.totalProgress,allowNewUpload:o,acquirers:m,activePickerPanel:t.activePickerPanel,animateOpenClose:this.opts.animateOpenClose,isClosing:t.isClosing,getPlugin:this.uppy.getPlugin,progressindicators:y,autoProceed:this.uppy.opts.autoProceed,id:this.id,closeModal:this.requestCloseModal,handleClickOutside:this.handleClickOutside,handleInputChange:this.handleInputChange,handlePaste:this.handlePaste,inline:this.opts.inline,showPanel:this.showPanel,hideAllPanels:this.hideAllPanels,log:this.uppy.log,i18n:this.i18n,i18nArray:this.i18nArray,addFile:this.uppy.addFile,removeFile:this.uppy.removeFile,info:this.uppy.info,note:this.opts.note,metaFields:t.metaFields,resumableUploads:n.resumableUploads||!1,individualCancellation:n.individualCancellation,pauseUpload:this.uppy.pauseResume,retryUpload:this.uppy.retryUpload,cancelUpload:this.cancelUpload,cancelAll:this.uppy.cancelAll,fileCardFor:t.fileCardFor,toggleFileCard:this.toggleFileCard,toggleAddFilesPanel:this.toggleAddFilesPanel,showAddFilesPanel:t.showAddFilesPanel,saveFileCard:this.saveFileCard,width:this.opts.width,height:this.opts.height,showLinkToFileUploadResult:this.opts.showLinkToFileUploadResult,proudlyDisplayPoweredByUppy:this.opts.proudlyDisplayPoweredByUppy,containerWidth:t.containerWidth,areInsidesReadyToBeVisible:t.areInsidesReadyToBeVisible,isTargetDOMEl:this.isTargetDOMEl,parentElement:this.el,allowedFileTypes:this.uppy.opts.restrictions.allowedFileTypes,maxNumberOfFiles:this.uppy.opts.restrictions.maxNumberOfFiles,showSelectedFiles:this.opts.showSelectedFiles,isDraggingOver:t.isDraggingOver,handleDragOver:this.handleDragOver,handleDragLeave:this.handleDragLeave,handleDrop:this.handleDrop})},o.discoverProviderPlugins=function(){var e=this;this.uppy.iteratePlugins(function(t){t&&!t.target&&t.opts&&t.opts.target===e.constructor&&e.addTarget(t)})},o.install=function(){var e=this;this.setPluginState({isHidden:!0,fileCardFor:null,activeOverlayType:null,showAddFilesPanel:!1,activePickerPanel:!1,metaFields:this.opts.metaFields,targets:[],areInsidesReadyToBeVisible:!1,isDraggingOver:!1});var t=this.opts,r=t.inline,n=t.closeAfterFinish;if(r&&n)throw new Error("[Dashboard] `closeAfterFinish: true` cannot be used on an inline Dashboard, because an inline Dashboard cannot be closed at all. Either set `inline: false`, or disable the `closeAfterFinish` option.");this.uppy.opts.allowMultipleUploads&&n&&this.uppy.log("[Dashboard] When using `closeAfterFinish`, we recommended setting the `allowMultipleUploads` option to `false` in the Uppy constructor. See https://uppy.io/docs/uppy/#allowMultipleUploads-true","warning");var o=this.opts.target;o&&this.mount(o,this),(this.opts.plugins||[]).forEach(function(t){var r=e.uppy.getPlugin(t);r&&r.mount(e,r)}),this.opts.disableStatusBar||this.uppy.use(_$lib_169,{id:this.id+":StatusBar",target:this,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,showProgressDetails:this.opts.showProgressDetails,hideAfterFinish:this.opts.hideProgressAfterFinish,locale:this.opts.locale}),this.opts.disableInformer||this.uppy.use(_$lib_146,{id:this.id+":Informer",target:this}),this.opts.disableThumbnailGenerator||this.uppy.use(_$lib_176,{id:this.id+":ThumbnailGenerator",thumbnailWidth:this.opts.thumbnailWidth}),this.discoverProviderPlugins(),this.initEvents()},o.uninstall=function(){var e=this;if(!this.opts.disableInformer){var t=this.uppy.getPlugin(this.id+":Informer");t&&this.uppy.removePlugin(t)}if(!this.opts.disableStatusBar){var r=this.uppy.getPlugin(this.id+":StatusBar");r&&this.uppy.removePlugin(r)}if(!this.opts.disableThumbnailGenerator){var n=this.uppy.getPlugin(this.id+":ThumbnailGenerator");n&&this.uppy.removePlugin(n)}(this.opts.plugins||[]).forEach(function(t){var r=e.uppy.getPlugin(t);r&&r.unmount()}),this.unmount(),this.removeEvents()},n}(__Plugin_120),___class_120.VERSION=_$package_129.version,___temp_120),_$package_131={version:"1.2.0"},_$isDragDropSupported_210=function(){var e=document.createElement("div");return"draggable"in e&&"ondragstart"in e&&"ondrop"in e&&"FormData"in window&&"FileReader"in window},___class_130,___temp_130;function ___extends_130(){return(___extends_130=Object.assign||function(e){for(var t=1;t0&&__h_154(_$FooterActions_156,___extends_154({selected:n},e)))},__h_162=_$preact_51.h,_$Loader_162=function(e){return __h_162("div",{class:"uppy-Provider-loading"},__h_162("span",null,e.i18n("loading")))},_$package_164={version:"1.2.0"},___class_163,___temp_163;function ___extends_163(){return(___extends_163=Object.assign||function(e){for(var t=1;to?-1:ro?1:ro?-1:ro?1:ro?-1:no?1:n1&&void 0!==arguments[1]?arguments[1]:{trim:!1};if(!e)throw new Error("A form is required by getFormData, was given form="+e);for(var r={},n=void 0,o=[],i={},s=0,a=e.elements.length;s2&&void 0!==arguments[2]?arguments[2]:{trim:!1};if(!e)throw new Error("A form is required by getFieldData, was given form="+e);if(!t&&"[object String]"!==toString.call(t))throw new Error("A field name is required by getFieldData, was given fieldName="+t);var n=e.elements[t];if(!n||n.disabled)return null;if(!NODE_LIST_CLASSES[toString.call(n)])return getFormElementValue(n,r.trim);for(var o=[],i=!0,s=0,a=n.length;s0?o:null}function getFormElementValue(e,t){var r=null,n=e.type;if("select-one"===n)return e.options.length&&(r=e.options[e.selectedIndex].value),r;if("select-multiple"===n){r=[];for(var o=0,i=e.options.length;o target element passed in options to operate, none was found","error")},o.uninstall=function(){this.form.removeEventListener("submit",this.handleFormSubmit),this.uppy.off("upload",this.handleUploadStart),this.uppy.off("complete",this.handleSuccess)},n}(__Plugin_136),___class_136.VERSION=_$package_137.version,___temp_136),_$IndexedDBStore_138={};function ___extends_138(){return(___extends_138=Object.assign||function(e){for(var t=1;tthis.opts.maxFileSize?Promise.reject(new Error("File is too big to store.")):this.getSize().then(function(e){return e>t.opts.maxTotalSize?Promise.reject(new Error("No space left")):t.ready}).then(function(r){return waitForRequest(r.transaction([STORE_NAME],"readwrite").objectStore(STORE_NAME).add({id:t.key(e.id),fileID:e.id,store:t.name,expires:Date.now()+t.opts.expires,data:e.data}))})},t.delete=function(e){var t=this;return this.ready.then(function(r){return waitForRequest(r.transaction([STORE_NAME],"readwrite").objectStore(STORE_NAME).delete(t.key(e)))})},e.cleanup=function(){return connect(DB_NAME).then(function(e){var t=e.transaction([STORE_NAME],"readwrite").objectStore(STORE_NAME).index("expires").openCursor(IDBKeyRange.upperBound(Date.now()));return new Promise(function(r,n){t.onsuccess=function(t){var n=t.target.result;if(n){var o=n.value;console.log("[IndexedDBStore] Deleting record",o.fileID,"of size",_$prettyBytes_216(o.data.size),"- expired on",new Date(o.expires)),n.delete(),n.continue()}else r(e)},t.onerror=n})}).then(function(e){e.close()})},e}();function ___extends_139(){return(___extends_139=Object.assign||function(e){for(var t=1;t0)return e.uppy.log("[GoldenRetriever] Successfully recovered "+r+" blobs from IndexedDB!"),e.uppy.info("Successfully recovered "+r+" files","success",3e3),e.onBlobsLoaded(t);e.uppy.log("[GoldenRetriever] No blobs found in IndexedDB")}).catch(function(t){e.uppy.log("[GoldenRetriever] Failed to recover blobs from IndexedDB","warning"),e.uppy.log(t)})},o.onBlobsLoaded=function(e){var t=this,r=[],n=___extends_141({},this.uppy.getState().files);Object.keys(e).forEach(function(o){var i=t.uppy.getFile(o);if(i){var s=___extends_141({},i,{data:e[o],isRestored:!0});n[o]=s}else r.push(o)}),this.uppy.setState({files:n}),this.uppy.emit("restored",this.savedPluginData),r.length&&this.deleteBlobs(r).then(function(){t.uppy.log("[GoldenRetriever] Cleaned up "+r.length+" old files")}).catch(function(e){t.uppy.log("[GoldenRetriever] Could not clean up "+r.length+" old files","warning"),t.uppy.log(e)})},o.deleteBlobs=function(e){var t=this,r=[];return e.forEach(function(e){t.ServiceWorkerStore&&r.push(t.ServiceWorkerStore.delete(e)),t.IndexedDBStore&&r.push(t.IndexedDBStore.delete(e))}),Promise.all(r)},o.install=function(){var e=this;this.loadFilesStateFromLocalStorage(),this.uppy.getFiles().length>0?this.ServiceWorkerStore?(this.uppy.log("[GoldenRetriever] Attempting to load files from Service Worker..."),this.loadFileBlobsFromServiceWorker()):(this.uppy.log("[GoldenRetriever] Attempting to load files from Indexed DB..."),this.loadFileBlobsFromIndexedDB()):(this.uppy.log("[GoldenRetriever] No files need to be loaded, only restoring processing state..."),this.onBlobsLoaded([])),this.uppy.on("file-added",function(t){t.isRemote||(e.ServiceWorkerStore&&e.ServiceWorkerStore.put(t).catch(function(t){e.uppy.log("[GoldenRetriever] Could not store file","warning"),e.uppy.log(t)}),e.IndexedDBStore.put(t).catch(function(t){e.uppy.log("[GoldenRetriever] Could not store file","warning"),e.uppy.log(t)}))}),this.uppy.on("file-removed",function(t){e.ServiceWorkerStore&&e.ServiceWorkerStore.delete(t.id).catch(function(t){e.uppy.log("[GoldenRetriever] Failed to remove file","warning"),e.uppy.log(t)}),e.IndexedDBStore.delete(t.id).catch(function(t){e.uppy.log("[GoldenRetriever] Failed to remove file","warning"),e.uppy.log(t)})}),this.uppy.on("complete",function(t){var r=t.successful,n=r.map(function(e){return e.id});e.deleteBlobs(n).then(function(){e.uppy.log("[GoldenRetriever] Removed "+r.length+" files that finished uploading")}).catch(function(t){e.uppy.log("[GoldenRetriever] Could not remove "+r.length+" files that finished uploading","warning"),e.uppy.log(t)})}),this.uppy.on("state-update",this.saveFilesStateToLocalStorage),this.uppy.on("restored",function(){var t=e.uppy.getState().currentUploads;t&&Object.keys(t).forEach(function(r){e.uppy.restore(r,t[r])})})},n}(__Plugin_141),___class_141.VERSION=_$package_142.version,___temp_141),_$DriveProviderViews_143=function(e){var t,r;function n(){return e.apply(this,arguments)||this}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n.prototype.toggleCheckbox=function(t,r){t.stopPropagation(),t.preventDefault(),r.custom.isTeamDrive||e.prototype.toggleCheckbox.call(this,t,r)},n}(_$lib_163),_$package_145={version:"1.2.0"},___class_144,___temp_144;function ___assertThisInitialized_144(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var __Plugin_144=_$lib_101.Plugin,__Provider_144=_$lib_97.Provider,__h_144=_$preact_51.h,_$lib_144=(___temp_144=___class_144=function(e){var t,r;function n(t,r){var n;return(n=e.call(this,t,r)||this).id=n.opts.id||"GoogleDrive",n.title=n.opts.title||"Google Drive",__Provider_144.initPlugin(___assertThisInitialized_144(n),r),n.title=n.opts.title||"Google Drive",n.icon=function(){return __h_144("svg",{"aria-hidden":"true",focusable:"false",width:"18px",height:"16px",viewBox:"0 0 18 16",version:"1.1"},__h_144("g",{"fill-rule":"evenodd"},__h_144("polygon",{fill:"#3089FC",points:"6.32475 10.2 18 10.2 14.999625 15.3 3.324375 15.3"}),__h_144("polygon",{fill:"#00A85D",points:"3.000375 15.3 0 10.2 5.83875 0.275974026 8.838 5.37597403 5.999625 10.2"}),__h_144("polygon",{fill:"#FFD024",points:"11.838375 9.92402597 5.999625 0 12.000375 0 17.839125 9.92402597"})))},n.provider=new __Provider_144(t,{companionUrl:n.opts.companionUrl,serverHeaders:n.opts.serverHeaders,storage:n.opts.storage,provider:"drive",authProvider:"google",pluginId:n.id}),n.onFirstRender=n.onFirstRender.bind(___assertThisInitialized_144(n)),n.render=n.render.bind(___assertThisInitialized_144(n)),n}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var o=n.prototype;return o.install=function(){this.view=new _$DriveProviderViews_143(this,{provider:this.provider}),this.setPluginState({authenticated:!1,files:[],folders:[],directories:[],activeRow:-1,filterInput:"",isSearchVisible:!1,hasTeamDrives:!1,teamDrives:[],teamDriveId:""});var e=this.opts.target;e&&this.mount(e,this)},o.uninstall=function(){this.view.tearDown(),this.unmount()},o.onFirstRender=function(){return this.view.getFolder("root","/")},o.render=function(e){return this.view.render(e)},n}(__Plugin_144),___class_144.VERSION=_$package_145.version,___temp_144),_$package_149={version:"1.2.0"},___class_148,___temp_148;function ___assertThisInitialized_148(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var __Plugin_148=_$lib_101.Plugin,__Provider_148=_$lib_97.Provider,__h_148=_$preact_51.h,_$lib_148=(___temp_148=___class_148=function(e){var t,r;function n(t,r){var n;return(n=e.call(this,t,r)||this).id=n.opts.id||"Instagram",__Provider_148.initPlugin(___assertThisInitialized_148(n),r),n.title=n.opts.title||"Instagram",n.icon=function(){return __h_148("svg",{"aria-hidden":"true",focusable:"false",fill:"#DE3573",width:"28",height:"28",viewBox:"0 0 512 512"},__h_148("path",{d:"M256,49.471c67.266,0,75.233.257,101.8,1.469,24.562,1.121,37.9,5.224,46.778,8.674a78.052,78.052,0,0,1,28.966,18.845,78.052,78.052,0,0,1,18.845,28.966c3.45,8.877,7.554,22.216,8.674,46.778,1.212,26.565,1.469,34.532,1.469,101.8s-0.257,75.233-1.469,101.8c-1.121,24.562-5.225,37.9-8.674,46.778a83.427,83.427,0,0,1-47.811,47.811c-8.877,3.45-22.216,7.554-46.778,8.674-26.56,1.212-34.527,1.469-101.8,1.469s-75.237-.257-101.8-1.469c-24.562-1.121-37.9-5.225-46.778-8.674a78.051,78.051,0,0,1-28.966-18.845,78.053,78.053,0,0,1-18.845-28.966c-3.45-8.877-7.554-22.216-8.674-46.778-1.212-26.564-1.469-34.532-1.469-101.8s0.257-75.233,1.469-101.8c1.121-24.562,5.224-37.9,8.674-46.778A78.052,78.052,0,0,1,78.458,78.458a78.053,78.053,0,0,1,28.966-18.845c8.877-3.45,22.216-7.554,46.778-8.674,26.565-1.212,34.532-1.469,101.8-1.469m0-45.391c-68.418,0-77,.29-103.866,1.516-26.815,1.224-45.127,5.482-61.151,11.71a123.488,123.488,0,0,0-44.62,29.057A123.488,123.488,0,0,0,17.3,90.982C11.077,107.007,6.819,125.319,5.6,152.134,4.369,179,4.079,187.582,4.079,256S4.369,333,5.6,359.866c1.224,26.815,5.482,45.127,11.71,61.151a123.489,123.489,0,0,0,29.057,44.62,123.486,123.486,0,0,0,44.62,29.057c16.025,6.228,34.337,10.486,61.151,11.71,26.87,1.226,35.449,1.516,103.866,1.516s77-.29,103.866-1.516c26.815-1.224,45.127-5.482,61.151-11.71a128.817,128.817,0,0,0,73.677-73.677c6.228-16.025,10.486-34.337,11.71-61.151,1.226-26.87,1.516-35.449,1.516-103.866s-0.29-77-1.516-103.866c-1.224-26.815-5.482-45.127-11.71-61.151a123.486,123.486,0,0,0-29.057-44.62A123.487,123.487,0,0,0,421.018,17.3C404.993,11.077,386.681,6.819,359.866,5.6,333,4.369,324.418,4.079,256,4.079h0Z"}),__h_148("path",{d:"M256,126.635A129.365,129.365,0,1,0,385.365,256,129.365,129.365,0,0,0,256,126.635Zm0,213.338A83.973,83.973,0,1,1,339.974,256,83.974,83.974,0,0,1,256,339.973Z"}),__h_148("circle",{cx:"390.476",cy:"121.524",r:"30.23"}))},n.provider=new __Provider_148(t,{companionUrl:n.opts.companionUrl,serverHeaders:n.opts.serverHeaders,storage:n.opts.storage,provider:"instagram",authProvider:"instagram",pluginId:n.id}),n.onFirstRender=n.onFirstRender.bind(___assertThisInitialized_148(n)),n.render=n.render.bind(___assertThisInitialized_148(n)),n}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var o=n.prototype;return o.install=function(){this.view=new _$lib_163(this,{provider:this.provider,viewType:"grid",showTitles:!1,showFilter:!1,showBreadcrumbs:!1}),this.setPluginState({authenticated:!1,files:[],folders:[],directories:[],activeRow:-1,filterInput:"",isSearchVisible:!1});var e=this.opts.target;e&&this.mount(e,this)},o.uninstall=function(){this.view.tearDown(),this.unmount()},o.onFirstRender=function(){this.view.getFolder("recent")},o.render=function(e){return this.view.render(e)},n}(__Plugin_148),___class_148.VERSION=_$package_149.version,___temp_148),_$package_151={version:"1.2.0"},___class_150,___temp_150;function ___extends_150(){return(___extends_150=Object.assign||function(e){for(var t=1;t0&&e.jitter<=1?e.jitter:0,this.attempts=0}_$backo2_3=Backoff,Backoff.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-r:e+r}return 0|Math.min(e,this.max)},Backoff.prototype.reset=function(){this.attempts=0},Backoff.prototype.setMin=function(e){this.ms=e},Backoff.prototype.setMax=function(e){this.max=e},Backoff.prototype.setJitter=function(e){this.jitter=e};var __slice_10=[].slice,_$componentBind_10=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var r=__slice_10.call(arguments,2);return function(){return t.apply(e,r.concat(__slice_10.call(arguments)))}};function __noop_1(){}var _$after_1=function(e,t,r){var n=!1;return r=r||__noop_1,o.count=e,0===e?t():o;function o(e,i){if(o.count<=0)throw new Error("after called too many times");--o.count,e?(n=!0,t(e),t=r):0!==o.count||n||t(null,i)}},_$arraybufferSlice_2=function(e,t,r){var n=e.byteLength;if(t=t||0,r=r||n,e.slice)return e.slice(t,r);if(t<0&&(t+=n),r<0&&(r+=n),r>n&&(r=n),t>=n||t>=r||0===n)return new ArrayBuffer(0);for(var o=new Uint8Array(e),i=new Uint8Array(r-t),s=t,a=0;s>2],i+=e[(3&n[r])<<4|n[r+1]>>4],i+=e[(15&n[r+1])<<2|n[r+2]>>6],i+=e[63&n[r+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i},_$base64Arraybuffer_4.decode=function(e){var r,n,o,i,s,a=.75*e.length,l=e.length,u=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var c=new ArrayBuffer(a),p=new Uint8Array(c);for(r=0;r>4,p[u++]=(15&o)<<4|i>>2,p[u++]=(3&i)<<6|63&s;return c}}();var _$blob_6={},BlobBuilder=void 0!==BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,blobSupported=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),blobSupportsArrayBufferView=blobSupported&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),blobBuilderSupported=BlobBuilder&&BlobBuilder.prototype.append&&BlobBuilder.prototype.getBlob;function mapArrayBufferViews(e){return e.map(function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var r=new Uint8Array(e.byteLength);r.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=r.buffer}return t}return e})}function BlobBuilderConstructor(e,t){t=t||{};var r=new BlobBuilder;return mapArrayBufferViews(e).forEach(function(e){r.append(e)}),t.type?r.getBlob(t.type):r.getBlob()}function BlobConstructor(e,t){return new Blob(mapArrayBufferViews(e),t||{})}"undefined"!=typeof Blob&&(BlobBuilderConstructor.prototype=Blob.prototype,BlobConstructor.prototype=Blob.prototype),_$blob_6=blobSupported?blobSupportsArrayBufferView?Blob:BlobConstructor:blobBuilderSupported?BlobBuilderConstructor:void 0;var _$keys_30=Object.keys||function(e){var t=[],r=Object.prototype.hasOwnProperty;for(var n in e)r.call(e,n)&&t.push(n);return t},byteArray,byteCount,byteIndex,stringFromCharCode=String.fromCharCode;function ucs2decode(e){for(var t,r,n=[],o=0,i=e.length;o=55296&&t<=56319&&o=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function createByte(e,t){return stringFromCharCode(e>>t&63|128)}function encodeCodePoint(e,t){if(0==(4294967168&e))return stringFromCharCode(e);var r="";return 0==(4294965248&e)?r=stringFromCharCode(e>>6&31|192):0==(4294901760&e)?(checkScalarValue(e,t)||(e=65533),r=stringFromCharCode(e>>12&15|224),r+=createByte(e,6)):0==(4292870144&e)&&(r=stringFromCharCode(e>>18&7|240),r+=createByte(e,12),r+=createByte(e,6)),r+stringFromCharCode(63&e|128)}function readContinuationByte(){if(byteIndex>=byteCount)throw Error("Invalid byte index");var e=255&byteArray[byteIndex];if(byteIndex++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function decodeSymbol(e){var t,r;if(byteIndex>byteCount)throw Error("Invalid byte index");if(byteIndex==byteCount)return!1;if(t=255&byteArray[byteIndex],byteIndex++,0==(128&t))return t;if(192==(224&t)){if((r=(31&t)<<6|readContinuationByte())>=128)return r;throw Error("Invalid continuation byte")}if(224==(240&t)){if((r=(15&t)<<12|readContinuationByte()<<6|readContinuationByte())>=2048)return checkScalarValue(r,e)?r:65533;throw Error("Invalid continuation byte")}if(240==(248&t)&&(r=(7&t)<<18|readContinuationByte()<<12|readContinuationByte()<<6|readContinuationByte())>=65536&&r<=1114111)return r;throw Error("Invalid UTF-8 detected")}for(var _$utf8_31={encode:function(e,t){for(var r=!1!==(t=t||{}).strict,n=ucs2decode(e),o=n.length,i=-1,s="";++i65535&&(o+=stringFromCharCode((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=stringFromCharCode(t);return o}(o)}},_$base64Js_5={toByteArray:function(e){for(var t,r=getLens(e),n=r[0],o=r[1],i=new Arr(function(e,t,r){return 3*(t+r)/4-r}(0,n,o)),s=0,a=o>0?n-4:n,l=0;l>16&255,i[s++]=t>>8&255,i[s++]=255&t;return 2===o&&(t=revLookup[e.charCodeAt(l)]<<2|revLookup[e.charCodeAt(l+1)]>>4,i[s++]=255&t),1===o&&(t=revLookup[e.charCodeAt(l)]<<10|revLookup[e.charCodeAt(l+1)]<<4|revLookup[e.charCodeAt(l+2)]>>2,i[s++]=t>>8&255,i[s++]=255&t),i},fromByteArray:function(e){for(var t,r=e.length,n=r%3,o=[],i=0,s=r-n;is?s:i+16383));return 1===n?(t=e[r-1],o.push(lookup[t>>2]+lookup[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],o.push(lookup[t>>10]+lookup[t>>4&63]+lookup[t<<2&63]+"=")),o.join("")}},lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function encodeChunk(e,t,r){for(var n,o,i=[],s=t;s>18&63]+lookup[o>>12&63]+lookup[o>>6&63]+lookup[63&o]);return i.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63;var _$ieee754_39={read:function(e,t,r,n,o){var i,s,a=8*o-n-1,l=(1<>1,c=-7,p=r?o-1:0,d=r?-1:1,h=e[t+p];for(p+=d,i=h&(1<<-c)-1,h>>=-c,c+=a;c>0;i=256*i+e[t+p],p+=d,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=n;c>0;s=256*s+e[t+p],p+=d,c-=8);if(0===i)i=1-u;else{if(i===l)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),i-=u}return(h?-1:1)*s*Math.pow(2,i-n)},write:function(e,t,r,n,o,i){var s,a,l,u=8*i-o-1,c=(1<>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,_=n?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+p>=1?d/l:d*Math.pow(2,1-p))*l>=2&&(s++,l/=2),s+p>=c?(a=0,s=c):s+p>=1?(a=(t*l-1)*Math.pow(2,o),s+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,o),s=0));o>=8;e[r+h]=255&a,h+=_,a/=256,o-=8);for(s=s<0;e[r+h]=255&s,h+=_,s/=256,u-=8);e[r+h-_]|=128*f}},_$buffer_8={};_$buffer_8.Buffer=Buffer,_$buffer_8.INSPECT_MAX_BYTES=50;var K_MAX_LENGTH=2147483647;function createBuffer(e){if(e>K_MAX_LENGTH)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=Buffer.prototype,t}function Buffer(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(e)}return from(e,t,r)}function from(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Buffer.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|byteLength(e,t),n=createBuffer(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return fromArrayLike(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(isInstance(e,ArrayBuffer)||e&&isInstance(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength=K_MAX_LENGTH)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K_MAX_LENGTH.toString(16)+" bytes");return 0|e}function byteLength(e,t){if(Buffer.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||isInstance(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return utf8ToBytes(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(e).length;default:if(o)return n?-1:utf8ToBytes(e).length;t=(""+t).toLowerCase(),o=!0}}function swap(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function bidirectionalIndexOf(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),numberIsNaN(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=Buffer.from(t,n)),Buffer.isBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):arrayIndexOf(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(e,t,r,n,o){var i,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var c=-1;for(i=r;ia&&(r=a-l),i=r;i>=0;i--){for(var p=!0,d=0;do&&(n=o):n=o;var i=t.length;n>i/2&&(n=i/2);for(var s=0;s>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function base64Slice(e,t,r){return 0===t&&r===e.length?_$base64Js_5.fromByteArray(e):_$base64Js_5.fromByteArray(e.slice(t,r))}function utf8Slice(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o239?4:u>223?3:u>191?2:1;if(o+p<=r)switch(p){case 1:u<128&&(c=u);break;case 2:128==(192&(i=e[o+1]))&&(l=(31&u)<<6|63&i)>127&&(c=l);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(l=(15&u)<<12|(63&i)<<6|63&s)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(l=(15&u)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,p=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=p}return function(e){var t=e.length;if(t<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,e);for(var r="",n=0;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return hexSlice(this,t,r);case"utf8":case"utf-8":return utf8Slice(this,t,r);case"ascii":return asciiSlice(this,t,r);case"latin1":case"binary":return latin1Slice(this,t,r);case"base64":return base64Slice(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function(e){if(!Buffer.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Buffer.compare(this,e)},Buffer.prototype.inspect=function(){var e="",t=_$buffer_8.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),""},Buffer.prototype.compare=function(e,t,r,n,o){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),!Buffer.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(i,s),l=this.slice(n,o),u=e.slice(t,r),c=0;c>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return hexWrite(this,e,t,r);case"utf8":case"utf-8":return utf8Write(this,e,t,r);case"ascii":return asciiWrite(this,e,t,r);case"latin1":case"binary":return latin1Write(this,e,t,r);case"base64":return base64Write(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;function asciiSlice(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;on)&&(r=n);for(var o="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function checkInt(e,t,r,n,o,i){if(!Buffer.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function checkIEEE754(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function writeFloat(e,t,r,n,o){return t=+t,r>>>=0,o||checkIEEE754(e,0,r,4),_$ieee754_39.write(e,t,r,n,23,4),r+4}function writeDouble(e,t,r,n,o){return t=+t,r>>>=0,o||checkIEEE754(e,0,r,8),_$ieee754_39.write(e,t,r,n,52,8),r+8}Buffer.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e],o=1,i=0;++i>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},Buffer.prototype.readUInt8=function(e,t){return e>>>=0,t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUInt16LE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUInt16BE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*t)),n},Buffer.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},Buffer.prototype.readInt8=function(e,t){return e>>>=0,t||checkOffset(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Buffer.prototype.readInt16LE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readFloatLE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),_$ieee754_39.read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),_$ieee754_39.read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),_$ieee754_39.read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),_$ieee754_39.read(this,e,!1,52,8)},Buffer.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||checkInt(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i>>=0,r>>>=0,n||checkInt(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},Buffer.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,255,0),this[t]=255&e,t+1},Buffer.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},Buffer.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);checkInt(this,e,t,r,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+r},Buffer.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);checkInt(this,e,t,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},Buffer.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},Buffer.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeFloatLE=function(e,t,r){return writeFloat(this,e,t,!0,r)},Buffer.prototype.writeFloatBE=function(e,t,r){return writeFloat(this,e,t,!1,r)},Buffer.prototype.writeDoubleLE=function(e,t,r){return writeDouble(this,e,t,!0,r)},Buffer.prototype.writeDoubleBE=function(e,t,r){return writeDouble(this,e,t,!1,r)},Buffer.prototype.copy=function(e,t,r,n){if(!Buffer.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return o},Buffer.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Buffer.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e&&(e&=255);if(t<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function base64ToBytes(e){return _$base64Js_5.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(INVALID_BASE64_RE,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function blitBuffer(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function isInstance(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function numberIsNaN(e){return e!=e}var __toString_42={}.toString,_$isarray_42=Array.isArray||function(e){return"[object Array]"==__toString_42.call(e)},_$hasBinary_37={};(function(e){var t=Object.prototype.toString,r="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===t.call(Blob),n="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===t.call(File);_$hasBinary_37=function t(o){if(!o||"object"!=typeof o)return!1;if(_$isarray_42(o)){for(var i=0,s=o.length;i1?{type:packetslist[n],data:e.substring(1)}:{type:packetslist[n]}:err}n=new Uint8Array(e)[0];var o=_$arraybufferSlice_2(e,1);return _$blob_6&&"blob"===t&&(o=new _$blob_6([o])),{type:packetslist[n],data:o}},_$browser_29.decodeBase64Packet=function(e,t){var r=packetslist[e.charAt(0)];if(!base64encoder)return{type:r,data:{base64:!0,data:e.substr(1)}};var n=base64encoder.decode(e.substr(1));return"blob"===t&&_$blob_6&&(n=new _$blob_6([n])),{type:r,data:n}},_$browser_29.encodePayload=function(e,t,r){"function"==typeof t&&(r=t,t=null);var n=_$hasBinary_37(e);return t&&n?_$blob_6&&!dontSendBlobs?_$browser_29.encodePayloadAsBlob(e,r):_$browser_29.encodePayloadAsArrayBuffer(e,r):e.length?void map(e,function(e,r){_$browser_29.encodePacket(e,!!n&&t,!1,function(e){r(null,function(e){return e.length+":"+e}(e))})},function(e,t){return r(t.join(""))}):r("0:")},_$browser_29.decodePayload=function(e,t,r){if("string"!=typeof e)return _$browser_29.decodePayloadAsBinary(e,t,r);var n;if("function"==typeof t&&(r=t,t=null),""===e)return r(err,0,1);for(var o,i,s="",a=0,l=e.length;a0;){for(var i=new Uint8Array(n),s=0===i[0],a="",l=1;255!==i[l];l++){if(a.length>310)return r(err,0,1);a+=i[l]}n=_$arraybufferSlice_2(n,2+a.length),a=parseInt(a);var u=_$arraybufferSlice_2(n,0,a);if(s)try{u=String.fromCharCode.apply(null,new Uint8Array(u))}catch(e){var c=new Uint8Array(u);for(u="",l=0;l0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*y;case"days":case"day":case"d":return r*d;case"hours":case"hour":case"hrs":case"hr":case"h":return r*__h_28;case"minutes":case"minute":case"mins":case"min":case"m":return r*m;case"seconds":case"second":case"secs":case"sec":case"s":return r*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}(e);if("number"===n&&!1===isNaN(e))return t.long?plural(r=e,d,"day")||plural(r,__h_28,"hour")||plural(r,m,"minute")||plural(r,s,"second")||r+" ms":function(e){return e>=d?Math.round(e/d)+"d":e>=__h_28?Math.round(e/__h_28)+"h":e>=m?Math.round(e/m)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))},_$debug_27={};function createDebug(e){var t;function r(){if(r.enabled){var e=r,n=+new Date,o=n-(t||n);e.diff=o,e.prev=t,e.curr=n,t=n;for(var i=new Array(arguments.length),s=0;s=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},_$browser_26.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),_$browser_26.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],_$browser_26.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},_$browser_26.enable(t())}).call(this,_$browser_52);var _$parseqs_48={encode:function(e){var t="";for(var r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t},decode:function(e){for(var t={},r=e.split("&"),n=0,o=r.length;n0);return t}function yeast(){var e=encode(+new Date);return e!==prev?(seed=0,prev=e):e+"."+encode(seed++)}for(;__i_87';i=document.createElement(e)}catch(e){(i=document.createElement("iframe")).name=o.iframeId,i.src="javascript:0"}i.id=o.iframeId,o.form.appendChild(i),o.iframe=i}this.form.action=this.uri(),c(),e=e.replace(n,"\\\n"),this.area.value=e.replace(r,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===o.iframe.readyState&&u()}:this.iframe.onload=u}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var _$pollingXhr_22={},__debug_22=_$browser_26("engine.io-client:polling-xhr");function empty(){}function XHR(e){if(_$Polling_23.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,"undefined"!=typeof location){var t="https:"===location.protocol,r=location.port;r||(r=t?443:80),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||r!==e.port,this.xs=e.secure!==t}}function Request(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}if(_$pollingXhr_22=XHR,_$pollingXhr_22.Request=Request,_$componentInherit_12(XHR,_$Polling_23),XHR.prototype.supportsBinary=!0,XHR.prototype.request=function(e){return(e=e||{}).uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new Request(e)},XHR.prototype.doWrite=function(e,t){var r="string"!=typeof e&&void 0!==e,n=this.request({method:"POST",data:e,isBinary:r}),o=this;n.on("success",t),n.on("error",function(e){o.onError("xhr post error",e)}),this.sendXhr=n},XHR.prototype.doPoll=function(){__debug_22("xhr poll");var e=this.request(),t=this;e.on("data",function(e){t.onData(e)}),e.on("error",function(e){t.onError("xhr poll error",e)}),this.pollXhr=e},_$componentEmitter_11(Request.prototype),Request.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new _$xmlhttprequest_25(e),r=this;try{__debug_22("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var n in t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(n)&&t.setRequestHeader(n,this.extraHeaders[n])}catch(e){}if("POST"===this.method)try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{t.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in t&&(t.withCredentials=!0),this.requestTimeout&&(t.timeout=this.requestTimeout),this.hasXDR()?(t.onload=function(){r.onLoad()},t.onerror=function(){r.onError(t.responseText)}):t.onreadystatechange=function(){if(2===t.readyState)try{var e=t.getResponseHeader("Content-Type");r.supportsBinary&&"application/octet-stream"===e&&(t.responseType="arraybuffer")}catch(e){}4===t.readyState&&(200===t.status||1223===t.status?r.onLoad():setTimeout(function(){r.onError(t.status)},0))},__debug_22("xhr data %s",this.data),t.send(this.data)}catch(e){return void setTimeout(function(){r.onError(e)},0)}"undefined"!=typeof document&&(this.index=Request.requestsCount++,Request.requests[this.index]=this)},Request.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},Request.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},Request.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},Request.prototype.cleanup=function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=empty:this.xhr.onreadystatechange=empty,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete Request.requests[this.index],this.xhr=null}},Request.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch(e){}e="application/octet-stream"===t&&this.xhr.response||this.xhr.responseText}catch(e){this.onError(e)}null!=e&&this.onData(e)},Request.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},Request.prototype.abort=function(){this.cleanup()},Request.requestsCount=0,Request.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",unloadHandler);else if("function"==typeof addEventListener){var terminationEvent="onpagehide"in self?"pagehide":"unload";addEventListener(terminationEvent,unloadHandler,!1)}function unloadHandler(){for(var e in Request.requests)Request.requests.hasOwnProperty(e)&&Request.requests[e].abort()}var _$empty_7={},_$websocket_24={};(function(e){var t,r,n=_$browser_26("engine.io-client:websocket");if("undefined"!=typeof WebSocket)t=WebSocket;else if("undefined"!=typeof self)t=self.WebSocket||self.MozWebSocket;else try{r=_$empty_7}catch(e){}var o=t||r;function i(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=t&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(o=r),_$transport_19.call(this,e)}_$websocket_24=i,_$componentInherit_12(i,_$transport_19),i.prototype.name="websocket",i.prototype.supportsBinary=!0,i.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,r={agent:this.agent,perMessageDeflate:this.perMessageDeflate};r.pfx=this.pfx,r.key=this.key,r.passphrase=this.passphrase,r.cert=this.cert,r.ca=this.ca,r.ciphers=this.ciphers,r.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(r.headers=this.extraHeaders),this.localAddress&&(r.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?t?new o(e,t):new o(e):new o(e,t,r)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},i.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},i.prototype.write=function(t){var r=this;this.writable=!1;for(var o=t.length,i=0,s=o;i0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}_$socket_18=__Socket_18,__Socket_18.priorWebsocketSuccess=!1,_$componentEmitter_11(__Socket_18.prototype),__Socket_18.protocol=_$browser_29.protocol,__Socket_18.Socket=__Socket_18,__Socket_18.Transport=_$transport_19,__Socket_18.transports=_$transports_20,__Socket_18.parser=_$browser_29,__Socket_18.prototype.createTransport=function(e){__debug_18('creating transport "%s"',e);var t=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}(this.query);t.EIO=_$browser_29.protocol,t.transport=e;var r=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new _$transports_20[e]({query:t,socket:this,agent:r.agent||this.agent,hostname:r.hostname||this.hostname,port:r.port||this.port,secure:r.secure||this.secure,path:r.path||this.path,forceJSONP:r.forceJSONP||this.forceJSONP,jsonp:r.jsonp||this.jsonp,forceBase64:r.forceBase64||this.forceBase64,enablesXDR:r.enablesXDR||this.enablesXDR,timestampRequests:r.timestampRequests||this.timestampRequests,timestampParam:r.timestampParam||this.timestampParam,policyPort:r.policyPort||this.policyPort,pfx:r.pfx||this.pfx,key:r.key||this.key,passphrase:r.passphrase||this.passphrase,cert:r.cert||this.cert,ca:r.ca||this.ca,ciphers:r.ciphers||this.ciphers,rejectUnauthorized:r.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:r.perMessageDeflate||this.perMessageDeflate,extraHeaders:r.extraHeaders||this.extraHeaders,forceNode:r.forceNode||this.forceNode,localAddress:r.localAddress||this.localAddress,requestTimeout:r.requestTimeout||this.requestTimeout,protocols:r.protocols||void 0,isReactNative:this.isReactNative})},__Socket_18.prototype.open=function(){var e;if(this.rememberUpgrade&&__Socket_18.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},__Socket_18.prototype.setTransport=function(e){__debug_18("setting transport %s",e.name);var t=this;this.transport&&(__debug_18("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},__Socket_18.prototype.probe=function(e){__debug_18('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),r=!1,n=this;function o(){if(n.onlyBinaryUpgrades){var o=!this.supportsBinary&&n.transport.supportsBinary;r=r||o}r||(__debug_18('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",function(o){if(!r)if("pong"===o.type&&"probe"===o.data){if(__debug_18('probe transport "%s" pong',e),n.upgrading=!0,n.emit("upgrading",t),!t)return;__Socket_18.priorWebsocketSuccess="websocket"===t.name,__debug_18('pausing current transport "%s"',n.transport.name),n.transport.pause(function(){r||"closed"!==n.readyState&&(__debug_18("changing transport and sending upgrade packet"),c(),n.setTransport(t),t.send([{type:"upgrade"}]),n.emit("upgrade",t),t=null,n.upgrading=!1,n.flush())})}else{__debug_18('probe transport "%s" failed',e);var i=new Error("probe error");i.transport=t.name,n.emit("upgradeError",i)}}))}function i(){r||(r=!0,c(),t.close(),t=null)}function s(r){var o=new Error("probe error: "+r);o.transport=t.name,i(),__debug_18('probe transport "%s" failed because of error: %s',e,r),n.emit("upgradeError",o)}function a(){s("transport closed")}function l(){s("socket closed")}function u(e){t&&e.name!==t.name&&(__debug_18('"%s" works - aborting "%s"',e.name,t.name),i())}function c(){t.removeListener("open",o),t.removeListener("error",s),t.removeListener("close",a),n.removeListener("close",l),n.removeListener("upgrading",u)}__Socket_18.priorWebsocketSuccess=!1,t.once("open",o),t.once("error",s),t.once("close",a),this.once("close",l),this.once("upgrading",u),t.open()},__Socket_18.prototype.onOpen=function(){if(__debug_18("socket open"),this.readyState="open",__Socket_18.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){__debug_18("starting upgrade probes");for(var e=0,t=this.upgrades.length;e0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*__y_64;case"days":case"day":case"d":return r*__d_64;case"hours":case"hour":case"hrs":case"hr":case"h":return r*__h_64;case"minutes":case"minute":case"mins":case"min":case"m":return r*__m_64;case"seconds":case"second":case"secs":case"sec":case"s":return r*__s_64;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}(e);if("number"===n&&!1===isNaN(e))return t.long?__plural_64(r=e,__d_64,"day")||__plural_64(r,__h_64,"hour")||__plural_64(r,__m_64,"minute")||__plural_64(r,__s_64,"second")||r+" ms":function(e){return e>=__d_64?Math.round(e/__d_64)+"d":e>=__h_64?Math.round(e/__h_64)+"h":e>=__m_64?Math.round(e/__m_64)+"m":e>=__s_64?Math.round(e/__s_64)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))},_$debug_63={};function __createDebug_63(e){var t;function r(){if(r.enabled){var e=r,n=+new Date,o=n-(t||n);e.diff=o,e.prev=t,e.curr=n,t=n;for(var i=new Array(arguments.length),s=0;s=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},_$browser_62.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),_$browser_62.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],_$browser_62.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},_$browser_62.enable(t())}).call(this,_$browser_52);var _$isBuffer_67={};(function(e){_$isBuffer_67=function(o){return t&&e.isBuffer(o)||r&&(o instanceof ArrayBuffer||n(o))};var t="function"==typeof e&&"function"==typeof e.isBuffer,r="function"==typeof ArrayBuffer,n=function(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer}}).call(this,_$buffer_8.Buffer);var _$binary_65={},__toString_65=Object.prototype.toString,withNativeBlob="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===__toString_65.call(Blob),withNativeFile="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===__toString_65.call(File);_$binary_65.deconstructPacket=function(e){var t=[],r=e.data,n=e;return n.data=function e(t,r){if(!t)return t;if(_$isBuffer_67(t)){var n={_placeholder:!0,num:r.length};return r.push(t),n}if(_$isarray_42(t)){for(var o=new Array(t.length),i=0;i0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*__y_70;case"days":case"day":case"d":return r*__d_70;case"hours":case"hour":case"hrs":case"hr":case"h":return r*__h_70;case"minutes":case"minute":case"mins":case"min":case"m":return r*__m_70;case"seconds":case"second":case"secs":case"sec":case"s":return r*__s_70;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}(e);if("number"===n&&!1===isNaN(e))return t.long?__plural_70(r=e,__d_70,"day")||__plural_70(r,__h_70,"hour")||__plural_70(r,__m_70,"minute")||__plural_70(r,__s_70,"second")||r+" ms":function(e){return e>=__d_70?Math.round(e/__d_70)+"d":e>=__h_70?Math.round(e/__h_70)+"h":e>=__m_70?Math.round(e/__m_70)+"m":e>=__s_70?Math.round(e/__s_70)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))},_$debug_69={};function __createDebug_69(e){var t;function r(){if(r.enabled){var e=r,n=+new Date,o=n-(t||n);e.diff=o,e.prev=t,e.curr=n,t=n;for(var i=new Array(arguments.length),s=0;s=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},_$browser_68.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),_$browser_68.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],_$browser_68.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},_$browser_68.enable(t())}).call(this,_$browser_52);var _$socketIoParser_66={},__debug_66=_$browser_68("socket.io-parser");function Encoder(){}_$socketIoParser_66.protocol=4,_$socketIoParser_66.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],_$socketIoParser_66.CONNECT=0,_$socketIoParser_66.DISCONNECT=1,_$socketIoParser_66.EVENT=2,_$socketIoParser_66.ACK=3,_$socketIoParser_66.ERROR=4,_$socketIoParser_66.BINARY_EVENT=5,_$socketIoParser_66.BINARY_ACK=6,_$socketIoParser_66.Encoder=Encoder,_$socketIoParser_66.Decoder=Decoder;var ERROR_PACKET=_$socketIoParser_66.ERROR+'"encode error"';function encodeAsString(e){var t=""+e.type;if(_$socketIoParser_66.BINARY_EVENT!==e.type&&_$socketIoParser_66.BINARY_ACK!==e.type||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data){var r=function(e){try{return JSON.stringify(e)}catch(e){return!1}}(e.data);if(!1===r)return ERROR_PACKET;t+=r}return __debug_66("encoded %j as %s",e,t),t}function Decoder(){this.reconstructor=null}function BinaryReconstructor(e){this.reconPack=e,this.buffers=[]}function error(e){return{type:_$socketIoParser_66.ERROR,data:"parser error: "+e}}Encoder.prototype.encode=function(e,t){__debug_66("encoding packet %j",e),_$socketIoParser_66.BINARY_EVENT===e.type||_$socketIoParser_66.BINARY_ACK===e.type?function(e,t){_$binary_65.removeBlobs(e,function(e){var r=_$binary_65.deconstructPacket(e),n=encodeAsString(r.packet),o=r.buffers;o.unshift(n),t(o)})}(e,t):t([encodeAsString(e)])},_$componentEmitter_11(Decoder.prototype),Decoder.prototype.add=function(e){var t;if("string"==typeof e)t=function(e){var t=0,r={type:Number(e.charAt(0))};if(null==_$socketIoParser_66.types[r.type])return error("unknown packet type "+r.type);if(_$socketIoParser_66.BINARY_EVENT===r.type||_$socketIoParser_66.BINARY_ACK===r.type){for(var n="";"-"!==e.charAt(++t)&&(n+=e.charAt(t),t!=e.length););if(n!=Number(n)||"-"!==e.charAt(t))throw new Error("Illegal attachments");r.attachments=Number(n)}if("/"===e.charAt(t+1))for(r.nsp="";++t;){if(","===(i=e.charAt(t)))break;if(r.nsp+=i,t===e.length)break}else r.nsp="/";var o=e.charAt(t+1);if(""!==o&&Number(o)==o){for(r.id="";++t;){var i;if(null==(i=e.charAt(t))||Number(i)!=i){--t;break}if(r.id+=e.charAt(t),t===e.length)break}r.id=Number(r.id)}if(e.charAt(++t)){var s=function(e){try{return JSON.parse(e)}catch(e){return!1}}(e.substr(t));if(!(!1!==s&&(r.type===_$socketIoParser_66.ERROR||_$isarray_42(s))))return error("invalid payload");r.data=s}return __debug_66("decoded %s as %j",e,r),r}(e),_$socketIoParser_66.BINARY_EVENT===t.type||_$socketIoParser_66.BINARY_ACK===t.type?(this.reconstructor=new BinaryReconstructor(t),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",t)):this.emit("decoded",t);else{if(!_$isBuffer_67(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(t=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,this.emit("decoded",t))}},Decoder.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},BinaryReconstructor.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=_$binary_65.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},BinaryReconstructor.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]};var _$toArray_71=function(e,t){for(var r=[],n=(t=t||0)||0;n0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},Manager.prototype.cleanup=function(){__debug_58("cleanup");for(var e=this.subs.length,t=0;t=this._reconnectionAttempts)__debug_58("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();__debug_58("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var r=setTimeout(function(){e.skipReconnect||(__debug_58("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open(function(t){t?(__debug_58("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(__debug_58("reconnect success"),e.onreconnect())}))},t);this.subs.push({destroy:function(){clearTimeout(r)}})}},Manager.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)};var __debug_61=_$browser_62("socket.io-client:url"),_$url_61=function(e,t){var r=e;t=t||"undefined"!=typeof location&&location,null==e&&(e=t.protocol+"//"+t.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(__debug_61("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),__debug_61("parse %s",e),r=_$parseuri_49(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var n=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+n+":"+r.port,r.href=r.protocol+"://"+n+(t&&t.port===r.port?"":":"+r.port),r},_$lib_57={},__debug_57=_$browser_62("socket.io-client");_$lib_57=_$lib_57=__lookup_57;var cache=_$lib_57.managers={};function __lookup_57(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,n=_$url_61(e),o=n.source,i=n.id,s=n.path,a=cache[i]&&s in cache[i].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||a?(__debug_57("ignoring socket cache for %s",o),r=_$manager_58(o,t)):(cache[i]||(__debug_57("new io instance for %s",o),cache[i]=_$manager_58(o,t)),r=cache[i]),n.query&&!t.query&&(t.query=n.query),r.socket(n.path,t)}_$lib_57.protocol=_$socketIoParser_66.protocol,_$lib_57.connect=__lookup_57,_$lib_57.Manager=_$manager_58,_$lib_57.Socket=_$socket_60;var _$parseUrl_183=function(e){var t=/^\w+:\/\//.exec(e),r=0;t&&(r=t[0].length+1);var n=e.indexOf("/",r);return-1===n?{origin:e,pathname:"/"}:{origin:e.slice(0,n),pathname:e.slice(n)}};function ___extends_178(){return(___extends_178=Object.assign||function(e){for(var t=1;t=statusOrder.indexOf(t)}var TransloaditAssembly=function(e){var t,r;function n(t){var r;return(r=e.call(this)||this).status=t,r.socket=null,r.pollInterval=null,r.closed=!1,r}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var o=n.prototype;return o.connect=function(){this._connectSocket(),this._beginPolling()},o._onFinished=function(){this.emit("finished"),this.close()},o._connectSocket=function(){var e=this,t=_$parseUrl_183(this.status.websocket_url),r=io().connect(t.origin,{transports:["websocket"],path:t.pathname});r.on("connect",function(){r.emit("assembly_connect",{id:e.status.assembly_id}),e.emit("connect")}),r.on("error",function(){r.disconnect(),e.socket=null}),r.on("assembly_finished",function(){e._onFinished()}),r.on("assembly_upload_finished",function(t){e.emit("upload",t),e.status.uploads.push(t)}),r.on("assembly_uploading_finished",function(){e.emit("executing")}),r.on("assembly_upload_meta_data_extracted",function(){e.emit("metadata"),e._fetchStatus({diff:!1})}),r.on("assembly_result_finished",function(t,r){e.emit("result",t,r),e.status.results[t]||(e.status.results[t]=[]),e.status.results[t].push(r)}),r.on("assembly_error",function(t){e._onError(t),e._fetchStatus({diff:!1})}),this.socket=r},o._onError=function(e){this.emit("error",___extends_178(new Error(e.message),e))},o._beginPolling=function(){var e=this;this.pollInterval=setInterval(function(){e.socket&&e.socket.connected||e._fetchStatus()},2e3)},o._fetchStatus=function(e){var t=this,r=(void 0===e?{}:e).diff,n=void 0===r||r;return fetch(this.status.assembly_ssl_url).then(function(e){return e.json()}).then(function(e){t.closed||(t.emit("status",e),n?t.updateStatus(e):t.status=e)})},o.update=function(){return this._fetchStatus({diff:!0})},o.updateStatus=function(e){this._diffStatus(this.status,e),this.status=e},o._diffStatus=function(e,t){var r=this,n=e.ok,o=t.ok;if(t.error&&!e.error)return this._onError(t);var i=isStatus(o,"ASSEMBLY_EXECUTING")&&!isStatus(n,"ASSEMBLY_EXECUTING");i&&this.emit("executing"),Object.keys(t.uploads).filter(function(t){return!e.uploads.hasOwnProperty(t)}).map(function(e){return t.uploads[e]}).forEach(function(e){r.emit("upload",e)}),i&&this.emit("metadata"),Object.keys(t.results).forEach(function(n){var o=t.results[n],i=e.results[n];o.filter(function(e){return!i||!i.some(function(t){return t.id===e.id})}).forEach(function(e){r.emit("result",n,e)})}),isStatus(o,"ASSEMBLY_COMPLETED")&&!isStatus(n,"ASSEMBLY_COMPLETED")&&this.emit("finished")},o.close=function(){this.closed=!0,this.socket&&(this.socket.disconnect(),this.socket=null),clearInterval(this.pollInterval)},n}(_$componentEmitter_11),_$TransloaditAssembly_178=TransloaditAssembly,_$AssemblyOptions_179={};function validateParams(e){if(!e)throw new Error("Transloadit: The `params` option is required.");if("string"==typeof e)try{e=JSON.parse(e)}catch(e){throw e.message="Transloadit: The `params` option is a malformed JSON string: "+e.message,e}if(!e.auth||!e.auth.key)throw new Error("Transloadit: The `params.auth.key` option is required. You can find your Transloadit API key at https://transloadit.com/account/api-settings.")}var AssemblyOptions=function(){function e(e,t){this.files=e,this.opts=t}var t=e.prototype;return t._normalizeAssemblyOptions=function(e,t){if(Array.isArray(t.fields)){var r=t.fields;t.fields={},r.forEach(function(r){t.fields[r]=e.meta[r]})}return t.fields||(t.fields={}),t},t._getAssemblyOptions=function(e){var t=this,r=this.opts;return Promise.resolve().then(function(){return r.getAssemblyOptions(e,r)}).then(function(r){return t._normalizeAssemblyOptions(e,r)}).then(function(t){return validateParams(t.params),{fileIDs:[e.id],options:t}})},t._dedupe=function(e){var t=Object.create(null);return e.forEach(function(e){var r,n=e.fileIDs,o=e.options,i=JSON.stringify(o);t[i]?(r=t[i].fileIDs).push.apply(r,n):t[i]={options:o,fileIDs:[].concat(n)}}),Object.keys(t).map(function(e){return t[e]})},t.build=function(){var e=this,t=this.opts;return this.files.length>0?Promise.all(this.files.map(function(t){return e._getAssemblyOptions(t)})).then(function(t){return e._dedupe(t)}):t.alwaysRunAssembly?Promise.resolve(t.getAssemblyOptions(null,t)).then(function(t){return validateParams(t.params),[{fileIDs:e.files.map(function(e){return e.id}),options:t}]}):Promise.resolve([])},e}();function ___assertThisInitialized_180(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}_$AssemblyOptions_179=AssemblyOptions,_$AssemblyOptions_179.validateParams=validateParams;var TransloaditAssemblyWatcher=function(e){var t,r;function n(t,r){var n;return(n=e.call(this)||this)._uppy=t,n._assemblyIDs=r,n._remaining=r.length,n.promise=new Promise(function(e,t){n._resolve=e,n._reject=t}),n._onAssemblyComplete=n._onAssemblyComplete.bind(___assertThisInitialized_180(n)),n._onAssemblyCancel=n._onAssemblyCancel.bind(___assertThisInitialized_180(n)),n._onAssemblyError=n._onAssemblyError.bind(___assertThisInitialized_180(n)),n._onImportError=n._onImportError.bind(___assertThisInitialized_180(n)),n._addListeners(),n}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var o=n.prototype;return o._watching=function(e){return-1!==this._assemblyIDs.indexOf(e)},o._onAssemblyComplete=function(e){this._watching(e.assembly_id)&&(this._uppy.log("[Transloadit] AssemblyWatcher: Got Assembly finish "+e.assembly_id),this.emit("assembly-complete",e.assembly_id),this._checkAllComplete())},o._onAssemblyCancel=function(e){this._watching(e.assembly_id)&&this._checkAllComplete()},o._onAssemblyError=function(e,t){this._watching(e.assembly_id)&&(this._uppy.log("[Transloadit] AssemblyWatcher: Got Assembly error "+e.assembly_id),this._uppy.log(t),this.emit("assembly-error",e.assembly_id,t),this._checkAllComplete())},o._onImportError=function(e,t,r){this._watching(e.assembly_id)&&this._onAssemblyError(e,r)},o._checkAllComplete=function(){this._remaining-=1,0===this._remaining&&(this._removeListeners(),this._resolve())},o._removeListeners=function(){this._uppy.off("transloadit:complete",this._onAssemblyComplete),this._uppy.off("transloadit:assembly-cancel",this._onAssemblyCancel),this._uppy.off("transloadit:assembly-error",this._onAssemblyError),this._uppy.off("transloadit:import-error",this._onImportError)},o._addListeners=function(){this._uppy.on("transloadit:complete",this._onAssemblyComplete),this._uppy.on("transloadit:assembly-cancel",this._onAssemblyCancel),this._uppy.on("transloadit:assembly-error",this._onAssemblyError),this._uppy.on("transloadit:import-error",this._onImportError)},n}(_$componentEmitter_11),_$TransloaditAssemblyWatcher_180=TransloaditAssemblyWatcher,_$Client_181=function(){function e(e){void 0===e&&(e={}),this.opts=e,this._reportError=this._reportError.bind(this)}var t=e.prototype;return t.createAssembly=function(e){var t=this,r=(e.templateId,e.params),n=e.fields,o=e.signature,i=e.expectedFiles,s=new FormData;s.append("params","string"==typeof r?r:JSON.stringify(r)),o&&s.append("signature",o),Object.keys(n).forEach(function(e){s.append(e,n[e])}),s.append("num_expected_upload_files",i);var a=this.opts.service+"/assemblies";return fetch(a,{method:"post",body:s}).then(function(e){return e.json()}).then(function(e){if(e.error){var t=new Error(e.error);throw t.message=e.error,t.details=e.reason,t}return e}).catch(function(e){return t._reportError(e,{url:a,type:"API_ERROR"})})},t.reserveFile=function(e,t){var r=this,n=encodeURIComponent(t.size),o=e.assembly_ssl_url+"/reserve_file?size="+n;return fetch(o,{method:"post"}).then(function(e){return e.json()}).catch(function(n){return r._reportError(n,{assembly:e,file:t,url:o,type:"API_ERROR"})})},t.addFile=function(e,t){var r=this;if(!t.uploadURL)return Promise.reject(new Error("File does not have an `uploadURL`."));var n=encodeURIComponent(t.size),o=encodeURIComponent(t.uploadURL),i="size="+n+"&filename="+encodeURIComponent(t.name)+"&fieldname=file&s3Url="+o,s=e.assembly_ssl_url+"/add_file?"+i;return fetch(s,{method:"post"}).then(function(e){return e.json()}).catch(function(n){return r._reportError(n,{assembly:e,file:t,url:s,type:"API_ERROR"})})},t.cancelAssembly=function(e){var t=this,r=e.assembly_ssl_url;return fetch(r,{method:"delete"}).then(function(e){return e.json()}).catch(function(e){return t._reportError(e,{url:r,type:"API_ERROR"})})},t.getAssemblyStatus=function(e){var t=this;return fetch(e).then(function(e){return e.json()}).catch(function(r){return t._reportError(r,{url:e,type:"STATUS_ERROR"})})},t.submitError=function(e,t){var r=t.endpoint,n=t.instance,o=t.assembly,i=e.details?e.message+" ("+e.details+")":e.message;return fetch("https://status.transloadit.com/client_error",{method:"post",body:JSON.stringify({endpoint:r,instance:n,assembly_id:o,agent:"undefined"!=typeof navigator?navigator.userAgent:"",error:i})}).then(function(e){return e.json()})},t._reportError=function(e,t){if(!1===this.opts.errorReporting)throw e;var r={type:t.type};throw t.assembly&&(r.assembly=t.assembly.assembly_id,r.instance=t.assembly.instance),t.url&&(r.endpoint=t.url),this.submitError(e,r).catch(function(e){}),e},e}(),_$package_184={version:"1.2.0"},_$storage_77={};Object.defineProperty(_$storage_77,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;rthis._bufferOffset&&(this._buffer=this._buffer.slice(e-this._bufferOffset),this._bufferOffset=e);var r=0===__len_76(this._buffer);return this._done&&r?null:this._buffer.slice(0,t-e)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}]),e}();function __len_76(e){return void 0===e?0:void 0!==e.size?e.size:e.length}var _$error_79={};Object.defineProperty(_$error_79,"__esModule",{value:!0});var DetailedError=function(e){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(e,r){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e.message));o.originalRequest=n,o.causingError=r;var i=e.message;return null!=r&&(i+=", caused by "+r.toString()),null!=n&&(i+=", originated from request (response code: "+n.status+", response text: "+n.responseText+")"),o.message=i,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Error),t}();_$error_79.default=DetailedError;var _$fingerprint_80={};Object.defineProperty(_$fingerprint_80,"__esModule",{value:!0}),_$fingerprint_80.default=function(e,t){return ___isReactNative2_80.default?function(e,t){var r=e.exif?function(e){var t=0;if(0===e.length)return t;for(var r=0;r>>6)+fromCharCode(128|63&t):fromCharCode(224|t>>>12&15)+fromCharCode(128|t>>>6&63)+fromCharCode(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return fromCharCode(240|t>>>18&7)+fromCharCode(128|t>>>12&63)+fromCharCode(128|t>>>6&63)+fromCharCode(128|63&t)},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(e){return e.replace(re_utob,cb_utob)},cb_encode=function(e){var t=[0,2,1][e.length%3],r=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[b64chars.charAt(r>>>18),b64chars.charAt(r>>>12&63),t>=2?"=":b64chars.charAt(r>>>6&63),t>=1?"=":b64chars.charAt(63&r)].join("")},btoa=global.btoa?function(e){return global.btoa(e)}:function(e){return e.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(e){return(e.constructor===buffer.constructor?e:buffer.from(e)).toString("base64")}:function(e){return(e.constructor===buffer.constructor?e:new buffer(e)).toString("base64")}:function(e){return btoa(utob(e))},encode=function(e,t){return t?_encode(String(e)).replace(/[+\/]/g,function(e){return"+"==e?"-":"_"}).replace(/=/g,""):_encode(String(e))},encodeURI=function(e){return encode(e,!0)},re_btou=new RegExp(["[\xc0-\xdf][\x80-\xbf]","[\xe0-\xef][\x80-\xbf]{2}","[\xf0-\xf7][\x80-\xbf]{3}"].join("|"),"g"),cb_btou=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return fromCharCode(55296+(t>>>10))+fromCharCode(56320+(1023&t));case 3:return fromCharCode((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return fromCharCode((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},btou=function(e){return e.replace(re_btou,cb_btou)},cb_decode=function(e){var t=e.length,r=t%4,n=(t>0?b64tab[e.charAt(0)]<<18:0)|(t>1?b64tab[e.charAt(1)]<<12:0)|(t>2?b64tab[e.charAt(2)]<<6:0)|(t>3?b64tab[e.charAt(3)]:0),o=[fromCharCode(n>>>16),fromCharCode(n>>>8&255),fromCharCode(255&n)];return o.length-=[0,0,2,1][r],o.join("")},_atob=global.atob?function(e){return global.atob(e)}:function(e){return e.replace(/\S{1,4}/g,cb_decode)},atob=function(e){return _atob(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(e){return(e.constructor===buffer.constructor?e:buffer.from(e,"base64")).toString()}:function(e){return(e.constructor===buffer.constructor?e:new buffer(e,"base64")).toString()}:function(e){return btou(_atob(e))},decode=function(e){return _decode(String(e).replace(/[-_]/g,function(e){return"-"==e?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var e=global.Base64;return global.Base64=_Base64,e};if(global.Base64={VERSION:version,atob:atob,btoa:btoa,fromBase64:decode,toBase64:encode,utob:utob,encode:encode,encodeURI:encodeURI,btou:btou,decode:decode,noConflict:noConflict,__buffer__:buffer},"function"==typeof Object.defineProperty){var noEnum=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum(function(){return decode(this)})),Object.defineProperty(String.prototype,"toBase64",noEnum(function(e){return encode(this,e)})),Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,!0)}))}}return global.Meteor&&(Base64=global.Base64),_$base64_83.exports?_$base64_83.exports.Base64=global.Base64:"function"==typeof define&&define.amd&&define([],function(){return global.Base64}),{Base64:global.Base64}})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),_$base64_83=_$base64_83.exports;var _$upload_82={};Object.defineProperty(_$upload_82,"__esModule",{value:!0});var ___createClass_82=function(){function e(e,t){for(var r=0;rt._offsetBeforeRetry&&(t._retryAttempt=0);var r=!0;"undefined"!=typeof window&&"navigator"in window&&!1===window.navigator.onLine&&(r=!1);var i=e.originalRequest?e.originalRequest.status:0,s=!inStatusCategory(i,400)||409===i||423===i;if(t._retryAttemptthis._size)&&!this.options.uploadLengthDeferred&&(n=this._size),this._source.slice(r,n,function(r,n,o){r?e._emitError(r):(e.options.uploadLengthDeferred&&o&&(e._size=e._offset+(n&&n.size?n.size:0),t.setRequestHeader("Upload-Length",e._size)),null===n?t.send():(t.send(n),e._emitProgress(e._offset,e._size)))})}}}]),e}();function inStatusCategory(e,t){return e>=t&&e0?(e.uppy.info(n+"...","warning",800),n--):(clearInterval(o),e.uppy.info(e.i18n("smile"),"success",1500),setTimeout(function(){return t()},1500))},1e3)})},o.takeSnapshot=function(){var e=this;this.captureInProgress||(this.captureInProgress=!0,this.opts.onBeforeSnapshot().catch(function(t){var r="object"==typeof t?t.message:t;return e.uppy.info(r,"error",5e3),Promise.reject(new Error("onBeforeSnapshot: "+r))}).then(function(){return e.getImage()}).then(function(t){e.captureInProgress=!1;try{e.uppy.addFile(t)}catch(t){t.isRestriction||e.uppy.log(t)}},function(t){throw e.captureInProgress=!1,t}))},o.getImage=function(){var e=this,t=this.getVideoElement();if(!t)return Promise.reject(new Error("No video element found, likely due to the Webcam tab being closed."));var r="cam-"+Date.now()+".jpg",n=t.videoWidth,o=t.videoHeight,i=document.createElement("canvas");return i.width=n,i.height=o,i.getContext("2d").drawImage(t,0,0),_$canvasToBlob_193(i,"image/jpeg").then(function(t){return{source:e.id,name:r,data:new Blob([t],{type:"image/jpeg"}),type:"image/jpeg"}})},o.getVideo=function(){var e=this.recordingChunks[0].type,t=_$getFileTypeExtension_205(e);if(!t)return Promise.reject(new Error('Could not retrieve recording: Unsupported media type "'+e+'"'));var r="webcam-"+Date.now()+"."+t,n=new Blob(this.recordingChunks,{type:e}),o={source:this.id,name:r,data:new Blob([n],{type:e}),type:e};return Promise.resolve(o)},o.focus=function(){var e=this;this.opts.countdown&&setTimeout(function(){e.uppy.info(e.i18n("smile"),"success",1500)},1e3)},o.render=function(e){this.webcamActive||this.start();var t=this.getPluginState();return t.cameraReady?__h_226(_$CameraScreen_222,___extends_226({},t,{onSnapshot:this.takeSnapshot,onStartRecording:this.startRecording,onStopRecording:this.stopRecording,onFocus:this.focus,onStop:this.stop,i18n:this.i18n,modes:this.opts.modes,supportsRecording:_$supportsMediaRecorder_227(),recording:t.isRecording,mirror:this.opts.mirror,src:this.stream})):__h_226(_$PermissionsScreen_223,{icon:_$CameraIcon_221,i18n:this.i18n})},o.install=function(){this.setPluginState({cameraReady:!1});var e=this.opts.target;e&&this.mount(e,this)},o.uninstall=function(){this.stream&&this.stop(),this.unmount()},n}(__Plugin_226),___class_226.VERSION=_$package_228.version,___temp_226),_$uppy_232={};_$uppy_232.Core=_$lib_101,_$uppy_232.debugLogger=_$uppy_232.Core.debugLogger,_$uppy_232.server=_$lib_97,_$uppy_232.views={ProviderView:_$lib_163},_$uppy_232.DefaultStore=_$lib_171,_$uppy_232.ReduxStore=_$lib_173,_$uppy_232.Dashboard=_$lib_120,_$uppy_232.DragDrop=_$lib_130,_$uppy_232.FileInput=_$lib_134,_$uppy_232.Informer=_$lib_146,_$uppy_232.ProgressBar=_$lib_150,_$uppy_232.StatusBar=_$lib_169,_$uppy_232.Dropbox=_$lib_132,_$uppy_232.GoogleDrive=_$lib_144,_$uppy_232.Instagram=_$lib_148,_$uppy_232.Url=_$lib_188,_$uppy_232.Webcam=_$lib_226,_$uppy_232.AwsS3=_$lib_91,_$uppy_232.AwsS3Multipart=_$lib_89,_$uppy_232.Transloadit=_$lib_182,_$uppy_232.Tus=_$lib_185,_$uppy_232.XHRUpload=_$lib_229,_$uppy_232.Form=_$lib_136,_$uppy_232.GoldenRetriever=_$lib_141,_$uppy_232.ReduxDevTools=_$lib_165,_$uppy_232.ThumbnailGenerator=_$lib_176,_$uppy_232.locales={};var _$bundle_231={};return _$bundle_231=_$uppy_232,_$bundle_231}); -//# sourceMappingURL=uppy.min.js.map \ No newline at end of file -- cgit v1.2.3