diff --git a/.htaccess b/.htaccess index a8760fb..e23e12c 100644 --- a/.htaccess +++ b/.htaccess @@ -11,4 +11,9 @@ RewriteEngine On RewriteOptions AllowNoSlash RewriteRule ^((\.idea|\.git|src|test|core|docker|files)(/.*)?)$ /index.php?site=$1 [L,QSA] -FallbackResource /index.php \ No newline at end of file +FallbackResource /index.php + +ErrorDocument 400 /index.php?error=400 +ErrorDocument 403 /index.php?error=403 +ErrorDocument 404 /index.php?error=404 +ErrorDocument 500 /index.php?error=500 \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml index 7341688..31b8a3a 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -1,4 +1,6 @@ - + + \ No newline at end of file diff --git a/adminPanel/src/views/settings.js b/adminPanel/src/views/settings.js index 6fb6b1f..7b68b43 100644 --- a/adminPanel/src/views/settings.js +++ b/adminPanel/src/views/settings.js @@ -3,11 +3,6 @@ import {Link} from "react-router-dom"; import Alert from "../elements/alert"; import {Collapse} from "react-collapse/lib/Collapse"; import Icon from "../elements/icon"; -import { EditorState, ContentState, convertToRaw } from 'draft-js' -import { Editor } from 'react-draft-wysiwyg' -import draftToHtml from 'draftjs-to-html'; -import htmlToDraft from 'html-to-draftjs'; -import sanitizeHtml from 'sanitize-html' import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css'; import ReactTooltip from "react-tooltip"; @@ -36,15 +31,6 @@ export default class Settings extends React.Component { unsavedMailSettings: false, keys: ["mail_enabled", "mail_host", "mail_port", "mail_username", "mail_password", "mail_from"] }, - messages: { - alerts: [], - isOpen: true, - isSaving: false, - isResetting: false, - editor: EditorState.createEmpty(), - isEditing: null, - keys: ["message_confirm_email", "message_accept_invite", "message_reset_password"] - }, recaptcha: { alerts: [], isOpen: true, @@ -77,7 +63,6 @@ export default class Settings extends React.Component { key = key.trim(); return this.state.general.keys.includes(key) || this.state.mail.keys.includes(key) - || this.state.messages.keys.includes(key) || this.state.recaptcha.keys.includes(key) || this.hiddenKeys.includes(key); } @@ -345,6 +330,7 @@ export default class Settings extends React.Component { {this.state.mail.isSending ? Sending  : "Send Mail"} +
{this.state.mail.unsavedMailSettings ? You need to save your mail settings first. : null} @@ -354,63 +340,6 @@ export default class Settings extends React.Component { } - getMessagesForm() { - - const editor = ; - - let messageTemplates = { - "message_confirm_email": "Confirm E-Mail Message", - "message_accept_invite": "Accept Invitation Message", - "message_reset_password": "Reset Password Message", - }; - - let formGroups = []; - for (let key in messageTemplates) { - let title = messageTemplates[key]; - if (this.state.messages.isEditing === key) { - formGroups.push( -
- - { editor } -
- ); - } else { - formGroups.push( -
- - -
-
- ); - } - } - - return formGroups; - } - getRecaptchaForm() { return <>
@@ -520,7 +449,6 @@ export default class Settings extends React.Component { const categories = { "general": {color: "primary", icon: "cogs", title: "General Settings", content: this.createGeneralForm()}, "mail": {color: "warning", icon: "envelope", title: "Mail Settings", content: this.createMailForm()}, - "messages": {color: "info", icon: "copy", title: "Message Templates", content: this.getMessagesForm()}, "recaptcha": {color: "danger", icon: "google", title: "Google reCaptcha", content: this.getRecaptchaForm()}, "uncategorised": {color: "secondary", icon: "stream", title: "Uncategorised", content: this.getUncategorizedForm()}, }; @@ -557,16 +485,6 @@ export default class Settings extends React.Component { } - onEditorStateChange(editorState) { - this.setState({ - ...this.state, - messages: { - ...this.state.messages, - editor: editorState - } - }); - }; - onChangeValue(event) { const target = event.target; const name = target.name; @@ -620,8 +538,6 @@ export default class Settings extends React.Component { if (category === "mail") { categoryUpdated.unsavedMailSettings = false; - } else if (category === "messages") { - categoryUpdated.isEditing = null; } } @@ -635,10 +551,6 @@ export default class Settings extends React.Component { onSave(category) { this.setState({...this.state, [category]: {...this.state[category], isSaving: true}}); - if (category === "messages" && this.state.messages.isEditing) { - this.closeEditor(true, () => this.onSave(category)); - } - let values = {}; if (category === "uncategorised") { for (let prop of this.state.uncategorised.settings) { @@ -705,38 +617,4 @@ export default class Settings extends React.Component { this.setState({...this.state, mail: newState}); }); } - - closeEditor(save, callback = null) { - if (this.state.messages.isEditing) { - const key = this.state.messages.isEditing; - let newState = { ...this.state, messages: {...this.state.messages, isEditing: null }}; - - if (save) { - newState.settings = { - ...this.state.settings, - [key]: draftToHtml(convertToRaw(this.state.messages.editor.getCurrentContent())), - }; - } - - callback = callback || function () { }; - this.setState(newState, callback); - } - } - - openEditor(message) { - this.closeEditor(true); - const contentBlock = htmlToDraft(this.state.settings[message] ?? ""); - if (contentBlock) { - const contentState = ContentState.createFromBlockArray(contentBlock.contentBlocks); - const editorState = EditorState.createWithContent(contentState); - this.setState({ - ...this.state, - messages: { - ...this.state.messages, - isEditing: message, - editor: editorState - } - }); - } - } } \ No newline at end of file diff --git a/cli.php b/cli.php index 26849fe..3a17261 100644 --- a/cli.php +++ b/cli.php @@ -42,7 +42,7 @@ function getDatabaseConfig(): ConnectionData { $config = new Configuration(); $database = $config->getDatabase(); if ($database !== null && $database->getProperty("isDocker", false) && !is_file("/.dockerenv")) { - if (count($argv) < 2 || $argv[1] !== "db") { + if (count($argv) < 3 || $argv[1] !== "db" || !in_array($argv[2], ["shell", "import", "export"])) { $command = array_merge(["docker", "exec", "-it", "php", "php"], $argv); $proc = proc_open($command, [1 => STDOUT, 2 => STDERR], $pipes, "/application"); exit(proc_close($proc)); @@ -464,11 +464,12 @@ function onRoutes(array $argv) { _exit("Error fetching routes: " . $req->getLastError()); } else { $routes = $req->getResult()["routes"]; - $head = ["uid", "request", "action", "target", "extra", "active"]; + $head = ["uid", "request", "action", "target", "extra", "active", "exact"]; // strict boolean foreach ($routes as &$route) { $route["active"] = $route["active"] ? "true" : "false"; + $route["exact"] = $route["exact"] ? "true" : "false"; } printTable($head, $routes); @@ -482,7 +483,7 @@ function onRoutes(array $argv) { "request" => $argv[3], "action" => $argv[4], "target" => $argv[5], - "extra" => $argv[6] ?? "" + "extra" => $argv[7] ?? "", ); $req = new Api\Routes\Add($user); diff --git a/core/Api/MailAPI.class.php b/core/Api/MailAPI.class.php index 9c9ab26..c8d7f72 100644 --- a/core/Api/MailAPI.class.php +++ b/core/Api/MailAPI.class.php @@ -94,7 +94,7 @@ namespace Api\Mail { public function _execute(): bool { $mailConfig = $this->getMailConfig(); - if (!$this->success) { + if (!$this->success || $mailConfig === null) { return false; } @@ -411,7 +411,7 @@ namespace Api\Mail { } $mailConfig = $this->getMailConfig(); - if (!$this->success) { + if (!$this->success || $mailConfig === null) { return false; } diff --git a/core/Api/RoutesAPI.class.php b/core/Api/RoutesAPI.class.php index 672c564..6ad7475 100644 --- a/core/Api/RoutesAPI.class.php +++ b/core/Api/RoutesAPI.class.php @@ -68,7 +68,10 @@ namespace Api\Routes { use Api\RoutesAPI; use Driver\SQL\Condition\Compare; use Driver\SQL\Condition\CondBool; - use Objects\Router; + use Objects\Router\DocumentRoute; + use Objects\Router\RedirectRoute; + use Objects\Router\Router; + use Objects\Router\StaticFileRoute; use Objects\User; class Fetch extends RoutesAPI { @@ -367,17 +370,17 @@ namespace Api\Routes { $exact = $sql->parseBool($row["exact"]); switch ($row["action"]) { case "redirect_temporary": - $this->router->addRoute(new Router\RedirectRoute($request, $exact, $target, 307)); + $this->router->addRoute(new RedirectRoute($request, $exact, $target, 307)); break; case "redirect_permanently": - $this->router->addRoute(new Router\RedirectRoute($request, $exact, $target, 308)); + $this->router->addRoute(new RedirectRoute($request, $exact, $target, 308)); break; case "static": - $this->router->addRoute(new Router\StaticFileRoute($request, $exact, $target)); + $this->router->addRoute(new StaticFileRoute($request, $exact, $target)); break; case "dynamic": $extra = json_decode($row["extra"]) ?? []; - $this->router->addRoute(new Router\DocumentRoute($request, $exact, $target, ...$extra)); + $this->router->addRoute(new DocumentRoute($request, $exact, $target, ...$extra)); break; default: break; diff --git a/core/Api/UserAPI.class.php b/core/Api/UserAPI.class.php index 9f20b99..e09ce62 100644 --- a/core/Api/UserAPI.class.php +++ b/core/Api/UserAPI.class.php @@ -1076,6 +1076,10 @@ namespace Api\User { } $settings = $this->user->getConfiguration()->getSettings(); + if (!$settings->isMailEnabled()) { + return $this->createError("The mail service is not enabled, please contact the server administration."); + } + if ($settings->isRecaptchaEnabled()) { $captcha = $this->getParam("captcha"); $req = new VerifyCaptcha($this->user); diff --git a/core/Objects/Router.class.php b/core/Objects/Router.class.php deleted file mode 100644 index 8d6484c..0000000 --- a/core/Objects/Router.class.php +++ /dev/null @@ -1,390 +0,0 @@ -user = $user; - $this->logger = new Logger("Router", $user->getSQL()); - $this->routes = []; - $this->statusCodeRoutes = []; - } - - public function run(string $url): string { - - // TODO: do we want a global try cache and return status page 500 on any error? - // or do we want to have a global status page function here? - - $url = strtok($url, "?"); - foreach ($this->routes as $route) { - $pathParams = $route->match($url); - if ($pathParams !== false) { - return $route->call($this, $pathParams); - } - } - - return $this->returnStatusCode(404); - } - - public function returnStatusCode(int $code, array $params = []): string { - http_response_code($code); - $params["status_code"] = $code; - $params["status_description"] = HTTP_STATUS_DESCRIPTIONS[$code] ?? "Unknown Error"; - $route = $this->statusCodeRoutes[strval($code)] ?? null; - if ($route) { - return $route->call($this, $params); - } else { - $req = new \Api\Template\Render($this->user); - $res = $req->execute(["file" => "error_document.twig", "parameters" => $params]); - if ($res) { - return $req->getResult()["html"]; - } else { - var_dump($req->getLastError()); - $description = htmlspecialchars($params["status_description"]); - return "$code - $description"; - } - } - } - - public function addRoute(AbstractRoute $route) { - if (preg_match("/^\d+$/", $route->getPattern())) { - $this->statusCodeRoutes[$route->getPattern()] = $route; - } else { - $this->routes[] = $route; - } - } - - public function writeCache(string $file): bool { - - $routes = ""; - foreach ($this->routes as $route) { - $constructor = $route->generateCache(); - $routes .= "\n \$this->addRoute($constructor);"; - } - - $date = (new \DateTime())->format("Y/m/d H:i:s"); - $code = "logger->severe("Could not write Router cache file: $file"); - return false; - } - - return true; - } - - public function getUser(): User { - return $this->user; - } - - public function getLogger(): Logger { - return $this->logger; - } - - public static function cleanURL(string $url, bool $cleanGET = true): string { - // strip GET parameters - if ($cleanGET) { - if (($index = strpos($url, "?")) !== false) { - $url = substr($url, 0, $index); - } - } - - // strip document reference part - if (($index = strpos($url, "#")) !== false) { - $url = substr($url, 0, $index); - } - - // strip leading slash - return preg_replace("/^\/+/", "", $url); - } - } -} - -namespace Objects\Router { - - use Api\Parameter\Parameter; - use Elements\Document; - use Objects\Router; - use PHPUnit\TextUI\ReflectionException; - - abstract class AbstractRoute { - - private string $pattern; - private bool $exact; - - public function __construct(string $pattern, bool $exact = true) { - $this->pattern = $pattern; - $this->exact = $exact; - } - - private static function parseParamType(?string $type): ?int { - if ($type === null || trim($type) === "") { - return null; - } - - $type = strtolower(trim($type)); - if (in_array($type, ["int", "integer"])) { - return Parameter::TYPE_INT; - } else if (in_array($type, ["float", "double"])) { - return Parameter::TYPE_FLOAT; - } else if (in_array($type, ["bool", "boolean"])) { - return Parameter::TYPE_BOOLEAN; - } else { - return Parameter::TYPE_STRING; - } - } - - public function getPattern(): string { - return $this->pattern; - } - - public abstract function call(Router $router, array $params): string; - - protected function getArgs(): array { - return [$this->pattern, $this->exact]; - } - - public function generateCache(): string { - $reflection = new \ReflectionClass($this); - $className = $reflection->getName(); - $args = implode(", ", array_map(function ($arg) { - return var_export($arg, true); - }, $this->getArgs())); - return "new \\$className($args)"; - } - - public function match(string $url) { - - # /test/{abc}/{param:?}/{xyz:int}/{aaa:int?} - $patternParts = explode("/", Router::cleanURL($this->pattern, false)); - $countPattern = count($patternParts); - $patternOffset = 0; - - # /test/param/optional/123 - $urlParts = explode("/", $url); - $countUrl = count($urlParts); - $urlOffset = 0; - - $params = []; - for (; $patternOffset < $countPattern; $patternOffset++) { - - if (!preg_match("/^{.*}$/", $patternParts[$patternOffset])) { - - // not a parameter? check if it matches - if ($urlOffset >= $countUrl || $urlParts[$urlOffset] !== $patternParts[$patternOffset]) { - return false; - } - - $urlOffset++; - - } else { - - // we got a parameter here - $paramDefinition = explode(":", substr($patternParts[$patternOffset], 1, -1)); - $paramName = array_shift($paramDefinition); - $paramType = array_shift($paramDefinition); - $paramOptional = endsWith($paramType, "?"); - if ($paramOptional) { - $paramType = substr($paramType, 0, -1); - } - - $paramType = self::parseParamType($paramType); - if ($urlOffset >= $countUrl || $urlParts[$urlOffset] === "") { - if ($paramOptional) { - $param = $urlParts[$urlOffset] ?? null; - if ($param !== null && $paramType !== null && Parameter::parseType($param) !== $paramType) { - return false; - } - - $params[$paramName] = $param; - if ($urlOffset < $countUrl) { - $urlOffset++; - } - } else { - return false; - } - } else { - $param = $urlParts[$urlOffset]; - if ($paramType !== null && Parameter::parseType($param) !== $paramType) { - return false; - } - - $params[$paramName] = $param; - $urlOffset++; - } - } - } - - if ($urlOffset !== $countUrl && $this->exact) { - return false; - } - - return $params; - } - } - - class EmptyRoute extends AbstractRoute { - - public function __construct(string $pattern, bool $exact = true) { - parent::__construct($pattern, $exact); - } - - public function call(Router $router, array $params): string { - return ""; - } - } - - class StaticFileRoute extends AbstractRoute { - - private string $path; - private int $code; - - public function __construct(string $pattern, bool $exact, string $path, int $code = 200) { - parent::__construct($pattern, $exact); - $this->path = $path; - $this->code = $code; - } - - public function call(Router $router, array $params): string { - http_response_code($this->code); - return serveStatic(WEBROOT, $this->path); - } - - protected function getArgs(): array { - return array_merge(parent::getArgs(), [$this->path, $this->code]); - } - } - - class StaticRoute extends AbstractRoute { - - private string $data; - private int $code; - - public function __construct(string $pattern, bool $exact, string $data, int $code = 200) { - parent::__construct($pattern, $exact); - $this->data = $data; - $this->code = $code; - } - - public function call(Router $router, array $params): string { - http_response_code($this->code); - return $this->data; - } - - protected function getArgs(): array { - return array_merge(parent::getArgs(), [$this->data, $this->code]); - } - } - - class RedirectRoute extends AbstractRoute { - - private string $destination; - private int $code; - - public function __construct(string $pattern, bool $exact, string $destination, int $code = 307) { - parent::__construct($pattern, $exact); - $this->destination = $destination; - $this->code = $code; - } - - public function call(Router $router, array $params): string { - header("Location: $this->destination"); - http_response_code($this->code); - return ""; - } - - protected function getArgs(): array { - return array_merge(parent::getArgs(), [$this->destination, $this->code]); - } - } - - class DocumentRoute extends AbstractRoute { - - private string $className; - private array $args; - private ?\ReflectionClass $reflectionClass; - - public function __construct(string $pattern, bool $exact, string $className, ...$args) { - parent::__construct($pattern, $exact); - $this->className = $className; - $this->args = $args; - $this->reflectionClass = null; - } - - private function loadClass(): bool { - - if ($this->reflectionClass === null) { - try { - $file = getClassPath($this->className); - if (file_exists($file)) { - $this->reflectionClass = new \ReflectionClass($this->className); - if ($this->reflectionClass->isSubclassOf(Document::class)) { - return true; - } - } - } catch (ReflectionException $exception) { - $this->reflectionClass = null; - return false; - } - - $this->reflectionClass = null; - return false; - } - - return true; - } - - public function match(string $url) { - $match = parent::match($url); - if ($match === false || !$this->loadClass()) { - return false; - } - - return $match; - } - - protected function getArgs(): array { - return array_merge(parent::getArgs(), [$this->className], $this->args); - } - - public function call(Router $router, array $params): string { - if (!$this->loadClass()) { - return $router->returnStatusCode(500, [ "message" => "Error loading class: $this->className"]); - } - - try { - $args = array_merge([$router->getUser()], $this->args); - $document = $this->reflectionClass->newInstanceArgs($args); - return $document->getCode($params); - } catch (\ReflectionException $e) { - return $router->returnStatusCode(500, [ "message" => "Error loading class $this->className: " . $e->getMessage()]); - } - } - } -} \ No newline at end of file diff --git a/core/Objects/Router/AbstractRoute.class.php b/core/Objects/Router/AbstractRoute.class.php new file mode 100644 index 0000000..925d2e5 --- /dev/null +++ b/core/Objects/Router/AbstractRoute.class.php @@ -0,0 +1,121 @@ +pattern = $pattern; + $this->exact = $exact; + } + + private static function parseParamType(?string $type): ?int { + if ($type === null || trim($type) === "") { + return null; + } + + $type = strtolower(trim($type)); + if (in_array($type, ["int", "integer"])) { + return Parameter::TYPE_INT; + } else if (in_array($type, ["float", "double"])) { + return Parameter::TYPE_FLOAT; + } else if (in_array($type, ["bool", "boolean"])) { + return Parameter::TYPE_BOOLEAN; + } else { + return Parameter::TYPE_STRING; + } + } + + public function getPattern(): string { + return $this->pattern; + } + + public abstract function call(Router $router, array $params): string; + + protected function getArgs(): array { + return [$this->pattern, $this->exact]; + } + + public function generateCache(): string { + $reflection = new \ReflectionClass($this); + $className = $reflection->getName(); + $args = implode(", ", array_map(function ($arg) { + return var_export($arg, true); + }, $this->getArgs())); + return "new \\$className($args)"; + } + + public function match(string $url) { + + # /test/{abc}/{param:?}/{xyz:int}/{aaa:int?} + $patternParts = explode("/", Router::cleanURL($this->pattern, false)); + $countPattern = count($patternParts); + $patternOffset = 0; + + # /test/param/optional/123 + $urlParts = explode("/", $url); + $countUrl = count($urlParts); + $urlOffset = 0; + + $params = []; + for (; $patternOffset < $countPattern; $patternOffset++) { + + if (!preg_match("/^{.*}$/", $patternParts[$patternOffset])) { + + // not a parameter? check if it matches + if ($urlOffset >= $countUrl || $urlParts[$urlOffset] !== $patternParts[$patternOffset]) { + return false; + } + + $urlOffset++; + + } else { + + // we got a parameter here + $paramDefinition = explode(":", substr($patternParts[$patternOffset], 1, -1)); + $paramName = array_shift($paramDefinition); + $paramType = array_shift($paramDefinition); + $paramOptional = endsWith($paramType, "?"); + if ($paramOptional) { + $paramType = substr($paramType, 0, -1); + } + + $paramType = self::parseParamType($paramType); + if ($urlOffset >= $countUrl || $urlParts[$urlOffset] === "") { + if ($paramOptional) { + $param = $urlParts[$urlOffset] ?? null; + if ($param !== null && $paramType !== null && Parameter::parseType($param) !== $paramType) { + return false; + } + + $params[$paramName] = $param; + if ($urlOffset < $countUrl) { + $urlOffset++; + } + } else { + return false; + } + } else { + $param = $urlParts[$urlOffset]; + if ($paramType !== null && Parameter::parseType($param) !== $paramType) { + return false; + } + + $params[$paramName] = $param; + $urlOffset++; + } + } + } + + if ($urlOffset !== $countUrl && $this->exact) { + return false; + } + + return $params; + } +} \ No newline at end of file diff --git a/core/Objects/Router/ApiRoute.class.php b/core/Objects/Router/ApiRoute.class.php new file mode 100644 index 0000000..af3b667 --- /dev/null +++ b/core/Objects/Router/ApiRoute.class.php @@ -0,0 +1,60 @@ +getUser(); + if (empty($params["endpoint"])) { + header("Content-Type: text/html"); + $document = new \Elements\TemplateDocument($user, "swagger.twig"); + return $document->getCode(); + } else if(!preg_match("/[a-zA-Z]+(\/[a-zA-Z]+)*/", $params["endpoint"])) { + http_response_code(400); + $response = createError("Invalid Method"); + } else { + $apiEndpoint = ucfirst($params["endpoint"]); + if (!empty($params["method"])) { + $apiMethod = ucfirst($params["method"]); + $parentClass = "\\Api\\${apiEndpoint}API"; + $apiClass = "\\Api\\${apiEndpoint}\\${apiMethod}"; + } else { + $apiClass = "\\Api\\${apiEndpoint}"; + $parentClass = $apiClass; + } + + try { + $file = getClassPath($parentClass); + if (!file_exists($file) || !class_exists($parentClass) || !class_exists($apiClass)) { + http_response_code(404); + $response = createError("Not found"); + } else { + $apiClass = new ReflectionClass($apiClass); + if(!$apiClass->isSubclassOf(Request::class) || !$apiClass->isInstantiable()) { + http_response_code(400); + $response = createError("Invalid Method"); + } else { + $request = $apiClass->newInstanceArgs(array($user, true)); + $request->execute(); + $response = $request->getJsonResult(); + } + } + } catch (ReflectionException $e) { + http_response_code(500); + $response = createError("Error instantiating class: $e"); + } + } + + header("Content-Type: application/json"); + return $response; + } +} \ No newline at end of file diff --git a/core/Objects/Router/DocumentRoute.class.php b/core/Objects/Router/DocumentRoute.class.php new file mode 100644 index 0000000..61f9dc0 --- /dev/null +++ b/core/Objects/Router/DocumentRoute.class.php @@ -0,0 +1,70 @@ +className = $className; + $this->args = $args; + $this->reflectionClass = null; + } + + private function loadClass(): bool { + + if ($this->reflectionClass === null) { + try { + $file = getClassPath($this->className); + if (file_exists($file)) { + $this->reflectionClass = new \ReflectionClass($this->className); + if ($this->reflectionClass->isSubclassOf(Document::class)) { + return true; + } + } + } catch (ReflectionException $exception) { + $this->reflectionClass = null; + return false; + } + + $this->reflectionClass = null; + return false; + } + + return true; + } + + public function match(string $url) { + $match = parent::match($url); + if ($match === false || !$this->loadClass()) { + return false; + } + + return $match; + } + + protected function getArgs(): array { + return array_merge(parent::getArgs(), [$this->className], $this->args); + } + + public function call(Router $router, array $params): string { + if (!$this->loadClass()) { + return $router->returnStatusCode(500, [ "message" => "Error loading class: $this->className"]); + } + + try { + $args = array_merge([$router->getUser()], $this->args); + $document = $this->reflectionClass->newInstanceArgs($args); + return $document->getCode($params); + } catch (\ReflectionException $e) { + return $router->returnStatusCode(500, [ "message" => "Error loading class $this->className: " . $e->getMessage()]); + } + } +} \ No newline at end of file diff --git a/core/Objects/Router/EmptyRoute.class.php b/core/Objects/Router/EmptyRoute.class.php new file mode 100644 index 0000000..f7c7524 --- /dev/null +++ b/core/Objects/Router/EmptyRoute.class.php @@ -0,0 +1,14 @@ +destination = $destination; + $this->code = $code; + } + + public function call(Router $router, array $params): string { + header("Location: $this->destination"); + http_response_code($this->code); + return ""; + } + + protected function getArgs(): array { + return array_merge(parent::getArgs(), [$this->destination, $this->code]); + } +} \ No newline at end of file diff --git a/core/Objects/Router/Router.class.php b/core/Objects/Router/Router.class.php new file mode 100644 index 0000000..da6ba6a --- /dev/null +++ b/core/Objects/Router/Router.class.php @@ -0,0 +1,128 @@ +user = $user; + $this->logger = new Logger("Router", $user->getSQL()); + $this->routes = []; + $this->statusCodeRoutes = []; + + $this->addRoute(new ApiRoute()); + } + + public function run(string $url): string { + + // TODO: do we want a global try cache and return status page 500 on any error? + // or do we want to have a global status page function here? + + $url = strtok($url, "?"); + foreach ($this->routes as $route) { + $pathParams = $route->match($url); + if ($pathParams !== false) { + return $route->call($this, $pathParams); + } + } + + return $this->returnStatusCode(404); + } + + public function returnStatusCode(int $code, array $params = []): string { + http_response_code($code); + $params["status_code"] = $code; + $params["status_description"] = HTTP_STATUS_DESCRIPTIONS[$code] ?? "Unknown Error"; + $route = $this->statusCodeRoutes[strval($code)] ?? null; + if ($route) { + return $route->call($this, $params); + } else { + $req = new \Api\Template\Render($this->user); + $res = $req->execute(["file" => "error_document.twig", "parameters" => $params]); + if ($res) { + return $req->getResult()["html"]; + } else { + var_dump($req->getLastError()); + $description = htmlspecialchars($params["status_description"]); + return "$code - $description"; + } + } + } + + public function addRoute(AbstractRoute $route) { + if (preg_match("/^\d+$/", $route->getPattern())) { + $this->statusCodeRoutes[$route->getPattern()] = $route; + } else { + $this->routes[] = $route; + } + } + + public function writeCache(string $file): bool { + + $routes = ""; + foreach ($this->routes as $route) { + $constructor = $route->generateCache(); + $routes .= "\n \$this->addRoute($constructor);"; + } + + $date = (new \DateTime())->format("Y/m/d H:i:s"); + $code = "logger->severe("Could not write Router cache file: $file"); + return false; + } + + return true; + } + + public function getUser(): User { + return $this->user; + } + + public function getLogger(): Logger { + return $this->logger; + } + + public static function cleanURL(string $url, bool $cleanGET = true): string { + // strip GET parameters + if ($cleanGET) { + if (($index = strpos($url, "?")) !== false) { + $url = substr($url, 0, $index); + } + } + + // strip document reference part + if (($index = strpos($url, "#")) !== false) { + $url = substr($url, 0, $index); + } + + // strip leading slash + return preg_replace("/^\/+/", "", $url); + } +} \ No newline at end of file diff --git a/core/Objects/Router/StaticFileRoute.class.php b/core/Objects/Router/StaticFileRoute.class.php new file mode 100644 index 0000000..3c67a65 --- /dev/null +++ b/core/Objects/Router/StaticFileRoute.class.php @@ -0,0 +1,24 @@ +path = $path; + $this->code = $code; + } + + public function call(Router $router, array $params): string { + http_response_code($this->code); + return serveStatic(WEBROOT, $this->path); + } + + protected function getArgs(): array { + return array_merge(parent::getArgs(), [$this->path, $this->code]); + } +} \ No newline at end of file diff --git a/core/Objects/Router/StaticRoute.class.php b/core/Objects/Router/StaticRoute.class.php new file mode 100644 index 0000000..ab43e65 --- /dev/null +++ b/core/Objects/Router/StaticRoute.class.php @@ -0,0 +1,24 @@ +data = $data; + $this->code = $code; + } + + public function call(Router $router, array $params): string { + http_response_code($this->code); + return $this->data; + } + + protected function getArgs(): array { + return array_merge(parent::getArgs(), [$this->data, $this->code]); + } +} \ No newline at end of file diff --git a/core/Templates/account/login.twig b/core/Templates/account/login.twig index a7f3a17..e167005 100644 --- a/core/Templates/account/login.twig +++ b/core/Templates/account/login.twig @@ -20,7 +20,10 @@
-
+ +
{% if site.registrationEnabled %}
Don't have an account yet? Click here to register.
diff --git a/core/Templates/error_document.twig b/core/Templates/error_document.twig index 11903a5..2c32ce8 100644 --- a/core/Templates/error_document.twig +++ b/core/Templates/error_document.twig @@ -25,6 +25,7 @@ You can either Go Back to previous page or try to reload the page.

+

{{ message }}

diff --git a/docker/nginx/site.conf b/docker/nginx/site.conf index 9acf71a..7a74ac4 100644 --- a/docker/nginx/site.conf +++ b/docker/nginx/site.conf @@ -4,6 +4,12 @@ server { access_log /var/log/nginx/access.log; root /application; + # rewrite error codes + error_page 400 /index.php?error=400; + error_page 403 /index.php?error=403; + error_page 404 /index.php?error=404; + error_page 500 /index.php?error=500; + # rewrite api rewrite ^/api(/.*)$ /index.php?api=$1; diff --git a/img/icons/files/.htaccess b/img/icons/files/.htaccess deleted file mode 100644 index 1cf6def..0000000 --- a/img/icons/files/.htaccess +++ /dev/null @@ -1 +0,0 @@ -php_flag engine on \ No newline at end of file diff --git a/index.php b/index.php index 7cce605..1223583 100644 --- a/index.php +++ b/index.php @@ -12,13 +12,12 @@ if (is_file("MAINTENANCE") && !in_array($_SERVER['REMOTE_ADDR'], ['127.0.0.1', ' die(); } -use Api\Request; use Configuration\Configuration; -use Objects\Router; +use Objects\Router\Router; if (!is_readable(getClassPath(Configuration::class))) { header("Content-Type: application/json"); - die(json_encode(array( "success" => false, "msg" => "Configuration class is not readable, check permissions before proceeding." ))); + die(json_encode([ "success" => false, "msg" => "Configuration class is not readable, check permissions before proceeding." ])); } $config = new Configuration(); @@ -27,103 +26,49 @@ $sql = $user->getSQL(); $settings = $config->getSettings(); $installation = !$sql || ($sql->isConnected() && !$settings->isInstalled()); -// API routes, prefix: /api/ -// TODO: move this to Router? -if (isset($_GET["api"]) && is_string($_GET["api"])) { - $isApiResponse = true; - if ($installation) { - $response = createError("Not installed"); +$requestedUri = $_GET["site"] ?? $_GET["api"] ?? $_SERVER["REQUEST_URI"]; +$requestedUri = Router::cleanURL($requestedUri); + +if ($installation) { + if ($requestedUri !== "" && $requestedUri !== "index.php") { + $response = "Redirecting to /"; + header("Location: /"); } else { - $apiFunction = $_GET["api"]; - if (empty($apiFunction) || $apiFunction === "/") { - $document = new \Elements\TemplateDocument($user, "swagger.twig"); - $response = $document->getCode(); - $isApiResponse = false; - } else if(!preg_match("/[a-zA-Z]+(\/[a-zA-Z]+)*/", $apiFunction)) { - http_response_code(400); - $response = createError("Invalid Method"); - } else { - $apiFunction = array_filter(array_map('ucfirst', explode("/", $apiFunction))); - if (count($apiFunction) > 1) { - $parentClass = "\\Api\\" . reset($apiFunction) . "API"; - $apiClass = "\\Api\\" . implode("\\", $apiFunction); - } else { - $apiClass = "\\Api\\" . implode("\\", $apiFunction); - $parentClass = $apiClass; - } - - try { - $file = getClassPath($parentClass); - if(!file_exists($file) || !class_exists($parentClass) || !class_exists($apiClass)) { - http_response_code(404); - $response = createError("Not found"); - } else { - $parentClass = new ReflectionClass($parentClass); - $apiClass = new ReflectionClass($apiClass); - if(!$apiClass->isSubclassOf(Request::class) || !$apiClass->isInstantiable()) { - http_response_code(400); - $response = createError("Invalid Method"); - } else { - $request = $apiClass->newInstanceArgs(array($user, true)); - $success = $request->execute(); - $msg = $request->getLastError(); - $response = $request->getJsonResult(); - } - } - } catch (ReflectionException $e) { - $response = createError("Error instantiating class: $e"); - } - } - - if ($isApiResponse) { - header("Content-Type: application/json"); - } else { - header("Content-Type: text/html"); - } + $document = new Documents\Install($user); + $response = $document->getCode(); } } else { - // all other routes - $requestedUri = $_GET["site"] ?? $_SERVER["REQUEST_URI"]; - $requestedUri = Router::cleanURL($requestedUri); + $router = null; + $routerCacheClass = '\Cache\RouterCache'; + $routerCachePath = getClassPath($routerCacheClass); + if (is_file($routerCachePath)) { + @include_once $routerCachePath; + if (class_exists($routerCacheClass)) { + $router = new $routerCacheClass($user); + } + } - if ($installation) { - if ($requestedUri !== "" && $requestedUri !== "index.php") { - $response = "Redirecting to /"; - header("Location: /"); + if ($router === null) { + $req = new \Api\Routes\GenerateCache($user); + if ($req->execute()) { + $router = $req->getRouter(); } else { - $document = new Documents\Install($user); - $response = $document->getCode(); + $message = "Unable to generate router cache: " . $req->getLastError(); + $response = (new Router($user))->returnStatusCode(500, [ "message" => $message ]); } - } else { + } - $router = null; - - $routerCacheClass = '\Cache\RouterCache'; - $routerCachePath = getClassPath($routerCacheClass); - if (is_file($routerCachePath)) { - @include_once $routerCachePath; - if (class_exists($routerCacheClass)) { - $router = new $routerCacheClass($user); - } - } - - if ($router === null) { - $req = new \Api\Routes\GenerateCache($user); - if ($req->execute()) { - $router = $req->getRouter(); - } else { - $message = "Unable to generate router cache: " . $req->getLastError(); - $response = (new Router($user))->returnStatusCode(500, [ "message" => $message ]); - } - } - - if ($router !== null) { + if ($router !== null) { + if (!isset($_GET["site"]) && isset($_GET["error"]) && + is_string($_GET["error"]) && preg_match("^\d+$", $_GET["error"])) { + $response = $router->returnStatusCode(intval($_GET["error"])); + } else { $response = $router->run($requestedUri); } - - $user->processVisit(); } + + $user->processVisit(); } $user->sendCookies(); diff --git a/js/admin.min.js b/js/admin.min.js index 33dd5e9..f1d95f3 100644 --- a/js/admin.min.js +++ b/js/admin.min.js @@ -1,23 +1,23 @@ -!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1022)}([function(e,t,r){"use strict";e.exports=r(505)},function(e,t,r){e.exports=r(716)()},function(e,t,r){(function(e){e.exports=function(){"use strict";var t,n;function o(){return t.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function l(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function p(e,t){var r,n=[];for(r=0;r>>0;for(t=0;t0)for(r=0;r=0?r?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+n}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,S=Object.keys?Object.keys:function(e){var t,r=[];for(t in e)s(e,t)&&r.push(t);return r};var j=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,A=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,N={},P={};function I(e,t,r,n){var o=n;"string"==typeof n&&(o=function(){return this[n]()}),e&&(P[e]=o),t&&(P[t[0]]=function(){return T(o.apply(this,arguments),t[1],t[2])}),r&&(P[r]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function Y(e,t){return e.isValid()?(t=z(t,e.localeData()),N[t]=N[t]||function(e){var t,r,n,o=e.match(j);for(t=0,r=o.length;t=0&&A.test(e);)e=e.replace(A,n),A.lastIndex=0,r-=1;return e}var F={};function R(e,t){var r=e.toLowerCase();F[r]=F[r+"s"]=F[t]=e}function H(e){return"string"==typeof e?F[e]||F[e.toLowerCase()]:void 0}function B(e){var t,r,n={};for(r in e)s(e,r)&&(t=H(r))&&(n[t]=e[r]);return n}var U={};function W(e,t){U[e]=t}function q(e){return e%4==0&&e%100!=0||e%400==0}function V(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function K(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=V(t)),r}function G(e,t){return function(r){return null!=r?(J(this,e,r),o.updateOffset(this,t),this):Q(this,e)}}function Q(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function J(e,t,r){e.isValid()&&!isNaN(r)&&("FullYear"===t&&q(e.year())&&1===e.month()&&29===e.date()?(r=K(r),e._d["set"+(e._isUTC?"UTC":"")+t](r,e.month(),ke(r,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](r))}var Z,$=/\d/,X=/\d\d/,ee=/\d{3}/,te=/\d{4}/,re=/[+-]?\d{6}/,ne=/\d\d?/,oe=/\d\d\d\d?/,ae=/\d\d\d\d\d\d?/,ie=/\d{1,3}/,se=/\d{1,4}/,ce=/[+-]?\d{1,6}/,le=/\d+/,de=/[+-]?\d+/,ue=/Z|[+-]\d\d:?\d\d/gi,pe=/Z|[+-]\d\d(?::?\d\d)?/gi,fe=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function me(e,t,r){Z[e]=D(t)?t:function(e,n){return e&&r?r:t}}function he(e,t){return s(Z,e)?Z[e](t._strict,t._locale):new RegExp(ge(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,r,n,o){return t||r||n||o}))))}function ge(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}Z={};var be,ve={};function ye(e,t){var r,n=t;for("string"==typeof e&&(e=[e]),d(t)&&(n=function(e,r){r[t]=K(e)}),r=0;r68?1900:2e3)};var Ae=G("FullYear",!0);function Ne(e,t,r,n,o,a,i){var s;return e<100&&e>=0?(s=new Date(e+400,t,r,n,o,a,i),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,r,n,o,a,i),s}function Pe(e){var t,r;return e<100&&e>=0?((r=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ie(e,t,r){var n=7+t-r;return-(7+Pe(e,0,n).getUTCDay()-t)%7+n-1}function Ye(e,t,r,n,o){var a,i,s=1+7*(t-1)+(7+r-n)%7+Ie(e,n,o);return s<=0?i=je(a=e-1)+s:s>je(e)?(a=e+1,i=s-je(e)):(a=e,i=s),{year:a,dayOfYear:i}}function ze(e,t,r){var n,o,a=Ie(e.year(),t,r),i=Math.floor((e.dayOfYear()-a-1)/7)+1;return i<1?n=i+Fe(o=e.year()-1,t,r):i>Fe(e.year(),t,r)?(n=i-Fe(e.year(),t,r),o=e.year()+1):(o=e.year(),n=i),{week:n,year:o}}function Fe(e,t,r){var n=Ie(e,t,r),o=Ie(e+1,t,r);return(je(e)-n+o)/7}function Re(e,t){return e.slice(t,7).concat(e.slice(0,t))}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),R("week","w"),R("isoWeek","W"),W("week",5),W("isoWeek",5),me("w",ne),me("ww",ne,X),me("W",ne),me("WW",ne,X),_e(["w","ww","W","WW"],(function(e,t,r,n){t[n.substr(0,1)]=K(e)})),I("d",0,"do","day"),I("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),I("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),I("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),R("day","d"),R("weekday","e"),R("isoWeekday","E"),W("day",11),W("weekday",11),W("isoWeekday",11),me("d",ne),me("e",ne),me("E",ne),me("dd",(function(e,t){return t.weekdaysMinRegex(e)})),me("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),me("dddd",(function(e,t){return t.weekdaysRegex(e)})),_e(["dd","ddd","dddd"],(function(e,t,r,n){var o=r._locale.weekdaysParse(e,n,r._strict);null!=o?t.d=o:h(r).invalidWeekday=e})),_e(["d","e","E"],(function(e,t,r,n){t[n]=K(e)}));var He="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Be="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ue="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),We=fe,qe=fe,Ve=fe;function Ke(e,t,r){var n,o,a,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)a=m([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(a,"").toLocaleLowerCase();return r?"dddd"===t?-1!==(o=be.call(this._weekdaysParse,i))?o:null:"ddd"===t?-1!==(o=be.call(this._shortWeekdaysParse,i))?o:null:-1!==(o=be.call(this._minWeekdaysParse,i))?o:null:"dddd"===t?-1!==(o=be.call(this._weekdaysParse,i))||-1!==(o=be.call(this._shortWeekdaysParse,i))||-1!==(o=be.call(this._minWeekdaysParse,i))?o:null:"ddd"===t?-1!==(o=be.call(this._shortWeekdaysParse,i))||-1!==(o=be.call(this._weekdaysParse,i))||-1!==(o=be.call(this._minWeekdaysParse,i))?o:null:-1!==(o=be.call(this._minWeekdaysParse,i))||-1!==(o=be.call(this._weekdaysParse,i))||-1!==(o=be.call(this._shortWeekdaysParse,i))?o:null}function Ge(){function e(e,t){return t.length-e.length}var t,r,n,o,a,i=[],s=[],c=[],l=[];for(t=0;t<7;t++)r=m([2e3,1]).day(t),n=ge(this.weekdaysMin(r,"")),o=ge(this.weekdaysShort(r,"")),a=ge(this.weekdays(r,"")),i.push(n),s.push(o),c.push(a),l.push(n),l.push(o),l.push(a);i.sort(e),s.sort(e),c.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Je(e,t){I(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Ze(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Qe),I("k",["kk",2],0,(function(){return this.hours()||24})),I("hmm",0,0,(function(){return""+Qe.apply(this)+T(this.minutes(),2)})),I("hmmss",0,0,(function(){return""+Qe.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)})),I("Hmm",0,0,(function(){return""+this.hours()+T(this.minutes(),2)})),I("Hmmss",0,0,(function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)})),Je("a",!0),Je("A",!1),R("hour","h"),W("hour",13),me("a",Ze),me("A",Ze),me("H",ne),me("h",ne),me("k",ne),me("HH",ne,X),me("hh",ne,X),me("kk",ne,X),me("hmm",oe),me("hmmss",ae),me("Hmm",oe),me("Hmmss",ae),ye(["H","HH"],3),ye(["k","kk"],(function(e,t,r){var n=K(e);t[3]=24===n?0:n})),ye(["a","A"],(function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e})),ye(["h","hh"],(function(e,t,r){t[3]=K(e),h(r).bigHour=!0})),ye("hmm",(function(e,t,r){var n=e.length-2;t[3]=K(e.substr(0,n)),t[4]=K(e.substr(n)),h(r).bigHour=!0})),ye("hmmss",(function(e,t,r){var n=e.length-4,o=e.length-2;t[3]=K(e.substr(0,n)),t[4]=K(e.substr(n,2)),t[5]=K(e.substr(o)),h(r).bigHour=!0})),ye("Hmm",(function(e,t,r){var n=e.length-2;t[3]=K(e.substr(0,n)),t[4]=K(e.substr(n))})),ye("Hmmss",(function(e,t,r){var n=e.length-4,o=e.length-2;t[3]=K(e.substr(0,n)),t[4]=K(e.substr(n,2)),t[5]=K(e.substr(o))}));var $e,Xe=G("Hours",!0),et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:xe,monthsShort:Me,week:{dow:0,doy:6},weekdays:He,weekdaysMin:Ue,weekdaysShort:Be,meridiemParse:/[ap]\.?m?\.?/i},tt={},rt={};function nt(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r0;){if(n=at(o.slice(0,t).join("-")))return n;if(r&&r.length>=t&&nt(o,r)>=t-1)break;t--}a++}return $e}(e)}function lt(e){var t,r=e._a;return r&&-2===h(e).overflow&&(t=r[1]<0||r[1]>11?1:r[2]<1||r[2]>ke(r[0],r[1])?2:r[3]<0||r[3]>24||24===r[3]&&(0!==r[4]||0!==r[5]||0!==r[6])?3:r[4]<0||r[4]>59?4:r[5]<0||r[5]>59?5:r[6]<0||r[6]>999?6:-1,h(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),h(e)._overflowWeeks&&-1===t&&(t=7),h(e)._overflowWeekday&&-1===t&&(t=8),h(e).overflow=t),e}var dt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ut=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pt=/Z|[+-]\d\d(?::?\d\d)?/,ft=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],mt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ht=/^\/?Date\((-?\d+)/i,gt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,bt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function vt(e){var t,r,n,o,a,i,s=e._i,c=dt.exec(s)||ut.exec(s);if(c){for(h(e).iso=!0,t=0,r=ft.length;t7)&&(c=!0)):(a=e._locale._week.dow,i=e._locale._week.doy,l=ze(Et(),a,i),r=wt(t.gg,e._a[0],l.year),n=wt(t.w,l.week),null!=t.d?((o=t.d)<0||o>6)&&(c=!0):null!=t.e?(o=t.e+a,(t.e<0||t.e>6)&&(c=!0)):o=a),n<1||n>Fe(r,a,i)?h(e)._overflowWeeks=!0:null!=c?h(e)._overflowWeekday=!0:(s=Ye(r,n,o,a,i),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(i=wt(e._a[0],n[0]),(e._dayOfYear>je(i)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),r=Pe(i,0,e._dayOfYear),e._a[1]=r.getUTCMonth(),e._a[2]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=n[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Pe:Ne).apply(null,s),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==a&&(h(e).weekdayMismatch=!0)}}function xt(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],h(e).empty=!0;var t,r,n,a,i,s,c=""+e._i,l=c.length,d=0;for(n=z(e._f,e._locale).match(j)||[],t=0;t0&&h(e).unusedInput.push(i),c=c.slice(c.indexOf(r)+r.length),d+=r.length),P[a]?(r?h(e).empty=!1:h(e).unusedTokens.push(a),we(a,r,e)):e._strict&&!r&&h(e).unusedTokens.push(a);h(e).charsLeftOver=l-d,c.length>0&&h(e).unusedInput.push(c),e._a[3]<=12&&!0===h(e).bigHour&&e._a[3]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[3]=function(e,t,r){var n;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?((n=e.isPM(r))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(s=h(e).era)&&(e._a[0]=e._locale.erasConvertYear(s,e._a[0])),kt(e),lt(e)}else _t(e);else vt(e)}function Mt(e){var t=e._i,r=e._f;return e._locale=e._locale||ct(e._l),null===t||void 0===r&&""===t?b({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),k(t)?new w(lt(t)):(u(t)?e._d=t:a(r)?function(e){var t,r,n,o,a,i,s=!1;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;othis?this:e:b()}));function Ct(e,t){var r,n;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Et();for(r=t[0],n=1;n=0?new Date(e+400,t,r)-126227808e5:new Date(e,t,r).valueOf()}function or(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-126227808e5:Date.UTC(e,t,r)}function ar(e,t){return t.erasAbbrRegex(e)}function ir(){var e,t,r=[],n=[],o=[],a=[],i=this.eras();for(e=0,t=i.length;e(a=Fe(e,n,o))&&(t=a),lr.call(this,e,t,r,n,o))}function lr(e,t,r,n,o){var a=Ye(e,t,r,n,o),i=Pe(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}I("N",0,0,"eraAbbr"),I("NN",0,0,"eraAbbr"),I("NNN",0,0,"eraAbbr"),I("NNNN",0,0,"eraName"),I("NNNNN",0,0,"eraNarrow"),I("y",["y",1],"yo","eraYear"),I("y",["yy",2],0,"eraYear"),I("y",["yyy",3],0,"eraYear"),I("y",["yyyy",4],0,"eraYear"),me("N",ar),me("NN",ar),me("NNN",ar),me("NNNN",(function(e,t){return t.erasNameRegex(e)})),me("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),ye(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,r,n){var o=r._locale.erasParse(e,n,r._strict);o?h(r).era=o:h(r).invalidEra=e})),me("y",le),me("yy",le),me("yyy",le),me("yyyy",le),me("yo",(function(e,t){return t._eraYearOrdinalRegex||le})),ye(["y","yy","yyy","yyyy"],0),ye(["yo"],(function(e,t,r,n){var o;r._locale._eraYearOrdinalRegex&&(o=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[0]=r._locale.eraYearOrdinalParse(e,o):t[0]=parseInt(e,10)})),I(0,["gg",2],0,(function(){return this.weekYear()%100})),I(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),sr("gggg","weekYear"),sr("ggggg","weekYear"),sr("GGGG","isoWeekYear"),sr("GGGGG","isoWeekYear"),R("weekYear","gg"),R("isoWeekYear","GG"),W("weekYear",1),W("isoWeekYear",1),me("G",de),me("g",de),me("GG",ne,X),me("gg",ne,X),me("GGGG",se,te),me("gggg",se,te),me("GGGGG",ce,re),me("ggggg",ce,re),_e(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,r,n){t[n.substr(0,2)]=K(e)})),_e(["gg","GG"],(function(e,t,r,n){t[n]=o.parseTwoDigitYear(e)})),I("Q",0,"Qo","quarter"),R("quarter","Q"),W("quarter",7),me("Q",$),ye("Q",(function(e,t){t[1]=3*(K(e)-1)})),I("D",["DD",2],"Do","date"),R("date","D"),W("date",9),me("D",ne),me("DD",ne,X),me("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),ye(["D","DD"],2),ye("Do",(function(e,t){t[2]=K(e.match(ne)[0])}));var dr=G("Date",!0);I("DDD",["DDDD",3],"DDDo","dayOfYear"),R("dayOfYear","DDD"),W("dayOfYear",4),me("DDD",ie),me("DDDD",ee),ye(["DDD","DDDD"],(function(e,t,r){r._dayOfYear=K(e)})),I("m",["mm",2],0,"minute"),R("minute","m"),W("minute",14),me("m",ne),me("mm",ne,X),ye(["m","mm"],4);var ur=G("Minutes",!1);I("s",["ss",2],0,"second"),R("second","s"),W("second",15),me("s",ne),me("ss",ne,X),ye(["s","ss"],5);var pr,fr,mr=G("Seconds",!1);for(I("S",0,0,(function(){return~~(this.millisecond()/100)})),I(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),I(0,["SSS",3],0,"millisecond"),I(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),I(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),I(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),I(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),I(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),I(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),R("millisecond","ms"),W("millisecond",16),me("S",ie,$),me("SS",ie,X),me("SSS",ie,ee),pr="SSSS";pr.length<=9;pr+="S")me(pr,le);function hr(e,t){t[6]=K(1e3*("0."+e))}for(pr="S";pr.length<=9;pr+="S")ye(pr,hr);fr=G("Milliseconds",!1),I("z",0,0,"zoneAbbr"),I("zz",0,0,"zoneName");var gr=w.prototype;function br(e){return e}gr.add=Kt,gr.calendar=function(e,t){1===arguments.length&&(Jt(arguments[0])?(e=arguments[0],t=void 0):Zt(arguments[0])&&(t=arguments[0],e=void 0));var r=e||Et(),n=Yt(r,this).startOf("day"),a=o.calendarFormat(this,n)||"sameElse",i=t&&(D(t[a])?t[a].call(this,r):t[a]);return this.format(i||this.localeData().calendar(a,this,Et(r)))},gr.clone=function(){return new w(this)},gr.diff=function(e,t,r){var n,o,a;if(!this.isValid())return NaN;if(!(n=Yt(e,this)).isValid())return NaN;switch(o=6e4*(n.utcOffset()-this.utcOffset()),t=H(t)){case"year":a=$t(this,n)/12;break;case"month":a=$t(this,n);break;case"quarter":a=$t(this,n)/3;break;case"second":a=(this-n)/1e3;break;case"minute":a=(this-n)/6e4;break;case"hour":a=(this-n)/36e5;break;case"day":a=(this-n-o)/864e5;break;case"week":a=(this-n-o)/6048e5;break;default:a=this-n}return r?a:V(a)},gr.endOf=function(e){var t,r;if(void 0===(e=H(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?or:nr,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-rr(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-rr(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-rr(t,1e3)-1}return this._d.setTime(t),o.updateOffset(this,!0),this},gr.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=Y(this,e);return this.localeData().postformat(t)},gr.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||Et(e).isValid())?Bt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},gr.fromNow=function(e){return this.from(Et(),e)},gr.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||Et(e).isValid())?Bt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},gr.toNow=function(e){return this.to(Et(),e)},gr.get=function(e){return D(this[e=H(e)])?this[e]():this},gr.invalidAt=function(){return h(this).overflow},gr.isAfter=function(e,t){var r=k(e)?e:Et(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=H(t)||"millisecond")?this.valueOf()>r.valueOf():r.valueOf()9999?Y(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):D(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",Y(r,"Z")):Y(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},gr.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,r,n="moment",o="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=o+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+r)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(gr[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),gr.toJSON=function(){return this.isValid()?this.toISOString():null},gr.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},gr.unix=function(){return Math.floor(this.valueOf()/1e3)},gr.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},gr.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},gr.eraName=function(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;ethis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},gr.isLocal=function(){return!!this.isValid()&&!this._isUTC},gr.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},gr.isUtc=Ft,gr.isUTC=Ft,gr.zoneAbbr=function(){return this._isUTC?"UTC":""},gr.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},gr.dates=M("dates accessor is deprecated. Use date instead.",dr),gr.months=M("months accessor is deprecated. Use month instead",Oe),gr.years=M("years accessor is deprecated. Use year instead",Ae),gr.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),gr.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e,t={};return _(t,this),(t=Mt(t))._a?(e=t._isUTC?m(t._a):Et(t._a),this._isDSTShifted=this.isValid()&&function(e,t,r){var n,o=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),i=0;for(n=0;n0):this._isDSTShifted=!1,this._isDSTShifted}));var vr=O.prototype;function yr(e,t,r,n){var o=ct(),a=m().set(n,t);return o[r](a,e)}function _r(e,t,r){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return yr(e,t,r,"month");var n,o=[];for(n=0;n<12;n++)o[n]=yr(e,n,r,"month");return o}function wr(e,t,r,n){"boolean"==typeof e?(d(t)&&(r=t,t=void 0),t=t||""):(r=t=e,e=!1,d(t)&&(r=t,t=void 0),t=t||"");var o,a=ct(),i=e?a._week.dow:0,s=[];if(null!=r)return yr(t,(r+i)%7,n,"day");for(o=0;o<7;o++)s[o]=yr(t,(o+i)%7,n,"day");return s}vr.calendar=function(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return D(n)?n.call(t,r):n},vr.longDateFormat=function(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(j).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},vr.invalidDate=function(){return this._invalidDate},vr.ordinal=function(e){return this._ordinal.replace("%d",e)},vr.preparse=br,vr.postformat=br,vr.relativeTime=function(e,t,r,n){var o=this._relativeTime[r];return D(o)?o(e,t,r,n):o.replace(/%d/i,e)},vr.pastFuture=function(e,t){var r=this._relativeTime[e>0?"future":"past"];return D(r)?r(t):r.replace(/%s/i,t)},vr.set=function(e){var t,r;for(r in e)s(e,r)&&(D(t=e[r])?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},vr.eras=function(e,t){var r,n,a,i=this._eras||ct("en")._eras;for(r=0,n=i.length;r=0)return c[n]},vr.erasConvertYear=function(e,t){var r=e.since<=e.until?1:-1;return void 0===t?o(e.since).year():o(e.since).year()+(t-e.offset)*r},vr.erasAbbrRegex=function(e){return s(this,"_erasAbbrRegex")||ir.call(this),e?this._erasAbbrRegex:this._erasRegex},vr.erasNameRegex=function(e){return s(this,"_erasNameRegex")||ir.call(this),e?this._erasNameRegex:this._erasRegex},vr.erasNarrowRegex=function(e){return s(this,"_erasNarrowRegex")||ir.call(this),e?this._erasNarrowRegex:this._erasRegex},vr.months=function(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Se).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone},vr.monthsShort=function(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Se.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},vr.monthsParse=function(e,t,r){var n,o,a;if(this._monthsParseExact)return De.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(o=m([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(a="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[n]=new RegExp(a.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(r&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}},vr.monthsRegex=function(e){return this._monthsParseExact?(s(this,"_monthsRegex")||Te.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=Le),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},vr.monthsShortRegex=function(e){return this._monthsParseExact?(s(this,"_monthsRegex")||Te.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=Ee),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},vr.week=function(e){return ze(e,this._week.dow,this._week.doy).week},vr.firstDayOfYear=function(){return this._week.doy},vr.firstDayOfWeek=function(){return this._week.dow},vr.weekdays=function(e,t){var r=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Re(r,this._week.dow):e?r[e.day()]:r},vr.weekdaysMin=function(e){return!0===e?Re(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},vr.weekdaysShort=function(e){return!0===e?Re(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},vr.weekdaysParse=function(e,t,r){var n,o,a;if(this._weekdaysParseExact)return Ke.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(o=m([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(a="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[n]=new RegExp(a.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}},vr.weekdaysRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=We),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},vr.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},vr.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ve),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},vr.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},vr.meridiem=function(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"},it("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===K(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=M("moment.lang is deprecated. Use moment.locale instead.",it),o.langData=M("moment.langData is deprecated. Use moment.localeData instead.",ct);var kr=Math.abs;function xr(e,t,r,n){var o=Bt(t,r);return e._milliseconds+=n*o._milliseconds,e._days+=n*o._days,e._months+=n*o._months,e._bubble()}function Mr(e){return e<0?Math.floor(e):Math.ceil(e)}function Sr(e){return 4800*e/146097}function Er(e){return 146097*e/4800}function Lr(e){return function(){return this.as(e)}}var Dr=Lr("ms"),Cr=Lr("s"),Or=Lr("m"),Tr=Lr("h"),jr=Lr("d"),Ar=Lr("w"),Nr=Lr("M"),Pr=Lr("Q"),Ir=Lr("y");function Yr(e){return function(){return this.isValid()?this._data[e]:NaN}}var zr=Yr("milliseconds"),Fr=Yr("seconds"),Rr=Yr("minutes"),Hr=Yr("hours"),Br=Yr("days"),Ur=Yr("months"),Wr=Yr("years"),qr=Math.round,Vr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Kr(e,t,r,n,o){return o.relativeTime(t||1,!!r,e,n)}var Gr=Math.abs;function Qr(e){return(e>0)-(e<0)||+e}function Jr(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n,o,a,i,s,c=Gr(this._milliseconds)/1e3,l=Gr(this._days),d=Gr(this._months),u=this.asSeconds();return u?(e=V(c/60),t=V(e/60),c%=60,e%=60,r=V(d/12),d%=12,n=c?c.toFixed(3).replace(/\.?0+$/,""):"",o=u<0?"-":"",a=Qr(this._months)!==Qr(u)?"-":"",i=Qr(this._days)!==Qr(u)?"-":"",s=Qr(this._milliseconds)!==Qr(u)?"-":"",o+"P"+(r?a+r+"Y":"")+(d?a+d+"M":"")+(l?i+l+"D":"")+(t||e||c?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(c?s+n+"S":"")):"P0D"}var Zr=Tt.prototype;return Zr.isValid=function(){return this._isValid},Zr.abs=function(){var e=this._data;return this._milliseconds=kr(this._milliseconds),this._days=kr(this._days),this._months=kr(this._months),e.milliseconds=kr(e.milliseconds),e.seconds=kr(e.seconds),e.minutes=kr(e.minutes),e.hours=kr(e.hours),e.months=kr(e.months),e.years=kr(e.years),this},Zr.add=function(e,t){return xr(this,e,t,1)},Zr.subtract=function(e,t){return xr(this,e,t,-1)},Zr.as=function(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if("month"===(e=H(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,r=this._months+Sr(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Er(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}},Zr.asMilliseconds=Dr,Zr.asSeconds=Cr,Zr.asMinutes=Or,Zr.asHours=Tr,Zr.asDays=jr,Zr.asWeeks=Ar,Zr.asMonths=Nr,Zr.asQuarters=Pr,Zr.asYears=Ir,Zr.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*K(this._months/12):NaN},Zr._bubble=function(){var e,t,r,n,o,a=this._milliseconds,i=this._days,s=this._months,c=this._data;return a>=0&&i>=0&&s>=0||a<=0&&i<=0&&s<=0||(a+=864e5*Mr(Er(s)+i),i=0,s=0),c.milliseconds=a%1e3,e=V(a/1e3),c.seconds=e%60,t=V(e/60),c.minutes=t%60,r=V(t/60),c.hours=r%24,i+=V(r/24),o=V(Sr(i)),s+=o,i-=Mr(Er(o)),n=V(s/12),s%=12,c.days=i,c.months=s,c.years=n,this},Zr.clone=function(){return Bt(this)},Zr.get=function(e){return e=H(e),this.isValid()?this[e+"s"]():NaN},Zr.milliseconds=zr,Zr.seconds=Fr,Zr.minutes=Rr,Zr.hours=Hr,Zr.days=Br,Zr.weeks=function(){return V(this.days()/7)},Zr.months=Ur,Zr.years=Wr,Zr.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var r,n,o=!1,a=Vr;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(o=e),"object"==typeof t&&(a=Object.assign({},Vr,t),null!=t.s&&null==t.ss&&(a.ss=t.s-1)),r=this.localeData(),n=function(e,t,r,n){var o=Bt(e).abs(),a=qr(o.as("s")),i=qr(o.as("m")),s=qr(o.as("h")),c=qr(o.as("d")),l=qr(o.as("M")),d=qr(o.as("w")),u=qr(o.as("y")),p=a<=r.ss&&["s",a]||a0,p[4]=n,Kr.apply(null,p)}(this,!o,a,r),o&&(n=r.pastFuture(+this,n)),r.postformat(n)},Zr.toISOString=Jr,Zr.toString=Jr,Zr.toJSON=Jr,Zr.locale=Xt,Zr.localeData=tr,Zr.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Jr),Zr.lang=er,I("X",0,0,"unix"),I("x",0,0,"valueOf"),me("x",de),me("X",/[+-]?\d+(\.\d{1,3})?/),ye("X",(function(e,t,r){r._d=new Date(1e3*parseFloat(e))})),ye("x",(function(e,t,r){r._d=new Date(K(e))})), +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=847)}([function(e,t,r){"use strict";e.exports=r(423)},function(e,t,r){e.exports=r(634)()},function(e,t,r){(function(e){e.exports=function(){"use strict";var t,n;function a(){return t.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(c(e,t))return!1;return!0}function l(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function p(e,t){var r,n=[];for(r=0;r>>0;for(t=0;t0)for(r=0;r=0?r?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+n}a.suppressDeprecationWarnings=!1,a.deprecationHandler=null,L=Object.keys?Object.keys:function(e){var t,r=[];for(t in e)c(e,t)&&r.push(t);return r};var C=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,P=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,j={},A={};function N(e,t,r,n){var a=n;"string"==typeof n&&(a=function(){return this[n]()}),e&&(A[e]=a),t&&(A[t[0]]=function(){return Y(a.apply(this,arguments),t[1],t[2])}),r&&(A[r]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function F(e,t){return e.isValid()?(t=I(t,e.localeData()),j[t]=j[t]||function(e){var t,r,n,a=e.match(C);for(t=0,r=a.length;t=0&&P.test(e);)e=e.replace(P,n),P.lastIndex=0,r-=1;return e}var H={};function R(e,t){var r=e.toLowerCase();H[r]=H[r+"s"]=H[t]=e}function z(e){return"string"==typeof e?H[e]||H[e.toLowerCase()]:void 0}function W(e){var t,r,n={};for(r in e)c(e,r)&&(t=z(r))&&(n[t]=e[r]);return n}var B={};function U(e,t){B[e]=t}function V(e){return e%4==0&&e%100!=0||e%400==0}function q(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function G(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=q(t)),r}function J(e,t){return function(r){return null!=r?(K(this,e,r),a.updateOffset(this,t),this):$(this,e)}}function $(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function K(e,t,r){e.isValid()&&!isNaN(r)&&("FullYear"===t&&V(e.year())&&1===e.month()&&29===e.date()?(r=G(r),e._d["set"+(e._isUTC?"UTC":"")+t](r,e.month(),_e(r,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](r))}var X,Q=/\d/,Z=/\d\d/,ee=/\d{3}/,te=/\d{4}/,re=/[+-]?\d{6}/,ne=/\d\d?/,ae=/\d\d\d\d?/,oe=/\d\d\d\d\d\d?/,ie=/\d{1,3}/,ce=/\d{1,4}/,se=/[+-]?\d{1,6}/,le=/\d+/,de=/[+-]?\d+/,ue=/Z|[+-]\d\d:?\d\d/gi,pe=/Z|[+-]\d\d(?::?\d\d)?/gi,fe=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function me(e,t,r){X[e]=S(t)?t:function(e,n){return e&&r?r:t}}function be(e,t){return c(X,e)?X[e](t._strict,t._locale):new RegExp(he(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,r,n,a){return t||r||n||a}))))}function he(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}X={};var ge,ve={};function ye(e,t){var r,n=t;for("string"==typeof e&&(e=[e]),d(t)&&(n=function(e,r){r[t]=G(e)}),r=0;r68?1900:2e3)};var Pe=J("FullYear",!0);function je(e,t,r,n,a,o,i){var c;return e<100&&e>=0?(c=new Date(e+400,t,r,n,a,o,i),isFinite(c.getFullYear())&&c.setFullYear(e)):c=new Date(e,t,r,n,a,o,i),c}function Ae(e){var t,r;return e<100&&e>=0?((r=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ne(e,t,r){var n=7+t-r;return-(7+Ae(e,0,n).getUTCDay()-t)%7+n-1}function Fe(e,t,r,n,a){var o,i,c=1+7*(t-1)+(7+r-n)%7+Ne(e,n,a);return c<=0?i=Ce(o=e-1)+c:c>Ce(e)?(o=e+1,i=c-Ce(e)):(o=e,i=c),{year:o,dayOfYear:i}}function Ie(e,t,r){var n,a,o=Ne(e.year(),t,r),i=Math.floor((e.dayOfYear()-o-1)/7)+1;return i<1?n=i+He(a=e.year()-1,t,r):i>He(e.year(),t,r)?(n=i-He(e.year(),t,r),a=e.year()+1):(a=e.year(),n=i),{week:n,year:a}}function He(e,t,r){var n=Ne(e,t,r),a=Ne(e+1,t,r);return(Ce(e)-n+a)/7}function Re(e,t){return e.slice(t,7).concat(e.slice(0,t))}N("w",["ww",2],"wo","week"),N("W",["WW",2],"Wo","isoWeek"),R("week","w"),R("isoWeek","W"),U("week",5),U("isoWeek",5),me("w",ne),me("ww",ne,Z),me("W",ne),me("WW",ne,Z),we(["w","ww","W","WW"],(function(e,t,r,n){t[n.substr(0,1)]=G(e)})),N("d",0,"do","day"),N("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),N("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),N("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),N("e",0,0,"weekday"),N("E",0,0,"isoWeekday"),R("day","d"),R("weekday","e"),R("isoWeekday","E"),U("day",11),U("weekday",11),U("isoWeekday",11),me("d",ne),me("e",ne),me("E",ne),me("dd",(function(e,t){return t.weekdaysMinRegex(e)})),me("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),me("dddd",(function(e,t){return t.weekdaysRegex(e)})),we(["dd","ddd","dddd"],(function(e,t,r,n){var a=r._locale.weekdaysParse(e,n,r._strict);null!=a?t.d=a:b(r).invalidWeekday=e})),we(["d","e","E"],(function(e,t,r,n){t[n]=G(e)}));var ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),We="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Be="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ue=fe,Ve=fe,qe=fe;function Ge(e,t,r){var n,a,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=m([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return r?"dddd"===t?-1!==(a=ge.call(this._weekdaysParse,i))?a:null:"ddd"===t?-1!==(a=ge.call(this._shortWeekdaysParse,i))?a:null:-1!==(a=ge.call(this._minWeekdaysParse,i))?a:null:"dddd"===t?-1!==(a=ge.call(this._weekdaysParse,i))||-1!==(a=ge.call(this._shortWeekdaysParse,i))||-1!==(a=ge.call(this._minWeekdaysParse,i))?a:null:"ddd"===t?-1!==(a=ge.call(this._shortWeekdaysParse,i))||-1!==(a=ge.call(this._weekdaysParse,i))||-1!==(a=ge.call(this._minWeekdaysParse,i))?a:null:-1!==(a=ge.call(this._minWeekdaysParse,i))||-1!==(a=ge.call(this._weekdaysParse,i))||-1!==(a=ge.call(this._shortWeekdaysParse,i))?a:null}function Je(){function e(e,t){return t.length-e.length}var t,r,n,a,o,i=[],c=[],s=[],l=[];for(t=0;t<7;t++)r=m([2e3,1]).day(t),n=he(this.weekdaysMin(r,"")),a=he(this.weekdaysShort(r,"")),o=he(this.weekdays(r,"")),i.push(n),c.push(a),s.push(o),l.push(n),l.push(a),l.push(o);i.sort(e),c.sort(e),s.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function $e(){return this.hours()%12||12}function Ke(e,t){N(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Xe(e,t){return t._meridiemParse}N("H",["HH",2],0,"hour"),N("h",["hh",2],0,$e),N("k",["kk",2],0,(function(){return this.hours()||24})),N("hmm",0,0,(function(){return""+$e.apply(this)+Y(this.minutes(),2)})),N("hmmss",0,0,(function(){return""+$e.apply(this)+Y(this.minutes(),2)+Y(this.seconds(),2)})),N("Hmm",0,0,(function(){return""+this.hours()+Y(this.minutes(),2)})),N("Hmmss",0,0,(function(){return""+this.hours()+Y(this.minutes(),2)+Y(this.seconds(),2)})),Ke("a",!0),Ke("A",!1),R("hour","h"),U("hour",13),me("a",Xe),me("A",Xe),me("H",ne),me("h",ne),me("k",ne),me("HH",ne,Z),me("hh",ne,Z),me("kk",ne,Z),me("hmm",ae),me("hmmss",oe),me("Hmm",ae),me("Hmmss",oe),ye(["H","HH"],3),ye(["k","kk"],(function(e,t,r){var n=G(e);t[3]=24===n?0:n})),ye(["a","A"],(function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e})),ye(["h","hh"],(function(e,t,r){t[3]=G(e),b(r).bigHour=!0})),ye("hmm",(function(e,t,r){var n=e.length-2;t[3]=G(e.substr(0,n)),t[4]=G(e.substr(n)),b(r).bigHour=!0})),ye("hmmss",(function(e,t,r){var n=e.length-4,a=e.length-2;t[3]=G(e.substr(0,n)),t[4]=G(e.substr(n,2)),t[5]=G(e.substr(a)),b(r).bigHour=!0})),ye("Hmm",(function(e,t,r){var n=e.length-2;t[3]=G(e.substr(0,n)),t[4]=G(e.substr(n))})),ye("Hmmss",(function(e,t,r){var n=e.length-4,a=e.length-2;t[3]=G(e.substr(0,n)),t[4]=G(e.substr(n,2)),t[5]=G(e.substr(a))}));var Qe,Ze=J("Hours",!0),et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:xe,monthsShort:Me,week:{dow:0,doy:6},weekdays:ze,weekdaysMin:Be,weekdaysShort:We,meridiemParse:/[ap]\.?m?\.?/i},tt={},rt={};function nt(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r0;){if(n=ot(a.slice(0,t).join("-")))return n;if(r&&r.length>=t&&nt(a,r)>=t-1)break;t--}o++}return Qe}(e)}function lt(e){var t,r=e._a;return r&&-2===b(e).overflow&&(t=r[1]<0||r[1]>11?1:r[2]<1||r[2]>_e(r[0],r[1])?2:r[3]<0||r[3]>24||24===r[3]&&(0!==r[4]||0!==r[5]||0!==r[6])?3:r[4]<0||r[4]>59?4:r[5]<0||r[5]>59?5:r[6]<0||r[6]>999?6:-1,b(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),b(e)._overflowWeeks&&-1===t&&(t=7),b(e)._overflowWeekday&&-1===t&&(t=8),b(e).overflow=t),e}var dt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ut=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pt=/Z|[+-]\d\d(?::?\d\d)?/,ft=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],mt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],bt=/^\/?Date\((-?\d+)/i,ht=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,gt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function vt(e){var t,r,n,a,o,i,c=e._i,s=dt.exec(c)||ut.exec(c);if(s){for(b(e).iso=!0,t=0,r=ft.length;t7)&&(s=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,l=Ie(Et(),o,i),r=kt(t.gg,e._a[0],l.year),n=kt(t.w,l.week),null!=t.d?((a=t.d)<0||a>6)&&(s=!0):null!=t.e?(a=t.e+o,(t.e<0||t.e>6)&&(s=!0)):a=o),n<1||n>He(r,o,i)?b(e)._overflowWeeks=!0:null!=s?b(e)._overflowWeekday=!0:(c=Fe(r,n,a,o,i),e._a[0]=c.year,e._dayOfYear=c.dayOfYear)}(e),null!=e._dayOfYear&&(i=kt(e._a[0],n[0]),(e._dayOfYear>Ce(i)||0===e._dayOfYear)&&(b(e)._overflowDayOfYear=!0),r=Ae(i,0,e._dayOfYear),e._a[1]=r.getUTCMonth(),e._a[2]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=c[t]=n[t];for(;t<7;t++)e._a[t]=c[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Ae:je).apply(null,c),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(b(e).weekdayMismatch=!0)}}function xt(e){if(e._f!==a.ISO_8601)if(e._f!==a.RFC_2822){e._a=[],b(e).empty=!0;var t,r,n,o,i,c,s=""+e._i,l=s.length,d=0;for(n=I(e._f,e._locale).match(C)||[],t=0;t0&&b(e).unusedInput.push(i),s=s.slice(s.indexOf(r)+r.length),d+=r.length),A[o]?(r?b(e).empty=!1:b(e).unusedTokens.push(o),ke(o,r,e)):e._strict&&!r&&b(e).unusedTokens.push(o);b(e).charsLeftOver=l-d,s.length>0&&b(e).unusedInput.push(s),e._a[3]<=12&&!0===b(e).bigHour&&e._a[3]>0&&(b(e).bigHour=void 0),b(e).parsedDateParts=e._a.slice(0),b(e).meridiem=e._meridiem,e._a[3]=function(e,t,r){var n;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?((n=e.isPM(r))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(c=b(e).era)&&(e._a[0]=e._locale.erasConvertYear(c,e._a[0])),_t(e),lt(e)}else wt(e);else vt(e)}function Mt(e){var t=e._i,r=e._f;return e._locale=e._locale||st(e._l),null===t||void 0===r&&""===t?g({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),_(t)?new k(lt(t)):(u(t)?e._d=t:o(r)?function(e){var t,r,n,a,o,i,c=!1;if(0===e._f.length)return b(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;athis?this:e:g()}));function Tt(e,t){var r,n;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Et();for(r=t[0],n=1;n=0?new Date(e+400,t,r)-126227808e5:new Date(e,t,r).valueOf()}function ar(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-126227808e5:Date.UTC(e,t,r)}function or(e,t){return t.erasAbbrRegex(e)}function ir(){var e,t,r=[],n=[],a=[],o=[],i=this.eras();for(e=0,t=i.length;e(o=He(e,n,a))&&(t=o),lr.call(this,e,t,r,n,a))}function lr(e,t,r,n,a){var o=Fe(e,t,r,n,a),i=Ae(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}N("N",0,0,"eraAbbr"),N("NN",0,0,"eraAbbr"),N("NNN",0,0,"eraAbbr"),N("NNNN",0,0,"eraName"),N("NNNNN",0,0,"eraNarrow"),N("y",["y",1],"yo","eraYear"),N("y",["yy",2],0,"eraYear"),N("y",["yyy",3],0,"eraYear"),N("y",["yyyy",4],0,"eraYear"),me("N",or),me("NN",or),me("NNN",or),me("NNNN",(function(e,t){return t.erasNameRegex(e)})),me("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),ye(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,r,n){var a=r._locale.erasParse(e,n,r._strict);a?b(r).era=a:b(r).invalidEra=e})),me("y",le),me("yy",le),me("yyy",le),me("yyyy",le),me("yo",(function(e,t){return t._eraYearOrdinalRegex||le})),ye(["y","yy","yyy","yyyy"],0),ye(["yo"],(function(e,t,r,n){var a;r._locale._eraYearOrdinalRegex&&(a=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[0]=r._locale.eraYearOrdinalParse(e,a):t[0]=parseInt(e,10)})),N(0,["gg",2],0,(function(){return this.weekYear()%100})),N(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),cr("gggg","weekYear"),cr("ggggg","weekYear"),cr("GGGG","isoWeekYear"),cr("GGGGG","isoWeekYear"),R("weekYear","gg"),R("isoWeekYear","GG"),U("weekYear",1),U("isoWeekYear",1),me("G",de),me("g",de),me("GG",ne,Z),me("gg",ne,Z),me("GGGG",ce,te),me("gggg",ce,te),me("GGGGG",se,re),me("ggggg",se,re),we(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,r,n){t[n.substr(0,2)]=G(e)})),we(["gg","GG"],(function(e,t,r,n){t[n]=a.parseTwoDigitYear(e)})),N("Q",0,"Qo","quarter"),R("quarter","Q"),U("quarter",7),me("Q",Q),ye("Q",(function(e,t){t[1]=3*(G(e)-1)})),N("D",["DD",2],"Do","date"),R("date","D"),U("date",9),me("D",ne),me("DD",ne,Z),me("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),ye(["D","DD"],2),ye("Do",(function(e,t){t[2]=G(e.match(ne)[0])}));var dr=J("Date",!0);N("DDD",["DDDD",3],"DDDo","dayOfYear"),R("dayOfYear","DDD"),U("dayOfYear",4),me("DDD",ie),me("DDDD",ee),ye(["DDD","DDDD"],(function(e,t,r){r._dayOfYear=G(e)})),N("m",["mm",2],0,"minute"),R("minute","m"),U("minute",14),me("m",ne),me("mm",ne,Z),ye(["m","mm"],4);var ur=J("Minutes",!1);N("s",["ss",2],0,"second"),R("second","s"),U("second",15),me("s",ne),me("ss",ne,Z),ye(["s","ss"],5);var pr,fr,mr=J("Seconds",!1);for(N("S",0,0,(function(){return~~(this.millisecond()/100)})),N(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),N(0,["SSS",3],0,"millisecond"),N(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),N(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),N(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),N(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),N(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),N(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),R("millisecond","ms"),U("millisecond",16),me("S",ie,Q),me("SS",ie,Z),me("SSS",ie,ee),pr="SSSS";pr.length<=9;pr+="S")me(pr,le);function br(e,t){t[6]=G(1e3*("0."+e))}for(pr="S";pr.length<=9;pr+="S")ye(pr,br);fr=J("Milliseconds",!1),N("z",0,0,"zoneAbbr"),N("zz",0,0,"zoneName");var hr=k.prototype;function gr(e){return e}hr.add=Gt,hr.calendar=function(e,t){1===arguments.length&&(Kt(arguments[0])?(e=arguments[0],t=void 0):Xt(arguments[0])&&(t=arguments[0],e=void 0));var r=e||Et(),n=Ft(r,this).startOf("day"),o=a.calendarFormat(this,n)||"sameElse",i=t&&(S(t[o])?t[o].call(this,r):t[o]);return this.format(i||this.localeData().calendar(o,this,Et(r)))},hr.clone=function(){return new k(this)},hr.diff=function(e,t,r){var n,a,o;if(!this.isValid())return NaN;if(!(n=Ft(e,this)).isValid())return NaN;switch(a=6e4*(n.utcOffset()-this.utcOffset()),t=z(t)){case"year":o=Qt(this,n)/12;break;case"month":o=Qt(this,n);break;case"quarter":o=Qt(this,n)/3;break;case"second":o=(this-n)/1e3;break;case"minute":o=(this-n)/6e4;break;case"hour":o=(this-n)/36e5;break;case"day":o=(this-n-a)/864e5;break;case"week":o=(this-n-a)/6048e5;break;default:o=this-n}return r?o:q(o)},hr.endOf=function(e){var t,r;if(void 0===(e=z(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?ar:nr,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-rr(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-rr(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-rr(t,1e3)-1}return this._d.setTime(t),a.updateOffset(this,!0),this},hr.format=function(e){e||(e=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var t=F(this,e);return this.localeData().postformat(t)},hr.from=function(e,t){return this.isValid()&&(_(e)&&e.isValid()||Et(e).isValid())?Wt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},hr.fromNow=function(e){return this.from(Et(),e)},hr.to=function(e,t){return this.isValid()&&(_(e)&&e.isValid()||Et(e).isValid())?Wt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},hr.toNow=function(e){return this.to(Et(),e)},hr.get=function(e){return S(this[e=z(e)])?this[e]():this},hr.invalidAt=function(){return b(this).overflow},hr.isAfter=function(e,t){var r=_(e)?e:Et(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=z(t)||"millisecond")?this.valueOf()>r.valueOf():r.valueOf()9999?F(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):S(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",F(r,"Z")):F(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},hr.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,r,n="moment",a="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=a+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+r)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(hr[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),hr.toJSON=function(){return this.isValid()?this.toISOString():null},hr.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},hr.unix=function(){return Math.floor(this.valueOf()/1e3)},hr.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},hr.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},hr.eraName=function(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;ethis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},hr.isLocal=function(){return!!this.isValid()&&!this._isUTC},hr.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},hr.isUtc=Ht,hr.isUTC=Ht,hr.zoneAbbr=function(){return this._isUTC?"UTC":""},hr.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},hr.dates=M("dates accessor is deprecated. Use date instead.",dr),hr.months=M("months accessor is deprecated. Use month instead",Oe),hr.years=M("years accessor is deprecated. Use year instead",Pe),hr.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),hr.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=Mt(t))._a?(e=t._isUTC?m(t._a):Et(t._a),this._isDSTShifted=this.isValid()&&function(e,t,r){var n,a=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),i=0;for(n=0;n0):this._isDSTShifted=!1,this._isDSTShifted}));var vr=O.prototype;function yr(e,t,r,n){var a=st(),o=m().set(n,t);return a[r](o,e)}function wr(e,t,r){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return yr(e,t,r,"month");var n,a=[];for(n=0;n<12;n++)a[n]=yr(e,n,r,"month");return a}function kr(e,t,r,n){"boolean"==typeof e?(d(t)&&(r=t,t=void 0),t=t||""):(r=t=e,e=!1,d(t)&&(r=t,t=void 0),t=t||"");var a,o=st(),i=e?o._week.dow:0,c=[];if(null!=r)return yr(t,(r+i)%7,n,"day");for(a=0;a<7;a++)c[a]=yr(t,(a+i)%7,n,"day");return c}vr.calendar=function(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return S(n)?n.call(t,r):n},vr.longDateFormat=function(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(C).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},vr.invalidDate=function(){return this._invalidDate},vr.ordinal=function(e){return this._ordinal.replace("%d",e)},vr.preparse=gr,vr.postformat=gr,vr.relativeTime=function(e,t,r,n){var a=this._relativeTime[r];return S(a)?a(e,t,r,n):a.replace(/%d/i,e)},vr.pastFuture=function(e,t){var r=this._relativeTime[e>0?"future":"past"];return S(r)?r(t):r.replace(/%s/i,t)},vr.set=function(e){var t,r;for(r in e)c(e,r)&&(S(t=e[r])?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},vr.eras=function(e,t){var r,n,o,i=this._eras||st("en")._eras;for(r=0,n=i.length;r=0)return s[n]},vr.erasConvertYear=function(e,t){var r=e.since<=e.until?1:-1;return void 0===t?a(e.since).year():a(e.since).year()+(t-e.offset)*r},vr.erasAbbrRegex=function(e){return c(this,"_erasAbbrRegex")||ir.call(this),e?this._erasAbbrRegex:this._erasRegex},vr.erasNameRegex=function(e){return c(this,"_erasNameRegex")||ir.call(this),e?this._erasNameRegex:this._erasRegex},vr.erasNarrowRegex=function(e){return c(this,"_erasNarrowRegex")||ir.call(this),e?this._erasNarrowRegex:this._erasRegex},vr.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Le).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},vr.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Le.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},vr.monthsParse=function(e,t,r){var n,a,o;if(this._monthsParseExact)return Se.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(a=m([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(o="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[n]=new RegExp(o.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(r&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}},vr.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Ye.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=De),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},vr.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Ye.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Ee),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},vr.week=function(e){return Ie(e,this._week.dow,this._week.doy).week},vr.firstDayOfYear=function(){return this._week.doy},vr.firstDayOfWeek=function(){return this._week.dow},vr.weekdays=function(e,t){var r=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Re(r,this._week.dow):e?r[e.day()]:r},vr.weekdaysMin=function(e){return!0===e?Re(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},vr.weekdaysShort=function(e){return!0===e?Re(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},vr.weekdaysParse=function(e,t,r){var n,a,o;if(this._weekdaysParseExact)return Ge.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(a=m([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}},vr.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Ue),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},vr.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ve),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},vr.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=qe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},vr.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},vr.meridiem=function(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"},it("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===G(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),a.lang=M("moment.lang is deprecated. Use moment.locale instead.",it),a.langData=M("moment.langData is deprecated. Use moment.localeData instead.",st);var _r=Math.abs;function xr(e,t,r,n){var a=Wt(t,r);return e._milliseconds+=n*a._milliseconds,e._days+=n*a._days,e._months+=n*a._months,e._bubble()}function Mr(e){return e<0?Math.floor(e):Math.ceil(e)}function Lr(e){return 4800*e/146097}function Er(e){return 146097*e/4800}function Dr(e){return function(){return this.as(e)}}var Sr=Dr("ms"),Tr=Dr("s"),Or=Dr("m"),Yr=Dr("h"),Cr=Dr("d"),Pr=Dr("w"),jr=Dr("M"),Ar=Dr("Q"),Nr=Dr("y");function Fr(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ir=Fr("milliseconds"),Hr=Fr("seconds"),Rr=Fr("minutes"),zr=Fr("hours"),Wr=Fr("days"),Br=Fr("months"),Ur=Fr("years"),Vr=Math.round,qr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Gr(e,t,r,n,a){return a.relativeTime(t||1,!!r,e,n)}var Jr=Math.abs;function $r(e){return(e>0)-(e<0)||+e}function Kr(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n,a,o,i,c,s=Jr(this._milliseconds)/1e3,l=Jr(this._days),d=Jr(this._months),u=this.asSeconds();return u?(e=q(s/60),t=q(e/60),s%=60,e%=60,r=q(d/12),d%=12,n=s?s.toFixed(3).replace(/\.?0+$/,""):"",a=u<0?"-":"",o=$r(this._months)!==$r(u)?"-":"",i=$r(this._days)!==$r(u)?"-":"",c=$r(this._milliseconds)!==$r(u)?"-":"",a+"P"+(r?o+r+"Y":"")+(d?o+d+"M":"")+(l?i+l+"D":"")+(t||e||s?"T":"")+(t?c+t+"H":"")+(e?c+e+"M":"")+(s?c+n+"S":"")):"P0D"}var Xr=Yt.prototype;return Xr.isValid=function(){return this._isValid},Xr.abs=function(){var e=this._data;return this._milliseconds=_r(this._milliseconds),this._days=_r(this._days),this._months=_r(this._months),e.milliseconds=_r(e.milliseconds),e.seconds=_r(e.seconds),e.minutes=_r(e.minutes),e.hours=_r(e.hours),e.months=_r(e.months),e.years=_r(e.years),this},Xr.add=function(e,t){return xr(this,e,t,1)},Xr.subtract=function(e,t){return xr(this,e,t,-1)},Xr.as=function(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if("month"===(e=z(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,r=this._months+Lr(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Er(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}},Xr.asMilliseconds=Sr,Xr.asSeconds=Tr,Xr.asMinutes=Or,Xr.asHours=Yr,Xr.asDays=Cr,Xr.asWeeks=Pr,Xr.asMonths=jr,Xr.asQuarters=Ar,Xr.asYears=Nr,Xr.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*G(this._months/12):NaN},Xr._bubble=function(){var e,t,r,n,a,o=this._milliseconds,i=this._days,c=this._months,s=this._data;return o>=0&&i>=0&&c>=0||o<=0&&i<=0&&c<=0||(o+=864e5*Mr(Er(c)+i),i=0,c=0),s.milliseconds=o%1e3,e=q(o/1e3),s.seconds=e%60,t=q(e/60),s.minutes=t%60,r=q(t/60),s.hours=r%24,i+=q(r/24),a=q(Lr(i)),c+=a,i-=Mr(Er(a)),n=q(c/12),c%=12,s.days=i,s.months=c,s.years=n,this},Xr.clone=function(){return Wt(this)},Xr.get=function(e){return e=z(e),this.isValid()?this[e+"s"]():NaN},Xr.milliseconds=Ir,Xr.seconds=Hr,Xr.minutes=Rr,Xr.hours=zr,Xr.days=Wr,Xr.weeks=function(){return q(this.days()/7)},Xr.months=Br,Xr.years=Ur,Xr.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var r,n,a=!1,o=qr;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(a=e),"object"==typeof t&&(o=Object.assign({},qr,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),r=this.localeData(),n=function(e,t,r,n){var a=Wt(e).abs(),o=Vr(a.as("s")),i=Vr(a.as("m")),c=Vr(a.as("h")),s=Vr(a.as("d")),l=Vr(a.as("M")),d=Vr(a.as("w")),u=Vr(a.as("y")),p=o<=r.ss&&["s",o]||o0,p[4]=n,Gr.apply(null,p)}(this,!a,o,r),a&&(n=r.pastFuture(+this,n)),r.postformat(n)},Xr.toISOString=Kr,Xr.toString=Kr,Xr.toJSON=Kr,Xr.locale=Zt,Xr.localeData=tr,Xr.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Kr),Xr.lang=er,N("X",0,0,"unix"),N("x",0,0,"valueOf"),me("x",de),me("X",/[+-]?\d+(\.\d{1,3})?/),ye("X",(function(e,t,r){r._d=new Date(1e3*parseFloat(e))})),ye("x",(function(e,t,r){r._d=new Date(G(e))})), //! moment.js -o.version="2.26.0",t=Et,o.fn=gr,o.min=function(){var e=[].slice.call(arguments,0);return Ct("isBefore",e)},o.max=function(){var e=[].slice.call(arguments,0);return Ct("isAfter",e)},o.now=function(){return Date.now?Date.now():+new Date},o.utc=m,o.unix=function(e){return Et(1e3*e)},o.months=function(e,t){return _r(e,t,"months")},o.isDate=u,o.locale=it,o.invalid=b,o.duration=Bt,o.isMoment=k,o.weekdays=function(e,t,r){return wr(e,t,r,"weekdays")},o.parseZone=function(){return Et.apply(null,arguments).parseZone()},o.localeData=ct,o.isDuration=jt,o.monthsShort=function(e,t){return _r(e,t,"monthsShort")},o.weekdaysMin=function(e,t,r){return wr(e,t,r,"weekdaysMin")},o.defineLocale=st,o.updateLocale=function(e,t){if(null!=t){var r,n,o=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(C(tt[e]._config,t)):(null!=(n=at(e))&&(o=n._config),t=C(o,t),null==n&&(t.abbr=e),(r=new O(t)).parentLocale=tt[e],tt[e]=r),it(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===it()&&it(e)):null!=tt[e]&&delete tt[e]);return tt[e]},o.locales=function(){return S(tt)},o.weekdaysShort=function(e,t,r){return wr(e,t,r,"weekdaysShort")},o.normalizeUnits=H,o.relativeTimeRounding=function(e){return void 0===e?qr:"function"==typeof e&&(qr=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==Vr[e]&&(void 0===t?Vr[e]:(Vr[e]=t,"s"===e&&(Vr.ss=t-1),!0))},o.calendarFormat=function(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"},o.prototype=gr,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},o}()}).call(this,r(199)(e))},function(e,t,r){"use strict";function n(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}r.d(t,"a",(function(){return n}))},function(e,t,r){var n=r(8),o=r(43),a=r(27),i=r(28),s=r(44),c=function(e,t,r){var l,d,u,p,f=e&c.F,m=e&c.G,h=e&c.S,g=e&c.P,b=e&c.B,v=m?n:h?n[t]||(n[t]={}):(n[t]||{}).prototype,y=m?o:o[t]||(o[t]={}),_=y.prototype||(y.prototype={});for(l in m&&(r=t),r)u=((d=!f&&v&&void 0!==v[l])?v:r)[l],p=b&&d?s(u,n):g&&"function"==typeof u?s(Function.call,u):u,v&&i(v,l,u,e&c.U),y[l]!=u&&a(y,l,p),g&&_[l]!=u&&(_[l]=u)};n.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return o}));var n=r(3);function o(e){Object(n.a)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}},function(e,t,r){"use strict";function n(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}r.d(t,"a",(function(){return n}))},function(e,t,r){var n=r(13);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,r){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function r(e){return i(e)?e:B(e)}function n(e){return s(e)?e:U(e)}function o(e){return c(e)?e:W(e)}function a(e){return i(e)&&!l(e)?e:q(e)}function i(e){return!(!e||!e[u])}function s(e){return!(!e||!e[p])}function c(e){return!(!e||!e[f])}function l(e){return s(e)||c(e)}function d(e){return!(!e||!e[m])}t(n,r),t(o,r),t(a,r),r.isIterable=i,r.isKeyed=s,r.isIndexed=c,r.isAssociative=l,r.isOrdered=d,r.Keyed=n,r.Indexed=o,r.Set=a;var u="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",f="@@__IMMUTABLE_INDEXED__@@",m="@@__IMMUTABLE_ORDERED__@@",h={},g={value:!1},b={value:!1};function v(e){return e.value=!1,e}function y(e){e&&(e.value=!0)}function _(){}function w(e,t){t=t||0;for(var r=Math.max(0,e.length-t),n=new Array(r),o=0;o>>0;if(""+r!==t||4294967295===r)return NaN;t=r}return t<0?k(e)+t:t}function M(){return!0}function S(e,t,r){return(0===e||void 0!==r&&e<=-r)&&(void 0===t||void 0!==r&&t>=r)}function E(e,t){return D(e,t,0)}function L(e,t){return D(e,t,t)}function D(e,t,r){return void 0===e?r:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var C,O,T,j="function"==typeof Symbol&&Symbol.iterator,A=j||"@@iterator";function N(e){this.next=e}function P(e,t,r,n){var o=0===e?t:1===e?r:[t,r];return n?n.value=o:n={value:o,done:!1},n}function I(){return{value:void 0,done:!0}}function Y(e){return!!R(e)}function z(e){return e&&"function"==typeof e.next}function F(e){var t=R(e);return t&&t.call(e)}function R(e){var t=e&&(j&&e[j]||e["@@iterator"]);if("function"==typeof t)return t}function H(e){return e&&"number"==typeof e.length}function B(e){return null==e?Z():i(e)?e.toSeq():function(e){var t=ee(e)||"object"==typeof e&&new K(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function U(e){return null==e?Z().toKeyedSeq():i(e)?s(e)?e.toSeq():e.fromEntrySeq():$(e)}function W(e){return null==e?Z():i(e)?s(e)?e.entrySeq():e.toIndexedSeq():X(e)}function q(e){return(null==e?Z():i(e)?s(e)?e.entrySeq():e:X(e)).toSetSeq()}function V(e){this._array=e,this.size=e.length}function K(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function G(e){this._iterable=e,this.size=e.length||e.size}function Q(e){this._iterator=e,this._iteratorCache=[]}function J(e){return!(!e||!e["@@__IMMUTABLE_SEQ__@@"])}function Z(){return C||(C=new V([]))}function $(e){var t=Array.isArray(e)?new V(e).fromEntrySeq():z(e)?new Q(e).fromEntrySeq():Y(e)?new G(e).fromEntrySeq():"object"==typeof e?new K(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function X(e){var t=ee(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ee(e){return H(e)?new V(e):z(e)?new Q(e):Y(e)?new G(e):void 0}function te(e,t,r,n){var o=e._cache;if(o){for(var a=o.length-1,i=0;i<=a;i++){var s=o[r?a-i:i];if(!1===t(s[1],n?s[0]:i,e))return i+1}return i}return e.__iterateUncached(t,r)}function re(e,t,r,n){var o=e._cache;if(o){var a=o.length-1,i=0;return new N((function(){var e=o[r?a-i:i];return i++>a?{value:void 0,done:!0}:P(t,n?e[0]:i-1,e[1])}))}return e.__iteratorUncached(t,r)}function ne(e,t){return t?function e(t,r,n,o){return Array.isArray(r)?t.call(o,n,W(r).map((function(n,o){return e(t,n,o,r)}))):ae(r)?t.call(o,n,U(r).map((function(n,o){return e(t,n,o,r)}))):r}(t,e,"",{"":e}):oe(e)}function oe(e){return Array.isArray(e)?W(e).map(oe).toList():ae(e)?U(e).map(oe).toMap():e}function ae(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ie(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function se(e,t){if(e===t)return!0;if(!i(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||c(e)!==c(t)||d(e)!==d(t))return!1;if(0===e.size&&0===t.size)return!0;var r=!l(e);if(d(e)){var n=e.entries();return t.every((function(e,t){var o=n.next().value;return o&&ie(o[1],e)&&(r||ie(o[0],t))}))&&n.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var a=e;e=t,t=a}var u=!0,p=t.__iterate((function(t,n){if(r?!e.has(t):o?!ie(t,e.get(n,h)):!ie(e.get(n,h),t))return u=!1,!1}));return u&&e.size===p}function ce(e,t){if(!(this instanceof ce))return new ce(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(O)return O;O=this}}function le(e,t){if(!e)throw new Error(t)}function de(e,t,r){if(!(this instanceof de))return new de(e,t,r);if(le(0!==r,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),r=void 0===r?1:Math.abs(r),tn?{value:void 0,done:!0}:P(e,o,r[t?n-o++:o++])}))},t(K,U),K.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},K.prototype.has=function(e){return this._object.hasOwnProperty(e)},K.prototype.__iterate=function(e,t){for(var r=this._object,n=this._keys,o=n.length-1,a=0;a<=o;a++){var i=n[t?o-a:a];if(!1===e(r[i],i,this))return a+1}return a},K.prototype.__iterator=function(e,t){var r=this._object,n=this._keys,o=n.length-1,a=0;return new N((function(){var i=n[t?o-a:a];return a++>o?{value:void 0,done:!0}:P(e,i,r[i])}))},K.prototype[m]=!0,t(G,W),G.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var r=F(this._iterable),n=0;if(z(r))for(var o;!(o=r.next()).done&&!1!==e(o.value,n++,this););return n},G.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=F(this._iterable);if(!z(r))return new N(I);var n=0;return new N((function(){var t=r.next();return t.done?t:P(e,n++,t.value)}))},t(Q,W),Q.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var r,n=this._iterator,o=this._iteratorCache,a=0;a=n.length){var t=r.next();if(t.done)return t;n[o]=t.value}return P(e,o,n[o++])}))},t(ce,W),ce.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ce.prototype.get=function(e,t){return this.has(e)?this._value:t},ce.prototype.includes=function(e){return ie(this._value,e)},ce.prototype.slice=function(e,t){var r=this.size;return S(e,t,r)?this:new ce(this._value,L(t,r)-E(e,r))},ce.prototype.reverse=function(){return this},ce.prototype.indexOf=function(e){return ie(this._value,e)?0:-1},ce.prototype.lastIndexOf=function(e){return ie(this._value,e)?this.size:-1},ce.prototype.__iterate=function(e,t){for(var r=0;r1?" by "+this._step:"")+" ]"},de.prototype.get=function(e,t){return this.has(e)?this._start+x(this,e)*this._step:t},de.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t=0&&rr?{value:void 0,done:!0}:P(e,a++,i)}))},de.prototype.equals=function(e){return e instanceof de?this._start===e._start&&this._end===e._end&&this._step===e._step:se(this,e)},t(ue,r),t(pe,ue),t(fe,ue),t(me,ue),ue.Keyed=pe,ue.Indexed=fe,ue.Set=me;var he="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var r=65535&(e|=0),n=65535&(t|=0);return r*n+((e>>>16)*n+r*(t>>>16)<<16>>>0)|0};function ge(e){return e>>>1&1073741824|3221225471&e}function be(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){var r=0|e;for(r!==e&&(r^=4294967295*e);e>4294967295;)r^=e/=4294967295;return ge(r)}if("string"===t)return e.length>Se?function(e){var t=De[e];return void 0===t&&(t=ve(e),Le===Ee&&(Le=0,De={}),Le++,De[e]=t),t}(e):ve(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return function(e){var t;if(ke&&void 0!==(t=ye.get(e)))return t;if(void 0!==(t=e[Me]))return t;if(!we){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Me]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=++xe,1073741824&xe&&(xe=0),ke)ye.set(e,t);else{if(void 0!==_e&&!1===_e(e))throw new Error("Non-extensible objects are not allowed as keys.");if(we)Object.defineProperty(e,Me,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Me]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Me]=t}}return t}(e);if("function"==typeof e.toString)return ve(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ve(e){for(var t=0,r=0;r>>r),s=31&(0===r?n:n>>>r);return new Ie(t,1<>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function et(e,t,r,n){var o=n?e:w(e);return o[t]=r,o}Ne[Ae]=!0,Ne.delete=Ne.remove,Ne.removeIn=Ne.deleteIn,Pe.prototype.get=function(e,t,r,n){for(var o=this.entries,a=0,i=o.length;a=tt)return function(e,t,r,n){e||(e=new _);for(var o=new Fe(e,be(r),[r,n]),a=0;a>>e)),a=this.bitmap;return 0==(a&o)?n:this.nodes[Xe(a&o-1)].get(e+5,t,r,n)},Ie.prototype.update=function(e,t,r,n,o,a,i){void 0===r&&(r=be(n));var s=31&(0===t?r:r>>>t),c=1<=rt)return function(e,t,r,n,o){for(var a=0,i=new Array(32),s=0;0!==r;s++,r>>>=1)i[s]=1&r?t[a++]:void 0;return i[n]=o,new Ye(e,a+1,i)}(e,p,l,s,m);if(d&&!m&&2===p.length&&Ke(p[1^u]))return p[1^u];if(d&&m&&1===p.length&&Ke(m))return m;var g=e&&e===this.ownerID,b=d?m?l:l^c:l|c,v=d?m?et(p,u,m,g):function(e,t,r){var n=e.length-1;if(r&&t===n)return e.pop(),e;for(var o=new Array(n),a=0,i=0;i>>e),a=this.nodes[o];return a?a.get(e+5,t,r,n):n},Ye.prototype.update=function(e,t,r,n,o,a,i){void 0===r&&(r=be(n));var s=31&(0===t?r:r>>>t),c=o===h,l=this.nodes,d=l[s];if(c&&!d)return this;var u=Ve(d,e,t+5,r,n,o,a,i);if(u===d)return this;var p=this.count;if(d){if(!u&&--p0&&n<32?ft(0,n,5,null,new ct(r.toArray())):t.withMutations((function(e){e.setSize(n),r.forEach((function(t,r){return e.set(r,t)}))})))}function at(e){return!(!e||!e[it])}t(ot,fe),ot.of=function(){return this(arguments)},ot.prototype.toString=function(){return this.__toString("List [","]")},ot.prototype.get=function(e,t){if((e=x(this,e))>=0&&e=e.size||t<0)return e.withMutations((function(e){t<0?vt(e,t).set(0,r):vt(e,0,t+1).set(t,r)}));t+=e._origin;var n=e._tail,o=e._root,a=v(b);return t>=_t(e._capacity)?n=ht(n,e.__ownerID,0,t,r,a):o=ht(o,e.__ownerID,e._level,t,r,a),a.value?e.__ownerID?(e._root=o,e._tail=n,e.__hash=void 0,e.__altered=!0,e):ft(e._origin,e._capacity,e._level,o,n):e}(this,e,t)},ot.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},ot.prototype.insert=function(e,t){return this.splice(e,0,t)},ot.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):mt()},ot.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(r){vt(r,0,t+e.length);for(var n=0;n>>t&31;if(n>=this.array.length)return new ct([],e);var o,a=0===n;if(t>0){var i=this.array[n];if((o=i&&i.removeBefore(e,t-5,r))===i&&a)return this}if(a&&!o)return this;var s=gt(this,e);if(!a)for(var c=0;c>>t&31;if(o>=this.array.length)return this;if(t>0){var a=this.array[o];if((n=a&&a.removeAfter(e,t-5,r))===a&&o===this.array.length-1)return this}var i=gt(this,e);return i.array.splice(o+1),n&&(i.array[o]=n),i};var lt,dt,ut={};function pt(e,t){var r=e._origin,n=e._capacity,o=_t(n),a=e._tail;return i(e._root,e._level,0);function i(e,s,c){return 0===s?function(e,i){var s=i===o?a&&a.array:e&&e.array,c=i>r?0:r-i,l=n-i;return l>32&&(l=32),function(){if(c===l)return ut;var e=t?--l:c++;return s&&s[e]}}(e,c):function(e,o,a){var s,c=e&&e.array,l=a>r?0:r-a>>o,d=1+(n-a>>o);return d>32&&(d=32),function(){for(;;){if(s){var e=s();if(e!==ut)return e;s=null}if(l===d)return ut;var r=t?--d:l++;s=i(c&&c[r],o-5,a+(r<>>r&31,c=e&&s0){var l=e&&e.array[s],d=ht(l,t,r-5,n,o,a);return d===l?e:((i=gt(e,t)).array[s]=d,i)}return c&&e.array[s]===o?e:(y(a),i=gt(e,t),void 0===o&&s===i.array.length-1?i.array.pop():i.array[s]=o,i)}function gt(e,t){return t&&e&&t===e.ownerID?e:new ct(e?e.array.slice():[],t)}function bt(e,t){if(t>=_t(e._capacity))return e._tail;if(t<1<0;)r=r.array[t>>>n&31],n-=5;return r}}function vt(e,t,r){void 0!==t&&(t|=0),void 0!==r&&(r|=0);var n=e.__ownerID||new _,o=e._origin,a=e._capacity,i=o+t,s=void 0===r?a:r<0?a+r:o+r;if(i===o&&s===a)return e;if(i>=s)return e.clear();for(var c=e._level,l=e._root,d=0;i+d<0;)l=new ct(l&&l.array.length?[void 0,l]:[],n),d+=1<<(c+=5);d&&(i+=d,o+=d,s+=d,a+=d);for(var u=_t(a),p=_t(s);p>=1<u?new ct([],n):f;if(f&&p>u&&i5;g-=5){var b=u>>>g&31;h=h.array[b]=gt(h.array[b],n)}h.array[u>>>5&31]=f}if(s=p)i-=p,s-=p,c=5,l=null,m=m&&m.removeBefore(n,0,i);else if(i>o||p>>c&31;if(v!==p>>>c&31)break;v&&(d+=(1<o&&(l=l.removeBefore(n,c,i-d)),l&&pa&&(a=l.size),i(c)||(l=l.map((function(e){return ne(e)}))),n.push(l)}return a>e.size&&(e=e.setSize(a)),$e(e,t,n)}function _t(e){return e<32?0:e-1>>>5<<5}function wt(e){return null==e?Mt():kt(e)?e:Mt().withMutations((function(t){var r=n(e);Ce(r.size),r.forEach((function(e,r){return t.set(r,e)}))}))}function kt(e){return Te(e)&&d(e)}function xt(e,t,r,n){var o=Object.create(wt.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=r,o.__hash=n,o}function Mt(){return dt||(dt=xt(We(),mt()))}function St(e,t,r){var n,o,a=e._map,i=e._list,s=a.get(t),c=void 0!==s;if(r===h){if(!c)return e;i.size>=32&&i.size>=2*a.size?(n=(o=i.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(n.__ownerID=o.__ownerID=e.__ownerID)):(n=a.remove(t),o=s===i.size-1?i.pop():i.set(s,void 0))}else if(c){if(r===i.get(s)[1])return e;n=a,o=i.set(s,[t,r])}else n=a.set(t,i.size),o=i.set(i.size,[t,r]);return e.__ownerID?(e.size=n.size,e._map=n,e._list=o,e.__hash=void 0,e):xt(n,o)}function Et(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Lt(e){this._iter=e,this.size=e.size}function Dt(e){this._iter=e,this.size=e.size}function Ct(e){this._iter=e,this.size=e.size}function Ot(e){var t=Vt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Kt,t.__iterateUncached=function(t,r){var n=this;return e.__iterate((function(e,r){return!1!==t(r,e,n)}),r)},t.__iteratorUncached=function(t,r){if(2===t){var n=e.__iterator(t,r);return new N((function(){var e=n.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(1===t?0:1,r)},t}function Tt(e,t,r){var n=Vt(e);return n.size=e.size,n.has=function(t){return e.has(t)},n.get=function(n,o){var a=e.get(n,h);return a===h?o:t.call(r,a,n,e)},n.__iterateUncached=function(n,o){var a=this;return e.__iterate((function(e,o,i){return!1!==n(t.call(r,e,o,i),o,a)}),o)},n.__iteratorUncached=function(n,o){var a=e.__iterator(2,o);return new N((function(){var o=a.next();if(o.done)return o;var i=o.value,s=i[0];return P(n,s,t.call(r,i[1],s,e),o)}))},n}function jt(e,t){var r=Vt(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e},e.flip&&(r.flip=function(){var t=Ot(e);return t.reverse=function(){return e.flip()},t}),r.get=function(r,n){return e.get(t?r:-1-r,n)},r.has=function(r){return e.has(t?r:-1-r)},r.includes=function(t){return e.includes(t)},r.cacheResult=Kt,r.__iterate=function(t,r){var n=this;return e.__iterate((function(e,r){return t(e,r,n)}),!r)},r.__iterator=function(t,r){return e.__iterator(t,!r)},r}function At(e,t,r,n){var o=Vt(e);return n&&(o.has=function(n){var o=e.get(n,h);return o!==h&&!!t.call(r,o,n,e)},o.get=function(n,o){var a=e.get(n,h);return a!==h&&t.call(r,a,n,e)?a:o}),o.__iterateUncached=function(o,a){var i=this,s=0;return e.__iterate((function(e,a,c){if(t.call(r,e,a,c))return s++,o(e,n?a:s-1,i)}),a),s},o.__iteratorUncached=function(o,a){var i=e.__iterator(2,a),s=0;return new N((function(){for(;;){var a=i.next();if(a.done)return a;var c=a.value,l=c[0],d=c[1];if(t.call(r,d,l,e))return P(o,n?l:s++,d,a)}}))},o}function Nt(e,t,r,n){var o=e.size;if(void 0!==t&&(t|=0),void 0!==r&&(r|=0),S(t,r,o))return e;var a=E(t,o),i=L(r,o);if(a!=a||i!=i)return Nt(e.toSeq().cacheResult(),t,r,n);var s,c=i-a;c==c&&(s=c<0?0:c);var l=Vt(e);return l.size=0===s?s:e.size&&s||void 0,!n&&J(e)&&s>=0&&(l.get=function(t,r){return(t=x(this,t))>=0&&ts)return{value:void 0,done:!0};var e=o.next();return n||1===t?e:P(t,c-1,0===t?void 0:e.value[1],e)}))},l}function Pt(e,t,r,n){var o=Vt(e);return o.__iterateUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterate(o,a);var s=!0,c=0;return e.__iterate((function(e,a,l){if(!s||!(s=t.call(r,e,a,l)))return c++,o(e,n?a:c-1,i)})),c},o.__iteratorUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterator(o,a);var s=e.__iterator(2,a),c=!0,l=0;return new N((function(){var e,a,d;do{if((e=s.next()).done)return n||1===o?e:P(o,l++,0===o?void 0:e.value[1],e);var u=e.value;a=u[0],d=u[1],c&&(c=t.call(r,d,a,i))}while(c);return 2===o?e:P(o,a,d,e)}))},o}function It(e,t){var r=s(e),o=[e].concat(t).map((function(e){return i(e)?r&&(e=n(e)):e=r?$(e):X(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var a=o[0];if(a===e||r&&s(a)||c(e)&&c(a))return a}var l=new V(o);return r?l=l.toKeyedSeq():c(e)||(l=l.toSetSeq()),(l=l.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var r=t.size;if(void 0!==r)return e+r}}),0),l}function Yt(e,t,r){var n=Vt(e);return n.__iterateUncached=function(n,o){var a=0,s=!1;return function e(c,l){var d=this;c.__iterate((function(o,c){return(!t||l0}function Ht(e,t,n){var o=Vt(e);return o.size=new V(n).map((function(e){return e.size})).min(),o.__iterate=function(e,t){for(var r,n=this.__iterator(1,t),o=0;!(r=n.next()).done&&!1!==e(r.value,o++,this););return o},o.__iteratorUncached=function(e,o){var a=n.map((function(e){return e=r(e),F(o?e.reverse():e)})),i=0,s=!1;return new N((function(){var r;return s||(r=a.map((function(e){return e.next()})),s=r.some((function(e){return e.done}))),s?{value:void 0,done:!0}:P(e,i++,t.apply(null,r.map((function(e){return e.value}))))}))},o}function Bt(e,t){return J(e)?t:e.constructor(t)}function Ut(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Wt(e){return Ce(e.size),k(e)}function qt(e){return s(e)?n:c(e)?o:a}function Vt(e){return Object.create((s(e)?U:c(e)?W:q).prototype)}function Kt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):B.prototype.cacheResult.call(this)}function Gt(e,t){return e>t?1:e=0;r--)t={value:arguments[r],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):_r(e,t)},hr.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;Ce(e.size);var t=this.size,r=this._head;return e.reverse().forEach((function(e){t++,r={value:e,next:r}})),this.__ownerID?(this.size=t,this._head=r,this.__hash=void 0,this.__altered=!0,this):_r(t,r)},hr.prototype.pop=function(){return this.slice(1)},hr.prototype.unshift=function(){return this.push.apply(this,arguments)},hr.prototype.unshiftAll=function(e){return this.pushAll(e)},hr.prototype.shift=function(){return this.pop.apply(this,arguments)},hr.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):wr()},hr.prototype.slice=function(e,t){if(S(e,t,this.size))return this;var r=E(e,this.size);if(L(t,this.size)!==this.size)return fe.prototype.slice.call(this,e,t);for(var n=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=n,this._head=o,this.__hash=void 0,this.__altered=!0,this):_r(n,o)},hr.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?_r(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},hr.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var r=0,n=this._head;n&&!1!==e(n.value,r++,this);)n=n.next;return r},hr.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var r=0,n=this._head;return new N((function(){if(n){var t=n.value;return n=n.next,P(e,r++,t)}return{value:void 0,done:!0}}))},hr.isStack=gr;var br,vr="@@__IMMUTABLE_STACK__@@",yr=hr.prototype;function _r(e,t,r,n){var o=Object.create(yr);return o.size=e,o._head=t,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function wr(){return br||(br=_r(0))}function kr(e,t){var r=function(r){e.prototype[r]=t[r]};return Object.keys(t).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(r),e}yr[vr]=!0,yr.withMutations=Ne.withMutations,yr.asMutable=Ne.asMutable,yr.asImmutable=Ne.asImmutable,yr.wasAltered=Ne.wasAltered,r.Iterator=N,kr(r,{toArray:function(){Ce(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,r){e[r]=t})),e},toIndexedSeq:function(){return new Lt(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Et(this,!0)},toMap:function(){return Oe(this.toKeyedSeq())},toObject:function(){Ce(this.size);var e={};return this.__iterate((function(t,r){e[r]=t})),e},toOrderedMap:function(){return wt(this.toKeyedSeq())},toOrderedSet:function(){return lr(s(this)?this.valueSeq():this)},toSet:function(){return tr(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Dt(this)},toSeq:function(){return c(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return hr(s(this)?this.valueSeq():this)},toList:function(){return ot(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var t=e.call(arguments,0);return Bt(this,It(this,t))},includes:function(e){return this.some((function(t){return ie(t,e)}))},entries:function(){return this.__iterator(2)},every:function(e,t){Ce(this.size);var r=!0;return this.__iterate((function(n,o,a){if(!e.call(t,n,o,a))return r=!1,!1})),r},filter:function(e,t){return Bt(this,At(this,e,t,!0))},find:function(e,t,r){var n=this.findEntry(e,t);return n?n[1]:r},findEntry:function(e,t){var r;return this.__iterate((function(n,o,a){if(e.call(t,n,o,a))return r=[o,n],!1})),r},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){return Ce(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Ce(this.size),e=void 0!==e?""+e:",";var t="",r=!0;return this.__iterate((function(n){r?r=!1:t+=e,t+=null!=n?n.toString():""})),t},keys:function(){return this.__iterator(0)},map:function(e,t){return Bt(this,Tt(this,e,t))},reduce:function(e,t,r){var n,o;return Ce(this.size),arguments.length<2?o=!0:n=t,this.__iterate((function(t,a,i){o?(o=!1,n=t):n=e.call(r,n,t,a,i)})),n},reduceRight:function(e,t,r){var n=this.toKeyedSeq().reverse();return n.reduce.apply(n,arguments)},reverse:function(){return Bt(this,jt(this,!0))},slice:function(e,t){return Bt(this,Nt(this,e,t,!0))},some:function(e,t){return!this.every(Lr(e),t)},sort:function(e){return Bt(this,zt(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return k(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,r){var n=Oe().asMutable();return e.__iterate((function(o,a){n.update(t.call(r,o,a,e),0,(function(e){return e+1}))})),n.asImmutable()}(this,e,t)},equals:function(e){return se(this,e)},entrySeq:function(){var e=this;if(e._cache)return new V(e._cache);var t=e.toSeq().map(Er).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Lr(e),t)},findLast:function(e,t,r){return this.toKeyedSeq().reverse().find(e,t,r)},first:function(){return this.find(M)},flatMap:function(e,t){return Bt(this,function(e,t,r){var n=qt(e);return e.toSeq().map((function(o,a){return n(t.call(r,o,a,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return Bt(this,Yt(this,e,!0))},fromEntrySeq:function(){return new Ct(this)},get:function(e,t){return this.find((function(t,r){return ie(r,e)}),void 0,t)},getIn:function(e,t){for(var r,n=this,o=Qt(e);!(r=o.next()).done;){var a=r.value;if((n=n&&n.get?n.get(a,h):h)===h)return t}return n},groupBy:function(e,t){return function(e,t,r){var n=s(e),o=(d(e)?wt():Oe()).asMutable();e.__iterate((function(a,i){o.update(t.call(r,a,i,e),(function(e){return(e=e||[]).push(n?[i,a]:a),e}))}));var a=qt(e);return o.map((function(t){return Bt(e,a(t))}))}(this,e,t)},has:function(e){return this.get(e,h)!==h},hasIn:function(e){return this.getIn(e,h)!==h},isSubset:function(e){return e="function"==typeof e.includes?e:r(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:r(e)).isSubset(this)},keySeq:function(){return this.toSeq().map(Sr).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return Ft(this,e)},maxBy:function(e,t){return Ft(this,t,e)},min:function(e){return Ft(this,e?Dr(e):Tr)},minBy:function(e,t){return Ft(this,t?Dr(t):Tr,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return Bt(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return Bt(this,Pt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Lr(e),t)},sortBy:function(e,t){return Bt(this,zt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return Bt(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return Bt(this,function(e,t,r){var n=Vt(e);return n.__iterateUncached=function(n,o){var a=this;if(o)return this.cacheResult().__iterate(n,o);var i=0;return e.__iterate((function(e,o,s){return t.call(r,e,o,s)&&++i&&n(e,o,a)})),i},n.__iteratorUncached=function(n,o){var a=this;if(o)return this.cacheResult().__iterator(n,o);var i=e.__iterator(2,o),s=!0;return new N((function(){if(!s)return{value:void 0,done:!0};var e=i.next();if(e.done)return e;var o=e.value,c=o[0],l=o[1];return t.call(r,l,c,a)?2===n?e:P(n,c,l,e):(s=!1,{value:void 0,done:!0})}))},n}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Lr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=d(e),r=s(e),n=t?1:0;return function(e,t){return t=he(t,3432918353),t=he(t<<15|t>>>-15,461845907),t=he(t<<13|t>>>-13,5),t=he((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=ge((t=he(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(r?t?function(e,t){n=31*n+jr(be(e),be(t))|0}:function(e,t){n=n+jr(be(e),be(t))|0}:t?function(e){n=31*n+be(e)|0}:function(e){n=n+be(e)|0}),n)}(this))}});var xr=r.prototype;xr[u]=!0,xr[A]=xr.values,xr.__toJS=xr.toArray,xr.__toStringMapper=Cr,xr.inspect=xr.toSource=function(){return this.toString()},xr.chain=xr.flatMap,xr.contains=xr.includes,function(){try{Object.defineProperty(xr,"length",{get:function(){if(!r.noLengthWarning){var e;try{throw new Error}catch(t){e=t.stack}if(-1===e.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+e),this.size}}})}catch(e){}}(),kr(n,{flip:function(){return Bt(this,Ot(this))},findKey:function(e,t){var r=this.findEntry(e,t);return r&&r[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(e){return this.findKey((function(t){return ie(t,e)}))},lastKeyOf:function(e){return this.findLastKey((function(t){return ie(t,e)}))},mapEntries:function(e,t){var r=this,n=0;return Bt(this,this.toSeq().map((function(o,a){return e.call(t,[a,o],n++,r)})).fromEntrySeq())},mapKeys:function(e,t){var r=this;return Bt(this,this.toSeq().flip().map((function(n,o){return e.call(t,n,o,r)})).flip())}});var Mr=n.prototype;function Sr(e,t){return t}function Er(e,t){return[t,e]}function Lr(e){return function(){return!e.apply(this,arguments)}}function Dr(e){return function(){return-e.apply(this,arguments)}}function Cr(e){return"string"==typeof e?JSON.stringify(e):e}function Or(){return w(arguments)}function Tr(e,t){return et?-1:0}function jr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Mr[p]=!0,Mr[A]=xr.entries,Mr.__toJS=xr.toObject,Mr.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+Cr(e)},kr(o,{toKeyedSeq:function(){return new Et(this,!1)},filter:function(e,t){return Bt(this,At(this,e,t,!1))},findIndex:function(e,t){var r=this.findEntry(e,t);return r?r[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return void 0===t?-1:t},reverse:function(){return Bt(this,jt(this,!1))},slice:function(e,t){return Bt(this,Nt(this,e,t,!1))},splice:function(e,t){var r=arguments.length;if(t=Math.max(0|t,0),0===r||2===r&&!t)return this;e=E(e,e<0?this.count():this.size);var n=this.slice(0,e);return Bt(this,1===r?n:n.concat(w(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var r=this.toKeyedSeq().findLastKey(e,t);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(e){return Bt(this,Yt(this,e,!1))},get:function(e,t){return(e=x(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,r){return r===e}),void 0,t)},has:function(e){return(e=x(this,e))>=0&&(void 0!==this.size?this.size===1/0||e2?r-2:0),a=2;a0)return o.getInlineStyleAt(n-1);if(o.getLength())return o.getInlineStyleAt(0);return _(e,r)}(t,r):function(e,t){var r=t.getStartKey(),n=t.getStartOffset(),o=e.getBlockForKey(r);if(n0)return o.getInlineStyleAt(n-1);return _(e,r)}(t,r)},e.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},e.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},e.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},e.getDirectionMap=function(){return this.getImmutable().get("directionMap")},t.acceptSelection=function(e,t){return b(e,t,!1)},t.forceSelection=function(e,t){return t.getHasFocus()||(t=t.set("hasFocus",!0)),b(e,t,!0)},t.moveSelectionToEnd=function(e){var r=e.getCurrentContent().getLastBlock(),n=r.getKey(),o=r.getLength();return t.acceptSelection(e,new c({anchorKey:n,anchorOffset:o,focusKey:n,focusOffset:o,isBackward:!1}))},t.moveFocusToEnd=function(e){var r=t.moveSelectionToEnd(e);return t.forceSelection(r,r.getSelection())},t.push=function(e,r,n){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e.getCurrentContent()===r)return e;var a=s.getDirectionMap(r,e.getDirectionMap());if(!e.getAllowUndo())return t.set(e,{currentContent:r,directionMap:a,lastChangeType:n,selection:r.getSelectionAfter(),forceSelection:o,inlineStyleOverride:null});var i=e.getSelection(),c=e.getCurrentContent(),l=e.getUndoStack(),d=r;i!==c.getSelectionAfter()||y(e,n)?(l=l.push(c),d=d.set("selectionBefore",i)):"insert-characters"!==n&&"backspace-character"!==n&&"delete-character"!==n||(d=d.set("selectionBefore",c.getSelectionBefore()));var u=e.getInlineStyleOverride(),f=["adjust-depth","change-block-type","split-block"];-1===f.indexOf(n)&&(u=null);var m={currentContent:d,directionMap:a,undoStack:l,redoStack:p(),lastChangeType:n,selection:r.getSelectionAfter(),forceSelection:o,inlineStyleOverride:u};return t.set(e,m)},t.undo=function(e){if(!e.getAllowUndo())return e;var r=e.getUndoStack(),n=r.peek();if(!n)return e;var o=e.getCurrentContent(),a=s.getDirectionMap(n,e.getDirectionMap());return t.set(e,{currentContent:n,directionMap:a,undoStack:r.shift(),redoStack:e.getRedoStack().push(o),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:o.getSelectionBefore()})},t.redo=function(e){if(!e.getAllowUndo())return e;var r=e.getRedoStack(),n=r.peek();if(!n)return e;var o=e.getCurrentContent(),a=s.getDirectionMap(n,e.getDirectionMap());return t.set(e,{currentContent:n,directionMap:a,undoStack:e.getUndoStack().push(o),redoStack:r.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:n.getSelectionAfter()})},e.getImmutable=function(){return this._immutable},t}();function b(e,t,r){return g.set(e,{selection:t,forceSelection:r,nativelyRenderedContent:null,inlineStyleOverride:null})}function v(e,t){return e.getBlockMap().map((function(r){return a.generate(e,r,t)})).toOrderedMap()}function y(e,t){return t!==e.getLastChangeType()||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}function _(e,t){var r=e.getBlockMap().reverse().skipUntil((function(e,r){return r===t})).skip(1).skipUntil((function(e,t){return e.getLength()})).first();return r?r.getInlineStyleAt(r.getLength()-1):d()}e.exports=g},function(e,t,r){var n=r(110)("wks"),o=r(73),a=r(8).Symbol,i="function"==typeof a;(e.exports=function(e){return n[e]||(n[e]=i&&a[e]||(i?a:o)("Symbol."+e))}).store=n},function(e,t,r){var n=r(46),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},function(e,t,r){e.exports=!r(10)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t,r){var n=r(7),o=r(246),a=r(50),i=Object.defineProperty;t.f=r(17)?Object.defineProperty:function(e,t,r){if(n(e),t=a(t,!0),n(r),o)try{return i(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){var n=r(51);e.exports=function(e){return Object(n(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,r){"use strict";var n=r(36),o=r(868),a=r(869),i=r(871),s=r(152),c=r(9),l=r(874),d=r(875),u=r(11),p=r(447),f=r(445),m=r(876),h=r(877),g=c.OrderedSet,b={replaceText:function(e,t,r,o,a){var i=f(e,t),s=m(i,t),c=n.create({style:o||g(),entity:a||null});return d(s,s.getSelectionAfter(),r,c)},insertText:function(e,t,r,n,o){return t.isCollapsed()||u(!1),b.replaceText(e,t,r,n,o)},moveText:function(e,t,r){var n=s(e,t),o=b.removeRange(e,t,"backward");return b.replaceWithFragment(o,r,n)},replaceWithFragment:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",o=f(e,t),a=m(o,t);return l(a,a.getSelectionAfter(),r,n)},removeRange:function(e,t,r){var n,o,a,s;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),n=t.getAnchorKey(),o=t.getFocusKey(),a=e.getBlockForKey(n),s=e.getBlockForKey(o);var c=t.getStartOffset(),l=t.getEndOffset(),d=a.getEntityAt(c),u=s.getEntityAt(l-1);if(n===o&&d&&d===u){var p=i(e.getEntityMap(),a,s,t,r);return m(e,p)}var h=f(e,t);return m(h,t)},splitBlock:function(e,t){var r=f(e,t),n=m(r,t);return h(n,n.getSelectionAfter())},applyInlineStyle:function(e,t,r){return o.add(e,t,r)},removeInlineStyle:function(e,t,r){return o.remove(e,t,r)},setBlockType:function(e,t,r){return p(e,t,(function(e){return e.merge({type:r,depth:0})}))},setBlockData:function(e,t,r){return p(e,t,(function(e){return e.merge({data:r})}))},mergeBlockData:function(e,t,r){return p(e,t,(function(e){return e.merge({data:e.getData().merge(r)})}))},applyEntity:function(e,t,r){var n=f(e,t);return a(n,t,r)}};e.exports=b},function(e,t,r){"use strict";e.exports=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")}},function(e,t,r){"use strict";var n=r(887),o=r(889),a=r(890),i=r(891);function s(e,t,r,n){if(e===r)return!0;if(!r.startsWith(e))return!1;var a=r.slice(e.length);return!!t&&(a=n?n(a):a,o.contains(a,t))}function c(e){return"Windows"===n.platformName?e.replace(/^\s*NT/,""):e}var l={isBrowser:function(e){return s(n.browserName,n.browserFullVersion,e)},isBrowserArchitecture:function(e){return s(n.browserArchitecture,null,e)},isDevice:function(e){return s(n.deviceName,null,e)},isEngine:function(e){return s(n.engineName,n.engineVersion,e)},isPlatform:function(e){return s(n.platformName,n.platformFullVersion,e,c)},isPlatformArchitecture:function(e){return s(n.platformArchitecture,null,e)}};e.exports=a(l,i)},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){var n=r(20),o=r(72);e.exports=r(17)?function(e,t,r){return n.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){var n=r(8),o=r(27),a=r(32),i=r(73)("src"),s=r(516),c=(""+s).split("toString");r(43).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,r,s){var l="function"==typeof r;l&&(a(r,"name")||o(r,"name",t)),e[t]!==r&&(l&&(a(r,i)||o(r,i,e[t]?""+e[t]:c.join(String(t)))),e===n?e[t]=r:s?e[t]?e[t]=r:o(e,t,r):(delete e[t],o(e,t,r)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[i]||s.call(this)}))},function(e,t,r){var n=r(4),o=r(10),a=r(51),i=/"/g,s=function(e,t,r,n){var o=String(a(e)),s="<"+t;return""!==r&&(s+=" "+r+'="'+String(n).replace(i,""")+'"'),s+">"+o+""};e.exports=function(e,t){var r={};r[e]=t(s),n(n.P+n.F*o((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",r)}},function(e,t,r){"use strict";t.__esModule=!0;var n,o=r(162),a=(n=o)&&n.__esModule?n:{default:n};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,a.default)(t))&&"function"!=typeof t?e:t}},function(e,t,r){"use strict";function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}r.d(t,"a",(function(){return n}))},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){var n=r(111),o=r(51);e.exports=function(e){return n(o(e))}},function(e,t,r){var n=r(112),o=r(72),a=r(33),i=r(50),s=r(32),c=r(246),l=Object.getOwnPropertyDescriptor;t.f=r(17)?l:function(e,t){if(e=a(e),t=i(t,!0),c)try{return l(e,t)}catch(e){}if(s(e,t))return o(!n.f.call(e,t),e[t])}},function(e,t,r){var n=r(32),o=r(21),a=r(174)("IE_PROTO"),i=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),n(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?i:null}},function(e,t,r){"use strict";var n=r(9),o=n.Map,a=n.OrderedSet,i=n.Record,s=a(),c={style:s,entity:null},l=function(e){var t,r;function n(){return e.apply(this,arguments)||this}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var i=n.prototype;return i.getStyle=function(){return this.get("style")},i.getEntity=function(){return this.get("entity")},i.hasStyle=function(e){return this.getStyle().includes(e)},n.applyStyle=function(e,t){var r=e.set("style",e.getStyle().add(t));return n.create(r)},n.removeStyle=function(e,t){var r=e.set("style",e.getStyle().remove(t));return n.create(r)},n.applyEntity=function(e,t){var r=e.getEntity()===t?e:e.set("entity",t);return n.create(r)},n.create=function(e){if(!e)return d;var t=o({style:s,entity:null}).merge(e),r=u.get(t);if(r)return r;var a=new n(t);return u=u.set(t,a),a},n.fromJS=function(e){var t=e.style,r=e.entity;return new n({style:Array.isArray(t)?a(t):t,entity:Array.isArray(r)?a(r):r})},n}(i(c)),d=new l,u=o([[o(c),d]]);l.EMPTY=d,e.exports=l},function(e,t,r){"use strict";var n=r(36),o=r(121),a=r(9),i=a.List,s=a.Map,c=a.OrderedSet,l=a.Record,d=a.Repeat,u=c(),p={parent:null,characterList:i(),data:s(),depth:0,key:"",text:"",type:"unstyled",children:i(),prevSibling:null,nextSibling:null},f=function(e,t){return e.getStyle()===t.getStyle()},m=function(e,t){return e.getEntity()===t.getEntity()},h=function(e){if(!e)return e;var t=e.characterList,r=e.text;return r&&!t&&(e.characterList=i(d(n.EMPTY,r.length))),e},g=function(e){var t,r;function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;return e.call(this,h(t))||this}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=n.prototype;return a.getKey=function(){return this.get("key")},a.getType=function(){return this.get("type")},a.getText=function(){return this.get("text")},a.getCharacterList=function(){return this.get("characterList")},a.getLength=function(){return this.getText().length},a.getDepth=function(){return this.get("depth")},a.getData=function(){return this.get("data")},a.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():u},a.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},a.getChildKeys=function(){return this.get("children")},a.getParentKey=function(){return this.get("parent")},a.getPrevSiblingKey=function(){return this.get("prevSibling")},a.getNextSiblingKey=function(){return this.get("nextSibling")},a.findStyleRanges=function(e,t){o(this.getCharacterList(),f,e,t)},a.findEntityRanges=function(e,t){o(this.getCharacterList(),m,e,t)},n}(l(p));e.exports=g},function(e,t,r){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var o=(i=n,s=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(c," */")),a=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[r].concat(a).concat([o]).join("\n")}var i,s,c;return[r].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var a=0;a0?n:r)(e)}},function(e,t,r){"use strict";var n=r(10);e.exports=function(e,t){return!!e&&n((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return i}));var n=r(5),o=r(6),a=r(3);function i(e,t){Object(a.a)(1,arguments);var r=t||{},i=r.locale,s=i&&i.options&&i.options.weekStartsOn,c=null==s?0:Object(o.a)(s),l=null==r.weekStartsOn?c:Object(o.a)(r.weekStartsOn);if(!(l>=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Object(n.default)(e),u=d.getDay(),p=(u=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Object(o.default)(e),u=d.getUTCDay(),p=(uw;w++)if((p||w in v)&&(g=y(h=v[w],w,b),e))if(r)k[w]=g;else if(g)switch(e){case 3:return!0;case 5:return h;case 6:return w;case 2:k.push(h)}else if(d)return!1;return u?-1:l||d?d:k}}},function(e,t,r){"use strict";var n={},o=Math.pow(2,24);e.exports=function(){for(var e;void 0===e||n.hasOwnProperty(e)||!isNaN(+e);)e=Math.floor(Math.random()*o).toString(32);return n[e]=!0,e}},function(e,t,r){"use strict";t.__esModule=!0;var n,o=r(816),a=(n=o)&&n.__esModule?n:{default:n};t.default=a.default||function(e){for(var t=1;t0?(6e4+n(t))%6e4:n(t))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(5),o=r(3);function a(e){Object(o.a)(1,arguments);var t=1,r=Object(n.default)(e),a=r.getUTCDay(),i=(ar;)o[r]=t[r++];return o},Ce=function(e,t,r){H(e,t,{get:function(){return this._d[r]}})},Oe=function(e){var t,r,n,o,a,i,s=k(e),c=arguments.length,d=c>1?arguments[1]:void 0,u=void 0!==d,p=L(s);if(null!=p&&!x(p)){for(i=p.call(s),n=[],t=0;!(a=i.next()).done;t++)n.push(a.value);s=n}for(u&&c>2&&(d=l(d,arguments[2],2)),t=0,r=h(s.length),o=Ee(this,r);r>t;t++)o[t]=u?d(s[t],t):s[t];return o},Te=function(){for(var e=0,t=arguments.length,r=Ee(this,t);t>e;)r[e]=arguments[e++];return r},je=!!q&&a((function(){fe.call(new q(1))})),Ae=function(){return fe.apply(je?ue.call(Se(this)):Se(this),arguments)},Ne={copyWithin:function(e,t){return z.call(Se(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return $(Se(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return Y.apply(Se(this),arguments)},filter:function(e){return Le(this,J(Se(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return X(Se(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Se(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Q(Se(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return re(Se(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Se(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return le.apply(Se(this),arguments)},lastIndexOf:function(e){return ie.apply(Se(this),arguments)},map:function(e){return we(Se(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return se.apply(Se(this),arguments)},reduceRight:function(e){return ce.apply(Se(this),arguments)},reverse:function(){for(var e,t=Se(this).length,r=Math.floor(t/2),n=0;n1?arguments[1]:void 0)},sort:function(e){return de.call(Se(this),e)},subarray:function(e,t){var r=Se(this),n=r.length,o=b(e,n);return new(j(r,r[be]))(r.buffer,r.byteOffset+o*r.BYTES_PER_ELEMENT,h((void 0===t?n:b(t,n))-o))}},Pe=function(e,t){return Le(this,ue.call(Se(this),e,t))},Ie=function(e){Se(this);var t=Me(arguments[1],1),r=this.length,n=k(e),o=h(n.length),a=0;if(o+t>r)throw U("Wrong length!");for(;a255?255:255&n),o.v[f](r*t+o.o,n,ke)}(this,r,e)},enumerable:!0})};y?(m=r((function(e,r,n,o){d(e,m,l,"_d");var a,i,s,c,u=0,f=0;if(w(r)){if(!(r instanceof K||"ArrayBuffer"==(c=_(r))||"SharedArrayBuffer"==c))return ye in r?De(m,r):Oe.call(m,r);a=r,f=Me(n,t);var b=r.byteLength;if(void 0===o){if(b%t)throw U("Wrong length!");if((i=b-f)<0)throw U("Wrong length!")}else if((i=h(o)*t)+f>b)throw U("Wrong length!");s=i/t}else s=g(r),a=new K(i=s*t);for(p(e,"_d",{b:a,o:f,l:i,e:s,v:new G(a)});udocument.F=Object<\/script>"),e.close(),c=e.F;n--;)delete c.prototype[a[n]];return c()};e.exports=Object.create||function(e,t){var r;return null!==e?(s.prototype=n(e),r=new s,s.prototype=null,r[i]=e):r=c(),void 0===t?r:o(r,t)}},function(e,t,r){var n=r(248),o=r(175).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},function(e,t,r){"use strict";var n=r(8),o=r(20),a=r(17),i=r(15)("species");e.exports=function(e){var t=n[e];a&&t&&!t[i]&&o.f(t,i,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},function(e,t,r){var n=r(44),o=r(261),a=r(187),i=r(7),s=r(16),c=r(189),l={},d={};(t=e.exports=function(e,t,r,u,p){var f,m,h,g,b=p?function(){return e}:c(e),v=n(r,u,t?2:1),y=0;if("function"!=typeof b)throw TypeError(e+" is not iterable!");if(a(b)){for(f=s(e.length);f>y;y++)if((g=t?v(i(m=e[y])[0],m[1]):v(e[y]))===l||g===d)return g}else for(h=b.call(e);!(m=h.next()).done;)if((g=o(h,v,m.value,t))===l||g===d)return g}).BREAK=l,t.RETURN=d},function(e,t,r){var n=r(28);e.exports=function(e,t,r){for(var o in t)n(e,o,t[o],r);return e}},function(e,t,r){var n=r(13);e.exports=function(e,t){if(!n(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,r){var n=r(731),o=r(736);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},function(e,t,r){var n=r(117),o=r(432),a=r(208),i=Object.defineProperty;t.f=r(69)?Object.defineProperty:function(e,t,r){if(n(e),t=a(t,!0),n(r),o)try{return i(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){"use strict";var n=r(36),o=r(121),a=r(9),i=a.List,s=a.Map,c=a.OrderedSet,l=a.Record,d=a.Repeat,u=c(),p=l({key:"",type:"unstyled",text:"",characterList:i(),depth:0,data:s()}),f=function(e){var t,r;function a(t){return e.call(this,function(e){if(!e)return e;var t=e.characterList,r=e.text;return r&&!t&&(e.characterList=i(d(n.EMPTY,r.length))),e}(t))||this}r=e,(t=a).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var s=a.prototype;return s.getKey=function(){return this.get("key")},s.getType=function(){return this.get("type")},s.getText=function(){return this.get("text")},s.getCharacterList=function(){return this.get("characterList")},s.getLength=function(){return this.getText().length},s.getDepth=function(){return this.get("depth")},s.getData=function(){return this.get("data")},s.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():u},s.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},s.findStyleRanges=function(e,t){o(this.getCharacterList(),m,e,t)},s.findEntityRanges=function(e,t){o(this.getCharacterList(),h,e,t)},a}(p);function m(e,t){return e.getStyle()===t.getStyle()}function h(e,t){return e.getEntity()===t.getEntity()}e.exports=f},function(e,t,r){"use strict";function n(e){return e.replace(/\//g,"-")}e.exports=function(e){return"object"==typeof e?Object.keys(e).filter((function(t){return e[t]})).map(n).join(" "):Array.prototype.map.call(arguments,n).join(" ")}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.ownerDocument)&&e.nodeType===Node.ELEMENT_NODE}},function(e,t,r){"use strict";var n=r(11),o=/[\uD800-\uDFFF]/;function a(e){return 55296<=e&&e<=57343}function i(e){return o.test(e)}function s(e,t){return 1+a(e.charCodeAt(t))}function c(e,t,r){if(t=t||0,r=void 0===r?1/0:r||0,!i(e))return e.substr(t,r);var n=e.length;if(n<=0||t>n||r<=0)return"";var o=0;if(t>0){for(;t>0&&o=n)return""}else if(t<0){for(o=n;t<0&&00&&a=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=new Date(0);f.setUTCFullYear(s+1,0,p),f.setUTCHours(0,0,0,0);var m=Object(a.a)(f,t),h=new Date(0);h.setUTCFullYear(s,0,p),h.setUTCHours(0,0,0,0);var g=Object(a.a)(h,t);return r.getTime()>=m.getTime()?s+1:r.getTime()>=g.getTime()?s:s-1}},function(e,t,r){ +a.version="2.26.0",t=Et,a.fn=hr,a.min=function(){var e=[].slice.call(arguments,0);return Tt("isBefore",e)},a.max=function(){var e=[].slice.call(arguments,0);return Tt("isAfter",e)},a.now=function(){return Date.now?Date.now():+new Date},a.utc=m,a.unix=function(e){return Et(1e3*e)},a.months=function(e,t){return wr(e,t,"months")},a.isDate=u,a.locale=it,a.invalid=g,a.duration=Wt,a.isMoment=_,a.weekdays=function(e,t,r){return kr(e,t,r,"weekdays")},a.parseZone=function(){return Et.apply(null,arguments).parseZone()},a.localeData=st,a.isDuration=Ct,a.monthsShort=function(e,t){return wr(e,t,"monthsShort")},a.weekdaysMin=function(e,t,r){return kr(e,t,r,"weekdaysMin")},a.defineLocale=ct,a.updateLocale=function(e,t){if(null!=t){var r,n,a=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(T(tt[e]._config,t)):(null!=(n=ot(e))&&(a=n._config),t=T(a,t),null==n&&(t.abbr=e),(r=new O(t)).parentLocale=tt[e],tt[e]=r),it(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===it()&&it(e)):null!=tt[e]&&delete tt[e]);return tt[e]},a.locales=function(){return L(tt)},a.weekdaysShort=function(e,t,r){return kr(e,t,r,"weekdaysShort")},a.normalizeUnits=z,a.relativeTimeRounding=function(e){return void 0===e?Vr:"function"==typeof e&&(Vr=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==qr[e]&&(void 0===t?qr[e]:(qr[e]=t,"s"===e&&(qr.ss=t-1),!0))},a.calendarFormat=function(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"},a.prototype=hr,a.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},a}()}).call(this,r(169)(e))},function(e,t,r){"use strict";function n(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}r.d(t,"a",(function(){return n}))},function(e,t,r){var n=r(8),a=r(33),o=r(20),i=r(21),c=r(34),s=function(e,t,r){var l,d,u,p,f=e&s.F,m=e&s.G,b=e&s.S,h=e&s.P,g=e&s.B,v=m?n:b?n[t]||(n[t]={}):(n[t]||{}).prototype,y=m?a:a[t]||(a[t]={}),w=y.prototype||(y.prototype={});for(l in m&&(r=t),r)u=((d=!f&&v&&void 0!==v[l])?v:r)[l],p=g&&d?c(u,n):h&&"function"==typeof u?c(Function.call,u):u,v&&i(v,l,u,e&s.U),y[l]!=u&&o(y,l,p),h&&w[l]!=u&&(w[l]=u)};n.core=a,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return a}));var n=r(3);function a(e){Object(n.a)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}},function(e,t,r){"use strict";function n(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}r.d(t,"a",(function(){return n}))},function(e,t,r){var n=r(10);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,r){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=r(424)},function(e,t,r){var n=r(93)("wks"),a=r(61),o=r(8).Symbol,i="function"==typeof o;(e.exports=function(e){return n[e]||(n[e]=i&&o[e]||(i?o:a)("Symbol."+e))}).store=n},function(e,t,r){var n=r(36),a=Math.min;e.exports=function(e){return e>0?a(n(e),9007199254740991):0}},function(e,t,r){e.exports=!r(9)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t,r){var n=r(7),a=r(207),o=r(40),i=Object.defineProperty;t.f=r(14)?Object.defineProperty:function(e,t,r){if(n(e),t=o(t,!0),n(r),a)try{return i(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){var n=r(41);e.exports=function(e){return Object(n(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,r){var n=r(17),a=r(60);e.exports=r(14)?function(e,t,r){return n.f(e,t,a(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){var n=r(8),a=r(20),o=r(25),i=r(61)("src"),c=r(434),s=(""+c).split("toString");r(33).inspectSource=function(e){return c.call(e)},(e.exports=function(e,t,r,c){var l="function"==typeof r;l&&(o(r,"name")||a(r,"name",t)),e[t]!==r&&(l&&(o(r,i)||a(r,i,e[t]?""+e[t]:s.join(String(t)))),e===n?e[t]=r:c?e[t]?e[t]=r:a(e,t,r):(delete e[t],a(e,t,r)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[i]||c.call(this)}))},function(e,t,r){var n=r(4),a=r(9),o=r(41),i=/"/g,c=function(e,t,r,n){var a=String(o(e)),c="<"+t;return""!==r&&(c+=" "+r+'="'+String(n).replace(i,""")+'"'),c+">"+a+""};e.exports=function(e,t){var r={};r[e]=t(c),n(n.P+n.F*a((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",r)}},function(e,t,r){"use strict";t.__esModule=!0;var n,a=r(132),o=(n=a)&&n.__esModule?n:{default:n};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,o.default)(t))&&"function"!=typeof t?e:t}},function(e,t,r){"use strict";function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}r.d(t,"a",(function(){return n}))},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){var n=r(94),a=r(41);e.exports=function(e){return n(a(e))}},function(e,t,r){var n=r(95),a=r(60),o=r(26),i=r(40),c=r(25),s=r(207),l=Object.getOwnPropertyDescriptor;t.f=r(14)?l:function(e,t){if(e=o(e),t=i(t,!0),s)try{return l(e,t)}catch(e){}if(c(e,t))return a(!n.f.call(e,t),e[t])}},function(e,t,r){var n=r(25),a=r(18),o=r(144)("IE_PROTO"),i=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=a(e),n(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?i:null}},function(e,t,r){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var a=(i=n,c=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),"/*# ".concat(s," */")),o=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[r].concat(o).concat([a]).join("\n")}var i,c,s;return[r].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(n)for(var o=0;o0?n:r)(e)}},function(e,t,r){"use strict";var n=r(9);e.exports=function(e,t){return!!e&&n((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return i}));var n=r(5),a=r(6),o=r(3);function i(e,t){Object(o.a)(1,arguments);var r=t||{},i=r.locale,c=i&&i.options&&i.options.weekStartsOn,s=null==c?0:Object(a.a)(c),l=null==r.weekStartsOn?s:Object(a.a)(r.weekStartsOn);if(!(l>=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Object(n.default)(e),u=d.getDay(),p=(u=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Object(a.default)(e),u=d.getUTCDay(),p=(uk;k++)if((p||k in v)&&(h=y(b=v[k],k,g),e))if(r)_[k]=h;else if(h)switch(e){case 3:return!0;case 5:return b;case 6:return k;case 2:_.push(b)}else if(d)return!1;return u?-1:l||d?d:_}}},function(e,t,r){"use strict";t.__esModule=!0;var n,a=r(735),o=(n=a)&&n.__esModule?n:{default:n};t.default=o.default||function(e){for(var t=1;t0?(6e4+n(t))%6e4:n(t))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(5),a=r(3);function o(e){Object(a.a)(1,arguments);var t=1,r=Object(n.default)(e),o=r.getUTCDay(),i=(or;)a[r]=t[r++];return a},Te=function(e,t,r){z(e,t,{get:function(){return this._d[r]}})},Oe=function(e){var t,r,n,a,o,i,c=_(e),s=arguments.length,d=s>1?arguments[1]:void 0,u=void 0!==d,p=D(c);if(null!=p&&!x(p)){for(i=p.call(c),n=[],t=0;!(o=i.next()).done;t++)n.push(o.value);c=n}for(u&&s>2&&(d=l(d,arguments[2],2)),t=0,r=b(c.length),a=Ee(this,r);r>t;t++)a[t]=u?d(c[t],t):c[t];return a},Ye=function(){for(var e=0,t=arguments.length,r=Ee(this,t);t>e;)r[e]=arguments[e++];return r},Ce=!!V&&o((function(){fe.call(new V(1))})),Pe=function(){return fe.apply(Ce?ue.call(Le(this)):Le(this),arguments)},je={copyWithin:function(e,t){return I.call(Le(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return Q(Le(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return F.apply(Le(this),arguments)},filter:function(e){return De(this,K(Le(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Z(Le(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Le(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){$(Le(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return re(Le(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Le(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return le.apply(Le(this),arguments)},lastIndexOf:function(e){return ie.apply(Le(this),arguments)},map:function(e){return ke(Le(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return ce.apply(Le(this),arguments)},reduceRight:function(e){return se.apply(Le(this),arguments)},reverse:function(){for(var e,t=Le(this).length,r=Math.floor(t/2),n=0;n1?arguments[1]:void 0)},sort:function(e){return de.call(Le(this),e)},subarray:function(e,t){var r=Le(this),n=r.length,a=g(e,n);return new(C(r,r[ge]))(r.buffer,r.byteOffset+a*r.BYTES_PER_ELEMENT,b((void 0===t?n:g(t,n))-a))}},Ae=function(e,t){return De(this,ue.call(Le(this),e,t))},Ne=function(e){Le(this);var t=Me(arguments[1],1),r=this.length,n=_(e),a=b(n.length),o=0;if(a+t>r)throw B("Wrong length!");for(;o255?255:255&n),a.v[f](r*t+a.o,n,_e)}(this,r,e)},enumerable:!0})};y?(m=r((function(e,r,n,a){d(e,m,l,"_d");var o,i,c,s,u=0,f=0;if(k(r)){if(!(r instanceof G||"ArrayBuffer"==(s=w(r))||"SharedArrayBuffer"==s))return ye in r?Se(m,r):Oe.call(m,r);o=r,f=Me(n,t);var g=r.byteLength;if(void 0===a){if(g%t)throw B("Wrong length!");if((i=g-f)<0)throw B("Wrong length!")}else if((i=b(a)*t)+f>g)throw B("Wrong length!");c=i/t}else c=h(r),o=new G(i=c*t);for(p(e,"_d",{b:o,o:f,l:i,e:c,v:new J(o)});udocument.F=Object<\/script>"),e.close(),s=e.F;n--;)delete s.prototype[o[n]];return s()};e.exports=Object.create||function(e,t){var r;return null!==e?(c.prototype=n(e),r=new c,c.prototype=null,r[i]=e):r=s(),void 0===t?r:a(r,t)}},function(e,t,r){var n=r(209),a=r(145).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,a)}},function(e,t,r){"use strict";var n=r(8),a=r(17),o=r(14),i=r(12)("species");e.exports=function(e){var t=n[e];o&&t&&!t[i]&&a.f(t,i,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},function(e,t,r){var n=r(34),a=r(222),o=r(157),i=r(7),c=r(13),s=r(159),l={},d={};(t=e.exports=function(e,t,r,u,p){var f,m,b,h,g=p?function(){return e}:s(e),v=n(r,u,t?2:1),y=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(o(g)){for(f=c(e.length);f>y;y++)if((h=t?v(i(m=e[y])[0],m[1]):v(e[y]))===l||h===d)return h}else for(b=g.call(e);!(m=b.next()).done;)if((h=a(b,v,m.value,t))===l||h===d)return h}).BREAK=l,t.RETURN=d},function(e,t,r){var n=r(21);e.exports=function(e,t,r){for(var a in t)n(e,a,t[a],r);return e}},function(e,t,r){var n=r(10);e.exports=function(e,t){if(!n(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,r){var n=r(650),a=r(655);e.exports=function(e,t){var r=a(e,t);return n(r)?r:void 0}},function(e,t,r){var n=r(100),a=r(392),o=r(178),i=Object.defineProperty;t.f=r(58)?Object.defineProperty:function(e,t,r){if(n(e),t=o(t,!0),n(r),a)try{return i(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return o}));var n=r(5),a=r(3);function o(e){Object(a.a)(1,arguments);var t=Object(n.default)(e);return t.setHours(0,0,0,0),t}},function(e,t,r){"use strict";var n=r(87).Collapse,a=r(729).UnmountClosed;e.exports=a,a.Collapse=n,a.UnmountClosed=a},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=new Date(0);f.setUTCFullYear(c+1,0,p),f.setUTCHours(0,0,0,0);var m=Object(o.a)(f,t),b=new Date(0);b.setUTCFullYear(c,0,p),b.setUTCHours(0,0,0,0);var h=Object(o.a)(b,t);return r.getTime()>=m.getTime()?c+1:r.getTime()>=h.getTime()?c:c-1}},function(e,t,r){ /*! * Chart.js v2.9.3 * https://www.chartjs.org * (c) 2019 Chart.js Contributors * Released under the MIT License */ -e.exports=function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},r=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[t[n]]=n);var o=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var a in o)if(o.hasOwnProperty(a)){if(!("channels"in o[a]))throw new Error("missing channels property: "+a);if(!("labels"in o[a]))throw new Error("missing channel labels property: "+a);if(o[a].labels.length!==o[a].channels)throw new Error("channel and label counts mismatch: "+a);var i=o[a].channels,s=o[a].labels;delete o[a].channels,delete o[a].labels,Object.defineProperty(o[a],"channels",{value:i}),Object.defineProperty(o[a],"labels",{value:s})}o.rgb.hsl=function(e){var t,r,n=e[0]/255,o=e[1]/255,a=e[2]/255,i=Math.min(n,o,a),s=Math.max(n,o,a),c=s-i;return s===i?t=0:n===s?t=(o-a)/c:o===s?t=2+(a-n)/c:a===s&&(t=4+(n-o)/c),(t=Math.min(60*t,360))<0&&(t+=360),r=(i+s)/2,[t,100*(s===i?0:r<=.5?c/(s+i):c/(2-s-i)),100*r]},o.rgb.hsv=function(e){var t,r,n,o,a,i=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(i,s,c),d=l-Math.min(i,s,c),u=function(e){return(l-e)/6/d+.5};return 0===d?o=a=0:(a=d/l,t=u(i),r=u(s),n=u(c),i===l?o=n-r:s===l?o=1/3+t-n:c===l&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*a,100*l]},o.rgb.hwb=function(e){var t=e[0],r=e[1],n=e[2];return[o.rgb.hsl(e)[0],1/255*Math.min(t,Math.min(r,n))*100,100*(n=1-1/255*Math.max(t,Math.max(r,n)))]},o.rgb.cmyk=function(e){var t,r=e[0]/255,n=e[1]/255,o=e[2]/255;return[100*((1-r-(t=Math.min(1-r,1-n,1-o)))/(1-t)||0),100*((1-n-t)/(1-t)||0),100*((1-o-t)/(1-t)||0),100*t]},o.rgb.keyword=function(e){var n=r[e];if(n)return n;var o,a,i,s=1/0;for(var c in t)if(t.hasOwnProperty(c)){var l=t[c],d=(a=e,i=l,Math.pow(a[0]-i[0],2)+Math.pow(a[1]-i[1],2)+Math.pow(a[2]-i[2],2));d.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},o.rgb.lab=function(e){var t=o.rgb.xyz(e),r=t[0],n=t[1],a=t[2];return n/=100,a/=108.883,r=(r/=95.047)>.008856?Math.pow(r,1/3):7.787*r+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(r-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]},o.hsl.rgb=function(e){var t,r,n,o,a,i=e[0]/360,s=e[1]/100,c=e[2]/100;if(0===s)return[a=255*c,a,a];t=2*c-(r=c<.5?c*(1+s):c+s-c*s),o=[0,0,0];for(var l=0;l<3;l++)(n=i+1/3*-(l-1))<0&&n++,n>1&&n--,a=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,o[l]=255*a;return o},o.hsl.hsv=function(e){var t=e[0],r=e[1]/100,n=e[2]/100,o=r,a=Math.max(n,.01);return r*=(n*=2)<=1?n:2-n,o*=a<=1?a:2-a,[t,100*(0===n?2*o/(a+o):2*r/(n+r)),(n+r)/2*100]},o.hsv.rgb=function(e){var t=e[0]/60,r=e[1]/100,n=e[2]/100,o=Math.floor(t)%6,a=t-Math.floor(t),i=255*n*(1-r),s=255*n*(1-r*a),c=255*n*(1-r*(1-a));switch(n*=255,o){case 0:return[n,c,i];case 1:return[s,n,i];case 2:return[i,n,c];case 3:return[i,s,n];case 4:return[c,i,n];case 5:return[n,i,s]}},o.hsv.hsl=function(e){var t,r,n,o=e[0],a=e[1]/100,i=e[2]/100,s=Math.max(i,.01);return n=(2-a)*i,r=a*s,[o,100*(r=(r/=(t=(2-a)*s)<=1?t:2-t)||0),100*(n/=2)]},o.hwb.rgb=function(e){var t,r,n,o,a,i,s,c=e[0]/360,l=e[1]/100,d=e[2]/100,u=l+d;switch(u>1&&(l/=u,d/=u),n=6*c-(t=Math.floor(6*c)),0!=(1&t)&&(n=1-n),o=l+n*((r=1-d)-l),t){default:case 6:case 0:a=r,i=o,s=l;break;case 1:a=o,i=r,s=l;break;case 2:a=l,i=r,s=o;break;case 3:a=l,i=o,s=r;break;case 4:a=o,i=l,s=r;break;case 5:a=r,i=l,s=o}return[255*a,255*i,255*s]},o.cmyk.rgb=function(e){var t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o))]},o.xyz.rgb=function(e){var t,r,n,o=e[0]/100,a=e[1]/100,i=e[2]/100;return r=-.9689*o+1.8758*a+.0415*i,n=.0557*o+-.204*a+1.057*i,t=(t=3.2406*o+-1.5372*a+-.4986*i)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(t=Math.min(Math.max(0,t),1)),255*(r=Math.min(Math.max(0,r),1)),255*(n=Math.min(Math.max(0,n),1))]},o.xyz.lab=function(e){var t=e[0],r=e[1],n=e[2];return r/=100,n/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(t-r),200*(r-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},o.lab.xyz=function(e){var t,r,n,o=e[0];t=e[1]/500+(r=(o+16)/116),n=r-e[2]/200;var a=Math.pow(r,3),i=Math.pow(t,3),s=Math.pow(n,3);return r=a>.008856?a:(r-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,n=s>.008856?s:(n-16/116)/7.787,[t*=95.047,r*=100,n*=108.883]},o.lab.lch=function(e){var t,r=e[0],n=e[1],o=e[2];return(t=360*Math.atan2(o,n)/2/Math.PI)<0&&(t+=360),[r,Math.sqrt(n*n+o*o),t]},o.lch.lab=function(e){var t,r=e[0],n=e[1];return t=e[2]/360*2*Math.PI,[r,n*Math.cos(t),n*Math.sin(t)]},o.rgb.ansi16=function(e){var t=e[0],r=e[1],n=e[2],a=1 in arguments?arguments[1]:o.rgb.hsv(e)[2];if(0===(a=Math.round(a/50)))return 30;var i=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(t/255));return 2===a&&(i+=60),i},o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])},o.rgb.ansi256=function(e){var t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},o.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},o.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var r;return e-=16,[Math.floor(e/36)/5*255,Math.floor((r=e%36)/6)/5*255,r%6/5*255]},o.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},o.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var r=t[0];3===t[0].length&&(r=r.split("").map((function(e){return e+e})).join(""));var n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},o.rgb.hcg=function(e){var t,r=e[0]/255,n=e[1]/255,o=e[2]/255,a=Math.max(Math.max(r,n),o),i=Math.min(Math.min(r,n),o),s=a-i;return t=s<=0?0:a===r?(n-o)/s%6:a===n?2+(o-r)/s:4+(r-n)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?i/(1-s):0)]},o.hsl.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=1,o=0;return(n=r<.5?2*t*r:2*t*(1-r))<1&&(o=(r-.5*n)/(1-n)),[e[0],100*n,100*o]},o.hsv.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=t*r,o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],100*n,100*o]},o.hcg.rgb=function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];var o,a=[0,0,0],i=t%1*6,s=i%1,c=1-s;switch(Math.floor(i)){case 0:a[0]=1,a[1]=s,a[2]=0;break;case 1:a[0]=c,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=s;break;case 3:a[0]=0,a[1]=c,a[2]=1;break;case 4:a[0]=s,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=c}return o=(1-r)*n,[255*(r*a[0]+o),255*(r*a[1]+o),255*(r*a[2]+o)]},o.hcg.hsv=function(e){var t=e[1]/100,r=t+e[2]/100*(1-t),n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},o.hcg.hsl=function(e){var t=e[1]/100,r=e[2]/100*(1-t)+.5*t,n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},o.hcg.hwb=function(e){var t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},o.hwb.hcg=function(e){var t=e[1]/100,r=1-e[2]/100,n=r-t,o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],100*n,100*o]},o.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},o.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},o.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},o.gray.hsl=o.gray.hsv=function(e){return[0,0,e[0]]},o.gray.hwb=function(e){return[0,100,e[0]]},o.gray.cmyk=function(e){return[0,0,0,e[0]]},o.gray.lab=function(e){return[e[0],0,0]},o.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},o.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}));function n(e){var t=function(){for(var e={},t=Object.keys(r),n=t.length,o=0;o1&&(t=Array.prototype.slice.call(arguments));var r=e(t);if("object"==typeof r)for(var n=r.length,o=0;o1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)}))}));var s=i,c={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},l={getRgba:d,getHsla:u,getRgb:function(e){var t=d(e);return t&&t.slice(0,3)},getHsl:function(e){var t=u(e);return t&&t.slice(0,3)},getHwb:p,getAlpha:function(e){var t=d(e);return t||(t=u(e))||(t=p(e))?t[3]:void 0},hexString:function(e,t){return t=void 0!==t&&3===e.length?t:e[3],"#"+b(e[0])+b(e[1])+b(e[2])+(t>=0&&t<1?b(Math.round(255*t)):"")},rgbString:function(e,t){return t<1||e[3]&&e[3]<1?f(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:f,percentString:function(e,t){if(t<1||e[3]&&e[3]<1)return m(e,t);var r=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),o=Math.round(e[2]/255*100);return"rgb("+r+"%, "+n+"%, "+o+"%)"},percentaString:m,hslString:function(e,t){return t<1||e[3]&&e[3]<1?h(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:h,hwbString:function(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"},keyword:function(e){return v[e.slice(0,3)]}};function d(e){if(e){var t=[0,0,0],r=1,n=e.match(/^#([a-fA-F0-9]{3,4})$/i),o="";if(n){o=(n=n[1])[3];for(var a=0;ar?(t+.05)/(r+.05):(r+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,r=(t[0]+e)%360;return t[0]=r<0?360+r:r,this.setValues("hsl",t),this},mix:function(e,t){var r=e,n=void 0===t?.5:t,o=2*n-1,a=this.alpha()-r.alpha(),i=((o*a==-1?o:(o+a)/(1+o*a))+1)/2,s=1-i;return this.rgb(i*this.red()+s*r.red(),i*this.green()+s*r.green(),i*this.blue()+s*r.blue()).alpha(this.alpha()*n+r.alpha()*(1-n))},toJSON:function(){return this.rgb()},clone:function(){var e,t,r=new _,n=this.values,o=r.values;for(var a in n)n.hasOwnProperty(a)&&(e=n[a],"[object Array]"===(t={}.toString.call(e))?o[a]=e.slice(0):"[object Number]"===t?o[a]=e:console.error("unexpected color value:",e));return r}},_.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},_.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},_.prototype.getValues=function(e){for(var t=this.values,r={},n=0;n=0;o--)t.call(r,e[o],o);else for(o=0;o=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,r=0,n=1;return 0===e?0:1===e?1:(r||(r=.3),n<1?(n=1,t=r/4):t=r/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r))},easeOutElastic:function(e){var t=1.70158,r=0,n=1;return 0===e?0:1===e?1:(r||(r=.3),n<1?(n=1,t=r/4):t=r/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},easeInOutElastic:function(e){var t=1.70158,r=0,n=1;return 0===e?0:2==(e/=.5)?1:(r||(r=.45),n<1?(n=1,t=r/4):t=r/(2*Math.PI)*Math.asin(1/n),e<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-S.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*S.easeInBounce(2*e):.5*S.easeOutBounce(2*e-1)+.5}},E={effects:S};M.easingEffects=S;var L=Math.PI,D=L/180,C=2*L,O=L/2,T=L/4,j=2*L/3,A={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,r,n,o,a){if(a){var i=Math.min(a,o/2,n/2),s=t+i,c=r+i,l=t+n-i,d=r+o-i;e.moveTo(t,c),st.left-1e-6&&e.xt.top-1e-6&&e.y0&&this.requestAnimationFrame()},advance:function(){for(var e,t,r,n,o=this.animations,a=0;a=r?(H.callback(e.onAnimationComplete,[e],t),t.animating=!1,o.splice(a,1)):++a}},$=H.options.resolve,X=["push","pop","shift","splice","unshift"];function ee(e,t){var r=e._chartjs;if(r){var n=r.listeners,o=n.indexOf(t);-1!==o&&n.splice(o,1),n.length>0||(X.forEach((function(t){delete e[t]})),delete e._chartjs)}}var te=function(e,t){this.initialize(e,t)};H.extend(te.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(e,t){var r=this;r.chart=e,r.index=t,r.linkScales(),r.addElements(),r._type=r.getMeta().type},updateIndex:function(e){this.index=e},linkScales:function(){var e=this.getMeta(),t=this.chart,r=t.scales,n=this.getDataset(),o=t.options.scales;null!==e.xAxisID&&e.xAxisID in r&&!n.xAxisID||(e.xAxisID=n.xAxisID||o.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in r&&!n.yAxisID||(e.yAxisID=n.yAxisID||o.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&ee(this._data,this)},createMetaDataset:function(){var e=this.datasetElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(e){var t=this.dataElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index,_index:e})},addElements:function(){var e,t,r=this.getMeta(),n=this.getDataset().data||[],o=r.data;for(e=0,t=n.length;er&&this.insertElements(r,n-r)},insertElements:function(e,t){for(var r=0;ro?(a=o/t.innerRadius,e.arc(i,s,t.innerRadius-o,n+a,r-a,!0)):e.arc(i,s,o,n+Math.PI/2,r-Math.PI/2),e.closePath(),e.clip()}function ae(e,t,r){var n="inner"===t.borderAlign;n?(e.lineWidth=2*t.borderWidth,e.lineJoin="round"):(e.lineWidth=t.borderWidth,e.lineJoin="bevel"),r.fullCircles&&function(e,t,r,n){var o,a=r.endAngle;for(n&&(r.endAngle=r.startAngle+ne,oe(e,r),r.endAngle=a,r.endAngle===r.startAngle&&r.fullCircles&&(r.endAngle+=ne,r.fullCircles--)),e.beginPath(),e.arc(r.x,r.y,r.innerRadius,r.startAngle+ne,r.startAngle,!0),o=0;os;)o-=ne;for(;o=i&&o<=s,l=a>=r.innerRadius&&a<=r.outerRadius;return c&&l}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,r=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,r=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}},draw:function(){var e,t=this._chart.ctx,r=this._view,n="inner"===r.borderAlign?.33:0,o={x:r.x,y:r.y,innerRadius:r.innerRadius,outerRadius:Math.max(r.outerRadius-n,0),pixelMargin:n,startAngle:r.startAngle,endAngle:r.endAngle,fullCircles:Math.floor(r.circumference/ne)};if(t.save(),t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,o.fullCircles){for(o.endAngle=o.startAngle+ne,t.beginPath(),t.arc(o.x,o.y,o.outerRadius,o.startAngle,o.endAngle),t.arc(o.x,o.y,o.innerRadius,o.endAngle,o.startAngle,!0),t.closePath(),e=0;ee.x&&(t=be(t,"left","right")):e.baser?r:n,r:c.right||o<0?0:o>t?t:o,b:c.bottom||a<0?0:a>r?r:a,l:c.left||i<0?0:i>t?t:i}}function ye(e,t,r){var n=null===t,o=null===r,a=!(!e||n&&o)&&ge(e);return a&&(n||t>=a.left&&t<=a.right)&&(o||r>=a.top&&r<=a.bottom)}I._set("global",{elements:{rectangle:{backgroundColor:me,borderColor:me,borderSkipped:"bottom",borderWidth:0}}});var _e=G.extend({_type:"rectangle",draw:function(){var e=this._chart.ctx,t=this._view,r=function(e){var t=ge(e),r=t.right-t.left,n=t.bottom-t.top,o=ve(e,r/2,n/2);return{outer:{x:t.left,y:t.top,w:r,h:n},inner:{x:t.left+o.l,y:t.top+o.t,w:r-o.l-o.r,h:n-o.t-o.b}}}(t),n=r.outer,o=r.inner;e.fillStyle=t.backgroundColor,e.fillRect(n.x,n.y,n.w,n.h),n.w===o.w&&n.h===o.h||(e.save(),e.beginPath(),e.rect(n.x,n.y,n.w,n.h),e.clip(),e.fillStyle=t.borderColor,e.rect(o.x,o.y,o.w,o.h),e.fill("evenodd"),e.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return ye(this._view,e,t)},inLabelRange:function(e,t){var r=this._view;return he(r)?ye(r,e,null):ye(r,null,t)},inXRange:function(e){return ye(this._view,e,null)},inYRange:function(e){return ye(this._view,null,e)},getCenterPoint:function(){var e,t,r=this._view;return he(r)?(e=r.x,t=(r.y+r.base)/2):(e=(r.x+r.base)/2,t=r.y),{x:e,y:t}},getArea:function(){var e=this._view;return he(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),we={},ke=ie,xe=le,Me=fe,Se=_e;we.Arc=ke,we.Line=xe,we.Point=Me,we.Rectangle=Se;var Ee=H._deprecated,Le=H.valueOrDefault;function De(e,t,r){var n,o,a=r.barThickness,i=t.stackCount,s=t.pixels[e],c=H.isNullOrUndef(a)?function(e,t){var r,n,o,a,i=e._length;for(o=1,a=t.length;o0?Math.min(i,Math.abs(n-r)):i,r=n;return i}(t.scale,t.pixels):-1;return H.isNullOrUndef(a)?(n=c*r.categoryPercentage,o=r.barPercentage):(n=a*i,o=1),{chunk:n/i,ratio:o,start:s-n/2}}I._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),I._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Ce=re.extend({dataElementType:we.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var e,t,r=this;re.prototype.initialize.apply(r,arguments),(e=r.getMeta()).stack=r.getDataset().stack,e.bar=!0,t=r._getIndexScale().options,Ee("bar chart",t.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Ee("bar chart",t.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Ee("bar chart",t.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Ee("bar chart",r._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Ee("bar chart",t.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(e){var t,r,n=this.getMeta().data;for(this._ruler=this.getRuler(),t=0,r=n.length;t=0&&h.min>=0?h.min:h.max,_=void 0===h.start?h.end:h.max>=0&&h.min>=0?h.max-h.min:h.min-h.max,w=m.length;if(b||void 0===b&&void 0!==v)for(n=0;n=0&&l.max>=0?l.max:l.min,(h.min<0&&a<0||h.max>=0&&a>0)&&(y+=a));return i=u.getPixelForValue(y),c=(s=u.getPixelForValue(y+_))-i,void 0!==g&&Math.abs(c)=0&&!p||_<0&&p?i-g:i+g),{size:c,base:i,head:s,center:s+c/2}},calculateBarIndexPixels:function(e,t,r,n){var o="flex"===n.barThickness?function(e,t,r){var n,o=t.pixels,a=o[e],i=e>0?o[e-1]:null,s=e=Ne?-Pe:v<-Ne?Pe:0)+g,_=Math.cos(v),w=Math.sin(v),k=Math.cos(y),x=Math.sin(y),M=v<=0&&y>=0||y>=Pe,S=v<=Ie&&y>=Ie||y>=Pe+Ie,E=v<=-Ie&&y>=-Ie||y>=Ne+Ie,L=v===-Ne||y>=Ne?-1:Math.min(_,_*h,k,k*h),D=E?-1:Math.min(w,w*h,x,x*h),C=M?1:Math.max(_,_*h,k,k*h),O=S?1:Math.max(w,w*h,x,x*h);l=(C-L)/2,d=(O-D)/2,u=-(C+L)/2,p=-(O+D)/2}for(n=0,o=m.length;n0&&!isNaN(e)?Pe*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var t,r,n,o,a,i,s,c,l=0,d=this.chart;if(!e)for(t=0,r=d.data.datasets.length;t(l=s>l?s:l)?c:l);return l},setHoverStyle:function(e){var t=e._model,r=e._options,n=H.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=Ae(r.hoverBackgroundColor,n(r.backgroundColor)),t.borderColor=Ae(r.hoverBorderColor,n(r.borderColor)),t.borderWidth=Ae(r.hoverBorderWidth,r.borderWidth)},_getRingWeightOffset:function(e){for(var t=0,r=0;r0&&He(c[e-1]._model,s)&&(r.controlPointPreviousX=l(r.controlPointPreviousX,s.left,s.right),r.controlPointPreviousY=l(r.controlPointPreviousY,s.top,s.bottom)),e0&&(a=e.getDatasetMeta(a[0]._datasetIndex).data),a},"x-axis":function(e,t){return nt(e,t,{intersect:!1})},point:function(e,t){return et(e,$e(t,e))},nearest:function(e,t,r){var n=$e(t,e);r.axis=r.axis||"xy";var o=rt(r.axis);return tt(e,n,r.intersect,o)},x:function(e,t,r){var n=$e(t,e),o=[],a=!1;return Xe(e,(function(e){e.inXRange(n.x)&&o.push(e),e.inRange(n.x,n.y)&&(a=!0)})),r.intersect&&!a&&(o=[]),o},y:function(e,t,r){var n=$e(t,e),o=[],a=!1;return Xe(e,(function(e){e.inYRange(n.y)&&o.push(e),e.inRange(n.x,n.y)&&(a=!0)})),r.intersect&&!a&&(o=[]),o}}},at=H.extend;function it(e,t){return H.where(e,(function(e){return e.pos===t}))}function st(e,t){return e.sort((function(e,r){var n=t?r:e,o=t?e:r;return n.weight===o.weight?n.index-o.index:n.weight-o.weight}))}function ct(e,t,r,n){return Math.max(e[r],t[r])+Math.max(e[n],t[n])}function lt(e,t,r){var n,o,a=r.box,i=e.maxPadding;if(r.size&&(e[r.pos]-=r.size),r.size=r.horizontal?a.height:a.width,e[r.pos]+=r.size,a.getPadding){var s=a.getPadding();i.top=Math.max(i.top,s.top),i.left=Math.max(i.left,s.left),i.bottom=Math.max(i.bottom,s.bottom),i.right=Math.max(i.right,s.right)}if(n=t.outerWidth-ct(i,e,"left","right"),o=t.outerHeight-ct(i,e,"top","bottom"),n!==e.w||o!==e.h)return e.w=n,e.h=o,r.horizontal?n!==e.w:o!==e.h}function dt(e,t){var r=t.maxPadding;function n(e){var n={left:0,top:0,right:0,bottom:0};return e.forEach((function(e){n[e]=Math.max(t[e],r[e])})),n}return n(e?["left","right"]:["top","bottom"])}function ut(e,t,r){var n,o,a,i,s,c,l=[];for(n=0,o=e.length;n div {\n\tposition: absolute;\n\twidth: 1000000px;\n\theight: 1000000px;\n\tleft: 0;\n\ttop: 0;\n}\n\n.chartjs-size-monitor-shrink > div {\n\tposition: absolute;\n\twidth: 200%;\n\theight: 200%;\n\tleft: 0;\n\ttop: 0;\n}\n"}))&&ft.default||ft,gt=["animationstart","webkitAnimationStart"],bt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function vt(e,t){var r=H.getStyle(e,t),n=r&&r.match(/^(\d+)(\.\d+)?px$/);return n?Number(n[1]):void 0}var yt=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch(e){}return e}()&&{passive:!0};function _t(e,t,r){e.addEventListener(t,r,yt)}function wt(e,t,r){e.removeEventListener(t,r,yt)}function kt(e,t,r,n,o){return{type:e,chart:t,native:o||null,x:void 0!==r?r:null,y:void 0!==n?n:null}}function xt(e){var t=document.createElement("div");return t.className=e||"",t}function Mt(e,t,r){var n,o,a,i,s=e.$chartjs||(e.$chartjs={}),c=s.resizer=function(e){var t=xt("chartjs-size-monitor"),r=xt("chartjs-size-monitor-expand"),n=xt("chartjs-size-monitor-shrink");r.appendChild(xt()),n.appendChild(xt()),t.appendChild(r),t.appendChild(n),t._reset=function(){r.scrollLeft=1e6,r.scrollTop=1e6,n.scrollLeft=1e6,n.scrollTop=1e6};var o=function(){t._reset(),e()};return _t(r,"scroll",o.bind(r,"expand")),_t(n,"scroll",o.bind(n,"shrink")),t}((n=function(){if(s.resizer){var n=r.options.maintainAspectRatio&&e.parentNode,o=n?n.clientWidth:0;t(kt("resize",r)),n&&n.clientWidth0){var a=e[0];a.label?r=a.label:a.xLabel?r=a.xLabel:o>0&&a.index-1?e.split("\n"):e}function It(e){var t=I.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:Tt(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:Tt(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:Tt(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:Tt(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:Tt(e.titleFontStyle,t.defaultFontStyle),titleFontSize:Tt(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:Tt(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:Tt(e.footerFontStyle,t.defaultFontStyle),footerFontSize:Tt(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function Yt(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function zt(e){return Nt([],Pt(e))}var Ft=G.extend({initialize:function(){this._model=It(this._options),this._lastActive=[]},getTitle:function(){var e=this,t=e._options,r=t.callbacks,n=r.beforeTitle.apply(e,arguments),o=r.title.apply(e,arguments),a=r.afterTitle.apply(e,arguments),i=[];return i=Nt(i,Pt(n)),i=Nt(i,Pt(o)),i=Nt(i,Pt(a))},getBeforeBody:function(){return zt(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,t){var r=this,n=r._options.callbacks,o=[];return H.each(e,(function(e){var a={before:[],lines:[],after:[]};Nt(a.before,Pt(n.beforeLabel.call(r,e,t))),Nt(a.lines,n.label.call(r,e,t)),Nt(a.after,Pt(n.afterLabel.call(r,e,t))),o.push(a)})),o},getAfterBody:function(){return zt(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this,t=e._options.callbacks,r=t.beforeFooter.apply(e,arguments),n=t.footer.apply(e,arguments),o=t.afterFooter.apply(e,arguments),a=[];return a=Nt(a,Pt(r)),a=Nt(a,Pt(n)),a=Nt(a,Pt(o))},update:function(e){var t,r,n,o,a,i,s,c,l,d,u=this,p=u._options,f=u._model,m=u._model=It(p),h=u._active,g=u._data,b={xAlign:f.xAlign,yAlign:f.yAlign},v={x:f.x,y:f.y},y={width:f.width,height:f.height},_={x:f.caretX,y:f.caretY};if(h.length){m.opacity=1;var w=[],k=[];_=At[p.position].call(u,h,u._eventPosition);var x=[];for(t=0,r=h.length;tn.width&&(o=n.width-t.width),o<0&&(o=0)),"top"===d?a+=u:a-="bottom"===d?t.height+u:t.height/2,"center"===d?"left"===l?o+=u:"right"===l&&(o-=u):"left"===l?o-=p:"right"===l&&(o+=p),{x:o,y:a}}(m,y,b=function(e,t){var r,n,o,a,i,s=e._model,c=e._chart,l=e._chart.chartArea,d="center",u="center";s.yc.height-t.height&&(u="bottom");var p=(l.left+l.right)/2,f=(l.top+l.bottom)/2;"center"===u?(r=function(e){return e<=p},n=function(e){return e>p}):(r=function(e){return e<=t.width/2},n=function(e){return e>=c.width-t.width/2}),o=function(e){return e+t.width+s.caretSize+s.caretPadding>c.width},a=function(e){return e-t.width-s.caretSize-s.caretPadding<0},i=function(e){return e<=f?"top":"bottom"},r(s.x)?(d="left",o(s.x)&&(d="center",u=i(s.y))):n(s.x)&&(d="right",a(s.x)&&(d="center",u=i(s.y)));var m=e._options;return{xAlign:m.xAlign?m.xAlign:d,yAlign:m.yAlign?m.yAlign:u}}(this,y),u._chart)}else m.opacity=0;return m.xAlign=b.xAlign,m.yAlign=b.yAlign,m.x=v.x,m.y=v.y,m.width=y.width,m.height=y.height,m.caretX=_.x,m.caretY=_.y,u._model=m,e&&p.custom&&p.custom.call(u,m),u},drawCaret:function(e,t){var r=this._chart.ctx,n=this._view,o=this.getCaretPosition(e,t,n);r.lineTo(o.x1,o.y1),r.lineTo(o.x2,o.y2),r.lineTo(o.x3,o.y3)},getCaretPosition:function(e,t,r){var n,o,a,i,s,c,l=r.caretSize,d=r.cornerRadius,u=r.xAlign,p=r.yAlign,f=e.x,m=e.y,h=t.width,g=t.height;if("center"===p)s=m+g/2,"left"===u?(o=(n=f)-l,a=n,i=s+l,c=s-l):(o=(n=f+h)+l,a=n,i=s-l,c=s+l);else if("left"===u?(n=(o=f+d+l)-l,a=o+l):"right"===u?(n=(o=f+h-d-l)-l,a=o+l):(n=(o=r.caretX)-l,a=o+l),"top"===p)s=(i=m)-l,c=i;else{s=(i=m+g)+l,c=i;var b=a;a=n,n=b}return{x1:n,x2:o,x3:a,y1:i,y2:s,y3:c}},drawTitle:function(e,t,r){var n,o,a,i=t.title,s=i.length;if(s){var c=jt(t.rtl,t.x,t.width);for(e.x=Yt(t,t._titleAlign),r.textAlign=c.textAlign(t._titleAlign),r.textBaseline="middle",n=t.titleFontSize,o=t.titleSpacing,r.fillStyle=t.titleFontColor,r.font=H.fontString(n,t._titleFontStyle,t._titleFontFamily),a=0;a0&&r.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(0!==t.opacity){var r={width:t.width,height:t.height},n={x:t.x,y:t.y},o=Math.abs(t.opacity<.001)?0:t.opacity,a=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length;this._options.enabled&&a&&(e.save(),e.globalAlpha=o,this.drawBackground(n,t,e,r),n.y+=t.yPadding,H.rtl.overrideTextDirection(e,t.textDirection),this.drawTitle(n,t,e),this.drawBody(n,t,e),this.drawFooter(n,t,e),H.rtl.restoreTextDirection(e,t.textDirection),e.restore())}},handleEvent:function(e){var t,r=this,n=r._options;return r._lastActive=r._lastActive||[],"mouseout"===e.type?r._active=[]:(r._active=r._chart.getElementsAtEventForMode(e,n.mode,n),n.reverse&&r._active.reverse()),(t=!H.arrayEquals(r._active,r._lastActive))&&(r._lastActive=r._active,(n.enabled||n.custom)&&(r._eventPosition={x:e.x,y:e.y},r.update(!0),r.pivot())),t}}),Rt=At,Ht=Ft;Ht.positioners=Rt;var Bt=H.valueOrDefault;function Ut(){return H.merge({},[].slice.call(arguments),{merger:function(e,t,r,n){if("xAxes"===e||"yAxes"===e){var o,a,i,s=r[e].length;for(t[e]||(t[e]=[]),o=0;o=t[e].length&&t[e].push({}),!t[e][o].type||i.type&&i.type!==t[e][o].type?H.merge(t[e][o],[Ot.getScaleDefaults(a),i]):H.merge(t[e][o],i)}else H._merger(e,t,r,n)}})}function Wt(){return H.merge({},[].slice.call(arguments),{merger:function(e,t,r,n){var o=t[e]||{},a=r[e];"scales"===e?t[e]=Ut(o,a):"scale"===e?t[e]=H.merge(o,[Ot.getScaleDefaults(a.type),a]):H._merger(e,t,r,n)}})}function qt(e){var t=e.options;H.each(e.scales,(function(t){mt.removeBox(e,t)})),t=Wt(I.global,I[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function Vt(e,t,r){var n,o=function(e){return e.id===n};do{n=t+r++}while(H.findIndex(e,o)>=0);return n}function Kt(e){return"top"===e||"bottom"===e}function Gt(e,t){return function(r,n){return r[e]===n[e]?r[t]-n[t]:r[e]-n[e]}}I._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Qt=function(e,t){return this.construct(e,t),this};H.extend(Qt.prototype,{construct:function(e,t){var r=this;t=function(e){var t=(e=e||{}).data=e.data||{};return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=Wt(I.global,I[e.type],e.options||{}),e}(t);var n=Dt.acquireContext(e,t),o=n&&n.canvas,a=o&&o.height,i=o&&o.width;r.id=H.uid(),r.ctx=n,r.canvas=o,r.config=t,r.width=i,r.height=a,r.aspectRatio=a?i/a:null,r.options=t.options,r._bufferedRender=!1,r._layers=[],r.chart=r,r.controller=r,Qt.instances[r.id]=r,Object.defineProperty(r,"data",{get:function(){return r.config.data},set:function(e){r.config.data=e}}),n&&o?(r.initialize(),r.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var e=this;return Ct.notify(e,"beforeInit"),H.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.initToolTip(),Ct.notify(e,"afterInit"),e},clear:function(){return H.canvas.clear(this),this},stop:function(){return Z.cancelAnimation(this),this},resize:function(e){var t=this,r=t.options,n=t.canvas,o=r.maintainAspectRatio&&t.aspectRatio||null,a=Math.max(0,Math.floor(H.getMaximumWidth(n))),i=Math.max(0,Math.floor(o?a/o:H.getMaximumHeight(n)));if((t.width!==a||t.height!==i)&&(n.width=t.width=a,n.height=t.height=i,n.style.width=a+"px",n.style.height=i+"px",H.retinaScale(t,r.devicePixelRatio),!e)){var s={width:a,height:i};Ct.notify(t,"resize",[s]),r.onResize&&r.onResize(t,s),t.stop(),t.update({duration:r.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},r=e.scale;H.each(t.xAxes,(function(e,r){e.id||(e.id=Vt(t.xAxes,"x-axis-",r))})),H.each(t.yAxes,(function(e,r){e.id||(e.id=Vt(t.yAxes,"y-axis-",r))})),r&&(r.id=r.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,r=e.scales||{},n=[],o=Object.keys(r).reduce((function(e,t){return e[t]=!1,e}),{});t.scales&&(n=n.concat((t.scales.xAxes||[]).map((function(e){return{options:e,dtype:"category",dposition:"bottom"}})),(t.scales.yAxes||[]).map((function(e){return{options:e,dtype:"linear",dposition:"left"}})))),t.scale&&n.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),H.each(n,(function(t){var n=t.options,a=n.id,i=Bt(n.type,t.dtype);Kt(n.position)!==Kt(t.dposition)&&(n.position=t.dposition),o[a]=!0;var s=null;if(a in r&&r[a].type===i)(s=r[a]).options=n,s.ctx=e.ctx,s.chart=e;else{var c=Ot.getScaleConstructor(i);if(!c)return;s=new c({id:a,type:i,options:n,ctx:e.ctx,chart:e}),r[s.id]=s}s.mergeTicksOptions(),t.isDefault&&(e.scale=s)})),H.each(o,(function(e,t){e||delete r[t]})),e.scales=r,Ot.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e,t,r=this,n=[],o=r.data.datasets;for(e=0,t=o.length;e=0;--r)this.drawDataset(t[r],e);Ct.notify(this,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var r={meta:e,index:e.index,easingValue:t};!1!==Ct.notify(this,"beforeDatasetDraw",[r])&&(e.controller.draw(t),Ct.notify(this,"afterDatasetDraw",[r]))},_drawTooltip:function(e){var t=this.tooltip,r={tooltip:t,easingValue:e};!1!==Ct.notify(this,"beforeTooltipDraw",[r])&&(t.draw(),Ct.notify(this,"afterTooltipDraw",[r]))},getElementAtEvent:function(e){return ot.modes.single(this,e)},getElementsAtEvent:function(e){return ot.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return ot.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,r){var n=ot.modes[t];return"function"==typeof n?n(this,e,r):[]},getDatasetAtEvent:function(e){return ot.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this.data.datasets[e];t._meta||(t._meta={});var r=t._meta[this.id];return r||(r=t._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t.order||0,index:e}),r},getVisibleDatasetCount:function(){for(var e=0,t=0,r=this.data.datasets.length;t3?r[2]-r[1]:r[1]-r[0];Math.abs(n)>1&&e!==Math.floor(e)&&(n=e-Math.floor(e));var o=H.log10(Math.abs(n)),a="";if(0!==e)if(Math.max(Math.abs(r[0]),Math.abs(r[r.length-1]))<1e-4){var i=H.log10(Math.abs(e)),s=Math.floor(i)-Math.floor(o);s=Math.max(Math.min(s,20),0),a=e.toExponential(s)}else{var c=-1*Math.floor(o);c=Math.max(Math.min(c,20),0),a=e.toFixed(c)}else a="0";return a},logarithmic:function(e,t,r){var n=e/Math.pow(10,Math.floor(H.log10(e)));return 0===e?"0":1===n||2===n||5===n||0===t||t===r.length-1?e.toExponential():""}}},tr=H.isArray,rr=H.isNullOrUndef,nr=H.valueOrDefault,or=H.valueAtIndexOrDefault;function ar(e,t,r){var n,o=e.getTicks().length,a=Math.min(t,o-1),i=e.getPixelForTick(a),s=e._startPixel,c=e._endPixel;if(!(r&&(n=1===o?Math.max(i-s,c-i):0===t?(e.getPixelForTick(1)-i)/2:(i-e.getPixelForTick(a-1))/2,(i+=ac+1e-6)))return i}function ir(e,t,r,n){var o,a,i,s,c,l,d,u,p,f,m,h,g,b=r.length,v=[],y=[],_=[];for(o=0;ot){for(r=0;r=p||d<=1||!s.isHorizontal()?s.labelRotation=u:(t=(e=s._getLabelSizes()).widest.width,r=e.highest.height-e.highest.offset,n=Math.min(s.maxWidth,s.chart.width-t),t+6>(o=c.offset?s.maxWidth/d:n/(d-1))&&(o=n/(d-(c.offset?.5:1)),a=s.maxHeight-sr(c.gridLines)-l.padding-cr(c.scaleLabel),i=Math.sqrt(t*t+r*r),f=H.toDegrees(Math.min(Math.asin(Math.min((e.highest.height+6)/o,1)),Math.asin(Math.min(a/i,1))-Math.asin(r/i))),f=Math.max(u,Math.min(p,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){H.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){H.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},r=e.chart,n=e.options,o=n.ticks,a=n.scaleLabel,i=n.gridLines,s=e._isVisible(),c="bottom"===n.position,l=e.isHorizontal();if(l?t.width=e.maxWidth:s&&(t.width=sr(i)+cr(a)),l?s&&(t.height=sr(i)+cr(a)):t.height=e.maxHeight,o.display&&s){var d=dr(o),u=e._getLabelSizes(),p=u.first,f=u.last,m=u.widest,h=u.highest,g=.4*d.minor.lineHeight,b=o.padding;if(l){var v=0!==e.labelRotation,y=H.toRadians(e.labelRotation),_=Math.cos(y),w=Math.sin(y),k=w*m.width+_*(h.height-(v?h.offset:0))+(v?0:g);t.height=Math.min(e.maxHeight,t.height+k+b);var x,M,S=e.getPixelForTick(0)-e.left,E=e.right-e.getPixelForTick(e.getTicks().length-1);v?(x=c?_*p.width+w*p.offset:w*(p.height-p.offset),M=c?w*(f.height-f.offset):_*f.width+w*f.offset):(x=p.width/2,M=f.width/2),e.paddingLeft=Math.max((x-S)*e.width/(e.width-S),0)+3,e.paddingRight=Math.max((M-E)*e.width/(e.width-E),0)+3}else{var L=o.mirror?0:m.width+b+g;t.width=Math.min(e.maxWidth,t.width+L),e.paddingTop=p.height/2,e.paddingBottom=f.height/2}}e.handleMargins(),l?(e.width=e._length=r.width-e.margins.left-e.margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=r.height-e.margins.top-e.margins.bottom)},handleMargins:function(){var e=this;e.margins&&(e.margins.left=Math.max(e.paddingLeft,e.margins.left),e.margins.top=Math.max(e.paddingTop,e.margins.top),e.margins.right=Math.max(e.paddingRight,e.margins.right),e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom))},afterFit:function(){H.callback(this.options.afterFit,[this])},isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(rr(e))return NaN;if(("number"==typeof e||e instanceof Number)&&!isFinite(e))return NaN;if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y);return e},_convertTicksToLabels:function(e){var t,r,n,o=this;for(o.ticks=e.map((function(e){return e.value})),o.beforeTickToLabelConversion(),t=o.convertTicksToLabels(e)||o.ticks,o.afterTickToLabelConversion(),r=0,n=e.length;rr-1?null:this.getPixelForDecimal(e*n+(t?n/2:0))},getPixelForDecimal:function(e){return this._reversePixels&&(e=1-e),this._startPixel+e*this._length},getDecimalForPixel:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this.min,t=this.max;return this.beginAtZero?0:e<0&&t<0?t:e>0&&t>0?e:0},_autoSkip:function(e){var t,r,n,o,a=this.options.ticks,i=this._length,s=a.maxTicksLimit||i/this._tickSize()+1,c=a.major.enabled?function(e){var t,r,n=[];for(t=0,r=e.length;ts)return function(e,t,r){var n,o,a=0,i=t[0];for(r=Math.ceil(r),n=0;nl)return a;return Math.max(l,1)}(c,e,0,s),l>0){for(t=0,r=l-1;t1?(u-d)/(l-1):null,pr(e,n,H.isNullOrUndef(o)?0:d-o,d),pr(e,n,u,H.isNullOrUndef(o)?e.length:u+o),ur(e)}return pr(e,n),ur(e)},_tickSize:function(){var e=this.options.ticks,t=H.toRadians(this.labelRotation),r=Math.abs(Math.cos(t)),n=Math.abs(Math.sin(t)),o=this._getLabelSizes(),a=e.autoSkipPadding||0,i=o?o.widest.width+a:0,s=o?o.highest.height+a:0;return this.isHorizontal()?s*r>i*n?i/r:s/n:s*n=0&&(i=e),void 0!==a&&(e=r.indexOf(a))>=0&&(s=e),t.minIndex=i,t.maxIndex=s,t.min=r[i],t.max=r[s]},buildTicks:function(){var e=this._getLabels(),t=this.minIndex,r=this.maxIndex;this.ticks=0===t&&r===e.length-1?e:e.slice(t,r+1)},getLabelForIndex:function(e,t){var r=this.chart;return r.getDatasetMeta(t).controller._getValueScaleId()===this.id?this.getRightValue(r.data.datasets[t].data[e]):this._getLabels()[e]},_configure:function(){var e=this,t=e.options.offset,r=e.ticks;mr.prototype._configure.call(e),e.isHorizontal()||(e._reversePixels=!e._reversePixels),r&&(e._startValue=e.minIndex-(t?.5:0),e._valueRange=Math.max(r.length-(t?0:1),1))},getPixelForValue:function(e,t,r){var n,o,a,i=this;return hr(t)||hr(r)||(e=i.chart.data.datasets[r].data[t]),hr(e)||(n=i.isHorizontal()?e.x:e.y),(void 0!==n||void 0!==e&&isNaN(t))&&(o=i._getLabels(),e=H.valueOrDefault(n,e),t=-1!==(a=o.indexOf(e))?a:t,isNaN(t)&&(t=e)),i.getPixelForDecimal((t-i._startValue)/i._valueRange)},getPixelForTick:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange);return Math.min(Math.max(t,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),br={position:"bottom"};gr._defaults=br;var vr=H.noop,yr=H.isNullOrUndef,_r=mr.extend({getRightValue:function(e){return"string"==typeof e?+e:mr.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;if(t.beginAtZero){var r=H.sign(e.min),n=H.sign(e.max);r<0&&n<0?e.max=0:r>0&&n>0&&(e.min=0)}var o=void 0!==t.min||void 0!==t.suggestedMin,a=void 0!==t.max||void 0!==t.suggestedMax;void 0!==t.min?e.min=t.min:void 0!==t.suggestedMin&&(null===e.min?e.min=t.suggestedMin:e.min=Math.min(e.min,t.suggestedMin)),void 0!==t.max?e.max=t.max:void 0!==t.suggestedMax&&(null===e.max?e.max=t.suggestedMax:e.max=Math.max(e.max,t.suggestedMax)),o!==a&&e.min>=e.max&&(o?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,t.beginAtZero||e.min--)},getTickLimit:function(){var e,t=this.options.ticks,r=t.stepSize,n=t.maxTicksLimit;return r?e=Math.ceil(this.max/r)-Math.floor(this.min/r)+1:(e=this._computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:vr,buildTicks:function(){var e=this,t=e.options.ticks,r=e.getTickLimit(),n={maxTicks:r=Math.max(2,r),min:t.min,max:t.max,precision:t.precision,stepSize:H.valueOrDefault(t.fixedStepSize,t.stepSize)},o=e.ticks=function(e,t){var r,n,o,a,i=[],s=e.stepSize,c=s||1,l=e.maxTicks-1,d=e.min,u=e.max,p=e.precision,f=t.min,m=t.max,h=H.niceNum((m-f)/l/c)*c;if(h<1e-14&&yr(d)&&yr(u))return[f,m];(a=Math.ceil(m/h)-Math.floor(f/h))>l&&(h=H.niceNum(a*h/l/c)*c),s||yr(p)?r=Math.pow(10,H._decimalPlaces(h)):(r=Math.pow(10,p),h=Math.ceil(h*r)/r),n=Math.floor(f/h)*h,o=Math.ceil(m/h)*h,s&&(!yr(d)&&H.almostWhole(d/h,h/1e3)&&(n=d),!yr(u)&&H.almostWhole(u/h,h/1e3)&&(o=u)),a=(o-n)/h,a=H.almostEquals(a,Math.round(a),h/1e3)?Math.round(a):Math.ceil(a),n=Math.round(n*r)/r,o=Math.round(o*r)/r,i.push(yr(d)?n:d);for(var g=1;gt.length-1?null:this.getPixelForValue(t[e])}}),Sr=wr;Mr._defaults=Sr;var Er=H.valueOrDefault,Lr=H.math.log10,Dr={position:"left",ticks:{callback:er.formatters.logarithmic}};function Cr(e,t){return H.isFinite(e)&&e>=0?e:t}var Or=mr.extend({determineDataLimits:function(){var e,t,r,n,o,a,i=this,s=i.options,c=i.chart,l=c.data.datasets,d=i.isHorizontal();function u(e){return d?e.xAxisID===i.id:e.yAxisID===i.id}i.min=Number.POSITIVE_INFINITY,i.max=Number.NEGATIVE_INFINITY,i.minNotZero=Number.POSITIVE_INFINITY;var p=s.stacked;if(void 0===p)for(e=0;e0){var t=H.min(e),r=H.max(e);i.min=Math.min(i.min,t),i.max=Math.max(i.max,r)}}))}else for(e=0;e0?e.minNotZero=e.min:e.max<1?e.minNotZero=Math.pow(10,Math.floor(Lr(e.max))):e.minNotZero=1)},buildTicks:function(){var e=this,t=e.options.ticks,r=!e.isHorizontal(),n={min:Cr(t.min),max:Cr(t.max)},o=e.ticks=function(e,t){var r,n,o=[],a=Er(e.min,Math.pow(10,Math.floor(Lr(t.min)))),i=Math.floor(Lr(t.max)),s=Math.ceil(t.max/Math.pow(10,i));0===a?(r=Math.floor(Lr(t.minNotZero)),n=Math.floor(t.minNotZero/Math.pow(10,r)),o.push(a),a=n*Math.pow(10,r)):(r=Math.floor(Lr(a)),n=Math.floor(a/Math.pow(10,r)));var c=r<0?Math.pow(10,Math.abs(r)):1;do{o.push(a),10==++n&&(n=1,c=++r>=0?1:c),a=Math.round(n*Math.pow(10,r)*c)/c}while(rt.length-1?null:this.getPixelForValue(t[e])},_getFirstTickValue:function(e){var t=Math.floor(Lr(e));return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},_configure:function(){var e=this,t=e.min,r=0;mr.prototype._configure.call(e),0===t&&(t=e._getFirstTickValue(e.minNotZero),r=Er(e.options.ticks.fontSize,I.global.defaultFontSize)/e._length),e._startValue=Lr(t),e._valueOffset=r,e._valueRange=(Lr(e.max)-Lr(t))/(1-r)},getPixelForValue:function(e){var t=this,r=0;return(e=+t.getRightValue(e))>t.min&&e>0&&(r=(Lr(e)-t._startValue)/t._valueRange+t._valueOffset),t.getPixelForDecimal(r)},getValueForPixel:function(e){var t=this,r=t.getDecimalForPixel(e);return 0===r&&0===t.min?0:Math.pow(10,t._startValue+(r-t._valueOffset)*t._valueRange)}}),Tr=Dr;Or._defaults=Tr;var jr=H.valueOrDefault,Ar=H.valueAtIndexOrDefault,Nr=H.options.resolve,Pr={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:er.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}};function Ir(e){var t=e.ticks;return t.display&&e.display?jr(t.fontSize,I.global.defaultFontSize)+2*t.backdropPaddingY:0}function Yr(e,t,r,n,o){return e===n||e===o?{start:t-r/2,end:t+r/2}:eo?{start:t-r,end:t}:{start:t,end:t+r}}function zr(e){return 0===e||180===e?"center":e<180?"left":"right"}function Fr(e,t,r,n){var o,a,i=r.y+n/2;if(H.isArray(t))for(o=0,a=t.length;o270||e<90)&&(r.y-=t.h)}function Hr(e){return H.isNumber(e)?e:0}var Br=_r.extend({setDimensions:function(){var e=this;e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=Ir(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function(){var e=this,t=e.chart,r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;H.each(t.data.datasets,(function(o,a){if(t.isDatasetVisible(a)){var i=t.getDatasetMeta(a);H.each(o.data,(function(t,o){var a=+e.getRightValue(t);isNaN(a)||i.data[o].hidden||(r=Math.min(a,r),n=Math.max(a,n))}))}})),e.min=r===Number.POSITIVE_INFINITY?0:r,e.max=n===Number.NEGATIVE_INFINITY?0:n,e.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Ir(this.options))},convertTicksToLabels:function(){var e=this;_r.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map((function(){var t=H.callback(e.options.pointLabels.callback,arguments,e);return t||0===t?t:""}))},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e=this.options;e.display&&e.pointLabels.display?function(e){var t,r,n,o=H.options._parseFont(e.options.pointLabels),a={l:0,r:e.width,t:0,b:e.height-e.paddingTop},i={};e.ctx.font=o.string,e._pointLabelSizes=[];var s,c,l,d=e.chart.data.labels.length;for(t=0;ta.r&&(a.r=f.end,i.r=u),m.starta.b&&(a.b=m.end,i.b=u)}e.setReductions(e.drawingArea,a,i)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(e,t,r){var n=this,o=t.l/Math.sin(r.l),a=Math.max(t.r-n.width,0)/Math.sin(r.r),i=-t.t/Math.cos(r.t),s=-Math.max(t.b-(n.height-n.paddingTop),0)/Math.cos(r.b);o=Hr(o),a=Hr(a),i=Hr(i),s=Hr(s),n.drawingArea=Math.min(Math.floor(e-(o+a)/2),Math.floor(e-(i+s)/2)),n.setCenterPoint(o,a,i,s)},setCenterPoint:function(e,t,r,n){var o=this,a=o.width-t-o.drawingArea,i=e+o.drawingArea,s=r+o.drawingArea,c=o.height-o.paddingTop-n-o.drawingArea;o.xCenter=Math.floor((i+a)/2+o.left),o.yCenter=Math.floor((s+c)/2+o.top+o.paddingTop)},getIndexAngle:function(e){var t=this.chart,r=(e*(360/t.data.labels.length)+((t.options||{}).startAngle||0))%360;return(r<0?r+360:r)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){var t=this;if(H.isNullOrUndef(e))return NaN;var r=t.drawingArea/(t.max-t.min);return t.options.ticks.reverse?(t.max-e)*r:(e-t.min)*r},getPointPosition:function(e,t){var r=this.getIndexAngle(e)-Math.PI/2;return{x:Math.cos(r)*t+this.xCenter,y:Math.sin(r)*t+this.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(e){var t=this.min,r=this.max;return this.getPointPositionForValue(e||0,this.beginAtZero?0:t<0&&r<0?r:t>0&&r>0?t:0)},_drawGrid:function(){var e,t,r,n=this,o=n.ctx,a=n.options,i=a.gridLines,s=a.angleLines,c=jr(s.lineWidth,i.lineWidth),l=jr(s.color,i.color);if(a.pointLabels.display&&function(e){var t=e.ctx,r=e.options,n=r.pointLabels,o=Ir(r),a=e.getDistanceFromCenterForValue(r.ticks.reverse?e.min:e.max),i=H.options._parseFont(n);t.save(),t.font=i.string,t.textBaseline="middle";for(var s=e.chart.data.labels.length-1;s>=0;s--){var c=0===s?o/2:0,l=e.getPointPosition(s,a+c+5),d=Ar(n.fontColor,s,I.global.defaultFontColor);t.fillStyle=d;var u=e.getIndexAngle(s),p=H.toDegrees(u);t.textAlign=zr(p),Rr(p,e._pointLabelSizes[s],l),Fr(t,e.pointLabels[s],l,i.lineHeight)}t.restore()}(n),i.display&&H.each(n.ticks,(function(e,r){0!==r&&(t=n.getDistanceFromCenterForValue(n.ticksAsNumbers[r]),function(e,t,r,n){var o,a=e.ctx,i=t.circular,s=e.chart.data.labels.length,c=Ar(t.color,n-1),l=Ar(t.lineWidth,n-1);if((i||s)&&c&&l){if(a.save(),a.strokeStyle=c,a.lineWidth=l,a.setLineDash&&(a.setLineDash(t.borderDash||[]),a.lineDashOffset=t.borderDashOffset||0),a.beginPath(),i)a.arc(e.xCenter,e.yCenter,r,0,2*Math.PI);else{o=e.getPointPosition(0,r),a.moveTo(o.x,o.y);for(var d=1;d=0;e--)t=n.getDistanceFromCenterForValue(a.ticks.reverse?n.min:n.max),r=n.getPointPosition(e,t),o.beginPath(),o.moveTo(n.xCenter,n.yCenter),o.lineTo(r.x,r.y),o.stroke();o.restore()}},_drawLabels:function(){var e=this,t=e.ctx,r=e.options.ticks;if(r.display){var n,o,a=e.getIndexAngle(0),i=H.options._parseFont(r),s=jr(r.fontColor,I.global.defaultFontColor);t.save(),t.font=i.string,t.translate(e.xCenter,e.yCenter),t.rotate(a),t.textAlign="center",t.textBaseline="middle",H.each(e.ticks,(function(a,c){(0!==c||r.reverse)&&(n=e.getDistanceFromCenterForValue(e.ticksAsNumbers[c]),r.showLabelBackdrop&&(o=t.measureText(a).width,t.fillStyle=r.backdropColor,t.fillRect(-o/2-r.backdropPaddingX,-n-i.size/2-r.backdropPaddingY,o+2*r.backdropPaddingX,i.size+2*r.backdropPaddingY)),t.fillStyle=s,t.fillText(a,0,-n))})),t.restore()}},_drawTitle:H.noop}),Ur=Pr;Br._defaults=Ur;var Wr=H._deprecated,qr=H.options.resolve,Vr=H.valueOrDefault,Kr=Number.MIN_SAFE_INTEGER||-9007199254740991,Gr=Number.MAX_SAFE_INTEGER||9007199254740991,Qr={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Jr=Object.keys(Qr);function Zr(e,t){return e-t}function $r(e){return H.valueOrDefault(e.time.min,e.ticks.min)}function Xr(e){return H.valueOrDefault(e.time.max,e.ticks.max)}function en(e,t,r,n){var o=function(e,t,r){for(var n,o,a,i=0,s=e.length-1;i>=0&&i<=s;){if(o=e[(n=i+s>>1)-1]||null,a=e[n],!o)return{lo:null,hi:a};if(a[t]r))return{lo:o,hi:a};s=n-1}}return{lo:a,hi:null}}(e,t,r),a=o.lo?o.hi?o.lo:e[e.length-2]:e[0],i=o.lo?o.hi?o.hi:e[e.length-1]:e[1],s=i[t]-a[t],c=s?(r-a[t])/s:0,l=(i[n]-a[n])*c;return a[n]+l}function tn(e,t){var r=e._adapter,n=e.options.time,o=n.parser,a=o||n.format,i=t;return"function"==typeof o&&(i=o(i)),H.isFinite(i)||(i="string"==typeof a?r.parse(i,a):r.parse(i)),null!==i?+i:(o||"function"!=typeof a||(i=a(t),H.isFinite(i)||(i=r.parse(i))),i)}function rn(e,t){if(H.isNullOrUndef(t))return null;var r=e.options.time,n=tn(e,e.getRightValue(t));return null===n||r.round&&(n=+e._adapter.startOf(n,r.round)),n}function nn(e,t,r,n){var o,a,i,s=Jr.length;for(o=Jr.indexOf(e);o=0&&(t[a].major=!0);return t}(e,a,i,r):a}var an=mr.extend({initialize:function(){this.mergeTicksOptions(),mr.prototype.initialize.call(this)},update:function(){var e=this,t=e.options,r=t.time||(t.time={}),n=e._adapter=new Xt._date(t.adapters.date);return Wr("time scale",r.format,"time.format","time.parser"),Wr("time scale",r.min,"time.min","ticks.min"),Wr("time scale",r.max,"time.max","ticks.max"),H.mergeIf(r.displayFormats,n.formats()),mr.prototype.update.apply(e,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),mr.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var e,t,r,n,o,a,i,s=this,c=s.chart,l=s._adapter,d=s.options,u=d.time.unit||"day",p=Gr,f=Kr,m=[],h=[],g=[],b=s._getLabels();for(e=0,r=b.length;e1?function(e){var t,r,n,o={},a=[];for(t=0,r=e.length;t1e5*l)throw t+" and "+r+" are too far apart with stepSize of "+l+" "+c;for(o=u;o=o&&r<=a&&d.push(r);return n.min=o,n.max=a,n._unit=c.unit||(s.autoSkip?nn(c.minUnit,n.min,n.max,u):function(e,t,r,n,o){var a,i;for(a=Jr.length-1;a>=Jr.indexOf(r);a--)if(i=Jr[a],Qr[i].common&&e._adapter.diff(o,n,i)>=t-1)return i;return Jr[r?Jr.indexOf(r):0]}(n,d.length,c.minUnit,n.min,n.max)),n._majorUnit=s.major.enabled&&"year"!==n._unit?function(e){for(var t=Jr.indexOf(e)+1,r=Jr.length;tt&&s=0&&e0?s:1}}),sn={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};an._defaults=sn;var cn={category:gr,linear:Mr,logarithmic:Or,radialLinear:Br,time:an},ln={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Xt._date.override("function"==typeof e?{_id:"moment",formats:function(){return ln},parse:function(t,r){return"string"==typeof t&&"string"==typeof r?t=e(t,r):t instanceof e||(t=e(t)),t.isValid()?t.valueOf():null},format:function(t,r){return e(t).format(r)},add:function(t,r,n){return e(t).add(r,n).valueOf()},diff:function(t,r,n){return e(t).diff(e(r),n)},startOf:function(t,r,n){return t=e(t),"isoWeek"===r?t.isoWeekday(n).valueOf():t.startOf(r).valueOf()},endOf:function(t,r){return e(t).endOf(r).valueOf()},_create:function(t){return e(t)}}:{}),I._set("global",{plugins:{filler:{propagate:!0}}});var dn={dataset:function(e){var t=e.fill,r=e.chart,n=r.getDatasetMeta(t),o=n&&r.isDatasetVisible(t)&&n.dataset._children||[],a=o.length||0;return a?function(e,t){return t=r)&&n;switch(a){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return a;default:return!1}}function pn(e){return(e.el._scale||{}).getPointPositionForValue?function(e){var t,r,n,o,a,i=e.el._scale,s=i.options,c=i.chart.data.labels.length,l=e.fill,d=[];if(!c)return null;for(t=s.ticks.reverse?i.max:i.min,r=s.ticks.reverse?i.min:i.max,n=i.getPointPositionForValue(0,t),o=0;o0;--a)H.canvas.lineTo(e,r[a],r[a-1],!0);else for(i=r[0].cx,s=r[0].cy,c=Math.sqrt(Math.pow(r[0].x-i,2)+Math.pow(r[0].y-s,2)),a=o-1;a>0;--a)e.arc(i,s,c,r[a].angle,r[a-1].angle,!0)}}function bn(e,t,r,n,o,a){var i,s,c,l,d,u,p,f,m=t.length,h=n.spanGaps,g=[],b=[],v=0,y=0;for(e.beginPath(),i=0,s=m;i=0;--r)(t=c[r].$filler)&&t.visible&&(o=(n=t.el)._view,a=n._children||[],i=t.mapper,s=o.backgroundColor||I.global.defaultColor,i&&s&&a.length&&(H.canvas.clipArea(l,e.chartArea),bn(l,a,i,o,s,n._loop),H.canvas.unclipArea(l)))}},yn=H.rtl.getRtlAdapter,_n=H.noop,wn=H.valueOrDefault;function kn(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}I._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var r=t.datasetIndex,n=this.chart,o=n.getDatasetMeta(r);o.hidden=null===o.hidden?!n.data.datasets[r].hidden:null,n.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,r=e.options.legend||{},n=r.labels&&r.labels.usePointStyle;return e._getSortedDatasetMetas().map((function(r){var o=r.controller.getStyle(n?0:void 0);return{text:t[r.index].label,fillStyle:o.backgroundColor,hidden:!e.isDatasetVisible(r.index),lineCap:o.borderCapStyle,lineDash:o.borderDash,lineDashOffset:o.borderDashOffset,lineJoin:o.borderJoinStyle,lineWidth:o.borderWidth,strokeStyle:o.borderColor,pointStyle:o.pointStyle,rotation:o.rotation,datasetIndex:r.index}}),this)}}},legendCallback:function(e){var t,r,n,o=document.createElement("ul"),a=e.data.datasets;for(o.setAttribute("class",e.id+"-legend"),t=0,r=a.length;tc.width)&&(u+=i+r.padding,d[d.length-(t>0?0:1)]=0),s[t]={left:0,top:0,width:n,height:i},d[d.length-1]+=n+r.padding})),c.height+=u}else{var p=r.padding,f=e.columnWidths=[],m=e.columnHeights=[],h=r.padding,g=0,b=0;H.each(e.legendItems,(function(e,t){var n=kn(r,i)+i/2+o.measureText(e.text).width;t>0&&b+i+2*p>c.height&&(h+=g+r.padding,f.push(g),m.push(b),g=0,b=0),g=Math.max(g,n),b+=i+p,s[t]={left:0,top:0,width:n,height:i}})),h+=g,f.push(g),m.push(b),c.width+=h}e.width=c.width,e.height=c.height}else e.width=c.width=e.height=c.height=0},afterFit:_n,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var e=this,t=e.options,r=t.labels,n=I.global,o=n.defaultColor,a=n.elements.line,i=e.height,s=e.columnHeights,c=e.width,l=e.lineWidths;if(t.display){var d,u=yn(t.rtl,e.left,e.minSize.width),p=e.ctx,f=wn(r.fontColor,n.defaultFontColor),m=H.options._parseFont(r),h=m.size;p.textAlign=u.textAlign("left"),p.textBaseline="middle",p.lineWidth=.5,p.strokeStyle=f,p.fillStyle=f,p.font=m.string;var g=kn(r,h),b=e.legendHitBoxes,v=function(e,n){switch(t.align){case"start":return r.padding;case"end":return e-n;default:return(e-n+r.padding)/2}},y=e.isHorizontal();d=y?{x:e.left+v(c,l[0]),y:e.top+r.padding,line:0}:{x:e.left+r.padding,y:e.top+v(i,s[0]),line:0},H.rtl.overrideTextDirection(e.ctx,t.textDirection);var _=h+r.padding;H.each(e.legendItems,(function(t,n){var f=p.measureText(t.text).width,m=g+h/2+f,w=d.x,k=d.y;u.setWidth(e.minSize.width),y?n>0&&w+m+r.padding>e.left+e.minSize.width&&(k=d.y+=_,d.line++,w=d.x=e.left+v(c,l[d.line])):n>0&&k+_>e.top+e.minSize.height&&(w=d.x=w+e.columnWidths[d.line]+r.padding,d.line++,k=d.y=e.top+v(i,s[d.line]));var x=u.x(w);!function(e,t,n){if(!(isNaN(g)||g<=0)){p.save();var i=wn(n.lineWidth,a.borderWidth);if(p.fillStyle=wn(n.fillStyle,o),p.lineCap=wn(n.lineCap,a.borderCapStyle),p.lineDashOffset=wn(n.lineDashOffset,a.borderDashOffset),p.lineJoin=wn(n.lineJoin,a.borderJoinStyle),p.lineWidth=i,p.strokeStyle=wn(n.strokeStyle,o),p.setLineDash&&p.setLineDash(wn(n.lineDash,a.borderDash)),r&&r.usePointStyle){var s=g*Math.SQRT2/2,c=u.xPlus(e,g/2),l=t+h/2;H.canvas.drawPoint(p,n.pointStyle,s,c,l,n.rotation)}else p.fillRect(u.leftForLtr(e,g),t,g,h),0!==i&&p.strokeRect(u.leftForLtr(e,g),t,g,h);p.restore()}}(x,k,t),b[n].left=u.leftForLtr(x,b[n].width),b[n].top=k,function(e,t,r,n){var o=h/2,a=u.xPlus(e,g+o),i=t+o;p.fillText(r.text,a,i),r.hidden&&(p.beginPath(),p.lineWidth=2,p.moveTo(a,i),p.lineTo(u.xPlus(a,n),i),p.stroke())}(x,k,t,f),y?d.x+=m+r.padding:d.y+=_})),H.rtl.restoreTextDirection(e.ctx,t.textDirection)}},_getLegendItemAt:function(e,t){var r,n,o,a=this;if(e>=a.left&&e<=a.right&&t>=a.top&&t<=a.bottom)for(o=a.legendHitBoxes,r=0;r=(n=o[r]).left&&e<=n.left+n.width&&t>=n.top&&t<=n.top+n.height)return a.legendItems[r];return null},handleEvent:function(e){var t,r=this,n=r.options,o="mouseup"===e.type?"click":e.type;if("mousemove"===o){if(!n.onHover&&!n.onLeave)return}else{if("click"!==o)return;if(!n.onClick)return}t=r._getLegendItemAt(e.x,e.y),"click"===o?t&&n.onClick&&n.onClick.call(r,e.native,t):(n.onLeave&&t!==r._hoveredItem&&(r._hoveredItem&&n.onLeave.call(r,e.native,r._hoveredItem),r._hoveredItem=t),n.onHover&&t&&n.onHover.call(r,e.native,t))}});function Mn(e,t){var r=new xn({ctx:e.ctx,options:t,chart:e});mt.configure(e,r,t),mt.addBox(e,r),e.legend=r}var Sn={id:"legend",_element:xn,beforeInit:function(e){var t=e.options.legend;t&&Mn(e,t)},beforeUpdate:function(e){var t=e.options.legend,r=e.legend;t?(H.mergeIf(t,I.global.legend),r?(mt.configure(e,r,t),r.options=t):Mn(e,t)):r&&(mt.removeBox(e,r),delete e.legend)},afterEvent:function(e,t){var r=e.legend;r&&r.handleEvent(t)}},En=H.noop;I._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Ln=G.extend({initialize:function(e){H.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:En,update:function(e,t,r){var n=this;return n.beforeUpdate(),n.maxWidth=e,n.maxHeight=t,n.margins=r,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:En,beforeSetDimensions:En,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:En,beforeBuildLabels:En,buildLabels:En,afterBuildLabels:En,beforeFit:En,fit:function(){var e,t=this,r=t.options,n=t.minSize={},o=t.isHorizontal();r.display?(e=(H.isArray(r.text)?r.text.length:1)*H.options._parseFont(r).lineHeight+2*r.padding,t.width=n.width=o?t.maxWidth:e,t.height=n.height=o?e:t.maxHeight):t.width=n.width=t.height=n.height=0},afterFit:En,isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function(){var e=this,t=e.ctx,r=e.options;if(r.display){var n,o,a,i=H.options._parseFont(r),s=i.lineHeight,c=s/2+r.padding,l=0,d=e.top,u=e.left,p=e.bottom,f=e.right;t.fillStyle=H.valueOrDefault(r.fontColor,I.global.defaultFontColor),t.font=i.string,e.isHorizontal()?(o=u+(f-u)/2,a=d+c,n=f-u):(o="left"===r.position?u+c:f-c,a=d+(p-d)/2,n=p-d,l=Math.PI*("left"===r.position?-.5:.5)),t.save(),t.translate(o,a),t.rotate(l),t.textAlign="center",t.textBaseline="middle";var m=r.text;if(H.isArray(m))for(var h=0,g=0;g=0;n--){var o=e[n];if(t(o))return o}},H.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},H.almostEquals=function(e,t,r){return Math.abs(e-t)=e},H.max=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.max(e,t)}),Number.NEGATIVE_INFINITY)},H.min=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.min(e,t)}),Number.POSITIVE_INFINITY)},H.sign=Math.sign?function(e){return Math.sign(e)}:function(e){return 0==(e=+e)||isNaN(e)?e:e>0?1:-1},H.toRadians=function(e){return e*(Math.PI/180)},H.toDegrees=function(e){return e*(180/Math.PI)},H._decimalPlaces=function(e){if(H.isFinite(e)){for(var t=1,r=0;Math.round(e*t)/t!==e;)t*=10,r++;return r}},H.getAngleFromPoint=function(e,t){var r=t.x-e.x,n=t.y-e.y,o=Math.sqrt(r*r+n*n),a=Math.atan2(n,r);return a<-.5*Math.PI&&(a+=2*Math.PI),{angle:a,distance:o}},H.distanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},H.aliasPixel=function(e){return e%2==0?0:.5},H._alignPixel=function(e,t,r){var n=e.currentDevicePixelRatio,o=r/2;return Math.round((t-o)*n)/n+o},H.splineCurve=function(e,t,r,n){var o=e.skip?t:e,a=t,i=r.skip?t:r,s=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),c=Math.sqrt(Math.pow(i.x-a.x,2)+Math.pow(i.y-a.y,2)),l=s/(s+c),d=c/(s+c),u=n*(l=isNaN(l)?0:l),p=n*(d=isNaN(d)?0:d);return{previous:{x:a.x-u*(i.x-o.x),y:a.y-u*(i.y-o.y)},next:{x:a.x+p*(i.x-o.x),y:a.y+p*(i.y-o.y)}}},H.EPSILON=Number.EPSILON||1e-14,H.splineCurveMonotone=function(e){var t,r,n,o,a,i,s,c,l,d=(e||[]).map((function(e){return{model:e._model,deltaK:0,mK:0}})),u=d.length;for(t=0;t0?d[t-1]:null,(o=t0?d[t-1]:null,o=t=e.length-1?e[0]:e[t+1]:t>=e.length-1?e[e.length-1]:e[t+1]},H.previousItem=function(e,t,r){return r?t<=0?e[e.length-1]:e[t-1]:t<=0?e[0]:e[t-1]},H.niceNum=function(e,t){var r=Math.floor(H.log10(e)),n=e/Math.pow(10,r);return(t?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,r)},H.requestAnimFrame="undefined"==typeof window?function(e){e()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},H.getRelativePosition=function(e,t){var r,n,o=e.originalEvent||e,a=e.target||e.srcElement,i=a.getBoundingClientRect(),s=o.touches;s&&s.length>0?(r=s[0].clientX,n=s[0].clientY):(r=o.clientX,n=o.clientY);var c=parseFloat(H.getStyle(a,"padding-left")),l=parseFloat(H.getStyle(a,"padding-top")),d=parseFloat(H.getStyle(a,"padding-right")),u=parseFloat(H.getStyle(a,"padding-bottom")),p=i.right-i.left-c-d,f=i.bottom-i.top-l-u;return{x:r=Math.round((r-i.left-c)/p*a.width/t.currentDevicePixelRatio),y:n=Math.round((n-i.top-l)/f*a.height/t.currentDevicePixelRatio)}},H.getConstraintWidth=function(e){return r(e,"max-width","clientWidth")},H.getConstraintHeight=function(e){return r(e,"max-height","clientHeight")},H._calculatePadding=function(e,t,r){return(t=H.getStyle(e,t)).indexOf("%")>-1?r*parseInt(t,10)/100:parseInt(t,10)},H._getParentNode=function(e){var t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t},H.getMaximumWidth=function(e){var t=H._getParentNode(e);if(!t)return e.clientWidth;var r=t.clientWidth,n=r-H._calculatePadding(t,"padding-left",r)-H._calculatePadding(t,"padding-right",r),o=H.getConstraintWidth(e);return isNaN(o)?n:Math.min(n,o)},H.getMaximumHeight=function(e){var t=H._getParentNode(e);if(!t)return e.clientHeight;var r=t.clientHeight,n=r-H._calculatePadding(t,"padding-top",r)-H._calculatePadding(t,"padding-bottom",r),o=H.getConstraintHeight(e);return isNaN(o)?n:Math.min(n,o)},H.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},H.retinaScale=function(e,t){var r=e.currentDevicePixelRatio=t||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==r){var n=e.canvas,o=e.height,a=e.width;n.height=o*r,n.width=a*r,e.ctx.scale(r,r),n.style.height||n.style.width||(n.style.height=o+"px",n.style.width=a+"px")}},H.fontString=function(e,t,r){return t+" "+e+"px "+r},H.longestText=function(e,t,r,n){var o=(n=n||{}).data=n.data||{},a=n.garbageCollect=n.garbageCollect||[];n.font!==t&&(o=n.data={},a=n.garbageCollect=[],n.font=t),e.font=t;var i,s,c,l,d,u=0,p=r.length;for(i=0;ir.length){for(i=0;in&&(n=a),n},H.numberOfLabelLines=function(e){var t=1;return H.each(e,(function(e){H.isArray(e)&&e.length>t&&(t=e.length)})),t},H.color=k?function(e){return e instanceof CanvasGradient&&(e=I.global.defaultColor),k(e)}:function(e){return console.error("Color.js not found!"),e},H.getHoverColor=function(e){return e instanceof CanvasPattern||e instanceof CanvasGradient?e:H.color(e).saturate(.5).darken(.1).rgbString()}}(),Jt._adapters=Xt,Jt.Animation=J,Jt.animationService=Z,Jt.controllers=Ze,Jt.DatasetController=re,Jt.defaults=I,Jt.Element=G,Jt.elements=we,Jt.Interaction=ot,Jt.layouts=mt,Jt.platform=Dt,Jt.plugins=Ct,Jt.Scale=mr,Jt.scaleService=Ot,Jt.Ticks=er,Jt.Tooltip=Ht,Jt.helpers.each(cn,(function(e,t){Jt.scaleService.registerScaleType(t,e,e._defaults)})),Cn)Cn.hasOwnProperty(An)&&Jt.plugins.register(Cn[An]);Jt.platform.initialize();var Nn=Jt;return"undefined"!=typeof window&&(window.Chart=Jt),Jt.Chart=Jt,Jt.Legend=Cn.legend._element,Jt.Title=Cn.title._element,Jt.pluginService=Jt.plugins,Jt.PluginBase=Jt.Element.extend({}),Jt.canvasHelpers=Jt.helpers.canvas,Jt.layoutService=Jt.layouts,Jt.LinearScaleBase=_r,Jt.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(e){Jt[e]=function(t,r){return new Jt(t,Jt.helpers.merge(r||{},{type:e.charAt(0).toLowerCase()+e.slice(1)}))}})),Nn}(function(){try{return r(2)}catch(e){}}())},function(e,t,r){var n=r(200);e.exports=function(e,t){return n(e,t)}},function(e,t,r){var n=r(43),o=r(8),a=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:n.version,mode:r(64)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t,r){var n=r(45);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,r){"use strict";var n=r(7);e.exports=function(){var e=n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,r){var n=r(7),o=r(22),a=r(15)("species");e.exports=function(e,t){var r,i=n(e).constructor;return void 0===i||null==(r=n(i)[a])?t:o(r)}},function(e,t,r){var n=r(143),o=r(732),a=r(733),i=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,r){var n=r(101);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=Object.assign||function(e){for(var t=1;t2?arguments[2]:{},a=n(t);o&&(a=i.call(a,Object.getOwnPropertySymbols(t)));for(var s=0;s=l?c:(r.setFullYear(c.getFullYear(),c.getMonth(),s),r)}},function(e,t,r){var n=r(33),o=r(16),a=r(75);e.exports=function(e){return function(t,r,i){var s,c=n(t),l=o(c.length),d=a(i,l);if(e&&r!=r){for(;l>d;)if((s=c[d++])!=s)return!0}else for(;l>d;d++)if((e||d in c)&&c[d]===r)return e||d||0;return!e&&-1}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,r){var n=r(45);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t,r){var n=r(46),o=r(51);e.exports=function(e){return function(t,r){var a,i,s=String(o(t)),c=n(r),l=s.length;return c<0||c>=l?e?"":void 0:(a=s.charCodeAt(c))<55296||a>56319||c+1===l||(i=s.charCodeAt(c+1))<56320||i>57343?e?s.charAt(c):a:e?s.slice(c,c+2):i-56320+(a-55296<<10)+65536}}},function(e,t,r){var n=r(13),o=r(45),a=r(15)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==o(e))}},function(e,t,r){var n=r(15)("iterator"),o=!1;try{var a=[7][n]();a.return=function(){o=!0},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var a=[7],i=a[n]();i.next=function(){return{done:r=!0}},a[n]=function(){return i},e(a)}catch(e){}return r}},function(e,t,r){"use strict";var n=r(96),o=RegExp.prototype.exec;e.exports=function(e,t){var r=e.exec;if("function"==typeof r){var a=r.call(e,t);if("object"!=typeof a)throw new TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==n(e))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},function(e,t,r){"use strict";r(265);var n=r(28),o=r(27),a=r(10),i=r(51),s=r(15),c=r(193),l=s("species"),d=!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})),u=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2===r.length&&"a"===r[0]&&"b"===r[1]}();e.exports=function(e,t,r){var p=s(e),f=!a((function(){var t={};return t[p]=function(){return 7},7!=""[e](t)})),m=f?!a((function(){var t=!1,r=/a/;return r.exec=function(){return t=!0,null},"split"===e&&(r.constructor={},r.constructor[l]=function(){return r}),r[p](""),!t})):void 0;if(!f||!m||"replace"===e&&!d||"split"===e&&!u){var h=/./[p],g=r(i,p,""[e],(function(e,t,r,n,o){return t.exec===c?f&&!o?{done:!0,value:h.call(t,r,n)}:{done:!0,value:e.call(r,t,n)}:{done:!1}})),b=g[0],v=g[1];n(String.prototype,e,b),o(RegExp.prototype,p,2==t?function(e,t){return v.call(e,this,t)}:function(e){return v.call(e,this)})}}},function(e,t,r){var n=r(8).navigator;e.exports=n&&n.userAgent||""},function(e,t,r){"use strict";var n=r(8),o=r(4),a=r(28),i=r(81),s=r(65),c=r(80),l=r(79),d=r(13),u=r(10),p=r(132),f=r(95),m=r(179);e.exports=function(e,t,r,h,g,b){var v=n[e],y=v,_=g?"set":"add",w=y&&y.prototype,k={},x=function(e){var t=w[e];a(w,e,"delete"==e||"has"==e?function(e){return!(b&&!d(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return b&&!d(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,r){return t.call(this,0===e?0:e,r),this})};if("function"==typeof y&&(b||w.forEach&&!u((function(){(new y).entries().next()})))){var M=new y,S=M[_](b?{}:-0,1)!=M,E=u((function(){M.has(1)})),L=p((function(e){new y(e)})),D=!b&&u((function(){for(var e=new y,t=5;t--;)e[_](t,t);return!e.has(-0)}));L||((y=t((function(t,r){l(t,y,e);var n=m(new v,t,y);return null!=r&&c(r,g,n[_],n),n}))).prototype=w,w.constructor=y),(E||D)&&(x("delete"),x("has"),g&&x("get")),(D||S)&&x(_),b&&w.clear&&delete w.clear}else y=h.getConstructor(t,e,g,_),i(y.prototype,r),s.NEED=!0;return f(y,e),k[e]=y,o(o.G+o.W+o.F*(y!=v),k),b||h.setStrong(y,e,g),y}},function(e,t,r){for(var n,o=r(8),a=r(27),i=r(73),s=i("typed_array"),c=i("view"),l=!(!o.ArrayBuffer||!o.DataView),d=l,u=0,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");u<9;)(n=o[p[u++]])?(a(n.prototype,s,!0),a(n.prototype,c,!0)):d=!1;e.exports={ABV:l,CONSTR:d,TYPED:s,VIEW:c}},function(e,t,r){"use strict";e.exports=r(64)||!r(10)((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete r(8)[e]}))},function(e,t,r){"use strict";var n=r(4);e.exports=function(e){n(n.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,r){"use strict";var n=r(4),o=r(22),a=r(44),i=r(80);e.exports=function(e){n(n.S,e,{from:function(e){var t,r,n,s,c=arguments[1];return o(this),(t=void 0!==c)&&o(c),null==e?new this:(r=[],t?(n=0,s=a(c,arguments[2],2),i(e,!1,(function(e){r.push(s(e,n++))}))):i(e,!1,r.push,r),new this(r))}})}},function(e,t,r){var n=r(721),o=r(722),a=r(723),i=r(724),s=r(725);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=s},o.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},o.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},o.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},o.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},o.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},n.createEmpty=function(e){return new n({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},n}((0,r(9).Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));e.exports=n},function(e,t,r){"use strict";var n=r(11),o=null;function a(e){return"LTR"===e||"RTL"===e}function i(e){return a(e)||n(!1),"LTR"===e?"ltr":"rtl"}function s(e){o=e}var c={NEUTRAL:"NEUTRAL",LTR:"LTR",RTL:"RTL",isStrong:a,getHTMLDir:i,getHTMLDirIfDifferent:function(e,t){return a(e)||n(!1),a(t)||n(!1),e===t?null:i(e)},setGlobalDir:s,initGlobalDir:function(){s("LTR")},getGlobalDir:function(){return o||this.initGlobalDir(),o||n(!1),o}};e.exports=c},function(e,t,r){"use strict";var n=r(157),o=r(453);e.exports=function(e){for(var t=e;t&&t!==n(e).documentElement;){var r=o(t);if(null!=r)return r;t=t.parentNode}return null}},function(e,t,r){"use strict";e.exports=function(e){return e&&e.ownerDocument?e.ownerDocument:document}},function(e,t,r){"use strict";e.exports={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105}},function(e,t,r){"use strict";function n(e,t){var r=o.get(e,t);return"auto"===r||"scroll"===r}var o={get:r(901),getScrollParent:function(e){if(!e)return null;for(var t=e.ownerDocument;e&&e!==t.body;){if(n(e,"overflow")||n(e,"overflowY")||n(e,"overflowX"))return e;e=e.parentNode}return t.defaultView||t.parentWindow}};e.exports=o},function(e,t,r){"use strict";var n=r(905),o=r(906);e.exports=function(e){var t=n(e.ownerDocument||e.document);e.Window&&e instanceof e.Window&&(e=t);var r=o(e),a=e===t?e.ownerDocument.documentElement:e,i=e.scrollWidth-a.clientWidth,s=e.scrollHeight-a.clientHeight;return r.x=Math.max(0,Math.min(r.x,i)),r.y=Math.max(0,Math.min(r.y,s)),r}},function(e,t,r){"use strict";e.exports=function(e){return"handled"===e||!0===e}},function(e,t,r){"use strict";t.__esModule=!0;var n=i(r(829)),o=i(r(841)),a="function"==typeof o.default&&"symbol"==typeof n.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":typeof e};function i(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof o.default&&"symbol"===a(n.default)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":void 0===e?"undefined":a(e)}},function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return _}));var n=r(0),o=r.n(n),a=r(1),i=r.n(a),s=r(108),c=r.n(s),l=r(109),d=r.n(l),u=r(491),p=r.n(u),f=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var v=void 0!==e&&e.env&&"production",y=function(e){function t(){h(this,t);var r=g(this,e.call(this));return r.handleOnClick=function(e){var t=r.chartInstance,n=r.props,o=n.getDatasetAtEvent,a=n.getElementAtEvent,i=n.getElementsAtEvent,s=n.onElementsClick;o&&o(t.getDatasetAtEvent(e),e),a&&a(t.getElementAtEvent(e),e),i&&i(t.getElementsAtEvent(e),e),s&&s(t.getElementsAtEvent(e),e)},r.ref=function(e){r.element=e},r.chartInstance=void 0,r}return b(t,e),t.prototype.componentDidMount=function(){this.renderChart()},t.prototype.componentDidUpdate=function(){if(this.props.redraw)return this.destroyChart(),void this.renderChart();this.updateChart()},t.prototype.shouldComponentUpdate=function(e){var t=this.props,r=(t.redraw,t.type),n=t.options,o=t.plugins,a=t.legend,i=t.height,s=t.width;if(!0===e.redraw)return!0;if(i!==e.height||s!==e.width)return!0;if(r!==e.type)return!0;if(!d()(a,e.legend))return!0;if(!d()(n,e.options))return!0;var c=this.transformDataProp(e);return!d()(this.shadowDataProp,c)||!d()(o,e.plugins)},t.prototype.componentWillUnmount=function(){this.destroyChart()},t.prototype.transformDataProp=function(e){var t=e.data;return"function"==typeof t?t(this.element):t},t.prototype.memoizeDataProps=function(){if(this.props.data){var e=this.transformDataProp(this.props);return this.shadowDataProp=f({},e,{datasets:e.datasets&&e.datasets.map((function(e){return f({},e)}))}),this.saveCurrentDatasets(),e}},t.prototype.checkDatasets=function(e){var r="production"!==v&&"prod"!==v,n=this.props.datasetKeyProvider!==t.getLabelAsKey,o=e.length>1;if(r&&o&&!n){var a=!1;e.forEach((function(e){e.label||(a=!0)})),a&&console.error('[react-chartjs-2] Warning: Each dataset needs a unique key. By default, the "label" property on each dataset is used. Alternatively, you may provide a "datasetKeyProvider" as a prop that returns a unique key.')}},t.prototype.getCurrentDatasets=function(){return this.chartInstance&&this.chartInstance.config.data&&this.chartInstance.config.data.datasets||[]},t.prototype.saveCurrentDatasets=function(){var e=this;this.datasets=this.datasets||{},this.getCurrentDatasets().forEach((function(t){e.datasets[e.props.datasetKeyProvider(t)]=t}))},t.prototype.updateChart=function(){var e=this,t=this.props.options,r=this.memoizeDataProps(this.props);if(this.chartInstance){t&&(this.chartInstance.options=c.a.helpers.configMerge(this.chartInstance.options,t));var n=this.getCurrentDatasets(),o=r.datasets||[];this.checkDatasets(n);var a=p()(n,this.props.datasetKeyProvider);this.chartInstance.config.data.datasets=o.map((function(t){var r=a[e.props.datasetKeyProvider(t)];if(r&&r.type===t.type&&t.data){r.data.splice(t.data.length),t.data.forEach((function(e,n){r.data[n]=t.data[n]}));t.data;var n=m(t,["data"]);return f({},r,n)}return t}));r.datasets;var i=m(r,["datasets"]);this.chartInstance.config.data=f({},this.chartInstance.config.data,i),this.chartInstance.update()}},t.prototype.renderChart=function(){var e=this.props,r=e.options,n=e.legend,o=e.type,a=e.plugins,i=this.element,s=this.memoizeDataProps();void 0===n||d()(t.defaultProps.legend,n)||(r.legend=n),this.chartInstance=new c.a(i,{type:o,data:s,options:r,plugins:a})},t.prototype.destroyChart=function(){if(this.chartInstance){this.saveCurrentDatasets();var e=Object.values(this.datasets);this.chartInstance.config.data.datasets=e,this.chartInstance.destroy()}},t.prototype.render=function(){var e=this.props,t=e.height,r=e.width,n=e.id;return o.a.createElement("canvas",{ref:this.ref,height:t,width:r,id:n,onClick:this.handleOnClick})},t}(o.a.Component);y.getLabelAsKey=function(e){return e.label},y.propTypes={data:i.a.oneOfType([i.a.object,i.a.func]).isRequired,getDatasetAtEvent:i.a.func,getElementAtEvent:i.a.func,getElementsAtEvent:i.a.func,height:i.a.number,legend:i.a.object,onElementsClick:i.a.func,options:i.a.object,plugins:i.a.arrayOf(i.a.object),redraw:i.a.bool,type:function(e,t,r){if(!c.a.controllers[e[t]])return new Error("Invalid chart type `"+e[t]+"` supplied to `"+r+"`.")},width:i.a.number,datasetKeyProvider:i.a.func},y.defaultProps={legend:{display:!0,position:"bottom"},type:"doughnut",height:150,width:300,redraw:!1,options:{},datasetKeyProvider:y.getLabelAsKey};(function(e){function t(){return h(this,t),g(this,e.apply(this,arguments))}b(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(y,f({},this.props,{ref:function(t){return e.chartInstance=t&&t.chartInstance},type:"doughnut"}))}})(o.a.Component),function(e){function t(){return h(this,t),g(this,e.apply(this,arguments))}b(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(y,f({},this.props,{ref:function(t){return e.chartInstance=t&&t.chartInstance},type:"pie"}))}}(o.a.Component),function(e){function t(){return h(this,t),g(this,e.apply(this,arguments))}b(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(y,f({},this.props,{ref:function(t){return e.chartInstance=t&&t.chartInstance},type:"line"}))}}(o.a.Component);var _=function(e){function t(){return h(this,t),g(this,e.apply(this,arguments))}return b(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(y,f({},this.props,{ref:function(t){return e.chartInstance=t&&t.chartInstance},type:"bar"}))},t}(o.a.Component);(function(e){function t(){return h(this,t),g(this,e.apply(this,arguments))}b(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(y,f({},this.props,{ref:function(t){return e.chartInstance=t&&t.chartInstance},type:"horizontalBar"}))}})(o.a.Component),function(e){function t(){return h(this,t),g(this,e.apply(this,arguments))}b(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(y,f({},this.props,{ref:function(t){return e.chartInstance=t&&t.chartInstance},type:"radar"}))}}(o.a.Component),function(e){function t(){return h(this,t),g(this,e.apply(this,arguments))}b(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(y,f({},this.props,{ref:function(t){return e.chartInstance=t&&t.chartInstance},type:"polarArea"}))}}(o.a.Component),function(e){function t(){return h(this,t),g(this,e.apply(this,arguments))}b(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(y,f({},this.props,{ref:function(t){return e.chartInstance=t&&t.chartInstance},type:"bubble"}))}}(o.a.Component),function(e){function t(){return h(this,t),g(this,e.apply(this,arguments))}b(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(y,f({},this.props,{ref:function(t){return e.chartInstance=t&&t.chartInstance},type:"scatter"}))}}(o.a.Component),c.a.defaults}).call(this,r(415))},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(6),o=r(106),a=r(3);function i(e,t){Object(a.a)(2,arguments);var r=Object(n.a)(t);return Object(o.a)(e,-r)}},function(e,t,r){"use strict";function n(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function o(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}var a={p:o,P:function(e,t){var r,a=e.match(/(P+)(p+)?/),i=a[1],s=a[2];if(!s)return n(e,t);switch(i){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;case"PPPP":default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",n(i,t)).replace("{{time}}",o(s,t))}};t.a=a},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(5),o=r(57),a=r(3);function i(e){Object(a.a)(1,arguments);var t=Object(n.default)(e),r=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(r+1,0,4),i.setUTCHours(0,0,0,0);var s=Object(o.a)(i),c=new Date(0);c.setUTCFullYear(r,0,4),c.setUTCHours(0,0,0,0);var l=Object(o.a)(c);return t.getTime()>=s.getTime()?r+1:t.getTime()>=l.getTime()?r:r-1}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return a}));var n=r(5),o=r(3);function a(e){Object(o.a)(1,arguments);var t=Object(n.default)(e),r=t.getMonth(),a=r-r%3;return t.setMonth(a,1),t.setHours(0,0,0,0),t}},function(e,t,r){"use strict";var n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function o(e){return function(t){var r=t||{},n=r.width?String(r.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var a={date:o({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:o({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:o({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},i={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function s(e){return function(t,r){var n,o=r||{};if("formatting"===(o.context?String(o.context):"standalone")&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,i=o.width?String(o.width):a;n=e.formattingValues[i]||e.formattingValues[a]}else{var s=e.defaultWidth,c=o.width?String(o.width):e.defaultWidth;n=e.values[c]||e.values[s]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function c(e){return function(t,r){var n=String(t),o=r||{},a=o.width,i=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],s=n.match(i);if(!s)return null;var c,l=s[0],d=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth];return c="[object Array]"===Object.prototype.toString.call(d)?function(e,t){for(var r=0;r0?"in "+o:o+" ago":o},formatLong:a,formatRelative:function(e,t,r,n){return i[e]},localize:{ordinalNumber:function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:s({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:s({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:s({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:s({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:s({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(l={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e,t){var r=String(e),n=t||{},o=r.match(l.matchPattern);if(!o)return null;var a=o[0],i=r.match(l.parsePattern);if(!i)return null;var s=l.valueCallback?l.valueCallback(i[0]):i[0];return{value:s=n.valueCallback?n.valueCallback(s):s,rest:r.slice(a.length)}}),era:c({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:c({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:c({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:c({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:c({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};t.a=d},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(5),o=r(49),a=r(6),i=r(107),s=r(3);function c(e,t){Object(s.a)(1,arguments);var r=t||{},n=r.locale,c=n&&n.options&&n.options.firstWeekContainsDate,l=null==c?1:Object(a.a)(c),d=null==r.firstWeekContainsDate?l:Object(a.a)(r.firstWeekContainsDate),u=Object(i.a)(e,t),p=new Date(0);p.setUTCFullYear(u,0,d),p.setUTCHours(0,0,0,0);var f=Object(o.a)(p,t);return f}function l(e,t){Object(s.a)(1,arguments);var r=Object(n.default)(e),a=Object(o.a)(r,t).getTime()-c(r,t).getTime();return Math.round(a/6048e5)+1}},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(5),o=r(57),a=r(166),i=r(3);function s(e){Object(i.a)(1,arguments);var t=Object(a.a)(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Object(o.a)(r);return n}function c(e){Object(i.a)(1,arguments);var t=Object(n.default)(e),r=Object(o.a)(t).getTime()-s(t).getTime();return Math.round(r/6048e5)+1}},,function(e,t,r){var n=r(13),o=r(8).document,a=n(o)&&n(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,r){var n=r(8),o=r(43),a=r(64),i=r(247),s=r(20).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=a?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:i.f(e)})}},function(e,t,r){var n=r(110)("keys"),o=r(73);e.exports=function(e){return n[e]||(n[e]=o(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,r){var n=r(8).document;e.exports=n&&n.documentElement},function(e,t,r){var n=r(13),o=r(7),a=function(e,t){if(o(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{(n=r(44)(Function.call,r(34).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,r){return a(e,r),t?e.__proto__=r:n(e,r),e}}({},!1):void 0),check:a}},function(e,t){e.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(e,t,r){var n=r(13),o=r(177).set;e.exports=function(e,t,r){var a,i=t.constructor;return i!==r&&"function"==typeof i&&(a=i.prototype)!==r.prototype&&n(a)&&o&&o(e,a),e}},function(e,t,r){"use strict";var n=r(46),o=r(51);e.exports=function(e){var t=String(o(this)),r="",a=n(e);if(a<0||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(r+=t);return r}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t){var r=Math.expm1;e.exports=!r||r(10)>22025.465794806718||r(10)<22025.465794806718||-2e-17!=r(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:r},function(e,t,r){"use strict";var n=r(64),o=r(4),a=r(28),i=r(27),s=r(98),c=r(184),l=r(95),d=r(35),u=r(15)("iterator"),p=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(e,t,r,m,h,g,b){c(r,t,m);var v,y,_,w=function(e){if(!p&&e in S)return S[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},k=t+" Iterator",x="values"==h,M=!1,S=e.prototype,E=S[u]||S["@@iterator"]||h&&S[h],L=E||w(h),D=h?x?w("entries"):L:void 0,C="Array"==t&&S.entries||E;if(C&&(_=d(C.call(new e)))!==Object.prototype&&_.next&&(l(_,k,!0),n||"function"==typeof _[u]||i(_,u,f)),x&&E&&"values"!==E.name&&(M=!0,L=function(){return E.call(this)}),n&&!b||!p&&!M&&S[u]||i(S,u,L),s[t]=L,s[k]=f,h)if(v={values:x?L:w("values"),keys:g?L:w("keys"),entries:D},b)for(y in v)y in S||a(S,y,v[y]);else o(o.P+o.F*(p||M),t,v);return v}},function(e,t,r){"use strict";var n=r(76),o=r(72),a=r(95),i={};r(27)(i,r(15)("iterator"),(function(){return this})),e.exports=function(e,t,r){e.prototype=n(i,{next:o(1,r)}),a(e,t+" Iterator")}},function(e,t,r){var n=r(131),o=r(51);e.exports=function(e,t,r){if(n(t))throw TypeError("String#"+r+" doesn't accept regex!");return String(o(e))}},function(e,t,r){var n=r(15)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,r){var n=r(98),o=r(15)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||a[o]===e)}},function(e,t,r){"use strict";var n=r(20),o=r(72);e.exports=function(e,t,r){t in e?n.f(e,t,o(0,r)):e[t]=r}},function(e,t,r){var n=r(96),o=r(15)("iterator"),a=r(98);e.exports=r(43).getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||a[n(e)]}},function(e,t,r){var n=r(605);e.exports=function(e,t){return new(n(e))(t)}},function(e,t,r){"use strict";var n=r(21),o=r(75),a=r(16);e.exports=function(e){for(var t=n(this),r=a(t.length),i=arguments.length,s=o(i>1?arguments[1]:void 0,r),c=i>2?arguments[2]:void 0,l=void 0===c?r:o(c,r);l>s;)t[s++]=e;return t}},function(e,t,r){"use strict";var n=r(66),o=r(264),a=r(98),i=r(33);e.exports=r(183)(Array,"Array",(function(e,t){this._t=i(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])}),"values"),a.Arguments=a.Array,n("keys"),n("values"),n("entries")},function(e,t,r){"use strict";var n,o,a=r(113),i=RegExp.prototype.exec,s=String.prototype.replace,c=i,l=(n=/a/,o=/b*/g,i.call(n,"a"),i.call(o,"a"),0!==n.lastIndex||0!==o.lastIndex),d=void 0!==/()??/.exec("")[1];(l||d)&&(c=function(e){var t,r,n,o,c=this;return d&&(r=new RegExp("^"+c.source+"$(?!\\s)",a.call(c))),l&&(t=c.lastIndex),n=i.call(c,e),l&&n&&(c.lastIndex=c.global?n.index+n[0].length:t),d&&n&&n.length>1&&s.call(n[0],r,(function(){for(o=1;or;)t.push(arguments[r++]);return b[++g]=function(){s("function"==typeof e?e:Function(e),t)},n(g),g},f=function(e){delete b[e]},"process"==r(45)(u)?n=function(e){u.nextTick(i(v,e,1))}:h&&h.now?n=function(e){h.now(i(v,e,1))}:m?(a=(o=new m).port2,o.port1.onmessage=y,n=i(a.postMessage,a,1)):d.addEventListener&&"function"==typeof postMessage&&!d.importScripts?(n=function(e){d.postMessage(e+"","*")},d.addEventListener("message",y,!1)):n="onreadystatechange"in l("script")?function(e){c.appendChild(l("script")).onreadystatechange=function(){c.removeChild(this),v.call(e)}}:function(e){setTimeout(i(v,e,1),0)}),e.exports={set:p,clear:f}},function(e,t,r){var n=r(8),o=r(195).set,a=n.MutationObserver||n.WebKitMutationObserver,i=n.process,s=n.Promise,c="process"==r(45)(i);e.exports=function(){var e,t,r,l=function(){var n,o;for(c&&(n=i.domain)&&n.exit();e;){o=e.fn,e=e.next;try{o()}catch(n){throw e?r():t=void 0,n}}t=void 0,n&&n.enter()};if(c)r=function(){i.nextTick(l)};else if(!a||n.navigator&&n.navigator.standalone)if(s&&s.resolve){var d=s.resolve(void 0);r=function(){d.then(l)}}else r=function(){o.call(n,l)};else{var u=!0,p=document.createTextNode("");new a(l).observe(p,{characterData:!0}),r=function(){p.data=u=!u}}return function(n){var o={fn:n,next:void 0};t&&(t.next=o),e||(e=o,r()),t=o}}},function(e,t,r){"use strict";var n=r(22);function o(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)}e.exports.f=function(e){return new o(e)}},function(e,t,r){"use strict";var n=r(8),o=r(17),a=r(64),i=r(137),s=r(27),c=r(81),l=r(10),d=r(79),u=r(46),p=r(16),f=r(274),m=r(77).f,h=r(20).f,g=r(191),b=r(95),v=n.ArrayBuffer,y=n.DataView,_=n.Math,w=n.RangeError,k=n.Infinity,x=v,M=_.abs,S=_.pow,E=_.floor,L=_.log,D=_.LN2,C=o?"_b":"buffer",O=o?"_l":"byteLength",T=o?"_o":"byteOffset";function j(e,t,r){var n,o,a,i=new Array(r),s=8*r-t-1,c=(1<>1,d=23===t?S(2,-24)-S(2,-77):0,u=0,p=e<0||0===e&&1/e<0?1:0;for((e=M(e))!=e||e===k?(o=e!=e?1:0,n=c):(n=E(L(e)/D),e*(a=S(2,-n))<1&&(n--,a*=2),(e+=n+l>=1?d/a:d*S(2,1-l))*a>=2&&(n++,a/=2),n+l>=c?(o=0,n=c):n+l>=1?(o=(e*a-1)*S(2,t),n+=l):(o=e*S(2,l-1)*S(2,t),n=0));t>=8;i[u++]=255&o,o/=256,t-=8);for(n=n<0;i[u++]=255&n,n/=256,s-=8);return i[--u]|=128*p,i}function A(e,t,r){var n,o=8*r-t-1,a=(1<>1,s=o-7,c=r-1,l=e[c--],d=127&l;for(l>>=7;s>0;d=256*d+e[c],c--,s-=8);for(n=d&(1<<-s)-1,d>>=-s,s+=t;s>0;n=256*n+e[c],c--,s-=8);if(0===d)d=1-i;else{if(d===a)return n?NaN:l?-k:k;n+=S(2,t),d-=i}return(l?-1:1)*n*S(2,d-t)}function N(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function P(e){return[255&e]}function I(e){return[255&e,e>>8&255]}function Y(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function z(e){return j(e,52,8)}function F(e){return j(e,23,4)}function R(e,t,r){h(e.prototype,t,{get:function(){return this[r]}})}function H(e,t,r,n){var o=f(+r);if(o+t>e[O])throw w("Wrong index!");var a=e[C]._b,i=o+e[T],s=a.slice(i,i+t);return n?s:s.reverse()}function B(e,t,r,n,o,a){var i=f(+r);if(i+t>e[O])throw w("Wrong index!");for(var s=e[C]._b,c=i+e[T],l=n(+o),d=0;dV;)(U=q[V++])in v||s(v,U,x[U]);a||(W.constructor=v)}var K=new y(new v(2)),G=y.prototype.setInt8;K.setInt8(0,2147483648),K.setInt8(1,2147483649),!K.getInt8(0)&&K.getInt8(1)||c(y.prototype,{setInt8:function(e,t){G.call(this,e,t<<24>>24)},setUint8:function(e,t){G.call(this,e,t<<24>>24)}},!0)}else v=function(e){d(this,v,"ArrayBuffer");var t=f(e);this._b=g.call(new Array(t),0),this[O]=t},y=function(e,t,r){d(this,y,"DataView"),d(e,v,"DataView");var n=e[O],o=u(t);if(o<0||o>n)throw w("Wrong offset!");if(o+(r=void 0===r?n-o:p(r))>n)throw w("Wrong length!");this[C]=e,this[T]=o,this[O]=r},o&&(R(v,"byteLength","_l"),R(y,"buffer","_b"),R(y,"byteLength","_l"),R(y,"byteOffset","_o")),c(y.prototype,{getInt8:function(e){return H(this,1,e)[0]<<24>>24},getUint8:function(e){return H(this,1,e)[0]},getInt16:function(e){var t=H(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=H(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return N(H(this,4,e,arguments[1]))},getUint32:function(e){return N(H(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return A(H(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return A(H(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){B(this,1,e,P,t)},setUint8:function(e,t){B(this,1,e,P,t)},setInt16:function(e,t){B(this,2,e,I,t,arguments[2])},setUint16:function(e,t){B(this,2,e,I,t,arguments[2])},setInt32:function(e,t){B(this,4,e,Y,t,arguments[2])},setUint32:function(e,t){B(this,4,e,Y,t,arguments[2])},setFloat32:function(e,t){B(this,4,e,F,t,arguments[2])},setFloat64:function(e,t){B(this,8,e,z,t,arguments[2])}});b(v,"ArrayBuffer"),b(y,"DataView"),s(y.prototype,i.VIEW,!0),t.ArrayBuffer=v,t.DataView=y},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){var n=r(720),o=r(116);e.exports=function e(t,r,a,i,s){return t===r||(null==t||null==r||!o(t)&&!o(r)?t!=t&&r!=r:n(t,r,a,i,e,s))}},function(e,t,r){var n=r(83)(r(61),"Map");e.exports=n},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,r){var n=r(737),o=r(744),a=r(746),i=r(747),s=r(748);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t,r){var n=r(62),o=r(207),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(i.test(e)||!a.test(e)||null!=t&&e in Object(t))}},function(e,t,r){var n=r(115),o=r(116);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},function(e,t,r){var n=r(101);e.exports=function(e,t){if(!n(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;if("function"==typeof(r=e.valueOf)&&!n(o=r.call(e)))return o;if(!t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){var n=r(212)("keys"),o=r(150);e.exports=function(e){return n[e]||(n[e]=o(e))}},function(e,t,r){var n=r(68),o=r(67),a=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:n.version,mode:r(149)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,r){var n=r(209);e.exports=function(e){return Object(n(e))}},function(e,t){e.exports={}},function(e,t,r){var n=r(117),o=r(834),a=r(213),i=r(211)("IE_PROTO"),s=function(){},c=function(){var e,t=r(433)("iframe"),n=a.length;for(t.style.display="none",r(835).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("