diff --git a/Anvil/Tools/Database.pm b/Anvil/Tools/Database.pm index f627a5fc..387b91bc 100644 --- a/Anvil/Tools/Database.pm +++ b/Anvil/Tools/Database.pm @@ -15691,6 +15691,16 @@ sub resync_databases return(0); } + # If we're not a striker, don't resync ever. + my $host_type = $anvil->Get->host_type(); + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { host_type => $host_type }}); + if ($host_type ne "striker") + { + # Not a dashboard, don't resync + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => $debug, key => "log_0686"}); + return(1); + } + # If we're hosting servers, don't resync. Too high of a risk of oom-killer being triggered. my $server_count = $anvil->Server->count_servers({debug => $debug}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { server_count => $server_count }}); @@ -15700,6 +15710,9 @@ sub resync_databases return(0); } + # Before resync, age out the data in each DB + $anvil->Database->_age_out_data({debug => $debug}); + ### NOTE: Don't sort this array, we need to resync in the order that the user passed the tables to us ### to avoid trouble with primary/foreign keys. # We're going to use the array of tables assembles by _find_behind_databases() stored in @@ -16726,7 +16739,7 @@ sub _age_out_data $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { table => $table }}); # Does the table exist? - $query = "SELECT COUNT(*) FROM pg_catalog.pg_tables WHERE tablename='scan_apc_pdus' AND schemaname='public';"; + $query = "SELECT COUNT(*) FROM pg_catalog.pg_tables WHERE tablename=".$anvil->Database->quote($table)." AND schemaname='public';"; $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { query => $query }}); my $count = $anvil->Database->query({query => $query, source => $THIS_FILE, line => __LINE__})->[0]->[0]; diff --git a/Anvil/Tools/ScanCore.pm b/Anvil/Tools/ScanCore.pm index 7e2d6600..1fe867b4 100644 --- a/Anvil/Tools/ScanCore.pm +++ b/Anvil/Tools/ScanCore.pm @@ -199,7 +199,7 @@ sub agent_startup if (($anvil->data->{scancore}{$agent}{disable}) && (not $anvil->data->{switches}{force})) { # Exit. - $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, 'print' => 1, key => "log_0646", variables => { program => $THIS_FILE }}); + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, 'print' => 1, key => "log_0646", variables => { program => $agent }}); $anvil->nice_exit({exit_code => 0}); } diff --git a/Anvil/Tools/System.pm b/Anvil/Tools/System.pm index e49e9db4..f4198021 100644 --- a/Anvil/Tools/System.pm +++ b/Anvil/Tools/System.pm @@ -654,6 +654,159 @@ sub check_memory } +=head2 check_ram_use + +This is meant to be used by daemons to check how much RAM it is using. It returns an anonymous array with the first value being C<< 0 >> if the in-use RAM is below the maximum, and C<< 1 >> it the in-use RAM is too high. The second value is the amount of RAM in use, in bytes. If the program is not found to be running, C<< 2, 0 >> is returned. + + my ($problem, $used_ram) = $anvil->System->check_ram_use({ + program => $THIS_FILE, + max_ram => 1073741824, + }); + +Parameters; + +=head3 program (required) + +This is generally C<< $THIS_FILE >>. Though this could be used to check the RAM use of other programs. + +=head3 max_ram (optional, default '1073741824' (1 GiB)) + +This is the limit allowed. If the in-use RAM is greater than this amount, an alert will be generated and sent. + +=cut +sub check_ram_use +{ + my $self = shift; + my $parameter = shift; + my $anvil = $self->parent; + my $debug = defined $parameter->{debug} ? $parameter->{debug} : 3; + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => $debug, key => "log_0125", variables => { method => "System->check_ram_use()" }}); + + my $program = defined $parameter->{program} ? $parameter->{program} : ""; + my $max_ram = defined $parameter->{max_ram} ? $parameter->{max_ram} : 1073741824; + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { + program => $program, + max_ram => $max_ram, + }}); + + # Find the PID(s) of the program. + my $problem = 0; + my $ram_used = 0; + + # See if we're a daemon running under systemctl. If so, the memory reported includes all spawned + # child programs, swap, etc. Much more thorough. + my $shell_call = $anvil->data->{path}{exe}{systemctl}." status ".$program." --lines=0"; + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { shell_call => $shell_call }}); + + my ($output, $return_code) = $anvil->System->call({debug => $debug, shell_call => $shell_call}); + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { + output => $output, + return_code => $return_code, + }}); + foreach my $line (split/\n/, $output) + { + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { line => $line }}); + if ($line =~ /Memory: (.*)?/) + { + my $memory = $1; + my $in_bytes = $anvil->Convert->human_readable_to_bytes({size => $memory, base2 => 1}); + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { + memory => $memory, + in_bytes => $anvil->Convert->add_commas({number => $in_bytes})." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $in_bytes}).")", + }}); + if ($in_bytes =~ /^\d+$/) + { + $ram_used = $in_bytes; + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { + ram_used => $anvil->Convert->add_commas({number => $ram_used})." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $ram_used}).")", + }}); + } + last; + } + } + + # If we didn't get the RAM from systemctl, read smaps + if (not $ram_used) + { + my $pids = $anvil->System->pids({debug => $debug, program_name => $program}); + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { pids => $pids }}); + + my $pids_found = @{$pids}; + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { pids_found => $pids_found }}); + + if (not $pids_found) + { + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, priority => "alert", key => "warning_0135", variables => { program => $program }}); + return(2, 0); + } + + # Read in the smaps for each pid + foreach my $pid (sort {$a cmp $b} @{$pids}) + { + my $smaps_path = "/proc/".$pid."/smaps"; + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { smaps_path => $smaps_path }}); + + # This will store the amount of RAM used by this specific PID. + $anvil->data->{memory}{pid}{$pid} = 0; + + if (not -e $smaps_path) + { + # It is possible that the program just closed. + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, key => "log_0433", variables => { pid => $pid }}); + next; + } + + # Read in the file. + my $body = $anvil->Storage->read_file({debug => $debug, file => $smaps_path}); + foreach my $line (split/\n/, $body) + { + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { line => $line }}); + if ($line =~ /^Private_Dirty:\s+(\d+) (.*B)$/) + { + my $size = $1; + my $type = $2; + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { + type => $type, + size => $size, + }}); + next if not $size; + next if $size =~ /\D/; + + # This uses 'kB' for 'KiB' >_> + $type = lc($type); + $type =~ s/b$/ib/ if $type !~ /ib$/; + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { type => $type }}); + + my $size_in_bytes = $anvil->Convert->human_readable_to_bytes({size => $size, type => $type, base2 => 1}); + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { + size_in_bytes => $anvil->Convert->add_commas({number => $size_in_bytes})." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $size_in_bytes}).")", + }}); + + $anvil->data->{memory}{pid}{$pid} += $size_in_bytes; + $ram_used += $size_in_bytes; + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { + "memory::pid::${pid}" => $anvil->Convert->add_commas({number => $anvil->data->{memory}{pid}{$pid}})." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $anvil->data->{memory}{pid}{$pid}}).")", + ram_used => $anvil->Convert->add_commas({number => $ram_used})." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $ram_used}).")", + }}); + } + } + } + } + + # Are we using too much RAM? + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { + max_ram => $anvil->Convert->add_commas({number => $max_ram})." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $max_ram}).")", + ram_used => $anvil->Convert->add_commas({number => $ram_used})." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $ram_used}).")", + }}); + if ($ram_used > $max_ram) + { + $problem = 1; + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { problem => $problem }}); + } + + return($problem, $ram_used); +} + =head2 check_ssh_keys This method does several things; diff --git a/cgi-bin/striker b/cgi-bin/striker index b3b77129..807767b2 100755 --- a/cgi-bin/striker +++ b/cgi-bin/striker @@ -6451,6 +6451,7 @@ sub process_power my $job_description = "job_0006"; my $say_title = "#!string!job_0005!#"; my $say_description = "#!string!job_0006!#"; + my $say_reason = "log_0199"; if ($task eq "poweroff") { $job_command = $anvil->data->{path}{exe}{'anvil-manage-power'}." --poweroff -y".$anvil->Log->switches; @@ -6458,7 +6459,9 @@ sub process_power $job_description = "job_0008"; $say_title = "#!string!job_0007!#"; $say_description = "#!string!job_0008!#"; + $say_reason = "log_0200"; } + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "log_0687", variables => { reason => $say_reason }}); my ($job_uuid) = $anvil->Database->insert_or_update_jobs({ file => $THIS_FILE, line => __LINE__, diff --git a/notes b/notes index 3d21efb0..85a9cc5a 100644 --- a/notes +++ b/notes @@ -771,10 +771,10 @@ mediawiki on EL8 install notes (starting from a minimal install); dnf module reset php dnf module enable php:7.4 -# PgSQL +# All dnf install httpd php php-gd php-xml php-mbstring php-json \ vim bash-completion wget tar rsync mlocate php-pecl-apcu \ - memcached php-pear icu php-intl php-pgsql bzip2 + memcached php-pear icu php-intl php-pgsql bzip2 mod_ssl ### PostgreSQL dnf install postgresql-server postgresql-plperl @@ -783,7 +783,9 @@ systemctl start postgresql.service systemctl enable postgresql.service ### MariaDB -dnf install php-mysqlnd php-gd php-xml mariadb-server mariadb +dnf install httpd php php-gd php-xml php-mbstring php-json \ + php-mysqlnd php-gd php-xml mariadb-server mariadb \ + systemctl start mariadb mysql_secure_installation |Set root password? [Y/n] y @@ -796,25 +798,25 @@ mysql_secure_installation |Reload privilege tables now? [Y/n] y mysql -u root -p ### In mariadb -MariaDB [(none)]> CREATE DATABASE digimer_wiki; -MariaDB [(none)]> CREATE USER 'digimer'@'localhost' IDENTIFIED BY 'Initial1'; -MariaDB [(none)]> GRANT ALL PRIVILEGES ON digimer_wiki.* TO 'digimer'@'localhost'; +MariaDB [(none)]> CREATE DATABASE an_wiki; +MariaDB [(none)]> CREATE USER 'alteeve'@'localhost' IDENTIFIED BY 'experience tell mineral'; +MariaDB [(none)]> GRANT ALL PRIVILEGES ON an_wiki.* TO 'alteeve'@'localhost'; MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> SHOW DATABASES; +--------------------+ | Database | +--------------------+ -| digimer_wiki | +| an_wiki | | information_schema | | mysql | | performance_schema | +--------------------+ -MariaDB [(none)]> SHOW GRANTS FOR 'digimer'@'localhost'; +MariaDB [(none)]> SHOW GRANTS FOR 'alteeve'@'localhost'; +----------------------------------------------------------------------------------------------------------------+ | Grants for digimer@localhost | +----------------------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO `digimer`@`localhost` IDENTIFIED BY PASSWORD '*xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | -| GRANT ALL PRIVILEGES ON `digimer_wiki`.* TO `digimer`@`localhost` | +| GRANT ALL PRIVILEGES ON `an_wiki`.* TO `digimer`@`localhost` | +----------------------------------------------------------------------------------------------------------------+ MariaDB [(none)]> exit # Back to terminal @@ -863,6 +865,38 @@ tar -xvzf mediawiki-1.37.1.tar.gz cd /var/www/html ln -s ../mediawiki-1.37.1 ./w +systemctl enable httpd.service +systemctl enable memcached.service +systemctl start httpd.service +systemctl start memcached.service + +firewall-cmd --zone=public --add-service=http --permanent +firewall-cmd --zone=public --add-service=https --permanent +firewall-cmd --reload + +### Certbot / Let's Encrypt +# EPEL / snapd +dnf config-manager --set-enabled powertools +dnf install epel-release epel-next-release +dnf install snapd +systemctl enable --now snapd.socket +ln -s /var/lib/snapd/snap /snap + +### Setup vhost +# httpd.conf + + +### Log out and back in to ensure snapd path +# If the next step fails with "too early for operation, device not yet seeded or device model not acknowledged", restart snapd +snap install core +snap refresh core +snap install --classic certbot + +# certbot +certbot --apache + +# answer questions + ==== Dell S4128T-ON Configuration @@ -1257,6 +1291,33 @@ rs-striker03(config-if)#switchport access vlan 100 rs-striker03(config-if)#no shutdown rs-striker03(config-if)#exit +#### NOTE: Put IP on VID 1! + +rs-switch03(config)#show vlan + +VLAN Name Ports Type +----- --------------- ------------- -------------- +1 default Po1-128, Default + Gi1/0/1-12, + Te1/0/1-4, + Gi2/0/1-12, + Te2/0/1-4 +300 IFN1 Gi1/0/13-24, Static + Gi2/0/13-24 + +rs-switch03(config)#interface vlan 1 + +rs-switch03(config-if-vlan1)#ip address 10.201.1.3 255.255.0.0 + +rs-switch03(config-if-vlan1)#exit + +rs-switch03(config)#exit + +rs-switch03#copy running-config startup-config + +########################### + + rs-striker03#show vlan diff --git a/scancore-agents/scan-network/scan-network b/scancore-agents/scan-network/scan-network index 77433a89..249db986 100755 --- a/scancore-agents/scan-network/scan-network +++ b/scancore-agents/scan-network/scan-network @@ -888,8 +888,8 @@ ORDER BY my $queries = []; push @{$queries}, "DELETE FROM history.network_interfaces WHERE network_interface_bridge_uuid = ".$anvil->Database->quote($bridge_uuid).";"; push @{$queries}, "DELETE FROM network_interfaces WHERE network_interface_bridge_uuid = ".$anvil->Database->quote($bridge_uuid).";"; - push @{$queries}, "DELETE FROM history.bondss WHERE bond_bridge_uuid = ".$anvil->Database->quote($bridge_uuid).";"; - push @{$queries}, "DELETE FROM bondss WHERE bond_bridge_uuid = ".$anvil->Database->quote($bridge_uuid).";"; + push @{$queries}, "DELETE FROM history.bonds WHERE bond_bridge_uuid = ".$anvil->Database->quote($bridge_uuid).";"; + push @{$queries}, "DELETE FROM bonds WHERE bond_bridge_uuid = ".$anvil->Database->quote($bridge_uuid).";"; push @{$queries}, "DELETE FROM history.bridges WHERE bridge_uuid = ".$anvil->Database->quote($bridge_uuid).";"; push @{$queries}, "DELETE FROM bridges WHERE bridge_uuid = ".$anvil->Database->quote($bridge_uuid).";"; @@ -920,8 +920,8 @@ ORDER BY my $queries = []; push @{$queries}, "DELETE FROM history.network_interfaces WHERE network_interface_bridge_uuid = ".$anvil->Database->quote($bridge_uuid).";"; push @{$queries}, "DELETE FROM network_interfaces WHERE network_interface_bridge_uuid = ".$anvil->Database->quote($bridge_uuid).";"; - push @{$queries}, "DELETE FROM history.bondss WHERE bond_bridge_uuid = ".$anvil->Database->quote($bridge_uuid).";"; - push @{$queries}, "DELETE FROM bondss WHERE bond_bridge_uuid = ".$anvil->Database->quote($bridge_uuid).";"; + push @{$queries}, "DELETE FROM history.bonds WHERE bond_bridge_uuid = ".$anvil->Database->quote($bridge_uuid).";"; + push @{$queries}, "DELETE FROM bonds WHERE bond_bridge_uuid = ".$anvil->Database->quote($bridge_uuid).";"; push @{$queries}, "DELETE FROM history.bridges WHERE bridge_uuid = ".$anvil->Database->quote($bridge_uuid).";"; push @{$queries}, "DELETE FROM bridges WHERE bridge_uuid = ".$anvil->Database->quote($bridge_uuid).";"; diff --git a/share/words.xml b/share/words.xml index e7c122e3..dcf027fa 100644 --- a/share/words.xml +++ b/share/words.xml @@ -502,6 +502,7 @@ The output, if any, was; Failed to load the database file: [#!variable!file!#]. Deleting it so it's not considered in the next load attempt. Failed to read the kernel release on the host: [#!variable!target!#]. The return code was: [#!variable!return_code!#] (expected '0') and the release output, if any, was: [#!variable!output!#]. + The program: [#!variable!program!#] is using: [#!variable!ram_used!#] (#!variable!ram_used_bytes!# Bytes). This is probably caused by a memory leak, so we will now exit so that systemctl can restart us. If this is happening repeatedly, please contact support. @@ -1522,8 +1523,8 @@ The database connection error was: Failed to reconnect to the database, and now no connections remail. Exiting. maintenance_mode() was passed an invalid 'set' value: [#!variable!set!#]. No action taken.]]> The user: [#!variable!user!#] logged out successfully. - A system reboot is required, setting the database flag. - A system reboot is required, setting the database flag. + A system reboot has been requested via the Striker UI. + A system power-off has been requested via the Striker UI. Unable to connect to any database. Will try to initialize the local system and then try again. Failed to connect to any databases. Skipping the loop of the daemon. Disconnected from all databases. Will reconnect when entering the main loop. @@ -2077,6 +2078,13 @@ The file: [#!variable!file!#] needs to be updated. The difference is: Enabling 'ping' for all users. The network interface: [#!variable!nic!#] on the host: [#!variable!host!#] is recorded in the 'history.network_interfaces' table, but has not corresponding entry in the public table. Removing it. [ Note ] - The network bridge: [#!variable!name!#] with 'bridge_uuid': [#!variable!uuid!#] is a duplicate, removing it from the database(s). + Skipping resync, not a Striker dashboard. + ### REBOOT REQUESTED ### - [#!variable!reason!#] + Reboot flag set by command line switch to 'anvil-manage-power'. + Poweroff flag set by command line switch to 'anvil-manage-power'. + Kernel updated, reboot queued. + Requested to power-off as part of the anvil-safe-stop job. + The anvil-safe-stop job has completed and will now power off. The host name: [#!variable!target!#] does not resolve to an IP address. @@ -3107,6 +3115,7 @@ We will sleep a bit and try again. [ Warning ] - Failed to build or install the DRBD kernel module! It is very unlikely that this machine will be able to run any servers until this is fixed. [ Warning ] - Table: [history.#!variable!table!#] not found. [ Warning ] - Holding off starting the cluster. Tested access to ourself, and failed. Is '/etc/hosts' populated? Will try again in ten seconds. + [ Warning ] - The program: [#!variable!program!#] was not found to be running. diff --git a/striker-ui/.eslintrc.json b/striker-ui/.eslintrc.json index 05e088ce..cc399a86 100644 --- a/striker-ui/.eslintrc.json +++ b/striker-ui/.eslintrc.json @@ -36,7 +36,7 @@ "sourceType": "module" }, "rules": { - "complexity": ["error", 5], + "complexity": ["error", 6], "import/extensions": [ "error", "ignorePackages", diff --git a/striker-ui/components/Display/FullSize.tsx b/striker-ui/components/Display/FullSize.tsx index 39f92c4c..d70fa6fb 100644 --- a/striker-ui/components/Display/FullSize.tsx +++ b/striker-ui/components/Display/FullSize.tsx @@ -66,7 +66,7 @@ const useStyles = makeStyles(() => ({ }, })); -interface PreviewProps { +interface FullSizeProps { setMode: Dispatch>; uuid: string; serverName: string | string[] | undefined; @@ -77,7 +77,11 @@ interface VncConnectionProps { forward_port: number; } -const FullSize = ({ setMode, uuid, serverName }: PreviewProps): JSX.Element => { +const FullSize = ({ + setMode, + uuid, + serverName, +}: FullSizeProps): JSX.Element => { const [anchorEl, setAnchorEl] = useState(null); const rfb = useRef(); const hostname = useRef(undefined); diff --git a/striker-ui/components/Display/Preview.tsx b/striker-ui/components/Display/Preview.tsx index 6167d7ac..3326e1e2 100644 --- a/striker-ui/components/Display/Preview.tsx +++ b/striker-ui/components/Display/Preview.tsx @@ -1,15 +1,16 @@ -import { Dispatch, SetStateAction } from 'react'; +import { Dispatch, SetStateAction, useEffect, useState } from 'react'; import { Box } from '@material-ui/core'; import { makeStyles } from '@material-ui/core/styles'; import IconButton from '@material-ui/core/IconButton'; import DesktopWindowsIcon from '@material-ui/icons/DesktopWindows'; -import CropOriginal from '@material-ui/icons/Image'; +import PowerOffOutlinedIcon from '@material-ui/icons/PowerOffOutlined'; import { Panel } from '../Panels'; import { BLACK, GREY, TEXT } from '../../lib/consts/DEFAULT_THEME'; import { HeaderText } from '../Text'; interface PreviewProps { setMode: Dispatch>; + uuid: string; serverName: string | string[] | undefined; } @@ -34,16 +35,42 @@ const useStyles = makeStyles(() => ({ padding: 0, color: TEXT, }, - imageIcon: { + powerOffIcon: { borderRadius: 8, padding: 0, - backgroundColor: GREY, - fontSize: '8em', + color: GREY, + width: '100%', + height: '100%', + }, + previewImage: { + width: '100%', + height: '100%', }, })); -const Preview = ({ setMode, serverName }: PreviewProps): JSX.Element => { +const Preview = ({ setMode, uuid, serverName }: PreviewProps): JSX.Element => { const classes = useStyles(); + const [preview, setPreview] = useState(); + + useEffect(() => { + (async () => { + try { + const res = await fetch( + `${process.env.NEXT_PUBLIC_API_URL}/get_server_screenshot?server_uuid=${uuid}`, + { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + }, + }, + ); + const { screenshot } = await res.json(); + setPreview(screenshot); + } catch { + setPreview(''); + } + })(); + }, [uuid]); return ( @@ -58,7 +85,16 @@ const Preview = ({ setMode, serverName }: PreviewProps): JSX.Element => { component="span" onClick={() => setMode(false)} > - + {!preview ? ( + + ) : ( + + )} diff --git a/striker-ui/components/Servers.tsx b/striker-ui/components/Servers.tsx index 4ffd8ee1..172bafc9 100644 --- a/striker-ui/components/Servers.tsx +++ b/striker-ui/components/Servers.tsx @@ -1,4 +1,4 @@ -import { useState, useContext } from 'react'; +import { useState, useContext, useRef } from 'react'; import { List, ListItem, @@ -74,17 +74,17 @@ const useStyles = makeStyles((theme) => ({ paddingTop: '.8em', }, menuItem: { - backgroundColor: TEXT, + backgroundColor: GREY, paddingRight: '3em', '&:hover': { - backgroundColor: TEXT, + backgroundColor: GREY, }, }, editButton: { borderRadius: 8, backgroundColor: GREY, '&:hover': { - backgroundColor: TEXT, + backgroundColor: GREY, }, }, editButtonBox: { @@ -124,13 +124,12 @@ const selectDecorator = (state: string): Colours => { type ButtonLabels = 'on' | 'off'; -const buttonLabels: ButtonLabels[] = ['on', 'off']; - const Servers = ({ anvil }: { anvil: AnvilListItem[] }): JSX.Element => { const [anchorEl, setAnchorEl] = useState(null); const [showCheckbox, setShowCheckbox] = useState(false); const [allSelected, setAllSelected] = useState(false); const [selected, setSelected] = useState([]); + const buttonLabels = useRef([]); const { uuid } = useContext(AnvilContext); const classes = useStyles(); @@ -138,6 +137,23 @@ const Servers = ({ anvil }: { anvil: AnvilListItem[] }): JSX.Element => { `${process.env.NEXT_PUBLIC_API_URL}/get_servers?anvil_uuid=${uuid}`, ); + const setButtons = (filtered: AnvilServer[]) => { + buttonLabels.current = []; + if ( + filtered.filter((item: AnvilServer) => item.server_state === 'running') + .length + ) { + buttonLabels.current.push('off'); + } + + if ( + filtered.filter((item: AnvilServer) => item.server_state === 'shut off') + .length + ) { + buttonLabels.current.push('on'); + } + }; + const handleClick = (event: React.MouseEvent): void => { setAnchorEl(event.currentTarget); }; @@ -158,6 +174,10 @@ const Servers = ({ anvil }: { anvil: AnvilListItem[] }): JSX.Element => { if (index === -1) selected.push(server_uuid); else selected.splice(index, 1); + const filtered = data.servers.filter( + (server: AnvilServer) => selected.indexOf(server.server_uuid) !== -1, + ); + setButtons(filtered); setSelected([...selected]); }; @@ -201,7 +221,7 @@ const Servers = ({ anvil }: { anvil: AnvilListItem[] }): JSX.Element => { open={Boolean(anchorEl)} onClose={() => setAnchorEl(null)} > - {buttonLabels.map((label: ButtonLabels) => { + {buttonLabels.current.map((label: ButtonLabels) => { return ( handlePower(label)} @@ -227,13 +247,17 @@ const Servers = ({ anvil }: { anvil: AnvilListItem[] }): JSX.Element => { color="secondary" checked={allSelected} onChange={() => { - if (!allSelected) + if (!allSelected) { + setButtons(data.servers); setSelected( data.servers.map( (server: AnvilServer) => server.server_uuid, ), ); - else setSelected([]); + } else { + setButtons([]); + setSelected([]); + } setAllSelected(!allSelected); }} @@ -248,84 +272,81 @@ const Servers = ({ anvil }: { anvil: AnvilListItem[] }): JSX.Element => { {!isLoading ? ( - {data && - data.servers.map((server: AnvilServer) => { - return ( - <> - - - {showCheckbox && ( - - s === server.server_uuid, - ) !== undefined - } - onChange={() => handleChange(server.server_uuid)} - /> - - )} - - - - - - { + return ( + <> + handleChange(server.server_uuid)} + > + + {showCheckbox && ( + + s === server.server_uuid) !== + undefined } /> - - {server.server_state !== 'shut off' && - server.server_state !== 'crashed' && - filteredHosts.map( - ( - host: AnvilStatusHost, - index: number, - ): JSX.Element => ( - <> - - - - {index !== filteredHosts.length - 1 && ( - - )} - - ), - )} - + )} + + + + + + + + + {server.server_state !== 'shut off' && + server.server_state !== 'crashed' && + filteredHosts.map( + ( + host: AnvilStatusHost, + index: number, + ): JSX.Element => ( + <> + + + + {index !== filteredHosts.length - 1 && ( + + )} + + ), + )} - - - - ); - })} + + + + + ); + })} ) : ( diff --git a/striker-ui/out/_next/static/Eh-RgpskHOnoW5C2jVLyg/_buildManifest.js b/striker-ui/out/_next/static/Eh-RgpskHOnoW5C2jVLyg/_buildManifest.js new file mode 100644 index 00000000..db6bbe14 --- /dev/null +++ b/striker-ui/out/_next/static/Eh-RgpskHOnoW5C2jVLyg/_buildManifest.js @@ -0,0 +1 @@ +self.__BUILD_MANIFEST=function(e){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[e,"static/chunks/346-7248b9c59d3df20dd85d.js","static/chunks/pages/index-bb493c5b52078039ce80.js"],"/_error":["static/chunks/pages/_error-737a04e9a0da63c9d162.js"],"/server":[e,"static/chunks/pages/server-e1f1621204ec662e510c.js"],sortedPages:["/","/_app","/_error","/server"]}}("static/chunks/322-e03452a20da601e702f9.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/striker-ui/out/_next/static/d6_dFUX65bR_cDhE06njm/_ssgManifest.js b/striker-ui/out/_next/static/Eh-RgpskHOnoW5C2jVLyg/_ssgManifest.js similarity index 100% rename from striker-ui/out/_next/static/d6_dFUX65bR_cDhE06njm/_ssgManifest.js rename to striker-ui/out/_next/static/Eh-RgpskHOnoW5C2jVLyg/_ssgManifest.js diff --git a/striker-ui/out/_next/static/chunks/322-62b7580738bef4310e6b.js b/striker-ui/out/_next/static/chunks/322-62b7580738bef4310e6b.js deleted file mode 100644 index 4b7c0abd..00000000 --- a/striker-ui/out/_next/static/chunks/322-62b7580738bef4310e6b.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[322],{5318:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},862:function(e,t,n){var r=n(8).default;function o(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var l=a?Object.getOwnPropertyDescriptor(e,s):null;l&&(l.get||l.set)?Object.defineProperty(i,s,l):i[s]=e[s]}return i.default=e,n&&n.set(e,i),i},e.exports.default=e.exports,e.exports.__esModule=!0},8:function(e){function t(n){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(e.exports=t=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},5258:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(3871),c=n(9895),u=i.forwardRef((function(e,t){var n=e.classes,s=e.className,u=e.color,d=void 0===u?"primary":u,p=e.position,f=void 0===p?"fixed":p,h=(0,o.Z)(e,["classes","className","color","position"]);return i.createElement(c.Z,(0,r.Z)({square:!0,component:"header",elevation:4,className:(0,a.Z)(n.root,n["position".concat((0,l.Z)(f))],n["color".concat((0,l.Z)(d))],s,"fixed"===f&&"mui-fixed"),ref:t},h))}));t.Z=(0,s.Z)((function(e){var t="light"===e.palette.type?e.palette.grey[100]:e.palette.grey[900];return{root:{display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",zIndex:e.zIndex.appBar,flexShrink:0},positionFixed:{position:"fixed",top:0,left:"auto",right:0,"@media print":{position:"absolute"}},positionAbsolute:{position:"absolute",top:0,left:"auto",right:0},positionSticky:{position:"sticky",top:0,left:"auto",right:0},positionStatic:{position:"static"},positionRelative:{position:"relative"},colorDefault:{backgroundColor:t,color:e.palette.getContrastText(t)},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorInherit:{color:"inherit"},colorTransparent:{backgroundColor:"transparent",color:"inherit"}}}),{name:"MuiAppBar"})(u)},9956:function(e,t,n){"use strict";n.d(t,{Z:function(){return V}});var r=n(6711),o=n(7462),i=(n(5697),n(9668));function a(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}function s(e){var t=function(t){var n=e(t);return t.css?(0,o.Z)({},(0,i.Z)(n,e((0,o.Z)({theme:t.theme},t.css))),a(t.css,[e.filterProps])):t.sx?(0,o.Z)({},(0,i.Z)(n,e((0,o.Z)({theme:t.theme},t.sx))),a(t.sx,[e.filterProps])):n};return t.propTypes={},t.filterProps=["css","sx"].concat((0,r.Z)(e.filterProps)),t}var l=s;var c=function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},i=r.name,a=(0,O.Z)(r,["name"]),s=i,l="function"===typeof t?function(e){return{root:function(n){return t((0,o.Z)({theme:e},n))}}}:{root:t},c=(0,j.Z)(l,(0,o.Z)({Component:e,name:i||e.displayName,classNamePrefix:s},a));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var u=I.forwardRef((function(t,r){var i=t.children,a=t.className,s=t.clone,l=t.component,u=(0,O.Z)(t,["children","className","clone","component"]),d=c(t),p=(0,z.Z)(d.root,a),f=u;if(n&&(f=F(f,n)),s)return I.cloneElement(i,(0,o.Z)({className:(0,z.Z)(i.props.className,p)},f));if("function"===typeof i)return i((0,o.Z)({className:p},f));var h=l||e;return I.createElement(h,(0,o.Z)({ref:r,className:p},f),i)}));return D()(u,e),u}}(e);return function(e,n){return t(e,(0,o.Z)({defaultTheme:L.Z},n))}},B=l(c(m,v,y,g,b,x,k,T,M.Z,N)),V=$("div")(B,{name:"MuiBox"})},282:function(e,t,n){"use strict";var r=n(5987),o=n(7462),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(9693),c=n(4720),u=n(3871),d=i.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,d=e.color,p=void 0===d?"default":d,f=e.component,h=void 0===f?"button":f,m=e.disabled,v=void 0!==m&&m,y=e.disableElevation,g=void 0!==y&&y,b=e.disableFocusRipple,x=void 0!==b&&b,k=e.endIcon,Z=e.focusVisibleClassName,E=e.fullWidth,S=void 0!==E&&E,w=e.size,C=void 0===w?"medium":w,R=e.startIcon,P=e.type,T=void 0===P?"button":P,N=e.variant,M=void 0===N?"text":N,O=(0,r.Z)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),I=R&&i.createElement("span",{className:(0,a.Z)(s.startIcon,s["iconSize".concat((0,u.Z)(C))])},R),z=k&&i.createElement("span",{className:(0,a.Z)(s.endIcon,s["iconSize".concat((0,u.Z)(C))])},k);return i.createElement(c.Z,(0,o.Z)({className:(0,a.Z)(s.root,s[M],l,"inherit"===p?s.colorInherit:"default"!==p&&s["".concat(M).concat((0,u.Z)(p))],"medium"!==C&&[s["".concat(M,"Size").concat((0,u.Z)(C))],s["size".concat((0,u.Z)(C))]],g&&s.disableElevation,v&&s.disabled,S&&s.fullWidth),component:h,disabled:v,focusRipple:!x,focusVisibleClassName:(0,a.Z)(s.focusVisible,Z),ref:t,type:T},O),i.createElement("span",{className:s.label},I,n,z))}));t.Z=(0,s.Z)((function(e){return{root:(0,o.Z)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:(0,l.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,l.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,l.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat((0,l.Fq)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:(0,l.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat((0,l.Fq)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:(0,l.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(d)},4720:function(e,t,n){"use strict";n.d(t,{Z:function(){return P}});var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(3935)),s=n(6010),l=n(3834),c=n(5192),u=n(4670),d=n(4896),p=n(6711),f=n(3366),h=n(7326),m=n(3629),v=n(220);function y(e,t){var n=Object.create(null);return e&&i.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,i.isValidElement)(e)?t(e):e}(e)})),n}function g(e,t,n){return null!=n[t]?n[t]:e.props[t]}function b(e,t,n){var r=y(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,o=void 0!==r&&r,i=t.center,s=void 0===i?a||t.pulsate:i,l=t.fakeElement,c=void 0!==l&&l;if("mousedown"===e.type&&y.current)y.current=!1;else{"touchstart"===e.type&&(y.current=!0);var u,d,p,f=c?null:x.current,h=f?f.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(h.width/2),d=Math.round(h.height/2);else{var m=e.touches?e.touches[0]:e,v=m.clientX,Z=m.clientY;u=Math.round(v-h.left),d=Math.round(Z-h.top)}if(s)(p=Math.sqrt((2*Math.pow(h.width,2)+Math.pow(h.height,2))/3))%2===0&&(p+=1);else{var E=2*Math.max(Math.abs((f?f.clientWidth:0)-u),u)+2,S=2*Math.max(Math.abs((f?f.clientHeight:0)-d),d)+2;p=Math.sqrt(Math.pow(E,2)+Math.pow(S,2))}e.touches?null===b.current&&(b.current=function(){k({pulsate:o,rippleX:u,rippleY:d,rippleSize:p,cb:n})},g.current=setTimeout((function(){b.current&&(b.current(),b.current=null)}),80)):k({pulsate:o,rippleX:u,rippleY:d,rippleSize:p,cb:n})}}),[a,k]),w=i.useCallback((function(){E({},{pulsate:!0})}),[E]),C=i.useCallback((function(e,t){if(clearTimeout(g.current),"touchend"===e.type&&b.current)return e.persist(),b.current(),b.current=null,void(g.current=setTimeout((function(){C(e,t)})));b.current=null,h((function(e){return e.length>0?e.slice(1):e})),v.current=t}),[]);return i.useImperativeHandle(t,(function(){return{pulsate:w,start:E,stop:C}}),[w,E,C]),i.createElement("span",(0,r.Z)({className:(0,s.Z)(l.root,c),ref:x},u),i.createElement(Z,{component:null,exit:!0},f))})),C=(0,u.Z)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(i.memo(w)),R=i.forwardRef((function(e,t){var n=e.action,u=e.buttonRef,p=e.centerRipple,f=void 0!==p&&p,h=e.children,m=e.classes,v=e.className,y=e.component,g=void 0===y?"button":y,b=e.disabled,x=void 0!==b&&b,k=e.disableRipple,Z=void 0!==k&&k,E=e.disableTouchRipple,S=void 0!==E&&E,w=e.focusRipple,R=void 0!==w&&w,P=e.focusVisibleClassName,T=e.onBlur,N=e.onClick,M=e.onFocus,O=e.onFocusVisible,I=e.onKeyDown,z=e.onKeyUp,A=e.onMouseDown,D=e.onMouseLeave,j=e.onMouseUp,F=e.onTouchEnd,L=e.onTouchMove,$=e.onTouchStart,B=e.onDragLeave,V=e.tabIndex,W=void 0===V?0:V,K=e.TouchRippleProps,_=e.type,H=void 0===_?"button":_,q=(0,o.Z)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),G=i.useRef(null);var U=i.useRef(null),X=i.useState(!1),Y=X[0],J=X[1];x&&Y&&J(!1);var Q=(0,d.Z)(),ee=Q.isFocusVisible,te=Q.onBlurVisible,ne=Q.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:S;return(0,c.Z)((function(r){return t&&t(r),!n&&U.current&&U.current[e](r),!0}))}i.useImperativeHandle(n,(function(){return{focusVisible:function(){J(!0),G.current.focus()}}}),[]),i.useEffect((function(){Y&&R&&!Z&&U.current.pulsate()}),[Z,R,Y]);var oe=re("start",A),ie=re("stop",B),ae=re("stop",j),se=re("stop",(function(e){Y&&e.preventDefault(),D&&D(e)})),le=re("start",$),ce=re("stop",F),ue=re("stop",L),de=re("stop",(function(e){Y&&(te(e),J(!1)),T&&T(e)}),!1),pe=(0,c.Z)((function(e){G.current||(G.current=e.currentTarget),ee(e)&&(J(!0),O&&O(e)),M&&M(e)})),fe=function(){var e=a.findDOMNode(G.current);return g&&"button"!==g&&!("A"===e.tagName&&e.href)},he=i.useRef(!1),me=(0,c.Z)((function(e){R&&!he.current&&Y&&U.current&&" "===e.key&&(he.current=!0,e.persist(),U.current.stop(e,(function(){U.current.start(e)}))),e.target===e.currentTarget&&fe()&&" "===e.key&&e.preventDefault(),I&&I(e),e.target===e.currentTarget&&fe()&&"Enter"===e.key&&!x&&(e.preventDefault(),N&&N(e))})),ve=(0,c.Z)((function(e){R&&" "===e.key&&U.current&&Y&&!e.defaultPrevented&&(he.current=!1,e.persist(),U.current.stop(e,(function(){U.current.pulsate(e)}))),z&&z(e),N&&e.target===e.currentTarget&&fe()&&" "===e.key&&!e.defaultPrevented&&N(e)})),ye=g;"button"===ye&&q.href&&(ye="a");var ge={};"button"===ye?(ge.type=H,ge.disabled=x):("a"===ye&&q.href||(ge.role="button"),ge["aria-disabled"]=x);var be=(0,l.Z)(u,t),xe=(0,l.Z)(ne,G),ke=(0,l.Z)(be,xe),Ze=i.useState(!1),Ee=Ze[0],Se=Ze[1];i.useEffect((function(){Se(!0)}),[]);var we=Ee&&!Z&&!x;return i.createElement(ye,(0,r.Z)({className:(0,s.Z)(m.root,v,Y&&[m.focusVisible,P],x&&m.disabled),onBlur:de,onClick:N,onFocus:pe,onKeyDown:me,onKeyUp:ve,onMouseDown:oe,onMouseLeave:se,onMouseUp:ae,onDragLeave:ie,onTouchEnd:ce,onTouchMove:ue,onTouchStart:le,ref:ke,tabIndex:x?-1:W},ge,q),h,we?i.createElement(C,(0,r.Z)({ref:U,center:f},K)):null)})),P=(0,u.Z)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(R)},5477:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(3871),c=44,u=i.forwardRef((function(e,t){var n=e.classes,s=e.className,u=e.color,d=void 0===u?"primary":u,p=e.disableShrink,f=void 0!==p&&p,h=e.size,m=void 0===h?40:h,v=e.style,y=e.thickness,g=void 0===y?3.6:y,b=e.value,x=void 0===b?0:b,k=e.variant,Z=void 0===k?"indeterminate":k,E=(0,o.Z)(e,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),S={},w={},C={};if("determinate"===Z||"static"===Z){var R=2*Math.PI*((c-g)/2);S.strokeDasharray=R.toFixed(3),C["aria-valuenow"]=Math.round(x),S.strokeDashoffset="".concat(((100-x)/100*R).toFixed(3),"px"),w.transform="rotate(-90deg)"}return i.createElement("div",(0,r.Z)({className:(0,a.Z)(n.root,s,"inherit"!==d&&n["color".concat((0,l.Z)(d))],{determinate:n.determinate,indeterminate:n.indeterminate,static:n.static}[Z]),style:(0,r.Z)({width:m,height:m},w,v),ref:t,role:"progressbar"},C,E),i.createElement("svg",{className:n.svg,viewBox:"".concat(22," ").concat(22," ").concat(c," ").concat(c)},i.createElement("circle",{className:(0,a.Z)(n.circle,f&&n.circleDisableShrink,{determinate:n.circleDeterminate,indeterminate:n.circleIndeterminate,static:n.circleStatic}[Z]),style:S,cx:c,cy:c,r:(c-g)/2,fill:"none",strokeWidth:g})))}));t.Z=(0,s.Z)((function(e){return{root:{display:"inline-block"},static:{transition:e.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},determinate:{transition:e.transitions.create("transform")},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:e.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},circleDeterminate:{transition:e.transitions.create("stroke-dashoffset")},"@keyframes circular-rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}}),{name:"MuiCircularProgress",flip:!1})(u)},5517:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(9693),c=i.forwardRef((function(e,t){var n=e.absolute,s=void 0!==n&&n,l=e.classes,c=e.className,u=e.component,d=void 0===u?"hr":u,p=e.flexItem,f=void 0!==p&&p,h=e.light,m=void 0!==h&&h,v=e.orientation,y=void 0===v?"horizontal":v,g=e.role,b=void 0===g?"hr"!==d?"separator":void 0:g,x=e.variant,k=void 0===x?"fullWidth":x,Z=(0,o.Z)(e,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return i.createElement(d,(0,r.Z)({className:(0,a.Z)(l.root,c,"fullWidth"!==k&&l[k],s&&l.absolute,f&&l.flexItem,m&&l.light,"vertical"===y&&l.vertical),role:b,ref:t},Z))}));t.Z=(0,s.Z)((function(e){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:e.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:(0,l.Fq)(e.palette.divider,.08)},middle:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},vertical:{height:"100%",width:1},flexItem:{alignSelf:"stretch",height:"auto"}}}),{name:"MuiDivider"})(c)},7159:function(e,t,n){"use strict";n.d(t,{ZP:function(){return N}});var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(2146),l=n(4670),c=n(731),u=n(2666),d=n(3291),p=n(8920),f=n(5653),h=n(3834),m={entering:{opacity:1},entered:{opacity:1}},v={enter:d.x9.enteringScreen,exit:d.x9.leavingScreen},y=i.forwardRef((function(e,t){var n=e.children,a=e.disableStrictModeCompat,s=void 0!==a&&a,l=e.in,d=e.onEnter,y=e.onEntered,g=e.onEntering,b=e.onExit,x=e.onExited,k=e.onExiting,Z=e.style,E=e.TransitionComponent,S=void 0===E?u.ZP:E,w=e.timeout,C=void 0===w?v:w,R=(0,o.Z)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),P=(0,p.Z)(),T=P.unstable_strictMode&&!s,N=i.useRef(null),M=(0,h.Z)(n.ref,t),O=(0,h.Z)(T?N:void 0,M),I=function(e){return function(t,n){if(e){var r=T?[N.current,t]:[t,n],o=(0,c.Z)(r,2),i=o[0],a=o[1];void 0===a?e(i):e(i,a)}}},z=I(g),A=I((function(e,t){(0,f.n)(e);var n=(0,f.C)({style:Z,timeout:C},{mode:"enter"});e.style.webkitTransition=P.transitions.create("opacity",n),e.style.transition=P.transitions.create("opacity",n),d&&d(e,t)})),D=I(y),j=I(k),F=I((function(e){var t=(0,f.C)({style:Z,timeout:C},{mode:"exit"});e.style.webkitTransition=P.transitions.create("opacity",t),e.style.transition=P.transitions.create("opacity",t),b&&b(e)})),L=I(x);return i.createElement(S,(0,r.Z)({appear:!0,in:l,nodeRef:T?N:void 0,onEnter:A,onEntered:D,onEntering:z,onExit:F,onExited:L,onExiting:j,timeout:C},R),(function(e,t){return i.cloneElement(n,(0,r.Z)({style:(0,r.Z)({opacity:0,visibility:"exited"!==e||l?void 0:"hidden"},m[e],Z,n.props.style),ref:O},t))}))})),g=i.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,c=e.invisible,u=void 0!==c&&c,d=e.open,p=e.transitionDuration,f=e.TransitionComponent,h=void 0===f?y:f,m=(0,o.Z)(e,["children","classes","className","invisible","open","transitionDuration","TransitionComponent"]);return i.createElement(h,(0,r.Z)({in:d,timeout:p},m),i.createElement("div",{className:(0,a.Z)(s.root,l,u&&s.invisible),"aria-hidden":!0,ref:t},n))})),b=(0,l.Z)({root:{zIndex:-1,position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},{name:"MuiBackdrop"})(g),x=n(3935),k=n(9437);function Z(e,t){var n=function(e,t){var n,r=t.getBoundingClientRect();if(t.fakeTransform)n=t.fakeTransform;else{var o=window.getComputedStyle(t);n=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var i=0,a=0;if(n&&"none"!==n&&"string"===typeof n){var s=n.split("(")[1].split(")")[0].split(",");i=parseInt(s[4],10),a=parseInt(s[5],10)}return"left"===e?"translateX(".concat(window.innerWidth,"px) translateX(").concat(i-r.left,"px)"):"right"===e?"translateX(-".concat(r.left+r.width-i,"px)"):"up"===e?"translateY(".concat(window.innerHeight,"px) translateY(").concat(a-r.top,"px)"):"translateY(-".concat(r.top+r.height-a,"px)")}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}var E={enter:d.x9.enteringScreen,exit:d.x9.leavingScreen},S=i.forwardRef((function(e,t){var n=e.children,a=e.direction,s=void 0===a?"down":a,l=e.in,c=e.onEnter,d=e.onEntered,m=e.onEntering,v=e.onExit,y=e.onExited,g=e.onExiting,b=e.style,S=e.timeout,w=void 0===S?E:S,C=e.TransitionComponent,R=void 0===C?u.ZP:C,P=(0,o.Z)(e,["children","direction","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),T=(0,p.Z)(),N=i.useRef(null),M=i.useCallback((function(e){N.current=x.findDOMNode(e)}),[]),O=(0,h.Z)(n.ref,M),I=(0,h.Z)(O,t),z=function(e){return function(t){e&&(void 0===t?e(N.current):e(N.current,t))}},A=z((function(e,t){Z(s,e),(0,f.n)(e),c&&c(e,t)})),D=z((function(e,t){var n=(0,f.C)({timeout:w,style:b},{mode:"enter"});e.style.webkitTransition=T.transitions.create("-webkit-transform",(0,r.Z)({},n,{easing:T.transitions.easing.easeOut})),e.style.transition=T.transitions.create("transform",(0,r.Z)({},n,{easing:T.transitions.easing.easeOut})),e.style.webkitTransform="none",e.style.transform="none",m&&m(e,t)})),j=z(d),F=z(g),L=z((function(e){var t=(0,f.C)({timeout:w,style:b},{mode:"exit"});e.style.webkitTransition=T.transitions.create("-webkit-transform",(0,r.Z)({},t,{easing:T.transitions.easing.sharp})),e.style.transition=T.transitions.create("transform",(0,r.Z)({},t,{easing:T.transitions.easing.sharp})),Z(s,e),v&&v(e)})),$=z((function(e){e.style.webkitTransition="",e.style.transition="",y&&y(e)})),B=i.useCallback((function(){N.current&&Z(s,N.current)}),[s]);return i.useEffect((function(){if(!l&&"down"!==s&&"right"!==s){var e=(0,k.Z)((function(){N.current&&Z(s,N.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[s,l]),i.useEffect((function(){l||B()}),[l,B]),i.createElement(R,(0,r.Z)({nodeRef:N,onEnter:A,onEntered:j,onEntering:D,onExit:L,onExited:$,onExiting:F,appear:!0,in:l,timeout:w},P),(function(e,t){return i.cloneElement(n,(0,r.Z)({ref:I,style:(0,r.Z)({visibility:"exited"!==e||l?void 0:"hidden"},b,n.props.style)},t))}))})),w=n(9895),C=n(3871),R={left:"right",right:"left",top:"down",bottom:"up"};var P={enter:d.x9.enteringScreen,exit:d.x9.leavingScreen},T=i.forwardRef((function(e,t){var n=e.anchor,l=void 0===n?"left":n,c=e.BackdropProps,u=e.children,d=e.classes,f=e.className,h=e.elevation,m=void 0===h?16:h,v=e.ModalProps,y=(v=void 0===v?{}:v).BackdropProps,g=(0,o.Z)(v,["BackdropProps"]),x=e.onClose,k=e.open,Z=void 0!==k&&k,E=e.PaperProps,T=void 0===E?{}:E,N=e.SlideProps,M=e.TransitionComponent,O=void 0===M?S:M,I=e.transitionDuration,z=void 0===I?P:I,A=e.variant,D=void 0===A?"temporary":A,j=(0,o.Z)(e,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"]),F=(0,p.Z)(),L=i.useRef(!1);i.useEffect((function(){L.current=!0}),[]);var $=function(e,t){return"rtl"===e.direction&&function(e){return-1!==["left","right"].indexOf(e)}(t)?R[t]:t}(F,l),B=i.createElement(w.Z,(0,r.Z)({elevation:"temporary"===D?m:0,square:!0},T,{className:(0,a.Z)(d.paper,d["paperAnchor".concat((0,C.Z)($))],T.className,"temporary"!==D&&d["paperAnchorDocked".concat((0,C.Z)($))])}),u);if("permanent"===D)return i.createElement("div",(0,r.Z)({className:(0,a.Z)(d.root,d.docked,f),ref:t},j),B);var V=i.createElement(O,(0,r.Z)({in:Z,direction:R[$],timeout:z,appear:L.current},N),B);return"persistent"===D?i.createElement("div",(0,r.Z)({className:(0,a.Z)(d.root,d.docked,f),ref:t},j),V):i.createElement(s.Z,(0,r.Z)({BackdropProps:(0,r.Z)({},c,y,{transitionDuration:z}),BackdropComponent:b,className:(0,a.Z)(d.root,d.modal,f),open:Z,onClose:x,ref:t},j,g),V)})),N=(0,l.Z)((function(e){return{root:{},docked:{flex:"0 0 auto"},paper:{overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:e.zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},paperAnchorLeft:{left:0,right:"auto"},paperAnchorRight:{left:"auto",right:0},paperAnchorTop:{top:0,left:0,bottom:"auto",right:0,height:"auto",maxHeight:"100%"},paperAnchorBottom:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},paperAnchorDockedLeft:{borderRight:"1px solid ".concat(e.palette.divider)},paperAnchorDockedTop:{borderBottom:"1px solid ".concat(e.palette.divider)},paperAnchorDockedRight:{borderLeft:"1px solid ".concat(e.palette.divider)},paperAnchorDockedBottom:{borderTop:"1px solid ".concat(e.palette.divider)},modal:{}}}),{name:"MuiDrawer",flip:!1})(T)},7812:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(9693),c=n(4720),u=n(3871),d=i.forwardRef((function(e,t){var n=e.edge,s=void 0!==n&&n,l=e.children,d=e.classes,p=e.className,f=e.color,h=void 0===f?"default":f,m=e.disabled,v=void 0!==m&&m,y=e.disableFocusRipple,g=void 0!==y&&y,b=e.size,x=void 0===b?"medium":b,k=(0,o.Z)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return i.createElement(c.Z,(0,r.Z)({className:(0,a.Z)(d.root,p,"default"!==h&&d["color".concat((0,u.Z)(h))],v&&d.disabled,"small"===x&&d["size".concat((0,u.Z)(x))],{start:d.edgeStart,end:d.edgeEnd}[s]),centerRipple:!0,focusRipple:!g,disabled:v,ref:t},k),i.createElement("span",{className:d.label},l))}));t.Z=(0,s.Z)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:(0,l.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,l.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,l.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(d)},2822:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(6987),c=i.forwardRef((function(e,t){var n=e.children,s=e.classes,c=e.className,u=e.component,d=void 0===u?"ul":u,p=e.dense,f=void 0!==p&&p,h=e.disablePadding,m=void 0!==h&&h,v=e.subheader,y=(0,o.Z)(e,["children","classes","className","component","dense","disablePadding","subheader"]),g=i.useMemo((function(){return{dense:f}}),[f]);return i.createElement(l.Z.Provider,{value:g},i.createElement(d,(0,r.Z)({className:(0,a.Z)(s.root,c,f&&s.dense,!m&&s.padding,v&&s.subheader),ref:t},y),v,n))}));t.Z=(0,s.Z)({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(c)},6987:function(e,t,n){"use strict";var r=n(7294).createContext({});t.Z=r},998:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(4720),c=n(3711),u=n(3834),d=n(6987),p=n(3935),f="undefined"===typeof window?i.useEffect:i.useLayoutEffect,h=i.forwardRef((function(e,t){var n=e.alignItems,s=void 0===n?"center":n,h=e.autoFocus,m=void 0!==h&&h,v=e.button,y=void 0!==v&&v,g=e.children,b=e.classes,x=e.className,k=e.component,Z=e.ContainerComponent,E=void 0===Z?"li":Z,S=e.ContainerProps,w=(S=void 0===S?{}:S).className,C=(0,o.Z)(S,["className"]),R=e.dense,P=void 0!==R&&R,T=e.disabled,N=void 0!==T&&T,M=e.disableGutters,O=void 0!==M&&M,I=e.divider,z=void 0!==I&&I,A=e.focusVisibleClassName,D=e.selected,j=void 0!==D&&D,F=(0,o.Z)(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),L=i.useContext(d.Z),$={dense:P||L.dense||!1,alignItems:s},B=i.useRef(null);f((function(){m&&B.current&&B.current.focus()}),[m]);var V=i.Children.toArray(g),W=V.length&&(0,c.Z)(V[V.length-1],["ListItemSecondaryAction"]),K=i.useCallback((function(e){B.current=p.findDOMNode(e)}),[]),_=(0,u.Z)(K,t),H=(0,r.Z)({className:(0,a.Z)(b.root,x,$.dense&&b.dense,!O&&b.gutters,z&&b.divider,N&&b.disabled,y&&b.button,"center"!==s&&b.alignItemsFlexStart,W&&b.secondaryAction,j&&b.selected),disabled:N},F),q=k||"li";return y&&(H.component=k||"div",H.focusVisibleClassName=(0,a.Z)(b.focusVisible,A),q=l.Z),W?(q=H.component||k?q:"div","li"===E&&("li"===q?q="div":"li"===H.component&&(H.component="div")),i.createElement(d.Z.Provider,{value:$},i.createElement(E,(0,r.Z)({className:(0,a.Z)(b.container,w),ref:_},C),i.createElement(q,H,V),V.pop()))):i.createElement(d.Z.Provider,{value:$},i.createElement(q,(0,r.Z)({ref:_},H),V))}));t.Z=(0,s.Z)((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(h)},5675:function(e,t,n){"use strict";n.d(t,{Z:function(){return V}});var r=n(7462),o=n(5987),i=n(7294),a=(n(9864),n(5697),n(6010)),s=n(4670),l=n(3935),c=n(9437),u=n(626),d=n(713),p=n(2568),f=n(2146),h=n(731),m=n(2666),v=n(8920),y=n(5653),g=n(3834);function b(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var x={entering:{opacity:1,transform:b(1)},entered:{opacity:1,transform:"none"}},k=i.forwardRef((function(e,t){var n=e.children,a=e.disableStrictModeCompat,s=void 0!==a&&a,l=e.in,c=e.onEnter,u=e.onEntered,d=e.onEntering,p=e.onExit,f=e.onExited,k=e.onExiting,Z=e.style,E=e.timeout,S=void 0===E?"auto":E,w=e.TransitionComponent,C=void 0===w?m.ZP:w,R=(0,o.Z)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),P=i.useRef(),T=i.useRef(),N=(0,v.Z)(),M=N.unstable_strictMode&&!s,O=i.useRef(null),I=(0,g.Z)(n.ref,t),z=(0,g.Z)(M?O:void 0,I),A=function(e){return function(t,n){if(e){var r=M?[O.current,t]:[t,n],o=(0,h.Z)(r,2),i=o[0],a=o[1];void 0===a?e(i):e(i,a)}}},D=A(d),j=A((function(e,t){(0,y.n)(e);var n,r=(0,y.C)({style:Z,timeout:S},{mode:"enter"}),o=r.duration,i=r.delay;"auto"===S?(n=N.transitions.getAutoHeightDuration(e.clientHeight),T.current=n):n=o,e.style.transition=[N.transitions.create("opacity",{duration:n,delay:i}),N.transitions.create("transform",{duration:.666*n,delay:i})].join(","),c&&c(e,t)})),F=A(u),L=A(k),$=A((function(e){var t,n=(0,y.C)({style:Z,timeout:S},{mode:"exit"}),r=n.duration,o=n.delay;"auto"===S?(t=N.transitions.getAutoHeightDuration(e.clientHeight),T.current=t):t=r,e.style.transition=[N.transitions.create("opacity",{duration:t,delay:o}),N.transitions.create("transform",{duration:.666*t,delay:o||.333*t})].join(","),e.style.opacity="0",e.style.transform=b(.75),p&&p(e)})),B=A(f);return i.useEffect((function(){return function(){clearTimeout(P.current)}}),[]),i.createElement(C,(0,r.Z)({appear:!0,in:l,nodeRef:M?O:void 0,onEnter:j,onEntered:F,onEntering:D,onExit:$,onExited:B,onExiting:L,addEndListener:function(e,t){var n=M?e:t;"auto"===S&&(P.current=setTimeout(n,T.current||0))},timeout:"auto"===S?null:S},R),(function(e,t){return i.cloneElement(n,(0,r.Z)({style:(0,r.Z)({opacity:0,transform:b(.75),visibility:"exited"!==e||l?void 0:"hidden"},x[e],Z,n.props.style),ref:z},t))}))}));k.muiSupportAuto=!0;var Z=k,E=n(9895);function S(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function w(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function C(e){return[e.horizontal,e.vertical].map((function(e){return"number"===typeof e?"".concat(e,"px"):e})).join(" ")}function R(e){return"function"===typeof e?e():e}var P=i.forwardRef((function(e,t){var n=e.action,s=e.anchorEl,h=e.anchorOrigin,m=void 0===h?{vertical:"top",horizontal:"left"}:h,v=e.anchorPosition,y=e.anchorReference,g=void 0===y?"anchorEl":y,b=e.children,x=e.classes,k=e.className,P=e.container,T=e.elevation,N=void 0===T?8:T,M=e.getContentAnchorEl,O=e.marginThreshold,I=void 0===O?16:O,z=e.onEnter,A=e.onEntered,D=e.onEntering,j=e.onExit,F=e.onExited,L=e.onExiting,$=e.open,B=e.PaperProps,V=void 0===B?{}:B,W=e.transformOrigin,K=void 0===W?{vertical:"top",horizontal:"left"}:W,_=e.TransitionComponent,H=void 0===_?Z:_,q=e.transitionDuration,G=void 0===q?"auto":q,U=e.TransitionProps,X=void 0===U?{}:U,Y=(0,o.Z)(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),J=i.useRef(),Q=i.useCallback((function(e){if("anchorPosition"===g)return v;var t=R(s),n=(t&&1===t.nodeType?t:(0,u.Z)(J.current).body).getBoundingClientRect(),r=0===e?m.vertical:"center";return{top:n.top+S(n,r),left:n.left+w(n,m.horizontal)}}),[s,m.horizontal,m.vertical,v,g]),ee=i.useCallback((function(e){var t=0;if(M&&"anchorEl"===g){var n=M(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}0}return t}),[m.vertical,g,M]),te=i.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:S(e,K.vertical)+t,horizontal:w(e,K.horizontal)}}),[K.horizontal,K.vertical]),ne=i.useCallback((function(e){var t=ee(e),n={width:e.offsetWidth,height:e.offsetHeight},r=te(n,t);if("none"===g)return{top:null,left:null,transformOrigin:C(r)};var o=Q(t),i=o.top-r.vertical,a=o.left-r.horizontal,l=i+n.height,c=a+n.width,u=(0,d.Z)(R(s)),p=u.innerHeight-I,f=u.innerWidth-I;if(ip){var m=l-p;i-=m,r.vertical+=m}if(af){var y=c-f;a-=y,r.horizontal+=y}return{top:"".concat(Math.round(i),"px"),left:"".concat(Math.round(a),"px"),transformOrigin:C(r)}}),[s,g,Q,ee,te,I]),re=i.useCallback((function(){var e=J.current;if(e){var t=ne(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[ne]),oe=i.useCallback((function(e){J.current=l.findDOMNode(e)}),[]);i.useEffect((function(){$&&re()})),i.useImperativeHandle(n,(function(){return $?{updatePosition:function(){re()}}:null}),[$,re]),i.useEffect((function(){if($){var e=(0,c.Z)((function(){re()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[$,re]);var ie=G;"auto"!==G||H.muiSupportAuto||(ie=void 0);var ae=P||(s?(0,u.Z)(R(s)).body:void 0);return i.createElement(f.Z,(0,r.Z)({container:ae,open:$,ref:t,BackdropProps:{invisible:!0},className:(0,a.Z)(x.root,k)},Y),i.createElement(H,(0,r.Z)({appear:!0,in:$,onEnter:z,onEntered:A,onExit:j,onExited:F,onExiting:L,timeout:ie},X,{onEntering:(0,p.Z)((function(e,t){D&&D(e,t),re()}),X.onEntering)}),i.createElement(E.Z,(0,r.Z)({elevation:N,ref:oe},V,{className:(0,a.Z)(x.paper,V.className)}),b)))})),T=(0,s.Z)({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(P),N=n(2822),M=n(5840);function O(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function I(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function z(e,t){if(void 0===t)return!0;var n=e.innerText;return void 0===n&&(n=e.textContent),0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function A(e,t,n,r,o,i){for(var a=!1,s=o(e,t,!!t&&n);s;){if(s===e.firstChild){if(a)return;a=!0}var l=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&z(s,i)&&!l)return void s.focus();s=o(e,s,n)}}var D="undefined"===typeof window?i.useEffect:i.useLayoutEffect,j=i.forwardRef((function(e,t){var n=e.actions,a=e.autoFocus,s=void 0!==a&&a,c=e.autoFocusItem,d=void 0!==c&&c,p=e.children,f=e.className,h=e.disabledItemsFocusable,m=void 0!==h&&h,v=e.disableListWrap,y=void 0!==v&&v,b=e.onKeyDown,x=e.variant,k=void 0===x?"selectedMenu":x,Z=(0,o.Z)(e,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),E=i.useRef(null),S=i.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});D((function(){s&&E.current.focus()}),[s]),i.useImperativeHandle(n,(function(){return{adjustStyleForScrollbar:function(e,t){var n=!E.current.style.width;if(e.clientHeight0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);var s=r&&!o.repeating&&z(r,o);o.previousKeyMatched&&(s||A(t,r,!1,m,O,o))?e.preventDefault():o.previousKeyMatched=!1}b&&b(e)},tabIndex:s?0:-1},Z),P)})),F=n(4236),L={vertical:"top",horizontal:"right"},$={vertical:"top",horizontal:"left"},B=i.forwardRef((function(e,t){var n=e.autoFocus,s=void 0===n||n,c=e.children,u=e.classes,d=e.disableAutoFocusItem,p=void 0!==d&&d,f=e.MenuListProps,h=void 0===f?{}:f,m=e.onClose,y=e.onEntering,g=e.open,b=e.PaperProps,x=void 0===b?{}:b,k=e.PopoverClasses,Z=e.transitionDuration,E=void 0===Z?"auto":Z,S=e.TransitionProps,w=(S=void 0===S?{}:S).onEntering,C=(0,o.Z)(S,["onEntering"]),R=e.variant,P=void 0===R?"selectedMenu":R,N=(0,o.Z)(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"]),M=(0,v.Z)(),O=s&&!p&&g,I=i.useRef(null),z=i.useRef(null),A=-1;i.Children.map(c,(function(e,t){i.isValidElement(e)&&(e.props.disabled||("menu"!==P&&e.props.selected||-1===A)&&(A=t))}));var D=i.Children.map(c,(function(e,t){return t===A?i.cloneElement(e,{ref:function(t){z.current=l.findDOMNode(t),(0,F.Z)(e.ref,t)}}):e}));return i.createElement(T,(0,r.Z)({getContentAnchorEl:function(){return z.current},classes:k,onClose:m,TransitionProps:(0,r.Z)({onEntering:function(e,t){I.current&&I.current.adjustStyleForScrollbar(e,M),y&&y(e,t),w&&w(e,t)}},C),anchorOrigin:"rtl"===M.direction?L:$,transformOrigin:"rtl"===M.direction?L:$,PaperProps:(0,r.Z)({},x,{classes:(0,r.Z)({},x.classes,{root:u.paper})}),open:g,ref:t,transitionDuration:E},N),i.createElement(j,(0,r.Z)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),m&&m(e,"tabKeyDown"))},actions:I,autoFocus:s&&(-1===A||p),autoFocusItem:O,variant:P},h,{className:(0,a.Z)(u.list,h.className)}),D))})),V=(0,s.Z)({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(B)},5639:function(e,t,n){"use strict";var r=n(5987),o=n(4942),i=n(7462),a=n(7294),s=(n(5697),n(6010)),l=n(4670),c=n(998),u=a.forwardRef((function(e,t){var n,o=e.classes,l=e.className,u=e.component,d=void 0===u?"li":u,p=e.disableGutters,f=void 0!==p&&p,h=e.ListItemClasses,m=e.role,v=void 0===m?"menuitem":m,y=e.selected,g=e.tabIndex,b=(0,r.Z)(e,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]);return e.disabled||(n=void 0!==g?g:-1),a.createElement(c.Z,(0,i.Z)({button:!0,role:v,tabIndex:n,component:d,selected:y,disableGutters:f,classes:(0,i.Z)({dense:o.dense},h),className:(0,s.Z)(o.root,l,y&&o.selected,!f&&o.gutters),ref:t},b))}));t.Z=(0,l.Z)((function(e){return{root:(0,i.Z)({},e.typography.body1,(0,o.Z)({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},e.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:(0,i.Z)({},e.typography.body2,{minHeight:"auto"})}}),{name:"MuiMenuItem"})(u)},2146:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var r=n(5987),o=n(7462),i=n(7294),a=n(3935),s=(n(5697),n(159)),l=n(3869),c=n(626),u=n(4236),d=n(3834);var p="undefined"!==typeof window?i.useLayoutEffect:i.useEffect;var f=i.forwardRef((function(e,t){var n=e.children,r=e.container,o=e.disablePortal,s=void 0!==o&&o,l=e.onRendered,c=i.useState(null),f=c[0],h=c[1],m=(0,d.Z)(i.isValidElement(n)?n.ref:null,t);return p((function(){s||h(function(e){return e="function"===typeof e?e():e,a.findDOMNode(e)}(r)||document.body)}),[r,s]),p((function(){if(f&&!s)return(0,u.Z)(t,f),function(){(0,u.Z)(t,null)}}),[t,f,s]),p((function(){l&&(f||s)&&l()}),[l,f,s]),s?i.isValidElement(n)?i.cloneElement(n,{ref:m}):n:f?a.createPortal(n,f):f})),h=n(2568),m=n(5192),v=n(2781);var y=n(3144),g=n(6711),b=n(5840),x=n(713);function k(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Z(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function E(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0,i=[t,n].concat((0,g.Z)(r)),a=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===a.indexOf(e.tagName)&&k(e,o)}))}function S(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function w(e,t){var n,r=[],o=[],i=e.container;if(!t.disableScrollLock){if(function(e){var t=(0,c.Z)(e);return t.body===e?(0,x.Z)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(i)){var a=(0,b.Z)();r.push({value:i.style.paddingRight,key:"padding-right",el:i}),i.style["padding-right"]="".concat(Z(i)+a,"px"),n=(0,c.Z)(i).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){o.push(e.style.paddingRight),e.style.paddingRight="".concat(Z(e)+a,"px")}))}var s=i.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:i;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){o[t]?e.style.paddingRight=o[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var C=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return(0,y.Z)(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&k(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);E(t,e.mountNode,e.modalRef,r,!0);var o=S(this.containers,(function(e){return e.container===t}));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=S(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=w(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=S(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&k(e.modalRef,!0),E(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var o=r.modals[r.modals.length-1];o.modalRef&&k(o.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();var R=function(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,o=e.disableEnforceFocus,s=void 0!==o&&o,l=e.disableRestoreFocus,u=void 0!==l&&l,p=e.getDoc,f=e.isEnabled,h=e.open,m=i.useRef(),v=i.useRef(null),y=i.useRef(null),g=i.useRef(),b=i.useRef(null),x=i.useCallback((function(e){b.current=a.findDOMNode(e)}),[]),k=(0,d.Z)(t.ref,x),Z=i.useRef();return i.useEffect((function(){Z.current=h}),[h]),!Z.current&&h&&"undefined"!==typeof window&&(g.current=p().activeElement),i.useEffect((function(){if(h){var e=(0,c.Z)(b.current);r||!b.current||b.current.contains(e.activeElement)||(b.current.hasAttribute("tabIndex")||b.current.setAttribute("tabIndex",-1),b.current.focus());var t=function(){null!==b.current&&(e.hasFocus()&&!s&&f()&&!m.current?b.current&&!b.current.contains(e.activeElement)&&b.current.focus():m.current=!1)},n=function(t){!s&&f()&&9===t.keyCode&&e.activeElement===b.current&&(m.current=!0,t.shiftKey?y.current.focus():v.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var o=setInterval((function(){t()}),50);return function(){clearInterval(o),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),u||(g.current&&g.current.focus&&g.current.focus(),g.current=null)}}}),[r,s,u,f,h]),i.createElement(i.Fragment,null,i.createElement("div",{tabIndex:0,ref:v,"data-test":"sentinelStart"}),i.cloneElement(t,{ref:k}),i.createElement("div",{tabIndex:0,ref:y,"data-test":"sentinelEnd"}))},P={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},T=i.forwardRef((function(e,t){var n=e.invisible,a=void 0!==n&&n,s=e.open,l=(0,r.Z)(e,["invisible","open"]);return s?i.createElement("div",(0,o.Z)({"aria-hidden":!0,ref:t},l,{style:(0,o.Z)({},P.root,a?P.invisible:{},l.style)})):null}));var N=new C,M=i.forwardRef((function(e,t){var n=(0,s.Z)(),u=(0,l.Z)({name:"MuiModal",props:(0,o.Z)({},e),theme:n}),p=u.BackdropComponent,y=void 0===p?T:p,g=u.BackdropProps,b=u.children,x=u.closeAfterTransition,Z=void 0!==x&&x,E=u.container,S=u.disableAutoFocus,w=void 0!==S&&S,C=u.disableBackdropClick,P=void 0!==C&&C,M=u.disableEnforceFocus,O=void 0!==M&&M,I=u.disableEscapeKeyDown,z=void 0!==I&&I,A=u.disablePortal,D=void 0!==A&&A,j=u.disableRestoreFocus,F=void 0!==j&&j,L=u.disableScrollLock,$=void 0!==L&&L,B=u.hideBackdrop,V=void 0!==B&&B,W=u.keepMounted,K=void 0!==W&&W,_=u.manager,H=void 0===_?N:_,q=u.onBackdropClick,G=u.onClose,U=u.onEscapeKeyDown,X=u.onRendered,Y=u.open,J=(0,r.Z)(u,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),Q=i.useState(!0),ee=Q[0],te=Q[1],ne=i.useRef({}),re=i.useRef(null),oe=i.useRef(null),ie=(0,d.Z)(oe,t),ae=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(u),se=function(){return(0,c.Z)(re.current)},le=function(){return ne.current.modalRef=oe.current,ne.current.mountNode=re.current,ne.current},ce=function(){H.mount(le(),{disableScrollLock:$}),oe.current.scrollTop=0},ue=(0,m.Z)((function(){var e=function(e){return e="function"===typeof e?e():e,a.findDOMNode(e)}(E)||se().body;H.add(le(),e),oe.current&&ce()})),de=i.useCallback((function(){return H.isTopModal(le())}),[H]),pe=(0,m.Z)((function(e){re.current=e,e&&(X&&X(),Y&&de()?ce():k(oe.current,!0))})),fe=i.useCallback((function(){H.remove(le())}),[H]);if(i.useEffect((function(){return function(){fe()}}),[fe]),i.useEffect((function(){Y?ue():ae&&Z||fe()}),[Y,fe,ae,Z,ue]),!K&&!Y&&(!ae||ee))return null;var he=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:v.Z}),me={};return void 0===b.props.tabIndex&&(me.tabIndex=b.props.tabIndex||"-1"),ae&&(me.onEnter=(0,h.Z)((function(){te(!1)}),b.props.onEnter),me.onExited=(0,h.Z)((function(){te(!0),Z&&fe()}),b.props.onExited)),i.createElement(f,{ref:pe,container:E,disablePortal:D},i.createElement("div",(0,o.Z)({ref:ie,onKeyDown:function(e){"Escape"===e.key&&de()&&(U&&U(e),z||(e.stopPropagation(),G&&G(e,"escapeKeyDown")))},role:"presentation"},J,{style:(0,o.Z)({},he.root,!Y&&ee?he.hidden:{},J.style)}),V?null:i.createElement(y,(0,o.Z)({open:Y,onClick:function(e){e.target===e.currentTarget&&(q&&q(e),!P&&G&&G(e,"backdropClick"))}},g)),i.createElement(R,{disableEnforceFocus:O,disableAutoFocus:w,disableRestoreFocus:F,getDoc:se,isEnabled:de,open:Y},i.cloneElement(b,me))))}))},9895:function(e,t,n){"use strict";var r=n(5987),o=n(7462),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=i.forwardRef((function(e,t){var n=e.classes,s=e.className,l=e.component,c=void 0===l?"div":l,u=e.square,d=void 0!==u&&u,p=e.elevation,f=void 0===p?1:p,h=e.variant,m=void 0===h?"elevation":h,v=(0,r.Z)(e,["classes","className","component","square","elevation","variant"]);return i.createElement(c,(0,o.Z)({className:(0,a.Z)(n.root,s,"outlined"===m?n.outlined:n["elevation".concat(f)],!d&&n.rounded),ref:t},v))}));t.Z=(0,s.Z)((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),(0,o.Z)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(l)},2318:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(3871),c={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},u=i.forwardRef((function(e,t){var n=e.align,s=void 0===n?"inherit":n,u=e.classes,d=e.className,p=e.color,f=void 0===p?"initial":p,h=e.component,m=e.display,v=void 0===m?"initial":m,y=e.gutterBottom,g=void 0!==y&&y,b=e.noWrap,x=void 0!==b&&b,k=e.paragraph,Z=void 0!==k&&k,E=e.variant,S=void 0===E?"body1":E,w=e.variantMapping,C=void 0===w?c:w,R=(0,o.Z)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),P=h||(Z?"p":C[S]||c[S])||"span";return i.createElement(P,(0,r.Z)({className:(0,a.Z)(u.root,d,"inherit"!==S&&u[S],"initial"!==f&&u["color".concat((0,l.Z)(f))],x&&u.noWrap,g&&u.gutterBottom,Z&&u.paragraph,"inherit"!==s&&u["align".concat((0,l.Z)(s))],"initial"!==v&&u["display".concat((0,l.Z)(v))]),ref:t},R))}));t.Z=(0,s.Z)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(u)},7623:function(e,t,n){"use strict";function r(e){return e}n.d(t,{Z:function(){return r}})},9700:function(e,t,n){"use strict";var r=(0,n(7850).Z)();t.Z=r},1120:function(e,t,n){"use strict";var r=n(7462),o=n(3746),i=n(9700);t.Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o.Z)(e,(0,r.Z)({defaultTheme:i.Z},t))}},8920:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(159),o=(n(7294),n(9700));function i(){return(0,r.Z)()||o.Z}},4670:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(8679)),s=n.n(a),l=n(3746),c=n(3869),u=n(159),d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var a=t.defaultTheme,d=t.withTheme,p=void 0!==d&&d,f=t.name,h=(0,o.Z)(t,["defaultTheme","withTheme","name"]);var m=f,v=(0,l.Z)(e,(0,r.Z)({defaultTheme:a,Component:n,name:f||n.displayName,classNamePrefix:m},h)),y=i.forwardRef((function(e,t){e.classes;var s,l=e.innerRef,d=(0,o.Z)(e,["classes","innerRef"]),h=v((0,r.Z)({},n.defaultProps,e)),m=d;return("string"===typeof f||p)&&(s=(0,u.Z)()||a,f&&(m=(0,c.Z)({theme:s,name:f,props:d})),p&&!m.theme&&(m.theme=s)),i.createElement(n,(0,r.Z)({ref:l||t,classes:h},m))}));return s()(y,n),y}},p=n(9700);var f=function(e,t){return d(e,(0,r.Z)({defaultTheme:p.Z},t))}},5653:function(e,t,n){"use strict";n.d(t,{n:function(){return r},C:function(){return o}});var r=function(e){return e.scrollTop};function o(e,t){var n=e.timeout,r=e.style,o=void 0===r?{}:r;return{duration:o.transitionDuration||"number"===typeof n?n:n[t.mode]||0,delay:o.transitionDelay}}},3871:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(288);function o(e){if("string"!==typeof e)throw new Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},2568:function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),i=0;i<+~=|^:(),"'`\s])/g,x="undefined"!==typeof CSS&&CSS.escape,k=function(e){return x?x(e):e.replace(b,"\\$1")},Z=function(){function e(e,t,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,o=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:o&&(this.renderer=new o)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var o=t;n&&!1===n.process||(o=this.options.jss.plugins.onChangeValue(t,e,this));var i=null==o||!1===o,a=e in this.style;if(i&&!a&&!r)return this;var s=i&&a;if(s?delete this.style[e]:this.style[e]=o,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,o),this;var l=this.options.sheet;return l&&l.attached,this},e}(),E=function(e){function t(t,n,r){var o;(o=e.call(this,t,n,r)||this).selectorText=void 0,o.id=void 0,o.renderable=void 0;var i=r.selector,a=r.scoped,s=r.sheet,l=r.generateId;return i?o.selectorText=i:!1!==a&&(o.id=l((0,u.Z)((0,u.Z)(o)),s),o.selectorText="."+k(o.id)),o}(0,c.Z)(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==typeof n?e[t]=n:Array.isArray(n)&&(e[t]=v(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?(0,o.Z)({},e,{allowEmpty:!0}):e;return g(this.selectorText,this.style,n)},(0,l.Z)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(Z),S={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new E(e,t,n)}},w={indent:1,children:!0},C=/@([\w-]+)/,R=function(){function e(e,t,n){this.type="conditional",this.at=void 0,this.key=void 0,this.query=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e;var r=e.match(C);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new X((0,o.Z)({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){if(void 0===e&&(e=w),null==e.indent&&(e.indent=w.indent),null==e.children&&(e.children=w.children),!1===e.children)return this.query+" {}";var t=this.rules.toString(e);return t?this.query+" {\n"+t+"\n}":""},e}(),P=/@media|@supports\s+/,T={onCreateRule:function(e,t,n){return P.test(e)?new R(e,t,n):null}},N={indent:1,children:!0},M=/@keyframes\s+([\w-]+)/,O=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var r=e.match(M);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,a=n.sheet,s=n.generateId;for(var l in this.id=!1===i?this.name:k(s(this,a)),this.rules=new X((0,o.Z)({},n,{parent:this})),t)this.rules.add(l,t[l],(0,o.Z)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=N),null==e.indent&&(e.indent=N.indent),null==e.children&&(e.children=N.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),I=/@keyframes\s+/,z=/\$([\w-]+)/g,A=function(e,t){return"string"===typeof e?e.replace(z,(function(e,n){return n in t?t[n]:e})):e},D=function(e,t,n){var r=e[t],o=A(r,n);o!==r&&(e[t]=o)},j={onCreateRule:function(e,t,n){return"string"===typeof e&&I.test(e)?new O(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&D(e,"animation-name",n.keyframes),"animation"in e&&D(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return A(e,r.keyframes);default:return e}}},F=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o=this.index)t.push(e);else for(var r=0;rn)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=(0,d.Z)(t,["attached"]),o="",i=0;i0){var n=function(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var o=function(e){for(var t=ce(),n=0;nn?n:t},he=function(){function e(e){this.getPropertyValue=ie,this.setProperty=ae,this.removeProperty=se,this.setSelector=le,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,this.cssRules=[],e&&Q.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,o=t.element;this.element=o||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var i=de();i&&this.element.setAttribute("nonce",i)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=ue(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling)}else ce().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var r=(0,o.Z)({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}var ke={set:function(e,t,n,r){var o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}},Ze=n(159),Ee=(n(5697),n(7076)),Se=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var we=Date.now(),Ce="fnValues"+we,Re="fnStyle"+ ++we,Pe=function(){return{onCreateRule:function(e,t,n){if("function"!==typeof t)return null;var r=h(e,{},n);return r[Re]=t,r},onProcessStyle:function(e,t){if(Ce in t||Re in t)return e;var n={};for(var r in e){var o=e[r];"function"===typeof o&&(delete e[r],n[r]=o)}return t[Ce]=n,e},onUpdate:function(e,t,n,r){var o=t,i=o[Re];i&&(o.style=i(e)||{});var a=o[Ce];if(a)for(var s in a)o.prop(s,a[s](e),r)}}},Te="@global",Ne="@global ",Me=function(){function e(e,t,n){for(var r in this.type="global",this.at=Te,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new X((0,o.Z)({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),Oe=function(){function e(e,t,n){this.type="global",this.at=Te,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=n;var r=e.substr(Ne.length);this.rule=n.jss.createRule(r,t,(0,o.Z)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),Ie=/\s*,\s*/g;function ze(e,t){for(var n=e.split(Ie),r="",o=0;o-1){var o=At[e];if(!Array.isArray(o))return ct+bt(o)in t&&ut+o;if(!r)return!1;for(var i=0;it?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},o=Object.keys(t).sort(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,o=void 0===r?"jss":r,i=e.seed,a=void 0===i?"":i,s=""===a?"":"".concat(a,"-"),l=0,c=function(){return l+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==Se.indexOf(e.key))return"Mui-".concat(e.key);var i="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[Ee.Z]&&""===a?"".concat(i,"-").concat(c()):i}return"".concat(s).concat(o).concat(c())}}(),jss:Qt,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},tn=i.createContext(en);var nn=-1e9;function rn(){return nn+=1}var on=n(5953);function an(e){var t="function"===typeof e;return{create:function(n,r){var i;try{i=t?e(n):e}catch(l){throw l}if(!r||!n.overrides||!n.overrides[r])return i;var a=n.overrides[r],s=(0,o.Z)({},i);return Object.keys(a).forEach((function(e){s[e]=(0,on.Z)(s[e],a[e])})),s},options:{}}}var sn={};function ln(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,o=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,o=!0),o&&(r.cacheClasses.value=xe({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function cn(e,t){var n=e.state,r=e.theme,i=e.stylesOptions,a=e.stylesCreator,s=e.name;if(!i.disableGeneration){var l=ke.get(i.sheetsManager,a,r);l||(l={refs:0,staticSheet:null,dynamicStyles:null},ke.set(i.sheetsManager,a,r,l));var c=(0,o.Z)({},a.options,i,{theme:r,flip:"boolean"===typeof i.flip?i.flip:"rtl"===r.direction});c.generateId=c.serverGenerateClassName||c.generateClassName;var u=i.sheetsRegistry;if(0===l.refs){var d;i.sheetsCache&&(d=ke.get(i.sheetsCache,a,r));var p=a.create(r,s);d||((d=i.jss.createStyleSheet(p,(0,o.Z)({link:!1},c))).attach(),i.sheetsCache&&ke.set(i.sheetsCache,a,r,d)),u&&u.add(d),l.staticSheet=d,l.dynamicStyles=ye(p)}if(l.dynamicStyles){var f=i.jss.createStyleSheet(l.dynamicStyles,(0,o.Z)({link:!0},c));f.update(t),f.attach(),n.dynamicSheet=f,n.classes=xe({baseClasses:l.staticSheet.classes,newClasses:f.classes}),u&&u.add(f)}else n.classes=l.staticSheet.classes;l.refs+=1}}function un(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function dn(e){var t=e.state,n=e.theme,r=e.stylesOptions,o=e.stylesCreator;if(!r.disableGeneration){var i=ke.get(r.sheetsManager,o,n);i.refs-=1;var a=r.sheetsRegistry;0===i.refs&&(ke.delete(r.sheetsManager,o,n),r.jss.removeStyleSheet(i.staticSheet),a&&a.remove(i.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}function pn(e,t){var n,r=i.useRef([]),o=i.useMemo((function(){return{}}),t);r.current!==o&&(r.current=o,n=e()),i.useEffect((function(){return function(){n&&n()}}),[o])}function fn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,a=t.classNamePrefix,s=t.Component,l=t.defaultTheme,c=void 0===l?sn:l,u=(0,r.Z)(t,["name","classNamePrefix","Component","defaultTheme"]),d=an(e),p=n||a||"makeStyles";d.options={index:rn(),name:n,meta:p,classNamePrefix:p};var f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,Ze.Z)()||c,r=(0,o.Z)({},i.useContext(tn),u),a=i.useRef(),l=i.useRef();pn((function(){var o={name:n,state:{},stylesCreator:d,stylesOptions:r,theme:t};return cn(o,e),l.current=!1,a.current=o,function(){dn(o)}}),[t,d]),i.useEffect((function(){l.current&&un(a.current,e),l.current=!0}));var p=ln(a.current,e.classes,s);return p};return f}},6010:function(e,t,n){"use strict";function r(e){var t,n,o="";if("string"===typeof e||"number"===typeof e)o+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t1&&void 0!==arguments[1]?arguments[1]:{},i=r.name,a=(0,O.Z)(r,["name"]),s=i,l="function"===typeof t?function(e){return{root:function(n){return t((0,o.Z)({theme:e},n))}}}:{root:t},c=(0,j.Z)(l,(0,o.Z)({Component:e,name:i||e.displayName,classNamePrefix:s},a));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var u=I.forwardRef((function(t,r){var i=t.children,a=t.className,s=t.clone,l=t.component,u=(0,O.Z)(t,["children","className","clone","component"]),d=c(t),p=(0,z.Z)(d.root,a),f=u;if(n&&(f=F(f,n)),s)return I.cloneElement(i,(0,o.Z)({className:(0,z.Z)(i.props.className,p)},f));if("function"===typeof i)return i((0,o.Z)({className:p},f));var h=l||e;return I.createElement(h,(0,o.Z)({ref:r,className:p},f),i)}));return D()(u,e),u}}(e);return function(e,n){return t(e,(0,o.Z)({defaultTheme:L.Z},n))}},B=l(c(m,v,y,g,b,x,k,T,M.Z,N)),V=$("div")(B,{name:"MuiBox"})},282:function(e,t,n){"use strict";var r=n(5987),o=n(7462),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(9693),c=n(4720),u=n(3871),d=i.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,d=e.color,p=void 0===d?"default":d,f=e.component,h=void 0===f?"button":f,m=e.disabled,v=void 0!==m&&m,y=e.disableElevation,g=void 0!==y&&y,b=e.disableFocusRipple,x=void 0!==b&&b,k=e.endIcon,Z=e.focusVisibleClassName,E=e.fullWidth,w=void 0!==E&&E,S=e.size,C=void 0===S?"medium":S,R=e.startIcon,P=e.type,T=void 0===P?"button":P,N=e.variant,M=void 0===N?"text":N,O=(0,r.Z)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),I=R&&i.createElement("span",{className:(0,a.Z)(s.startIcon,s["iconSize".concat((0,u.Z)(C))])},R),z=k&&i.createElement("span",{className:(0,a.Z)(s.endIcon,s["iconSize".concat((0,u.Z)(C))])},k);return i.createElement(c.Z,(0,o.Z)({className:(0,a.Z)(s.root,s[M],l,"inherit"===p?s.colorInherit:"default"!==p&&s["".concat(M).concat((0,u.Z)(p))],"medium"!==C&&[s["".concat(M,"Size").concat((0,u.Z)(C))],s["size".concat((0,u.Z)(C))]],g&&s.disableElevation,v&&s.disabled,w&&s.fullWidth),component:h,disabled:v,focusRipple:!x,focusVisibleClassName:(0,a.Z)(s.focusVisible,Z),ref:t,type:T},O),i.createElement("span",{className:s.label},I,n,z))}));t.Z=(0,s.Z)((function(e){return{root:(0,o.Z)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:(0,l.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,l.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,l.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat((0,l.Fq)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:(0,l.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat((0,l.Fq)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:(0,l.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(d)},4720:function(e,t,n){"use strict";n.d(t,{Z:function(){return P}});var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(3935)),s=n(6010),l=n(3834),c=n(5192),u=n(4670),d=n(4896),p=n(2982),f=n(3366),h=n(7326),m=n(1721),v=n(220);function y(e,t){var n=Object.create(null);return e&&i.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,i.isValidElement)(e)?t(e):e}(e)})),n}function g(e,t,n){return null!=n[t]?n[t]:e.props[t]}function b(e,t,n){var r=y(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,o=void 0!==r&&r,i=t.center,s=void 0===i?a||t.pulsate:i,l=t.fakeElement,c=void 0!==l&&l;if("mousedown"===e.type&&y.current)y.current=!1;else{"touchstart"===e.type&&(y.current=!0);var u,d,p,f=c?null:x.current,h=f?f.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(h.width/2),d=Math.round(h.height/2);else{var m=e.touches?e.touches[0]:e,v=m.clientX,Z=m.clientY;u=Math.round(v-h.left),d=Math.round(Z-h.top)}if(s)(p=Math.sqrt((2*Math.pow(h.width,2)+Math.pow(h.height,2))/3))%2===0&&(p+=1);else{var E=2*Math.max(Math.abs((f?f.clientWidth:0)-u),u)+2,w=2*Math.max(Math.abs((f?f.clientHeight:0)-d),d)+2;p=Math.sqrt(Math.pow(E,2)+Math.pow(w,2))}e.touches?null===b.current&&(b.current=function(){k({pulsate:o,rippleX:u,rippleY:d,rippleSize:p,cb:n})},g.current=setTimeout((function(){b.current&&(b.current(),b.current=null)}),80)):k({pulsate:o,rippleX:u,rippleY:d,rippleSize:p,cb:n})}}),[a,k]),S=i.useCallback((function(){E({},{pulsate:!0})}),[E]),C=i.useCallback((function(e,t){if(clearTimeout(g.current),"touchend"===e.type&&b.current)return e.persist(),b.current(),b.current=null,void(g.current=setTimeout((function(){C(e,t)})));b.current=null,h((function(e){return e.length>0?e.slice(1):e})),v.current=t}),[]);return i.useImperativeHandle(t,(function(){return{pulsate:S,start:E,stop:C}}),[S,E,C]),i.createElement("span",(0,r.Z)({className:(0,s.Z)(l.root,c),ref:x},u),i.createElement(Z,{component:null,exit:!0},f))})),C=(0,u.Z)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(i.memo(S)),R=i.forwardRef((function(e,t){var n=e.action,u=e.buttonRef,p=e.centerRipple,f=void 0!==p&&p,h=e.children,m=e.classes,v=e.className,y=e.component,g=void 0===y?"button":y,b=e.disabled,x=void 0!==b&&b,k=e.disableRipple,Z=void 0!==k&&k,E=e.disableTouchRipple,w=void 0!==E&&E,S=e.focusRipple,R=void 0!==S&&S,P=e.focusVisibleClassName,T=e.onBlur,N=e.onClick,M=e.onFocus,O=e.onFocusVisible,I=e.onKeyDown,z=e.onKeyUp,A=e.onMouseDown,D=e.onMouseLeave,j=e.onMouseUp,F=e.onTouchEnd,L=e.onTouchMove,$=e.onTouchStart,B=e.onDragLeave,V=e.tabIndex,W=void 0===V?0:V,K=e.TouchRippleProps,H=e.type,q=void 0===H?"button":H,_=(0,o.Z)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),G=i.useRef(null);var U=i.useRef(null),X=i.useState(!1),Y=X[0],J=X[1];x&&Y&&J(!1);var Q=(0,d.Z)(),ee=Q.isFocusVisible,te=Q.onBlurVisible,ne=Q.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w;return(0,c.Z)((function(r){return t&&t(r),!n&&U.current&&U.current[e](r),!0}))}i.useImperativeHandle(n,(function(){return{focusVisible:function(){J(!0),G.current.focus()}}}),[]),i.useEffect((function(){Y&&R&&!Z&&U.current.pulsate()}),[Z,R,Y]);var oe=re("start",A),ie=re("stop",B),ae=re("stop",j),se=re("stop",(function(e){Y&&e.preventDefault(),D&&D(e)})),le=re("start",$),ce=re("stop",F),ue=re("stop",L),de=re("stop",(function(e){Y&&(te(e),J(!1)),T&&T(e)}),!1),pe=(0,c.Z)((function(e){G.current||(G.current=e.currentTarget),ee(e)&&(J(!0),O&&O(e)),M&&M(e)})),fe=function(){var e=a.findDOMNode(G.current);return g&&"button"!==g&&!("A"===e.tagName&&e.href)},he=i.useRef(!1),me=(0,c.Z)((function(e){R&&!he.current&&Y&&U.current&&" "===e.key&&(he.current=!0,e.persist(),U.current.stop(e,(function(){U.current.start(e)}))),e.target===e.currentTarget&&fe()&&" "===e.key&&e.preventDefault(),I&&I(e),e.target===e.currentTarget&&fe()&&"Enter"===e.key&&!x&&(e.preventDefault(),N&&N(e))})),ve=(0,c.Z)((function(e){R&&" "===e.key&&U.current&&Y&&!e.defaultPrevented&&(he.current=!1,e.persist(),U.current.stop(e,(function(){U.current.pulsate(e)}))),z&&z(e),N&&e.target===e.currentTarget&&fe()&&" "===e.key&&!e.defaultPrevented&&N(e)})),ye=g;"button"===ye&&_.href&&(ye="a");var ge={};"button"===ye?(ge.type=q,ge.disabled=x):("a"===ye&&_.href||(ge.role="button"),ge["aria-disabled"]=x);var be=(0,l.Z)(u,t),xe=(0,l.Z)(ne,G),ke=(0,l.Z)(be,xe),Ze=i.useState(!1),Ee=Ze[0],we=Ze[1];i.useEffect((function(){we(!0)}),[]);var Se=Ee&&!Z&&!x;return i.createElement(ye,(0,r.Z)({className:(0,s.Z)(m.root,v,Y&&[m.focusVisible,P],x&&m.disabled),onBlur:de,onClick:N,onFocus:pe,onKeyDown:me,onKeyUp:ve,onMouseDown:oe,onMouseLeave:se,onMouseUp:ae,onDragLeave:ie,onTouchEnd:ce,onTouchMove:ue,onTouchStart:le,ref:ke,tabIndex:x?-1:W},ge,_),h,Se?i.createElement(C,(0,r.Z)({ref:U,center:f},K)):null)})),P=(0,u.Z)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(R)},5477:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(3871),c=44,u=i.forwardRef((function(e,t){var n=e.classes,s=e.className,u=e.color,d=void 0===u?"primary":u,p=e.disableShrink,f=void 0!==p&&p,h=e.size,m=void 0===h?40:h,v=e.style,y=e.thickness,g=void 0===y?3.6:y,b=e.value,x=void 0===b?0:b,k=e.variant,Z=void 0===k?"indeterminate":k,E=(0,o.Z)(e,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),w={},S={},C={};if("determinate"===Z||"static"===Z){var R=2*Math.PI*((c-g)/2);w.strokeDasharray=R.toFixed(3),C["aria-valuenow"]=Math.round(x),w.strokeDashoffset="".concat(((100-x)/100*R).toFixed(3),"px"),S.transform="rotate(-90deg)"}return i.createElement("div",(0,r.Z)({className:(0,a.Z)(n.root,s,"inherit"!==d&&n["color".concat((0,l.Z)(d))],{determinate:n.determinate,indeterminate:n.indeterminate,static:n.static}[Z]),style:(0,r.Z)({width:m,height:m},S,v),ref:t,role:"progressbar"},C,E),i.createElement("svg",{className:n.svg,viewBox:"".concat(22," ").concat(22," ").concat(c," ").concat(c)},i.createElement("circle",{className:(0,a.Z)(n.circle,f&&n.circleDisableShrink,{determinate:n.circleDeterminate,indeterminate:n.circleIndeterminate,static:n.circleStatic}[Z]),style:w,cx:c,cy:c,r:(c-g)/2,fill:"none",strokeWidth:g})))}));t.Z=(0,s.Z)((function(e){return{root:{display:"inline-block"},static:{transition:e.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},determinate:{transition:e.transitions.create("transform")},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:e.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},circleDeterminate:{transition:e.transitions.create("stroke-dashoffset")},"@keyframes circular-rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}}),{name:"MuiCircularProgress",flip:!1})(u)},5517:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(9693),c=i.forwardRef((function(e,t){var n=e.absolute,s=void 0!==n&&n,l=e.classes,c=e.className,u=e.component,d=void 0===u?"hr":u,p=e.flexItem,f=void 0!==p&&p,h=e.light,m=void 0!==h&&h,v=e.orientation,y=void 0===v?"horizontal":v,g=e.role,b=void 0===g?"hr"!==d?"separator":void 0:g,x=e.variant,k=void 0===x?"fullWidth":x,Z=(0,o.Z)(e,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return i.createElement(d,(0,r.Z)({className:(0,a.Z)(l.root,c,"fullWidth"!==k&&l[k],s&&l.absolute,f&&l.flexItem,m&&l.light,"vertical"===y&&l.vertical),role:b,ref:t},Z))}));t.Z=(0,s.Z)((function(e){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:e.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:(0,l.Fq)(e.palette.divider,.08)},middle:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},vertical:{height:"100%",width:1},flexItem:{alignSelf:"stretch",height:"auto"}}}),{name:"MuiDivider"})(c)},7159:function(e,t,n){"use strict";n.d(t,{ZP:function(){return N}});var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(3154),l=n(4670),c=n(885),u=n(2666),d=n(3291),p=n(8920),f=n(5653),h=n(3834),m={entering:{opacity:1},entered:{opacity:1}},v={enter:d.x9.enteringScreen,exit:d.x9.leavingScreen},y=i.forwardRef((function(e,t){var n=e.children,a=e.disableStrictModeCompat,s=void 0!==a&&a,l=e.in,d=e.onEnter,y=e.onEntered,g=e.onEntering,b=e.onExit,x=e.onExited,k=e.onExiting,Z=e.style,E=e.TransitionComponent,w=void 0===E?u.ZP:E,S=e.timeout,C=void 0===S?v:S,R=(0,o.Z)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),P=(0,p.Z)(),T=P.unstable_strictMode&&!s,N=i.useRef(null),M=(0,h.Z)(n.ref,t),O=(0,h.Z)(T?N:void 0,M),I=function(e){return function(t,n){if(e){var r=T?[N.current,t]:[t,n],o=(0,c.Z)(r,2),i=o[0],a=o[1];void 0===a?e(i):e(i,a)}}},z=I(g),A=I((function(e,t){(0,f.n)(e);var n=(0,f.C)({style:Z,timeout:C},{mode:"enter"});e.style.webkitTransition=P.transitions.create("opacity",n),e.style.transition=P.transitions.create("opacity",n),d&&d(e,t)})),D=I(y),j=I(k),F=I((function(e){var t=(0,f.C)({style:Z,timeout:C},{mode:"exit"});e.style.webkitTransition=P.transitions.create("opacity",t),e.style.transition=P.transitions.create("opacity",t),b&&b(e)})),L=I(x);return i.createElement(w,(0,r.Z)({appear:!0,in:l,nodeRef:T?N:void 0,onEnter:A,onEntered:D,onEntering:z,onExit:F,onExited:L,onExiting:j,timeout:C},R),(function(e,t){return i.cloneElement(n,(0,r.Z)({style:(0,r.Z)({opacity:0,visibility:"exited"!==e||l?void 0:"hidden"},m[e],Z,n.props.style),ref:O},t))}))})),g=i.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,c=e.invisible,u=void 0!==c&&c,d=e.open,p=e.transitionDuration,f=e.TransitionComponent,h=void 0===f?y:f,m=(0,o.Z)(e,["children","classes","className","invisible","open","transitionDuration","TransitionComponent"]);return i.createElement(h,(0,r.Z)({in:d,timeout:p},m),i.createElement("div",{className:(0,a.Z)(s.root,l,u&&s.invisible),"aria-hidden":!0,ref:t},n))})),b=(0,l.Z)({root:{zIndex:-1,position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},{name:"MuiBackdrop"})(g),x=n(3935),k=n(9437);function Z(e,t){var n=function(e,t){var n,r=t.getBoundingClientRect();if(t.fakeTransform)n=t.fakeTransform;else{var o=window.getComputedStyle(t);n=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var i=0,a=0;if(n&&"none"!==n&&"string"===typeof n){var s=n.split("(")[1].split(")")[0].split(",");i=parseInt(s[4],10),a=parseInt(s[5],10)}return"left"===e?"translateX(".concat(window.innerWidth,"px) translateX(").concat(i-r.left,"px)"):"right"===e?"translateX(-".concat(r.left+r.width-i,"px)"):"up"===e?"translateY(".concat(window.innerHeight,"px) translateY(").concat(a-r.top,"px)"):"translateY(-".concat(r.top+r.height-a,"px)")}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}var E={enter:d.x9.enteringScreen,exit:d.x9.leavingScreen},w=i.forwardRef((function(e,t){var n=e.children,a=e.direction,s=void 0===a?"down":a,l=e.in,c=e.onEnter,d=e.onEntered,m=e.onEntering,v=e.onExit,y=e.onExited,g=e.onExiting,b=e.style,w=e.timeout,S=void 0===w?E:w,C=e.TransitionComponent,R=void 0===C?u.ZP:C,P=(0,o.Z)(e,["children","direction","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),T=(0,p.Z)(),N=i.useRef(null),M=i.useCallback((function(e){N.current=x.findDOMNode(e)}),[]),O=(0,h.Z)(n.ref,M),I=(0,h.Z)(O,t),z=function(e){return function(t){e&&(void 0===t?e(N.current):e(N.current,t))}},A=z((function(e,t){Z(s,e),(0,f.n)(e),c&&c(e,t)})),D=z((function(e,t){var n=(0,f.C)({timeout:S,style:b},{mode:"enter"});e.style.webkitTransition=T.transitions.create("-webkit-transform",(0,r.Z)({},n,{easing:T.transitions.easing.easeOut})),e.style.transition=T.transitions.create("transform",(0,r.Z)({},n,{easing:T.transitions.easing.easeOut})),e.style.webkitTransform="none",e.style.transform="none",m&&m(e,t)})),j=z(d),F=z(g),L=z((function(e){var t=(0,f.C)({timeout:S,style:b},{mode:"exit"});e.style.webkitTransition=T.transitions.create("-webkit-transform",(0,r.Z)({},t,{easing:T.transitions.easing.sharp})),e.style.transition=T.transitions.create("transform",(0,r.Z)({},t,{easing:T.transitions.easing.sharp})),Z(s,e),v&&v(e)})),$=z((function(e){e.style.webkitTransition="",e.style.transition="",y&&y(e)})),B=i.useCallback((function(){N.current&&Z(s,N.current)}),[s]);return i.useEffect((function(){if(!l&&"down"!==s&&"right"!==s){var e=(0,k.Z)((function(){N.current&&Z(s,N.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[s,l]),i.useEffect((function(){l||B()}),[l,B]),i.createElement(R,(0,r.Z)({nodeRef:N,onEnter:A,onEntered:j,onEntering:D,onExit:L,onExited:$,onExiting:F,appear:!0,in:l,timeout:S},P),(function(e,t){return i.cloneElement(n,(0,r.Z)({ref:I,style:(0,r.Z)({visibility:"exited"!==e||l?void 0:"hidden"},b,n.props.style)},t))}))})),S=n(9895),C=n(3871),R={left:"right",right:"left",top:"down",bottom:"up"};var P={enter:d.x9.enteringScreen,exit:d.x9.leavingScreen},T=i.forwardRef((function(e,t){var n=e.anchor,l=void 0===n?"left":n,c=e.BackdropProps,u=e.children,d=e.classes,f=e.className,h=e.elevation,m=void 0===h?16:h,v=e.ModalProps,y=(v=void 0===v?{}:v).BackdropProps,g=(0,o.Z)(v,["BackdropProps"]),x=e.onClose,k=e.open,Z=void 0!==k&&k,E=e.PaperProps,T=void 0===E?{}:E,N=e.SlideProps,M=e.TransitionComponent,O=void 0===M?w:M,I=e.transitionDuration,z=void 0===I?P:I,A=e.variant,D=void 0===A?"temporary":A,j=(0,o.Z)(e,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"]),F=(0,p.Z)(),L=i.useRef(!1);i.useEffect((function(){L.current=!0}),[]);var $=function(e,t){return"rtl"===e.direction&&function(e){return-1!==["left","right"].indexOf(e)}(t)?R[t]:t}(F,l),B=i.createElement(S.Z,(0,r.Z)({elevation:"temporary"===D?m:0,square:!0},T,{className:(0,a.Z)(d.paper,d["paperAnchor".concat((0,C.Z)($))],T.className,"temporary"!==D&&d["paperAnchorDocked".concat((0,C.Z)($))])}),u);if("permanent"===D)return i.createElement("div",(0,r.Z)({className:(0,a.Z)(d.root,d.docked,f),ref:t},j),B);var V=i.createElement(O,(0,r.Z)({in:Z,direction:R[$],timeout:z,appear:L.current},N),B);return"persistent"===D?i.createElement("div",(0,r.Z)({className:(0,a.Z)(d.root,d.docked,f),ref:t},j),V):i.createElement(s.Z,(0,r.Z)({BackdropProps:(0,r.Z)({},c,y,{transitionDuration:z}),BackdropComponent:b,className:(0,a.Z)(d.root,d.modal,f),open:Z,onClose:x,ref:t},j,g),V)})),N=(0,l.Z)((function(e){return{root:{},docked:{flex:"0 0 auto"},paper:{overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:e.zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},paperAnchorLeft:{left:0,right:"auto"},paperAnchorRight:{left:"auto",right:0},paperAnchorTop:{top:0,left:0,bottom:"auto",right:0,height:"auto",maxHeight:"100%"},paperAnchorBottom:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},paperAnchorDockedLeft:{borderRight:"1px solid ".concat(e.palette.divider)},paperAnchorDockedTop:{borderBottom:"1px solid ".concat(e.palette.divider)},paperAnchorDockedRight:{borderLeft:"1px solid ".concat(e.palette.divider)},paperAnchorDockedBottom:{borderTop:"1px solid ".concat(e.palette.divider)},modal:{}}}),{name:"MuiDrawer",flip:!1})(T)},7812:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(9693),c=n(4720),u=n(3871),d=i.forwardRef((function(e,t){var n=e.edge,s=void 0!==n&&n,l=e.children,d=e.classes,p=e.className,f=e.color,h=void 0===f?"default":f,m=e.disabled,v=void 0!==m&&m,y=e.disableFocusRipple,g=void 0!==y&&y,b=e.size,x=void 0===b?"medium":b,k=(0,o.Z)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return i.createElement(c.Z,(0,r.Z)({className:(0,a.Z)(d.root,p,"default"!==h&&d["color".concat((0,u.Z)(h))],v&&d.disabled,"small"===x&&d["size".concat((0,u.Z)(x))],{start:d.edgeStart,end:d.edgeEnd}[s]),centerRipple:!0,focusRipple:!g,disabled:v,ref:t},k),i.createElement("span",{className:d.label},l))}));t.Z=(0,s.Z)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:(0,l.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,l.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,l.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(d)},2822:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(6987),c=i.forwardRef((function(e,t){var n=e.children,s=e.classes,c=e.className,u=e.component,d=void 0===u?"ul":u,p=e.dense,f=void 0!==p&&p,h=e.disablePadding,m=void 0!==h&&h,v=e.subheader,y=(0,o.Z)(e,["children","classes","className","component","dense","disablePadding","subheader"]),g=i.useMemo((function(){return{dense:f}}),[f]);return i.createElement(l.Z.Provider,{value:g},i.createElement(d,(0,r.Z)({className:(0,a.Z)(s.root,c,f&&s.dense,!m&&s.padding,v&&s.subheader),ref:t},y),v,n))}));t.Z=(0,s.Z)({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(c)},6987:function(e,t,n){"use strict";var r=n(7294).createContext({});t.Z=r},998:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(4720),c=n(3711),u=n(3834),d=n(6987),p=n(3935),f="undefined"===typeof window?i.useEffect:i.useLayoutEffect,h=i.forwardRef((function(e,t){var n=e.alignItems,s=void 0===n?"center":n,h=e.autoFocus,m=void 0!==h&&h,v=e.button,y=void 0!==v&&v,g=e.children,b=e.classes,x=e.className,k=e.component,Z=e.ContainerComponent,E=void 0===Z?"li":Z,w=e.ContainerProps,S=(w=void 0===w?{}:w).className,C=(0,o.Z)(w,["className"]),R=e.dense,P=void 0!==R&&R,T=e.disabled,N=void 0!==T&&T,M=e.disableGutters,O=void 0!==M&&M,I=e.divider,z=void 0!==I&&I,A=e.focusVisibleClassName,D=e.selected,j=void 0!==D&&D,F=(0,o.Z)(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),L=i.useContext(d.Z),$={dense:P||L.dense||!1,alignItems:s},B=i.useRef(null);f((function(){m&&B.current&&B.current.focus()}),[m]);var V=i.Children.toArray(g),W=V.length&&(0,c.Z)(V[V.length-1],["ListItemSecondaryAction"]),K=i.useCallback((function(e){B.current=p.findDOMNode(e)}),[]),H=(0,u.Z)(K,t),q=(0,r.Z)({className:(0,a.Z)(b.root,x,$.dense&&b.dense,!O&&b.gutters,z&&b.divider,N&&b.disabled,y&&b.button,"center"!==s&&b.alignItemsFlexStart,W&&b.secondaryAction,j&&b.selected),disabled:N},F),_=k||"li";return y&&(q.component=k||"div",q.focusVisibleClassName=(0,a.Z)(b.focusVisible,A),_=l.Z),W?(_=q.component||k?_:"div","li"===E&&("li"===_?_="div":"li"===q.component&&(q.component="div")),i.createElement(d.Z.Provider,{value:$},i.createElement(E,(0,r.Z)({className:(0,a.Z)(b.container,S),ref:H},C),i.createElement(_,q,V),V.pop()))):i.createElement(d.Z.Provider,{value:$},i.createElement(_,(0,r.Z)({ref:H},q),V))}));t.Z=(0,s.Z)((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(h)},5675:function(e,t,n){"use strict";n.d(t,{Z:function(){return V}});var r=n(7462),o=n(5987),i=n(7294),a=(n(9864),n(5697),n(6010)),s=n(4670),l=n(3935),c=n(9437),u=n(626),d=n(713),p=n(2568),f=n(3154),h=n(885),m=n(2666),v=n(8920),y=n(5653),g=n(3834);function b(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var x={entering:{opacity:1,transform:b(1)},entered:{opacity:1,transform:"none"}},k=i.forwardRef((function(e,t){var n=e.children,a=e.disableStrictModeCompat,s=void 0!==a&&a,l=e.in,c=e.onEnter,u=e.onEntered,d=e.onEntering,p=e.onExit,f=e.onExited,k=e.onExiting,Z=e.style,E=e.timeout,w=void 0===E?"auto":E,S=e.TransitionComponent,C=void 0===S?m.ZP:S,R=(0,o.Z)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),P=i.useRef(),T=i.useRef(),N=(0,v.Z)(),M=N.unstable_strictMode&&!s,O=i.useRef(null),I=(0,g.Z)(n.ref,t),z=(0,g.Z)(M?O:void 0,I),A=function(e){return function(t,n){if(e){var r=M?[O.current,t]:[t,n],o=(0,h.Z)(r,2),i=o[0],a=o[1];void 0===a?e(i):e(i,a)}}},D=A(d),j=A((function(e,t){(0,y.n)(e);var n,r=(0,y.C)({style:Z,timeout:w},{mode:"enter"}),o=r.duration,i=r.delay;"auto"===w?(n=N.transitions.getAutoHeightDuration(e.clientHeight),T.current=n):n=o,e.style.transition=[N.transitions.create("opacity",{duration:n,delay:i}),N.transitions.create("transform",{duration:.666*n,delay:i})].join(","),c&&c(e,t)})),F=A(u),L=A(k),$=A((function(e){var t,n=(0,y.C)({style:Z,timeout:w},{mode:"exit"}),r=n.duration,o=n.delay;"auto"===w?(t=N.transitions.getAutoHeightDuration(e.clientHeight),T.current=t):t=r,e.style.transition=[N.transitions.create("opacity",{duration:t,delay:o}),N.transitions.create("transform",{duration:.666*t,delay:o||.333*t})].join(","),e.style.opacity="0",e.style.transform=b(.75),p&&p(e)})),B=A(f);return i.useEffect((function(){return function(){clearTimeout(P.current)}}),[]),i.createElement(C,(0,r.Z)({appear:!0,in:l,nodeRef:M?O:void 0,onEnter:j,onEntered:F,onEntering:D,onExit:$,onExited:B,onExiting:L,addEndListener:function(e,t){var n=M?e:t;"auto"===w&&(P.current=setTimeout(n,T.current||0))},timeout:"auto"===w?null:w},R),(function(e,t){return i.cloneElement(n,(0,r.Z)({style:(0,r.Z)({opacity:0,transform:b(.75),visibility:"exited"!==e||l?void 0:"hidden"},x[e],Z,n.props.style),ref:z},t))}))}));k.muiSupportAuto=!0;var Z=k,E=n(9895);function w(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function S(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function C(e){return[e.horizontal,e.vertical].map((function(e){return"number"===typeof e?"".concat(e,"px"):e})).join(" ")}function R(e){return"function"===typeof e?e():e}var P=i.forwardRef((function(e,t){var n=e.action,s=e.anchorEl,h=e.anchorOrigin,m=void 0===h?{vertical:"top",horizontal:"left"}:h,v=e.anchorPosition,y=e.anchorReference,g=void 0===y?"anchorEl":y,b=e.children,x=e.classes,k=e.className,P=e.container,T=e.elevation,N=void 0===T?8:T,M=e.getContentAnchorEl,O=e.marginThreshold,I=void 0===O?16:O,z=e.onEnter,A=e.onEntered,D=e.onEntering,j=e.onExit,F=e.onExited,L=e.onExiting,$=e.open,B=e.PaperProps,V=void 0===B?{}:B,W=e.transformOrigin,K=void 0===W?{vertical:"top",horizontal:"left"}:W,H=e.TransitionComponent,q=void 0===H?Z:H,_=e.transitionDuration,G=void 0===_?"auto":_,U=e.TransitionProps,X=void 0===U?{}:U,Y=(0,o.Z)(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),J=i.useRef(),Q=i.useCallback((function(e){if("anchorPosition"===g)return v;var t=R(s),n=(t&&1===t.nodeType?t:(0,u.Z)(J.current).body).getBoundingClientRect(),r=0===e?m.vertical:"center";return{top:n.top+w(n,r),left:n.left+S(n,m.horizontal)}}),[s,m.horizontal,m.vertical,v,g]),ee=i.useCallback((function(e){var t=0;if(M&&"anchorEl"===g){var n=M(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}0}return t}),[m.vertical,g,M]),te=i.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:w(e,K.vertical)+t,horizontal:S(e,K.horizontal)}}),[K.horizontal,K.vertical]),ne=i.useCallback((function(e){var t=ee(e),n={width:e.offsetWidth,height:e.offsetHeight},r=te(n,t);if("none"===g)return{top:null,left:null,transformOrigin:C(r)};var o=Q(t),i=o.top-r.vertical,a=o.left-r.horizontal,l=i+n.height,c=a+n.width,u=(0,d.Z)(R(s)),p=u.innerHeight-I,f=u.innerWidth-I;if(ip){var m=l-p;i-=m,r.vertical+=m}if(af){var y=c-f;a-=y,r.horizontal+=y}return{top:"".concat(Math.round(i),"px"),left:"".concat(Math.round(a),"px"),transformOrigin:C(r)}}),[s,g,Q,ee,te,I]),re=i.useCallback((function(){var e=J.current;if(e){var t=ne(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[ne]),oe=i.useCallback((function(e){J.current=l.findDOMNode(e)}),[]);i.useEffect((function(){$&&re()})),i.useImperativeHandle(n,(function(){return $?{updatePosition:function(){re()}}:null}),[$,re]),i.useEffect((function(){if($){var e=(0,c.Z)((function(){re()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[$,re]);var ie=G;"auto"!==G||q.muiSupportAuto||(ie=void 0);var ae=P||(s?(0,u.Z)(R(s)).body:void 0);return i.createElement(f.Z,(0,r.Z)({container:ae,open:$,ref:t,BackdropProps:{invisible:!0},className:(0,a.Z)(x.root,k)},Y),i.createElement(q,(0,r.Z)({appear:!0,in:$,onEnter:z,onEntered:A,onExit:j,onExited:F,onExiting:L,timeout:ie},X,{onEntering:(0,p.Z)((function(e,t){D&&D(e,t),re()}),X.onEntering)}),i.createElement(E.Z,(0,r.Z)({elevation:N,ref:oe},V,{className:(0,a.Z)(x.paper,V.className)}),b)))})),T=(0,s.Z)({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(P),N=n(2822),M=n(5840);function O(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function I(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function z(e,t){if(void 0===t)return!0;var n=e.innerText;return void 0===n&&(n=e.textContent),0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function A(e,t,n,r,o,i){for(var a=!1,s=o(e,t,!!t&&n);s;){if(s===e.firstChild){if(a)return;a=!0}var l=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&z(s,i)&&!l)return void s.focus();s=o(e,s,n)}}var D="undefined"===typeof window?i.useEffect:i.useLayoutEffect,j=i.forwardRef((function(e,t){var n=e.actions,a=e.autoFocus,s=void 0!==a&&a,c=e.autoFocusItem,d=void 0!==c&&c,p=e.children,f=e.className,h=e.disabledItemsFocusable,m=void 0!==h&&h,v=e.disableListWrap,y=void 0!==v&&v,b=e.onKeyDown,x=e.variant,k=void 0===x?"selectedMenu":x,Z=(0,o.Z)(e,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),E=i.useRef(null),w=i.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});D((function(){s&&E.current.focus()}),[s]),i.useImperativeHandle(n,(function(){return{adjustStyleForScrollbar:function(e,t){var n=!E.current.style.width;if(e.clientHeight0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);var s=r&&!o.repeating&&z(r,o);o.previousKeyMatched&&(s||A(t,r,!1,m,O,o))?e.preventDefault():o.previousKeyMatched=!1}b&&b(e)},tabIndex:s?0:-1},Z),P)})),F=n(4236),L={vertical:"top",horizontal:"right"},$={vertical:"top",horizontal:"left"},B=i.forwardRef((function(e,t){var n=e.autoFocus,s=void 0===n||n,c=e.children,u=e.classes,d=e.disableAutoFocusItem,p=void 0!==d&&d,f=e.MenuListProps,h=void 0===f?{}:f,m=e.onClose,y=e.onEntering,g=e.open,b=e.PaperProps,x=void 0===b?{}:b,k=e.PopoverClasses,Z=e.transitionDuration,E=void 0===Z?"auto":Z,w=e.TransitionProps,S=(w=void 0===w?{}:w).onEntering,C=(0,o.Z)(w,["onEntering"]),R=e.variant,P=void 0===R?"selectedMenu":R,N=(0,o.Z)(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"]),M=(0,v.Z)(),O=s&&!p&&g,I=i.useRef(null),z=i.useRef(null),A=-1;i.Children.map(c,(function(e,t){i.isValidElement(e)&&(e.props.disabled||("menu"!==P&&e.props.selected||-1===A)&&(A=t))}));var D=i.Children.map(c,(function(e,t){return t===A?i.cloneElement(e,{ref:function(t){z.current=l.findDOMNode(t),(0,F.Z)(e.ref,t)}}):e}));return i.createElement(T,(0,r.Z)({getContentAnchorEl:function(){return z.current},classes:k,onClose:m,TransitionProps:(0,r.Z)({onEntering:function(e,t){I.current&&I.current.adjustStyleForScrollbar(e,M),y&&y(e,t),S&&S(e,t)}},C),anchorOrigin:"rtl"===M.direction?L:$,transformOrigin:"rtl"===M.direction?L:$,PaperProps:(0,r.Z)({},x,{classes:(0,r.Z)({},x.classes,{root:u.paper})}),open:g,ref:t,transitionDuration:E},N),i.createElement(j,(0,r.Z)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),m&&m(e,"tabKeyDown"))},actions:I,autoFocus:s&&(-1===A||p),autoFocusItem:O,variant:P},h,{className:(0,a.Z)(u.list,h.className)}),D))})),V=(0,s.Z)({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(B)},5639:function(e,t,n){"use strict";var r=n(5987),o=n(4942),i=n(7462),a=n(7294),s=(n(5697),n(6010)),l=n(4670),c=n(998),u=a.forwardRef((function(e,t){var n,o=e.classes,l=e.className,u=e.component,d=void 0===u?"li":u,p=e.disableGutters,f=void 0!==p&&p,h=e.ListItemClasses,m=e.role,v=void 0===m?"menuitem":m,y=e.selected,g=e.tabIndex,b=(0,r.Z)(e,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]);return e.disabled||(n=void 0!==g?g:-1),a.createElement(c.Z,(0,i.Z)({button:!0,role:v,tabIndex:n,component:d,selected:y,disableGutters:f,classes:(0,i.Z)({dense:o.dense},h),className:(0,s.Z)(o.root,l,y&&o.selected,!f&&o.gutters),ref:t},b))}));t.Z=(0,l.Z)((function(e){return{root:(0,i.Z)({},e.typography.body1,(0,o.Z)({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},e.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:(0,i.Z)({},e.typography.body2,{minHeight:"auto"})}}),{name:"MuiMenuItem"})(u)},3154:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var r=n(5987),o=n(7462),i=n(7294),a=n(3935),s=(n(5697),n(159)),l=n(3869),c=n(626),u=n(4236),d=n(3834);var p="undefined"!==typeof window?i.useLayoutEffect:i.useEffect;var f=i.forwardRef((function(e,t){var n=e.children,r=e.container,o=e.disablePortal,s=void 0!==o&&o,l=e.onRendered,c=i.useState(null),f=c[0],h=c[1],m=(0,d.Z)(i.isValidElement(n)?n.ref:null,t);return p((function(){s||h(function(e){return e="function"===typeof e?e():e,a.findDOMNode(e)}(r)||document.body)}),[r,s]),p((function(){if(f&&!s)return(0,u.Z)(t,f),function(){(0,u.Z)(t,null)}}),[t,f,s]),p((function(){l&&(f||s)&&l()}),[l,f,s]),s?i.isValidElement(n)?i.cloneElement(n,{ref:m}):n:f?a.createPortal(n,f):f})),h=n(2568),m=n(5192),v=n(2781);var y=n(3144),g=n(2982),b=n(5840),x=n(713);function k(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Z(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function E(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0,i=[t,n].concat((0,g.Z)(r)),a=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===a.indexOf(e.tagName)&&k(e,o)}))}function w(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function S(e,t){var n,r=[],o=[],i=e.container;if(!t.disableScrollLock){if(function(e){var t=(0,c.Z)(e);return t.body===e?(0,x.Z)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(i)){var a=(0,b.Z)();r.push({value:i.style.paddingRight,key:"padding-right",el:i}),i.style["padding-right"]="".concat(Z(i)+a,"px"),n=(0,c.Z)(i).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){o.push(e.style.paddingRight),e.style.paddingRight="".concat(Z(e)+a,"px")}))}var s=i.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:i;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){o[t]?e.style.paddingRight=o[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var C=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return(0,y.Z)(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&k(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);E(t,e.mountNode,e.modalRef,r,!0);var o=w(this.containers,(function(e){return e.container===t}));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=w(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=S(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=w(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&k(e.modalRef,!0),E(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var o=r.modals[r.modals.length-1];o.modalRef&&k(o.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();var R=function(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,o=e.disableEnforceFocus,s=void 0!==o&&o,l=e.disableRestoreFocus,u=void 0!==l&&l,p=e.getDoc,f=e.isEnabled,h=e.open,m=i.useRef(),v=i.useRef(null),y=i.useRef(null),g=i.useRef(),b=i.useRef(null),x=i.useCallback((function(e){b.current=a.findDOMNode(e)}),[]),k=(0,d.Z)(t.ref,x),Z=i.useRef();return i.useEffect((function(){Z.current=h}),[h]),!Z.current&&h&&"undefined"!==typeof window&&(g.current=p().activeElement),i.useEffect((function(){if(h){var e=(0,c.Z)(b.current);r||!b.current||b.current.contains(e.activeElement)||(b.current.hasAttribute("tabIndex")||b.current.setAttribute("tabIndex",-1),b.current.focus());var t=function(){null!==b.current&&(e.hasFocus()&&!s&&f()&&!m.current?b.current&&!b.current.contains(e.activeElement)&&b.current.focus():m.current=!1)},n=function(t){!s&&f()&&9===t.keyCode&&e.activeElement===b.current&&(m.current=!0,t.shiftKey?y.current.focus():v.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var o=setInterval((function(){t()}),50);return function(){clearInterval(o),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),u||(g.current&&g.current.focus&&g.current.focus(),g.current=null)}}}),[r,s,u,f,h]),i.createElement(i.Fragment,null,i.createElement("div",{tabIndex:0,ref:v,"data-test":"sentinelStart"}),i.cloneElement(t,{ref:k}),i.createElement("div",{tabIndex:0,ref:y,"data-test":"sentinelEnd"}))},P={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},T=i.forwardRef((function(e,t){var n=e.invisible,a=void 0!==n&&n,s=e.open,l=(0,r.Z)(e,["invisible","open"]);return s?i.createElement("div",(0,o.Z)({"aria-hidden":!0,ref:t},l,{style:(0,o.Z)({},P.root,a?P.invisible:{},l.style)})):null}));var N=new C,M=i.forwardRef((function(e,t){var n=(0,s.Z)(),u=(0,l.Z)({name:"MuiModal",props:(0,o.Z)({},e),theme:n}),p=u.BackdropComponent,y=void 0===p?T:p,g=u.BackdropProps,b=u.children,x=u.closeAfterTransition,Z=void 0!==x&&x,E=u.container,w=u.disableAutoFocus,S=void 0!==w&&w,C=u.disableBackdropClick,P=void 0!==C&&C,M=u.disableEnforceFocus,O=void 0!==M&&M,I=u.disableEscapeKeyDown,z=void 0!==I&&I,A=u.disablePortal,D=void 0!==A&&A,j=u.disableRestoreFocus,F=void 0!==j&&j,L=u.disableScrollLock,$=void 0!==L&&L,B=u.hideBackdrop,V=void 0!==B&&B,W=u.keepMounted,K=void 0!==W&&W,H=u.manager,q=void 0===H?N:H,_=u.onBackdropClick,G=u.onClose,U=u.onEscapeKeyDown,X=u.onRendered,Y=u.open,J=(0,r.Z)(u,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),Q=i.useState(!0),ee=Q[0],te=Q[1],ne=i.useRef({}),re=i.useRef(null),oe=i.useRef(null),ie=(0,d.Z)(oe,t),ae=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(u),se=function(){return(0,c.Z)(re.current)},le=function(){return ne.current.modalRef=oe.current,ne.current.mountNode=re.current,ne.current},ce=function(){q.mount(le(),{disableScrollLock:$}),oe.current.scrollTop=0},ue=(0,m.Z)((function(){var e=function(e){return e="function"===typeof e?e():e,a.findDOMNode(e)}(E)||se().body;q.add(le(),e),oe.current&&ce()})),de=i.useCallback((function(){return q.isTopModal(le())}),[q]),pe=(0,m.Z)((function(e){re.current=e,e&&(X&&X(),Y&&de()?ce():k(oe.current,!0))})),fe=i.useCallback((function(){q.remove(le())}),[q]);if(i.useEffect((function(){return function(){fe()}}),[fe]),i.useEffect((function(){Y?ue():ae&&Z||fe()}),[Y,fe,ae,Z,ue]),!K&&!Y&&(!ae||ee))return null;var he=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:v.Z}),me={};return void 0===b.props.tabIndex&&(me.tabIndex=b.props.tabIndex||"-1"),ae&&(me.onEnter=(0,h.Z)((function(){te(!1)}),b.props.onEnter),me.onExited=(0,h.Z)((function(){te(!0),Z&&fe()}),b.props.onExited)),i.createElement(f,{ref:pe,container:E,disablePortal:D},i.createElement("div",(0,o.Z)({ref:ie,onKeyDown:function(e){"Escape"===e.key&&de()&&(U&&U(e),z||(e.stopPropagation(),G&&G(e,"escapeKeyDown")))},role:"presentation"},J,{style:(0,o.Z)({},he.root,!Y&&ee?he.hidden:{},J.style)}),V?null:i.createElement(y,(0,o.Z)({open:Y,onClick:function(e){e.target===e.currentTarget&&(_&&_(e),!P&&G&&G(e,"backdropClick"))}},g)),i.createElement(R,{disableEnforceFocus:O,disableAutoFocus:S,disableRestoreFocus:F,getDoc:se,isEnabled:de,open:Y},i.cloneElement(b,me))))}))},9895:function(e,t,n){"use strict";var r=n(5987),o=n(7462),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=i.forwardRef((function(e,t){var n=e.classes,s=e.className,l=e.component,c=void 0===l?"div":l,u=e.square,d=void 0!==u&&u,p=e.elevation,f=void 0===p?1:p,h=e.variant,m=void 0===h?"elevation":h,v=(0,r.Z)(e,["classes","className","component","square","elevation","variant"]);return i.createElement(c,(0,o.Z)({className:(0,a.Z)(n.root,s,"outlined"===m?n.outlined:n["elevation".concat(f)],!d&&n.rounded),ref:t},v))}));t.Z=(0,s.Z)((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),(0,o.Z)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(l)},2318:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(3871),c={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},u=i.forwardRef((function(e,t){var n=e.align,s=void 0===n?"inherit":n,u=e.classes,d=e.className,p=e.color,f=void 0===p?"initial":p,h=e.component,m=e.display,v=void 0===m?"initial":m,y=e.gutterBottom,g=void 0!==y&&y,b=e.noWrap,x=void 0!==b&&b,k=e.paragraph,Z=void 0!==k&&k,E=e.variant,w=void 0===E?"body1":E,S=e.variantMapping,C=void 0===S?c:S,R=(0,o.Z)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),P=h||(Z?"p":C[w]||c[w])||"span";return i.createElement(P,(0,r.Z)({className:(0,a.Z)(u.root,d,"inherit"!==w&&u[w],"initial"!==f&&u["color".concat((0,l.Z)(f))],x&&u.noWrap,g&&u.gutterBottom,Z&&u.paragraph,"inherit"!==s&&u["align".concat((0,l.Z)(s))],"initial"!==v&&u["display".concat((0,l.Z)(v))]),ref:t},R))}));t.Z=(0,s.Z)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(u)},7623:function(e,t,n){"use strict";function r(e){return e}n.d(t,{Z:function(){return r}})},9700:function(e,t,n){"use strict";var r=(0,n(7850).Z)();t.Z=r},1120:function(e,t,n){"use strict";var r=n(7462),o=n(3746),i=n(9700);t.Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o.Z)(e,(0,r.Z)({defaultTheme:i.Z},t))}},8920:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(159),o=(n(7294),n(9700));function i(){return(0,r.Z)()||o.Z}},4670:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(8679)),s=n.n(a),l=n(3746),c=n(3869),u=n(159),d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var a=t.defaultTheme,d=t.withTheme,p=void 0!==d&&d,f=t.name,h=(0,o.Z)(t,["defaultTheme","withTheme","name"]);var m=f,v=(0,l.Z)(e,(0,r.Z)({defaultTheme:a,Component:n,name:f||n.displayName,classNamePrefix:m},h)),y=i.forwardRef((function(e,t){e.classes;var s,l=e.innerRef,d=(0,o.Z)(e,["classes","innerRef"]),h=v((0,r.Z)({},n.defaultProps,e)),m=d;return("string"===typeof f||p)&&(s=(0,u.Z)()||a,f&&(m=(0,c.Z)({theme:s,name:f,props:d})),p&&!m.theme&&(m.theme=s)),i.createElement(n,(0,r.Z)({ref:l||t,classes:h},m))}));return s()(y,n),y}},p=n(9700);var f=function(e,t){return d(e,(0,r.Z)({defaultTheme:p.Z},t))}},5653:function(e,t,n){"use strict";n.d(t,{n:function(){return r},C:function(){return o}});var r=function(e){return e.scrollTop};function o(e,t){var n=e.timeout,r=e.style,o=void 0===r?{}:r;return{duration:o.transitionDuration||"number"===typeof n?n:n[t.mode]||0,delay:o.transitionDelay}}},3871:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(288);function o(e){if("string"!==typeof e)throw new Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},2568:function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),i=0;i<+~=|^:(),"'`\s])/g,x="undefined"!==typeof CSS&&CSS.escape,k=function(e){return x?x(e):e.replace(b,"\\$1")},Z=function(){function e(e,t,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,o=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:o&&(this.renderer=new o)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var o=t;n&&!1===n.process||(o=this.options.jss.plugins.onChangeValue(t,e,this));var i=null==o||!1===o,a=e in this.style;if(i&&!a&&!r)return this;var s=i&&a;if(s?delete this.style[e]:this.style[e]=o,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,o),this;var l=this.options.sheet;return l&&l.attached,this},e}(),E=function(e){function t(t,n,r){var o;(o=e.call(this,t,n,r)||this).selectorText=void 0,o.id=void 0,o.renderable=void 0;var i=r.selector,a=r.scoped,s=r.sheet,l=r.generateId;return i?o.selectorText=i:!1!==a&&(o.id=l((0,u.Z)((0,u.Z)(o)),s),o.selectorText="."+k(o.id)),o}(0,c.Z)(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==typeof n?e[t]=n:Array.isArray(n)&&(e[t]=v(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?(0,o.Z)({},e,{allowEmpty:!0}):e;return g(this.selectorText,this.style,n)},(0,l.Z)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(Z),w={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new E(e,t,n)}},S={indent:1,children:!0},C=/@([\w-]+)/,R=function(){function e(e,t,n){this.type="conditional",this.at=void 0,this.key=void 0,this.query=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e;var r=e.match(C);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new X((0,o.Z)({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){if(void 0===e&&(e=S),null==e.indent&&(e.indent=S.indent),null==e.children&&(e.children=S.children),!1===e.children)return this.query+" {}";var t=this.rules.toString(e);return t?this.query+" {\n"+t+"\n}":""},e}(),P=/@media|@supports\s+/,T={onCreateRule:function(e,t,n){return P.test(e)?new R(e,t,n):null}},N={indent:1,children:!0},M=/@keyframes\s+([\w-]+)/,O=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var r=e.match(M);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,a=n.sheet,s=n.generateId;for(var l in this.id=!1===i?this.name:k(s(this,a)),this.rules=new X((0,o.Z)({},n,{parent:this})),t)this.rules.add(l,t[l],(0,o.Z)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=N),null==e.indent&&(e.indent=N.indent),null==e.children&&(e.children=N.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),I=/@keyframes\s+/,z=/\$([\w-]+)/g,A=function(e,t){return"string"===typeof e?e.replace(z,(function(e,n){return n in t?t[n]:e})):e},D=function(e,t,n){var r=e[t],o=A(r,n);o!==r&&(e[t]=o)},j={onCreateRule:function(e,t,n){return"string"===typeof e&&I.test(e)?new O(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&D(e,"animation-name",n.keyframes),"animation"in e&&D(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return A(e,r.keyframes);default:return e}}},F=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o=this.index)t.push(e);else for(var r=0;rn)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=(0,d.Z)(t,["attached"]),o="",i=0;i0){var n=function(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var o=function(e){for(var t=ce(),n=0;nn?n:t},he=function(){function e(e){this.getPropertyValue=ie,this.setProperty=ae,this.removeProperty=se,this.setSelector=le,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,this.cssRules=[],e&&Q.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,o=t.element;this.element=o||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var i=de();i&&this.element.setAttribute("nonce",i)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=ue(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling)}else ce().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var r=(0,o.Z)({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}var ke={set:function(e,t,n,r){var o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}},Ze=n(159),Ee=(n(5697),n(7076)),we=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var Se=Date.now(),Ce="fnValues"+Se,Re="fnStyle"+ ++Se,Pe=function(){return{onCreateRule:function(e,t,n){if("function"!==typeof t)return null;var r=h(e,{},n);return r[Re]=t,r},onProcessStyle:function(e,t){if(Ce in t||Re in t)return e;var n={};for(var r in e){var o=e[r];"function"===typeof o&&(delete e[r],n[r]=o)}return t[Ce]=n,e},onUpdate:function(e,t,n,r){var o=t,i=o[Re];i&&(o.style=i(e)||{});var a=o[Ce];if(a)for(var s in a)o.prop(s,a[s](e),r)}}},Te="@global",Ne="@global ",Me=function(){function e(e,t,n){for(var r in this.type="global",this.at=Te,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new X((0,o.Z)({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),Oe=function(){function e(e,t,n){this.type="global",this.at=Te,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=n;var r=e.substr(Ne.length);this.rule=n.jss.createRule(r,t,(0,o.Z)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),Ie=/\s*,\s*/g;function ze(e,t){for(var n=e.split(Ie),r="",o=0;o-1){var o=At[e];if(!Array.isArray(o))return ct+bt(o)in t&&ut+o;if(!r)return!1;for(var i=0;it?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},o=Object.keys(t).sort(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,o=void 0===r?"jss":r,i=e.seed,a=void 0===i?"":i,s=""===a?"":"".concat(a,"-"),l=0,c=function(){return l+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==we.indexOf(e.key))return"Mui-".concat(e.key);var i="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[Ee.Z]&&""===a?"".concat(i,"-").concat(c()):i}return"".concat(s).concat(o).concat(c())}}(),jss:Qt,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},tn=i.createContext(en);var nn=-1e9;function rn(){return nn+=1}var on=n(5953);function an(e){var t="function"===typeof e;return{create:function(n,r){var i;try{i=t?e(n):e}catch(l){throw l}if(!r||!n.overrides||!n.overrides[r])return i;var a=n.overrides[r],s=(0,o.Z)({},i);return Object.keys(a).forEach((function(e){s[e]=(0,on.Z)(s[e],a[e])})),s},options:{}}}var sn={};function ln(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,o=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,o=!0),o&&(r.cacheClasses.value=xe({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function cn(e,t){var n=e.state,r=e.theme,i=e.stylesOptions,a=e.stylesCreator,s=e.name;if(!i.disableGeneration){var l=ke.get(i.sheetsManager,a,r);l||(l={refs:0,staticSheet:null,dynamicStyles:null},ke.set(i.sheetsManager,a,r,l));var c=(0,o.Z)({},a.options,i,{theme:r,flip:"boolean"===typeof i.flip?i.flip:"rtl"===r.direction});c.generateId=c.serverGenerateClassName||c.generateClassName;var u=i.sheetsRegistry;if(0===l.refs){var d;i.sheetsCache&&(d=ke.get(i.sheetsCache,a,r));var p=a.create(r,s);d||((d=i.jss.createStyleSheet(p,(0,o.Z)({link:!1},c))).attach(),i.sheetsCache&&ke.set(i.sheetsCache,a,r,d)),u&&u.add(d),l.staticSheet=d,l.dynamicStyles=ye(p)}if(l.dynamicStyles){var f=i.jss.createStyleSheet(l.dynamicStyles,(0,o.Z)({link:!0},c));f.update(t),f.attach(),n.dynamicSheet=f,n.classes=xe({baseClasses:l.staticSheet.classes,newClasses:f.classes}),u&&u.add(f)}else n.classes=l.staticSheet.classes;l.refs+=1}}function un(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function dn(e){var t=e.state,n=e.theme,r=e.stylesOptions,o=e.stylesCreator;if(!r.disableGeneration){var i=ke.get(r.sheetsManager,o,n);i.refs-=1;var a=r.sheetsRegistry;0===i.refs&&(ke.delete(r.sheetsManager,o,n),r.jss.removeStyleSheet(i.staticSheet),a&&a.remove(i.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}function pn(e,t){var n,r=i.useRef([]),o=i.useMemo((function(){return{}}),t);r.current!==o&&(r.current=o,n=e()),i.useEffect((function(){return function(){n&&n()}}),[o])}function fn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,a=t.classNamePrefix,s=t.Component,l=t.defaultTheme,c=void 0===l?sn:l,u=(0,r.Z)(t,["name","classNamePrefix","Component","defaultTheme"]),d=an(e),p=n||a||"makeStyles";d.options={index:rn(),name:n,meta:p,classNamePrefix:p};var f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,Ze.Z)()||c,r=(0,o.Z)({},i.useContext(tn),u),a=i.useRef(),l=i.useRef();pn((function(){var o={name:n,state:{},stylesCreator:d,stylesOptions:r,theme:t};return cn(o,e),l.current=!1,a.current=o,function(){dn(o)}}),[t,d]),i.useEffect((function(){l.current&&un(a.current,e),l.current=!0}));var p=ln(a.current,e.classes,s);return p};return f}},6010:function(e,t,n){"use strict";function r(e){var t,n,o="";if("string"===typeof e||"number"===typeof e)o+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t{let n=e;return"string"===typeof t||Array.isArray(t)?n=e.toLocaleString(t,r):!0!==t&&void 0===r||(n=e.toLocaleString(void 0,r)),n};e.exports=(e,a)=>{if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);const c=(a=Object.assign({bits:!1,binary:!1},a)).bits?a.binary?i:n:a.binary?r:t;if(a.signed&&0===e)return` 0 ${c[0]}`;const u=e<0,s=u?"-":a.signed?"+":"";let l;if(u&&(e=-e),void 0!==a.minimumFractionDigits&&(l={minimumFractionDigits:a.minimumFractionDigits}),void 0!==a.maximumFractionDigits&&(l=Object.assign({maximumFractionDigits:a.maximumFractionDigits},l)),e<1){return s+o(e,a.locale,l)+" "+c[0]}const d=Math.min(Math.floor(a.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),c.length-1);e/=Math.pow(a.binary?1024:1e3,d),l||(e=e.toPrecision(3));return s+o(Number(e),a.locale,l)+" "+c[d]}},3549:function(e,t,r){r.d(t,{ZP:function(){return M}});var n=r(7294),i=Object.prototype.hasOwnProperty;var o=new WeakMap,a=0;var c=function(){function e(e){void 0===e&&(e={}),this.cache=new Map(Object.entries(e)),this.subs=[]}return e.prototype.get=function(e){var t=this.serializeKey(e)[0];return this.cache.get(t)},e.prototype.set=function(e,t){var r=this.serializeKey(e)[0];this.cache.set(r,t),this.notify()},e.prototype.keys=function(){return Array.from(this.cache.keys())},e.prototype.has=function(e){var t=this.serializeKey(e)[0];return this.cache.has(t)},e.prototype.clear=function(){this.cache.clear(),this.notify()},e.prototype.delete=function(e){var t=this.serializeKey(e)[0];this.cache.delete(t),this.notify()},e.prototype.serializeKey=function(e){var t=null;if("function"===typeof e)try{e=e()}catch(r){e=""}return Array.isArray(e)?(t=e,e=function(e){if(!e.length)return"";for(var t="arg",r=0;r-1&&(t.subs[n]=t.subs[t.subs.length-1],t.subs.length--)}}},e.prototype.notify=function(){for(var e=0,t=this.subs;er.errorRetryCount)){var o=Math.min(i.retryCount,8),a=~~((Math.random()+.5)*(1<0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0));return Promise.all(l).then((function(){return d.get(n)}))}return Promise.resolve(d.get(n))},P=function(e,t,r,n){var i=E[e];if(e&&i)for(var o=0;o0));return[2,Promise.all(m).then((function(){if(s)throw s;return d.get(i)}))]}if(s)throw s;return[2,u]}}))}))};Object.defineProperty(y.Provider,"default",{value:p});y.Provider;var M=function(){for(var e=this,t=[],r=0;r2?t[2]:2===t.length&&"object"===typeof t[1]?t[1]:{}),a=t.length>2||2===t.length&&"function"===typeof t[1]||null===t[1]?t[1]:o.fetcher,c=d.serializeKey(i),u=c[0],s=c[1],l=c[2],f=c[3],v=(0,n.useRef)(o);b((function(){v.current=o}));var B=function(){return o.revalidateOnMount||!o.initialData&&void 0===o.revalidateOnMount},I=function(){var e=d.get(u);return"undefined"===typeof e?o.initialData:e},M=function(){return!!d.get(f)||u&&B()},R=I(),F=d.get(l),T=M(),V=(0,n.useRef)({data:!1,error:!1,isValidating:!1}),j=(0,n.useRef)({data:R,error:F,isValidating:T});(0,n.useDebugValue)(j.current.data);var D,L,N=(0,n.useState)({})[1],A=(0,n.useCallback)((function(e){var t=!1;for(var r in e)j.current[r]!==e[r]&&(j.current[r]=e[r],V.current[r]&&(t=!0));if(t){if(q.current||!K.current)return;N({})}}),[]),q=(0,n.useRef)(!1),H=(0,n.useRef)(u),K=(0,n.useRef)(!1),W=(0,n.useCallback)((function(e){for(var t,r=[],n=1;n=0&&(r[n]=r[r.length-1],r.pop())}},X=(0,n.useCallback)((function(t){return void 0===t&&(t={}),g(e,void 0,void 0,(function(){var e,r,n,i,c,p,h,m,b,y;return k(this,(function(g){switch(g.label){case 0:if(!u||!a)return[2,!1];if(q.current)return[2,!1];if(v.current.isPaused())return[2,!1];e=t.retryCount,r=void 0===e?0:e,n=t.dedupe,i=void 0!==n&&n,c=!0,p="undefined"!==typeof w[u]&&i,g.label=1;case 1:return g.trys.push([1,6,,7]),A({isValidating:!0}),d.set(f,!0),p||P(u,j.current.data,j.current.error,!0),h=void 0,m=void 0,p?(m=x[u],[4,w[u]]):[3,3];case 2:return h=g.sent(),[3,5];case 3:return o.loadingTimeout&&!d.get(u)&&setTimeout((function(){c&&W("onLoadingSlow",u,o)}),o.loadingTimeout),w[u]=null!==s?a.apply(void 0,s):a(u),x[u]=m=z(),[4,w[u]];case 4:h=g.sent(),setTimeout((function(){delete w[u],delete x[u]}),o.dedupingInterval),W("onSuccess",h,u,o),g.label=5;case 5:return x[u]>m?[2,!1]:O[u]&&(m<=O[u]||m<=S[u]||0===S[u])?(A({isValidating:!1}),[2,!1]):(d.set(l,void 0),d.set(f,!1),b={isValidating:!1},"undefined"!==typeof j.current.error&&(b.error=void 0),o.compare(j.current.data,h)||(b.data=h),o.compare(d.get(u),h)||d.set(u,h),A(b),p||P(u,h,b.error,!1),[3,7]);case 6:return y=g.sent(),delete w[u],delete x[u],v.current.isPaused()?(A({isValidating:!1}),[2,!1]):(d.set(l,y),j.current.error!==y&&(A({isValidating:!1,error:y}),p||P(u,void 0,y,!1)),W("onError",y,u,o),o.shouldRetryOnError&&W("onErrorRetry",y,u,o,X,{retryCount:r+1,dedupe:!0}),[3,7]);case 7:return c=!1,[2,!0]}}))}))}),[u]);if(b((function(){if(u){q.current=!1;var e=K.current;K.current=!0;var t=j.current.data,r=I();H.current=u,o.compare(t,r)||A({data:r});var n=function(){return X({dedupe:!0})};(e||B())&&("undefined"===typeof r||h?n():m(n));var i=!1,a=_(C,(function(){!i&&v.current.revalidateOnFocus&&(i=!0,n(),setTimeout((function(){return i=!1}),v.current.focusThrottleInterval))})),c=_(Z,(function(){v.current.revalidateOnReconnect&&n()})),s=_(E,(function(e,t,r,i,a){void 0===e&&(e=!0),void 0===a&&(a=!0);var c={},u=!1;return"undefined"===typeof t||o.compare(j.current.data,t)||(c.data=t,u=!0),j.current.error!==r&&(c.error=r,u=!0),"undefined"!==typeof i&&j.current.isValidating!==i&&(c.isValidating=i,u=!0),u&&A(c),!!e&&(a?n():X())}));return function(){A=function(){return null},q.current=!0,a(),c(),s()}}}),[u,X]),b((function(){var t=null,r=function(){return g(e,void 0,void 0,(function(){return k(this,(function(e){switch(e.label){case 0:return j.current.error||!v.current.refreshWhenHidden&&!v.current.isDocumentVisible()||!v.current.refreshWhenOffline&&!v.current.isOnline()?[3,2]:[4,X({dedupe:!0})];case 1:e.sent(),e.label=2;case 2:return v.current.refreshInterval&&t&&(t=setTimeout(r,v.current.refreshInterval)),[2]}}))}))};return v.current.refreshInterval&&(t=setTimeout(r,v.current.refreshInterval)),function(){t&&(clearTimeout(t),t=null)}}),[o.refreshInterval,o.refreshWhenHidden,o.refreshWhenOffline,X]),o.suspense){if(D=d.get(u),L=d.get(l),"undefined"===typeof D&&(D=R),"undefined"===typeof L&&(L=F),"undefined"===typeof D&&"undefined"===typeof L){if(w[u]||X(),w[u]&&"function"===typeof w[u].then)throw w[u];D=w[u]}if("undefined"===typeof D&&L)throw L}var Y=(0,n.useMemo)((function(){var e={revalidate:X,mutate:G};return Object.defineProperties(e,{error:{get:function(){return V.current.error=!0,o.suspense?L:H.current===u?j.current.error:F},enumerable:!0},data:{get:function(){return V.current.data=!0,o.suspense?D:H.current===u?j.current.data:R},enumerable:!0},isValidating:{get:function(){return V.current.isValidating=!0,!!u&&j.current.isValidating},enumerable:!0}}),e}),[X,R,F,G,u,o.suspense,L,D]);return Y}},2710:function(e,t,r){function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{let n=e;return"string"===typeof t||Array.isArray(t)?n=e.toLocaleString(t,r):!0!==t&&void 0===r||(n=e.toLocaleString(void 0,r)),n};e.exports=(e,a)=>{if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);const c=(a=Object.assign({bits:!1,binary:!1},a)).bits?a.binary?i:n:a.binary?r:t;if(a.signed&&0===e)return` 0 ${c[0]}`;const u=e<0,s=u?"-":a.signed?"+":"";let l;if(u&&(e=-e),void 0!==a.minimumFractionDigits&&(l={minimumFractionDigits:a.minimumFractionDigits}),void 0!==a.maximumFractionDigits&&(l=Object.assign({maximumFractionDigits:a.maximumFractionDigits},l)),e<1){return s+o(e,a.locale,l)+" "+c[0]}const d=Math.min(Math.floor(a.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),c.length-1);e/=Math.pow(a.binary?1024:1e3,d),l||(e=e.toPrecision(3));return s+o(Number(e),a.locale,l)+" "+c[d]}},8575:function(e,t,r){r.d(t,{ZP:function(){return R}});var n=r(7294),i=Object.prototype.hasOwnProperty;var o=new WeakMap,a=0;var c=function(){function e(e){void 0===e&&(e={}),this.cache=new Map(Object.entries(e)),this.subs=[]}return e.prototype.get=function(e){var t=this.serializeKey(e)[0];return this.cache.get(t)},e.prototype.set=function(e,t){var r=this.serializeKey(e)[0];this.cache.set(r,t),this.notify()},e.prototype.keys=function(){return Array.from(this.cache.keys())},e.prototype.has=function(e){var t=this.serializeKey(e)[0];return this.cache.has(t)},e.prototype.clear=function(){this.cache.clear(),this.notify()},e.prototype.delete=function(e){var t=this.serializeKey(e)[0];this.cache.delete(t),this.notify()},e.prototype.serializeKey=function(e){var t=null;if("function"===typeof e)try{e=e()}catch(r){e=""}return Array.isArray(e)?(t=e,e=function(e){if(!e.length)return"";for(var t="arg",r=0;r-1&&(t.subs[n]=t.subs[t.subs.length-1],t.subs.length--)}}},e.prototype.notify=function(){for(var e=0,t=this.subs;er.errorRetryCount)){var o=Math.min(i.retryCount,8),a=~~((Math.random()+.5)*(1<0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0));return Promise.all(l).then((function(){return d.get(n)}))}return Promise.resolve(d.get(n))},I=function(e,t,r,n){var i=E[e];if(e&&i)for(var o=0;o0));return[2,Promise.all(m).then((function(){if(s)throw s;return d.get(i)}))]}if(s)throw s;return[2,u]}}))}))};Object.defineProperty(g.Provider,"default",{value:p});g.Provider;var R=function(){for(var e=this,t=[],r=0;r2?t[2]:2===t.length&&"object"===typeof t[1]?t[1]:{}),a=t.length>2||2===t.length&&"function"===typeof t[1]||null===t[1]?t[1]:o.fetcher,c=d.serializeKey(i),u=c[0],s=c[1],l=c[2],f=c[3],b=(0,n.useRef)(o);v((function(){b.current=o}));var S=function(){return o.revalidateOnMount||!o.initialData&&void 0===o.revalidateOnMount},P=function(){var e=d.get(u);return"undefined"===typeof e?o.initialData:e},R=function(){return!!d.get(f)||u&&S()},M=P(),F=d.get(l),T=R(),V=(0,n.useRef)({data:!1,error:!1,isValidating:!1}),D=(0,n.useRef)({data:M,error:F,isValidating:T});(0,n.useDebugValue)(D.current.data);var L,N,j=(0,n.useState)({})[1],q=(0,n.useCallback)((function(e){var t=!1;for(var r in e)D.current[r]!==e[r]&&(D.current[r]=e[r],V.current[r]&&(t=!0));if(t){if(A.current||!K.current)return;j({})}}),[]),A=(0,n.useRef)(!1),H=(0,n.useRef)(u),K=(0,n.useRef)(!1),W=(0,n.useCallback)((function(e){for(var t,r=[],n=1;n=0&&(r[n]=r[r.length-1],r.pop())}},X=(0,n.useCallback)((function(t){return void 0===t&&(t={}),y(e,void 0,void 0,(function(){var e,r,n,i,c,p,h,m,v,g;return k(this,(function(y){switch(y.label){case 0:if(!u||!a)return[2,!1];if(A.current)return[2,!1];if(b.current.isPaused())return[2,!1];e=t.retryCount,r=void 0===e?0:e,n=t.dedupe,i=void 0!==n&&n,c=!0,p="undefined"!==typeof w[u]&&i,y.label=1;case 1:return y.trys.push([1,6,,7]),q({isValidating:!0}),d.set(f,!0),p||I(u,D.current.data,D.current.error,!0),h=void 0,m=void 0,p?(m=x[u],[4,w[u]]):[3,3];case 2:return h=y.sent(),[3,5];case 3:return o.loadingTimeout&&!d.get(u)&&setTimeout((function(){c&&W("onLoadingSlow",u,o)}),o.loadingTimeout),w[u]=null!==s?a.apply(void 0,s):a(u),x[u]=m=B(),[4,w[u]];case 4:h=y.sent(),setTimeout((function(){delete w[u],delete x[u]}),o.dedupingInterval),W("onSuccess",h,u,o),y.label=5;case 5:return x[u]>m?[2,!1]:O[u]&&(m<=O[u]||m<=z[u]||0===z[u])?(q({isValidating:!1}),[2,!1]):(d.set(l,void 0),d.set(f,!1),v={isValidating:!1},"undefined"!==typeof D.current.error&&(v.error=void 0),o.compare(D.current.data,h)||(v.data=h),o.compare(d.get(u),h)||d.set(u,h),q(v),p||I(u,h,v.error,!1),[3,7]);case 6:return g=y.sent(),delete w[u],delete x[u],b.current.isPaused()?(q({isValidating:!1}),[2,!1]):(d.set(l,g),D.current.error!==g&&(q({isValidating:!1,error:g}),p||I(u,void 0,g,!1)),W("onError",g,u,o),o.shouldRetryOnError&&W("onErrorRetry",g,u,o,X,{retryCount:r+1,dedupe:!0}),[3,7]);case 7:return c=!1,[2,!0]}}))}))}),[u]);if(v((function(){if(u){A.current=!1;var e=K.current;K.current=!0;var t=D.current.data,r=P();H.current=u,o.compare(t,r)||q({data:r});var n=function(){return X({dedupe:!0})};(e||S())&&("undefined"===typeof r||h?n():m(n));var i=!1,a=_(C,(function(){!i&&b.current.revalidateOnFocus&&(i=!0,n(),setTimeout((function(){return i=!1}),b.current.focusThrottleInterval))})),c=_(Z,(function(){b.current.revalidateOnReconnect&&n()})),s=_(E,(function(e,t,r,i,a){void 0===e&&(e=!0),void 0===a&&(a=!0);var c={},u=!1;return"undefined"===typeof t||o.compare(D.current.data,t)||(c.data=t,u=!0),D.current.error!==r&&(c.error=r,u=!0),"undefined"!==typeof i&&D.current.isValidating!==i&&(c.isValidating=i,u=!0),u&&q(c),!!e&&(a?n():X())}));return function(){q=function(){return null},A.current=!0,a(),c(),s()}}}),[u,X]),v((function(){var t=null,r=function(){return y(e,void 0,void 0,(function(){return k(this,(function(e){switch(e.label){case 0:return D.current.error||!b.current.refreshWhenHidden&&!b.current.isDocumentVisible()||!b.current.refreshWhenOffline&&!b.current.isOnline()?[3,2]:[4,X({dedupe:!0})];case 1:e.sent(),e.label=2;case 2:return b.current.refreshInterval&&t&&(t=setTimeout(r,b.current.refreshInterval)),[2]}}))}))};return b.current.refreshInterval&&(t=setTimeout(r,b.current.refreshInterval)),function(){t&&(clearTimeout(t),t=null)}}),[o.refreshInterval,o.refreshWhenHidden,o.refreshWhenOffline,X]),o.suspense){if(L=d.get(u),N=d.get(l),"undefined"===typeof L&&(L=M),"undefined"===typeof N&&(N=F),"undefined"===typeof L&&"undefined"===typeof N){if(w[u]||X(),w[u]&&"function"===typeof w[u].then)throw w[u];L=w[u]}if("undefined"===typeof L&&N)throw N}var Y=(0,n.useMemo)((function(){var e={revalidate:X,mutate:G};return Object.defineProperties(e,{error:{get:function(){return V.current.error=!0,o.suspense?N:H.current===u?D.current.error:F},enumerable:!0},data:{get:function(){return V.current.data=!0,o.suspense?L:H.current===u?D.current.data:M},enumerable:!0},isValidating:{get:function(){return V.current.isValidating=!0,!!u&&D.current.isValidating},enumerable:!0}}),e}),[X,M,F,G,u,o.suspense,N,L]);return Y}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/97.460c758160110aabc924.js b/striker-ui/out/_next/static/chunks/97.4025a661f871d4b5b823.js similarity index 70% rename from striker-ui/out/_next/static/chunks/97.460c758160110aabc924.js rename to striker-ui/out/_next/static/chunks/97.4025a661f871d4b5b823.js index 1b5cea96..107f4392 100644 --- a/striker-ui/out/_next/static/chunks/97.460c758160110aabc924.js +++ b/striker-ui/out/_next/static/chunks/97.4025a661f871d4b5b823.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[97],{7097:function(e,r,n){n.r(r);var t=n(5893),c=n(7294),u=n(8753),o=function(e){var r=(0,c.useRef)(null),n=e.rfb,o=e.url,i=e.viewOnly,s=e.focusOnClick,l=e.clipViewport,f=e.dragViewport,v=e.scaleViewport,a=e.resizeSession,d=e.showDotCursor,w=e.background,p=e.qualityLevel,m=e.compressionLevel;(0,c.useEffect)((function(){return r.current?(n.current||(r.current.innerHTML="",n.current=new u.Z(r.current,o),n.current.viewOnly=i,n.current.focusOnClick=s,n.current.clipViewport=l,n.current.dragViewport=f,n.current.resizeSession=a,n.current.scaleViewport=v,n.current.showDotCursor=d,n.current.background=w,n.current.qualityLevel=p,n.current.compressionLevel=m),n.current?function(){n.current&&(n.current.disconnect(),n.current=void 0)}:void 0):function(){n.current&&(null===n||void 0===n||n.current.disconnect(),n.current=void 0)}}),[n]);return(0,t.jsx)("div",{style:{width:"100%",height:"75vh"},ref:r,onMouseEnter:function(){document.activeElement&&document.activeElement instanceof HTMLElement&&document.activeElement.blur(),null!==n&&void 0!==n&&n.current&&n.current.focus()}})};r.default=(0,c.memo)(o)}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[97],{7097:function(e,r,n){n.r(r);var t=n(7294),c=n(8753),u=n(5893),o=function(e){var r=(0,t.useRef)(null),n=e.rfb,o=e.url,i=e.viewOnly,s=e.focusOnClick,l=e.clipViewport,f=e.dragViewport,v=e.scaleViewport,a=e.resizeSession,d=e.showDotCursor,w=e.background,p=e.qualityLevel,m=e.compressionLevel;(0,t.useEffect)((function(){return r.current?(n.current||(r.current.innerHTML="",n.current=new c.Z(r.current,o),n.current.viewOnly=i,n.current.focusOnClick=s,n.current.clipViewport=l,n.current.dragViewport=f,n.current.resizeSession=a,n.current.scaleViewport=v,n.current.showDotCursor=d,n.current.background=w,n.current.qualityLevel=p,n.current.compressionLevel=m),n.current?function(){n.current&&(n.current.disconnect(),n.current=void 0)}:void 0):function(){n.current&&(null===n||void 0===n||n.current.disconnect(),n.current=void 0)}}),[n]);return(0,u.jsx)("div",{style:{width:"100%",height:"75vh"},ref:r,onMouseEnter:function(){document.activeElement&&document.activeElement instanceof HTMLElement&&document.activeElement.blur(),null!==n&&void 0!==n&&n.current&&n.current.focus()}})};r.default=(0,t.memo)(o)}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/main-62b8caa3ccc47893b147.js b/striker-ui/out/_next/static/chunks/main-62b8caa3ccc47893b147.js new file mode 100644 index 00000000..8ddff2c5 --- /dev/null +++ b/striker-ui/out/_next/static/chunks/main-62b8caa3ccc47893b147.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[179],{7228:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))})},6792:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=null;return{mountedInstances:new Set,updateHead:function(t){var r=e=Promise.resolve().then((function(){if(r===e){e=null;var o={};t.forEach((function(e){"link"===e.type&&e.props["data-optimized-fonts"]&&!document.querySelector('style[data-href="'.concat(e.props["data-href"],'"]'))&&(e.props.href=e.props["data-href"],e.props["data-href"]=void 0);var t=o[e.type]||[];t.push(e),o[e.type]=t}));var a=o.title?o.title[0]:null,i="";if(a){var u=a.props.children;i="string"===typeof u?u:Array.isArray(u)?u.join(""):""}i!==document.title&&(document.title=i),["meta","base","link","style","script"].forEach((function(e){!function(e,t){var r=document.getElementsByTagName("head")[0],o=r.querySelector("meta[name=next-head-count]");0;for(var a=Number(o.content),i=[],u=0,c=o.previousElementSibling;u0&&void 0!==s[0]?s[0]:{},r=I,e.prev=3,e.next=6,K.routeLoader.whenEntrypoint("/_app");case 6:if(!("error"in(o=e.sent))){e.next=9;break}throw o.error;case 9:a=o.component,i=o.exports,ee=a,i&&i.reportWebVitals&&(te=function(e){var t,r=e.id,n=e.name,o=e.startTime,a=e.value,u=e.duration,c=e.entryType,s=e.entries,l="".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12);s&&s.length&&(t=s[0].startTime),i.reportWebVitals({id:r||l,name:n,startTime:o||t,value:null==a?u:a,label:"mark"===c||"measure"===c?"custom":"web-vital"})}),e.next=16;break;case 16:return e.next=18,K.routeLoader.whenEntrypoint(N);case 18:e.t0=e.sent;case 19:if(!("error"in(u=e.t0))){e.next=22;break}throw u.error;case 22:oe=u.component,e.next=27;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(3),r=e.t1;case 32:if(!window.__NEXT_PRELOADREADY){e.next=36;break}return e.next=36,window.__NEXT_PRELOADREADY(q);case 36:return t.router=Z=O.createRouter(N,D,Q,{initialProps:T,pageLoader:K,App:ee,Component:oe,wrapApp:ye,err:r,isFallback:Boolean(B),subscription:function(e,t,r){return se(Object.assign({},e,{App:t,scroll:r}))},locale:W,locales:G,defaultLocale:X,domainLocales:z,isPreview:V}),se(c={App:ee,initial:!0,Component:oe,props:T,err:r}),e.abrupt("return",ie);case 43:return e.abrupt("return",{emitter:ie,renderCtx:c});case 44:case"end":return e.stop()}}),e,null,[[3,29]])})))).apply(this,arguments)}function ce(){return(ce=C(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.err){e.next=4;break}return e.next=3,le(t);case 3:return e.abrupt("return");case 4:return e.prev=4,e.next=7,ge(t);case 7:e.next=16;break;case 9:if(e.prev=9,e.t0=e.catch(4),!e.t0.cancelled){e.next=13;break}throw e.t0;case 13:return e.next=16,le(L({},t,{err:e.t0}));case 16:case"end":return e.stop()}}),e,null,[[4,9]])})))).apply(this,arguments)}function se(e){return ce.apply(this,arguments)}function le(e){var t=e.App,n=e.err;return console.error(n),console.error("A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred"),K.loadPage("/_error").then((function(e){var t=e.page,n=e.styleSheets;return(null===me||void 0===me?void 0:me.Component)===t?Promise.resolve().then((function(){return function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(3359))})).then((function(e){return{ErrorComponent:e.default,styleSheets:[]}})):{ErrorComponent:t,styleSheets:n}})).then((function(r){var o=r.ErrorComponent,a=r.styleSheets,i=ye(t),u={Component:o,AppTree:i,router:Z,ctx:{err:n,pathname:N,query:D,asPath:Q,AppTree:i}};return Promise.resolve(e.props?e.props:_.loadGetInitialProps(t,u)).then((function(t){return ge(L({},e,{err:n,Component:o,styleSheets:a,props:t}))}))}))}t.emitter=ie;var fe=!0;function pe(){_.ST&&(performance.mark("afterHydrate"),performance.measure("Next.js-before-hydration","navigationStart","beforeRender"),performance.measure("Next.js-hydration","beforeRender","afterHydrate"),te&&performance.getEntriesByName("Next.js-hydration").forEach(te),he())}function de(){if(_.ST){performance.mark("afterRender");var e=performance.getEntriesByName("routeChange","mark");e.length&&(performance.measure("Next.js-route-change-to-render",e[0].name,"beforeRender"),performance.measure("Next.js-render","beforeRender","afterRender"),te&&(performance.getEntriesByName("Next.js-render").forEach(te),performance.getEntriesByName("Next.js-route-change-to-render").forEach(te)),he(),["Next.js-route-change-to-render","Next.js-render"].forEach((function(e){return performance.clearMeasures(e)})))}}function he(){["beforeRender","afterHydrate","afterRender","routeChange"].forEach((function(e){return performance.clearMarks(e)}))}function ve(e){var t=e.children;return f.default.createElement(ae,{fn:function(e){return le({App:ee,err:e}).catch((function(e){return console.error("Error rendering page: ",e)}))}},f.default.createElement(v.RouterContext.Provider,{value:O.makePublicRouterInstance(Z)},f.default.createElement(d.HeadManagerContext.Provider,{value:re},t)))}var me,ye=function(e){return function(t){var r=L({},t,{Component:oe,err:I,router:Z});return f.default.createElement(ve,null,f.default.createElement(e,Object.assign({},r)))}};function ge(e){var t=e.App,r=e.Component,n=e.props,o=e.err,a="initial"in e?void 0:e.styleSheets;r=r||me.Component;var i=L({},n=n||me.props,{Component:r,err:o,router:Z});me=i;var u,c=!1,s=new Promise((function(e,t){J&&J(),u=function(){J=null,e()},J=function(){c=!0,J=null;var e=new Error("Cancel rendering route");e.cancelled=!0,t(e)}}));function l(){u()}!function(){if(!a)return!1;var e=A(document.querySelectorAll("style[data-n-href]")),t=new Set(e.map((function(e){return e.getAttribute("data-n-href")}))),r=document.querySelector("noscript[data-n-css]"),n=null===r||void 0===r?void 0:r.getAttribute("data-n-css");a.forEach((function(e){var r=e.href,o=e.text;if(!t.has(r)){var a=document.createElement("style");a.setAttribute("data-n-href",r),a.setAttribute("media","x"),n&&a.setAttribute("nonce",n),document.head.appendChild(a),a.appendChild(document.createTextNode(o))}}))}();var d=f.default.createElement(f.default.Fragment,null,f.default.createElement(_e,{callback:function(){if(a&&!c){for(var t=new Set(a.map((function(e){return e.href}))),r=A(document.querySelectorAll("style[data-n-href]")),n=r.map((function(e){return e.getAttribute("data-n-href")})),o=0;o=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,i=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var f=new Map,p=new Set,d=["onLoad","dangerouslySetInnerHTML","children","onError","strategy"],h=function(e){var t=e.src,r=e.id,o=e.onLoad,a=void 0===o?function(){}:o,u=e.dangerouslySetInnerHTML,c=e.children,s=void 0===c?"":c,l=e.strategy,h=void 0===l?"afterInteractive":l,v=e.onError,m=r||t;if(!m||!p.has(m)){if(f.has(t))return p.add(m),void f.get(t).then(a,v);var y=document.createElement("script"),g=new Promise((function(e,t){y.addEventListener("load",(function(t){e(),a&&a.call(this,t)})),y.addEventListener("error",(function(e){t(e)}))})).catch((function(e){v&&v(e)}));t&&f.set(t,g),p.add(m),u?y.innerHTML=u.__html||"":s?y.textContent="string"===typeof s?s:Array.isArray(s)?s.join(""):"":t&&(y.src=t);for(var b=0,_=Object.entries(e);b<_.length;b++){var x=n(_[b],2),w=x[0],S=x[1];if(void 0!==S&&!d.includes(w)){var P=i.DOMAttributeNames[w]||w.toLowerCase();y.setAttribute(P,S)}}y.setAttribute("data-nscript",h),document.body.appendChild(y)}};function v(e){var t=e.strategy,r=void 0===t?"afterInteractive":t;"afterInteractive"===r?h(e):"lazyOnload"===r&&window.addEventListener("load",(function(){u.requestIdleCallback((function(){return h(e)}))}))}var m=function(e){var t=e.src,r=void 0===t?"":t,n=e.onLoad,i=void 0===n?function(){}:n,c=(e.dangerouslySetInnerHTML,e.strategy),f=void 0===c?"afterInteractive":c,d=e.onError,v=l(e,["src","onLoad","dangerouslySetInnerHTML","strategy","onError"]),m=o.useContext(a.HeadManagerContext),y=m.updateScripts,g=m.scripts,b=m.getIsSsr;return o.useEffect((function(){"afterInteractive"===f?h(e):"lazyOnload"===f&&function(e){"complete"===document.readyState?u.requestIdleCallback((function(){return h(e)})):window.addEventListener("load",(function(){u.requestIdleCallback((function(){return h(e)}))}))}(e)}),[e,f]),"beforeInteractive"===f&&(y?(g.beforeInteractive=(g.beforeInteractive||[]).concat([s({src:r,onLoad:i,onError:d},v)]),y(g)):b&&b()?p.add(v.id||r):b&&!b()&&h(e)),null};t.default=m},7413:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(t){return o.default.createElement(e,Object.assign({router:a.useRouter()},t))}t.getInitialProps=e.getInitialProps,t.origGetInitialProps=e.origGetInitialProps,!1;return t};var n,o=(n=r(7294))&&n.__esModule?n:{default:n},a=r(4651)},3359:function(e,t,r){"use strict";var n=r(4575),o=r(3913),a=r(2205),i=r(8585),u=r(9754);function c(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=u(e);if(t){var o=u(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return i(this,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=f(r(7294)),l=f(r(639));function f(e){return e&&e.__esModule?e:{default:e}}var p={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"};function d(e){var t=e.res,r=e.err;return{statusCode:t&&t.statusCode?t.statusCode:r?r.statusCode:404}}var h=function(e){a(r,e);var t=c(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"render",value:function(){var e=this.props.statusCode,t=this.props.title||p[e]||"An unexpected error has occurred";return s.default.createElement("div",{style:v.error},s.default.createElement(l.default,null,s.default.createElement("title",null,e?"".concat(e,": ").concat(t):"Application error: a client-side exception has occurred")),s.default.createElement("div",null,s.default.createElement("style",{dangerouslySetInnerHTML:{__html:"body { margin: 0 }"}}),e?s.default.createElement("h1",{style:v.h1},e):null,s.default.createElement("div",{style:v.desc},s.default.createElement("h2",{style:v.h2},this.props.title||e?t:s.default.createElement(s.default.Fragment,null,"Application error: a client-side exception has occurred (see the browser console for more information)"),"."))))}}]),r}(s.default.Component);h.displayName="ErrorPage",h.getInitialProps=d,h.origGetInitialProps=d,t.default=h;var v={error:{color:"#000",background:"#fff",fontFamily:'-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block",textAlign:"left",lineHeight:"49px",height:"49px",verticalAlign:"middle"},h1:{display:"inline-block",borderRight:"1px solid rgba(0, 0, 0,.3)",margin:0,marginRight:"20px",padding:"10px 23px 10px 0",fontSize:"24px",fontWeight:500,verticalAlign:"top"},h2:{fontSize:"14px",fontWeight:"normal",lineHeight:"inherit",margin:0,padding:0}}},6046:function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.AmpStateContext=void 0;var o=((n=r(7294))&&n.__esModule?n:{default:n}).default.createContext({});t.AmpStateContext=o},3237:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInAmpMode=i,t.useAmp=function(){return i(o.default.useContext(a.AmpStateContext))};var n,o=(n=r(7294))&&n.__esModule?n:{default:n},a=r(6046);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.ampFirst,r=void 0!==t&&t,n=e.hybrid,o=void 0!==n&&n,a=e.hasQuery,i=void 0!==a&&a;return r||o&&i}},699:function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.HeadManagerContext=void 0;var o=((n=r(7294))&&n.__esModule?n:{default:n}).default.createContext({});t.HeadManagerContext=o},639:function(e,t,r){"use strict";var n=r(9713);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.defaultHead=f,t.default=void 0;var a,i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(7294)),u=(a=r(4766))&&a.__esModule?a:{default:a},c=r(6046),s=r(699),l=r(3237);function f(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=[i.default.createElement("meta",{charSet:"utf-8"})];return e||t.push(i.default.createElement("meta",{name:"viewport",content:"width=device-width"})),t}function p(e,t){return"string"===typeof t||"number"===typeof t?e:t.type===i.default.Fragment?e.concat(i.default.Children.toArray(t.props.children).reduce((function(e,t){return"string"===typeof t||"number"===typeof t?e:e.concat(t)}),[])):e.concat(t)}var d=["name","httpEquiv","charSet","itemProp"];function h(e,t){return e.reduce((function(e,t){var r=i.default.Children.toArray(t.props.children);return e.concat(r)}),[]).reduce(p,[]).reverse().concat(f(t.inAmpMode)).filter(function(){var e=new Set,t=new Set,r=new Set,n={};return function(o){var a=!0,i=!1;if(o.key&&"number"!==typeof o.key&&o.key.indexOf("$")>0){i=!0;var u=o.key.slice(o.key.indexOf("$")+1);e.has(u)?a=!1:e.add(u)}switch(o.type){case"title":case"base":t.has(o.type)?a=!1:t.add(o.type);break;case"meta":for(var c=0,s=d.length;c>>0,1)},emit:function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o-1||r>-1)&&(e=e.substring(0,t>-1?t:r)),e}function P(e){return""===(e=S(e))||e.startsWith("/")}function E(e){return function(e,t){return t&&e.startsWith("/")?"/"===e?c.normalizePathTrailingSlash(t):"".concat(t).concat("/"===S(e)?e.substring(1):e):e}(e,"")}function O(e){return(e=e.slice("".length)).startsWith("/")||(e="/".concat(e)),e}function k(e){if(e.startsWith("/")||e.startsWith("#")||e.startsWith("?"))return!0;try{var t=p.getLocationOrigin(),r=new URL(e,t);return r.origin===t&&P(r.pathname)}catch(n){return!1}}function C(e,t,r){var n="",o=g.getRouteRegex(e),a=o.groups,i=(t!==e?y.getRouteMatcher(o)(t):"")||r;n=e;var u=Object.keys(a);return u.every((function(e){var t=i[e]||"",r=a[e],o=r.repeat,u=r.optional,c="[".concat(o?"...":"").concat(e,"]");return u&&(c="".concat(t?"":"/","[").concat(c,"]")),o&&!Array.isArray(t)&&(t=[t]),(u||e in i)&&(n=n.replace(c,o?t.map((function(e){return encodeURIComponent(e)})).join("/"):encodeURIComponent(t))||"/")}))||(n=""),{params:u,result:n}}function R(e,t){var r={};return Object.keys(e).forEach((function(n){t.includes(n)||(r[n]=e[n])})),r}function M(e,t,r){var n,o="string"===typeof t?t:p.formatWithValidation(t),a=o.match(/^[a-zA-Z]{1,}:\/\//),i=a?o.substr(a[0].length):o;if((i.split("?")[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href passed to next/router: ".concat(o,", repeated forward-slashes (//) or backslashes \\ are not valid in the href"));var u=p.normalizeRepeatedSlashes(i);o=(a?a[0]:"")+u}if(!k(o))return r?[o]:o;try{n=new URL(o.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(b){n=new URL("/","http://n")}try{var s=new URL(o,n);s.pathname=c.normalizePathTrailingSlash(s.pathname);var l="";if(d.isDynamicRoute(s.pathname)&&s.searchParams&&r){var f=v.searchParamsToUrlQuery(s.searchParams),h=C(s.pathname,s.pathname,f),m=h.result,y=h.params;m&&(l=p.formatWithValidation({pathname:m,hash:s.hash,query:R(f,y)}))}var g=s.origin===n.origin?s.href.slice(s.origin.length):s.href;return r?[g,l||g]:g}catch(b){return r?[o]:o}}function L(e){var t=p.getLocationOrigin();return e.startsWith(t)?e.substring(t.length):e}function j(e,t,r){var n=M(e,t,!0),o=u(n,2),a=o[0],i=o[1],c=p.getLocationOrigin(),s=a.startsWith(c),l=i&&i.startsWith(c);a=L(a),i=i?L(i):i;var f=s?a:E(a),d=r?L(M(e,r)):i||a;return{url:f,as:l?d:E(d)}}function A(e,t){var r=c.removePathTrailingSlash(l.denormalizePagePath(e));return"/404"===r||"/_error"===r?e:(t.includes(r)||t.some((function(t){if(d.isDynamicRoute(t)&&g.getRouteRegex(t).re.test(r))return e=t,!0})),c.removePathTrailingSlash(e))}var T=Symbol("SSG_DATA_NOT_FOUND");function I(e,t){return fetch(e,{credentials:"same-origin"}).then((function(r){if(!r.ok){if(t>1&&r.status>=500)return I(e,t-1);if(404===r.status)return r.json().then((function(e){if(e.notFound)return{notFound:T};throw new Error("Failed to load static props")}));throw new Error("Failed to load static props")}return r.json()}))}function N(e,t){return I(e,t?3:1).catch((function(e){throw t||s.markAssetError(e),e}))}var D=function(){function e(t,r,n,o){var i=this,u=o.initialProps,s=o.pageLoader,l=o.App,f=o.wrapApp,v=o.Component,m=o.err,y=o.subscription,g=o.isFallback,b=o.locale,_=(o.locales,o.defaultLocale,o.domainLocales,o.isPreview);a(this,e),this.sdc={},this.sdr={},this._idx=0,this.onPopState=function(e){var t=e.state;if(t){if(t.__N){var r=t.url,n=t.as,o=t.options,a=t.idx;i._idx=a;var u=h.parseRelativeUrl(r).pathname;i.isSsr&&n===i.asPath&&u===i.pathname||i._bps&&!i._bps(t)||i.change("replaceState",r,n,Object.assign({},o,{shallow:o.shallow&&i._shallow,locale:o.locale||i.defaultLocale}),undefined)}}else{var c=i.pathname,s=i.query;i.changeState("replaceState",p.formatWithValidation({pathname:E(c),query:s}),p.getURL())}},this.route=c.removePathTrailingSlash(t),this.components={},"/_error"!==t&&(this.components[this.route]={Component:v,initial:!0,props:u,err:m,__N_SSG:u&&u.__N_SSG,__N_SSP:u&&u.__N_SSP}),this.components["/_app"]={Component:l,styleSheets:[]},this.events=e.events,this.pageLoader=s,this.pathname=t,this.query=r;var x=d.isDynamicRoute(t)&&self.__NEXT_DATA__.autoExport;if(this.asPath=x?t:n,this.basePath="",this.sub=y,this.clc=null,this._wrapApp=f,this.isSsr=!0,this.isFallback=g,this.isReady=!!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp||!x&&!self.location.search),this.isPreview=!!_,this.isLocaleDomain=!1,"//"!==n.substr(0,2)){var w={locale:b};w._shouldResolveHref=n!==t,this.changeState("replaceState",p.formatWithValidation({pathname:E(t),query:r}),p.getURL(),w)}window.addEventListener("popstate",this.onPopState)}return i(e,[{key:"reload",value:function(){window.location.reload()}},{key:"back",value:function(){window.history.back()}},{key:"push",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=j(this,e,t);return e=n.url,t=n.as,this.change("pushState",e,t,r)}},{key:"replace",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=j(this,e,t);return e=n.url,t=n.as,this.change("replaceState",e,t,r)}},{key:"change",value:function(){var t=o(n.mark((function t(r,o,a,i,u){var l,f,v,m,b,_,S,M,L,I,N,D,F,H,U,q,B,W,G,z,V,X,$,Q,K,Y,J,Z,ee,te,re,ne,oe,ae,ie,ue,ce,se;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(k(o)){t.next=3;break}return window.location.href=o,t.abrupt("return",!1);case 3:l=o===a||i._h||i._shouldResolveHref,i._h&&(this.isReady=!0),f=this.locale,t.next=18;break;case 18:if(i._h||(this.isSsr=!1),p.ST&&performance.mark("routeChange"),m=i.shallow,b={shallow:void 0!==m&&m},this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute,b),a=E(x(P(a)?O(a):a,i.locale,this.defaultLocale)),_=w(P(a)?O(a):a,this.locale),this._inFlightRoute=a,S=f!==this.locale,i._h||!this.onlyAHashChange(_)||S){t.next=35;break}return this.asPath=_,e.events.emit("hashChangeStart",a,b),this.changeState(r,o,a,i),this.scrollToHash(_),this.notify(this.components[this.route],null),e.events.emit("hashChangeComplete",a,b),t.abrupt("return",!0);case 35:return M=h.parseRelativeUrl(o),L=M.pathname,I=M.query,t.prev=37,t.next=40,this.pageLoader.getPageList();case 40:return N=t.sent,t.next=43,s.getClientBuildManifest();case 43:D=t.sent,D.__rewrites,t.next=51;break;case 47:return t.prev=47,t.t0=t.catch(37),window.location.href=a,t.abrupt("return",!1);case 51:if(this.urlIsNew(_)||S||(r="replaceState"),F=a,L=L?c.removePathTrailingSlash(O(L)):L,l&&"/_error"!==L&&(i._shouldResolveHref=!0,M.pathname=A(L,N),M.pathname!==L&&(L=M.pathname,M.pathname=E(L),o=p.formatWithValidation(M))),H=c.removePathTrailingSlash(L),k(a)){t.next=61;break}t.next=59;break;case 59:return window.location.href=a,t.abrupt("return",!1);case 61:if(F=w(O(F),this.locale),!d.isDynamicRoute(H)){t.next=77;break}if(U=h.parseRelativeUrl(F),q=U.pathname,B=g.getRouteRegex(H),W=y.getRouteMatcher(B)(q),z=(G=H===q)?C(H,q,I):{},W&&(!G||z.result)){t.next=76;break}if(!((V=Object.keys(B.groups).filter((function(e){return!I[e]}))).length>0)){t.next=74;break}throw new Error((G?"The provided `href` (".concat(o,") value is missing query values (").concat(V.join(", "),") to be interpolated properly. "):"The provided `as` value (".concat(q,") is incompatible with the `href` value (").concat(H,"). "))+"Read more: https://nextjs.org/docs/messages/".concat(G?"href-interpolation-failed":"incompatible-href-as"));case 74:t.next=77;break;case 76:G?a=p.formatWithValidation(Object.assign({},U,{pathname:z.result,query:R(I,z.params)})):Object.assign(I,W);case 77:return e.events.emit("routeChangeStart",a,b),t.prev=78,t.next=81,this.getRouteInfo(H,L,I,a,F,b);case 81:if($=t.sent,K=(Q=$).error,Y=Q.props,J=Q.__N_SSG,Z=Q.__N_SSP,!J&&!Z||!Y){t.next=107;break}if(!Y.pageProps||!Y.pageProps.__N_REDIRECT){t.next=93;break}if(!(ee=Y.pageProps.__N_REDIRECT).startsWith("/")){t.next=91;break}return(te=h.parseRelativeUrl(ee)).pathname=A(te.pathname,N),re=j(this,ee,ee),ne=re.url,oe=re.as,t.abrupt("return",this.change(r,ne,oe,i));case 91:return window.location.href=ee,t.abrupt("return",new Promise((function(){})));case 93:if(this.isPreview=!!Y.__N_PREVIEW,Y.notFound!==T){t.next=107;break}return t.prev=95,t.next=98,this.fetchComponent("/404");case 98:ae="/404",t.next=104;break;case 101:t.prev=101,t.t1=t.catch(95),ae="/_error";case 104:return t.next=106,this.getRouteInfo(ae,ae,I,a,F,{shallow:!1});case 106:$=t.sent;case 107:return e.events.emit("beforeHistoryChange",a,b),this.changeState(r,o,a,i),i._h&&"/_error"===L&&500===(null===(v=self.__NEXT_DATA__.props)||void 0===v||null===(X=v.pageProps)||void 0===X?void 0:X.statusCode)&&(null===Y||void 0===Y?void 0:Y.pageProps)&&(Y.pageProps.statusCode=500),ie=i.shallow&&this.route===H,ce=null!==(ue=i.scroll)&&void 0!==ue?ue:!ie,se=ce?{x:0,y:0}:null,t.next=116,this.set(H,L,I,_,$,null!==u&&void 0!==u?u:se).catch((function(e){if(!e.cancelled)throw e;K=K||e}));case 116:if(!K){t.next=119;break}throw e.events.emit("routeChangeError",K,_,b),K;case 119:return e.events.emit("routeChangeComplete",a,b),t.abrupt("return",!0);case 124:if(t.prev=124,t.t2=t.catch(78),!t.t2.cancelled){t.next=128;break}return t.abrupt("return",!1);case 128:throw t.t2;case 129:case"end":return t.stop()}}),t,this,[[37,47],[78,124],[95,101]])})));return function(e,r,n,o,a){return t.apply(this,arguments)}}()},{key:"changeState",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"pushState"===e&&p.getURL()===r||(this._shallow=n.shallow,window.history[e]({url:t,as:r,options:n,__N:!0,idx:this._idx="pushState"!==e?this._idx:this._idx+1},"",r))}},{key:"handleRouteInfoError",value:function(){var t=o(n.mark((function t(r,o,a,i,u,c){var l,f,p,d;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r.cancelled){t.next=2;break}throw r;case 2:if(!s.isAssetError(r)&&!c){t.next=6;break}throw e.events.emit("routeChangeError",r,i,u),window.location.href=i,_();case 6:if(t.prev=6,"undefined"!==typeof l&&"undefined"!==typeof f){t.next=13;break}return t.next=10,this.fetchComponent("/_error");case 10:p=t.sent,l=p.page,f=p.styleSheets;case 13:if((d={props:undefined,Component:l,styleSheets:f,err:r,error:r}).props){t.next=25;break}return t.prev=15,t.next=18,this.getInitialProps(l,{err:r,pathname:o,query:a});case 18:d.props=t.sent,t.next=25;break;case 21:t.prev=21,t.t0=t.catch(15),console.error("Error in error page `getInitialProps`: ",t.t0),d.props={};case 25:return t.abrupt("return",d);case 28:return t.prev=28,t.t1=t.catch(6),t.abrupt("return",this.handleRouteInfoError(t.t1,o,a,i,u,!0));case 31:case"end":return t.stop()}}),t,this,[[6,28],[15,21]])})));return function(e,r,n,o,a,i){return t.apply(this,arguments)}}()},{key:"getRouteInfo",value:function(){var e=o(n.mark((function e(t,r,o,a,i,u){var c,s,l,f,d,h,v,m,y=this;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,c=this.components[t],!u.shallow||!c||this.route!==t){e.next=4;break}return e.abrupt("return",c);case 4:if(!(s=c&&"initial"in c?void 0:c)){e.next=9;break}e.t0=s,e.next=12;break;case 9:return e.next=11,this.fetchComponent(t).then((function(e){return{Component:e.page,styleSheets:e.styleSheets,__N_SSG:e.mod.__N_SSG,__N_SSP:e.mod.__N_SSP}}));case 11:e.t0=e.sent;case 12:l=e.t0,f=l.Component,d=l.__N_SSG,h=l.__N_SSP,e.next=18;break;case 18:return(d||h)&&(v=this.pageLoader.getDataHref(p.formatWithValidation({pathname:r,query:o}),i,d,this.locale)),e.next=21,this._getData((function(){return d?y._getStaticData(v):h?y._getServerData(v):y.getInitialProps(f,{pathname:r,query:o,asPath:a,locale:y.locale,locales:y.locales,defaultLocale:y.defaultLocale})}));case 21:return m=e.sent,l.props=m,this.components[t]=l,e.abrupt("return",l);case 27:return e.prev=27,e.t1=e.catch(0),e.abrupt("return",this.handleRouteInfoError(e.t1,r,o,a,u));case 30:case"end":return e.stop()}}),e,this,[[0,27]])})));return function(t,r,n,o,a,i){return e.apply(this,arguments)}}()},{key:"set",value:function(e,t,r,n,o,a){return this.isFallback=!1,this.route=e,this.pathname=t,this.query=r,this.asPath=n,this.notify(o,a)}},{key:"beforePopState",value:function(e){this._bps=e}},{key:"onlyAHashChange",value:function(e){if(!this.asPath)return!1;var t=this.asPath.split("#"),r=u(t,2),n=r[0],o=r[1],a=e.split("#"),i=u(a,2),c=i[0],s=i[1];return!(!s||n!==c||o!==s)||n===c&&o!==s}},{key:"scrollToHash",value:function(e){var t=e.split("#"),r=u(t,2)[1];if(""!==r&&"top"!==r){var n=document.getElementById(r);if(n)n.scrollIntoView();else{var o=document.getElementsByName(r)[0];o&&o.scrollIntoView()}}else window.scrollTo(0,0)}},{key:"urlIsNew",value:function(e){return this.asPath!==e}},{key:"prefetch",value:function(){var e=o(n.mark((function e(t){var r,o,a,i,u,s,l,f,d,v,y=this,g=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=g.length>1&&void 0!==g[1]?g[1]:t,o=g.length>2&&void 0!==g[2]?g[2]:{},a=h.parseRelativeUrl(t),i=a.pathname,e.next=7,this.pageLoader.getPageList();case 7:u=e.sent,s=r,e.next=19;break;case 12:f=e.sent,l=f.__rewrites,d=m.default(E(x(r,this.locale)),u,l,a.query,(function(e){return A(e,u)}),this.locales),s=w(O(d.asPath),this.locale),d.matchedPage&&d.resolvedHref&&(i=d.resolvedHref,a.pathname=i,t=p.formatWithValidation(a)),e.next=21;break;case 19:a.pathname=A(a.pathname,u),a.pathname!==i&&(i=a.pathname,a.pathname=i,t=p.formatWithValidation(a));case 21:v=c.removePathTrailingSlash(i),e.next=24;break;case 24:return e.next=26,Promise.all([this.pageLoader._isSsg(v).then((function(e){return!!e&&y._getStaticData(y.pageLoader.getDataHref(t,s,!0,"undefined"!==typeof o.locale?o.locale:y.locale))})),this.pageLoader[o.priority?"loadPage":"prefetch"](v)]);case 26:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"fetchComponent",value:function(){var e=o(n.mark((function e(t){var r,o,a,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=!1,o=this.clc=function(){r=!0},e.next=4,this.pageLoader.loadPage(t);case 4:if(a=e.sent,!r){e.next=9;break}throw(i=new Error('Abort fetching component for route: "'.concat(t,'"'))).cancelled=!0,i;case 9:return o===this.clc&&(this.clc=null),e.abrupt("return",a);case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_getData",value:function(e){var t=this,r=!1,n=function(){r=!0};return this.clc=n,e().then((function(e){if(n===t.clc&&(t.clc=null),r){var o=new Error("Loading initial props cancelled");throw o.cancelled=!0,o}return e}))}},{key:"_getStaticData",value:function(e){var t=this,r=new URL(e,window.location.href).href;return!this.isPreview&&this.sdc[r]?Promise.resolve(this.sdc[r]):N(e,this.isSsr).then((function(e){return t.sdc[r]=e,e}))}},{key:"_getServerData",value:function(e){var t=this,r=new URL(e,window.location.href).href;return this.sdr[r]?this.sdr[r]:this.sdr[r]=N(e,this.isSsr).then((function(e){return delete t.sdr[r],e})).catch((function(e){throw delete t.sdr[r],e}))}},{key:"getInitialProps",value:function(e,t){var r=this.components["/_app"].Component,n=this._wrapApp(r);return t.AppTree=n,p.loadGetInitialProps(r,{AppTree:n,Component:e,router:this,ctx:t})}},{key:"abortComponentLoad",value:function(t,r){this.clc&&(e.events.emit("routeChangeError",_(),t,r),this.clc(),this.clc=null)}},{key:"notify",value:function(e,t){return this.sub(e,this.components["/_app"].Component,t)}}]),e}();D.events=f.default(),t.default=D},2065:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatUrl=function(e){var t=e.auth,r=e.hostname,a=e.protocol||"",i=e.pathname||"",u=e.hash||"",c=e.query||"",s=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?s=t+e.host:r&&(s=t+(~r.indexOf(":")?"[".concat(r,"]"):r),e.port&&(s+=":"+e.port));c&&"object"===typeof c&&(c=String(n.urlQueryToSearchParams(c)));var l=e.search||c&&"?".concat(c)||"";a&&":"!==a.substr(-1)&&(a+=":");e.slashes||(!a||o.test(a))&&!1!==s?(s="//"+(s||""),i&&"/"!==i[0]&&(i="/"+i)):s||(s="");u&&"#"!==u[0]&&(u="#"+u);l&&"?"!==l[0]&&(l="?"+l);return i=i.replace(/[?#]/g,encodeURIComponent),l=l.replace("#","%23"),"".concat(a).concat(s).concat(i).concat(l).concat(u)};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(9824));var o=/https?|ftp|gopher|file/},7055:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r="/"===e?"/index":/^\/index(\/|$)/.test(e)?"/index".concat(e):"".concat(e);return r+t}},6234:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDynamicRoute=function(e){return r.test(e)};var r=/\/\[[^/]+?\](?=\/|$)/},7658:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseRelativeUrl=function(e,t){var r=new URL(n.getLocationOrigin()),a=t?new URL(t,r):r,i=new URL(e,a),u=i.pathname,c=i.searchParams,s=i.search,l=i.hash,f=i.href;if(i.origin!==r.origin)throw new Error("invariant: invalid relative URL, router received ".concat(e));return{pathname:u,query:o.searchParamsToUrlQuery(c),search:s,hash:l,href:f.slice(r.origin.length)}};var n=r(9664),o=r(9824)},9824:function(e,t,r){"use strict";var n=r(3038);function o(e){return"string"===typeof e||"number"===typeof e&&!isNaN(e)||"boolean"===typeof e?String(e):""}Object.defineProperty(t,"__esModule",{value:!0}),t.searchParamsToUrlQuery=function(e){var t={};return e.forEach((function(e,r){"undefined"===typeof t[r]?t[r]=e:Array.isArray(t[r])?t[r].push(e):t[r]=[t[r],e]})),t},t.urlQueryToSearchParams=function(e){var t=new URLSearchParams;return Object.entries(e).forEach((function(e){var r=n(e,2),a=r[0],i=r[1];Array.isArray(i)?i.forEach((function(e){return t.append(a,o(e))})):t.set(a,o(i))})),t},t.assign=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0&&(o||r)&&(t.delta=t.value-(n||0),(t.delta||void 0===n)&&(n=t.value,e(t)))}},l=-1,f=function(){return"hidden"===document.visibilityState?0:1/0},p=function(){u((function(e){var t=e.timeStamp;l=t}),!0)},d=function(){return l<0&&(l=f(),p(),c((function(){setTimeout((function(){l=f(),p()}),0)}))),{get firstHiddenTime(){return l}}},h=function(e,t){var r,n=d(),o=a("FCP"),u=function(e){"first-contentful-paint"===e.name&&(f&&f.disconnect(),e.startTime=0&&r1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var r=function(){b(e,t),o()},n=function(){o()},o=function(){removeEventListener("pointerup",r,y),removeEventListener("pointercancel",n,y)};addEventListener("pointerup",r,y),addEventListener("pointercancel",n,y)}(t,e):b(t,e)}},w=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,x,y)}))},S=new Set;e.getCLS=function(e,t){v||(h((function(e){m=e.value})),v=!0);var r,n=function(t){m>-1&&e(t)},o=a("CLS",0),l=0,f=[],p=function(e){if(!e.hadRecentInput){var t=f[0],n=f[f.length-1];l&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(l+=e.value,f.push(e)):(l=e.value,f=[e]),l>o.value&&(o.value=l,o.entries=f,r())}},d=i("layout-shift",p);d&&(r=s(n,o,t),u((function(){d.takeRecords().map(p),r(!0)})),c((function(){l=0,m=-1,o=a("CLS",0),r=s(n,o,t)})))},e.getFCP=h,e.getFID=function(e,n){var l,f=d(),p=a("FID"),h=function(e){e.startTime=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:R(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(r){"object"===typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},2431:function(){}},function(e){e.O(0,[774],(function(){return t=457,e(e.s=t);var t}));var t=e.O();_N_E=t}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/main-7965b115b2b3050da998.js b/striker-ui/out/_next/static/chunks/main-7965b115b2b3050da998.js deleted file mode 100644 index b18ff557..00000000 --- a/striker-ui/out/_next/static/chunks/main-7965b115b2b3050da998.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[179],{400:function(){"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))})},6792:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=null;return{mountedInstances:new Set,updateHead:function(t){var r=e=Promise.resolve().then((function(){if(r===e){e=null;var o={};t.forEach((function(e){"link"===e.type&&e.props["data-optimized-fonts"]&&!document.querySelector('style[data-href="'.concat(e.props["data-href"],'"]'))&&(e.props.href=e.props["data-href"],e.props["data-href"]=void 0);var t=o[e.type]||[];t.push(e),o[e.type]=t}));var a=o.title?o.title[0]:null,i="";if(a){var u=a.props.children;i="string"===typeof u?u:Array.isArray(u)?u.join(""):""}i!==document.title&&(document.title=i),["meta","base","link","style","script"].forEach((function(e){!function(e,t){var r=document.getElementsByTagName("head")[0],o=r.querySelector("meta[name=next-head-count]");0;for(var a=Number(o.content),i=[],u=0,c=o.previousElementSibling;u0&&void 0!==s[0]?s[0]:{},r=I,e.prev=3,e.next=6,K.routeLoader.whenEntrypoint("/_app");case 6:if(!("error"in(o=e.sent))){e.next=9;break}throw o.error;case 9:a=o.component,i=o.exports,ee=a,i&&i.reportWebVitals&&(te=function(e){var t,r=e.id,n=e.name,o=e.startTime,a=e.value,u=e.duration,c=e.entryType,s=e.entries,l="".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12);s&&s.length&&(t=s[0].startTime),i.reportWebVitals({id:r||l,name:n,startTime:o||t,value:null==a?u:a,label:"mark"===c||"measure"===c?"custom":"web-vital"})}),e.next=16;break;case 16:return e.next=18,K.routeLoader.whenEntrypoint(N);case 18:e.t0=e.sent;case 19:if(!("error"in(u=e.t0))){e.next=22;break}throw u.error;case 22:oe=u.component,e.next=27;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(3),r=e.t1;case 32:if(!window.__NEXT_PRELOADREADY){e.next=36;break}return e.next=36,window.__NEXT_PRELOADREADY(H);case 36:return t.router=Z=O.createRouter(N,D,Q,{initialProps:M,pageLoader:K,App:ee,Component:oe,wrapApp:ye,err:r,isFallback:Boolean(B),subscription:function(e,t,r){return se(Object.assign({},e,{App:t,scroll:r}))},locale:W,locales:G,defaultLocale:X,domainLocales:z,isPreview:V}),se(c={App:ee,initial:!0,Component:oe,props:M,err:r}),e.abrupt("return",ie);case 43:return e.abrupt("return",{emitter:ie,renderCtx:c});case 44:case"end":return e.stop()}}),e,null,[[3,29]])})))).apply(this,arguments)}function ce(){return(ce=C(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.err){e.next=4;break}return e.next=3,le(t);case 3:return e.abrupt("return");case 4:return e.prev=4,e.next=7,ge(t);case 7:e.next=16;break;case 9:if(e.prev=9,e.t0=e.catch(4),!e.t0.cancelled){e.next=13;break}throw e.t0;case 13:return e.next=16,le(j({},t,{err:e.t0}));case 16:case"end":return e.stop()}}),e,null,[[4,9]])})))).apply(this,arguments)}function se(e){return ce.apply(this,arguments)}function le(e){var t=e.App,n=e.err;return console.error(n),console.error("A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred"),K.loadPage("/_error").then((function(e){var t=e.page,n=e.styleSheets;return(null===me||void 0===me?void 0:me.Component)===t?Promise.resolve().then((function(){return function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(3359))})).then((function(e){return{ErrorComponent:e.default,styleSheets:[]}})):{ErrorComponent:t,styleSheets:n}})).then((function(r){var o=r.ErrorComponent,a=r.styleSheets,i=ye(t),u={Component:o,AppTree:i,router:Z,ctx:{err:n,pathname:N,query:D,asPath:Q,AppTree:i}};return Promise.resolve(e.props?e.props:_.loadGetInitialProps(t,u)).then((function(t){return ge(j({},e,{err:n,Component:o,styleSheets:a,props:t}))}))}))}t.emitter=ie;var fe=!0;function pe(){_.ST&&(performance.mark("afterHydrate"),performance.measure("Next.js-before-hydration","navigationStart","beforeRender"),performance.measure("Next.js-hydration","beforeRender","afterHydrate"),te&&performance.getEntriesByName("Next.js-hydration").forEach(te),he())}function de(){if(_.ST){performance.mark("afterRender");var e=performance.getEntriesByName("routeChange","mark");e.length&&(performance.measure("Next.js-route-change-to-render",e[0].name,"beforeRender"),performance.measure("Next.js-render","beforeRender","afterRender"),te&&(performance.getEntriesByName("Next.js-render").forEach(te),performance.getEntriesByName("Next.js-route-change-to-render").forEach(te)),he(),["Next.js-route-change-to-render","Next.js-render"].forEach((function(e){return performance.clearMeasures(e)})))}}function he(){["beforeRender","afterHydrate","afterRender","routeChange"].forEach((function(e){return performance.clearMarks(e)}))}function ve(e){var t=e.children;return f.default.createElement(ae,{fn:function(e){return le({App:ee,err:e}).catch((function(e){return console.error("Error rendering page: ",e)}))}},f.default.createElement(v.RouterContext.Provider,{value:O.makePublicRouterInstance(Z)},f.default.createElement(d.HeadManagerContext.Provider,{value:re},t)))}var me,ye=function(e){return function(t){var r=j({},t,{Component:oe,err:I,router:Z});return f.default.createElement(ve,null,f.default.createElement(e,Object.assign({},r)))}};function ge(e){var t=e.App,r=e.Component,n=e.props,o=e.err,a="initial"in e?void 0:e.styleSheets;r=r||me.Component;var i=j({},n=n||me.props,{Component:r,err:o,router:Z});me=i;var u,c=!1,s=new Promise((function(e,t){J&&J(),u=function(){J=null,e()},J=function(){c=!0,J=null;var e=new Error("Cancel rendering route");e.cancelled=!0,t(e)}}));function l(){u()}!function(){if(!a)return!1;var e=T(document.querySelectorAll("style[data-n-href]")),t=new Set(e.map((function(e){return e.getAttribute("data-n-href")}))),r=document.querySelector("noscript[data-n-css]"),n=null===r||void 0===r?void 0:r.getAttribute("data-n-css");a.forEach((function(e){var r=e.href,o=e.text;if(!t.has(r)){var a=document.createElement("style");a.setAttribute("data-n-href",r),a.setAttribute("media","x"),n&&a.setAttribute("nonce",n),document.head.appendChild(a),a.appendChild(document.createTextNode(o))}}))}();var d=f.default.createElement(f.default.Fragment,null,f.default.createElement(_e,{callback:function(){if(a&&!c){for(var t=new Set(a.map((function(e){return e.href}))),r=T(document.querySelectorAll("style[data-n-href]")),n=r.map((function(e){return e.getAttribute("data-n-href")})),o=0;o=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,i=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var f=new Map,p=new Set,d=["onLoad","dangerouslySetInnerHTML","children","onError","strategy"],h=function(e){var t=e.src,r=e.id,o=e.onLoad,a=void 0===o?function(){}:o,u=e.dangerouslySetInnerHTML,c=e.children,s=void 0===c?"":c,l=e.onError,h=r||t;if(!h||!p.has(h)){if(f.has(t))return p.add(h),void f.get(t).then(a,l);var v=document.createElement("script"),m=new Promise((function(e,t){v.addEventListener("load",(function(t){e(),a&&a.call(this,t)})),v.addEventListener("error",(function(e){t(e)}))})).catch((function(e){l&&l(e)}));t&&f.set(t,m),p.add(h),u?v.innerHTML=u.__html||"":s?v.textContent="string"===typeof s?s:Array.isArray(s)?s.join(""):"":t&&(v.src=t);for(var y=0,g=Object.entries(e);y0&&void 0!==arguments[0]?arguments[0]:{},t=e.ampFirst,r=void 0!==t&&t,n=e.hybrid,o=void 0!==n&&n,a=e.hasQuery,i=void 0!==a&&a;return r||o&&i}},699:function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.HeadManagerContext=void 0;var o=((n=r(7294))&&n.__esModule?n:{default:n}).default.createContext({});t.HeadManagerContext=o},639:function(e,t,r){"use strict";var n=r(1682);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.defaultHead=f,t.default=void 0;var a,i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(7294)),u=(a=r(4766))&&a.__esModule?a:{default:a},c=r(6046),s=r(699),l=r(3237);function f(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=[i.default.createElement("meta",{charSet:"utf-8"})];return e||t.push(i.default.createElement("meta",{name:"viewport",content:"width=device-width"})),t}function p(e,t){return"string"===typeof t||"number"===typeof t?e:t.type===i.default.Fragment?e.concat(i.default.Children.toArray(t.props.children).reduce((function(e,t){return"string"===typeof t||"number"===typeof t?e:e.concat(t)}),[])):e.concat(t)}var d=["name","httpEquiv","charSet","itemProp"];function h(e,t){return e.reduce((function(e,t){var r=i.default.Children.toArray(t.props.children);return e.concat(r)}),[]).reduce(p,[]).reverse().concat(f(t.inAmpMode)).filter(function(){var e=new Set,t=new Set,r=new Set,n={};return function(o){var a=!0,i=!1;if(o.key&&"number"!==typeof o.key&&o.key.indexOf("$")>0){i=!0;var u=o.key.slice(o.key.indexOf("$")+1);e.has(u)?a=!1:e.add(u)}switch(o.type){case"title":case"base":t.has(o.type)?a=!1:t.add(o.type);break;case"meta":for(var c=0,s=d.length;c>>0,1)},emit:function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o-1||r>-1)&&(e=e.substring(0,t>-1?t:r)),e}function P(e){return""===(e=S(e))||e.startsWith("/")}function E(e){return function(e,t){return t&&e.startsWith("/")?"/"===e?c.normalizePathTrailingSlash(t):"".concat(t).concat("/"===S(e)?e.substring(1):e):e}(e,"")}function O(e){return(e=e.slice("".length)).startsWith("/")||(e="/".concat(e)),e}function k(e){if(e.startsWith("/")||e.startsWith("#")||e.startsWith("?"))return!0;try{var t=p.getLocationOrigin(),r=new URL(e,t);return r.origin===t&&P(r.pathname)}catch(n){return!1}}function C(e,t,r){var n="",o=g.getRouteRegex(e),a=o.groups,i=(t!==e?y.getRouteMatcher(o)(t):"")||r;n=e;var u=Object.keys(a);return u.every((function(e){var t=i[e]||"",r=a[e],o=r.repeat,u=r.optional,c="[".concat(o?"...":"").concat(e,"]");return u&&(c="".concat(t?"":"/","[").concat(c,"]")),o&&!Array.isArray(t)&&(t=[t]),(u||e in i)&&(n=n.replace(c,o?t.map((function(e){return encodeURIComponent(e)})).join("/"):encodeURIComponent(t))||"/")}))||(n=""),{params:u,result:n}}function R(e,t){var r={};return Object.keys(e).forEach((function(n){t.includes(n)||(r[n]=e[n])})),r}function L(e,t,r){var n,o="string"===typeof t?t:p.formatWithValidation(t),a=o.match(/^[a-zA-Z]{1,}:\/\//),i=a?o.substr(a[0].length):o;if((i.split("?")[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href passed to next/router: ".concat(o,", repeated forward-slashes (//) or backslashes \\ are not valid in the href"));var u=p.normalizeRepeatedSlashes(i);o=(a?a[0]:"")+u}if(!k(o))return r?[o]:o;try{n=new URL(o.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(b){n=new URL("/","http://n")}try{var s=new URL(o,n);s.pathname=c.normalizePathTrailingSlash(s.pathname);var l="";if(d.isDynamicRoute(s.pathname)&&s.searchParams&&r){var f=v.searchParamsToUrlQuery(s.searchParams),h=C(s.pathname,s.pathname,f),m=h.result,y=h.params;m&&(l=p.formatWithValidation({pathname:m,hash:s.hash,query:R(f,y)}))}var g=s.origin===n.origin?s.href.slice(s.origin.length):s.href;return r?[g,l||g]:g}catch(b){return r?[o]:o}}function j(e){var t=p.getLocationOrigin();return e.startsWith(t)?e.substring(t.length):e}function A(e,t,r){var n=L(e,t,!0),o=u(n,2),a=o[0],i=o[1],c=p.getLocationOrigin(),s=a.startsWith(c),l=i&&i.startsWith(c);a=j(a),i=i?j(i):i;var f=s?a:E(a),d=r?j(L(e,r)):i||a;return{url:f,as:l?d:E(d)}}function T(e,t){var r=c.removePathTrailingSlash(l.denormalizePagePath(e));return"/404"===r||"/_error"===r?e:(t.includes(r)||t.some((function(t){if(d.isDynamicRoute(t)&&g.getRouteRegex(t).re.test(r))return e=t,!0})),c.removePathTrailingSlash(e))}var M=Symbol("SSG_DATA_NOT_FOUND");function I(e,t){return fetch(e,{credentials:"same-origin"}).then((function(r){if(!r.ok){if(t>1&&r.status>=500)return I(e,t-1);if(404===r.status)return r.json().then((function(e){if(e.notFound)return{notFound:M};throw new Error("Failed to load static props")}));throw new Error("Failed to load static props")}return r.json()}))}function N(e,t){return I(e,t?3:1).catch((function(e){throw t||s.markAssetError(e),e}))}var D=function(){function e(t,r,n,o){var i=this,u=o.initialProps,s=o.pageLoader,l=o.App,f=o.wrapApp,v=o.Component,m=o.err,y=o.subscription,g=o.isFallback,b=o.locale,_=(o.locales,o.defaultLocale,o.domainLocales,o.isPreview);a(this,e),this.sdc={},this.sdr={},this._idx=0,this.onPopState=function(e){var t=e.state;if(t){if(t.__N){var r=t.url,n=t.as,o=t.options,a=t.idx;i._idx=a;var u=h.parseRelativeUrl(r).pathname;i.isSsr&&n===i.asPath&&u===i.pathname||i._bps&&!i._bps(t)||i.change("replaceState",r,n,Object.assign({},o,{shallow:o.shallow&&i._shallow,locale:o.locale||i.defaultLocale}),undefined)}}else{var c=i.pathname,s=i.query;i.changeState("replaceState",p.formatWithValidation({pathname:E(c),query:s}),p.getURL())}},this.route=c.removePathTrailingSlash(t),this.components={},"/_error"!==t&&(this.components[this.route]={Component:v,initial:!0,props:u,err:m,__N_SSG:u&&u.__N_SSG,__N_SSP:u&&u.__N_SSP}),this.components["/_app"]={Component:l,styleSheets:[]},this.events=e.events,this.pageLoader=s,this.pathname=t,this.query=r;var w=d.isDynamicRoute(t)&&self.__NEXT_DATA__.autoExport;if(this.asPath=w?t:n,this.basePath="",this.sub=y,this.clc=null,this._wrapApp=f,this.isSsr=!0,this.isFallback=g,this.isReady=!!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp||!w&&!self.location.search),this.isPreview=!!_,this.isLocaleDomain=!1,"//"!==n.substr(0,2)){var x={locale:b};x._shouldResolveHref=n!==t,this.changeState("replaceState",p.formatWithValidation({pathname:E(t),query:r}),p.getURL(),x)}window.addEventListener("popstate",this.onPopState)}return i(e,[{key:"reload",value:function(){window.location.reload()}},{key:"back",value:function(){window.history.back()}},{key:"push",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=A(this,e,t);return e=n.url,t=n.as,this.change("pushState",e,t,r)}},{key:"replace",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=A(this,e,t);return e=n.url,t=n.as,this.change("replaceState",e,t,r)}},{key:"change",value:function(){var t=o(n.mark((function t(r,o,a,i,u){var l,f,v,m,b,_,S,L,j,I,N,D,F,U,q,H,B,W,G,z,V,X,$,Q,K,Y,J,Z,ee,te,re,ne,oe,ae,ie,ue,ce,se;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(k(o)){t.next=3;break}return window.location.href=o,t.abrupt("return",!1);case 3:l=o===a||i._h||i._shouldResolveHref,i._h&&(this.isReady=!0),f=this.locale,t.next=18;break;case 18:if(i._h||(this.isSsr=!1),p.ST&&performance.mark("routeChange"),m=i.shallow,b={shallow:void 0!==m&&m},this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute,b),a=E(w(P(a)?O(a):a,i.locale,this.defaultLocale)),_=x(P(a)?O(a):a,this.locale),this._inFlightRoute=a,S=f!==this.locale,i._h||!this.onlyAHashChange(_)||S){t.next=35;break}return this.asPath=_,e.events.emit("hashChangeStart",a,b),this.changeState(r,o,a,i),this.scrollToHash(_),this.notify(this.components[this.route],null),e.events.emit("hashChangeComplete",a,b),t.abrupt("return",!0);case 35:return L=h.parseRelativeUrl(o),j=L.pathname,I=L.query,t.prev=37,t.next=40,this.pageLoader.getPageList();case 40:return N=t.sent,t.next=43,s.getClientBuildManifest();case 43:D=t.sent,D.__rewrites,t.next=51;break;case 47:return t.prev=47,t.t0=t.catch(37),window.location.href=a,t.abrupt("return",!1);case 51:if(this.urlIsNew(_)||S||(r="replaceState"),F=a,j=j?c.removePathTrailingSlash(O(j)):j,l&&"/_error"!==j&&(i._shouldResolveHref=!0,L.pathname=T(j,N),L.pathname!==j&&(j=L.pathname,L.pathname=E(j),o=p.formatWithValidation(L))),U=c.removePathTrailingSlash(j),k(a)){t.next=61;break}t.next=59;break;case 59:return window.location.href=a,t.abrupt("return",!1);case 61:if(F=x(O(F),this.locale),!d.isDynamicRoute(U)){t.next=77;break}if(q=h.parseRelativeUrl(F),H=q.pathname,B=g.getRouteRegex(U),W=y.getRouteMatcher(B)(H),z=(G=U===H)?C(U,H,I):{},W&&(!G||z.result)){t.next=76;break}if(!((V=Object.keys(B.groups).filter((function(e){return!I[e]}))).length>0)){t.next=74;break}throw new Error((G?"The provided `href` (".concat(o,") value is missing query values (").concat(V.join(", "),") to be interpolated properly. "):"The provided `as` value (".concat(H,") is incompatible with the `href` value (").concat(U,"). "))+"Read more: https://nextjs.org/docs/messages/".concat(G?"href-interpolation-failed":"incompatible-href-as"));case 74:t.next=77;break;case 76:G?a=p.formatWithValidation(Object.assign({},q,{pathname:z.result,query:R(I,z.params)})):Object.assign(I,W);case 77:return e.events.emit("routeChangeStart",a,b),t.prev=78,t.next=81,this.getRouteInfo(U,j,I,a,F,b);case 81:if($=t.sent,K=(Q=$).error,Y=Q.props,J=Q.__N_SSG,Z=Q.__N_SSP,!J&&!Z||!Y){t.next=107;break}if(!Y.pageProps||!Y.pageProps.__N_REDIRECT){t.next=93;break}if(!(ee=Y.pageProps.__N_REDIRECT).startsWith("/")){t.next=91;break}return(te=h.parseRelativeUrl(ee)).pathname=T(te.pathname,N),re=A(this,ee,ee),ne=re.url,oe=re.as,t.abrupt("return",this.change(r,ne,oe,i));case 91:return window.location.href=ee,t.abrupt("return",new Promise((function(){})));case 93:if(this.isPreview=!!Y.__N_PREVIEW,Y.notFound!==M){t.next=107;break}return t.prev=95,t.next=98,this.fetchComponent("/404");case 98:ae="/404",t.next=104;break;case 101:t.prev=101,t.t1=t.catch(95),ae="/_error";case 104:return t.next=106,this.getRouteInfo(ae,ae,I,a,F,{shallow:!1});case 106:$=t.sent;case 107:return e.events.emit("beforeHistoryChange",a,b),this.changeState(r,o,a,i),i._h&&"/_error"===j&&500===(null===(v=self.__NEXT_DATA__.props)||void 0===v||null===(X=v.pageProps)||void 0===X?void 0:X.statusCode)&&(null===Y||void 0===Y?void 0:Y.pageProps)&&(Y.pageProps.statusCode=500),ie=i.shallow&&this.route===U,ce=null!==(ue=i.scroll)&&void 0!==ue?ue:!ie,se=ce?{x:0,y:0}:null,t.next=116,this.set(U,j,I,_,$,null!==u&&void 0!==u?u:se).catch((function(e){if(!e.cancelled)throw e;K=K||e}));case 116:if(!K){t.next=119;break}throw e.events.emit("routeChangeError",K,_,b),K;case 119:return e.events.emit("routeChangeComplete",a,b),t.abrupt("return",!0);case 124:if(t.prev=124,t.t2=t.catch(78),!t.t2.cancelled){t.next=128;break}return t.abrupt("return",!1);case 128:throw t.t2;case 129:case"end":return t.stop()}}),t,this,[[37,47],[78,124],[95,101]])})));return function(e,r,n,o,a){return t.apply(this,arguments)}}()},{key:"changeState",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"pushState"===e&&p.getURL()===r||(this._shallow=n.shallow,window.history[e]({url:t,as:r,options:n,__N:!0,idx:this._idx="pushState"!==e?this._idx:this._idx+1},"",r))}},{key:"handleRouteInfoError",value:function(){var t=o(n.mark((function t(r,o,a,i,u,c){var l,f,p,d;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r.cancelled){t.next=2;break}throw r;case 2:if(!s.isAssetError(r)&&!c){t.next=6;break}throw e.events.emit("routeChangeError",r,i,u),window.location.href=i,_();case 6:if(t.prev=6,"undefined"!==typeof l&&"undefined"!==typeof f){t.next=13;break}return t.next=10,this.fetchComponent("/_error");case 10:p=t.sent,l=p.page,f=p.styleSheets;case 13:if((d={props:undefined,Component:l,styleSheets:f,err:r,error:r}).props){t.next=25;break}return t.prev=15,t.next=18,this.getInitialProps(l,{err:r,pathname:o,query:a});case 18:d.props=t.sent,t.next=25;break;case 21:t.prev=21,t.t0=t.catch(15),console.error("Error in error page `getInitialProps`: ",t.t0),d.props={};case 25:return t.abrupt("return",d);case 28:return t.prev=28,t.t1=t.catch(6),t.abrupt("return",this.handleRouteInfoError(t.t1,o,a,i,u,!0));case 31:case"end":return t.stop()}}),t,this,[[6,28],[15,21]])})));return function(e,r,n,o,a,i){return t.apply(this,arguments)}}()},{key:"getRouteInfo",value:function(){var e=o(n.mark((function e(t,r,o,a,i,u){var c,s,l,f,d,h,v,m,y=this;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,c=this.components[t],!u.shallow||!c||this.route!==t){e.next=4;break}return e.abrupt("return",c);case 4:if(!(s=c&&"initial"in c?void 0:c)){e.next=9;break}e.t0=s,e.next=12;break;case 9:return e.next=11,this.fetchComponent(t).then((function(e){return{Component:e.page,styleSheets:e.styleSheets,__N_SSG:e.mod.__N_SSG,__N_SSP:e.mod.__N_SSP}}));case 11:e.t0=e.sent;case 12:l=e.t0,f=l.Component,d=l.__N_SSG,h=l.__N_SSP,e.next=18;break;case 18:return(d||h)&&(v=this.pageLoader.getDataHref(p.formatWithValidation({pathname:r,query:o}),i,d,this.locale)),e.next=21,this._getData((function(){return d?y._getStaticData(v):h?y._getServerData(v):y.getInitialProps(f,{pathname:r,query:o,asPath:a,locale:y.locale,locales:y.locales,defaultLocale:y.defaultLocale})}));case 21:return m=e.sent,l.props=m,this.components[t]=l,e.abrupt("return",l);case 27:return e.prev=27,e.t1=e.catch(0),e.abrupt("return",this.handleRouteInfoError(e.t1,r,o,a,u));case 30:case"end":return e.stop()}}),e,this,[[0,27]])})));return function(t,r,n,o,a,i){return e.apply(this,arguments)}}()},{key:"set",value:function(e,t,r,n,o,a){return this.isFallback=!1,this.route=e,this.pathname=t,this.query=r,this.asPath=n,this.notify(o,a)}},{key:"beforePopState",value:function(e){this._bps=e}},{key:"onlyAHashChange",value:function(e){if(!this.asPath)return!1;var t=this.asPath.split("#"),r=u(t,2),n=r[0],o=r[1],a=e.split("#"),i=u(a,2),c=i[0],s=i[1];return!(!s||n!==c||o!==s)||n===c&&o!==s}},{key:"scrollToHash",value:function(e){var t=e.split("#"),r=u(t,2)[1];if(""!==r&&"top"!==r){var n=document.getElementById(r);if(n)n.scrollIntoView();else{var o=document.getElementsByName(r)[0];o&&o.scrollIntoView()}}else window.scrollTo(0,0)}},{key:"urlIsNew",value:function(e){return this.asPath!==e}},{key:"prefetch",value:function(){var e=o(n.mark((function e(t){var r,o,a,i,u,s,l,f,d,v,y=this,g=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=g.length>1&&void 0!==g[1]?g[1]:t,o=g.length>2&&void 0!==g[2]?g[2]:{},a=h.parseRelativeUrl(t),i=a.pathname,e.next=7,this.pageLoader.getPageList();case 7:u=e.sent,s=r,e.next=19;break;case 12:f=e.sent,l=f.__rewrites,d=m.default(E(w(r,this.locale)),u,l,a.query,(function(e){return T(e,u)}),this.locales),s=x(O(d.asPath),this.locale),d.matchedPage&&d.resolvedHref&&(i=d.resolvedHref,a.pathname=i,t=p.formatWithValidation(a)),e.next=21;break;case 19:a.pathname=T(a.pathname,u),a.pathname!==i&&(i=a.pathname,a.pathname=i,t=p.formatWithValidation(a));case 21:v=c.removePathTrailingSlash(i),e.next=24;break;case 24:return e.next=26,Promise.all([this.pageLoader._isSsg(v).then((function(e){return!!e&&y._getStaticData(y.pageLoader.getDataHref(t,s,!0,"undefined"!==typeof o.locale?o.locale:y.locale))})),this.pageLoader[o.priority?"loadPage":"prefetch"](v)]);case 26:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"fetchComponent",value:function(){var e=o(n.mark((function e(t){var r,o,a,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=!1,o=this.clc=function(){r=!0},e.next=4,this.pageLoader.loadPage(t);case 4:if(a=e.sent,!r){e.next=9;break}throw(i=new Error('Abort fetching component for route: "'.concat(t,'"'))).cancelled=!0,i;case 9:return o===this.clc&&(this.clc=null),e.abrupt("return",a);case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_getData",value:function(e){var t=this,r=!1,n=function(){r=!0};return this.clc=n,e().then((function(e){if(n===t.clc&&(t.clc=null),r){var o=new Error("Loading initial props cancelled");throw o.cancelled=!0,o}return e}))}},{key:"_getStaticData",value:function(e){var t=this,r=new URL(e,window.location.href).href;return!this.isPreview&&this.sdc[r]?Promise.resolve(this.sdc[r]):N(e,this.isSsr).then((function(e){return t.sdc[r]=e,e}))}},{key:"_getServerData",value:function(e){var t=this,r=new URL(e,window.location.href).href;return this.sdr[r]?this.sdr[r]:this.sdr[r]=N(e,this.isSsr).then((function(e){return delete t.sdr[r],e})).catch((function(e){throw delete t.sdr[r],e}))}},{key:"getInitialProps",value:function(e,t){var r=this.components["/_app"].Component,n=this._wrapApp(r);return t.AppTree=n,p.loadGetInitialProps(r,{AppTree:n,Component:e,router:this,ctx:t})}},{key:"abortComponentLoad",value:function(t,r){this.clc&&(e.events.emit("routeChangeError",_(),t,r),this.clc(),this.clc=null)}},{key:"notify",value:function(e,t){return this.sub(e,this.components["/_app"].Component,t)}}]),e}();D.events=f.default(),t.default=D},2065:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatUrl=function(e){var t=e.auth,r=e.hostname,a=e.protocol||"",i=e.pathname||"",u=e.hash||"",c=e.query||"",s=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?s=t+e.host:r&&(s=t+(~r.indexOf(":")?"[".concat(r,"]"):r),e.port&&(s+=":"+e.port));c&&"object"===typeof c&&(c=String(n.urlQueryToSearchParams(c)));var l=e.search||c&&"?".concat(c)||"";a&&":"!==a.substr(-1)&&(a+=":");e.slashes||(!a||o.test(a))&&!1!==s?(s="//"+(s||""),i&&"/"!==i[0]&&(i="/"+i)):s||(s="");u&&"#"!==u[0]&&(u="#"+u);l&&"?"!==l[0]&&(l="?"+l);return i=i.replace(/[?#]/g,encodeURIComponent),l=l.replace("#","%23"),"".concat(a).concat(s).concat(i).concat(l).concat(u)};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(9824));var o=/https?|ftp|gopher|file/},7055:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r="/"===e?"/index":/^\/index(\/|$)/.test(e)?"/index".concat(e):"".concat(e);return r+t}},6234:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDynamicRoute=function(e){return r.test(e)};var r=/\/\[[^/]+?\](?=\/|$)/},7658:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseRelativeUrl=function(e,t){var r=new URL(n.getLocationOrigin()),a=t?new URL(t,r):r,i=new URL(e,a),u=i.pathname,c=i.searchParams,s=i.search,l=i.hash,f=i.href;if(i.origin!==r.origin)throw new Error("invariant: invalid relative URL, router received ".concat(e));return{pathname:u,query:o.searchParamsToUrlQuery(c),search:s,hash:l,href:f.slice(r.origin.length)}};var n=r(9664),o=r(9824)},9824:function(e,t,r){"use strict";var n=r(3848);function o(e){return"string"===typeof e||"number"===typeof e&&!isNaN(e)||"boolean"===typeof e?String(e):""}Object.defineProperty(t,"__esModule",{value:!0}),t.searchParamsToUrlQuery=function(e){var t={};return e.forEach((function(e,r){"undefined"===typeof t[r]?t[r]=e:Array.isArray(t[r])?t[r].push(e):t[r]=[t[r],e]})),t},t.urlQueryToSearchParams=function(e){var t=new URLSearchParams;return Object.entries(e).forEach((function(e){var r=n(e,2),a=r[0],i=r[1];Array.isArray(i)?i.forEach((function(e){return t.append(a,o(e))})):t.set(a,o(i))})),t},t.assign=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0&&(o||r)&&(t.delta=t.value-(n||0),(t.delta||void 0===n)&&(n=t.value,e(t)))}},l=-1,f=function(){return"hidden"===document.visibilityState?0:1/0},p=function(){u((function(e){var t=e.timeStamp;l=t}),!0)},d=function(){return l<0&&(l=f(),p(),c((function(){setTimeout((function(){l=f(),p()}),0)}))),{get firstHiddenTime(){return l}}},h=function(e,t){var r,n=d(),o=a("FCP"),u=function(e){"first-contentful-paint"===e.name&&(f&&f.disconnect(),e.startTime=0&&r1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var r=function(){b(e,t),o()},n=function(){o()},o=function(){removeEventListener("pointerup",r,y),removeEventListener("pointercancel",n,y)};addEventListener("pointerup",r,y),addEventListener("pointercancel",n,y)}(t,e):b(t,e)}},x=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,w,y)}))},S=new Set;e.getCLS=function(e,t){v||(h((function(e){m=e.value})),v=!0);var r,n=function(t){m>-1&&e(t)},o=a("CLS",0),l=0,f=[],p=function(e){if(!e.hadRecentInput){var t=f[0],n=f[f.length-1];l&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(l+=e.value,f.push(e)):(l=e.value,f=[e]),l>o.value&&(o.value=l,o.entries=f,r())}},d=i("layout-shift",p);d&&(r=s(n,o,t),u((function(){d.takeRecords().map(p),r(!0)})),c((function(){l=0,m=-1,o=a("CLS",0),r=s(n,o,t)})))},e.getFCP=h,e.getFID=function(e,n){var l,f=d(),p=a("FID"),h=function(e){e.startTimee.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:R(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(r){"object"===typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},2431:function(){}},function(e){e.O(0,[774],(function(){return t=457,e(e.s=t);var t}));var t=e.O();_N_E=t}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/_app-0d133e803ff3dba56ca1.js b/striker-ui/out/_next/static/chunks/pages/_app-b3ca00281e90c029c955.js similarity index 76% rename from striker-ui/out/_next/static/chunks/pages/_app-0d133e803ff3dba56ca1.js rename to striker-ui/out/_next/static/chunks/pages/_app-b3ca00281e90c029c955.js index ad51d3f4..ff68ed6e 100644 --- a/striker-ui/out/_next/static/chunks/pages/_app-0d133e803ff3dba56ca1.js +++ b/striker-ui/out/_next/static/chunks/pages/_app-b3ca00281e90c029c955.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{9693:function(t,n,r){"use strict";r.d(n,{mi:function(){return u},Fq:function(){return f},_j:function(){return d},$n:function(){return s}});var e=r(288);function i(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(n,t),r)}function o(t){if(t.type)return t;if("#"===t.charAt(0))return o(function(t){t=t.substr(1);var n=new RegExp(".{1,".concat(t.length>=6?2:1,"}"),"g"),r=t.match(n);return r&&1===r[0].length&&(r=r.map((function(t){return t+t}))),r?"rgb".concat(4===r.length?"a":"","(").concat(r.map((function(t,n){return n<3?parseInt(t,16):Math.round(parseInt(t,16)/255*1e3)/1e3})).join(", "),")"):""}(t));var n=t.indexOf("("),r=t.substring(0,n);if(-1===["rgb","rgba","hsl","hsla"].indexOf(r))throw new Error((0,e.Z)(3,t));var i=t.substring(n+1,t.length-1).split(",");return{type:r,values:i=i.map((function(t){return parseFloat(t)}))}}function a(t){var n=t.type,r=t.values;return-1!==n.indexOf("rgb")?r=r.map((function(t,n){return n<3?parseInt(t,10):t})):-1!==n.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),"".concat(n,"(").concat(r.join(", "),")")}function u(t,n){var r=c(t),e=c(n);return(Math.max(r,e)+.05)/(Math.min(r,e)+.05)}function c(t){var n="hsl"===(t=o(t)).type?o(function(t){var n=(t=o(t)).values,r=n[0],e=n[1]/100,i=n[2]/100,u=e*Math.min(i,1-i),c=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t+r/30)%12;return i-u*Math.max(Math.min(n-3,9-n,1),-1)},f="rgb",d=[Math.round(255*c(0)),Math.round(255*c(8)),Math.round(255*c(4))];return"hsla"===t.type&&(f+="a",d.push(n[3])),a({type:f,values:d})}(t)).values:t.values;return n=n.map((function(t){return(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)})),Number((.2126*n[0]+.7152*n[1]+.0722*n[2]).toFixed(3))}function f(t,n){return t=o(t),n=i(n),"rgb"!==t.type&&"hsl"!==t.type||(t.type+="a"),t.values[3]=n,a(t)}function d(t,n){if(t=o(t),n=i(n),-1!==t.type.indexOf("hsl"))t.values[2]*=1-n;else if(-1!==t.type.indexOf("rgb"))for(var r=0;r<3;r+=1)t.values[r]*=1-n;return a(t)}function s(t,n){if(t=o(t),n=i(n),-1!==t.type.indexOf("hsl"))t.values[2]+=(100-t.values[2])*n;else if(-1!==t.type.indexOf("rgb"))for(var r=0;r<3;r+=1)t.values[r]+=(255-t.values[r])*n;return a(t)}},7850:function(t,n,r){"use strict";r.d(n,{A:function(){return I},Z:function(){return z}});var e=r(5987),i=r(5953),o=r(7462),a=["xs","sm","md","lg","xl"];function u(t){var n=t.values,r=void 0===n?{xs:0,sm:600,md:960,lg:1280,xl:1920}:n,i=t.unit,u=void 0===i?"px":i,c=t.step,f=void 0===c?5:c,d=(0,e.Z)(t,["values","unit","step"]);function s(t){var n="number"===typeof r[t]?r[t]:t;return"@media (min-width:".concat(n).concat(u,")")}function l(t,n){var e=a.indexOf(n);return e===a.length-1?s(t):"@media (min-width:".concat("number"===typeof r[t]?r[t]:t).concat(u,") and ")+"(max-width:".concat((-1!==e&&"number"===typeof r[a[e+1]]?r[a[e+1]]:n)-f/100).concat(u,")")}return(0,o.Z)({keys:a,values:r,up:s,down:function(t){var n=a.indexOf(t)+1,e=r[a[n]];return n===a.length?s("xs"):"@media (max-width:".concat(("number"===typeof e&&n>0?e:t)-f/100).concat(u,")")},between:l,only:function(t){return l(t,t)},width:function(t){return r[t]}},d)}var c=r(4942);function f(t,n,r){var e;return(0,o.Z)({gutters:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),(0,o.Z)({paddingLeft:n(2),paddingRight:n(2)},r,(0,c.Z)({},t.up("sm"),(0,o.Z)({paddingLeft:n(3),paddingRight:n(3)},r[t.up("sm")])))},toolbar:(e={minHeight:56},(0,c.Z)(e,"".concat(t.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,c.Z)(e,t.up("sm"),{minHeight:64}),e)},r)}var d=r(288),s={black:"#000",white:"#fff"},l={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},p={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},g={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},h={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},v={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},m={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},b={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},y=r(9693),x={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:s.white,default:l[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},O={text:{primary:s.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:l[800],default:"#303030"},action:{active:s.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Z(t,n,r,e){var i=e.light||e,o=e.dark||1.5*e;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:"light"===n?t.light=(0,y.$n)(t.main,i):"dark"===n&&(t.dark=(0,y._j)(t.main,o)))}function A(t){var n=t.primary,r=void 0===n?{light:p[300],main:p[500],dark:p[700]}:n,a=t.secondary,u=void 0===a?{light:g.A200,main:g.A400,dark:g.A700}:a,c=t.error,f=void 0===c?{light:h[300],main:h[500],dark:h[700]}:c,A=t.warning,w=void 0===A?{light:v[300],main:v[500],dark:v[700]}:A,k=t.info,j=void 0===k?{light:m[300],main:m[500],dark:m[700]}:k,S=t.success,M=void 0===S?{light:b[300],main:b[500],dark:b[700]}:S,E=t.type,_=void 0===E?"light":E,P=t.contrastThreshold,R=void 0===P?3:P,T=t.tonalOffset,F=void 0===T?.2:T,W=(0,e.Z)(t,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function C(t){return(0,y.mi)(t,O.text.primary)>=R?O.text.primary:x.text.primary}var I=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(t=(0,o.Z)({},t)).main&&t[n]&&(t.main=t[n]),!t.main)throw new Error((0,d.Z)(4,n));if("string"!==typeof t.main)throw new Error((0,d.Z)(5,JSON.stringify(t.main)));return Z(t,"light",r,F),Z(t,"dark",e,F),t.contrastText||(t.contrastText=C(t.main)),t},z={dark:O,light:x};return(0,i.Z)((0,o.Z)({common:s,type:_,primary:I(r),secondary:I(u,"A400","A200","A700"),error:I(f),warning:I(w),info:I(j),success:I(M),grey:l,contrastThreshold:R,getContrastText:C,augmentColor:I,tonalOffset:F},z[_]),W)}function w(t){return Math.round(1e5*t)/1e5}function k(t){return w(t)}var j={textTransform:"uppercase"},S='"Roboto", "Helvetica", "Arial", sans-serif';function M(t,n){var r="function"===typeof n?n(t):n,a=r.fontFamily,u=void 0===a?S:a,c=r.fontSize,f=void 0===c?14:c,d=r.fontWeightLight,s=void 0===d?300:d,l=r.fontWeightRegular,p=void 0===l?400:l,g=r.fontWeightMedium,h=void 0===g?500:g,v=r.fontWeightBold,m=void 0===v?700:v,b=r.htmlFontSize,y=void 0===b?16:b,x=r.allVariants,O=r.pxToRem,Z=(0,e.Z)(r,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var A=f/14,M=O||function(t){return"".concat(t/y*A,"rem")},E=function(t,n,r,e,i){return(0,o.Z)({fontFamily:u,fontWeight:t,fontSize:M(n),lineHeight:r},u===S?{letterSpacing:"".concat(w(e/n),"em")}:{},i,x)},_={h1:E(s,96,1.167,-1.5),h2:E(s,60,1.2,-.5),h3:E(p,48,1.167,0),h4:E(p,34,1.235,.25),h5:E(p,24,1.334,0),h6:E(h,20,1.6,.15),subtitle1:E(p,16,1.75,.15),subtitle2:E(h,14,1.57,.1),body1:E(p,16,1.5,.15),body2:E(p,14,1.43,.15),button:E(h,14,1.75,.4,j),caption:E(p,12,1.66,.4),overline:E(p,12,2.66,1,j)};return(0,i.Z)((0,o.Z)({htmlFontSize:y,pxToRem:M,round:k,fontFamily:u,fontSize:f,fontWeightLight:s,fontWeightRegular:p,fontWeightMedium:h,fontWeightBold:m},_),Z,{clone:!1})}function E(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var _=["none",E(0,2,1,-1,0,1,1,0,0,1,3,0),E(0,3,1,-2,0,2,2,0,0,1,5,0),E(0,3,3,-2,0,3,4,0,0,1,8,0),E(0,2,4,-1,0,4,5,0,0,1,10,0),E(0,3,5,-1,0,5,8,0,0,1,14,0),E(0,3,5,-1,0,6,10,0,0,1,18,0),E(0,4,5,-2,0,7,10,1,0,2,16,1),E(0,5,5,-3,0,8,10,1,0,3,14,2),E(0,5,6,-3,0,9,12,1,0,3,16,2),E(0,6,6,-3,0,10,14,1,0,4,18,3),E(0,6,7,-4,0,11,15,1,0,4,20,3),E(0,7,8,-4,0,12,17,2,0,5,22,4),E(0,7,8,-4,0,13,19,2,0,5,24,4),E(0,7,9,-4,0,14,21,2,0,5,26,4),E(0,8,9,-5,0,15,22,2,0,6,28,5),E(0,8,10,-5,0,16,24,2,0,6,30,5),E(0,8,11,-5,0,17,26,2,0,6,32,5),E(0,9,11,-5,0,18,28,2,0,7,34,6),E(0,9,12,-6,0,19,29,2,0,7,36,6),E(0,10,13,-6,0,20,31,3,0,8,38,7),E(0,10,13,-6,0,21,33,3,0,8,40,7),E(0,10,14,-6,0,22,35,3,0,8,42,7),E(0,11,14,-7,0,23,36,3,0,9,44,8),E(0,11,15,-7,0,24,38,3,0,9,46,8)],P={borderRadius:4},R=r(8681);function T(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;var n=(0,R.h)({spacing:t}),r=function(){for(var t=arguments.length,r=new Array(t),e=0;e0&&void 0!==arguments[0]?arguments[0]:{},n=t.breakpoints,r=void 0===n?{}:n,o=t.mixins,a=void 0===o?{}:o,c=t.palette,d=void 0===c?{}:c,s=t.spacing,l=t.typography,p=void 0===l?{}:l,g=(0,e.Z)(t,["breakpoints","mixins","palette","spacing","typography"]),h=A(d),v=u(r),m=T(s),b=(0,i.Z)({breakpoints:v,direction:"ltr",mixins:f(v,m,a),overrides:{},palette:h,props:{},shadows:_,typography:M(h,p),spacing:m,shape:P,transitions:F.ZP,zIndex:W.Z},g),y=arguments.length,x=new Array(y>1?y-1:0),O=1;O0&&void 0!==arguments[0]?arguments[0]:["all"],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.duration,u=void 0===r?o.standard:r,c=n.easing,f=void 0===c?i.easeInOut:c,d=n.delay,s=void 0===d?0:d;(0,e.Z)(n,["duration","easing","delay"]);return(Array.isArray(t)?t:[t]).map((function(t){return"".concat(t," ").concat("string"===typeof u?u:a(u)," ").concat(f," ").concat("string"===typeof s?s:a(s))})).join(",")},getAutoHeightDuration:function(t){if(!t)return 0;var n=t/36;return Math.round(10*(4+15*Math.pow(n,.25)+n/5))}}},2781:function(t,n){"use strict";n.Z={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},7076:function(t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for;n.Z=r?Symbol.for("mui.nested"):"__THEME_NESTED__"},3800:function(t,n,r){"use strict";var e=r(7294).createContext(null);n.Z=e},159:function(t,n,r){"use strict";r.d(n,{Z:function(){return o}});var e=r(7294),i=r(3800);function o(){return e.useContext(i.Z)}},1410:function(t,n,r){"use strict";r.d(n,{k:function(){return a}});var e=r(1002),i=(r(5697),{xs:0,sm:600,md:960,lg:1280,xl:1920}),o={keys:["xs","sm","md","lg","xl"],up:function(t){return"@media (min-width:".concat(i[t],"px)")}};function a(t,n,r){if(Array.isArray(n)){var i=t.theme.breakpoints||o;return n.reduce((function(t,e,o){return t[i.up(i.keys[o])]=r(n[o]),t}),{})}if("object"===(0,e.Z)(n)){var a=t.theme.breakpoints||o;return Object.keys(n).reduce((function(t,e){return t[a.up(e)]=r(n[e]),t}),{})}return r(n)}},9668:function(t,n,r){"use strict";var e=r(5953);n.Z=function(t,n){return n?(0,e.Z)(t,n,{clone:!1}):t}},8681:function(t,n,r){"use strict";r.d(n,{h:function(){return s},Z:function(){return g}});var e=r(731),i=r(1410),o=r(9668);var a={m:"margin",p:"padding"},u={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},c={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},f=function(t){var n={};return function(r){return void 0===n[r]&&(n[r]=t(r)),n[r]}}((function(t){if(t.length>2){if(!c[t])return[t];t=c[t]}var n=t.split(""),r=(0,e.Z)(n,2),i=r[0],o=r[1],f=a[i],d=u[o]||"";return Array.isArray(d)?d.map((function(t){return f+t})):[f+d]})),d=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function s(t){var n=t.spacing||8;return"number"===typeof n?function(t){return n*t}:Array.isArray(n)?function(t){return n[t]}:"function"===typeof n?n:function(){}}function l(t,n){return function(r){return t.reduce((function(t,e){return t[e]=function(t,n){if("string"===typeof n||null==n)return n;var r=t(Math.abs(n));return n>=0?r:"number"===typeof r?-r:"-".concat(r)}(n,r),t}),{})}}function p(t){var n=s(t.theme);return Object.keys(t).map((function(r){if(-1===d.indexOf(r))return null;var e=l(f(r),n),o=t[r];return(0,i.k)(t,o,e)})).reduce(o.Z,{})}p.propTypes={},p.filterProps=d;var g=p},5953:function(t,n,r){"use strict";r.d(n,{Z:function(){return a}});var e=r(7462),i=r(1002);function o(t){return t&&"object"===(0,i.Z)(t)&&t.constructor===Object}function a(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},i=r.clone?(0,e.Z)({},t):t;return o(t)&&o(n)&&Object.keys(n).forEach((function(e){"__proto__"!==e&&(o(n[e])&&e in t?i[e]=a(t[e],n[e],r):i[e]=n[e])})),i}},288:function(t,n,r){"use strict";function e(t){for(var n="https://material-ui.com/production-error/?code="+t,r=1;rt.length)&&(n=t.length);for(var r=0,e=new Array(n);r=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}},3366:function(t,n,r){"use strict";function e(t,n){if(null==t)return{};var r,e,i={},o=Object.keys(t);for(e=0;e=0||(i[r]=t[r]);return i}r.d(n,{Z:function(){return e}})},731:function(t,n,r){"use strict";r.d(n,{Z:function(){return i}});var e=r(181);function i(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var e,i,o=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(e=r.next()).done)&&(o.push(e.value),!n||o.length!==n);a=!0);}catch(c){u=!0,i=c}finally{try{a||null==r.return||r.return()}finally{if(u)throw i}}return o}}(t,n)||(0,e.Z)(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},1002:function(t,n,r){"use strict";function e(t){return(e="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}r.d(n,{Z:function(){return e}})},181:function(t,n,r){"use strict";r.d(n,{Z:function(){return i}});var e=r(907);function i(t,n){if(t){if("string"===typeof t)return(0,e.Z)(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?(0,e.Z)(t,n):void 0}}},2809:function(t,n,r){"use strict";function e(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}r.d(n,{Z:function(){return e}})}},function(t){var n=function(n){return t(t.s=n)};t.O(0,[774,179],(function(){return n(6363),n(4651)}));var r=t.O();_N_E=r}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{9693:function(t,n,r){"use strict";r.d(n,{mi:function(){return u},Fq:function(){return f},_j:function(){return d},$n:function(){return s}});var e=r(288);function i(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(n,t),r)}function o(t){if(t.type)return t;if("#"===t.charAt(0))return o(function(t){t=t.substr(1);var n=new RegExp(".{1,".concat(t.length>=6?2:1,"}"),"g"),r=t.match(n);return r&&1===r[0].length&&(r=r.map((function(t){return t+t}))),r?"rgb".concat(4===r.length?"a":"","(").concat(r.map((function(t,n){return n<3?parseInt(t,16):Math.round(parseInt(t,16)/255*1e3)/1e3})).join(", "),")"):""}(t));var n=t.indexOf("("),r=t.substring(0,n);if(-1===["rgb","rgba","hsl","hsla"].indexOf(r))throw new Error((0,e.Z)(3,t));var i=t.substring(n+1,t.length-1).split(",");return{type:r,values:i=i.map((function(t){return parseFloat(t)}))}}function a(t){var n=t.type,r=t.values;return-1!==n.indexOf("rgb")?r=r.map((function(t,n){return n<3?parseInt(t,10):t})):-1!==n.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),"".concat(n,"(").concat(r.join(", "),")")}function u(t,n){var r=c(t),e=c(n);return(Math.max(r,e)+.05)/(Math.min(r,e)+.05)}function c(t){var n="hsl"===(t=o(t)).type?o(function(t){var n=(t=o(t)).values,r=n[0],e=n[1]/100,i=n[2]/100,u=e*Math.min(i,1-i),c=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t+r/30)%12;return i-u*Math.max(Math.min(n-3,9-n,1),-1)},f="rgb",d=[Math.round(255*c(0)),Math.round(255*c(8)),Math.round(255*c(4))];return"hsla"===t.type&&(f+="a",d.push(n[3])),a({type:f,values:d})}(t)).values:t.values;return n=n.map((function(t){return(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)})),Number((.2126*n[0]+.7152*n[1]+.0722*n[2]).toFixed(3))}function f(t,n){return t=o(t),n=i(n),"rgb"!==t.type&&"hsl"!==t.type||(t.type+="a"),t.values[3]=n,a(t)}function d(t,n){if(t=o(t),n=i(n),-1!==t.type.indexOf("hsl"))t.values[2]*=1-n;else if(-1!==t.type.indexOf("rgb"))for(var r=0;r<3;r+=1)t.values[r]*=1-n;return a(t)}function s(t,n){if(t=o(t),n=i(n),-1!==t.type.indexOf("hsl"))t.values[2]+=(100-t.values[2])*n;else if(-1!==t.type.indexOf("rgb"))for(var r=0;r<3;r+=1)t.values[r]+=(255-t.values[r])*n;return a(t)}},7850:function(t,n,r){"use strict";r.d(n,{A:function(){return I},Z:function(){return z}});var e=r(5987),i=r(5953),o=r(7462),a=["xs","sm","md","lg","xl"];function u(t){var n=t.values,r=void 0===n?{xs:0,sm:600,md:960,lg:1280,xl:1920}:n,i=t.unit,u=void 0===i?"px":i,c=t.step,f=void 0===c?5:c,d=(0,e.Z)(t,["values","unit","step"]);function s(t){var n="number"===typeof r[t]?r[t]:t;return"@media (min-width:".concat(n).concat(u,")")}function l(t,n){var e=a.indexOf(n);return e===a.length-1?s(t):"@media (min-width:".concat("number"===typeof r[t]?r[t]:t).concat(u,") and ")+"(max-width:".concat((-1!==e&&"number"===typeof r[a[e+1]]?r[a[e+1]]:n)-f/100).concat(u,")")}return(0,o.Z)({keys:a,values:r,up:s,down:function(t){var n=a.indexOf(t)+1,e=r[a[n]];return n===a.length?s("xs"):"@media (max-width:".concat(("number"===typeof e&&n>0?e:t)-f/100).concat(u,")")},between:l,only:function(t){return l(t,t)},width:function(t){return r[t]}},d)}var c=r(4942);function f(t,n,r){var e;return(0,o.Z)({gutters:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),(0,o.Z)({paddingLeft:n(2),paddingRight:n(2)},r,(0,c.Z)({},t.up("sm"),(0,o.Z)({paddingLeft:n(3),paddingRight:n(3)},r[t.up("sm")])))},toolbar:(e={minHeight:56},(0,c.Z)(e,"".concat(t.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,c.Z)(e,t.up("sm"),{minHeight:64}),e)},r)}var d=r(288),s={black:"#000",white:"#fff"},l={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},p={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},g={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},h={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},v={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},m={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},b={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},y=r(9693),x={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:s.white,default:l[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},O={text:{primary:s.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:l[800],default:"#303030"},action:{active:s.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Z(t,n,r,e){var i=e.light||e,o=e.dark||1.5*e;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:"light"===n?t.light=(0,y.$n)(t.main,i):"dark"===n&&(t.dark=(0,y._j)(t.main,o)))}function A(t){var n=t.primary,r=void 0===n?{light:p[300],main:p[500],dark:p[700]}:n,a=t.secondary,u=void 0===a?{light:g.A200,main:g.A400,dark:g.A700}:a,c=t.error,f=void 0===c?{light:h[300],main:h[500],dark:h[700]}:c,A=t.warning,w=void 0===A?{light:v[300],main:v[500],dark:v[700]}:A,k=t.info,j=void 0===k?{light:m[300],main:m[500],dark:m[700]}:k,S=t.success,M=void 0===S?{light:b[300],main:b[500],dark:b[700]}:S,E=t.type,_=void 0===E?"light":E,R=t.contrastThreshold,P=void 0===R?3:R,T=t.tonalOffset,F=void 0===T?.2:T,W=(0,e.Z)(t,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function C(t){return(0,y.mi)(t,O.text.primary)>=P?O.text.primary:x.text.primary}var I=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(t=(0,o.Z)({},t)).main&&t[n]&&(t.main=t[n]),!t.main)throw new Error((0,d.Z)(4,n));if("string"!==typeof t.main)throw new Error((0,d.Z)(5,JSON.stringify(t.main)));return Z(t,"light",r,F),Z(t,"dark",e,F),t.contrastText||(t.contrastText=C(t.main)),t},z={dark:O,light:x};return(0,i.Z)((0,o.Z)({common:s,type:_,primary:I(r),secondary:I(u,"A400","A200","A700"),error:I(f),warning:I(w),info:I(j),success:I(M),grey:l,contrastThreshold:P,getContrastText:C,augmentColor:I,tonalOffset:F},z[_]),W)}function w(t){return Math.round(1e5*t)/1e5}function k(t){return w(t)}var j={textTransform:"uppercase"},S='"Roboto", "Helvetica", "Arial", sans-serif';function M(t,n){var r="function"===typeof n?n(t):n,a=r.fontFamily,u=void 0===a?S:a,c=r.fontSize,f=void 0===c?14:c,d=r.fontWeightLight,s=void 0===d?300:d,l=r.fontWeightRegular,p=void 0===l?400:l,g=r.fontWeightMedium,h=void 0===g?500:g,v=r.fontWeightBold,m=void 0===v?700:v,b=r.htmlFontSize,y=void 0===b?16:b,x=r.allVariants,O=r.pxToRem,Z=(0,e.Z)(r,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var A=f/14,M=O||function(t){return"".concat(t/y*A,"rem")},E=function(t,n,r,e,i){return(0,o.Z)({fontFamily:u,fontWeight:t,fontSize:M(n),lineHeight:r},u===S?{letterSpacing:"".concat(w(e/n),"em")}:{},i,x)},_={h1:E(s,96,1.167,-1.5),h2:E(s,60,1.2,-.5),h3:E(p,48,1.167,0),h4:E(p,34,1.235,.25),h5:E(p,24,1.334,0),h6:E(h,20,1.6,.15),subtitle1:E(p,16,1.75,.15),subtitle2:E(h,14,1.57,.1),body1:E(p,16,1.5,.15),body2:E(p,14,1.43,.15),button:E(h,14,1.75,.4,j),caption:E(p,12,1.66,.4),overline:E(p,12,2.66,1,j)};return(0,i.Z)((0,o.Z)({htmlFontSize:y,pxToRem:M,round:k,fontFamily:u,fontSize:f,fontWeightLight:s,fontWeightRegular:p,fontWeightMedium:h,fontWeightBold:m},_),Z,{clone:!1})}function E(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var _=["none",E(0,2,1,-1,0,1,1,0,0,1,3,0),E(0,3,1,-2,0,2,2,0,0,1,5,0),E(0,3,3,-2,0,3,4,0,0,1,8,0),E(0,2,4,-1,0,4,5,0,0,1,10,0),E(0,3,5,-1,0,5,8,0,0,1,14,0),E(0,3,5,-1,0,6,10,0,0,1,18,0),E(0,4,5,-2,0,7,10,1,0,2,16,1),E(0,5,5,-3,0,8,10,1,0,3,14,2),E(0,5,6,-3,0,9,12,1,0,3,16,2),E(0,6,6,-3,0,10,14,1,0,4,18,3),E(0,6,7,-4,0,11,15,1,0,4,20,3),E(0,7,8,-4,0,12,17,2,0,5,22,4),E(0,7,8,-4,0,13,19,2,0,5,24,4),E(0,7,9,-4,0,14,21,2,0,5,26,4),E(0,8,9,-5,0,15,22,2,0,6,28,5),E(0,8,10,-5,0,16,24,2,0,6,30,5),E(0,8,11,-5,0,17,26,2,0,6,32,5),E(0,9,11,-5,0,18,28,2,0,7,34,6),E(0,9,12,-6,0,19,29,2,0,7,36,6),E(0,10,13,-6,0,20,31,3,0,8,38,7),E(0,10,13,-6,0,21,33,3,0,8,40,7),E(0,10,14,-6,0,22,35,3,0,8,42,7),E(0,11,14,-7,0,23,36,3,0,9,44,8),E(0,11,15,-7,0,24,38,3,0,9,46,8)],R={borderRadius:4},P=r(8681);function T(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;var n=(0,P.h)({spacing:t}),r=function(){for(var t=arguments.length,r=new Array(t),e=0;e0&&void 0!==arguments[0]?arguments[0]:{},n=t.breakpoints,r=void 0===n?{}:n,o=t.mixins,a=void 0===o?{}:o,c=t.palette,d=void 0===c?{}:c,s=t.spacing,l=t.typography,p=void 0===l?{}:l,g=(0,e.Z)(t,["breakpoints","mixins","palette","spacing","typography"]),h=A(d),v=u(r),m=T(s),b=(0,i.Z)({breakpoints:v,direction:"ltr",mixins:f(v,m,a),overrides:{},palette:h,props:{},shadows:_,typography:M(h,p),spacing:m,shape:R,transitions:F.ZP,zIndex:W.Z},g),y=arguments.length,x=new Array(y>1?y-1:0),O=1;O0&&void 0!==arguments[0]?arguments[0]:["all"],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.duration,u=void 0===r?o.standard:r,c=n.easing,f=void 0===c?i.easeInOut:c,d=n.delay,s=void 0===d?0:d;(0,e.Z)(n,["duration","easing","delay"]);return(Array.isArray(t)?t:[t]).map((function(t){return"".concat(t," ").concat("string"===typeof u?u:a(u)," ").concat(f," ").concat("string"===typeof s?s:a(s))})).join(",")},getAutoHeightDuration:function(t){if(!t)return 0;var n=t/36;return Math.round(10*(4+15*Math.pow(n,.25)+n/5))}}},2781:function(t,n){"use strict";n.Z={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},7076:function(t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for;n.Z=r?Symbol.for("mui.nested"):"__THEME_NESTED__"},3800:function(t,n,r){"use strict";var e=r(7294).createContext(null);n.Z=e},159:function(t,n,r){"use strict";r.d(n,{Z:function(){return o}});var e=r(7294),i=r(3800);function o(){return e.useContext(i.Z)}},1410:function(t,n,r){"use strict";r.d(n,{k:function(){return a}});var e=r(1002),i=(r(5697),{xs:0,sm:600,md:960,lg:1280,xl:1920}),o={keys:["xs","sm","md","lg","xl"],up:function(t){return"@media (min-width:".concat(i[t],"px)")}};function a(t,n,r){if(Array.isArray(n)){var i=t.theme.breakpoints||o;return n.reduce((function(t,e,o){return t[i.up(i.keys[o])]=r(n[o]),t}),{})}if("object"===(0,e.Z)(n)){var a=t.theme.breakpoints||o;return Object.keys(n).reduce((function(t,e){return t[a.up(e)]=r(n[e]),t}),{})}return r(n)}},9668:function(t,n,r){"use strict";var e=r(5953);n.Z=function(t,n){return n?(0,e.Z)(t,n,{clone:!1}):t}},8681:function(t,n,r){"use strict";r.d(n,{h:function(){return s},Z:function(){return g}});var e=r(885),i=r(1410),o=r(9668);var a={m:"margin",p:"padding"},u={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},c={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},f=function(t){var n={};return function(r){return void 0===n[r]&&(n[r]=t(r)),n[r]}}((function(t){if(t.length>2){if(!c[t])return[t];t=c[t]}var n=t.split(""),r=(0,e.Z)(n,2),i=r[0],o=r[1],f=a[i],d=u[o]||"";return Array.isArray(d)?d.map((function(t){return f+t})):[f+d]})),d=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function s(t){var n=t.spacing||8;return"number"===typeof n?function(t){return n*t}:Array.isArray(n)?function(t){return n[t]}:"function"===typeof n?n:function(){}}function l(t,n){return function(r){return t.reduce((function(t,e){return t[e]=function(t,n){if("string"===typeof n||null==n)return n;var r=t(Math.abs(n));return n>=0?r:"number"===typeof r?-r:"-".concat(r)}(n,r),t}),{})}}function p(t){var n=s(t.theme);return Object.keys(t).map((function(r){if(-1===d.indexOf(r))return null;var e=l(f(r),n),o=t[r];return(0,i.k)(t,o,e)})).reduce(o.Z,{})}p.propTypes={},p.filterProps=d;var g=p},5953:function(t,n,r){"use strict";r.d(n,{Z:function(){return a}});var e=r(7462),i=r(1002);function o(t){return t&&"object"===(0,i.Z)(t)&&t.constructor===Object}function a(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},i=r.clone?(0,e.Z)({},t):t;return o(t)&&o(n)&&Object.keys(n).forEach((function(e){"__proto__"!==e&&(o(n[e])&&e in t?i[e]=a(t[e],n[e],r):i[e]=n[e])})),i}},288:function(t,n,r){"use strict";function e(t){for(var n="https://material-ui.com/production-error/?code="+t,r=1;rt.length)&&(n=t.length);for(var r=0,e=new Array(n);r=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}},3366:function(t,n,r){"use strict";function e(t,n){if(null==t)return{};var r,e,i={},o=Object.keys(t);for(e=0;e=0||(i[r]=t[r]);return i}r.d(n,{Z:function(){return e}})},885:function(t,n,r){"use strict";r.d(n,{Z:function(){return i}});var e=r(181);function i(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var e,i,o=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(e=r.next()).done)&&(o.push(e.value),!n||o.length!==n);a=!0);}catch(c){u=!0,i=c}finally{try{a||null==r.return||r.return()}finally{if(u)throw i}}return o}}(t,n)||(0,e.Z)(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},1002:function(t,n,r){"use strict";function e(t){return(e="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}r.d(n,{Z:function(){return e}})},181:function(t,n,r){"use strict";r.d(n,{Z:function(){return i}});var e=r(907);function i(t,n){if(t){if("string"===typeof t)return(0,e.Z)(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?(0,e.Z)(t,n):void 0}}}},function(t){var n=function(n){return t(t.s=n)};t.O(0,[774,179],(function(){return n(6363),n(4651)}));var r=t.O();_N_E=r}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/index-a28b18d8b6126f2f25a7.js b/striker-ui/out/_next/static/chunks/pages/index-a28b18d8b6126f2f25a7.js deleted file mode 100644 index b0cb5f50..00000000 --- a/striker-ui/out/_next/static/chunks/pages/index-a28b18d8b6126f2f25a7.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{210:function(e,n,t){"use strict";t.d(n,{Z:function(){return O}});var r=t(5893),i=t(2809),o=t(7294),s=t(5258),a=t(1120),d=t(9956),c=t(282),l=[{text:"Files",image:"/pngs/files_on.png",uri:"/striker?files=true"},{text:"Tasks",image:"/pngs/tasks_no-jobs_icon.png",uri:"/striker?jobs=true"},{text:"Configure",image:"/pngs/configure_icon_on.png",uri:"/striker?configure=true"},{text:"Striker",image:"/pngs/striker_icon_on.png",uri:"/striker?striker=true"},{text:"Anvil",image:"/pngs/anvil_icon_on.png",uri:"/striker?anvil=true"},{text:"Email",image:"/pngs/email_on.png",uri:"/striker?email=true"},{text:"Logout",image:"/pngs/users_icon_on.png",uri:"/striker?logout=true"},{text:"Help",image:"/pngs/help_icon_on.png",uri:"https://alteeve.com/w/Support"}],u={width:"40em",height:"40em"},h=t(9753),x=t(7159),p=t(2822),g=t(998),f=t(5517),m=t(7623),j=t(442),v=t(964);function b(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function _(e){for(var n=1;n1&&void 0!==arguments[1]?arguments[1]:5e3,t=(0,c.ZP)(e,l,{refreshInterval:n}),r=t.data,i=t.error;return{data:r,isLoading:!i&&!r,isError:i}},h=t(7294),x=t(9570),p=t(964),g=t(9753),f=new Map([["optimal","Optimal"],["not_ready","Not Ready"],["degraded","Degraded"]]),m={uuid:"",setAnvilUuid:function(){return null}},j=(0,h.createContext)(m),v=function(e){var n=e.children,t=(0,h.useState)(""),i=t[0],o=t[1];return(0,r.jsx)(j.Provider,{value:{uuid:i,setAnvilUuid:function(e){o(e)}},children:n})},b=(0,a.Z)((function(){return{decorator:{width:"1.4em",height:"100%",borderRadius:g.n_},ok:{backgroundColor:g.Ej},warning:{backgroundColor:g.Wd},error:{backgroundColor:g.hM},off:{backgroundColor:g.s7}}})),_=function(e){var n=e.colour,t=b();return(0,r.jsx)("div",{className:"".concat(t.decorator," ").concat(t[n])})},Z=t(9386),w=(0,a.Z)((function(){return{root:{width:"100%","&:hover $child":{backgroundColor:g.Gf}},anvilName:{paddingLeft:0}}})),k=function(e){switch(e){case"optimal":return"ok";case"not_ready":return"warning";case"degraded":default:return"error"}},y=function(e){return!(-1===e.hosts.findIndex((function(e){return"offline"!==e.state})))},N=function(e){var n=e.list,t=(0,h.useContext)(j).uuid,i=w(),o=n.findIndex((function(e){return e.anvil_uuid===t}));return(0,r.jsx)(s.Z,{display:"flex",flexDirection:"row",width:"100%",children:""!==t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Z,{p:1,children:(0,r.jsx)(_,{colour:k(n[o].anvil_state)})}),(0,r.jsxs)(s.Z,{p:1,flexGrow:1,className:i.anvilName,children:[(0,r.jsx)(p.z,{text:n[o].anvil_name}),(0,r.jsx)(p.z,{text:f.get(n[o].anvil_state)||"State unavailable"})]}),(0,r.jsx)(s.Z,{p:1,children:(0,r.jsx)(x.Z,{checked:y(n[o]),onChange:function(){return(0,Z.Z)("".concat("/cgi-bin","/set_power"),{anvil_uuid:n[o].anvil_uuid,is_on:!y(n[o])})}})})]})})},O=t(2822),C=t(5517),P=t(998),A=function(e){var n=e.anvil;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.A,{text:n.anvil_name}),(0,r.jsx)(p.A,{text:f.get(n.anvil_state)||"State unavailable"})]})},D=function(e){var n=[],t=[],r=[];return e.forEach((function(e){"optimal"===e.anvil_state?n.push(e):"not_ready"===e.anvil_state?t.push(e):r.push(e)})),[].concat(r,t,n)},T=(0,a.Z)((function(e){return{root:(0,i.Z)({width:"100%",overflow:"auto",height:"30vh",paddingRight:".3em"},e.breakpoints.down(g.li),{height:"100%",overflow:"hidden"}),divider:{background:g.d},button:{"&:hover":{backgroundColor:g.$T},paddingLeft:0},anvil:{paddingLeft:0}}})),L=function(e){switch(e){case"optimal":return"ok";case"not_ready":return"warning";case"degraded":return"error";default:return"off"}},E=function(e){var n=e.list,t=(0,h.useContext)(j),i=t.uuid,o=t.setAnvilUuid,a=T();return(0,h.useEffect)((function(){""===i&&o(D(n)[0].anvil_uuid)}),[i,n,o]),(0,r.jsx)(O.Z,{component:"nav",className:a.root,"aria-label":"mailbox folders",children:D(n).map((function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(C.Z,{className:a.divider}),(0,r.jsx)(P.Z,{button:!0,className:a.button,onClick:function(){return o(e.anvil_uuid)},children:(0,r.jsxs)(s.Z,{display:"flex",flexDirection:"row",width:"100%",children:[(0,r.jsx)(s.Z,{p:1,children:(0,r.jsx)(_,{colour:L(e.anvil_state)})}),(0,r.jsx)(s.Z,{p:1,flexGrow:1,className:a.anvil,children:(0,r.jsx)(A,{anvil:e})})]})},e.anvil_uuid)]})}))})};function S(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function B(e){for(var n=1;n70?n>90?t.barAlert:t.barWarning:t.barOk},variant:"determinate",value:n}),(0,r.jsx)(z.Z,{variant:"determinate",value:0})]})},U=(0,F.Z)({root:{height:"1em",borderRadius:g.n_},colorPrimary:{backgroundColor:g.v9},bar:{borderRadius:g.n_}})(z.Z),W=(0,a.Z)((function(){return{barOk:{backgroundColor:g.Ej},barInProgress:{backgroundColor:g.Wd}}})),q=function(e){var n=e.progressPercentage,t=W();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(U,{classes:{bar:n<100?t.barInProgress:t.barOk},variant:"determinate",value:n}),(0,r.jsx)(z.Z,{variant:"determinate",value:0})]})},H=new Map([["message_0222","The node is in an unknown state."],["message_0223","The node is a full cluster member."],["message_0224","The node is coming online; the cluster resource manager is running (step 2/3)."],["message_0225","The node is coming online; the node is a consensus cluster member (step 1/3)."],["message_0226","The node has booted, but it is not (yet) joining the cluster."]]),V=(0,a.Z)((function(e){return{root:(0,i.Z)({overflow:"auto",height:"28vh",paddingLeft:".3em",paddingRight:".3em"},e.breakpoints.down(g.li),{height:"100%",overflow:"hidden"}),state:{paddingLeft:".7em",paddingRight:".7em",paddingTop:"1em"},bar:{paddingLeft:".7em",paddingRight:".7em"},header:{paddingTop:".3em",paddingRight:".7em"},label:{paddingTop:".3em"},decoratorBox:{paddingRight:".3em"}}})),$=function(e,n){var t=e.exec(n);return t?H.get(t[0])||"Error code not recognized":"Error code not found"},X=function(e){switch(e){case"online":return"ok";case"offline":return"off";default:return"warning"}},J=function(e){var n=e.hosts,t=V(),i=/^[a-zA-Z]/,o=/^(message_[0-9]+)/;return(0,r.jsx)(s.Z,{className:t.root,children:n&&n.map((function(e){var n;return(0,r.jsxs)(d.Lg,{children:[(0,r.jsx)(d.V9,{children:(0,r.jsxs)(s.Z,{display:"flex",width:"100%",className:t.header,children:[(0,r.jsx)(s.Z,{flexGrow:1,children:(0,r.jsx)(p.A,{text:e.host_name})}),(0,r.jsx)(s.Z,{className:t.decoratorBox,children:(0,r.jsx)(_,{colour:X(e.state)})}),(0,r.jsx)(s.Z,{children:(0,r.jsx)(p.A,{text:(null===e||void 0===e||null===(n=e.state)||void 0===n?void 0:n.replace(i,(function(e){return e.toUpperCase()})))||"Not Available"})})]})}),(0,r.jsxs)(s.Z,{display:"flex",className:t.state,children:[(0,r.jsx)(s.Z,{className:t.label,children:(0,r.jsx)(p.A,{text:"Power: "})}),(0,r.jsx)(s.Z,{flexGrow:1,children:(0,r.jsx)(x.Z,{checked:"online"===e.state,onChange:function(){return(0,Z.Z)("".concat("/cgi-bin","/set_power"),{host_uuid:e.host_uuid,is_on:!("online"===e.state)})}})}),(0,r.jsx)(s.Z,{className:t.label,children:(0,r.jsx)(p.A,{text:"Member: "})}),(0,r.jsx)(s.Z,{children:(0,r.jsx)(x.Z,{checked:"online"===e.state,disabled:!("online"===e.state),onChange:function(){return(0,Z.Z)("".concat("/cgi-bin","/set_membership"),{host_uuid:e.host_uuid,is_member:!("online"===e.state)})}})})]}),"online"!==e.state&&"offline"!==e.state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Z,{display:"flex",width:"100%",className:t.state,children:(0,r.jsx)(s.Z,{children:(0,r.jsx)(p.A,{text:$(o,e.state_message)})})}),(0,r.jsx)(s.Z,{display:"flex",width:"100%",className:t.bar,children:(0,r.jsx)(s.Z,{flexGrow:1,children:(0,r.jsx)(q,{progressPercentage:e.state_percent})})})]})]},e.host_uuid)}))})},K=t(8382),Q=function(e){return null===e||void 0===e?void 0:e.filter((function(e){return e.host_uuid}))},Y=function(e){var n=e.anvil,t=(0,h.useContext)(j).uuid,i=u("".concat("/cgi-bin","/get_status?anvil_uuid=").concat(t)),o=i.data,s=i.isLoading,a=n.findIndex((function(e){return e.anvil_uuid===t}));return(0,r.jsxs)(d.s_,{children:[(0,r.jsx)(p.z,{text:"Nodes"}),s?(0,r.jsx)(K.Z,{}):(0,r.jsx)(r.Fragment,{children:-1!==a&&o&&(0,r.jsx)(J,{hosts:Q(n[a].hosts).map((function(e,n){return o.hosts[n]}))})})]})},ee=function(){var e=(0,h.useContext)(j).uuid,n=u("".concat("/cgi-bin","/get_cpu?anvil_uuid=").concat(e)),t=n.data,i=n.isLoading,o=i||!t?{allocated:0,cores:0,threads:0}:t;return(0,r.jsxs)(d.s_,{children:[(0,r.jsx)(p.z,{text:"CPU"}),i?(0,r.jsx)(K.Z,{}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(s.Z,{display:"flex",width:"100%",children:(0,r.jsxs)(s.Z,{flexGrow:1,style:{marginLeft:"1em",marginTop:"1em"},children:[(0,r.jsx)(p.A,{text:"Total Cores: ".concat(o.cores)}),(0,r.jsx)(p.A,{text:"Total Threads: ".concat(o.threads)}),(0,r.jsx)(p.A,{text:"Allocated Cores: ".concat(o.allocated)})]})})})]})},ne=t(8600),te=t.n(ne),re=(0,a.Z)((function(){return{fs:{paddingLeft:".7em",paddingRight:".7em",paddingTop:"1.2em"},bar:{paddingLeft:".7em",paddingRight:".7em"},decoratorBox:{paddingRight:".3em"}}})),ie=function(e){var n=e.group,t=re();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.Z,{display:"flex",width:"100%",className:t.fs,children:[(0,r.jsx)(s.Z,{flexGrow:1,children:(0,r.jsx)(p.A,{text:"Used: ".concat(te()(n.storage_group_total-n.storage_group_free,{binary:!0}))})}),(0,r.jsx)(s.Z,{children:(0,r.jsx)(p.A,{text:"Free: ".concat(te()(n.storage_group_free,{binary:!0}))})})]}),(0,r.jsx)(s.Z,{display:"flex",width:"100%",className:t.bar,children:(0,r.jsx)(s.Z,{flexGrow:1,children:(0,r.jsx)(M,{allocated:(n.storage_group_total-n.storage_group_free)/n.storage_group_total*100})})}),(0,r.jsx)(s.Z,{display:"flex",justifyContent:"center",width:"100%",children:(0,r.jsx)(p.A,{text:"Total Storage: ".concat(te()(n.storage_group_total,{binary:!0}))})})]})},oe=(0,a.Z)((function(e){return{header:{paddingTop:".1em",paddingRight:".7em"},root:(0,i.Z)({overflow:"auto",height:"78vh",paddingLeft:".3em",paddingRight:".3em"},e.breakpoints.down(g.li),{height:"100%"})}})),se=function(){var e=oe(),n=(0,h.useContext)(j).uuid,t=u("".concat("/cgi-bin","/get_shared_storage?anvil_uuid=").concat(n)),i=t.data,o=t.isLoading;return(0,r.jsxs)(d.s_,{children:[(0,r.jsx)(p.z,{text:"Shared Storage"}),o?(0,r.jsx)(K.Z,{}):(0,r.jsx)(s.Z,{className:e.root,children:(null===i||void 0===i?void 0:i.storage_groups)&&i.storage_groups.map((function(n){return(0,r.jsxs)(d.Lg,{children:[(0,r.jsx)(d.V9,{children:(0,r.jsx)(s.Z,{display:"flex",width:"100%",className:e.header,children:(0,r.jsx)(s.Z,{children:(0,r.jsx)(p.A,{text:n.storage_group_name})})})}),(0,r.jsx)(ie,{group:n},n.storage_group_uuid)]},n.storage_group_uuid)}))})]})},ae=function(){var e=(0,h.useContext)(j).uuid,n=u("".concat("/cgi-bin","/get_memory?anvil_uuid=").concat(e)),t=n.data,i=n.isLoading,o=i||!t?{total:0,allocated:0,reserved:0}:t;return(0,r.jsxs)(d.s_,{children:[(0,r.jsx)(p.z,{text:"Memory"}),i?(0,r.jsx)(K.Z,{}):(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsxs)(s.Z,{display:"flex",width:"100%",children:[(0,r.jsx)(s.Z,{flexGrow:1,children:(0,r.jsx)(p.A,{text:"Allocated: ".concat(te()(o.allocated,{binary:!0}))})}),(0,r.jsx)(s.Z,{children:(0,r.jsx)(p.A,{text:"Free: ".concat(te()(o.total-o.allocated,{binary:!0}))})})]}),(0,r.jsx)(s.Z,{display:"flex",width:"100%",children:(0,r.jsx)(s.Z,{flexGrow:1,children:(0,r.jsx)(M,{allocated:o.allocated/o.total*100})})}),(0,r.jsx)(s.Z,{display:"flex",justifyContent:"center",width:"100%",children:(0,r.jsx)(p.A,{text:"Total: ".concat(te()(o.total,{binary:!0})," | Reserved: ").concat(te()(o.reserved,{binary:!0}))})})]})]})},de=function(e){var n=[],t={bonds:[]};return null===e||void 0===e||e.hosts.forEach((function(e){e.bonds.forEach((function(r){var i=n.findIndex((function(e){return e===r.bond_name}));-1===i?(n.push(r.bond_name),t.bonds.push({bond_name:r.bond_name,bond_uuid:r.bond_uuid,bond_speed:0,bond_state:"degraded",hosts:[{host_name:e.host_name,host_uuid:e.host_uuid,link:r.links[0].is_active?r.links[0]:r.links[1]}]})):t.bonds[i].hosts.push({host_name:e.host_name,host_uuid:e.host_uuid,link:r.links[0].is_active?r.links[0]:r.links[1]})}))})),t.bonds.forEach((function(e){var n=e.hosts[0].link.link_speed>e.hosts[1].link.link_speed?1:0;e.bond_speed=e.hosts[n].link.link_speed,e.bond_state=e.hosts[n].link.link_state})),t},ce=(0,a.Z)((function(e){return{container:(0,i.Z)({width:"100%",overflow:"auto",height:"32vh",paddingRight:".3em"},e.breakpoints.down(g.li),{height:"100%",overflow:"hidden"}),root:{paddingTop:".7em",paddingBottom:".7em"},noPaddingLeft:{paddingLeft:0},divider:{background:g.d},verticalDivider:{height:"3.5em"}}})),le=function(e){switch(e){case"optimal":return"ok";case"degraded":return"warning";case"down":return"error";default:return"warning"}},ue=function(){var e=(0,h.useContext)(j).uuid,n=ce(),t=u("".concat("/cgi-bin","/get_networks?anvil_uuid=").concat(e)),i=t.data,o=t.isLoading,a=de(i);return(0,r.jsxs)(d.s_,{children:[(0,r.jsx)(p.z,{text:"Network"}),o?(0,r.jsx)(K.Z,{}):(0,r.jsx)(s.Z,{className:n.container,children:i&&a.bonds.map((function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.Z,{display:"flex",flexDirection:"row",width:"100%",className:n.root,children:[(0,r.jsx)(s.Z,{p:1,className:n.noPaddingLeft,children:(0,r.jsx)(_,{colour:le(e.bond_state)})}),(0,r.jsxs)(s.Z,{p:1,flexGrow:1,className:n.noPaddingLeft,children:[(0,r.jsx)(p.A,{text:e.bond_name}),(0,r.jsx)(p.A,{text:"".concat(e.bond_speed,"Mbps")})]}),(0,r.jsx)(s.Z,{display:"flex",style:{paddingTop:".5em"},children:e.hosts.map((function(t,i){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Z,{p:1,style:{paddingTop:0,paddingBottom:0},children:(0,r.jsxs)(s.Z,{children:[(0,r.jsx)(p.A,{text:t.host_name,selected:!1}),(0,r.jsx)(p.A,{text:t.link.link_name})]})},t.host_name),i!==e.hosts.length-1&&(0,r.jsx)(C.Z,{className:"".concat(n.divider," ").concat(n.verticalDivider),orientation:"vertical",flexItem:!0})]})}))})]}),(0,r.jsx)(C.Z,{className:n.divider})]})}))})]})},he=t(2710),xe=t(7812),pe=t(282),ge=t(2318),fe=t(5675),me=t(5639),je=t(3258),ve=t(9067),be=t(8513),_e=t(1959),Ze=new Map([["running","Running"],["idle","Idle"],["paused","Paused"],["in shutdown","Shutting Down"],["shut off","Off"],["crashed","Crashed"],["pmsuspended","PM Suspended"],["migrating","Migrating"]]),we=(0,a.Z)((function(e){return{root:(0,i.Z)({width:"100%",overflow:"auto",height:"78vh",paddingRight:".3em"},e.breakpoints.down(g.li),{height:"100%",overflow:"hidden"}),divider:{background:g.d},verticalDivider:{height:"75%",paddingTop:"1em"},button:{"&:hover":{backgroundColor:g.$T},paddingLeft:0},headerPadding:{paddingLeft:".3em"},hostsBox:{padding:"1em",paddingRight:0},hostBox:{paddingTop:0},checkbox:{paddingTop:".8em"},menuItem:{backgroundColor:g.lD,paddingRight:"3em","&:hover":{backgroundColor:g.lD}},editButton:{borderRadius:8,backgroundColor:g.s7,"&:hover":{backgroundColor:g.lD}},editButtonBox:{paddingTop:".3em"},dropdown:{paddingTop:".8em",paddingBottom:".8em"},power:{color:g.E5},on:{color:g.Ej},off:{color:g.hM},all:{paddingTop:".5em",paddingLeft:".3em"}}})),ke=function(e){switch(e){case"running":return"ok";case"shut off":return"off";case"crashed":return"error";default:return"warning"}},ye=["on","off"],Ne=function(e){var n,t=e.anvil,i=(0,h.useState)(null),o=i[0],a=i[1],c=(0,h.useState)(!1),l=c[0],x=c[1],f=(0,h.useState)(!1),m=f[0],v=f[1],b=(0,h.useState)([]),w=b[0],k=b[1],y=(0,h.useContext)(j).uuid,N=we(),A=u("".concat("/cgi-bin","/get_servers?anvil_uuid=").concat(y)),D=A.data,T=A.isLoading,L=t.findIndex((function(e){return e.anvil_uuid===y})),E=Q(null===(n=t[L])||void 0===n?void 0:n.hosts);return(0,r.jsxs)(d.s_,{children:[(0,r.jsxs)(s.Z,{className:N.headerPadding,display:"flex",children:[(0,r.jsx)(s.Z,{flexGrow:1,children:(0,r.jsx)(p.z,{text:"Servers"})}),(0,r.jsx)(s.Z,{className:N.editButtonBox,children:(0,r.jsx)(xe.Z,{className:N.editButton,style:{color:g.E5},onClick:function(){return x(!l)},children:l?(0,r.jsx)(_e.Z,{}):(0,r.jsx)(ve.Z,{})})})]}),l&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Z,{className:N.headerPadding,display:"flex",children:(0,r.jsxs)(s.Z,{flexGrow:1,className:N.dropdown,children:[(0,r.jsx)(pe.Z,{variant:"contained",startIcon:(0,r.jsx)(be.Z,{}),onClick:function(e){a(e.currentTarget)},style:{textTransform:"none"},children:(0,r.jsx)(ge.Z,{className:N.power,variant:"subtitle1",children:"Power"})}),(0,r.jsx)(fe.Z,{anchorEl:o,keepMounted:!0,open:Boolean(o),onClose:function(){return a(null)},children:ye.map((function(e){return(0,r.jsx)(me.Z,{onClick:function(){return function(e){a(null),w.length&&(0,Z.Z)("".concat("/cgi-bin","/set_power"),{server_uuid_list:w,is_on:"on"===e})}(e)},className:N.menuItem,children:(0,r.jsx)(ge.Z,{className:N[e],variant:"subtitle1",children:e.replace(/^[a-z]/,(function(e){return e.toUpperCase()}))})},e)}))})]})}),(0,r.jsxs)(s.Z,{display:"flex",children:[(0,r.jsx)(s.Z,{children:(0,r.jsx)(je.Z,{style:{color:g.lD},color:"secondary",checked:m,onChange:function(){k(m?[]:D.servers.map((function(e){return e.server_uuid}))),v(!m)}})}),(0,r.jsx)(s.Z,{className:N.all,children:(0,r.jsx)(p.A,{text:"All"})})]})]}),T?(0,r.jsx)(K.Z,{}):(0,r.jsx)(s.Z,{className:N.root,children:(0,r.jsx)(O.Z,{component:"nav",children:D&&D.servers.map((function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(P.Z,{button:!0,className:N.button,component:"a",href:"/server?uuid=".concat(e.server_uuid,"&server_name=").concat(e.server_name),children:(0,r.jsxs)(s.Z,{display:"flex",flexDirection:"row",width:"100%",children:[l&&(0,r.jsx)(s.Z,{className:N.checkbox,children:(0,r.jsx)(je.Z,{style:{color:g.lD},color:"secondary",checked:void 0!==w.find((function(n){return n===e.server_uuid})),onChange:function(){return function(e){var n=w.indexOf(e);-1===n?w.push(e):w.splice(n,1),k((0,he.Z)(w))}(e.server_uuid)}})}),(0,r.jsx)(s.Z,{p:1,children:(0,r.jsx)(_,{colour:ke(e.server_state)})}),(0,r.jsxs)(s.Z,{p:1,flexGrow:1,children:[(0,r.jsx)(p.A,{text:e.server_name}),(0,r.jsx)(p.A,{text:Ze.get(e.server_state)||"Not Available"})]}),(0,r.jsx)(s.Z,{display:"flex",className:N.hostsBox,children:"shut off"!==e.server_state&&"crashed"!==e.server_state&&E.map((function(n,t){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Z,{p:1,className:N.hostBox,children:(0,r.jsx)(p.A,{text:n.host_name,selected:e.server_host_uuid===n.host_uuid})},n.host_uuid),t!==E.length-1&&(0,r.jsx)(C.Z,{className:"".concat(N.divider," ").concat(N.verticalDivider),orientation:"vertical"})]})}))})]})},e.server_uuid),(0,r.jsx)(C.Z,{className:N.divider})]})}))})})]})},Oe=t(210),Ce=function(){var e=(0,h.useState)(void 0),n=e[0],t=e[1];return(0,h.useEffect)((function(){var e=function(){t(window.innerWidth)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),n},Pe=(0,a.Z)((function(e){var n;return{child:(n={width:"22%",height:"100%"},(0,i.Z)(n,e.breakpoints.down(g.li),{width:"50%"}),(0,i.Z)(n,e.breakpoints.down("md"),{width:"100%"}),n),server:(0,i.Z)({width:"35%",height:"100%"},e.breakpoints.down("md"),{width:"100%"}),container:(0,i.Z)({display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between"},e.breakpoints.down("md"),{display:"block"})}})),Ae=function(){var e=Pe(),n=Ce(),t=u("".concat("/cgi-bin","/get_anvils")).data;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.default,{children:(0,r.jsx)("title",{children:"Dashboard"})}),(0,r.jsxs)(v,{children:[(0,r.jsx)(Oe.Z,{}),(null===t||void 0===t?void 0:t.anvils)&&n&&(n>g.li?(0,r.jsxs)(s.Z,{className:e.container,children:[(0,r.jsxs)(s.Z,{className:e.child,children:[(0,r.jsx)(R,{list:t}),(0,r.jsx)(Y,{anvil:t.anvils})]}),(0,r.jsx)(s.Z,{className:e.server,children:(0,r.jsx)(Ne,{anvil:t.anvils})}),(0,r.jsx)(s.Z,{className:e.child,children:(0,r.jsx)(se,{})}),(0,r.jsxs)(s.Z,{className:e.child,children:[(0,r.jsx)(ue,{}),(0,r.jsx)(ee,{}),(0,r.jsx)(ae,{})]})]}):(0,r.jsxs)(s.Z,{className:e.container,children:[(0,r.jsxs)(s.Z,{className:e.child,children:[(0,r.jsx)(Ne,{anvil:t.anvils}),(0,r.jsx)(R,{list:t}),(0,r.jsx)(Y,{anvil:t.anvils})]}),(0,r.jsxs)(s.Z,{className:e.child,children:[(0,r.jsx)(ue,{}),(0,r.jsx)(se,{}),(0,r.jsx)(ee,{}),(0,r.jsx)(ae,{})]})]}))]})]})}},5301:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return t(7925)}])}},function(e){e.O(0,[322,370,774,888,179],(function(){return n=5301,e(e.s=n);var n}));var n=e.O();_N_E=n}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/index-bb493c5b52078039ce80.js b/striker-ui/out/_next/static/chunks/pages/index-bb493c5b52078039ce80.js new file mode 100644 index 00000000..8527cd79 --- /dev/null +++ b/striker-ui/out/_next/static/chunks/pages/index-bb493c5b52078039ce80.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{210:function(e,n,t){"use strict";t.d(n,{Z:function(){return O}});var r=t(4942),i=t(7294),o=t(5258),s=t(1120),a=t(9956),d=t(282),c=[{text:"Files",image:"/pngs/files_on.png",uri:"/striker?files=true"},{text:"Tasks",image:"/pngs/tasks_no-jobs_icon.png",uri:"/striker?jobs=true"},{text:"Configure",image:"/pngs/configure_icon_on.png",uri:"/striker?configure=true"},{text:"Striker",image:"/pngs/striker_icon_on.png",uri:"/striker?striker=true"},{text:"Anvil",image:"/pngs/anvil_icon_on.png",uri:"/striker?anvil=true"},{text:"Email",image:"/pngs/email_on.png",uri:"/striker?email=true"},{text:"Logout",image:"/pngs/users_icon_on.png",uri:"/striker?logout=true"},{text:"Help",image:"/pngs/help_icon_on.png",uri:"https://alteeve.com/w/Support"}],l={width:"40em",height:"40em"},u=t(9753),h=t(7159),x=t(2822),p=t(998),g=t(5517),f=t(7623),m=t(442),j=t(964),v=t(5893);function b(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function _(e){for(var n=1;n1&&void 0!==arguments[1]?arguments[1]:5e3,t=(0,d.ZP)(e,c,{refreshInterval:n}),r=t.data,i=t.error;return{data:r,isLoading:!i&&!r,isError:i}},u=t(7294),h=t(9570),x=t(964),p=t(9753),g=new Map([["optimal","Optimal"],["not_ready","Not Ready"],["degraded","Degraded"]]),f=t(5893),m={uuid:"",setAnvilUuid:function(){return null}},j=(0,u.createContext)(m),v=function(e){var n=e.children,t=(0,u.useState)(""),r=t[0],i=t[1];return(0,f.jsx)(j.Provider,{value:{uuid:r,setAnvilUuid:function(e){i(e)}},children:n})},b=(0,s.Z)((function(){return{decorator:{width:"1.4em",height:"100%",borderRadius:p.n_},ok:{backgroundColor:p.Ej},warning:{backgroundColor:p.Wd},error:{backgroundColor:p.hM},off:{backgroundColor:p.s7}}})),_=function(e){var n=e.colour,t=b();return(0,f.jsx)("div",{className:"".concat(t.decorator," ").concat(t[n])})},Z=t(9386),w=(0,s.Z)((function(){return{root:{width:"100%","&:hover $child":{backgroundColor:p.Gf}},anvilName:{paddingLeft:0}}})),k=function(e){switch(e){case"optimal":return"ok";case"not_ready":return"warning";case"degraded":default:return"error"}},y=function(e){return!(-1===e.hosts.findIndex((function(e){return"offline"!==e.state})))},N=function(e){var n=e.list,t=(0,u.useContext)(j).uuid,r=w(),i=n.findIndex((function(e){return e.anvil_uuid===t}));return(0,f.jsx)(o.Z,{display:"flex",flexDirection:"row",width:"100%",children:""!==t&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(o.Z,{p:1,children:(0,f.jsx)(_,{colour:k(n[i].anvil_state)})}),(0,f.jsxs)(o.Z,{p:1,flexGrow:1,className:r.anvilName,children:[(0,f.jsx)(x.z,{text:n[i].anvil_name}),(0,f.jsx)(x.z,{text:g.get(n[i].anvil_state)||"State unavailable"})]}),(0,f.jsx)(o.Z,{p:1,children:(0,f.jsx)(h.Z,{checked:y(n[i]),onChange:function(){return(0,Z.Z)("".concat("/cgi-bin","/set_power"),{anvil_uuid:n[i].anvil_uuid,is_on:!y(n[i])})}})})]})})},O=t(2822),C=t(5517),P=t(998),A=function(e){var n=e.anvil;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(x.A,{text:n.anvil_name}),(0,f.jsx)(x.A,{text:g.get(n.anvil_state)||"State unavailable"})]})},T=function(e){var n=[],t=[],r=[];return e.forEach((function(e){"optimal"===e.anvil_state?n.push(e):"not_ready"===e.anvil_state?t.push(e):r.push(e)})),[].concat(r,t,n)},D=(0,s.Z)((function(e){return{root:(0,r.Z)({width:"100%",overflow:"auto",height:"30vh",paddingRight:".3em"},e.breakpoints.down(p.li),{height:"100%",overflow:"hidden"}),divider:{background:p.d},button:{"&:hover":{backgroundColor:p.$T},paddingLeft:0},anvil:{paddingLeft:0}}})),L=function(e){switch(e){case"optimal":return"ok";case"not_ready":return"warning";case"degraded":return"error";default:return"off"}},E=function(e){var n=e.list,t=(0,u.useContext)(j),r=t.uuid,i=t.setAnvilUuid,s=D();return(0,u.useEffect)((function(){""===r&&i(T(n)[0].anvil_uuid)}),[r,n,i]),(0,f.jsx)(O.Z,{component:"nav",className:s.root,"aria-label":"mailbox folders",children:T(n).map((function(e){return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(C.Z,{className:s.divider}),(0,f.jsx)(P.Z,{button:!0,className:s.button,onClick:function(){return i(e.anvil_uuid)},children:(0,f.jsxs)(o.Z,{display:"flex",flexDirection:"row",width:"100%",children:[(0,f.jsx)(o.Z,{p:1,children:(0,f.jsx)(_,{colour:L(e.anvil_state)})}),(0,f.jsx)(o.Z,{p:1,flexGrow:1,className:s.anvil,children:(0,f.jsx)(A,{anvil:e})})]})},e.anvil_uuid)]})}))})};function S(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function B(e){for(var n=1;n70?n>90?t.barAlert:t.barWarning:t.barOk},variant:"determinate",value:n}),(0,f.jsx)(z.Z,{variant:"determinate",value:0})]})},U=(0,F.Z)({root:{height:"1em",borderRadius:p.n_},colorPrimary:{backgroundColor:p.v9},bar:{borderRadius:p.n_}})(z.Z),W=(0,s.Z)((function(){return{barOk:{backgroundColor:p.Ej},barInProgress:{backgroundColor:p.Wd}}})),q=function(e){var n=e.progressPercentage,t=W();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(U,{classes:{bar:n<100?t.barInProgress:t.barOk},variant:"determinate",value:n}),(0,f.jsx)(z.Z,{variant:"determinate",value:0})]})},H=new Map([["message_0222","The node is in an unknown state."],["message_0223","The node is a full cluster member."],["message_0224","The node is coming online; the cluster resource manager is running (step 2/3)."],["message_0225","The node is coming online; the node is a consensus cluster member (step 1/3)."],["message_0226","The node has booted, but it is not (yet) joining the cluster."]]),V=(0,s.Z)((function(e){return{root:(0,r.Z)({overflow:"auto",height:"28vh",paddingLeft:".3em",paddingRight:".3em"},e.breakpoints.down(p.li),{height:"100%",overflow:"hidden"}),state:{paddingLeft:".7em",paddingRight:".7em",paddingTop:"1em"},bar:{paddingLeft:".7em",paddingRight:".7em"},header:{paddingTop:".3em",paddingRight:".7em"},label:{paddingTop:".3em"},decoratorBox:{paddingRight:".3em"}}})),$=function(e,n){var t=e.exec(n);return t?H.get(t[0])||"Error code not recognized":"Error code not found"},X=function(e){switch(e){case"online":return"ok";case"offline":return"off";default:return"warning"}},J=function(e){var n=e.hosts,t=V(),r=/^[a-zA-Z]/,i=/^(message_[0-9]+)/;return(0,f.jsx)(o.Z,{className:t.root,children:n&&n.map((function(e){var n;return(0,f.jsxs)(a.Lg,{children:[(0,f.jsx)(a.V9,{children:(0,f.jsxs)(o.Z,{display:"flex",width:"100%",className:t.header,children:[(0,f.jsx)(o.Z,{flexGrow:1,children:(0,f.jsx)(x.A,{text:e.host_name})}),(0,f.jsx)(o.Z,{className:t.decoratorBox,children:(0,f.jsx)(_,{colour:X(e.state)})}),(0,f.jsx)(o.Z,{children:(0,f.jsx)(x.A,{text:(null===e||void 0===e||null===(n=e.state)||void 0===n?void 0:n.replace(r,(function(e){return e.toUpperCase()})))||"Not Available"})})]})}),(0,f.jsxs)(o.Z,{display:"flex",className:t.state,children:[(0,f.jsx)(o.Z,{className:t.label,children:(0,f.jsx)(x.A,{text:"Power: "})}),(0,f.jsx)(o.Z,{flexGrow:1,children:(0,f.jsx)(h.Z,{checked:"online"===e.state,onChange:function(){return(0,Z.Z)("".concat("/cgi-bin","/set_power"),{host_uuid:e.host_uuid,is_on:!("online"===e.state)})}})}),(0,f.jsx)(o.Z,{className:t.label,children:(0,f.jsx)(x.A,{text:"Member: "})}),(0,f.jsx)(o.Z,{children:(0,f.jsx)(h.Z,{checked:"online"===e.state,disabled:!("online"===e.state),onChange:function(){return(0,Z.Z)("".concat("/cgi-bin","/set_membership"),{host_uuid:e.host_uuid,is_member:!("online"===e.state)})}})})]}),"online"!==e.state&&"offline"!==e.state&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(o.Z,{display:"flex",width:"100%",className:t.state,children:(0,f.jsx)(o.Z,{children:(0,f.jsx)(x.A,{text:$(i,e.state_message)})})}),(0,f.jsx)(o.Z,{display:"flex",width:"100%",className:t.bar,children:(0,f.jsx)(o.Z,{flexGrow:1,children:(0,f.jsx)(q,{progressPercentage:e.state_percent})})})]})]},e.host_uuid)}))})},K=t(8382),Q=function(e){return null===e||void 0===e?void 0:e.filter((function(e){return e.host_uuid}))},Y=function(e){var n=e.anvil,t=(0,u.useContext)(j).uuid,r=l("".concat("/cgi-bin","/get_status?anvil_uuid=").concat(t)),i=r.data,o=r.isLoading,s=n.findIndex((function(e){return e.anvil_uuid===t}));return(0,f.jsxs)(a.s_,{children:[(0,f.jsx)(x.z,{text:"Nodes"}),o?(0,f.jsx)(K.Z,{}):(0,f.jsx)(f.Fragment,{children:-1!==s&&i&&(0,f.jsx)(J,{hosts:Q(n[s].hosts).map((function(e,n){return i.hosts[n]}))})})]})},ee=function(){var e=(0,u.useContext)(j).uuid,n=l("".concat("/cgi-bin","/get_cpu?anvil_uuid=").concat(e)),t=n.data,r=n.isLoading,i=r||!t?{allocated:0,cores:0,threads:0}:t;return(0,f.jsxs)(a.s_,{children:[(0,f.jsx)(x.z,{text:"CPU"}),r?(0,f.jsx)(K.Z,{}):(0,f.jsx)(f.Fragment,{children:(0,f.jsx)(o.Z,{display:"flex",width:"100%",children:(0,f.jsxs)(o.Z,{flexGrow:1,style:{marginLeft:"1em",marginTop:"1em"},children:[(0,f.jsx)(x.A,{text:"Total Cores: ".concat(i.cores)}),(0,f.jsx)(x.A,{text:"Total Threads: ".concat(i.threads)}),(0,f.jsx)(x.A,{text:"Allocated Cores: ".concat(i.allocated)})]})})})]})},ne=t(8600),te=t.n(ne),re=(0,s.Z)((function(){return{fs:{paddingLeft:".7em",paddingRight:".7em",paddingTop:"1.2em"},bar:{paddingLeft:".7em",paddingRight:".7em"},decoratorBox:{paddingRight:".3em"}}})),ie=function(e){var n=e.group,t=re();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(o.Z,{display:"flex",width:"100%",className:t.fs,children:[(0,f.jsx)(o.Z,{flexGrow:1,children:(0,f.jsx)(x.A,{text:"Used: ".concat(te()(n.storage_group_total-n.storage_group_free,{binary:!0}))})}),(0,f.jsx)(o.Z,{children:(0,f.jsx)(x.A,{text:"Free: ".concat(te()(n.storage_group_free,{binary:!0}))})})]}),(0,f.jsx)(o.Z,{display:"flex",width:"100%",className:t.bar,children:(0,f.jsx)(o.Z,{flexGrow:1,children:(0,f.jsx)(M,{allocated:(n.storage_group_total-n.storage_group_free)/n.storage_group_total*100})})}),(0,f.jsx)(o.Z,{display:"flex",justifyContent:"center",width:"100%",children:(0,f.jsx)(x.A,{text:"Total Storage: ".concat(te()(n.storage_group_total,{binary:!0}))})})]})},oe=(0,s.Z)((function(e){return{header:{paddingTop:".1em",paddingRight:".7em"},root:(0,r.Z)({overflow:"auto",height:"78vh",paddingLeft:".3em",paddingRight:".3em"},e.breakpoints.down(p.li),{height:"100%"})}})),se=function(){var e=oe(),n=(0,u.useContext)(j).uuid,t=l("".concat("/cgi-bin","/get_shared_storage?anvil_uuid=").concat(n)),r=t.data,i=t.isLoading;return(0,f.jsxs)(a.s_,{children:[(0,f.jsx)(x.z,{text:"Shared Storage"}),i?(0,f.jsx)(K.Z,{}):(0,f.jsx)(o.Z,{className:e.root,children:(null===r||void 0===r?void 0:r.storage_groups)&&r.storage_groups.map((function(n){return(0,f.jsxs)(a.Lg,{children:[(0,f.jsx)(a.V9,{children:(0,f.jsx)(o.Z,{display:"flex",width:"100%",className:e.header,children:(0,f.jsx)(o.Z,{children:(0,f.jsx)(x.A,{text:n.storage_group_name})})})}),(0,f.jsx)(ie,{group:n},n.storage_group_uuid)]},n.storage_group_uuid)}))})]})},ae=function(){var e=(0,u.useContext)(j).uuid,n=l("".concat("/cgi-bin","/get_memory?anvil_uuid=").concat(e)),t=n.data,r=n.isLoading,i=r||!t?{total:0,allocated:0,reserved:0}:t;return(0,f.jsxs)(a.s_,{children:[(0,f.jsx)(x.z,{text:"Memory"}),r?(0,f.jsx)(K.Z,{}):(0,f.jsxs)(f.Fragment,{children:[" ",(0,f.jsxs)(o.Z,{display:"flex",width:"100%",children:[(0,f.jsx)(o.Z,{flexGrow:1,children:(0,f.jsx)(x.A,{text:"Allocated: ".concat(te()(i.allocated,{binary:!0}))})}),(0,f.jsx)(o.Z,{children:(0,f.jsx)(x.A,{text:"Free: ".concat(te()(i.total-i.allocated,{binary:!0}))})})]}),(0,f.jsx)(o.Z,{display:"flex",width:"100%",children:(0,f.jsx)(o.Z,{flexGrow:1,children:(0,f.jsx)(M,{allocated:i.allocated/i.total*100})})}),(0,f.jsx)(o.Z,{display:"flex",justifyContent:"center",width:"100%",children:(0,f.jsx)(x.A,{text:"Total: ".concat(te()(i.total,{binary:!0})," | Reserved: ").concat(te()(i.reserved,{binary:!0}))})})]})]})},de=function(e){var n=[],t={bonds:[]};return null===e||void 0===e||e.hosts.forEach((function(e){e.bonds.forEach((function(r){var i=n.findIndex((function(e){return e===r.bond_name}));-1===i?(n.push(r.bond_name),t.bonds.push({bond_name:r.bond_name,bond_uuid:r.bond_uuid,bond_speed:0,bond_state:"degraded",hosts:[{host_name:e.host_name,host_uuid:e.host_uuid,link:r.links[0].is_active?r.links[0]:r.links[1]}]})):t.bonds[i].hosts.push({host_name:e.host_name,host_uuid:e.host_uuid,link:r.links[0].is_active?r.links[0]:r.links[1]})}))})),t.bonds.forEach((function(e){var n=e.hosts[0].link.link_speed>e.hosts[1].link.link_speed?1:0;e.bond_speed=e.hosts[n].link.link_speed,e.bond_state=e.hosts[n].link.link_state})),t},ce=(0,s.Z)((function(e){return{container:(0,r.Z)({width:"100%",overflow:"auto",height:"32vh",paddingRight:".3em"},e.breakpoints.down(p.li),{height:"100%",overflow:"hidden"}),root:{paddingTop:".7em",paddingBottom:".7em"},noPaddingLeft:{paddingLeft:0},divider:{background:p.d},verticalDivider:{height:"3.5em"}}})),le=function(e){switch(e){case"optimal":return"ok";case"degraded":return"warning";case"down":return"error";default:return"warning"}},ue=function(){var e=(0,u.useContext)(j).uuid,n=ce(),t=l("".concat("/cgi-bin","/get_networks?anvil_uuid=").concat(e)),r=t.data,i=t.isLoading,s=de(r);return(0,f.jsxs)(a.s_,{children:[(0,f.jsx)(x.z,{text:"Network"}),i?(0,f.jsx)(K.Z,{}):(0,f.jsx)(o.Z,{className:n.container,children:r&&s.bonds.map((function(e){return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(o.Z,{display:"flex",flexDirection:"row",width:"100%",className:n.root,children:[(0,f.jsx)(o.Z,{p:1,className:n.noPaddingLeft,children:(0,f.jsx)(_,{colour:le(e.bond_state)})}),(0,f.jsxs)(o.Z,{p:1,flexGrow:1,className:n.noPaddingLeft,children:[(0,f.jsx)(x.A,{text:e.bond_name}),(0,f.jsx)(x.A,{text:"".concat(e.bond_speed,"Mbps")})]}),(0,f.jsx)(o.Z,{display:"flex",style:{paddingTop:".5em"},children:e.hosts.map((function(t,r){return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(o.Z,{p:1,style:{paddingTop:0,paddingBottom:0},children:(0,f.jsxs)(o.Z,{children:[(0,f.jsx)(x.A,{text:t.host_name,selected:!1}),(0,f.jsx)(x.A,{text:t.link.link_name})]})},t.host_name),r!==e.hosts.length-1&&(0,f.jsx)(C.Z,{className:"".concat(n.divider," ").concat(n.verticalDivider),orientation:"vertical",flexItem:!0})]})}))})]}),(0,f.jsx)(C.Z,{className:n.divider})]})}))})]})},he=t(2982),xe=t(7812),pe=t(282),ge=t(2318),fe=t(5675),me=t(5639),je=t(3258),ve=t(9067),be=t(8513),_e=t(1959),Ze=new Map([["running","Running"],["idle","Idle"],["paused","Paused"],["in shutdown","Shutting Down"],["shut off","Off"],["crashed","Crashed"],["pmsuspended","PM Suspended"],["migrating","Migrating"]]),we=(0,s.Z)((function(e){return{root:(0,r.Z)({width:"100%",overflow:"auto",height:"78vh",paddingRight:".3em"},e.breakpoints.down(p.li),{height:"100%",overflow:"hidden"}),divider:{background:p.d},verticalDivider:{height:"75%",paddingTop:"1em"},button:{"&:hover":{backgroundColor:p.$T},paddingLeft:0},headerPadding:{paddingLeft:".3em"},hostsBox:{padding:"1em",paddingRight:0},hostBox:{paddingTop:0},checkbox:{paddingTop:".8em"},menuItem:{backgroundColor:p.s7,paddingRight:"3em","&:hover":{backgroundColor:p.s7}},editButton:{borderRadius:8,backgroundColor:p.s7,"&:hover":{backgroundColor:p.s7}},editButtonBox:{paddingTop:".3em"},dropdown:{paddingTop:".8em",paddingBottom:".8em"},power:{color:p.E5},on:{color:p.Ej},off:{color:p.hM},all:{paddingTop:".5em",paddingLeft:".3em"}}})),ke=function(e){switch(e){case"running":return"ok";case"shut off":return"off";case"crashed":return"error";default:return"warning"}},ye=function(e){var n,t=e.anvil,r=(0,u.useState)(null),i=r[0],s=r[1],d=(0,u.useState)(!1),c=d[0],h=d[1],g=(0,u.useState)(!1),m=g[0],v=g[1],b=(0,u.useState)([]),w=b[0],k=b[1],y=(0,u.useRef)([]),N=(0,u.useContext)(j).uuid,A=we(),T=l("".concat("/cgi-bin","/get_servers?anvil_uuid=").concat(N)),D=T.data,L=T.isLoading,E=function(e){y.current=[],e.filter((function(e){return"running"===e.server_state})).length&&y.current.push("off"),e.filter((function(e){return"shut off"===e.server_state})).length&&y.current.push("on")},S=t.findIndex((function(e){return e.anvil_uuid===N})),B=Q(null===(n=t[S])||void 0===n?void 0:n.hosts);return(0,f.jsxs)(a.s_,{children:[(0,f.jsxs)(o.Z,{className:A.headerPadding,display:"flex",children:[(0,f.jsx)(o.Z,{flexGrow:1,children:(0,f.jsx)(x.z,{text:"Servers"})}),(0,f.jsx)(o.Z,{className:A.editButtonBox,children:(0,f.jsx)(xe.Z,{className:A.editButton,style:{color:p.E5},onClick:function(){return h(!c)},children:c?(0,f.jsx)(_e.Z,{}):(0,f.jsx)(ve.Z,{})})})]}),c&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(o.Z,{className:A.headerPadding,display:"flex",children:(0,f.jsxs)(o.Z,{flexGrow:1,className:A.dropdown,children:[(0,f.jsx)(pe.Z,{variant:"contained",startIcon:(0,f.jsx)(be.Z,{}),onClick:function(e){s(e.currentTarget)},style:{textTransform:"none"},children:(0,f.jsx)(ge.Z,{className:A.power,variant:"subtitle1",children:"Power"})}),(0,f.jsx)(fe.Z,{anchorEl:i,keepMounted:!0,open:Boolean(i),onClose:function(){return s(null)},children:y.current.map((function(e){return(0,f.jsx)(me.Z,{onClick:function(){return function(e){s(null),w.length&&(0,Z.Z)("".concat("/cgi-bin","/set_power"),{server_uuid_list:w,is_on:"on"===e})}(e)},className:A.menuItem,children:(0,f.jsx)(ge.Z,{className:A[e],variant:"subtitle1",children:e.replace(/^[a-z]/,(function(e){return e.toUpperCase()}))})},e)}))})]})}),(0,f.jsxs)(o.Z,{display:"flex",children:[(0,f.jsx)(o.Z,{children:(0,f.jsx)(je.Z,{style:{color:p.lD},color:"secondary",checked:m,onChange:function(){m?(E([]),k([])):(E(D.servers),k(D.servers.map((function(e){return e.server_uuid})))),v(!m)}})}),(0,f.jsx)(o.Z,{className:A.all,children:(0,f.jsx)(x.A,{text:"All"})})]})]}),L?(0,f.jsx)(K.Z,{}):(0,f.jsx)(o.Z,{className:A.root,children:(0,f.jsx)(O.Z,{component:"nav",children:null===D||void 0===D?void 0:D.servers.map((function(e){return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(P.Z,{button:!0,className:A.button,component:c?"div":"a",href:"/server?uuid=".concat(e.server_uuid,"&server_name=").concat(e.server_name),onClick:function(){return function(e){var n=w.indexOf(e);-1===n?w.push(e):w.splice(n,1);var t=D.servers.filter((function(e){return-1!==w.indexOf(e.server_uuid)}));E(t),k((0,he.Z)(w))}(e.server_uuid)},children:(0,f.jsxs)(o.Z,{display:"flex",flexDirection:"row",width:"100%",children:[c&&(0,f.jsx)(o.Z,{className:A.checkbox,children:(0,f.jsx)(je.Z,{style:{color:p.lD},color:"secondary",checked:void 0!==w.find((function(n){return n===e.server_uuid}))})}),(0,f.jsx)(o.Z,{p:1,children:(0,f.jsx)(_,{colour:ke(e.server_state)})}),(0,f.jsxs)(o.Z,{p:1,flexGrow:1,children:[(0,f.jsx)(x.A,{text:e.server_name}),(0,f.jsx)(x.A,{text:Ze.get(e.server_state)||"Not Available"})]}),(0,f.jsx)(o.Z,{display:"flex",className:A.hostsBox,children:"shut off"!==e.server_state&&"crashed"!==e.server_state&&B.map((function(n,t){return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(o.Z,{p:1,className:A.hostBox,children:(0,f.jsx)(x.A,{text:n.host_name,selected:e.server_host_uuid===n.host_uuid})},n.host_uuid),t!==B.length-1&&(0,f.jsx)(C.Z,{className:"".concat(A.divider," ").concat(A.verticalDivider),orientation:"vertical"})]})}))})]})},e.server_uuid),(0,f.jsx)(C.Z,{className:A.divider})]})}))})})]})},Ne=t(210),Oe=function(){var e=(0,u.useState)(void 0),n=e[0],t=e[1];return(0,u.useEffect)((function(){var e=function(){t(window.innerWidth)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),n},Ce=(0,s.Z)((function(e){var n;return{child:(n={width:"22%",height:"100%"},(0,r.Z)(n,e.breakpoints.down(p.li),{width:"50%"}),(0,r.Z)(n,e.breakpoints.down("md"),{width:"100%"}),n),server:(0,r.Z)({width:"35%",height:"100%"},e.breakpoints.down("md"),{width:"100%"}),container:(0,r.Z)({display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between"},e.breakpoints.down("md"),{display:"block"})}})),Pe=function(){var e=Ce(),n=Oe(),t=l("".concat("/cgi-bin","/get_anvils")).data;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(i.default,{children:(0,f.jsx)("title",{children:"Dashboard"})}),(0,f.jsxs)(v,{children:[(0,f.jsx)(Ne.Z,{}),(null===t||void 0===t?void 0:t.anvils)&&n&&(n>p.li?(0,f.jsxs)(o.Z,{className:e.container,children:[(0,f.jsxs)(o.Z,{className:e.child,children:[(0,f.jsx)(R,{list:t}),(0,f.jsx)(Y,{anvil:t.anvils})]}),(0,f.jsx)(o.Z,{className:e.server,children:(0,f.jsx)(ye,{anvil:t.anvils})}),(0,f.jsx)(o.Z,{className:e.child,children:(0,f.jsx)(se,{})}),(0,f.jsxs)(o.Z,{className:e.child,children:[(0,f.jsx)(ue,{}),(0,f.jsx)(ee,{}),(0,f.jsx)(ae,{})]})]}):(0,f.jsxs)(o.Z,{className:e.container,children:[(0,f.jsxs)(o.Z,{className:e.child,children:[(0,f.jsx)(ye,{anvil:t.anvils}),(0,f.jsx)(R,{list:t}),(0,f.jsx)(Y,{anvil:t.anvils})]}),(0,f.jsxs)(o.Z,{className:e.child,children:[(0,f.jsx)(ue,{}),(0,f.jsx)(se,{}),(0,f.jsx)(ee,{}),(0,f.jsx)(ae,{})]})]}))]})]})}},5301:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return t(7925)}])}},function(e){e.O(0,[322,346,774,888,179],(function(){return n=5301,e(e.s=n);var n}));var n=e.O();_N_E=n}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/server-a136ee5fbd72e53ed05c.js b/striker-ui/out/_next/static/chunks/pages/server-a136ee5fbd72e53ed05c.js deleted file mode 100644 index fce17d01..00000000 --- a/striker-ui/out/_next/static/chunks/pages/server-a136ee5fbd72e53ed05c.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[753],{366:function(e,t,r){"use strict";var n=r(5318),o=r(862);t.Z=void 0;var i=o(r(7294)),a=(0,n(r(2108)).default)(i.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");t.Z=a},306:function(e,t,r){"use strict";var n=r(5318),o=r(862);t.Z=void 0;var i=o(r(7294)),a=(0,n(r(2108)).default)(i.createElement("path",{d:"M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v2H8v2h8v-2h-2v-2h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H3V4h18v12z"}),"DesktopWindows");t.Z=a},4849:function(e,t,r){"use strict";var n=r(5318),o=r(862);t.Z=void 0;var i=o(r(7294)),a=(0,n(r(2108)).default)(i.createElement("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}),"Image");t.Z=a},2617:function(e,t,r){"use strict";var n=r(5318),o=r(862);t.Z=void 0;var i=o(r(7294)),a=(0,n(r(2108)).default)(i.createElement("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"}),"Keyboard");t.Z=a},210:function(e,t,r){"use strict";r.d(t,{Z:function(){return C}});var n=r(5893),o=r(2809),i=r(7294),a=r(5258),s=r(1120),c=r(9956),l=r(282),u=[{text:"Files",image:"/pngs/files_on.png",uri:"/striker?files=true"},{text:"Tasks",image:"/pngs/tasks_no-jobs_icon.png",uri:"/striker?jobs=true"},{text:"Configure",image:"/pngs/configure_icon_on.png",uri:"/striker?configure=true"},{text:"Striker",image:"/pngs/striker_icon_on.png",uri:"/striker?striker=true"},{text:"Anvil",image:"/pngs/anvil_icon_on.png",uri:"/striker?anvil=true"},{text:"Email",image:"/pngs/email_on.png",uri:"/striker?email=true"},{text:"Logout",image:"/pngs/users_icon_on.png",uri:"/striker?logout=true"},{text:"Help",image:"/pngs/help_icon_on.png",uri:"https://alteeve.com/w/Support"}],d={width:"40em",height:"40em"},f=r(9753),p=r(7159),h=r(2822),m=r(998),v=r(5517),b=r(7623),g=r(442),x=r(964);function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:[];return new Promise((function(t){var r=function(){return v=!0,t()};y(m,e).then(r,r)}))},window.__NEXT_PRELOADREADY=x.preloadReady;var j=x;t.default=j},8379:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return V}});var n=r(5893),o=r(2809),i=r(7294),a=r(1163),s=r(9008),c=r(9956),l=r(1120),u=r(809),d=r.n(u);function f(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,o)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){f(i,n,o,a,s,"next",e)}function s(e){f(i,n,o,a,s,"throw",e)}a(void 0)}))}}var h=r(5152),m=r(5675),v=r(5639),b=r(2318),g=r(282),x=r(366),y=r(2617),j=r(7812),w=r(6638),_=r(9753),k="0xffe3",O="0xffe9",Z=[{keys:"Ctrl + Alt + Delete",scans:[]},{keys:"Ctrl + Alt + F1",scans:[k,O,"0xffbe"]},{keys:"Ctrl + Alt + F2",scans:[k,O,"0xffbf"]},{keys:"Ctrl + Alt + F3",scans:[k,O,"0xffc0"]},{keys:"Ctrl + Alt + F4",scans:[k,O,"0xffc1"]},{keys:"Ctrl + Alt + F5",scans:[k,O,"0xffc2"]},{keys:"Ctrl + Alt + F6",scans:[k,O,"0xffc3"]},{keys:"Ctrl + Alt + F7",scans:[k,O,"0xffc4"]},{keys:"Ctrl + Alt + F8",scans:[k,O,"0xffc5"]},{keys:"Ctrl + Alt + F9",scans:[k,O,"0xffc6"]}],C=r(9386),D=function(){var e=p(d().mark((function e(t,r,n){var o,i,a;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new AbortController,i=setTimeout((function(){return o.abort()}),n),e.next=4,fetch(t,{method:"PUT",headers:{"Content-Type":"application/json","Keep-Alive":"timeout=120"},signal:o.signal,body:JSON.stringify(r)});case 4:return a=e.sent,clearTimeout(i),e.abrupt("return",a);case 7:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),P=r(964),N=r(8382),S=(0,h.default)((function(){return Promise.all([r.e(204),r.e(97)]).then(r.bind(r,7097))}),{ssr:!1,loadableGenerated:{webpack:function(){return[7097]},modules:["../components/Display/FullSize.tsx -> ./VncDisplay"]}}),B=(0,l.Z)((function(){return{displayBox:{width:"75vw",height:"75vh",paddingTop:"1em",paddingBottom:0,paddingLeft:0,paddingRight:0},spinnerBox:{flexDirection:"column",width:"75vw",height:"75vh",alignItems:"center",justifyContent:"center"},closeButton:{borderRadius:8,backgroundColor:_.hM,"&:hover":{backgroundColor:_.hM}},keyboardButton:{borderRadius:8,backgroundColor:_.lD,"&:hover":{backgroundColor:_.lD}},closeBox:{paddingBottom:"1em",paddingLeft:".7em",paddingRight:0},buttonsBox:{paddingTop:0},keysItem:{backgroundColor:_.lD,paddingRight:"3em","&:hover":{backgroundColor:_.lD}},buttonText:{color:_.E5}}})),E=function(e){var t=e.setMode,r=e.uuid,o=e.serverName,a=(0,i.useState)(null),s=a[0],l=a[1],u=(0,i.useRef)(),f=(0,i.useRef)(void 0),h=(0,i.useState)(void 0),k=h[0],O=h[1],E=(0,i.useState)(!1),T=E[0],z=E[1],A=B();(0,i.useEffect)((function(){f.current=window.location.hostname,k||p(d().mark((function e(){var t;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,D("".concat("/cgi-bin","/manage_vnc_pipes"),{server_uuid:r,is_open:!0},12e4);case 3:return t=e.sent,e.t0=O,e.next=7,t.json();case 7:e.t1=e.sent,(0,e.t0)(e.t1),e.next=14;break;case 11:e.prev=11,e.t2=e.catch(0),z(!0);case 14:case"end":return e.stop()}}),e,null,[[0,11]])})))()}),[r,k,T]);var R=function(){var e=p(d().mark((function e(){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,C.Z)("".concat("/cgi-bin","/manage_vnc_pipes"),{server_uuid:r,is_open:!1});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,n.jsxs)(w.s_,{children:[(0,n.jsx)(c.Z,{flexGrow:1,children:(0,n.jsx)(P.z,{text:"Server: ".concat(o)})}),k?(0,n.jsxs)(c.Z,{display:"flex",className:A.displayBox,children:[(0,n.jsx)(S,{rfb:u,url:"".concat(k.protocol,"://").concat(f.current,":").concat(k.forward_port),viewOnly:!1,focusOnClick:!1,clipViewport:!1,dragViewport:!1,scaleViewport:!0,resizeSession:!0,showDotCursor:!1,background:"",qualityLevel:6,compressionLevel:2}),(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(c.Z,{className:A.closeBox,children:(0,n.jsx)(j.Z,{className:A.closeButton,style:{color:_.lD},component:"span",onClick:function(){R(),t(!0)},children:(0,n.jsx)(x.Z,{})})}),(0,n.jsxs)(c.Z,{className:A.closeBox,children:[(0,n.jsx)(j.Z,{className:A.keyboardButton,style:{color:_.E5},component:"span",onClick:function(e){l(e.currentTarget)},children:(0,n.jsx)(y.Z,{})}),(0,n.jsx)(m.Z,{anchorEl:s,keepMounted:!0,open:Boolean(s),onClose:function(){return l(null)},children:Z.map((function(e){var t=e.keys,r=e.scans;return(0,n.jsx)(v.Z,{onClick:function(){return function(e){if(u.current){if(e.length){for(var t=0;t<=e.length-1;t+=1)u.current.sendKey(e[t],1);for(var r=e.length-1;r>=0;r-=1)u.current.sendKey(e[r],0)}else u.current.sendCtrlAltDel();l(null)}}(r)},className:A.keysItem,children:(0,n.jsx)(b.Z,{variant:"subtitle1",children:t})},t)}))})]})]})]}):(0,n.jsx)(c.Z,{display:"flex",className:A.spinnerBox,children:T?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{style:{paddingBottom:"2em"},children:(0,n.jsx)(P.z,{text:"There was a problem connecting to the server, please try again"})}),(0,n.jsx)(g.Z,{variant:"contained",onClick:function(){z(!1)},style:{textTransform:"none"},children:(0,n.jsx)(b.Z,{className:A.buttonText,variant:"subtitle1",children:"Reconnect"})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(P.z,{text:"Establishing connection with ".concat(o)}),(0,n.jsx)(P.z,{text:"This may take a few minutes"}),(0,n.jsx)(N.Z,{})]})})]})},T=r(306),z=r(4849),A=(0,l.Z)((function(){return{displayBox:{padding:0,paddingTop:".7em",width:"100%"},fullScreenButton:{borderRadius:8,backgroundColor:_.lD,"&:hover":{backgroundColor:_.lD}},fullScreenBox:{paddingLeft:"1em",padding:0},imageButton:{padding:0,color:_.lD},imageIcon:{borderRadius:8,padding:0,backgroundColor:_.s7,fontSize:"8em"}}})),R=function(e){var t=e.setMode,r=e.serverName,o=A();return(0,n.jsxs)(w.s_,{children:[(0,n.jsx)(c.Z,{flexGrow:1,children:(0,n.jsx)(P.z,{text:"Server: ".concat(r)})}),(0,n.jsxs)(c.Z,{display:"flex",className:o.displayBox,children:[(0,n.jsx)(c.Z,{children:(0,n.jsx)(j.Z,{className:o.imageButton,style:{color:_.E5},component:"span",onClick:function(){return t(!1)},children:(0,n.jsx)(z.Z,{className:o.imageIcon})})}),(0,n.jsx)(c.Z,{className:o.fullScreenBox,children:(0,n.jsx)(j.Z,{className:o.fullScreenButton,style:{color:_.E5},component:"span",onClick:function(){return t(!1)},children:(0,n.jsx)(T.Z,{})})})]})]})},L=r(210),M=(0,l.Z)((function(e){return{preview:(0,o.Z)({width:"25%",height:"100%"},e.breakpoints.down("md"),{width:"100%"}),fullView:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"center"}}})),V=function(){var e=(0,i.useState)(!0),t=e[0],r=e[1],o=M(),l=(0,a.useRouter)().query,u=l.uuid,d=l.server_name;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.default,{children:(0,n.jsx)("title",{children:d})}),(0,n.jsx)(L.Z,{}),"string"===typeof u&&(t?(0,n.jsx)(c.Z,{className:o.preview,children:(0,n.jsx)(R,{setMode:r,serverName:d})}):(0,n.jsx)(c.Z,{className:o.fullView,children:(0,n.jsx)(E,{setMode:r,uuid:u,serverName:d})}))]})}},8954:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/server",function(){return r(8379)}])},5152:function(e,t,r){e.exports=r(8771)},1163:function(e,t,r){e.exports=r(4651)}},function(e){e.O(0,[774,322,888,179],(function(){return t=8954,e(e.s=t);var t}));var t=e.O();_N_E=t}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/server-e1f1621204ec662e510c.js b/striker-ui/out/_next/static/chunks/pages/server-e1f1621204ec662e510c.js new file mode 100644 index 00000000..6249d291 --- /dev/null +++ b/striker-ui/out/_next/static/chunks/pages/server-e1f1621204ec662e510c.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[753],{366:function(e,t,n){"use strict";var r=n(5318),o=n(862);t.Z=void 0;var i=o(n(7294)),s=(0,r(n(2108)).default)(i.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");t.Z=s},306:function(e,t,n){"use strict";var r=n(5318),o=n(862);t.Z=void 0;var i=o(n(7294)),s=(0,r(n(2108)).default)(i.createElement("path",{d:"M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v2H8v2h8v-2h-2v-2h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H3V4h18v12z"}),"DesktopWindows");t.Z=s},2617:function(e,t,n){"use strict";var r=n(5318),o=n(862);t.Z=void 0;var i=o(n(7294)),s=(0,r(n(2108)).default)(i.createElement("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"}),"Keyboard");t.Z=s},5358:function(e,t,n){"use strict";var r=n(5318),o=n(862);t.Z=void 0;var i=o(n(7294)),s=(0,r(n(2108)).default)(i.createElement("path",{d:"M10 3H8v1.88l2 2zm6 6v3.88l1.8 1.8.2-.2V9c0-1.1-.9-2-2-2V3h-2v4h-3.88l2 2H16zM4.12 3.84L2.71 5.25 6 8.54v5.96L9.5 18v3h5v-3l.48-.48 4.47 4.47 1.41-1.41L4.12 3.84zm8.38 13.33V19h-1v-1.83L8 13.65v-3.11l5.57 5.57-1.07 1.06z"}),"PowerOffOutlined");t.Z=s},210:function(e,t,n){"use strict";n.d(t,{Z:function(){return C}});var r=n(4942),o=n(7294),i=n(5258),s=n(1120),a=n(9956),c=n(282),u=[{text:"Files",image:"/pngs/files_on.png",uri:"/striker?files=true"},{text:"Tasks",image:"/pngs/tasks_no-jobs_icon.png",uri:"/striker?jobs=true"},{text:"Configure",image:"/pngs/configure_icon_on.png",uri:"/striker?configure=true"},{text:"Striker",image:"/pngs/striker_icon_on.png",uri:"/striker?striker=true"},{text:"Anvil",image:"/pngs/anvil_icon_on.png",uri:"/striker?anvil=true"},{text:"Email",image:"/pngs/email_on.png",uri:"/striker?email=true"},{text:"Logout",image:"/pngs/users_icon_on.png",uri:"/striker?logout=true"},{text:"Help",image:"/pngs/help_icon_on.png",uri:"https://alteeve.com/w/Support"}],l={width:"40em",height:"40em"},d=n(9753),f=n(7159),p=n(2822),h=n(998),m=n(5517),v=n(7623),g=n(442),b=n(964),x=n(5893);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:[];return new Promise((function(t){var n=function(){return v=!0,t()};y(m,e).then(n,n)}))},window.__NEXT_PRELOADREADY=x.preloadReady;var j=x;t.default=j},5782:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return V}});var r=n(4942),o=n(7294),i=n(1163),s=n(9008),a=n(9956),c=n(1120);function u(e,t,n,r,o,i,s){try{var a=e[i](s),c=a.value}catch(u){return void n(u)}a.done?t(c):Promise.resolve(c).then(r,o)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){u(i,r,o,s,a,"next",e)}function a(e){u(i,r,o,s,a,"throw",e)}s(void 0)}))}}var d=n(7757),f=n.n(d),p=n(5152),h=n(5675),m=n(5639),v=n(2318),g=n(282),b=n(366),x=n(2617),y=n(7812),j=n(6638),w=n(9753),_="0xffe3",O="0xffe9",k=[{keys:"Ctrl + Alt + Delete",scans:[]},{keys:"Ctrl + Alt + F1",scans:[_,O,"0xffbe"]},{keys:"Ctrl + Alt + F2",scans:[_,O,"0xffbf"]},{keys:"Ctrl + Alt + F3",scans:[_,O,"0xffc0"]},{keys:"Ctrl + Alt + F4",scans:[_,O,"0xffc1"]},{keys:"Ctrl + Alt + F5",scans:[_,O,"0xffc2"]},{keys:"Ctrl + Alt + F6",scans:[_,O,"0xffc3"]},{keys:"Ctrl + Alt + F7",scans:[_,O,"0xffc4"]},{keys:"Ctrl + Alt + F8",scans:[_,O,"0xffc5"]},{keys:"Ctrl + Alt + F9",scans:[_,O,"0xffc6"]}],Z=n(9386),C=function(){var e=l(f().mark((function e(t,n,r){var o,i,s;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new AbortController,i=setTimeout((function(){return o.abort()}),r),e.next=4,fetch(t,{method:"PUT",headers:{"Content-Type":"application/json","Keep-Alive":"timeout=120"},signal:o.signal,body:JSON.stringify(n)});case 4:return s=e.sent,clearTimeout(i),e.abrupt("return",s);case 7:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),P=n(964),D=n(8382),N=n(5893),S=(0,p.default)((function(){return Promise.all([n.e(204),n.e(97)]).then(n.bind(n,7097))}),{ssr:!1,loadableGenerated:{webpack:function(){return[7097]},modules:["../components/Display/FullSize.tsx -> ./VncDisplay"]}}),E=(0,c.Z)((function(){return{displayBox:{width:"75vw",height:"75vh",paddingTop:"1em",paddingBottom:0,paddingLeft:0,paddingRight:0},spinnerBox:{flexDirection:"column",width:"75vw",height:"75vh",alignItems:"center",justifyContent:"center"},closeButton:{borderRadius:8,backgroundColor:w.hM,"&:hover":{backgroundColor:w.hM}},keyboardButton:{borderRadius:8,backgroundColor:w.lD,"&:hover":{backgroundColor:w.lD}},closeBox:{paddingBottom:"1em",paddingLeft:".7em",paddingRight:0},buttonsBox:{paddingTop:0},keysItem:{backgroundColor:w.lD,paddingRight:"3em","&:hover":{backgroundColor:w.lD}},buttonText:{color:w.E5}}})),B=function(e){var t=e.setMode,n=e.uuid,r=e.serverName,i=(0,o.useState)(null),s=i[0],c=i[1],u=(0,o.useRef)(),d=(0,o.useRef)(void 0),p=(0,o.useState)(void 0),_=p[0],O=p[1],B=(0,o.useState)(!1),z=B[0],T=B[1],A=E();(0,o.useEffect)((function(){d.current=window.location.hostname,_||l(f().mark((function e(){var t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,C("".concat("/cgi-bin","/manage_vnc_pipes"),{server_uuid:n,is_open:!0},12e4);case 3:return t=e.sent,e.t0=O,e.next=7,t.json();case 7:e.t1=e.sent,(0,e.t0)(e.t1),e.next=14;break;case 11:e.prev=11,e.t2=e.catch(0),T(!0);case 14:case"end":return e.stop()}}),e,null,[[0,11]])})))()}),[n,_,z]);var L=function(){var e=l(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Z.Z)("".concat("/cgi-bin","/manage_vnc_pipes"),{server_uuid:n,is_open:!1});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,N.jsxs)(j.s_,{children:[(0,N.jsx)(a.Z,{flexGrow:1,children:(0,N.jsx)(P.z,{text:"Server: ".concat(r)})}),_?(0,N.jsxs)(a.Z,{display:"flex",className:A.displayBox,children:[(0,N.jsx)(S,{rfb:u,url:"".concat(_.protocol,"://").concat(d.current,":").concat(_.forward_port),viewOnly:!1,focusOnClick:!1,clipViewport:!1,dragViewport:!1,scaleViewport:!0,resizeSession:!0,showDotCursor:!1,background:"",qualityLevel:6,compressionLevel:2}),(0,N.jsxs)(a.Z,{children:[(0,N.jsx)(a.Z,{className:A.closeBox,children:(0,N.jsx)(y.Z,{className:A.closeButton,style:{color:w.lD},component:"span",onClick:function(){L(),t(!0)},children:(0,N.jsx)(b.Z,{})})}),(0,N.jsxs)(a.Z,{className:A.closeBox,children:[(0,N.jsx)(y.Z,{className:A.keyboardButton,style:{color:w.E5},component:"span",onClick:function(e){c(e.currentTarget)},children:(0,N.jsx)(x.Z,{})}),(0,N.jsx)(h.Z,{anchorEl:s,keepMounted:!0,open:Boolean(s),onClose:function(){return c(null)},children:k.map((function(e){var t=e.keys,n=e.scans;return(0,N.jsx)(m.Z,{onClick:function(){return function(e){if(u.current){if(e.length){for(var t=0;t<=e.length-1;t+=1)u.current.sendKey(e[t],1);for(var n=e.length-1;n>=0;n-=1)u.current.sendKey(e[n],0)}else u.current.sendCtrlAltDel();c(null)}}(n)},className:A.keysItem,children:(0,N.jsx)(v.Z,{variant:"subtitle1",children:t})},t)}))})]})]})]}):(0,N.jsx)(a.Z,{display:"flex",className:A.spinnerBox,children:z?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(a.Z,{style:{paddingBottom:"2em"},children:(0,N.jsx)(P.z,{text:"There was a problem connecting to the server, please try again"})}),(0,N.jsx)(g.Z,{variant:"contained",onClick:function(){T(!1)},style:{textTransform:"none"},children:(0,N.jsx)(v.Z,{className:A.buttonText,variant:"subtitle1",children:"Reconnect"})})]}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(P.z,{text:"Establishing connection with ".concat(r)}),(0,N.jsx)(P.z,{text:"This may take a few minutes"}),(0,N.jsx)(D.Z,{})]})})]})},z=n(306),T=n(5358),A=(0,c.Z)((function(){return{displayBox:{padding:0,paddingTop:".7em",width:"100%"},fullScreenButton:{borderRadius:8,backgroundColor:w.lD,"&:hover":{backgroundColor:w.lD}},fullScreenBox:{paddingLeft:"1em",padding:0},imageButton:{padding:0,color:w.lD},powerOffIcon:{borderRadius:8,padding:0,color:w.s7,width:"100%",height:"100%"},previewImage:{width:"100%",height:"100%"}}})),L=function(e){var t=e.setMode,n=e.uuid,r=e.serverName,i=A(),s=(0,o.useState)(),c=s[0],u=s[1];return(0,o.useEffect)((function(){l(f().mark((function e(){var t,r,o;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("".concat("/cgi-bin","/get_server_screenshot?server_uuid=").concat(n),{method:"GET",headers:{"Content-Type":"application/json"}});case 3:return t=e.sent,e.next=6,t.json();case 6:r=e.sent,o=r.screenshot,u(o),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),u("");case 14:case"end":return e.stop()}}),e,null,[[0,11]])})))()}),[n]),(0,N.jsxs)(j.s_,{children:[(0,N.jsx)(a.Z,{flexGrow:1,children:(0,N.jsx)(P.z,{text:"Server: ".concat(r)})}),(0,N.jsxs)(a.Z,{display:"flex",className:i.displayBox,children:[(0,N.jsx)(a.Z,{children:(0,N.jsx)(y.Z,{className:i.imageButton,style:{color:w.E5},component:"span",onClick:function(){return t(!1)},children:c?(0,N.jsx)("img",{alt:"",src:"data:image/png;base64,".concat(c),className:i.previewImage},"preview"):(0,N.jsx)(T.Z,{className:i.powerOffIcon})})}),(0,N.jsx)(a.Z,{className:i.fullScreenBox,children:(0,N.jsx)(y.Z,{className:i.fullScreenButton,style:{color:w.E5},component:"span",onClick:function(){return t(!1)},children:(0,N.jsx)(z.Z,{})})})]})]})},R=n(210),M=(0,c.Z)((function(e){return{preview:(0,r.Z)({width:"25%",height:"100%"},e.breakpoints.down("md"),{width:"100%"}),fullView:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"center"}}})),V=function(){var e=(0,o.useState)(!0),t=e[0],n=e[1],r=M(),c=(0,i.useRouter)().query,u=c.uuid,l=c.server_name;return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(s.default,{children:(0,N.jsx)("title",{children:l})}),(0,N.jsx)(R.Z,{}),"string"===typeof u&&(t?(0,N.jsx)(a.Z,{className:r.preview,children:(0,N.jsx)(L,{setMode:n,uuid:u,serverName:l})}):(0,N.jsx)(a.Z,{className:r.fullView,children:(0,N.jsx)(B,{setMode:n,uuid:u,serverName:l})}))]})}},8954:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/server",function(){return n(5782)}])},5152:function(e,t,n){e.exports=n(8771)},1163:function(e,t,n){e.exports=n(4651)}},function(e){e.O(0,[774,322,888,179],(function(){return t=8954,e(e.s=t);var t}));var t=e.O();_N_E=t}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/polyfills-a40ef1678bae11e696dba45124eadd70.js b/striker-ui/out/_next/static/chunks/polyfills-a40ef1678bae11e696dba45124eadd70.js new file mode 100644 index 00000000..5b230b6e --- /dev/null +++ b/striker-ui/out/_next/static/chunks/polyfills-a40ef1678bae11e696dba45124eadd70.js @@ -0,0 +1 @@ +!function(){var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t){var e={exports:{}};return t(e,e.exports),e.exports}var r=function(t){return t&&t.Math==Math&&t},n=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||Function("return this")(),o=function(t){try{return!!t()}catch(t){return!0}},i=!o(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),a={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,s={f:u&&!a.call({1:2},1)?function(t){var e=u(this,t);return!!e&&e.enumerable}:a},c=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},f={}.toString,l=function(t){return f.call(t).slice(8,-1)},h="".split,p=o(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==l(t)?h.call(t,""):Object(t)}:Object,d=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},v=function(t){return p(d(t))},g=function(t){return"object"==typeof t?null!==t:"function"==typeof t},y=function(t,e){if(!g(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!g(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!g(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!g(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},m={}.hasOwnProperty,b=function(t,e){return m.call(t,e)},w=n.document,S=g(w)&&g(w.createElement),E=function(t){return S?w.createElement(t):{}},x=!i&&!o(function(){return 7!=Object.defineProperty(E("div"),"a",{get:function(){return 7}}).a}),A=Object.getOwnPropertyDescriptor,O={f:i?A:function(t,e){if(t=v(t),e=y(e,!0),x)try{return A(t,e)}catch(t){}if(b(t,e))return c(!s.f.call(t,e),t[e])}},R=function(t){if(!g(t))throw TypeError(String(t)+" is not an object");return t},j=Object.defineProperty,P={f:i?j:function(t,e,r){if(R(t),e=y(e,!0),R(r),x)try{return j(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},I=i?function(t,e,r){return P.f(t,e,c(1,r))}:function(t,e,r){return t[e]=r,t},T=function(t,e){try{I(n,t,e)}catch(r){n[t]=e}return e},k="__core-js_shared__",L=n[k]||T(k,{}),U=Function.toString;"function"!=typeof L.inspectSource&&(L.inspectSource=function(t){return U.call(t)});var M,_,N,C=L.inspectSource,F=n.WeakMap,B="function"==typeof F&&/native code/.test(C(F)),D=!1,q=e(function(t){(t.exports=function(t,e){return L[t]||(L[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),z=0,W=Math.random(),K=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++z+W).toString(36)},G=q("keys"),$=function(t){return G[t]||(G[t]=K(t))},V={};if(B){var H=new(0,n.WeakMap),X=H.get,Y=H.has,J=H.set;M=function(t,e){return J.call(H,t,e),e},_=function(t){return X.call(H,t)||{}},N=function(t){return Y.call(H,t)}}else{var Q=$("state");V[Q]=!0,M=function(t,e){return I(t,Q,e),e},_=function(t){return b(t,Q)?t[Q]:{}},N=function(t){return b(t,Q)}}var Z,tt={set:M,get:_,has:N,enforce:function(t){return N(t)?_(t):M(t,{})},getterFor:function(t){return function(e){var r;if(!g(e)||(r=_(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},et=e(function(t){var e=tt.get,r=tt.enforce,o=String(String).split("String");(t.exports=function(t,e,i,a){var u=!!a&&!!a.unsafe,s=!!a&&!!a.enumerable,c=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof e||b(i,"name")||I(i,"name",e),r(i).source=o.join("string"==typeof e?e:"")),t!==n?(u?!c&&t[e]&&(s=!0):delete t[e],s?t[e]=i:I(t,e,i)):s?t[e]=i:T(e,i)})(Function.prototype,"toString",function(){return"function"==typeof this&&e(this).source||C(this)})}),rt=n,nt=function(t){return"function"==typeof t?t:void 0},ot=function(t,e){return arguments.length<2?nt(rt[t])||nt(n[t]):rt[t]&&rt[t][e]||n[t]&&n[t][e]},it=Math.ceil,at=Math.floor,ut=function(t){return isNaN(t=+t)?0:(t>0?at:it)(t)},st=Math.min,ct=function(t){return t>0?st(ut(t),9007199254740991):0},ft=Math.max,lt=Math.min,ht=function(t,e){var r=ut(t);return r<0?ft(r+e,0):lt(r,e)},pt=function(t){return function(e,r,n){var o,i=v(e),a=ct(i.length),u=ht(n,a);if(t&&r!=r){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===r)return t||u||0;return!t&&-1}},dt={includes:pt(!0),indexOf:pt(!1)},vt=dt.indexOf,gt=function(t,e){var r,n=v(t),o=0,i=[];for(r in n)!b(V,r)&&b(n,r)&&i.push(r);for(;e.length>o;)b(n,r=e[o++])&&(~vt(i,r)||i.push(r));return i},yt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mt=yt.concat("length","prototype"),bt={f:Object.getOwnPropertyNames||function(t){return gt(t,mt)}},wt={f:Object.getOwnPropertySymbols},St=ot("Reflect","ownKeys")||function(t){var e=bt.f(R(t)),r=wt.f;return r?e.concat(r(t)):e},Et=function(t,e){for(var r=St(e),n=P.f,o=O.f,i=0;i2?arguments[2]:void 0,u=Ut((void 0===a?n:ht(a,n))-i,n-o),s=1;for(i0;)i in r?r[o]=r[i]:delete r[o],o+=s,i+=s;return r},_t=!!Object.getOwnPropertySymbols&&!o(function(){return!String(Symbol())}),Nt=_t&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ct=q("wks"),Ft=n.Symbol,Bt=Nt?Ft:Ft&&Ft.withoutSetter||K,Dt=function(t){return b(Ct,t)||(Ct[t]=_t&&b(Ft,t)?Ft[t]:Bt("Symbol."+t)),Ct[t]},qt=Object.keys||function(t){return gt(t,yt)},zt=i?Object.defineProperties:function(t,e){R(t);for(var r,n=qt(e),o=n.length,i=0;o>i;)P.f(t,r=n[i++],e[r]);return t},Wt=ot("document","documentElement"),Kt=$("IE_PROTO"),Gt=function(){},$t=function(t){return"
\ No newline at end of file +}
\ No newline at end of file diff --git a/striker-ui/out/server.html b/striker-ui/out/server.html index d15a0887..76ab8568 100644 --- a/striker-ui/out/server.html +++ b/striker-ui/out/server.html @@ -1,4 +1,4 @@ -
\ No newline at end of file + }
\ No newline at end of file diff --git a/striker-ui/pages/_document.tsx b/striker-ui/pages/_document.tsx index e731955e..14b48a82 100644 --- a/striker-ui/pages/_document.tsx +++ b/striker-ui/pages/_document.tsx @@ -11,6 +11,7 @@ class MyDocument extends Document { ctx.renderPage = () => originalRenderPage({ + /* eslint-disable react/display-name */ enhanceApp: (App) => (props) => materialUiSheets.collect( { {typeof uuid === 'string' && (previewMode ? ( - + ) : ( diff --git a/tools/anvil-daemon b/tools/anvil-daemon index c514611e..a3be7169 100755 --- a/tools/anvil-daemon +++ b/tools/anvil-daemon @@ -246,6 +246,9 @@ while(1) $anvil->nice_exit({exit_code => 0}); } + # Check how much RAM we're using. + check_ram($anvil); + # Disconnect from the database(s) and sleep now. $anvil->Database->disconnect(); sleep(2); @@ -258,6 +261,41 @@ $anvil->nice_exit({exit_code => 0}); # Functions # ############################################################################################################# +# If we're using too much ram, send an alert and exit. +sub check_ram +{ + my ($anvil) = @_; + + # Problem 0 == ok, 1 == too much ram used, 2 == no pid found + my ($problem, $ram_used) = $anvil->System->check_ram_use({program => $THIS_FILE}); + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { + problem => $problem, + ram_used => $anvil->Convert->add_commas({number => $ram_used})." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $ram_used}).")", + }}); + if ($problem) + { + # Send an alert and exit. + $anvil->Alert->register({alert_level => "notice", message => "error_0357", variables => { + program => $THIS_FILE, + ram_used => $anvil->Convert->bytes_to_human_readable({'bytes' => $ram_used}), + ram_used_bytes => $anvil->Convert->add_commas({number => $ram_used}), + }, set_by => $THIS_FILE, sort_position => 0}); + $anvil->Email->send_alerts(); + + # Log the same + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "error_0357", variables => { + program => $THIS_FILE, + ram_used => $anvil->Convert->bytes_to_human_readable({'bytes' => $ram_used}), + ram_used_bytes => $anvil->Convert->add_commas({number => $ram_used}), + }}); + + # Exit with RC0 so that systemctl restarts + $anvil->nice_exit({exit_code => 0}); + } + + return(0); +} + # Check to see if we're mapping the network on this host. sub check_if_mapping { @@ -571,6 +609,9 @@ sub handle_periodic_tasks { $first_uuid = $uuid; $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { first_uuid => $first_uuid }}); + + # Skip the first UUID so it doesn't evaluate for shutdown. + next; } elsif ($uuid eq $host_uuid) { @@ -1291,7 +1332,7 @@ sub prep_database { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { prep_database => $prep_database, - "sys}{database}{connections" => $anvil->data->{sys}{database}{connections}, + "sys::database::connections" => $anvil->data->{sys}{database}{connections}, }}); if ($prep_database) { diff --git a/tools/anvil-manage-power b/tools/anvil-manage-power index 4b4b9934..8786b572 100755 --- a/tools/anvil-manage-power +++ b/tools/anvil-manage-power @@ -130,6 +130,7 @@ if ($anvil->data->{switches}{'reboot-needed'} eq "1") # Enable if (not $reboot_needed) { + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "log_0687", variables => { reason => "log_0688" }}); $reboot_needed = $anvil->System->reboot_needed({debug => 2, set => 1}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { reboot_needed => $reboot_needed }}); print $anvil->Words->string({key => "message_0048"})."\n"; @@ -246,6 +247,8 @@ sub do_poweroff # Make sure the 'reboot needed' flag is set. When 'anvil-daemon' starts, it will use this to confirm # that it is starting post-reboot and clear it. + my $say_reason = $task eq "poweroff" ? "log_0689" : "log_0688"; + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "log_0687", variables => { reason => $say_reason }}); $reboot_needed = $anvil->System->reboot_needed({debug => 2, set => 1}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { reboot_needed => $reboot_needed }}); diff --git a/tools/anvil-safe-stop b/tools/anvil-safe-stop index 6f30a1c8..b2b68ff2 100755 --- a/tools/anvil-safe-stop +++ b/tools/anvil-safe-stop @@ -101,6 +101,7 @@ if ($anvil->data->{switches}{'job-uuid'}) $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { 'switches::power-off' => $anvil->data->{switches}{'power-off'}, }}); + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "log_0687", variables => { reason => "log_0691" }}); } if ($line =~ /stop-reason=(.*?)$/) { @@ -156,6 +157,7 @@ if ($anvil->data->{switches}{'power-off'}) host_status => "stopping", }); + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "log_0687", variables => { reason => "log_0692" }}); $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 1, key => "job_0325"}); $anvil->Job->update_progress({progress => 100, message => "job_0325"}); diff --git a/tools/anvil-update-system b/tools/anvil-update-system index 0f8147ee..a8626705 100755 --- a/tools/anvil-update-system +++ b/tools/anvil-update-system @@ -173,8 +173,7 @@ sub run_os_update if ($line =~ /^kernel /) { # Reboot will be needed. - $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, secure => 0, key => "log_0199"}); - + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "log_0687", variables => { reason => "log_0690" }}); my $reboot_needed = $anvil->System->reboot_needed({set => 1}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { reboot_needed => $reboot_needed }}); } diff --git a/tools/scancore b/tools/scancore index 9b131e53..8a27054f 100755 --- a/tools/scancore +++ b/tools/scancore @@ -163,6 +163,9 @@ while(1) # Clean up cleanup_after_run($anvil); + # Check how much RAM we're using. + check_ram($anvil); + # Sleep until it's time to run again. $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 1, key => "log_0249", variables => { run_interval => $run_interval, @@ -181,6 +184,41 @@ $anvil->nice_exit({exit_code => 0}); # Functions # ############################################################################################################# +# If we're using too much ram, send an alert and exit. +sub check_ram +{ + my ($anvil) = @_; + + # Problem 0 == ok, 1 == too much ram used, 2 == no pid found + my ($problem, $ram_used) = $anvil->System->check_ram_use({program => $THIS_FILE}); + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { + problem => $problem, + ram_used => $anvil->Convert->add_commas({number => $ram_used})." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $ram_used}).")", + }}); + if ($problem) + { + # Send an alert and exit. + $anvil->Alert->register({alert_level => "notice", message => "error_0357", variables => { + program => $THIS_FILE, + ram_used => $anvil->Convert->bytes_to_human_readable({'bytes' => $ram_used}), + ram_used_bytes => $anvil->Convert->add_commas({number => $ram_used}), + }, set_by => $THIS_FILE, sort_position => 0}); + $anvil->Email->send_alerts(); + + # Log the same + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "error_0357", variables => { + program => $THIS_FILE, + ram_used => $anvil->Convert->bytes_to_human_readable({'bytes' => $ram_used}), + ram_used_bytes => $anvil->Convert->add_commas({number => $ram_used}), + }}); + + # Exit with RC0 so that systemctl restarts + $anvil->nice_exit({exit_code => 0}); + } + + return(0); +} + # This cleans things up after a scan run has completed. sub cleanup_after_run { diff --git a/tools/striker-auto-initialize-all b/tools/striker-auto-initialize-all index c6a58c7c..acaf3356 100755 --- a/tools/striker-auto-initialize-all +++ b/tools/striker-auto-initialize-all @@ -1425,7 +1425,7 @@ sub striker_stage1 { my ($anvil) = @_; - ### TODO: Validate all steps up front before starting anything. + # Validate if ((not defined $anvil->data->{base}{organization_name}) or (not $anvil->data->{base}{organization_name})) { $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 0, key => "error_0243", variables => { variable => 'base::organization_name' }});