diff --git a/core/Api/FileAPI.class.php b/core/Api/FileAPI.class.php index cf668b7..5c3259c 100644 --- a/core/Api/FileAPI.class.php +++ b/core/Api/FileAPI.class.php @@ -4,8 +4,11 @@ namespace Api { use Driver\SQL\Condition\Compare; use Driver\SQL\Condition\CondIn; - use Driver\SQL\Query\Query; + use Driver\Sql\Condition\CondNull; use Driver\SQL\SQL; + use External\ZipStream\BufferWriter; + use External\ZipStream\File; + use External\ZipStream\ZipStream; abstract class FileAPI extends Request { @@ -65,6 +68,27 @@ namespace Api { } } + protected function downloadZip($files) { + if ($files == null || empty($files) || !is_array($files)) { + return $this->createError("No files to download"); + } + + header('Content-Disposition: attachment; filename="files.zip"'); + header('Content-Type: application/zip'); + $writer = new BufferWriter(); + $writer->registerCallback(function ($w) { echo $w->read(); }); + $zipStream = new ZipStream($writer); + + foreach ($files as $file) { + $f = new File($file["name"]); + $f->loadFromFile($file["path"]); + $zipStream->saveFile($f); + } + + $zipStream->close(); + exit; + } + protected function &findDirectory(&$files, $id) { if ($id !== null) { @@ -123,7 +147,7 @@ namespace Api { $query->innerJoin("UserFileTokenFile", "UserFile.uid", "file_id") ->innerJoin("UserFileToken", "UserFileToken.uid", "token_id") ->where(new Compare("token", $token)) - ->where(new Compare("valid_until", $sql->now(), ">=")); + ->where(new CondNull("valid_until"), new Compare("valid_until", $sql->now(), ">=")); } } } @@ -137,6 +161,7 @@ namespace Api\File { use Api\Parameter\StringType; use Driver\SQL\Condition\Compare; use Driver\SQL\Condition\CondIn; + use Driver\Sql\Condition\CondNull; use Objects\User; class ValidateToken extends FileAPI { @@ -161,7 +186,7 @@ namespace Api\File { ->leftJoin("UserFileTokenFile", "UserFileToken.uid", "token_id") ->leftJoin("UserFile", "UserFile.uid", "file_id") ->where(new Compare("token", $token)) - ->where(new Compare("valid_until", $sql->now(), ">")) + ->where(new CondNull("valid_until"), new Compare("valid_until", $sql->now(), ">=")) ->execute(); $this->success = ($res !== false); @@ -420,7 +445,7 @@ namespace Api\File { $res = $sql->select("uid", "token_type", "maxFiles", "maxSize", "extensions", "user_id") ->from("UserFileToken") ->where(new Compare("token", $token)) - ->where(new Compare("valid_until", $sql->now(), ">=")) + ->where(new CondNull("valid_until"), new Compare("valid_until", $sql->now(), ">=")) ->limit(1) ->execute(); @@ -550,8 +575,8 @@ namespace Api\File { } $sql = $this->user->getSQL(); - $fileIds = $this->getParam("id"); - $query = $sql->select("UserFile.uid", "path", "name")->from("UserFile"); + $fileIds = array_unique($this->getParam("id")); + $query = $sql->select("UserFile.uid", "path", "name", "directory")->from("UserFile"); $this->filterFiles($sql, $query, $fileIds, $token); $res = $query->execute(); @@ -559,20 +584,33 @@ namespace Api\File { $this->lastError = $sql->getLastError(); if ($this->success) { - if (empty($res)) { - if (is_null($token)) { - return $this->createError("File not found"); - } else { - return $this->createError("Permission denied (token)"); + $foundFiles = array(); + foreach ($res as $row) { + $foundFiles[$row["uid"]] = $row; + } + + $filesToDownload = array(); + foreach ($fileIds as $fileId) { + if (!array_key_exists($fileId, $foundFiles)) { + if (is_null($token)) { + return $this->createError("File not found: $fileId"); + } else { + return $this->createError("Permission denied (token)"); + } + } else if (!$foundFiles[$fileId]["directory"]) { + $filesToDownload[] = $foundFiles[$fileId]; } + } + + if (empty($filesToDownload)) { + return $this->createError("No file selected"); + } else if (count($filesToDownload) === 1) { + $file = array_shift($filesToDownload); + $path = $file["path"]; + $name = $file["name"]; + $this->downloadFile($name, $path); } else { - if ($res[0]["directory"]) { - return $this->createError("Cannot download directory (yet)"); - } else { - $path = $res[0]["path"]; - $name = $res[0]["name"]; - $this->downloadFile($name, $path); - } + $this->downloadZip($filesToDownload); } } @@ -680,8 +718,7 @@ namespace Api\File { $sql = $this->user->getSQL(); $token = generateRandomString(36); - $validUntil = (new \DateTime())->modify("+$durability MINUTES"); - + $validUntil = $durability == 0 ? null : (new \DateTime())->modify("+$durability MINUTES"); $res = $sql->insert("UserFileToken", array("token", "token_type", "maxSize", "maxFiles", "extensions", "valid_until", "user_id")) ->addRow($token, "upload", $maxSize, $maxFiles, $extensions, $validUntil, $this->user->getId()) @@ -758,7 +795,7 @@ namespace Api\File { // Insert $token = generateRandomString(36); - $validUntil = (new \DateTime())->modify("+$durability MINUTES"); + $validUntil = $durability == 0 ? null : (new \DateTime())->modify("+$durability MINUTES"); $res = $sql->insert("UserFileToken", array("token_type", "valid_until", "user_id", "token")) ->addRow("download", $validUntil, $this->user->getId(), $token) ->returning("uid") diff --git a/core/Api/Request.class.php b/core/Api/Request.class.php index 9a6e18f..7576df4 100644 --- a/core/Api/Request.class.php +++ b/core/Api/Request.class.php @@ -50,7 +50,7 @@ class Request { foreach($this->params as $name => $param) { $value = $values[$name] ?? NULL; - $isEmpty = (is_string($value) || is_array($value)) && empty($value); + $isEmpty = (is_string($value) && strlen($value) === 0) || (is_array($value) && empty($value)); if(!$param->optional && (is_null($value) || $isEmpty)) { return $this->createError("Missing parameter: $name"); } diff --git a/core/Driver/SQL/Condition/CondNull.class.php b/core/Driver/SQL/Condition/CondNull.class.php new file mode 100644 index 0000000..beea591 --- /dev/null +++ b/core/Driver/SQL/Condition/CondNull.class.php @@ -0,0 +1,16 @@ +column = $col; + } + + public function getColumn() { return $this->column; } +} \ No newline at end of file diff --git a/core/Driver/SQL/SQL.class.php b/core/Driver/SQL/SQL.class.php index ef92568..ba0ffaa 100644 --- a/core/Driver/SQL/SQL.class.php +++ b/core/Driver/SQL/SQL.class.php @@ -9,6 +9,7 @@ use Driver\SQL\Condition\CondIn; use Driver\SQL\Condition\Condition; use Driver\SQL\Condition\CondKeyword; use Driver\SQL\Condition\CondNot; +use Driver\Sql\Condition\CondNull; use Driver\SQL\Condition\CondOr; use Driver\SQL\Constraint\Constraint; use \Driver\SQL\Constraint\Unique; @@ -398,6 +399,8 @@ abstract class SQL { } return "NOT $expression"; + } else if($condition instanceof CondNull) { + return $this->columnName($condition->getColumn()) . " IS NULL"; } else { $this->lastError = "Unsupported condition type: " . get_class($condition); return false; diff --git a/core/External/ZipStream/BufferWriter.php b/core/External/ZipStream/BufferWriter.php new file mode 100644 index 0000000..1b6ff58 --- /dev/null +++ b/core/External/ZipStream/BufferWriter.php @@ -0,0 +1,62 @@ +callback = $callback; + } + + public function write($data) { + $this->offset += strlen($data); + $this->stream .= $data; + if ($this->callback !== null) { + call_user_func($this->callback, $this); + } + return strlen($data); + } + + public function read() { + $data = $this->stream; + $this->stream = ''; + return $data; + } + + public function offset() { + return $this->offset; + } + + public function close() { + if ($this->callback !== null) { + call_user_func($this->callback, $this); + } + } + } +} \ No newline at end of file diff --git a/core/External/ZipStream/File.php b/core/External/ZipStream/File.php new file mode 100644 index 0000000..3aa22a6 --- /dev/null +++ b/core/External/ZipStream/File.php @@ -0,0 +1,207 @@ +name = $name; + $this->lastModificationTimestamp = time(); + $this->crc32 = hash('crc32b', '', true); + $this->compressedSize = 0; + + $this->bitField = 0; + $this->bitField |= self::BIT_NO_SIZE_IN_HEADER; + $this->bitField |= self::BIT_UTF8_NAMES; + + $this->deflateState = deflate_init(ZLIB_ENCODING_RAW, ['level' => 9]); + } + + public function setContent($content) { + $this->crc32 = hash('crc32b', $content, true); + $this->sha256 = hash('sha256', $content); + $this->content = $content; + $this->fileSize = strlen($content); + $this->fileHandle = false; + } + + public function loadFromFile($filename) { + $this->crc32 = hash_file('crc32b', $filename, true); + $this->sha256 = hash_file('sha256', $filename); + $this->fileSize = filesize($filename); + $this->fileHandle = fopen($filename, 'rb'); + } + + public function name() { + return $this->name; + } + + public function sha256() { + return $this->sha256; + } + + private function unixTimeToDosTime($timestamp) { + $hour = intval(date('H', $timestamp)); + $min = intval(date('i', $timestamp)); + $sec = intval(date('s', $timestamp)); + return ($hour << 11) | + ($min << 5) | + ($sec >> 1); + } + + private function unixTimeToDosDate($timestamp) { + $year = intval(date('Y', $timestamp)); + $month = intval(date('m', $timestamp)); + $day = intval(date('d', $timestamp)); + return (($year - 1980) << 9) | + ($month << 5) | + ($day); + } + + public function readLocalFileHeader() { + if (!$this->useCompression) { + $this->compressedSize = $this->fileSize; + } + + $header = ""; + $header .= "\x50\x4b\x03\x04"; + $header .= "\x14\x00"; //version 2.0 and MS-DOS compatible + $header .= pack("v", $this->bitField); //general purpose bit flag + if ($this->useCompression) { + $header .= "\x08\x00"; //compression Method - deflate + } else { + $header .= "\x00\x00"; //compression Method - no + } + $header .= pack("v", $this->unixTimeToDosTime($this->lastModificationTimestamp)); //dos time + $header .= pack("v", $this->unixTimeToDosDate($this->lastModificationTimestamp)); //dos date + if ($this->bitField & self::BIT_NO_SIZE_IN_HEADER) { + $header .= pack("V", 0); //crc32 + $header .= pack("V", 0); //compressed Size + $header .= pack("V", 0); //uncompressed Size + } else { + $header .= strrev($this->crc32); + $header .= pack("V", $this->compressedSize); //compressed Size + $header .= pack("V", $this->fileSize); //uncompressed Size + } + $header .= pack("v", strlen($this->name)); //filename + $header .= "\x00\x00"; //extra field length + $header .= $this->name; + + return $header; + } + + public function readDataDescriptor() { + $data = ""; + $data .= "\x50\x4b\x07\x08"; + $data .= strrev($this->crc32); + $data .= pack("V", $this->compressedSize); //compressed Size + $data .= pack("V", $this->fileSize); //uncompressed Size + return $data; + } + + public function readFileDataImp() { + $ret = null; + if ($this->fileHandle !== false) { + $block = fread($this->fileHandle, 65536); + if (!empty($block)) { + $ret = $block; + } + } else { + $ret = $this->content; + $this->content = null; + } + return $ret; + } + + public function readFileData() { + $ret = null; + if ($this->useCompression) { + $block = $this->readFileDataImp(); + if ($this->deflateState !== null) { + if ($block !== null) { + $ret = deflate_add($this->deflateState, $block, ZLIB_NO_FLUSH); + } else { + $ret = deflate_add($this->deflateState, '', ZLIB_FINISH); + $this->deflateState = null; + } + } + if ($ret !== null) { + $this->compressedSize += strlen($ret); + } + } else { + $ret = $this->readFileDataImp(); + } + return $ret; + } + + public function setOffset($offset) { + $this->offset = $offset; + } + + public function readCentralDirectoryHeader() { + $header = ""; + $header .= "\x50\x4b\x01\x02"; + $header .= "\x14\x00"; //version 2.0 and MS-DOS compatible + $header .= "\x14\x00"; //version 2.0 and MS-DOS compatible + $header .= pack("v", $this->bitField); //general purpose bit flag + $header .= "\x00\x00"; //compression Method - no + $header .= pack("v", $this->unixTimeToDosTime($this->lastModificationTimestamp)); //dos time + $header .= pack("v", $this->unixTimeToDosDate($this->lastModificationTimestamp)); //dos date + $header .= strrev($this->crc32); + $header .= pack("V", $this->compressedSize); //compressed Size + $header .= pack("V", $this->fileSize); //uncompressed Size + $header .= pack("v", strlen($this->name)); //filename + $header .= "\x00\x00"; //extra field length + $header .= "\x00\x00"; //comment length + $header .= "\x00\x00"; //disk num start + $header .= "\x00\x00"; //int file attr + $header .= "\x00\x00\x00\x00"; //ext file attr + $header .= pack("V", $this->offset); //relative offset + $header .= $this->name; + + return $header; + } + + public function closeHandle() { + if ($this->fileHandle) { + fclose($this->fileHandle); + } + } + } +} \ No newline at end of file diff --git a/core/External/ZipStream/FileWriter.php b/core/External/ZipStream/FileWriter.php new file mode 100644 index 0000000..5e83578 --- /dev/null +++ b/core/External/ZipStream/FileWriter.php @@ -0,0 +1,63 @@ +open($filename); + } + } + + public function __destruct() { + $this->close(); + } + + public function open($filename) { + $this->close(); + $this->fileHandle = fopen($filename, 'wb'); + } + + public function write($data) { + $this->offset += strlen($data); + if ($this->fileHandle === false) { + throw new \Exception('No file opened.'); + } else { + return fwrite($this->fileHandle, $data); + } + } + + public function offset() { + return $this->offset; + } + + public function close() { + if ($this->fileHandle !== false) { + fclose($this->fileHandle); + } + $this->fileHandle = false; + } + } +} \ No newline at end of file diff --git a/core/External/ZipStream/Writer.php b/core/External/ZipStream/Writer.php new file mode 100644 index 0000000..33f64a8 --- /dev/null +++ b/core/External/ZipStream/Writer.php @@ -0,0 +1,29 @@ +writer = $writer; + } + + public function saveFile($file) { + $isSymlink = false; //currently not used + foreach ($this->files as $f) { + if ($f->name() == $file->name()) { + return false; + } + if ($f->sha256() == $file->sha256()) { + $isSymlink = true; + } + } + $file->setOffset($this->writer->offset()); + $this->writer->write($file->readLocalFileHeader()); + while (($buffer = $file->readFileData()) !== null) { + $this->writer->write($buffer); + } + $this->writer->write($file->readDataDescriptor()); + $this->files[] = $file; + $file->closeHandle(); + return true; + } + + public function close() { + $size = 0; + $offset = $this->writer->offset(); + foreach ($this->files as $file) { + $size += $this->writer->write($file->readCentralDirectoryHeader()); + } + + $data = ""; + $data .= "\x50\x4b\x05\x06"; + $data .= "\x00\x00"; //number of disks + $data .= "\x00\x00"; //number of the disk with the start of the central directory + $data .= pack("v", count($this->files)); //total number of entries in the central directory on this disk + $data .= pack("v", count($this->files)); //total number of entries in the central directory + $data .= pack("V", $size); //size of the central directory + $data .= pack("V", $offset); //offset of start of central directory with respect to the starting disk number + $data .= "\x0\x0"; //comment length + $this->writer->write($data); + } + } +} \ No newline at end of file diff --git a/fileControlPanel/package-lock.json b/fileControlPanel/package-lock.json index 13c807f..9369251 100644 --- a/fileControlPanel/package-lock.json +++ b/fileControlPanel/package-lock.json @@ -7751,6 +7751,11 @@ "object.assign": "^4.1.0" } }, + "keymaster": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/keymaster/-/keymaster-1.6.2.tgz", + "integrity": "sha1-4a5U0OqUiPn2C2a2aPAumhlGxus=" + }, "killable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", diff --git a/fileControlPanel/src/elements/file-browser.js b/fileControlPanel/src/elements/file-browser.js index f53ac0b..929748c 100644 --- a/fileControlPanel/src/elements/file-browser.js +++ b/fileControlPanel/src/elements/file-browser.js @@ -285,7 +285,8 @@ export class FileBrowser extends React.Component {
- @@ -305,7 +306,7 @@ export class FileBrowser extends React.Component { Upload @@ -354,14 +355,16 @@ export class FileBrowser extends React.Component { } deleteFiles(selectedIds) { - let token = (this.state.api.loggedIn ? null : this.state.token.value); - this.state.api.delete(selectedIds, token).then((res) => { - if (res.success) { - this.fetchFiles(); - } else { - this.pushAlert(res); - } - }); + if (selectedIds && selectedIds.length > 0) { + let token = (this.state.api.loggedIn ? null : this.state.token.value); + this.state.api.delete(selectedIds, token).then((res) => { + if (res.success) { + this.fetchFiles(); + } else { + this.pushAlert(res); + } + }); + } } onUpload() { @@ -375,4 +378,31 @@ export class FileBrowser extends React.Component { } }); } + + onDownload(selectedIds) { + if (selectedIds && selectedIds.length > 0) { + let token = (this.state.api.loggedIn ? "" : "&token=" + this.state.token.value); + let ids = selectedIds.map(id => "id[]=" + id).join("&"); + let downloadUrl = "/api/file/download?" + ids + token; + fetch(downloadUrl) + .then(response => { + let header = response.headers.get("Content-Disposition") || ""; + let fileNameFields = header.split(";").filter(c => c.trim().toLowerCase().startsWith("filename=")); + let fileName = null; + if (fileNameFields.length > 0) { + fileName = fileNameFields[0].trim().substr("filename=".length); + } else { + fileName = null; + } + + response.blob().then(blob => { + let url = window.URL.createObjectURL(blob); + let a = document.createElement('a'); + a.href = url; + if (fileName !== null) a.download = fileName; + a.click(); + }); + }); + } + } } \ No newline at end of file diff --git a/fileControlPanel/src/elements/popup.js b/fileControlPanel/src/elements/popup.js new file mode 100644 index 0000000..63f95bc --- /dev/null +++ b/fileControlPanel/src/elements/popup.js @@ -0,0 +1,37 @@ +import React from 'react'; + +class Popup extends React.Component { + + constructor(props) { + super(props); + this.state = { + title: props.title || "Title", + content: props.content || "Content", + buttons: props.buttons || ["Ok", "Cancel"] + } + } + + + render() { + return
+
+
+
+
{this.state.title}
+ +
+
+

Modal body text goes here.

+
+
+ + +
+
+
+
; + } + +} \ No newline at end of file diff --git a/fileControlPanel/src/elements/token-list.js b/fileControlPanel/src/elements/token-list.js index e5e15c6..7ee8fb2 100644 --- a/fileControlPanel/src/elements/token-list.js +++ b/fileControlPanel/src/elements/token-list.js @@ -1,6 +1,7 @@ import * as React from "react"; import Icon from "./icon"; import moment from "moment"; +import Popup from "react-popup"; export class TokenList extends React.Component { @@ -23,12 +24,15 @@ export class TokenList extends React.Component { }); } else { for (const token of this.state.tokens) { - const revoked = moment(token.valid_until).isSameOrBefore(new Date()); + const validUntil = token.valid_until; + const revoked = validUntil !== null && moment(validUntil).isSameOrBefore(new Date()); + const timeStr = (validUntil === null ? "Forever" : moment(validUntil).format("Do MMM YYYY, HH:mm")); + rows.push( {token.token} {token.type} - {moment(token.valid_until).format("Do MMM YYYY, HH:mm")} + {timeStr} (revoked ? null : this.onRevokeToken(token.token) )} @@ -65,7 +69,7 @@ export class TokenList extends React.Component {
- @@ -94,4 +98,8 @@ export class TokenList extends React.Component { } }); } + + onCreateToken() { + Popup.alert('I am alert, nice to meet you'); + } } \ No newline at end of file diff --git a/fileControlPanel/src/index.js b/fileControlPanel/src/index.js index d2c3444..de5d910 100644 --- a/fileControlPanel/src/index.js +++ b/fileControlPanel/src/index.js @@ -86,15 +86,17 @@ class FileControlPanel extends React.Component {
: <>; - return
-
-
-

File Control Panel

- + return <> +
+
+
+

File Control Panel

+ +
+ { tokenList }
- { tokenList } -
; + ; } else { return
diff --git a/js/files.min.js b/js/files.min.js index 9a2eccf..c02ea9f 100644 --- a/js/files.min.js +++ b/js/files.min.js @@ -299,4 +299,4 @@ e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var r,a,i,o,s;if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,l=null,d=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(d,0),e}},c=Date.now();t.unstable_now=function(){return Date.now()-c},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(d,0))},a=function(e,t){l=setTimeout(e,t)},i=function(){clearTimeout(l)},o=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,_=window.Date,m=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var p=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof p&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var y=_.now();t.unstable_now=function(){return _.now()-y}}var M=!1,v=null,g=-1,L=5,k=0;o=function(){return t.unstable_now()>=k},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,a=e[r];if(!(void 0!==a&&0S(o,n))void 0!==u&&0>S(u,o)?(e[r]=u,e[s]=n,r=s):(e[r]=o,e[i]=n,r=i);else{if(!(void 0!==u&&0>S(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function S(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var x=[],j=[],E=1,H=null,O=3,P=!1,F=!1,A=!1;function N(e){for(var t=T(j);null!==t;){if(null===t.callback)D(j);else{if(!(t.startTime<=e))break;D(j),t.sortIndex=t.expirationTime,w(x,t)}t=T(j)}}function C(e){if(A=!1,N(e),!F)if(null!==T(x))F=!0,r(W);else{var t=T(j);null!==t&&a(C,t.startTime-e)}}function W(e,n){F=!1,A&&(A=!1,i()),P=!0;var r=O;try{for(N(n),H=T(x);null!==H&&(!(H.expirationTime>n)||e&&!o());){var s=H.callback;if(null!==s){H.callback=null,O=H.priorityLevel;var u=s(H.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?H.callback=u:H===T(x)&&D(x),N(n)}else D(x);H=T(x)}if(null!==H)var l=!0;else{var d=T(j);null!==d&&a(C,d.startTime-n),l=!1}return l}finally{H=null,O=r,P=!1}}function z(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var R=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){F||P||(F=!0,r(W))},t.unstable_getCurrentPriorityLevel=function(){return O},t.unstable_getFirstCallbackNode=function(){return T(x)},t.unstable_next=function(e){switch(O){case 1:case 2:case 3:var t=3;break;default:t=O}var n=O;O=t;try{return e()}finally{O=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=R,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=O;O=e;try{return t()}finally{O=n}},t.unstable_scheduleCallback=function(e,n,o){var s=t.unstable_now();if("object"==typeof o&&null!==o){var u=o.delay;u="number"==typeof u&&0s?(e.sortIndex=u,w(j,e),null===T(x)&&e===T(j)&&(A?i():A=!0,a(C,u-s))):(e.sortIndex=o,w(x,e),F||P||(F=!0,r(W))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();N(e);var n=T(x);return n!==H&&null!==H&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTimea;)K(e,n=r[a++],t[n]);return e},Q=function(e){var t=C.call(this,e=k(e,!0));return!(this===I&&a(z,e)&&!a(R,e))&&(!(t||!a(this,e)||!a(z,e)||a(this,A)&&this[A][e])||t)},Z=function(e,t){if(e=L(e),t=k(t,!0),e!==I||!a(z,t)||a(R,t)){var n=j(e,t);return!n||!a(z,t)||a(e,A)&&e[A][t]||(n.enumerable=!0),n}},X=function(e){for(var t,n=H(L(e)),r=[],i=0;n.length>i;)a(z,t=n[i++])||t==A||t==u||r.push(t);return r},ee=function(e){for(var t,n=e===I,r=H(n?R:L(e)),i=[],o=0;r.length>o;)!a(z,t=r[o++])||n&&!a(I,t)||i.push(z[t]);return i};U||(s((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===I&&t.call(R,n),a(this,A)&&a(this[A],e)&&(this[A][e]=!1),G(this,e,Y(1,n))};return i&&V&&G(I,e,{configurable:!0,set:t}),B(e)}).prototype,"toString",(function(){return this._k})),T.f=Z,S.f=K,n(40).f=w.f=X,n(52).f=Q,D.f=ee,i&&!n(32)&&s(I,"propertyIsEnumerable",Q,!0),m.f=function(e){return B(_(e))}),o(o.G+o.W+o.F*!U,{Symbol:O});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)_(te[ne++]);for(var re=x(_.store),ae=0;re.length>ae;)h(re[ae++]);o(o.S+o.F*!U,"Symbol",{for:function(e){return a(W,e+="")?W[e]:W[e]=O(e)},keyFor:function(e){if(!$(e))throw TypeError(e+" is not a symbol!");for(var t in W)if(W[t]===e)return t},useSetter:function(){V=!0},useSimple:function(){V=!1}}),o(o.S+o.F*!U,"Object",{create:function(e,t){return void 0===t?b(e):q(b(e),t)},defineProperty:K,defineProperties:q,getOwnPropertyDescriptor:Z,getOwnPropertyNames:X,getOwnPropertySymbols:ee});var ie=l((function(){D.f(1)}));o(o.S+o.F*ie,"Object",{getOwnPropertySymbols:function(e){return D.f(g(e))}}),P&&o(o.S+o.F*(!U||l((function(){var e=O();return"[null]"!=F([e])||"{}"!=F({a:e})||"{}"!=F(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],a=1;arguments.length>a;)r.push(arguments[a++]);if(n=t=r[1],(v(t)||void 0!==e)&&!$(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!$(t))return t}),r[1]=t,F.apply(P,r)}}),O.prototype[N]||n(14)(O.prototype,N,O.prototype.valueOf),c(O,"Symbol"),c(Math,"Math",!0),c(r.JSON,"JSON",!0)},function(e,t,n){e.exports=n(50)("native-function-to-string",Function.toString)},function(e,t,n){var r=n(37),a=n(56),i=n(52);e.exports=function(e){var t=r(e),n=a.f;if(n)for(var o,s=n(e),u=i.f,l=0;s.length>l;)u.call(e,o=s[l++])&&t.push(o);return t}},function(e,t,n){var r=n(2);r(r.S,"Object",{create:n(39)})},function(e,t,n){var r=n(2);r(r.S+r.F*!n(10),"Object",{defineProperty:n(11).f})},function(e,t,n){var r=n(2);r(r.S+r.F*!n(10),"Object",{defineProperties:n(101)})},function(e,t,n){var r=n(18),a=n(19).f;n(28)("getOwnPropertyDescriptor",(function(){return function(e,t){return a(r(e),t)}}))},function(e,t,n){var r=n(12),a=n(20);n(28)("getPrototypeOf",(function(){return function(e){return a(r(e))}}))},function(e,t,n){var r=n(12),a=n(37);n(28)("keys",(function(){return function(e){return a(r(e))}}))},function(e,t,n){n(28)("getOwnPropertyNames",(function(){return n(102).f}))},function(e,t,n){var r=n(6),a=n(33).onFreeze;n(28)("freeze",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(6),a=n(33).onFreeze;n(28)("seal",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(6),a=n(33).onFreeze;n(28)("preventExtensions",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(6);n(28)("isFrozen",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(6);n(28)("isSealed",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(6);n(28)("isExtensible",(function(e){return function(t){return!!r(t)&&(!e||e(t))}}))},function(e,t,n){var r=n(2);r(r.S+r.F,"Object",{assign:n(103)})},function(e,t,n){var r=n(2);r(r.S,"Object",{is:n(104)})},function(e,t,n){var r=n(2);r(r.S,"Object",{setPrototypeOf:n(74).set})},function(e,t,n){"use strict";var r=n(47),a={};a[n(7)("toStringTag")]="z",a+""!="[object z]"&&n(15)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(e,t,n){var r=n(2);r(r.P,"Function",{bind:n(105)})},function(e,t,n){var r=n(11).f,a=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in a||n(10)&&r(a,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(6),a=n(20),i=n(7)("hasInstance"),o=Function.prototype;i in o||n(11).f(o,i,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=a(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(2),a=n(107);r(r.G+r.F*(parseInt!=a),{parseInt:a})},function(e,t,n){var r=n(2),a=n(108);r(r.G+r.F*(parseFloat!=a),{parseFloat:a})},function(e,t,n){"use strict";var r=n(4),a=n(17),i=n(23),o=n(76),s=n(26),u=n(5),l=n(40).f,d=n(19).f,c=n(11).f,f=n(48).trim,_=r.Number,m=_,h=_.prototype,p="Number"==i(n(39)(h)),y="trim"in String.prototype,M=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){var n,r,a,i=(t=y?t.trim():f(t,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(t.charCodeAt(1)){case 66:case 98:r=2,a=49;break;case 79:case 111:r=8,a=55;break;default:return+t}for(var o,u=t.slice(2),l=0,d=u.length;la)return NaN;return parseInt(u,r)}}return+t};if(!_(" 0o1")||!_("0b1")||_("+0x1")){_=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof _&&(p?u((function(){h.valueOf.call(n)})):"Number"!=i(n))?o(new m(M(t)),n,_):M(t)};for(var v,g=n(10)?l(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),L=0;g.length>L;L++)a(m,v=g[L])&&!a(_,v)&&c(_,v,d(m,v));_.prototype=h,h.constructor=_,n(15)(r,"Number",_)}},function(e,t,n){"use strict";var r=n(2),a=n(24),i=n(109),o=n(77),s=1..toFixed,u=Math.floor,l=[0,0,0,0,0,0],d="Number.toFixed: incorrect invocation!",c=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*l[n],l[n]=r%1e7,r=u(r/1e7)},f=function(e){for(var t=6,n=0;--t>=0;)n+=l[t],l[t]=u(n/e),n=n%e*1e7},_=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==l[e]){var n=String(l[e]);t=""===t?n:t+o.call("0",7-n.length)+n}return t},m=function(e,t,n){return 0===t?n:t%2==1?m(e,t-1,n*e):m(e*e,t/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(5)((function(){s.call({})}))),"Number",{toFixed:function(e){var t,n,r,s,u=i(this,d),l=a(e),h="",p="0";if(l<0||l>20)throw RangeError(d);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(h="-",u=-u),u>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(u*m(2,69,1))-69)<0?u*m(2,-t,1):u/m(2,t,1),n*=4503599627370496,(t=52-t)>0){for(c(0,n),r=l;r>=7;)c(1e7,0),r-=7;for(c(m(10,r,1),0),r=t-1;r>=23;)f(1<<23),r-=23;f(1<0?h+((s=p.length)<=l?"0."+o.call("0",l-s)+p:p.slice(0,s-l)+"."+p.slice(s-l)):h+p}})},function(e,t,n){"use strict";var r=n(2),a=n(5),i=n(109),o=1..toPrecision;r(r.P+r.F*(a((function(){return"1"!==o.call(1,void 0)}))||!a((function(){o.call({})}))),"Number",{toPrecision:function(e){var t=i(this,"Number#toPrecision: incorrect invocation!");return void 0===e?o.call(t):o.call(t,e)}})},function(e,t,n){var r=n(2);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(2),a=n(4).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&a(e)}})},function(e,t,n){var r=n(2);r(r.S,"Number",{isInteger:n(110)})},function(e,t,n){var r=n(2);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(2),a=n(110),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return a(e)&&i(e)<=9007199254740991}})},function(e,t,n){var r=n(2);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(2);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(2),a=n(108);r(r.S+r.F*(Number.parseFloat!=a),"Number",{parseFloat:a})},function(e,t,n){var r=n(2),a=n(107);r(r.S+r.F*(Number.parseInt!=a),"Number",{parseInt:a})},function(e,t,n){var r=n(2),a=n(111),i=Math.sqrt,o=Math.acosh;r(r.S+r.F*!(o&&710==Math.floor(o(Number.MAX_VALUE))&&o(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:a(e-1+i(e-1)*i(e+1))}})},function(e,t,n){var r=n(2),a=Math.asinh;r(r.S+r.F*!(a&&1/a(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(e,t,n){var r=n(2),a=Math.atanh;r(r.S+r.F*!(a&&1/a(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(2),a=n(78);r(r.S,"Math",{cbrt:function(e){return a(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(2),a=Math.exp;r(r.S,"Math",{cosh:function(e){return(a(e=+e)+a(-e))/2}})},function(e,t,n){var r=n(2),a=n(79);r(r.S+r.F*(a!=Math.expm1),"Math",{expm1:a})},function(e,t,n){var r=n(2);r(r.S,"Math",{fround:n(112)})},function(e,t,n){var r=n(2),a=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,i=0,o=0,s=arguments.length,u=0;o0?(r=n/u)*r:n;return u===1/0?1/0:u*Math.sqrt(i)}})},function(e,t,n){var r=n(2),a=Math.imul;r(r.S+r.F*n(5)((function(){return-5!=a(4294967295,5)||2!=a.length})),"Math",{imul:function(e,t){var n=+e,r=+t,a=65535&n,i=65535&r;return 0|a*i+((65535&n>>>16)*i+a*(65535&r>>>16)<<16>>>0)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var r=n(2);r(r.S,"Math",{log1p:n(111)})},function(e,t,n){var r=n(2);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(2);r(r.S,"Math",{sign:n(78)})},function(e,t,n){var r=n(2),a=n(79),i=Math.exp;r(r.S+r.F*n(5)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(a(e)-a(-e))/2:(i(e-1)-i(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(2),a=n(79),i=Math.exp;r(r.S,"Math",{tanh:function(e){var t=a(e=+e),n=a(-e);return t==1/0?1:n==1/0?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){var r=n(2);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(2),a=n(38),i=String.fromCharCode,o=String.fromCodePoint;r(r.S+r.F*(!!o&&1!=o.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,o=0;r>o;){if(t=+arguments[o++],a(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(2),a=n(18),i=n(8);r(r.S,"String",{raw:function(e){for(var t=a(e.raw),n=i(t.length),r=arguments.length,o=[],s=0;n>s;)o.push(String(t[s++])),s=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(2),a=n(58)(!1);r(r.P,"String",{codePointAt:function(e){return a(this,e)}})},function(e,t,n){"use strict";var r=n(2),a=n(8),i=n(82),o="".endsWith;r(r.P+r.F*n(83)("endsWith"),"String",{endsWith:function(e){var t=i(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=a(t.length),s=void 0===n?r:Math.min(a(n),r),u=String(e);return o?o.call(t,u,s):t.slice(s-u.length,s)===u}})},function(e,t,n){"use strict";var r=n(2),a=n(82);r(r.P+r.F*n(83)("includes"),"String",{includes:function(e){return!!~a(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(2);r(r.P,"String",{repeat:n(77)})},function(e,t,n){"use strict";var r=n(2),a=n(8),i=n(82),o="".startsWith;r(r.P+r.F*n(83)("startsWith"),"String",{startsWith:function(e){var t=i(this,e,"startsWith"),n=a(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return o?o.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(16)("anchor",(function(e){return function(t){return e(this,"a","name",t)}}))},function(e,t,n){"use strict";n(16)("big",(function(e){return function(){return e(this,"big","","")}}))},function(e,t,n){"use strict";n(16)("blink",(function(e){return function(){return e(this,"blink","","")}}))},function(e,t,n){"use strict";n(16)("bold",(function(e){return function(){return e(this,"b","","")}}))},function(e,t,n){"use strict";n(16)("fixed",(function(e){return function(){return e(this,"tt","","")}}))},function(e,t,n){"use strict";n(16)("fontcolor",(function(e){return function(t){return e(this,"font","color",t)}}))},function(e,t,n){"use strict";n(16)("fontsize",(function(e){return function(t){return e(this,"font","size",t)}}))},function(e,t,n){"use strict";n(16)("italics",(function(e){return function(){return e(this,"i","","")}}))},function(e,t,n){"use strict";n(16)("link",(function(e){return function(t){return e(this,"a","href",t)}}))},function(e,t,n){"use strict";n(16)("small",(function(e){return function(){return e(this,"small","","")}}))},function(e,t,n){"use strict";n(16)("strike",(function(e){return function(){return e(this,"strike","","")}}))},function(e,t,n){"use strict";n(16)("sub",(function(e){return function(){return e(this,"sub","","")}}))},function(e,t,n){"use strict";n(16)("sup",(function(e){return function(){return e(this,"sup","","")}}))},function(e,t,n){var r=n(2);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(26);r(r.P+r.F*n(5)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(e){var t=a(this),n=i(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var r=n(2),a=n(356);r(r.P+r.F*(Date.prototype.toISOString!==a),"Date",{toISOString:a})},function(e,t,n){"use strict";var r=n(5),a=Date.prototype.getTime,i=Date.prototype.toISOString,o=function(e){return e>9?e:"0"+e};e.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-50000000000001))}))||!r((function(){i.call(new Date(NaN))}))?function(){if(!isFinite(a.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+o(e.getUTCMonth()+1)+"-"+o(e.getUTCDate())+"T"+o(e.getUTCHours())+":"+o(e.getUTCMinutes())+":"+o(e.getUTCSeconds())+"."+(n>99?n:"0"+o(n))+"Z"}:i},function(e,t,n){var r=Date.prototype,a=r.toString,i=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(15)(r,"toString",(function(){var e=i.call(this);return e==e?a.call(this):"Invalid Date"}))},function(e,t,n){var r=n(7)("toPrimitive"),a=Date.prototype;r in a||n(14)(a,r,n(359))},function(e,t,n){"use strict";var r=n(3),a=n(26);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return a(r(this),"number"!=e)}},function(e,t,n){var r=n(2);r(r.S,"Array",{isArray:n(57)})},function(e,t,n){"use strict";var r=n(22),a=n(2),i=n(12),o=n(113),s=n(84),u=n(8),l=n(85),d=n(86);a(a.S+a.F*!n(60)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,a,c,f=i(e),_="function"==typeof this?this:Array,m=arguments.length,h=m>1?arguments[1]:void 0,p=void 0!==h,y=0,M=d(f);if(p&&(h=r(h,m>2?arguments[2]:void 0,2)),null==M||_==Array&&s(M))for(n=new _(t=u(f.length));t>y;y++)l(n,y,p?h(f[y],y):f[y]);else for(c=M.call(f),n=new _;!(a=c.next()).done;y++)l(n,y,p?o(c,h,[a.value,y],!0):a.value);return n.length=y,n}})},function(e,t,n){"use strict";var r=n(2),a=n(85);r(r.S+r.F*n(5)((function(){function e(){}return!(Array.of.call(e)instanceof e)})),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)a(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(2),a=n(18),i=[].join;r(r.P+r.F*(n(51)!=Object||!n(25)(i)),"Array",{join:function(e){return i.call(a(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(2),a=n(73),i=n(23),o=n(38),s=n(8),u=[].slice;r(r.P+r.F*n(5)((function(){a&&u.call(a)})),"Array",{slice:function(e,t){var n=s(this.length),r=i(this);if(t=void 0===t?n:t,"Array"==r)return u.call(this,e,t);for(var a=o(e,n),l=o(t,n),d=s(l-a),c=new Array(d),f=0;f1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(2);r(r.P,"Array",{copyWithin:n(115)}),n(34)("copyWithin")},function(e,t,n){var r=n(2);r(r.P,"Array",{fill:n(88)}),n(34)("fill")},function(e,t,n){"use strict";var r=n(2),a=n(29)(5),i=!0;"find"in[]&&Array(1).find((function(){i=!1})),r(r.P+r.F*i,"Array",{find:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(34)("find")},function(e,t,n){"use strict";var r=n(2),a=n(29)(6),i="findIndex",o=!0;i in[]&&Array(1)[i]((function(){o=!1})),r(r.P+r.F*o,"Array",{findIndex:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(34)(i)},function(e,t,n){n(41)("Array")},function(e,t,n){var r=n(4),a=n(76),i=n(11).f,o=n(40).f,s=n(59),u=n(53),l=r.RegExp,d=l,c=l.prototype,f=/a/g,_=/a/g,m=new l(f)!==f;if(n(10)&&(!m||n(5)((function(){return _[n(7)("match")]=!1,l(f)!=f||l(_)==_||"/a/i"!=l(f,"i")})))){l=function(e,t){var n=this instanceof l,r=s(e),i=void 0===t;return!n&&r&&e.constructor===l&&i?e:a(m?new d(r&&!i?e.source:e,t):d((r=e instanceof l)?e.source:e,r&&i?u.call(e):t),n?this:c,l)};for(var h=function(e){e in l||i(l,e,{configurable:!0,get:function(){return d[e]},set:function(t){d[e]=t}})},p=o(d),y=0;p.length>y;)h(p[y++]);c.constructor=l,l.prototype=c,n(15)(r,"RegExp",l)}n(41)("RegExp")},function(e,t,n){"use strict";n(118);var r=n(3),a=n(53),i=n(10),o=/./.toString,s=function(e){n(15)(RegExp.prototype,"toString",e,!0)};n(5)((function(){return"/a/b"!=o.call({source:"a",flags:"b"})}))?s((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!i&&e instanceof RegExp?a.call(e):void 0)})):"toString"!=o.name&&s((function(){return o.call(this)}))},function(e,t,n){"use strict";var r=n(3),a=n(8),i=n(91),o=n(61);n(62)("match",1,(function(e,t,n,s){return[function(n){var r=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=s(n,e,this);if(t.done)return t.value;var u=r(e),l=String(this);if(!u.global)return o(u,l);var d=u.unicode;u.lastIndex=0;for(var c,f=[],_=0;null!==(c=o(u,l));){var m=String(c[0]);f[_]=m,""===m&&(u.lastIndex=i(l,a(u.lastIndex),d)),_++}return 0===_?null:f}]}))},function(e,t,n){"use strict";var r=n(3),a=n(12),i=n(8),o=n(24),s=n(91),u=n(61),l=Math.max,d=Math.min,c=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,_=/\$([$&`']|\d\d?)/g;n(62)("replace",2,(function(e,t,n,m){return[function(r,a){var i=e(this),o=null==r?void 0:r[t];return void 0!==o?o.call(r,i,a):n.call(String(i),r,a)},function(e,t){var a=m(n,e,this,t);if(a.done)return a.value;var c=r(e),f=String(this),_="function"==typeof t;_||(t=String(t));var p=c.global;if(p){var y=c.unicode;c.lastIndex=0}for(var M=[];;){var v=u(c,f);if(null===v)break;if(M.push(v),!p)break;""===String(v[0])&&(c.lastIndex=s(f,i(c.lastIndex),y))}for(var g,L="",k=0,Y=0;Y=k&&(L+=f.slice(k,w)+j,k=w+b.length)}return L+f.slice(k)}];function h(e,t,r,i,o,s){var u=r+e.length,l=i.length,d=_;return void 0!==o&&(o=a(o),d=f),n.call(s,d,(function(n,a){var s;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(u);case"<":s=o[a.slice(1,-1)];break;default:var d=+a;if(0===d)return n;if(d>l){var f=c(d/10);return 0===f?n:f<=l?void 0===i[f-1]?a.charAt(1):i[f-1]+a.charAt(1):n}s=i[d-1]}return void 0===s?"":s}))}}))},function(e,t,n){"use strict";var r=n(3),a=n(104),i=n(61);n(62)("search",1,(function(e,t,n,o){return[function(n){var r=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=o(n,e,this);if(t.done)return t.value;var s=r(e),u=String(this),l=s.lastIndex;a(l,0)||(s.lastIndex=0);var d=i(s,u);return a(s.lastIndex,l)||(s.lastIndex=l),null===d?-1:d.index}]}))},function(e,t,n){"use strict";var r=n(59),a=n(3),i=n(54),o=n(91),s=n(8),u=n(61),l=n(90),d=n(5),c=Math.min,f=[].push,_="length",m=!d((function(){RegExp(4294967295,"y")}));n(62)("split",2,(function(e,t,n,d){var h;return h="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[_]||2!="ab".split(/(?:ab)*/)[_]||4!=".".split(/(.?)(.?)/)[_]||".".split(/()()/)[_]>1||"".split(/.?/)[_]?function(e,t){var a=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(a,e,t);for(var i,o,s,u=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,m=void 0===t?4294967295:t>>>0,h=new RegExp(e.source,d+"g");(i=l.call(h,a))&&!((o=h.lastIndex)>c&&(u.push(a.slice(c,i.index)),i[_]>1&&i.index=m));)h.lastIndex===i.index&&h.lastIndex++;return c===a[_]?!s&&h.test("")||u.push(""):u.push(a.slice(c)),u[_]>m?u.slice(0,m):u}:"0".split(void 0,0)[_]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var a=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,a,r):h.call(String(a),n,r)},function(e,t){var r=d(h,e,this,t,h!==n);if(r.done)return r.value;var l=a(e),f=String(this),_=i(l,RegExp),p=l.unicode,y=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(m?"y":"g"),M=new _(m?l:"^(?:"+l.source+")",y),v=void 0===t?4294967295:t>>>0;if(0===v)return[];if(0===f.length)return null===u(M,f)?[f]:[];for(var g=0,L=0,k=[];Li;)o(n[i++]);e._c=[],e._n=!1,t&&!e._h&&P(e)}))}},P=function(e){y.call(u,(function(){var t,n,r,a=e._v,i=F(e);if(i&&(t=g((function(){S?b.emit("unhandledRejection",a,e):(n=u.onunhandledrejection)?n({promise:e,reason:a}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",a)})),e._h=S||F(e)?2:1),e._a=void 0,i&&t.e)throw t.v}))},F=function(e){return 1!==e._h&&0===(e._a||e._c).length},A=function(e){y.call(u,(function(){var t;S?b.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})}))},N=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),O(t,!0))},C=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw Y("Promise can't be resolved itself");(t=H(e))?M((function(){var r={_w:n,_d:!1};try{t.call(e,l(C,r,1),l(N,r,1))}catch(e){N.call(r,e)}})):(n._v=e,n._s=1,O(n,!1))}catch(e){N.call({_w:n,_d:!1},e)}}};E||(D=function(e){m(this,D,"Promise","_h"),_(e),r.call(this);try{e(l(C,this,1),l(N,this,1))}catch(e){N.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(44)(D.prototype,{then:function(e,t){var n=j(p(this,D));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=S?b.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r;this.promise=e,this.resolve=l(C,e,1),this.reject=l(N,e,1)},v.f=j=function(e){return e===D||e===o?new i(e):a(e)}),c(c.G+c.W+c.F*!E,{Promise:D}),n(46)(D,"Promise"),n(41)("Promise"),o=n(21).Promise,c(c.S+c.F*!E,"Promise",{reject:function(e){var t=j(this);return(0,t.reject)(e),t.promise}}),c(c.S+c.F*(s||!E),"Promise",{resolve:function(e){return k(s&&this===o?D:this,e)}}),c(c.S+c.F*!(E&&n(60)((function(e){D.all(e).catch(x)}))),"Promise",{all:function(e){var t=this,n=j(t),r=n.resolve,a=n.reject,i=g((function(){var n=[],i=0,o=1;h(e,!1,(function(e){var s=i++,u=!1;n.push(void 0),o++,t.resolve(e).then((function(e){u||(u=!0,n[s]=e,--o||r(n))}),a)})),--o||r(n)}));return i.e&&a(i.v),n.promise},race:function(e){var t=this,n=j(t),r=n.reject,a=g((function(){h(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return a.e&&r(a.v),n.promise}})},function(e,t,n){"use strict";var r=n(125),a=n(45);n(64)("WeakSet",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(a(this,"WeakSet"),e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(2),a=n(65),i=n(95),o=n(3),s=n(38),u=n(8),l=n(6),d=n(4).ArrayBuffer,c=n(54),f=i.ArrayBuffer,_=i.DataView,m=a.ABV&&d.isView,h=f.prototype.slice,p=a.VIEW;r(r.G+r.W+r.F*(d!==f),{ArrayBuffer:f}),r(r.S+r.F*!a.CONSTR,"ArrayBuffer",{isView:function(e){return m&&m(e)||l(e)&&p in e}}),r(r.P+r.U+r.F*n(5)((function(){return!new f(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(e,t){if(void 0!==h&&void 0===t)return h.call(o(this),e);for(var n=o(this).byteLength,r=s(e,n),a=s(void 0===t?n:t,n),i=new(c(this,f))(u(a-r)),l=new _(this),d=new _(i),m=0;r=t.length)return{value:void 0,done:!0}}while(!((e=t[this._i++])in this._t));return{value:e,done:!1}})),r(r.S,"Reflect",{enumerate:function(e){return new i(e)}})},function(e,t,n){var r=n(19),a=n(20),i=n(17),o=n(2),s=n(6),u=n(3);o(o.S,"Reflect",{get:function e(t,n){var o,l,d=arguments.length<3?t:arguments[2];return u(t)===d?t[n]:(o=r.f(t,n))?i(o,"value")?o.value:void 0!==o.get?o.get.call(d):void 0:s(l=a(t))?e(l,n,d):void 0}})},function(e,t,n){var r=n(19),a=n(2),i=n(3);a(a.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(i(e),t)}})},function(e,t,n){var r=n(2),a=n(20),i=n(3);r(r.S,"Reflect",{getPrototypeOf:function(e){return a(i(e))}})},function(e,t,n){var r=n(2);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(2),a=n(3),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return a(e),!i||i(e)}})},function(e,t,n){var r=n(2);r(r.S,"Reflect",{ownKeys:n(127)})},function(e,t,n){var r=n(2),a=n(3),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){a(e);try{return i&&i(e),!0}catch(e){return!1}}})},function(e,t,n){var r=n(11),a=n(19),i=n(20),o=n(17),s=n(2),u=n(35),l=n(3),d=n(6);s(s.S,"Reflect",{set:function e(t,n,s){var c,f,_=arguments.length<4?t:arguments[3],m=a.f(l(t),n);if(!m){if(d(f=i(t)))return e(f,n,s,_);m=u(0)}if(o(m,"value")){if(!1===m.writable||!d(_))return!1;if(c=a.f(_,n)){if(c.get||c.set||!1===c.writable)return!1;c.value=s,r.f(_,n,c)}else r.f(_,n,u(0,s));return!0}return void 0!==m.set&&(m.set.call(_,s),!0)}})},function(e,t,n){var r=n(2),a=n(74);a&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){a.check(e,t);try{return a.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){"use strict";var r=n(2),a=n(55)(!0);r(r.P,"Array",{includes:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(34)("includes")},function(e,t,n){"use strict";var r=n(2),a=n(128),i=n(12),o=n(8),s=n(13),u=n(87);r(r.P,"Array",{flatMap:function(e){var t,n,r=i(this);return s(e),t=o(r.length),n=u(r,0),a(n,r,r,t,0,1,e,arguments[1]),n}}),n(34)("flatMap")},function(e,t,n){"use strict";var r=n(2),a=n(128),i=n(12),o=n(8),s=n(24),u=n(87);r(r.P,"Array",{flatten:function(){var e=arguments[0],t=i(this),n=o(t.length),r=u(t,0);return a(r,t,t,n,0,void 0===e?1:s(e)),r}}),n(34)("flatten")},function(e,t,n){"use strict";var r=n(2),a=n(58)(!0),i=n(5)((function(){return"𠮷"!=="𠮷".at(0)}));r(r.P+r.F*i,"String",{at:function(e){return a(this,e)}})},function(e,t,n){"use strict";var r=n(2),a=n(129),i=n(63),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*o,"String",{padStart:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){"use strict";var r=n(2),a=n(129),i=n(63),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*o,"String",{padEnd:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){"use strict";n(48)("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},function(e,t,n){"use strict";n(48)("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},function(e,t,n){"use strict";var r=n(2),a=n(27),i=n(8),o=n(59),s=n(53),u=RegExp.prototype,l=function(e,t){this._r=e,this._s=t};n(81)(l,"RegExp String",(function(){var e=this._r.exec(this._s);return{value:e,done:null===e}})),r(r.P,"String",{matchAll:function(e){if(a(this),!o(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in u?String(e.flags):s.call(e),r=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=i(e.lastIndex),new l(r,t)}})},function(e,t,n){n(70)("asyncIterator")},function(e,t,n){n(70)("observable")},function(e,t,n){var r=n(2),a=n(127),i=n(18),o=n(19),s=n(85);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=i(e),u=o.f,l=a(r),d={},c=0;l.length>c;)void 0!==(n=u(r,t=l[c++]))&&s(d,t,n);return d}})},function(e,t,n){var r=n(2),a=n(130)(!1);r(r.S,"Object",{values:function(e){return a(e)}})},function(e,t,n){var r=n(2),a=n(130)(!0);r(r.S,"Object",{entries:function(e){return a(e)}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(13),o=n(11);n(10)&&r(r.P+n(66),"Object",{__defineGetter__:function(e,t){o.f(a(this),e,{get:i(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(13),o=n(11);n(10)&&r(r.P+n(66),"Object",{__defineSetter__:function(e,t){o.f(a(this),e,{set:i(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(26),o=n(20),s=n(19).f;n(10)&&r(r.P+n(66),"Object",{__lookupGetter__:function(e){var t,n=a(this),r=i(e,!0);do{if(t=s(n,r))return t.get}while(n=o(n))}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(26),o=n(20),s=n(19).f;n(10)&&r(r.P+n(66),"Object",{__lookupSetter__:function(e){var t,n=a(this),r=i(e,!0);do{if(t=s(n,r))return t.set}while(n=o(n))}})},function(e,t,n){var r=n(2);r(r.P+r.R,"Map",{toJSON:n(131)("Map")})},function(e,t,n){var r=n(2);r(r.P+r.R,"Set",{toJSON:n(131)("Set")})},function(e,t,n){n(67)("Map")},function(e,t,n){n(67)("Set")},function(e,t,n){n(67)("WeakMap")},function(e,t,n){n(67)("WeakSet")},function(e,t,n){n(68)("Map")},function(e,t,n){n(68)("Set")},function(e,t,n){n(68)("WeakMap")},function(e,t,n){n(68)("WeakSet")},function(e,t,n){var r=n(2);r(r.G,{global:n(4)})},function(e,t,n){var r=n(2);r(r.S,"System",{global:n(4)})},function(e,t,n){var r=n(2),a=n(23);r(r.S,"Error",{isError:function(e){return"Error"===a(e)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{clamp:function(e,t,n){return Math.min(n,Math.max(t,e))}})},function(e,t,n){var r=n(2);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(e,t,n){var r=n(2),a=180/Math.PI;r(r.S,"Math",{degrees:function(e){return e*a}})},function(e,t,n){var r=n(2),a=n(133),i=n(112);r(r.S,"Math",{fscale:function(e,t,n,r,o){return i(a(e,t,n,r,o))}})},function(e,t,n){var r=n(2);r(r.S,"Math",{iaddh:function(e,t,n,r){var a=e>>>0,i=n>>>0;return(t>>>0)+(r>>>0)+((a&i|(a|i)&~(a+i>>>0))>>>31)|0}})},function(e,t,n){var r=n(2);r(r.S,"Math",{isubh:function(e,t,n,r){var a=e>>>0,i=n>>>0;return(t>>>0)-(r>>>0)-((~a&i|~(a^i)&a-i>>>0)>>>31)|0}})},function(e,t,n){var r=n(2);r(r.S,"Math",{imulh:function(e,t){var n=+e,r=+t,a=65535&n,i=65535&r,o=n>>16,s=r>>16,u=(o*i>>>0)+(a*i>>>16);return o*s+(u>>16)+((a*s>>>0)+(65535&u)>>16)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(e,t,n){var r=n(2),a=Math.PI/180;r(r.S,"Math",{radians:function(e){return e*a}})},function(e,t,n){var r=n(2);r(r.S,"Math",{scale:n(133)})},function(e,t,n){var r=n(2);r(r.S,"Math",{umulh:function(e,t){var n=+e,r=+t,a=65535&n,i=65535&r,o=n>>>16,s=r>>>16,u=(o*i>>>0)+(a*i>>>16);return o*s+(u>>>16)+((a*s>>>0)+(65535&u)>>>16)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{signbit:function(e){return(e=+e)!=e?e:0==e?1/e==1/0:e>0}})},function(e,t,n){"use strict";var r=n(2),a=n(21),i=n(4),o=n(54),s=n(120);r(r.P+r.R,"Promise",{finally:function(e){var t=o(this,a.Promise||i.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},function(e,t,n){"use strict";var r=n(2),a=n(94),i=n(119);r(r.S,"Promise",{try:function(e){var t=a.f(this),n=i(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){var r=n(31),a=n(3),i=r.key,o=r.set;r.exp({defineMetadata:function(e,t,n,r){o(e,t,a(n),i(r))}})},function(e,t,n){var r=n(31),a=n(3),i=r.key,o=r.map,s=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:i(arguments[2]),r=o(a(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var u=s.get(t);return u.delete(n),!!u.size||s.delete(t)}})},function(e,t,n){var r=n(31),a=n(3),i=n(20),o=r.has,s=r.get,u=r.key,l=function(e,t,n){if(o(e,t,n))return s(e,t,n);var r=i(t);return null!==r?l(e,r,n):void 0};r.exp({getMetadata:function(e,t){return l(e,a(t),arguments.length<3?void 0:u(arguments[2]))}})},function(e,t,n){var r=n(123),a=n(132),i=n(31),o=n(3),s=n(20),u=i.keys,l=i.key,d=function(e,t){var n=u(e,t),i=s(e);if(null===i)return n;var o=d(i,t);return o.length?n.length?a(new r(n.concat(o))):o:n};i.exp({getMetadataKeys:function(e){return d(o(e),arguments.length<2?void 0:l(arguments[1]))}})},function(e,t,n){var r=n(31),a=n(3),i=r.get,o=r.key;r.exp({getOwnMetadata:function(e,t){return i(e,a(t),arguments.length<3?void 0:o(arguments[2]))}})},function(e,t,n){var r=n(31),a=n(3),i=r.keys,o=r.key;r.exp({getOwnMetadataKeys:function(e){return i(a(e),arguments.length<2?void 0:o(arguments[1]))}})},function(e,t,n){var r=n(31),a=n(3),i=n(20),o=r.has,s=r.key,u=function(e,t,n){if(o(e,t,n))return!0;var r=i(t);return null!==r&&u(e,r,n)};r.exp({hasMetadata:function(e,t){return u(e,a(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(31),a=n(3),i=r.has,o=r.key;r.exp({hasOwnMetadata:function(e,t){return i(e,a(t),arguments.length<3?void 0:o(arguments[2]))}})},function(e,t,n){var r=n(31),a=n(3),i=n(13),o=r.key,s=r.set;r.exp({metadata:function(e,t){return function(n,r){s(e,t,(void 0!==r?a:i)(n),o(r))}}})},function(e,t,n){var r=n(2),a=n(93)(),i=n(4).process,o="process"==n(23)(i);r(r.G,{asap:function(e){var t=o&&i.domain;a(t?t.bind(e):e)}})},function(e,t,n){"use strict";var r=n(2),a=n(4),i=n(21),o=n(93)(),s=n(7)("observable"),u=n(13),l=n(3),d=n(42),c=n(44),f=n(14),_=n(43),m=_.RETURN,h=function(e){return null==e?void 0:u(e)},p=function(e){var t=e._c;t&&(e._c=void 0,t())},y=function(e){return void 0===e._o},M=function(e){y(e)||(e._o=void 0,p(e))},v=function(e,t){l(e),this._c=void 0,this._o=e,e=new g(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(t){return void e.error(t)}y(this)&&p(this)};v.prototype=c({},{unsubscribe:function(){M(this)}});var g=function(e){this._s=e};g.prototype=c({},{next:function(e){var t=this._s;if(!y(t)){var n=t._o;try{var r=h(n.next);if(r)return r.call(n,e)}catch(e){try{M(t)}finally{throw e}}}},error:function(e){var t=this._s;if(y(t))throw e;var n=t._o;t._o=void 0;try{var r=h(n.error);if(!r)throw e;e=r.call(n,e)}catch(e){try{p(t)}finally{throw e}}return p(t),e},complete:function(e){var t=this._s;if(!y(t)){var n=t._o;t._o=void 0;try{var r=h(n.complete);e=r?r.call(n,e):void 0}catch(e){try{p(t)}finally{throw e}}return p(t),e}}});var L=function(e){d(this,L,"Observable","_f")._f=u(e)};c(L.prototype,{subscribe:function(e){return new v(e,this._f)},forEach:function(e){var t=this;return new(i.Promise||a.Promise)((function(n,r){u(e);var a=t.subscribe({next:function(t){try{return e(t)}catch(e){r(e),a.unsubscribe()}},error:r,complete:n})}))}}),c(L,{from:function(e){var t="function"==typeof this?this:L,n=h(l(e)[s]);if(n){var r=l(n.call(e));return r.constructor===t?r:new t((function(e){return r.subscribe(e)}))}return new t((function(t){var n=!1;return o((function(){if(!n){try{if(_(e,!1,(function(e){if(t.next(e),n)return m}))===m)return}catch(e){if(n)throw e;return void t.error(e)}t.complete()}})),function(){n=!0}}))},of:function(){for(var e=0,t=arguments.length,n=new Array(t);e2,a=!!r&&o.call(arguments,2);return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,a)}:t,n)}};a(a.G+a.B+a.F*s,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},function(e,t,n){var r=n(2),a=n(92);r(r.G+r.B,{setImmediate:a.set,clearImmediate:a.clear})},function(e,t,n){for(var r=n(89),a=n(37),i=n(15),o=n(4),s=n(14),u=n(49),l=n(7),d=l("iterator"),c=l("toStringTag"),f=u.Array,_={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=a(_),h=0;h=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),b(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;b(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}}}function h(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),o=new w(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(a,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw i;return D()}for(n.method=a,n.arg=i;;){var o=n.delegate;if(o){var s=k(o,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=p(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,o),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function y(){}function M(){}function v(){}function g(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function L(e){function n(t,a,i,o){var s=p(e[t],e,a);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then((function(e){n("next",e,i,o)}),(function(e){n("throw",e,i,o)})):Promise.resolve(l).then((function(e){u.value=e,i(u)}),o)}o(s.arg)}var a;"object"==typeof t.process&&t.process.domain&&(n=t.process.domain.bind(n)),this._invoke=function(e,t){function r(){return new Promise((function(r,a){n(e,t,r,a)}))}return a=a?a.then(r,r):r()}}function k(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=p(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function Y(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function b(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Y,this),this.reset(!0)}function T(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n button {\n margin: 15px;\n}\n\n.file-upload-container {\n border: dotted;\n margin: 18px;\n padding: 15px;\n min-height: 150px;\n text-align: center;\n cursor: pointer;\n}\n\n.file-upload-container > div > div {\n display: grid;\n grid-template-columns: auto auto auto auto;\n}\n\n.uploaded-file {\n max-width: 120px;\n position: relative;\n margin-bottom: 15px;\n}\n\n.uploaded-file > img {\n width: 50px;\n height: 56px;\n border: 1px solid black;\n}\n\n.uploaded-file > span {\n display: block;\n word-wrap: break-word;\n}\n\n.uploaded-file > i:nth-child(3) {\n color: red;\n position: absolute;\n top: -9px;\n right: 25px;\n cursor: pointer;\n}\n\n.clickable { cursor: pointer; }\n.token-revoked td { text-decoration: line-through; }\n\n.token-table td:not(:first-child), .token-table th:not(:first-child) {\n text-align: center;\n}\n\n.file-table td:nth-child(n+3), .file-table th:nth-child(n+3) {\n text-align: center;\n}\n\n.file-table tr, .file-table td {\n height: 40px;\n}",""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var a=(o=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(u," */")),i=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(i).concat([a]).join("\n")}var o,s,u;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var i=0;i=0&&c.splice(t,1)}function y(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function(){0;return n.nc}();r&&(e.attrs.nonce=r)}return M(t,e.attrs),h(e,t),t}function M(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function v(e,t){var n,r,a,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var o=d++;n=l||(l=y(t)),r=k.bind(null,n,o,!1),a=k.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",M(t,e.attrs),h(e,t),t}(t),r=b.bind(null,n,t),a=function(){p(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),r=Y.bind(null,n),a=function(){p(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else a()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=m(e,t);return _(n,t),function(e){for(var r=[],a=0;a1&&void 0!==arguments[1]?arguments[1]:null;return this.apiCall("file/delete",{id:e,token:t})}},{key:"revokeToken",value:function(e){return this.apiCall("file/revokeToken",{token:e})}},{key:"upload",value:(a=u(regeneratorRuntime.mark((function e(t){var n,r,a,i,o,s,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=u.length>1&&void 0!==u[1]?u[1]:null,r=u.length>2&&void 0!==u[2]?u[2]:null,a=this.csrfToken(),i=new FormData,o=0;o0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0)&&!(r=i.next()).done;)o.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}Object.create;var g=new Map([["avi","video/avi"],["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["pdf","application/pdf"],["png","image/png"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]]);function L(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=g.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"==typeof t?t:"string"==typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var k=[".DS_Store","Thumbs.db"];function Y(e){return(null!==e.target&&e.target.files?T(e.target.files):[]).map((function(e){return L(e)}))}function b(e,t){return y(this,void 0,void 0,(function(){var n;return M(this,(function(r){switch(r.label){case 0:return e.items?(n=T(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(D))]):[3,2];case 1:return[2,w(S(r.sent()))];case 2:return[2,w(T(e.files).map((function(e){return L(e)})))]}}))}))}function w(e){return e.filter((function(e){return-1===k.indexOf(e.name)}))}function T(e){for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,C(n)];if(e.sizen)return[!1,C(n)]}return[!0,null]}function U(e){return null!=e}function J(e){var t=e.files,n=e.accept,r=e.minSize,a=e.maxSize,i=e.multiple,o=e.maxFiles;return!(!i&&t.length>1||i&&o>=1&&t.length>o)&&t.every((function(e){var t=F(R(e,n),1)[0],i=F(I(e,r,a),1)[0];return t&&i}))}function V(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function G(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function B(e){e.preventDefault()}function $(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function K(e){return-1!==e.indexOf("Edge/")}function q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return $(e)||K(e)}function Q(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var oe=Object(r.forwardRef)((function(e,t){var n=e.children,i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=re(re({},se),e),n=t.accept,a=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,s=t.minSize,u=t.multiple,l=t.maxFiles,d=t.onDragEnter,c=t.onDragLeave,f=t.onDragOver,_=t.onDrop,m=t.onDropAccepted,h=t.onDropRejected,p=t.onFileDialogCancel,y=t.preventDropOnDocument,M=t.noClick,v=t.noKeyboard,g=t.noDrag,L=t.noDragEventsBubbling,k=Object(r.useRef)(null),Y=Object(r.useRef)(null),b=Object(r.useReducer)(de,le),w=X(b,2),T=w[0],D=w[1],S=T.isFocused,x=T.isFileDialogActive,j=T.draggedFiles,E=Object(r.useCallback)((function(){Y.current&&(D({type:"openDialog"}),Y.current.value=null,Y.current.click())}),[D]),H=function(){x&&setTimeout((function(){Y.current&&(Y.current.files.length||(D({type:"closeDialog"}),"function"==typeof p&&p()))}),300)};Object(r.useEffect)((function(){return window.addEventListener("focus",H,!1),function(){window.removeEventListener("focus",H,!1)}}),[Y,x,p]);var O=Object(r.useCallback)((function(e){k.current&&k.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),E()))}),[k,Y]),P=Object(r.useCallback)((function(){D({type:"focus"})}),[]),F=Object(r.useCallback)((function(){D({type:"blur"})}),[]),A=Object(r.useCallback)((function(){M||(q()?setTimeout(E,0):E())}),[Y,M]),N=Object(r.useRef)([]),C=function(e){k.current&&k.current.contains(e.target)||(e.preventDefault(),N.current=[])};Object(r.useEffect)((function(){return y&&(document.addEventListener("dragover",B,!1),document.addEventListener("drop",C,!1)),function(){y&&(document.removeEventListener("dragover",B),document.removeEventListener("drop",C))}}),[k,y]);var W=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),oe(e),N.current=[].concat(Z(N.current),[e.target]),G(e)&&Promise.resolve(i(e)).then((function(t){V(e)&&!L||(D({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),d&&d(e))}))}),[i,d,L]),U=Object(r.useCallback)((function(e){if(e.preventDefault(),e.persist(),oe(e),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return G(e)&&f&&f(e),!1}),[f,L]),$=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),oe(e);var t=N.current.filter((function(e){return k.current&&k.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),N.current=t,t.length>0||(D({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),G(e)&&c&&c(e))}),[k,c,L]),K=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),oe(e),N.current=[],G(e)&&Promise.resolve(i(e)).then((function(t){if(!V(e)||L){var r=[],a=[];t.forEach((function(e){var t=X(R(e,n),2),i=t[0],u=t[1],l=X(I(e,s,o),2),d=l[0],c=l[1];if(i&&d)r.push(e);else{var f=[u,c].filter((function(e){return e}));a.push({file:e,errors:f})}})),(!u&&r.length>1||u&&l>=1&&r.length>l)&&(r.forEach((function(e){a.push({file:e,errors:[z]})})),r.splice(0)),D({acceptedFiles:r,fileRejections:a,type:"setFiles"}),_&&_(r,a,e),a.length>0&&h&&h(a,e),r.length>0&&m&&m(r,e)}})),D({type:"reset"})}),[u,n,s,o,l,i,_,m,h,L]),ee=function(e){return a?null:e},te=function(e){return v?null:ee(e)},ne=function(e){return g?null:ee(e)},oe=function(e){L&&e.stopPropagation()},ue=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onKeyDown,i=e.onFocus,o=e.onBlur,s=e.onClick,u=e.onDragEnter,l=e.onDragOver,d=e.onDragLeave,c=e.onDrop,f=ie(e,["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"]);return re(re(ae({onKeyDown:te(Q(r,O)),onFocus:te(Q(i,P)),onBlur:te(Q(o,F)),onClick:ee(Q(s,A)),onDragEnter:ne(Q(u,W)),onDragOver:ne(Q(l,U)),onDragLeave:ne(Q(d,$)),onDrop:ne(Q(c,K))},n,k),a||v?{}:{tabIndex:0}),f)}}),[k,O,P,F,A,W,U,$,K,v,g,a]),ce=Object(r.useCallback)((function(e){e.stopPropagation()}),[]),fe=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,a=e.onChange,i=e.onClick,o=ie(e,["refKey","onChange","onClick"]),s=ae({accept:n,multiple:u,type:"file",style:{display:"none"},onChange:ee(Q(a,K)),onClick:ee(Q(i,ce)),autoComplete:"off",tabIndex:-1},r,Y);return re(re({},s),o)}}),[Y,n,u,K,a]),_e=j.length,me=_e>0&&J({files:j,accept:n,minSize:s,maxSize:o,multiple:u,maxFiles:l}),he=_e>0&&!me;return re(re({},T),{},{isDragAccept:me,isDragReject:he,isFocused:S&&!a,getRootProps:ue,getInputProps:fe,rootRef:k,inputRef:Y,open:ee(E)})}(ie(e,["children"])),o=i.open,s=ie(i,["open"]);return Object(r.useImperativeHandle)(t,(function(){return{open:o}}),[o]),a.a.createElement(r.Fragment,null,n(re(re({},s),{},{open:o})))}));oe.displayName="Dropzone";var se={disabled:!1,getFilesFromEvent:function(e){return y(this,void 0,void 0,(function(){return M(this,(function(t){return[2,(n=e,n.dataTransfer&&e.dataTransfer?b(e.dataTransfer,e.type):Y(e))];var n}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1};oe.defaultProps=se,oe.propTypes={children:p.a.func,accept:p.a.oneOfType([p.a.string,p.a.arrayOf(p.a.string)]),multiple:p.a.bool,preventDropOnDocument:p.a.bool,noClick:p.a.bool,noKeyboard:p.a.bool,noDrag:p.a.bool,noDragEventsBubbling:p.a.bool,minSize:p.a.number,maxSize:p.a.number,maxFiles:p.a.number,disabled:p.a.bool,getFilesFromEvent:p.a.func,onFileDialogCancel:p.a.func,onDragEnter:p.a.func,onDragLeave:p.a.func,onDragOver:p.a.func,onDrop:p.a.func,onDropAccepted:p.a.func,onDropRejected:p.a.func};var ue=oe,le={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function de(e,t){switch(t.type){case"focus":return re(re({},e),{},{isFocused:!0});case"blur":return re(re({},e),{},{isFocused:!1});case"openDialog":return re(re({},e),{},{isFileDialogActive:!0});case"closeDialog":return re(re({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return re(re({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return re(re({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return re(re({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}function ce(e){return(ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _e(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:1,n=48*t,a=64*t,i=e>1?{marginLeft:(e-1)*n+"px"}:{};return r.createElement("svg",{width:n,height:a,xmlns:"http://www.w3.org/2000/svg",style:i},r.createElement("g",null,r.createElement("line",{strokeLinecap:"undefined",strokeLinejoin:"undefined",y2:"0",x2:n/2,y1:a,x1:n/2,strokeWidth:"1.5",stroke:"#000",fill:"none"}),r.createElement("line",{strokeLinecap:"undefined",strokeLinejoin:"undefined",y2:a/2,x2:n,y1:a/2,x1:n/2,fillOpacity:"null",strokeOpacity:"null",strokeWidth:"1.5",stroke:"#000",fill:"none"})))}},{key:"svgEnd",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=48*t,a=64*t,i=e>1?{marginLeft:(e-1)*n+"px"}:{};return r.createElement("svg",{width:n,height:a,xmlns:"http://www.w3.org/2000/svg",style:i},r.createElement("g",null,r.createElement("line",{strokeLinecap:"undefined",strokeLinejoin:"undefined",y2:"0",x2:n/2,y1:a/2,x1:n/2,strokeWidth:"1.5",stroke:"#000",fill:"none"}),r.createElement("line",{strokeLinecap:"undefined",strokeLinejoin:"undefined",y2:a/2,x2:n,y1:a/2,x1:n/2,fillOpacity:"null",strokeOpacity:"null",strokeWidth:"1.5",stroke:"#000",fill:"none"})))}},{key:"createFileIcon",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n="";if(null!==e){var a=["image","text","audio","video"],i=["php","java","python","cpp"],o=["zip","tar","archive"],s=(e=e.toLowerCase().trim()).split("/"),u=pe(s,2),l=u[0],d=u[1];"text"===l&&i.find((function(e){return d.includes(e)}))?n="code":"application"===l&&o.find((function(e){return d.includes(e)}))?n="archive":"application"===l&&"pdf"===d?n="pdf":"application"===l&&(d.indexOf("powerpoint")>-1||d.indexOf("presentation")>-1)?n="powerpoint":"application"===l&&(d.indexOf("word")>-1||d.indexOf("opendocument")>-1)?n="word":"application"===l&&(d.indexOf("excel")>-1||d.indexOf("sheet")>-1)?n="excel":"application"===l&&d.indexOf("directory")>-1?n="folder":a.indexOf(l)>-1&&(n="text"===l?"alt":l)}return"folder"!==n&&(n="file"+(n?"-"+n:n)),r.createElement(m,{icon:n,type:"far",className:"p-1 align-middle fa-"+t+"x"})}},{key:"formatSize",value:function(e){for(var t=["B","KiB","MiB","GiB","TiB"],n=0;n=1024;n++)e/=1024;return e.toFixed(1)+" "+t[n]}},{key:"canUpload",value:function(){return this.state.api.loggedIn||this.state.token.valid&&"upload"===this.state.token.type}},{key:"onAddUploadFiles",value:function(e){var t=this.state.filesToUpload.slice();t.push.apply(t,he(e)),this.setState(_e(_e({},this.state),{},{filesToUpload:t}))}},{key:"getSelectedIds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=[];e=e||this.state.files;for(var r=0,a=Object.values(e);r2&&void 0!==arguments[2]?arguments[2]:null,r=!1,a=null===n?_e({},this.state.files):n;if(a.hasOwnProperty(t)){var i=a[t];r=!0,i.selected=e.target.checked,i.isDirectory&&this.onSelectAll(i.selected,i.items)}else for(var o=0,s=Object.values(a);o1&&void 0!==arguments[1]?arguments[1]:0,a=[],i=0,o=Object.values(e),s=function(){var e=l[u],s=e.name,d=e.uid,c=e.isDirectory?"Directory":e.mimeType,f=e.isDirectory?"":t.formatSize(e.size),_=e.isDirectory?"application/x-directory":e.mimeType,m=t.state.token&&t.state.token.valid?"&token="+t.state.token.value:"",h=r.createElement(r.Fragment,null);n>0&&(h=i===o.length-1?t.svgEnd(n,.75):t.svgMiddle(n,.75)),a.push(r.createElement("tr",{key:"file-"+d,"data-id":d,className:"file-row"},r.createElement("td",null,h,t.createFileIcon(_)),r.createElement("td",null,e.isDirectory?s:r.createElement("a",{href:"/api/file/download?id="+d+m,download:!0},s)),r.createElement("td",null,c),r.createElement("td",null,f),r.createElement("td",null,r.createElement("input",{type:"checkbox",checked:!!e.selected,onChange:function(e){return t.onSelectFile(e,d)}})))),e.isDirectory&&a.push.apply(a,he(t.createFileList(e.items,n+1))),i++},u=0,l=o;u=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(this.state.alerts);try{for(c.s();!(e=c.n()).done;){var f=e.value;l.push(r.createElement("div",{key:"alert-"+d++,className:"alert alert-"+f.type},f.text))}}catch(e){c.e(e)}finally{c.f()}if(s){for(var _=function(e){var n=t.state.filesToUpload[e];u.push(r.createElement("span",{className:"uploaded-file",key:e},t.createFileIcon(n.type,3),r.createElement("span",null,n.name),r.createElement(m,{icon:"times",onClick:function(n){return t.onRemoveUploadedFile(n,e)}})))},h=0;h=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:null;null===t&&(this.setState(Re(Re({},this.state),{},{validatingToken:!0,errorMessage:""})),t=this.state.token.value),this.api.validateToken(t).then((function(n){var r=Re(Re({},e.state),{},{loaded:!0,validatingToken:!1});n.success?(r.token=Re(Re({},e.state.token),{},{valid:!0,validUntil:n.token.valid_until,type:n.token.type}),r.token.value||(r.token.value=t),r.files=n.files):r.errorMessage=n.msg,e.setState(r)}))}},{key:"onUpdateToken",value:function(e){this.setState(Re(Re({},this.state),{},{token:Re(Re({},this.state.token),{},{value:e.target.value})}))}},{key:"render",value:function(){var e=this,t=this,n=!!this.state.errorMessage;if(this.state.loaded){if(this.api.loggedIn||this.state.token.valid){var r=this.api.loggedIn?a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-8 col-md-10 col-sm-12 mx-auto"},a.a.createElement(Ce,{api:this.api}))):a.a.createElement(a.a.Fragment,null);return a.a.createElement("div",{className:"container mt-4"},a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-8 col-md-10 col-sm-12 mx-auto"},a.a.createElement("h2",null,"File Control Panel"),a.a.createElement(be,{files:this.state.files,token:this.state.token,api:this.api}))),r)}return a.a.createElement("div",{className:"container mt-4"},a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-8 col-md-10 col-sm-12 mx-auto"},a.a.createElement("h2",null,"File Control Panel"),a.a.createElement("form",{onSubmit:function(e){return e.preventDefault()}},a.a.createElement("label",{htmlFor:"token"},"Enter a file token to download or upload files"),a.a.createElement("input",{type:"text",className:"form-control",name:"token",placeholder:"Enter token…",maxLength:36,value:this.state.token.value,onChange:function(e){return t.onUpdateToken(e)}}),a.a.createElement("button",{className:"btn btn-success mt-2",onClick:function(){return e.onValidateToken()},disabled:this.state.validatingToken},this.state.validatingToken?a.a.createElement(a.a.Fragment,null,"Validating… ",a.a.createElement(m,{icon:"spinner"})):"Submit")),a.a.createElement("div",{className:"alert alert-danger mt-2",hidden:!n},this.state.errorMessage))))}var i=!0,o=window.location.pathname;if(o.length>1){var s=o.endsWith("/")?o.length-2:o.length-1,u=o.startsWith("/files/")?"/files/".length:1,l=o.substr(u,s);l&&(this.onValidateToken(l),i=!1)}return i&&this.api.fetchUser().then((function(t){t?e.api.listFiles().then((function(t){e.setState(Re(Re({},e.state),{},{loaded:!0,user:e.api.user,files:t.files}))})):e.setState(Re(Re({},e.state),{},{loaded:!0,user:e.api.user}))})),a.a.createElement(a.a.Fragment,null,"Loading… ",a.a.createElement(m,{icon:"spinner"}))}}])&&Ue(t.prototype,n),r&&Ue(t,r),o}(a.a.Component);o.a.render(a.a.createElement($e,null),document.getElementById("root"))}]); \ No newline at end of file + */var r,a,i,o,s;if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,l=null,d=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(d,0),e}},c=Date.now();t.unstable_now=function(){return Date.now()-c},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(d,0))},a=function(e,t){l=setTimeout(e,t)},i=function(){clearTimeout(l)},o=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,_=window.Date,m=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var p=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof p&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var y=_.now();t.unstable_now=function(){return _.now()-y}}var M=!1,v=null,g=-1,L=5,k=0;o=function(){return t.unstable_now()>=k},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,a=e[r];if(!(void 0!==a&&0S(o,n))void 0!==u&&0>S(u,o)?(e[r]=u,e[s]=n,r=s):(e[r]=o,e[i]=n,r=i);else{if(!(void 0!==u&&0>S(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function S(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var x=[],j=[],E=1,H=null,O=3,P=!1,F=!1,A=!1;function N(e){for(var t=T(j);null!==t;){if(null===t.callback)D(j);else{if(!(t.startTime<=e))break;D(j),t.sortIndex=t.expirationTime,w(x,t)}t=T(j)}}function C(e){if(A=!1,N(e),!F)if(null!==T(x))F=!0,r(W);else{var t=T(j);null!==t&&a(C,t.startTime-e)}}function W(e,n){F=!1,A&&(A=!1,i()),P=!0;var r=O;try{for(N(n),H=T(x);null!==H&&(!(H.expirationTime>n)||e&&!o());){var s=H.callback;if(null!==s){H.callback=null,O=H.priorityLevel;var u=s(H.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?H.callback=u:H===T(x)&&D(x),N(n)}else D(x);H=T(x)}if(null!==H)var l=!0;else{var d=T(j);null!==d&&a(C,d.startTime-n),l=!1}return l}finally{H=null,O=r,P=!1}}function z(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var R=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){F||P||(F=!0,r(W))},t.unstable_getCurrentPriorityLevel=function(){return O},t.unstable_getFirstCallbackNode=function(){return T(x)},t.unstable_next=function(e){switch(O){case 1:case 2:case 3:var t=3;break;default:t=O}var n=O;O=t;try{return e()}finally{O=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=R,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=O;O=e;try{return t()}finally{O=n}},t.unstable_scheduleCallback=function(e,n,o){var s=t.unstable_now();if("object"==typeof o&&null!==o){var u=o.delay;u="number"==typeof u&&0s?(e.sortIndex=u,w(j,e),null===T(x)&&e===T(j)&&(A?i():A=!0,a(C,u-s))):(e.sortIndex=o,w(x,e),F||P||(F=!0,r(W))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();N(e);var n=T(x);return n!==H&&null!==H&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTimea;)K(e,n=r[a++],t[n]);return e},Q=function(e){var t=C.call(this,e=k(e,!0));return!(this===I&&a(z,e)&&!a(R,e))&&(!(t||!a(this,e)||!a(z,e)||a(this,A)&&this[A][e])||t)},Z=function(e,t){if(e=L(e),t=k(t,!0),e!==I||!a(z,t)||a(R,t)){var n=j(e,t);return!n||!a(z,t)||a(e,A)&&e[A][t]||(n.enumerable=!0),n}},X=function(e){for(var t,n=H(L(e)),r=[],i=0;n.length>i;)a(z,t=n[i++])||t==A||t==u||r.push(t);return r},ee=function(e){for(var t,n=e===I,r=H(n?R:L(e)),i=[],o=0;r.length>o;)!a(z,t=r[o++])||n&&!a(I,t)||i.push(z[t]);return i};U||(s((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===I&&t.call(R,n),a(this,A)&&a(this[A],e)&&(this[A][e]=!1),G(this,e,Y(1,n))};return i&&V&&G(I,e,{configurable:!0,set:t}),B(e)}).prototype,"toString",(function(){return this._k})),T.f=Z,S.f=K,n(40).f=w.f=X,n(52).f=Q,D.f=ee,i&&!n(32)&&s(I,"propertyIsEnumerable",Q,!0),m.f=function(e){return B(_(e))}),o(o.G+o.W+o.F*!U,{Symbol:O});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)_(te[ne++]);for(var re=x(_.store),ae=0;re.length>ae;)h(re[ae++]);o(o.S+o.F*!U,"Symbol",{for:function(e){return a(W,e+="")?W[e]:W[e]=O(e)},keyFor:function(e){if(!$(e))throw TypeError(e+" is not a symbol!");for(var t in W)if(W[t]===e)return t},useSetter:function(){V=!0},useSimple:function(){V=!1}}),o(o.S+o.F*!U,"Object",{create:function(e,t){return void 0===t?b(e):q(b(e),t)},defineProperty:K,defineProperties:q,getOwnPropertyDescriptor:Z,getOwnPropertyNames:X,getOwnPropertySymbols:ee});var ie=l((function(){D.f(1)}));o(o.S+o.F*ie,"Object",{getOwnPropertySymbols:function(e){return D.f(g(e))}}),P&&o(o.S+o.F*(!U||l((function(){var e=O();return"[null]"!=F([e])||"{}"!=F({a:e})||"{}"!=F(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],a=1;arguments.length>a;)r.push(arguments[a++]);if(n=t=r[1],(v(t)||void 0!==e)&&!$(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!$(t))return t}),r[1]=t,F.apply(P,r)}}),O.prototype[N]||n(14)(O.prototype,N,O.prototype.valueOf),c(O,"Symbol"),c(Math,"Math",!0),c(r.JSON,"JSON",!0)},function(e,t,n){e.exports=n(50)("native-function-to-string",Function.toString)},function(e,t,n){var r=n(37),a=n(56),i=n(52);e.exports=function(e){var t=r(e),n=a.f;if(n)for(var o,s=n(e),u=i.f,l=0;s.length>l;)u.call(e,o=s[l++])&&t.push(o);return t}},function(e,t,n){var r=n(2);r(r.S,"Object",{create:n(39)})},function(e,t,n){var r=n(2);r(r.S+r.F*!n(10),"Object",{defineProperty:n(11).f})},function(e,t,n){var r=n(2);r(r.S+r.F*!n(10),"Object",{defineProperties:n(101)})},function(e,t,n){var r=n(18),a=n(19).f;n(28)("getOwnPropertyDescriptor",(function(){return function(e,t){return a(r(e),t)}}))},function(e,t,n){var r=n(12),a=n(20);n(28)("getPrototypeOf",(function(){return function(e){return a(r(e))}}))},function(e,t,n){var r=n(12),a=n(37);n(28)("keys",(function(){return function(e){return a(r(e))}}))},function(e,t,n){n(28)("getOwnPropertyNames",(function(){return n(102).f}))},function(e,t,n){var r=n(6),a=n(33).onFreeze;n(28)("freeze",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(6),a=n(33).onFreeze;n(28)("seal",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(6),a=n(33).onFreeze;n(28)("preventExtensions",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(6);n(28)("isFrozen",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(6);n(28)("isSealed",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(6);n(28)("isExtensible",(function(e){return function(t){return!!r(t)&&(!e||e(t))}}))},function(e,t,n){var r=n(2);r(r.S+r.F,"Object",{assign:n(103)})},function(e,t,n){var r=n(2);r(r.S,"Object",{is:n(104)})},function(e,t,n){var r=n(2);r(r.S,"Object",{setPrototypeOf:n(74).set})},function(e,t,n){"use strict";var r=n(47),a={};a[n(7)("toStringTag")]="z",a+""!="[object z]"&&n(15)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(e,t,n){var r=n(2);r(r.P,"Function",{bind:n(105)})},function(e,t,n){var r=n(11).f,a=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in a||n(10)&&r(a,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(6),a=n(20),i=n(7)("hasInstance"),o=Function.prototype;i in o||n(11).f(o,i,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=a(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(2),a=n(107);r(r.G+r.F*(parseInt!=a),{parseInt:a})},function(e,t,n){var r=n(2),a=n(108);r(r.G+r.F*(parseFloat!=a),{parseFloat:a})},function(e,t,n){"use strict";var r=n(4),a=n(17),i=n(23),o=n(76),s=n(26),u=n(5),l=n(40).f,d=n(19).f,c=n(11).f,f=n(48).trim,_=r.Number,m=_,h=_.prototype,p="Number"==i(n(39)(h)),y="trim"in String.prototype,M=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){var n,r,a,i=(t=y?t.trim():f(t,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(t.charCodeAt(1)){case 66:case 98:r=2,a=49;break;case 79:case 111:r=8,a=55;break;default:return+t}for(var o,u=t.slice(2),l=0,d=u.length;la)return NaN;return parseInt(u,r)}}return+t};if(!_(" 0o1")||!_("0b1")||_("+0x1")){_=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof _&&(p?u((function(){h.valueOf.call(n)})):"Number"!=i(n))?o(new m(M(t)),n,_):M(t)};for(var v,g=n(10)?l(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),L=0;g.length>L;L++)a(m,v=g[L])&&!a(_,v)&&c(_,v,d(m,v));_.prototype=h,h.constructor=_,n(15)(r,"Number",_)}},function(e,t,n){"use strict";var r=n(2),a=n(24),i=n(109),o=n(77),s=1..toFixed,u=Math.floor,l=[0,0,0,0,0,0],d="Number.toFixed: incorrect invocation!",c=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*l[n],l[n]=r%1e7,r=u(r/1e7)},f=function(e){for(var t=6,n=0;--t>=0;)n+=l[t],l[t]=u(n/e),n=n%e*1e7},_=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==l[e]){var n=String(l[e]);t=""===t?n:t+o.call("0",7-n.length)+n}return t},m=function(e,t,n){return 0===t?n:t%2==1?m(e,t-1,n*e):m(e*e,t/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(5)((function(){s.call({})}))),"Number",{toFixed:function(e){var t,n,r,s,u=i(this,d),l=a(e),h="",p="0";if(l<0||l>20)throw RangeError(d);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(h="-",u=-u),u>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(u*m(2,69,1))-69)<0?u*m(2,-t,1):u/m(2,t,1),n*=4503599627370496,(t=52-t)>0){for(c(0,n),r=l;r>=7;)c(1e7,0),r-=7;for(c(m(10,r,1),0),r=t-1;r>=23;)f(1<<23),r-=23;f(1<0?h+((s=p.length)<=l?"0."+o.call("0",l-s)+p:p.slice(0,s-l)+"."+p.slice(s-l)):h+p}})},function(e,t,n){"use strict";var r=n(2),a=n(5),i=n(109),o=1..toPrecision;r(r.P+r.F*(a((function(){return"1"!==o.call(1,void 0)}))||!a((function(){o.call({})}))),"Number",{toPrecision:function(e){var t=i(this,"Number#toPrecision: incorrect invocation!");return void 0===e?o.call(t):o.call(t,e)}})},function(e,t,n){var r=n(2);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(2),a=n(4).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&a(e)}})},function(e,t,n){var r=n(2);r(r.S,"Number",{isInteger:n(110)})},function(e,t,n){var r=n(2);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(2),a=n(110),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return a(e)&&i(e)<=9007199254740991}})},function(e,t,n){var r=n(2);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(2);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(2),a=n(108);r(r.S+r.F*(Number.parseFloat!=a),"Number",{parseFloat:a})},function(e,t,n){var r=n(2),a=n(107);r(r.S+r.F*(Number.parseInt!=a),"Number",{parseInt:a})},function(e,t,n){var r=n(2),a=n(111),i=Math.sqrt,o=Math.acosh;r(r.S+r.F*!(o&&710==Math.floor(o(Number.MAX_VALUE))&&o(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:a(e-1+i(e-1)*i(e+1))}})},function(e,t,n){var r=n(2),a=Math.asinh;r(r.S+r.F*!(a&&1/a(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(e,t,n){var r=n(2),a=Math.atanh;r(r.S+r.F*!(a&&1/a(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(2),a=n(78);r(r.S,"Math",{cbrt:function(e){return a(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(2),a=Math.exp;r(r.S,"Math",{cosh:function(e){return(a(e=+e)+a(-e))/2}})},function(e,t,n){var r=n(2),a=n(79);r(r.S+r.F*(a!=Math.expm1),"Math",{expm1:a})},function(e,t,n){var r=n(2);r(r.S,"Math",{fround:n(112)})},function(e,t,n){var r=n(2),a=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,i=0,o=0,s=arguments.length,u=0;o0?(r=n/u)*r:n;return u===1/0?1/0:u*Math.sqrt(i)}})},function(e,t,n){var r=n(2),a=Math.imul;r(r.S+r.F*n(5)((function(){return-5!=a(4294967295,5)||2!=a.length})),"Math",{imul:function(e,t){var n=+e,r=+t,a=65535&n,i=65535&r;return 0|a*i+((65535&n>>>16)*i+a*(65535&r>>>16)<<16>>>0)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var r=n(2);r(r.S,"Math",{log1p:n(111)})},function(e,t,n){var r=n(2);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(2);r(r.S,"Math",{sign:n(78)})},function(e,t,n){var r=n(2),a=n(79),i=Math.exp;r(r.S+r.F*n(5)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(a(e)-a(-e))/2:(i(e-1)-i(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(2),a=n(79),i=Math.exp;r(r.S,"Math",{tanh:function(e){var t=a(e=+e),n=a(-e);return t==1/0?1:n==1/0?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){var r=n(2);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(2),a=n(38),i=String.fromCharCode,o=String.fromCodePoint;r(r.S+r.F*(!!o&&1!=o.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,o=0;r>o;){if(t=+arguments[o++],a(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(2),a=n(18),i=n(8);r(r.S,"String",{raw:function(e){for(var t=a(e.raw),n=i(t.length),r=arguments.length,o=[],s=0;n>s;)o.push(String(t[s++])),s=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(2),a=n(58)(!1);r(r.P,"String",{codePointAt:function(e){return a(this,e)}})},function(e,t,n){"use strict";var r=n(2),a=n(8),i=n(82),o="".endsWith;r(r.P+r.F*n(83)("endsWith"),"String",{endsWith:function(e){var t=i(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=a(t.length),s=void 0===n?r:Math.min(a(n),r),u=String(e);return o?o.call(t,u,s):t.slice(s-u.length,s)===u}})},function(e,t,n){"use strict";var r=n(2),a=n(82);r(r.P+r.F*n(83)("includes"),"String",{includes:function(e){return!!~a(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(2);r(r.P,"String",{repeat:n(77)})},function(e,t,n){"use strict";var r=n(2),a=n(8),i=n(82),o="".startsWith;r(r.P+r.F*n(83)("startsWith"),"String",{startsWith:function(e){var t=i(this,e,"startsWith"),n=a(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return o?o.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(16)("anchor",(function(e){return function(t){return e(this,"a","name",t)}}))},function(e,t,n){"use strict";n(16)("big",(function(e){return function(){return e(this,"big","","")}}))},function(e,t,n){"use strict";n(16)("blink",(function(e){return function(){return e(this,"blink","","")}}))},function(e,t,n){"use strict";n(16)("bold",(function(e){return function(){return e(this,"b","","")}}))},function(e,t,n){"use strict";n(16)("fixed",(function(e){return function(){return e(this,"tt","","")}}))},function(e,t,n){"use strict";n(16)("fontcolor",(function(e){return function(t){return e(this,"font","color",t)}}))},function(e,t,n){"use strict";n(16)("fontsize",(function(e){return function(t){return e(this,"font","size",t)}}))},function(e,t,n){"use strict";n(16)("italics",(function(e){return function(){return e(this,"i","","")}}))},function(e,t,n){"use strict";n(16)("link",(function(e){return function(t){return e(this,"a","href",t)}}))},function(e,t,n){"use strict";n(16)("small",(function(e){return function(){return e(this,"small","","")}}))},function(e,t,n){"use strict";n(16)("strike",(function(e){return function(){return e(this,"strike","","")}}))},function(e,t,n){"use strict";n(16)("sub",(function(e){return function(){return e(this,"sub","","")}}))},function(e,t,n){"use strict";n(16)("sup",(function(e){return function(){return e(this,"sup","","")}}))},function(e,t,n){var r=n(2);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(26);r(r.P+r.F*n(5)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(e){var t=a(this),n=i(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var r=n(2),a=n(356);r(r.P+r.F*(Date.prototype.toISOString!==a),"Date",{toISOString:a})},function(e,t,n){"use strict";var r=n(5),a=Date.prototype.getTime,i=Date.prototype.toISOString,o=function(e){return e>9?e:"0"+e};e.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-50000000000001))}))||!r((function(){i.call(new Date(NaN))}))?function(){if(!isFinite(a.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+o(e.getUTCMonth()+1)+"-"+o(e.getUTCDate())+"T"+o(e.getUTCHours())+":"+o(e.getUTCMinutes())+":"+o(e.getUTCSeconds())+"."+(n>99?n:"0"+o(n))+"Z"}:i},function(e,t,n){var r=Date.prototype,a=r.toString,i=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(15)(r,"toString",(function(){var e=i.call(this);return e==e?a.call(this):"Invalid Date"}))},function(e,t,n){var r=n(7)("toPrimitive"),a=Date.prototype;r in a||n(14)(a,r,n(359))},function(e,t,n){"use strict";var r=n(3),a=n(26);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return a(r(this),"number"!=e)}},function(e,t,n){var r=n(2);r(r.S,"Array",{isArray:n(57)})},function(e,t,n){"use strict";var r=n(22),a=n(2),i=n(12),o=n(113),s=n(84),u=n(8),l=n(85),d=n(86);a(a.S+a.F*!n(60)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,a,c,f=i(e),_="function"==typeof this?this:Array,m=arguments.length,h=m>1?arguments[1]:void 0,p=void 0!==h,y=0,M=d(f);if(p&&(h=r(h,m>2?arguments[2]:void 0,2)),null==M||_==Array&&s(M))for(n=new _(t=u(f.length));t>y;y++)l(n,y,p?h(f[y],y):f[y]);else for(c=M.call(f),n=new _;!(a=c.next()).done;y++)l(n,y,p?o(c,h,[a.value,y],!0):a.value);return n.length=y,n}})},function(e,t,n){"use strict";var r=n(2),a=n(85);r(r.S+r.F*n(5)((function(){function e(){}return!(Array.of.call(e)instanceof e)})),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)a(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(2),a=n(18),i=[].join;r(r.P+r.F*(n(51)!=Object||!n(25)(i)),"Array",{join:function(e){return i.call(a(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(2),a=n(73),i=n(23),o=n(38),s=n(8),u=[].slice;r(r.P+r.F*n(5)((function(){a&&u.call(a)})),"Array",{slice:function(e,t){var n=s(this.length),r=i(this);if(t=void 0===t?n:t,"Array"==r)return u.call(this,e,t);for(var a=o(e,n),l=o(t,n),d=s(l-a),c=new Array(d),f=0;f1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(2);r(r.P,"Array",{copyWithin:n(115)}),n(34)("copyWithin")},function(e,t,n){var r=n(2);r(r.P,"Array",{fill:n(88)}),n(34)("fill")},function(e,t,n){"use strict";var r=n(2),a=n(29)(5),i=!0;"find"in[]&&Array(1).find((function(){i=!1})),r(r.P+r.F*i,"Array",{find:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(34)("find")},function(e,t,n){"use strict";var r=n(2),a=n(29)(6),i="findIndex",o=!0;i in[]&&Array(1)[i]((function(){o=!1})),r(r.P+r.F*o,"Array",{findIndex:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(34)(i)},function(e,t,n){n(41)("Array")},function(e,t,n){var r=n(4),a=n(76),i=n(11).f,o=n(40).f,s=n(59),u=n(53),l=r.RegExp,d=l,c=l.prototype,f=/a/g,_=/a/g,m=new l(f)!==f;if(n(10)&&(!m||n(5)((function(){return _[n(7)("match")]=!1,l(f)!=f||l(_)==_||"/a/i"!=l(f,"i")})))){l=function(e,t){var n=this instanceof l,r=s(e),i=void 0===t;return!n&&r&&e.constructor===l&&i?e:a(m?new d(r&&!i?e.source:e,t):d((r=e instanceof l)?e.source:e,r&&i?u.call(e):t),n?this:c,l)};for(var h=function(e){e in l||i(l,e,{configurable:!0,get:function(){return d[e]},set:function(t){d[e]=t}})},p=o(d),y=0;p.length>y;)h(p[y++]);c.constructor=l,l.prototype=c,n(15)(r,"RegExp",l)}n(41)("RegExp")},function(e,t,n){"use strict";n(118);var r=n(3),a=n(53),i=n(10),o=/./.toString,s=function(e){n(15)(RegExp.prototype,"toString",e,!0)};n(5)((function(){return"/a/b"!=o.call({source:"a",flags:"b"})}))?s((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!i&&e instanceof RegExp?a.call(e):void 0)})):"toString"!=o.name&&s((function(){return o.call(this)}))},function(e,t,n){"use strict";var r=n(3),a=n(8),i=n(91),o=n(61);n(62)("match",1,(function(e,t,n,s){return[function(n){var r=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=s(n,e,this);if(t.done)return t.value;var u=r(e),l=String(this);if(!u.global)return o(u,l);var d=u.unicode;u.lastIndex=0;for(var c,f=[],_=0;null!==(c=o(u,l));){var m=String(c[0]);f[_]=m,""===m&&(u.lastIndex=i(l,a(u.lastIndex),d)),_++}return 0===_?null:f}]}))},function(e,t,n){"use strict";var r=n(3),a=n(12),i=n(8),o=n(24),s=n(91),u=n(61),l=Math.max,d=Math.min,c=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,_=/\$([$&`']|\d\d?)/g;n(62)("replace",2,(function(e,t,n,m){return[function(r,a){var i=e(this),o=null==r?void 0:r[t];return void 0!==o?o.call(r,i,a):n.call(String(i),r,a)},function(e,t){var a=m(n,e,this,t);if(a.done)return a.value;var c=r(e),f=String(this),_="function"==typeof t;_||(t=String(t));var p=c.global;if(p){var y=c.unicode;c.lastIndex=0}for(var M=[];;){var v=u(c,f);if(null===v)break;if(M.push(v),!p)break;""===String(v[0])&&(c.lastIndex=s(f,i(c.lastIndex),y))}for(var g,L="",k=0,Y=0;Y=k&&(L+=f.slice(k,w)+j,k=w+b.length)}return L+f.slice(k)}];function h(e,t,r,i,o,s){var u=r+e.length,l=i.length,d=_;return void 0!==o&&(o=a(o),d=f),n.call(s,d,(function(n,a){var s;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(u);case"<":s=o[a.slice(1,-1)];break;default:var d=+a;if(0===d)return n;if(d>l){var f=c(d/10);return 0===f?n:f<=l?void 0===i[f-1]?a.charAt(1):i[f-1]+a.charAt(1):n}s=i[d-1]}return void 0===s?"":s}))}}))},function(e,t,n){"use strict";var r=n(3),a=n(104),i=n(61);n(62)("search",1,(function(e,t,n,o){return[function(n){var r=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=o(n,e,this);if(t.done)return t.value;var s=r(e),u=String(this),l=s.lastIndex;a(l,0)||(s.lastIndex=0);var d=i(s,u);return a(s.lastIndex,l)||(s.lastIndex=l),null===d?-1:d.index}]}))},function(e,t,n){"use strict";var r=n(59),a=n(3),i=n(54),o=n(91),s=n(8),u=n(61),l=n(90),d=n(5),c=Math.min,f=[].push,_="length",m=!d((function(){RegExp(4294967295,"y")}));n(62)("split",2,(function(e,t,n,d){var h;return h="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[_]||2!="ab".split(/(?:ab)*/)[_]||4!=".".split(/(.?)(.?)/)[_]||".".split(/()()/)[_]>1||"".split(/.?/)[_]?function(e,t){var a=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(a,e,t);for(var i,o,s,u=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,m=void 0===t?4294967295:t>>>0,h=new RegExp(e.source,d+"g");(i=l.call(h,a))&&!((o=h.lastIndex)>c&&(u.push(a.slice(c,i.index)),i[_]>1&&i.index=m));)h.lastIndex===i.index&&h.lastIndex++;return c===a[_]?!s&&h.test("")||u.push(""):u.push(a.slice(c)),u[_]>m?u.slice(0,m):u}:"0".split(void 0,0)[_]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var a=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,a,r):h.call(String(a),n,r)},function(e,t){var r=d(h,e,this,t,h!==n);if(r.done)return r.value;var l=a(e),f=String(this),_=i(l,RegExp),p=l.unicode,y=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(m?"y":"g"),M=new _(m?l:"^(?:"+l.source+")",y),v=void 0===t?4294967295:t>>>0;if(0===v)return[];if(0===f.length)return null===u(M,f)?[f]:[];for(var g=0,L=0,k=[];Li;)o(n[i++]);e._c=[],e._n=!1,t&&!e._h&&P(e)}))}},P=function(e){y.call(u,(function(){var t,n,r,a=e._v,i=F(e);if(i&&(t=g((function(){S?b.emit("unhandledRejection",a,e):(n=u.onunhandledrejection)?n({promise:e,reason:a}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",a)})),e._h=S||F(e)?2:1),e._a=void 0,i&&t.e)throw t.v}))},F=function(e){return 1!==e._h&&0===(e._a||e._c).length},A=function(e){y.call(u,(function(){var t;S?b.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})}))},N=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),O(t,!0))},C=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw Y("Promise can't be resolved itself");(t=H(e))?M((function(){var r={_w:n,_d:!1};try{t.call(e,l(C,r,1),l(N,r,1))}catch(e){N.call(r,e)}})):(n._v=e,n._s=1,O(n,!1))}catch(e){N.call({_w:n,_d:!1},e)}}};E||(D=function(e){m(this,D,"Promise","_h"),_(e),r.call(this);try{e(l(C,this,1),l(N,this,1))}catch(e){N.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(44)(D.prototype,{then:function(e,t){var n=j(p(this,D));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=S?b.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r;this.promise=e,this.resolve=l(C,e,1),this.reject=l(N,e,1)},v.f=j=function(e){return e===D||e===o?new i(e):a(e)}),c(c.G+c.W+c.F*!E,{Promise:D}),n(46)(D,"Promise"),n(41)("Promise"),o=n(21).Promise,c(c.S+c.F*!E,"Promise",{reject:function(e){var t=j(this);return(0,t.reject)(e),t.promise}}),c(c.S+c.F*(s||!E),"Promise",{resolve:function(e){return k(s&&this===o?D:this,e)}}),c(c.S+c.F*!(E&&n(60)((function(e){D.all(e).catch(x)}))),"Promise",{all:function(e){var t=this,n=j(t),r=n.resolve,a=n.reject,i=g((function(){var n=[],i=0,o=1;h(e,!1,(function(e){var s=i++,u=!1;n.push(void 0),o++,t.resolve(e).then((function(e){u||(u=!0,n[s]=e,--o||r(n))}),a)})),--o||r(n)}));return i.e&&a(i.v),n.promise},race:function(e){var t=this,n=j(t),r=n.reject,a=g((function(){h(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return a.e&&r(a.v),n.promise}})},function(e,t,n){"use strict";var r=n(125),a=n(45);n(64)("WeakSet",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(a(this,"WeakSet"),e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(2),a=n(65),i=n(95),o=n(3),s=n(38),u=n(8),l=n(6),d=n(4).ArrayBuffer,c=n(54),f=i.ArrayBuffer,_=i.DataView,m=a.ABV&&d.isView,h=f.prototype.slice,p=a.VIEW;r(r.G+r.W+r.F*(d!==f),{ArrayBuffer:f}),r(r.S+r.F*!a.CONSTR,"ArrayBuffer",{isView:function(e){return m&&m(e)||l(e)&&p in e}}),r(r.P+r.U+r.F*n(5)((function(){return!new f(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(e,t){if(void 0!==h&&void 0===t)return h.call(o(this),e);for(var n=o(this).byteLength,r=s(e,n),a=s(void 0===t?n:t,n),i=new(c(this,f))(u(a-r)),l=new _(this),d=new _(i),m=0;r=t.length)return{value:void 0,done:!0}}while(!((e=t[this._i++])in this._t));return{value:e,done:!1}})),r(r.S,"Reflect",{enumerate:function(e){return new i(e)}})},function(e,t,n){var r=n(19),a=n(20),i=n(17),o=n(2),s=n(6),u=n(3);o(o.S,"Reflect",{get:function e(t,n){var o,l,d=arguments.length<3?t:arguments[2];return u(t)===d?t[n]:(o=r.f(t,n))?i(o,"value")?o.value:void 0!==o.get?o.get.call(d):void 0:s(l=a(t))?e(l,n,d):void 0}})},function(e,t,n){var r=n(19),a=n(2),i=n(3);a(a.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(i(e),t)}})},function(e,t,n){var r=n(2),a=n(20),i=n(3);r(r.S,"Reflect",{getPrototypeOf:function(e){return a(i(e))}})},function(e,t,n){var r=n(2);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(2),a=n(3),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return a(e),!i||i(e)}})},function(e,t,n){var r=n(2);r(r.S,"Reflect",{ownKeys:n(127)})},function(e,t,n){var r=n(2),a=n(3),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){a(e);try{return i&&i(e),!0}catch(e){return!1}}})},function(e,t,n){var r=n(11),a=n(19),i=n(20),o=n(17),s=n(2),u=n(35),l=n(3),d=n(6);s(s.S,"Reflect",{set:function e(t,n,s){var c,f,_=arguments.length<4?t:arguments[3],m=a.f(l(t),n);if(!m){if(d(f=i(t)))return e(f,n,s,_);m=u(0)}if(o(m,"value")){if(!1===m.writable||!d(_))return!1;if(c=a.f(_,n)){if(c.get||c.set||!1===c.writable)return!1;c.value=s,r.f(_,n,c)}else r.f(_,n,u(0,s));return!0}return void 0!==m.set&&(m.set.call(_,s),!0)}})},function(e,t,n){var r=n(2),a=n(74);a&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){a.check(e,t);try{return a.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){"use strict";var r=n(2),a=n(55)(!0);r(r.P,"Array",{includes:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(34)("includes")},function(e,t,n){"use strict";var r=n(2),a=n(128),i=n(12),o=n(8),s=n(13),u=n(87);r(r.P,"Array",{flatMap:function(e){var t,n,r=i(this);return s(e),t=o(r.length),n=u(r,0),a(n,r,r,t,0,1,e,arguments[1]),n}}),n(34)("flatMap")},function(e,t,n){"use strict";var r=n(2),a=n(128),i=n(12),o=n(8),s=n(24),u=n(87);r(r.P,"Array",{flatten:function(){var e=arguments[0],t=i(this),n=o(t.length),r=u(t,0);return a(r,t,t,n,0,void 0===e?1:s(e)),r}}),n(34)("flatten")},function(e,t,n){"use strict";var r=n(2),a=n(58)(!0),i=n(5)((function(){return"𠮷"!=="𠮷".at(0)}));r(r.P+r.F*i,"String",{at:function(e){return a(this,e)}})},function(e,t,n){"use strict";var r=n(2),a=n(129),i=n(63),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*o,"String",{padStart:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){"use strict";var r=n(2),a=n(129),i=n(63),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*o,"String",{padEnd:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){"use strict";n(48)("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},function(e,t,n){"use strict";n(48)("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},function(e,t,n){"use strict";var r=n(2),a=n(27),i=n(8),o=n(59),s=n(53),u=RegExp.prototype,l=function(e,t){this._r=e,this._s=t};n(81)(l,"RegExp String",(function(){var e=this._r.exec(this._s);return{value:e,done:null===e}})),r(r.P,"String",{matchAll:function(e){if(a(this),!o(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in u?String(e.flags):s.call(e),r=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=i(e.lastIndex),new l(r,t)}})},function(e,t,n){n(70)("asyncIterator")},function(e,t,n){n(70)("observable")},function(e,t,n){var r=n(2),a=n(127),i=n(18),o=n(19),s=n(85);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=i(e),u=o.f,l=a(r),d={},c=0;l.length>c;)void 0!==(n=u(r,t=l[c++]))&&s(d,t,n);return d}})},function(e,t,n){var r=n(2),a=n(130)(!1);r(r.S,"Object",{values:function(e){return a(e)}})},function(e,t,n){var r=n(2),a=n(130)(!0);r(r.S,"Object",{entries:function(e){return a(e)}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(13),o=n(11);n(10)&&r(r.P+n(66),"Object",{__defineGetter__:function(e,t){o.f(a(this),e,{get:i(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(13),o=n(11);n(10)&&r(r.P+n(66),"Object",{__defineSetter__:function(e,t){o.f(a(this),e,{set:i(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(26),o=n(20),s=n(19).f;n(10)&&r(r.P+n(66),"Object",{__lookupGetter__:function(e){var t,n=a(this),r=i(e,!0);do{if(t=s(n,r))return t.get}while(n=o(n))}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(26),o=n(20),s=n(19).f;n(10)&&r(r.P+n(66),"Object",{__lookupSetter__:function(e){var t,n=a(this),r=i(e,!0);do{if(t=s(n,r))return t.set}while(n=o(n))}})},function(e,t,n){var r=n(2);r(r.P+r.R,"Map",{toJSON:n(131)("Map")})},function(e,t,n){var r=n(2);r(r.P+r.R,"Set",{toJSON:n(131)("Set")})},function(e,t,n){n(67)("Map")},function(e,t,n){n(67)("Set")},function(e,t,n){n(67)("WeakMap")},function(e,t,n){n(67)("WeakSet")},function(e,t,n){n(68)("Map")},function(e,t,n){n(68)("Set")},function(e,t,n){n(68)("WeakMap")},function(e,t,n){n(68)("WeakSet")},function(e,t,n){var r=n(2);r(r.G,{global:n(4)})},function(e,t,n){var r=n(2);r(r.S,"System",{global:n(4)})},function(e,t,n){var r=n(2),a=n(23);r(r.S,"Error",{isError:function(e){return"Error"===a(e)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{clamp:function(e,t,n){return Math.min(n,Math.max(t,e))}})},function(e,t,n){var r=n(2);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(e,t,n){var r=n(2),a=180/Math.PI;r(r.S,"Math",{degrees:function(e){return e*a}})},function(e,t,n){var r=n(2),a=n(133),i=n(112);r(r.S,"Math",{fscale:function(e,t,n,r,o){return i(a(e,t,n,r,o))}})},function(e,t,n){var r=n(2);r(r.S,"Math",{iaddh:function(e,t,n,r){var a=e>>>0,i=n>>>0;return(t>>>0)+(r>>>0)+((a&i|(a|i)&~(a+i>>>0))>>>31)|0}})},function(e,t,n){var r=n(2);r(r.S,"Math",{isubh:function(e,t,n,r){var a=e>>>0,i=n>>>0;return(t>>>0)-(r>>>0)-((~a&i|~(a^i)&a-i>>>0)>>>31)|0}})},function(e,t,n){var r=n(2);r(r.S,"Math",{imulh:function(e,t){var n=+e,r=+t,a=65535&n,i=65535&r,o=n>>16,s=r>>16,u=(o*i>>>0)+(a*i>>>16);return o*s+(u>>16)+((a*s>>>0)+(65535&u)>>16)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(e,t,n){var r=n(2),a=Math.PI/180;r(r.S,"Math",{radians:function(e){return e*a}})},function(e,t,n){var r=n(2);r(r.S,"Math",{scale:n(133)})},function(e,t,n){var r=n(2);r(r.S,"Math",{umulh:function(e,t){var n=+e,r=+t,a=65535&n,i=65535&r,o=n>>>16,s=r>>>16,u=(o*i>>>0)+(a*i>>>16);return o*s+(u>>>16)+((a*s>>>0)+(65535&u)>>>16)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{signbit:function(e){return(e=+e)!=e?e:0==e?1/e==1/0:e>0}})},function(e,t,n){"use strict";var r=n(2),a=n(21),i=n(4),o=n(54),s=n(120);r(r.P+r.R,"Promise",{finally:function(e){var t=o(this,a.Promise||i.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},function(e,t,n){"use strict";var r=n(2),a=n(94),i=n(119);r(r.S,"Promise",{try:function(e){var t=a.f(this),n=i(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){var r=n(31),a=n(3),i=r.key,o=r.set;r.exp({defineMetadata:function(e,t,n,r){o(e,t,a(n),i(r))}})},function(e,t,n){var r=n(31),a=n(3),i=r.key,o=r.map,s=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:i(arguments[2]),r=o(a(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var u=s.get(t);return u.delete(n),!!u.size||s.delete(t)}})},function(e,t,n){var r=n(31),a=n(3),i=n(20),o=r.has,s=r.get,u=r.key,l=function(e,t,n){if(o(e,t,n))return s(e,t,n);var r=i(t);return null!==r?l(e,r,n):void 0};r.exp({getMetadata:function(e,t){return l(e,a(t),arguments.length<3?void 0:u(arguments[2]))}})},function(e,t,n){var r=n(123),a=n(132),i=n(31),o=n(3),s=n(20),u=i.keys,l=i.key,d=function(e,t){var n=u(e,t),i=s(e);if(null===i)return n;var o=d(i,t);return o.length?n.length?a(new r(n.concat(o))):o:n};i.exp({getMetadataKeys:function(e){return d(o(e),arguments.length<2?void 0:l(arguments[1]))}})},function(e,t,n){var r=n(31),a=n(3),i=r.get,o=r.key;r.exp({getOwnMetadata:function(e,t){return i(e,a(t),arguments.length<3?void 0:o(arguments[2]))}})},function(e,t,n){var r=n(31),a=n(3),i=r.keys,o=r.key;r.exp({getOwnMetadataKeys:function(e){return i(a(e),arguments.length<2?void 0:o(arguments[1]))}})},function(e,t,n){var r=n(31),a=n(3),i=n(20),o=r.has,s=r.key,u=function(e,t,n){if(o(e,t,n))return!0;var r=i(t);return null!==r&&u(e,r,n)};r.exp({hasMetadata:function(e,t){return u(e,a(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(31),a=n(3),i=r.has,o=r.key;r.exp({hasOwnMetadata:function(e,t){return i(e,a(t),arguments.length<3?void 0:o(arguments[2]))}})},function(e,t,n){var r=n(31),a=n(3),i=n(13),o=r.key,s=r.set;r.exp({metadata:function(e,t){return function(n,r){s(e,t,(void 0!==r?a:i)(n),o(r))}}})},function(e,t,n){var r=n(2),a=n(93)(),i=n(4).process,o="process"==n(23)(i);r(r.G,{asap:function(e){var t=o&&i.domain;a(t?t.bind(e):e)}})},function(e,t,n){"use strict";var r=n(2),a=n(4),i=n(21),o=n(93)(),s=n(7)("observable"),u=n(13),l=n(3),d=n(42),c=n(44),f=n(14),_=n(43),m=_.RETURN,h=function(e){return null==e?void 0:u(e)},p=function(e){var t=e._c;t&&(e._c=void 0,t())},y=function(e){return void 0===e._o},M=function(e){y(e)||(e._o=void 0,p(e))},v=function(e,t){l(e),this._c=void 0,this._o=e,e=new g(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(t){return void e.error(t)}y(this)&&p(this)};v.prototype=c({},{unsubscribe:function(){M(this)}});var g=function(e){this._s=e};g.prototype=c({},{next:function(e){var t=this._s;if(!y(t)){var n=t._o;try{var r=h(n.next);if(r)return r.call(n,e)}catch(e){try{M(t)}finally{throw e}}}},error:function(e){var t=this._s;if(y(t))throw e;var n=t._o;t._o=void 0;try{var r=h(n.error);if(!r)throw e;e=r.call(n,e)}catch(e){try{p(t)}finally{throw e}}return p(t),e},complete:function(e){var t=this._s;if(!y(t)){var n=t._o;t._o=void 0;try{var r=h(n.complete);e=r?r.call(n,e):void 0}catch(e){try{p(t)}finally{throw e}}return p(t),e}}});var L=function(e){d(this,L,"Observable","_f")._f=u(e)};c(L.prototype,{subscribe:function(e){return new v(e,this._f)},forEach:function(e){var t=this;return new(i.Promise||a.Promise)((function(n,r){u(e);var a=t.subscribe({next:function(t){try{return e(t)}catch(e){r(e),a.unsubscribe()}},error:r,complete:n})}))}}),c(L,{from:function(e){var t="function"==typeof this?this:L,n=h(l(e)[s]);if(n){var r=l(n.call(e));return r.constructor===t?r:new t((function(e){return r.subscribe(e)}))}return new t((function(t){var n=!1;return o((function(){if(!n){try{if(_(e,!1,(function(e){if(t.next(e),n)return m}))===m)return}catch(e){if(n)throw e;return void t.error(e)}t.complete()}})),function(){n=!0}}))},of:function(){for(var e=0,t=arguments.length,n=new Array(t);e2,a=!!r&&o.call(arguments,2);return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,a)}:t,n)}};a(a.G+a.B+a.F*s,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},function(e,t,n){var r=n(2),a=n(92);r(r.G+r.B,{setImmediate:a.set,clearImmediate:a.clear})},function(e,t,n){for(var r=n(89),a=n(37),i=n(15),o=n(4),s=n(14),u=n(49),l=n(7),d=l("iterator"),c=l("toStringTag"),f=u.Array,_={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=a(_),h=0;h=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),b(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;b(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}}}function h(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),o=new w(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(a,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw i;return D()}for(n.method=a,n.arg=i;;){var o=n.delegate;if(o){var s=k(o,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=p(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,o),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function y(){}function M(){}function v(){}function g(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function L(e){function n(t,a,i,o){var s=p(e[t],e,a);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then((function(e){n("next",e,i,o)}),(function(e){n("throw",e,i,o)})):Promise.resolve(l).then((function(e){u.value=e,i(u)}),o)}o(s.arg)}var a;"object"==typeof t.process&&t.process.domain&&(n=t.process.domain.bind(n)),this._invoke=function(e,t){function r(){return new Promise((function(r,a){n(e,t,r,a)}))}return a=a?a.then(r,r):r()}}function k(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=p(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function Y(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function b(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Y,this),this.reset(!0)}function T(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n button {\n margin: 15px;\n}\n\n.file-upload-container {\n border: dotted;\n margin: 18px;\n padding: 15px;\n min-height: 150px;\n text-align: center;\n cursor: pointer;\n}\n\n.file-upload-container > div > div {\n display: grid;\n grid-template-columns: auto auto auto auto;\n}\n\n.uploaded-file {\n max-width: 120px;\n position: relative;\n margin-bottom: 15px;\n}\n\n.uploaded-file > img {\n width: 50px;\n height: 56px;\n border: 1px solid black;\n}\n\n.uploaded-file > span {\n display: block;\n word-wrap: break-word;\n}\n\n.uploaded-file > i:nth-child(3) {\n color: red;\n position: absolute;\n top: -9px;\n right: 25px;\n cursor: pointer;\n}\n\n.clickable { cursor: pointer; }\n.token-revoked td { text-decoration: line-through; }\n\n.token-table td:not(:first-child), .token-table th:not(:first-child) {\n text-align: center;\n}\n\n.file-table td:nth-child(n+3), .file-table th:nth-child(n+3) {\n text-align: center;\n}\n\n.file-table tr, .file-table td {\n height: 40px;\n}",""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var a=(o=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(u," */")),i=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(i).concat([a]).join("\n")}var o,s,u;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var i=0;i=0&&c.splice(t,1)}function y(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function(){0;return n.nc}();r&&(e.attrs.nonce=r)}return M(t,e.attrs),h(e,t),t}function M(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function v(e,t){var n,r,a,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var o=d++;n=l||(l=y(t)),r=k.bind(null,n,o,!1),a=k.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",M(t,e.attrs),h(e,t),t}(t),r=b.bind(null,n,t),a=function(){p(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),r=Y.bind(null,n),a=function(){p(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else a()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=m(e,t);return _(n,t),function(e){for(var r=[],a=0;a1&&void 0!==arguments[1]?arguments[1]:null;return this.apiCall("file/delete",{id:e,token:t})}},{key:"revokeToken",value:function(e){return this.apiCall("file/revokeToken",{token:e})}},{key:"upload",value:(a=u(regeneratorRuntime.mark((function e(t){var n,r,a,i,o,s,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=u.length>1&&void 0!==u[1]?u[1]:null,r=u.length>2&&void 0!==u[2]?u[2]:null,a=this.csrfToken(),i=new FormData,o=0;o0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0)&&!(r=i.next()).done;)o.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}Object.create;var g=new Map([["avi","video/avi"],["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["pdf","application/pdf"],["png","image/png"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]]);function L(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=g.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"==typeof t?t:"string"==typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var k=[".DS_Store","Thumbs.db"];function Y(e){return(null!==e.target&&e.target.files?T(e.target.files):[]).map((function(e){return L(e)}))}function b(e,t){return y(this,void 0,void 0,(function(){var n;return M(this,(function(r){switch(r.label){case 0:return e.items?(n=T(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(D))]):[3,2];case 1:return[2,w(S(r.sent()))];case 2:return[2,w(T(e.files).map((function(e){return L(e)})))]}}))}))}function w(e){return e.filter((function(e){return-1===k.indexOf(e.name)}))}function T(e){for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,C(n)];if(e.sizen)return[!1,C(n)]}return[!0,null]}function U(e){return null!=e}function J(e){var t=e.files,n=e.accept,r=e.minSize,a=e.maxSize,i=e.multiple,o=e.maxFiles;return!(!i&&t.length>1||i&&o>=1&&t.length>o)&&t.every((function(e){var t=F(R(e,n),1)[0],i=F(I(e,r,a),1)[0];return t&&i}))}function V(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function G(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function B(e){e.preventDefault()}function $(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function K(e){return-1!==e.indexOf("Edge/")}function q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return $(e)||K(e)}function Q(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var oe=Object(r.forwardRef)((function(e,t){var n=e.children,i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=re(re({},se),e),n=t.accept,a=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,s=t.minSize,u=t.multiple,l=t.maxFiles,d=t.onDragEnter,c=t.onDragLeave,f=t.onDragOver,_=t.onDrop,m=t.onDropAccepted,h=t.onDropRejected,p=t.onFileDialogCancel,y=t.preventDropOnDocument,M=t.noClick,v=t.noKeyboard,g=t.noDrag,L=t.noDragEventsBubbling,k=Object(r.useRef)(null),Y=Object(r.useRef)(null),b=Object(r.useReducer)(de,le),w=X(b,2),T=w[0],D=w[1],S=T.isFocused,x=T.isFileDialogActive,j=T.draggedFiles,E=Object(r.useCallback)((function(){Y.current&&(D({type:"openDialog"}),Y.current.value=null,Y.current.click())}),[D]),H=function(){x&&setTimeout((function(){Y.current&&(Y.current.files.length||(D({type:"closeDialog"}),"function"==typeof p&&p()))}),300)};Object(r.useEffect)((function(){return window.addEventListener("focus",H,!1),function(){window.removeEventListener("focus",H,!1)}}),[Y,x,p]);var O=Object(r.useCallback)((function(e){k.current&&k.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),E()))}),[k,Y]),P=Object(r.useCallback)((function(){D({type:"focus"})}),[]),F=Object(r.useCallback)((function(){D({type:"blur"})}),[]),A=Object(r.useCallback)((function(){M||(q()?setTimeout(E,0):E())}),[Y,M]),N=Object(r.useRef)([]),C=function(e){k.current&&k.current.contains(e.target)||(e.preventDefault(),N.current=[])};Object(r.useEffect)((function(){return y&&(document.addEventListener("dragover",B,!1),document.addEventListener("drop",C,!1)),function(){y&&(document.removeEventListener("dragover",B),document.removeEventListener("drop",C))}}),[k,y]);var W=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),oe(e),N.current=[].concat(Z(N.current),[e.target]),G(e)&&Promise.resolve(i(e)).then((function(t){V(e)&&!L||(D({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),d&&d(e))}))}),[i,d,L]),U=Object(r.useCallback)((function(e){if(e.preventDefault(),e.persist(),oe(e),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return G(e)&&f&&f(e),!1}),[f,L]),$=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),oe(e);var t=N.current.filter((function(e){return k.current&&k.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),N.current=t,t.length>0||(D({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),G(e)&&c&&c(e))}),[k,c,L]),K=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),oe(e),N.current=[],G(e)&&Promise.resolve(i(e)).then((function(t){if(!V(e)||L){var r=[],a=[];t.forEach((function(e){var t=X(R(e,n),2),i=t[0],u=t[1],l=X(I(e,s,o),2),d=l[0],c=l[1];if(i&&d)r.push(e);else{var f=[u,c].filter((function(e){return e}));a.push({file:e,errors:f})}})),(!u&&r.length>1||u&&l>=1&&r.length>l)&&(r.forEach((function(e){a.push({file:e,errors:[z]})})),r.splice(0)),D({acceptedFiles:r,fileRejections:a,type:"setFiles"}),_&&_(r,a,e),a.length>0&&h&&h(a,e),r.length>0&&m&&m(r,e)}})),D({type:"reset"})}),[u,n,s,o,l,i,_,m,h,L]),ee=function(e){return a?null:e},te=function(e){return v?null:ee(e)},ne=function(e){return g?null:ee(e)},oe=function(e){L&&e.stopPropagation()},ue=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onKeyDown,i=e.onFocus,o=e.onBlur,s=e.onClick,u=e.onDragEnter,l=e.onDragOver,d=e.onDragLeave,c=e.onDrop,f=ie(e,["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"]);return re(re(ae({onKeyDown:te(Q(r,O)),onFocus:te(Q(i,P)),onBlur:te(Q(o,F)),onClick:ee(Q(s,A)),onDragEnter:ne(Q(u,W)),onDragOver:ne(Q(l,U)),onDragLeave:ne(Q(d,$)),onDrop:ne(Q(c,K))},n,k),a||v?{}:{tabIndex:0}),f)}}),[k,O,P,F,A,W,U,$,K,v,g,a]),ce=Object(r.useCallback)((function(e){e.stopPropagation()}),[]),fe=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,a=e.onChange,i=e.onClick,o=ie(e,["refKey","onChange","onClick"]),s=ae({accept:n,multiple:u,type:"file",style:{display:"none"},onChange:ee(Q(a,K)),onClick:ee(Q(i,ce)),autoComplete:"off",tabIndex:-1},r,Y);return re(re({},s),o)}}),[Y,n,u,K,a]),_e=j.length,me=_e>0&&J({files:j,accept:n,minSize:s,maxSize:o,multiple:u,maxFiles:l}),he=_e>0&&!me;return re(re({},T),{},{isDragAccept:me,isDragReject:he,isFocused:S&&!a,getRootProps:ue,getInputProps:fe,rootRef:k,inputRef:Y,open:ee(E)})}(ie(e,["children"])),o=i.open,s=ie(i,["open"]);return Object(r.useImperativeHandle)(t,(function(){return{open:o}}),[o]),a.a.createElement(r.Fragment,null,n(re(re({},s),{},{open:o})))}));oe.displayName="Dropzone";var se={disabled:!1,getFilesFromEvent:function(e){return y(this,void 0,void 0,(function(){return M(this,(function(t){return[2,(n=e,n.dataTransfer&&e.dataTransfer?b(e.dataTransfer,e.type):Y(e))];var n}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1};oe.defaultProps=se,oe.propTypes={children:p.a.func,accept:p.a.oneOfType([p.a.string,p.a.arrayOf(p.a.string)]),multiple:p.a.bool,preventDropOnDocument:p.a.bool,noClick:p.a.bool,noKeyboard:p.a.bool,noDrag:p.a.bool,noDragEventsBubbling:p.a.bool,minSize:p.a.number,maxSize:p.a.number,maxFiles:p.a.number,disabled:p.a.bool,getFilesFromEvent:p.a.func,onFileDialogCancel:p.a.func,onDragEnter:p.a.func,onDragLeave:p.a.func,onDragOver:p.a.func,onDrop:p.a.func,onDropAccepted:p.a.func,onDropRejected:p.a.func};var ue=oe,le={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function de(e,t){switch(t.type){case"focus":return re(re({},e),{},{isFocused:!0});case"blur":return re(re({},e),{},{isFocused:!1});case"openDialog":return re(re({},e),{},{isFileDialogActive:!0});case"closeDialog":return re(re({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return re(re({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return re(re({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return re(re({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}function ce(e){return(ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _e(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:1,n=48*t,a=64*t,i=e>1?{marginLeft:(e-1)*n+"px"}:{};return r.createElement("svg",{width:n,height:a,xmlns:"http://www.w3.org/2000/svg",style:i},r.createElement("g",null,r.createElement("line",{strokeLinecap:"undefined",strokeLinejoin:"undefined",y2:"0",x2:n/2,y1:a,x1:n/2,strokeWidth:"1.5",stroke:"#000",fill:"none"}),r.createElement("line",{strokeLinecap:"undefined",strokeLinejoin:"undefined",y2:a/2,x2:n,y1:a/2,x1:n/2,fillOpacity:"null",strokeOpacity:"null",strokeWidth:"1.5",stroke:"#000",fill:"none"})))}},{key:"svgEnd",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=48*t,a=64*t,i=e>1?{marginLeft:(e-1)*n+"px"}:{};return r.createElement("svg",{width:n,height:a,xmlns:"http://www.w3.org/2000/svg",style:i},r.createElement("g",null,r.createElement("line",{strokeLinecap:"undefined",strokeLinejoin:"undefined",y2:"0",x2:n/2,y1:a/2,x1:n/2,strokeWidth:"1.5",stroke:"#000",fill:"none"}),r.createElement("line",{strokeLinecap:"undefined",strokeLinejoin:"undefined",y2:a/2,x2:n,y1:a/2,x1:n/2,fillOpacity:"null",strokeOpacity:"null",strokeWidth:"1.5",stroke:"#000",fill:"none"})))}},{key:"createFileIcon",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n="";if(null!==e){var a=["image","text","audio","video"],i=["php","java","python","cpp"],o=["zip","tar","archive"],s=(e=e.toLowerCase().trim()).split("/"),u=pe(s,2),l=u[0],d=u[1];"text"===l&&i.find((function(e){return d.includes(e)}))?n="code":"application"===l&&o.find((function(e){return d.includes(e)}))?n="archive":"application"===l&&"pdf"===d?n="pdf":"application"===l&&(d.indexOf("powerpoint")>-1||d.indexOf("presentation")>-1)?n="powerpoint":"application"===l&&(d.indexOf("word")>-1||d.indexOf("opendocument")>-1)?n="word":"application"===l&&(d.indexOf("excel")>-1||d.indexOf("sheet")>-1)?n="excel":"application"===l&&d.indexOf("directory")>-1?n="folder":a.indexOf(l)>-1&&(n="text"===l?"alt":l)}return"folder"!==n&&(n="file"+(n?"-"+n:n)),r.createElement(m,{icon:n,type:"far",className:"p-1 align-middle fa-"+t+"x"})}},{key:"formatSize",value:function(e){for(var t=["B","KiB","MiB","GiB","TiB"],n=0;n=1024;n++)e/=1024;return e.toFixed(1)+" "+t[n]}},{key:"canUpload",value:function(){return this.state.api.loggedIn||this.state.token.valid&&"upload"===this.state.token.type}},{key:"onAddUploadFiles",value:function(e){var t=this.state.filesToUpload.slice();t.push.apply(t,he(e)),this.setState(_e(_e({},this.state),{},{filesToUpload:t}))}},{key:"getSelectedIds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=[];e=e||this.state.files;for(var r=0,a=Object.values(e);r2&&void 0!==arguments[2]?arguments[2]:null,r=!1,a=null===n?_e({},this.state.files):n;if(a.hasOwnProperty(t)){var i=a[t];r=!0,i.selected=e.target.checked,i.isDirectory&&this.onSelectAll(i.selected,i.items)}else for(var o=0,s=Object.values(a);o1&&void 0!==arguments[1]?arguments[1]:0,a=[],i=0,o=Object.values(e),s=function(){var e=l[u],s=e.name,d=e.uid,c=e.isDirectory?"Directory":e.mimeType,f=e.isDirectory?"":t.formatSize(e.size),_=e.isDirectory?"application/x-directory":e.mimeType,m=t.state.token&&t.state.token.valid?"&token="+t.state.token.value:"",h=r.createElement(r.Fragment,null);n>0&&(h=i===o.length-1?t.svgEnd(n,.75):t.svgMiddle(n,.75)),a.push(r.createElement("tr",{key:"file-"+d,"data-id":d,className:"file-row"},r.createElement("td",null,h,t.createFileIcon(_)),r.createElement("td",null,e.isDirectory?s:r.createElement("a",{href:"/api/file/download?id="+d+m,download:!0},s)),r.createElement("td",null,c),r.createElement("td",null,f),r.createElement("td",null,r.createElement("input",{type:"checkbox",checked:!!e.selected,onChange:function(e){return t.onSelectFile(e,d)}})))),e.isDirectory&&a.push.apply(a,he(t.createFileList(e.items,n+1))),i++},u=0,l=o;u=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(this.state.alerts);try{for(c.s();!(e=c.n()).done;){var f=e.value;l.push(r.createElement("div",{key:"alert-"+d++,className:"alert alert-"+f.type},f.text))}}catch(e){c.e(e)}finally{c.f()}if(s){for(var _=function(e){var n=t.state.filesToUpload[e];u.push(r.createElement("span",{className:"uploaded-file",key:e},t.createFileIcon(n.type,3),r.createElement("span",null,n.name),r.createElement(m,{icon:"times",onClick:function(n){return t.onRemoveUploadedFile(n,e)}})))},h=0;h=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:null;null===t&&(this.setState(Re(Re({},this.state),{},{validatingToken:!0,errorMessage:""})),t=this.state.token.value),this.api.validateToken(t).then((function(n){var r=Re(Re({},e.state),{},{loaded:!0,validatingToken:!1});n.success?(r.token=Re(Re({},e.state.token),{},{valid:!0,validUntil:n.token.valid_until,type:n.token.type}),r.token.value||(r.token.value=t),r.files=n.files):r.errorMessage=n.msg,e.setState(r)}))}},{key:"onUpdateToken",value:function(e){this.setState(Re(Re({},this.state),{},{token:Re(Re({},this.state.token),{},{value:e.target.value})}))}},{key:"render",value:function(){var e=this,t=this,n=!!this.state.errorMessage;if(this.state.loaded){if(this.api.loggedIn||this.state.token.valid){var r=this.api.loggedIn?a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-8 col-md-10 col-sm-12 mx-auto"},a.a.createElement(Ce,{api:this.api}))):a.a.createElement(a.a.Fragment,null);return a.a.createElement("div",{className:"container mt-4"},a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-8 col-md-10 col-sm-12 mx-auto"},a.a.createElement("h2",null,"File Control Panel"),a.a.createElement(be,{files:this.state.files,token:this.state.token,api:this.api}))),r)}return a.a.createElement("div",{className:"container mt-4"},a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-8 col-md-10 col-sm-12 mx-auto"},a.a.createElement("h2",null,"File Control Panel"),a.a.createElement("form",{onSubmit:function(e){return e.preventDefault()}},a.a.createElement("label",{htmlFor:"token"},"Enter a file token to download or upload files"),a.a.createElement("input",{type:"text",className:"form-control",name:"token",placeholder:"Enter token…",maxLength:36,value:this.state.token.value,onChange:function(e){return t.onUpdateToken(e)}}),a.a.createElement("button",{className:"btn btn-success mt-2",onClick:function(){return e.onValidateToken()},disabled:this.state.validatingToken},this.state.validatingToken?a.a.createElement(a.a.Fragment,null,"Validating… ",a.a.createElement(m,{icon:"spinner"})):"Submit")),a.a.createElement("div",{className:"alert alert-danger mt-2",hidden:!n},this.state.errorMessage))))}var i=!0,o=window.location.pathname;if(o.length>1){var s=o.endsWith("/")?o.length-2:o.length-1,u=o.startsWith("/files/")?"/files/".length:1,l=o.substr(u,s);l&&(this.onValidateToken(l),i=!1)}return i&&this.api.fetchUser().then((function(t){t?e.api.listFiles().then((function(t){e.setState(Re(Re({},e.state),{},{loaded:!0,user:e.api.user,files:t.files}))})):e.setState(Re(Re({},e.state),{},{loaded:!0,user:e.api.user}))})),a.a.createElement(a.a.Fragment,null,"Loading… ",a.a.createElement(m,{icon:"spinner"}))}}])&&Ue(t.prototype,n),r&&Ue(t,r),o}(a.a.Component);o.a.render(a.a.createElement($e,null),document.getElementById("root"))}]); \ No newline at end of file