From a7370f4157c1eaf31479499c586dd6770bd3b01e Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Mon, 24 Jul 2023 18:10:58 +0300 Subject: [PATCH 01/55] apps.plugin limits tracing (#15504) --- collectors/apps.plugin/apps_plugin.c | 35 +++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/collectors/apps.plugin/apps_plugin.c b/collectors/apps.plugin/apps_plugin.c index fa6239ca95676e..2bea234cfa4848 100644 --- a/collectors/apps.plugin/apps_plugin.c +++ b/collectors/apps.plugin/apps_plugin.c @@ -1363,6 +1363,9 @@ static inline kernel_uint_t get_proc_pid_limits_limit(char *buf, const char *key char *v = &line[key_len]; while(isspace(*v)) v++; + if(strcmp(v, "unlimited") == 0) + return 0; + return str2ull(v, NULL); } @@ -1377,6 +1380,7 @@ static inline int read_proc_pid_limits(struct pid_stat *p, void *ptr) { bool read_limits = false; errno = 0; + proc_pid_limits_buffer[0] = '\0'; kernel_uint_t all_fds = pid_openfds_sum(p); if(all_fds < p->limits.max_open_files / 2 && p->io_collected_usec > p->last_limits_collected_usec && p->io_collected_usec - p->last_limits_collected_usec <= 60 * USEC_PER_SEC) { @@ -1400,9 +1404,15 @@ static inline int read_proc_pid_limits(struct pid_stat *p, void *ptr) { if(bytes <= 0) goto cleanup; - read_limits = true; + // make it '\0' terminated + if(bytes < MAX_PROC_PID_LIMITS) + proc_pid_limits_buffer[bytes] = '\0'; + else + proc_pid_limits_buffer[MAX_PROC_PID_LIMITS - 1] = '\0'; + p->limits.max_open_files = get_proc_pid_limits_limit(proc_pid_limits_buffer, PROC_PID_LIMITS_MAX_OPEN_FILES_KEY, sizeof(PROC_PID_LIMITS_MAX_OPEN_FILES_KEY) - 1, 0); p->last_limits_collected_usec = p->io_collected_usec; + read_limits = true; ret = 1; @@ -1414,6 +1424,23 @@ static inline int read_proc_pid_limits(struct pid_stat *p, void *ptr) { if(p->openfds_limits_percent > 100.0) { if(!(p->log_thrown & PID_LOG_LIMITS_DETAIL)) { + char *line; + + if(!read_limits) { + proc_pid_limits_buffer[0] = '\0'; + line = "NOT READ"; + } + else { + line = strstr(proc_pid_limits_buffer, PROC_PID_LIMITS_MAX_OPEN_FILES_KEY); + if (line) { + line++; // skip the initial newline + + char *end = strchr(line, '\n'); + if (end) + *end = '\0'; + } + } + netdata_log_info( "FDS_LIMITS: PID %d (%s) is using " "%0.2f %% of its fds limits, " @@ -1428,7 +1455,8 @@ static inline int read_proc_pid_limits(struct pid_stat *p, void *ptr) { "eventpolls = %llu " "other = %llu " "), open fds limit = %llu, " - "%s", + "%s, " + "original line [%s]", p->pid, p->comm, p->openfds_limits_percent, all_fds, p->openfds.files, p->openfds.pipes, @@ -1441,7 +1469,8 @@ static inline int read_proc_pid_limits(struct pid_stat *p, void *ptr) { p->openfds.other, p->limits.max_open_files, read_limits ? "and we have read the limits AFTER counting the fds" - : "but we have read the limits BEFORE counting the fds"); + : "but we have read the limits BEFORE counting the fds", + line); p->log_thrown |= PID_LOG_LIMITS_DETAIL; } From dc5d53949224155fc8b76029c7d4b9e46c701d46 Mon Sep 17 00:00:00 2001 From: Ilya Mashchenko Date: Mon, 24 Jul 2023 19:38:02 +0300 Subject: [PATCH 02/55] docs: clarify health percentage option (#15492) --- web/api/badges/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/api/badges/README.md b/web/api/badges/README.md index e40e706ebbc3a2..e83186bb2465a1 100644 --- a/web/api/badges/README.md +++ b/web/api/badges/README.md @@ -157,7 +157,7 @@ Here is what you can put for `options` (these are standard Netdata API options): These fine tune various options of the API. Here is what you can use for badges (the API has more option, but only these are useful for badges): - - `percentage`, instead of returning the value, calculate the percentage of the sum of the selected dimensions, versus the sum of all the dimensions of the chart. This also sets the units to `%`. + - `percentage`, instead of returning a value, calculate the percentage of the sum of the values of the selected dimensions (selected sum / total sum * 100). This also sets the units to `%`. - `absolute` or `abs`, turn all values positive and then sum them. From 68a1d80d89d876e9c4f8617e1a0f5d8e239fd27a Mon Sep 17 00:00:00 2001 From: Tasos Katsoulas <12612986+tkatsoulas@users.noreply.github.com> Date: Mon, 24 Jul 2023 19:52:14 +0300 Subject: [PATCH 03/55] Drop support for native packages of Ubuntu 22.10 (#15292) * Remove native packages support for ubuntu 22.10 Signed-off-by: Tasos Katsoulas * Update packaging/PLATFORM_SUPPORT.md Co-authored-by: Austin S. Hemmelgarn --------- Signed-off-by: Tasos Katsoulas Co-authored-by: Austin S. Hemmelgarn --- .github/data/distros.yml | 9 ++------- packaging/PLATFORM_SUPPORT.md | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/data/distros.yml b/.github/data/distros.yml index 8376b1f0345920..c36cb1ef9b1740 100644 --- a/.github/data/distros.yml +++ b/.github/data/distros.yml @@ -212,7 +212,7 @@ include: - &ubuntu distro: ubuntu - version: "22.10" + version: "22.04" eol_check: true env_prep: | rm -f /etc/apt/apt.conf.d/docker && apt-get update @@ -220,7 +220,7 @@ include: apt-get remove -y libjson-c-dev packages: &ubuntu_packages type: deb - repo_distro: ubuntu/kinetic + repo_distro: ubuntu/jammy arches: - amd64 - armhf @@ -232,11 +232,6 @@ include: packages: <<: *ubuntu_packages repo_distro: ubuntu/lunar - - <<: *ubuntu - version: "22.04" - packages: - <<: *ubuntu_packages - repo_distro: ubuntu/jammy - <<: *ubuntu version: "20.04" packages: diff --git a/packaging/PLATFORM_SUPPORT.md b/packaging/PLATFORM_SUPPORT.md index 62a6a405135e65..3f958c8afe4d30 100644 --- a/packaging/PLATFORM_SUPPORT.md +++ b/packaging/PLATFORM_SUPPORT.md @@ -76,7 +76,6 @@ to work on these platforms with minimal user effort. | Red Hat Enterprise Linux | 8.x | x86\_64, AArch64 | | | Red Hat Enterprise Linux | 7.x | x86\_64 | | | Ubuntu | 23.04 | x86\_64, AArch64, ARMv7 | | -| Ubuntu | 22.10 | x86\_64, ARMv7, AArch64 | | | Ubuntu | 22.04 | x86\_64, ARMv7, AArch64 | | | Ubuntu | 20.04 | x86\_64, ARMv7, AArch64 | | @@ -163,6 +162,7 @@ This is a list of platforms that we have supported in the recent past but no lon | Fedora | 36 | EOL as of 2023-05-18 | | Fedora | 35 | EOL as of 2022-12-13 | | openSUSE | Leap 15.3 | EOL as of 2022-12-01 | +| Ubuntu | 22.10 | EOL as of 2023-07-20 | | Ubuntu | 21.10 | EOL as of 2022-07-31 | | Ubuntu | 18.04 | EOL as of 2023-04-02 | From 7a0841f7a3f509daad4418fd19a0ab154c7a2f65 Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Mon, 24 Jul 2023 20:54:31 +0300 Subject: [PATCH 04/55] Update README.md --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index dbffc1dcf3380d..43eaca15032ed6 100644 --- a/README.md +++ b/README.md @@ -443,6 +443,36 @@ So, although it is not required, you can get the most out of your Netdata instal  
 
+### :raised_eyebrow: Is Netdata sending telemetry back home? + +We collect anonymous statistics to help us take informed decisions for the future of Netdata. +But it can easily be disabled. Our installation pages provide information on how to do this. + +
Click to see detailed answer ...
 
+ +Netdata is evolving on a very fast pace. Everyday we take decisions on how the product should evolve. + +Ideally these decisions should be data informed. _Is this the right area to work on now? Do our users really use that? +How to prioritize between feature A and B? I believe that C is more important. A user said that D is the most important._ + +Anonymous telemetry information can really help us take the best decisions. Our users that have anonymous telemetry enabled, contribute significantly to Netdata's roadmap. Without opening issues and without losing any time, they provide valuable anonymous information that helps us do the best for the project and the community. + +We understand that this is not acceptable or not allowed in all environments. For this reason we have made it easy to disable telemetry when you need to: + +- you can append `--disable-telemetry` to our `kickstart.sh` script when you install netdata, or +- touch the file `/etc/netdata/.opt-out-from-anonymous-statistics` and restart Netdata + +Either of these methods will disable anonymous telemetry information for your installation. + +Keep in mind that even with telemetry disabled, Netdata needs a [Netdata Registry](https://learn.netdata.cloud/docs/configuring/securing-netdata-agents/registry) for alert notifications' CTA to work. When you click on an alert notification, you go to the Netdata Registry, which finds the URL of the Netdata Agent that sent you the alert, and diverts your web browser to it, so that you can troubleshoot the issue. The Netdata Registry learns the URLs of your agents, as you visit their dashboards. + +Every Netdata Agent can be a Netdata Registry. Just appoint one Netdata Agent as your registry, and the public Netdata Registry will not be used any more. For more information [check this guide](https://learn.netdata.cloud/docs/configuring/securing-netdata-agents/registry). + + 
 
+
+ + ### :office: Who uses Netdata? Netdata is a popular project... From d759ebbb7f65b84eb9874e86985bffac349e7f4b Mon Sep 17 00:00:00 2001 From: Emmanuel Vasilakis Date: Mon, 24 Jul 2023 21:00:26 +0300 Subject: [PATCH 05/55] Add a machine distinct id to analytics (#15485) * add a system distinct id to analytics --- daemon/anonymous-statistics.sh.in | 18 ++++++++++++++++++ packaging/installer/kickstart.sh | 17 ++++++++++------- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/daemon/anonymous-statistics.sh.in b/daemon/anonymous-statistics.sh.in index 32cbc71dbdc59a..6b27dfea42204c 100755 --- a/daemon/anonymous-statistics.sh.in +++ b/daemon/anonymous-statistics.sh.in @@ -71,6 +71,23 @@ NETDATA_PREBUILT_DISTRO="${42}" [ -z "$NETDATA_REGISTRY_UNIQUE_ID" ] && NETDATA_REGISTRY_UNIQUE_ID="00000000-0000-0000-0000-000000000000" +KERNEL_NAME="$(uname -s)" +MD5_PATH="$(exec <&- 2>&-; which md5sum || command -v md5sum || type md5sum)" + +if [ "${KERNEL_NAME}" = Darwin ] && command -v ioreg >/dev/null 2>&1; then + SYSTEM_DISTINCT_ID="macos-$(ioreg -rd1 -c IOPlatformExpertDevice | awk '/IOPlatformUUID/ { split($0, line, "\""); printf("%s\n", line[4]); }')" +elif [ -f /etc/machine-id ] && [ -n "$MD5_PATH" ]; then + SYSTEM_DISTINCT_ID="machine-$($MD5_PATH < /etc/machine-id | cut -f1 -d" ")" +elif [ -f /var/db/dbus/machine-id ] && [ -n "$MD5_PATH" ]; then + SYSTEM_DISTINCT_ID="dbus-$($MD5_PATH < /var/db/dbus/machine-id | cut -f1 -d" ")" +elif [ -f /var/lib/dbus/machine-id ] && [ -n "$MD5_PATH" ]; then + SYSTEM_DISTINCT_ID="dbus-$($MD5_PATH < /var/lib/dbus/machine-id | cut -f1 -d" ")" +elif command -v uuidgen > /dev/null 2>&1; then + SYSTEM_DISTINCT_ID="uuid-$(uuidgen | tr '[:upper:]' '[:lower:]')" +else + SYSTEM_DISTINCT_ID="null" +fi + # define body of request to be sent REQ_BODY="$(cat << EOF { @@ -105,6 +122,7 @@ REQ_BODY="$(cat << EOF "system_virt_detection": "${NETDATA_SYSTEM_VIRT_DETECTION}", "system_container": "${NETDATA_SYSTEM_CONTAINER}", "system_container_detection": "${NETDATA_SYSTEM_CONTAINER_DETECTION}", + "system_distinct_id": "${SYSTEM_DISTINCT_ID}", "container_os_name": "${NETDATA_CONTAINER_OS_NAME}", "container_os_id": "${NETDATA_CONTAINER_OS_ID}", "container_os_id_like": "${NETDATA_CONTAINER_OS_ID_LIKE}", diff --git a/packaging/installer/kickstart.sh b/packaging/installer/kickstart.sh index 8ddcd86e07e02e..ed448f7da2bca6 100755 --- a/packaging/installer/kickstart.sh +++ b/packaging/installer/kickstart.sh @@ -257,14 +257,16 @@ telemetry_event() { TOTAL_RAM="$((TOTAL_RAM * 1024))" fi + MD5_PATH="$(exec <&- 2>&-; which md5sum || command -v md5sum || type md5sum)" + if [ "${KERNEL_NAME}" = Darwin ] && command -v ioreg >/dev/null 2>&1; then DISTINCT_ID="macos-$(ioreg -rd1 -c IOPlatformExpertDevice | awk '/IOPlatformUUID/ { split($0, line, "\""); printf("%s\n", line[4]); }')" - elif [ -f /etc/machine-id ]; then - DISTINCT_ID="machine-$(cat /etc/machine-id)" - elif [ -f /var/db/dbus/machine-id ]; then - DISTINCT_ID="dbus-$(cat /var/db/dbus/machine-id)" - elif [ -f /var/lib/dbus/machine-id ]; then - DISTINCT_ID="dbus-$(cat /var/lib/dbus/machine-id)" + elif [ -f /etc/machine-id ] && [ -n "$MD5_PATH" ]; then + DISTINCT_ID="machine-$($MD5_PATH < /etc/machine-id | cut -f1 -d" ")" + elif [ -f /var/db/dbus/machine-id ] && [ -n "$MD5_PATH" ]; then + DISTINCT_ID="dbus-$($MD5_PATH < /var/db/dbus/machine-id | cut -f1 -d" ")" + elif [ -f /var/lib/dbus/machine-id ] && [ -n "$MD5_PATH" ]; then + DISTINCT_ID="dbus-$($MD5_PATH < /var/lib/dbus/machine-id | cut -f1 -d" ")" elif command -v uuidgen > /dev/null 2>&1; then DISTINCT_ID="uuid-$(uuidgen | tr '[:upper:]' '[:lower:]')" else @@ -300,7 +302,8 @@ telemetry_event() { "system_kernel_name": "${KERNEL_NAME}", "system_kernel_version": "$(uname -r)", "system_architecture": "$(uname -m)", - "system_total_ram": "${TOTAL_RAM:-unknown}" + "system_total_ram": "${TOTAL_RAM:-unknown}", + "system_distinct_id": "${DISTINCT_ID}" } } EOF From e575526cf5067817ba64df12ad68fb87a05d3fac Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Mon, 24 Jul 2023 21:01:02 +0300 Subject: [PATCH 06/55] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 43eaca15032ed6..79620b1dd3d6bb 100644 --- a/README.md +++ b/README.md @@ -451,7 +451,7 @@ But it can easily be disabled. Our installation pages provide information on how
Click to see detailed answer ...  
 
-Netdata is evolving on a very fast pace. Everyday we take decisions on how the product should evolve. +Netdata is evolving on a very fast pace. Everyday we take decisions on how the project should evolve. Ideally these decisions should be data informed. _Is this the right area to work on now? Do our users really use that? How to prioritize between feature A and B? I believe that C is more important. A user said that D is the most important._ From f557023a3bf9d0ecc5f486a10e8a0e4e85301ace Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Mon, 24 Jul 2023 21:02:41 +0300 Subject: [PATCH 07/55] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 79620b1dd3d6bb..a3c6934ff682be 100644 --- a/README.md +++ b/README.md @@ -456,7 +456,7 @@ Netdata is evolving on a very fast pace. Everyday we take decisions on how the p Ideally these decisions should be data informed. _Is this the right area to work on now? Do our users really use that? How to prioritize between feature A and B? I believe that C is more important. A user said that D is the most important._ -Anonymous telemetry information can really help us take the best decisions. Our users that have anonymous telemetry enabled, contribute significantly to Netdata's roadmap. Without opening issues and without losing any time, they provide valuable anonymous information that helps us do the best for the project and the community. +Anonymous telemetry information can really help us take the best decisions. Our users that have anonymous telemetry enabled, contribute significantly to Netdata's roadmap. Without losing any time, they provide valuable anonymous information that helps us do the best for the project and the community. We understand that this is not acceptable or not allowed in all environments. For this reason we have made it easy to disable telemetry when you need to: From 7c1f4cf63309be0533d5b87297c66ec8c0d565ba Mon Sep 17 00:00:00 2001 From: thiagoftsm Date: Mon, 24 Jul 2023 18:40:39 +0000 Subject: [PATCH 08/55] eBPF Yaml (#15474) --- collectors/ebpf.plugin/multi_metadata.yaml | 322 ++++++++++++++------- 1 file changed, 222 insertions(+), 100 deletions(-) diff --git a/collectors/ebpf.plugin/multi_metadata.yaml b/collectors/ebpf.plugin/multi_metadata.yaml index 2042087c887281..3164c3ef611332 100644 --- a/collectors/ebpf.plugin/multi_metadata.yaml +++ b/collectors/ebpf.plugin/multi_metadata.yaml @@ -4,48 +4,109 @@ modules: plugin_name: ebpf.plugin module_name: filedescriptor monitored_instance: - name: ebpf filedescriptor - link: "" + name: eBPF Filedescriptor + link: "https://kernel.org/" categories: - data-collection.ebpf - icon_filename: "" + icon_filename: "ebpf.jpg" related_resources: integrations: - list: [] + list: + - plugin_name: apps.plugin + module_name: apps + - plugin_name: cgroups.plugin + module_name: cgroups info_provided_to_referring_integrations: description: "" - keywords: [] + keywords: + - file + - eBPF + - fd + - open + - close most_popular: false overview: data_collection: - metrics_description: "" - method_description: "" + metrics_description: "Monitor calls for functions responsible to open or close a file descriptor and possible errors." + method_description: "Attach tracing (kprobes and trampoline) to internal kernel functions according options used to compile kernel." supported_platforms: include: [] exclude: [] multi_instance: true additional_permissions: - description: "" + description: "The plugin needs setuid because it loads data inside kernel." default_behavior: auto_detection: - description: "" + description: "It checks kernel compilation flags (CONFIG_KPROBES, CONFIG_BPF, CONFIG_BPF_SYSCALL, CONFIG_BPF_JIT) and presence of BTF files to decide which eBPF program will be attached." limits: description: "" performance_impact: - description: "" + description: "Depending of kernel version and frequency that files are open and close, this thread will add overhead everytime that an internal kernel function is called. The estimated additional period of time is at between 90-200ms per call on kernels that do not have BTF technology." setup: prerequisites: - list: [] + list: + - title: Compile kernel + description: | + Check if your kernel was compiled with necessary options (CONFIG_KPROBES, CONFIG_BPF, CONFIG_BPF_SYSCALL, CONFIG_BPF_JIT) in `/proc/config.gz` or inside /boot/config file. Some cited names can be different accoring preferences of Linux distributions. + When you do not have options set, it is necessary to get the kernel source code from https://kernel.org or a kernel package from your distribution, this last is preferred. The kernel compilation has a well definedd pattern, but distributions can deliver their configuration files + with different names. + + Now follow steps: + 1. Copy the configuration file to /usr/src/linux/.config. + 2. Select the necessary options: make oldconfig + 3. Compile your kernel image: make bzImage + 4. Compile your modules: make modules + 5. Copy your new kernel image for boot loader directory + 6. Install the new modules: make modules_install + 7. Generate an initial ramdisk image (`initrd`) if it is necessary. + 8. Update your boot loader configuration: file: - name: "" - description: "" + name: "ebpf.d/fd.conf" + description: "Overwrite default configuration helping to reduce memory usage. You can also select charts visible on dashboard." options: - description: "" + description: | + All options are defined inside section `[global]`. folding: - title: "" + title: "Config options" enabled: true - list: [] + list: + - name: update every + description: Data collection frequency. + default_value: 5 + required: false + - name: ebpf load mode + description: Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). + default_value: entry + required: false + - name: apps + description: Enable or disable integration with apps.plugin + default_value: no + required: false + - name: cgroups + description: Enable or disable integration with cgroup.plugin + default_value: no + required: false + - name: pid table size + description: Number of elements stored inside hash tables used to monitor calls per PID. + default_value: 32768 + required: false + - name: ebpf type format + description: "Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load)." + default_value: auto + required: false + - name: ebpf co-re tracing + description: "Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code)." + default_value: trampoline + required: false + - name: maps per core + description: Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. + default_value: yes + required: false + - name: lifetime + description: Set default lifetime for thread when enabled by cloud. + default_value: 300 + required: false examples: folding: enabled: true @@ -63,7 +124,7 @@ modules: availability: [] scopes: - name: cgroup - description: "" + description: "These Metrics show grouped information per cgroup." labels: [] metrics: - name: cgroup.fd_open @@ -91,7 +152,7 @@ modules: dimensions: - name: close - name: global - description: "" + description: "These metrics show total number of calls executed for the host." labels: [] metrics: - name: services.file_open @@ -160,22 +221,26 @@ modules: plugin_name: ebpf.plugin module_name: processes monitored_instance: - name: ebpf processes + name: eBPF Processes link: "" categories: - data-collection.ebpf - icon_filename: "" + icon_filename: "ebpf.jpg" related_resources: integrations: list: [] info_provided_to_referring_integrations: description: "" - keywords: [] + keywords: + - thread + - fork + - process + - eBPF most_popular: false overview: data_collection: - metrics_description: "" - method_description: "" + metrics_description: "Monitor calls for function creating tasks (threads and processes) inside Linux kernel." + method_description: "Attach tracing (kprobes and tracepoint) to internal kernel functions." supported_platforms: include: [] exclude: [] @@ -345,22 +410,26 @@ modules: plugin_name: ebpf.plugin module_name: disk monitored_instance: - name: ebpf disk + name: eBPF Disk link: "" categories: - data-collection.ebpf - icon_filename: "" + icon_filename: "ebpf.jpg" related_resources: integrations: list: [] info_provided_to_referring_integrations: description: "" - keywords: [] + keywords: + - hard Disk + - eBPF + - latency + - partition most_popular: false overview: data_collection: - metrics_description: "" - method_description: "" + metrics_description: "Measure latency for I/O events on disk." + method_description: "Attach tracepoints to internal kernel functions." supported_platforms: include: [] exclude: [] @@ -417,22 +486,24 @@ modules: plugin_name: ebpf.plugin module_name: hardirq monitored_instance: - name: ebpf hardirq + name: eBPF Hardirq link: "" categories: - data-collection.ebpf - icon_filename: "" + icon_filename: "ebpf.jpg" related_resources: integrations: list: [] info_provided_to_referring_integrations: description: "" - keywords: [] + keywords: + - HardIRQ + - eBPF most_popular: false overview: data_collection: - metrics_description: "" - method_description: "" + metrics_description: "Monitor latency for each HardIRQ available." + method_description: "Attach tracepoints to internal kernel functions." supported_platforms: include: [] exclude: [] @@ -480,7 +551,7 @@ modules: labels: [] metrics: - name: system.hardirq_latency - description: Hardware IRQ latency + description: Hard IRQ latency unit: "milisecondds" chart_type: stacked dimensions: @@ -489,22 +560,25 @@ modules: plugin_name: ebpf.plugin module_name: cachestat monitored_instance: - name: ebpf cachestat + name: eBPF Cachestat link: "" categories: - data-collection.ebpf - icon_filename: "" + icon_filename: "ebpf.jpg" related_resources: integrations: list: [] info_provided_to_referring_integrations: description: "" - keywords: [] + keywords: + - Page cache + - Hit ratio + - eBPF most_popular: false overview: data_collection: - metrics_description: "" - method_description: "" + metrics_description: "Monitor Linux page cache events giving for users a general vision about how his kernel is manipulating files." + method_description: "Attach tracing (kprobe, trampoline) to internal kernel functions according options used to compile kernel." supported_platforms: include: [] exclude: [] @@ -655,22 +729,26 @@ modules: plugin_name: ebpf.plugin module_name: sync monitored_instance: - name: ebpf sync + name: eBPF Sync link: "" categories: - data-collection.ebpf - icon_filename: "" + icon_filename: "ebpf.jpg" related_resources: integrations: list: [] info_provided_to_referring_integrations: description: "" - keywords: [] + keywords: + - syscall + - eBPF + - hard disk + - memory most_popular: false overview: data_collection: - metrics_description: "" - method_description: "" + metrics_description: "Monitor syscalls responsible to move data from memory to storage device." + method_description: "Attach tracing (kprobe, trampoline) to internal kernel functions according options used to compile kernel." supported_platforms: include: [] exclude: [] @@ -753,22 +831,25 @@ modules: plugin_name: ebpf.plugin module_name: mdflush monitored_instance: - name: ebpf mdflush + name: eBPF MDflush link: "" categories: - data-collection.ebpf - icon_filename: "" + icon_filename: "ebpf.jpg" related_resources: integrations: list: [] info_provided_to_referring_integrations: description: "" - keywords: [] + keywords: + - MD + - RAID + - eBPF most_popular: false overview: data_collection: - metrics_description: "" - method_description: "" + metrics_description: "Monitor when flush events happen between disks." + method_description: "Attach tracing (kprobe, trampoline) to internal kernel functions according options used to compile kernel." supported_platforms: include: [] exclude: [] @@ -825,22 +906,26 @@ modules: plugin_name: ebpf.plugin module_name: swap monitored_instance: - name: ebpf swap + name: eBPF SWAP link: "" categories: - data-collection.ebpf - icon_filename: "" + icon_filename: "ebpf.jpg" related_resources: integrations: list: [] info_provided_to_referring_integrations: description: "" - keywords: [] + keywords: + - SWAP + - memory + - eBPF + - Hard Disk most_popular: false overview: data_collection: - metrics_description: "" - method_description: "" + metrics_description: "Monitors when swap has I/O events and applications executing events." + method_description: "Attach tracing (kprobe, trampoline) to internal kernel functions according options used to compile kernel." supported_platforms: include: [] exclude: [] @@ -938,22 +1023,24 @@ modules: plugin_name: ebpf.plugin module_name: oomkill monitored_instance: - name: ebpf oomkill + name: eBPF OOMkill link: "" categories: - data-collection.ebpf - icon_filename: "" + icon_filename: "ebpf.jpg" related_resources: integrations: list: [] info_provided_to_referring_integrations: description: "" - keywords: [] + keywords: + - application + - memory most_popular: false overview: data_collection: - metrics_description: "" - method_description: "" + metrics_description: "Monitor applications that reach out of memory." + method_description: "Attach tracepoint to internal kernel functions." supported_platforms: include: [] exclude: [] @@ -1026,22 +1113,28 @@ modules: plugin_name: ebpf.plugin module_name: socket monitored_instance: - name: ebpf socket + name: eBPF Socket link: "" categories: - data-collection.ebpf - icon_filename: "" + icon_filename: "ebpf.jpg" related_resources: integrations: list: [] info_provided_to_referring_integrations: description: "" - keywords: [] + keywords: + - TCP + - UDP + - bandwidth + - server + - connection + - socket most_popular: false overview: data_collection: - metrics_description: "" - method_description: "" + metrics_description: "Monitor bandwidth consumption per application for protocols TCP and UDP." + method_description: "Attach tracing (kprobe, trampoline) to internal kernel functions according options used to compile kernel." supported_platforms: include: [] exclude: [] @@ -1319,22 +1412,25 @@ modules: plugin_name: ebpf.plugin module_name: dcstat monitored_instance: - name: ebpf dcstat + name: eBPF DCstat link: "" categories: - data-collection.ebpf - icon_filename: "" + icon_filename: "ebpf.jpg" related_resources: integrations: list: [] info_provided_to_referring_integrations: description: "" - keywords: [] + keywords: + - Directory Cache + - File system + - eBPF most_popular: false overview: data_collection: - metrics_description: "" - method_description: "" + metrics_description: "Monitor directory cache events per application given an overall vision about files on memory or storage device." + method_description: "Attach tracing (kprobe, trampoline) to internal kernel functions according options used to compile kernel." supported_platforms: include: [] exclude: [] @@ -1479,22 +1575,31 @@ modules: plugin_name: ebpf.plugin module_name: filesystem monitored_instance: - name: ebpf filesystem + name: eBPF Filesystem link: "" categories: - data-collection.ebpf - icon_filename: "" + icon_filename: "ebpf.jpg" related_resources: integrations: list: [] info_provided_to_referring_integrations: description: "" - keywords: [] + keywords: + - Filesystem + - ext4 + - btrfs + - nfs + - xfs + - zfs + - eBPF + - latency + - I/O most_popular: false overview: data_collection: - metrics_description: "" - method_description: "" + metrics_description: "Monitor latency for main actions on filesystem like I/O events." + method_description: "Attach tracing (kprobe, trampoline) to internal kernel functions according options used to compile kernel." supported_platforms: include: [] exclude: [] @@ -1583,22 +1688,25 @@ modules: plugin_name: ebpf.plugin module_name: shm monitored_instance: - name: ebpf shm + name: eBPF SHM link: "" categories: - data-collection.ebpf - icon_filename: "" + icon_filename: "ebpf.jpg" related_resources: integrations: list: [] info_provided_to_referring_integrations: description: "" - keywords: [] + keywords: + - syscall + - shared memory + - eBPF most_popular: false overview: data_collection: - metrics_description: "" - method_description: "" + metrics_description: "Monitor syscalls responsible to manipulate shared memory." + method_description: "Attach tracing (kprobe, trampoline) to internal kernel functions according options used to compile kernel." supported_platforms: include: [] exclude: [] @@ -1734,22 +1842,24 @@ modules: plugin_name: ebpf.plugin module_name: softirq monitored_instance: - name: ebpf softirq + name: eBPF SoftIRQ link: "" categories: - data-collection.ebpf - icon_filename: "" + icon_filename: "ebpf.jpg" related_resources: integrations: list: [] info_provided_to_referring_integrations: description: "" - keywords: [] + keywords: + - SoftIRQ + - eBPF most_popular: false overview: data_collection: - metrics_description: "" - method_description: "" + metrics_description: "Monitor latency for each SoftIRQ available." + method_description: "Attach kprobes to internal kernel functions." supported_platforms: include: [] exclude: [] @@ -1797,7 +1907,7 @@ modules: labels: [] metrics: - name: system.softirq_latency - description: Software IRQ latency + description: Soft IRQ latency unit: "miliseconds" chart_type: stacked dimensions: @@ -1806,22 +1916,26 @@ modules: plugin_name: ebpf.plugin module_name: mount monitored_instance: - name: ebpf mount + name: eBPF Mount link: "" categories: - data-collection.ebpf - icon_filename: "" + icon_filename: "ebpf.jpg" related_resources: integrations: list: [] info_provided_to_referring_integrations: description: "" - keywords: [] + keywords: + - mount + - umount + - device + - eBPF most_popular: false overview: data_collection: - metrics_description: "" - method_description: "" + metrics_description: "Monitor calls for mount and umount syscall." + method_description: "Attach tracing (kprobe, trampoline) to internal kernel functions according options used to compile kernel." supported_platforms: include: [] exclude: [] @@ -1886,22 +2000,27 @@ modules: plugin_name: ebpf.plugin module_name: vfs monitored_instance: - name: ebpf vfs + name: eBPF VFS link: "" categories: - data-collection.ebpf - icon_filename: "" + icon_filename: "ebpf.jpg" related_resources: integrations: list: [] info_provided_to_referring_integrations: description: "" - keywords: [] + keywords: + - virtual + - filesystem + - eBPF + - I/O + - files most_popular: false overview: data_collection: - metrics_description: "" - method_description: "" + metrics_description: "Monitor I/O events on Linux Virtual Filesystem." + method_description: "Attach tracing (kprobe, trampoline) to internal kernel functions according options used to compile kernel." supported_platforms: include: [] exclude: [] @@ -2253,22 +2372,25 @@ modules: plugin_name: ebpf.plugin module_name: process monitored_instance: - name: ebpf process + name: eBPF Process link: "" categories: - data-collection.ebpf - icon_filename: "" + icon_filename: "ebpf.jpg" related_resources: integrations: list: [] info_provided_to_referring_integrations: description: "" - keywords: [] + keywords: + - Memory + - plugin + - eBPF most_popular: false overview: data_collection: - metrics_description: "" - method_description: "" + metrics_description: "Monitor internal memory usage." + method_description: "Uses netdata internal statistic to monitor memory management by plugin." supported_platforms: include: [] exclude: [] From c486c7e063a5f826f549057cb0fdf1b9348ec49e Mon Sep 17 00:00:00 2001 From: Emmanuel Vasilakis Date: Mon, 24 Jul 2023 22:11:46 +0300 Subject: [PATCH 09/55] Allow manage/health api call to be used without bearer (#15503) * allow manage/health to be used without bearer * use WEB_CLIENT_ACL_ACLK --- web/api/web_api_v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c index 1e4f9c41ce3417..85e36ef0613c2e 100644 --- a/web/api/web_api_v1.c +++ b/web/api/web_api_v1.c @@ -1545,7 +1545,7 @@ static struct web_api_command api_commands_v1[] = { // { "ml_models", 0, WEB_CLIENT_ACL_DASHBOARD, web_client_api_request_v1_ml_models }, #endif - {"manage/health", 0, WEB_CLIENT_ACL_MGMT | WEB_CLIENT_ACL_ACLK_WEBRTC_DASHBOARD_WITH_BEARER, web_client_api_request_v1_mgmt_health }, + {"manage/health", 0, WEB_CLIENT_ACL_MGMT | WEB_CLIENT_ACL_ACLK, web_client_api_request_v1_mgmt_health }, { "aclk", 0, WEB_CLIENT_ACL_DASHBOARD_ACLK_WEBRTC, web_client_api_request_v1_aclk_state }, { "metric_correlations", 0, WEB_CLIENT_ACL_DASHBOARD_ACLK_WEBRTC, web_client_api_request_v1_metric_correlations }, { "weights", 0, WEB_CLIENT_ACL_DASHBOARD_ACLK_WEBRTC, web_client_api_request_v1_weights }, From 8fe70648f6ba14ff9c543ea43ac0638ef3213f27 Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Tue, 25 Jul 2023 00:28:18 +0300 Subject: [PATCH 10/55] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a3c6934ff682be..9ab8b2e01cdbf1 100644 --- a/README.md +++ b/README.md @@ -149,6 +149,8 @@ It scales nicely from just a single server to thousands of servers, even in comp - Install [from source](https://learn.netdata.cloud/docs/installing/build-the-netdata-agent-yourself/compile-from-source-code) ![github downloads](https://img.shields.io/github/downloads/netdata/netdata/total?color=success&logo=github) - For Kubernetes deployments [check here](https://learn.netdata.cloud/docs/installation/install-on-specific-environments/kubernetes/). + Check also the [Netdata Deployment Strategies](https://learn.netdata.cloud/docs/architecture/deployment-strategies) to decide how to deploy it in your infrastrucure. + ### 2. **Configure Collectors** :boom: Netdata auto-detects and auto-discovers most operating system data sources and applications. However, many data sources require some manual configuration, usually to allow Netdata get access to the metrics. From 55f25259b4e6a386017f033b36518b0f91f98e02 Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Tue, 25 Jul 2023 01:30:21 +0300 Subject: [PATCH 11/55] Update README.md --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 9ab8b2e01cdbf1..82285f34172850 100644 --- a/README.md +++ b/README.md @@ -424,6 +424,32 @@ Still, if you are already familiar with Prometheus and Grafana, Netdata integrat  
 
+### :cloud: How is Netdata different from DataDog, New Relic, Dynatrace, X SaaS Provider? + +With Netdata your data are always on-prem and your metrics are always high-resolution. + +
Click to see detailed answer ...
 
+ +Most commercial monitoring providers face a significant challenge: they centralize all metrics to their infrastructure and this is, inevitably, expensive. It leads them to one or more of the following: + + 1. be unrealistically expensive + 2. limit the number of metrics they collect + 3. limit the resolution of the metrics they collect + +As a result they try to find a balance: collect the least possible data, but collect enough to have something useful out of it. + +We, at Netdata, see monitoring in a completely different way: **monitoring systems should be built bottom-up and be rich in insights**, so we focus on each component individually to collect, store, check and visualize everything related to each of them, and we make sure that all components are monitored. Each metric is important. + +This is why Netdata trains multiple machine-learning models per metric, based exclusively on their own past (no sampling of data, no sharing of trained models) to detect anomalies based on the specific use case and workload each component is used. + +This is also why Netdata alerts are attached to components (instances) and are configured with dynamic thresholds and rolling windows, instead of static values. + +The distributed nature of Netdata helps scaling this approach: your data is spread inside your infrastructure, as close to the edge as possible. Netdata is not one data lane. Each Netdata Agent is a data lane and all of them together build a massive distributed metrics processing pipeline that ensures all your infrastructure components and applications are monitored and operating as they should. + + 
 
+
+ ### :cloud: Do I have to subscribe to Netdata Cloud? Subscribing to Netdata Cloud is optional but many users find it enhances their experience with Netdata. From adbdc5ad4f52e9ac3f1352bc15ae2df079b80c93 Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Tue, 25 Jul 2023 02:37:01 +0300 Subject: [PATCH 12/55] Update README.md --- README.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 82285f34172850..b6bd03602cdd23 100644 --- a/README.md +++ b/README.md @@ -466,15 +466,19 @@ The Netdata Agent dashboard and the Netdata Cloud dashboard are the same. Still, 5. Central Dispatch of Alert Notifications (even when multiple independent parents are involved) 6. Mobile App for Alert Notifications (coming soon) -So, although it is not required, you can get the most out of your Netdata installation by using Netdata Cloud. +So, although it is not required, you can get the most out of your Netdata setup by using Netdata Cloud. + +We encourage you to support Netdata by buying a Netdata Cloud subscription. A successful Netdata is a Netdata that evolves and gets improved to provide a simpler, faster and easier monitoring for all of us. + +For organizations that need a fully on-prem solution, we provide Netdata Cloud for on-prem installation. [Contact us for more information](mailto:info@netdata.cloud).  
 
### :raised_eyebrow: Is Netdata sending telemetry back home? -We collect anonymous statistics to help us take informed decisions for the future of Netdata. -But it can easily be disabled. Our installation pages provide information on how to do this. +By default, we collect anonymous statistics to help us take informed decisions for the future of Netdata. +But you can easily disable it. Our installation pages provide information on how to do this.
Click to see detailed answer ...  
 
@@ -484,7 +488,7 @@ Netdata is evolving on a very fast pace. Everyday we take decisions on how the p Ideally these decisions should be data informed. _Is this the right area to work on now? Do our users really use that? How to prioritize between feature A and B? I believe that C is more important. A user said that D is the most important._ -Anonymous telemetry information can really help us take the best decisions. Our users that have anonymous telemetry enabled, contribute significantly to Netdata's roadmap. Without losing any time, they provide valuable anonymous information that helps us do the best for the project and the community. +Anonymous telemetry information can help us take the best decisions. Our users that have anonymous telemetry enabled, contribute to Netdata's roadmap. They provide valuable anonymous information that helps us do the best for the project and the community. We understand that this is not acceptable or not allowed in all environments. For this reason we have made it easy to disable telemetry when you need to: @@ -493,9 +497,9 @@ We understand that this is not acceptable or not allowed in all environments. Fo Either of these methods will disable anonymous telemetry information for your installation. -Keep in mind that even with telemetry disabled, Netdata needs a [Netdata Registry](https://learn.netdata.cloud/docs/configuring/securing-netdata-agents/registry) for alert notifications' CTA to work. When you click on an alert notification, you go to the Netdata Registry, which finds the URL of the Netdata Agent that sent you the alert, and diverts your web browser to it, so that you can troubleshoot the issue. The Netdata Registry learns the URLs of your agents, as you visit their dashboards. +Keep in mind that even with telemetry disabled, Netdata needs a [Netdata Registry](https://learn.netdata.cloud/docs/configuring/securing-netdata-agents/registry) for alert notifications' Call To Action (CTA) to work. When you click on an alert notification, you go to the Netdata Registry, which finds the URL of the Netdata Agent that sent you the alert, and diverts your web browser to it, so that you can troubleshoot the issue. The Netdata Registry learns the URLs of your agents, as you visit their dashboards (so each agent may have different URLs per user, depending on the user location). -Every Netdata Agent can be a Netdata Registry. Just appoint one Netdata Agent as your registry, and the public Netdata Registry will not be used any more. For more information [check this guide](https://learn.netdata.cloud/docs/configuring/securing-netdata-agents/registry). +Every Netdata Agent can be a Netdata Registry. Just appoint one Netdata Agent as your registry, and the gloabl Netdata Registry we run, will not be used any more. For more information [check this guide](https://learn.netdata.cloud/docs/configuring/securing-netdata-agents/registry).  
 
From d160ca260c2c419fcd0371b07b12b7a8d9d20c22 Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Tue, 25 Jul 2023 02:38:01 +0300 Subject: [PATCH 13/55] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b6bd03602cdd23..fadcac9a08e879 100644 --- a/README.md +++ b/README.md @@ -512,7 +512,7 @@ Netdata is a popular project...
Click to see detailed answer ...  
 
-Check its [stargazers on github](https://github.com/netdata/netdata/stargazers). You will find people from quite popular companies and enterprises, including: SAP, Qualcomm, IBM, Amazon, Intel, AMD, Unity, Baidu, Cisco, Samsung, Netflix, Facebook and hundreds more. +Check the [Netdata stargazers on Github](https://github.com/netdata/netdata/stargazers). You will find people from popular companies and enterprises, including: SAP, Qualcomm, IBM, Amazon, Intel, AMD, Unity, Baidu, Cisco, Samsung, Netflix, Facebook and hundreds more. Netdata is also popular in universities, including New York University, Columbia University, New Jersey University, and dozens more. From b130e4c1e107df559818c87b6afea5c5047e3e21 Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Tue, 25 Jul 2023 02:40:14 +0300 Subject: [PATCH 14/55] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fadcac9a08e879..86c3939f64bfcc 100644 --- a/README.md +++ b/README.md @@ -499,7 +499,7 @@ Either of these methods will disable anonymous telemetry information for your in Keep in mind that even with telemetry disabled, Netdata needs a [Netdata Registry](https://learn.netdata.cloud/docs/configuring/securing-netdata-agents/registry) for alert notifications' Call To Action (CTA) to work. When you click on an alert notification, you go to the Netdata Registry, which finds the URL of the Netdata Agent that sent you the alert, and diverts your web browser to it, so that you can troubleshoot the issue. The Netdata Registry learns the URLs of your agents, as you visit their dashboards (so each agent may have different URLs per user, depending on the user location). -Every Netdata Agent can be a Netdata Registry. Just appoint one Netdata Agent as your registry, and the gloabl Netdata Registry we run, will not be used any more. For more information [check this guide](https://learn.netdata.cloud/docs/configuring/securing-netdata-agents/registry). +Every Netdata Agent can be a Netdata Registry. Just appoint one Netdata Agent as your registry, and the global Netdata Registry we run, will not be used any more. For more information [check this guide](https://learn.netdata.cloud/docs/configuring/securing-netdata-agents/registry).  
 
From 412e35c4fcd406af9479d1e03c7ecdc51e1d4fcf Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Tue, 25 Jul 2023 02:41:03 +0300 Subject: [PATCH 15/55] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 86c3939f64bfcc..d44f542a85d37e 100644 --- a/README.md +++ b/README.md @@ -424,7 +424,7 @@ Still, if you are already familiar with Prometheus and Grafana, Netdata integrat  
 
-### :cloud: How is Netdata different from DataDog, New Relic, Dynatrace, X SaaS Provider? +### :raised_eyebrow: How is Netdata different from DataDog, New Relic, Dynatrace, X SaaS Provider? With Netdata your data are always on-prem and your metrics are always high-resolution. From 4436bcdd01b8db36b9b70f15cb260d5c4592dd07 Mon Sep 17 00:00:00 2001 From: netdatabot Date: Tue, 25 Jul 2023 00:19:02 +0000 Subject: [PATCH 16/55] [ci skip] Update changelog and version for nightly build: v1.41.0-58-nightly. --- CHANGELOG.md | 14 ++++++++------ packaging/version | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 283244886b7ea7..4aa71524e6831f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,14 +6,21 @@ **Merged pull requests:** +- apps.plugin limits tracing [\#15504](https://github.com/netdata/netdata/pull/15504) ([ktsaou](https://github.com/ktsaou)) +- Allow manage/health api call to be used without bearer [\#15503](https://github.com/netdata/netdata/pull/15503) ([MrZammler](https://github.com/MrZammler)) - freeipmi flush keepalive msgs [\#15499](https://github.com/netdata/netdata/pull/15499) ([ilyam8](https://github.com/ilyam8)) +- add required properties to multi-module schema [\#15496](https://github.com/netdata/netdata/pull/15496) ([ilyam8](https://github.com/ilyam8)) +- docs: clarify health percentage option [\#15492](https://github.com/netdata/netdata/pull/15492) ([ilyam8](https://github.com/ilyam8)) - Fix resource leak - CID 396310 [\#15491](https://github.com/netdata/netdata/pull/15491) ([stelfrag](https://github.com/stelfrag)) - Improve the update of the alert chart name in the database [\#15490](https://github.com/netdata/netdata/pull/15490) ([stelfrag](https://github.com/stelfrag)) +- Add a machine distinct id to analytics [\#15485](https://github.com/netdata/netdata/pull/15485) ([MrZammler](https://github.com/MrZammler)) - Add basic slabinfo metadata. [\#15484](https://github.com/netdata/netdata/pull/15484) ([Ferroin](https://github.com/Ferroin)) +- Update charts.d.plugin yaml [\#15483](https://github.com/netdata/netdata/pull/15483) ([Ancairon](https://github.com/Ancairon)) - docs: note that health foreach works only with template [\#15478](https://github.com/netdata/netdata/pull/15478) ([ilyam8](https://github.com/ilyam8)) - Yaml file updates [\#15477](https://github.com/netdata/netdata/pull/15477) ([Ancairon](https://github.com/Ancairon)) - Rename most-popular to most\_popular in categories.yaml [\#15476](https://github.com/netdata/netdata/pull/15476) ([Ancairon](https://github.com/Ancairon)) - Fix coverity issue [\#15475](https://github.com/netdata/netdata/pull/15475) ([stelfrag](https://github.com/stelfrag)) +- eBPF Yaml [\#15474](https://github.com/netdata/netdata/pull/15474) ([thiagoftsm](https://github.com/thiagoftsm)) - Memory Controller \(MC\) and DIMM Error Detection And Correction \(EDAC\) [\#15473](https://github.com/netdata/netdata/pull/15473) ([ktsaou](https://github.com/ktsaou)) - meta schema change multi-instance to multi\_instance [\#15470](https://github.com/netdata/netdata/pull/15470) ([ilyam8](https://github.com/ilyam8)) - fix anchors [\#15469](https://github.com/netdata/netdata/pull/15469) ([Ancairon](https://github.com/Ancairon)) @@ -29,6 +36,7 @@ - Store and transmit chart\_name to cloud in alert events [\#15441](https://github.com/netdata/netdata/pull/15441) ([MrZammler](https://github.com/MrZammler)) - Add linux powercap metrics collector [\#15364](https://github.com/netdata/netdata/pull/15364) ([fhriley](https://github.com/fhriley)) - Hash table charts [\#15323](https://github.com/netdata/netdata/pull/15323) ([thiagoftsm](https://github.com/thiagoftsm)) +- Drop support for native packages of Ubuntu 22.10 [\#15292](https://github.com/netdata/netdata/pull/15292) ([tkatsoulas](https://github.com/tkatsoulas)) - Fix non-interactive options for apt-get and zypper. [\#15288](https://github.com/netdata/netdata/pull/15288) ([zeylos](https://github.com/zeylos)) ## [v1.41.0](https://github.com/netdata/netdata/tree/v1.41.0) (2023-07-19) @@ -414,12 +422,6 @@ - Update link from http to https [\#14864](https://github.com/netdata/netdata/pull/14864) ([Ancairon](https://github.com/Ancairon)) - Fix js tag in documentation [\#14862](https://github.com/netdata/netdata/pull/14862) ([Ancairon](https://github.com/Ancairon)) - Set a default registry unique id when there is none for statistics script [\#14861](https://github.com/netdata/netdata/pull/14861) ([MrZammler](https://github.com/MrZammler)) -- review usage of you to say user instead [\#14858](https://github.com/netdata/netdata/pull/14858) ([hugovalente-pm](https://github.com/hugovalente-pm)) -- Add labels for cgroup name [\#14856](https://github.com/netdata/netdata/pull/14856) ([thiagoftsm](https://github.com/thiagoftsm)) -- fix typo alerms -\> alarms [\#14854](https://github.com/netdata/netdata/pull/14854) ([slavox](https://github.com/slavox)) -- Add a checkpoint message to alerts stream [\#14847](https://github.com/netdata/netdata/pull/14847) ([MrZammler](https://github.com/MrZammler)) -- fix \#14841 Exception funktion call Rados.mon\_command\(\) [\#14844](https://github.com/netdata/netdata/pull/14844) ([farax4de](https://github.com/farax4de)) -- Update parent child examples [\#14842](https://github.com/netdata/netdata/pull/14842) ([cakrit](https://github.com/cakrit)) ## [v1.38.1](https://github.com/netdata/netdata/tree/v1.38.1) (2023-02-13) diff --git a/packaging/version b/packaging/version index d7f0628336b283..6e9a8fb6f4ce79 100644 --- a/packaging/version +++ b/packaging/version @@ -1 +1 @@ -v1.41.0-40-nightly +v1.41.0-58-nightly From 458d7a9df81d25f5f91ae862a46d31a3dcd1509c Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Tue, 25 Jul 2023 03:45:06 +0300 Subject: [PATCH 17/55] Update README.md --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index d44f542a85d37e..1414bc747fb7dc 100644 --- a/README.md +++ b/README.md @@ -516,6 +516,27 @@ Check the [Netdata stargazers on Github](https://github.com/netdata/netdata/star Netdata is also popular in universities, including New York University, Columbia University, New Jersey University, and dozens more. +As a general guide, Netdata seems ideal for: + +- **Infrastructure intensive organizations**
+ (hosting / cloud providers and companies having several hundreds / thousands of nodes)
+ that need a high-resolution, real-time monitoring solution to ensure all their components and applications are monitored holisticaly. + +- **Technology operators**
+ that need a comprehensive and standardized solution to allow them run their operations round-the-clock in an efficient way, allowing them to automate most of their operations, give controlled access to operations' engineers, but also improve their skills over time. + +- **Technology startups**
+ that need a rich monitoring solution today. + +- **Freelancers**
+ who don't have the time or the energy to spare on complicated solutions with inferior results. + +- **Professional SysAdmins and DevOps**
+ who give attention to detail and they understand the value of bottom-up monitoring. + +- **all of us**
+ who are really tired and exhausted by the inneficiency of other monitoring solutions... :slightly_smiling_face: +  
 
From 0b14029018dbe99da9454719ff6abe5dd746c967 Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Tue, 25 Jul 2023 03:47:29 +0300 Subject: [PATCH 18/55] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1414bc747fb7dc..5ea240113e9b00 100644 --- a/README.md +++ b/README.md @@ -523,7 +523,7 @@ As a general guide, Netdata seems ideal for: that need a high-resolution, real-time monitoring solution to ensure all their components and applications are monitored holisticaly. - **Technology operators**
- that need a comprehensive and standardized solution to allow them run their operations round-the-clock in an efficient way, allowing them to automate most of their operations, give controlled access to operations' engineers, but also improve their skills over time. + that need a comprehensive and standardized solution to allow them run their operations round-the-clock, allowing them to automate most of their operations and protect their environment by giving controlled access to their operations engineers, but also improve their skills over time. - **Technology startups**
that need a rich monitoring solution today. From d09ea98c696fa29362d94897b090b70b1d273c8b Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Tue, 25 Jul 2023 04:04:26 +0300 Subject: [PATCH 19/55] Update README.md --- README.md | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 5ea240113e9b00..ccb4e7da2af95c 100644 --- a/README.md +++ b/README.md @@ -507,35 +507,34 @@ Every Netdata Agent can be a Netdata Registry. Just appoint one Netdata Agent as ### :office: Who uses Netdata? -Netdata is a popular project... +Netdata is a widely adopted project...
Click to see detailed answer ...  
 
-Check the [Netdata stargazers on Github](https://github.com/netdata/netdata/stargazers). You will find people from popular companies and enterprises, including: SAP, Qualcomm, IBM, Amazon, Intel, AMD, Unity, Baidu, Cisco, Samsung, Netflix, Facebook and hundreds more. +Browse the [Netdata stargazers on Github](https://github.com/netdata/netdata/stargazers) to discover users from renowned companies and enterprises, such as SAP, Qualcomm, IBM, Amazon, Intel, AMD, Unity, Baidu, Cisco, Samsung, Netflix, Facebook, and many others. -Netdata is also popular in universities, including New York University, Columbia University, New Jersey University, and dozens more. +Netdata also enjoys significant usage in academia, with notable institutions including New York University, Columbia University, New Jersey University, among several others. -As a general guide, Netdata seems ideal for: +In a nutshell, Netdata proves invaluable for: - **Infrastructure intensive organizations**
- (hosting / cloud providers and companies having several hundreds / thousands of nodes)
- that need a high-resolution, real-time monitoring solution to ensure all their components and applications are monitored holisticaly. + Such as hosting/cloud providers and companies with hundreds or thousands of nodes, who require a high-resolution, real-time monitoring solution for a comprehensive view of all their components and applications. - **Technology operators**
- that need a comprehensive and standardized solution to allow them run their operations round-the-clock, allowing them to automate most of their operations and protect their environment by giving controlled access to their operations engineers, but also improve their skills over time. + Those in need of a standardized, comprehensive solution for round-the-clock operations. Netdata not only facilitates operational automation and provides controlled access for their operations engineers, but also enhances skill development over time. - **Technology startups**
- that need a rich monitoring solution today. + Who seek a feature-rich monitoring solution from the get-go. - **Freelancers**
- who don't have the time or the energy to spare on complicated solutions with inferior results. + Those seeking an efficient and straightforward solution without sacrificing performance and outcomes due to time or energy constraints. - **Professional SysAdmins and DevOps**
- who give attention to detail and they understand the value of bottom-up monitoring. + Who appreciate the fine details and understand the value of holistic monitoring from the ground up. -- **all of us**
- who are really tired and exhausted by the inneficiency of other monitoring solutions... :slightly_smiling_face: +- **Everyone else**
+ Those who are tired of the inefficiency in the monitoring industry and are seeking a breath of fresh air. :slightly_smiling_face:  
 
From 9ad79746309d7cb5981c41c2a94045a19b1dc65f Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Tue, 25 Jul 2023 12:16:11 +0300 Subject: [PATCH 20/55] Update README.md --- README.md | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index ccb4e7da2af95c..d4924cb4704b19 100644 --- a/README.md +++ b/README.md @@ -475,36 +475,33 @@ For organizations that need a fully on-prem solution, we provide Netdata Cloud f  
 
-### :raised_eyebrow: Is Netdata sending telemetry back home? +### :information_source: What does the anonymous telemetry collected by Netdata entail? -By default, we collect anonymous statistics to help us take informed decisions for the future of Netdata. -But you can easily disable it. Our installation pages provide information on how to do this. +Your privacy is our utmost priority. As part of our commitment to improving Netdata, we rely on anonymous telemetry data from our users who choose to leave it enabled. This data greatly informs our decision-making processes and contributes to the future evolution of Netdata. + +Should you wish to disable telemetry, instructions for doing so are provided in our installation guides.
Click to see detailed answer ...  
 
-Netdata is evolving on a very fast pace. Everyday we take decisions on how the project should evolve. - -Ideally these decisions should be data informed. _Is this the right area to work on now? Do our users really use that? -How to prioritize between feature A and B? I believe that C is more important. A user said that D is the most important._ +Netdata is in a constant state of growth and evolution. The decisions that guide this development are ideally rooted in data. By analyzing anonymous telemetry data, we can answer questions such as: "What features are being used frequently?", "How do we prioritize between potential new features?" and "What elements of Netdata are most important to our users?" -Anonymous telemetry information can help us take the best decisions. Our users that have anonymous telemetry enabled, contribute to Netdata's roadmap. They provide valuable anonymous information that helps us do the best for the project and the community. +By leaving anonymous telemetry enabled, users indirectly contribute to shaping Netdata's roadmap, providing invaluable information that helps us prioritize our efforts for the project and the community. -We understand that this is not acceptable or not allowed in all environments. For this reason we have made it easy to disable telemetry when you need to: +We are aware that for privacy or regulatory reasons, not all environments can allow telemetry. To cater to this, we have simplified the process of disabling telemetry: -- you can append `--disable-telemetry` to our `kickstart.sh` script when you install netdata, or -- touch the file `/etc/netdata/.opt-out-from-anonymous-statistics` and restart Netdata +- During installation, you can append `--disable-telemetry` to our `kickstart.sh` script, or +- Create the file `/etc/netdata/.opt-out-from-anonymous-statistics` and then restart Netdata. -Either of these methods will disable anonymous telemetry information for your installation. +These steps will disable the anonymous telemetry for your Netdata installation. -Keep in mind that even with telemetry disabled, Netdata needs a [Netdata Registry](https://learn.netdata.cloud/docs/configuring/securing-netdata-agents/registry) for alert notifications' Call To Action (CTA) to work. When you click on an alert notification, you go to the Netdata Registry, which finds the URL of the Netdata Agent that sent you the alert, and diverts your web browser to it, so that you can troubleshoot the issue. The Netdata Registry learns the URLs of your agents, as you visit their dashboards (so each agent may have different URLs per user, depending on the user location). +Please note, even with telemetry disabled, Netdata still requires a [Netdata Registry](https://learn.netdata.cloud/docs/configuring/securing-netdata-agents/registry) for alert notifications' Call To Action (CTA) functionality. When you click an alert notification, it redirects you to the Netdata Registry, which then directs your web browser to the specific Netdata Agent that issued the alert for further troubleshooting. The Netdata Registry learns the URLs of your agents when you visit their dashboards. -Every Netdata Agent can be a Netdata Registry. Just appoint one Netdata Agent as your registry, and the global Netdata Registry we run, will not be used any more. For more information [check this guide](https://learn.netdata.cloud/docs/configuring/securing-netdata-agents/registry). +Any Netdata Agent can act as a Netdata Registry. Simply designate one Netdata Agent as your registry, and our global Netdata Registry will no longer be in use. For further information on this, please refer to [this guide](https://learn.netdata.cloud/docs/configuring/securing-netdata-agents/registry).  
 
- ### :office: Who uses Netdata? Netdata is a widely adopted project... From f0ba9fa201f9ab339b5d4f2f981ad2ecf93d7939 Mon Sep 17 00:00:00 2001 From: Fotis Voutsas Date: Tue, 25 Jul 2023 13:31:58 +0300 Subject: [PATCH 21/55] Make title reflect legacy agent dashboard (#15479) --- docs/anonymous-statistics.md | 2 +- docs/configure/common-changes.md | 2 +- packaging/installer/README.md | 6 ------ web/gui/README.md | 11 +---------- web/server/README.md | 2 +- 5 files changed, 4 insertions(+), 19 deletions(-) diff --git a/docs/anonymous-statistics.md b/docs/anonymous-statistics.md index d8cc99689ad3fd..f84989e16e5847 100644 --- a/docs/anonymous-statistics.md +++ b/docs/anonymous-statistics.md @@ -23,7 +23,7 @@ We use the statistics gathered from this information for two purposes: Netdata collects usage information via two different channels: -- **Agent dashboard**: We use the [PostHog JavaScript integration](https://posthog.com/docs/integrations/js-integration) (with sensitive event attributes overwritten to be anonymized) to send product usage events when you access an [Agent's dashboard](https://github.com/netdata/netdata/blob/master/web/gui/README.md). +- **Agent dashboard**: We use the [PostHog JavaScript integration](https://posthog.com/docs/integrations/js-integration) (with sensitive event attributes overwritten to be anonymized) to send product usage events when you access an [Agent's dashboard](https://github.com/netdata/netdata/blob/master/docs/category-overview-pages/accessing-netdata-dashboards.md). - **Agent backend**: The `netdata` daemon executes the [`anonymous-statistics.sh`](https://github.com/netdata/netdata/blob/6469cf92724644f5facf343e4bdd76ac0551a418/daemon/anonymous-statistics.sh.in) script when Netdata starts, stops cleanly, or fails. You can opt-out from sending anonymous statistics to Netdata through three different [opt-out mechanisms](#opt-out). diff --git a/docs/configure/common-changes.md b/docs/configure/common-changes.md index f171e49e2cd725..61e5d4c8de9792 100644 --- a/docs/configure/common-changes.md +++ b/docs/configure/common-changes.md @@ -20,7 +20,7 @@ directory. ## Change dashboards and visualizations -The Netdata Agent's [local dashboard](https://github.com/netdata/netdata/blob/master/web/gui/README.md), accessible +The Netdata Agent's [local dashboard](https://github.com/netdata/netdata/blob/master/docs/category-overview-pages/accessing-netdata-dashboards.md), accessible at `http://NODE:19999` is highly configurable. If you use Netdata Cloud for [infrastructure monitoring](https://github.com/netdata/netdata/blob/master/docs/quickstart/infrastructure.md), you diff --git a/packaging/installer/README.md b/packaging/installer/README.md index 9a9beb72022602..85a0a6ddcd2482 100644 --- a/packaging/installer/README.md +++ b/packaging/installer/README.md @@ -38,12 +38,6 @@ but we have some hints on what you might want to do next. Explore our [general advanced installation options and troubleshooting](#advanced-installation-options-and-troubleshooting), specific options for the [single line installer](#install-on-linux-with-one-line-installer), or [other installation methods](#other-installation-methods). -#### Agent user interface - -To access the UI provided by the locally installed agent, open a browser and navigate to `http://NODE:19999`, replacing `NODE` with either `localhost` or -the hostname/IP address of the remote node. You can also read more about -[the agent dashboard](https://github.com/netdata/netdata/blob/master/web/gui/README.md). - #### Configuration Discover the recommended way to [configure Netdata's settings or behavior](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md) using our built-in diff --git a/web/gui/README.md b/web/gui/README.md index bbedde33f598a7..49b6a55b6c46dd 100644 --- a/web/gui/README.md +++ b/web/gui/README.md @@ -1,13 +1,4 @@ - - -# Local Agent dashboard +# Legacy Agent dashboard > ⚠️ You're checking the documentation for the legacy Agent dashboard. For the current version please check [Accessing Netdata Dashboards](https://github.com/netdata/netdata/blob/master/docs/category-overview-pages/accessing-netdata-dashboards.md). diff --git a/web/server/README.md b/web/server/README.md index 37577b6ddddb21..cff7bebe4792da 100644 --- a/web/server/README.md +++ b/web/server/README.md @@ -48,7 +48,7 @@ Scroll down to the `[web]` section to find the following settings. | `accept a streaming request every seconds` | `0` | Can be used to set a limit on how often a parent node will accept streaming requests from child nodes in a [streaming and replication setup](https://github.com/netdata/netdata/blob/master/streaming/README.md). | | `respect do not track policy` | `no` | If set to `yes`, Netdata will respect the user's browser preferences for [Do Not Track](https://www.eff.org/issues/do-not-track) (DNT) and storing cookies. If DNT is _enabled_ in the browser, and this option is set to `yes`, users will not be able to sign in to Netdata Cloud via their local Agent dashboard, and their node will not connect to any [registry](https://github.com/netdata/netdata/blob/master/registry/README.md). For certain browsers, users must disable DNT and change this option to `yes` for full functionality. | | `x-frame-options response header` | ` ` | Avoid [clickjacking attacks](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options), by ensuring that the content is not embedded into other sites. | -| `allow connections from` | `localhost *` | Declare which IP addresses or full-qualified domain names (FQDNs) are allowed to connect to the web server, including the [dashboard](https://github.com/netdata/netdata/blob/master/web/gui/README.md) or [HTTP API](https://github.com/netdata/netdata/blob/master/web/api/README.md). This is a global setting with higher priority to any of the ones below. | +| `allow connections from` | `localhost *` | Declare which IP addresses or full-qualified domain names (FQDNs) are allowed to connect to the web server, including the [dashboard](https://github.com/netdata/netdata/blob/master/docs/category-overview-pages/accessing-netdata-dashboards.md) or [HTTP API](https://github.com/netdata/netdata/blob/master/web/api/README.md). This is a global setting with higher priority to any of the ones below. | | `allow connections by dns` | `heuristic` | See the [access list examples](#access-lists) for details on using `allow` settings. | | `allow dashboard from` | `localhost *` | | | `allow dashboard by dns` | `heuristic` | | From 585d8f5cf7fc0a74dafb944da5f72b5b3c121310 Mon Sep 17 00:00:00 2001 From: Andrew Maguire Date: Tue, 25 Jul 2023 12:15:41 +0100 Subject: [PATCH 22/55] readme: reorder cols in whats new and add links (#15455) * reorder cols in whats new and add links --- README.md | 60 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index d4924cb4704b19..e90679f3e5e5de 100644 --- a/README.md +++ b/README.md @@ -89,35 +89,37 @@ It scales nicely from just a single server to thousands of servers, even in comp
Click to see our immediate development plans and a summary view of the last 12 months' releases...  
-| When | Status | What | Description| -|:----:|:------:|:----:|:-----------| -|later|POC|WebRTC|Browser to Agent communication via WebRTC.| -|later|interrupted|Advanced Troubleshooting|Expanded view of dashboard charts integrating Metrics Correlations, Anomaly Advisor and many more.| -|next|planned|Easy Custom
Dashboards|Drag and drop charts to create custom dashboards on the fly, while troubleshooting!| -|next|planned|More Customizability|Set default settings for all charts and views!| -|soon|in progress|SystemD Journal|View the SystemD Journal of your systems on the dashboard.| -|soon|in progress|UCUM Units|Migrate all metrics to the Unified Code for Units of Measure.| -|**soon**|**in progress**|**Netdata Cloud
On-Prem**|**Netdata Cloud available for On-Prem installation!**| -|soon|in progress|Click to Activate|Configure Alerts and Data Collectors from the UI!| -|soon|finishing|Integrations|Netdata Integrations Marketplace!| -|Jul
2023|[v1.41](https://github.com/netdata/netdata/releases/tag/v1.41.0)|New Agent UI|Now Netdata Cloud and Netdata Agent share the same dashboard!| -|Jun
2023|[v1.40](https://github.com/netdata/netdata/releases/tag/v1.40.0)|Summary Dashboards|High level tiles everywhere!| -|||Machine Learning|Multiple ML models per metric.| -|||SSL|Netdata Agent gets a new SSL layer.| -|May
2023|[v1.39](https://github.com/netdata/netdata/releases/tag/v1.39.0)|New Cloud UI|Filter, slice and dice any dataset from the UI! ML-first!| -|||Microsoft Windows|Monitor Windows hosts and apps!| -|||Virtual Nodes|Go collectors can now be assigned to virtual nodes!| -|Feb
2023|[v1.38](https://github.com/netdata/netdata/releases/tag/v1.38.0)|DBENGINE v2|Faster, more reliable, far more scalable!| -|||Netdata Functions|Netdata beyond metrics! Monitoring anything!| -|||Events Feed|Live feed of events about topology changes and alerts.| -|||Role Based
Access Control|More roles, offering finer control over access to infrastructure.| -|Nov
2022|[v1.37](https://github.com/netdata/netdata/releases/tag/v1.37.0)|Infinite Scalability|Streaming compression. Replication. Active-active clustering.| -|||Grafana Plugin|Netdata Cloud as a data source for Grafana.| -|||PostgreSQL|Completely rewritten, to reveal all the info, even at the table level.| -|Aug
2022|[v1.36](https://github.com/netdata/netdata/releases/tag/v1.36.0)|Metrics Correlations|Advanced algorithms to find the needle in the haystack.| -|||Database Tiering|Netdata gets unlimited retention!| -|||Kubernetes|Monitor your kubernetes workloads.| -|||Machine Learning|Anomaly Rate information on every chart.| +| What | Description | When | Status | +|:----:|:-----------:|:----:|:------:| +|WebRTC|Browser to Agent communication via WebRTC.|later|POC| +|Advanced Troubleshooting|Expanded view of dashboard charts integrating Metrics Correlations, Anomaly Advisor and many more.|later|interrupted| +|Easy Custom
Dashboards|Drag and drop charts to create custom dashboards on the fly, while troubleshooting!|next|planned| +|More Customizability|Set default settings for all charts and views!|next|planned| +|SystemD Journal|View the SystemD Journal of your systems on the dashboard.|soon|in progress| +|UCUM Units|Migrate all metrics to the Unified Code for Units of Measure.|soon|in progress| +|**Netdata Cloud
On-Prem**|**Netdata Cloud available for On-Prem installation!**|**soon**|**in progress**| +|Click to Activate|Configure Alerts and Data Collectors from the UI!|soon|in progress| +|Integrations|Netdata Integrations Marketplace!|soon|finishing| +|New Agent UI|Now Netdata Cloud and Netdata Agent share the same dashboard!|Jul
2023|[v1.41](https://github.com/netdata/netdata/releases/tag/v1.41.0#v1410-one-dashboard)| +|Summary Dashboards|High level tiles everywhere!|Jun
2023|[v1.40](https://github.com/netdata/netdata/releases/tag/v1.40.0#v1400-visualization-summary-dashboards)| +|Machine Learning|Multiple ML models per metric.|Jun
2023|[v1.40](https://github.com/netdata/netdata/releases/tag/v1.40.0#v1400-ml-extended-training)| +|SSL|Netdata Agent gets a new SSL layer.|Jun
2023|[v1.40](https://github.com/netdata/netdata/releases/tag/v1.40.0#v1400-streaming)| +|New Cloud UI|Filter, slice and dice any dataset from the UI! ML-first!|May
2023|[v1.39](https://github.com/netdata/netdata/releases/tag/v1.39.0)| +|Microsoft Windows|Monitor Windows hosts and apps!|May
2023|[v1.39](https://github.com/netdata/netdata/releases/tag/v1.39.0#v1390-windows-support)| +|Virtual Nodes|Go collectors can now be assigned to virtual nodes!|May
2023|[v1.39](https://github.com/netdata/netdata/releases/tag/v1.39.0#v1390-virtual-nodes-and-custom-labels)| +|DBENGINE v2|Faster, more reliable, far more scalable!|Feb
2023|[v1.38](https://github.com/netdata/netdata/releases/tag/v1.38.0)| +|Netdata Functions|Netdata beyond metrics! Monitoring anything!|Feb
2023|[v1.38](https://github.com/netdata/netdata/releases/tag/v1.38.0#v1380-functions)| +|Events Feed|Live feed of events about topology changes and alerts.|Feb
2023|[v1.38](https://github.com/netdata/netdata/releases/tag/v1.38.0#v1380-feed)| +|Role Based
Access Control|More roles, offering finer control over access to infrastructure.|Feb
2023|[v1.38](https://github.com/netdata/netdata/releases/tag/v1.38.0#v1380-rbac)| +|Infinite Scalability|Streaming compression. Replication. Active-active clustering.|Nov
2022|[v1.37](https://github.com/netdata/netdata/releases/tag/v1.37.0)| +|Grafana Plugin|Netdata Cloud as a data source for Grafana.|Nov
2022|[v1.37](https://github.com/netdata/netdata/releases/tag/v1.37.0#v1370-grafana-plugin)| +|PostgreSQL|Completely rewritten, to reveal all the info, even at the table level.|Nov
2022|[v1.37](https://github.com/netdata/netdata/releases/tag/v1.37.0#v1370-postgressql)| +|Metrics Correlations|Advanced algorithms to find the needle in the haystack.|Aug
2022|[v1.36](https://github.com/netdata/netdata/releases/tag/v1.36.0)| +|Database Tiering|Netdata gets unlimited retention!|Aug
2022|[v1.36](https://github.com/netdata/netdata/releases/tag/v1.36.0#v1360-tiering)| +|Kubernetes|Monitor your kubernetes workloads.|Aug
2022|[v1.36](https://github.com/netdata/netdata/releases/tag/v1.36.0#v1360-kubernetes)| +|Machine Learning|Anomaly Rate information on every chart.|Aug
2022|[v1.36](https://github.com/netdata/netdata/releases/tag/v1.36.0#v1360-anomaly-rate-on-charts)| +|Machine Learning|Anomaly Advisor! Bottom up unsupervised anomaly detection.|Jun
2022|[v1.35](https://github.com/netdata/netdata/releases/tag/v1.35.0#v1350-anomaly-advisor-ml)| +|Machine Learning|Metrics Correlation on the Agent.|Jun
2022|[v1.35](https://github.com/netdata/netdata/releases/tag/v1.35.0#v1350-metric-correlation-agent)|
From 4774907feb4528264a607164879ed2431f1a94bb Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Tue, 25 Jul 2023 07:20:22 -0400 Subject: [PATCH 23/55] Add schema for deployment integrations and centralize integrations schemas. (#15509) * Relocate collector schemas to integrations dir. All the integrations schemas will be stored here. * Add schema for deployment integrations. Also splits a couple of shared parts to a separate schema file, and adds a basic deploy.yaml file with example deployments. * Expanded platform_info key description in schema. * Add docker info to distros.yml. --- .github/data/distros.yml | 10 ++ integrations/deploy.yaml | 48 ++++++++ .../schemas/collection-multi-module.json | 0 .../schemas/collection-single-module.json | 37 +----- integrations/schemas/deploy.json | 107 ++++++++++++++++++ integrations/schemas/shared.json | 45 ++++++++ 6 files changed, 212 insertions(+), 35 deletions(-) create mode 100644 integrations/deploy.yaml rename collectors/metadata/schemas/multi-module.json => integrations/schemas/collection-multi-module.json (100%) rename collectors/metadata/schemas/single-module.json => integrations/schemas/collection-single-module.json (94%) create mode 100644 integrations/schemas/deploy.json create mode 100644 integrations/schemas/shared.json diff --git a/.github/data/distros.yml b/.github/data/distros.yml index c36cb1ef9b1740..ba83db7076fc3a 100644 --- a/.github/data/distros.yml +++ b/.github/data/distros.yml @@ -237,3 +237,13 @@ include: packages: <<: *ubuntu_packages repo_distro: ubuntu/focal +no_include: # Info for platforms not covered in CI + - distro: docker + version: latest + packages: + arches: + - linux/i386 + - linux/amd64 + - linux/arm/v7 + - linux/arm64 + - linux/ppc64le diff --git a/integrations/deploy.yaml b/integrations/deploy.yaml new file mode 100644 index 00000000000000..b597e3c952aecf --- /dev/null +++ b/integrations/deploy.yaml @@ -0,0 +1,48 @@ +- &linux + id: deploy-linux-generic + meta: &linux_meta + name: Linux + link: '' + categories: + - deploy.operating-systems + icon_filename: '' + keywords: + - linux + description: 'Run the following command on your node to install and claim Netdata:"r' + methods: + - method: wget + commands: + - channel: nightly + command: > + wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh + --nightly-channel --claim-token {% claim_token %} --claim-url {% claim_url %} + - channel: stable + command: > + wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh + --stable-channel --claim-token {% claim_token %} --claim-url {% claim_url %} + - method: curl + commands: + - channel: nightly + command: > + curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh + --nightly-channel --claim-token {% claim_token %} --claim-url {% claim_url %} + - channel: stable + command: > + curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh + --stable-channel --claim-token {% claim_token %} --claim-url {% claim_url %} + additional_info: &ref_containers > + Did you know you can also deploy Netdata on your OS using Kubernetes or Docker? + related_resources: {} + platform_info: + group: '' + distro: '' +- <<: *linux + id: deploy-ubuntu + meta: + <<: *linux_meta + name: Ubuntu + link: https://ubuntu.com/ + icon: '' + platform_info: + group: 'include' + distro: 'ubuntu' diff --git a/collectors/metadata/schemas/multi-module.json b/integrations/schemas/collection-multi-module.json similarity index 100% rename from collectors/metadata/schemas/multi-module.json rename to integrations/schemas/collection-multi-module.json diff --git a/collectors/metadata/schemas/single-module.json b/integrations/schemas/collection-single-module.json similarity index 94% rename from collectors/metadata/schemas/single-module.json rename to integrations/schemas/collection-single-module.json index de441e075bac49..3893249f8e2018 100644 --- a/collectors/metadata/schemas/single-module.json +++ b/integrations/schemas/collection-single-module.json @@ -15,43 +15,10 @@ "description": "Module name (e.g. apache, /proc/stat, httpcheck). It usually has the same name as the module configuration file (external plugin) or the section name in netdata.conf (internal plugin)." }, "monitored_instance": { - "type": "object", - "description": "Information about the monitored instance (metrics source).", - "properties": { - "name": { - "description": "Metrics source name (e.g. VerneMQ, Network interfaces, Files and directories). Use official spelling for applications.", - "type": "string" - }, - "link": { - "description": "Link to the monitored instance official website if any.", - "type": "string" - }, - "categories": { - "type": "array", - "description": "Category IDs that this integration falls into. IDs can be found in integrations/categories.yaml", - "items": { - "type": "string", - "description": "String defining integration category" - } - }, - "icon_filename": { - "type": "string", - "description": "The filename of the integration's icon, as sourced from https://github.com/netdata/website/tree/master/themes/tailwind/static/img." - } - }, - "required": [ - "name", - "link", - "categories", - "icon_filename" - ] + "$ref": "./shared.json#/$defs/instance" }, "keywords": { - "type": "array", - "description": "An array of terms related to the integration.", - "items": { - "type": "string" - } + "$ref": "./shared.json#/$defs/keywords" }, "related_resources": { "type": "object", diff --git a/integrations/schemas/deploy.json b/integrations/schemas/deploy.json new file mode 100644 index 00000000000000..79fb81c9261982 --- /dev/null +++ b/integrations/schemas/deploy.json @@ -0,0 +1,107 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "array", + "title": "Netdata deployment information meta.", + "items": { + "type": "object", + "description": "Individual entries for deployment information.", + "properties" :{ + "id": { + "type": "string", + "description": "A unique ID for this integration." + }, + "meta": { + "$ref": "./shared.json#/$defs/instance" + }, + "keywords": { + "$ref": "./shared.json#/$defs/keywords" + }, + "description": { + "type": "string", + "description": "Describes basic information about how to deploy on this platform." + }, + "methods": { + "type": "array", + "description": "Describes the various ways to deploy on this platform.", + "items": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "The name of the installation method." + }, + "commands": { + "type": "array", + "items": { + "type": "object", + "properties": { + "channel": { + "type": "string", + "description": "The release channel that this command is used for.", + "enum": [ + "nightly", + "stable" + ] + }, + "command": { + "type": "string", + "description": "The command to run for installing using this method." + } + }, + "required": [ + "channel", + "command" + ] + } + }, + "required": [ + "method", + "commands" + ] + } + } + }, + "additional_info": { + "type": "string", + "description": "Any additional information about this platform." + }, + "related_resources": { + "type": "object", + "description": "TBD" + }, + "platform_info": { + "type": "object", + "description": "References what platform this deployment info is for. In the parsed output, this will be replaced with a markdown string covering basic support information for this platform.", + "properties": { + "group": { + "type": "string", + "description": "Identifies the group that the platform is in. 'include' is used for platforms that are in auto-generated CI. 'no_include' is used for platforms that are not in auto-generated CI. An empty string indicates no associated platform information.", + "enum": [ + "include", + "no_include", + "" + ] + }, + "distro": { + "type": "string", + "description": "Identifies the platform within the group, based on the value of the 'distro' key." + } + }, + "required": [ + "group", + "distro" + ] + } + }, + "required": [ + "id", + "meta", + "keywords", + "description", + "methods", + "additional_info", + "related_resources", + "platform_info" + ] + } +} diff --git a/integrations/schemas/shared.json b/integrations/schemas/shared.json new file mode 100644 index 00000000000000..776872ae76810d --- /dev/null +++ b/integrations/schemas/shared.json @@ -0,0 +1,45 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Shared definitions used for all integrations schemas.", + "$defs": { + "instance": { + "type": "object", + "description": "Information about the integration instance.", + "properties": { + "name": { + "description": "Integration display name. Use official spelling for applications.", + "type": "string" + }, + "link": { + "description": "Link to the instance official website if any.", + "type": "string" + }, + "categories": { + "type": "array", + "description": "Category IDs that this integration falls into. IDs can be found in integrations/categories.yaml", + "items": { + "type": "string", + "description": "String defining integration category" + } + }, + "icon_filename": { + "type": "string", + "description": "The filename of the integration's icon, as sourced from https://github.com/netdata/website/tree/master/themes/tailwind/static/img." + } + }, + "required": [ + "name", + "link", + "categories", + "icon_filename" + ] + }, + "keywords": { + "type": "array", + "description": "An array of terms related to the integration.", + "items": { + "type": "string" + } + } + } +} From 906be52c042362114b0da42f9625d9011f238858 Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Tue, 25 Jul 2023 07:21:55 -0400 Subject: [PATCH 24/55] Fill in metadata for idlejitter plugin. (#15506) * Fill in metadata for idlejitter plugin. * Fix typos. * Apply suggestions from code review Co-authored-by: Shyam Sreevalsan --------- Co-authored-by: Shyam Sreevalsan --- collectors/idlejitter.plugin/metadata.yaml | 60 +++++++++++++--------- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/collectors/idlejitter.plugin/metadata.yaml b/collectors/idlejitter.plugin/metadata.yaml index b3f255b9deaf32..b489125d2d6a83 100644 --- a/collectors/idlejitter.plugin/metadata.yaml +++ b/collectors/idlejitter.plugin/metadata.yaml @@ -2,31 +2,38 @@ meta: plugin_name: idlejitter.plugin module_name: idlejitter.plugin monitored_instance: - name: IdleJitter + name: Idle OS Jitter link: '' categories: - - data-collection.synthetic-checks + - data-collection.synthetic-checks icon_filename: 'syslog.png' related_resources: integrations: list: [] info_provided_to_referring_integrations: description: '' - keywords: [] + keywords: + - latency + - jitter most_popular: false overview: data_collection: - metrics_description: 'Monitor IdleJitter performance for optimal system idle process operations. Monitor CPU idle times, wake-ups, and power states to optimize system resource usage.' - method_description: '' + metrics_description: > + Monitor delays in timing for user processes caused by scheduling limitations to optimize the system to run + latency sensitive applications with minimal jitter, improving consistency and quality of service. + method_description: > + A thread is spawned that requests to sleep for fixed amount of time. When the system wakes it up, it + measures how many microseconds have passed. The difference between the requested and the actual duration of + the sleep, is the idle jitter. This is done dozens of times per second to ensure we have a representative sample. supported_platforms: include: [] exclude: [] - multi_instance: true + multi_instance: false additional_permissions: description: '' default_behavior: auto_detection: - description: '' + description: 'This integration will run by default on all supported systems.' limits: description: '' performance_impact: @@ -36,14 +43,21 @@ setup: list: [] configuration: file: - name: '' + name: 'netdata.conf' + section: 'plugin:idlejitter' description: '' options: - description: '' + description: > + This integration only supports a single configuration option, and most users will not need to change it. folding: title: '' - enabled: true - list: [] + enabled: false + list: + - name: loop time in ms + description: > + Specifies the target time for the data collection thread to sleep, measured in miliseconds. + default: 20 + required: false examples: folding: enabled: true @@ -60,15 +74,15 @@ metrics: description: "" availability: [] scopes: - - name: global - description: "" - labels: [] - metrics: - - name: system.idlejitter - description: CPU Idle Jitter - unit: "microseconds lost/s" - chart_type: line - dimensions: - - name: min - - name: max - - name: average + - name: global + description: "" + labels: [] + metrics: + - name: system.idlejitter + description: CPU Idle Jitter + unit: "microseconds lost/s" + chart_type: line + dimensions: + - name: min + - name: max + - name: average From 44925ffbe756d6d906a80d7bdfdff1573b82b6ed Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Tue, 25 Jul 2023 14:42:35 +0300 Subject: [PATCH 25/55] Update README.md --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e90679f3e5e5de..e74a298821d34c 100644 --- a/README.md +++ b/README.md @@ -386,14 +386,20 @@ Yes, you can!
Click to see detailed answer ...  
 
-We suggest the following: +Netdata has been designed to spread disk writes across time. Each metric is flushed to disk every 17 minutes, but metrics are flushed evenly across time, at an almost constant rate. Also, metrics are packed into bigger blocks we call `extents` and are compressed with LZ4 before saving them, to minimize the number of I/O operations made. + +Single nodes Agents (not Parents), you should have a constant rate of about 50 KiB/s or less, with some spikes above that every minute (flushing of tier 1) and higher spikes every hour (flushing of tier 2). + +Health Alerts and Machine-Learning run queries to evaluate their expressions and learn from the metric patterns. These are also spread over time, so there should be an almost constant read rate too. + +To make Netdata not use the disks at all, we suggest the following: 1. Use database mode `alloc` or `ram` to disable writing metric data to disk. 2. Configure streaming to push in real-time all metrics to a Netdata Parent. The Netdata Parent will maintain metrics on disk for this node. 3. Disable ML and health on this node. The Netdata Parent will do them for this node. 4. Use the Netdata Parent to access the dashboard. -Using the above, the Netdata Agent on your production system will not need a disk. +Using the above, the Netdata Agent on your production system will not use a disk.  
 
From 529448e35bddc30f584a7ce999d97f304525bc7c Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Tue, 25 Jul 2023 14:43:32 +0300 Subject: [PATCH 26/55] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e74a298821d34c..353ccb938dec21 100644 --- a/README.md +++ b/README.md @@ -388,7 +388,7 @@ Yes, you can! Netdata has been designed to spread disk writes across time. Each metric is flushed to disk every 17 minutes, but metrics are flushed evenly across time, at an almost constant rate. Also, metrics are packed into bigger blocks we call `extents` and are compressed with LZ4 before saving them, to minimize the number of I/O operations made. -Single nodes Agents (not Parents), you should have a constant rate of about 50 KiB/s or less, with some spikes above that every minute (flushing of tier 1) and higher spikes every hour (flushing of tier 2). +Single node Agents (not Parents), you should have a constant rate of about 50 KiB/s or less, with some spikes above that every minute (flushing of tier 1) and higher spikes every hour (flushing of tier 2). Health Alerts and Machine-Learning run queries to evaluate their expressions and learn from the metric patterns. These are also spread over time, so there should be an almost constant read rate too. From 3afd18f8c2df4e72fa4ac0dc608efbcaba8c5d56 Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Tue, 25 Jul 2023 14:44:56 +0300 Subject: [PATCH 27/55] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 353ccb938dec21..465bb1e38b231e 100644 --- a/README.md +++ b/README.md @@ -388,9 +388,9 @@ Yes, you can! Netdata has been designed to spread disk writes across time. Each metric is flushed to disk every 17 minutes, but metrics are flushed evenly across time, at an almost constant rate. Also, metrics are packed into bigger blocks we call `extents` and are compressed with LZ4 before saving them, to minimize the number of I/O operations made. -Single node Agents (not Parents), you should have a constant rate of about 50 KiB/s or less, with some spikes above that every minute (flushing of tier 1) and higher spikes every hour (flushing of tier 2). +Single node Agents (not Parents), should have a constant rate of about 50 KiB/s or less, with some spikes above that every minute (flushing of tier 1) and higher spikes every hour (flushing of tier 2). -Health Alerts and Machine-Learning run queries to evaluate their expressions and learn from the metric patterns. These are also spread over time, so there should be an almost constant read rate too. +Health Alerts and Machine-Learning run queries to evaluate their expressions and learn from the metrics' patterns. These are also spread over time, so there should be an almost constant read rate too. To make Netdata not use the disks at all, we suggest the following: From 4ad42d54e4046cdadc3341d35e59de25bf802513 Mon Sep 17 00:00:00 2001 From: Ilya Mashchenko Date: Tue, 25 Jul 2023 14:50:45 +0300 Subject: [PATCH 28/55] fix collector multi schema (#15520) --- integrations/schemas/collection-multi-module.json | 2 +- integrations/schemas/deploy.json | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/integrations/schemas/collection-multi-module.json b/integrations/schemas/collection-multi-module.json index db8606b2cab5c4..4927fb9c491cac 100644 --- a/integrations/schemas/collection-multi-module.json +++ b/integrations/schemas/collection-multi-module.json @@ -9,7 +9,7 @@ "type": "array", "description": "A list of single module templates", "items": { - "$ref": "./single-module.json" + "$ref": "./collection-single-module.json" } } }, diff --git a/integrations/schemas/deploy.json b/integrations/schemas/deploy.json index 79fb81c9261982..cda40fffee699f 100644 --- a/integrations/schemas/deploy.json +++ b/integrations/schemas/deploy.json @@ -5,7 +5,7 @@ "items": { "type": "object", "description": "Individual entries for deployment information.", - "properties" :{ + "properties": { "id": { "type": "string", "description": "A unique ID for this integration." @@ -53,12 +53,12 @@ "command" ] } - }, - "required": [ - "method", - "commands" - ] - } + } + }, + "required": [ + "method", + "commands" + ] } }, "additional_info": { From 2d23be7b8fff7bc56e431398cf028025edfa7099 Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Tue, 25 Jul 2023 18:01:34 +0300 Subject: [PATCH 29/55] wait for node_id while claiming (#15526) --- claim/claim.c | 8 ++++---- database/sqlite/sqlite_functions.c | 29 +++++++++++++++++------------ 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/claim/claim.c b/claim/claim.c index a30fd0dab1643d..a441cda4c6d43c 100644 --- a/claim/claim.c +++ b/claim/claim.c @@ -409,12 +409,12 @@ int api_v2_claim(struct web_client *w, char *url) { int ms = 0; do { status = cloud_status(); - if (status == CLOUD_STATUS_ONLINE) + if (status == CLOUD_STATUS_ONLINE && __atomic_load_n(&localhost->node_id, __ATOMIC_RELAXED)) break; - sleep_usec(100 * USEC_PER_MS); - ms += 100; - } while (ms < 5000); + sleep_usec(50 * USEC_PER_MS); + ms += 50; + } while (ms < 10000); } break; diff --git a/database/sqlite/sqlite_functions.c b/database/sqlite/sqlite_functions.c index d7c2809915897b..af7f8147f50257 100644 --- a/database/sqlite/sqlite_functions.c +++ b/database/sqlite/sqlite_functions.c @@ -593,15 +593,20 @@ static inline void set_host_node_id(RRDHOST *host, uuid_t *node_id) if (unlikely(!node_id)) { freez(host->node_id); - host->node_id = NULL; + __atomic_store_n(&host->node_id, NULL, __ATOMIC_RELAXED); return; } struct aclk_sync_host_config *wc = host->aclk_sync_host_config; - if (unlikely(!host->node_id)) - host->node_id = mallocz(sizeof(*host->node_id)); - uuid_copy(*(host->node_id), *node_id); + if (unlikely(!host->node_id)) { + uuid_t *t = mallocz(sizeof(*host->node_id)); + uuid_copy(*t, *node_id); + __atomic_store_n(&host->node_id, t, __ATOMIC_RELAXED); + } + else { + uuid_copy(*(host->node_id), *node_id); + } if (unlikely(!wc)) sql_create_aclk_table(host, &host->host_uuid, node_id); @@ -617,6 +622,14 @@ int update_node_id(uuid_t *host_id, uuid_t *node_id) RRDHOST *host = NULL; int rc = 2; + char host_guid[GUID_LEN + 1]; + uuid_unparse_lower(*host_id, host_guid); + rrd_wrlock(); + host = rrdhost_find_by_guid(host_guid); + if (likely(host)) + set_host_node_id(host, node_id); + rrd_unlock(); + if (unlikely(!db_meta)) { if (default_rrd_memory_mode == RRD_MEMORY_MODE_DBENGINE) error_report("Database has not been initialized"); @@ -646,14 +659,6 @@ int update_node_id(uuid_t *host_id, uuid_t *node_id) error_report("Failed to store node instance information, rc = %d", rc); rc = sqlite3_changes(db_meta); - char host_guid[GUID_LEN + 1]; - uuid_unparse_lower(*host_id, host_guid); - rrd_wrlock(); - host = rrdhost_find_by_guid(host_guid); - if (likely(host)) - set_host_node_id(host, node_id); - rrd_unlock(); - failed: if (unlikely(sqlite3_finalize(res) != SQLITE_OK)) error_report("Failed to finalize the prepared statement when storing node instance information"); From fd1edfb699ea2572046a8f7189b6f389a3e22840 Mon Sep 17 00:00:00 2001 From: Emmanuel Vasilakis Date: Tue, 25 Jul 2023 19:53:28 +0300 Subject: [PATCH 30/55] Allow to create alert hashes with --disable-cloud (#15519) * check for alarm ids with zero hashes * use zeroblob(16) --- database/rrdcalc.c | 10 ++- database/sqlite/sqlite_health.c | 133 +++++++++++++++++++++++++++++++- database/sqlite/sqlite_health.h | 1 + 3 files changed, 139 insertions(+), 5 deletions(-) diff --git a/database/rrdcalc.c b/database/rrdcalc.c index 4e9873140de865..8e41df8d650f2a 100644 --- a/database/rrdcalc.c +++ b/database/rrdcalc.c @@ -82,10 +82,14 @@ uint32_t rrdcalc_get_unique_id(RRDHOST *host, STRING *chart, STRING *name, uint3 alarm_id = sql_get_alarm_id(host, chart, name, next_event_id, config_hash_id); if (!alarm_id) { - if (unlikely(!host->health_log.next_alarm_id)) - host->health_log.next_alarm_id = (uint32_t)now_realtime_sec(); + //check possible stored config hash as zeroes or null + alarm_id = sql_get_alarm_id_check_zero_hash(host, chart, name, next_event_id, config_hash_id); + if (!alarm_id) { + if (unlikely(!host->health_log.next_alarm_id)) + host->health_log.next_alarm_id = (uint32_t)now_realtime_sec(); - alarm_id = host->health_log.next_alarm_id++; + alarm_id = host->health_log.next_alarm_id++; + } } } diff --git a/database/sqlite/sqlite_health.c b/database/sqlite/sqlite_health.c index 151938396de403..2363fe201fbfe1 100644 --- a/database/sqlite/sqlite_health.c +++ b/database/sqlite/sqlite_health.c @@ -1215,7 +1215,7 @@ int sql_store_alert_config_hash(uuid_t *hash_id, struct alert_config *cfg) if cloud is disabled or openssl is not available (which will prevent cloud connectivity) skip hash calculations */ -#if !defined DISABLE_CLOUD && defined ENABLE_HTTPS +#if defined ENABLE_HTTPS #define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (string2str(v)), string_strlen((v))) : EVP_DigestUpdate(evpctx, "", 1)) #endif int alert_hash_and_store_config( @@ -1223,7 +1223,7 @@ int alert_hash_and_store_config( struct alert_config *cfg, int store_hash) { -#if !defined DISABLE_CLOUD && defined ENABLE_HTTPS +#if defined ENABLE_HTTPS EVP_MD_CTX *evpctx; unsigned char hash_value[EVP_MAX_MD_SIZE]; unsigned int hash_len; @@ -1729,6 +1729,135 @@ uint32_t sql_get_alarm_id(RRDHOST *host, STRING *chart, STRING *name, uint32_t * return alarm_id; } +#define SQL_UPDATE_ALARM_ID_WITH_CONFIG_HASH "update health_log set config_hash_id = @config_hash_id where host_id = @host_id and alarm_id = @alarm_id and health_log_id = @health_log_id" +void sql_update_alarm_with_config_hash(RRDHOST *host, uint32_t alarm_id, uint64_t health_log_id, uuid_t *config_hash_id) +{ + int rc = 0; + sqlite3_stmt *res = NULL; + + rc = sqlite3_prepare_v2(db_meta, SQL_UPDATE_ALARM_ID_WITH_CONFIG_HASH, -1, &res, 0); + if (rc != SQLITE_OK) { + error_report("Failed to prepare statement when trying to update an alarm id with a config hash."); + return; + } + + rc = sqlite3_bind_blob(res, 1, config_hash_id, sizeof(*config_hash_id), SQLITE_STATIC); + if (unlikely(rc != SQLITE_OK)) { + error_report("Failed to bind config_hash_id parameter for SQL_UPDATE_ALARM_ID_WITH_CONFIG_HASH."); + sqlite3_finalize(res); + return; + } + + rc = sqlite3_bind_blob(res, 2, &host->host_uuid, sizeof(host->host_uuid), SQLITE_STATIC); + if (unlikely(rc != SQLITE_OK)) { + error_report("Failed to bind host_id parameter for SQL_UPDATE_ALARM_ID_WITH_CONFIG_HASH."); + sqlite3_finalize(res); + return; + } + + rc = sqlite3_bind_int64(res, 3, (sqlite3_int64) alarm_id); + if (unlikely(rc != SQLITE_OK)) { + error_report("Failed to bind alarm_id parameter for SQL_GET_ALARM_ID."); + sqlite3_finalize(res); + return; + } + + rc = sqlite3_bind_int64(res, 4, (sqlite3_int64) health_log_id); + if (unlikely(rc != SQLITE_OK)) { + error_report("Failed to bind alarm_id parameter for SQL_GET_ALARM_ID."); + sqlite3_finalize(res); + return; + } + + rc = execute_insert(res); + if (unlikely(rc != SQLITE_DONE)) { + error_report("Failed to execute SQL_UPDATE_ALARM_ID_WITH_CONFIG_HASH, rc = %d", rc); + rc = sqlite3_finalize(res); + if (unlikely(rc != SQLITE_OK)) + error_report("Failed to reset statement to update health log detail table with config hash ids, rc = %d", rc); + return; + } +} + +#define SQL_GET_ALARM_ID_CHECK_ZERO_HASH "select alarm_id, health_log_id from health_log where host_id = @host_id and chart = @chart and name = @name and (config_hash_id is null or config_hash_id = zeroblob(16))" +uint32_t sql_get_alarm_id_check_zero_hash(RRDHOST *host, STRING *chart, STRING *name, uint32_t *next_event_id, uuid_t *config_hash_id) +{ + int rc = 0; + sqlite3_stmt *res = NULL; + uint32_t alarm_id = 0; + uint64_t health_log_id = 0; + + rc = sqlite3_prepare_v2(db_meta, SQL_GET_ALARM_ID_CHECK_ZERO_HASH, -1, &res, 0); + if (rc != SQLITE_OK) { + error_report("Failed to prepare statement when trying to get an alarm id with zero hash"); + return alarm_id; + } + + rc = sqlite3_bind_blob(res, 1, &host->host_uuid, sizeof(host->host_uuid), SQLITE_STATIC); + if (unlikely(rc != SQLITE_OK)) { + error_report("Failed to bind host_id parameter for SQL_GET_ALARM_ID_CHECK_ZERO_HASH."); + sqlite3_finalize(res); + return alarm_id; + } + + rc = sqlite3_bind_string_or_null(res, chart, 2); + if (unlikely(rc != SQLITE_OK)) { + error_report("Failed to bind char parameter for SQL_GET_ALARM_ID_CHECK_ZERO_HASH."); + sqlite3_finalize(res); + return alarm_id; + } + + rc = sqlite3_bind_string_or_null(res, name, 3); + if (unlikely(rc != SQLITE_OK)) { + error_report("Failed to bind name parameter for SQL_GET_ALARM_ID_CHECK_ZERO_HASH."); + sqlite3_finalize(res); + return alarm_id; + } + + while (sqlite3_step_monitored(res) == SQLITE_ROW) { + alarm_id = (uint32_t) sqlite3_column_int64(res, 0); + health_log_id = (uint64_t) sqlite3_column_int64(res, 1); + } + + rc = sqlite3_finalize(res); + if (unlikely(rc != SQLITE_OK)) + error_report("Failed to finalize the statement while getting an alarm id."); + + if (alarm_id) { + sql_update_alarm_with_config_hash(host, alarm_id, health_log_id, config_hash_id); + + rc = sqlite3_prepare_v2(db_meta, SQL_GET_EVENT_ID, -1, &res, 0); + if (rc != SQLITE_OK) { + error_report("Failed to prepare statement when trying to get an event id"); + return alarm_id; + } + + rc = sqlite3_bind_int64(res, 1, (sqlite3_int64) health_log_id); + if (unlikely(rc != SQLITE_OK)) { + error_report("Failed to bind host_id parameter for SQL_GET_EVENT_ID."); + sqlite3_finalize(res); + return alarm_id; + } + + rc = sqlite3_bind_int64(res, 2, (sqlite3_int64) alarm_id); + if (unlikely(rc != SQLITE_OK)) { + error_report("Failed to bind char parameter for SQL_GET_EVENT_ID."); + sqlite3_finalize(res); + return alarm_id; + } + + while (sqlite3_step_monitored(res) == SQLITE_ROW) { + *next_event_id = (uint32_t) sqlite3_column_int64(res, 0); + } + + rc = sqlite3_finalize(res); + if (unlikely(rc != SQLITE_OK)) + error_report("Failed to finalize the statement while getting an alarm id."); + } + + return alarm_id; +} + #define SQL_GET_ALARM_ID_FROM_TRANSITION_ID "SELECT hld.alarm_id, hl.host_id, hl.chart_context FROM " \ "health_log_detail hld, health_log hl WHERE hld.transition_id = @transition_id " \ "and hld.health_log_id = hl.health_log_id" diff --git a/database/sqlite/sqlite_health.h b/database/sqlite/sqlite_health.h index 014b9b8989503e..3aebb94b7cc584 100644 --- a/database/sqlite/sqlite_health.h +++ b/database/sqlite/sqlite_health.h @@ -19,6 +19,7 @@ int sql_health_get_last_executed_event(RRDHOST *host, ALARM_ENTRY *ae, RRDCALC_S void sql_health_alarm_log2json(RRDHOST *host, BUFFER *wb, uint32_t after, char *chart); int health_migrate_old_health_log_table(char *table); uint32_t sql_get_alarm_id(RRDHOST *host, STRING *chart, STRING *name, uint32_t *next_event_id, uuid_t *config_hash_id); +uint32_t sql_get_alarm_id_check_zero_hash(RRDHOST *host, STRING *chart, STRING *name, uint32_t *next_event_id, uuid_t *config_hash_id); void sql_alert_transitions( DICTIONARY *nodes, time_t after, From 00aa11bbfb077b9a1478dbd306aea5baf82c328d Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Tue, 25 Jul 2023 12:59:36 -0400 Subject: [PATCH 31/55] Add quick_start key to deploy schema. (#15522) Merging this one as well. --- integrations/deploy.yaml | 2 ++ integrations/schemas/deploy.json | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/integrations/deploy.yaml b/integrations/deploy.yaml index b597e3c952aecf..8747a2025c1d6f 100644 --- a/integrations/deploy.yaml +++ b/integrations/deploy.yaml @@ -36,6 +36,7 @@ platform_info: group: '' distro: '' + quick_start: 1 - <<: *linux id: deploy-ubuntu meta: @@ -46,3 +47,4 @@ platform_info: group: 'include' distro: 'ubuntu' + quick_start: -1 diff --git a/integrations/schemas/deploy.json b/integrations/schemas/deploy.json index cda40fffee699f..fc07c6a334d86e 100644 --- a/integrations/schemas/deploy.json +++ b/integrations/schemas/deploy.json @@ -91,6 +91,10 @@ "group", "distro" ] + }, + "quick_start": { + "type": "integer", + "description": "Indicates where the deploy integration should appear in the add nodes dialogue. A value less than 0 indicates that it should not appear on this dialogue." } }, "required": [ @@ -101,7 +105,8 @@ "methods", "additional_info", "related_resources", - "platform_info" + "platform_info", + "quick_start" ] } } From f577a63ac044e8d4e038eaba526ad83bb5d16e79 Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Tue, 25 Jul 2023 13:10:25 -0400 Subject: [PATCH 32/55] Add a schema for the categories.yaml file. (#15521) --- integrations/categories.yaml | 75 +++++++++++++++++++++++++++- integrations/schemas/categories.json | 53 ++++++++++++++++++++ 2 files changed, 126 insertions(+), 2 deletions(-) create mode 100644 integrations/schemas/categories.json diff --git a/integrations/categories.yaml b/integrations/categories.yaml index fa44d0f340afb6..be95f8ed9d04e1 100644 --- a/integrations/categories.yaml +++ b/integrations/categories.yaml @@ -1,344 +1,415 @@ -- name: deploy +- id: deploy + name: deploy description: "" most_popular: false + priority: -1 children: - id: deploy.operating-systems name: Operating Systems description: "" most_popular: false + priority: -1 children: [] - id: deploy.docker-kubernetes name: Docker & Kubernetes description: "" most_popular: false + priority: -1 children: [] - id: deploy.provisioning-systems parent: deploy name: Provisioning Systems description: "" most_popular: false + priority: -1 children: [] -- name: data-collection +- id: data-collection + name: data-collection description: "" most_popular: false + priority: -1 children: - id: data-collection.other name: Other description: "" most_popular: false + priority: -1 children: [] - id: data-collection.ebpf name: eBPF description: "" most_popular: false + priority: -1 children: [] - id: data-collection.freebsd name: FreeBSD description: "" most_popular: false + priority: -1 children: [] - id: data-collection.containers-and-vms name: Containers and VMs description: "" most_popular: false + priority: -1 children: [] - id: data-collection.database-servers name: Database Servers description: "" most_popular: false + priority: -1 children: [] - id: data-collection.kubernetes name: Kubernetes description: "" most_popular: false + priority: -1 children: [] - id: data-collection.service-discovery-registry name: Service Discovery / Registry description: "" most_popular: false + priority: -1 children: [] - id: data-collection.web-servers-and-web-proxies name: Web Servers and Web Proxies description: "" most_popular: false + priority: -1 children: [] - id: data-collection.cloud-provider-managed name: Cloud Provider Managed description: "" most_popular: false + priority: -1 children: [] - id: data-collection.windows-systems name: Windows Systems description: "" most_popular: false + priority: -1 children: [] - id: data-collection.apm name: APM description: "" most_popular: false + priority: -1 children: [] - id: data-collection.hardware-devices-and-sensors name: Hardware Devices and Sensors description: "" most_popular: false + priority: -1 children: [] - id: data-collection.macos-systems name: macOS Systems description: "" most_popular: false + priority: -1 children: [] - id: data-collection.message-brokers name: Message Brokers description: "" most_popular: false + priority: -1 children: [] - id: data-collection.provisioning-systems name: Provisioning Systems description: "" most_popular: false + priority: -1 children: [] - id: data-collection.search-engines name: Search Engines description: "" most_popular: false + priority: -1 children: [] - id: data-collection.linux-systems name: Linux Systems description: "" most_popular: false + priority: -1 children: - id: data-collection.linux-systems.system-metrics name: System Metrics description: "" most_popular: false + priority: -1 children: [] - id: data-collection.linux-systems.memory-metrics name: Memory Metrics description: "" most_popular: false + priority: -1 children: [] - id: data-collection.linux-systems.cpu-metrics name: CPU Metrics description: "" most_popular: false + priority: -1 children: [] - id: data-collection.linux-systems.pressure-metrics name: Pressure Metrics description: "" most_popular: false + priority: -1 children: [] - id: data-collection.linux-systems.network-metrics name: Network Metrics description: "" most_popular: false + priority: -1 children: [] - id: data-collection.linux-systems.ipc-metrics name: IPC Metrics description: "" most_popular: false + priority: -1 children: [] - id: data-collection.linux-systems.disk-metrics name: Disk Metrics description: "" most_popular: false + priority: -1 children: [] - id: data-collection.linux-systems.firewall-metrics name: Firewall Metrics description: "" most_popular: false + priority: -1 children: [] - id: data-collection.linux-systems.power-supply-metrics name: Power Supply Metrics description: "" most_popular: false + priority: -1 children: [] - id: data-collection.linux-systems.filesystem-metrics name: Filesystem Metrics description: "" most_popular: false + priority: -1 children: - id: data-collection.linux-systems.filesystem-metrics.zfs name: ZFS description: "" most_popular: false + priority: -1 children: [] - id: data-collection.linux-systems.filesystem-metrics.btrfs name: BTRFS description: "" most_popular: false + priority: -1 children: [] - id: data-collection.linux-systems.filesystem-metrics.nfs name: NFS description: "" most_popular: false + priority: -1 children: [] - id: data-collection.linux-systems.kernel-metrics name: Kernel Metrics description: "" most_popular: false + priority: -1 children: [] - id: data-collection.notifications name: Notifications description: "" most_popular: false + priority: -1 children: [] - id: data-collection.networking-stack-and-network-interfaces name: Networking Stack and Network Interfaces description: "" most_popular: false + priority: -1 children: [] - id: data-collection.synthetic-checks name: Synthetic Checks description: "" most_popular: false + priority: -1 children: [] - id: data-collection.ci-cd-systems name: CI/CD Systems description: "" most_popular: false + priority: -1 children: [] - id: data-collection.ups name: UPS description: "" most_popular: false + priority: -1 children: [] - id: data-collection.freebsd-systems name: FreeBSD Systems description: "" most_popular: false + priority: -1 children: [] - id: data-collection.logs-servers name: Logs Servers description: "" most_popular: false + priority: -1 children: [] - id: data-collection.security-systems name: Security Systems description: "" most_popular: false + priority: -1 children: [] - id: data-collection.observability name: Observability description: "" most_popular: false + priority: -1 children: [] - id: data-collection.gaming name: Gaming description: "" most_popular: false + priority: -1 children: [] - id: data-collection.iot-devices name: IoT Devices description: "" most_popular: false + priority: -1 children: [] - id: data-collection.media-streaming-servers name: Media Streaming Servers description: "" most_popular: false + priority: -1 children: [] - id: data-collection.authentication-and-authorization name: Authentication and Authorization description: "" most_popular: false + priority: -1 children: [] - id: data-collection.project-management name: Project Management description: "" most_popular: false + priority: -1 children: [] - id: data-collection.application-servers name: Application Servers description: "" most_popular: false + priority: -1 children: [] - id: data-collection.export name: Export description: "" most_popular: false + priority: -1 children: [] - id: data-collection.dns-and-dhcp-servers name: DNS and DHCP Servers description: "" most_popular: false + priority: -1 children: [] - id: data-collection.mail-servers name: Mail Servers description: "" most_popular: false + priority: -1 children: [] - id: data-collection.processes-and-system-services name: Processes and System Services description: "" most_popular: false + priority: -1 children: [] - id: data-collection.storage-mount-points-and-filesystems name: Storage, Mount Points and Filesystems description: "" most_popular: false + priority: -1 children: [] - id: data-collection.systemd name: Systemd description: "" most_popular: false + priority: -1 children: [] - id: data-collection.telephony-servers name: Telephony Servers description: "" most_popular: false + priority: -1 children: [] - id: data-collection.vpns name: VPNs description: "" most_popular: false + priority: -1 children: [] - id: data-collection.blockchain-servers name: Blockchain Servers description: "" most_popular: false + priority: -1 children: [] - id: data-collection.distributed-computing-systems name: Distributed Computing Systems description: "" most_popular: false + priority: -1 children: [] - id: data-collection.generic-data-collection name: Generic Data Collection description: "" most_popular: false + priority: -1 children: [] - id: data-collection.p2p name: P2P description: "" most_popular: false + priority: -1 children: [] - id: data-collection.snmp-and-networked-devices name: SNMP and Networked Devices description: "" most_popular: false + priority: -1 children: [] - id: data-collection.system-clock-and-ntp name: System Clock and NTP description: "" most_popular: false + priority: -1 children: [] - id: data-collection.nas name: NAS description: "" most_popular: false + priority: -1 children: [] - id: data-collection.api-gateways name: API Gateways description: "" most_popular: false + priority: -1 children: [] - id: data-collection.task-queues name: Task Queues description: "" most_popular: false + priority: -1 children: [] - id: data-collection.ftp-servers name: FTP Servers description: "" most_popular: false + priority: -1 children: [] diff --git a/integrations/schemas/categories.json b/integrations/schemas/categories.json new file mode 100644 index 00000000000000..1814fb3331b58c --- /dev/null +++ b/integrations/schemas/categories.json @@ -0,0 +1,53 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "array", + "title": "Category information for integrations.", + "items": { + "$ref": "#/$defs/category" + }, + "$defs": { + "category": { + "type": "object", + "description": "An entry for a single category.", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "description": "A unique ID for the category. Recommended format is a dot-separated list of categories that are parents of this category, followed by a unique value for this category. Must be URL safe." + }, + "name": { + "type": "string", + "minLength": 1, + "description": "The display name for the category." + }, + "description": { + "type": "string", + "description": "A description of the category." + }, + "most_popular": { + "type": "boolean", + "description": "Indicates if the category should show up in the initial list of categories, or only in the full expanded list." + }, + "priority": { + "type": "integer", + "description": "Indicates sort order for categories that are marked as most popular." + }, + "children": { + "type": "array", + "description": "A list of categories that are children of this category.", + "items": { + "$ref": "#/$defs/category" + } + } + }, + "required": [ + "id", + "name", + "description", + "most_popular", + "priority", + "children" + ] + } + } +} From c2bb105702320499179af3d5dd10b5636b33587d Mon Sep 17 00:00:00 2001 From: Fotis Voutsas Date: Tue, 25 Jul 2023 20:56:03 +0300 Subject: [PATCH 33/55] Python collector yaml updates (#15517) update collector metadata for monit, spigotmc, hddtemp, nsd --- .../python.d.plugin/hddtemp/metadata.yaml | 149 ++++++++-- .../python.d.plugin/monit/metadata.yaml | 265 +++++++++++------- collectors/python.d.plugin/nsd/metadata.yaml | 238 ++++++++++------ .../python.d.plugin/spigotmc/metadata.yaml | 178 +++++++++--- .../python.d.plugin/squid/metadata.yaml | 183 ++++++++---- 5 files changed, 706 insertions(+), 307 deletions(-) diff --git a/collectors/python.d.plugin/hddtemp/metadata.yaml b/collectors/python.d.plugin/hddtemp/metadata.yaml index 4bcad703a316fc..8befeee288f2bd 100644 --- a/collectors/python.d.plugin/hddtemp/metadata.yaml +++ b/collectors/python.d.plugin/hddtemp/metadata.yaml @@ -3,52 +3,141 @@ meta: module_name: hddtemp monitored_instance: name: HDD temperature - link: '' + link: https://linux.die.net/man/8/hddtemp categories: - - data-collection.hardware-devices-and-sensors - icon_filename: 'hard-drive.svg' + - data-collection.hardware-devices-and-sensors + icon_filename: "hard-drive.svg" related_resources: integrations: list: [] info_provided_to_referring_integrations: - description: '' - keywords: [] + description: "" + keywords: + - hardware + - hdd temperature + - disk temperature + - temperature most_popular: false overview: data_collection: - metrics_description: 'Monitor HDD temperature metrics for maintaining optimal hard drive health. Keep tabs on drive temperatures, read/write speeds, and error rates to ensure hard drive longevity.' - method_description: '' + metrics_description: | + This collector monitors disk temperatures. + method_description: | + It uses the `hddtemp` daemon to gather the metrics. supported_platforms: - include: [] + include: + - Linux exclude: [] multi_instance: true additional_permissions: - description: '' + description: "" default_behavior: auto_detection: - description: '' + description: By default, this collector will attempt to connect to the `hddtemp` daemon on `127.0.0.1:7634` limits: - description: '' + description: "" performance_impact: - description: '' + description: "" setup: prerequisites: - list: [] + list: + - title: Run `hddtemp` in daemon mode + description: | + You can execute `hddtemp` in TCP/IP daemon mode by using the `-d` argument. + + So running `hddtemp -d` would run the daemon, by default on port 7634. configuration: file: - name: '' - description: '' + name: "python.d/hddtemp.conf" options: - description: '' + description: | + There are 2 sections: + + * Global variables + * One or more JOBS that can define multiple different instances to monitor. + + The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values. + + Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition. + + Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified. + + By default this collector will try to autodetect disks (autodetection works only for disk which names start with "sd"). However this can be overridden by setting the option `disks` to an array of desired disks. folding: - title: '' + title: "Config options" enabled: true - list: [] + list: + - name: update_every + description: Sets the default data collection frequency. + default_value: 1 + required: false + - name: priority + description: Controls the order of charts at the netdata dashboard. + default_value: 60000 + required: false + - name: autodetection_retry + description: Sets the job re-check interval in seconds. + default_value: 0 + required: false + - name: penalty + description: Indicates whether to apply penalty to update_every in case of failures. + default_value: yes + required: false + - name: name + description: > + Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. + default_value: "local" + required: false + - name: devices + description: Array of desired disks to detect, in case their name doesn't start with `sd`. + default_value: "" + required: false + - name: host + description: The IP or HOSTNAME to connect to. + default_value: "localhost" + required: true + - name: port + description: The port to connect to. + default_value: 7634 + required: false examples: folding: enabled: true - title: '' - list: [] + title: "" + list: + - name: Basic + description: A basic example configuration. + folding: + enabled: false + config: | + localhost: + name: 'local' + host: '127.0.0.1' + port: 7634 + - name: Custom disk names + description: An example defining the disk names to detect. + config: | + localhost: + name: 'local' + host: '127.0.0.1' + port: 7634 + devices: + - customdisk1 + - customdisk2 + - name: Multi-instance + description: | + > **Note**: When you define multiple jobs, their names must be unique. + + Collecting metrics from local and remote instances. + config: | + localhost: + name: 'local' + host: '127.0.0.1' + port: 7634 + + remote_job: + name : 'remote' + host : 'http://192.0.2.1:2812' troubleshooting: problems: list: [] @@ -60,13 +149,13 @@ metrics: description: "" availability: [] scopes: - - name: global - description: "" - labels: [] - metrics: - - name: hddtemp.temperatures - description: Disk Temperatures - unit: "Celsius" - chart_type: line - dimensions: - - name: a dimension per disk + - name: global + description: "These metrics refer to the entire monitored application." + labels: [] + metrics: + - name: hddtemp.temperatures + description: Disk Temperatures + unit: "Celsius" + chart_type: line + dimensions: + - name: a dimension per disk diff --git a/collectors/python.d.plugin/monit/metadata.yaml b/collectors/python.d.plugin/monit/metadata.yaml index 60a87831e5d3c4..44fdb6df3eddc8 100644 --- a/collectors/python.d.plugin/monit/metadata.yaml +++ b/collectors/python.d.plugin/monit/metadata.yaml @@ -3,52 +3,129 @@ meta: module_name: monit monitored_instance: name: Monit - link: '' + link: https://mmonit.com/monit/ categories: - - data-collection.synthetic-checks - icon_filename: 'monit.png' + - data-collection.synthetic-checks + icon_filename: "monit.png" related_resources: integrations: list: [] info_provided_to_referring_integrations: - description: '' - keywords: [] + description: "" + keywords: + - monit + - mmonit + - supervision tool + - monitrc most_popular: false overview: data_collection: - metrics_description: 'Monitor Monit performance for optimal system monitoring operations. Monitor system status, process health, and error rates to maintain system stability.' - method_description: '' + metrics_description: | + This collector monitors Monit targets such as filesystems, directories, files, FIFO pipes and more. + method_description: | + It gathers data from Monit's XML interface. supported_platforms: include: [] exclude: [] multi_instance: true additional_permissions: - description: '' + description: "" default_behavior: auto_detection: - description: '' + description: By default, this collector will attempt to connect to Monit at `http://localhost:2812` limits: - description: '' + description: "" performance_impact: - description: '' + description: "" setup: prerequisites: list: [] configuration: file: - name: '' - description: '' + name: "python.d/monit.conf" options: - description: '' + description: | + There are 2 sections: + + * Global variables + * One or more JOBS that can define multiple different instances to monitor. + + The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values. + + Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition. + + Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified. folding: - title: '' + title: "Config options" enabled: true - list: [] + list: + - name: update_every + description: Sets the default data collection frequency. + default_value: 1 + required: false + - name: priority + description: Controls the order of charts at the netdata dashboard. + default_value: 60000 + required: false + - name: autodetection_retry + description: Sets the job re-check interval in seconds. + default_value: 0 + required: false + - name: penalty + description: Indicates whether to apply penalty to update_every in case of failures. + default_value: yes + required: false + - name: name + description: > + Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. + default_value: "local" + required: false + - name: url + description: The URL to fetch Monit's metrics. + default_value: http://localhost:2812 + required: true + - name: user + description: Username in case the URL is password protected. + default_value: "" + required: false + - name: pass + description: Password in case the URL is password protected. + default_value: "" + required: false examples: folding: enabled: true - title: '' - list: [] + title: "Config" + list: + - name: Basic + description: A basic configuration example. + folding: + enabled: false + config: | + localhost: + name : 'local' + url : 'http://localhost:2812' + - name: Basic Authentication + description: Example using basic username and password in order to authenticate. + config: | + localhost: + name : 'local' + url : 'http://localhost:2812' + user: 'foo' + pass: 'bar' + - name: Multi-instance + description: | + > **Note**: When you define multiple jobs, their names must be unique. + + Collecting metrics from local and remote instances. + config: | + localhost: + name: 'local' + url: 'http://localhost:2812' + + remote_job: + name: 'remote' + url: 'http://192.0.2.1:2812' troubleshooting: problems: list: [] @@ -60,79 +137,79 @@ metrics: description: "" availability: [] scopes: - - name: global - description: "" - labels: [] - metrics: - - name: monit.filesystems - description: Filesystems - unit: "filesystems" - chart_type: line - dimensions: - - name: a dimension per target - - name: monit.directories - description: Directories - unit: "directories" - chart_type: line - dimensions: - - name: a dimension per target - - name: monit.files - description: Files - unit: "files" - chart_type: line - dimensions: - - name: a dimension per target - - name: monit.fifos - description: Pipes (fifo) - unit: "pipes" - chart_type: line - dimensions: - - name: a dimension per target - - name: monit.programs - description: Programs statuses - unit: "programs" - chart_type: line - dimensions: - - name: a dimension per target - - name: monit.services - description: Processes statuses - unit: "processes" - chart_type: line - dimensions: - - name: a dimension per target - - name: monit.process_uptime - description: Processes uptime - unit: "seconds" - chart_type: line - dimensions: - - name: a dimension per target - - name: monit.process_threads - description: Processes threads - unit: "threads" - chart_type: line - dimensions: - - name: a dimension per target - - name: monit.process_childrens - description: Child processes - unit: "children" - chart_type: line - dimensions: - - name: a dimension per target - - name: monit.hosts - description: Hosts - unit: "hosts" - chart_type: line - dimensions: - - name: a dimension per target - - name: monit.host_latency - description: Hosts latency - unit: "milliseconds" - chart_type: line - dimensions: - - name: a dimension per target - - name: monit.networks - description: Network interfaces and addresses - unit: "interfaces" - chart_type: line - dimensions: - - name: a dimension per target + - name: global + description: "These metrics refer to the entire monitored application." + labels: [] + metrics: + - name: monit.filesystems + description: Filesystems + unit: "filesystems" + chart_type: line + dimensions: + - name: a dimension per target + - name: monit.directories + description: Directories + unit: "directories" + chart_type: line + dimensions: + - name: a dimension per target + - name: monit.files + description: Files + unit: "files" + chart_type: line + dimensions: + - name: a dimension per target + - name: monit.fifos + description: Pipes (fifo) + unit: "pipes" + chart_type: line + dimensions: + - name: a dimension per target + - name: monit.programs + description: Programs statuses + unit: "programs" + chart_type: line + dimensions: + - name: a dimension per target + - name: monit.services + description: Processes statuses + unit: "processes" + chart_type: line + dimensions: + - name: a dimension per target + - name: monit.process_uptime + description: Processes uptime + unit: "seconds" + chart_type: line + dimensions: + - name: a dimension per target + - name: monit.process_threads + description: Processes threads + unit: "threads" + chart_type: line + dimensions: + - name: a dimension per target + - name: monit.process_childrens + description: Child processes + unit: "children" + chart_type: line + dimensions: + - name: a dimension per target + - name: monit.hosts + description: Hosts + unit: "hosts" + chart_type: line + dimensions: + - name: a dimension per target + - name: monit.host_latency + description: Hosts latency + unit: "milliseconds" + chart_type: line + dimensions: + - name: a dimension per target + - name: monit.networks + description: Network interfaces and addresses + unit: "interfaces" + chart_type: line + dimensions: + - name: a dimension per target diff --git a/collectors/python.d.plugin/nsd/metadata.yaml b/collectors/python.d.plugin/nsd/metadata.yaml index c465d35bcc2bf7..6aa309554e4c96 100644 --- a/collectors/python.d.plugin/nsd/metadata.yaml +++ b/collectors/python.d.plugin/nsd/metadata.yaml @@ -2,53 +2,125 @@ meta: plugin_name: python.d.plugin module_name: nsd monitored_instance: - name: NSD - link: '' + name: Name Server Daemon + link: https://nsd.docs.nlnetlabs.nl/en/latest/# categories: - - data-collection.dns-and-dhcp-servers - icon_filename: 'nsd.svg' + - data-collection.dns-and-dhcp-servers + icon_filename: "nsd.svg" related_resources: integrations: list: [] info_provided_to_referring_integrations: - description: '' - keywords: [] + description: "" + keywords: + - nsd + - name server daemon most_popular: false overview: data_collection: - metrics_description: 'Monitor NSD performance for optimal authoritative DNS server operations. Monitor query rates, response times, and error rates to ensure reliable DNS service delivery.' - method_description: '' + metrics_description: | + This collector monitors NSD statistics like queries, zones, protocols, query types and more. + method_description: | + It uses the `nsd-control stats_noreset` command to gather metrics. supported_platforms: include: [] exclude: [] - multi_instance: true + multi_instance: false additional_permissions: - description: '' + description: "" default_behavior: auto_detection: - description: '' + description: If permissions are satisfied, the collector will be able to run `nsd-control stats_noreset`, thus collecting metrics. limits: - description: '' + description: "" performance_impact: - description: '' + description: "" setup: prerequisites: - list: [] + list: + - title: Provide Netdata the permissions to run the command + description: | + Netdata must have permissions to run the `nsd-control stats_noreset` command. + + You can: + + - Add "netdata" user to "nsd" group: + ``` + usermod -aG nsd netdata + ``` + - Add Netdata to sudoers + 1. Edit the sudoers file: + ``` + visudo -f /etc/sudoers.d/netdata + ``` + 2. Add the entry: + ``` + Defaults:netdata !requiretty + netdata ALL=(ALL) NOPASSWD: /usr/sbin/nsd-control stats_noreset + ``` + + > Note that you will need to set the `command` option to `sudo /usr/sbin/nsd-control stats_noreset` if you use this method. + configuration: file: - name: '' - description: '' + name: "python.d/nsd.conf" options: - description: '' + description: | + This particular collector does not need further configuration to work if permissions are satisfied, but you can always customize it's data collection behavior. + + There are 2 sections: + + * Global variables + * One or more JOBS that can define multiple different instances to monitor. + + The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values. + + Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition. + + Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified. folding: - title: '' + title: "Config options" enabled: true - list: [] + list: + - name: update_every + description: Sets the default data collection frequency. + default_value: 30 + required: false + - name: priority + description: Controls the order of charts at the netdata dashboard. + default_value: 60000 + required: false + - name: autodetection_retry + description: Sets the job re-check interval in seconds. + default_value: 0 + required: false + - name: penalty + description: Indicates whether to apply penalty to update_every in case of failures. + default_value: yes + required: false + - name: name + description: > + Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed + running at any time. This allows autodetection to try several alternatives and pick the one that works. + default_value: "" + required: false + - name: command + description: The command to run + default_value: "nsd-control stats_noreset" + required: false examples: folding: enabled: true - title: '' - list: [] + title: "Config" + list: + - name: Basic + description: A basic configuration example. + folding: + enabled: false + config: | + local: + name: 'nsd_local' + command: 'nsd-control stats_noreset' troubleshooting: problems: list: [] @@ -60,65 +132,65 @@ metrics: description: "" availability: [] scopes: - - name: global - description: "" - labels: [] - metrics: - - name: nsd.queries - description: queries - unit: "queries/s" - chart_type: line - dimensions: - - name: queries - - name: nsd.zones - description: zones - unit: "zones" - chart_type: stacked - dimensions: - - name: master - - name: slave - - name: nsd.protocols - description: protocol - unit: "queries/s" - chart_type: stacked - dimensions: - - name: udp - - name: udp6 - - name: tcp - - name: tcp6 - - name: nsd.type - description: query type - unit: "queries/s" - chart_type: stacked - dimensions: - - name: A - - name: NS - - name: CNAME - - name: SOA - - name: PTR - - name: HINFO - - name: MX - - name: NAPTR - - name: TXT - - name: AAAA - - name: SRV - - name: ANY - - name: nsd.transfer - description: transfer - unit: "queries/s" - chart_type: stacked - dimensions: - - name: NOTIFY - - name: AXFR - - name: nsd.rcode - description: return code - unit: "queries/s" - chart_type: stacked - dimensions: - - name: NOERROR - - name: FORMERR - - name: SERVFAIL - - name: NXDOMAIN - - name: NOTIMP - - name: REFUSED - - name: YXDOMAIN + - name: global + description: "These metrics refer to the entire monitored application." + labels: [] + metrics: + - name: nsd.queries + description: queries + unit: "queries/s" + chart_type: line + dimensions: + - name: queries + - name: nsd.zones + description: zones + unit: "zones" + chart_type: stacked + dimensions: + - name: master + - name: slave + - name: nsd.protocols + description: protocol + unit: "queries/s" + chart_type: stacked + dimensions: + - name: udp + - name: udp6 + - name: tcp + - name: tcp6 + - name: nsd.type + description: query type + unit: "queries/s" + chart_type: stacked + dimensions: + - name: A + - name: NS + - name: CNAME + - name: SOA + - name: PTR + - name: HINFO + - name: MX + - name: NAPTR + - name: TXT + - name: AAAA + - name: SRV + - name: ANY + - name: nsd.transfer + description: transfer + unit: "queries/s" + chart_type: stacked + dimensions: + - name: NOTIFY + - name: AXFR + - name: nsd.rcode + description: return code + unit: "queries/s" + chart_type: stacked + dimensions: + - name: NOERROR + - name: FORMERR + - name: SERVFAIL + - name: NXDOMAIN + - name: NOTIMP + - name: REFUSED + - name: YXDOMAIN diff --git a/collectors/python.d.plugin/spigotmc/metadata.yaml b/collectors/python.d.plugin/spigotmc/metadata.yaml index 27e3ae3adf9836..89242119a2b356 100644 --- a/collectors/python.d.plugin/spigotmc/metadata.yaml +++ b/collectors/python.d.plugin/spigotmc/metadata.yaml @@ -3,52 +3,138 @@ meta: module_name: spigotmc monitored_instance: name: SpigotMC - link: '' + link: "" categories: - - data-collection.gaming - icon_filename: 'spigot.jfif' + - data-collection.gaming + icon_filename: "spigot.jfif" related_resources: integrations: list: [] info_provided_to_referring_integrations: - description: '' - keywords: [] + description: "" + keywords: + - minecraft server + - spigotmc server + - spigot most_popular: false overview: data_collection: - metrics_description: 'Monitor SpigotMC performance with Netdata for optimal Minecraft server operations. Improve your gaming experience with real-time server performance insights.' - method_description: '' + metrics_description: | + This collector monitors SpigotMC server performance, in the form of ticks per second average, memory utilization, and active users. + method_description: | + It sends the `tps`, `list` and `online` commands to the Server, and gathers the metrics from the responses. supported_platforms: - include: [] + include: + - Linux exclude: [] multi_instance: true additional_permissions: - description: '' + description: "" default_behavior: auto_detection: - description: '' + description: By default, this collector will attempt to connect to a Spigot server running on the local host on port `25575`. limits: - description: '' + description: "" performance_impact: - description: '' + description: "" setup: prerequisites: - list: [] + list: + - title: Enable the Remote Console Protocol + description: | + Under your SpigotMC server's `server.properties` configuration file, you should set `enable-rcon` to `true`. + + This will allow the Server to listen and respond to queries over the rcon protocol. configuration: file: - name: '' - description: '' + name: "python.d/spigotmc.conf" options: - description: '' + description: | + There are 2 sections: + + * Global variables + * One or more JOBS that can define multiple different instances to monitor. + + The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values. + + Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition. + + Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified. folding: - title: '' + title: "Config options" enabled: true - list: [] + list: + - name: update_every + description: Sets the default data collection frequency. + default_value: 1 + required: false + - name: priority + description: Controls the order of charts at the netdata dashboard. + default_value: 60000 + required: false + - name: autodetection_retry + description: Sets the job re-check interval in seconds. + default_value: 0 + required: false + - name: penalty + description: Indicates whether to apply penalty to update_every in case of failures. + default_value: yes + required: false + - name: name + description: > + Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed + running at any time. This allows autodetection to try several alternatives and pick the one that works. + default_value: "" + required: false + - name: host + description: The host's IP to connect to. + default_value: localhost + required: true + - name: port + description: The port the remote console is listening on. + default_value: 25575 + required: true + - name: password + description: Remote console password if any. + default_value: "" + required: false examples: folding: enabled: true - title: '' - list: [] + title: "Config" + list: + - name: Basic + description: A basic configuration example. + folding: + enabled: false + config: | + local: + name: local_server + url: 127.0.0.1 + port: 25575 + - name: Basic Authentication + description: An example using basic password for authentication with the remote console. + config: | + local: + name: local_server_pass + url: 127.0.0.1 + port: 25575 + password: 'foobar' + - name: Multi-instance + description: | + > **Note**: When you define multiple jobs, their names must be unique. + + Collecting metrics from local and remote instances. + config: | + local_server: + name : my_local_server + url : 127.0.0.1 + port: 25575 + + remote_server: + name : another_remote_server + url : 192.0.2.1 + port: 25575 troubleshooting: problems: list: [] @@ -60,29 +146,29 @@ metrics: description: "" availability: [] scopes: - - name: global - description: "" - labels: [] - metrics: - - name: spigotmc.tps - description: Spigot Ticks Per Second - unit: "ticks" - chart_type: line - dimensions: - - name: 1 Minute Average - - name: 5 Minute Average - - name: 15 Minute Average - - name: spigotmc.users - description: Minecraft Users - unit: "users" - chart_type: area - dimensions: - - name: Users - - name: spigotmc.mem - description: Minecraft Memory Usage - unit: "MiB" - chart_type: line - dimensions: - - name: used - - name: allocated - - name: max + - name: global + description: "These metrics refer to the entire monitored application." + labels: [] + metrics: + - name: spigotmc.tps + description: Spigot Ticks Per Second + unit: "ticks" + chart_type: line + dimensions: + - name: 1 Minute Average + - name: 5 Minute Average + - name: 15 Minute Average + - name: spigotmc.users + description: Minecraft Users + unit: "users" + chart_type: area + dimensions: + - name: Users + - name: spigotmc.mem + description: Minecraft Memory Usage + unit: "MiB" + chart_type: line + dimensions: + - name: used + - name: allocated + - name: max diff --git a/collectors/python.d.plugin/squid/metadata.yaml b/collectors/python.d.plugin/squid/metadata.yaml index 02ca9f23abe3b6..9844fead51ae7a 100644 --- a/collectors/python.d.plugin/squid/metadata.yaml +++ b/collectors/python.d.plugin/squid/metadata.yaml @@ -3,53 +3,128 @@ meta: module_name: squid monitored_instance: name: Squid - link: '' + link: "http://www.squid-cache.org/" categories: - - data-collection.web-servers-and-web-proxies - icon_filename: 'squid.png' + - data-collection.web-servers-and-web-proxies + icon_filename: "squid.png" related_resources: integrations: list: [] info_provided_to_referring_integrations: - description: '' - keywords: [] + description: "" + keywords: + - squid + - web delivery + - squid caching proxy most_popular: false overview: data_collection: - metrics_description: 'Monitor Squid metrics with Netdata for efficient caching proxy for the Web performance. Improve your web caching efficiency with real-time Squid metrics.' - method_description: '' + metrics_description: | + This collector monitors statistics about the Squid Clients and Servers, like bandwidth and requests. + method_description: "It collects metrics from the endpoint where Squid exposes its `counters` data." supported_platforms: include: [] exclude: [] multi_instance: true additional_permissions: - description: '' + description: "" default_behavior: auto_detection: - description: '' + description: "By default, this collector will try to autodetect where Squid presents its `counters` data, by trying various configurations." limits: - description: '' + description: "" performance_impact: - description: '' + description: "" setup: prerequisites: - list: [] + list: + - title: Configure Squid's Cache Manager + description: | + Take a look at [Squid's official documentation](https://wiki.squid-cache.org/Features/CacheManager/Index#controlling-access-to-the-cache-manager) on how to configure access to the Cache Manager. configuration: file: - name: '' - description: '' + name: "python.d/squid.conf" options: - description: '' + description: | + There are 2 sections: + + * Global variables + * One or more JOBS that can define multiple different instances to monitor. + + The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values. + + Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition. + + Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified. folding: - title: '' + title: "Config options" enabled: true - list: [] + list: + - name: update_every + description: Sets the default data collection frequency. + default_value: 1 + required: false + - name: priority + description: Controls the order of charts at the netdata dashboard. + default_value: 60000 + required: false + - name: autodetection_retry + description: Sets the job re-check interval in seconds. + default_value: 0 + required: false + - name: penalty + description: Indicates whether to apply penalty to update_every in case of failures. + default_value: yes + required: false + - name: name + description: > + Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. + default_value: "local" + required: false + - name: host + description: The host to connect to. + default_value: "" + required: true + - name: port + description: The port to connect to. + default_value: "" + required: true + - name: request + description: The URL to request from Squid. + default_value: "" + required: true examples: folding: enabled: true - title: '' - list: [] -troubleshooting: + title: "Config" + list: + - name: Basic + description: A basic configuration example. + folding: + enabled: false + config: | + example_job_name: + name: 'local' + host: 'localhost' + port: 3128 + request: 'cache_object://localhost:3128/counters' + - name: Multi-instance + description: | + > **Note**: When you define multiple jobs, their names must be unique. + + Collecting metrics from local and remote instances. + config: | + local_job: + name: 'local' + host: '127.0.0.1' + port: 3128 + request: 'cache_object://127.0.0.1:3128/counters' + + remote_job: + name: 'remote' + host: '192.0.2.1' + port: 3128 + request: 'cache_object://192.0.2.1:3128/counters' problems: list: [] alerts: [] @@ -60,37 +135,37 @@ metrics: description: "" availability: [] scopes: - - name: squid instance - description: "" - labels: [] - metrics: - - name: squid.clients_net - description: Squid Client Bandwidth - unit: "kilobits/s" - chart_type: area - dimensions: - - name: in - - name: out - - name: hits - - name: squid.clients_requests - description: Squid Client Requests - unit: "requests/s" - chart_type: line - dimensions: - - name: requests - - name: hits - - name: errors - - name: squid.servers_net - description: Squid Server Bandwidth - unit: "kilobits/s" - chart_type: area - dimensions: - - name: in - - name: out - - name: squid.servers_requests - description: Squid Server Requests - unit: "requests/s" - chart_type: line - dimensions: - - name: requests - - name: errors + - name: Squid instance + description: "These metrics refer to each monitored Squid instance." + labels: [] + metrics: + - name: squid.clients_net + description: Squid Client Bandwidth + unit: "kilobits/s" + chart_type: area + dimensions: + - name: in + - name: out + - name: hits + - name: squid.clients_requests + description: Squid Client Requests + unit: "requests/s" + chart_type: line + dimensions: + - name: requests + - name: hits + - name: errors + - name: squid.servers_net + description: Squid Server Bandwidth + unit: "kilobits/s" + chart_type: area + dimensions: + - name: in + - name: out + - name: squid.servers_requests + description: Squid Server Requests + unit: "requests/s" + chart_type: line + dimensions: + - name: requests + - name: errors From ee5adbc1a7ba3746d2ac6c8f63c230f075d7ac67 Mon Sep 17 00:00:00 2001 From: Andrew Maguire Date: Tue, 25 Jul 2023 19:28:02 +0100 Subject: [PATCH 34/55] update gitignore to include vscode settings for schema validation (#15508) --- .gitignore | 3 ++- .vscode/settings.json | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index fa93d96fe347d7..7d762ecb726619 100644 --- a/.gitignore +++ b/.gitignore @@ -99,7 +99,8 @@ netdata-coverity-analysis.tgz .cproject/ .idea/ -.vscode/ +.vscode/* +!.vscode/settings.json .project/ .settings/ README diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000000000..5b049719dfb480 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "yaml.schemas": { + "./integrations/schemas/collection-single-module.json": "/metadata.yaml", + "./integrations/schemas/collection-multi-module.json": "/multi_metadata.yaml", + } +} From f3a51f62e02d150c438f5f19315716205b7f5eb8 Mon Sep 17 00:00:00 2001 From: Satyadeep Ashwathnarayana <96257330+sashwathn@users.noreply.github.com> Date: Wed, 26 Jul 2023 01:31:54 +0530 Subject: [PATCH 35/55] Updated all Linux distros, macOS and Docker (#15532) * Updated all Linux distros, macOS and Docker * Updated Docker deployment options and added Kubernetes * Only Intel Based macs supported * Windows deployment added --- integrations/deploy.yaml | 488 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 485 insertions(+), 3 deletions(-) diff --git a/integrations/deploy.yaml b/integrations/deploy.yaml index 8747a2025c1d6f..0c021cd4bfc141 100644 --- a/integrations/deploy.yaml +++ b/integrations/deploy.yaml @@ -5,7 +5,7 @@ link: '' categories: - deploy.operating-systems - icon_filename: '' + icon_filename: 'linux.png' keywords: - linux description: 'Run the following command on your node to install and claim Netdata:"r' @@ -31,7 +31,7 @@ curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --stable-channel --claim-token {% claim_token %} --claim-url {% claim_url %} additional_info: &ref_containers > - Did you know you can also deploy Netdata on your OS using Kubernetes or Docker? + Did you know you can also deploy Netdata on your OS using {% goToCategory categoryId="deploy.docker-kubernetes" %}Kubernetes{% /goToCategory %} or {% goToCategory categoryId="deploy.docker-kubernetes" %}Docker{% /goToCategory %}? related_resources: {} platform_info: group: '' @@ -43,8 +43,490 @@ <<: *linux_meta name: Ubuntu link: https://ubuntu.com/ - icon: '' + icon: 'ubuntu.png' platform_info: group: 'include' distro: 'ubuntu' quick_start: -1 +- <<: *linux + id: deploy-debian + meta: + <<: *linux_meta + name: Debian + link: https://www.debian.org/ + icon: 'debian.png' + platform_info: + group: 'include' + distro: 'debian' + quick_start: -1 +- <<: *linux + id: deploy-fedora + meta: + <<: *linux_meta + name: Fedora + link: https://www.fedoraproject.org/ + icon: 'fedora.png' + platform_info: + group: 'include' + distro: 'fedora' + quick_start: -1 +- <<: *linux + id: deploy-rhel + meta: + <<: *linux_meta + name: Red Hat Enterprise Linux + link: https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux + icon: 'rhel.png' + platform_info: + group: 'include' + distro: 'rhel' + quick_start: -1 +- <<: *linux + id: deploy-almalinux + meta: + <<: *linux_meta + name: Alma Linux + link: https://almalinux.org/ + icon: 'alma.png' + platform_info: + group: 'include' + distro: 'almalinux' + quick_start: -1 +- <<: *linux + id: deploy-alpinelinux + meta: + <<: *linux_meta + name: Alpine Linux + link: https://www.alpinelinux.org/ + icon: 'alpine.png' + platform_info: + group: 'include' + distro: 'alpinelinux' + quick_start: -1 +- <<: *linux + id: deploy-amazonlinux + meta: + <<: *linux_meta + name: Amazon Linux + link: https://aws.amazon.com/amazon-linux-2/ + icon: 'amazonlinux.png' + platform_info: + group: 'include' + distro: 'amazonlinux' + quick_start: -1 +- <<: *linux + id: deploy-archlinux + meta: + <<: *linux_meta + name: Arch Linux + link: https://archlinux.org/ + icon: 'archlinux.png' + platform_info: + group: 'include' + distro: 'archlinux' + quick_start: -1 +- <<: *linux + id: deploy-centos + meta: + <<: *linux_meta + name: CentOS + link: https://www.centos.org/ + icon: 'centos.png' + platform_info: + group: 'include' + distro: 'centos' + quick_start: -1 +- <<: *linux + id: deploy-manjarolinux + meta: + <<: *linux_meta + name: Manjaro Linux + link: https://manjaro.org/ + icon: 'manjaro.png' + platform_info: + group: 'include' + distro: 'archlinux' + quick_start: -1 +- <<: *linux + id: deploy-oraclelinux + meta: + <<: *linux_meta + name: Oracle Linux + link: https://www.oracle.com/linux/ + icon: 'oraclelinux.png' + platform_info: + group: 'include' + distro: 'oraclelinux' + quick_start: -1 +- <<: *linux + id: deploy-opensuse + meta: + <<: *linux_meta + name: SUSE Linux + link: https://www.suse.com/ + icon: 'openSUSE.png' + group: 'include' + distro: 'opensuse' + quick_start: -1 +- + id: deploy-macos + meta: + name: MacOS + link: '' + categories: + - deploy.operating-systems + icon_filename: '' + keywords: + - MacOS + - mac + description: 'Run the following command on your Intel based OSX, macOS servers to install and claim Netdata:"r' + methods: + - method: curl + commands: + - channel: nightly + command: > + curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh + --nightly-channel --claim-token {% claim_token %} --claim-url {% claim_url %} + - channel: stable + command: > + curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh + --stable-channel --claim-token {% claim_token %} --claim-url {% claim_url %} + additional_info: &ref_containers > + Did you know you can also deploy Netdata on your OS using {% goToCategory categoryId="deploy.docker-kubernetes" %}Kubernetes{% /goToCategory %} or {% goToCategory categoryId="deploy.docker-kubernetes" %}Docker{% /goToCategory %}? + related_resources: {} + platform_info: + group: 'include' + distro: 'macos' + quick_start: 1 +- + id: deploy-docker + meta: + name: Docker + link: '' + categories: + - deploy.docker-kubernetes + icon_filename: 'docker.png' + keywords: + - docker + - container + - containers + description: | + Install and connect new Docker containers + Find the commands for `docker run`, `docker compose` or `Docker Swarm`. On the last two you can copy the configs, then run `docker-compose up -d` in the same directory as the `docker-compose.yml` + ``` + Netdata container requires different privileges and mounts to provide functionality similar to that provided by Netdata installed on the host. More info [here](https://learn.netdata.cloud/docs/installing/docker?_gl=1*f2xcnf*_ga*MTI1MTUwMzU0OS4xNjg2NjM1MDA1*_ga_J69Z2JCTFB*MTY5MDMxMDIyMS40MS4xLjE2OTAzMTAzNjkuNTguMC4w#create-a-new-netdata-agent-container) + Netdata will use the hostname from the container in which it is run instead of that of the host system. To change the default hostname check [here](https://learn.netdata.cloud/docs/agent/packaging/docker?_gl=1*i5weve*_ga*MTI1MTUwMzU0OS4xNjg2NjM1MDA1*_ga_J69Z2JCTFB*MTY5MDMxMjM4Ny40Mi4xLjE2OTAzMTIzOTAuNTcuMC4w#change-the-default-hostname) + ``` + methods: + - method: Docker CLI + commands: + - channel: nightly + command: | + docker run -d --name=netdata \ + --pid=host \ + --network=host \ + -v netdataconfig:/etc/netdata \ + -v netdatalib:/var/lib/netdata \ + -v netdatacache:/var/cache/netdata \ + -v /etc/passwd:/host/etc/passwd:ro \ + -v /etc/group:/host/etc/group:ro \ + -v /proc:/host/proc:ro \ + -v /sys:/host/sys:ro \ + -v /etc/os-release:/host/etc/os-release:ro \ + -v /var/run/docker.sock:/var/run/docker.sock:ro \ + --restart unless-stopped \ + --cap-add SYS_PTRACE \ + --cap-add SYS_ADMIN \ + --security-opt apparmor=unconfined \ + netdata/netdata:edge \ + -e NETDATA_CLAIM_TOKEN= {% claim_token %} \ + -e NETDATA_CLAIM_URL={% claim_url %} + - channel: stable + command: | + docker run -d --name=netdata \ + --pid=host \ + --network=host \ + -v netdataconfig:/etc/netdata \ + -v netdatalib:/var/lib/netdata \ + -v netdatacache:/var/cache/netdata \ + -v /etc/passwd:/host/etc/passwd:ro \ + -v /etc/group:/host/etc/group:ro \ + -v /proc:/host/proc:ro \ + -v /sys:/host/sys:ro \ + -v /etc/os-release:/host/etc/os-release:ro \ + -v /var/run/docker.sock:/var/run/docker.sock:ro \ + --restart unless-stopped \ + --cap-add SYS_PTRACE \ + --cap-add SYS_ADMIN \ + --security-opt apparmor=unconfined \ + netdata/netdata:stable \ + -e NETDATA_CLAIM_TOKEN= {% claim_token %} \ + -e NETDATA_CLAIM_URL={% claim_url %} + - method: Docker Compose + commands: + - channel: nightly + command: | + version: '3' + services: + netdata: + image: netdata/netdata:edge + container_name: netdata + pid: host + network_mode: host + restart: unless-stopped + cap_add: + - SYS_PTRACE + - SYS_ADMIN + security_opt: + - apparmor:unconfined + volumes: + - netdataconfig:/etc/netdata + - netdatalib:/var/lib/netdata + - netdatacache:/var/cache/netdata + - /etc/passwd:/host/etc/passwd:ro + - /etc/group:/host/etc/group:ro + - /proc:/host/proc:ro + - /sys:/host/sys:ro + - /etc/os-release:/host/etc/os-release:ro + - /var/run/docker.sock:/var/run/docker.sock:ro + environment: + - NETDATA_CLAIM_TOKEN={% claim_token %} + - NETDATA_CLAIM_URL={% claim_url %} + - NETDATA_CLAIM_ROOMS= + volumes: + netdataconfig: + netdatalib: + netdatacache: + - channel: stable + command: | + version: '3' + services: + netdata: + image: netdata/netdata:stable + container_name: netdata + pid: host + network_mode: host + restart: unless-stopped + cap_add: + - SYS_PTRACE + - SYS_ADMIN + security_opt: + - apparmor:unconfined + volumes: + - netdataconfig:/etc/netdata + - netdatalib:/var/lib/netdata + - netdatacache:/var/cache/netdata + - /etc/passwd:/host/etc/passwd:ro + - /etc/group:/host/etc/group:ro + - /proc:/host/proc:ro + - /sys:/host/sys:ro + - /etc/os-release:/host/etc/os-release:ro + - /var/run/docker.sock:/var/run/docker.sock:ro + environment: + - NETDATA_CLAIM_TOKEN={% claim_token %} + - NETDATA_CLAIM_URL={% claim_url %} + - NETDATA_CLAIM_ROOMS= + volumes: + netdataconfig: + netdatalib: + netdatacache: + - method: Docker Swarm + commands: + - channel: nightly + command: | + version: '3' + services: + netdata: + image: netdata/netdata:edge + container_name: netdata + ports: + - 19999:19999 + restart: unless-stopped + cap_add: + - SYS_PTRACE + security_opt: + - apparmor:unconfined + volumes: + - netdataconfig:/etc/netdata + - netdatalib:/var/lib/netdata + - netdatacache:/var/cache/netdata + - /etc/passwd:/host/etc/passwd:ro + - /etc/group:/host/etc/group:ro + - /proc:/host/proc:ro + - /sys:/host/sys:ro + - /etc/os-release:/host/etc/os-release:ro + - /etc/hostname:/etc/hostname:ro + environment: + - NETDATA_CLAIM_TOKEN={% claim_token %} + - NETDATA_CLAIM_URL={% claim_url %} + - NETDATA_CLAIM_ROOMS= + deploy: + mode: global + + volumes: + netdataconfig: + netdatalib: + netdatacache: + - channel: stable + command: | + version: '3' + services: + netdata: + image: netdata/netdata:stable + container_name: netdata + ports: + - 19999:19999 + restart: unless-stopped + cap_add: + - SYS_PTRACE + security_opt: + - apparmor:unconfined + volumes: + - netdataconfig:/etc/netdata + - netdatalib:/var/lib/netdata + - netdatacache:/var/cache/netdata + - /etc/passwd:/host/etc/passwd:ro + - /etc/group:/host/etc/group:ro + - /proc:/host/proc:ro + - /sys:/host/sys:ro + - /etc/os-release:/host/etc/os-release:ro + - /etc/hostname:/etc/hostname:ro + environment: + - NETDATA_CLAIM_TOKEN={% claim_token %} + - NETDATA_CLAIM_URL={% claim_url %} + - NETDATA_CLAIM_ROOMS= + deploy: + mode: global + + volumes: + netdataconfig: + netdatalib: + netdatacache: + additional_info: '' + related_resources: {} + platform_info: + group: 'no_include' + distro: 'docker' + quick_start: 1 +- + id: deploy-kubernetes + meta: + name: Kubernetes + link: '' + categories: + - deploy.docker-kubernetes + icon_filename: 'kubernetes.png' + keywords: + - kubernetes + - container + - Orchestrator + description: | + **Use helm install to install Netdata on your Kubernetes cluster** + For a new installation use `helm install`` or for existing clusters add the content below to your `override.yamland`` then run `helm upgrade -f override.yml netdata netdata/netdata` + methods: + - method: Helm + commands: + - channel: nightly + command: | + helm install netdata netdata/netdata \ + --set image.tag=latest \ + --set parent.claiming.enabled="true" \ + --set parent.claiming.token={% claim_token %} \ + --set child.claiming.enabled="true" \ + --set child.claiming.token={% claim_token %} + - channel: stable + command: | + helm install netdata netdata/netdata \ + --set image.tag=stable \ + --set parent.claiming.enabled="true" \ + --set parent.claiming.token={% claim_token %} \ + --set child.claiming.enabled="true" \ + --set child.claiming.token={% claim_token %} + - method: Existing Cluster + commands: + - channel: nightly + command: | + image: + tag: latest + + restarter: + enabled: true + + parent: + claiming: + enabled: true + token: {% claim_token %} + rooms: + + child: + claiming: + enabled: true + token: {% claim_token %} + rooms: + - channel: stable + command: | + image: + tag: stable + + restarter: + enabled: true + + parent: + claiming: + enabled: true + token: {% claim_token %} + rooms: + + child: + claiming: + enabled: true + token: {% claim_token %} + rooms: + additional_info: '' + related_resources: {} + platform_info: + group: '' + distro: '' + quick_start: 1 +- + id: deploy-windows + meta: + name: Windows + link: '' + categories: + - deploy.operating-systems + icon_filename: 'windows.png' + keywords: + - windows + description: | + 1. Install [Windows Exporter](https://github.com/prometheus-community/windows_exporter) on every Windows host you want to monitor. + 2. Install Netdata agent on Linux, FreeBSD or Mac. + 3. Configure Netdata to collect data remotely from your Windows hosts by adding one job per host to windows.conf file. See the [configuration section](https://learn.netdata.cloud/docs/data-collection/monitor-anything/System%20Metrics/Windows-machines#configuration) for details. + 4. Enable virtual nodes configuration so the windows nodes are displayed as separate nodes. + methods: + - method: wget + commands: + - channel: nightly + command: > + wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh + --nightly-channel --claim-token {% claim_token %} --claim-url {% claim_url %} + - channel: stable + command: > + wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh + --stable-channel --claim-token {% claim_token %} --claim-url {% claim_url %} + - method: curl + commands: + - channel: nightly + command: > + curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh + --nightly-channel --claim-token {% claim_token %} --claim-url {% claim_url %} + - channel: stable + command: > + curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh + --stable-channel --claim-token {% claim_token %} --claim-url {% claim_url %} + additional_info: '' + related_resources: {} + platform_info: + group: '' + distro: '' + quick_start: 1 From c35a969dc835f08df3737873a366403b0dd30096 Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Tue, 25 Jul 2023 23:52:38 +0300 Subject: [PATCH 36/55] added cloud status in registry?action=hello (#15530) Co-authored-by: ilyam8 --- collectors/apps.plugin/apps_plugin.c | 10 + .../sys_devices_virtual_powercap.c | 276 ++++++++---------- health/health.d/file_descriptors.conf | 4 +- registry/registry.c | 7 +- 4 files changed, 143 insertions(+), 154 deletions(-) diff --git a/collectors/apps.plugin/apps_plugin.c b/collectors/apps.plugin/apps_plugin.c index 2bea234cfa4848..631980dffd2293 100644 --- a/collectors/apps.plugin/apps_plugin.c +++ b/collectors/apps.plugin/apps_plugin.c @@ -1411,6 +1411,16 @@ static inline int read_proc_pid_limits(struct pid_stat *p, void *ptr) { proc_pid_limits_buffer[MAX_PROC_PID_LIMITS - 1] = '\0'; p->limits.max_open_files = get_proc_pid_limits_limit(proc_pid_limits_buffer, PROC_PID_LIMITS_MAX_OPEN_FILES_KEY, sizeof(PROC_PID_LIMITS_MAX_OPEN_FILES_KEY) - 1, 0); + if(p->limits.max_open_files == 1) { + // it seems a bug in the kernel or something similar + // it sets max open files to 1 but the number of files + // the process has open are more than 1... + // https://github.com/netdata/netdata/issues/15443 + p->limits.max_open_files = 0; + ret = 1; + goto cleanup; + } + p->last_limits_collected_usec = p->io_collected_usec; read_limits = true; diff --git a/collectors/debugfs.plugin/sys_devices_virtual_powercap.c b/collectors/debugfs.plugin/sys_devices_virtual_powercap.c index 033456083523b3..5f22b19e227974 100644 --- a/collectors/debugfs.plugin/sys_devices_virtual_powercap.c +++ b/collectors/debugfs.plugin/sys_devices_virtual_powercap.c @@ -2,64 +2,37 @@ #include "debugfs_plugin.h" -#define METRIC_ID "system.power_consumption" - -struct measurement_t { - unsigned long long energy_uj; - usec_t time_us; -}; - struct zone_t { - char name[FILENAME_MAX + 1]; - char path[FILENAME_MAX + 1]; + char *zone_chart_id; + char *subzone_chart_id; + char *name; + char *path; + unsigned long long max_energy_range_uj; - struct measurement_t measurement; -}; + unsigned long long energy_uj; -static int g_zones_count = 0; -static struct zone_t *g_zones = NULL; + struct zone_t *subzones; -static int get_measurement(const char *path, struct measurement_t *measurement) -{ - int result; - if (likely((result = read_single_number_file(path, &measurement->energy_uj)) == 0)) { - measurement->time_us = now_monotonic_high_precision_usec(); - } - return result; -} + struct zone_t *prev, *next; +}; -static double -calculate_watts(unsigned long long max_energy_range_uj, struct measurement_t *before, struct measurement_t *after) -{ - unsigned long long energy_uj = 0; - usec_t delta_us = after->time_us - before->time_us; - if (unlikely(delta_us == 0)) { - return 0; - } +static struct zone_t *rapl_zones = NULL; - if (likely(after->energy_uj >= before->energy_uj)) { - energy_uj = after->energy_uj - before->energy_uj; - } else { - energy_uj = after->energy_uj + (max_energy_range_uj - before->energy_uj); - } - return (double)energy_uj / delta_us; +static bool get_measurement(const char *path, unsigned long long *energy_uj) { + return read_single_number_file(path, energy_uj) == 0; } -static struct zone_t * -get_zone(const char *control_type, struct zone_t *parent, const char *dirname, struct zone_t **zones, size_t *count) -{ +static struct zone_t *get_rapl_zone(const char *control_type __maybe_unused, struct zone_t *parent __maybe_unused, const char *dirname) { char temp[FILENAME_MAX + 1]; snprintfz(temp, FILENAME_MAX, "%s/%s", dirname, "name"); char name[FILENAME_MAX + 1] = ""; - if (read_file(temp, name, sizeof(name) - 1) != 0) { + if (read_file(temp, name, sizeof(name) - 1) != 0) return NULL; - } char *trimmed = trim(name); - if (unlikely(trimmed == NULL || trimmed[0] == 0)) { + if (unlikely(trimmed == NULL || trimmed[0] == 0)) return NULL; - } snprintfz(temp, FILENAME_MAX, "%s/%s", dirname, "max_energy_range_uj"); unsigned long long max_energy_range_uj = 0; @@ -69,173 +42,176 @@ get_zone(const char *control_type, struct zone_t *parent, const char *dirname, s } snprintfz(temp, FILENAME_MAX, "%s/%s", dirname, "energy_uj"); - struct measurement_t measurement; - if (unlikely(get_measurement(temp, &measurement) != 0)) { - collector_error("%s: Cannot read %s", trimmed, temp); + unsigned long long energy_uj; + if (unlikely(!get_measurement(temp, &energy_uj))) { + collector_info("%s: Cannot read %s", trimmed, temp); return NULL; } - int parent_idx = -1; - if (parent != NULL) { - parent_idx = parent - *zones; - } + struct zone_t *zone = callocz(1, sizeof(*zone)); - *zones = (struct zone_t *)reallocz(*zones, sizeof(struct zone_t) * (*count + 1)); + zone->name = strdupz(trimmed); + zone->path = strdupz(temp); - struct zone_t *zone = &(*zones)[*count]; - strcpy(zone->path, temp); - if (parent_idx >= 0) { - snprintfz(zone->name, FILENAME_MAX, "%s/%s", (*zones)[parent_idx].name, trimmed); - } else { - snprintfz(zone->name, FILENAME_MAX, "%s/%s", control_type, trimmed); - } zone->max_energy_range_uj = max_energy_range_uj; - zone->measurement = measurement; + zone->energy_uj = energy_uj; collector_info("Found zone: \"%s\"", zone->name); - ++(*count); - return zone; } -static void -look_for_zones(const char *control_type, struct zone_t *parent, const char *path, struct zone_t **zones, size_t *count) -{ +static struct zone_t *look_for_rapl_zones(const char *control_type, struct zone_t *parent, const char *path, int depth) { + if(depth > 2) + return NULL; + + struct zone_t *base = NULL; + DIR *dir = opendir(path); - if (unlikely(dir == NULL)) { - return; - } + if (unlikely(dir == NULL)) + return NULL; struct dirent *de = NULL; while ((de = readdir(dir))) { - if (de->d_type != DT_DIR || de->d_name[0] == '.') { + if (de->d_type != DT_DIR || de->d_name[0] == '.') + continue; + + if(strncmp(de->d_name, "intel-rapl:", 11) != 0) continue; - } char zone_path[FILENAME_MAX + 1]; snprintfz(zone_path, FILENAME_MAX, "%s/%s", path, de->d_name); - collector_info("Looking for zone in \"%s\"", zone_path); + struct zone_t *zone = get_rapl_zone(control_type, parent, zone_path); + if(zone) { + DOUBLE_LINKED_LIST_APPEND_ITEM_UNSAFE(base, zone, prev, next); - struct zone_t *zone = get_zone(control_type, parent, zone_path, zones, count); - if (zone != NULL) { - look_for_zones(control_type, zone, zone_path, zones, count); + if(!parent) + zone->subzones = look_for_rapl_zones(control_type, zone, zone_path, depth + 1); } } closedir(dir); + return base; } -static int get_rapl_zones(struct zone_t **zones) -{ - *zones = NULL; +static struct zone_t *get_main_rapl_zones(void) { + struct zone_t *base = NULL; char dirname[FILENAME_MAX + 1]; snprintfz(dirname, FILENAME_MAX, "%s%s", netdata_configured_host_prefix, "/sys/devices/virtual/powercap"); DIR *dir = opendir(dirname); - if (unlikely(dir == NULL)) { + if (unlikely(dir == NULL)) return 0; - } - - size_t count = 0; struct dirent *de = NULL; while ((de = readdir(dir))) { - if (de->d_type != DT_DIR || de->d_name[0] == '.') { + if (de->d_type != DT_DIR || de->d_name[0] == '.') + continue; + + if(strncmp(de->d_name, "intel-rapl", 10) != 0) continue; - } char control_type_path[FILENAME_MAX + 1]; snprintfz(control_type_path, FILENAME_MAX, "%s/%s", dirname, de->d_name); collector_info("Looking at control type \"%s\"", de->d_name); - look_for_zones(de->d_name, NULL, control_type_path, zones, &count); + struct zone_t *zone = look_for_rapl_zones(de->d_name, NULL, control_type_path, 0); + if(zone) + DOUBLE_LINKED_LIST_APPEND_LIST_UNSAFE(base, zone, prev, next); } closedir(dir); - return count; -} - -static void send_chart(int update_every, const char *name) -{ - fprintf( - stdout, - "CHART %s '' 'Power Consumption' 'Watts' 'power consumption' '' '%s' %d %d '%s' 'debugfs.plugin' ''\n", - METRIC_ID, - debugfs_rrdset_type_name(RRDSET_TYPE_LINE), - NETDATA_CHART_PRIO_POWERCAP, - update_every, - name); -} - -static void send_dimension(const char *zone_name) -{ - fprintf( - stdout, - "DIMENSION '%s' '%s' %s 1 %d ''\n", - zone_name, - zone_name, - debugfs_rrd_algorithm_name(RRD_ALGORITHM_ABSOLUTE), - 1000); -} - -static void send_begin() -{ - fprintf(stdout, "BEGIN %s\n", METRIC_ID); -} - -static void send_set(const char *zone_name, collected_number value) -{ - fprintf(stdout, "SET %s = %lld\n", zone_name, value); + return base; } -static void send_end_and_flush() -{ - fprintf(stdout, "END\n"); - fflush(stdout); -} +int do_sys_devices_virtual_powercap(int update_every, const char *name __maybe_unused) { -int do_sys_devices_virtual_powercap(int update_every, const char *name) -{ - if (unlikely(g_zones_count <= 0)) { - g_zones_count = get_rapl_zones(&g_zones); - if (unlikely(g_zones_count < 0)) { - collector_error("Failed to find powercap zones."); - return 1; - } else if (unlikely(g_zones_count == 0)) { - collector_info("No powercap zones found."); + if (unlikely(!rapl_zones)) { + rapl_zones = get_main_rapl_zones(); + if (unlikely(!rapl_zones)) { + collector_info("Failed to find powercap zones."); return 1; } - - send_chart(update_every, name); - - for (int ii = 0; ii < g_zones_count; ++ii) { - send_dimension(g_zones[ii].name); - } - - // This measurement is a derivative so start reporting on the next call - return 0; } - send_begin(); + for(struct zone_t *zone = rapl_zones; zone ; zone = zone->next) { + if(!zone->zone_chart_id) { + char id[1000 + 1]; + snprintf(id, 1000, "cpu.powercap_intel_rapl_zone_%s", zone->name); + zone->zone_chart_id = strdupz(id); + + fprintf(stdout, + "CHART '%s' '' 'Intel RAPL Zone Power Consumption' 'Watts' 'powercap' '%s' '%s' %d %d '' 'debugfs.plugin' 'intel_rapl'\n", + zone->zone_chart_id, + "cpu.powercap_intel_rapl_zone", + debugfs_rrdset_type_name(RRDSET_TYPE_LINE), + NETDATA_CHART_PRIO_POWERCAP, + update_every); + + fprintf(stdout, + "CLABEL 'zone' '%s' 0\n" + "CLABEL_COMMIT\n", + zone->name); + + fprintf(stdout, + "DIMENSION 'power' '' %s 1 1000000 ''\n", + debugfs_rrd_algorithm_name(RRD_ALGORITHM_INCREMENTAL)); + + // for the sub-zones + snprintf(id, 1000, "cpu.powercap_intel_rapl_subzones_%s", zone->name); + zone->subzone_chart_id = strdupz(id); + fprintf(stdout, + "CHART '%s' '' 'Intel RAPL Subzones Power Consumption' 'Watts' 'powercap' '%s' '%s' %d %d '' 'debugfs.plugin' 'intel_rapl'\n", + zone->subzone_chart_id, + "cpu.powercap_intel_rapl_subzones", + debugfs_rrdset_type_name(RRDSET_TYPE_LINE), + NETDATA_CHART_PRIO_POWERCAP + 1, + update_every); + + fprintf(stdout, + "CLABEL 'zone' '%s' 0\n" + "CLABEL_COMMIT\n", + zone->name); + + for(struct zone_t *subzone = zone->subzones; subzone ; subzone = subzone->next) { + fprintf(stdout, + "DIMENSION '%s' '' %s 1 1000000 ''\n", + subzone->name, + debugfs_rrd_algorithm_name(RRD_ALGORITHM_INCREMENTAL)); + } + } - for (int ii = 0; ii < g_zones_count; ++ii) { - struct measurement_t measurement; - struct zone_t *zone = &g_zones[ii]; + if(get_measurement(zone->path, &zone->energy_uj)) { + fprintf(stdout, + "BEGIN '%s'\n" + "SET power = %lld\n" + "END\n" + , zone->zone_chart_id + , zone->energy_uj); + } - if (unlikely(get_measurement(zone->path, &measurement) != 0)) { - collector_error("%s: Cannot read %s", zone->name, zone->path); - continue; + if(zone->subzones) { + fprintf(stdout, + "BEGIN '%s'\n", + zone->subzone_chart_id); + + for (struct zone_t *subzone = zone->subzones; subzone; subzone = subzone->next) { + if(get_measurement(subzone->path, &subzone->energy_uj)) { + fprintf(stdout, + "SET '%s' = %lld\n", + subzone->name, + subzone->energy_uj); + } + } + + fprintf(stdout, "END\n"); } - double watts = calculate_watts(zone->max_energy_range_uj, &zone->measurement, &measurement); - zone->measurement = measurement; - send_set(zone->name, (collected_number)(watts * 1000)); } - send_end_and_flush(); + fflush(stdout); return 0; } diff --git a/health/health.d/file_descriptors.conf b/health/health.d/file_descriptors.conf index d136ea517b7351..5cf86e42ff1b28 100644 --- a/health/health.d/file_descriptors.conf +++ b/health/health.d/file_descriptors.conf @@ -20,12 +20,12 @@ type: System component: Process os: linux - module: !* * + module: * hosts: * lookup: max -1m unaligned foreach * units: % every: 1m warn: $this > (($status >= $WARNING) ? (85) : (90)) - delay: down 15m multiplier 1.5 max 1h + delay: up 5m down 15m multiplier 1.5 max 1h info: maximum utilization of open files among all application group PIDs to: sysadmin diff --git a/registry/registry.c b/registry/registry.c index b63c6db0fffacc..4b6cb2bd1a83e5 100644 --- a/registry/registry.c +++ b/registry/registry.c @@ -58,7 +58,7 @@ static inline void registry_set_person_cookie(struct web_client *w, REGISTRY_PER static inline void registry_json_header(RRDHOST *host, struct web_client *w, const char *action, const char *status) { buffer_flush(w->response.data); w->response.data->content_type = CT_APPLICATION_JSON; - buffer_json_initialize(w->response.data, "\"", "\"", 0, true, true); + buffer_json_initialize(w->response.data, "\"", "\"", 0, true, false); buffer_json_member_add_string(w->response.data, "action", action); buffer_json_member_add_string(w->response.data, "status", status); buffer_json_member_add_string(w->response.data, "hostname", rrdhost_registry_hostname(host)); @@ -186,8 +186,11 @@ int registry_request_hello_json(RRDHOST *host, struct web_client *w) { } buffer_json_object_close(w->response.data); - buffer_json_member_add_string(w->response.data, "registry", registry.registry_to_announce); + CLOUD_STATUS status = cloud_status(); + buffer_json_member_add_string(w->response.data, "cloud_status", cloud_status_to_string(status)); buffer_json_member_add_string(w->response.data, "cloud_base_url", registry.cloud_base_url); + + buffer_json_member_add_string(w->response.data, "registry", registry.registry_to_announce); buffer_json_member_add_boolean(w->response.data, "anonymous_statistics", netdata_anonymous_statistics_enabled); buffer_json_member_add_array(w->response.data, "nodes"); From 176660786a65eae564a0c0d57f4067752b322167 Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Wed, 26 Jul 2023 00:03:18 +0300 Subject: [PATCH 37/55] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 465bb1e38b231e..df0c08d313fcaf 100644 --- a/README.md +++ b/README.md @@ -517,7 +517,7 @@ Netdata is a widely adopted project...
Click to see detailed answer ...  
 
-Browse the [Netdata stargazers on Github](https://github.com/netdata/netdata/stargazers) to discover users from renowned companies and enterprises, such as SAP, Qualcomm, IBM, Amazon, Intel, AMD, Unity, Baidu, Cisco, Samsung, Netflix, Facebook, and many others. +Browse the [Netdata stargazers on Github](https://github.com/netdata/netdata/stargazers) to discover users from renowned companies and enterprises, such as SAP, Qualcomm, IBM, Amazon, Intel, AMD, Unity, Baidu, Cisco, Samsung, Netflix, Facebook, Riot Games, and many others. Netdata also enjoys significant usage in academia, with notable institutions including New York University, Columbia University, New Jersey University, among several others. From ffa2ee16172cfd3de7669b2b5de0ed1b9a771444 Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Wed, 26 Jul 2023 00:04:15 +0300 Subject: [PATCH 38/55] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index df0c08d313fcaf..a2f17ddd7f1655 100644 --- a/README.md +++ b/README.md @@ -517,7 +517,7 @@ Netdata is a widely adopted project...
Click to see detailed answer ...  
 
-Browse the [Netdata stargazers on Github](https://github.com/netdata/netdata/stargazers) to discover users from renowned companies and enterprises, such as SAP, Qualcomm, IBM, Amazon, Intel, AMD, Unity, Baidu, Cisco, Samsung, Netflix, Facebook, Riot Games, and many others. +Browse the [Netdata stargazers on Github](https://github.com/netdata/netdata/stargazers) to discover users from renowned companies and enterprises, such as SAP, Qualcomm, IBM, Amazon, Intel, AMD, Unity, Baidu, Cisco, Samsung, Netflix, Facebook, Riot Games, Valve, and many others. Netdata also enjoys significant usage in academia, with notable institutions including New York University, Columbia University, New Jersey University, among several others. From accc426c8ab08a75c9e6470a4a89482fb4c4eb17 Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Wed, 26 Jul 2023 00:08:51 +0300 Subject: [PATCH 39/55] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a2f17ddd7f1655..9f633fe467fe3e 100644 --- a/README.md +++ b/README.md @@ -517,7 +517,7 @@ Netdata is a widely adopted project...
Click to see detailed answer ...  
 
-Browse the [Netdata stargazers on Github](https://github.com/netdata/netdata/stargazers) to discover users from renowned companies and enterprises, such as SAP, Qualcomm, IBM, Amazon, Intel, AMD, Unity, Baidu, Cisco, Samsung, Netflix, Facebook, Riot Games, Valve, and many others. +Browse the [Netdata stargazers on Github](https://github.com/netdata/netdata/stargazers) to discover users from renowned companies and enterprises, such as AMD, Amazon, Baidu, Cisco, Facebook, IBM, Intel, Netflix, Qualcomm, Riot Games, SAP, Samsung, Unity, Valve, and many others. Netdata also enjoys significant usage in academia, with notable institutions including New York University, Columbia University, New Jersey University, among several others. From 065091c3f5d908c5e06ed5ac817999f7dc965b90 Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Wed, 26 Jul 2023 01:06:57 +0300 Subject: [PATCH 40/55] proc integrations (#15494) Co-authored-by: ilyam8 --- collectors/all.h | 46 +- collectors/cgroups.plugin/sys_fs_cgroup.c | 164 ++++++- collectors/debugfs.plugin/debugfs_zswap.c | 28 +- collectors/ebpf.plugin/ebpf_swap.c | 8 +- collectors/freebsd.plugin/freebsd_sysctl.c | 4 +- collectors/proc.plugin/multi_metadata.yaml | 412 ++++++++++++++-- collectors/proc.plugin/proc_meminfo.c | 520 +++++++++++++++++---- collectors/proc.plugin/proc_pressure.c | 137 +++--- collectors/proc.plugin/proc_pressure.h | 3 +- collectors/proc.plugin/proc_stat.c | 2 +- collectors/proc.plugin/proc_vmstat.c | 12 +- health/health.d/swap.conf | 4 +- 12 files changed, 1088 insertions(+), 252 deletions(-) diff --git a/collectors/all.h b/collectors/all.h index f28865c0195300..9bfae914ea852e 100644 --- a/collectors/all.h +++ b/collectors/all.h @@ -23,18 +23,6 @@ #define NETDATA_CHART_PRIO_SYSTEM_IO 150 #define NETDATA_CHART_PRIO_SYSTEM_PGPGIO 151 #define NETDATA_CHART_PRIO_SYSTEM_RAM 200 -#define NETDATA_CHART_PRIO_SYSTEM_SWAP 201 -#define NETDATA_CHART_PRIO_SYSTEM_SWAP_CALLS 202 -#define NETDATA_CHART_PRIO_SYSTEM_SWAPIO 250 -#define NETDATA_CHART_PRIO_SYSTEM_ZSWAPIO 300 -#define NETDATA_CHART_PRIO_SYSTEM_ZSWAP_COMPRESS_RATIO 301 -#define NETDATA_CHART_PRIO_SYSTEM_ZSWAP_POOL_TOT_SIZE 302 -#define NETDATA_CHART_PRIO_SYSTEM_ZSWAP_STORED_PAGE 303 -#define NETDATA_CHART_PRIO_SYSTEM_ZSWAP_REJECTS 304 -#define NETDATA_CHART_PRIO_SYSTEM_ZSWAP_POOL_LIM_HIT 305 -#define NETDATA_CHART_PRIO_SYSTEM_ZSWAP_WRT_BACK_PAGES 306 -#define NETDATA_CHART_PRIO_SYSTEM_ZSWAP_SAME_FILL_PAGE 307 -#define NETDATA_CHART_PRIO_SYSTEM_ZSWAP_DUPP_ENTRY 308 #define NETDATA_CHART_PRIO_SYSTEM_NET 500 #define NETDATA_CHART_PRIO_SYSTEM_IPV4 500 // freebsd only #define NETDATA_CHART_PRIO_SYSTEM_IP 501 @@ -87,17 +75,35 @@ #define NETDATA_CHART_PRIO_MEM_SYSTEM_AVAILABLE 1010 #define NETDATA_CHART_PRIO_MEM_SYSTEM_OOM_KILL 1020 #define NETDATA_CHART_PRIO_MEM_SYSTEM_COMMITTED 1030 -#define NETDATA_CHART_PRIO_MEM_SYSTEM_PGFAULTS 1040 +#define NETDATA_CHART_PRIO_MEM_SWAP 1035 +#define NETDATA_CHART_PRIO_MEM_SWAP_CALLS 1037 +#define NETDATA_CHART_PRIO_MEM_SWAPIO 1038 +#define NETDATA_CHART_PRIO_MEM_ZSWAP 1036 +#define NETDATA_CHART_PRIO_MEM_ZSWAPIO 1037 +#define NETDATA_CHART_PRIO_MEM_ZSWAP_COMPRESS_RATIO 1038 +#define NETDATA_CHART_PRIO_MEM_ZSWAP_POOL_TOT_SIZE 1039 +#define NETDATA_CHART_PRIO_MEM_ZSWAP_STORED_PAGE 1040 +#define NETDATA_CHART_PRIO_MEM_ZSWAP_REJECTS 1041 +#define NETDATA_CHART_PRIO_MEM_ZSWAP_POOL_LIM_HIT 1042 +#define NETDATA_CHART_PRIO_MEM_ZSWAP_WRT_BACK_PAGES 1043 +#define NETDATA_CHART_PRIO_MEM_ZSWAP_SAME_FILL_PAGE 1044 +#define NETDATA_CHART_PRIO_MEM_ZSWAP_DUPP_ENTRY 1045 +#define NETDATA_CHART_PRIO_MEM_SYSTEM_PGFAULTS 1050 #define NETDATA_CHART_PRIO_MEM_KERNEL 1100 #define NETDATA_CHART_PRIO_MEM_SLAB 1200 +#define NETDATA_CHART_PRIO_MEM_RECLAIMING 1210 +#define NETDATA_CHART_PRIO_MEM_HIGH_LOW 1211 +#define NETDATA_CHART_PRIO_MEM_CMA 1212 #define NETDATA_CHART_PRIO_MEM_HUGEPAGES 1250 -#define NETDATA_CHART_PRIO_MEM_HUGEPAGES_FAULTS 1251 -#define NETDATA_CHART_PRIO_MEM_HUGEPAGES_FILE 1252 -#define NETDATA_CHART_PRIO_MEM_HUGEPAGES_ZERO 1253 -#define NETDATA_CHART_PRIO_MEM_HUGEPAGES_KHUGEPAGED 1254 -#define NETDATA_CHART_PRIO_MEM_HUGEPAGES_SPLITS 1255 -#define NETDATA_CHART_PRIO_MEM_HUGEPAGES_SWAPOUT 1256 -#define NETDATA_CHART_PRIO_MEM_HUGEPAGES_COMPACT 1257 +#define NETDATA_CHART_PRIO_MEM_HUGEPAGES_DETAILS 1251 +#define NETDATA_CHART_PRIO_MEM_HUGEPAGES_FAULTS 1252 +#define NETDATA_CHART_PRIO_MEM_HUGEPAGES_FILE 1253 +#define NETDATA_CHART_PRIO_MEM_HUGEPAGES_ZERO 1254 +#define NETDATA_CHART_PRIO_MEM_HUGEPAGES_KHUGEPAGED 1255 +#define NETDATA_CHART_PRIO_MEM_HUGEPAGES_SPLITS 1256 +#define NETDATA_CHART_PRIO_MEM_HUGEPAGES_SWAPOUT 1257 +#define NETDATA_CHART_PRIO_MEM_HUGEPAGES_COMPACT 1258 +#define NETDATA_CHART_PRIO_MEM_DIRECTMAP 1260 #define NETDATA_CHART_PRIO_MEM_KSM 1300 #define NETDATA_CHART_PRIO_MEM_KSM_SAVINGS 1301 #define NETDATA_CHART_PRIO_MEM_KSM_RATIOS 1302 diff --git a/collectors/cgroups.plugin/sys_fs_cgroup.c b/collectors/cgroups.plugin/sys_fs_cgroup.c index fb805e63ce6e9a..b7a6a46485d7ea 100644 --- a/collectors/cgroups.plugin/sys_fs_cgroup.c +++ b/collectors/cgroups.plugin/sys_fs_cgroup.c @@ -62,6 +62,8 @@ static int cgroup_enable_pressure_io_some = CONFIG_BOOLEAN_AUTO; static int cgroup_enable_pressure_io_full = CONFIG_BOOLEAN_AUTO; static int cgroup_enable_pressure_memory_some = CONFIG_BOOLEAN_AUTO; static int cgroup_enable_pressure_memory_full = CONFIG_BOOLEAN_AUTO; +static int cgroup_enable_pressure_irq_some = CONFIG_BOOLEAN_NO; +static int cgroup_enable_pressure_irq_full = CONFIG_BOOLEAN_AUTO; static int cgroup_enable_systemd_services = CONFIG_BOOLEAN_YES; static int cgroup_enable_systemd_services_detailed_memory = CONFIG_BOOLEAN_NO; @@ -828,6 +830,7 @@ struct cgroup { struct pressure cpu_pressure; struct pressure io_pressure; struct pressure memory_pressure; + struct pressure irq_pressure; // per cgroup charts RRDSET *st_cpu; @@ -1451,28 +1454,33 @@ static inline void cgroup2_read_pressure(struct pressure *res) { return; } - res->some.share_time.value10 = strtod(procfile_lineword(ff, 0, 2), NULL); - res->some.share_time.value60 = strtod(procfile_lineword(ff, 0, 4), NULL); - res->some.share_time.value300 = strtod(procfile_lineword(ff, 0, 6), NULL); - res->some.total_time.value_total = str2ull(procfile_lineword(ff, 0, 8), NULL) / 1000; // us->ms + bool did_some = false, did_full = false; - if (lines > 2) { - res->full.share_time.value10 = strtod(procfile_lineword(ff, 1, 2), NULL); - res->full.share_time.value60 = strtod(procfile_lineword(ff, 1, 4), NULL); - res->full.share_time.value300 = strtod(procfile_lineword(ff, 1, 6), NULL); - res->full.total_time.value_total = str2ull(procfile_lineword(ff, 1, 8), NULL) / 1000; // us->ms + for(size_t l = 0; l < lines ;l++) { + const char *key = procfile_lineword(ff, l, 0); + if(strcmp(key, "some") == 0) { + res->some.share_time.value10 = strtod(procfile_lineword(ff, l, 2), NULL); + res->some.share_time.value60 = strtod(procfile_lineword(ff, l, 4), NULL); + res->some.share_time.value300 = strtod(procfile_lineword(ff, l, 6), NULL); + res->some.total_time.value_total = str2ull(procfile_lineword(ff, l, 8), NULL) / 1000; // us->ms + did_some = true; + } + else if(strcmp(key, "full") == 0) { + res->full.share_time.value10 = strtod(procfile_lineword(ff, l, 2), NULL); + res->full.share_time.value60 = strtod(procfile_lineword(ff, l, 4), NULL); + res->full.share_time.value300 = strtod(procfile_lineword(ff, l, 6), NULL); + res->full.total_time.value_total = str2ull(procfile_lineword(ff, l, 8), NULL) / 1000; // us->ms + did_full = true; + } } - res->updated = 1; + res->updated = (did_full || did_some) ? 1 : 0; - if (unlikely(res->some.enabled == CONFIG_BOOLEAN_AUTO)) { - res->some.enabled = CONFIG_BOOLEAN_YES; - if (lines > 2) { - res->full.enabled = CONFIG_BOOLEAN_YES; - } else { - res->full.enabled = CONFIG_BOOLEAN_NO; - } - } + if(unlikely(res->some.enabled == CONFIG_BOOLEAN_AUTO)) + res->some.enabled = (did_some) ? CONFIG_BOOLEAN_YES : CONFIG_BOOLEAN_NO; + + if(unlikely(res->full.enabled == CONFIG_BOOLEAN_AUTO)) + res->full.enabled = (did_full) ? CONFIG_BOOLEAN_YES : CONFIG_BOOLEAN_NO; } } @@ -1637,6 +1645,7 @@ static inline void read_cgroup(struct cgroup *cg) { cgroup2_read_pressure(&cg->cpu_pressure); cgroup2_read_pressure(&cg->io_pressure); cgroup2_read_pressure(&cg->memory_pressure); + cgroup2_read_pressure(&cg->irq_pressure); cgroup_read_memory(&cg->memory, 1); } } @@ -1851,6 +1860,7 @@ static inline void cgroup_free(struct cgroup *cg) { free_pressure(&cg->cpu_pressure); free_pressure(&cg->io_pressure); free_pressure(&cg->memory_pressure); + free_pressure(&cg->irq_pressure); freez(cg->id); freez(cg->intermediate_id); @@ -2465,6 +2475,18 @@ static inline void discovery_update_filenames() { netdata_log_debug(D_CGROUP, "memory.pressure file for cgroup '%s': '%s' does not exist", cg->id, filename); } } + + if (unlikely((cgroup_enable_pressure_irq_some || cgroup_enable_pressure_irq_full) && !cg->irq_pressure.filename)) { + snprintfz(filename, FILENAME_MAX, "%s%s/irq.pressure", cgroup_unified_base, cg->id); + if (likely(stat(filename, &buf) != -1)) { + cg->irq_pressure.filename = strdupz(filename); + cg->irq_pressure.some.enabled = cgroup_enable_pressure_irq_some; + cg->irq_pressure.full.enabled = cgroup_enable_pressure_irq_full; + netdata_log_debug(D_CGROUP, "irq.pressure filename for cgroup '%s': '%s'", cg->id, cg->irq_pressure.filename); + } else { + netdata_log_debug(D_CGROUP, "irq.pressure file for cgroup '%s': '%s' does not exist", cg->id, filename); + } + } } } } @@ -4643,6 +4665,112 @@ void update_cgroup_charts(int update_every) { update_pressure_charts(pcs); } + res = &cg->irq_pressure; + + if (likely(res->updated && res->some.enabled)) { + struct pressure_charts *pcs; + pcs = &res->some; + + if (unlikely(!pcs->share_time.st)) { + RRDSET *chart; + snprintfz(title, CHART_TITLE_MAX, "IRQ some pressure"); + chart = pcs->share_time.st = rrdset_create_localhost( + cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX) + , "irq_some_pressure" + , NULL + , "interrupts" + , k8s_is_kubepod(cg) ? "k8s.cgroup.irq_some_pressure" : "cgroup.irq_some_pressure" + , title + , "percentage" + , PLUGIN_CGROUPS_NAME + , PLUGIN_CGROUPS_MODULE_CGROUPS_NAME + , cgroup_containers_chart_priority + 2310 + , update_every + , RRDSET_TYPE_LINE + ); + rrdset_update_rrdlabels(chart = pcs->share_time.st, cg->chart_labels); + pcs->share_time.rd10 = rrddim_add(chart, "some 10", NULL, 1, 100, RRD_ALGORITHM_ABSOLUTE); + pcs->share_time.rd60 = rrddim_add(chart, "some 60", NULL, 1, 100, RRD_ALGORITHM_ABSOLUTE); + pcs->share_time.rd300 = rrddim_add(chart, "some 300", NULL, 1, 100, RRD_ALGORITHM_ABSOLUTE); + } + + if (unlikely(!pcs->total_time.st)) { + RRDSET *chart; + snprintfz(title, CHART_TITLE_MAX, "IRQ some pressure stall time"); + chart = pcs->total_time.st = rrdset_create_localhost( + cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX) + , "irq_some_pressure_stall_time" + , NULL + , "interrupts" + , k8s_is_kubepod(cg) ? "k8s.cgroup.irq_some_pressure_stall_time" : "cgroup.irq_some_pressure_stall_time" + , title + , "ms" + , PLUGIN_CGROUPS_NAME + , PLUGIN_CGROUPS_MODULE_CGROUPS_NAME + , cgroup_containers_chart_priority + 2330 + , update_every + , RRDSET_TYPE_LINE + ); + rrdset_update_rrdlabels(chart = pcs->total_time.st, cg->chart_labels); + pcs->total_time.rdtotal = rrddim_add(chart, "time", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); + } + + update_pressure_charts(pcs); + } + + if (likely(res->updated && res->full.enabled)) { + struct pressure_charts *pcs; + pcs = &res->full; + + if (unlikely(!pcs->share_time.st)) { + RRDSET *chart; + snprintfz(title, CHART_TITLE_MAX, "IRQ full pressure"); + + chart = pcs->share_time.st = rrdset_create_localhost( + cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX) + , "irq_full_pressure" + , NULL + , "interrupts" + , k8s_is_kubepod(cg) ? "k8s.cgroup.irq_full_pressure" : "cgroup.irq_full_pressure" + , title + , "percentage" + , PLUGIN_CGROUPS_NAME + , PLUGIN_CGROUPS_MODULE_CGROUPS_NAME + , cgroup_containers_chart_priority + 2350 + , update_every + , RRDSET_TYPE_LINE + ); + + rrdset_update_rrdlabels(chart = pcs->share_time.st, cg->chart_labels); + pcs->share_time.rd10 = rrddim_add(chart, "full 10", NULL, 1, 100, RRD_ALGORITHM_ABSOLUTE); + pcs->share_time.rd60 = rrddim_add(chart, "full 60", NULL, 1, 100, RRD_ALGORITHM_ABSOLUTE); + pcs->share_time.rd300 = rrddim_add(chart, "full 300", NULL, 1, 100, RRD_ALGORITHM_ABSOLUTE); + } + + if (unlikely(!pcs->total_time.st)) { + RRDSET *chart; + snprintfz(title, CHART_TITLE_MAX, "IRQ full pressure stall time"); + chart = pcs->total_time.st = rrdset_create_localhost( + cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX) + , "irq_full_pressure_stall_time" + , NULL + , "interrupts" + , k8s_is_kubepod(cg) ? "k8s.cgroup.irq_full_pressure_stall_time" : "cgroup.irq_full_pressure_stall_time" + , title + , "ms" + , PLUGIN_CGROUPS_NAME + , PLUGIN_CGROUPS_MODULE_CGROUPS_NAME + , cgroup_containers_chart_priority + 2370 + , update_every + , RRDSET_TYPE_LINE + ); + rrdset_update_rrdlabels(chart = pcs->total_time.st, cg->chart_labels); + pcs->total_time.rdtotal = rrddim_add(chart, "time", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); + } + + update_pressure_charts(pcs); + } + res = &cg->io_pressure; if (likely(res->updated && res->some.enabled)) { diff --git a/collectors/debugfs.plugin/debugfs_zswap.c b/collectors/debugfs.plugin/debugfs_zswap.c index c8fc0f030ae48b..502a04f1f85cce 100644 --- a/collectors/debugfs.plugin/debugfs_zswap.c +++ b/collectors/debugfs.plugin/debugfs_zswap.c @@ -38,7 +38,7 @@ static struct netdata_zswap_metric zswap_calculated_metrics[] = { .charttype = RRDSET_TYPE_LINE, .enabled = CONFIG_BOOLEAN_YES, .chart_created = CONFIG_BOOLEAN_NO, - .prio = NETDATA_CHART_PRIO_SYSTEM_ZSWAP_COMPRESS_RATIO, + .prio = NETDATA_CHART_PRIO_MEM_ZSWAP_COMPRESS_RATIO, .divisor = 100, .convertv = NULL, .value = -1}, @@ -71,7 +71,7 @@ static struct netdata_zswap_metric zswap_independent_metrics[] = { .charttype = RRDSET_TYPE_AREA, .enabled = CONFIG_BOOLEAN_YES, .chart_created = CONFIG_BOOLEAN_NO, - .prio = NETDATA_CHART_PRIO_SYSTEM_ZSWAP_POOL_TOT_SIZE, + .prio = NETDATA_CHART_PRIO_MEM_ZSWAP_POOL_TOT_SIZE, .divisor = 1, .convertv = NULL, .value = -1}, @@ -84,7 +84,7 @@ static struct netdata_zswap_metric zswap_independent_metrics[] = { .charttype = RRDSET_TYPE_AREA, .enabled = CONFIG_BOOLEAN_YES, .chart_created = CONFIG_BOOLEAN_NO, - .prio = NETDATA_CHART_PRIO_SYSTEM_ZSWAP_STORED_PAGE, + .prio = NETDATA_CHART_PRIO_MEM_ZSWAP_STORED_PAGE, .divisor = 1, .convertv = pages_to_bytes, .value = -1}, @@ -97,7 +97,7 @@ static struct netdata_zswap_metric zswap_independent_metrics[] = { .charttype = RRDSET_TYPE_LINE, .enabled = CONFIG_BOOLEAN_YES, .chart_created = CONFIG_BOOLEAN_NO, - .prio = NETDATA_CHART_PRIO_SYSTEM_ZSWAP_POOL_LIM_HIT, + .prio = NETDATA_CHART_PRIO_MEM_ZSWAP_POOL_LIM_HIT, .divisor = 1, .convertv = NULL, .value = -1}, @@ -110,7 +110,7 @@ static struct netdata_zswap_metric zswap_independent_metrics[] = { .charttype = RRDSET_TYPE_AREA, .enabled = CONFIG_BOOLEAN_YES, .chart_created = CONFIG_BOOLEAN_NO, - .prio = NETDATA_CHART_PRIO_SYSTEM_ZSWAP_WRT_BACK_PAGES, + .prio = NETDATA_CHART_PRIO_MEM_ZSWAP_WRT_BACK_PAGES, .divisor = 1, .convertv = pages_to_bytes, .value = -1}, @@ -123,7 +123,7 @@ static struct netdata_zswap_metric zswap_independent_metrics[] = { .charttype = RRDSET_TYPE_AREA, .enabled = CONFIG_BOOLEAN_YES, .chart_created = CONFIG_BOOLEAN_NO, - .prio = NETDATA_CHART_PRIO_SYSTEM_ZSWAP_SAME_FILL_PAGE, + .prio = NETDATA_CHART_PRIO_MEM_ZSWAP_SAME_FILL_PAGE, .divisor = 1, .convertv = pages_to_bytes, .value = -1}, @@ -136,7 +136,7 @@ static struct netdata_zswap_metric zswap_independent_metrics[] = { .charttype = RRDSET_TYPE_LINE, .enabled = CONFIG_BOOLEAN_YES, .chart_created = CONFIG_BOOLEAN_NO, - .prio = NETDATA_CHART_PRIO_SYSTEM_ZSWAP_DUPP_ENTRY, + .prio = NETDATA_CHART_PRIO_MEM_ZSWAP_DUPP_ENTRY, .divisor = 1, .convertv = NULL, .value = -1}, @@ -175,7 +175,7 @@ static struct netdata_zswap_metric zswap_rejected_metrics[] = { .charttype = RRDSET_TYPE_STACKED, .enabled = CONFIG_BOOLEAN_YES, .chart_created = CONFIG_BOOLEAN_NO, - .prio = NETDATA_CHART_PRIO_SYSTEM_ZSWAP_REJECTS, + .prio = NETDATA_CHART_PRIO_MEM_ZSWAP_REJECTS, .divisor = 1, .convertv = NULL, .value = -1}, @@ -188,7 +188,7 @@ static struct netdata_zswap_metric zswap_rejected_metrics[] = { .charttype = RRDSET_TYPE_STACKED, .enabled = CONFIG_BOOLEAN_YES, .chart_created = CONFIG_BOOLEAN_NO, - .prio = NETDATA_CHART_PRIO_SYSTEM_ZSWAP_REJECTS, + .prio = NETDATA_CHART_PRIO_MEM_ZSWAP_REJECTS, .divisor = 1, .convertv = NULL, .value = -1}, @@ -201,7 +201,7 @@ static struct netdata_zswap_metric zswap_rejected_metrics[] = { .charttype = RRDSET_TYPE_STACKED, .enabled = CONFIG_BOOLEAN_YES, .chart_created = CONFIG_BOOLEAN_NO, - .prio = NETDATA_CHART_PRIO_SYSTEM_ZSWAP_REJECTS, + .prio = NETDATA_CHART_PRIO_MEM_ZSWAP_REJECTS, .divisor = 1, .convertv = NULL, .value = -1}, @@ -214,7 +214,7 @@ static struct netdata_zswap_metric zswap_rejected_metrics[] = { .charttype = RRDSET_TYPE_STACKED, .enabled = CONFIG_BOOLEAN_YES, .chart_created = CONFIG_BOOLEAN_NO, - .prio = NETDATA_CHART_PRIO_SYSTEM_ZSWAP_REJECTS, + .prio = NETDATA_CHART_PRIO_MEM_ZSWAP_REJECTS, .divisor = 1, .convertv = NULL, .value = -1}, @@ -227,7 +227,7 @@ static struct netdata_zswap_metric zswap_rejected_metrics[] = { .charttype = RRDSET_TYPE_STACKED, .enabled = CONFIG_BOOLEAN_YES, .chart_created = CONFIG_BOOLEAN_NO, - .prio = NETDATA_CHART_PRIO_SYSTEM_ZSWAP_REJECTS, + .prio = NETDATA_CHART_PRIO_MEM_ZSWAP_REJECTS, .divisor = 1, .convertv = NULL, .value = -1}, @@ -266,7 +266,7 @@ zswap_send_chart(struct netdata_zswap_metric *metric, int update_every, const ch { fprintf( stdout, - "CHART system.zswap_%s '' '%s' '%s' 'zswap' '' '%s' %d %d '%s' 'debugfs.plugin' '%s'\n", + "CHART mem.zswap_%s '' '%s' '%s' 'zswap' '' '%s' %d %d '%s' 'debugfs.plugin' '%s'\n", metric->chart_id, metric->title, metric->units, @@ -291,7 +291,7 @@ static void zswap_send_dimension(struct netdata_zswap_metric *metric) static void zswap_send_begin(struct netdata_zswap_metric *metric) { - fprintf(stdout, "BEGIN system.zswap_%s\n", metric->chart_id); + fprintf(stdout, "BEGIN mem.zswap_%s\n", metric->chart_id); } static void zswap_send_set(struct netdata_zswap_metric *metric) diff --git a/collectors/ebpf.plugin/ebpf_swap.c b/collectors/ebpf.plugin/ebpf_swap.c index ff74ee842e4989..7b1dad5ecb0e44 100644 --- a/collectors/ebpf.plugin/ebpf_swap.c +++ b/collectors/ebpf.plugin/ebpf_swap.c @@ -322,13 +322,13 @@ void ebpf_obsolete_swap_apps_charts(struct ebpf_module *em) */ static void ebpf_obsolete_swap_global(ebpf_module_t *em) { - ebpf_write_chart_obsolete(NETDATA_EBPF_SYSTEM_GROUP, + ebpf_write_chart_obsolete(NETDATA_EBPF_MEMORY_GROUP, NETDATA_MEM_SWAP_CHART, "Calls to access swap memory", EBPF_COMMON_DIMENSION_CALL, NETDATA_SYSTEM_SWAP_SUBMENU, NETDATA_EBPF_CHART_TYPE_LINE, NULL, - NETDATA_CHART_PRIO_SYSTEM_SWAP_CALLS, + NETDATA_CHART_PRIO_MEM_SWAP_CALLS, em->update_every); } @@ -914,12 +914,12 @@ static void ebpf_swap_allocate_global_vectors(int apps) */ static void ebpf_create_swap_charts(int update_every) { - ebpf_create_chart(NETDATA_EBPF_SYSTEM_GROUP, NETDATA_MEM_SWAP_CHART, + ebpf_create_chart(NETDATA_EBPF_MEMORY_GROUP, NETDATA_MEM_SWAP_CHART, "Calls to access swap memory", EBPF_COMMON_DIMENSION_CALL, NETDATA_SYSTEM_SWAP_SUBMENU, NULL, NETDATA_EBPF_CHART_TYPE_LINE, - NETDATA_CHART_PRIO_SYSTEM_SWAP_CALLS, + NETDATA_CHART_PRIO_MEM_SWAP_CALLS, ebpf_create_global_dimension, swap_publish_aggregated, NETDATA_SWAP_END, update_every, NETDATA_EBPF_MODULE_NAME_SWAP); diff --git a/collectors/freebsd.plugin/freebsd_sysctl.c b/collectors/freebsd.plugin/freebsd_sysctl.c index c8aa5dad545542..84289aafa8746e 100644 --- a/collectors/freebsd.plugin/freebsd_sysctl.c +++ b/collectors/freebsd.plugin/freebsd_sysctl.c @@ -1035,7 +1035,7 @@ int do_vm_stats_sys_v_swappgs(int update_every, usec_t dt) { if (unlikely(!st)) { st = rrdset_create_localhost( - "system", + "mem", "swapio", NULL, "swap", @@ -1044,7 +1044,7 @@ int do_vm_stats_sys_v_swappgs(int update_every, usec_t dt) { "KiB/s", "freebsd.plugin", "vm.stats.vm.v_swappgs", - NETDATA_CHART_PRIO_SYSTEM_SWAPIO, + NETDATA_CHART_PRIO_MEM_SWAPIO, update_every, RRDSET_TYPE_AREA ); diff --git a/collectors/proc.plugin/multi_metadata.yaml b/collectors/proc.plugin/multi_metadata.yaml index 04e66ddfe61503..bdbce89f98fcea 100644 --- a/collectors/proc.plugin/multi_metadata.yaml +++ b/collectors/proc.plugin/multi_metadata.yaml @@ -20,27 +20,50 @@ modules: most_popular: false overview: data_collection: - metrics_description: "This integration provides a collection of statistics about the system such as CPU utilization, process counts and more." + metrics_description: | + CPU utilization, states and frequencies and key Linux system performance metrics. + + The `/proc/stat` file provides various types of system statistics: + + - The overall system CPU usage statistics + - Per CPU core statistics + - The total context switching of the system + - The total number of processes running + - The total CPU interrupts + - The total CPU softirqs + + The collector also reads: + + - `/proc/schedstat` for statistics about the process scheduler in the Linux kernel. + - `/sys/devices/system/cpu/[X]/thermal_throttle/core_throttle_count` to get the count of thermal throttling events for a specific CPU core on Linux systems. + - `/sys/devices/system/cpu/[X]/thermal_throttle/package_throttle_count` to get the count of thermal throttling events for a specific CPU package on a Linux system. + - `/sys/devices/system/cpu/[X]/cpufreq/scaling_cur_freq` to get the current operating frequency of a specific CPU core. + - `/sys/devices/system/cpu/[X]/cpufreq/stats/time_in_state` to get the amount of time the CPU has spent in each of its available frequency states. + - `/sys/devices/system/cpu/[X]/cpuidle/state[X]/name` to get the names of the idle states for each CPU core in a Linux system. + - `/sys/devices/system/cpu/[X]/cpuidle/state[X]/time` to get the total time each specific CPU core has spent in each idle state since the system was started. method_description: "" supported_platforms: - include: [] + include: [ "linux" ] exclude: [] - multi_instance: true + multi_instance: false additional_permissions: description: "" default_behavior: auto_detection: - description: "" + description: | + The collector auto-detects all metrics. No configuration is needed. limits: description: "" performance_impact: - description: "" + description: | + The collector disables cpu frequency and idle state monitoring when there are more than 128 CPU cores available. setup: prerequisites: list: [] configuration: file: - name: "" + section_name: "plugin:proc:/proc/stat" + name: "netdata.conf" description: "" options: description: "" @@ -187,12 +210,43 @@ modules: most_popular: false overview: data_collection: - metrics_description: "" + metrics_description: | + Entropy, a measure of the randomness or unpredictability of data. + + In the context of cryptography, entropy is used to generate random numbers or keys that are essential for + secure communication and encryption. Without a good source of entropy, cryptographic protocols can become + vulnerable to attacks that exploit the predictability of the generated keys. + + In most operating systems, entropy is generated by collecting random events from various sources, such as + hardware interrupts, mouse movements, keyboard presses, and disk activity. These events are fed into a pool + of entropy, which is then used to generate random numbers when needed. + + The `/dev/random` device in Linux is one such source of entropy, and it provides an interface for programs + to access the pool of entropy. When a program requests random numbers, it reads from the `/dev/random` device, + which blocks until enough entropy is available to generate the requested numbers. This ensures that the + generated numbers are truly random and not predictable. + + However, if the pool of entropy gets depleted, the `/dev/random` device may block indefinitely, causing + programs that rely on random numbers to slow down or even freeze. This is especially problematic for + cryptographic protocols that require a continuous stream of random numbers, such as SSL/TLS and SSH. + + To avoid this issue, some systems use a hardware random number generator (RNG) to generate high-quality + entropy. A hardware RNG generates random numbers by measuring physical phenomena, such as thermal noise or + radioactive decay. These sources of randomness are considered to be more reliable and unpredictable than + software-based sources. + + One such hardware RNG is the Trusted Platform Module (TPM), which is a dedicated hardware chip that is used + for cryptographic operations and secure boot. The TPM contains a built-in hardware RNG that generates + high-quality entropy, which can be used to seed the pool of entropy in the operating system. + + Alternatively, software-based solutions such as `Haveged` can be used to generate additional entropy by + exploiting sources of randomness in the system, such as CPU utilization and network traffic. These solutions + can help to mitigate the risk of entropy depletion, but they may not be as reliable as hardware-based solutions. method_description: "" supported_platforms: - include: [] + include: [ "linux" ] exclude: [] - multi_instance: true + multi_instance: false additional_permissions: description: "" default_behavior: @@ -264,12 +318,23 @@ modules: most_popular: false overview: data_collection: - metrics_description: "This integration provides the amount of time the system has been up (running)." + metrics_description: | + The amount of time the system has been up (running). + + Uptime is a critical aspect of overall system performance: + + - **Availability**: Uptime monitoring can show whether a server is consistently available or experiences frequent downtimes. + - **Performance Monitoring**: While server uptime alone doesn't provide detailed performance data, analyzing the duration and frequency of downtimes can help identify patterns or trends. + - **Proactive problem detection**: If server uptime monitoring reveals unexpected downtimes or a decreasing uptime trend, it can serve as an early warning sign of potential problems. + - **Root cause analysis**: When investigating server downtime, the uptime metric alone may not provide enough information to pinpoint the exact cause. + - **Load balancing**: Uptime data can indirectly indicate load balancing issues if certain servers have significantly lower uptimes than others. + - **Optimize maintenance efforts**: Servers with consistently low uptimes or frequent downtimes may require more attention. + - **Compliance requirements**: Server uptime data can be used to demonstrate compliance with regulatory requirements or SLAs that mandate a minimum level of server availability. method_description: "" supported_platforms: - include: [] + include: [ "linux" ] exclude: [] - multi_instance: true + multi_instance: false additional_permissions: description: "" default_behavior: @@ -340,12 +405,33 @@ modules: most_popular: false overview: data_collection: - metrics_description: "This integration provides information about process, memory, swap space utilization and many more." + metrics_description: | + Linux Virtual memory subsystem. + + Information about memory management, indicating how effectively the kernel allocates and frees + memory resources in response to system demands. + + Monitors page faults, which occur when a process requests a portion of its memory that isn't + immediately available. Monitoring these events can help diagnose inefficiencies in memory management and + provide insights into application behavior. + + Tracks swapping activity — a vital aspect of memory management where the kernel moves data from RAM to + swap space, and vice versa, based on memory demand and usage. It also monitors the utilization of zswap, + a compressed cache for swap pages, and provides insights into its usage and performance implications. + + In the context of virtualized environments, it tracks the ballooning mechanism which is used to balance + memory resources between host and guest systems. + + For systems using NUMA architecture, it provides insights into the local and remote memory accesses, which + can impact the performance based on the memory access times. + + The collector also watches for 'Out of Memory' kills, a drastic measure taken by the system when it runs out + of memory resources. method_description: "" supported_platforms: - include: [] + include: [ "linux" ] exclude: [] - multi_instance: true + multi_instance: false additional_permissions: description: "" default_behavior: @@ -535,7 +621,37 @@ modules: most_popular: false overview: data_collection: - metrics_description: "Monitor Interrupts metrics for efficient processor interrupt handling." + metrics_description: | + Monitors `/proc/interrupts`, a file organized by CPU and then by the type of interrupt. + The numbers reported are the counts of the interrupts that have occurred of each type. + + An interrupt is a signal to the processor emitted by hardware or software indicating an event that needs + immediate attention. The processor then interrupts its current activities and executes the interrupt handler + to deal with the event. This is part of the way a computer multitasks and handles concurrent processing. + + The types of interrupts include: + + - **I/O interrupts**: These are caused by I/O devices like the keyboard, mouse, printer, etc. For example, when + you type something on the keyboard, an interrupt is triggered so the processor can handle the new input. + + - **Timer interrupts**: These are generated at regular intervals by the system's timer circuit. It's primarily + used to switch the CPU among different tasks. + + - **Software interrupts**: These are generated by a program requiring disk I/O operations, or other system resources. + + - **Hardware interrupts**: These are caused by hardware conditions such as power failure, overheating, etc. + + Monitoring `/proc/interrupts` can be used for: + + - **Performance tuning**: If an interrupt is happening very frequently, it could be a sign that a device is not + configured correctly, or there is a software bug causing unnecessary interrupts. This could lead to system + performance degradation. + + - **System troubleshooting**: If you're seeing a lot of unexpected interrupts, it could be a sign of a hardware problem. + + - **Understanding system behavior**: More generally, keeping an eye on what interrupts are occurring can help you + understand what your system is doing. It can provide insights into the system's interaction with hardware, + drivers, and other parts of the kernel. method_description: "" supported_platforms: include: [] @@ -621,12 +737,35 @@ modules: most_popular: false overview: data_collection: - metrics_description: "This integration provides the system load average for the last 1, 5, and 15 minutes." + metrics_description: | + The `/proc/loadavg` file provides information about the system load average. + + The load average is a measure of the amount of computational work that a system performs. It is a + representation of the average system load over a period of time. + + This file contains three numbers representing the system load averages for the last 1, 5, and 15 minutes, + respectively. It also includes the currently running processes and the total number of processes. + + Monitoring the load average can be used for: + + - **System performance**: If the load average is too high, it may indicate that your system is overloaded. + On a system with a single CPU, if the load average is 1, it means the single CPU is fully utilized. If the + load averages are consistently higher than the number of CPUs/cores, it may indicate that your system is + overloaded and tasks are waiting for CPU time. + + - **Troubleshooting**: If the load average is unexpectedly high, it can be a sign of a problem. This could be + due to a runaway process, a software bug, or a hardware issue. + + - **Capacity planning**: By monitoring the load average over time, you can understand the trends in your + system's workload. This can help with capacity planning and scaling decisions. + + Remember that load average not only considers CPU usage, but also includes processes waiting for disk I/O. + Therefore, high load averages could be due to I/O contention as well as CPU contention. method_description: "" supported_platforms: include: [] exclude: [] - multi_instance: true + multi_instance: false additional_permissions: description: "" default_behavior: @@ -726,12 +865,35 @@ modules: most_popular: false overview: data_collection: - metrics_description: "This integration measures system pressure, which can indicate resource shortages in CPU, memory, or I/O." + metrics_description: | + Introduced in Linux kernel 4.20, `/proc/pressure` provides information about system pressure stall information + (PSI). PSI is a feature that allows the system to track the amount of time the system is stalled due to + resource contention, such as CPU, memory, or I/O. + + The collectors monitored 3 separate files for CPU, memory, and I/O: + + - **cpu**: Tracks the amount of time tasks are stalled due to CPU contention. + - **memory**: Tracks the amount of time tasks are stalled due to memory contention. + - **io**: Tracks the amount of time tasks are stalled due to I/O contention. + - **irq**: Tracks the amount of time tasks are stalled due to IRQ contention. + + Each of them provides metrics for stall time over the last 10 seconds, 1 minute, 5 minutes, and 15 minutes. + + Monitoring the /proc/pressure files can provide important insights into system performance and capacity planning: + + - **Identifying resource contention**: If these metrics are consistently high, it indicates that tasks are + frequently being stalled due to lack of resources, which can significantly degrade system performance. + + - **Troubleshooting performance issues**: If a system is experiencing performance issues, these metrics can + help identify whether resource contention is the cause. + + - **Capacity planning**: By monitoring these metrics over time, you can understand trends in resource + utilization and make informed decisions about when to add more resources to your system. method_description: "" supported_platforms: include: [] exclude: [] - multi_instance: true + multi_instance: false additional_permissions: description: "" default_behavior: @@ -878,7 +1040,29 @@ modules: most_popular: false overview: data_collection: - metrics_description: "Monitor SoftIRQs metrics for efficient software interrupt operations." + metrics_description: | + In the Linux kernel, handling of hardware interrupts is split into two halves: the top half and the bottom half. + The top half is the routine that responds immediately to an interrupt, while the bottom half is deferred to be processed later. + + Softirqs are a mechanism in the Linux kernel used to handle the bottom halves of interrupts, which can be + deferred and processed later in a context where it's safe to enable interrupts. + + The actual work of handling the interrupt is offloaded to a softirq and executed later when the system + decides it's a good time to process them. This helps to keep the system responsive by not blocking the top + half for too long, which could lead to missed interrupts. + + Monitoring `/proc/softirqs` is useful for: + + - **Performance tuning**: A high rate of softirqs could indicate a performance issue. For instance, a high + rate of network softirqs (`NET_RX` and `NET_TX`) could indicate a network performance issue. + + - **Troubleshooting**: If a system is behaving unexpectedly, checking the softirqs could provide clues about + what is going on. For example, a sudden increase in block device softirqs (BLOCK) might indicate a problem + with a disk. + + - **Understanding system behavior**: Knowing what types of softirqs are happening can help you understand what + your system is doing, particularly in terms of how it's interacting with hardware and how it's handling + interrupts. method_description: "" supported_platforms: include: [] @@ -963,7 +1147,29 @@ modules: most_popular: false overview: data_collection: - metrics_description: "This integration provides statistics on Softnet, such as processed events, dropped events and more." + metrics_description: | + `/proc/net/softnet_stat` provides statistics that relate to the handling of network packets by softirq. + + It provides information about: + + - Total number of processed packets (`processed`). + - Times ksoftirq ran out of quota (`dropped`). + - Times net_rx_action was rescheduled. + - Number of times processed all lists before quota. + - Number of times did not process all lists due to quota. + - Number of times net_rx_action was rescheduled for GRO (Generic Receive Offload) cells. + - Number of times GRO cells were processed. + + Monitoring the /proc/net/softnet_stat file can be useful for: + + - **Network performance monitoring**: By tracking the total number of processed packets and how many packets + were dropped, you can gain insights into your system's network performance. + + - **Troubleshooting**: If you're experiencing network-related issues, this collector can provide valuable clues. + For instance, a high number of dropped packets may indicate a network problem. + + - **Capacity planning**: If your system is consistently processing near its maximum capacity of network + packets, it might be time to consider upgrading your network infrastructure. method_description: "" supported_platforms: include: [] @@ -1069,12 +1275,28 @@ modules: most_popular: false overview: data_collection: - metrics_description: "Monitor memory usage metrics for efficient system memory management." + metrics_description: | + `/proc/meminfo` provides detailed information about the system's current memory usage. It includes information + about different types of memory, RAM, Swap, ZSwap, HugePages, Transparent HugePages (THP), Kernel memory, + SLAB memory, memory mappings, and more. + + Monitoring /proc/meminfo can be useful for: + + - **Performance Tuning**: Understanding your system's memory usage can help you make decisions about system + tuning and optimization. For example, if your system is frequently low on free memory, it might benefit + from more RAM. + + - **Troubleshooting**: If your system is experiencing problems, `/proc/meminfo` can provide clues about + whether memory usage is a factor. For example, if your system is slow and cached swap is high, it could + mean that your system is swapping out a lot of memory to disk, which can degrade performance. + + - **Capacity Planning**: By monitoring memory usage over time, you can understand trends and make informed + decisions about future capacity needs. method_description: "" supported_platforms: include: [] exclude: [] - multi_instance: true + multi_instance: false additional_permissions: description: "" default_behavior: @@ -1152,13 +1374,26 @@ modules: chart_type: area dimensions: - name: avail - - name: system.swap + - name: mem.swap description: System Swap unit: "MiB" chart_type: stacked dimensions: - name: free - name: used + - name: mem.swap_cached + description: Swap Memory Cached in RAM + unit: "MiB" + chart_type: stacked + dimensions: + - name: cached + - name: mem.zswap + description: Zswap Usage + unit: "MiB" + chart_type: stacked + dimensions: + - name: in-ram + - name: on-disk - name: mem.hwcorrupt description: Corrupted Memory detected by ECC unit: "MiB" @@ -1198,7 +1433,7 @@ modules: dimensions: - name: reclaimable - name: unreclaimable - - name: mem.hugepage + - name: mem.hugepages description: Dedicated HugePages Memory unit: "MiB" chart_type: stacked @@ -1207,13 +1442,59 @@ modules: - name: used - name: surplus - name: reserved - - name: mem.transparent_hugepages + - name: mem.thp description: Transparent HugePages Memory unit: "MiB" chart_type: stacked dimensions: - name: anonymous - name: shmem + - name: mem.thp_details + description: Details of Transparent HugePages Usage + unit: "MiB" + chart_type: line + dimensions: + - name: ShmemPmdMapped + - name: FileHugePages + - name: FilePmdMapped + - name: mem.reclaiming + description: Memory Reclaiming + unit: "MiB" + chart_type: line + dimensions: + - name: Active + - name: Inactive + - name: Active(anon) + - name: Inactive(anon) + - name: Active(file) + - name: Inactive(file) + - name: Unevictable + - name: Mlocked + - name: mem.high_low + description: High and Low Used and Free Memory Areas + unit: "MiB" + chart_type: stacked + dimensions: + - name: high_used + - name: low_used + - name: high_free + - name: low_free + - name: mem.cma + description: Contiguous Memory Allocator (CMA) Memory + unit: "MiB" + chart_type: stacked + dimensions: + - name: used + - name: free + - name: mem.directmaps + description: Direct Memory Mappings + unit: "MiB" + chart_type: stacked + dimensions: + - name: 4k + - name: 2m + - name: 4m + - name: 1g - meta: plugin_name: proc.plugin module_name: /proc/pagetypeinfo @@ -1238,7 +1519,7 @@ modules: supported_platforms: include: [] exclude: [] - multi_instance: true + multi_instance: false additional_permissions: description: "" default_behavior: @@ -1326,7 +1607,20 @@ modules: most_popular: false overview: data_collection: - metrics_description: "This integration monitors system memory errors detected and corrected by ECC RAM." + metrics_description: | + The Error Detection and Correction (EDAC) subsystem is detecting and reporting errors in the system's memory, + primarily ECC (Error-Correcting Code) memory errors. + + The collector provides data for: + + - Per memory controller (MC): correctable and uncorrectable errors. These can be of 2 kinds: + - errors related to a DIMM + - errors that cannot be associated with a DIMM + + - Per memory DIMM: correctable and uncorrectable errors. There are 2 kinds: + - memory controllers that can identify the physical DIMMS and report errors directly for them, + - memory controllers that report errors for memory address ranges that can be linked to dimms. + In this case the DIMMS reported may be more than the physical DIMMS installed. method_description: "" supported_platforms: include: [] @@ -1423,7 +1717,7 @@ modules: - name: dimm_location description: Location of the memory module. - name: dimm_mem_type - description: Type of the memory module. Usually either buffered or unbuffered memory. + description: Type of the memory module. - name: size description: The amount of memory in megabytes that this memory module manages. metrics: @@ -1453,7 +1747,19 @@ modules: most_popular: false overview: data_collection: - metrics_description: "Monitor NUMA metrics for efficient non-uniform memory access operations." + metrics_description: | + Information about NUMA (Non-Uniform Memory Access) nodes on the system. + + NUMA is a method of configuring a cluster of microprocessor in a multiprocessing system so that they can + share memory locally, improving performance and the ability of the system to be expanded. NUMA is used in a + symmetric multiprocessing (SMP) system. + + In a NUMA system, processors, memory, and I/O devices are grouped together into cells, also known as nodes. + Each node has its own memory and set of I/O devices, and one or more processors. While a processor can access + memory in any of the nodes, it does so faster when accessing memory within its own node. + + The collector provides statistics on memory allocations for processes running on the NUMA nodes, revealing the + efficiency of memory allocations in multi-node systems. method_description: "" supported_platforms: include: [] @@ -1530,15 +1836,23 @@ modules: description: "" keywords: - ksm + - samepage + - merging most_popular: false overview: data_collection: - metrics_description: "Examine KSM metrics for insights into memory deduplication operations." + metrics_description: | + Kernel Samepage Merging (KSM) is a memory-saving feature in Linux that enables the kernel to examine the + memory of different processes and identify identical pages. It then merges these identical pages into a + single page that the processes share. This is particularly useful for virtualization, where multiple virtual + machines might be running the same operating system or applications and have many identical pages. + + The collector provides information about the operation and effectiveness of KSM on your system. method_description: "" supported_platforms: include: [] exclude: [] - multi_instance: true + multi_instance: false additional_permissions: description: "" default_behavior: @@ -1622,7 +1936,11 @@ modules: most_popular: false overview: data_collection: - metrics_description: "This integration monitors ZRAM usage, compression ratios, and more." + metrics_description: | + zRAM, or compressed RAM, is a block device that uses a portion of your system's RAM as a block device. + The data written to this block device is compressed and stored in memory. + + The collectors provides information about the operation and the effectiveness of zRAM on your system. method_description: "" supported_platforms: include: [] @@ -1715,15 +2033,30 @@ modules: keywords: - ipc - semaphores + - shared memory most_popular: false overview: data_collection: - metrics_description: "Monitor Inter Process Communication performance for optimal process interaction." + metrics_description: | + IPC stands for Inter-Process Communication. It is a mechanism which allows processes to communicate with each + other and synchronize their actions. + + This collector exposes information about: + + - Message Queues: This allows messages to be exchanged between processes. It's a more flexible method that + allows messages to be placed onto a queue and read at a later time. + + - Shared Memory: This method allows for the fastest form of IPC because processes can exchange data by + reading/writing into shared memory segments. + + - Semaphores: They are used to synchronize the operations performed by independent processes. So, if multiple + processes are trying to access a single shared resource, semaphores can ensure that only one process + accesses the resource at a given time. method_description: "" supported_platforms: include: [] exclude: [] - multi_instance: true + multi_instance: false additional_permissions: description: "" default_behavior: @@ -1828,13 +2161,18 @@ modules: description: "" keywords: - disk + - disks - io - bcache - block devices most_popular: false overview: data_collection: - metrics_description: "This integration provides statistics about disk and Bcache I/O." + metrics_description: | + Detailed statistics for each of your system's disk devices and partitions. + The data is reported by the kernel and can be used to monitor disk activity on a Linux system. + + Get valuable insight into how your disks are performing and where potential bottlenecks might be. method_description: "" supported_platforms: include: [] diff --git a/collectors/proc.plugin/proc_meminfo.c b/collectors/proc.plugin/proc_meminfo.c index 6988c70e01683f..cd1ba872c763b0 100644 --- a/collectors/proc.plugin/proc_meminfo.c +++ b/collectors/proc.plugin/proc_meminfo.c @@ -9,58 +9,92 @@ int do_proc_meminfo(int update_every, usec_t dt) { (void)dt; static procfile *ff = NULL; - static int do_ram = -1, do_swap = -1, do_hwcorrupt = -1, do_committed = -1, do_writeback = -1, do_kernel = -1, do_slab = -1, do_hugepages = -1, do_transparent_hugepages = -1; - static int do_percpu = 0; + static int do_ram = -1 + , do_swap = -1 + , do_hwcorrupt = -1 + , do_committed = -1 + , do_writeback = -1 + , do_kernel = -1 + , do_slab = -1 + , do_hugepages = -1 + , do_transparent_hugepages = -1 + , do_reclaiming = -1 + , do_high_low = -1 + , do_cma = -1 + , do_directmap = -1; static ARL_BASE *arl_base = NULL; - static ARL_ENTRY *arl_hwcorrupted = NULL, *arl_memavailable = NULL; + static ARL_ENTRY *arl_hwcorrupted = NULL, *arl_memavailable = NULL, *arl_hugepages_total = NULL, + *arl_zswapped = NULL, *arl_high_low = NULL, *arl_cma_total = NULL, + *arl_directmap4k = NULL, *arl_directmap2m = NULL, *arl_directmap4m = NULL, *arl_directmap1g = NULL; static unsigned long long - MemTotal = 0, - MemFree = 0, - MemAvailable = 0, - Buffers = 0, - Cached = 0, - //SwapCached = 0, - //Active = 0, - //Inactive = 0, - //ActiveAnon = 0, - //InactiveAnon = 0, - //ActiveFile = 0, - //InactiveFile = 0, - //Unevictable = 0, - //Mlocked = 0, - SwapTotal = 0, - SwapFree = 0, - Dirty = 0, - Writeback = 0, - //AnonPages = 0, - //Mapped = 0, - Shmem = 0, - Slab = 0, - SReclaimable = 0, - SUnreclaim = 0, - KernelStack = 0, - PageTables = 0, - NFS_Unstable = 0, - Bounce = 0, - WritebackTmp = 0, - //CommitLimit = 0, - Committed_AS = 0, - //VmallocTotal = 0, - VmallocUsed = 0, - //VmallocChunk = 0, - Percpu = 0, - AnonHugePages = 0, - ShmemHugePages = 0, - HugePages_Total = 0, - HugePages_Free = 0, - HugePages_Rsvd = 0, - HugePages_Surp = 0, - Hugepagesize = 0, - //DirectMap4k = 0, - //DirectMap2M = 0, - HardwareCorrupted = 0; + MemTotal = 0 + , MemFree = 0 + , MemAvailable = 0 + , Buffers = 0 + , Cached = 0 + , SwapCached = 0 + , Active = 0 + , Inactive = 0 + , ActiveAnon = 0 + , InactiveAnon = 0 + , ActiveFile = 0 + , InactiveFile = 0 + , Unevictable = 0 + , Mlocked = 0 + , HighTotal = 0 + , HighFree = 0 + , LowTotal = 0 + , LowFree = 0 + , MmapCopy = 0 + , SwapTotal = 0 + , SwapFree = 0 + , Zswap = 0 + , Zswapped = 0 + , Dirty = 0 + , Writeback = 0 + , AnonPages = 0 + , Mapped = 0 + , Shmem = 0 + , KReclaimable = 0 + , Slab = 0 + , SReclaimable = 0 + , SUnreclaim = 0 + , KernelStack = 0 + , ShadowCallStack = 0 + , PageTables = 0 + , SecPageTables = 0 + , NFS_Unstable = 0 + , Bounce = 0 + , WritebackTmp = 0 + , CommitLimit = 0 + , Committed_AS = 0 + , VmallocTotal = 0 + , VmallocUsed = 0 + , VmallocChunk = 0 + , Percpu = 0 + //, EarlyMemtestBad = 0 + , HardwareCorrupted = 0 + , AnonHugePages = 0 + , ShmemHugePages = 0 + , ShmemPmdMapped = 0 + , FileHugePages = 0 + , FilePmdMapped = 0 + , CmaTotal = 0 + , CmaFree = 0 + //, Unaccepted = 0 + , HugePages_Total = 0 + , HugePages_Free = 0 + , HugePages_Rsvd = 0 + , HugePages_Surp = 0 + , Hugepagesize = 0 + //, Hugetlb = 0 + , DirectMap4k = 0 + , DirectMap2M = 0 + , DirectMap4M = 0 + , DirectMap1G = 0 + ; if(unlikely(!arl_base)) { do_ram = config_get_boolean(CONFIG_SECTION_PLUGIN_PROC_MEMINFO, "system ram", 1); @@ -72,6 +106,12 @@ int do_proc_meminfo(int update_every, usec_t dt) { do_slab = config_get_boolean(CONFIG_SECTION_PLUGIN_PROC_MEMINFO, "slab memory", 1); do_hugepages = config_get_boolean_ondemand(CONFIG_SECTION_PLUGIN_PROC_MEMINFO, "hugepages", CONFIG_BOOLEAN_AUTO); do_transparent_hugepages = config_get_boolean_ondemand(CONFIG_SECTION_PLUGIN_PROC_MEMINFO, "transparent hugepages", CONFIG_BOOLEAN_AUTO); + do_reclaiming = config_get_boolean(CONFIG_SECTION_PLUGIN_PROC_MEMINFO, "memory reclaiming", CONFIG_BOOLEAN_AUTO); + do_high_low = config_get_boolean(CONFIG_SECTION_PLUGIN_PROC_MEMINFO, "high low memory", CONFIG_BOOLEAN_AUTO); + do_cma = config_get_boolean(CONFIG_SECTION_PLUGIN_PROC_MEMINFO, "cma memory", CONFIG_BOOLEAN_AUTO); + do_directmap = config_get_boolean(CONFIG_SECTION_PLUGIN_PROC_MEMINFO, "direct maps", CONFIG_BOOLEAN_AUTO); + + // https://github.com/torvalds/linux/blob/master/fs/proc/meminfo.c arl_base = arl_create("meminfo", NULL, 60); arl_expect(arl_base, "MemTotal", &MemTotal); @@ -79,46 +119,90 @@ int do_proc_meminfo(int update_every, usec_t dt) { arl_memavailable = arl_expect(arl_base, "MemAvailable", &MemAvailable); arl_expect(arl_base, "Buffers", &Buffers); arl_expect(arl_base, "Cached", &Cached); - //arl_expect(arl_base, "SwapCached", &SwapCached); - //arl_expect(arl_base, "Active", &Active); - //arl_expect(arl_base, "Inactive", &Inactive); - //arl_expect(arl_base, "ActiveAnon", &ActiveAnon); - //arl_expect(arl_base, "InactiveAnon", &InactiveAnon); - //arl_expect(arl_base, "ActiveFile", &ActiveFile); - //arl_expect(arl_base, "InactiveFile", &InactiveFile); - //arl_expect(arl_base, "Unevictable", &Unevictable); - //arl_expect(arl_base, "Mlocked", &Mlocked); + arl_expect(arl_base, "SwapCached", &SwapCached); + arl_expect(arl_base, "Active", &Active); + arl_expect(arl_base, "Inactive", &Inactive); + arl_expect(arl_base, "Active(anon)", &ActiveAnon); + arl_expect(arl_base, "Inactive(anon)", &InactiveAnon); + arl_expect(arl_base, "Active(file)", &ActiveFile); + arl_expect(arl_base, "Inactive(file)", &InactiveFile); + arl_expect(arl_base, "Unevictable", &Unevictable); + arl_expect(arl_base, "Mlocked", &Mlocked); + + // CONFIG_HIGHMEM + arl_high_low = arl_expect(arl_base, "HighTotal", &HighTotal); + arl_expect(arl_base, "HighFree", &HighFree); + arl_expect(arl_base, "LowTotal", &LowTotal); + arl_expect(arl_base, "LowFree", &LowFree); + + // CONFIG_MMU + arl_expect(arl_base, "MmapCopy", &MmapCopy); + arl_expect(arl_base, "SwapTotal", &SwapTotal); arl_expect(arl_base, "SwapFree", &SwapFree); + + // CONFIG_ZSWAP + arl_zswapped = arl_expect(arl_base, "Zswap", &Zswap); + arl_expect(arl_base, "Zswapped", &Zswapped); + arl_expect(arl_base, "Dirty", &Dirty); arl_expect(arl_base, "Writeback", &Writeback); - //arl_expect(arl_base, "AnonPages", &AnonPages); - //arl_expect(arl_base, "Mapped", &Mapped); + arl_expect(arl_base, "AnonPages", &AnonPages); + arl_expect(arl_base, "Mapped", &Mapped); arl_expect(arl_base, "Shmem", &Shmem); + arl_expect(arl_base, "KReclaimable", &KReclaimable); arl_expect(arl_base, "Slab", &Slab); arl_expect(arl_base, "SReclaimable", &SReclaimable); arl_expect(arl_base, "SUnreclaim", &SUnreclaim); arl_expect(arl_base, "KernelStack", &KernelStack); + + // CONFIG_SHADOW_CALL_STACK + arl_expect(arl_base, "ShadowCallStack", &ShadowCallStack); + arl_expect(arl_base, "PageTables", &PageTables); + arl_expect(arl_base, "SecPageTables", &SecPageTables); arl_expect(arl_base, "NFS_Unstable", &NFS_Unstable); arl_expect(arl_base, "Bounce", &Bounce); arl_expect(arl_base, "WritebackTmp", &WritebackTmp); - //arl_expect(arl_base, "CommitLimit", &CommitLimit); + arl_expect(arl_base, "CommitLimit", &CommitLimit); arl_expect(arl_base, "Committed_AS", &Committed_AS); - //arl_expect(arl_base, "VmallocTotal", &VmallocTotal); + arl_expect(arl_base, "VmallocTotal", &VmallocTotal); arl_expect(arl_base, "VmallocUsed", &VmallocUsed); - //arl_expect(arl_base, "VmallocChunk", &VmallocChunk); + arl_expect(arl_base, "VmallocChunk", &VmallocChunk); arl_expect(arl_base, "Percpu", &Percpu); + + // CONFIG_MEMTEST + //arl_expect(arl_base, "EarlyMemtestBad", &EarlyMemtestBad); + + // CONFIG_MEMORY_FAILURE arl_hwcorrupted = arl_expect(arl_base, "HardwareCorrupted", &HardwareCorrupted); + + // CONFIG_TRANSPARENT_HUGEPAGE arl_expect(arl_base, "AnonHugePages", &AnonHugePages); arl_expect(arl_base, "ShmemHugePages", &ShmemHugePages); - arl_expect(arl_base, "HugePages_Total", &HugePages_Total); + arl_expect(arl_base, "ShmemPmdMapped", &ShmemPmdMapped); + arl_expect(arl_base, "FileHugePages", &FileHugePages); + arl_expect(arl_base, "FilePmdMapped", &FilePmdMapped); + + // CONFIG_CMA + arl_cma_total = arl_expect(arl_base, "CmaTotal", &CmaTotal); + arl_expect(arl_base, "CmaFree", &CmaFree); + + // CONFIG_UNACCEPTED_MEMORY + //arl_expect(arl_base, "Unaccepted", &Unaccepted); + + // these appear only when hugepages are supported + arl_hugepages_total = arl_expect(arl_base, "HugePages_Total", &HugePages_Total); arl_expect(arl_base, "HugePages_Free", &HugePages_Free); arl_expect(arl_base, "HugePages_Rsvd", &HugePages_Rsvd); arl_expect(arl_base, "HugePages_Surp", &HugePages_Surp); arl_expect(arl_base, "Hugepagesize", &Hugepagesize); - //arl_expect(arl_base, "DirectMap4k", &DirectMap4k); - //arl_expect(arl_base, "DirectMap2M", &DirectMap2M); + //arl_expect(arl_base, "Hugetlb", &Hugetlb); + + arl_directmap4k = arl_expect(arl_base, "DirectMap4k", &DirectMap4k); + arl_directmap2m = arl_expect(arl_base, "DirectMap2M", &DirectMap2M); + arl_directmap4m = arl_expect(arl_base, "DirectMap4M", &DirectMap4M); + arl_directmap1g = arl_expect(arl_base, "DirectMap1G", &DirectMap1G); } if(unlikely(!ff)) { @@ -136,26 +220,17 @@ int do_proc_meminfo(int update_every, usec_t dt) { size_t lines = procfile_lines(ff), l; arl_begin(arl_base); - - static int first_ff_read = 1; - for(l = 0; l < lines ;l++) { size_t words = procfile_linewords(ff, l); if(unlikely(words < 2)) continue; - if (first_ff_read && !strcmp(procfile_lineword(ff, l, 0), "Percpu")) - do_percpu = 1; - if(unlikely(arl_check(arl_base, procfile_lineword(ff, l, 0), procfile_lineword(ff, l, 1)))) break; } - if (first_ff_read) - first_ff_read = 0; - // http://calimeroteknik.free.fr/blag/?article20/really-used-memory-on-gnu-linux - unsigned long long MemCached = Cached + SReclaimable - Shmem; + unsigned long long MemCached = Cached + SReclaimable + KReclaimable - Shmem; unsigned long long MemUsed = MemTotal - MemFree - MemCached - Buffers; // The Linux kernel doesn't report ZFS ARC usage as cache memory (the ARC is included in the total used system memory) if (!inside_lxc_container) { @@ -207,7 +282,7 @@ int do_proc_meminfo(int update_every, usec_t dt) { "mem" , "available" , NULL - , "system" + , "overview" , NULL , "Available RAM for applications" , "MiB" @@ -238,7 +313,7 @@ int do_proc_meminfo(int update_every, usec_t dt) { if(unlikely(!st_system_swap)) { st_system_swap = rrdset_create_localhost( - "system" + "mem" , "swap" , NULL , "swap" @@ -247,7 +322,7 @@ int do_proc_meminfo(int update_every, usec_t dt) { , "MiB" , PLUGIN_PROC_NAME , PLUGIN_PROC_MODULE_MEMINFO_NAME - , NETDATA_CHART_PRIO_SYSTEM_SWAP + , NETDATA_CHART_PRIO_MEM_SWAP , update_every , RRDSET_TYPE_STACKED ); @@ -261,6 +336,62 @@ int do_proc_meminfo(int update_every, usec_t dt) { rrddim_set_by_pointer(st_system_swap, rd_used, SwapUsed); rrddim_set_by_pointer(st_system_swap, rd_free, SwapFree); rrdset_done(st_system_swap); + + { + static RRDSET *st_mem_swap_cached = NULL; + static RRDDIM *rd_cached = NULL; + + if (unlikely(!st_mem_swap_cached)) { + st_mem_swap_cached = rrdset_create_localhost( + "mem" + , "swap_cached" + , NULL + , "swap" + , NULL + , "Swap Memory Cached in RAM" + , "MiB" + , PLUGIN_PROC_NAME + , PLUGIN_PROC_MODULE_MEMINFO_NAME + , NETDATA_CHART_PRIO_MEM_SWAP + 1 + , update_every + , RRDSET_TYPE_AREA + ); + + rd_cached = rrddim_add(st_mem_swap_cached, "cached", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); + } + + rrddim_set_by_pointer(st_mem_swap_cached, rd_cached, SwapCached); + rrdset_done(st_mem_swap_cached); + } + + if(arl_zswapped->flags & ARL_ENTRY_FLAG_FOUND) { + static RRDSET *st_mem_zswap = NULL; + static RRDDIM *rd_zswap = NULL, *rd_zswapped = NULL; + + if (unlikely(!st_mem_zswap)) { + st_mem_zswap = rrdset_create_localhost( + "mem" + , "zswap" + , NULL + , "zswap" + , NULL + , "Zswap Usage" + , "MiB" + , PLUGIN_PROC_NAME + , PLUGIN_PROC_MODULE_MEMINFO_NAME + , NETDATA_CHART_PRIO_MEM_ZSWAP + , update_every + , RRDSET_TYPE_STACKED + ); + + rd_zswap = rrddim_add(st_mem_zswap, "zswap", "in-ram", 1, 1024, RRD_ALGORITHM_ABSOLUTE); + rd_zswapped = rrddim_add(st_mem_zswap, "zswapped", "on-disk", 1, 1024, RRD_ALGORITHM_ABSOLUTE); + } + + rrddim_set_by_pointer(st_mem_zswap, rd_zswap, Zswap); + rrddim_set_by_pointer(st_mem_zswap, rd_zswapped, Zswapped); + rrdset_done(st_mem_zswap); + } } if(arl_hwcorrupted->flags & ARL_ENTRY_FLAG_FOUND && @@ -306,7 +437,7 @@ int do_proc_meminfo(int update_every, usec_t dt) { "mem" , "committed" , NULL - , "system" + , "overview" , NULL , "Committed (Allocated) Memory" , "MiB" @@ -335,7 +466,7 @@ int do_proc_meminfo(int update_every, usec_t dt) { "mem" , "writeback" , NULL - , "kernel" + , "writeback" , NULL , "Writeback Memory" , "MiB" @@ -367,7 +498,7 @@ int do_proc_meminfo(int update_every, usec_t dt) { if(do_kernel) { static RRDSET *st_mem_kernel = NULL; static RRDDIM *rd_slab = NULL, *rd_kernelstack = NULL, *rd_pagetables = NULL, *rd_vmallocused = NULL, - *rd_percpu = NULL; + *rd_percpu = NULL, *rd_kreclaimable = NULL; if(unlikely(!st_mem_kernel)) { st_mem_kernel = rrdset_create_localhost( @@ -391,16 +522,16 @@ int do_proc_meminfo(int update_every, usec_t dt) { rd_kernelstack = rrddim_add(st_mem_kernel, "KernelStack", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); rd_pagetables = rrddim_add(st_mem_kernel, "PageTables", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); rd_vmallocused = rrddim_add(st_mem_kernel, "VmallocUsed", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); - if (do_percpu) - rd_percpu = rrddim_add(st_mem_kernel, "Percpu", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); + rd_percpu = rrddim_add(st_mem_kernel, "Percpu", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); + rd_kreclaimable = rrddim_add(st_mem_kernel, "KReclaimable", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); } - rrddim_set_by_pointer(st_mem_kernel, rd_slab, Slab); - rrddim_set_by_pointer(st_mem_kernel, rd_kernelstack, KernelStack); - rrddim_set_by_pointer(st_mem_kernel, rd_pagetables, PageTables); - rrddim_set_by_pointer(st_mem_kernel, rd_vmallocused, VmallocUsed); - if (do_percpu) - rrddim_set_by_pointer(st_mem_kernel, rd_percpu, Percpu); + rrddim_set_by_pointer(st_mem_kernel, rd_slab, Slab); + rrddim_set_by_pointer(st_mem_kernel, rd_kernelstack, KernelStack); + rrddim_set_by_pointer(st_mem_kernel, rd_pagetables, PageTables); + rrddim_set_by_pointer(st_mem_kernel, rd_vmallocused, VmallocUsed); + rrddim_set_by_pointer(st_mem_kernel, rd_percpu, Percpu); + rrddim_set_by_pointer(st_mem_kernel, rd_kreclaimable, KReclaimable); rrdset_done(st_mem_kernel); } @@ -436,9 +567,10 @@ int do_proc_meminfo(int update_every, usec_t dt) { rrdset_done(st_mem_slab); } - if(do_hugepages == CONFIG_BOOLEAN_YES || (do_hugepages == CONFIG_BOOLEAN_AUTO && + if(arl_hugepages_total->flags & ARL_ENTRY_FLAG_FOUND && + (do_hugepages == CONFIG_BOOLEAN_YES || (do_hugepages == CONFIG_BOOLEAN_AUTO && ((Hugepagesize && HugePages_Total) || - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) { + netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES)))) { do_hugepages = CONFIG_BOOLEAN_YES; static RRDSET *st_mem_hugepages = NULL; @@ -455,7 +587,7 @@ int do_proc_meminfo(int update_every, usec_t dt) { , "MiB" , PLUGIN_PROC_NAME , PLUGIN_PROC_MODULE_MEMINFO_NAME - , NETDATA_CHART_PRIO_MEM_HUGEPAGES + 1 + , NETDATA_CHART_PRIO_MEM_HUGEPAGES , update_every , RRDSET_TYPE_STACKED ); @@ -487,7 +619,7 @@ int do_proc_meminfo(int update_every, usec_t dt) { if(unlikely(!st_mem_transparent_hugepages)) { st_mem_transparent_hugepages = rrdset_create_localhost( "mem" - , "transparent_hugepages" + , "thp" , NULL , "hugepages" , NULL @@ -495,7 +627,7 @@ int do_proc_meminfo(int update_every, usec_t dt) { , "MiB" , PLUGIN_PROC_NAME , PLUGIN_PROC_MODULE_MEMINFO_NAME - , NETDATA_CHART_PRIO_MEM_HUGEPAGES + , NETDATA_CHART_PRIO_MEM_HUGEPAGES + 1 , update_every , RRDSET_TYPE_STACKED ); @@ -509,6 +641,206 @@ int do_proc_meminfo(int update_every, usec_t dt) { rrddim_set_by_pointer(st_mem_transparent_hugepages, rd_anonymous, AnonHugePages); rrddim_set_by_pointer(st_mem_transparent_hugepages, rd_shared, ShmemHugePages); rrdset_done(st_mem_transparent_hugepages); + + { + static RRDSET *st_mem_thp_details = NULL; + static RRDDIM *rd_shmem_pmd_mapped = NULL, *rd_file_huge_pages = NULL, *rd_file_pmd_mapped = NULL; + + if(unlikely(!st_mem_thp_details)) { + st_mem_thp_details = rrdset_create_localhost( + "mem" + , "thp_details" + , NULL + , "hugepages" + , NULL + , "Details of Transparent HugePages Usage" + , "MiB" + , PLUGIN_PROC_NAME + , PLUGIN_PROC_MODULE_MEMINFO_NAME + , NETDATA_CHART_PRIO_MEM_HUGEPAGES_DETAILS + , update_every + , RRDSET_TYPE_LINE + ); + + rrdset_flag_set(st_mem_thp_details, RRDSET_FLAG_DETAIL); + + rd_shmem_pmd_mapped = rrddim_add(st_mem_thp_details, "shmem_pmd", "ShmemPmdMapped", 1, 1024, RRD_ALGORITHM_ABSOLUTE); + rd_file_huge_pages = rrddim_add(st_mem_thp_details, "file", "FileHugePages", 1, 1024, RRD_ALGORITHM_ABSOLUTE); + rd_file_pmd_mapped = rrddim_add(st_mem_thp_details, "file_pmd", "FilePmdMapped", 1, 1024, RRD_ALGORITHM_ABSOLUTE); + } + + rrddim_set_by_pointer(st_mem_thp_details, rd_shmem_pmd_mapped, ShmemPmdMapped); + rrddim_set_by_pointer(st_mem_thp_details, rd_file_huge_pages, FileHugePages); + rrddim_set_by_pointer(st_mem_thp_details, rd_file_pmd_mapped, FilePmdMapped); + rrdset_done(st_mem_thp_details); + } + } + + if(do_reclaiming != CONFIG_BOOLEAN_NO) { + static RRDSET *st_mem_reclaiming = NULL; + static RRDDIM *rd_active = NULL, *rd_inactive = NULL, + *rd_active_anon = NULL, *rd_inactive_anon = NULL, + *rd_active_file = NULL, *rd_inactive_file = NULL, + *rd_unevictable = NULL, *rd_mlocked = NULL; + + if(unlikely(!st_mem_reclaiming)) { + st_mem_reclaiming = rrdset_create_localhost( + "mem" + , "reclaiming" + , NULL + , "reclaiming" + , NULL + , "Memory Reclaiming" + , "MiB" + , PLUGIN_PROC_NAME + , PLUGIN_PROC_MODULE_MEMINFO_NAME + , NETDATA_CHART_PRIO_MEM_RECLAIMING + , update_every + , RRDSET_TYPE_LINE + ); + + rrdset_flag_set(st_mem_reclaiming, RRDSET_FLAG_DETAIL); + + rd_active = rrddim_add(st_mem_reclaiming, "active", "Active", 1, 1024, RRD_ALGORITHM_ABSOLUTE); + rd_inactive = rrddim_add(st_mem_reclaiming, "inactive", "Inactive", 1, 1024, RRD_ALGORITHM_ABSOLUTE); + rd_active_anon = rrddim_add(st_mem_reclaiming, "active_anon", "Active(anon)", 1, 1024, RRD_ALGORITHM_ABSOLUTE); + rd_inactive_anon = rrddim_add(st_mem_reclaiming, "inactive_anon", "Inactive(anon)", 1, 1024, RRD_ALGORITHM_ABSOLUTE); + rd_active_file = rrddim_add(st_mem_reclaiming, "active_file", "Active(file)", 1, 1024, RRD_ALGORITHM_ABSOLUTE); + rd_inactive_file = rrddim_add(st_mem_reclaiming, "inactive_file", "Inactive(file)", 1, 1024, RRD_ALGORITHM_ABSOLUTE); + rd_unevictable = rrddim_add(st_mem_reclaiming, "unevictable", "Unevictable", 1, 1024, RRD_ALGORITHM_ABSOLUTE); + rd_mlocked = rrddim_add(st_mem_reclaiming, "mlocked", "Mlocked", 1, 1024, RRD_ALGORITHM_ABSOLUTE); + } + + rrddim_set_by_pointer(st_mem_reclaiming, rd_active, Active); + rrddim_set_by_pointer(st_mem_reclaiming, rd_inactive, Inactive); + rrddim_set_by_pointer(st_mem_reclaiming, rd_active_anon, ActiveAnon); + rrddim_set_by_pointer(st_mem_reclaiming, rd_inactive_anon, InactiveAnon); + rrddim_set_by_pointer(st_mem_reclaiming, rd_active_file, ActiveFile); + rrddim_set_by_pointer(st_mem_reclaiming, rd_inactive_file, InactiveFile); + rrddim_set_by_pointer(st_mem_reclaiming, rd_unevictable, Unevictable); + rrddim_set_by_pointer(st_mem_reclaiming, rd_mlocked, Mlocked); + + rrdset_done(st_mem_reclaiming); + } + + if(do_high_low != CONFIG_BOOLEAN_NO && (arl_high_low->flags & ARL_ENTRY_FLAG_FOUND)) { + static RRDSET *st_mem_high_low = NULL; + static RRDDIM *rd_high_used = NULL, *rd_low_used = NULL; + static RRDDIM *rd_high_free = NULL, *rd_low_free = NULL; + + if(unlikely(!st_mem_high_low)) { + st_mem_high_low = rrdset_create_localhost( + "mem" + , "high_low" + , NULL + , "high_low" + , NULL + , "High and Low Used and Free Memory Areas" + , "MiB" + , PLUGIN_PROC_NAME + , PLUGIN_PROC_MODULE_MEMINFO_NAME + , NETDATA_CHART_PRIO_MEM_HIGH_LOW + , update_every + , RRDSET_TYPE_STACKED + ); + + rrdset_flag_set(st_mem_high_low, RRDSET_FLAG_DETAIL); + + rd_high_used = rrddim_add(st_mem_high_low, "high_used", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); + rd_low_used = rrddim_add(st_mem_high_low, "low_used", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); + rd_high_free = rrddim_add(st_mem_high_low, "high_free", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); + rd_low_free = rrddim_add(st_mem_high_low, "low_free", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); + } + + rrddim_set_by_pointer(st_mem_high_low, rd_high_used, HighTotal - HighFree); + rrddim_set_by_pointer(st_mem_high_low, rd_low_used, LowTotal - LowFree); + rrddim_set_by_pointer(st_mem_high_low, rd_high_free, HighFree); + rrddim_set_by_pointer(st_mem_high_low, rd_low_free, LowFree); + rrdset_done(st_mem_high_low); + } + + if(do_cma == CONFIG_BOOLEAN_YES || (do_cma == CONFIG_BOOLEAN_AUTO && (arl_cma_total->flags & ARL_ENTRY_FLAG_FOUND) && CmaTotal)) { + do_cma = CONFIG_BOOLEAN_YES; + + static RRDSET *st_mem_cma = NULL; + static RRDDIM *rd_used = NULL, *rd_free = NULL; + + if(unlikely(!st_mem_cma)) { + st_mem_cma = rrdset_create_localhost( + "mem" + , "cma" + , NULL + , "cma" + , NULL + , "Contiguous Memory Allocator (CMA) Memory" + , "MiB" + , PLUGIN_PROC_NAME + , PLUGIN_PROC_MODULE_MEMINFO_NAME + , NETDATA_CHART_PRIO_MEM_CMA + , update_every + , RRDSET_TYPE_STACKED + ); + + rd_used = rrddim_add(st_mem_cma, "used", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); + rd_free = rrddim_add(st_mem_cma, "free", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); + } + + rrddim_set_by_pointer(st_mem_cma, rd_used, CmaTotal - CmaFree); + rrddim_set_by_pointer(st_mem_cma, rd_free, CmaFree); + rrdset_done(st_mem_cma); + } + + if(do_directmap != CONFIG_BOOLEAN_NO && + ((arl_directmap4k->flags & ARL_ENTRY_FLAG_FOUND) || + (arl_directmap2m->flags & ARL_ENTRY_FLAG_FOUND) || + (arl_directmap4m->flags & ARL_ENTRY_FLAG_FOUND) || + (arl_directmap1g->flags & ARL_ENTRY_FLAG_FOUND))) + { + static RRDSET *st_mem_directmap = NULL; + static RRDDIM *rd_4k = NULL, *rd_2m = NULL, *rd_1g = NULL, *rd_4m = NULL; + + if(unlikely(!st_mem_directmap)) { + st_mem_directmap = rrdset_create_localhost( + "mem" + , "directmaps" + , NULL + , "overview" + , NULL + , "Direct Memory Mappings" + , "MiB" + , PLUGIN_PROC_NAME + , PLUGIN_PROC_MODULE_MEMINFO_NAME + , NETDATA_CHART_PRIO_MEM_DIRECTMAP + , update_every + , RRDSET_TYPE_STACKED + ); + + if(arl_directmap4k->flags & ARL_ENTRY_FLAG_FOUND) + rd_4k = rrddim_add(st_mem_directmap, "4k", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); + + if(arl_directmap2m->flags & ARL_ENTRY_FLAG_FOUND) + rd_2m = rrddim_add(st_mem_directmap, "2m", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); + + if(arl_directmap4m->flags & ARL_ENTRY_FLAG_FOUND) + rd_4m = rrddim_add(st_mem_directmap, "4m", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); + + if(arl_directmap1g->flags & ARL_ENTRY_FLAG_FOUND) + rd_1g = rrddim_add(st_mem_directmap, "1g", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); + } + + if(rd_4k) + rrddim_set_by_pointer(st_mem_directmap, rd_4k, DirectMap4k); + + if(rd_2m) + rrddim_set_by_pointer(st_mem_directmap, rd_2m, DirectMap2M); + + if(rd_4m) + rrddim_set_by_pointer(st_mem_directmap, rd_4m, DirectMap4M); + + if(rd_1g) + rrddim_set_by_pointer(st_mem_directmap, rd_1g, DirectMap1G); + + rrdset_done(st_mem_directmap); } return 0; diff --git a/collectors/proc.plugin/proc_pressure.c b/collectors/proc.plugin/proc_pressure.c index 28e4c592dd912e..e500bf74845abb 100644 --- a/collectors/proc.plugin/proc_pressure.c +++ b/collectors/proc.plugin/proc_pressure.c @@ -12,28 +12,55 @@ static int pressure_update_every = 0; static struct pressure resources[PRESSURE_NUM_RESOURCES] = { { - .some = - {.share_time = {.id = "cpu_some_pressure", .title = "CPU some pressure"}, - .total_time = {.id = "cpu_some_pressure_stall_time", .title = "CPU some pressure stall time"}}, - .full = - {.share_time = {.id = "cpu_full_pressure", .title = "CPU full pressure"}, - .total_time = {.id = "cpu_full_pressure_stall_time", .title = "CPU full pressure stall time"}}, + .some = { + .available = true, + .share_time = {.id = "cpu_some_pressure", .title = "CPU some pressure"}, + .total_time = {.id = "cpu_some_pressure_stall_time", .title = "CPU some pressure stall time"} + }, + .full = { + // Disable CPU full pressure. + // See https://github.com/torvalds/linux/commit/890d550d7dbac7a31ecaa78732aa22be282bb6b8 + .available = false, + .share_time = {.id = "cpu_full_pressure", .title = "CPU full pressure"}, + .total_time = {.id = "cpu_full_pressure_stall_time", .title = "CPU full pressure stall time"} + }, }, { - .some = - {.share_time = {.id = "memory_some_pressure", .title = "Memory some pressure"}, - .total_time = {.id = "memory_some_pressure_stall_time", .title = "Memory some pressure stall time"}}, - .full = - {.share_time = {.id = "memory_full_pressure", .title = "Memory full pressure"}, - .total_time = {.id = "memory_full_pressure_stall_time", .title = "Memory full pressure stall time"}}, + .some = { + .available = true, + .share_time = {.id = "memory_some_pressure", .title = "Memory some pressure"}, + .total_time = {.id = "memory_some_pressure_stall_time", .title = "Memory some pressure stall time"} + }, + .full = { + .available = true, + .share_time = {.id = "memory_full_pressure", .title = "Memory full pressure"}, + .total_time = {.id = "memory_full_pressure_stall_time", .title = "Memory full pressure stall time"} + }, }, { - .some = - {.share_time = {.id = "io_some_pressure", .title = "I/O some pressure"}, - .total_time = {.id = "io_some_pressure_stall_time", .title = "I/O some pressure stall time"}}, - .full = - {.share_time = {.id = "io_full_pressure", .title = "I/O full pressure"}, - .total_time = {.id = "io_full_pressure_stall_time", .title = "I/O full pressure stall time"}}, + .some = { + .available = true, + .share_time = {.id = "io_some_pressure", .title = "I/O some pressure"}, + .total_time = {.id = "io_some_pressure_stall_time", .title = "I/O some pressure stall time"} + }, + .full = { + .available = true, + .share_time = {.id = "io_full_pressure", .title = "I/O full pressure"}, + .total_time = {.id = "io_full_pressure_stall_time", .title = "I/O full pressure stall time"} + }, + }, + { + .some = { + // this is not available + .available = false, + .share_time = {.id = "irq_some_pressure", .title = "IRQ some pressure"}, + .total_time = {.id = "irq_some_pressure_stall_time", .title = "IRQ some pressure stall time"} + }, + .full = { + .available = true, + .share_time = {.id = "irq_full_pressure", .title = "IRQ full pressure"}, + .total_time = {.id = "irq_full_pressure_stall_time", .title = "IRQ full pressure stall time"} + }, }, }; @@ -46,6 +73,7 @@ static struct resource_info { { .name = "cpu", .family = "cpu", .section_priority = NETDATA_CHART_PRIO_SYSTEM_CPU }, { .name = "memory", .family = "ram", .section_priority = NETDATA_CHART_PRIO_SYSTEM_RAM }, { .name = "io", .family = "disk", .section_priority = NETDATA_CHART_PRIO_SYSTEM_IO }, + { .name = "irq", .family = "interrupts", .section_priority = NETDATA_CHART_PRIO_SYSTEM_INTERRUPTS }, }; void update_pressure_charts(struct pressure_charts *pcs) { @@ -65,7 +93,7 @@ void update_pressure_charts(struct pressure_charts *pcs) { } } -static void proc_pressure_do_resource(procfile *ff, int res_idx, int some) { +static void proc_pressure_do_resource(procfile *ff, int res_idx, size_t line, bool some) { struct pressure_charts *pcs; struct resource_info ri; pcs = some ? &resources[res_idx].some : &resources[res_idx].full; @@ -93,9 +121,9 @@ static void proc_pressure_do_resource(procfile *ff, int res_idx, int some) { rrddim_add(pcs->share_time.st, some ? "some 300" : "full 300", NULL, 1, 100, RRD_ALGORITHM_ABSOLUTE); } - pcs->share_time.value10 = strtod(procfile_lineword(ff, some ? 0 : 1, 2), NULL); - pcs->share_time.value60 = strtod(procfile_lineword(ff, some ? 0 : 1, 4), NULL); - pcs->share_time.value300 = strtod(procfile_lineword(ff, some ? 0 : 1, 6), NULL); + pcs->share_time.value10 = strtod(procfile_lineword(ff, line, 2), NULL); + pcs->share_time.value60 = strtod(procfile_lineword(ff, line, 4), NULL); + pcs->share_time.value300 = strtod(procfile_lineword(ff, line, 6), NULL); if (unlikely(!pcs->total_time.st)) { pcs->total_time.st = rrdset_create_localhost( @@ -114,19 +142,19 @@ static void proc_pressure_do_resource(procfile *ff, int res_idx, int some) { pcs->total_time.rdtotal = rrddim_add(pcs->total_time.st, "time", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); } - pcs->total_time.value_total = str2ull(procfile_lineword(ff, some ? 0 : 1, 8), NULL) / 1000; + pcs->total_time.value_total = str2ull(procfile_lineword(ff, line, 8), NULL) / 1000; } -static void proc_pressure_do_resource_some(procfile *ff, int res_idx) { - proc_pressure_do_resource(ff, res_idx, 1); +static void proc_pressure_do_resource_some(procfile *ff, int res_idx, size_t line) { + proc_pressure_do_resource(ff, res_idx, line, true); } -static void proc_pressure_do_resource_full(procfile *ff, int res_idx) { - proc_pressure_do_resource(ff, res_idx, 0); +static void proc_pressure_do_resource_full(procfile *ff, int res_idx, size_t line) { + proc_pressure_do_resource(ff, res_idx, line, false); } int do_proc_pressure(int update_every, usec_t dt) { - int fail_count = 0; + int ok_count = 0; int i; static usec_t next_pressure_dt = 0; @@ -161,56 +189,59 @@ int do_proc_pressure(int update_every, usec_t dt) { , base_path , resource_info[i].name); + do_some = resources[i].some.available ? CONFIG_BOOLEAN_YES : CONFIG_BOOLEAN_NO; + do_full = resources[i].full.available ? CONFIG_BOOLEAN_YES : CONFIG_BOOLEAN_NO; + snprintfz(config_key, CONFIG_MAX_NAME, "enable %s some pressure", resource_info[i].name); - do_some = config_get_boolean(CONFIG_SECTION_PLUGIN_PROC_PRESSURE, config_key, CONFIG_BOOLEAN_YES); + do_some = config_get_boolean(CONFIG_SECTION_PLUGIN_PROC_PRESSURE, config_key, do_some); resources[i].some.enabled = do_some; - // Disable CPU full pressure. - // See https://github.com/torvalds/linux/commit/890d550d7dbac7a31ecaa78732aa22be282bb6b8 - if (i == 0) { - do_full = CONFIG_BOOLEAN_NO; - resources[i].full.enabled = do_full; - } else { - snprintfz(config_key, CONFIG_MAX_NAME, "enable %s full pressure", resource_info[i].name); - do_full = config_get_boolean(CONFIG_SECTION_PLUGIN_PROC_PRESSURE, config_key, CONFIG_BOOLEAN_YES); - resources[i].full.enabled = do_full; - } + snprintfz(config_key, CONFIG_MAX_NAME, "enable %s full pressure", resource_info[i].name); + do_full = config_get_boolean(CONFIG_SECTION_PLUGIN_PROC_PRESSURE, config_key, do_full); + resources[i].full.enabled = do_full; + + if(!do_full && !do_some) + continue; ff = procfile_open(filename, " =", PROCFILE_FLAG_DEFAULT); if (unlikely(!ff)) { collector_error("Cannot read pressure information from %s.", filename); - fail_count++; continue; } } ff = procfile_readall(ff); resource_info[i].pf = ff; - if (unlikely(!ff)) { - fail_count++; + if (unlikely(!ff)) continue; - } size_t lines = procfile_lines(ff); if (unlikely(lines < 1)) { collector_error("%s has no lines.", procfile_filename(ff)); - fail_count++; continue; } - if (do_some) { - proc_pressure_do_resource_some(ff, i); - update_pressure_charts(&resources[i].some); - } - if (do_full && lines > 2) { - proc_pressure_do_resource_full(ff, i); - update_pressure_charts(&resources[i].full); + for(size_t l = 0; l < lines ;l++) { + const char *key = procfile_lineword(ff, l, 0); + if(strcmp(key, "some") == 0) { + if(do_some) { + proc_pressure_do_resource_some(ff, i, l); + update_pressure_charts(&resources[i].some); + ok_count++; + } + } + else if(strcmp(key, "full") == 0) { + if(do_full) { + proc_pressure_do_resource_full(ff, i, l); + update_pressure_charts(&resources[i].full); + ok_count++; + } + } } } - if (PRESSURE_NUM_RESOURCES == fail_count) { + if(!ok_count) return 1; - } return 0; } diff --git a/collectors/proc.plugin/proc_pressure.h b/collectors/proc.plugin/proc_pressure.h index 0cb23315253f62..2e5cab2cc1f92a 100644 --- a/collectors/proc.plugin/proc_pressure.h +++ b/collectors/proc.plugin/proc_pressure.h @@ -3,13 +3,14 @@ #ifndef NETDATA_PROC_PRESSURE_H #define NETDATA_PROC_PRESSURE_H -#define PRESSURE_NUM_RESOURCES 3 +#define PRESSURE_NUM_RESOURCES 4 struct pressure { int updated; char *filename; struct pressure_charts { + bool available; int enabled; struct pressure_share_time_chart { diff --git a/collectors/proc.plugin/proc_stat.c b/collectors/proc.plugin/proc_stat.c index f0f31935182f45..a4f76796b60412 100644 --- a/collectors/proc.plugin/proc_stat.c +++ b/collectors/proc.plugin/proc_stat.c @@ -494,7 +494,7 @@ int do_proc_stat(int update_every, usec_t dt) { do_processes = config_get_boolean("plugin:proc:/proc/stat", "processes running", CONFIG_BOOLEAN_YES); // give sane defaults based on the number of processors - if(unlikely(get_system_cpus() > 50)) { + if(unlikely(get_system_cpus() > 128)) { // the system has too many processors keep_per_core_fds_open = CONFIG_BOOLEAN_NO; do_core_throttle_count = CONFIG_BOOLEAN_NO; diff --git a/collectors/proc.plugin/proc_vmstat.c b/collectors/proc.plugin/proc_vmstat.c index ca56e900e2e531..b44733b6abb80c 100644 --- a/collectors/proc.plugin/proc_vmstat.c +++ b/collectors/proc.plugin/proc_vmstat.c @@ -271,7 +271,7 @@ int do_proc_vmstat(int update_every, usec_t dt) { if(unlikely(!st_swapio)) { st_swapio = rrdset_create_localhost( - "system" + "mem" , "swapio" , NULL , "swap" @@ -280,7 +280,7 @@ int do_proc_vmstat(int update_every, usec_t dt) { , "KiB/s" , PLUGIN_PROC_NAME , PLUGIN_PROC_MODULE_VMSTAT_NAME - , NETDATA_CHART_PRIO_SYSTEM_SWAPIO + , NETDATA_CHART_PRIO_MEM_SWAPIO , update_every , RRDSET_TYPE_AREA ); @@ -336,7 +336,7 @@ int do_proc_vmstat(int update_every, usec_t dt) { "mem" , "pgfaults" , NULL - , "system" + , "page faults" , NULL , "Memory Page Faults" , "faults/s" @@ -372,7 +372,7 @@ int do_proc_vmstat(int update_every, usec_t dt) { "mem" , "oom_kill" , NULL - , "system" + , "OOM kills" , NULL , "Out of Memory Kills" , "kills/s" @@ -505,7 +505,7 @@ int do_proc_vmstat(int update_every, usec_t dt) { if(unlikely(!st_zswapio)) { st_zswapio = rrdset_create_localhost( - "system" + "mem" , "zswapio" , NULL , "zswap" @@ -514,7 +514,7 @@ int do_proc_vmstat(int update_every, usec_t dt) { , "KiB/s" , PLUGIN_PROC_NAME , PLUGIN_PROC_MODULE_VMSTAT_NAME - , NETDATA_CHART_PRIO_SYSTEM_ZSWAPIO + , NETDATA_CHART_PRIO_MEM_ZSWAPIO , update_every , RRDSET_TYPE_AREA ); diff --git a/health/health.d/swap.conf b/health/health.d/swap.conf index d30c74ceec1149..ca49cf25b9f9eb 100644 --- a/health/health.d/swap.conf +++ b/health/health.d/swap.conf @@ -2,7 +2,7 @@ # you can disable an alarm notification by setting the 'to' line to: silent alarm: 30min_ram_swapped_out - on: system.swapio + on: mem.swapio class: Workload type: System component: Memory @@ -19,7 +19,7 @@ component: Memory to: sysadmin alarm: used_swap - on: system.swap + on: mem.swap class: Utilization type: System component: Memory From 62ae1ec03c5fac3afaec5ae763237fc72f629aa6 Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Tue, 25 Jul 2023 18:18:06 -0400 Subject: [PATCH 41/55] Update platform support info and add a schema. (#15531) --- .github/data/distros.yml | 82 +++++++++++++++- integrations/schemas/distros.json | 153 ++++++++++++++++++++++++++++++ packaging/PLATFORM_SUPPORT.md | 12 +-- 3 files changed, 240 insertions(+), 7 deletions(-) create mode 100644 integrations/schemas/distros.json diff --git a/.github/data/distros.yml b/.github/data/distros.yml index ba83db7076fc3a..7cb7846402d0ac 100644 --- a/.github/data/distros.yml +++ b/.github/data/distros.yml @@ -20,6 +20,8 @@ include: - &alpine distro: alpine version: edge + support_type: Community + notes: '' eol_check: false env_prep: | apk add -U bash @@ -27,18 +29,31 @@ include: apk del json-c-dev test: ebpf-core: true + - <<: *alpine + version: "3.18" + support_type: Core + notes: '' + eol_check: true - <<: *alpine version: "3.17" + support_type: Intermediate + notes: '' eol_check: true - <<: *alpine version: "3.16" + support_type: Intermediate + notes: '' eol_check: true - <<: *alpine version: "3.15" + support_type: Intermediate + notes: '' eol_check: true - distro: archlinux version: latest + support_type: Intermediate + notes: '' eol_check: false env_prep: | pacman --noconfirm -Syu && pacman --noconfirm -Sy grep libffi @@ -48,6 +63,8 @@ include: - &alma distro: almalinux version: "9" + support_type: Core + notes: '' jsonc_removal: | dnf remove -y json-c-devel eol_check: true @@ -74,6 +91,8 @@ include: - &amzn distro: amazonlinux version: "2" + support_type: Core + notes: '' eol_check: 'amazon-linux' packages: &amzn_packages type: rpm @@ -92,6 +111,8 @@ include: - distro: centos version: "7" + support_type: Core + notes: '' eol_check: false packages: type: rpm @@ -107,6 +128,8 @@ include: - &debian distro: debian version: "12" + support_type: Core + notes: '' base_image: debian:bookworm eol_check: true env_prep: | @@ -143,6 +166,8 @@ include: - &fedora distro: fedora version: "38" + support_type: Core + notes: '' eol_check: true jsonc_removal: | dnf remove -y json-c-devel @@ -165,6 +190,8 @@ include: - &opensuse distro: opensuse version: "tumbleweed" + support_type: Intermediate + notes: '' eol_check: true base_image: opensuse/tumbleweed jsonc_removal: | @@ -179,12 +206,16 @@ include: ebpf-core: true - <<: *opensuse version: "15.5" + support_type: Core + notes: '' base_image: opensuse/leap:15.5 packages: <<: *opensuse_packages repo_distro: opensuse/15.5 - <<: *opensuse version: "15.4" + support_type: Core + notes: '' base_image: opensuse/leap:15.4 packages: <<: *opensuse_packages @@ -193,6 +224,8 @@ include: - &oracle distro: oraclelinux version: "8" + support_type: Core + notes: '' eol_check: true jsonc_removal: | dnf remove -y json-c-devel @@ -213,6 +246,8 @@ include: - &ubuntu distro: ubuntu version: "22.04" + support_type: Core + notes: '' eol_check: true env_prep: | rm -f /etc/apt/apt.conf.d/docker && apt-get update @@ -239,7 +274,9 @@ include: repo_distro: ubuntu/focal no_include: # Info for platforms not covered in CI - distro: docker - version: latest + version: "19.03 or newer" + support_type: Core + notes: '' packages: arches: - linux/i386 @@ -247,3 +284,46 @@ no_include: # Info for platforms not covered in CI - linux/arm/v7 - linux/arm64 - linux/ppc64le + + - distro: clearlinux + version: latest + support_type: Community + notes: '' + + - &rhel + distro: rhel + version: "9.x" + support_type: Core + notes: '' + packages: + arches: + - x86_64 + - aarch64 + - <<: *rhel + version: "8.x" + - <<: *rhel + version: "7.x" + packages: + arches: + - x86_64 + + - &freebsd + distro: freebsd + version: 13-STABLE + support_type: Community + notes: '' + + - &macos + distro: macos + version: '13' + support_type: Community + notes: '' + - <<: *macos + version: '12' + - <<: *macos + version: '11' + + - distro: gentoo + version: latest + support_type: Community + notes: '' diff --git a/integrations/schemas/distros.json b/integrations/schemas/distros.json new file mode 100644 index 00000000000000..51040865398e10 --- /dev/null +++ b/integrations/schemas/distros.json @@ -0,0 +1,153 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "title": "Platform support information for the Netdata agent.", + "properties": { + "platform_map": { + "type": "object", + "description": "Maps CPU architectures to Docker platform strings. Used by CI when generating build matrices.", + "patternProperties": { + "^.+$": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + }, + "arch_order": { + "type": "array", + "description": "Defines the CPU architecture sort order used when generating build matrices in CI.", + "items": { + "type": "string", + "minLength": 1 + } + }, + "include": { + "type": "array", + "description": "Defines data for platforms that are included in CI.", + "items": { + "$ref": "#/$defs/platform" + } + } + }, + "required": [ + "platform_map", + "arch_order", + "include" + ], + "$defs": { + "platform": { + "type": "object", + "description": "Describes a platform.", + "properties": { + "distro": { + "type": "string", + "description": "The name of the platform.", + "pattern": "^[a-z][a-z0-9]*$" + }, + "version": { + "type": "string", + "description": "Version identifier for the platform.", + "pattern": "^[a-z0-9][a-z.0-9]*$" + }, + "support_type": { + "type": "string", + "description": "Defines the support tier that the platform is in.", + "enum": [ + "Core", + "Intermediate", + "Community", + "Third-Party", + "Unsupported" + ] + }, + "notes": { + "type": "string", + "description": "Any additional notes about the platform." + }, + "eol_check": { + "description": "Indicates if EOL checks should be done for this platform. Only relevant if the platform is included in CI. If the value is a string, that value is used for the EOL check lookup, otherwise the value of the distro key is used.", + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "pattern": "^[a-z][a-z0-9._-]*$" + } + ] + }, + "base_image": { + "type": "string", + "description": "A string specifying the Docker image to be used for testing this platform.", + "pattern": "^[a-z][a-z0-9._/:-]*$" + }, + "env_prep": { + "type": "string", + "description": "A string containing any shell commands that need to be run to prep the platform for testing in CI." + }, + "jsonc_removal": { + "type": "string", + "description": "A string containing a shell command to uninstall JSON-C development files during CI checks." + }, + "test": { + "type": "object", + "description": "Contains additional data for usage by CI.", + "properties": { + "ebpf-core": { + "type": "boolean", + "description": "If true, then eBPF CO-RE CI jobs should be run for this platform." + } + } + }, + "packages": { + "type": "object", + "description": "Additional information about native packages for this platform.", + "properties": { + "type": { + "type": "string", + "description": "Indicates the type of native packages to build for the platform.", + "enum": [ + "deb", + "rpm", + "" + ] + }, + "arches": { + "type": "array", + "description": "A list of CPU architectures (specified in the usual manner for the platform) that native packages are built for for this platform.", + "items": { + "type": "string", + "minLength": 1 + } + }, + "repo_distro": { + "type": "string", + "description": "Identifies the repository name to be used when publishing packages for this platform.", + "minLength": 1 + }, + "alt_links": { + "type": "array", + "description": "A list of alternative repository names to be used when publishing packages for this platform.", + "items": { + "type": "string", + "minLength": 1 + } + } + }, + "required": [ + "type", + "arches" + ] + } + }, + "additionalProperties": false, + "required": [ + "distro", + "version", + "support_type", + "notes" + ] + } + } +} diff --git a/packaging/PLATFORM_SUPPORT.md b/packaging/PLATFORM_SUPPORT.md index 3f958c8afe4d30..3441b3b5470808 100644 --- a/packaging/PLATFORM_SUPPORT.md +++ b/packaging/PLATFORM_SUPPORT.md @@ -58,9 +58,11 @@ to work on these platforms with minimal user effort. | Platform | Version | Official Native Packages | Notes | |--------------------------|----------------|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------| -| Alpine Linux | 3.17 | No | The latest release of Alpine Linux is guaranteed to remain at **Core** tier due to usage for our Docker images | +| Alpine Linux | 3.18 | No | The latest release of Alpine Linux is guaranteed to remain at **Core** tier due to usage for our Docker images | | Alma Linux | 9.x | x86\_64, AArch64 | Also includes support for Rocky Linux and other ABI compatible RHEL derivatives | | Alma Linux | 8.x | x86\_64, AArch64 | Also includes support for Rocky Linux and other ABI compatible RHEL derivatives | +| Amazon Linux | 2023 | x86\_64, AArch64 | | +| Amazon Linux | 2 | x86\_64, AArch64 | | | CentOS | 7.x | x86\_64 | | | Docker | 19.03 or newer | x86\_64, i386, ARMv7, AArch64, POWER8+ | See our [Docker documentation](https://github.com/netdata/netdata/blob/master/packaging/docker/README.md) for more info on using Netdata on Docker | | Debian | 12.x | x86\_64, i386, ARMv7, AArch64 | | @@ -91,10 +93,10 @@ with minimal user effort. | Platform | Version | Official Native Packages | Notes | |---------------|------------|--------------------------|------------------------------------------------------------------------------------------------------| +| Alpine Linux | Edge | No | | +| Alpine Linux | 3.17 | No | | | Alpine Linux | 3.16 | No | | | Alpine Linux | 3.15 | No | | -| Amazon Linux | 2023 | x86\_64, AArch64 | Scheduled for promotion to Core tier at some point after the release of v1.39.0 of the Netdata Agent | -| Amazon Linux | 2 | x86\_64, AArch64 | Scheduled for promotion to Core tier at some point after the release of v1.39.0 of the Netdata Agent | | Arch Linux | Latest | No | We officially recommend the community packages available for Arch Linux | | Manjaro Linux | Latest | No | We officially recommend the community packages available for Arch Linux | | openSUSE | Tumbleweed | x86\_64, AArch64 | Scheduled for promotion to Core tier at some point after the release of v1.41.0 of the Netdata Agent | @@ -109,16 +111,14 @@ platforms, but may require some extra effort from users. | Platform | Version | Official Native Packages | Notes | |--------------|------------|--------------------------|-----------------------------------------------------------------------------------------------------------| -| Alpine Linux | Edge | No | | | Clear Linux | Latest | No | | | Debian | Sid | No | | | Fedora | Rawhide | No | | | FreeBSD | 13-STABLE | No | Netdata is included in the FreeBSD Ports Tree, and this is the recommended installation method on FreeBSD | -| FreeBSD | 12-STABLE | No | Netdata is included in the FreeBSD Ports Tree, and this is the recommended installation method on FreeBSD | | Gentoo | Latest | No | | +| macOS | 13 | No | Currently only works for Intel-based hardware. Requires Homebrew for dependencies | | macOS | 12 | No | Currently only works for Intel-based hardware. Requires Homebrew for dependencies | | macOS | 11 | No | Currently only works for Intel-based hardware. Requires Homebrew for dependencies. | -| macOS | 10.15 | No | Requires Homebrew for dependencies. | | openSUSE | Tumbleweed | No | | ## Third-party supported platforms From 9bb40ae57c1a62fef0411f034ef4b26d017359f8 Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Wed, 26 Jul 2023 01:32:26 +0300 Subject: [PATCH 42/55] PCI Advanced Error Reporting (AER) (#15488) --- Makefile.am | 1 + collectors/all.h | 7 +- collectors/proc.plugin/plugin_proc.c | 3 +- collectors/proc.plugin/plugin_proc.h | 1 + collectors/proc.plugin/sys_devices_pci_aer.c | 335 +++++++++++++++++++ 5 files changed, 341 insertions(+), 6 deletions(-) create mode 100644 collectors/proc.plugin/sys_devices_pci_aer.c diff --git a/Makefile.am b/Makefile.am index c46702482044f0..c1017b289e3606 100644 --- a/Makefile.am +++ b/Makefile.am @@ -409,6 +409,7 @@ PROC_PLUGIN_FILES = \ collectors/proc.plugin/sys_kernel_mm_ksm.c \ collectors/proc.plugin/sys_block_zram.c \ collectors/proc.plugin/sys_devices_system_edac_mc.c \ + collectors/proc.plugin/sys_devices_pci_aer.c \ collectors/proc.plugin/sys_devices_system_node.c \ collectors/proc.plugin/sys_fs_btrfs.c \ collectors/proc.plugin/sys_class_power_supply.c \ diff --git a/collectors/all.h b/collectors/all.h index 9bfae914ea852e..98f17202071b62 100644 --- a/collectors/all.h +++ b/collectors/all.h @@ -390,12 +390,9 @@ #define NETDATA_CHART_PRIO_STATSD_PRIVATE 90000 // many charts -// INTERNAL NETDATA INFO +// PCI -#define NETDATA_CHART_PRIO_CHECKS 99999 - -#define NETDATA_CHART_PRIO_NETDATA_TIMEX 132030 -#define NETDATA_CHART_PRIO_NETDATA_TC_TIME 1000100 +#define NETDATA_CHART_PRIO_PCI_AER 100000 // NETDATA ML CHARTS diff --git a/collectors/proc.plugin/plugin_proc.c b/collectors/proc.plugin/plugin_proc.c index c1a3293f86f7fa..74e3129370482c 100644 --- a/collectors/proc.plugin/plugin_proc.c +++ b/collectors/proc.plugin/plugin_proc.c @@ -33,7 +33,8 @@ static struct proc_module { {.name = "/proc/meminfo", .dim = "meminfo", .func = do_proc_meminfo}, {.name = "/sys/kernel/mm/ksm", .dim = "ksm", .func = do_sys_kernel_mm_ksm}, {.name = "/sys/block/zram", .dim = "zram", .func = do_sys_block_zram}, - {.name = "/sys/devices/system/edac/mc", .dim = "ecc", .func = do_proc_sys_devices_system_edac_mc}, + {.name = "/sys/devices/system/edac/mc", .dim = "edac", .func = do_proc_sys_devices_system_edac_mc}, + {.name = "/sys/devices/pci/aer", .dim = "pci_aer", .func = do_proc_sys_devices_pci_aer}, {.name = "/sys/devices/system/node", .dim = "numa", .func = do_proc_sys_devices_system_node}, {.name = "/proc/pagetypeinfo", .dim = "pagetypeinfo", .func = do_proc_pagetypeinfo}, diff --git a/collectors/proc.plugin/plugin_proc.h b/collectors/proc.plugin/plugin_proc.h index 2b2cabcacdea3d..84c370a45000c1 100644 --- a/collectors/proc.plugin/plugin_proc.h +++ b/collectors/proc.plugin/plugin_proc.h @@ -34,6 +34,7 @@ int do_proc_net_stat_synproxy(int update_every, usec_t dt); int do_proc_net_softnet_stat(int update_every, usec_t dt); int do_proc_uptime(int update_every, usec_t dt); int do_proc_sys_devices_system_edac_mc(int update_every, usec_t dt); +int do_proc_sys_devices_pci_aer(int update_every, usec_t dt); int do_proc_sys_devices_system_node(int update_every, usec_t dt); int do_proc_spl_kstat_zfs_arcstats(int update_every, usec_t dt); int do_proc_spl_kstat_zfs_pool_state(int update_every, usec_t dt); diff --git a/collectors/proc.plugin/sys_devices_pci_aer.c b/collectors/proc.plugin/sys_devices_pci_aer.c new file mode 100644 index 00000000000000..134426238a6879 --- /dev/null +++ b/collectors/proc.plugin/sys_devices_pci_aer.c @@ -0,0 +1,335 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "plugin_proc.h" + +static char *pci_aer_dirname = NULL; + +typedef enum __attribute__((packed)) { + AER_DEV_NONFATAL = (1 << 0), + AER_DEV_CORRECTABLE = (1 << 1), + AER_DEV_FATAL = (1 << 2), + AER_ROOTPORT_TOTAL_ERR_COR = (1 << 3), + AER_ROOTPORT_TOTAL_ERR_FATAL = (1 << 4), +} AER_TYPE; + +struct aer_value { + kernel_uint_t count; + RRDDIM *rd; +}; + +struct aer_entry { + bool updated; + + STRING *name; + AER_TYPE type; + + procfile *ff; + DICTIONARY *values; + + RRDSET *st; +}; + +DICTIONARY *aer_root = NULL; + +static bool aer_value_conflict_callback(const DICTIONARY_ITEM *item __maybe_unused, void *old_value, void *new_value, void *data __maybe_unused) { + struct aer_value *v = old_value; + struct aer_value *nv = new_value; + + v->count = nv->count; + + return false; +} + +static void aer_insert_callback(const DICTIONARY_ITEM *item __maybe_unused, void *value, void *data __maybe_unused) { + struct aer_entry *a = value; + a->values = dictionary_create(DICT_OPTION_SINGLE_THREADED|DICT_OPTION_DONT_OVERWRITE_VALUE); + dictionary_register_conflict_callback(a->values, aer_value_conflict_callback, NULL); +} + +static void add_pci_aer(const char *base_dir, const char *d_name, AER_TYPE type) { + char buffer[FILENAME_MAX + 1]; + snprintfz(buffer, FILENAME_MAX, "%s/%s", base_dir, d_name); + struct aer_entry *a = dictionary_set(aer_root, buffer, NULL, sizeof(struct aer_entry)); + + if(!a->name) + a->name = string_strdupz(d_name); + + a->type = type; +} + +static bool recursively_find_pci_aer(AER_TYPE types, const char *base_dir, const char *d_name, int depth) { + if(depth > 100) + return false; + + char buffer[FILENAME_MAX + 1]; + snprintfz(buffer, FILENAME_MAX, "%s/%s", base_dir, d_name); + DIR *dir = opendir(buffer); + if(unlikely(!dir)) { + collector_error("Cannot read PCI_AER directory '%s'", buffer); + return true; + } + + struct dirent *de = NULL; + while((de = readdir(dir))) { + if(de->d_type == DT_DIR) { + if(de->d_name[0] == '.') + continue; + + recursively_find_pci_aer(types, buffer, de->d_name, depth + 1); + } + else if(de->d_type == DT_REG) { + if((types & AER_DEV_NONFATAL) && strcmp(de->d_name, "aer_dev_nonfatal") == 0) { + add_pci_aer(buffer, de->d_name, AER_DEV_NONFATAL); + } + else if((types & AER_DEV_CORRECTABLE) && strcmp(de->d_name, "aer_dev_correctable") == 0) { + add_pci_aer(buffer, de->d_name, AER_DEV_CORRECTABLE); + } + else if((types & AER_DEV_FATAL) && strcmp(de->d_name, "aer_dev_fatal") == 0) { + add_pci_aer(buffer, de->d_name, AER_DEV_FATAL); + } + else if((types & AER_ROOTPORT_TOTAL_ERR_COR) && strcmp(de->d_name, "aer_rootport_total_err_cor") == 0) { + add_pci_aer(buffer, de->d_name, AER_ROOTPORT_TOTAL_ERR_COR); + } + else if((types & AER_ROOTPORT_TOTAL_ERR_FATAL) && strcmp(de->d_name, "aer_rootport_total_err_fatal") == 0) { + add_pci_aer(buffer, de->d_name, AER_ROOTPORT_TOTAL_ERR_FATAL); + } + } + } + closedir(dir); + return true; +} + +static void find_all_pci_aer(AER_TYPE types) { + char name[FILENAME_MAX + 1]; + snprintfz(name, FILENAME_MAX, "%s%s", netdata_configured_host_prefix, "/sys/devices"); + pci_aer_dirname = config_get("plugin:proc:/sys/devices/pci/aer", "directory to monitor", name); + + DIR *dir = opendir(pci_aer_dirname); + if(unlikely(!dir)) { + collector_error("Cannot read PCI_AER directory '%s'", pci_aer_dirname); + return; + } + + struct dirent *de = NULL; + while((de = readdir(dir))) { + if(de->d_type == DT_DIR && de->d_name[0] == 'p' && de->d_name[1] == 'c' && de->d_name[2] == 'i' && isdigit(de->d_name[3])) + recursively_find_pci_aer(types, pci_aer_dirname, de->d_name, 1); + } + closedir(dir); +} + +static void read_pci_aer_values(const char *filename, struct aer_entry *t) { + t->updated = false; + + if(unlikely(!t->ff)) { + t->ff = procfile_open(filename, " \t", PROCFILE_FLAG_DEFAULT); + if(unlikely(!t->ff)) + return; + } + + t->ff = procfile_readall(t->ff); + if(unlikely(!t->ff || procfile_lines(t->ff) < 1 || procfile_linewords(t->ff, 0) < 1)) + return; + + size_t lines = procfile_lines(t->ff); + for(size_t l = 0; l < lines ; l++) { + if(procfile_linewords(t->ff, l) != 2) + continue; + + struct aer_value v = { + .count = str2ull(procfile_lineword(t->ff, l, 1), NULL) + }; + + char *key = procfile_lineword(t->ff, l, 0); + if(!key || !*key || (key[0] == 'T' && key[1] == 'O' && key[2] == 'T' && key[3] == 'A' && key[4] == 'L' && key[5] == '_')) + continue; + + dictionary_set(t->values, key, &v, sizeof(v)); + } + + t->updated = true; +} + +static void read_pci_aer_count(const char *filename, struct aer_entry *t) { + t->updated = false; + + if(unlikely(!t->ff)) { + t->ff = procfile_open(filename, " \t", PROCFILE_FLAG_DEFAULT); + if(unlikely(!t->ff)) + return; + } + + t->ff = procfile_readall(t->ff); + if(unlikely(!t->ff || procfile_lines(t->ff) < 1 || procfile_linewords(t->ff, 0) < 1)) + return; + + struct aer_value v = { + .count = str2ull(procfile_lineword(t->ff, 0, 0), NULL) + }; + dictionary_set(t->values, "count", &v, sizeof(v)); + t->updated = true; +} + +static void add_label_from_link(struct aer_entry *a, const char *path, const char *link) { + char name[FILENAME_MAX + 1]; + strncpyz(name, path, FILENAME_MAX); + char *slash = strrchr(name, '/'); + if(slash) + *slash = '\0'; + + char name2[FILENAME_MAX + 1]; + snprintfz(name2, FILENAME_MAX, "%s/%s", name, link); + + ssize_t len = readlink(name2, name, FILENAME_MAX); + if(len != -1) { + name[len] = '\0'; // Null-terminate the string + slash = strrchr(name, '/'); + if(slash) slash++; + else slash = name; + rrdlabels_add(a->st->rrdlabels, link, slash, RRDLABEL_SRC_AUTO); + } +} + +int do_proc_sys_devices_pci_aer(int update_every, usec_t dt __maybe_unused) { + if(unlikely(!aer_root)) { + int do_root_ports = CONFIG_BOOLEAN_AUTO; + int do_pci_slots = CONFIG_BOOLEAN_NO; + + char buffer[100 + 1] = ""; + rrdlabels_get_value_strcpyz(localhost->rrdlabels, buffer, 100, "_virtualization"); + if(strcmp(buffer, "none") != 0) { + // no need to run on virtualized environments + do_root_ports = CONFIG_BOOLEAN_NO; + do_pci_slots = CONFIG_BOOLEAN_NO; + } + + do_root_ports = config_get_boolean("plugin:proc:/sys/class/pci/aer", "enable root ports", do_root_ports); + do_pci_slots = config_get_boolean("plugin:proc:/sys/class/pci/aer", "enable pci slots", do_pci_slots); + + if(!do_root_ports && !do_pci_slots) + return 1; + + aer_root = dictionary_create(DICT_OPTION_SINGLE_THREADED | DICT_OPTION_DONT_OVERWRITE_VALUE); + dictionary_register_insert_callback(aer_root, aer_insert_callback, NULL); + + AER_TYPE types = ((do_root_ports) ? (AER_ROOTPORT_TOTAL_ERR_COR|AER_ROOTPORT_TOTAL_ERR_FATAL) : 0) | + ((do_pci_slots) ? (AER_DEV_FATAL|AER_DEV_NONFATAL|AER_DEV_CORRECTABLE) : 0); + + find_all_pci_aer(types); + + if(!dictionary_entries(aer_root)) + return 1; + } + + struct aer_entry *a; + dfe_start_read(aer_root, a) { + switch(a->type) { + case AER_DEV_NONFATAL: + case AER_DEV_FATAL: + case AER_DEV_CORRECTABLE: + read_pci_aer_values(a_dfe.name, a); + break; + + case AER_ROOTPORT_TOTAL_ERR_COR: + case AER_ROOTPORT_TOTAL_ERR_FATAL: + read_pci_aer_count(a_dfe.name, a); + break; + } + + if(!a->updated) + continue; + + if(!a->st) { + const char *title; + const char *context; + + switch(a->type) { + case AER_DEV_NONFATAL: + title = "PCI Advanced Error Reporting (AER) Non-Fatal Errors"; + context = "pci.aer_nonfatal"; + break; + + case AER_DEV_FATAL: + title = "PCI Advanced Error Reporting (AER) Fatal Errors"; + context = "pci.aer_fatal"; + break; + + case AER_DEV_CORRECTABLE: + title = "PCI Advanced Error Reporting (AER) Correctable Errors"; + context = "pci.aer_correctable"; + break; + + case AER_ROOTPORT_TOTAL_ERR_COR: + title = "PCI Root-Port Advanced Error Reporting (AER) Correctable Errors"; + context = "pci.rootport_aer_correctable"; + break; + + case AER_ROOTPORT_TOTAL_ERR_FATAL: + title = "PCI Root-Port Advanced Error Reporting (AER) Fatal Errors"; + context = "pci.rootport_aer_fatal"; + break; + } + + char id[RRD_ID_LENGTH_MAX + 1]; + char nm[RRD_ID_LENGTH_MAX + 1]; + size_t len = strlen(pci_aer_dirname); + + const char *fname = a_dfe.name; + if(strncmp(a_dfe.name, pci_aer_dirname, len) == 0) + fname = &a_dfe.name[len]; + + if(*fname == '/') + fname++; + + snprintfz(id, RRD_ID_LENGTH_MAX, "%s_%s", &context[4], fname); + char *slash = strrchr(id, '/'); + if(slash) + *slash = '\0'; + + netdata_fix_chart_id(id); + + snprintfz(nm, RRD_ID_LENGTH_MAX, "%s", fname); + slash = strrchr(nm, '/'); + if(slash) + *slash = '\0'; + + a->st = rrdset_create_localhost( + "pci" + , id + , NULL + , "aer" + , context + , title + , "errors/s" + , PLUGIN_PROC_NAME + , "/sys/devices/pci/aer" + , NETDATA_CHART_PRIO_PCI_AER + , update_every + , RRDSET_TYPE_LINE + ); + + rrdlabels_add(a->st->rrdlabels, "device", nm, RRDLABEL_SRC_AUTO); + add_label_from_link(a, a_dfe.name, "driver"); + + struct aer_value *v; + dfe_start_read(a->values, v) { + v->rd = rrddim_add(a->st, v_dfe.name, NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); + } + dfe_done(v); + } + + struct aer_value *v; + dfe_start_read(a->values, v) { + if(unlikely(!v->rd)) + v->rd = rrddim_add(a->st, v_dfe.name, NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); + + rrddim_set_by_pointer(a->st, v->rd, (collected_number)v->count); + } + dfe_done(v); + + rrdset_done(a->st); + } + dfe_done(a); + + return 0; +} From df0890fac332ae2f4a5632125680f8514cdcaa92 Mon Sep 17 00:00:00 2001 From: netdatabot Date: Wed, 26 Jul 2023 00:17:52 +0000 Subject: [PATCH 43/55] [ci skip] Update changelog and version for nightly build: v1.41.0-85-nightly. --- CHANGELOG.md | 32 ++++++++++++++++---------------- packaging/version | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4aa71524e6831f..d092a645915cbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,16 +6,31 @@ **Merged pull requests:** +- Updated all Linux distros, macOS and Docker [\#15532](https://github.com/netdata/netdata/pull/15532) ([sashwathn](https://github.com/sashwathn)) +- Update platform support info and add a schema. [\#15531](https://github.com/netdata/netdata/pull/15531) ([Ferroin](https://github.com/Ferroin)) +- added cloud status in registry?action=hello [\#15530](https://github.com/netdata/netdata/pull/15530) ([ktsaou](https://github.com/ktsaou)) +- wait for node\_id while claiming [\#15526](https://github.com/netdata/netdata/pull/15526) ([ktsaou](https://github.com/ktsaou)) +- Add quick\_start key to deploy schema. [\#15522](https://github.com/netdata/netdata/pull/15522) ([Ferroin](https://github.com/Ferroin)) +- Add a schema for the categories.yaml file. [\#15521](https://github.com/netdata/netdata/pull/15521) ([Ferroin](https://github.com/Ferroin)) +- fix collector multi schema [\#15520](https://github.com/netdata/netdata/pull/15520) ([ilyam8](https://github.com/ilyam8)) +- Allow to create alert hashes with --disable-cloud [\#15519](https://github.com/netdata/netdata/pull/15519) ([MrZammler](https://github.com/MrZammler)) +- Python collector yaml updates [\#15517](https://github.com/netdata/netdata/pull/15517) ([Ancairon](https://github.com/Ancairon)) +- Add schema for deployment integrations and centralize integrations schemas. [\#15509](https://github.com/netdata/netdata/pull/15509) ([Ferroin](https://github.com/Ferroin)) +- update gitignore to include vscode settings for schema validation [\#15508](https://github.com/netdata/netdata/pull/15508) ([andrewm4894](https://github.com/andrewm4894)) +- Fill in metadata for idlejitter plugin. [\#15506](https://github.com/netdata/netdata/pull/15506) ([Ferroin](https://github.com/Ferroin)) - apps.plugin limits tracing [\#15504](https://github.com/netdata/netdata/pull/15504) ([ktsaou](https://github.com/ktsaou)) - Allow manage/health api call to be used without bearer [\#15503](https://github.com/netdata/netdata/pull/15503) ([MrZammler](https://github.com/MrZammler)) - freeipmi flush keepalive msgs [\#15499](https://github.com/netdata/netdata/pull/15499) ([ilyam8](https://github.com/ilyam8)) - add required properties to multi-module schema [\#15496](https://github.com/netdata/netdata/pull/15496) ([ilyam8](https://github.com/ilyam8)) +- proc integrations [\#15494](https://github.com/netdata/netdata/pull/15494) ([ktsaou](https://github.com/ktsaou)) - docs: clarify health percentage option [\#15492](https://github.com/netdata/netdata/pull/15492) ([ilyam8](https://github.com/ilyam8)) - Fix resource leak - CID 396310 [\#15491](https://github.com/netdata/netdata/pull/15491) ([stelfrag](https://github.com/stelfrag)) - Improve the update of the alert chart name in the database [\#15490](https://github.com/netdata/netdata/pull/15490) ([stelfrag](https://github.com/stelfrag)) +- PCI Advanced Error Reporting \(AER\) [\#15488](https://github.com/netdata/netdata/pull/15488) ([ktsaou](https://github.com/ktsaou)) - Add a machine distinct id to analytics [\#15485](https://github.com/netdata/netdata/pull/15485) ([MrZammler](https://github.com/MrZammler)) - Add basic slabinfo metadata. [\#15484](https://github.com/netdata/netdata/pull/15484) ([Ferroin](https://github.com/Ferroin)) - Update charts.d.plugin yaml [\#15483](https://github.com/netdata/netdata/pull/15483) ([Ancairon](https://github.com/Ancairon)) +- Make title reflect legacy agent dashboard [\#15479](https://github.com/netdata/netdata/pull/15479) ([Ancairon](https://github.com/Ancairon)) - docs: note that health foreach works only with template [\#15478](https://github.com/netdata/netdata/pull/15478) ([ilyam8](https://github.com/ilyam8)) - Yaml file updates [\#15477](https://github.com/netdata/netdata/pull/15477) ([Ancairon](https://github.com/Ancairon)) - Rename most-popular to most\_popular in categories.yaml [\#15476](https://github.com/netdata/netdata/pull/15476) ([Ancairon](https://github.com/Ancairon)) @@ -33,6 +48,7 @@ - Macos yaml updates [\#15459](https://github.com/netdata/netdata/pull/15459) ([Ancairon](https://github.com/Ancairon)) - Freeipmi yaml updates [\#15458](https://github.com/netdata/netdata/pull/15458) ([Ancairon](https://github.com/Ancairon)) - Add short descriptions to cgroups yaml [\#15457](https://github.com/netdata/netdata/pull/15457) ([Ancairon](https://github.com/Ancairon)) +- readme: reorder cols in whats new and add links [\#15455](https://github.com/netdata/netdata/pull/15455) ([andrewm4894](https://github.com/andrewm4894)) - Store and transmit chart\_name to cloud in alert events [\#15441](https://github.com/netdata/netdata/pull/15441) ([MrZammler](https://github.com/MrZammler)) - Add linux powercap metrics collector [\#15364](https://github.com/netdata/netdata/pull/15364) ([fhriley](https://github.com/fhriley)) - Hash table charts [\#15323](https://github.com/netdata/netdata/pull/15323) ([thiagoftsm](https://github.com/thiagoftsm)) @@ -218,7 +234,6 @@ - Add hardening options to CFLAGS by default if they are available. [\#15087](https://github.com/netdata/netdata/pull/15087) ([Ferroin](https://github.com/Ferroin)) - Additional CO-RE code \(eBPF.plugin\) [\#15078](https://github.com/netdata/netdata/pull/15078) ([thiagoftsm](https://github.com/thiagoftsm)) - Update README.md [\#15044](https://github.com/netdata/netdata/pull/15044) ([ktsaou](https://github.com/ktsaou)) -- Consistently start the agent as root and rely on it to drop privileges properly. [\#14890](https://github.com/netdata/netdata/pull/14890) ([Ferroin](https://github.com/Ferroin)) ## [v1.40.1](https://github.com/netdata/netdata/tree/v1.40.1) (2023-06-27) @@ -407,21 +422,6 @@ - Disable threads while we are investigating [\#14897](https://github.com/netdata/netdata/pull/14897) ([thiagoftsm](https://github.com/thiagoftsm)) - add opsgenie as a business level notificaiton method [\#14895](https://github.com/netdata/netdata/pull/14895) ([hugovalente-pm](https://github.com/hugovalente-pm)) - Remove dry run option from uninstall documentation [\#14894](https://github.com/netdata/netdata/pull/14894) ([Ancairon](https://github.com/Ancairon)) -- cgroups: add option to use Kubelet for pods metadata [\#14891](https://github.com/netdata/netdata/pull/14891) ([ilyam8](https://github.com/ilyam8)) -- /api/v2 part 9 [\#14888](https://github.com/netdata/netdata/pull/14888) ([ktsaou](https://github.com/ktsaou)) -- Add example configuration to w1sensor collector [\#14886](https://github.com/netdata/netdata/pull/14886) ([Ancairon](https://github.com/Ancairon)) -- /api/v2 part 8 [\#14885](https://github.com/netdata/netdata/pull/14885) ([ktsaou](https://github.com/ktsaou)) -- Fix/introduce links inside charts.d.plugin documentation [\#14884](https://github.com/netdata/netdata/pull/14884) ([Ancairon](https://github.com/Ancairon)) -- Add support for alert notifications to ntfy.sh [\#14875](https://github.com/netdata/netdata/pull/14875) ([Dim-P](https://github.com/Dim-P)) -- WEBRTC for communication between agents and browsers [\#14874](https://github.com/netdata/netdata/pull/14874) ([ktsaou](https://github.com/ktsaou)) -- Remove alpine 3.14 from the ci [\#14873](https://github.com/netdata/netdata/pull/14873) ([tkatsoulas](https://github.com/tkatsoulas)) -- cgroups.plugin: add image label [\#14872](https://github.com/netdata/netdata/pull/14872) ([ilyam8](https://github.com/ilyam8)) -- Fix regex syntax for clang-format checks. [\#14871](https://github.com/netdata/netdata/pull/14871) ([Ferroin](https://github.com/Ferroin)) -- bump go.d.plugin v0.52.0 [\#14870](https://github.com/netdata/netdata/pull/14870) ([ilyam8](https://github.com/ilyam8)) -- eBPF bug fixes [\#14869](https://github.com/netdata/netdata/pull/14869) ([thiagoftsm](https://github.com/thiagoftsm)) -- Update link from http to https [\#14864](https://github.com/netdata/netdata/pull/14864) ([Ancairon](https://github.com/Ancairon)) -- Fix js tag in documentation [\#14862](https://github.com/netdata/netdata/pull/14862) ([Ancairon](https://github.com/Ancairon)) -- Set a default registry unique id when there is none for statistics script [\#14861](https://github.com/netdata/netdata/pull/14861) ([MrZammler](https://github.com/MrZammler)) ## [v1.38.1](https://github.com/netdata/netdata/tree/v1.38.1) (2023-02-13) diff --git a/packaging/version b/packaging/version index 6e9a8fb6f4ce79..534b59525583c4 100644 --- a/packaging/version +++ b/packaging/version @@ -1 +1 @@ -v1.41.0-58-nightly +v1.41.0-85-nightly From 04275c03eb761025d60c852fa5bffb46da6a2037 Mon Sep 17 00:00:00 2001 From: thiagoftsm Date: Wed, 26 Jul 2023 07:27:33 +0000 Subject: [PATCH 44/55] Update nfacct yaml (#15535) nfacct_yaml: Update nfacct yaml --- collectors/nfacct.plugin/metadata.yaml | 28 +++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/collectors/nfacct.plugin/metadata.yaml b/collectors/nfacct.plugin/metadata.yaml index b2de6c02e7c630..5c0bf896244888 100644 --- a/collectors/nfacct.plugin/metadata.yaml +++ b/collectors/nfacct.plugin/metadata.yaml @@ -3,7 +3,7 @@ meta: module_name: nfacct.plugin monitored_instance: name: Netfilter - link: '' + link: 'https://www.netfilter.org/' categories: - data-collection.networking-stack-and-network-interfaces icon_filename: 'netfilter.png' @@ -17,33 +17,43 @@ meta: overview: data_collection: metrics_description: 'Monitor Netfilter metrics for optimal packet filtering and manipulation. Keep tabs on packet counts, dropped packets, and error rates to secure network operations.' - method_description: '' + method_description: 'Netdata uses libmnl (https://www.netfilter.org/projects/libmnl/index.html) to collect information.' supported_platforms: include: [] exclude: [] multi_instance: true additional_permissions: - description: '' + description: 'This plugin needs setuid.' default_behavior: auto_detection: - description: '' + description: 'This plugin uses socket to connect with netfilter to collect data' limits: description: '' performance_impact: description: '' setup: prerequisites: - list: [] + list: | + It is necessary to have `libmnl` installed on host. configuration: file: - name: '' - description: '' + name: 'netdata.conf' + section_name: '[plugin:nfacct]' + description: 'This is netdata main configuration file' options: description: '' folding: - title: '' + title: 'Config options' enabled: true - list: [] + list: | + - name: update every + description: Data collection frequency. + default_value: 1 + required: false + - name: command options + description: Additinal parameters for collector + default_value: + required: false examples: folding: enabled: true From b89a63731ff92df1747de70d169a060401cdce4f Mon Sep 17 00:00:00 2001 From: thiagoftsm Date: Wed, 26 Jul 2023 07:29:38 +0000 Subject: [PATCH 45/55] Update yaml description (diskspace) (#15527) * diskspace_yaml: Update yaml description * Update collectors/diskspace.plugin/metadata.yaml Co-authored-by: Andrew Maguire * diskspace_yaml: Address suggestions --------- Co-authored-by: Shyam Sreevalsan Co-authored-by: Andrew Maguire --- collectors/diskspace.plugin/metadata.yaml | 61 +++++++++++++++++++---- 1 file changed, 50 insertions(+), 11 deletions(-) diff --git a/collectors/diskspace.plugin/metadata.yaml b/collectors/diskspace.plugin/metadata.yaml index 7abce5bc90df4e..6ddc56b1c4de05 100644 --- a/collectors/diskspace.plugin/metadata.yaml +++ b/collectors/diskspace.plugin/metadata.yaml @@ -9,10 +9,16 @@ meta: icon_filename: 'hard-drive.svg' related_resources: integrations: - list: [] + list: | + - plugin_name: ebpf.plugin + module_name: disk info_provided_to_referring_integrations: description: '' - keywords: [] + keywords: | + - disk + - I/O + - space + - inode most_popular: false overview: data_collection: @@ -26,7 +32,7 @@ overview: description: '' default_behavior: auto_detection: - description: '' + description: 'The plugin reads data from `/proc/self/mountinfo` and `/proc/diskstats file`.' limits: description: '' performance_impact: @@ -36,14 +42,47 @@ setup: list: [] configuration: file: - name: '' - description: '' + name: 'netdata.conf' + section_name: '[plugin:proc:diskspace]' + description: 'This is netdata main configuration file' options: - description: '' + description: 'You can also specify per mount point `[plugin:proc:diskspace:mountpoint]`' folding: - title: '' + title: 'Config options' enabled: true - list: [] + list: | + - name: update every + description: Data collection frequency. + default_value: 1 + required: false + - name: remove charts of unmounted disks + description: Remove chart when a device is unmounted on host. + default_value: yes + required: false + - name: check for new mount points every + description: Parse proc files frequency. + default_value: 15 + required: false + - name: exclude space metrics on paths + description: Do not show metrics (charts) for listed paths. This option accepts netdata simple pattern. + default_value: /proc/* /sys/* /var/run/user/* /run/user/* /snap/* /var/lib/docker/* + required: false + - name: exclude space metrics on filesystems + description: Do not show metrics (charts) for listed filesystems. This option accepts netdata simple pattern. + default_value: *gvfs *gluster* *s3fs *ipfs *davfs2 *httpfs *sshfs *gdfs *moosefs fusectl autofs + required: false + - name: exclude inode metrics on filesystems + description: Do not show metrics (charts) for listed filesystems. This option accepts netdata simple pattern. + default_value: msdosfs msdos vfat overlayfs aufs* *unionfs + required: false + - name: space usage for all disks + description: Define if plugin will show metrics for space usage. When value is set to `auto` plugin will try to access information to display if filesystem or path was not discarded with previous option. + default_value: auto + required: false + - name: inodes usage for all disks + description: Define if plugin will show metrics for inode usage. When value is set to `auto` plugin will try to access information to display if filesystem or path was not discarded with previous option. + default_value: auto + required: false examples: folding: enabled: true @@ -74,11 +113,11 @@ metrics: description: "" labels: - name: mount_point - description: TBD + description: Path used to mount a filesystem - name: filesystem - description: TBD + description: The filesystem used to format a partition. - name: mount_root - description: TBD + description: Root directory where mount points are present. metrics: - name: disk.space description: Disk Space Usage From 2e815bbfb9bbc08c0e603c644d9875e39a58ffcc Mon Sep 17 00:00:00 2001 From: thiagoftsm Date: Wed, 26 Jul 2023 07:30:03 +0000 Subject: [PATCH 46/55] Freeimpi yaml (#15533) * freeimpi_yaml: Add initial description * freeimpi_yaml: Update freeimp yaml * freeimpi_yaml: Update freeimp yaml second group * freeimpi_yaml: Update description --- .../freeipmi.plugin/multi_metadata.yaml | 66 ++++++++++++------- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/collectors/freeipmi.plugin/multi_metadata.yaml b/collectors/freeipmi.plugin/multi_metadata.yaml index 08716a5a88dc7e..64f42f8f2ed8ad 100644 --- a/collectors/freeipmi.plugin/multi_metadata.yaml +++ b/collectors/freeipmi.plugin/multi_metadata.yaml @@ -23,33 +23,42 @@ modules: data_collection: metrics_description: "Monitor enterprise server sensor readings, event log entries, and hardware statuses to ensure reliable server operations." - method_description: "" + method_description: | + The plugin uses open source library IPMImonitoring to communitcate with sensors. supported_platforms: include: [] exclude: [] multi_instance: true additional_permissions: - description: "" + description: "The plugin needs setuid." default_behavior: auto_detection: description: "" limits: description: "" performance_impact: - description: "" + description: "Linux kernel module for IPMI can create big overhead." setup: prerequisites: - list: [] + list: | + If you have not previously used IPMI on your system, you will probably need to run the ipmimonitoring command as root to initiailze IPMI settings so that the Netdata plugin works correctly. It should return information about available seensors on the system. + + In some distributions libipmimonitoring.pc is located in a non-standard directory, which can cause building the plugin to fail when building Netdata from source. In that case you should find the file and link it to the standard pkg-config directory. Usually, running sudo ln -s /usr/lib/$(uname -m)-linux-gnu/pkgconfig/libipmimonitoring.pc/libipmimonitoring.pc /usr/lib/pkgconfig/libipmimonitoring.pc resolves this issue. configuration: file: - name: "" - description: "" + name: "netdata.conf" + section_name: '[plugin:freeipmi]' + description: "This is netdata main configuration file" options: - description: "" + description: "This tool receives command line options that are visible when user run: `./usr/libexec/netdata/plugins.d/freeipmi.plugin --help`" folding: - title: "" + title: "Config options" enabled: true - list: [] + list: | + - name: command options + description: Variable used to pass arguments for the plugin. + default_value: 1 + required: false examples: folding: enabled: true @@ -74,11 +83,11 @@ modules: description: "" labels: - name: sensor - description: TBD + description: The sensor name - name: type - description: TBD + description: One of 45 recognized sensor types (Battery, Voltage...) - name: component - description: TBD + description: One of 25 recognized components (Processor, Peripheral). metrics: - name: ipmi.sel description: IPMI Events @@ -158,28 +167,35 @@ modules: include: [] exclude: [] multi_instance: true - additional_permissions: - description: "" + additional_permissions: | + The plugin uses open source library IPMImonitoring to communitcate with sensors. default_behavior: auto_detection: description: "" limits: description: "" performance_impact: - description: "" + description: "Linux kernel module for IPMI can create big overhead." setup: prerequisites: - list: [] + list: | + If you have not previously used IPMI on your system, you will probably need to run the ipmimonitoring command as root to initiailze IPMI settings so that the Netdata plugin works correctly. It should return information about available seensors on the system. + + In some distributions libipmimonitoring.pc is located in a non-standard directory, which can cause building the plugin to fail when building Netdata from source. In that case you should find the file and link it to the standard pkg-config directory. Usually, running sudo ln -s /usr/lib/$(uname -m)-linux-gnu/pkgconfig/libipmimonitoring.pc/libipmimonitoring.pc /usr/lib/pkgconfig/libipmimonitoring.pc resolves this issue. configuration: - file: - name: "" - description: "" + name: "netdata.conf" + section_name: '[plugin:freeipmi]' + description: "This is netdata main configuration file" options: - description: "" + description: "This tool receives command line options that are visible when user run: `./usr/libexec/netdata/plugins.d/freeipmi.plugin --help`" folding: - title: "" + title: "Config options" enabled: true - list: [] + list: | + - name: command options + description: Variable used to pass arguments for the plugin. + default_value: 1 + required: false examples: folding: enabled: true @@ -204,11 +220,11 @@ modules: description: "" labels: - name: sensor - description: TBD + description: The sensor name - name: type - description: TBD + description: One of 45 recognized sensor types (Battery, Voltage...) - name: component - description: TBD + description: One of 25 recognized components (Processor, Peripheral). metrics: - name: ipmi.sel description: IPMI Events From e7d9d14c16bac4820f32fe4657650ace4054a498 Mon Sep 17 00:00:00 2001 From: Emmanuel Vasilakis Date: Wed, 26 Jul 2023 10:33:47 +0300 Subject: [PATCH 47/55] Update metadata.yaml for some python collectors (#15513) * add more info to metadata.yaml for ceph, haproxy and tor * changes * add dovecot metdata * add metdata for hpssa * add icecast metadata * add rethinkdbs metadata * add am2320 metadata * address review comments * Update collectors/python.d.plugin/ceph/metadata.yaml * Update collectors/python.d.plugin/am2320/metadata.yaml * Apply suggestions from code review * Update collectors/python.d.plugin/ceph/metadata.yaml --------- Co-authored-by: Andrew Maguire Co-authored-by: Fotis Voutsas --- .../python.d.plugin/am2320/metadata.yaml | 87 +++++++++++--- collectors/python.d.plugin/ceph/metadata.yaml | 83 +++++++++++--- .../python.d.plugin/dovecot/metadata.yaml | 87 +++++++++++--- .../python.d.plugin/haproxy/metadata.yaml | 90 ++++++++++++--- .../python.d.plugin/hpssa/metadata.yaml | 106 +++++++++++++++--- .../python.d.plugin/icecast/metadata.yaml | 83 +++++++++++--- .../python.d.plugin/rethinkdbs/metadata.yaml | 95 +++++++++++++--- collectors/python.d.plugin/tor/metadata.yaml | 93 ++++++++++++--- 8 files changed, 608 insertions(+), 116 deletions(-) diff --git a/collectors/python.d.plugin/am2320/metadata.yaml b/collectors/python.d.plugin/am2320/metadata.yaml index 25fa19f18a7384..440b3a212370aa 100644 --- a/collectors/python.d.plugin/am2320/metadata.yaml +++ b/collectors/python.d.plugin/am2320/metadata.yaml @@ -3,7 +3,7 @@ meta: module_name: am2320 monitored_instance: name: AM2320 - link: '' + link: 'https://learn.adafruit.com/adafruit-am2320-temperature-humidity-i2c-sensor/overview' categories: - data-collection.hardware-devices-and-sensors icon_filename: 'microchip.svg' @@ -12,43 +12,98 @@ meta: list: [] info_provided_to_referring_integrations: description: '' - keywords: [] + keywords: + - temperature + - am2320 + - sensor + - humidity most_popular: false overview: data_collection: - metrics_description: 'Monitor AM2320 metrics with Netdata for optimal temperature and humidity sensor performance. Improve your sensor performance with comprehensive dashboards and anomaly detection.' - method_description: '' + metrics_description: 'This collector monitors AM2320 sensor metrics about temperature and humidity.' + method_description: 'It retrieves temperature and humidity values by contacting an AM2320 sensor over i2c.' supported_platforms: include: [] exclude: [] - multi_instance: true + multi_instance: false additional_permissions: description: '' default_behavior: auto_detection: - description: '' + description: 'Assuming prerequisites are met, the collector will try to connect to the sensor via i2c' limits: description: '' performance_impact: description: '' setup: prerequisites: - list: [] + list: + - title: 'Sensor connection to a Raspberry Pi' + description: | + Connect the am2320 to the Raspberry Pi I2C pins + + Raspberry Pi 3B/4 Pins: + + - Board 3.3V (pin 1) to sensor VIN (pin 1) + - Board SDA (pin 3) to sensor SDA (pin 2) + - Board GND (pin 6) to sensor GND (pin 3) + - Board SCL (pin 5) to sensor SCL (pin 4) + + You may also need to add two I2C pullup resistors if your board does not already have them. The Raspberry Pi does have internal pullup resistors but it doesn't hurt to add them anyway. You can use 2.2K - 10K but we will just use 10K. The resistors go from VDD to SCL and SDA each. + - title: 'Software requirements' + description: | + Install the Adafruit Circuit Python AM2320 library: + + `sudo pip3 install adafruit-circuitpython-am2320` configuration: file: - name: '' - description: '' + name: python.d/am2320.conf options: - description: '' + description: | + There are 2 sections: + + * Global variables + * One or more JOBS that can define multiple different instances to monitor. + + The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values. + + Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition. + + Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified. folding: - title: '' + title: "Config options" enabled: true - list: [] + list: + - name: update_every + description: Sets the default data collection frequency. + default_value: 5 + required: false + - name: priority + description: Controls the order of charts at the netdata dashboard. + default_value: 60000 + required: false + - name: autodetection_retry + description: Sets the job re-check interval in seconds. + default_value: 0 + required: false + - name: penalty + description: Indicates whether to apply penalty to update_every in case of failures. + default_value: yes + required: false + - name: name + description: Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. + default_value: '' + required: false examples: folding: - enabled: true - title: '' - list: [] + enabled: false + title: "Config" + list: + - name: Local sensor + description: A basic JOB configuration + config: | + local_sensor: + name: 'Local AM2320' troubleshooting: problems: list: [] @@ -61,7 +116,7 @@ metrics: availability: [] scopes: - name: global - description: "" + description: "These metrics refer to the entire monitored application." labels: [] metrics: - name: am2320.temperature diff --git a/collectors/python.d.plugin/ceph/metadata.yaml b/collectors/python.d.plugin/ceph/metadata.yaml index 69d3700883133d..80fc9413514115 100644 --- a/collectors/python.d.plugin/ceph/metadata.yaml +++ b/collectors/python.d.plugin/ceph/metadata.yaml @@ -3,7 +3,7 @@ meta: module_name: ceph monitored_instance: name: Ceph - link: '' + link: 'https://ceph.io/' categories: - data-collection.storage-mount-points-and-filesystems icon_filename: 'ceph.png' @@ -12,12 +12,14 @@ meta: list: [] info_provided_to_referring_integrations: description: '' - keywords: [] + keywords: + - ceph + - storage most_popular: false overview: data_collection: - metrics_description: 'Monitor Ceph metrics for efficient distributed storage system performance. Keep tabs on cluster health, data redundancy, and latency to ensure reliable storage operations.' - method_description: '' + metrics_description: 'This collector monitors Ceph metrics about Cluster statistics, OSD usage, latency and Pool statistics.' + method_description: 'Uses the `rados` python module to connect to a Ceph cluster.' supported_platforms: include: [] exclude: [] @@ -33,22 +35,77 @@ overview: description: '' setup: prerequisites: - list: [] + list: + - title: '`rados` python module' + description: 'Make sure the `rados` python module is installed' + - title: 'Granting read permissions to ceph group from keyring file' + description: 'Execute: `chmod 640 /etc/ceph/ceph.client.admin.keyring`' + - title: 'Create a specific rados_id' + description: 'You can optionally create a rados_id to use instead of admin' configuration: file: - name: '' - description: '' + name: python.d/ceph.conf options: - description: '' + description: | + There are 2 sections: + + * Global variables + * One or more JOBS that can define multiple different instances to monitor. + + The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values. + + Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition. + + Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified. folding: - title: '' + title: "Config options" enabled: true - list: [] + list: + - name: update_every + description: Sets the default data collection frequency. + default_value: 5 + required: false + - name: priority + description: Controls the order of charts at the netdata dashboard. + default_value: 60000 + required: false + - name: autodetection_retry + description: Sets the job re-check interval in seconds. + default_value: 0 + required: false + - name: penalty + description: Indicates whether to apply penalty to update_every in case of failures. + default_value: yes + required: false + - name: name + description: Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. + default_value: '' + required: false + - name: config_file + description: Ceph config file + default_value: '' + required: true + - name: keyring_file + description: Ceph keyring file. netdata user must be added into ceph group and keyring file must be read group permission. + default_value: '' + required: true + - name: rados_id + description: A rados user id to use for connecting to the Ceph cluster. + default_value: 'admin' + required: false examples: folding: enabled: true - title: '' - list: [] + title: "Config" + list: + - name: Basic local Ceph cluster + description: A basic configuration to connect to a local Ceph cluster. + folding: + enabled: false + config: | + local: + config_file: '/etc/ceph/ceph.conf' + keyring_file: '/etc/ceph/ceph.client.admin.keyring' troubleshooting: problems: list: [] @@ -65,7 +122,7 @@ metrics: availability: [] scopes: - name: global - description: "" + description: "These metrics refer to the entire monitored application." labels: [] metrics: - name: ceph.general_usage diff --git a/collectors/python.d.plugin/dovecot/metadata.yaml b/collectors/python.d.plugin/dovecot/metadata.yaml index 3015b8331303b5..919d637f439b5e 100644 --- a/collectors/python.d.plugin/dovecot/metadata.yaml +++ b/collectors/python.d.plugin/dovecot/metadata.yaml @@ -3,7 +3,7 @@ meta: module_name: dovecot monitored_instance: name: Dovecot - link: '' + link: 'https://www.dovecot.org/' categories: - data-collection.mail-servers icon_filename: 'dovecot.png' @@ -12,12 +12,15 @@ meta: list: [] info_provided_to_referring_integrations: description: '' - keywords: [] + keywords: + - dovecot + - imap + - mail most_popular: false overview: data_collection: - metrics_description: 'Examine Dovecot metrics for insights into IMAP and POP3 server operations. Analyze connection statuses, mailbox operations, and error rates for efficient mail server operations.' - method_description: '' + metrics_description: 'This collector monitors Dovecot metrics about sessions, logins, commands, page faults and more.' + method_description: 'It uses the dovecot socket and executes the `EXPORT global` command to get the statistics.' supported_platforms: include: [] exclude: [] @@ -26,29 +29,85 @@ overview: description: '' default_behavior: auto_detection: - description: '' + description: 'If no configuration is given, the collector will attempt to connect to dovecot using unix socket localized in `/var/run/dovecot/stats`' limits: description: '' performance_impact: description: '' setup: prerequisites: - list: [] + list: + - title: 'Dovecot configuration' + description: The Dovecot UNIX socket should have R/W permissions for user netdata, or Dovecot should be configured with a TCP/IP socket. configuration: file: - name: '' - description: '' + name: python.d/dovecot.conf options: - description: '' + description: | + There are 2 sections: + + * Global variables + * One or more JOBS that can define multiple different instances to monitor. + + The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values. + + Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition. + + Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified. folding: - title: '' + title: "Config options" enabled: true - list: [] + list: + - name: update_every + description: Sets the default data collection frequency. + default_value: 5 + required: false + - name: priority + description: Controls the order of charts at the netdata dashboard. + default_value: 60000 + required: false + - name: autodetection_retry + description: Sets the job re-check interval in seconds. + default_value: 0 + required: false + - name: penalty + description: Indicates whether to apply penalty to update_every in case of failures. + default_value: yes + required: false + - name: name + description: Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. + default_value: '' + required: false + - name: socket + description: Use this socket to communicate with Devcot + default_value: /var/run/dovecot/stats + required: false + - name: host + description: Instead of using a socket, you can point the collector to an ip for devcot statistics. + default_value: '' + required: false + - name: port + description: Used in combination with host, configures the port devcot listens to. + default_value: '' + required: false examples: folding: enabled: true - title: '' - list: [] + title: "Config" + list: + - name: Local TCP + description: A basic TCP configuration. + config: | + localtcpip: + name: 'local' + host: '127.0.0.1' + port: 24242 + - name: Local socket + description: A basic local socket configuration + config: | + localsocket: + name: 'local' + socket: '/var/run/dovecot/stats' troubleshooting: problems: list: [] @@ -61,7 +120,7 @@ metrics: availability: [] scopes: - name: global - description: "" + description: "These metrics refer to the entire monitored application." labels: [] metrics: - name: dovecot.sessions diff --git a/collectors/python.d.plugin/haproxy/metadata.yaml b/collectors/python.d.plugin/haproxy/metadata.yaml index d0d165a9ea5b1f..b7c3c5eaa256fc 100644 --- a/collectors/python.d.plugin/haproxy/metadata.yaml +++ b/collectors/python.d.plugin/haproxy/metadata.yaml @@ -3,7 +3,7 @@ meta: module_name: haproxy monitored_instance: name: HAProxy - link: '' + link: 'https://www.haproxy.org/' categories: - data-collection.web-servers-and-web-proxies icon_filename: 'haproxy.png' @@ -12,12 +12,15 @@ meta: list: [] info_provided_to_referring_integrations: description: '' - keywords: [] + keywords: + - haproxy + - tcp + - balancer most_popular: false overview: data_collection: - metrics_description: 'Monitor HAProxy performance for ideal load balancing operations. Monitor session rates, queue lengths, and error rates to maintain balanced network traffic.' - method_description: '' + metrics_description: 'This collector monitors HAProxy metrics about frontend servers, backend servers, responses and more.' + method_description: 'It connects to the HAProxy instance via URL or UNIX socket.' supported_platforms: include: [] exclude: [] @@ -33,22 +36,83 @@ overview: description: '' setup: prerequisites: - list: [] + list: + - title: 'HAProxy setup for socket' + description: 'Socket must be readable and writable by the netdata user.' + - title: 'HAProxy setup for URL' + description: 'URL must have `stats uri ` present in the haproxy config, otherwise you will get HTTP 503 in the haproxy logs.' configuration: file: - name: '' - description: '' + name: python.d/haproxy.conf options: - description: '' + description: | + There are 2 sections: + + * Global variables + * One or more JOBS that can define multiple different instances to monitor. + + The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values. + + Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition. + + Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified. folding: - title: '' + title: "Config options" enabled: true - list: [] + list: + - name: update_every + description: Sets the default data collection frequency. + default_value: 5 + required: false + - name: priority + description: Controls the order of charts at the netdata dashboard. + default_value: 60000 + required: false + - name: autodetection_retry + description: Sets the job re-check interval in seconds. + default_value: 0 + required: false + - name: penalty + description: Indicates whether to apply penalty to update_every in case of failures. + default_value: yes + required: false + - name: name + description: Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. + default_value: '' + required: false + - name: user + description: Username if stats auth is used. + default_value: '' + required: false + - name: pass + description: Password if stats auth is used. + default_value: '' + required: false + - name: url + description: URL to the haproxy_stats endpoint. Also make sure the parameters `csv` and `norefresh` are provided. + default_value: '' + required: false + - name: socket + description: Unix socket path to the haproxy sock file. + default_value: '' + required: false examples: folding: enabled: true - title: '' - list: [] + title: "Config" + list: + - name: URL method + description: Use a URL to specify the endpoint to check for haproxy statistics. + config: | + via_url: + user: 'username' # ONLY IF stats auth is used + pass: 'password' # # ONLY IF stats auth is used + url: 'http://ip.address:port/url;csv;norefresh' + - name: Local socket + description: Use a local socket to check for haproxy statistics. + config: | + via_socket: + socket: 'path/to/haproxy/sock' troubleshooting: problems: list: [] @@ -69,7 +133,7 @@ metrics: availability: [] scopes: - name: global - description: "" + description: 'These metrics refer to the entire monitored application.' labels: [] metrics: - name: haproxy_f.bin diff --git a/collectors/python.d.plugin/hpssa/metadata.yaml b/collectors/python.d.plugin/hpssa/metadata.yaml index afaae7fc006b06..ecd410436f458a 100644 --- a/collectors/python.d.plugin/hpssa/metadata.yaml +++ b/collectors/python.d.plugin/hpssa/metadata.yaml @@ -3,7 +3,7 @@ meta: module_name: hpssa monitored_instance: name: HP Smart Storage Arrays - link: '' + link: 'https://buy.hpe.com/us/en/software/server-management-software/server-management-software/smart-array-management-software/hpe-smart-storage-administrator/p/5409020' categories: - data-collection.storage-mount-points-and-filesystems icon_filename: 'hp.jpeg' @@ -12,43 +12,117 @@ meta: list: [] info_provided_to_referring_integrations: description: '' - keywords: [] + keywords: + - storage + - hp + - hpssa + - array most_popular: false overview: data_collection: - metrics_description: 'Examine HP Smart Storage Arrays metrics with Netdata for efficient storage management. Improve your storage efficiency with real-time performance insights.' - method_description: '' + metrics_description: 'This collector monitors HP Smart Storage Arrays metrics about operational statuses and temperatures.' + method_description: 'It uses the command line tool `ssacli`. The exact command used is `sudo -n ssacli ctrl all show config detail`' supported_platforms: include: [] exclude: [] - multi_instance: true + multi_instance: false additional_permissions: description: '' default_behavior: auto_detection: - description: '' + description: 'If no configuration is provided, the collector will try to execute the `ssacli` binary.' limits: description: '' performance_impact: description: '' setup: prerequisites: - list: [] + list: + - title: 'Allow user netdata to execute `ssacli` as root.' + description: | + This module uses `ssacli`, which can only be executed by root. It uses `sudo` and assumes that it is configured such that the `netdata` user can execute `ssacli` as root without a password. + + - Add to your `/etc/sudoers` file: + + `which ssacli` shows the full path to the binary. + + ```bash + netdata ALL=(root) NOPASSWD: /path/to/ssacli + ``` + + - Reset Netdata's systemd + unit [CapabilityBoundingSet](https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Capabilities) (Linux + distributions with systemd) + + The default CapabilityBoundingSet doesn't allow using `sudo`, and is quite strict in general. Resetting is not optimal, but a next-best solution given the inability to execute `ssacli` using `sudo`. + + As the `root` user, do the following: + + ```cmd + mkdir /etc/systemd/system/netdata.service.d + echo -e '[Service]\nCapabilityBoundingSet=~' | tee /etc/systemd/system/netdata.service.d/unset-capability-bounding-set.conf + systemctl daemon-reload + systemctl restart netdata.service + ``` configuration: file: - name: '' - description: '' + name: python.d/hpssa.conf options: - description: '' + description: | + There are 2 sections: + + * Global variables + * One or more JOBS that can define multiple different instances to monitor. + + The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values. + + Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition. + + Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified. folding: - title: '' + title: "Config options" enabled: true - list: [] + list: + - name: update_every + description: Sets the default data collection frequency. + default_value: 5 + required: false + - name: priority + description: Controls the order of charts at the netdata dashboard. + default_value: 60000 + required: false + - name: autodetection_retry + description: Sets the job re-check interval in seconds. + default_value: 0 + required: false + - name: penalty + description: Indicates whether to apply penalty to update_every in case of failures. + default_value: yes + required: false + - name: name + description: Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. + default_value: '' + required: false + - name: ssacli_path + description: Path to the `ssacli` command line utility. Configure this if `ssacli` is not in the $PATH + default_value: '' + required: false + - name: use_sudo + description: Whether or not to use `sudo` to execute `ssacli` + default_value: 'True' + required: false examples: folding: - enabled: true - title: '' - list: [] + enabled: false + title: "Config" + list: + - name: Local simple config + description: A basic configuration, specyfing the path to `ssacli` + folding: + enabled: false + config: | + local: + ssacli_path: /usr/sbin/ssacli troubleshooting: problems: list: [] @@ -61,7 +135,7 @@ metrics: availability: [] scopes: - name: global - description: "" + description: "These metrics refer to the entire monitored application." labels: [] metrics: - name: hpssa.ctrl_status diff --git a/collectors/python.d.plugin/icecast/metadata.yaml b/collectors/python.d.plugin/icecast/metadata.yaml index 4d378ea1d87b84..757e444b12297e 100644 --- a/collectors/python.d.plugin/icecast/metadata.yaml +++ b/collectors/python.d.plugin/icecast/metadata.yaml @@ -3,7 +3,7 @@ meta: module_name: icecast monitored_instance: name: Icecast - link: '' + link: 'https://icecast.org/' categories: - data-collection.media-streaming-servers icon_filename: 'icecast.png' @@ -12,12 +12,15 @@ meta: list: [] info_provided_to_referring_integrations: description: '' - keywords: [] + keywords: + - icecast + - streaming + - media most_popular: false overview: data_collection: - metrics_description: 'Examine Icecast metrics for insights into media streaming server operations. Study listener counts, bitrate, and connection statuses for smooth streaming services.' - method_description: '' + metrics_description: 'This collector monitors Icecast listener counts.' + method_description: 'It connects to an icecast URL and uses the `status-json.xsl` endpoint to retrieve statistics.' supported_platforms: include: [] exclude: [] @@ -26,29 +29,79 @@ overview: description: '' default_behavior: auto_detection: - description: '' + description: 'Without configuration, the collector attempts to connect to http://localhost:8443/status-json.xsl' limits: description: '' performance_impact: description: '' setup: prerequisites: - list: [] + list: + - title: 'Icecast minimum version' + description: 'Needs at least icecast version >= 2.4.0' configuration: file: - name: '' - description: '' + name: python.d/icecast.conf options: - description: '' + description: | + There are 2 sections: + + * Global variables + * One or more JOBS that can define multiple different instances to monitor. + + The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values. + + Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition. + + Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified. folding: - title: '' + title: "Config options" enabled: true - list: [] + list: + - name: update_every + description: Sets the default data collection frequency. + default_value: 5 + required: false + - name: priority + description: Controls the order of charts at the netdata dashboard. + default_value: 60000 + required: false + - name: autodetection_retry + description: Sets the job re-check interval in seconds. + default_value: 0 + required: false + - name: penalty + description: Indicates whether to apply penalty to update_every in case of failures. + default_value: yes + required: false + - name: name + description: Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. + default_value: '' + required: false + - name: url + description: The URL (and port) to the icecast server. Needs to also include `/status-json.xsl` + default_value: 'http://localhost:8443/status-json.xsl' + required: false + - name: user + description: Username to use to connect to `url` if it's password protected. + default_value: '' + required: false + - name: pass + description: Password to use to connect to `url` if it's password protected. + default_value: '' + required: false examples: folding: - enabled: true - title: '' - list: [] + enabled: false + title: "Config" + list: + - name: Remote Icecast server + description: Configure a remote icecast server + folding: + enabled: false + config: | + remote: + url: 'http://1.2.3.4:8443/status-json.xsl' troubleshooting: problems: list: [] @@ -61,7 +114,7 @@ metrics: availability: [] scopes: - name: global - description: "" + description: "These metrics refer to the entire monitored application." labels: [] metrics: - name: icecast.listeners diff --git a/collectors/python.d.plugin/rethinkdbs/metadata.yaml b/collectors/python.d.plugin/rethinkdbs/metadata.yaml index 40d6cf00e25d13..f749e67958fa5c 100644 --- a/collectors/python.d.plugin/rethinkdbs/metadata.yaml +++ b/collectors/python.d.plugin/rethinkdbs/metadata.yaml @@ -3,7 +3,7 @@ meta: module_name: rethinkdbs monitored_instance: name: RethinkDB - link: '' + link: 'https://rethinkdb.com/' categories: - data-collection.database-servers icon_filename: 'rethinkdb.png' @@ -12,12 +12,15 @@ meta: list: [] info_provided_to_referring_integrations: description: '' - keywords: [] + keywords: + - rethinkdb + - database + - db most_popular: false overview: data_collection: - metrics_description: 'Monitor RethinkDB performance for real-time database operations and performance. Improve your database operations with Netdata''s real-time metrics and built-in alerts.' - method_description: '' + metrics_description: 'This collector monitors metrics about RethinkDB clusters and database servers.' + method_description: 'It uses the `rethinkdb` python module to connect to a RethinkDB server instance and gather statistics.' supported_platforms: include: [] exclude: [] @@ -26,29 +29,91 @@ overview: description: '' default_behavior: auto_detection: - description: '' + description: 'When no configuration file is found, the collector tries to connect to 127.0.0.1:28015.' limits: description: '' performance_impact: description: '' setup: prerequisites: - list: [] + list: + - title: 'Required python module' + description: 'The collector requires the `rethinkdb` python module to be installed.' configuration: file: - name: '' - description: '' + name: python.d/rethinkdbs.conf options: - description: '' + description: | + There are 2 sections: + + * Global variables + * One or more JOBS that can define multiple different instances to monitor. + + The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values. + + Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition. + + Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified. folding: - title: '' + title: "Config options" enabled: true - list: [] + list: + - name: update_every + description: Sets the default data collection frequency. + default_value: 5 + required: false + - name: priority + description: Controls the order of charts at the netdata dashboard. + default_value: 60000 + required: false + - name: autodetection_retry + description: Sets the job re-check interval in seconds. + default_value: 0 + required: false + - name: penalty + description: Indicates whether to apply penalty to update_every in case of failures. + default_value: yes + required: false + - name: name + description: Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. + default_value: '' + required: false + - name: host + description: Hostname or ip of the RethinkDB server. + default_value: 'localhost' + required: false + - name: port + description: Port to connect to the RethinkDB server. + default_value: '28015' + required: false + - name: user + description: The username to use to connect to the RethinkDB server. + default_value: 'admin' + required: false + - name: password + description: The password to use to connect to the RethinkDB server. + default_value: '' + required: false + - name: timeout + description: Set a connect timeout to the RethinkDB server. + default_value: '2' + required: false examples: folding: - enabled: true - title: '' - list: [] + enabled: false + title: "Config" + list: + - name: Local RethinkDB server + description: An example of a configuration for a local RethinkDB server + folding: + enabled: false + config: | + localhost: + name: 'local' + host: '127.0.0.1' + port: 28015 + user: "user" + password: "pass" troubleshooting: problems: list: [] @@ -61,7 +126,7 @@ metrics: availability: [] scopes: - name: global - description: "" + description: "These metrics refer to the entire monitored application." labels: [] metrics: - name: rethinkdb.cluster_connected_servers diff --git a/collectors/python.d.plugin/tor/metadata.yaml b/collectors/python.d.plugin/tor/metadata.yaml index 1342e5cf892195..323c178d9df15a 100644 --- a/collectors/python.d.plugin/tor/metadata.yaml +++ b/collectors/python.d.plugin/tor/metadata.yaml @@ -3,7 +3,7 @@ meta: module_name: tor monitored_instance: name: Tor - link: '' + link: 'https://www.torproject.org/' categories: - data-collection.vpns icon_filename: 'tor.png' @@ -12,12 +12,15 @@ meta: list: [] info_provided_to_referring_integrations: description: '' - keywords: [] + keywords: + - tor + - traffic + - vpn most_popular: false overview: data_collection: - metrics_description: 'Monitor Tor metrics with Netdata for efficient anonymous communication operations. Enhance your anonymous communication with real-time insights and alerts.' - method_description: '' + metrics_description: 'This collector monitors Tor bandwidth traffic .' + method_description: 'It connects to the Tor control port to collect traffic statistics.' supported_platforms: include: [] exclude: [] @@ -26,29 +29,91 @@ overview: description: '' default_behavior: auto_detection: - description: '' + description: 'If no configuration is provided the collector will try to connect to 127.0.0.1:9051 to detect a running tor instance.' limits: description: '' performance_impact: description: '' setup: prerequisites: - list: [] + list: + - title: 'Required Tor configuration' + description: | + Add to /etc/tor/torrc: + + ControlPort 9051 + + For more options please read the manual. configuration: file: - name: '' - description: '' + name: python.d/tor.conf options: - description: '' + description: | + There are 2 sections: + + * Global variables + * One or more JOBS that can define multiple different instances to monitor. + + The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values. + + Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition. + + Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified. folding: - title: '' + title: "Config options" enabled: true - list: [] + list: + - name: update_every + description: Sets the default data collection frequency. + default_value: 5 + required: false + - name: priority + description: Controls the order of charts at the netdata dashboard. + default_value: 60000 + required: false + - name: autodetection_retry + description: Sets the job re-check interval in seconds. + default_value: 0 + required: false + - name: penalty + description: Indicates whether to apply penalty to update_every in case of failures. + default_value: yes + required: false + - name: name + description: Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. + default_value: '' + required: false + - name: control_addr + description: Tor control IP address + default_value: 127.0.0.1 + required: false + - name: control_port + description: Tor control port. Can be either a tcp port, or a path to a socket file. + default_value: 9051 + required: false + - name: password + description: Tor control password + default_value: '' + required: false examples: folding: enabled: true - title: '' - list: [] + title: "Config" + list: + - name: Local TCP + description: A basic TCP configuration. `local_addr` is ommited and will default to `127.0.0.1` + config: | + local_tcp: + name: 'local' + control_port: 9051 + password: # if required + - name: Local socket + description: A basic local socket configuration + config: | + local_socket: + name: 'local' + control_port: '/var/run/tor/control' + password: # if required troubleshooting: problems: list: [] @@ -61,7 +126,7 @@ metrics: availability: [] scopes: - name: global - description: "" + description: "These metrics refer to the entire monitored application." labels: [] metrics: - name: tor.traffic From 60730c1e479a887e43292da013bb4d237092e8f3 Mon Sep 17 00:00:00 2001 From: Andrew Maguire Date: Wed, 26 Jul 2023 08:41:50 +0100 Subject: [PATCH 48/55] add `diskquota` collector to third party collectors list (#15524) add `diskquota` collector to third party collectors --- collectors/COLLECTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/collectors/COLLECTORS.md b/collectors/COLLECTORS.md index dbf2a9a1af57ba..925c03d0c3c6e1 100644 --- a/collectors/COLLECTORS.md +++ b/collectors/COLLECTORS.md @@ -669,6 +669,7 @@ $ sudo systemctl restart netdata - [netdata-debsecan](https://github.com/nodiscc/netdata-debsecan) - Check/graph the number of CVEs in currently installed packages. - [netdata-logcount](https://github.com/nodiscc/netdata-logcount) - Check/graph the number of syslog messages, by level over time. - [netdata-apt](https://github.com/nodiscc/netdata-apt) - Check/graph and alert on the number of upgradeable packages, and available distribution upgrades. +- [diskquota](https://github.com/netdata/community/tree/main/collectors/python.d.plugin/diskquota) - Monitors the defined quotas on one or more filesystems depending on configuration. ## Etc From a14983c7eea9dc76d28f097f9bb7e48681550263 Mon Sep 17 00:00:00 2001 From: Ilya Mashchenko Date: Wed, 26 Jul 2023 12:38:02 +0300 Subject: [PATCH 49/55] change api.netdata.cloud to app.netdata.cloud (#15538) --- aclk/README.md | 6 +++--- claim/README.md | 18 +++++++++--------- claim/netdata-claim.sh.in | 2 +- daemon/README.md | 2 +- .../add-webhook-notification-configuration.md | 4 ++-- ...ubleshooting-agent-with-cloud-connection.md | 14 +++++++------- packaging/installer/kickstart.sh | 2 +- packaging/installer/methods/kickstart.md | 2 +- packaging/installer/methods/macos.md | 4 ++-- .../netdata.conf_with_repetition | 2 +- .../netdata.conf_without_repetition | 2 +- 11 files changed, 29 insertions(+), 29 deletions(-) diff --git a/aclk/README.md b/aclk/README.md index 4f4693025411ca..c853c23240f271 100644 --- a/aclk/README.md +++ b/aclk/README.md @@ -12,7 +12,7 @@ The Cloud App lives at app.netdata.cloud which currently resolves to the followi > ### Caution > ->This list of IPs can change without notice, we strongly advise you to whitelist following domains `api.netdata.cloud`, `mqtt.netdata.cloud`, if this is not an option in your case always verify the current domain resolution (e.g via the `host` command). +>This list of IPs can change without notice, we strongly advise you to whitelist following domains `app.netdata.cloud`, `mqtt.netdata.cloud`, if this is not an option in your case always verify the current domain resolution (e.g via the `host` command). For a guide to connecting a node using the ACLK, plus additional troubleshooting and reference information, read our [connect to Cloud documentation](https://github.com/netdata/netdata/blob/master/claim/README.md). @@ -35,7 +35,7 @@ configuration uses two settings: ```conf [global] enabled = yes - cloud base url = https://api.netdata.cloud + cloud base url = https://app.netdata.cloud ``` If your Agent needs to use a proxy to access the internet, you must [set up a proxy for @@ -96,7 +96,7 @@ must contain only `EOF`. ```bash [global] enabled = no - cloud base url = https://api.netdata.cloud + cloud base url = https://app.netdata.cloud EOF ``` diff --git a/claim/README.md b/claim/README.md index fed37018c02c2d..5b15a6c1931681 100644 --- a/claim/README.md +++ b/claim/README.md @@ -69,7 +69,7 @@ When coming from the [Nodes tab](https://github.com/netdata/netdata/blob/master/ If you want to connect a node that is running on a Linux environment, the script that will be provided to you by Netdata Cloud is the [kickstart](https://github.com/netdata/netdata/blob/master/packaging/installer/README.md#automatic-one-line-installation-script) which will install the Netdata Agent on your node, if it isn't already installed, and connect the node to Netdata Cloud. It should be similar to: ```bash -wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh --claim-token TOKEN --claim-rooms ROOM1,ROOM2 --claim-url https://api.netdata.cloud +wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh --claim-token TOKEN --claim-rooms ROOM1,ROOM2 --claim-url https://app.netdata.cloud ``` The script should return `Agent was successfully claimed.`. If the connecting to Netdata Cloud process returns errors, or if you don't see @@ -98,7 +98,7 @@ The default user is `netdata`. Yours may be different, so pay attention to the o and run the script. ```bash -wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh --claim-token TOKEN --claim-rooms ROOM1,ROOM2 --claim-url https://api.netdata.cloud +wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh --claim-token TOKEN --claim-rooms ROOM1,ROOM2 --claim-url https://app.netdata.cloud ``` ### Connect an agent running in Docker @@ -209,7 +209,7 @@ docker run -d --name=netdata \ --cap-add SYS_PTRACE \ --security-opt apparmor=unconfined \ -e NETDATA_CLAIM_TOKEN=TOKEN \ - -e NETDATA_CLAIM_URL="https://api.netdata.cloud" \ + -e NETDATA_CLAIM_URL="https://app.netdata.cloud" \ -e NETDATA_CLAIM_ROOMS=ROOM1,ROOM2 \ -e NETDATA_CLAIM_PROXY=PROXY \ netdata/netdata @@ -254,7 +254,7 @@ services: - /etc/os-release:/host/etc/os-release:ro environment: - NETDATA_CLAIM_TOKEN=TOKEN - - NETDATA_CLAIM_URL="https://api.netdata.cloud" + - NETDATA_CLAIM_URL="https://app.netdata.cloud" - NETDATA_CLAIM_ROOMS=ROOM1,ROOM2 volumes: @@ -275,7 +275,7 @@ Connect a _running Netdata Agent container_, where you don't want to recreate th `netdata` with the name of your running container: ```bash -docker exec -it netdata netdata-claim.sh -token=TOKEN -rooms=ROOM1,ROOM2 -url=https://api.netdata.cloud +docker exec -it netdata netdata-claim.sh -token=TOKEN -rooms=ROOM1,ROOM2 -url=https://app.netdata.cloud ``` The values for `ROOM1,ROOM2` can be found by by going to Netdata Cloud, clicking the **Nodes** tab, clicking **Connect Nodes**, selecting **Docker**, and copying the `rooms=` value in the command provided. @@ -288,7 +288,7 @@ you don't see the node in your Space after 60 seconds, see the [troubleshooting To connect a node that is running on a macOS environment the script that will be provided to you by Netdata Cloud is the [kickstart](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/macos.md#install-netdata-with-our-automatic-one-line-installation-script) which will install the Netdata Agent on your node, if it isn't already installed, and connect the node to Netdata Cloud. It should be similar to: ```bash -curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --install-prefix /usr/local/ --claim-token TOKEN --claim-rooms ROOM1,ROOM2 --claim-url https://api.netdata.cloud +curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --install-prefix /usr/local/ --claim-token TOKEN --claim-rooms ROOM1,ROOM2 --claim-url https://app.netdata.cloud ``` The script should return `Agent was successfully claimed.`. If the connecting to Netdata Cloud process returns errors, or if you don't see @@ -329,7 +329,7 @@ You can now move on to connecting. When you connect with the [kickstart](https:/ append the same proxy setting you added to `netdata.conf`. ```bash -wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh --claim-token TOKEN --claim-rooms ROOM1,ROOM2 --claim-url https://api.netdata.cloud --claim-proxy http://[user:pass@]host:ip +wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh --claim-token TOKEN --claim-rooms ROOM1,ROOM2 --claim-url https://app.netdata.cloud --claim-proxy http://[user:pass@]host:ip ``` Hit **Enter**. The script should return `Agent was successfully claimed.`. If the connecting to Netdata Cloud process returns errors, or if @@ -566,7 +566,7 @@ using the [ACLK](https://github.com/netdata/netdata/blob/master/aclk/README.md). | setting | default | info | |:-------------- |:------------------------- |:-------------------------------------------------------------------------------------------------------------------------------------- | -| cloud base url | | The URL for the Netdata Cloud web application. You should not change this. If you want to disable Cloud, change the `enabled` setting. | +| cloud base url | | The URL for the Netdata Cloud web application. You should not change this. If you want to disable Cloud, change the `enabled` setting. | | enabled | yes | The runtime option to disable the [Agent-Cloud link](https://github.com/netdata/netdata/blob/master/aclk/README.md) and prevent your Agent from connecting to Netdata Cloud. | ### Claiming script @@ -580,7 +580,7 @@ using `sudo`, or as the user running the Agent (typically `netdata`), and passin -rooms=ROOM1,ROOM2,... where ROOMX is the War Room this node should be added to. This list is optional. -url=URL_BASE - where URL_BASE is the Netdata Cloud endpoint base URL. By default, this is https://api.netdata.cloud. + where URL_BASE is the Netdata Cloud endpoint base URL. By default, this is https://app.netdata.cloud. -id=AGENT_ID where AGENT_ID is the unique identifier of the Agent. This is the Agent's MACHINE_GUID by default. -hostname=HOSTNAME diff --git a/claim/netdata-claim.sh.in b/claim/netdata-claim.sh.in index 43040e31676227..cc6c1093220d45 100755 --- a/claim/netdata-claim.sh.in +++ b/claim/netdata-claim.sh.in @@ -136,7 +136,7 @@ MACHINE_GUID_FILE="@registrydir_POST@/netdata.public.unique.id" CLAIMING_DIR="${NETDATA_VARLIB_DIR}/cloud.d" TOKEN="unknown" URL_BASE=$(get_config_value cloud global "cloud base url") -[ -z "$URL_BASE" ] && URL_BASE="https://api.netdata.cloud" # Cover post-install with --dont-start +[ -z "$URL_BASE" ] && URL_BASE="https://app.netdata.cloud" # Cover post-install with --dont-start ID="unknown" ROOMS="" [ -z "$HOSTNAME" ] && HOSTNAME=$(hostname) diff --git a/daemon/README.md b/daemon/README.md index 65ac105c648ffc..3fb33e5c74335f 100644 --- a/daemon/README.md +++ b/daemon/README.md @@ -104,7 +104,7 @@ The command line options of the Netdata 1.10.0 version are the following: -W simple-pattern pattern string Check if string matches pattern and exit. - -W "claim -token=TOKEN -rooms=ROOM1,ROOM2 url=https://api.netdata.cloud" + -W "claim -token=TOKEN -rooms=ROOM1,ROOM2 url=https://app.netdata.cloud" Connect the agent to the workspace rooms pointed to by TOKEN and ROOM*. Signals netdata handles: diff --git a/docs/cloud/alerts-notifications/add-webhook-notification-configuration.md b/docs/cloud/alerts-notifications/add-webhook-notification-configuration.md index 21d1b6ed847816..012b0478f15532 100644 --- a/docs/cloud/alerts-notifications/add-webhook-notification-configuration.md +++ b/docs/cloud/alerts-notifications/add-webhook-notification-configuration.md @@ -140,7 +140,7 @@ server { ssl_client_certificate /path/to/Netdata_CA.pem; location / { - if ($ssl_client_s_dn !~ "CN=api.netdata.cloud") { + if ($ssl_client_s_dn !~ "CN=app.netdata.cloud") { return 403; } # ... existing location configuration ... @@ -158,7 +158,7 @@ Listen 443 SSLCACertificateFile "/path/to/Netdata_CA.pem" - Require expr "%{SSL_CLIENT_S_DN_CN} == 'api.netdata.cloud'" + Require expr "%{SSL_CLIENT_S_DN_CN} == 'app.netdata.cloud'" # ... existing directory configuration ... ``` diff --git a/docs/guides/troubleshoot/troubleshooting-agent-with-cloud-connection.md b/docs/guides/troubleshoot/troubleshooting-agent-with-cloud-connection.md index ad747cb762fb45..9c69ee915289a7 100644 --- a/docs/guides/troubleshoot/troubleshooting-agent-with-cloud-connection.md +++ b/docs/guides/troubleshoot/troubleshooting-agent-with-cloud-connection.md @@ -19,17 +19,17 @@ If the claiming process fails, the node will not appear at all in Netdata Cloud. First ensure that you: - Use the newest possible stable or nightly version of the agent (at least v1.32). -- Your node can successfully issue an HTTPS request to https://api.netdata.cloud +- Your node can successfully issue an HTTPS request to https://app.netdata.cloud Other possible causes differ between kickstart installations and Docker installations. ### Verify your node can access Netdata Cloud -If you run either `curl` or `wget` to do an HTTPS request to https://api.netdata.cloud, you should get +If you run either `curl` or `wget` to do an HTTPS request to https://app.netdata.cloud, you should get back a 404 response. If you do not, check your network connectivity, domain resolution, and firewall settings for outbound connections. -If your firewall is configured to completely prevent outbound connections, you need to whitelist `api.netdata.cloud` and `mqtt.netdata.cloud`. If you can't whitelist domains in your firewall, you can whitelist the IPs that the hostnames resolve to, but keep in mind that they can change without any notice. +If your firewall is configured to completely prevent outbound connections, you need to whitelist `app.netdata.cloud` and `mqtt.netdata.cloud`. If you can't whitelist domains in your firewall, you can whitelist the IPs that the hostnames resolve to, but keep in mind that they can change without any notice. If you use an outbound proxy, you need to [take some extra steps]( https://github.com/netdata/netdata/blob/master/claim/README.md#connect-through-a-proxy). @@ -100,7 +100,7 @@ process, but not have enough time to establish the ACLK connection. ### Verify that your firewall allows websockets -The agent initiates an SSL connection to `api.netdata.cloud` and then upgrades that connection to use secure +The agent initiates an SSL connection to `app.netdata.cloud` and then upgrades that connection to use secure websockets. Some firewalls completely prevent the use of websockets, even for outbound connections. ## Previously connected agent that can no longer connect @@ -110,7 +110,7 @@ that it is currently not connected. ### Verify that network connectivity is still possible -Verify that you can still issue HTTPS requests to api.netdata.cloud and that no firewall or proxy changes were made. +Verify that you can still issue HTTPS requests to app.netdata.cloud and that no firewall or proxy changes were made. ### Verify that the claiming info is persisted @@ -124,7 +124,7 @@ work this way, as we have unique node identification information under `/var/lib ### Verify that your IP is not blocked by Netdata Cloud -Most of the nodes change IPs dynamically. It is possible that your current IP has been restricted from accessing `api.netdata.cloud` due to security concerns, usually because it was spamming Netdata Coud with too many +Most of the nodes change IPs dynamically. It is possible that your current IP has been restricted from accessing `app.netdata.cloud` due to security concerns, usually because it was spamming Netdata Coud with too many failed requests (old versions of the agent). To verify this: @@ -135,7 +135,7 @@ To verify this: sudo netdatacli aclk-state | grep "Banned By Cloud" ``` - The output will contain a line indicating if the IP is banned from `api.netdata.cloud`: + The output will contain a line indicating if the IP is banned from `app.netdata.cloud`: ```bash Banned By Cloud: yes diff --git a/packaging/installer/kickstart.sh b/packaging/installer/kickstart.sh index ed448f7da2bca6..2d793eafde6008 100755 --- a/packaging/installer/kickstart.sh +++ b/packaging/installer/kickstart.sh @@ -50,7 +50,7 @@ SELECTED_INSTALL_METHOD="none" INSTALL_TYPE="unknown" INSTALL_PREFIX="" NETDATA_AUTO_UPDATES="default" -NETDATA_CLAIM_URL="https://api.netdata.cloud" +NETDATA_CLAIM_URL="https://app.netdata.cloud" NETDATA_COMMAND="default" NETDATA_DISABLE_CLOUD=0 NETDATA_INSTALLER_OPTIONS="" diff --git a/packaging/installer/methods/kickstart.md b/packaging/installer/methods/kickstart.md index 374ac594a00440..565a9d195d5b00 100644 --- a/packaging/installer/methods/kickstart.md +++ b/packaging/installer/methods/kickstart.md @@ -98,7 +98,7 @@ The `kickstart.sh` script accepts a number of optional parameters to control how - `--claim-rooms`: Specify a comma-separated list of tokens for each War Room this node should appear in. - `--claim-proxy`: Specify a proxy to use when connecting to the cloud in the form of `http://[user:pass@]host:ip` for an HTTP(S) proxy. See [connecting through a proxy](https://github.com/netdata/netdata/blob/master/claim/README.md#connect-through-a-proxy) for details. -- `--claim-url`: Specify a URL to use when connecting to the cloud. Defaults to `https://api.netdata.cloud`. +- `--claim-url`: Specify a URL to use when connecting to the cloud. Defaults to `https://app.netdata.cloud`. - `--override-distro`: Override the distro detection logic and assume the system is using a specific Linux distribution and release. Takes a single argument consisting of the values of the `ID`, `VERSION_ID`, and `VERSION_CODENAME` fields from `/etc/os-release` for the desired distribution. The following options are mutually exclusive and specifiy special operations other than trying to install Netdata normally or update an existing install: diff --git a/packaging/installer/methods/macos.md b/packaging/installer/methods/macos.md index b09632fa10eb97..e7ff33ed7163f4 100644 --- a/packaging/installer/methods/macos.md +++ b/packaging/installer/methods/macos.md @@ -45,11 +45,11 @@ area](https://github.com/netdata/netdata/blob/master/docs/cloud/manage/organize- - `--claim-rooms`: Specify a comma-separated list of tokens for each War Room this node should appear in. - `--claim-proxy`: Specify a proxy to use when connecting to the cloud in the form of `http://[user:pass@]host:ip` for an HTTP(S) proxy. See [connecting through a proxy](https://github.com/netdata/netdata/blob/master/claim/README.md#connect-through-a-proxy) for details. -- `--claim-url`: Specify a URL to use when connecting to the cloud. Defaults to `https://api.netdata.cloud`. +- `--claim-url`: Specify a URL to use when connecting to the cloud. Defaults to `https://app.netdata.cloud`. For example: ```bash -curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --install-prefix /usr/local/ --claim-token TOKEN --claim-rooms ROOM1,ROOM2 --claim-url https://api.netdata.cloud +curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --install-prefix /usr/local/ --claim-token TOKEN --claim-rooms ROOM1,ROOM2 --claim-url https://app.netdata.cloud ``` The Netdata Agent is installed under `/usr/local/netdata` on your machine. Your machine will also show up as a node in your Netdata Cloud. diff --git a/tests/alarm_repetition/netdata.conf_with_repetition b/tests/alarm_repetition/netdata.conf_with_repetition index e1424abfdb601c..5a1d88b5109d2a 100644 --- a/tests/alarm_repetition/netdata.conf_with_repetition +++ b/tests/alarm_repetition/netdata.conf_with_repetition @@ -51,4 +51,4 @@ allow from = * [cloud] - cloud base url = https://api.netdata.cloud + cloud base url = https://app.netdata.cloud diff --git a/tests/alarm_repetition/netdata.conf_without_repetition b/tests/alarm_repetition/netdata.conf_without_repetition index f11b1632d06036..e78cef2727a0df 100644 --- a/tests/alarm_repetition/netdata.conf_without_repetition +++ b/tests/alarm_repetition/netdata.conf_without_repetition @@ -51,4 +51,4 @@ allow from = * [cloud] - cloud base url = https://api.netdata.cloud + cloud base url = https://app.netdata.cloud From 51eb8c3dbe9358845b8efa83d5db4e097905e86b Mon Sep 17 00:00:00 2001 From: Ilya Mashchenko Date: Wed, 26 Jul 2023 13:56:20 +0300 Subject: [PATCH 50/55] docs: fix apps fd badges and typos (#15539) --- collectors/apps.plugin/README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/collectors/apps.plugin/README.md b/collectors/apps.plugin/README.md index ad4e0882fdd785..fd5371f08f9dcb 100644 --- a/collectors/apps.plugin/README.md +++ b/collectors/apps.plugin/README.md @@ -30,7 +30,7 @@ a predefined set of members (of course, only process groups found running are re Unlike traditional process monitoring tools (like `top`), `apps.plugin` is able to account the resource utilization of exit processes. Their utilization is accounted at their currently running parents. So, `apps.plugin` is perfectly able to measure the resources used by shell scripts and other processes -that fork/spawn other short lived processes hundreds of times per second. +that fork/spawn other short-lived processes hundreds of times per second. ## Charts @@ -75,7 +75,7 @@ The above are reported: - For **Applications** per target configured. - For **Users** per username or UID (when the username is not available). -- For **User Groups** per groupname or GID (when groupname is not available). +- For **User Groups** per group name or GID (when group name is not available). ## Performance @@ -183,8 +183,7 @@ If this fails (i.e. `setcap` fails), `apps.plugin` is setuid to `root`. There are a few cases, like `docker` and `virtuozzo` containers, where `setcap` succeeds, but the capabilities are silently ignored (in `lxc` containers `setcap` fails). -In these cases ()`setcap` succeeds but capabilities do not work), you will have to setuid -to root `apps.plugin` by running these commands: +In this case, you will have to setuid to root `apps.plugin` by running these commands: ```sh chown root:netdata /usr/libexec/netdata/plugins.d/apps.plugin @@ -200,7 +199,7 @@ iterating forever, collecting metrics for each running process and sending them This is a one-way communication, from `apps.plugin` to Netdata. So, since `apps.plugin` cannot be instructed by Netdata for the actions it performs, -we think it is pretty safe to allow it have these increased privileges. +we think it is pretty safe to allow it to have these increased privileges. Keep in mind that `apps.plugin` will still run without escalated permissions, but it will not be able to collect all the information. @@ -219,7 +218,7 @@ Here is an example for the process group `sql` at `https://registry.my-netdata.i ![image](https://registry.my-netdata.io/api/v1/badge.svg?chart=apps.processes&dimensions=sql&value_color=green%3E0%7Cred) -Netdata is able give you a lot more badges for your app. +Netdata is able to give you a lot more badges for your app. Examples below for process group `sql`: - CPU usage: ![image](https://registry.my-netdata.io/api/v1/badge.svg?chart=apps.cpu&dimensions=sql&value_color=green=0%7Corange%3C50%7Cred) @@ -227,7 +226,7 @@ Examples below for process group `sql`: - Disk Physical Writes ![image](https://registry.my-netdata.io/api/v1/badge.svg?chart=apps.pwrites&dimensions=sql&value_color=green%3C100%7Corange%3C1000%7Cred) - Disk Logical Reads ![image](https://registry.my-netdata.io/api/v1/badge.svg?chart=apps.lreads&dimensions=sql&value_color=green%3C100%7Corange%3C1000%7Cred) - Disk Logical Writes ![image](https://registry.my-netdata.io/api/v1/badge.svg?chart=apps.lwrites&dimensions=sql&value_color=green%3C100%7Corange%3C1000%7Cred) -- Open Files ![image](https://registry.my-netdata.io/api/v1/badge.svg?chart=apps.files&dimensions=sql&value_color=green%3E30%7Cred) +- Open Files ![image](https://registry.my-netdata.io/api/v1/badge.svg?chart=apps.fds_files&dimensions=sql&value_color=green%3E30%7Cred) - Real Memory ![image](https://registry.my-netdata.io/api/v1/badge.svg?chart=apps.mem&dimensions=sql&value_color=green%3C100%7Corange%3C200%7Cred) - Virtual Memory ![image](https://registry.my-netdata.io/api/v1/badge.svg?chart=apps.vmem&dimensions=sql&value_color=green%3C100%7Corange%3C1000%7Cred) - Swap Memory ![image](https://registry.my-netdata.io/api/v1/badge.svg?chart=apps.swap&dimensions=sql&value_color=green=0%7Cred) @@ -235,8 +234,8 @@ Examples below for process group `sql`: - Processes ![image](https://registry.my-netdata.io/api/v1/badge.svg?chart=apps.processes&dimensions=sql&value_color=green%3E0%7Cred) - Threads ![image](https://registry.my-netdata.io/api/v1/badge.svg?chart=apps.threads&dimensions=sql&value_color=green%3E=28%7Cred) - Major Faults (swap activity) ![image](https://registry.my-netdata.io/api/v1/badge.svg?chart=apps.major_faults&dimensions=sql&value_color=green=0%7Cred) -- Open Pipes ![image](https://registry.my-netdata.io/api/v1/badge.svg?chart=apps.pipes&dimensions=sql&value_color=green=0%7Cred) -- Open Sockets ![image](https://registry.my-netdata.io/api/v1/badge.svg?chart=apps.sockets&dimensions=sql&value_color=green%3E=3%7Cred) +- Open Pipes ![image](https://registry.my-netdata.io/api/v1/badge.svg?chart=apps.fds_pipes&dimensions=sql&value_color=green=0%7Cred) +- Open Sockets ![image](https://registry.my-netdata.io/api/v1/badge.svg?chart=apps.fds_sockets&dimensions=sql&value_color=green%3E=3%7Cred) For more information about badges check [Generating Badges](https://github.com/netdata/netdata/blob/master/web/api/badges/README.md) From 674aef9fc465996b17bae4a6580abf539bd50471 Mon Sep 17 00:00:00 2001 From: Ilya Mashchenko Date: Wed, 26 Jul 2023 14:23:22 +0300 Subject: [PATCH 51/55] bump ui to v6.22.0 (#15542) --- web/gui/index.html | 138 +++++++++--------- web/gui/registry-access.html | 12 +- web/gui/registry-hello.html | 2 +- ...k.js => 102.1180c6912ee4fae83d60.chunk.js} | 2 +- ...k.js => 137.9e656a30e3ec5aa4ba60.chunk.js} | 2 +- ...nk.js => 18.dfb41366d12b6dcb8891.chunk.js} | 4 +- ...k.js => 193.dffb29d4ec50ad165897.chunk.js} | 2 +- ...nk.js => 20.034c6dd2fb9e9a24e3dc.chunk.js} | 2 +- ...k.js => 241.003630a76c20cb1566dc.chunk.js} | 2 +- ...k.js => 252.6a859542a1efaea45efc.chunk.js} | 2 +- web/gui/v2/264.cffec68a842137c11492.chunk.js | 1 + web/gui/v2/282.3c11e3acb0fe23b94593.chunk.js | 1 + web/gui/v2/282.b554eb54189aafeebb91.chunk.js | 1 - web/gui/v2/296.debf8c655d29ffce5deb.chunk.js | 1 - web/gui/v2/324.346535f0f58844b74bec.chunk.js | 1 + web/gui/v2/329.7bcb7946c9155943cbbf.chunk.js | 1 + ...k.js => 359.191d0473ca7ea05b3d7f.chunk.js} | 2 +- web/gui/v2/360.e28d3f347876d6316fe9.chunk.js | 1 + web/gui/v2/360.fad154c858b78a20d8f5.chunk.js | 1 - ...k.js => 367.fb1db20b6e9893ffb1d3.chunk.js} | 2 +- ...k.js => 370.2d8fa0858d94bd842b7c.chunk.js} | 4 +- ...aa82b0c.js => 376.f94e9188edb8b5a2ee26.js} | 4 +- web/gui/v2/380.6162c22bf1378d470cf8.chunk.js | 1 + web/gui/v2/380.b8d7517354695cf1a14b.chunk.js | 1 - web/gui/v2/43.bd43b5485111cae4af94.chunk.js | 1 + web/gui/v2/43.e139da6e48a4308e3cf9.chunk.js | 1 - ...k.js => 440.ca97142d3507b14ad5bb.chunk.js} | 2 +- web/gui/v2/442.5189af01dfd7a61ba40e.chunk.js | 1 - ...k.js => 451.0f70138c37da14f72ab7.chunk.js} | 2 +- ...k.js => 470.d951471ab9becd8bc198.chunk.js} | 2 +- web/gui/v2/471.6c89d0196ad91bf90026.chunk.js | 1 - web/gui/v2/471.d3e47122bfc833211711.chunk.js | 1 + ...k.js => 510.3f22f79c42839ed83cb5.chunk.js} | 2 +- ...k.js => 514.b02c7daea6eac4632a07.chunk.js} | 4 +- ...k.js => 533.d2e49e5c08244f0393c1.chunk.js} | 2 +- ...k.js => 564.6acb33cceae1ff4946bb.chunk.js} | 2 +- ...k.js => 575.e83bb8c4c028249d32ae.chunk.js} | 4 +- ...k.js => 597.9ac1b0a7f6b4b451bb4a.chunk.js} | 2 +- ...k.js => 610.e991a2c39882d590aa55.chunk.js} | 2 +- web/gui/v2/655.6731517077422dfa57ab.chunk.js | 1 + web/gui/v2/655.67b53d6b6e9d27b4a42f.chunk.js | 1 - ...k.js => 663.0536fae1c4642046454c.chunk.js} | 4 +- web/gui/v2/709.b63f3383f748847da537.chunk.js | 1 - ...k.js => 714.cb854510798e9485b07b.chunk.js} | 2 +- web/gui/v2/722.8d7f42b9795bb130961a.chunk.js | 1 + web/gui/v2/722.fe99e9077a2c17b765b6.chunk.js | 1 - ...k.js => 723.a81b9a35e45b79f6c144.chunk.js} | 2 +- ...k.js => 817.3b57e94625660e6e0c4b.chunk.js} | 2 +- ...k.js => 837.dfe3944912c219f845f6.chunk.js} | 2 +- ...k.js => 851.89a5ef50f23089116e6c.chunk.js} | 2 +- web/gui/v2/86.782891dfc0c6f29d3740.chunk.js | 1 + web/gui/v2/86.9f4a6baa2ee824be04cc.chunk.js | 1 - web/gui/v2/934.1575efce663517e2a0f9.chunk.js | 1 + web/gui/v2/934.32aedee30124d08593f8.chunk.js | 1 - web/gui/v2/969.3064c66a83706eafd956.chunk.js | 1 + web/gui/v2/969.4369033ce0ca17cd78e2.chunk.js | 1 - web/gui/v2/Makefile.am | 92 ++++++------ web/gui/v2/agent.html | 138 +++++++++--------- web/gui/v2/app.62c779c79789103ae849.js | 1 + web/gui/v2/app.6ab19a21fbb78d48c8f6.js | 1 - web/gui/v2/bundlesManifest.6.json | 8 +- ...s => editor.265343308408d588e4e6.chunk.js} | 2 +- web/gui/v2/index.html | 138 +++++++++--------- web/gui/v2/local-agent.html | 138 +++++++++--------- ... => npm.react.dom.e86a7a0550473dc54a67.js} | 4 +- web/gui/v2/registry-access.html | 12 +- web/gui/v2/registry-hello.html | 2 +- web/gui/v2/runtime.4bd3e4edace77dac1de5.js | 1 + web/gui/v2/runtime.9143995e93765a6faefd.js | 1 - web/gui/v2/sw.js | 2 +- 70 files changed, 392 insertions(+), 392 deletions(-) rename web/gui/v2/{102.17aa0264e26dca186379.chunk.js => 102.1180c6912ee4fae83d60.chunk.js} (90%) rename web/gui/v2/{137.de2e733f582f64cad1cf.chunk.js => 137.9e656a30e3ec5aa4ba60.chunk.js} (95%) rename web/gui/v2/{18.c0d35b9d3651f2926247.chunk.js => 18.dfb41366d12b6dcb8891.chunk.js} (85%) rename web/gui/v2/{193.9784069d084ddfe4fc58.chunk.js => 193.dffb29d4ec50ad165897.chunk.js} (99%) rename web/gui/v2/{20.8e903ddcd231de612dd1.chunk.js => 20.034c6dd2fb9e9a24e3dc.chunk.js} (87%) rename web/gui/v2/{241.ceb939c3439523e12eed.chunk.js => 241.003630a76c20cb1566dc.chunk.js} (64%) rename web/gui/v2/{252.0ce2558c909b9913ec26.chunk.js => 252.6a859542a1efaea45efc.chunk.js} (67%) create mode 100644 web/gui/v2/264.cffec68a842137c11492.chunk.js create mode 100644 web/gui/v2/282.3c11e3acb0fe23b94593.chunk.js delete mode 100644 web/gui/v2/282.b554eb54189aafeebb91.chunk.js delete mode 100644 web/gui/v2/296.debf8c655d29ffce5deb.chunk.js create mode 100644 web/gui/v2/324.346535f0f58844b74bec.chunk.js create mode 100644 web/gui/v2/329.7bcb7946c9155943cbbf.chunk.js rename web/gui/v2/{359.117da1c355c991bc1536.chunk.js => 359.191d0473ca7ea05b3d7f.chunk.js} (99%) create mode 100644 web/gui/v2/360.e28d3f347876d6316fe9.chunk.js delete mode 100644 web/gui/v2/360.fad154c858b78a20d8f5.chunk.js rename web/gui/v2/{367.cf3f661f1c7bdb62b59b.chunk.js => 367.fb1db20b6e9893ffb1d3.chunk.js} (98%) rename web/gui/v2/{370.b325df5122104f76cd4f.chunk.js => 370.2d8fa0858d94bd842b7c.chunk.js} (99%) rename web/gui/v2/{376.ce2d4577bc3aaaa82b0c.js => 376.f94e9188edb8b5a2ee26.js} (99%) create mode 100644 web/gui/v2/380.6162c22bf1378d470cf8.chunk.js delete mode 100644 web/gui/v2/380.b8d7517354695cf1a14b.chunk.js create mode 100644 web/gui/v2/43.bd43b5485111cae4af94.chunk.js delete mode 100644 web/gui/v2/43.e139da6e48a4308e3cf9.chunk.js rename web/gui/v2/{440.82afa1467d7c5912d8a3.chunk.js => 440.ca97142d3507b14ad5bb.chunk.js} (88%) delete mode 100644 web/gui/v2/442.5189af01dfd7a61ba40e.chunk.js rename web/gui/v2/{451.f9d139bad9fab4ae284e.chunk.js => 451.0f70138c37da14f72ab7.chunk.js} (99%) rename web/gui/v2/{470.66f8d3453ba22aaf59a4.chunk.js => 470.d951471ab9becd8bc198.chunk.js} (99%) delete mode 100644 web/gui/v2/471.6c89d0196ad91bf90026.chunk.js create mode 100644 web/gui/v2/471.d3e47122bfc833211711.chunk.js rename web/gui/v2/{510.fe83a8e48e12c14f8a0d.chunk.js => 510.3f22f79c42839ed83cb5.chunk.js} (95%) rename web/gui/v2/{514.ec684ba16b52bc75806a.chunk.js => 514.b02c7daea6eac4632a07.chunk.js} (99%) rename web/gui/v2/{533.fce31f51b4cd0d80431f.chunk.js => 533.d2e49e5c08244f0393c1.chunk.js} (98%) rename web/gui/v2/{564.cfb9f016d7ca91bf1f08.chunk.js => 564.6acb33cceae1ff4946bb.chunk.js} (98%) rename web/gui/v2/{575.66c199aa3d69cf00c3f2.chunk.js => 575.e83bb8c4c028249d32ae.chunk.js} (99%) rename web/gui/v2/{597.e016f0724a013f625e39.chunk.js => 597.9ac1b0a7f6b4b451bb4a.chunk.js} (99%) rename web/gui/v2/{610.6152d96681e6cfc6f2a2.chunk.js => 610.e991a2c39882d590aa55.chunk.js} (96%) create mode 100644 web/gui/v2/655.6731517077422dfa57ab.chunk.js delete mode 100644 web/gui/v2/655.67b53d6b6e9d27b4a42f.chunk.js rename web/gui/v2/{663.4d152adafa970bb87d62.chunk.js => 663.0536fae1c4642046454c.chunk.js} (88%) delete mode 100644 web/gui/v2/709.b63f3383f748847da537.chunk.js rename web/gui/v2/{714.b3173197d7dc5e16cc3e.chunk.js => 714.cb854510798e9485b07b.chunk.js} (98%) create mode 100644 web/gui/v2/722.8d7f42b9795bb130961a.chunk.js delete mode 100644 web/gui/v2/722.fe99e9077a2c17b765b6.chunk.js rename web/gui/v2/{723.71890dcc2eb1733f246f.chunk.js => 723.a81b9a35e45b79f6c144.chunk.js} (95%) rename web/gui/v2/{817.6e7799a5b5165571e3aa.chunk.js => 817.3b57e94625660e6e0c4b.chunk.js} (69%) rename web/gui/v2/{837.935d02101181aff72447.chunk.js => 837.dfe3944912c219f845f6.chunk.js} (99%) rename web/gui/v2/{851.590f9e758e12dbe1bb25.chunk.js => 851.89a5ef50f23089116e6c.chunk.js} (84%) create mode 100644 web/gui/v2/86.782891dfc0c6f29d3740.chunk.js delete mode 100644 web/gui/v2/86.9f4a6baa2ee824be04cc.chunk.js create mode 100644 web/gui/v2/934.1575efce663517e2a0f9.chunk.js delete mode 100644 web/gui/v2/934.32aedee30124d08593f8.chunk.js create mode 100644 web/gui/v2/969.3064c66a83706eafd956.chunk.js delete mode 100644 web/gui/v2/969.4369033ce0ca17cd78e2.chunk.js create mode 100644 web/gui/v2/app.62c779c79789103ae849.js delete mode 100644 web/gui/v2/app.6ab19a21fbb78d48c8f6.js rename web/gui/v2/{editor.a3a8ebf852f1b5b77f53.chunk.js => editor.265343308408d588e4e6.chunk.js} (58%) rename web/gui/v2/{npm.react.dom.512b66551e07201cd4f2.js => npm.react.dom.e86a7a0550473dc54a67.js} (99%) create mode 100644 web/gui/v2/runtime.4bd3e4edace77dac1de5.js delete mode 100644 web/gui/v2/runtime.9143995e93765a6faefd.js diff --git a/web/gui/index.html b/web/gui/index.html index 2e917b7e09fe28..c62cd5922039b5 100644 --- a/web/gui/index.html +++ b/web/gui/index.html @@ -1,42 +1,42 @@ -Netdata Agent Console

Welcome to Netdata

Loading latest Netdata Cloud UI...

We couldn't load the latest Netdata Cloud UI. You can try again
Or you can load the old single node dashboard or a local copy of Netdata Cloud UI

Welcome to Netdata

Loading latest Netdata UI...

We couldn't load the latest Netdata UI. You can try again
Or you can load the old single node dashboard or a local copy of Netdata UI
\ No newline at end of file + }) \ No newline at end of file diff --git a/web/gui/registry-access.html b/web/gui/registry-access.html index a5f2650433c401..ffa008a9863093 100644 --- a/web/gui/registry-access.html +++ b/web/gui/registry-access.html @@ -9,25 +9,25 @@ .then(function(response) { return response.json() }) : Promise.resolve(parentHelloData) - helloPromise.then(function(data) { + helloPromise.then(function(helloData) { var retries = 3 - var nodes = data.nodes || [] + var nodes = helloData.nodes || [] var doAccess = function(mg, nm, token) { - fetch(data.registry + '/api/v1/registry?action=access&machine=' + (mg || data.machine_guid) + '&name=' + encodeURIComponent(nm || data.hostname) + '&url=' + encodeURIComponent(originUrl) + '&agent=' + (data.agent ? data.agent.machine_guid : ""), { cache: "no-cache", credentials: "include", headers: { Authorization: 'Bearer ' + (token || localStorage.getItem("registry-netdata-token")) } }) + fetch(helloData.registry + '/api/v1/registry?action=access&machine=' + (mg || helloData.machine_guid) + '&name=' + encodeURIComponent(nm || helloData.hostname) + '&url=' + encodeURIComponent(originUrl) + '&agent=' + (helloData.agent ? helloData.agent.machine_guid : ""), { cache: "no-cache", credentials: "include", headers: { Authorization: 'Bearer ' + (token || localStorage.getItem("registry-netdata-token")) } }) .then(function(response) { return response.json() }) .then(function(data) { var token = data.person_guid if (data.status === "redirect" && retries > 0) { retries = retries - 1 - doAccess(data.machine_guid, data.hostname, token) + doAccess(helloData.machine_guid, helloData.hostname, token) } if (data.status === "ok") { localStorage.setItem("registry-netdata-token", token) - node = nodes.pop() + let node = nodes.pop() if (!!node) { setTimeout(function () { @@ -38,7 +38,7 @@ window.parent.postMessage(data, "*"); }) } - doAccess(data.machine_guid, data.hostname) + doAccess(helloData.machine_guid, helloData.hostname) }) } diff --git a/web/gui/registry-hello.html b/web/gui/registry-hello.html index c6c913324a09c2..e95f48c47cd32b 100644 --- a/web/gui/registry-hello.html +++ b/web/gui/registry-hello.html @@ -27,7 +27,7 @@ if (data.status === "ok") { localStorage.setItem("registry-netdata-token", token) - node = nodes.pop() + let node = nodes.pop() if (!!node) { setTimeout(function () { diff --git a/web/gui/v2/102.17aa0264e26dca186379.chunk.js b/web/gui/v2/102.1180c6912ee4fae83d60.chunk.js similarity index 90% rename from web/gui/v2/102.17aa0264e26dca186379.chunk.js rename to web/gui/v2/102.1180c6912ee4fae83d60.chunk.js index 4c12d743e94274..9703b5ffb1f81d 100644 --- a/web/gui/v2/102.17aa0264e26dca186379.chunk.js +++ b/web/gui/v2/102.1180c6912ee4fae83d60.chunk.js @@ -1 +1 @@ -!function(){try{var C="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(C._sentryDebugIds=C._sentryDebugIds||{},C._sentryDebugIds[t]="b05501c9-5263-4783-b2b6-f3eaaea5eb48",C._sentryDebugIdIdentifier="sentry-dbid-b05501c9-5263-4783-b2b6-f3eaaea5eb48")}catch(C){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"068845a823c962888381794c354a8f6b6e263031"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[102],{48102:function(C,t,e){e.r(t),e.d(t,{default:function(){return g}});var n=e(29439),i=e(67294),l=e(15557),a=e(92432),o=e(87854),d=e.n(o),r=e(95348),c=e.n(r),p=new(d())({id:"terms.svg",use:"terms.svg-usage",viewBox:"0 0 240 240",content:'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n'}),f=(c().add(p),p),H=function(){return i.createElement("svg",{height:"240px",width:"240px",viewBox:f.viewBox},i.createElement("use",{xlinkHref:"#".concat(f.id)}))},s=e(78312),V=e(97096),h=function(C){var t=C.checked,e=C.error,n=C.onChange,a=C.tagging,o=C.children;return i.createElement(l.Flex,{alignItems:"center","data-testid":"termsAndConditions"},i.createElement(s.P2,{checked:t,onChange:n,error:e,"data-ga":"signinup::click-checkbox::".concat(a),"data-testid":"termsAndConditions-checkbox"}),o||i.createElement(l.TextBig,null,"By signing up, you agree to the Netdata ",i.createElement(V.w,{tagging:a})," and"," ",i.createElement(V.F,{tagging:a})))},E=e(13477),u=e(46667),g=function(){var C=(0,E.ec)("termsAccepted",{shouldPersist:!0}),t=(0,n.Z)(C,2),e=t[0],o=t[1],d=(0,u.Z)(),r=(0,n.Z)(d,2),c=r[0],p=r[1],f=(0,i.useCallback)((function(){(0,a.L)("","","","","","terms-accept"),o(c)}),[c]);return e?null:i.createElement(l.ConfirmationDialog,{confirmLabel:"Accept","data-ga":"accept-terms-dialog","data-testid":"acceptTermsDialog",handleConfirm:f,hideIcon:!0,hideDecline:!0,isConfirmPositive:!0,isConfirmDisabled:!c,message:i.createElement(l.Flex,{gap:4,alignItems:"center",column:!0},i.createElement(H,null),i.createElement(h,{checked:c,onChange:p,tagging:"modal-view"})),title:"To use Netdata Cloud you need to read and accept our terms and conditions"})}},78312:function(C,t,e){e.d(t,{Fg:function(){return o},P2:function(){return r},Sn:function(){return c},U5:function(){return d},Yb:function(){return p},xG:function(){return a}});var n=e(60677),i=e(15557),l=e(16772),a=n.default.div.withConfig({displayName:"styled__SvgContainer",componentId:"sc-16ytcl4-0"})(["width:42px;height:42px;flex-shrink:0;display:flex;justify-content:center;align-items:center;border-radius:2px;background:white;"]),o=n.default.a.withConfig({displayName:"styled__StyledLink",componentId:"sc-16ytcl4-1"})(["display:inline-flex;align-items:center;text-decoration:none;color:",";cursor:pointer;&:hover{text-decoration:underline;color:"," !important;}&:visited{color:",";}> svg{fill:",";padding-right:",";}"],(0,i.getColor)("success"),(0,i.getColor)("success"),(0,i.getColor)("success"),(0,i.getColor)("main"),(0,i.getSizeBy)(1)),d=(0,n.default)(l.Z).withConfig({displayName:"styled__EmailInput",componentId:"sc-16ytcl4-2"})(["label{margin-bottom:0;}> div{display:none;}"]),r=(0,n.default)(i.Checkbox).withConfig({displayName:"styled__StyledCheckbox",componentId:"sc-16ytcl4-3"})(["margin:0 "," 0 0;& div:last-child{border-color:",";}"],(0,i.getSizeBy)(2),(function(C){return C.error&&(0,i.getColor)("error")})),c=(0,n.default)(i.Button).withConfig({displayName:"styled__StyledButton",componentId:"sc-16ytcl4-4"})(["&&{height:44px;}"]),p=(0,n.default)(i.Flex).attrs((function(C){var t=C.gap;return{column:!0,gap:void 0===t?8:t,alignSelf:"center",padding:[0,0,8,0],border:{side:"bottom",color:"disabled"},width:{max:"320px"}}})).withConfig({displayName:"styled__FormContainer",componentId:"sc-16ytcl4-5"})(["width:100%;"])},97096:function(C,t,e){e.d(t,{F:function(){return d},w:function(){return o}});e(92222);var n=e(67294),i=e(78312),l={link:"https://www.netdata.cloud/terms",title:"Terms And Conditions",dataGa:"signinup::click-terms::"},a=function(C){var t=C.link,e=C.title,l=C.dataGa;return function(C){var a=C.tagging;return n.createElement(i.Fg,{href:t,target:"_blank",rel:"noopener noreferrer","data-ga":"".concat(l).concat(a)},e)}},o=a({link:"https://www.netdata.cloud/privacy",title:"Privacy Policy",dataGa:"signinup::click-privacy::"}),d=a(l)}}]); \ No newline at end of file +!function(){try{var C="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(C._sentryDebugIds=C._sentryDebugIds||{},C._sentryDebugIds[t]="b58c987b-6e02-4ad5-be26-fdba2cc975ab",C._sentryDebugIdIdentifier="sentry-dbid-b58c987b-6e02-4ad5-be26-fdba2cc975ab")}catch(C){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"bc401569f0a5aac35c96315fba57182a8ad450f2"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[102],{48102:function(C,t,e){e.r(t),e.d(t,{default:function(){return u}});var n=e(29439),i=e(67294),l=e(15557),a=e(92432),o=e(87854),d=e.n(o),r=e(95348),c=e.n(r),p=new(d())({id:"terms.svg",use:"terms.svg-usage",viewBox:"0 0 240 240",content:'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n'}),f=(c().add(p),p),H=function(){return i.createElement("svg",{height:"240px",width:"240px",viewBox:f.viewBox},i.createElement("use",{xlinkHref:"#".concat(f.id)}))},s=e(78312),V=e(97096),h=function(C){var t=C.checked,e=C.error,n=C.onChange,a=C.tagging,o=C.children;return i.createElement(l.Flex,{alignItems:"center","data-testid":"termsAndConditions"},i.createElement(s.P2,{checked:t,onChange:n,error:e,"data-ga":"signinup::click-checkbox::".concat(a),"data-testid":"termsAndConditions-checkbox"}),o||i.createElement(l.TextBig,null,"By signing up, you agree to the Netdata ",i.createElement(V.w,{tagging:a})," and"," ",i.createElement(V.F,{tagging:a})))},E=e(13477),g=e(46667),u=function(){var C=(0,E.ec)("termsAccepted",{shouldPersist:!0}),t=(0,n.Z)(C,2),e=t[0],o=t[1],d=(0,g.Z)(),r=(0,n.Z)(d,2),c=r[0],p=r[1],f=(0,i.useCallback)((function(){(0,a.L)("","","","","","terms-accept"),o(c)}),[c]);return e?null:i.createElement(l.ConfirmationDialog,{confirmLabel:"Accept","data-ga":"accept-terms-dialog","data-testid":"acceptTermsDialog",handleConfirm:f,hideIcon:!0,hideDecline:!0,isConfirmPositive:!0,isConfirmDisabled:!c,message:i.createElement(l.Flex,{gap:4,alignItems:"center",column:!0},i.createElement(H,null),i.createElement(h,{checked:c,onChange:p,tagging:"modal-view"})),title:"To use Netdata you need to read and accept our terms and conditions"})}},78312:function(C,t,e){e.d(t,{Fg:function(){return o},P2:function(){return r},Sn:function(){return c},U5:function(){return d},Yb:function(){return p},xG:function(){return a}});var n=e(60677),i=e(15557),l=e(16772),a=n.default.div.withConfig({displayName:"styled__SvgContainer",componentId:"sc-16ytcl4-0"})(["width:42px;height:42px;flex-shrink:0;display:flex;justify-content:center;align-items:center;border-radius:2px;background:white;"]),o=n.default.a.withConfig({displayName:"styled__StyledLink",componentId:"sc-16ytcl4-1"})(["display:inline-flex;align-items:center;text-decoration:none;color:",";cursor:pointer;&:hover{text-decoration:underline;color:"," !important;}&:visited{color:",";}> svg{fill:",";padding-right:",";}"],(0,i.getColor)("success"),(0,i.getColor)("success"),(0,i.getColor)("success"),(0,i.getColor)("main"),(0,i.getSizeBy)(1)),d=(0,n.default)(l.Z).withConfig({displayName:"styled__EmailInput",componentId:"sc-16ytcl4-2"})(["label{margin-bottom:0;}> div{display:none;}"]),r=(0,n.default)(i.Checkbox).withConfig({displayName:"styled__StyledCheckbox",componentId:"sc-16ytcl4-3"})(["margin:0 "," 0 0;& div:last-child{border-color:",";}"],(0,i.getSizeBy)(2),(function(C){return C.error&&(0,i.getColor)("error")})),c=(0,n.default)(i.Button).withConfig({displayName:"styled__StyledButton",componentId:"sc-16ytcl4-4"})(["&&{height:44px;}"]),p=(0,n.default)(i.Flex).attrs((function(C){var t=C.gap;return{column:!0,gap:void 0===t?8:t,alignSelf:"center",padding:[0,0,8,0],border:{side:"bottom",color:"disabled"},width:{max:"320px"}}})).withConfig({displayName:"styled__FormContainer",componentId:"sc-16ytcl4-5"})(["width:100%;"])},97096:function(C,t,e){e.d(t,{F:function(){return d},w:function(){return o}});e(92222);var n=e(67294),i=e(78312),l={link:"https://www.netdata.cloud/terms",title:"Terms And Conditions",dataGa:"signinup::click-terms::"},a=function(C){var t=C.link,e=C.title,l=C.dataGa;return function(C){var a=C.tagging;return n.createElement(i.Fg,{href:t,target:"_blank",rel:"noopener noreferrer","data-ga":"".concat(l).concat(a)},e)}},o=a({link:"https://www.netdata.cloud/privacy",title:"Privacy Policy",dataGa:"signinup::click-privacy::"}),d=a(l)}}]); \ No newline at end of file diff --git a/web/gui/v2/137.de2e733f582f64cad1cf.chunk.js b/web/gui/v2/137.9e656a30e3ec5aa4ba60.chunk.js similarity index 95% rename from web/gui/v2/137.de2e733f582f64cad1cf.chunk.js rename to web/gui/v2/137.9e656a30e3ec5aa4ba60.chunk.js index 7c2a34aac3cc6d..6aeb9c381e2dde 100644 --- a/web/gui/v2/137.de2e733f582f64cad1cf.chunk.js +++ b/web/gui/v2/137.9e656a30e3ec5aa4ba60.chunk.js @@ -1 +1 @@ -!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="abb77a8f-b660-47d3-a451-4cc626137add",e._sentryDebugIdIdentifier="sentry-dbid-abb77a8f-b660-47d3-a451-4cc626137add")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"068845a823c962888381794c354a8f6b6e263031"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[137],{98977:function(e,n,t){t.r(n);var a=t(67294),i=t(15557),r=t(1043),c=t(78312),o=t(97096),u=t(8360),d=t(91940);n.default=function(){var e=(0,r.T4)();return a.createElement(d.Z,{"data-testid":"signIn"},a.createElement(i.H1,{textAlign:"center"},"Thank you!"),a.createElement(i.TextBig,{textAlign:"center"},"Your email has been verified."),a.createElement(c.Yb,{gap:8,onSubmit:function(e){return e.preventDefault()}},a.createElement(i.TextBig,{textAlign:"center"},"Please accept our ",a.createElement(o.w,{tagging:"snue-view"})," and"," ",a.createElement(o.F,{tagging:"snue-view"}),"."),a.createElement(i.Flex,{width:"100%",justifyContent:"center",alignItems:"center","data-testid":"signUpVerification-acceptTerms"},a.createElement(c.Sn,{type:"submit",label:"I accept",onClick:e,"data-ga":"signinup::click-signup::snue-view","data-testid":"signUpVerification-acceptTerms-submit",width:"100%"}))),a.createElement(u.Z,null))}},97096:function(e,n,t){t.d(n,{F:function(){return u},w:function(){return o}});t(92222);var a=t(67294),i=t(78312),r={link:"https://www.netdata.cloud/terms",title:"Terms And Conditions",dataGa:"signinup::click-terms::"},c=function(e){var n=e.link,t=e.title,r=e.dataGa;return function(e){var c=e.tagging;return a.createElement(i.Fg,{href:n,target:"_blank",rel:"noopener noreferrer","data-ga":"".concat(r).concat(c)},t)}},o=c({link:"https://www.netdata.cloud/privacy",title:"Privacy Policy",dataGa:"signinup::click-privacy::"}),u=c(r)},76362:function(e,n,t){t.d(n,{S1:function(){return r},ZT:function(){return a},ae:function(){return o},jU:function(){return c},on:function(){return i}});var a=function(){};function i(e){for(var n=[],t=1;tt&&t.enabled&&t.modifierKey,a=(t,e)=>t&&e[t+"Key"],u=(t,e)=>t&&!e[t+"Key"];function c(t,e,n){return void 0===t||("string"===typeof t?-1!==t.indexOf(e):"function"===typeof t&&-1!==t({chart:n}).indexOf(e))}function l(t,e){return"function"===typeof t&&(t=t({chart:e})),"string"===typeof t?{x:-1!==t.indexOf("x"),y:-1!==t.indexOf("y")}:{x:!1,y:!1}}function h(t,e,n){const{mode:i="xy",scaleMode:o,overScaleMode:s}=t||{},a=function({x:t,y:e},n){const i=n.scales,o=Object.keys(i);for(let r=0;r=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right)return n}return null}(e,n),u=l(i,n),c=l(o,n);if(s){const t=l(s,n);for(const e of["x","y"])t[e]&&(c[e]=u[e],u[e]=!1)}if(a&&c[a.axis])return[a];const h=[];return(0,r.F)(n.scales,(function(t){u[t.axis]&&h.push(t)})),h}const f=new WeakMap;function d(t){let e=f.get(t);return e||(e={originalScaleLimits:{},updatedScaleLimits:{},handlers:{},panDelta:{}},f.set(t,e)),e}function p(t,e,n){const i=t.max-t.min,o=i*(e-1),r=t.isHorizontal()?n.x:n.y,s=Math.max(0,Math.min(1,(t.getValueForPixel(r)-t.min)/i||0));return{min:o*s,max:o*(1-s)}}function m(t,e,n,i,o){let s=n[i];if("original"===s){const n=t.originalScaleLimits[e.id][i];s=(0,r.v)(n.options,n.scale)}return(0,r.v)(s,o)}function v(t,{min:e,max:n},i,o=!1){const r=d(t.chart),{id:s,axis:a,options:u}=t,c=i&&(i[s]||i[a])||{},{minRange:l=0}=c,h=m(r,t,c,"min",-1/0),f=m(r,t,c,"max",1/0),p=o?Math.max(n-e,l):t.max-t.min,v=(p-n+e)/2;return n+=v,(e-=v)f&&(n=f,e=Math.max(f-p,h)),u.min=e,u.max=n,r.updatedScaleLimits[t.id]={min:e,max:n},t.parse(e)!==t.min||t.parse(n)!==t.max}const g=t=>0===t||isNaN(t)?0:t<0?Math.min(Math.round(t),-1):Math.max(Math.round(t),1);const y={second:500,minute:3e4,hour:18e5,day:432e5,week:3024e5,month:1296e6,quarter:5184e6,year:157248e5};function x(t,e,n,i=!1){const{min:o,max:r,options:s}=t,a=s.time&&s.time.round,u=y[a]||0,c=t.getValueForPixel(t.getPixelForValue(o+u)-e),l=t.getValueForPixel(t.getPixelForValue(r+u)-e),{min:h=-1/0,max:f=1/0}=i&&n&&n[t.axis]||{};return!!(isNaN(c)||isNaN(l)||cf)||v(t,{min:c,max:l},n,i)}function T(t,e,n){return x(t,e,n,!0)}const b={category:function(t,e,n,i){const o=p(t,e,n);return t.min===t.max&&e<1&&function(t){const e=t.getLabels().length-1;t.min>0&&(t.min-=1),t.maxa&&(o=Math.max(0,o-u),r=1===s?o:o+s,c=0===o),v(t,{min:o,max:r},n)||c},default:x,logarithmic:T,timeseries:T};function M(t,e){(0,r.F)(t,((n,i)=>{e[i]||delete t[i]}))}function S(t,e){const{scales:n}=t,{originalScaleLimits:i,updatedScaleLimits:o}=e;return(0,r.F)(n,(function(t){(function(t,e,n){const{id:i,options:{min:o,max:r}}=t;if(!e[i]||!n[i])return!0;const s=n[i];return s.min!==o||s.max!==r})(t,i,o)&&(i[t.id]={min:{scale:t.min,options:t.options.min},max:{scale:t.max,options:t.options.max}})})),M(i,n),M(o,n),i}function z(t,e,n,i){const o=b[t.type]||b.default;(0,r.Q)(o,[t,e,n,i])}function P(t,e,n,i,o){const s=w[t.type]||w.default;(0,r.Q)(s,[t,e,n,i,o])}function D(t){const e=t.chartArea;return{x:(e.left+e.right)/2,y:(e.top+e.bottom)/2}}function I(t,e,n="none"){const{x:i=1,y:o=1,focalPoint:s=D(t)}="number"===typeof e?{x:e,y:e}:e,a=d(t),{options:{limits:u,zoom:c}}=a;S(t,a);const l=1!==i,f=1!==o,p=h(c,s,t);(0,r.F)(p||t.scales,(function(t){t.isHorizontal()&&l?z(t,i,s,u):!t.isHorizontal()&&f&&z(t,o,s,u)})),t.update(n),(0,r.Q)(c.onZoom,[{chart:t}])}function C(t,e,n,i="none"){const o=d(t),{options:{limits:s,zoom:a}}=o,{mode:u="xy"}=a;S(t,o);const l=c(u,"x",t),h=c(u,"y",t);(0,r.F)(t.scales,(function(t){t.isHorizontal()&&l?P(t,e.x,n.x,s):!t.isHorizontal()&&h&&P(t,e.y,n.y,s)})),t.update(i),(0,r.Q)(a.onZoom,[{chart:t}])}function _(t){const e=d(t);let n=1,i=1;return(0,r.F)(t.scales,(function(t){const o=function(t,e){const n=t.originalScaleLimits[e];if(!n)return;const{min:i,max:o}=n;return(0,r.v)(o.options,o.scale)-(0,r.v)(i.options,i.scale)}(e,t.id);if(o){const e=Math.round(o/(t.max-t.min)*100)/100;n=Math.min(n,e),i=Math.max(i,e)}})),n<1?n:i}function A(t,e,n,i){const{panDelta:o}=i,s=o[t.id]||0;(0,r.s)(s)===(0,r.s)(e)&&(e+=s);const a=E[t.type]||E.default;(0,r.Q)(a,[t,e,n])?o[t.id]=0:o[t.id]=e}function O(t,e,n,i="none"){const{x:o=0,y:s=0}="number"===typeof e?{x:e,y:e}:e,a=d(t),{options:{pan:u,limits:c}}=a,{onPan:l}=u||{};S(t,a);const h=0!==o,f=0!==s;(0,r.F)(n||t.scales,(function(t){t.isHorizontal()&&h?A(t,o,c,a):!t.isHorizontal()&&f&&A(t,s,c,a)})),t.update(i),(0,r.Q)(l,[{chart:t}])}function R(t){const e=d(t);S(t,e);const n={};for(const i of Object.keys(t.scales)){const{min:t,max:o}=e.originalScaleLimits[i]||{min:{},max:{}};n[i]={min:t.scale,max:o.scale}}return n}function k(t,e){const{handlers:n}=d(t),i=n[e];i&&i.target&&(i.target.removeEventListener(e,i),delete n[e])}function Z(t,e,n,i){const{handlers:o,options:r}=d(t),s=o[n];s&&s.target===e||(k(t,n),o[n]=e=>i(t,e,r),o[n].target=e,e.addEventListener(n,o[n]))}function F(t,e){const n=d(t);n.dragStart&&(n.dragging=!0,n.dragEnd=e,t.update("none"))}function Y(t,e){const n=d(t);n.dragStart&&"Escape"===e.key&&(k(t,"keydown"),n.dragging=!1,n.dragStart=n.dragEnd=null,t.update("none"))}function N(t,e,n){const{onZoomStart:i,onZoomRejected:o}=n;if(i){const n=(0,r.z)(e,t);if(!1===(0,r.Q)(i,[{chart:t,event:e,point:n}]))return(0,r.Q)(o,[{chart:t,event:e}]),!1}}function X(t,e){const n=d(t),{pan:i,zoom:o={}}=n.options;if(0!==e.button||a(s(i),e)||u(s(o.drag),e))return(0,r.Q)(o.onZoomRejected,[{chart:t,event:e}]);!1!==N(t,e,o)&&(n.dragStart=e,Z(t,t.canvas,"mousemove",F),Z(t,window.document,"keydown",Y))}function L(t,e,n,i){const o=c(e,"x",t),s=c(e,"y",t);let{top:a,left:u,right:l,bottom:h,width:f,height:d}=t.chartArea;const p=(0,r.z)(n,t),m=(0,r.z)(i,t);o&&(u=Math.min(p.x,m.x),l=Math.max(p.x,m.x)),s&&(a=Math.min(p.y,m.y),h=Math.max(p.y,m.y));const v=l-u,g=h-a;return{left:u,top:a,right:l,bottom:h,width:v,height:g,zoomX:o&&v?1+(f-v)/f:1,zoomY:s&&g?1+(d-g)/d:1}}function q(t,e){const n=d(t);if(!n.dragStart)return;k(t,"mousemove");const{mode:i,onZoomComplete:o,drag:{threshold:s=0}}=n.options.zoom,a=L(t,i,n.dragStart,e),u=c(i,"x",t)?a.width:0,l=c(i,"y",t)?a.height:0,h=Math.sqrt(u*u+l*l);if(n.dragStart=n.dragEnd=null,h<=s)return n.dragging=!1,void t.update("none");C(t,{x:a.left,y:a.top},{x:a.right,y:a.bottom},"zoom"),setTimeout((()=>n.dragging=!1),500),(0,r.Q)(o,[{chart:t}])}function W(t,e){const{handlers:{onZoomComplete:n},options:{zoom:i}}=d(t);if(!function(t,e,n){if(u(s(n.wheel),e))(0,r.Q)(n.onZoomRejected,[{chart:t,event:e}]);else if(!1!==N(t,e,n)&&(e.cancelable&&e.preventDefault(),void 0!==e.deltaY))return!0}(t,e,i))return;const o=e.target.getBoundingClientRect(),a=1+(e.deltaY>=0?-i.wheel.speed:i.wheel.speed);I(t,{x:a,y:a,focalPoint:{x:e.clientX-o.left,y:e.clientY-o.top}}),n&&n()}function H(t,e,n,i){n&&(d(t).handlers[e]=function(t,e){let n;return function(){return clearTimeout(n),n=setTimeout(t,e),e}}((()=>(0,r.Q)(n,[{chart:t}])),i))}function j(t,e){return function(n,i){const{pan:o,zoom:c={}}=e.options;if(!o||!o.enabled)return!1;const l=i&&i.srcEvent;return!l||(!(!e.panning&&"mouse"===i.pointerType&&(u(s(o),l)||a(s(c.drag),l)))||((0,r.Q)(o.onPanRejected,[{chart:t,event:i}]),!1))}}function Q(t,e,n){if(e.scale){const{center:i,pointers:o}=n,r=1/e.scale*n.scale,s=n.target.getBoundingClientRect(),a=function(t,e){const n=Math.abs(t.clientX-e.clientX),i=Math.abs(t.clientY-e.clientY),o=n/i;let r,s;return o>.3&&o<1.7?r=s=!0:n>i?r=!0:s=!0,{x:r,y:s}}(o[0],o[1]),u=e.options.zoom.mode;I(t,{x:a.x&&c(u,"x",t)?r:1,y:a.y&&c(u,"y",t)?r:1,focalPoint:{x:i.x-s.left,y:i.y-s.top}}),e.scale=n.scale}}function V(t,e,n){const i=e.delta;i&&(e.panning=!0,O(t,{x:n.deltaX-i.x,y:n.deltaY-i.y},e.panScales),e.delta={x:n.deltaX,y:n.deltaY})}const U=new WeakMap;function B(t,e){const n=d(t),i=t.canvas,{pan:s,zoom:a}=e,u=new(o().Manager)(i);a&&a.pinch.enabled&&(u.add(new(o().Pinch)),u.on("pinchstart",(()=>function(t,e){e.options.zoom.pinch.enabled&&(e.scale=1)}(0,n))),u.on("pinch",(e=>Q(t,n,e))),u.on("pinchend",(e=>function(t,e,n){e.scale&&(Q(t,e,n),e.scale=null,(0,r.Q)(e.options.zoom.onZoomComplete,[{chart:t}]))}(t,n,e)))),s&&s.enabled&&(u.add(new(o().Pan)({threshold:s.threshold,enable:j(t,n)})),u.on("panstart",(e=>function(t,e,n){const{enabled:i,onPanStart:o,onPanRejected:s}=e.options.pan;if(!i)return;const a=n.target.getBoundingClientRect(),u={x:n.center.x-a.left,y:n.center.y-a.top};if(!1===(0,r.Q)(o,[{chart:t,event:n,point:u}]))return(0,r.Q)(s,[{chart:t,event:n}]);e.panScales=h(e.options.pan,u,t),e.delta={x:0,y:0},clearTimeout(e.panEndTimeout),V(t,e,n)}(t,n,e))),u.on("panmove",(e=>V(t,n,e))),u.on("panend",(()=>function(t,e){e.delta=null,e.panning&&(e.panEndTimeout=setTimeout((()=>e.panning=!1),500),(0,r.Q)(e.options.pan.onPanComplete,[{chart:t}]))}(t,n)))),U.set(t,u)}function K(t,e,n){const i=n.zoom.drag,{dragStart:o,dragEnd:r}=d(t);if(i.drawTime!==e||!r)return;const{left:s,top:a,width:u,height:c}=L(t,n.zoom.mode,o,r),l=t.ctx;l.save(),l.beginPath(),l.fillStyle=i.backgroundColor||"rgba(225,225,225,0.3)",l.fillRect(s,a,u,c),i.borderWidth>0&&(l.lineWidth=i.borderWidth,l.strokeStyle=i.borderColor||"rgba(225,225,225)",l.strokeRect(s,a,u,c)),l.restore()}var G={id:"zoom",version:"2.0.1",defaults:{pan:{enabled:!1,mode:"xy",threshold:10,modifierKey:null},zoom:{wheel:{enabled:!1,speed:.1,modifierKey:null},drag:{enabled:!1,drawTime:"beforeDatasetsDraw",modifierKey:null},pinch:{enabled:!1},mode:"xy"}},start:function(t,e,n){d(t).options=n,Object.prototype.hasOwnProperty.call(n.zoom,"enabled")&&console.warn("The option `zoom.enabled` is no longer supported. Please use `zoom.wheel.enabled`, `zoom.drag.enabled`, or `zoom.pinch.enabled`."),(Object.prototype.hasOwnProperty.call(n.zoom,"overScaleMode")||Object.prototype.hasOwnProperty.call(n.pan,"overScaleMode"))&&console.warn("The option `overScaleMode` is deprecated. Please use `scaleMode` instead (and update `mode` as desired)."),o()&&B(t,n),t.pan=(e,n,i)=>O(t,e,n,i),t.zoom=(e,n)=>I(t,e,n),t.zoomRect=(e,n,i)=>C(t,e,n,i),t.zoomScale=(e,n,i)=>function(t,e,n,i="none"){S(t,d(t)),v(t.scales[e],n,void 0,!0),t.update(i)}(t,e,n,i),t.resetZoom=e=>function(t,e="default"){const n=d(t),i=S(t,n);(0,r.F)(t.scales,(function(t){const e=t.options;i[t.id]?(e.min=i[t.id].min.options,e.max=i[t.id].max.options):(delete e.min,delete e.max)})),t.update(e),(0,r.Q)(n.options.zoom.onZoomComplete,[{chart:t}])}(t,e),t.getZoomLevel=()=>_(t),t.getInitialScaleBounds=()=>R(t),t.isZoomedOrPanned=()=>function(t){const e=R(t);for(const n of Object.keys(t.scales)){const{min:i,max:o}=e[n];if(void 0!==i&&t.scales[n].min!==i)return!0;if(void 0!==o&&t.scales[n].max!==o)return!0}return!1}(t)},beforeEvent(t){const e=d(t);if(e.panning||e.dragging)return!1},beforeUpdate:function(t,e,n){d(t).options=n,function(t,e){const n=t.canvas,{wheel:i,drag:o,onZoomComplete:r}=e.zoom;i.enabled?(Z(t,n,"wheel",W),H(t,"onZoomComplete",r,250)):k(t,"wheel"),o.enabled?(Z(t,n,"mousedown",X),Z(t,n.ownerDocument,"mouseup",q)):(k(t,"mousedown"),k(t,"mousemove"),k(t,"mouseup"),k(t,"keydown"))}(t,n)},beforeDatasetsDraw(t,e,n){K(t,"beforeDatasetsDraw",n)},afterDatasetsDraw(t,e,n){K(t,"afterDatasetsDraw",n)},beforeDraw(t,e,n){K(t,"beforeDraw",n)},afterDraw(t,e,n){K(t,"afterDraw",n)},stop:function(t){!function(t){k(t,"mousedown"),k(t,"mousemove"),k(t,"mouseup"),k(t,"wheel"),k(t,"click"),k(t,"keydown")}(t),o()&&function(t){const e=U.get(t);e&&(e.remove("pinchstart"),e.remove("pinch"),e.remove("pinchend"),e.remove("panstart"),e.remove("pan"),e.remove("panend"),e.destroy(),U.delete(t))}(t),function(t){f.delete(t)}(t)},panFunctions:E,zoomFunctions:b,zoomRectFunctions:w}},50840:function(t,e,n){var i;!function(o,r,s,a){"use strict";var u,c=["","webkit","Moz","MS","ms","o"],l=r.createElement("div"),h="function",f=Math.round,d=Math.abs,p=Date.now;function m(t,e,n){return setTimeout(w(t,n),e)}function v(t,e,n){return!!Array.isArray(t)&&(g(t,n[e],n),!0)}function g(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==a)for(i=0;i\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=o.console&&(o.console.warn||o.console.log);return r&&r.call(o.console,i,n),t.apply(this,arguments)}}u="function"!==typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n-1}function I(t){return t.trim().split(/\s+/g)}function C(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;in[e]})):i.sort()),i}function O(t,e){for(var n,i,o=e[0].toUpperCase()+e.slice(1),r=0;r1&&!n.firstMultiple?n.firstMultiple=ot(e):1===o&&(n.firstMultiple=!1);var r=n.firstInput,s=n.firstMultiple,u=s?s.center:r.center,c=e.center=rt(i);e.timeStamp=p(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=ct(u,c),e.distance=ut(u,c),function(t,e){var n=e.center,i=t.offsetDelta||{},o=t.prevDelta||{},r=t.prevInput||{};e.eventType!==q&&r.eventType!==H||(o=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y});e.deltaX=o.x+(n.x-i.x),e.deltaY=o.y+(n.y-i.y)}(n,e),e.offsetDirection=at(e.deltaX,e.deltaY);var l=st(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=d(l.x)>d(l.y)?l.x:l.y,e.scale=s?(h=s.pointers,f=i,ut(f[0],f[1],et)/ut(h[0],h[1],et)):1,e.rotation=s?function(t,e){return ct(e[1],e[0],et)+ct(t[1],t[0],et)}(s.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,o,r,s=t.lastInterval||e,u=e.timeStamp-s.timeStamp;if(e.eventType!=j&&(u>L||s.velocity===a)){var c=e.deltaX-s.deltaX,l=e.deltaY-s.deltaY,h=st(u,c,l);i=h.x,o=h.y,n=d(h.x)>d(h.y)?h.x:h.y,r=at(c,l),t.lastInterval=e}else n=s.velocity,i=s.velocityX,o=s.velocityY,r=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=o,e.direction=r}(n,e);var h,f;var m=t.element;P(e.srcEvent.target,m)&&(m=e.srcEvent.target);e.target=m}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function ot(t){for(var e=[],n=0;n=d(e)?t<0?V:U:e<0?B:K}function ut(t,e,n){n||(n=tt);var i=e[n[0]]-t[n[0]],o=e[n[1]]-t[n[1]];return Math.sqrt(i*i+o*o)}function ct(t,e,n){n||(n=tt);var i=e[n[0]]-t[n[0]],o=e[n[1]]-t[n[1]];return 180*Math.atan2(o,i)/Math.PI}nt.prototype={handler:function(){},init:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(k(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&z(this.element,this.evEl,this.domHandler),this.evTarget&&z(this.target,this.evTarget,this.domHandler),this.evWin&&z(k(this.element),this.evWin,this.domHandler)}};var lt={mousedown:q,mousemove:W,mouseup:H},ht="mousedown",ft="mousemove mouseup";function dt(){this.evEl=ht,this.evWin=ft,this.pressed=!1,nt.apply(this,arguments)}b(dt,nt,{handler:function(t){var e=lt[t.type];e&q&&0===t.button&&(this.pressed=!0),e&W&&1!==t.which&&(e=H),this.pressed&&(e&H&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:X,srcEvent:t}))}});var pt={pointerdown:q,pointermove:W,pointerup:H,pointercancel:j,pointerout:j},mt={2:N,3:"pen",4:X,5:"kinect"},vt="pointerdown",gt="pointermove pointerup pointercancel";function yt(){this.evEl=vt,this.evWin=gt,nt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}o.MSPointerEvent&&!o.PointerEvent&&(vt="MSPointerDown",gt="MSPointerMove MSPointerUp MSPointerCancel"),b(yt,nt,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),o=pt[i],r=mt[t.pointerType]||t.pointerType,s=r==N,a=C(e,t.pointerId,"pointerId");o&q&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):o&(H|j)&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),n&&e.splice(a,1))}});var xt={touchstart:q,touchmove:W,touchend:H,touchcancel:j};function Tt(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,nt.apply(this,arguments)}function bt(t,e){var n=_(t.touches),i=_(t.changedTouches);return e&(H|j)&&(n=A(n.concat(i),"identifier",!0)),[n,i]}b(Tt,nt,{handler:function(t){var e=xt[t.type];if(e===q&&(this.started=!0),this.started){var n=bt.call(this,t,e);e&(H|j)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:N,srcEvent:t})}}});var wt={touchstart:q,touchmove:W,touchend:H,touchcancel:j},Et="touchstart touchmove touchend touchcancel";function Mt(){this.evTarget=Et,this.targetIds={},nt.apply(this,arguments)}function St(t,e){var n=_(t.touches),i=this.targetIds;if(e&(q|W)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var o,r,s=_(t.changedTouches),a=[],u=this.target;if(r=n.filter((function(t){return P(t.target,u)})),e===q)for(o=0;o-1&&i.splice(t,1)}),zt)}}function Ct(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function i(n){e.manager.emit(n,t)}n=Ht&&i(e.options.event+Bt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=Vt},canEmit:function(){for(var t=0;te.threshold&&o&e.direction},attrTest:function(t){return $t.prototype.attrTest.call(this,t)&&(this.state&qt||!(this.state&qt)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Kt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),b(te,$t,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Zt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&qt)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),b(ee,Ut,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Rt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distancee.time;if(this._input=t,!i||!n||t.eventType&(H|j)&&!o)this.reset();else if(t.eventType&q)this.reset(),this._timer=m((function(){this.state=jt,this.tryEmit()}),e.time,this);else if(t.eventType&H)return jt;return Vt},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===jt&&(t&&t.eventType&H?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=p(),this.manager.emit(this.options.event,this._input)))}}),b(ne,$t,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Zt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&qt)}}),b(ie,$t,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:G|$,pointers:1},getTouchAction:function(){return Jt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(G|$)?e=t.overallVelocity:n&G?e=t.overallVelocityX:n&$&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&d(e)>this.options.velocity&&t.eventType&H},emit:function(t){var e=Kt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),b(oe,Ut,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[kt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distancet&&t.enabled&&t.modifierKey,a=(t,e)=>t&&e[t+"Key"],c=(t,e)=>t&&!e[t+"Key"];function u(t,e,n){return void 0===t||("string"===typeof t?-1!==t.indexOf(e):"function"===typeof t&&-1!==t({chart:n}).indexOf(e))}function l(t,e){return"function"===typeof t&&(t=t({chart:e})),"string"===typeof t?{x:-1!==t.indexOf("x"),y:-1!==t.indexOf("y")}:{x:!1,y:!1}}function h(t,e,n){const{mode:i="xy",scaleMode:o,overScaleMode:s}=t||{},a=function({x:t,y:e},n){const i=n.scales,o=Object.keys(i);for(let r=0;r=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right)return n}return null}(e,n),c=l(i,n),u=l(o,n);if(s){const t=l(s,n);for(const e of["x","y"])t[e]&&(u[e]=c[e],c[e]=!1)}if(a&&u[a.axis])return[a];const h=[];return(0,r.F)(n.scales,(function(t){c[t.axis]&&h.push(t)})),h}const f=new WeakMap;function d(t){let e=f.get(t);return e||(e={originalScaleLimits:{},updatedScaleLimits:{},handlers:{},panDelta:{}},f.set(t,e)),e}function p(t,e,n){const i=t.max-t.min,o=i*(e-1),r=t.isHorizontal()?n.x:n.y,s=Math.max(0,Math.min(1,(t.getValueForPixel(r)-t.min)/i||0));return{min:o*s,max:o*(1-s)}}function m(t,e,n,i,o){let s=n[i];if("original"===s){const n=t.originalScaleLimits[e.id][i];s=(0,r.v)(n.options,n.scale)}return(0,r.v)(s,o)}function v(t,{min:e,max:n},i,o=!1){const r=d(t.chart),{id:s,axis:a,options:c}=t,u=i&&(i[s]||i[a])||{},{minRange:l=0}=u,h=m(r,t,u,"min",-1/0),f=m(r,t,u,"max",1/0),p=o?Math.max(n-e,l):t.max-t.min,v=(p-n+e)/2;return n+=v,(e-=v)f&&(n=f,e=Math.max(f-p,h)),c.min=e,c.max=n,r.updatedScaleLimits[t.id]={min:e,max:n},t.parse(e)!==t.min||t.parse(n)!==t.max}const g=t=>0===t||isNaN(t)?0:t<0?Math.min(Math.round(t),-1):Math.max(Math.round(t),1);const y={second:500,minute:3e4,hour:18e5,day:432e5,week:3024e5,month:1296e6,quarter:5184e6,year:157248e5};function x(t,e,n,i=!1){const{min:o,max:r,options:s}=t,a=s.time&&s.time.round,c=y[a]||0,u=t.getValueForPixel(t.getPixelForValue(o+c)-e),l=t.getValueForPixel(t.getPixelForValue(r+c)-e),{min:h=-1/0,max:f=1/0}=i&&n&&n[t.axis]||{};return!!(isNaN(u)||isNaN(l)||uf)||v(t,{min:u,max:l},n,i)}function T(t,e,n){return x(t,e,n,!0)}const b={category:function(t,e,n,i){const o=p(t,e,n);return t.min===t.max&&e<1&&function(t){const e=t.getLabels().length-1;t.min>0&&(t.min-=1),t.maxa&&(o=Math.max(0,o-c),r=1===s?o:o+s,u=0===o),v(t,{min:o,max:r},n)||u},default:x,logarithmic:T,timeseries:T};function M(t,e){(0,r.F)(t,((n,i)=>{e[i]||delete t[i]}))}function S(t,e){const{scales:n}=t,{originalScaleLimits:i,updatedScaleLimits:o}=e;return(0,r.F)(n,(function(t){(function(t,e,n){const{id:i,options:{min:o,max:r}}=t;if(!e[i]||!n[i])return!0;const s=n[i];return s.min!==o||s.max!==r})(t,i,o)&&(i[t.id]={min:{scale:t.min,options:t.options.min},max:{scale:t.max,options:t.options.max}})})),M(i,n),M(o,n),i}function z(t,e,n,i){const o=b[t.type]||b.default;(0,r.Q)(o,[t,e,n,i])}function P(t,e,n,i,o){const s=w[t.type]||w.default;(0,r.Q)(s,[t,e,n,i,o])}function D(t){const e=t.chartArea;return{x:(e.left+e.right)/2,y:(e.top+e.bottom)/2}}function I(t,e,n="none"){const{x:i=1,y:o=1,focalPoint:s=D(t)}="number"===typeof e?{x:e,y:e}:e,a=d(t),{options:{limits:c,zoom:u}}=a;S(t,a);const l=1!==i,f=1!==o,p=h(u,s,t);(0,r.F)(p||t.scales,(function(t){t.isHorizontal()&&l?z(t,i,s,c):!t.isHorizontal()&&f&&z(t,o,s,c)})),t.update(n),(0,r.Q)(u.onZoom,[{chart:t}])}function C(t,e,n,i="none"){const o=d(t),{options:{limits:s,zoom:a}}=o,{mode:c="xy"}=a;S(t,o);const l=u(c,"x",t),h=u(c,"y",t);(0,r.F)(t.scales,(function(t){t.isHorizontal()&&l?P(t,e.x,n.x,s):!t.isHorizontal()&&h&&P(t,e.y,n.y,s)})),t.update(i),(0,r.Q)(a.onZoom,[{chart:t}])}function _(t){const e=d(t);let n=1,i=1;return(0,r.F)(t.scales,(function(t){const o=function(t,e){const n=t.originalScaleLimits[e];if(!n)return;const{min:i,max:o}=n;return(0,r.v)(o.options,o.scale)-(0,r.v)(i.options,i.scale)}(e,t.id);if(o){const e=Math.round(o/(t.max-t.min)*100)/100;n=Math.min(n,e),i=Math.max(i,e)}})),n<1?n:i}function A(t,e,n,i){const{panDelta:o}=i,s=o[t.id]||0;(0,r.s)(s)===(0,r.s)(e)&&(e+=s);const a=E[t.type]||E.default;(0,r.Q)(a,[t,e,n])?o[t.id]=0:o[t.id]=e}function O(t,e,n,i="none"){const{x:o=0,y:s=0}="number"===typeof e?{x:e,y:e}:e,a=d(t),{options:{pan:c,limits:u}}=a,{onPan:l}=c||{};S(t,a);const h=0!==o,f=0!==s;(0,r.F)(n||t.scales,(function(t){t.isHorizontal()&&h?A(t,o,u,a):!t.isHorizontal()&&f&&A(t,s,u,a)})),t.update(i),(0,r.Q)(l,[{chart:t}])}function R(t){const e=d(t);S(t,e);const n={};for(const i of Object.keys(t.scales)){const{min:t,max:o}=e.originalScaleLimits[i]||{min:{},max:{}};n[i]={min:t.scale,max:o.scale}}return n}function k(t,e){const{handlers:n}=d(t),i=n[e];i&&i.target&&(i.target.removeEventListener(e,i),delete n[e])}function Z(t,e,n,i){const{handlers:o,options:r}=d(t),s=o[n];s&&s.target===e||(k(t,n),o[n]=e=>i(t,e,r),o[n].target=e,e.addEventListener(n,o[n]))}function F(t,e){const n=d(t);n.dragStart&&(n.dragging=!0,n.dragEnd=e,t.update("none"))}function Y(t,e){const n=d(t);n.dragStart&&"Escape"===e.key&&(k(t,"keydown"),n.dragging=!1,n.dragStart=n.dragEnd=null,t.update("none"))}function N(t,e,n){const{onZoomStart:i,onZoomRejected:o}=n;if(i){const n=(0,r.z)(e,t);if(!1===(0,r.Q)(i,[{chart:t,event:e,point:n}]))return(0,r.Q)(o,[{chart:t,event:e}]),!1}}function X(t,e){const n=d(t),{pan:i,zoom:o={}}=n.options;if(0!==e.button||a(s(i),e)||c(s(o.drag),e))return(0,r.Q)(o.onZoomRejected,[{chart:t,event:e}]);!1!==N(t,e,o)&&(n.dragStart=e,Z(t,t.canvas,"mousemove",F),Z(t,window.document,"keydown",Y))}function L(t,e,n,i){const o=u(e,"x",t),s=u(e,"y",t);let{top:a,left:c,right:l,bottom:h,width:f,height:d}=t.chartArea;const p=(0,r.z)(n,t),m=(0,r.z)(i,t);o&&(c=Math.min(p.x,m.x),l=Math.max(p.x,m.x)),s&&(a=Math.min(p.y,m.y),h=Math.max(p.y,m.y));const v=l-c,g=h-a;return{left:c,top:a,right:l,bottom:h,width:v,height:g,zoomX:o&&v?1+(f-v)/f:1,zoomY:s&&g?1+(d-g)/d:1}}function q(t,e){const n=d(t);if(!n.dragStart)return;k(t,"mousemove");const{mode:i,onZoomComplete:o,drag:{threshold:s=0}}=n.options.zoom,a=L(t,i,n.dragStart,e),c=u(i,"x",t)?a.width:0,l=u(i,"y",t)?a.height:0,h=Math.sqrt(c*c+l*l);if(n.dragStart=n.dragEnd=null,h<=s)return n.dragging=!1,void t.update("none");C(t,{x:a.left,y:a.top},{x:a.right,y:a.bottom},"zoom"),setTimeout((()=>n.dragging=!1),500),(0,r.Q)(o,[{chart:t}])}function W(t,e){const{handlers:{onZoomComplete:n},options:{zoom:i}}=d(t);if(!function(t,e,n){if(c(s(n.wheel),e))(0,r.Q)(n.onZoomRejected,[{chart:t,event:e}]);else if(!1!==N(t,e,n)&&(e.cancelable&&e.preventDefault(),void 0!==e.deltaY))return!0}(t,e,i))return;const o=e.target.getBoundingClientRect(),a=1+(e.deltaY>=0?-i.wheel.speed:i.wheel.speed);I(t,{x:a,y:a,focalPoint:{x:e.clientX-o.left,y:e.clientY-o.top}}),n&&n()}function H(t,e,n,i){n&&(d(t).handlers[e]=function(t,e){let n;return function(){return clearTimeout(n),n=setTimeout(t,e),e}}((()=>(0,r.Q)(n,[{chart:t}])),i))}function j(t,e){return function(n,i){const{pan:o,zoom:u={}}=e.options;if(!o||!o.enabled)return!1;const l=i&&i.srcEvent;return!l||(!(!e.panning&&"mouse"===i.pointerType&&(c(s(o),l)||a(s(u.drag),l)))||((0,r.Q)(o.onPanRejected,[{chart:t,event:i}]),!1))}}function Q(t,e,n){if(e.scale){const{center:i,pointers:o}=n,r=1/e.scale*n.scale,s=n.target.getBoundingClientRect(),a=function(t,e){const n=Math.abs(t.clientX-e.clientX),i=Math.abs(t.clientY-e.clientY),o=n/i;let r,s;return o>.3&&o<1.7?r=s=!0:n>i?r=!0:s=!0,{x:r,y:s}}(o[0],o[1]),c=e.options.zoom.mode;I(t,{x:a.x&&u(c,"x",t)?r:1,y:a.y&&u(c,"y",t)?r:1,focalPoint:{x:i.x-s.left,y:i.y-s.top}}),e.scale=n.scale}}function V(t,e,n){const i=e.delta;i&&(e.panning=!0,O(t,{x:n.deltaX-i.x,y:n.deltaY-i.y},e.panScales),e.delta={x:n.deltaX,y:n.deltaY})}const U=new WeakMap;function B(t,e){const n=d(t),i=t.canvas,{pan:s,zoom:a}=e,c=new(o().Manager)(i);a&&a.pinch.enabled&&(c.add(new(o().Pinch)),c.on("pinchstart",(()=>function(t,e){e.options.zoom.pinch.enabled&&(e.scale=1)}(0,n))),c.on("pinch",(e=>Q(t,n,e))),c.on("pinchend",(e=>function(t,e,n){e.scale&&(Q(t,e,n),e.scale=null,(0,r.Q)(e.options.zoom.onZoomComplete,[{chart:t}]))}(t,n,e)))),s&&s.enabled&&(c.add(new(o().Pan)({threshold:s.threshold,enable:j(t,n)})),c.on("panstart",(e=>function(t,e,n){const{enabled:i,onPanStart:o,onPanRejected:s}=e.options.pan;if(!i)return;const a=n.target.getBoundingClientRect(),c={x:n.center.x-a.left,y:n.center.y-a.top};if(!1===(0,r.Q)(o,[{chart:t,event:n,point:c}]))return(0,r.Q)(s,[{chart:t,event:n}]);e.panScales=h(e.options.pan,c,t),e.delta={x:0,y:0},clearTimeout(e.panEndTimeout),V(t,e,n)}(t,n,e))),c.on("panmove",(e=>V(t,n,e))),c.on("panend",(()=>function(t,e){e.delta=null,e.panning&&(e.panEndTimeout=setTimeout((()=>e.panning=!1),500),(0,r.Q)(e.options.pan.onPanComplete,[{chart:t}]))}(t,n)))),U.set(t,c)}function K(t,e,n){const i=n.zoom.drag,{dragStart:o,dragEnd:r}=d(t);if(i.drawTime!==e||!r)return;const{left:s,top:a,width:c,height:u}=L(t,n.zoom.mode,o,r),l=t.ctx;l.save(),l.beginPath(),l.fillStyle=i.backgroundColor||"rgba(225,225,225,0.3)",l.fillRect(s,a,c,u),i.borderWidth>0&&(l.lineWidth=i.borderWidth,l.strokeStyle=i.borderColor||"rgba(225,225,225)",l.strokeRect(s,a,c,u)),l.restore()}var G={id:"zoom",version:"2.0.1",defaults:{pan:{enabled:!1,mode:"xy",threshold:10,modifierKey:null},zoom:{wheel:{enabled:!1,speed:.1,modifierKey:null},drag:{enabled:!1,drawTime:"beforeDatasetsDraw",modifierKey:null},pinch:{enabled:!1},mode:"xy"}},start:function(t,e,n){d(t).options=n,Object.prototype.hasOwnProperty.call(n.zoom,"enabled")&&console.warn("The option `zoom.enabled` is no longer supported. Please use `zoom.wheel.enabled`, `zoom.drag.enabled`, or `zoom.pinch.enabled`."),(Object.prototype.hasOwnProperty.call(n.zoom,"overScaleMode")||Object.prototype.hasOwnProperty.call(n.pan,"overScaleMode"))&&console.warn("The option `overScaleMode` is deprecated. Please use `scaleMode` instead (and update `mode` as desired)."),o()&&B(t,n),t.pan=(e,n,i)=>O(t,e,n,i),t.zoom=(e,n)=>I(t,e,n),t.zoomRect=(e,n,i)=>C(t,e,n,i),t.zoomScale=(e,n,i)=>function(t,e,n,i="none"){S(t,d(t)),v(t.scales[e],n,void 0,!0),t.update(i)}(t,e,n,i),t.resetZoom=e=>function(t,e="default"){const n=d(t),i=S(t,n);(0,r.F)(t.scales,(function(t){const e=t.options;i[t.id]?(e.min=i[t.id].min.options,e.max=i[t.id].max.options):(delete e.min,delete e.max)})),t.update(e),(0,r.Q)(n.options.zoom.onZoomComplete,[{chart:t}])}(t,e),t.getZoomLevel=()=>_(t),t.getInitialScaleBounds=()=>R(t),t.isZoomedOrPanned=()=>function(t){const e=R(t);for(const n of Object.keys(t.scales)){const{min:i,max:o}=e[n];if(void 0!==i&&t.scales[n].min!==i)return!0;if(void 0!==o&&t.scales[n].max!==o)return!0}return!1}(t)},beforeEvent(t){const e=d(t);if(e.panning||e.dragging)return!1},beforeUpdate:function(t,e,n){d(t).options=n,function(t,e){const n=t.canvas,{wheel:i,drag:o,onZoomComplete:r}=e.zoom;i.enabled?(Z(t,n,"wheel",W),H(t,"onZoomComplete",r,250)):k(t,"wheel"),o.enabled?(Z(t,n,"mousedown",X),Z(t,n.ownerDocument,"mouseup",q)):(k(t,"mousedown"),k(t,"mousemove"),k(t,"mouseup"),k(t,"keydown"))}(t,n)},beforeDatasetsDraw(t,e,n){K(t,"beforeDatasetsDraw",n)},afterDatasetsDraw(t,e,n){K(t,"afterDatasetsDraw",n)},beforeDraw(t,e,n){K(t,"beforeDraw",n)},afterDraw(t,e,n){K(t,"afterDraw",n)},stop:function(t){!function(t){k(t,"mousedown"),k(t,"mousemove"),k(t,"mouseup"),k(t,"wheel"),k(t,"click"),k(t,"keydown")}(t),o()&&function(t){const e=U.get(t);e&&(e.remove("pinchstart"),e.remove("pinch"),e.remove("pinchend"),e.remove("panstart"),e.remove("pan"),e.remove("panend"),e.destroy(),U.delete(t))}(t),function(t){f.delete(t)}(t)},panFunctions:E,zoomFunctions:b,zoomRectFunctions:w}},50840:function(t,e,n){var i;!function(o,r,s,a){"use strict";var c,u=["","webkit","Moz","MS","ms","o"],l=r.createElement("div"),h="function",f=Math.round,d=Math.abs,p=Date.now;function m(t,e,n){return setTimeout(w(t,n),e)}function v(t,e,n){return!!Array.isArray(t)&&(g(t,n[e],n),!0)}function g(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==a)for(i=0;i\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=o.console&&(o.console.warn||o.console.log);return r&&r.call(o.console,i,n),t.apply(this,arguments)}}c="function"!==typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n-1}function I(t){return t.trim().split(/\s+/g)}function C(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;in[e]})):i.sort()),i}function O(t,e){for(var n,i,o=e[0].toUpperCase()+e.slice(1),r=0;r1&&!n.firstMultiple?n.firstMultiple=ot(e):1===o&&(n.firstMultiple=!1);var r=n.firstInput,s=n.firstMultiple,c=s?s.center:r.center,u=e.center=rt(i);e.timeStamp=p(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=ut(c,u),e.distance=ct(c,u),function(t,e){var n=e.center,i=t.offsetDelta||{},o=t.prevDelta||{},r=t.prevInput||{};e.eventType!==q&&r.eventType!==H||(o=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y});e.deltaX=o.x+(n.x-i.x),e.deltaY=o.y+(n.y-i.y)}(n,e),e.offsetDirection=at(e.deltaX,e.deltaY);var l=st(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=d(l.x)>d(l.y)?l.x:l.y,e.scale=s?(h=s.pointers,f=i,ct(f[0],f[1],et)/ct(h[0],h[1],et)):1,e.rotation=s?function(t,e){return ut(e[1],e[0],et)+ut(t[1],t[0],et)}(s.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,o,r,s=t.lastInterval||e,c=e.timeStamp-s.timeStamp;if(e.eventType!=j&&(c>L||s.velocity===a)){var u=e.deltaX-s.deltaX,l=e.deltaY-s.deltaY,h=st(c,u,l);i=h.x,o=h.y,n=d(h.x)>d(h.y)?h.x:h.y,r=at(u,l),t.lastInterval=e}else n=s.velocity,i=s.velocityX,o=s.velocityY,r=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=o,e.direction=r}(n,e);var h,f;var m=t.element;P(e.srcEvent.target,m)&&(m=e.srcEvent.target);e.target=m}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function ot(t){for(var e=[],n=0;n=d(e)?t<0?V:U:e<0?B:K}function ct(t,e,n){n||(n=tt);var i=e[n[0]]-t[n[0]],o=e[n[1]]-t[n[1]];return Math.sqrt(i*i+o*o)}function ut(t,e,n){n||(n=tt);var i=e[n[0]]-t[n[0]],o=e[n[1]]-t[n[1]];return 180*Math.atan2(o,i)/Math.PI}nt.prototype={handler:function(){},init:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(k(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&z(this.element,this.evEl,this.domHandler),this.evTarget&&z(this.target,this.evTarget,this.domHandler),this.evWin&&z(k(this.element),this.evWin,this.domHandler)}};var lt={mousedown:q,mousemove:W,mouseup:H},ht="mousedown",ft="mousemove mouseup";function dt(){this.evEl=ht,this.evWin=ft,this.pressed=!1,nt.apply(this,arguments)}b(dt,nt,{handler:function(t){var e=lt[t.type];e&q&&0===t.button&&(this.pressed=!0),e&W&&1!==t.which&&(e=H),this.pressed&&(e&H&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:X,srcEvent:t}))}});var pt={pointerdown:q,pointermove:W,pointerup:H,pointercancel:j,pointerout:j},mt={2:N,3:"pen",4:X,5:"kinect"},vt="pointerdown",gt="pointermove pointerup pointercancel";function yt(){this.evEl=vt,this.evWin=gt,nt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}o.MSPointerEvent&&!o.PointerEvent&&(vt="MSPointerDown",gt="MSPointerMove MSPointerUp MSPointerCancel"),b(yt,nt,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),o=pt[i],r=mt[t.pointerType]||t.pointerType,s=r==N,a=C(e,t.pointerId,"pointerId");o&q&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):o&(H|j)&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),n&&e.splice(a,1))}});var xt={touchstart:q,touchmove:W,touchend:H,touchcancel:j};function Tt(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,nt.apply(this,arguments)}function bt(t,e){var n=_(t.touches),i=_(t.changedTouches);return e&(H|j)&&(n=A(n.concat(i),"identifier",!0)),[n,i]}b(Tt,nt,{handler:function(t){var e=xt[t.type];if(e===q&&(this.started=!0),this.started){var n=bt.call(this,t,e);e&(H|j)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:N,srcEvent:t})}}});var wt={touchstart:q,touchmove:W,touchend:H,touchcancel:j},Et="touchstart touchmove touchend touchcancel";function Mt(){this.evTarget=Et,this.targetIds={},nt.apply(this,arguments)}function St(t,e){var n=_(t.touches),i=this.targetIds;if(e&(q|W)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var o,r,s=_(t.changedTouches),a=[],c=this.target;if(r=n.filter((function(t){return P(t.target,c)})),e===q)for(o=0;o-1&&i.splice(t,1)}),zt)}}function Ct(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function i(n){e.manager.emit(n,t)}n=Ht&&i(e.options.event+Bt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=Vt},canEmit:function(){for(var t=0;te.threshold&&o&e.direction},attrTest:function(t){return $t.prototype.attrTest.call(this,t)&&(this.state&qt||!(this.state&qt)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Kt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),b(te,$t,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Zt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&qt)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),b(ee,Ut,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Rt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distancee.time;if(this._input=t,!i||!n||t.eventType&(H|j)&&!o)this.reset();else if(t.eventType&q)this.reset(),this._timer=m((function(){this.state=jt,this.tryEmit()}),e.time,this);else if(t.eventType&H)return jt;return Vt},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===jt&&(t&&t.eventType&H?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=p(),this.manager.emit(this.options.event,this._input)))}}),b(ne,$t,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Zt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&qt)}}),b(ie,$t,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:G|$,pointers:1},getTouchAction:function(){return Jt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(G|$)?e=t.overallVelocity:n&G?e=t.overallVelocityX:n&$&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&d(e)>this.options.velocity&&t.eventType&H},emit:function(t){var e=Kt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),b(oe,Ut,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[kt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function m(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 v(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),t}return t=f,r=[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.position,r=t.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:v({},n)})}}],(n=[{key:"componentDidMount",value:function(){"undefined"!==typeof window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var e,t,n;return null!==(e=null===(t=this.props)||void 0===t||null===(n=t.nodeRef)||void 0===n?void 0:n.current)&&void 0!==e?e:i.default.findDOMNode(this)}},{key:"render",value:function(){var e,t=this.props,n=(t.axis,t.bounds,t.children),r=t.defaultPosition,a=t.defaultClassName,i=t.defaultClassNameDragging,f=t.defaultClassNameDragged,d=t.position,g=t.positionOffset,y=(t.scale,h(t,p)),m={},w=null,S=!Boolean(d)||this.state.dragging,D=d||r,O={x:(0,s.canDragX)(this)&&S?this.state.x:D.x,y:(0,s.canDragY)(this)&&S?this.state.y:D.y};this.state.isElementSVG?w=(0,l.createSVGTransform)(O,g):m=(0,l.createCSSTransform)(O,g);var P=(0,u.default)(n.props.className||"",a,(M(e={},i,this.state.dragging),M(e,f,this.state.dragged),e));return o.createElement(c.default,b({},y,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),o.cloneElement(o.Children.only(n),{className:P,style:v(v({},n.props.style),m),transform:w}))}}])&&D(t.prototype,n),r&&D(t,r),Object.defineProperty(t,"prototype",{writable:!1}),f}(o.Component);t.default=E,M(E,"displayName","Draggable"),M(E,"propTypes",v(v({},c.default.propTypes),{},{axis:a.default.oneOf(["both","x","y","none"]),bounds:a.default.oneOfType([a.default.shape({left:a.default.number,right:a.default.number,top:a.default.number,bottom:a.default.number}),a.default.string,a.default.oneOf([!1])]),defaultClassName:a.default.string,defaultClassNameDragging:a.default.string,defaultClassNameDragged:a.default.string,defaultPosition:a.default.shape({x:a.default.number,y:a.default.number}),positionOffset:a.default.shape({x:a.default.oneOfType([a.default.number,a.default.string]),y:a.default.oneOfType([a.default.number,a.default.string])}),position:a.default.shape({x:a.default.number,y:a.default.number}),className:f.dontSetMe,style:f.dontSetMe,transform:f.dontSetMe})),M(E,"defaultProps",v(v({},c.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))},80783:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var u=a?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(o,i,u):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(67294)),a=c(n(45697)),i=c(n(73935)),u=n(81825),l=n(2849),s=n(9280),f=c(n(55904));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(l){u=!0,o=l}finally{try{i||null==n.return||n.return()}finally{if(u)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e,t)||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.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n not mounted on DragStart!");var r=n.ownerDocument;if(!(e.props.disabled||!(t.target instanceof r.defaultView.Node)||e.props.handle&&!(0,u.matchesSelectorAndParentsTo)(t.target,e.props.handle,n)||e.props.cancel&&(0,u.matchesSelectorAndParentsTo)(t.target,e.props.cancel,n))){"touchstart"===t.type&&t.preventDefault();var o=(0,u.getTouchIdentifier)(t);e.setState({touchIdentifier:o});var a=(0,l.getControlPosition)(t,o,m(e));if(null!=a){var i=a.x,s=a.y,c=(0,l.createCoreData)(m(e),i,s);(0,f.default)("DraggableCore: handleDragStart: %j",c),(0,f.default)("calling",e.props.onStart),!1!==e.props.onStart(t,c)&&!1!==e.mounted&&(e.props.enableUserSelectHack&&(0,u.addUserSelectStyles)(r),e.setState({dragging:!0,lastX:i,lastY:s}),(0,u.addEvent)(r,O.move,e.handleDrag),(0,u.addEvent)(r,O.stop,e.handleDragStop))}}})),w(m(e),"handleDrag",(function(t){var n=(0,l.getControlPosition)(t,e.state.touchIdentifier,m(e));if(null!=n){var r=n.x,o=n.y;if(Array.isArray(e.props.grid)){var a=r-e.state.lastX,i=o-e.state.lastY,u=p((0,l.snapToGrid)(e.props.grid,a,i),2);if(a=u[0],i=u[1],!a&&!i)return;r=e.state.lastX+a,o=e.state.lastY+i}var s=(0,l.createCoreData)(m(e),r,o);if((0,f.default)("DraggableCore: handleDrag: %j",s),!1!==e.props.onDrag(t,s)&&!1!==e.mounted)e.setState({lastX:r,lastY:o});else try{e.handleDragStop(new MouseEvent("mouseup"))}catch(d){var c=document.createEvent("MouseEvents");c.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.handleDragStop(c)}}})),w(m(e),"handleDragStop",(function(t){if(e.state.dragging){var n=(0,l.getControlPosition)(t,e.state.touchIdentifier,m(e));if(null!=n){var r=n.x,o=n.y;if(Array.isArray(e.props.grid)){var a=r-e.state.lastX||0,i=o-e.state.lastY||0,s=p((0,l.snapToGrid)(e.props.grid,a,i),2);a=s[0],i=s[1],r=e.state.lastX+a,o=e.state.lastY+i}var c=(0,l.createCoreData)(m(e),r,o);if(!1===e.props.onStop(t,c)||!1===e.mounted)return!1;var d=e.findDOMNode();d&&e.props.enableUserSelectHack&&(0,u.removeUserSelectStyles)(d.ownerDocument),(0,f.default)("DraggableCore: handleDragStop: %j",c),e.setState({dragging:!1,lastX:NaN,lastY:NaN}),d&&((0,f.default)("DraggableCore: Removing handlers"),(0,u.removeEvent)(d.ownerDocument,O.move,e.handleDrag),(0,u.removeEvent)(d.ownerDocument,O.stop,e.handleDragStop))}}})),w(m(e),"onMouseDown",(function(t){return O=D,e.handleDragStart(t)})),w(m(e),"onMouseUp",(function(t){return O=D,e.handleDragStop(t)})),w(m(e),"onTouchStart",(function(t){return O=S,e.handleDragStart(t)})),w(m(e),"onTouchEnd",(function(t){return O=S,e.handleDragStop(t)})),e}return t=s,(n=[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.findDOMNode();e&&(0,u.addEvent)(e,S.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.findDOMNode();if(e){var t=e.ownerDocument;(0,u.removeEvent)(t,D.move,this.handleDrag),(0,u.removeEvent)(t,S.move,this.handleDrag),(0,u.removeEvent)(t,D.stop,this.handleDragStop),(0,u.removeEvent)(t,S.stop,this.handleDragStop),(0,u.removeEvent)(e,S.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,u.removeUserSelectStyles)(t)}}},{key:"findDOMNode",value:function(){var e,t,n;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(n=t.nodeRef)||void 0===n?void 0:n.current:i.default.findDOMNode(this)}},{key:"render",value:function(){return o.cloneElement(o.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&y(t.prototype,n),r&&y(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Component);t.default=P,w(P,"displayName","DraggableCore"),w(P,"propTypes",{allowAnyClick:a.default.bool,disabled:a.default.bool,enableUserSelectHack:a.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:a.default.arrayOf(a.default.number),handle:a.default.string,cancel:a.default.string,nodeRef:a.default.object,onStart:a.default.func,onDrag:a.default.func,onStop:a.default.func,onMouseDown:a.default.func,scale:a.default.number,className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),w(P,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},61193:function(e,t,n){var r=n(54857),o=r.default,a=r.DraggableCore;e.exports=o,e.exports.default=o,e.exports.DraggableCore=a},81825:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.addClassName=p,t.addEvent=function(e,t,n,r){if(!e)return;var o=l({capture:!0},r);e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},t.addUserSelectStyles=function(e){if(!e)return;var t=e.getElementById("react-draggable-style-el");t||((t=e.createElement("style")).type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&p(e.body,"react-draggable-transparent-selection")},t.createCSSTransform=function(e,t){var n=d(e,t,"px");return s({},(0,a.browserPrefixToKey)("transform",a.default),n)},t.createSVGTransform=function(e,t){return d(e,t,"")},t.getTouch=function(e,t){return e.targetTouches&&(0,o.findInArray)(e.targetTouches,(function(e){return t===e.identifier}))||e.changedTouches&&(0,o.findInArray)(e.changedTouches,(function(e){return t===e.identifier}))},t.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},t.getTranslation=d,t.innerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,o.int)(n.paddingTop),t-=(0,o.int)(n.paddingBottom)},t.innerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,o.int)(n.paddingLeft),t-=(0,o.int)(n.paddingRight)},t.matchesSelector=c,t.matchesSelectorAndParentsTo=function(e,t,n){var r=e;do{if(c(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},t.offsetXYFromParent=function(e,t,n){var r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,a=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:a}},t.outerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,o.int)(n.borderTopWidth),t+=(0,o.int)(n.borderBottomWidth)},t.outerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,o.int)(n.borderLeftWidth),t+=(0,o.int)(n.borderRightWidth)},t.removeClassName=g,t.removeEvent=function(e,t,n,r){if(!e)return;var o=l({capture:!0},r);e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},t.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&g(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{var t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(n){}};var o=n(9280),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var l=a?Object.getOwnPropertyDescriptor(e,u):null;l&&(l.get||l.set)?Object.defineProperty(o,u,l):o[u]=e[u]}o.default=e,n&&n.set(e,o);return o}(n(38650));function i(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function u(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 l(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"===typeof window)return"";var a=null===(e=window.document)||void 0===e||null===(t=e.documentElement)||void 0===t?void 0:t.style;if(!a)return"";if(r in a)return"";for(var i=0;i: Unmounted during event!");return t}},9280:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))},t.findInArray=function(e,t){for(var n=0,r=e.length;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function m(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 v(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),t}return t=f,r=[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.position,r=t.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:v({},n)})}}],(n=[{key:"componentDidMount",value:function(){"undefined"!==typeof window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var e,t,n;return null!==(e=null===(t=this.props)||void 0===t||null===(n=t.nodeRef)||void 0===n?void 0:n.current)&&void 0!==e?e:i.default.findDOMNode(this)}},{key:"render",value:function(){var e,t=this.props,n=(t.axis,t.bounds,t.children),r=t.defaultPosition,a=t.defaultClassName,i=t.defaultClassNameDragging,f=t.defaultClassNameDragged,d=t.position,g=t.positionOffset,y=(t.scale,h(t,p)),m={},w=null,S=!Boolean(d)||this.state.dragging,D=d||r,O={x:(0,s.canDragX)(this)&&S?this.state.x:D.x,y:(0,s.canDragY)(this)&&S?this.state.y:D.y};this.state.isElementSVG?w=(0,l.createSVGTransform)(O,g):m=(0,l.createCSSTransform)(O,g);var P=(0,u.default)(n.props.className||"",a,(M(e={},i,this.state.dragging),M(e,f,this.state.dragged),e));return o.createElement(c.default,b({},y,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),o.cloneElement(o.Children.only(n),{className:P,style:v(v({},n.props.style),m),transform:w}))}}])&&D(t.prototype,n),r&&D(t,r),Object.defineProperty(t,"prototype",{writable:!1}),f}(o.Component);t.default=E,M(E,"displayName","Draggable"),M(E,"propTypes",v(v({},c.default.propTypes),{},{axis:a.default.oneOf(["both","x","y","none"]),bounds:a.default.oneOfType([a.default.shape({left:a.default.number,right:a.default.number,top:a.default.number,bottom:a.default.number}),a.default.string,a.default.oneOf([!1])]),defaultClassName:a.default.string,defaultClassNameDragging:a.default.string,defaultClassNameDragged:a.default.string,defaultPosition:a.default.shape({x:a.default.number,y:a.default.number}),positionOffset:a.default.shape({x:a.default.oneOfType([a.default.number,a.default.string]),y:a.default.oneOfType([a.default.number,a.default.string])}),position:a.default.shape({x:a.default.number,y:a.default.number}),className:f.dontSetMe,style:f.dontSetMe,transform:f.dontSetMe})),M(E,"defaultProps",v(v({},c.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))},80783:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var u=a?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(o,i,u):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(67294)),a=c(n(45697)),i=c(n(73935)),u=n(81825),l=n(2849),s=n(9280),f=c(n(55904));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(l){u=!0,o=l}finally{try{i||null==n.return||n.return()}finally{if(u)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e,t)||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.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n not mounted on DragStart!");var r=n.ownerDocument;if(!(e.props.disabled||!(t.target instanceof r.defaultView.Node)||e.props.handle&&!(0,u.matchesSelectorAndParentsTo)(t.target,e.props.handle,n)||e.props.cancel&&(0,u.matchesSelectorAndParentsTo)(t.target,e.props.cancel,n))){"touchstart"===t.type&&t.preventDefault();var o=(0,u.getTouchIdentifier)(t);e.setState({touchIdentifier:o});var a=(0,l.getControlPosition)(t,o,m(e));if(null!=a){var i=a.x,s=a.y,c=(0,l.createCoreData)(m(e),i,s);(0,f.default)("DraggableCore: handleDragStart: %j",c),(0,f.default)("calling",e.props.onStart),!1!==e.props.onStart(t,c)&&!1!==e.mounted&&(e.props.enableUserSelectHack&&(0,u.addUserSelectStyles)(r),e.setState({dragging:!0,lastX:i,lastY:s}),(0,u.addEvent)(r,O.move,e.handleDrag),(0,u.addEvent)(r,O.stop,e.handleDragStop))}}})),w(m(e),"handleDrag",(function(t){var n=(0,l.getControlPosition)(t,e.state.touchIdentifier,m(e));if(null!=n){var r=n.x,o=n.y;if(Array.isArray(e.props.grid)){var a=r-e.state.lastX,i=o-e.state.lastY,u=p((0,l.snapToGrid)(e.props.grid,a,i),2);if(a=u[0],i=u[1],!a&&!i)return;r=e.state.lastX+a,o=e.state.lastY+i}var s=(0,l.createCoreData)(m(e),r,o);if((0,f.default)("DraggableCore: handleDrag: %j",s),!1!==e.props.onDrag(t,s)&&!1!==e.mounted)e.setState({lastX:r,lastY:o});else try{e.handleDragStop(new MouseEvent("mouseup"))}catch(d){var c=document.createEvent("MouseEvents");c.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.handleDragStop(c)}}})),w(m(e),"handleDragStop",(function(t){if(e.state.dragging){var n=(0,l.getControlPosition)(t,e.state.touchIdentifier,m(e));if(null!=n){var r=n.x,o=n.y;if(Array.isArray(e.props.grid)){var a=r-e.state.lastX||0,i=o-e.state.lastY||0,s=p((0,l.snapToGrid)(e.props.grid,a,i),2);a=s[0],i=s[1],r=e.state.lastX+a,o=e.state.lastY+i}var c=(0,l.createCoreData)(m(e),r,o);if(!1===e.props.onStop(t,c)||!1===e.mounted)return!1;var d=e.findDOMNode();d&&e.props.enableUserSelectHack&&(0,u.removeUserSelectStyles)(d.ownerDocument),(0,f.default)("DraggableCore: handleDragStop: %j",c),e.setState({dragging:!1,lastX:NaN,lastY:NaN}),d&&((0,f.default)("DraggableCore: Removing handlers"),(0,u.removeEvent)(d.ownerDocument,O.move,e.handleDrag),(0,u.removeEvent)(d.ownerDocument,O.stop,e.handleDragStop))}}})),w(m(e),"onMouseDown",(function(t){return O=D,e.handleDragStart(t)})),w(m(e),"onMouseUp",(function(t){return O=D,e.handleDragStop(t)})),w(m(e),"onTouchStart",(function(t){return O=S,e.handleDragStart(t)})),w(m(e),"onTouchEnd",(function(t){return O=S,e.handleDragStop(t)})),e}return t=s,(n=[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.findDOMNode();e&&(0,u.addEvent)(e,S.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.findDOMNode();if(e){var t=e.ownerDocument;(0,u.removeEvent)(t,D.move,this.handleDrag),(0,u.removeEvent)(t,S.move,this.handleDrag),(0,u.removeEvent)(t,D.stop,this.handleDragStop),(0,u.removeEvent)(t,S.stop,this.handleDragStop),(0,u.removeEvent)(e,S.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,u.removeUserSelectStyles)(t)}}},{key:"findDOMNode",value:function(){var e,t,n;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(n=t.nodeRef)||void 0===n?void 0:n.current:i.default.findDOMNode(this)}},{key:"render",value:function(){return o.cloneElement(o.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&y(t.prototype,n),r&&y(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Component);t.default=P,w(P,"displayName","DraggableCore"),w(P,"propTypes",{allowAnyClick:a.default.bool,disabled:a.default.bool,enableUserSelectHack:a.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:a.default.arrayOf(a.default.number),handle:a.default.string,cancel:a.default.string,nodeRef:a.default.object,onStart:a.default.func,onDrag:a.default.func,onStop:a.default.func,onMouseDown:a.default.func,scale:a.default.number,className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),w(P,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},61193:function(e,t,n){var r=n(54857),o=r.default,a=r.DraggableCore;e.exports=o,e.exports.default=o,e.exports.DraggableCore=a},81825:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.addClassName=p,t.addEvent=function(e,t,n,r){if(!e)return;var o=l({capture:!0},r);e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},t.addUserSelectStyles=function(e){if(!e)return;var t=e.getElementById("react-draggable-style-el");t||((t=e.createElement("style")).type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&p(e.body,"react-draggable-transparent-selection")},t.createCSSTransform=function(e,t){var n=d(e,t,"px");return s({},(0,a.browserPrefixToKey)("transform",a.default),n)},t.createSVGTransform=function(e,t){return d(e,t,"")},t.getTouch=function(e,t){return e.targetTouches&&(0,o.findInArray)(e.targetTouches,(function(e){return t===e.identifier}))||e.changedTouches&&(0,o.findInArray)(e.changedTouches,(function(e){return t===e.identifier}))},t.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},t.getTranslation=d,t.innerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,o.int)(n.paddingTop),t-=(0,o.int)(n.paddingBottom)},t.innerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,o.int)(n.paddingLeft),t-=(0,o.int)(n.paddingRight)},t.matchesSelector=c,t.matchesSelectorAndParentsTo=function(e,t,n){var r=e;do{if(c(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},t.offsetXYFromParent=function(e,t,n){var r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,a=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:a}},t.outerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,o.int)(n.borderTopWidth),t+=(0,o.int)(n.borderBottomWidth)},t.outerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,o.int)(n.borderLeftWidth),t+=(0,o.int)(n.borderRightWidth)},t.removeClassName=g,t.removeEvent=function(e,t,n,r){if(!e)return;var o=l({capture:!0},r);e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},t.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&g(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{var t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(n){}};var o=n(9280),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var l=a?Object.getOwnPropertyDescriptor(e,u):null;l&&(l.get||l.set)?Object.defineProperty(o,u,l):o[u]=e[u]}o.default=e,n&&n.set(e,o);return o}(n(38650));function i(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function u(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 l(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"===typeof window)return"";var a=null===(e=window.document)||void 0===e||null===(t=e.documentElement)||void 0===t?void 0:t.style;if(!a)return"";if(r in a)return"";for(var i=0;i: Unmounted during event!");return t}},9280:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))},t.findInArray=function(e,t){for(var n=0,r=e.length;n=N&&U(e)}),[j]),(0,a.useEffect)((function(){o({start:j,end:N,scheduleOption:d,duration:h})}),[j,N,d,h]);var K=x(),V=(0,y.default)((0,S.Z)(K,{years:1}));return a.createElement(l.Flex,{column:!0,gap:3},!s&&a.createElement(l.Flex,{gap:3},Object.entries(p.Zg).map((function(e){var t=(0,i.Z)(e,2),n=t[0],o=t[1],s=o.text,c=o.tooltip;return a.createElement(l.RadioButton,{key:n,checked:n===d,onChange:function(){return f(n)},disabled:r},a.createElement(m.Z,{content:c,align:"bottom"},a.createElement(l.TextSmall,{color:"textDescription"},s)))}))),"now"===d?a.createElement(A,{duration:h,setDuration:v,setDate:function(e){F(Date.now()),U(e)},endDate:N,isDisabled:r}):a.createElement(l.Flex,{gap:2},a.createElement(l.Flex,{column:!0,gap:2,flex:{grow:1,shrink:1},basis:0},a.createElement(l.TextSmall,null,"Start date"),a.createElement(Z.Z,{isSinglePicker:!0,values:{singleDate:new Date(j)},minDate:R(),maxDate:V,utc:w,onChange:function(e){F(e),k((function(e){return e+1}))},isPlaying:!1,accessorProps:p.mD,padding:[4,0],width:"auto",accessorTooltipContent:"Select start date"})),a.createElement(l.Flex,{column:!0,gap:2,flex:{grow:1,shrink:1},basis:0},a.createElement(l.TextSmall,null,"End date"),a.createElement(Z.Z,{key:D,isSinglePicker:!0,values:{singleDate:N?new Date(N):N},minDate:z,maxDate:V,utc:w,onChange:U,isPlaying:!1,accessorProps:p.mD,padding:[4,0],width:"auto",accessorTooltipContent:"Select end date"}))))},j=function(e){var t=e.content,n=void 0===t?"Loading alerts...":t;return a.createElement(l.Flex,{height:45,alignItems:"center",justifyContent:"center"},a.createElement(l.Text,null,n))},F=n(27308),_=function(e){return a.createElement(l.Flex,(0,s.Z)({gap:2,alignItems:"center"},e),a.createElement(l.Icon,{size:"small",color:"warning",name:"warning_triangle"}),a.createElement(l.Text,null,"This feature is only available to paid plans"),a.createElement(F.Z,{classification:"Pro",content:"Go to Pro plan"}),a.createElement(F.Z,{classification:"Business",content:"Go to Business plan"}))},B=(n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(57327),n(41539),n(88449),n(2490),n(59849),n(47941),n(69826),n(31672),n(59461),n(26699),n(32023),n(88674),n(17727),n(89250)),N=n(13477),U=n(33335),M=n(74059),T=n(96929),z=n(3689),G=n(93742),K=n(25403),V=n(4480),Q=n(48450),Y=(0,V.CG)({key:"spaceAlertMetas",get:function(e){return function(){return(0,Q.uk)(e)}}}),J=n(62447),W=n(45396),$=n(93017),q=["id","name"],X=["rooms","nodes","hostLabels","startsAt","lastsUntil"],ee=["accountId","scope","rooms","nodes","hostLabels","startsAt","lastsUntil","scheduleOption","duration"];function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function ne(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[],n=function(e){return e.length<=1?e:e[e.length-1].value==p.sr.value?[p.sr]:e.filter((function(e){return!!e.value}))}(e),a=n.map((function(e){return e.value||E})),l=t.length=N&&U(e)}),[j]),(0,a.useEffect)((function(){o({start:j,end:N,scheduleOption:d,duration:h})}),[j,N,d,h]);var K=x(),V=(0,y.default)((0,S.Z)(K,{years:1}));return a.createElement(l.Flex,{column:!0,gap:3},!s&&a.createElement(l.Flex,{gap:3},Object.entries(f.Zg).map((function(e){var t=(0,i.Z)(e,2),n=t[0],o=t[1],s=o.text,c=o.tooltip;return a.createElement(l.RadioButton,{key:n,checked:n===d,onChange:function(){return p(n)},disabled:r},a.createElement(m.Z,{content:c,align:"bottom"},a.createElement(l.TextSmall,{color:"textDescription"},s)))}))),"now"===d?a.createElement(A,{duration:h,setDuration:v,setDate:function(e){F(Date.now()),U(e)},endDate:N,isDisabled:r}):a.createElement(l.Flex,{gap:2},a.createElement(l.Flex,{column:!0,gap:2,flex:{grow:1,shrink:1},basis:0},a.createElement(l.TextSmall,null,"Start date"),a.createElement(Z.Z,{isSinglePicker:!0,values:{singleDate:new Date(j)},minDate:R(),maxDate:V,utc:w,onChange:function(e){F(e),k((function(e){return e+1}))},isPlaying:!1,accessorProps:f.mD,padding:[4,0],width:"auto",accessorTooltipContent:"Select start date"})),a.createElement(l.Flex,{column:!0,gap:2,flex:{grow:1,shrink:1},basis:0},a.createElement(l.TextSmall,null,"End date"),a.createElement(Z.Z,{key:D,isSinglePicker:!0,values:{singleDate:N?new Date(N):N},minDate:z,maxDate:V,utc:w,onChange:U,isPlaying:!1,accessorProps:f.mD,padding:[4,0],width:"auto",accessorTooltipContent:"Select end date"}))))},j=function(e){var t=e.content,n=void 0===t?"Loading alerts...":t;return a.createElement(l.Flex,{height:45,alignItems:"center",justifyContent:"center"},a.createElement(l.Text,null,n))},F=n(27308),_=function(e){return a.createElement(l.Flex,(0,s.Z)({gap:2,alignItems:"center"},e),a.createElement(l.Icon,{size:"small",color:"warning",name:"warning_triangle"}),a.createElement(l.Text,null,"This feature is only available to paid plans"),a.createElement(F.Z,{classification:"Pro",content:"Go to Pro plan"}),a.createElement(F.Z,{classification:"Business",content:"Go to Business plan"}))},B=(n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(57327),n(41539),n(88449),n(2490),n(59849),n(47941),n(69826),n(31672),n(59461),n(26699),n(32023),n(88674),n(17727),n(89250)),N=n(13477),U=n(33335),M=n(74059),T=n(96929),z=n(3689),G=n(93742),K=n(25403),V=n(4480),Q=n(48450),Y=(0,V.CG)({key:"spaceAlertMetas",get:function(e){return function(){return(0,Q.uk)(e)}}}),J=n(62447),W=n(45396),$=n(93017),q=["id","name"],X=["rooms","nodes","hostLabels","startsAt","lastsUntil"],ee=["accountId","scope","rooms","nodes","hostLabels","startsAt","lastsUntil","scheduleOption","duration"];function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function ne(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[],n=function(e){return e.length<=1?e:e[e.length-1].value==f.sr.value?[f.sr]:e.filter((function(e){return!!e.value}))}(e),a=n.map((function(e){return e.value||E})),l=t.length .button-icon{width:20px;height:20px;}}"]),B=(0,i.default)(o.Button).withConfig({displayName:"spaces__ExpandButton",componentId:"sc-8de8pq-2"})(["&&{> .button-icon{width:6px;height:9px;}}"]),T={onClickOut:function(){return(0,k.L)("header-help","click-out-modal","global-view")},onCloseClick:function(){return(0,k.L)("header-help","click-close","global-view")},onOpenIssueClick:function(){return(0,k.L)("header-help","click-\u03bfpen-issue","global-view")},onContributeClick:function(){return(0,k.L)("header-help","click-contribute","global-view")},onOpenBugClick:function(){return(0,k.L)("header-help","click-bug","global-view")},onSupportClick:function(){return(0,k.L)("header-help","click-support","global-view")},onVisitDocumentClick:function(){return(0,k.L)("header-help","click-visit-doc","global-view")},onGoToDemoClick:function(){return(0,k.L)("header-help","click-go-to-demo","global-view")}},L=function(e){var t=e.spacePanelCollapsed,n=e.toggleSpacePanel,c=(0,v.Iw)(),i=(0,v.th)(),g=(0,d.Z)(),h=(0,a.Z)(g,4),E=h[0],k=h[2],y=h[3],Z=(0,s.s0)(),S=(0,r.useCallback)((function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).slug;return Z("/spaces/".concat(e))}),[]);return r.createElement(o.Flex,{background:"sideBarMini","data-testid":"workspaceBar",padding:[3,2],column:!0,alignItems:"center",gap:6,height:"100vh",justifyContent:"between"},r.createElement(o.Flex,{column:!0,"data-testid":"workspaceBar-spaces-list",gap:4,alignItems:"center",overflow:"hidden"},r.createElement(m.Z,{"data-testid":"workspaceBar-netdataLogo"}),t&&r.createElement(B,{"data-testid":"workspaceBar-expandButton",onClick:n,icon:"chevron_right_s",neutral:!0,flavour:"borderless",small:!0}),r.createElement(o.Flex,{column:!0,"data-testid":"workspaceBar-spacesList",gap:4,overflow:{vertical:"auto"}},c.map((function(e){return r.createElement(p.Z,{testIdPrefix:"workspaceBar-space",key:e,spaceId:e,active:e===i})}))),r.createElement(I.Z,{permission:"user:CreateSpace"},r.createElement(F,{"data-testid":"workspaceBar-separator"})),r.createElement(f.Z,{content:"Create a new Space",align:"right"},r.createElement(C.Z,{permission:"user:CreateSpace",ifForbidden:"hide",icon:"plus",onClick:k,"data-testid":"workspaceBar-addSpace-button"}))),r.createElement(o.Flex,{column:!0,"data-testid":"workspaceBar-actionsList",gap:4,alignItems:"center"},r.createElement(o.Flex,{column:!0,gap:1,alignItems:"center"},r.createElement(I.Z,{permission:"user:ChangeSpaceRoomNotifications"},r.createElement(_,null)),r.createElement(o.Documentation,(0,l.Z)({app:"cloud",demoUrl:u.Z.demoUrl},T),(function(e){return r.createElement(f.Z,{content:"Read documentation, engage with the community and let us know about any feature requests or bugs",align:"right"},r.createElement(P,{neutral:!0,flavour:"borderless",icon:"question",onClick:e,"data-ga":"header-help::click-help::global-view","data-testid":"documentation-button",title:"Need help?"}))})),r.createElement(b,null)),r.createElement(x.Z,null)),E&&r.createElement(w.Z,{onClose:y,onDone:S}))},N=n(15861),R=n(64687),z=n.n(R),O=(n(9170),n(66992),n(41539),n(88674),n(34668),n(78783),n(33948),n(69826),n(31672),n(2490),n(59461),n(26699),n(32023),n(92222),n(57327),n(88449),n(59849),n(74916),n(77601),n(15306),n(27856)),W=n(26398),D=n(18761),j=n(97945),A=n(7335),U=n(25819),q=n(67622),H=n(61458),M=n(92501),V=n(37689),G=n(64358),Q=(0,i.default)(o.Icon).withConfig({displayName:"styled__TrashIcon",componentId:"sc-1hr9uxl-0"})(["&:hover{fill:",";opacity:0.6;}"],(0,o.getColor)("textFocus")),Y=(0,i.default)(o.TextSmall).withConfig({displayName:"styled__UrlWrapper",componentId:"sc-1hr9uxl-1"})(["overflow-wrap:anywhere;"]),$=(0,i.default)(o.Icon).withConfig({displayName:"styled__StyledIcon",componentId:"sc-1hr9uxl-2"})(["transform:",";"],(function(e){return e.right?"rotate(0)":"rotate(180deg)"})),J=function(){var e=(0,N.Z)(z().mark((function e(t,n){var a,r,o,c,l,i,s;return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.spaces,r=void 0===a?[]:a,o=n.id,e.next=3,(0,D.kq)(o);case 3:if(c=e.sent,!(l=c.data).length){e.next=9;break}return e.next=8,Promise.any(r.map((function(e){return W.Z.get((0,G.W)({spaceId:e.id})).then((function(t){var n=t.data;return Promise.any(n.map((function(t){return(0,U.Fz)({roomId:t.id,spaceId:e.id}).then((function(n){var a=n.data.find((function(e){var t=e.id;return l.includes(t)}));if(!a)throw new Error("can't find matching node");return"".concat(window.envSettings.cloudUrl,"/spaces/").concat(e.slug,"/rooms/").concat(t.slug,"/nodes/").concat(a.id)}))})))}))}))).then((function(e){return e})).catch((function(){}));case 8:i=e.sent;case 9:if(!i){e.next=11;break}return e.abrupt("return",i);case 11:if(!(s=t.filter((function(e){return!/netdata\.cloud\//.test(e)}))).length){e.next=16;break}return e.next=15,Promise.any(s.map((function(e){var t=/^https?:\/\//.test(e)?e:"http://".concat(e);return t=t.replace(/\/+$/,""),W.Z.get("".concat(t,"/api/v1/registry?action=hello")).then((function(){return t}))}))).then((function(e){return e})).catch((function(){}));case 15:return e.abrupt("return",e.sent);case 16:return e.abrupt("return");case 17:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),K=function(e){/https?:\/\//.test(e)||(e="http://".concat(e)),location.replace(e)},X=function(e){var t=e.id,n=e.selectedId,c=e.setSelectedId,l=(0,j.bV)(t,"name"),i=(0,d.Z)(),s=(0,a.Z)(i,4),u=s[0],m=s[2],p=s[3],g=(0,A.lL)(),f=(0,j.bV)(t,"urls"),h=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=n.openList,o=n.setSelectedId,c=(0,r.useRef)(),l=(0,v.GM)("ids"),i=(0,v.Zu)(l);return(0,r.useCallback)((0,N.Z)(z().mark((function n(){return z().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o(e),c.current){n.next=5;break}return n.next=4,J(t,{spaces:i,id:e});case 4:c.current=n.sent;case 5:if(o(),c.current){n.next=8;break}return n.abrupt("return",a());case 8:K(c.current);case 9:case"end":return n.stop()}}),n)}))),[t,i])}(t,f,{openList:m,setSelectedId:c}),E=(0,r.useCallback)((function(){u?p():h()}),[u,h]),b=n===t;return r.createElement(r.Fragment,null,r.createElement(q.Z,{onClick:E,isSidebar:!0,padding:[1,2,1,4],testid:"visitedNodes-".concat(l),disabled:!!n&&!b,selected:b,loading:b,iconColor:"menuItem",textColor:"menuItem",Wrapper:o.TextSmall},l),u&&r.createElement(o.Flex,{column:!0,margin:[1,3],padding:[2],border:{side:"all",color:"separator"},round:2},r.createElement(o.Text,{textAlign:"center"},"We couldn't connect to any of your instances, here is the list:"),f.map((function(e){return r.createElement(q.Z,{key:e,onClick:function(){return K(e)},isSidebar:!0,testid:"visitedNodes-node-".concat(e),actions:r.createElement(o.Flex,{flex:!1,margin:[0,0,0,1]},r.createElement(Q,{name:"trashcan",size:"small",color:"menuItem",onClick:function(n){n.stopPropagation(),g(t,e)},width:"16px",height:"16px"})),padding:[2],Wrapper:Y,iconColor:"menuItem",textColor:"menuItem"},e)}))))},ee=function(){var e=(0,A.z2)(),t=(0,d.Z)(e.length>0),n=(0,a.Z)(t,2),c=n[0],l=n[1];(0,r.useEffect)((function(){c||l()}),[e.length]);var i=(0,r.useState)(""),s=(0,a.Z)(i,2),u=s[0],m=s[1],p=(0,A.H3)(u),g=(0,r.useCallback)((0,O.D)(300,(function(e){return m(e.target.value)})),[]),f=(0,r.useState)(),h=(0,a.Z)(f,2),E=h[0],v=h[1];return e.length?r.createElement(H.Z,{isOpen:c,toggleOpen:l,label:r.createElement(o.Flex,{padding:[1,0],flex:!0,justifyContent:"between",alignItems:"center"},r.createElement(o.Flex,{alignItems:"center",gap:2},r.createElement(o.Icon,{name:"node_hollow",color:"menuItem",width:"14px",height:"14px"}),r.createElement(o.TextSmall,{color:"menuItem"},"Visited Nodes")),r.createElement($,{right:!c,name:"chevron_down",size:"small",color:"menuItem"})),headerTestId:"visitedNodes"},e.length>3&&r.createElement(o.Flex,{padding:[1,2,2,4]},r.createElement(V.Z,{"data-testid":"search-visited-nodes-input",onChange:g,size:"tiny"})),r.createElement(o.Flex,{padding:[0,0,2],column:!0},p.length?p.map((function(e){return r.createElement(X,{key:e,id:e,selectedId:E,setSelectedId:v})})):r.createElement(o.Text,{padding:[3,5]},"No nodes match your search"))):null},te=(0,r.memo)((function(){return r.createElement(M.ZP,{fallback:""},r.createElement(r.Suspense,{fallback:""},r.createElement(ee,null)))})),ne=n(56662),ae=n(55917),re=n(33335),oe=function(e){return function(t){var n=(0,v.th)();return r.createElement(e,(0,l.Z)({},t,{key:n}))}},ce=n(59636),le={isSidebar:!0,padding:[1,2,1,4],textColor:"menuItem",Wrapper:o.TextSmall},ie=oe((function(){var e=(0,re.gI)("room:Create"),t=(0,re.gI)("room:Read"),n=(0,d.Z)(t),c=(0,a.Z)(n,2),l=c[0],i=c[1],s=(0,d.Z)(!1),u=(0,a.Z)(s,4),m=u[0],p=u[2],g=u[3],h=(0,r.useCallback)((function(t){t.stopPropagation(),e&&p()}),[e]);return r.createElement(r.Fragment,null,r.createElement(H.Z,{"data-testid":"workspaceRooms-menuList",disabled:!t,headerTestId:"workspaceRooms-warRooms",isOpen:l,label:r.createElement(o.Flex,{padding:[1,0],margin:[0,0,1,0],flex:!0,justifyContent:"between",alignItems:"center",height:"24px"},r.createElement(o.Flex,{alignItems:"center",gap:2},r.createElement(o.Icon,{name:"space_new",color:"menuItem",width:"14px",height:"14px"}),r.createElement(o.TextSmall,{color:"menuItem"},"Rooms")),r.createElement(o.Flex,{alignItems:"center",gap:2},r.createElement(f.Z,{content:"Create a new room",align:"right"},r.createElement(C.Z,{permission:"room:Create",tiny:!0,icon:"plus",onClick:h,"data-testid":"workspaceRooms-addWarRoom-button"})),r.createElement(ae.x,{right:!l,name:"chevron_down",size:"small",color:"menuItem"}))),toggleOpen:i},r.createElement(o.Flex,{column:!0,"data-testid":"workspaceRooms-warRoomsList",padding:[0,0,1]},r.createElement(ce.Z,le))),m&&r.createElement(ne.U,{onClose:g,isSubmodal:!1}))})),se=n(61152),ue=(0,i.default)(o.Flex).attrs({alignItems:"center",justifyContent:"center",width:10,height:4,round:.5,background:"sideBarMini"}).withConfig({displayName:"styled__AdminPill",componentId:"sc-1ps23b1-0"})(["opacity:0;",":hover &{opacity:1;}"],q.z),de=function(e){var t=e.children,n=e.onToggle;return r.createElement(o.Flex,{justifyContent:"between",alignItems:"center"},r.createElement(o.Flex,{alignItems:"center"},t),r.createElement(o.Button,{onClick:n,icon:"chevron_left",neutral:!0,flavour:"hollow",small:!0}))},me=n(5795),pe=(0,i.default)(H.g).attrs({padding:[2],color:"textLite"}).withConfig({displayName:"spacePanel__ListHeader",componentId:"sc-1275zgk-0"})([""]),ge=function(e){return r.createElement(o.Flex,(0,l.Z)({alignItems:"center",gap:2},e),r.createElement(ue,null,r.createElement(o.TextFemto,{strong:!0,color:"text"},"ADMIN")),r.createElement(o.Flex,{opacity:"medium"},r.createElement(o.Icon,{name:"padlock",size:"small",width:"18px",height:"18px",color:"text"})))},fe=function(e){var t=e.toggleSpacePanel,n=(0,v.OS)(),c=(0,d.Z)(),l=(0,a.Z)(c,4),i=l[0],s=l[2],u=l[3],m=(0,se.Z)("manageInvitations"),p=(0,a.Z)(m,2)[1],g=(0,v.Q6)();return r.createElement(r.Fragment,null,i&&r.createElement(me.Z,{onClose:u}),r.createElement(H.Z,{"data-testid":"spacesPanel",isOpen:!0,label:r.createElement(de,{onToggle:t},n.name),headerTestId:"spacesPanel-activeSpaceHeader",Header:pe},r.createElement(o.Flex,{column:!0,padding:[2,0,1],"data-testid":"spacesPanel-menuList"},g?null:r.createElement(r.Fragment,null,r.createElement(E.Z,{permission:"node:Create"},(function(e){return r.createElement(q.Z,{actions:e?null:r.createElement(ge,{"data-testid":"adminWarning-notAdmin"}),disabled:!e,onClick:s,testid:"spacesPanel-claimNodes",icon:"nodes_hollow",iconWidth:"14px",iconHeight:"14px",padding:[1,2],gap:2,isSidebar:!0,textColor:"menuItem",iconColor:"menuItem",Wrapper:o.TextSmall},"Connect Nodes")})),r.createElement(E.Z,{permission:"space:InviteUser"},(function(e){return r.createElement(q.Z,{actions:e?null:r.createElement(ge,{"data-testid":"adminWarning-cannotInvite"}),disabled:!e,onClick:p,testid:"spacesPanel-inviteUsers",icon:"user",iconWidth:"14px",iconHeight:"14px",padding:[1,2],gap:2,isSidebar:!0,textColor:"menuItem",iconColor:"menuItem",Wrapper:o.TextSmall},"Invite Users")}))))))},he=function(e){var t=e.spacePanelCollapsed,n=e.toggleSpacePanel;return r.createElement(o.Collapsible,{width:56,background:"sideBar",open:!t,direction:"horizontal"},r.createElement(o.Flex,{flex:!0,width:56,column:!0,overflow:{vertical:"hidden"},padding:[2,0]},r.createElement(fe,{toggleSpacePanel:n}),r.createElement(o.Flex,{overflow:{vertical:"auto"},flex:!0,column:!0},r.createElement(ie,null),r.createElement(te,null))))},Ee=(0,r.memo)((function(){var e=(0,c.k)("spacePanelCollapsed"),t=(0,a.Z)(e,2),n=t[0],l=t[1],i=(0,r.useCallback)((function(){return l(!n)}),[n]);return(0,r.useLayoutEffect)((function(){var e=setTimeout((function(){return window.dispatchEvent(new Event("resize"))}),400);return function(){return clearTimeout(e)}}),[n]),r.createElement(o.Flex,null,r.createElement(L,{spacePanelCollapsed:n,toggleSpacePanel:i}),r.createElement(he,{spacePanelCollapsed:n,toggleSpacePanel:i}))}))},11060:function(e,t,n){var a=n(1702),r=Error,o=a("".replace),c=String(r("zxcasd").stack),l=/\n\s*at [^:]*:[^\n]*/,i=l.test(c);e.exports=function(e,t){if(i&&"string"==typeof e&&!r.prepareStackTrace)for(;t--;)e=o(e,l,"");return e}},5392:function(e,t,n){var a=n(68880),r=n(11060),o=n(22914),c=Error.captureStackTrace;e.exports=function(e,t,n,l){o&&(c?c(e,t):a(e,"stack",r(n,l)))}},22914:function(e,t,n){var a=n(47293),r=n(79114);e.exports=!a((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",r(1,7)),7!==e.stack)}))},58340:function(e,t,n){var a=n(70111),r=n(68880);e.exports=function(e,t){a(t)&&"cause"in t&&r(e,"cause",t.cause)}},56277:function(e,t,n){var a=n(41340);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:a(e)}},56967:function(e,t,n){"use strict";var a=n(82109),r=n(47976),o=n(79518),c=n(27674),l=n(99920),i=n(70030),s=n(68880),u=n(79114),d=n(58340),m=n(5392),p=n(20408),g=n(56277),f=n(5112)("toStringTag"),h=Error,E=[].push,v=function(e,t){var n,a=r(b,this);c?n=c(h(),a?o(this):b):(n=a?this:i(b),s(n,f,"Error")),void 0!==t&&s(n,"message",g(t)),m(n,v,n.stack,1),arguments.length>2&&d(n,arguments[2]);var l=[];return p(e,E,{that:l}),s(n,"errors",l),n};c?c(v,h):l(v,h,{name:!0});var b=v.prototype=i(h.prototype,{constructor:u(1,v),message:u(1,""),name:u(1,"AggregateError")});a({global:!0,constructor:!0,arity:2},{AggregateError:v})},9170:function(e,t,n){n(56967)},34668:function(e,t,n){"use strict";var a=n(82109),r=n(46916),o=n(19662),c=n(35005),l=n(78523),i=n(12534),s=n(20408),u=n(80612),d="No one promise resolved";a({target:"Promise",stat:!0,forced:u},{any:function(e){var t=this,n=c("AggregateError"),a=l.f(t),u=a.resolve,m=a.reject,p=i((function(){var a=o(t.resolve),c=[],l=0,i=1,p=!1;s(e,(function(e){var o=l++,s=!1;i++,r(a,t,e).then((function(e){s||p||(p=!0,u(e))}),(function(e){s||p||(s=!0,c[o]=e,--i||m(new n(c,d)))}))})),--i||m(new n(c,d))}));return p.error&&m(p.value),a.promise}})}}]); \ No newline at end of file diff --git a/web/gui/v2/282.3c11e3acb0fe23b94593.chunk.js b/web/gui/v2/282.3c11e3acb0fe23b94593.chunk.js new file mode 100644 index 00000000000000..847c6c8a9e2720 --- /dev/null +++ b/web/gui/v2/282.3c11e3acb0fe23b94593.chunk.js @@ -0,0 +1 @@ +!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7e828b84-64d2-4e3e-871d-e4b7b70e7a36",e._sentryDebugIdIdentifier="sentry-dbid-7e828b84-64d2-4e3e-871d-e4b7b70e7a36")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"bc401569f0a5aac35c96315fba57182a8ad450f2"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[282],{38282:function(e,n,t){t.r(n);t(66992),t(41539),t(88674),t(78783),t(33948);var r=t(67294),o=t(2145),a=t(64487),i=t(92501),c=t(13477),u=t(49254),l=t(39469),d=t(24533),s=t(7335),f=t(52971),g=t(85456),v=t(78266),m=(0,o.Z)((function(){return Promise.all([t.e(370),t.e(329)]).then(t.bind(t,16329))}),"Layout");n.default=(0,i.Pf)((function(){var e=(0,c.Iy)("isLoaded"),n=(0,c.Iy)("email"),t=(0,g.gs)(f.Ew.performanceCookies.id),o=(0,c.jr)(),i=(0,c.Iy)("isAnonymous"),y=(0,l.Hu)();return(0,r.useEffect)((function(){i||y()}),[i]),(0,r.useEffect)((function(){if(o&&n&&t)try{a.av({id:o,email:n})}catch(e){console.warn("Sentry: unable to set user")}}),[n,t,o]),(0,s.aG)(o),(0,l.ZP)(),(0,u.ZP)(),(0,d.ZP)(),r.createElement(r.Suspense,{fallback:r.createElement(v.Z,null)},r.createElement(m,{isUserLoaded:e}))}))},94221:function(e,n,t){t.d(n,{c:function(){return i}});t(41539),t(39714),t(66992),t(78783),t(33948),t(41637);var r=t(26398),o=t(64637),a=function(e){return window.localNetdataRegistry.mg=e.agent.mg,window.localNetdataRegistry.hostname=(0,o.lV)(e.agent.nm||"agent"),{cloudStatus:e.cloud.status,canBeClaimed:e.can_be_claimed,keyFilename:e.key_filename,claimId:e.cloud.claim_id,mg:e.agent.mg,nd:e.agent.nd,success:e.success,message:e.message}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key,t=e.token,o=e.rooms,i=e.url,c=new URLSearchParams({key:n,rooms:o,token:t,url:i}).toString();return c=n&&o&&t&&i&&c?"?".concat(c):"",r.Z.get("/api/v2/claim".concat(c),{baseURL:window.envSettings.agentApiUrl,transform:a})}},24533:function(e,n,t){t.d(n,{Hu:function(){return m},Lz:function(){return y}});t(47941),t(82526),t(57327),t(41539),t(88449),t(2490),t(59849),t(38880),t(15581),t(34514),t(54747),t(49337),t(33321),t(69070);var r=t(4942),o=t(29439),a=t(67294),i=t(4480),c=t(74059),u=t(13477),l=t(28234),d=t(94221);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 f(e){for(var n=1;n(new Date).getTime()+3600||(D((function(e){return m(m({},e),{},{loading:!0})})),(0,g.op)(v,o,r).then((function(e){var n=e.data;D(m(m({loading:!1},n),{},{error:""})),localStorage.setItem("agentJWT:".concat(o),null===n||void 0===n?void 0:n.token),localStorage.setItem("agentJWTExp:".concat(o),null===n||void 0===n?void 0:n.expiration)})).catch((function(e){var n,t=null===e||void 0===e||null===(n=e.response)||void 0===n?void 0:n.data;localStorage.removeItem("agentJWT:".concat(o)),localStorage.removeItem("agentJWTExp:".concat(o)),D({loading:!1,token:"",expiration:null,bearerProtection:!0,error:(0,s.r)(null===t||void 0===t?void 0:t.errorMsgKey)||(null===t||void 0===t?void 0:t.errorMessage)||"Something went wrong"})}))))}),[o,Z,w,e,x,R]),{token:S,bearerProtection:E,checkAgain:h,error:A}}},49254:function(e,n,t){t.d(n,{Hu:function(){return m},ej:function(){return y}});t(47941),t(82526),t(57327),t(41539),t(88449),t(2490),t(59849),t(38880),t(15581),t(34514),t(54747),t(49337),t(33321),t(69070);var r=t(4942),o=t(29439),a=t(67294),i=t(4480),c=t(74059),u=t(13477),l=t(28234),d=t(18761);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 f(e){for(var n=1;n=T.Pf;return(0,D.f)(t,"Please enter a name for the Space that is at least 5 characters.")},function(e){var t=e.length<=T.Qy;return(0,D.f)(t,"A Space's name can't exceed 20 characters.")},function(e){return R.test(e)?{isValid:!1,message:"There's an unexpected character in the Space's name. Use only alphanumberic characters (A-Z, a-z, 0-9) and spaces."}:{isValid:!0}}]),B=function(e){var t=e.value,n=e.isValid,l=e.setIsValid,c=e.charsIndicator,i=e.isDirty,s=e.handleChange,u=e.validationMessage,d=e.setValidationMessage,m=e.onKeyDown,p=(0,r.useTouchedState)({}),g=(0,a.Z)(p,2),f=g[0],h=g[1];return(0,o.useEffect)((function(){var e=_(t),a=e.isValid,o=e.messages&&e.messages.length?e.messages[0]:void 0;!n&&a?l(!0):n&&!a&&l(!1),o&&d(o)}),[n,t,f,l,d]),o.createElement(r.TextInput,{label:"Space name",name:"createWorkspace",placeholder:"Enter your Space's name",fieldMessage:"Give your Space a name that's between 5-20 characters. This cannot change.",fieldIndicator:c,value:t,touched:f,onBlur:h,onChange:s,success:n,error:!n&&u,instantFeedback:"positiveFirst",isDirty:i,onKeyDown:m})},P=function(e){var t=e.onClose,n=(0,p.s0)(),l=(0,o.useState)(!1),c=(0,a.Z)(l,2),i=c[0],s=c[1],u=(0,o.useState)(!1),d=(0,a.Z)(u,2),m=d[0],g=d[1],f=(0,r.useInputValue)({maxChars:T.Qy}),h=(0,a.Z)(f,4),v=h[0],E=h[1],b=h[2],w=h[3],x=(0,o.useState)(""),C=(0,a.Z)(x,2),k=C[0],D=C[1],R=(0,o.useCallback)((function(e){var a=e.slug;g(!1),t(),n("/spaces/".concat(a))}),[t]),_=(0,I.Z)({onSuccess:R,onError:function(){return g(!1)}}),P=(0,o.useCallback)((function(){i&&(g(!0),_({name:v}))}),[v,i]);return o.createElement(Z.u6,{right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:t},o.createElement(S.x,{onClose:t,title:"Create Space"},o.createElement(r.Button,{disabled:!i,isLoading:m,loadingLabel:"Creating",label:"Save",onClick:P})),o.createElement(F.B,null,"Create a new Space"),o.createElement(Z.TZ,null,o.createElement(B,{isDirty:w,isValid:i,setIsValid:s,value:v,handleChange:E,charsIndicator:b,validationMessage:k,setValidationMessage:D,onKeyDown:function(e){e.keyCode===y.DV&&i&&P()}})))},L=n(15257),N=n(92432),V=n(14428),W=n(97346),M=n(62289),O=n(3528),A=function(){var e=(0,O.hd)("email"),t=(0,M.Z)().handleOpenProfileModal;return"loading"===e.state||e.state.hasError?null:o.createElement(r.IconButton,{flavour:"borderless","data-testid":"open-email-notification",cursor:"pointer",width:"20px",height:"20px",onClick:function(){return t("notifications")},icon:e.contents.email?"notification_shortcut_enabled":"notification_shortcut_disabled",tooltip:"Email Notifications","data-ga":"left-sidebar::click-user-notification-settings::global-view",iconColor:"iconColor"})},z=(0,o.memo)(A),j=i.default.div.withConfig({displayName:"spaces__Separator",componentId:"sc-8de8pq-0"})(["height:1px;width:",";background:",";"],(0,r.getSizeBy)(3),(0,r.getColor)("border")),U=(0,i.default)(r.Button).withConfig({displayName:"spaces__DocButton",componentId:"sc-8de8pq-1"})(["&&{> .button-icon{width:20px;height:20px;}}"]),q=(0,i.default)(r.Button).withConfig({displayName:"spaces__ExpandButton",componentId:"sc-8de8pq-2"})(["&&{> .button-icon{width:6px;height:9px;}}"]),H={onClickOut:function(){return(0,N.L)("header-help","click-out-modal","global-view")},onCloseClick:function(){return(0,N.L)("header-help","click-close","global-view")},onOpenIssueClick:function(){return(0,N.L)("header-help","click-\u03bfpen-issue","global-view")},onContributeClick:function(){return(0,N.L)("header-help","click-contribute","global-view")},onOpenBugClick:function(){return(0,N.L)("header-help","click-bug","global-view")},onSupportClick:function(){return(0,N.L)("header-help","click-support","global-view")},onVisitDocumentClick:function(){return(0,N.L)("header-help","click-visit-doc","global-view")},onGoToDemoClick:function(){return(0,N.L)("header-help","click-go-to-demo","global-view")}},Q=function(e){var t=e.spacePanelCollapsed,n=e.toggleSpacePanel,l=(0,f.Iw)(),i=(0,f.th)(),m=(0,u.Z)(),p=(0,a.Z)(m,4),h=p[0],v=p[2],E=p[3];return o.createElement(r.Flex,{background:"sideBarMini","data-testid":"workspaceBar",padding:[3,2],column:!0,alignItems:"center",gap:6,height:"100vh",justifyContent:"between"},o.createElement(r.Flex,{column:!0,"data-testid":"workspaceBar-spaces-list",gap:4,alignItems:"center",overflow:"hidden"},o.createElement(d.Z,{"data-testid":"workspaceBar-netdataLogo"}),t&&o.createElement(q,{"data-testid":"workspaceBar-expandButton",onClick:n,icon:"chevron_right_s",neutral:!0,flavour:"borderless",small:!0}),o.createElement(r.Flex,{column:!0,"data-testid":"workspaceBar-spacesList",gap:4,overflow:{vertical:"auto"}},l.map((function(e){return o.createElement(b,{testIdPrefix:"workspaceBar-space",key:e,spaceId:e,active:e===i})}))),o.createElement(W.Z,{permission:"user:CreateSpace"},o.createElement(j,{"data-testid":"workspaceBar-separator"})),o.createElement(g.Z,{content:"Create a new Space",align:"right"},o.createElement(V.Z,{permission:"user:CreateSpace",ifForbidden:"hide",icon:"plus",onClick:v,"data-testid":"workspaceBar-addSpace-button"}))),o.createElement(r.Flex,{column:!0,"data-testid":"workspaceBar-actionsList",gap:4,alignItems:"center"},o.createElement(r.Flex,{column:!0,gap:1,alignItems:"center"},o.createElement(W.Z,{permission:"user:ChangeSpaceRoomNotifications"},o.createElement(z,null)),o.createElement(r.Documentation,(0,c.Z)({app:"cloud",demoUrl:s.Z.demoUrl},H),(function(e){return o.createElement(g.Z,{content:"Read documentation, engage with the community and let us know about features and bugs for the Agent or the Cloud",align:"right"},o.createElement(U,{neutral:!0,flavour:"borderless",icon:"question",onClick:e,"data-ga":"header-help::click-help::global-view","data-testid":"documentation-button",title:"Need help?"}))})),o.createElement(k,null)),o.createElement(L.Z,null)),h&&o.createElement(P,{onClose:E}))},Y=n(15861),G=n(64687),$=n.n(G),K=(n(9170),n(66992),n(41539),n(88674),n(34668),n(78783),n(33948),n(69826),n(31672),n(2490),n(59461),n(26699),n(32023),n(57327),n(88449),n(59849),n(15306),n(27856)),J=n(26398),X=n(18761),ee=n(97945),te=n(7335),ne=n(25819),ae=n(67622),oe=n(61458),re=n(92501),le=n(37689),ce=n(64358),ie=(0,i.default)(r.Icon).withConfig({displayName:"styled__TrashIcon",componentId:"sc-1hr9uxl-0"})(["&:hover{fill:",";opacity:0.6;}"],(0,r.getColor)("textFocus")),se=(0,i.default)(r.TextSmall).withConfig({displayName:"styled__UrlWrapper",componentId:"sc-1hr9uxl-1"})(["overflow-wrap:anywhere;"]),ue=(0,i.default)(r.Icon).withConfig({displayName:"styled__StyledIcon",componentId:"sc-1hr9uxl-2"})(["transform:",";"],(function(e){return e.right?"rotate(0)":"rotate(180deg)"})),de=function(){var e=(0,Y.Z)($().mark((function e(t,n){var a,o,r,l,c,i,s;return $().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.spaces,o=void 0===a?[]:a,r=n.id,e.next=3,(0,X.kq)(r);case 3:if(l=e.sent,!(c=l.data).length){e.next=9;break}return e.next=8,Promise.any(o.map((function(e){return J.Z.get((0,ce.W)({spaceId:e.id})).then((function(t){var n=t.data;return Promise.any(n.map((function(t){return(0,ne.Fz)({roomId:t.id,spaceId:e.id}).then((function(n){var a=n.data.find((function(e){var t=e.id;return c.includes(t)}));if(!a)throw new Error("can't find matching node");var o=window.location,r=o.protocol,l=o.host;return"".concat(r,"//").concat(l,"/spaces/").concat(e.slug,"/rooms/").concat(t.slug,"/nodes/").concat(a.id)}))})))}))}))).then((function(e){return e})).catch((function(){}));case 8:i=e.sent;case 9:if(!i){e.next=11;break}return e.abrupt("return",i);case 11:if(!(s=t.filter((function(e){return!/netdata\.cloud\//.test(e)}))).length){e.next=16;break}return e.next=15,Promise.any(s.map((function(e){var t=/^https?:\/\//.test(e)?e:"http://".concat(e);return t=t.replace(/\/+$/,""),J.Z.get("".concat(t,"/api/v1/info")).then((function(){return t}))}))).then((function(e){return e})).catch((function(){}));case 15:return e.abrupt("return",e.sent);case 16:return e.abrupt("return");case 17:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),me=function(e){/https?:\/\//.test(e)||(e="http://".concat(e)),/netdata\.cloud\//.test(e)?location.assign(e):window.open(e,"_blank")},pe=function(e){var t=e.id,n=e.selectedId,l=e.setSelectedId,c=(0,ee.bV)(t,"name"),i=(0,u.Z)(),s=(0,a.Z)(i,4),d=s[0],m=s[2],p=s[3],g=(0,te.lL)(),h=(0,ee.bV)(t,"urls"),v=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=n.openList,r=n.setSelectedId,l=(0,o.useRef)(),c=(0,f.GM)("ids"),i=(0,f.Zu)(c);return(0,o.useCallback)((0,Y.Z)($().mark((function n(){return $().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r(e),l.current){n.next=5;break}return n.next=4,de(t,{spaces:i,id:e});case 4:l.current=n.sent;case 5:if(r(),l.current){n.next=8;break}return n.abrupt("return",a());case 8:me(l.current);case 9:case"end":return n.stop()}}),n)}))),[t,i])}(t,h,{openList:m,setSelectedId:l}),E=(0,o.useCallback)((function(){d?p():v()}),[d,v]),b=n===t;return o.createElement(o.Fragment,null,o.createElement(ae.Z,{onClick:E,isSidebar:!0,padding:[1,2,1,4],testid:"visitedNodes-".concat(c),disabled:!!n&&!b,selected:b,loading:b,iconColor:"menuItem",textColor:"menuItem",Wrapper:r.TextSmall},c),d&&o.createElement(r.Flex,{column:!0,margin:[1,3],padding:[2],border:{side:"all",color:"separator"},round:2},o.createElement(r.Text,{textAlign:"center"},"We couldn't connect to any of your instances, here is the list:"),h.map((function(e){return o.createElement(ae.Z,{key:e,onClick:function(){return me(e)},isSidebar:!0,testid:"visitedNodes-node-".concat(e),actions:o.createElement(r.Flex,{flex:!1,margin:[0,0,0,1]},o.createElement(ie,{name:"trashcan",size:"small",color:"menuItem",onClick:function(n){n.stopPropagation(),g(t,e)},width:"16px",height:"16px"})),padding:[2],Wrapper:se,iconColor:"menuItem",textColor:"menuItem"},e)}))))},ge=function(){var e=(0,te.z2)(),t=(0,u.Z)(e.length>0),n=(0,a.Z)(t,2),l=n[0],c=n[1];(0,o.useEffect)((function(){l||c()}),[e.length]);var i=(0,o.useState)(""),s=(0,a.Z)(i,2),d=s[0],m=s[1],p=(0,te.H3)(d),g=(0,o.useCallback)((0,K.D)(300,(function(e){return m(e.target.value)})),[]),f=(0,o.useState)(),h=(0,a.Z)(f,2),v=h[0],E=h[1];return e.length?o.createElement(oe.Z,{isOpen:l,toggleOpen:c,label:o.createElement(r.Flex,{padding:[1,0],flex:!0,justifyContent:"between",alignItems:"center"},o.createElement(r.Flex,{alignItems:"center",gap:2},o.createElement(r.Icon,{name:"node_hollow",color:"menuItem",width:"14px",height:"14px"}),o.createElement(r.TextSmall,{color:"menuItem"},"Visited Nodes")),o.createElement(ue,{right:!l,name:"chevron_down",size:"small",color:"menuItem"})),headerTestId:"visitedNodes"},e.length>3&&o.createElement(r.Flex,{padding:[1,2,2,4]},o.createElement(le.Z,{"data-testid":"search-visited-nodes-input",onChange:g,size:"tiny"})),o.createElement(r.Flex,{padding:[0,0,2],column:!0},p.length?p.map((function(e){return o.createElement(pe,{key:e,id:e,selectedId:v,setSelectedId:E})})):o.createElement(r.Text,{padding:[3,5]},"No nodes match your search"))):null},fe=(0,o.memo)((function(){return o.createElement(re.ZP,{fallback:""},o.createElement(o.Suspense,{fallback:""},o.createElement(ge,null)))})),he=n(56662),ve=n(55917),Ee=n(33335),be=function(e){return function(t){var n=(0,f.th)();return o.createElement(e,(0,c.Z)({},t,{key:n}))}},we=n(37931),xe={isSidebar:!0,padding:[1,2,1,4],textColor:"menuItem",Wrapper:r.TextSmall},Ce=be((function(){var e=(0,Ee.gI)("room:Create"),t=(0,Ee.gI)("room:Read"),n=(0,u.Z)(t),l=(0,a.Z)(n,2),c=l[0],i=l[1],s=(0,u.Z)(!1),d=(0,a.Z)(s,4),m=d[0],p=d[2],f=d[3],h=(0,o.useCallback)((function(t){t.stopPropagation(),e&&p()}),[e]);return o.createElement(o.Fragment,null,o.createElement(oe.Z,{"data-testid":"workspaceRooms-menuList",disabled:!t,headerTestId:"workspaceRooms-warRooms",isOpen:c,label:o.createElement(r.Flex,{padding:[1,0],margin:[0,0,1,0],flex:!0,justifyContent:"between",alignItems:"center",height:"24px"},o.createElement(r.Flex,{alignItems:"center",gap:2},o.createElement(r.Icon,{name:"space_new",color:"menuItem",width:"14px",height:"14px"}),o.createElement(r.TextSmall,{color:"menuItem"},"Rooms")),o.createElement(r.Flex,{alignItems:"center",gap:2},o.createElement(g.Z,{content:"Create a new room",align:"right"},o.createElement(V.Z,{permission:"room:Create",tiny:!0,icon:"plus",onClick:h,"data-testid":"workspaceRooms-addWarRoom-button"})),o.createElement(ve.x,{right:!c,name:"chevron_down",size:"small",color:"menuItem"}))),toggleOpen:i},o.createElement(r.Flex,{column:!0,"data-testid":"workspaceRooms-warRoomsList",padding:[0,0,1]},o.createElement(we.Z,xe))),m&&o.createElement(he.U,{onClose:f,isSubmodal:!1}))})),ke=n(61152),Ie=(0,i.default)(r.Flex).attrs({alignItems:"center",justifyContent:"center",width:10,height:4,round:.5,background:"sideBarMini"}).withConfig({displayName:"styled__AdminPill",componentId:"sc-1ps23b1-0"})(["opacity:0;",":hover &{opacity:1;}"],ae.z),ye=function(e){var t=e.children,n=e.onToggle;return o.createElement(r.Flex,{justifyContent:"between",alignItems:"center"},o.createElement(r.Flex,{alignItems:"center"},t),o.createElement(r.Button,{onClick:n,icon:"chevron_left",neutral:!0,flavour:"hollow",small:!0}))},Ze=n(5795),Se=(0,i.default)(oe.g).attrs({padding:[2],color:"textLite"}).withConfig({displayName:"spacePanel__ListHeader",componentId:"sc-1275zgk-0"})([""]),Fe=function(e){return o.createElement(r.Flex,(0,c.Z)({alignItems:"center",gap:2},e),o.createElement(Ie,null,o.createElement(r.TextFemto,{strong:!0,color:"text"},"ADMIN")),o.createElement(r.Flex,{opacity:"medium"},o.createElement(r.Icon,{name:"padlock",size:"small",width:"18px",height:"18px",color:"text"})))},Te=function(e){var t=e.toggleSpacePanel,n=(0,f.OS)(),l=(0,u.Z)(),c=(0,a.Z)(l,4),i=c[0],s=c[2],d=c[3],m=(0,ke.Z)("manageInvitations"),p=(0,a.Z)(m,2)[1],g=(0,f.Q6)();return o.createElement(o.Fragment,null,i&&o.createElement(Ze.Z,{onClose:d}),o.createElement(oe.Z,{"data-testid":"spacesPanel",isOpen:!0,label:o.createElement(ye,{onToggle:t},n.name),headerTestId:"spacesPanel-activeSpaceHeader",Header:Se},o.createElement(r.Flex,{column:!0,padding:[2,0,1],"data-testid":"spacesPanel-menuList"},g?null:o.createElement(o.Fragment,null,o.createElement(C.Z,{permission:"node:Create"},(function(e){return o.createElement(ae.Z,{actions:e?null:o.createElement(Fe,{"data-testid":"adminWarning-notAdmin"}),disabled:!e,onClick:s,testid:"spacesPanel-claimNodes",icon:"nodes_hollow",iconWidth:"14px",iconHeight:"14px",padding:[1,2],gap:2,isSidebar:!0,textColor:"menuItem",iconColor:"menuItem",Wrapper:r.TextSmall},"Connect Nodes")})),o.createElement(C.Z,{permission:"space:InviteUser"},(function(e){return o.createElement(ae.Z,{actions:e?null:o.createElement(Fe,{"data-testid":"adminWarning-cannotInvite"}),disabled:!e,onClick:p,testid:"spacesPanel-inviteUsers",icon:"user",iconWidth:"14px",iconHeight:"14px",padding:[1,2],gap:2,isSidebar:!0,textColor:"menuItem",iconColor:"menuItem",Wrapper:r.TextSmall},"Invite Users")}))))))},De=function(e){var t=e.spacePanelCollapsed,n=e.toggleSpacePanel;return o.createElement(r.Collapsible,{width:56,background:"sideBar",open:!t,direction:"horizontal"},o.createElement(r.Flex,{flex:!0,width:56,column:!0,overflow:{vertical:"hidden"},padding:[2,0]},o.createElement(Te,{toggleSpacePanel:n}),o.createElement(r.Flex,{overflow:{vertical:"auto"},flex:!0,column:!0},o.createElement(Ce,null),o.createElement(fe,null))))},Re=(0,o.memo)((function(){var e=(0,l.k)("spacePanelCollapsed"),t=(0,a.Z)(e,2),n=t[0],c=t[1],i=(0,o.useCallback)((function(){return c(!n)}),[n]);return(0,o.useLayoutEffect)((function(){var e=setTimeout((function(){return window.dispatchEvent(new Event("resize"))}),400);return function(){return clearTimeout(e)}}),[n]),o.createElement(r.Flex,null,o.createElement(Q,{spacePanelCollapsed:n,toggleSpacePanel:i}),o.createElement(De,{spacePanelCollapsed:n,toggleSpacePanel:i}))}))},56662:function(e,t,n){"use strict";n.d(t,{U:function(){return p}});var a=n(29439),o=n(67294),r=n(89250),l=n(12599),c=n(15557),i=n(97323),s=n(74059),u=n(37518),d=n(16645),m=n(7693),p=function(e){var t=e.onClose,n=e.isSubmodal,p=void 0===n||n,g=(0,s.th)(),f=(0,o.useState)(""),h=(0,a.Z)(f,2),v=h[0],E=h[1],b=(0,c.useInputValue)({maxChars:255,value:""}),w=(0,a.Z)(b,3),x=w[0],C=w[1],k=w[2],I=function(e){var t=(0,r.s0)(),n=(0,s.uk)();return(0,o.useMemo)((function(){return function(a){var o=a.slug,r=(0,l.Gn)("/spaces/:spaceSlug/rooms/:roomSlug",{spaceSlug:n,roomSlug:o});e(),t(r)}}),[n])}(t),y=(0,u.Dq)(g,{onSuccess:I}),Z=(0,o.useCallback)((function(){y({name:v,description:x})}),[v,x]);return o.createElement(d.u6,{right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:t},o.createElement(m.x,{onClose:t,isSubmodal:p,title:"Create a new room"},o.createElement(c.Button,{label:"Add",onClick:Z,disabled:!v})),o.createElement(d.TZ,null,o.createElement(i.Q,{roomName:v,setRoomName:E,roomDescription:x,charsDescIndicator:k,setRoomDescription:C,isCreateForm:!0})))}},7724:function(e,t,n){"use strict";n.d(t,{CE:function(){return u},M5:function(){return m},R4:function(){return d}});var a=n(29439),o=(n(92222),n(67294)),r=n(15557),l=n(74059),c=n(46667),i=n(37518),s=n(33335),u=function(e){var t=1===e;return"Delete ".concat(e," ").concat(t?"room":"rooms")},d=function(e){return"Delete ".concat(e," room")},m=function(e){var t=e.name,n=e.roomsLength,a=e.spaceName,r=t||"".concat(n,1===n?" room":" rooms");return o.createElement(o.Fragment,null,"You are about to delete ",o.createElement("strong",null,r)," from ",o.createElement("strong",null,a)," space.",o.createElement("br",null),"This cannot be undone. Are you sure you want to continue?")};t.ZP=function(e){var t=e.id,n=e.name,u=e.navigateToParent,p=(0,l.OS)("name"),g=(0,i.tE)(t,"untouchable"),f=(0,s.gI)("room:Delete")&&!g,h=(0,i.IX)(t,{onSuccess:u}),v=(0,c.Z)(),E=(0,a.Z)(v,4),b=E[0],w=E[2],x=E[3];return f?o.createElement(o.Fragment,null,o.createElement(r.Button,{"data-testid":"manageWarRoom-delete",flavour:"hollow",onClick:w,label:"Delete room",danger:!0}),b&&o.createElement(r.ConfirmationDialog,{confirmLabel:"Yes, delete","data-ga":"delete-war-room-dialog","data-testid":"deleteWarRoomDialog",handleConfirm:h,handleDecline:x,message:o.createElement(m,{name:n,spaceName:p}),title:d(n)})):null}},97323:function(e,t,n){"use strict";n.d(t,{Q:function(){return I}});var a=n(87462),o=n(29439),r=n(45987),l=(n(24603),n(74916),n(88386),n(39714),n(82526),n(41817),n(77601),n(67294)),c=n(15557),i=n(62200),s=n(95383),u=n(37518),d=n(33335),m=n(1229),p=n(46667),g="leave-war-room-dialog",f="leaveWarRoomDialog",h=function(e){var t=e.id,n=e.name,r=e.navigateToParent,i=(0,m.IT)(t,"ids"),s=(0,u.iC)(t,{onSuccess:r}),d=(0,u.tE)(t,"untouchable"),h=(0,p.Z)(),v=(0,o.Z)(h,4),E=v[0],b=v[2],w=v[3],x=1===i.length&&!d?{"data-ga":"".concat(g,"-last-member"),"data-testid":"".concat(f,"LastMember"),message:l.createElement(l.Fragment,null,"If you leave, ",l.createElement("strong",null,n)," room will be deleted immediately.",l.createElement("br",null),"Are you sure you want to continue?"),title:"Leave and delete ".concat(n," room")}:{"data-ga":g,"data-testid":f,message:l.createElement(l.Fragment,null,"You are about to leave ",l.createElement("strong",null,n)," room.",l.createElement("br",null),"Are you sure you want to continue?"),title:"Leave ".concat(n," room")};return l.createElement(l.Fragment,null,l.createElement(c.Button,{"data-ga":"manage-war-room-tab::click-leave-war-room::manage-war-room-modal","data-testid":"manageWarRoom-leave",icon:"switch_off",flavour:"borderless",label:"Leave room",neutral:!0,padding:[0],width:"fit-content",onClick:b}),E&&l.createElement(c.ConfirmationDialog,(0,a.Z)({confirmLabel:"Yes, leave",handleConfirm:s,handleDecline:w},x)))},v=n(7724),E=n(30688),b=["charsIndicator","isDisabled","isValid","handleChange","setIsValid","setValidationMessage","validationMessage","value"],w=(0,E.A)([function(e){var t=e.length>=1;return(0,E.f)(t,"Give your room a name that's at least one character.")},function(e){var t=e.length<=20;return(0,E.f)(t,"A room's name can't exceed 20 characters.")}]),x=function(e){var t=e.charsIndicator,n=e.isDisabled,i=e.isValid,s=e.handleChange,u=e.setIsValid,d=e.setValidationMessage,m=e.validationMessage,p=e.value,g=(0,r.Z)(e,b),f=(0,c.useTouchedState)({}),h=(0,o.Z)(f,2),v=h[0],E=h[1];return(0,l.useEffect)((function(){var e=w(p),t=e.isValid,n=e.messages&&e.messages.length?e.messages[0]:void 0;!i&&t?u(!0):i&&!t&&u(!1),n&&d(n)}),[i,u,p,v,d]),l.createElement(c.TextInput,(0,a.Z)({"data-testid":"warRoomOptions-warRoomNameInput",label:"Room name",name:"createRoom",placeholder:"Enter your room's name",fieldMessage:"Tip: Use rooms to group your Nodes by their service, purpose, or location.",fieldIndicator:t,value:p,touched:v,onBlur:E,onChange:s,success:i,error:!i&&m,instantFeedback:"all",disabled:n,autoFocus:!0},g))},C=["id","navigateToParent","isCreateForm","roomName","setRoomName","roomDescription","setRoomDescription","charsDescIndicator","onSaveClick"],k=new RegExp(/^[\w\s\d]*?$/),I=function(e){var t=e.id,n=e.navigateToParent,m=e.isCreateForm,p=e.roomName,g=e.setRoomName,f=e.roomDescription,E=e.setRoomDescription,b=e.charsDescIndicator,w=e.onSaveClick,I=(0,r.Z)(e,C),y=(0,u.tE)(t),Z=(0,s.J7)(),S=(0,l.useState)(!1),F=(0,o.Z)(S,2),T=F[0],D=F[1],R=(0,l.useState)(""),_=(0,o.Z)(R,2),B=_[0],P=_[1],L=(0,l.useState)(""),N=(0,o.Z)(L,2),V=N[0],W=N[1],M=(0,c.useInputValue)({maxChars:i.v$}),O=(0,o.Z)(M,1)[0],A=(0,l.useCallback)((function(e){return g(e.target.value)}),[g]),z=!!t,j=((0,d.gI)("room:LeaveAllNodes")||!y.untouchable)&&Z.length>1&&y.isMember,U=(0,c.useTouchedState)({defaultState:!0}),q=(0,o.Z)(U,2),H=q[0],Q=q[1],Y=!y.name||p===y.name&&f===y.description;return(0,l.useEffect)((function(){W(k.test(f)&&H?"":"The description can only contain digits, letters, and spaces.")}),[H,f]),l.createElement(c.Flex,(0,a.Z)({column:!0,"data-testid":"manageWarRoom",flex:"grow",justifyContent:"between",height:"100%"},I),l.createElement(c.Flex,{column:!0,"data-testid":"manageWarRoom-settings",gap:2},l.createElement(c.Box,{"data-testid":"manageWarRoom-createRoomInputBox"},l.createElement(x,{"data-testid":"manageWarRoom-createRoomInput",value:p,handleChange:A,charsIndicator:O,validationMessage:B,setValidationMessage:P,isValid:T,setIsValid:D,isDisabled:z&&y.untouchable})),l.createElement(c.Box,{"data-testid":"manageWarRoom-descriptionInputBox"},l.createElement(c.TextInput,{"data-testid":"manageWarRoom-descriptionInput",label:"Description",name:"roomDescription",placeholder:"A room description...",instantFeedback:"positiveFirst",touched:H,onBlur:Q,fieldIndicator:b,error:""!==V&&V,success:""===V,value:f,onChange:E}))),l.createElement(c.Flex,{"data-testid":"manageWarRoom-actions"},l.createElement(c.Flex,{"data-testid":"manageWarRoom-deleteLeaveActions",gap:4},z&&j&&l.createElement(h,{id:t,name:y.name,navigateToParent:n}),z&&l.createElement(v.ZP,{id:t,name:p,navigateToParent:n})),!m&&l.createElement(c.Button,{"data-ga":"manage-war-room-tab::click-save::manage-war-room-modal","data-testid":"manageRoom-saveButton",label:"Save",onClick:w,disabled:Y,margin:[0,0,0,"auto"]})))}},61152:function(e,t,n){"use strict";var a=n(65351);t.Z=function(e,t){var n=(0,a.Z)(e,t),o=n.isModalOpen,r=n.handleOpenModal,l=n.handleCloseModal;return[o,o?l:r,r,l,n.params]}},11060:function(e,t,n){var a=n(1702),o=Error,r=a("".replace),l=String(o("zxcasd").stack),c=/\n\s*at [^:]*:[^\n]*/,i=c.test(l);e.exports=function(e,t){if(i&&"string"==typeof e&&!o.prepareStackTrace)for(;t--;)e=r(e,c,"");return e}},5392:function(e,t,n){var a=n(68880),o=n(11060),r=n(22914),l=Error.captureStackTrace;e.exports=function(e,t,n,c){r&&(l?l(e,t):a(e,"stack",o(n,c)))}},22914:function(e,t,n){var a=n(47293),o=n(79114);e.exports=!a((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",o(1,7)),7!==e.stack)}))},58340:function(e,t,n){var a=n(70111),o=n(68880);e.exports=function(e,t){a(t)&&"cause"in t&&o(e,"cause",t.cause)}},56277:function(e,t,n){var a=n(41340);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:a(e)}},56967:function(e,t,n){"use strict";var a=n(82109),o=n(47976),r=n(79518),l=n(27674),c=n(99920),i=n(70030),s=n(68880),u=n(79114),d=n(58340),m=n(5392),p=n(20408),g=n(56277),f=n(5112)("toStringTag"),h=Error,v=[].push,E=function(e,t){var n,a=o(b,this);l?n=l(h(),a?r(this):b):(n=a?this:i(b),s(n,f,"Error")),void 0!==t&&s(n,"message",g(t)),m(n,E,n.stack,1),arguments.length>2&&d(n,arguments[2]);var c=[];return p(e,v,{that:c}),s(n,"errors",c),n};l?l(E,h):c(E,h,{name:!0});var b=E.prototype=i(h.prototype,{constructor:u(1,E),message:u(1,""),name:u(1,"AggregateError")});a({global:!0,constructor:!0,arity:2},{AggregateError:E})},9170:function(e,t,n){n(56967)},34668:function(e,t,n){"use strict";var a=n(82109),o=n(46916),r=n(19662),l=n(35005),c=n(78523),i=n(12534),s=n(20408),u=n(80612),d="No one promise resolved";a({target:"Promise",stat:!0,forced:u},{any:function(e){var t=this,n=l("AggregateError"),a=c.f(t),u=a.resolve,m=a.reject,p=i((function(){var a=r(t.resolve),l=[],c=0,i=1,p=!1;s(e,(function(e){var r=c++,s=!1;i++,o(a,t,e).then((function(e){s||p||(p=!0,u(e))}),(function(e){s||p||(s=!0,l[r]=e,--i||m(new n(l,d)))}))})),--i||m(new n(l,d))}));return p.error&&m(p.value),a.promise}})}}]); \ No newline at end of file diff --git a/web/gui/v2/324.346535f0f58844b74bec.chunk.js b/web/gui/v2/324.346535f0f58844b74bec.chunk.js new file mode 100644 index 00000000000000..713aa745c73445 --- /dev/null +++ b/web/gui/v2/324.346535f0f58844b74bec.chunk.js @@ -0,0 +1 @@ +!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7fd339e2-7c63-4aaa-86b5-f44407fd2cc2",e._sentryDebugIdIdentifier="sentry-dbid-7fd339e2-7c63-4aaa-86b5-f44407fd2cc2")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"bc401569f0a5aac35c96315fba57182a8ad450f2"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[324],{80959:function(e,t,n){var r=n(87462),a=n(45987),o=n(67294),l=n(15557),i=["message","title","footer"];t.Z=function(e){var t=e.message,n=e.title,c=e.footer,u=(0,a.Z)(e,i),s=(null===u||void 0===u?void 0:u["data-testid"])||"functionError";return o.createElement(l.Flex,(0,r.Z)({alignItems:"center",column:!0,"data-testid":s,flex:!0,gap:3,justifyContent:"center",padding:[0,20]},u),o.createElement(l.H3,{"data-testid":"".concat(s,"-title")},n),o.createElement(l.TextBig,{color:"textDescription","data-testid":"".concat(s,"-message")},t),c)}},34324:function(e,t,n){n.r(t),n.d(t,{default:function(){return fr}});var r={};n.r(r),n.d(r,{base:function(){return gn},table:function(){return vn}});var a=n(29439),o=n(67294),l=n(91268),i=n(96929),c=n(3322),u=(n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(4942)),s=(n(47941),n(21249),n(57640),n(9924),n(60677)),d=n(15557),m=n(54316),f=n(46667),p=n(82351),v=n(29814),g=n(72843),b=n(37518),y=n(87462),h=(n(85827),n(25387),n(72608),n(97945)),E=n(97193),x=n(8144);function O(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 w(e){for(var t=1;t=n[0]&&t[e]<=n[1];if(!Array.isArray(n)||!n.length)return!0;var o=t[e];return"number"===typeof o?(o=parseFloat(o),n.some((function(e){return parseFloat(e)===o}))):n.includes(o)}}(o)(t,l,n)}))}},z=(0,I.CG)({key:"fnDataFiltered",get:function(e){var t=e.extraKey,n=e.roomId,r=e.omit,a=void 0===r?[]:r,o=e.keepAll,l=e.fn;return function(e){var r,i=e.get,u=null===(r=i((0,P.dz)({key:n,extraKey:"".concat(l,"Settings")})))||void 0===r?void 0:r.sortColumn,s=i((0,P.dz)({key:n,extraKey:t})),d=Object.keys(s).reduce((function(e,t){return a.includes(t)||e.push([t,s[t]]),e}),[]),m=i((0,c.tD)({id:l})),f=m.columnVisibility,p=m.data,v=m.columns;if("feed"===l||!d.length||!p)return p||[];var g=N(d);return o?p.map((function(e){return g(e,{columnVisibility:f,columns:v,sortColumn:u})?e:K(K({},e),{},{hidden:!0})})):p.filter((function(e){return g(e,{columnVisibility:f,columns:v,sortColumn:u})}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),L=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.extraKey,n=void 0===t?"fn":t,r=e.omit,a=void 0===r?[]:r,o=e.keepAll,l=void 0!==o&&o,i=(0,c.CE)({extraKey:n}),u=(0,b.UL)();return(0,I.sJ)(z({extraKey:"".concat(i||n,"Filters"),fn:i,roomId:u,omit:a,keepAll:l}))},A=(n(2707),n(6557)),R=function(e){return e.id},M={string:function(e,t){return e.localeCompare(t,void 0,{sensitivity:"accent"})},integer:function(e,t){return e-t}},B={table:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.param,r=t.columns;return Object.entries(e.reduce((function(e,t){var a,o;return e[t[n]]={count:((null===(a=e[t[n]])||void 0===a?void 0:a.count)||0)+(t.hidden?0:1),type:null===(o=r[n])||void 0===o?void 0:o.type},e}),{})).map((function(e){var t=(0,a.Z)(e,2),n=t[0],r=t[1];return{id:n,type:r.type,count:r.count}})).sort((function(e,t){return(M[e.type]||M.integer)(e.id,t.id)}))},default:n.n(A)()},_=function(e,t){return{key:e,type:t[e].filter}},V={multiselect:function(e){var t=e.param,n=e.baseKey,r=e.extraKey,a=e.filtersKey,l=e.testIdPrefix,i=e.title,u=function(e){var t=e.extraKey,n=e.filtersKey,r=e.param,a=L({extraKey:t,omit:[r],keepAll:!0}),l=(0,P.tk)(r,{extraKey:n}),i=(0,c.ZQ)({key:"type",extraKey:t}),u=B[i]||B.default,s=(0,c.ZQ)({key:"columns",extraKey:t});return(0,o.useMemo)((function(){return u(a,{param:r,columns:s})}),[r,a,l])}({param:t,extraKey:r,filtersKey:a});return u&&u.length?o.createElement(x.Z,{title:i,testIdPrefix:l,baseKey:n,extraKey:a,param:t,defaultIsOpen:!1},o.createElement(C.ZP,{param:t,baseKey:n,extraKey:a,testIdPrefix:l,collection:u,capitalized:!1,getValue:R,getLabel:R})):null},range:function(e){var t=e.param,n=e.baseKey,r=e.extraKey,l=e.filtersKey,i=e.testIdPrefix,u=e.title,s=(0,c.ZQ)({extraKey:r}).columns,m=(0,P.I0)(t,{defaultValue:[],key:n,extraKey:l}),f=(0,a.Z)(m,2),p=f[0],v=f[1];if(!s[t])return null;var g=1*s[t].range.min,b=1*s[t].range.max;return o.createElement(x.Z,{title:u,testIdPrefix:i,baseKey:n,extraKey:l,param:t,defaultIsOpen:!1},o.createElement(d.Box,{padding:[2,0],width:"100%"},o.createElement(d.MultiRangeInput,{min:g,max:b,onChange:function(e){var t=e.min,n=e.max;return v([t,n])},initMin:p[0]?1*p[0]:g,initMax:p[1]?1*p[1]:b})))}},H=function(e){var t=e.roomId,n=e.extraKey,r=(0,c.CE)({extraKey:n}),a=function(e){return k(e,_)}(n);return a.map((function(e){var a=V[e.type]||V.multiselect;return o.createElement(a,{key:e.key,title:e.key,testIdPrefix:"function",baseKey:t,extraKey:n,filtersKey:"".concat(r||n,"Filters"),param:e.key})}))},U=function(e){return e.name||e.id},W=function(e){return e.id},Q=function(e){var t=e.title,n=e.options,r=e.param,a=e.baseKey,l=e.filtersKey,i=e.testIdPrefix;return null!==n&&void 0!==n&&n.length?o.createElement(x.Z,{title:t,testIdPrefix:i,baseKey:a,extraKey:l,param:r,defaultIsOpen:!1},o.createElement(C.ZP,{param:r,baseKey:a,extraKey:l,testIdPrefix:i,collection:n,capitalized:!1,getValue:W,getLabel:U})):null},q={nodes:!0},G=function(e){var t=e.roomId,n=e.extraKey,r=(0,c.CE)({extraKey:n}),a=(0,c.Cf)(n);return a.length?a.map((function(e){return q[e.id]?null:o.createElement(Q,{key:e.id,title:e.name,options:e.options,param:e.id,testIdPrefix:"function",baseKey:t,filtersKey:"".concat(r||n,"Filters")})})):null},X=(0,o.memo)((function(e){var t=e.flavour,n=e.refetch,r=e.availableFns,a=(0,b.UL)(),l=(0,c.ZQ)({extraKey:t}),i=l.loaded,u=l.aggregations,s=l.error;return o.createElement(d.Flex,{column:!0,overflow:{vertical:"auto"},padding:[0,3,30]},"fn"===t&&o.createElement(Z,{title:"Function",testIdPrefix:"function",baseKey:a,extraKey:t,param:"selected",items:r}),o.createElement(S,{roomId:a,flavour:t}),i&&!u&&!s&&o.createElement(H,{roomId:a,extraKey:t}),i&&u&&!s&&o.createElement(G,{roomId:a,extraKey:t,onFilter:n}))})),J=n(45987),Y=(n(38862),n(32586)),$=n(76184),ee=n(52428),te=["selectedRowData","setSelectedRowData"],ne=function(e){var t=e.data;return o.createElement($.Z,{name:"Files"},o.createElement(d.Flex,{gap:1,padding:[0,1],alignItems:"center"},o.createElement(d.Box,{sx:{fontWeight:"500",letterSpacing:"1px"},as:d.Text,color:"textLite"},"{;}"),o.createElement(d.TextSmall,null,"Copy data as"),o.createElement(d.Flex,{cursor:"pointer",gap:1,onClick:(0,ee.JG)(JSON.stringify(t),{text:"JSON copied to clipboard"})},o.createElement(d.TextSmall,{color:"primary"},"json"),o.createElement(d.Icon,{color:"primary",size:"small",name:"copy"}))))},re=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return Object.entries(t).reduce((function(t,n){var o=(0,a.Z)(n,2),l=o[0],i=o[1],c=r?"".concat(r,".").concat(l):l,u=Array.isArray(i),s=u&&"object"===(0,T.Z)(i[0])&&null!==i[0];return!i||"object"!==(0,T.Z)(i)||u&&!s?[].concat((0,j.Z)(t),[[c,u?i.length>1?"[".concat(i.join(", "),"]"):i[0]:i]]):e(s?function(e){return e.reduce((function(e,t){return Object.entries(t).forEach((function(t){var n=(0,a.Z)(t,2),r=n[0],o=n[1];e[r]=[].concat((0,j.Z)(e[r]||[]),[o])})),e}),{})}(i):i,t,c)}),n)},ae=function(e){var t=e.selectedRowData,n=void 0===t?{}:t,r=e.setSelectedRowData,l=(0,J.Z)(e,te),i=(0,o.useMemo)((function(){return re(n).sort((function(e,t){var n=(0,a.Z)(e,1)[0],r=(0,a.Z)(t,1)[0];return n.localeCompare(r)}))}),[n]);return o.createElement(d.Flex,(0,y.Z)({column:!0,gap:2,overflow:{vertical:"auto"},padding:[2,3]},l),o.createElement(d.Flex,{justifyContent:"between",padding:[2,0],border:{side:"bottom",color:"borderSecondary"}},o.createElement(d.TextBig,{strong:!0},"Row info"),i.length>0&&o.createElement(d.Box,{onClick:function(){return r()},cursor:"pointer"},o.createElement(d.TextSmall,{color:"primary"},"Clear selection"))),Array.isArray(i)&&i.length?o.createElement(o.Fragment,null,i.map((function(e){var t=(0,a.Z)(e,2),n=t[0],r=t[1];return o.createElement(Y.Z,{key:n,size:"small",name:n,testId:"rightBar-rowInfoContent-".concat(n),padding:[1,0,0]},r)})),o.createElement(ne,{data:n})):o.createElement(d.Text,null,"Select a row to see raw data"))};function oe(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 le(e){for(var t=1;t div{margin:0;}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}input[type="number"]{-moz-appearance:textfield;}']),Ie=["onClose","targetRef","paramsKey"];function De(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 Ke(e){for(var t=1;t0&&j(t)},size:"tiny",type:"number",value:Z}),o.createElement(d.Text,{color:"menuItem","data-testid":"".concat(i,"-pollingInterval-units")},"seconds"))):null},Ne=n(89405),ze=function(e){var t=e.paramsKey,n=(0,c.ZQ)(t).updatedAt,r=(0,Ne.rA)(),a=r.localeTimeString,l=r.localeDateString;return o.createElement(d.TextMicro,{color:"textLite"},"Last updated: ",l(n,{long:!0})," ",a(n,{secs:!0}))},Le=s.default.div.withConfig({displayName:"reload__IconsContainer",componentId:"sc-1nbamjz-0"})(["position:relative;"]),Ae=(0,s.default)(d.Icon).withConfig({displayName:"reload__SmallIcon",componentId:"sc-1nbamjz-1"})(["position:absolute;top:3px;left:3px;"]),Re=function(e){var t=e.onRefresh,n=e.dataGa,r=e.testId,a=e.paramsKey,l=(0,c.T2)(a);return o.createElement(Le,null,o.createElement(Ae,{name:l?"playSolid":"pauseSolid",width:"8px",height:"8px",color:l?"primary":"text"}),o.createElement(d.IconButton,{"data-testid":"".concat(r,"-refreshNowBtn"),"data-ga":"".concat(n,"::click-refresh-now::functions-view"),flavour:"hollow",icon:"refresh",onClick:function(){return t({merge:!1})},disabled:l}))},Me=["onRefresh","paramsKey"],Be={fn:{dataGa:"functions-header",hasAutoRefresh:!0,Title:function(e){var t=e.name,n=e.fn,r=void 0===n?"Processes":n;return t?"".concat(r," on ").concat(t):r},TextContent:function(e){var t=e.testId;return o.createElement(o.Fragment,null,"Netdata Functions enable detailed low-level monitoring at the edge. Use this tab to execute functions on your node and see the results immediately."," ",o.createElement(he.Z,{Component:d.Text,"data-ga":"functions-header::click-docs-link::functions-view","data-testid":"".concat(t,"-docsLink"),href:"https://learn.netdata.cloud/docs/nightly/concepts/netdata-functions",target:"_blank",rel:"noopener noreferrer"},"Read the Netdata functions documentation to learn more"),".")}},feed:{dataGa:"feed-header",Title:function(){return"Events"},TextContent:function(e){var t=e.testId;return o.createElement(o.Fragment,null,"Troubleshoot faster with Netdata Events. Access topology and alert events across the war room in one convenient location."," ",o.createElement(he.Z,{Component:d.Text,"data-ga":"feed-header::click-docs-link::feed-view","data-testid":"".concat(t,"-docsLink"),href:"https://learn.netdata.cloud/docs/nightly/concepts/events-feed",target:"_blank",rel:"noopener noreferrer"},"Read the Events feed documentation to learn more"),".")}}},_e=(0,o.memo)((function(e){var t=e.onRefresh,n=e.paramsKey,r=(0,J.Z)(e,Me),l=(null===r||void 0===r?void 0:r["data-testid"])||"functionsHeader",i=(0,o.useRef)(),u=Be[n.extraKey],s=u.dataGa,m=u.hasAutoRefresh,p=u.TextContent,v=u.Title,g=(0,f.Z)(!1),b=(0,a.Z)(g,4),y=b[0],E=b[1],x=b[3],O=(0,P.c6)(n),w=(0,h.bV)(null===O||void 0===O?void 0:O[0],"name"),S=(0,c.ZQ)(n),C=S.loaded,Z=S.data,j=S.totalSize,k=(0,c.CE)(n);return o.createElement(d.Flex,{"data-testid":l,justifyContent:"between",margin:[0,0,3]},o.createElement(d.Flex,{column:!0,gap:2,"data-testid":"".concat(l,"-info"),width:{max:164}},o.createElement(d.Flex,{gap:2,alignItems:"baseline"},o.createElement(d.H1,{"data-testid":"".concat(l,"-title")},o.createElement(v,{name:w,fn:k})),C&&o.createElement(d.TextSmall,{color:"textLite",strong:!0},"(",j||(null===Z||void 0===Z?void 0:Z.length)||0," results)")),o.createElement(d.Flex,{column:!0,gap:2},o.createElement(d.Text,{"data-testid":"".concat(l,"-description"),color:"textLite"},o.createElement(p,{testId:l})))),o.createElement(d.Flex,{alignItems:"end",column:!0,gap:1},o.createElement(d.Flex,{gap:1},o.createElement(Re,{testId:l,dataGa:s,onRefresh:t,paramsKey:n}),m&&o.createElement(d.IconButton,{"data-testid":"".concat(l,"-refreshOptionsBtn"),"data-ga":"".concat(s,"::click-refresh-options::functions-view"),flavour:"hollow",icon:"chevron_down",ref:i,onClick:E}),y&&o.createElement(Fe,{"data-testid":"".concat(l,"-refreshOptions"),isOpen:y,onClose:x,targetRef:i,paramsKey:n})),o.createElement(ze,{paramsKey:n})))}),(function(e,t){return e.onRefresh===t.onRefresh})),Ve=n(41331),He=(n(88386),n(78150)),Ue=["icon","iconRotate","children","onClick","strong","testId","textAlign"],We=["description","tooltipValue","value","valueOptions"],Qe=(0,s.default)(d.Icon).attrs({color:"text",height:"16px",width:"16px"}).withConfig({displayName:"value__Arrow",componentId:"sc-1ahoh2y-0"})(["rotate:",";transition:all 200ms ease;"],(function(e){return e.rotate})),qe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=t.decimalPoints,a=void 0===r?0:r,l=t.units,i=t.defaultValue,c=(0,He.Ol)();return(0,o.useMemo)((function(){switch(n){case"number":return(0,He.Jw)(e,{decimalPoints:a,units:l,defaultValue:i});case"duration":return(0,He.kl)(e,{defaultValue:i});case"datetime":return c(e,{defaultValue:i});default:return null===e?i:e}}),[e,l])},Ge=function(e){var t=e.description,n=void 0===t?"":t,r=e.value,a=e.units,l=void 0===a?"":a;return n?o.createElement(d.Flex,{column:!0,gap:1,justifyContent:"center"},o.createElement(d.TextSmall,{color:"bright"},n),o.createElement(d.TextSmall,{strong:!0,color:"bright",textAlign:"center"},r," ",l)):"".concat(r," ").concat(l)},Xe=(0,o.forwardRef)((function(e,t){var n=e.icon,r=e.iconRotate,a=e.children,l=e.onClick,i=e.strong,c=e.testId,u=void 0===c?"cell":c,s=e.textAlign,m=(0,J.Z)(e,Ue);return o.createElement(d.Flex,(0,y.Z)({cursor:l?"pointer":"inherit",gap:.5,onClick:l,overflow:"hidden",ref:t,width:{max:"100%"}},m),n&&o.createElement(Qe,{name:n,rotate:r}),o.createElement(d.TextSmall,{"data-testid":"".concat(u,"-value"),strong:i,textAlign:s,truncate:!0,whiteSpace:"nowrap"},a))})),Je=function(e){var t=e.description,n=void 0===t?"":t,r=e.tooltipValue,a=e.value,l=e.valueOptions,i=void 0===l?{}:l,c=(0,J.Z)(e,We),u=qe(a,i);return o.createElement(p.Z,(0,y.Z)({content:o.createElement(Ge,{description:n,value:r||a,units:i.units}),"data-testid":"tableCell",isBasic:!0},c),o.createElement(Xe,null,u))},Ye=["description","maxValue","strong","type","value","valueOptions"],$e=function(e){var t=e.description,n=void 0===t?"":t,r=e.maxValue,a=e.strong,l=e.type,i=e.value,c=e.valueOptions,u=void 0===c?{}:c,s=(0,J.Z)(e,Ye),m=100*i/r,f="bar"===l,v=(null===s||void 0===s?void 0:s["data-testid"])||"progressTableCell",g=qe(i,u);return o.createElement(p.Z,{content:o.createElement(Ge,{description:n,value:i,units:u.units}),isBasic:!0,stretch:"align"},o.createElement(d.Flex,{column:!0,"data-testid":v,gap:1},!f&&o.createElement(Xe,{strong:a,testid:v},g),o.createElement(d.ProgressBar,{background:"sideBarMini",border:"none",color:["green","netdata"],containerWidth:"100%","data-testid":"".concat(v,"-bar"),height:2,width:"".concat(m,"%")})))},et=["value"],tt=function(e){var t=e.value,n=(0,J.Z)(e,et);return t=Array.isArray(t)?t:[t],o.createElement(d.Flex,{alignItems:"center",gap:1},t.map((function(e,t){return o.createElement(d.Flex,(0,y.Z)({"data-testid":"tableCell",key:"".concat(e,"-").concat(t)},n),o.createElement(d.Pill,{flavour:"neutral",color:"neutralPillColor",size:"small"},e))})))},nt=n(20686),rt=["color"],at=function(e){var t=e.hide,n=e.user;return t||!n?null:o.createElement(o.Fragment,null,o.createElement(d.TextSmall,null,"by"),o.createElement(ot,null,n))},ot=function(e){var t=e.color,n=void 0===t?"textDescription":t,r=(0,J.Z)(e,rt);return o.createElement(d.TextSmall,(0,y.Z)({color:n,strong:!0},r))},lt=function(e){var t=e.type,n=e.text,r=void 0===n?t:n,a=e.hollow,l=a?"".concat(t.toLowerCase(),"AlertsTable"):t.toLowerCase();return o.createElement(nt.Z,(0,y.Z)({type:l},a&&{border:!1}),r)},it=(0,s.default)(d.Flex).attrs({gap:1,flexWrap:!0,alignItems:"center"}).withConfig({displayName:"components__Container",componentId:"sc-1qr6qv2-0"})([""]),ct=n(79655),ut=["chart","hosts","alert"];function st(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 dt(e){for(var t=1;t0&&(n1?"rooms":"room";return o.createElement(o.Fragment,null,o.createElement(d.TextSmall,null,"on ",n),o.createElement(vt,{rooms:t}))},bt=function(e){var t=e.contexts;t.map((function(e,n){return o.createElement(o.Fragment,{key:e},n>0&&(n1?"contexts":"context";return o.createElement(d.TextSmall,null,"on ",n," ",o.createElement(bt,{contexts:t}))},ht={month:"2-digit",day:"2-digit",year:"numeric",hour:"numeric",minute:"numeric",long:!1,dateStyle:void 0},Et=function(e){var t=e.start,n=e.end,r=(0,Ne.rA)().localeDateString;if(!t||!n)return null;var a=r(new Date(t),ht),l=r(new Date(n),ht);return o.createElement(o.Fragment,null,o.createElement(d.TextSmall,null,"(scheduled ",a," - ",l,")"))},xt={"silencing-rule-created":"created","silencing-rule-deleted":"deleted","silencing-rule-changed":"changed"},Ot=function(e){var t=e.rooms,n=void 0===t?[]:t,r=e.contexts,a=void 0===r?[]:r;return n.length||a.length?o.createElement(o.Fragment,null,!!n.length&&o.createElement(gt,{rooms:n}),!!n.length&&!!a.length&&o.createElement(d.TextSmall,null,"and ",o.createElement(yt,{contexts:a}))):null},wt=function(e){var t,n=e.action,r=e.notification,a=e.user,l=e.room,i=e.context,c=((null===r||void 0===r||null===(t=r.silencing)||void 0===t?void 0:t.rule)||[])[0],u=null===a||void 0===a?void 0:a.name,s=(null===i||void 0===i?void 0:i.name)||[];return o.createElement(it,null,o.createElement(d.TextSmall,null,"Silencing rule"),o.createElement(ot,null,c.name),o.createElement(Ot,{rooms:l,contexts:s}),o.createElement(d.TextSmall,null,"was ",xt[n]),o.createElement(at,{user:u}),o.createElement(Et,c))},St=n(62200),Ct=function(e,t){var n,r;return(null===(n=e.target)||void 0===n?void 0:n[t])||(null===(r=e.target)||void 0===r?void 0:r.id)||e[t]||e.id},Zt=function(e){return Array.isArray(e)?e[0].name||e[0].id:e.name||e.id},jt=function(e){var t=e.statistics,n=(null===t||void 0===t?void 0:t.nodes)||{},r=n.live,a=n.stale,l=n.removed,i=n.total;return o.createElement(it,null,o.createElement(d.TextSmall,null,"Space statistics. Nodes:"),o.createElement(d.TextSmall,{color:St.WV.live.statusTextSmallColor},r," live"),o.createElement(d.TextSmall,null,","),o.createElement(d.TextSmall,{color:St.WV.stale.statusTextSmallColor},a," stale"),o.createElement(d.TextSmall,null,","),o.createElement(d.TextSmall,{color:St.WV.offline.statusTextSmallColor},l," removed"),o.createElement(d.TextSmall,null,","),o.createElement(d.TextSmall,{strong:!0},i," total"))},kt=(n(69810),n(86035),n(6973)),Pt=function(e){var t=e.stateColor,n=e.state;return o.createElement(o.Fragment,null,o.createElement(d.TextSmall,null,"became"),o.createElement(ot,{color:t},n))},Tt=function(e){var t=e.stateColor,n=e.state;return o.createElement(o.Fragment,null,o.createElement(d.TextSmall,null,"was"),o.createElement(ot,{color:t},n))},It={"node-created":Pt,"node-state-live":Pt,"node-state-stale":Pt,"node-state-offline":Pt,"node-removed":Tt,"node-deleted":Tt,"node-restored":Tt,default:Tt},Dt=function(e){var t,n=e.action,r=e.hosts,a=(void 0===r?[]:r)[0],l=a.id,i=a.name,c=(0,be.s0)(),u=(0,h.m3)(l),s=(0,o.useCallback)((function(){return c(u)}),[u]),m=It[n],f=n.split("-").at(-1),p=null===(t=kt.B[f])||void 0===t?void 0:t.statusTextSmallColor;return o.createElement(it,null,o.createElement(d.TextSmall,null,"Node"),o.createElement(he.Z,{Component:ot,onClick:s},i),o.createElement(m,{stateColor:p,state:f}))},Kt=function(e){var t=e.room,n=(0,b.Hm)("untouchable");return o.createElement(o.Fragment,null,o.createElement(d.TextSmall,null,"was added to",n?" room":""),o.createElement(ot,null,n?Zt(t):"this room"))},Ft=function(e){var t=e.room,n=(0,b.Hm)("untouchable");return o.createElement(o.Fragment,null,o.createElement(d.TextSmall,null,"was removed from",n?" room":""),o.createElement(ot,null,n?Zt(t):"this room"))},Nt={"room-created":function(){return o.createElement(d.TextSmall,null,"was created")},"room-deleted":function(){return o.createElement(d.TextSmall,null,"was deleted")},"room-node-added":Kt,"room-node-removed":Ft,"room-user-added":Kt,"room-user-removed":Ft},zt=function(e){var t,n=e.action,r=e.hosts,a=void 0===r?[]:r,l=e.Netdata,i=e.user,c=Nt[n],u=null===(t=a[0])||void 0===t?void 0:t.name;return o.createElement(it,null,o.createElement(d.TextSmall,null,"Node"),o.createElement(ot,null,u),o.createElement(c,{room:l.room}),o.createElement(at,{user:null===i||void 0===i?void 0:i.name}))},Lt=function(e){var t=e.action,n=e.Netdata,r=e.user,a=Nt[t];return o.createElement(it,null,o.createElement(d.TextSmall,null,"User"),o.createElement(ot,null,Ct(r,"name")),o.createElement(a,{room:n.room}),o.createElement(at,{hide:!r.target,user:r.name}))},At=function(e){var t=e.action,n=e.Netdata,r=e.user,a=Nt[t];return o.createElement(it,null,o.createElement(d.TextSmall,null,"Room"),o.createElement(ot,null,Zt(n.room)),o.createElement(a,null),o.createElement(at,{user:r.name}))},Rt={"alert-node-transition":function(e){var t=e.chart,n=e.hosts,r=e.alert,a=(0,J.Z)(e,ut);return n.map((function(e,n){var l=e.id,i=e.name,c=dt(dt({},r),{},{name:r.name[n]},r.current?{current:dt(dt({},r.current),r.current.status?{status:r.current.status[n]||r.current.status[0]}:{})}:{});return o.createElement(ft,(0,y.Z)({key:l,chart:t,nodeId:l,nodeName:i,alert:c},a))}))},"node-created":Dt,"node-state-live":Dt,"node-state-stale":Dt,"node-state-offline":Dt,"node-removed":Dt,"node-deleted":Dt,"node-restored":Dt,"agent-connected":function(e){var t=e.agentId;return o.createElement(it,null,o.createElement(d.TextSmall,null,"Agent with claim ID"),o.createElement(ot,null,t)," ",o.createElement(d.TextSmall,null,"has connected to Netdata"))},"agent-disconnected":function(e){var t=e.agentId,n=e.reason;return o.createElement(it,null,o.createElement(d.TextSmall,null,"Agent with claim ID"),o.createElement(ot,null,t),o.createElement(d.TextSmall,null,"has disconnected from Netdata with reason: \u201c",n,"\u201d"))},"agent-authenticated":function(e){var t=e.agentId;return o.createElement(it,null,o.createElement(d.TextSmall,null,"Agent with claim ID"),o.createElement(ot,null,t),o.createElement(d.TextSmall,null,"has successfully authenticated"))},"agent-authentication-failed":function(e){var t=e.agentId;return o.createElement(it,null,o.createElement(d.TextSmall,null,"Agent with claim ID"),o.createElement(ot,null,t),o.createElement(d.TextSmall,null,"has failed to authenticate"))},"room-created":At,"room-deleted":At,"room-node-added":zt,"room-node-removed":zt,"room-user-added":Lt,"room-user-removed":Lt,"space-created":function(e){var t=e.Netdata,n=e.user;return o.createElement(it,null,o.createElement(d.TextSmall,null,"Space"),o.createElement(ot,null,t.space.name||t.space.id),o.createElement(d.TextSmall,null,"was created"),o.createElement(at,{user:n.name}))},"space-statistics":jt,"space-user-added":function(e){var t=e.Netdata,n=e.user,r=((null===t||void 0===t?void 0:t.inviter)||{}).name;return o.createElement(it,null,o.createElement(d.TextSmall,null,"User"),o.createElement(ot,null,Ct(n,"name")),o.createElement(d.TextSmall,null,"was added to this space"),r&&o.createElement(o.Fragment,null,o.createElement(d.TextSmall,null,"by invite of"),o.createElement(ot,null,r)))},"space-user-changed":function(e){var t,n=e.user;if(!(null===(t=n.changes)||void 0===t||!t.roles)&&1===Object.keys(n.changes).length){var r=n.changes.roles.length>1,a=n.changes.roles.join(", ");return o.createElement(it,null,o.createElement(d.TextSmall,null,"User ",r?"roles":"role"," for"),o.createElement(ot,null,Ct(n,"name")),o.createElement(d.TextSmall,null,r?"were":"was"," changed to"),o.createElement(ot,null,a),o.createElement(at,{hide:!n.target,user:n.name}))}return o.createElement(it,null,o.createElement(d.TextSmall,null,"User"),o.createElement(ot,null,Ct(n,"name")),o.createElement(d.TextSmall,null,"was modified"))},"space-user-invited":function(e){var t=e.user;return o.createElement(it,null,o.createElement(d.TextSmall,null,"User"),o.createElement(ot,null,Ct(t,"email")),o.createElement(d.TextSmall,null,"was invited to this space"),o.createElement(at,{user:t.name}))},"space-user-removed":function(e){var t=e.user,n=(t.target||{}).name;return o.createElement(it,null,o.createElement(d.TextSmall,null,"User"),o.createElement(ot,null,Ct(t,"name")),o.createElement(d.TextSmall,null,"was removed from this space"),n&&o.createElement(at,{user:t.name}))},"space-user-uninvited":function(e){var t=e.event,n=e.user;return"space-invite-expired"===t.reason?o.createElement(it,null,o.createElement(d.TextSmall,null,"The invite for"),o.createElement(ot,null,Ct(n,"email")),o.createElement(d.TextSmall,null,"to this space has expired")):o.createElement(it,null,o.createElement(d.TextSmall,null,"User"),o.createElement(ot,null,Ct(n,"email")),o.createElement(d.TextSmall,null,"was uninvited from this space"),o.createElement(at,{hide:!n.target,user:n.name}))},"silencing-rule-created":wt,"silencing-rule-deleted":wt,"silencing-rule-changed":wt},Mt=function(e){var t=e.data,n=t.source,r=n.action,a=n.roomId,l=n.space,i=(0,ve.vu)(l.id,"slug"),c=(0,b.tE)(a,"slug"),u=Rt[r];return u?o.createElement(u,(0,y.Z)({},t.source,{spaceSlug:i,roomSlug:c})):o.createElement(it,null,o.createElement(d.Text,null,"Event")," ",o.createElement(d.Text,{strong:!0},r)," ",o.createElement(d.Text,null,"emitted"))},Bt=["value"],_t=["visualization","type","value"],Vt={bar:$e,"bar-with-integer":$e,duration:$e,pill:tt,number:Je,string:Je,feedTemplate:Mt,datetime:function(e){var t=e.value,n=(0,J.Z)(e,Bt),r=new Date(t),a=(0,Ne.rA)(),l=a.localeTimeString,i=a.localeDateString,c=isNaN(r.valueOf())?"Missing date & time":"".concat(i(r,{long:!1})," ").concat(l(r,{secs:!0}));return o.createElement(Je,(0,y.Z)({value:c},n))},value:Je},Ht={bar:$e,pill:tt,value:Je,feedTemplate:Mt},Ut=function(e){var t=e.visualization,n=e.type,r=e.value,a=(0,J.Z)(e,_t),l=Ht[t]||Vt[n]||Ht.value;return o.createElement(l,(0,y.Z)({value:r,type:n},a))},Wt=["name","sortable","sticky","units","max","maxValue","dummy","cellSize","valueOptions","summary","type","visualization"];function Qt(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 qt(e){for(var t=1;t0?[0,0,0,2.5*n.depth]:[0],strong:a,value:a&&c?"".concat(i,"x"):i,tooltipValue:a&&c?"".concat(i," ").concat(1===i?"item":"items"," associated with ").concat(r," grouping"):i,valueOptions:c?qt(qt({},v),{},{transform:"none"}):v,type:b,visualization:y})},header:o.createElement(d.Flex,{column:!0},n,u&&o.createElement(d.TextMicro,null,"(",u,")")),enableSorting:i,aggregationFn:Gt[g]||Gt.count},p),{},{meta:qt({biggestCellIndexPerColumn:null===m||void 0===m?void 0:m.index,sticky:c,styles:{verticalAlign:"middle"}},n!==l?{tooltip:l}:{})})])}),[])}),[t,r])}(m,s,Jt({},T?{}:{groupBy:C})),D=(0,c.CE)(r),K=(0,b.UL)(),F=(0,c.fg)(Jt({key:"sortColumn"},r)),N=(0,a.Z)(F,2),z=N[0],A=N[1],R=(0,c.fg)(Jt({key:"sortDirection"},r)),M=(0,a.Z)(R,2),B=M[0],_=M[1],V=(0,c.kU)(Jt({key:"query"},r)),H=(0,a.Z)(V,2),U=H[0],W=H[1],Q=(0,c.I_)(Jt({key:"columnVisibility"},r)),q=(0,P.I0)(z,{defaultValue:[],key:K,extraKey:"".concat(D,"RangeFilter")}),G=(0,a.Z)(q,2)[1],X=(0,o.useMemo)((function(){return z||f?[{id:z||f,desc:"descending"===(B||p)}]:[]}),[f,p,z,B]),Y=(0,o.useCallback)((function(e){var t=e(),n=(0,a.Z)(t,1)[0],r=(null===n||void 0===n?void 0:n.id)||r,o=null!==n&&void 0!==n&&n.desc?p||"descending":"ascending";A(r),_(o),z!==r&&G([])}),[z,G,f,p]),$=(0,o.useCallback)((function(e){Q((function(t){return Jt(Jt({},t),e())}))}),[]),ee=(0,o.useMemo)((function(){return{left:g}}),[g]),te=(0,o.useMemo)((function(){return{overscan:10,hasNextPage:h>k.length,loading:y,loadMore:function(){y||h<=k.length||l({anchor:E,merge:!0})},warning:x}}),[k.length,y]),ne=(0,o.useCallback)((function(e){var t=e.data;return i(t.json||t)}),[]);return o.createElement(Yt,{groupByColumns:O,onClickRow:ne,autoFixedColumns:!0,columnPinning:ee,columnVisibility:v,data:k,dataColumns:I,dataGa:"functions",enableColumnPinning:!!g.length,enableColumnVisibility:!T,enableCustomSearch:!T,enablePinning:!T&&!!g.length,enableResize:!0,enableSorting:!T,globalFilter:T?null:U,onColumnVisibilityChange:$,onGlobalSearchChange:T?null:W,onGroupByChange:T?null:Z,onSortingChange:T?null:Y,sortBy:X,testPrefix:n,virtualizeOptions:te,meta:$t,ref:t})})),(function(){return!0})),tn=n(18997),nn=n(4808),rn=(n(26833),n(50361)),an=n.n(rn),on=n(38609),ln=n(81732),cn=n(85672),un=["defaultSortColumn","updateEvery","merge","groupBy"],sn=["data","type","updateEvery"];function dn(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 mn(e){for(var t=1;tl.maxValue.value)&&(l.maxValue={index:n,value:i});var s=(null===l||void 0===l||null===(r=l.range)||void 0===r?void 0:r.min)||t,d=(null===l||void 0===l||null===(a=l.range)||void 0===a?void 0:a.max)||l.max||t;return l.range={min:st?d:t},e[o]=t,e}),{})}));e(mn(mn(mn(mn({},ln.Zn.table),i),{},{groupByColumns:l,data:o?(n.data||[]).concat(d):d,columns:o?(0,on.Z)(n.columns,c):c,updatedAt:(new Date).getTime(),updateEvery:a,sortedColumns:Object.values(u),sortColumn:r,sortDirection:r?c[r].sort:"descending"},s),{},{loading:!1,loaded:!0}))},gn=function(e,t){var n=t.data,r=t.type,a=t.updateEvery,o=(0,J.Z)(t,sn);e(mn(mn(mn({},ln.Zn.default),o),{},{data:n,updateEvery:a,type:r,loading:!1,loaded:!0}))};function bn(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 yn(e){for(var t=1;t0)return[{after:t,before:n},t,n];var e=Date.now();return[{after:e+1e3*t,before:e},t,n]}),[t,n])},xn=n(92501),On=(n(47042),n(26495)),wn=n(36337),Sn=n(19221),Cn=n(23148),Zn=(0,I.cn)({key:"feedChart",default:{navigation:"pan"}});function jn(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 kn(e){for(var t=1;t0&&Math.abs(d-s)<2e3||-1===s;return o.createElement(zn,(0,y.Z)({"data-testid":"chartToolbox","data-track":"chart-toolbox::hover-chart::".concat(r),"data-toolbox":"true",ref:t},l),o.createElement(Nn,{active:"pan"===v,"data-testid":"chartToolbox-pan","data-track":"chart-toolbox::pan-click::".concat(r),icon:"panTool",onClick:function(){return g("pan")},title:"Pan"}),o.createElement(Nn,{active:"highlight"===v,"data-testid":"chartToolbox-highlight","data-track":"chart-toolbox::highlight-click::".concat(r),icon:"highlightArea",onClick:function(){return g("highlight")},title:"Highlight"}),o.createElement(Nn,{active:"zoom"===v,"data-testid":"chartToolbox-zoom","data-track":"chart-toolbox::zoom-click::".concat(r),disabled:h,icon:"dragHorizontal",onClick:function(){g("zoom")},title:"Select and zoom"}),o.createElement(Nn,{"data-testid":"chartToolbox-zoomIn","data-track":"chart-toolbox::zoom-in-click::".concat(r),disabled:h,icon:"zoomIn",onClick:function(){b(1)},title:"Zoom in"}),o.createElement(Nn,{"data-testid":"chartToolbox-zoomOut","data-track":"chart-toolbox::zoom-out-click::".concat(r),icon:"zoomOut",onClick:function(){b(-1)},title:"Zoom out"}),o.createElement(Nn,{"data-testid":"chartToolbox-zoomReset","data-track":"chart-toolbox::zoom-reset-click::".concat(r),disabled:-900===s&&0===d,icon:"zoomReset",onClick:function(){m({after:-900,before:0})},title:"Zoom reset"}))}));function Mn(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 Bn(e){for(var t=1;t=1e3*cn.Kl?{callback:function(e){var t=te(e,{month:"2-digit",day:"2-digit",year:"numeric",long:!1,dateStyle:void 0}).split("/").reverse().slice(1).join("-"),n=ee(e,{secs:!1});return"".concat(t," ").concat(n)}}:{}),time:{displayFormats:{week:"yyyy-MM-dd",day:"MM-dd",hour:"MM-dd HH:mm",minute:"HH:mm",second:"HH:mm:ss"},tooltipFormat:"yyyy-MM-dd HH:mm:ss",unit:H||"second"}},M?{min:M.min,max:M.max}:{}),y:{beginAtZero:!0,ticks:{precision:0,color:(0,d.getColor)("textLite")({theme:i}),font:{size:11}}}}}}),[O,ae,Z,Y,M,B,H,oe]);if((0,o.useEffect)((function(){var e=function(e){"Shift"===e.key&&(e.preventDefault(),k(!0))};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[]),!y.length)return null;return o.createElement(d.Flex,{position:"relative",height:{min:50},onMouseEnter:G,onMouseLeave:X},q&&o.createElement(Rn,{testIdPrefix:r}),o.createElement(On.$Q,{data:{datasets:le,labels:z},onMouseDown:function(e){if(e.preventDefault(),"highlight"===Y){K(!0);var t=e.nativeEvent.offsetX||e.nativeEvent.layerX,n=l.current;n.canvas.style.cursor="crosshair",w({after:Math.round(n.scales.x.getValueForPixel(t)),before:null})}},onMouseMove:function(e){if(e.preventDefault(),"highlight"===Y&&D){var t=e.nativeEvent.offsetX||e.nativeEvent.layerX,n=l.current;w((function(e){return Bn(Bn({},e),{},{before:Math.round(n.scales.x.getValueForPixel(t))})}))}},onMouseUp:function(e){e.preventDefault(),K(!1);var t=e.nativeEvent.offsetX||e.nativeEvent.layerX,n=l.current;n.canvas.style.cursor="default",O.after===Math.round(n.scales.x.getValueForPixel(t))?w(_n):w(O)},options:ie,ref:l}))},Hn=["sorter"];function Un(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 Wn(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=(0,a.Z)(e,1)[0],n=(0,h.bV)(t,"name");return 1===e.length&&n?"on ".concat(n):"on your selected node"}(S);(0,o.useEffect)((function(){null!==O&&void 0!==O&&O.length||null===u||void 0===u||!u.length||m||w([u[0]])}),[s,O]);var F=(0,Ze.useHovered)({},[Z]),N=(0,a.Z)(F,2),z=N[0],L=N[1],A=(0,je.Z)();(0,o.useEffect)((function(){A(L)}),[L]);var R=function(e,t,n){var l=(0,ve.th)(),i=(0,b.vf)(),u=(0,c.T2)(n),s=(0,c.e6)(n),d=(0,c.mO)(n),m=(0,a.Z)(d,2),f=m[0],p=m[1],v=(0,o.useRef)();v.current=f;var g=function(e){var t=e.data,n=void 0===t?{}:t;(r[n.type]||gn)(p,n,v.current)},y=hn[t]||hn.default,E=y.fetch,x=y.isEnabled,O=En(),w=(0,a.Z)(O,3),S=w[0],C=w[1],Z=w[2],j=(0,o.useRef)();j.current=S;var k=(0,b.UL)(),T=(0,P.by)(null,{key:k,extraKey:"".concat(t||n.extraKey,"Filters")}),I=(0,h.Xw)(e),D=(0,Ce.zp)(),K=(0,a.Z)(D,1)[0].loading;return(0,tn.Z)((function(){return{enabled:!K&&x({nodeIds:e,fn:t,roomId:k}),fetch:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return E(yn(yn(yn({roomId:k,spaceId:l,nodeIds:e,cloudNodeIds:I,fn:t,roomSlug:i},T),j.current),n))},onStart:function(){return p({loading:!0})},onFail:function(e){var t;null!==(t=e)&&void 0!==t&&null!==(t=t.response)&&void 0!==t&&t.data&&(e=e.response.data),p({error:e,loading:!1,loaded:!0})},onReceive:g,polling:u||!1,pollingOptions:{pollingInterval:1e3*(s||f.updateEvery),shouldPause:!0},force:!0}}),[k,null===e||void 0===e?void 0:e.length,null===e||void 0===e?void 0:e[0],t,u,u&&s,"feed"===t&&T,C,Z])}(S,O[0],n);if(!Z||!s)return o.createElement(pe.Z,{title:g,"data-testid":"".concat(i,"Loading")});if(m)return o.createElement(xn.NY,{title:"Functions couldn't be loaded",message:"We couldn't find any available functions."});if(k&&"canceled"!==k)return"ErrNodeResourceNotFound"===(null===k||void 0===k?void 0:k.errorMsgKey)?o.createElement(Ee.Z,{message:"Please review your selection and try again.",title:"".concat("feed"===n.extraKey?"Events are":'Function "'.concat(O,' is"')," not available ").concat(K,".")}):o.createElement(xn.NY,{title:"".concat("feed"===n.extraKey?"Events":"Functions"," couldn't be loaded"),message:"ErrForbidden"===(null===k||void 0===k?void 0:k.errorMsgKey)?"Forbidden":""});var M=$n[T]||$n.table;return o.createElement(d.Box,{overflow:{horizontal:"hidden",vertical:"auto"},column:!0,padding:[4,4,0],gap:2},o.createElement(_e,{nodeIds:S,onRefresh:R,paramsKey:n}),o.createElement(v,{paramsKey:n,testIdPrefix:i,defaultCharts:D}),Z&&null!==j&&void 0!==j&&j.length?o.createElement(M,(0,y.Z)({"data-testid":"".concat(i,"Component"),paramsKey:n,refetch:R,ref:z},f)):o.createElement(d.Flex,{column:!0,justifyContent:"center",alignItems:"center",alignSelf:"center",margin:["feed"===n.extraKey?3:30,0,0],gap:3},o.createElement(d.H3,null,"No results to display"),o.createElement(d.Text,{color:"textDescription",textAlign:"center"},"Double-check your search or filters and dates and try again with different conditions"),I&&o.createElement(d.Text,{color:"text",textAlign:"center"},I)))})),tr=er,nr=n(24533),rr=["paramsKey","hasError","refreshAvailableFns","availableFnsLoaded"];function ar(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 or(e){for(var t=1;t span:hover{color:",";}"],(0,d.getSizeBy)(1.5),(0,d.getSizeBy)(2),(0,d.getColor)("textLite")),w=(0,h.default)(d.Flex).attrs((function(e){return{color:e.isSelected?"primary":"text",margin:[2,6,0]}})).withConfig({displayName:"styled__StyledCustomTimePeriod",componentId:"sc-gwjt9o-2"})(["cursor:pointer;&:first-of-type{margin-top:0;}&:hover{color:",";}"],(0,d.getColor)("textLite")),E=(0,h.default)(d.Flex).attrs({alignItems:"center",border:{side:"all",color:"border"},color:"text",flexWrap:!1,height:8,justifyContent:"center",padding:[2,0],round:1,width:22}).withConfig({displayName:"styled__TimePeriodDropdownButton",componentId:"sc-gwjt9o-3"})([""]),x=(0,h.default)(d.Drop).attrs({background:"mainBackground",column:!0,overflow:{vertical:"auto"},margin:[.5,0,0],padding:[2,0],round:1}).withConfig({displayName:"styled__TimePeriodDrop",componentId:"sc-gwjt9o-4"})([""]),k=(0,h.default)(d.Icon).withConfig({displayName:"styled__DropdownIcon",componentId:"sc-gwjt9o-5"})(["fill:",";width:12px;height:12px;"],(0,d.getColor)("text")),C=h.default.input.withConfig({displayName:"styled__CustomInput",componentId:"sc-gwjt9o-6"})(["border:1px solid ",";background:",";box-sizing:border-box;border-radius:4px;color:",";height:32px;margin-left:10px;margin-right:10px;outline:none;padding:4px;width:32px;&:focus{border:1px solid ",";}"],(0,d.getColor)("border"),(0,d.getColor)("mainBackground"),(0,d.getColor)("text"),(0,d.getColor)("primary")),O=(0,h.default)(d.Drop).attrs({background:"dropdown",round:2,margin:[.5,0,0],border:{side:"all",color:"borderSecondary"},animation:!0}).withConfig({displayName:"styled__StyledDrop",componentId:"sc-gwjt9o-7"})([""]),S=(0,h.default)(d.TextInput).withConfig({displayName:"styled__StyledDateInput",componentId:"sc-gwjt9o-8"})(["margin-left:20px;margin-right:20px;"]),Z=h.default.div.withConfig({displayName:"styled__StyledCalendar",componentId:"sc-gwjt9o-9"})(["background:",";border:0;&.react-datepicker{background:",";border:0;}.react-datepicker{&__navigation{top:8px;&-icon::before{border-color:",";}}&__month-container{height:260px;}&__header{background:",";border:0;.react-datepicker__current-month{color:",";font-weight:normal;}.react-datepicker__day-name{color:",";}}&__day{color:",";&:hover{background:",";}&--disabled{color:",";&:hover{background:inherit;}}&--keyboard-selected,&--keyboard-selected:hover{color:",";background:inherit;border-radius:inherit;}&--selected,&--selected:hover{color:",";background:",";border-radius:8px;}&--in-selecting-range,&--in-range{color:",";background:",";border-radius:0;}&--selecting-range-start,&--range-start{color:",";background:",";border-top-left-radius:8px;border-bottom-left-radius:8px;&:hover{color:",";background:",";border-radius:0;border-top-left-radius:8px;border-bottom-left-radius:8px;}}&--selecting-range-end,&--range-end{color:",";background:",";border-top-right-radius:8px;border-bottom-right-radius:8px;&:hover{color:",";background:",";border-top-right-radius:8px;border-bottom-right-radius:8px;}}}}"],(0,d.getColor)("dropdown"),(0,d.getColor)("dropdown"),(0,d.getColor)("text"),(0,d.getColor)("dropdown"),(0,d.getColor)("main"),(0,d.getColor)("textLite"),(0,d.getColor)("main"),(0,d.getColor)("elementBackground"),(0,d.getColor)("textLite"),(0,d.getColor)("main"),(0,d.getColor)("bright"),(0,d.getColor)("primary"),(0,d.getColor)("primary"),(0,d.getColor)("elementBackground"),(0,d.getColor)("bright"),(0,d.getColor)("primary"),(0,d.getColor)("bright"),(0,d.getRgbColor)(["green","netdata"],.8),(0,d.getColor)("bright"),(0,d.getColor)("primary"),(0,d.getColor)("bright"),(0,d.getRgbColor)(["green","netdata"],.8)),P=function(e){var t=e.value,n=e.period,r=e.resolution,o=e.isSelected,a=e.setTimeRange,c=e.tagging,l=(0,i.useCallback)((function(){return a(t,r)}),[t,r]);return i.createElement(y,{key:t,onClick:l,"data-ga":"date-picker::click-quick-selector::".concat(c,"::").concat(-t),"data-testid":"timePeriod-value"},i.createElement(d.Text,{color:o?"primary":"text"},n))},I=(0,i.memo)(P),j=(n(39714),n(83112),n(66528),n(29422)),D=n(99982),T=n(49546),N=n(38431),_=n(76417),F=n(936),M=60,A=3600,L=86400,B=["minutes","hours","days","months"],R={minutes:M,hours:A,days:L,months:2592e3},z=function(e,t){return Math.round(e/R[t])},V=function(e,t){var n=(0,j.Z)(new Date(0),(0,g.Z)({},t,e));return-(0,D.Z)(n)},U={startDate:"start",endDate:"finish"},H=[{period:"Last 5 minutes",value:-300,resolution:"minutes"},{period:"Last 10 minutes",value:-600,resolution:"minutes"},{period:"Last 15 minutes",value:-900,resolution:"minutes"},{period:"Last 30 minutes",value:-1800,resolution:"minutes"},{period:"Last hour",value:-3600,resolution:"hours"},{period:"Last 2 hours",value:-7200,resolution:"hours"},{period:"Last 6 hours",value:-21600,resolution:"hours"},{period:"Last 12 hours",value:-43200,resolution:"hours"},{period:"Last day",value:-L,resolution:"days"},{period:"Last 2 days",value:-2*L,resolution:"days"},{period:"Last 7 days",value:-7*L,resolution:"days"}],W=function(e,t){var n=(0,N.Z)(e,"MMMM d yyyy, H:mm")?e:(0,_.default)(e,"MMMM d yyyy, H:mm",Date.now());return(0,_.default)("".concat(n," ").concat(function(e){if(!e)return"+00:00";var t=e.toString().split("."),n=t[0]>0?"+":"-",r=Math.abs(t[0]).toString(),o="".concat(n).concat(r.padStart(2,0));return t.length>1?"".concat(o,":").concat(String(.6*t[1]).padEnd(2,0)):"".concat(o,":00")}(t)),"MMMM d yyyy, H:mm xxx",Date.now())},G=function(e){var t=e.handleTimePeriodChange,n=e.selectedDate,r=e.tagging;return i.createElement(d.Flex,{column:!0,justifyContent:"start",alignItems:"start",height:{max:"260px"},overflow:{vertical:"auto"},"data-testid":"timePeriods"},H.map((function(e){var o=e.period,a=e.value,c=e.resolution;return i.createElement(I,{key:a,value:a,period:o,resolution:c,setTimeRange:t,isSelected:n===a,tagging:r})})))},Y=(n(9653),n(33161),n(12274)),K=function(e){var t=e.customTimePeriodRef,n=e.handleTimePeriodChange,r=e.value,a=e.resolution,c=e.tagging,l=function(){return r<=0?z(-r,a):0},u=(0,i.useState)(l),s=(0,o.Z)(u,2),m=s[0],p=s[1],h=(0,f.Z)(),v=(0,o.Z)(h,4),b=v[0],y=v[1],O=v[3],S=(0,i.useRef)();(0,i.useEffect)((function(){return p(l())}),[r]);var Z=(0,i.useCallback)((function(e){return p(e.target.value)}),[]),P=(0,i.useCallback)((function(e){var t=Number(e.currentTarget.value),o=!Number.isNaN(t)&&Number.isInteger(t)&&t>0,i=(0,j.Z)(new Date(0),(0,g.Z)({},a,t));return o&&(0,Y.default)(i)&&(0,D.Z)(i)<=94694400?n(V(t,a),a):p(r<=0?z(-r,a):0)}),[a,m]),I=(0,i.useCallback)((function(e){return function(){n(V(m,e),e),O()}}),[m]);return i.createElement(d.Flex,{justifyContent:"start",alignItems:"center",height:8,"data-ga":"date-picker::click-last-integer::".concat(c),"data-testid":"customTimePeriod"},i.createElement(d.Text,{"data-testid":"customTimePeriod-label"},"Last"),i.createElement(C,{value:m,onChange:Z,onBlur:P,"data-ga":"date-picker::click-last-integer::".concat(c,"::").concat(m),"data-testid":"timePeriod-timeInput"}),i.createElement(E,{"data-testid":"timePeriodDropdown-button",onClick:y,ref:S},i.createElement(d.Text,{"data-testid":"timePeriodDropdown-buttonLabel",padding:[0,4,0,0]},a),i.createElement(k,{"data-testid":"timePeriodDropdown-buttonIcon",name:"triangle_down"})),S.current&&b&&i.createElement(x,{align:{top:"bottom",left:"left"},animation:!0,close:O,"data-testid":"timePeriodDropdown",onClickOutside:O,onEsc:O,ref:t,target:S.current},B.map((function(e){return i.createElement(w,{key:e,onClick:I(e),"data-ga":"date-picker::click-last-time-".concat(e,"::").concat(c),"data-testid":"timePeriod-option"},e)}))))},J=n(313),q=n(89405),Q=n(9198),$=n.n(Q),X=(n(59061),function(e){var t=e.selected,n=e.selectsStart,r=void 0!==n&&n,o=e.selectsEnd,a=void 0!==o&&o,c=e.startDate,l=e.endDate,u=e.onChange,s=e.minDate,d=e.maxDate,m=e.dateFormat,f=void 0===m?"MM/dd/yyyy":m,p=e.open,g=void 0!==p&&p,h=e.startOpen,v=void 0!==h&&h,b=e.inline,y=void 0!==b&&b,w=e.selectsRange,E=void 0!==w&&w,x=e.monthsShown,k=void 0===x?1:x,C=e.showPopperArrow,O=void 0===C||C,S=e.calendarContainer,Z=void 0===S?null:S;return i.createElement($(),{selected:t,onChange:u,selectsStart:r,selectsEnd:a,startDate:c,endDate:l,minDate:s,maxDate:d,dateFormat:f,open:g,startOpen:v,inline:y,selectsRange:E,monthsShown:k,showPopperArrow:O,calendarContainer:Z})}),ee=function(e){var t=e.name,n=void 0===t?"":t,r=e.value,a=void 0===r?"":r,c=e.onDatesChange,u=e.onFocus,s=e.placeholderText,d=void 0===s?"":s,m=(0,q.rA)().utcOffset,f=(0,i.useState)(""),p=(0,o.Z)(f,2),g=p[0],h=p[1],v=(0,i.useCallback)((function(e){var t=e.target.value;h(t)}),[]),b=(0,i.useCallback)((function(e){if((0,Y.default)(e)){var t=(0,T.default)(e,"MMMM d yyyy, H:mm");h(t)}}),[]),y=(0,i.useCallback)((function(e){var t=W(e.target.value,m);if((0,Y.default)(t)&&(0,l.default)(t)>0){var n=(0,l.default)(t);c(n,(function(){return b(a)}))}else b(a)}),[a,m]);return(0,i.useEffect)((function(){return b(a)}),[a]),i.createElement(S,{type:"text",name:n,value:a?g:d,onChange:v,onBlur:y,onFocus:u,placeholder:d,"data-testid":"datePicker-input"})},te=n(19013),ne=function(){var e=(0,q.rA)(),t=e.localeTimeString,n=e.localeDateString;return(0,i.useCallback)((function(e){return"".concat(n(e,{locale:"en-us",long:!1})," ").concat(t(e,{locale:"en-us",secs:!1}))}),[t,n])},re=function(e,t){return e>0?(0,te.default)(new Date(t(e))):e||0===e?(0,te.default)(new Date(t((new Date).valueOf()+1e3*e))):null},oe=function(e){var t=ne();return(0,i.useMemo)((function(){return re(e,t)}),[e])},ae=function(e,t){return[oe(e),oe(t)]};function ie(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}var ce=function(e){var t=e.startDate,n=e.setStartDate,a=e.endDate,c=e.setEndDate,u=e.singleDate,s=e.onDatesChange,m=e.onInputFocus,f=e.onlyDates,p=e.maxDate,h=void 0===p?new Date:p,v=e.minDate,b=void 0===v?new Date("1/1/2018"):v,y=e.isSinglePicker,w=ae(t,a),E=(0,o.Z)(w,2),x=E[0],k=E[1],C=oe(u),O=(0,q.rA)().utcOffset,S=ne(),P=(0,i.useCallback)((function(e,t){return(0,J.default)(re(e,S),k)?n(e):t()}),[a,S]),I=(0,i.useCallback)((function(e,t){return(0,J.default)(x,re(e,S))?c(e):t()}),[t,S]),j=(0,i.useCallback)((function(e){var t=Array.isArray(e)?e[0]:e,n=Array.isArray(e)?e[1]:null,r=t?W((0,T.default)(t,"MMMM d yyyy, H:mm"),O):t,o=n?W((0,T.default)(n,"MMMM d yyyy, H:mm"),O):n,a=(0,l.default)(r)||null,i=(0,l.default)(o)||null;s(function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{}).onlyDates?"MMMM d yyyy":"MMMM d yyyy, H:mm:ss";return{formattedStartDate:(0,T.default)(e,n),formattedEndDate:(0,T.default)(t,n)}}(u,s,{onlyDates:r})}),[u,s]),f=m.formattedStartDate,p=m.formattedEndDate,g=(0,i.useMemo)((function(){return function(e,t){return(0,F.Z)((0,l.default)(e),(0,l.default)(t))}(u,s)}),[u,s]);return i.createElement(d.Flex,{alignItems:"center",gap:2},i.createElement(d.Flex,{alignItems:"center",justifyContent:"center",gap:1.5},i.createElement(d.TextSmall,{strong:!0,whiteSpace:"nowrap"},"From"),i.createElement(d.TextSmall,{whiteSpace:"nowrap","data-testid":"periodIndication-from"},f)),i.createElement(d.Icon,{name:"arrow_left",size:"small",color:"textLite",rotate:2}),i.createElement(d.Flex,{alignItems:"center",justifyContent:"center",gap:1.5},i.createElement(d.TextSmall,{strong:!0,whiteSpace:"nowrap"},"To"),i.createElement(d.TextSmall,{whiteSpace:"nowrap","data-testid":"periodIndication-to"},p)),i.createElement(d.Flex,{alignItems:"center",justifyContent:"center",gap:2},i.createElement(d.TextSmall,{whiteSpace:"nowrap"},"/"),i.createElement(d.TextSmall,{color:"textLite",whiteSpace:"nowrap","data-testid":"periodIndication-period"},g)))},ue=n(2379),se=(n(85827),n(26699),n(3151)),de=n(33926),me=36e5,fe=864e5,pe=2592e6,ge=[{key:"years",value:31104e6,unit:"y"},{key:"months",value:pe,unit:"m"},{key:"days",value:fe,unit:"d"},{key:"hours",value:me,unit:"h"},{key:"minutes",value:6e4,unit:"min"},{key:"seconds",value:1e3,unit:"s"}],he=["hours","minutes","seconds"],ve=function(e){var t=e.placeholder,n=void 0===t?"No date":t;return i.createElement(d.TextSmall,null,n)},be=function(e){var t=e.isPlaying,n=e.startDate,r=e.endDate,o=e.isSameDate,a=e.color,c=e.onlyDates,l=(0,q.rA)(),u=l.localeTimeString,s=l.localeDateString,m=a||(t?"accent":"textFocus");return i.createElement(d.Flex,{gap:2},i.createElement(d.TextSmall,{color:a,whiteSpace:"nowrap"},s(n,{long:!1}),!c&&i.createElement(i.Fragment,null," ","\u2022"," ",i.createElement(d.TextSmall,{color:m,whiteSpace:"nowrap"},u(n,{secs:!1})))),c&&!o&&i.createElement(i.Fragment,null,i.createElement(d.Icon,{name:"arrow_left",color:m,size:"small",rotate:2}),i.createElement(d.TextSmall,{color:a,whiteSpace:"nowrap"},!o&&s(r,{long:!1}),!c&&i.createElement(i.Fragment,null," ","\u2022"," ",i.createElement(d.TextSmall,{color:m,whiteSpace:"nowrap"},u(r,{secs:!1}))))))},ye=function(e){var t=e.isPlaying,n=e.duration,r=e.color,o=e.fluid,a=void 0!==o&&o;return i.createElement(d.Flex,{gap:1,align:"center"},i.createElement(d.TextSmall,{color:r},"\u2022"),i.createElement(d.Flex,{width:a?"auto":5},t&&i.createElement(d.TextSmall,{color:r},"last")),i.createElement(d.TextSmall,{color:r},n))},we=n(82351),Ee=(0,h.default)(d.Flex).withConfig({displayName:"styled__Container",componentId:"sc-1s7311w-0"})(["cursor:pointer;&:hover *{color:",";fill:",";}"],(0,d.getColor)("textLite"),(0,d.getColor)("textLite")),xe=(0,h.default)(we.Z).withConfig({displayName:"styled__StyledTooltip",componentId:"sc-1s7311w-1"})(["pointer-events:",";"],(function(e){return e.isDisabled?"none":"auto"})),ke=["onClick","start","end","isPlaying","isPickerOpen","tagging","color","fluid","onlyDates","tooltipContent","isSinglePicker","noDateSelected"],Ce=(0,i.forwardRef)((function(e,t){var n=e.onClick,c=e.start,l=e.end,u=e.isPlaying,s=e.isPickerOpen,d=e.tagging,m=e.color,f=e.fluid,p=e.onlyDates,g=e.tooltipContent,h=e.isSinglePicker,v=e.noDateSelected,b=(0,a.Z)(e,ke),y=(0,ue.I)(),w=(0,i.useMemo)((function(){if(v)return[];var e=function(e){return e<0?(0,j.Z)(new Date,{seconds:e}):new Date(e)}(c),t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e?new Date(e):new Date}(l),n=function(e,t){return(0,se.default)(e,t)}(e,t);return[e,t,n]}),[c,l,v]),E=(0,o.Z)(w,3),x=E[0],k=E[1],C=E[2],O=(0,i.useMemo)((function(){return v?0:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.withSeconds,r=void 0!==n&&n,o=t.withTime,a=void 0===o||o,i=r||!!e.seconds;return ge.reduce((function(t,n){var r=n.key,o=n.unit;return"seconds"!==r||i?!a&&he.includes(r)?t:e[r]?t?"".concat(t," ").concat(e[r]).concat(o):"".concat(e[r]).concat(o):t:t}),"")}(function(e,t){return(0,de.Z)({start:e,end:t})}(x,k),{withTime:!p})}),[u,x,k,v]);return i.createElement(xe,{content:s?function(){}:g||"Select a predefined or a custom timeframe",align:"bottom",isDisabled:!n||y,plain:!0},i.createElement(Ee,(0,r.Z)({alignItems:"center",justifyContent:"center",gap:1,height:"100%",onClick:n,padding:[0,1],ref:t,"data-ga":"date-picker::click-time::".concat(d),"data-testid":"datePicker-accessorElement"},b),h&&v?i.createElement(ve,null):i.createElement(be,{isPlaying:u,endDate:k,startDate:x,isSameDate:C,color:m,onlyDates:p}),!p&&!h&&!v&&i.createElement(ye,{isPlaying:u,duration:O,color:m,fluid:f})))})),Oe=Ce,Se=n(95248),Ze=(n(32023),n(89211)),Pe=n(67622),Ie=n(37689),je=n(92517),De=(0,h.default)(d.Drop).attrs({align:{top:"bottom",left:"left"},animation:!0,background:"dropdown",column:!0,margin:[.5,0,0],overflow:{vertical:"auto"},padding:[2,0],round:1,width:80}).withConfig({displayName:"dropdown__Dropdown",componentId:"sc-pg99kg-0"})([""]),Te=(0,h.default)(d.Flex).attrs({column:!0,padding:[2,0,0],overflow:{vertical:"auto"},height:{max:"320px"}}).withConfig({displayName:"container__Container",componentId:"sc-1gtygg6-0"})([""]),Ne=(0,h.default)(d.Flex).attrs({justifyContent:"between",alignItems:"center",width:"100%",gap:2}).withConfig({displayName:"wrapper__Wrapper",componentId:"sc-1ehauu1-0"})([""]),_e=function(e){var t=e.name,n=e.offset,r=e.utc,o=e.onSelect,a=(0,i.useCallback)((function(){return o(r,n,t)}),[r,t]);return i.createElement(Pe.Z,{round:1,onClick:a,Wrapper:Ne,"data-ga":"timezone-picker::click-timezone::global-view::".concat(t)},i.createElement(d.Text,{color:"text"},t),i.createElement(d.Text,{color:"textLite",whiteSpace:"nowrap"},"UTC ",n))},Fe=n(14600),Me=function(e){var t=e.value,n=e.onChange,r=e.timezoneRef,a=e.timezoneName,c=(0,i.useState)(""),l=(0,o.Z)(c,2),u=l[0],s=l[1],m=(0,Ze.Z)(),f=(0,o.Z)(m,2),p=f[0],g=f[1],h=(0,i.useRef)(),v=(0,i.useRef)();(0,i.useEffect)((function(){v.current&&p&&v.current.focus()}),[p]);var b=(0,i.useMemo)((function(){return u?Fe.K.filter((function(e){var t=e.text,n=e.offset;return t.toUpperCase().includes(u.toUpperCase())||n.includes(u)})):Fe.K}),[u]),y=function(){g(!1),s("")},w=(0,i.useCallback)((function(e,t,r){n(e,t,r),y()}),[]),E=(0,i.useCallback)((function(e){return s(e.target.value)}),[]);return i.createElement(je.Z,{hasBorder:!1,testId:"timezone-picker"},i.createElement(Pe.Z,{round:1,onClick:g,ref:h,Wrapper:Ne,padding:[2],"data-ga":"timezone-picker::click-picker::global-view",selected:!0},i.createElement(d.Flex,{gap:1},i.createElement(d.Text,{color:"text",whiteSpace:"nowrap"},a," UTC ",t)),i.createElement(d.Icon,{name:"chevron_down",color:"text",width:"12px",height:"12px"})),h.current&&p&&i.createElement(De,{onClickOutside:y,onEsc:y,ref:r,target:h.current},i.createElement(d.Box,{padding:[0,2]},i.createElement(Ie.Z,{value:u,onChange:E,ref:v,"data-ga":"timezone-picker::click-search::global-view"})),i.createElement(Te,null,b.map((function(e){var t=e.text,n=e.offset,r=e.utc;return i.createElement(_e,{key:t,name:t,offset:n,utc:r[0],onSelect:w})})))))},Ae=function(e){var t=e.timezoneRef,n=(0,Se.I0)(),r=(0,o.Z)(n,2),a=r[0],c=a.offset,l=a.timezoneName,u=r[1],s=(0,i.useCallback)((function(e,t,n){return u({utc:e,offset:t,timezoneName:n})}),[]);return i.createElement(Me,{timezoneRef:t,timezoneName:l,value:c,onChange:s})},Le=(n(68216),n(79433),["mousedown","touchstart"]),Be=n(91128),Re=["onChange","isSinglePicker","values","defaultValue","tagging","isPlaying","onlyDates","accessorProps","maxDate","minDate","accessorTooltipContent"],ze=function(e){var t=e.onChange,n=e.isSinglePicker,g=e.values,h=void 0===g?{}:g,v=h.start,y=h.end,w=h.singleDate,E=e.defaultValue,x=void 0===E?-900:E,k=e.tagging,C=void 0===k?"":k,S=e.isPlaying,Z=e.onlyDates,P=e.accessorProps,I=void 0===P?{}:P,j=e.maxDate,D=e.minDate,T=e.accessorTooltipContent,N=(0,a.Z)(e,Re),_=(0,i.useState)(w),F=(0,o.Z)(_,2),M=F[0],A=F[1],L=(0,i.useState)(v),B=(0,o.Z)(L,2),R=B[0],z=B[1],V=(0,i.useState)(v),H=(0,o.Z)(V,2),W=H[0],Y=H[1],J=(0,p.Z)("resolution","minutes"),q=(0,o.Z)(J,2),Q=q[0],$=q[1],X=(0,i.useState)("startDate"),ee=(0,o.Z)(X,2),te=ee[0],ne=ee[1],re=(0,f.Z)(),oe=(0,o.Z)(re,4),ae=oe[0],ie=oe[1],ue=oe[3],se=(0,i.useRef)(),de=(0,i.useState)(null),me=(0,o.Z)(de,2),fe=me[0],pe=me[1],ge=(0,i.useState)(null),he=(0,o.Z)(ge,2),ve=he[0],be=he[1],ye=(0,i.useState)(null),we=(0,o.Z)(ye,2),Ee=we[0],xe=we[1],ke=(0,Be.Z)();!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le,n=arguments.length>2?arguments[2]:void 0,r=(0,i.useRef)();(0,i.useEffect)((function(){var o=function(t){Array.isArray(n)?n.every((function(e){return!e||!e.contains(t.target)}))&&e():r.current&&!r.current.contains(t.target)&&e()};return t.forEach((function(e){return document.addEventListener(e,o)})),function(){t.forEach((function(e){return document.removeEventListener(e,o)}))}}),[r,e,n])}(ue,["mouseup","touchend"],[fe,ve,Ee,se.current]),(0,c.Z)((function(){ke(!!ae)}),[ae]);var Ce=(0,i.useCallback)((function(e){var t=e.startDate,n=e.endDate;z(t),Y(n)}),[]);(0,i.useEffect)((function(){Ce({startDate:v,endDate:y})}),[v,y]);var Se=(0,i.useCallback)((function(){n?(A(w),ue()):Ce({startDate:x,endDate:0})}),[n]),Ze=(0,i.useCallback)((function(e){e.target.name&&ne(e.target.name)}),[]),Pe=(0,i.useCallback)((function(e){e.stopPropagation(),ie()}),[ie]),Ie=function(){n?t(M):(t({start:R,end:W}),ke(!1)),ue()},je=(0,i.useMemo)((function(){return function(e){return U[e]}(te)}),[te]),De=!!n||null!==R&&null!==W&&R!==W,Te=!n&&(R===v&&W===y),Ne=(0,i.useMemo)((function(){return x}),[]),_e=R===Ne,Fe=(0,i.useCallback)((function(e,t){$(t),Ce({startDate:e,endDate:0})}),[]),Me=function(e){var r=e.startDate,o=e.endDate,a=e.singleDate;if(n)A(a),t(a),(0,m.L)("date-picker","click-date-picker",C,String(a));else{Ce(Z?{startDate:r?(0,l.default)((0,u.default)(new Date(r))):r,endDate:o?(0,l.default)((0,s.default)(new Date(o))):o}:{startDate:r,endDate:o});var i="finish"===je?o||r:r||o;(0,m.L)("date-picker","click-date-picker",C,String(i))}},ze=(0,i.useMemo)((function(){return se.current&&ae?i.createElement(O,{backdrop:!0,target:se.current,canHideTarget:!1,align:{top:"bottom",left:"left"},onEsc:ue},i.createElement(b,(0,r.Z)({ref:be,"data-testid":"datePicker"},N),i.createElement(d.Flex,{alignItems:"center",width:"100%",padding:Z?[4]:[0,6]},!Z&&!n&&i.createElement(d.Flex,{column:!0,gap:3,margin:[0,4,0,0],padding:[6,0],border:{side:"right",color:"borderSecondary"}},i.createElement(G,{handleTimePeriodChange:Fe,selectedDate:R,tagging:C}),i.createElement(K,{handleTimePeriodChange:Fe,customTimePeriodRef:pe,resolution:Q,tagging:C,value:R})),i.createElement(ce,{startDate:R,endDate:W,singleDate:M,setStartDate:z,setEndDate:Y,onDatesChange:Me,onInputFocus:Ze,onlyDates:Z,maxDate:j,minDate:D,isSinglePicker:n})),i.createElement(d.Flex,{column:!0,padding:[4,6,2],width:"100%",border:{side:"top",color:"borderSecondary"}},!Z&&!n&&i.createElement(Ae,{timezoneRef:xe}),i.createElement(d.Flex,{gap:1,justifyContent:n?"end":Z?"center":De?"between":"end",width:"100%"},!Z&&!n&&De&&i.createElement(le,{startDate:R,endDate:W,onlyDates:Z}),i.createElement(d.Flex,{alignItems:"center",justifyContent:"center",gap:1},i.createElement(d.Button,{label:"Clear",flavour:"hollow",onClick:Se,disabled:_e,"data-ga":"date-picker::click-clear::".concat(C,"-").concat(je),"data-testid":"datePicker-clear",small:!0}),i.createElement(d.Button,{label:"Apply",onClick:Ie,disabled:!De||Te,"data-ga":"date-picker::click-apply::".concat(C,"-").concat(je),"data-testid":"datePicker-apply",small:!0})))))):null}),[R,C,Q,W,De,_e,je,Te,M,ae]);return i.createElement(i.Fragment,null,i.createElement(Oe,(0,r.Z)({onClick:Pe,tagging:C,isPickerOpen:ae,isPlaying:S,setRangeValues:t,start:n?M:v,end:n?M:y,ref:se,onlyDates:Z,tooltipContent:T,isSinglePicker:n,noDateSelected:n&&!M},I)),ze)}},2379:function(e,t,n){n.d(t,{I:function(){return o},o:function(){return a}});var r=n(89250),o=function(){var e=(0,r.bS)("/spaces/:spaceSlug/rooms/:roomSlug/alerts"),t=(0,r.bS)("/spaces/:spaceSlug/rooms/:roomSlug/alerts/:alertId"),n=(0,r.bS)("/spaces/:spaceSlug/rooms/:roomSlug/home"),o=(0,r.bS)("/spaces/:spaceSlug/rooms/:roomSlug/functions");return e||t||n||o},a=function(){return(0,r.bS)("/spaces/:spaceSlug/rooms/:roomSlug/events")}},92432:function(e,t,n){n.d(t,{L:function(){return r}});var r=function(e,t,n,r,o){var a,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"gaCustomEvent";if(window.envSettings.tracking){if(window.dataLayer){var c={event:i,eventCategory:e,eventAction:t,eventLabel:n,eventValue:r,eventResults:o};window.dataLayer.push(c)}window.gtag&&window.gtag("event","gaCustomEvent",{eventCategory:e,eventAction:t,eventLabel:n,eventValue:r,eventResults:o}),null!==(a=window.posthog)&&void 0!==a&&a.__loaded&&window.posthog.capture(i,{eventCategory:e,eventAction:t,eventLabel:n,eventValue:r})}}},89405:function(e,t,n){n.d(t,{rA:function(){return y},tb:function(){return v}});var r=n(4942),o=n(45987),a=(n(91058),n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),i=n(49546),c=n(58591),l=n(14600),u=["long","isTime","secs","timezone"],s=["locale"];function d(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 m(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:0;return new Date(new Date(e).getTime()+60*parseInt(t)*60*1e3)},b=function(e,t){var n=t.locale,r=(0,o.Z)(t,s);return new Intl.DateTimeFormat(null!==n&&void 0!==n?n:navigator.language,function(e){var t=e.long,n=e.isTime,r=e.secs,a=e.timezone,i=(0,o.Z)(e,u);return m(m(m({hourCycle:"h23"},n?{}:t?{weekday:"short",year:"numeric",month:"short",day:"2-digit"}:{dateStyle:"short"}),n&&{timeStyle:r?"medium":"short"}),{},{timeZone:a},i)}(r)).format(e)},y=function(){var e=function(){var e=(0,c.m$)().utc;return(0,l.E)("default",e)}(),t=e.utc,n=e.offset;return{localeDateString:(0,a.useMemo)((function(){return f?function(e,n){return b(e,m({long:!0,timezone:t},n))}:g}),[t]),localeTimeString:(0,a.useMemo)((function(){return f?function(e,n){return b(e,m({secs:!0,isTime:!0,timezone:t},n))}:h}),[t]),utcOffset:n}}},20709:function(e,t){var n=36e5;t.Z=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date)-e;if(t<0)return"0 seconds ago";var r=Math.floor(t/864e5);if(r>1)return"".concat(r," days ago");var o=Math.floor(t/n);if(o>0)return"".concat(o," hours ago");var a=Math.floor(t/6e4);if(a>1)return"".concat(a," mins ago");var i=Math.floor(t/1e3);return"".concat(i," seconds ago")}},71752:function(e,t,n){n.d(t,{T:function(){return r}});var r=function(e){return e.messages&&e.messages.length>0?e.messages[0]:void 0}},30688:function(e,t,n){n.d(t,{A:function(){return a},f:function(){return o}});var r=n(93433),o=(n(92222),n(85827),n(41539),n(25387),n(2490),n(72608),function(e,t){return{isValid:e,message:t}});function a(e){return Array.isArray(e)?function(t){return e.reduce((n=t,function(e,t){var o=t(n),a=o.isValid,i=o.message;if(a)return e;var c=e.messages,l=void 0===c?[]:c;return{isValid:a,messages:[].concat((0,r.Z)(l),[i])}}),{isValid:!0});var n}:(t=e,function(e){var n=t(e),r=n.isValid,o=n.message;return o?{isValid:r,messages:[o]}:{isValid:r}});var t}},31203:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(15557),c=["onClick","src","title"],l=(0,a.forwardRef)((function(e,t){var n=e.onClick,l=e.src,u=e.title,s=void 0===u?"User avatar":u,d=(0,o.Z)(e,c);return a.createElement(i.Flex,(0,r.Z)({cursor:"pointer",round:"50%",as:"img","data-testid":"userAvatar",src:l||"https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y",title:s,alt:s,onClick:function(e){return n&&n(e)},width:8,height:8},d,{ref:t}))}));t.Z=l},45916:function(e,t,n){var r=n(67294),o=n(15557),a=n(82351);t.Z=function(e){var t=e.children,n=e.background,i=e.testId,c=e.onClose,l=i||"header-banner";return r.createElement(o.Flex,{background:n,"data-testid":l,height:{min:10},padding:[2,10,2,2],position:"sticky",zIndex:5},t,r.createElement(a.Z,{align:"bottom",content:"Dismiss message",isBasic:!0,plain:!0,stretch:"align"},c&&r.createElement(o.Box,{"data-testid":"".concat(l,"-close-button"),as:o.Icon,color:"separator",cursor:"pointer",name:"x",position:"absolute",right:"8px",onClick:function(e){c&&(e.stopPropagation(),c())}})))}},70842:function(e,t,n){n.d(t,{Z:function(){return H}});var r=n(87462),o=n(29439),a=n(67294),i=n(15557),c=n(61152),l=n(82351),u=n(24533),s=n(60677),d=n(78266),m=n(45987),f=(n(57327),n(41539),n(88449),n(2490),n(59849),n(21249),n(57640),n(9924),n(78710)),p=n(46667),g=n(36065),h=n(74059),v=n(77872),b=n(97346),y=n(14428),w=["selectedSpace","setSelectedSpace","column","showFullname"],E=s.default.div.withConfig({displayName:"spaces__Separator",componentId:"sc-19p9rsp-0"})(["height:1px;width:",";background:",";"],(0,i.getSizeBy)(3),(0,i.getColor)("border")),x=function(e){var t=e.selectedSpace,n=e.setSelectedSpace,c=e.column,u=e.showFullname,s=(0,m.Z)(e,w),d=(0,h.Iw)(),x=(0,a.useMemo)((function(){return d.filter((function(e){return!(0,f.Ly)(e)}))}),[d]),k=(0,p.Z)(),C=(0,o.Z)(k,4),O=C[0],S=C[2],Z=C[3];return a.createElement(i.Flex,(0,r.Z)({"data-testid":"workspaceBar",padding:[3,2],column:c,alignItems:"center",justifyContent:"center"},s),a.createElement(i.Flex,{column:!0,"data-testid":"workspaceBar-spaces-list",gap:4,alignItems:"center",overflow:"hidden"},a.createElement(i.Flex,{column:c,"data-testid":"workspaceBar-spacesList",gap:c?4:2,overflow:{vertical:"auto"},flexWrap:!c},x.map((function(e){return a.createElement(v.Z,{testIdPrefix:"workspaceBar-space",key:e,spaceId:e,onClick:n,active:e===(null===t||void 0===t?void 0:t.id),background:"selected",color:"bright",showFullname:u})}))),a.createElement(b.Z,{permission:"user:CreateSpace"},a.createElement(E,{"data-testid":"workspaceBar-separator"}),a.createElement(l.Z,{content:"Create a new Space",align:"right"},a.createElement(y.Z,{permission:"user:CreateSpace",ifForbidden:"hide",icon:"plus",onClick:S,"data-testid":"workspaceBar-addSpace-button"})))),O&&a.createElement(g.Z,{onClose:Z,onDone:n}))},k=n(56662),C=n(61458),O=n(33335),S=n(23383),Z=n(95383),P=n(73398),I=function(e){var t=e.selectedSpace,n=e.selectedRoom,r=e.setSelectedRoom,c=t.id;(0,S.Z)(c);var u=(0,O.gI)("room:Create",c),s=(0,O.gI)("room:Read",c),d=(0,p.Z)(!1),m=(0,o.Z)(d,4),f=m[0],g=m[2],h=m[3],v=(0,a.useCallback)((function(e){e.stopPropagation(),u&&g()}),[u]),b=(0,Z.WY)(c),w=(0,a.useMemo)((function(){return b.filter((function(e){return e.isMember}))}),[b]);return(0,a.useEffect)((function(){null!==w&&void 0!==w&&w.length&&(n||r(w[0]))}),[w,n]),a.createElement(a.Fragment,null,a.createElement(C.Z,{"data-testid":"workspaceRooms-menuList",disabled:!s,headerTestId:"workspaceRooms-warRooms",isOpen:!0,label:a.createElement(i.Flex,{padding:[1,0],margin:[0,0,1,0],flex:!0,justifyContent:"between",alignItems:"center",height:"24px"},a.createElement(i.Flex,{alignItems:"center",gap:2},a.createElement(i.Icon,{name:"space_new",color:"menuItem",width:"14px",height:"14px"}),a.createElement(i.TextSmall,{color:"menuItem"},"Select a room")),a.createElement(i.Flex,{alignItems:"center",gap:2},a.createElement(l.Z,{content:"Create a new room",align:"right"},a.createElement(y.Z,{permission:"room:Create",tiny:!0,icon:"plus",onClick:v,"data-testid":"workspaceRooms-addWarRoom-button",spaceId:c}))))},a.createElement(i.Flex,{column:!0,"data-testid":"workspaceRooms-warRoomsList",padding:[0,0,1]},w.map((function(e){var t=e.id;return a.createElement(P.Z,{key:t,id:t,hideAlerts:!0,Wrapper:i.TextSmall,isSidebar:!0,selectedId:null===n||void 0===n?void 0:n.id,onClick:function(){return r(e)}})})))),f&&a.createElement(k.U,{onClose:h,isSubmodal:!1}))},j=n(4942),D=(n(92222),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(33582)),T=n(13477),N=n(93017),_=n(28234),F=n(94221),M=n(49254),A=n(39469);function L(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 B(e){for(var t=1;t span{span{color:",";}svg{fill:",";}}}& > span{display:flex;align-items:center;gap:6px;margin:2px 8px 2px 4px;span{color:",";}svg{fill:",";}}}"],(function(e){var t=e.active,n=e.theme;return(0,a.getColor)(t?"primary":"modalBackground")({theme:n})}),(0,a.getColor)("primary"),(0,a.getColor)("primary"),(0,a.getColor)("modalBackground"),(0,a.getColor)("modalBackground"),(function(e){var t=e.active,n=e.theme;return(0,a.getColor)(t?"modalBackground":"primary")({theme:n})}),(function(e){var t=e.active,n=e.theme;return(0,a.getColor)(t?"modalBackground":"primary")({theme:n})}))),d=(0,o.default)(a.RadioButton).withConfig({displayName:"styled__RadioButton",componentId:"sc-1lice8m-5"})(["&&{align-items:baseline !important;color:red;}"]),m=(0,o.default)(a.Flex).attrs({color:"text",gap:.5}).withConfig({displayName:"styled__VersionTitle",componentId:"sc-1lice8m-6"})(["h5{color:inherit;}"])},95826:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(15557),c=n(52428),l=["os"],u=function(e){var t=e.os,n=(0,o.Z)(e,l);return a.createElement(i.Text,(0,r.Z)({"data-testid":"command-disclaimer",strong:!0},n),"function"===typeof c.d[t]?c.d[t]():c.d[t])};t.Z=(0,a.memo)(u)},52428:function(e,t,n){n.d(t,{JG:function(){return C},NS:function(){return v},d:function(){return b},f0:function(){return y},iE:function(){return k}});var r=n(4942),o=n(29439),a=(n(92222),n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),i=n(15557),c=n(58206),l=n(52631),u=n(74855),s=n(91008);function d(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 m(e){for(var t=1;t /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --".concat(t?"nightly":"stable","-channel --claim-token ").concat(r).concat(n?" --claim-rooms ".concat(n):""," --claim-url ").concat(o),wget:"wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh --".concat(t?"nightly":"stable","-channel --claim-token ").concat(r).concat(n?" --claim-rooms ".concat(n):""," --claim-url ").concat(o)}},p=function(e){var t=e.isNightly,n=e.rooms,r=e.token;return"helm install netdata netdata/netdata \\\n --set image.tag=".concat(t?"latest":"stable",' \\\n --set parent.claiming.enabled="true" \\\n --set parent.claiming.token=').concat(r," \\")+"".concat(n&&"\n --set parent.claiming.rooms=".concat(n," \\"),'\n --set child.claiming.enabled="true" \\\n --set child.claiming.token=').concat(r)+"".concat(n&&" \\\n --set child.claiming.rooms=".concat(n))},g=function(e){var t=e.isNightly,n=e.rooms,r=e.token,o=e.url;return"docker run -d --name=netdata \\\n --pid=host \\\n --network=host \\\n -v netdataconfig:/etc/netdata \\\n -v netdatalib:/var/lib/netdata \\\n -v netdatacache:/var/cache/netdata \\\n -v /etc/passwd:/host/etc/passwd:ro \\\n -v /etc/group:/host/etc/group:ro \\\n -v /proc:/host/proc:ro \\\n -v /sys:/host/sys:ro \\\n -v /etc/os-release:/host/etc/os-release:ro \\\n -v /var/run/docker.sock:/var/run/docker.sock:ro \\\n --restart unless-stopped \\\n --cap-add SYS_PTRACE \\\n --cap-add SYS_ADMIN \\\n --security-opt apparmor=unconfined \\\n -e NETDATA_CLAIM_TOKEN=".concat(r," \\\n -e NETDATA_CLAIM_URL=").concat(o," \\")+"".concat(n&&"\n -e NETDATA_CLAIM_ROOMS=".concat(n," \\"),"\n netdata/netdata:").concat(t?"edge":"stable")},h={linux:f,docker:g,macos:function(e){var t=e.isNightly,n=e.rooms,r=e.token,o=e.url;return"curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --".concat(t?"nightly":"stable","-channel --claim-token ").concat(r).concat(n?" --claim-rooms ".concat(n):""," --claim-url ").concat(o)},kubernetes:p,windows:function(e){var t=e.rooms,n=e.token,r=e.url;return"msiexec.exe /i netdata.msi TOKEN=".concat(n," ").concat(t?"ROOMS="+t:""," URL=").concat(r)}},v=function(e,t,n,r){if(null===e||void 0===e||!e.length)return"Loading tokens...";var a=(0,o.Z)(e,1)[0].token,i=null!==r&&void 0!==r&&r.length?r.join(","):"",c=window.envSettings.apiUrl;return h[n]({isNightly:t,rooms:i,token:a,url:c})},b={linux:"Run the script below on your node's terminal",windows:function(){return a.createElement(i.Flex,{column:!0,gap:3},a.createElement(i.Text,{strong:!0},"Install Netdata on Windows"),a.createElement(i.Box,{sx:{listStyleType:"circle"},column:!0,as:"ul",padding:[3.5],gap:1},a.createElement(i.Box,{as:"li"},a.createElement(i.Text,null,"Download the latest"," ",a.createElement(s.Z,{href:"https://github.com/netdata/msi-installer",rel:"noopener noreferrer",strong:!0,target:"_blank"},"netdata.msi"))),a.createElement(i.Box,{as:"li"},a.createElement(i.Text,null,"From an admin terminal, run the below command in the same location as the downloaded file:"))))},docker:function(){return a.createElement(i.Flex,{column:!0,gap:2},a.createElement(i.Text,null,"Install and connect new Docker containers")," ",a.createElement(i.Text,null,"Find the commands for ",a.createElement(i.Text,{code:!0},"docker run"),", ",a.createElement(i.Text,{code:!0},"docker compose")," or Docker Swarm. On the last two you can copy the configs, then run"," ",a.createElement(i.Text,{code:!0},"docker-compose up -d")," in the same directory as the"," ",a.createElement(i.Text,{code:!0},"docker-compose.yml")),a.createElement(i.Flex,{background:"modalBackground",padding:[3],column:!0,gap:2},a.createElement(i.Box,null,a.createElement(i.Text,null,"Netdata container requires different privileges and mounts to provide functionality similar to that provided by Netdata installed on the host. More info"," ",a.createElement(s.Z,{href:"https://learn.netdata.cloud/docs/installing/docker#create-a-new-netdata-agent-container",target:"_blank",whiteSpace:"nowrap"},"here"))),a.createElement(i.Box,null,a.createElement(i.Text,null,"Netdata will use the hostname from the container in which it is run instead of that of the host system. To change the default hostname check"," ",a.createElement(s.Z,{href:"https://learn.netdata.cloud/docs/agent/packaging/docker#change-the-default-hostname",target:"_blank",whiteSpace:"nowrap"},"here")))))},macos:"Run the script below on your OSX, macOS server",kubernetes:"Use helm install to install Netdata on your Kubernetes cluster"},y={windows:"https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/wmi",linux:"https://learn.netdata.cloud/docs/agent/claim#connect-an-agent-running-in-linux",docker:"https://learn.netdata.cloud/docs/agent/claim#connect-an-agent-running-in-docker",macos:"https://learn.netdata.cloud/docs/agent/claim#connect-an-agent-running-in-macos",kubernetes:"https://learn.netdata.cloud/docs/agent/packaging/installer/methods/kubernetes#connect-your-kubernetes-cluster-to-netdata-cloud"},w=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window.envSettings.apiUrl;return{dockerCli:{command:g({isNightly:e,rooms:t,token:n,url:r}),label:"Docker CLI"},compose:{label:"Docker Compose",command:"version: '3'\nservices:\n netdata:\n image: netdata/netdata:".concat(e?"edge":"stable","\n container_name: netdata\n pid: host\n network_mode: host\n restart: unless-stopped\n cap_add:\n - SYS_PTRACE\n - SYS_ADMIN\n security_opt:\n - apparmor:unconfined\n volumes:\n - netdataconfig:/etc/netdata\n - netdatalib:/var/lib/netdata\n - netdatacache:/var/cache/netdata\n - /etc/passwd:/host/etc/passwd:ro\n - /etc/group:/host/etc/group:ro\n - /proc:/host/proc:ro\n - /sys:/host/sys:ro\n - /etc/os-release:/host/etc/os-release:ro\n - /var/run/docker.sock:/var/run/docker.sock:ro\n environment:\n - NETDATA_CLAIM_TOKEN=").concat(n,"\n - NETDATA_CLAIM_URL=").concat(r,"\n - NETDATA_CLAIM_ROOMS=").concat(t,"\n\nvolumes:\n netdataconfig:\n netdatalib:\n netdatacache:")},swarm:{label:"Docker Swarm",command:"version: '3'\nservices:\n netdata:\n image: netdata/netdata:".concat(e?"edge":"stable","\n container_name: netdata\n ports:\n - 19999:19999\n restart: unless-stopped\n cap_add:\n - SYS_PTRACE\n security_opt:\n - apparmor:unconfined\n volumes:\n - netdataconfig:/etc/netdata\n - netdatalib:/var/lib/netdata\n - netdatacache:/var/cache/netdata\n - /etc/passwd:/host/etc/passwd:ro\n - /etc/group:/host/etc/group:ro\n - /proc:/host/proc:ro\n - /sys:/host/sys:ro\n - /etc/os-release:/host/etc/os-release:ro\n - /etc/hostname:/etc/hostname:ro\n environment:\n - NETDATA_CLAIM_TOKEN=").concat(n,"\n - NETDATA_CLAIM_URL=").concat(r,"\n - NETDATA_CLAIM_ROOMS=").concat(t,"\n deploy:\n mode: global\n\nvolumes:\n netdataconfig:\n netdatalib:\n netdatacache:")}}},E=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window.envSettings.apiUrl;return{wget:{command:f({isNightly:e,rooms:t,token:n,url:r}).wget,label:"wget"},curl:{command:f({isNightly:e,rooms:t,token:n,url:r}).curl,label:"curl"}}},x=function(e,t,n){return{helm:{command:p({isNightly:e,rooms:t,token:n}),label:"Helm"},existingCluster:{label:"Existing cluster",command:"image:\n tag: ".concat(e?"latest":"stable","\n ").concat(e?"\nrestarter:\n enabled: true\n ":"","\nparent:\n claiming:\n enabled: true\n token: ").concat(n,"\n rooms: ").concat(t,"\n \nchild:\n claiming:\n enabled: true\n token: ").concat(n,"\n rooms: ").concat(t)}}},k=function(e,t,n,r){if(null===r||void 0===r||!r.length)return"Loading tokens...";var a=(0,o.Z)(r,1)[0].token,i=null!==n&&void 0!==n&&n.length?n.join(","):"";return{docker:w(e,i,a),linux:E(e,i,a),kubernetes:x(e,i,a)}[t]},C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){(0,c.Z)(e);var n=(0,u.sc)(m(m({header:"Copied",text:"Command copied to your clipboard! Please run it on your node's terminal.",icon:"gear"},t),{},{success:!0}));l.Z.success(n,{context:"copy"})}}},80606:function(e,t,n){n.d(t,{F:function(){return c},I:function(){return i}});var r=n(4480),o=n(78401),a=(0,r.cn)({key:"cookiePreferences",default:(0,o.O)()}),i=function(){return(0,r.sJ)(a)},c=function(){return(0,r.FV)(a)}},70459:function(e,t,n){n.d(t,{F:function(){return c}});var r=n(29439),o=(n(41539),n(15581),n(2490),n(34514),n(54747),n(67294)),a=n(54576),i=n(95248),c=function(){var e=(0,a.useChart)(),t=(0,i.I0)(),n=(0,r.Z)(t,2),c=n[0],l=c.after,u=c.before,s=n[1],d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{autofetchOnWindowBlur:!1};return function(){if(e.getNodes().forEach((function(e){return e.updateAttributes(t)})),!(l<0)){var n=Math.floor((u-l)/1e3);s({after:-n,before:0})}}};return{play:(0,o.useCallback)(d(),[u,l]),forcePlay:(0,o.useCallback)(d({autofetchOnWindowBlur:!0}),[u,l]),pause:(0,o.useCallback)((function(){if(!(l>0)){var e=Date.now();s({after:1e3*Math.floor(e/1e3+l),before:1e3*Math.floor(e/1e3)})}}),[l])}}},92517:function(e,t,n){var r=n(60677),o=n(67294),a=n(15557),i=(0,r.default)(a.Flex).withConfig({displayName:"item__StyledFlex",componentId:"sc-1gby0f1-0"})(["&:hover{background:",";}"],(function(e){var t=e.hasHoverBackground,n=e.theme,r=e.hoverBackground,o=void 0===r?"borderSecondary":r;return t?(0,a.getColor)(o)({theme:n}):null})),c=(0,o.forwardRef)((function(e,t){var n=e.background,r=e.children,c=e.cursor,l=e.hasBorder,u=e.hasHoverBackground,s=e.onClick,d=e.padding,m=e.testId,f=e.borderColor,p=void 0===f?"selected":f,g=e.round,h=e.hoverBackground;return o.createElement(a.Flex,{alignItems:"center",border:l&&{side:"right",color:p},cursor:c,"data-testid":m,onClick:s,ref:t},o.createElement(i,{round:g,alignItems:"center",background:n,hasHoverBackground:u,margin:l?[0,3,0,0]:void 0,padding:d,hoverBackground:h},r))}));t.Z=c},27261:function(e,t,n){var r=n(15557),o=n(67294),a="node-status-indicator";t.Z=function(e){var t=e.statusText,n=e.counter,i=e.statusColor,c=i.statusTextColor,l=i.indicatorWrapperColor,u=i.counterColor;return o.createElement(r.Flex,null,o.createElement(r.Box,{margin:[0,1,0,0]},o.createElement(r.TextSmall,{"data-testid":"".concat(a,"-text-").concat(t),color:c},t)),o.createElement(r.Flex,{justifyContent:"center",alignItems:"center",padding:[0,1],width:{min:7.5},height:5,background:l,round:!0},o.createElement(r.TextSmall,{"data-testid":"".concat(a,"-counter-").concat(t),color:u},n)))}},9458:function(e,t,n){var r=n(67294),o=n(15557);t.Z=function(){return r.createElement(o.Box,{as:"hr",height:3,margin:[0],sx:{borderWidth:"0px 0px 0px 1px",borderColor:"placeholder",borderStyle:"solid"}})}},6973:function(e,t,n){n.d(t,{B:function(){return r}});var r={live:{statusTextColor:"primary",indicatorWrapperColor:"primary",counterColor:"bright"},stale:{statusTextColor:["green","vista"],indicatorWrapperColor:["green","vista"],counterColor:"bright"},offline:{statusTextColor:"textLite",indicatorWrapperColor:"textLite",counterColor:"bright"},unseen:{statusTextColor:"textLite",indicatorWrapperColor:["yellow","seaBuckthorn"],counterColor:"bright"}}},4514:function(e,t,n){n.d(t,{c:function(){return d}});n(21249),n(57640),n(9924),n(47941);var r=n(67294),o=n(60677),a=n(15557),i=n(27261),c=n(9458),l=n(6973),u=(0,o.default)(a.Flex).withConfig({displayName:"wrapper__NodesIndicatorWrapper",componentId:"sc-gy5ftg-0"})(["pointer-events:",";cursor:",";opacity:",";"],(function(e){return e.disabled?"none":"auto"}),(function(e){return e.disabled?"default":"pointer"}),(function(e){return e.disabled?"0.4":"1"})),s={live:{counter:0,statusText:"Live"},stale:{counter:0,statusText:"Stale"},offline:{counter:0,statusText:"Offline"},unseen:{counter:0,statusText:"Unseen"}},d=function(e){return r.createElement(u,e,Object.keys(s).map((function(e){return r.createElement(r.Fragment,{key:e},r.createElement(i.Z,{statusText:s[e].statusText,counter:s[e].counter,statusColor:l.B[e]}),r.createElement(c.Z,null))})))};t.Z=u},64599:function(e,t,n){var r=n(87462),o=n(67294),a=n(15557),i=n(13477),c=n(83356);t.Z=function(e){var t=(0,i.Iy)("isAnonymous"),n=(0,c.Z)();return t?o.createElement(a.Button,(0,r.Z)({label:"Sign In",onClick:n},e)):null}},16329:function(e,t,n){n.r(t),n.d(t,{default:function(){return Qe}});n(66992),n(41539),n(88674),n(78783),n(33948);var r=n(67294),o=n(2145),a=n(15557),i=n(13477),c=(n(15581),n(2490),n(34514),n(54747),n(68035)),l=n(4480),u=n(30266),s=n(74059),d=n(33335),m=n(94979),f=n(78266),p=n(29439),g=n(46667),h=n(59636),v=n(67622),b=n(61458),y=n(37518),w=n(60677),E=(0,w.default)(a.Drop).attrs({align:{top:"bottom",left:"left"},animation:!0,background:"dropdown",column:!0,margin:[2,0,0],overflow:{vertical:"auto"},padding:[2,0],round:1,width:64}).withConfig({displayName:"styled__Dropdown",componentId:"sc-1vwntsm-0"})([""]),x=(0,w.default)(a.H6).attrs({color:"border",padding:[2,4]}).withConfig({displayName:"styled__OtherRoomsHeader",componentId:"sc-1vwntsm-1"})([""]),k=n(82351),C=n(93033),O=n(14428),S=function(){var e=(0,g.Z)(),t=(0,p.Z)(e,4),n=t[0],o=t[1],i=t[3],c=(0,r.useRef)(),l=(0,y.Hm)(),u=l.slug,m=(0,s.OS)("name"),f=(0,C.Z)({roomSlug:u}),w=(0,d.gI)("room:Read"),S=(0,s.Q6)();return r.createElement(r.Fragment,null,r.createElement(a.Flex,{alignItems:"center",gap:1,"data-testid":"header-roomOptions"},r.createElement(v.Z,{ref:c,testid:"roomDropdownMenu-roomOptions",icon:"space_new",onClick:o,padding:[2],round:1,width:"auto",disabled:!w||S},l.name&&r.createElement(a.Flex,{alignItems:"center",gap:4},r.createElement(a.Text,null,l.name),r.createElement(a.Icon,{name:"chevron_down",size:"small",color:"text"}))),r.createElement(k.Z,{align:"bottom",content:"Room settings"},r.createElement(O.Z,{permission:"room:Leave","data-ga":"header::click-war-room-settings::global-view","data-testid":"header-manageWarRoom",onClick:f,icon:"gear",flavour:"borderless",neutral:!0,small:!0}))),c.current&&n&&r.createElement(E,{target:c.current,onEsc:i,onClickOutside:i},r.createElement(b.Z,{isOpen:!0,label:"ROOMS IN ".concat(m.toUpperCase()),headerTestId:"roomDropdownMenu-otherRooms",Header:x},r.createElement(a.Flex,{onClick:i,column:!0,height:{max:100},overflow:{vertical:"auto"}},r.createElement(h.Z,null)))))},Z=(n(92222),n(97945)),P=n(82902),I=(n(82526),n(41817),function(e){var t=e.description,n=e.title,o=e.testId,i=e.children;return r.createElement(a.Flex,{"data-testid":o,column:!0,gap:2},r.createElement(a.H4,{color:"textDescription"},n),r.createElement(a.Flex,{column:!0,"data-testid":o,gap:2},r.createElement(a.Text,{color:"textDescription"},t),i))}),j=function(e){var t=e.children,n=e.testId,o=e.icon,i=void 0===o?"nodes_update":o;return r.createElement(a.Flex,{"data-testid":n,padding:[6],round:1,width:"100%",background:"modalInfoBackground"},r.createElement(a.Box,{margin:[0,4,0,0]},r.createElement(a.Box,{as:a.Icon,width:10,height:10,name:i})),t)},D=function(e){var t=e.title,n=e.desciription;return r.createElement(a.Flex,{column:!0},r.createElement(a.Flex,null,r.createElement(a.Box,{margin:[0,4,0,0]},r.createElement(a.Icon,{color:"main",name:"warning_triangle_hollow"})),r.createElement(a.H3,null,t)),r.createElement(a.Box,{margin:[6,0,0,0]},n))},T=n(91008),N=n(91268),_=n(89250),F=(n(64211),n(41874),n(11389)),M=n(89050),A=n(86711),L=n(83925);var B=[{id:"name",accessor:"name",header:"Name",cell:function(e){var t=e.getValue,n=e.row;return r.createElement(T.Z,{disabled:!n.original.isLive&&"stale"!==n.original.state,color:"text",hoverColor:"primary",visitedColor:"accent",Component:a.TextSmall},t())},minSize:60},{id:"version",accessor:"version",header:"Version",cell:function(e){var t=e.getValue;return r.createElement(a.Pill,{color:"neutralPillColor",flavour:"neutral"},t())}},{id:"state",accessor:"state",header:"Status",cell:function(e){var t=e.getValue;return r.createElement(F.Z,{state:t()})},sortingFn:function(e,t){return n=(0,M.Q5)(e.original.state),r=(0,M.Q5)(t.original.state),n===r?0:n>r?1:-1;var n,r},enableColumnFilter:!0,filterFn:function(e,t,n){var r=e.original;return n.length<1||n.some((function(e){var t=e.value;return"all"===t||t===(0,M.Q5)(r.state)}))},meta:{tooltip:r.createElement(A.Z,null),filter:{component:"select",isMulti:!0,options:[{value:"Offline",label:"Offline"},{value:"Live",label:"Live"},{value:"Stale",label:"Stale"}]}}},{id:"updateSeverity",accessor:"updateSeverity",header:"Severity",cell:function(e){var t=e.getValue,n=e.row.original;return r.createElement(L.Z,{name:n.name,os:n.os.id,container:n.hw.container,warningLevel:n.updateSeverity,labels:n.labels||{},version:n.version,text:t()})}}],R=n(77823),z=(0,l.cn)({key:"notificationModal",default:!1}),V=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).resetOnUnmount,t=void 0!==e&&e,n=(0,l.rb)(z),o=(0,l.FV)(z),a=(0,p.Z)(o,2),i=a[0],c=a[1],u=(0,r.useCallback)((function(){return c(!0)}),[]),s=(0,r.useCallback)((function(){return c(!1)}),[]);return(0,R.Z)((function(){t&&n()})),{isModalVisible:i,openModal:u,closeModal:s,resetState:n}},U=[{id:"updateSeverity",desc:!1}],H=function(){var e=V().closeModal,t=(0,r.useMemo)((function(){return{goto:{handleAction:function(e){var t=((null===e||void 0===e?void 0:e.labels)||{})._install_type,n=void 0===t?null:t,r=e.hw.container,o=e.os.id,a=e.version,i=(0,P.Ly)({container:r,os:o,_install_type:n,version:a});window.open(i,"_blank","noopener,noreferrer")},tooltipText:"Go to documentation"}}}),[]),n=(0,_.s0)(),o=(0,Z.Hg)();return{onClickRow:(0,r.useCallback)((function(t){var r=t.data;if(r.isLive||"stale"===r.state){var a=o(r.id);n(a),e()}}),[]),sortBy:U,rowActions:t,columns:B,disableClickRow:function(e){var t=e.data;return!t.isLive&&"stale"!==t.state}}},W=n(18129),G={updateSeverity:!0,connectionToCloud:!1},Y=function(e){var t=e.data,n=H(),o=n.rowActions,a=n.onClickRow,i=n.disableClickRow,c=n.sortBy;return r.createElement(N.Z,{"data-testid":"nodesTable-layout",overflow:"hidden",height:"100%"},r.createElement(W.Z,{customSortBy:c,customNodes:t,showdDefaultRowActions:!1,showDefaultBulkActions:!1,columnVisibility:G,customRowActions:o,enableSelection:!1,onClickRow:a,disableClickRow:i}))},K=function(e){var t=e.onClose,n=(0,Z.Ng)(),o=(0,Z.Ne)(n),i=n.length,c="Need update (".concat(n.length," ").concat((0,P.V6)(n.length),")");return r.createElement(a.Modal,null,r.createElement(a.ModalContent,{width:{min:200,base:270},height:200},r.createElement(a.ModalHeader,null,r.createElement(D,{title:"Nodes that need Attention",desciription:r.createElement(a.Text,null,"You have ",r.createElement(a.Text,{strong:!0},i)," ",(0,P.V6)(i)," that should be upgraded to ensure experience using Netdata")}),r.createElement(a.ModalCloseButton,{onClose:t,testId:"close-button"})),r.createElement(a.ModalBody,{overflow:"hidden"},r.createElement(j,null,r.createElement(I,{title:c},r.createElement(a.Text,null,r.createElement(a.Flex,{column:!0},r.createElement(a.Text,null,"Please upgrade to ensure you get the latest security and bug fixes.")," ",r.createElement(a.Box,null,"To update your nodes to the latest version"," ",r.createElement(T.Z,{href:P.XY.default,rel:"noopener noreferrer",strong:!0,target:"_blank"},"please read our documentation"," "),"and find direct links for each node depending on where it is running and/or how it was installed."))))),r.createElement(a.Box,{height:"calc(100% - 145px)",padding:[3,0],margin:[0,0,8,0]},r.createElement(Y,{data:o})))))},J=n(48286),q=n(91128),Q=n(2379),$=n(54576),X=n(9058),ee=n(95665),te=n(95248),ne=function(e){var t=e.tagging,n=e.isPlaying,o=(0,te.I0)(),a=(0,p.Z)(o,2),i=a[0],c=i.offset,l=i.after,u=i.before,s=a[1],d=(0,r.useCallback)((function(e){var t=e.start,n=void 0===t?-900:t,r=e.end;s({after:n,before:n<0?0:void 0===r?0:r})}),[]),m=(0,r.useMemo)((function(){return{start:l<0?l:Math.floor(l),end:l<0?0:Math.ceil(u)}}),[l,u]);return r.createElement(ee.Z,{values:m,utc:c,onChange:d,tagging:t,isPlaying:n})},re=n(92517),oe=(0,w.default)(a.Flex).withConfig({displayName:"container__Container",componentId:"sc-qc13l0-0"})(["background:",";"],(function(e){var t=e.theme,n=e.isPlaying;return("Dark"===t.name?(0,a.getRgbColor)(n?["green","netdata"]:["neutral","ratsbane"],n?.3:1):(0,a.getRgbColor)(n?["green","frostee"]:["neutral","porcelain"]))({theme:t})})),ae=n(70459),ie=(0,w.default)(k.Z).withConfig({displayName:"playPausePill__StyledTooltip",componentId:"sc-1umryvu-0"})(["pointer-events:",";"],(function(e){return e.isDisabled?"none":"auto"})),ce=function(e){var t=e.isPlaying,n=e.isForcePlaying,o=e.isDisabled,i=(0,ae.F)(),c=i.play,l=i.pause,u=(0,r.useMemo)((function(){return function(e,t){return e?t?"forcePlay":"playSolid":"pauseSolid"}(t,n)}),[t,n]);return r.createElement(ie,{content:t?"Click to pause":"Click to play",align:"bottom",isDisabled:o},r.createElement(a.Box,{as:a.Pill,icon:u,onClick:t?l:c,isPlaying:t,"data-testid":"playPause-button",flavour:t?"success":"neutral",hollow:!0,_hover:{background:t?"accent":"neutralPillColor"},background:t?"primary":"border",color:"bright"},t?"Playing":"Paused"))},le=(0,w.default)(a.Flex).attrs({padding:[1],role:"button"}).withConfig({displayName:"styled__MenuButton",componentId:"sc-3h0zgs-0"})(["cursor:pointer;"]),ue=(0,w.default)(a.Drop).attrs({align:{top:"bottom",left:"left"},animation:!0,backdrop:!0,column:!0,padding:[2,0],background:"dropdown",round:1,overflow:{vertical:"auto"},margin:[.5,0,0],width:40}).withConfig({displayName:"styled__Dropdown",componentId:"sc-3h0zgs-1"})([""]),se=(0,w.default)(k.Z).withConfig({displayName:"styled__StyledTooltip",componentId:"sc-3h0zgs-2"})(["pointer-events:",";"],(function(e){return e.isDisabled?"none":"auto"})),de=function(e){var t=e.target,n=e.isDisabled,o=(0,g.Z)(),i=(0,p.Z)(o,4),c=i[0],l=i[1],u=i[3],s=(0,ae.F)(),d=s.play,m=s.pause,f=s.forcePlay;return r.createElement(r.Fragment,null,c?r.createElement(le,{onClick:l,width:"auto","data-testid":"playOptions-picker"},r.createElement(a.Icon,{name:"chevron_down",color:"text",width:"12px",height:"12px"})):r.createElement(se,{content:"Play to refresh and have live content, pause to see historical, or force play to keep refreshing even when the tab loses focus at the expense of some system performance.",align:{bottom:"bottom",right:"right"},isDisabled:n,plain:!0},r.createElement(le,{onClick:l,width:"auto","data-testid":"playOptions-picker"},r.createElement(a.Icon,{name:"chevron_down",color:"text",width:"12px",height:"12px"}))),t.current&&c&&!n&&r.createElement(ue,{target:t.current,onEsc:u,onClickOutside:u},r.createElement(v.Z,{icon:"playOutline",onClick:function(){d(),u()},testid:"playOptions-play"},"Play"),r.createElement(v.Z,{icon:"pauseOutline",onClick:function(){m(),u()},testid:"playOptions-pause"},"Pause"),r.createElement(v.Z,{icon:"forcePlayOutline",onClick:function(){f(),u()},testid:"playOptions-forcePlay"},"Force Play")))},me=(0,r.memo)(de),fe=(0,$.withChartProvider)((function(){var e=(0,Q.I)(),t=(0,Q.o)(),n=(0,r.useRef)(),o=(0,$.useAttributeValue)("autofetch"),a=!(0,$.useAttributeValue)("paused")&&o&&!t,i=(0,$.useAttributeValue)("autofetchOnWindowBlur"),c=(0,q.Z)();return(0,J.Z)((function(){c(!!e||!!t)}),[e,t]),r.createElement(re.Z,{hasBorder:!0,borderColor:"borderSecondary",testId:"global-controls"},r.createElement(oe,{isPlaying:a,padding:[2,2],round:!0,height:"100%",alignItems:"center",gap:1,isDisabled:e,ref:n},r.createElement(ce,{isPlaying:a,isForcePlaying:i,isDisabled:e||t}),r.createElement(me,{target:n,isDisabled:e||t}),r.createElement(ne,{isPlaying:a,tagging:"global-view"})))})),pe=function(){var e=(0,X.e)().getRoot();return r.createElement(fe,{chart:e})},ge=n(96929),he=function(e){var t=e.toggle,n=e.upToDate,o=e.hasBorder;return r.createElement(re.Z,{borderColor:"borderSecondary",hasHoverBackground:!0,hasBorder:o},r.createElement(k.Z,{content:"News & Announcements",align:"bottom"},r.createElement(a.Button,{name:"news",icon:"insights",flavour:"borderless",neutral:n,warning:!n,onClick:t,"data-ga":"news::click-news::global-view"})))},ve=function(){var e=(0,ge.zN)().length>0;return r.createElement(a.News,{app:"cloud"},(function(t){var n=t.toggle,o=t.upToDate;return r.createElement(a.Flex,{alignItems:"center","data-testid":"cloud-app-news",flex:!0,gap:1},r.createElement(he,{toggle:n,upToDate:o,hasBorder:!e}))}))},be=n(4514),ye=n(13710),we=n(45916),Ee=n(62200),xe={warning:{background:"warningBackground",isDissmissable:!0,icon:"warning_triangle_hollow",iconColor:"warning"},critical:{background:"errorBackground",isDissmissable:!1,icon:"warning_triangle_hollow",iconColor:"error"}},ke=function(e){var t=e.iconColor,n=e.icon,o=e.warningLevel,i=e.numberOfNodesWithCriticalSeverity,c=e.onClickUpdate;return r.createElement(a.Flex,{justifyContent:"center",alignItems:"center",width:"100%",gap:2},r.createElement(a.Icon,{"data-testid":"icon-banner-agent-outdated-".concat(o),color:t,name:n})," ",r.createElement(a.Text,{"data-testid":"text-agent-outdated-critical",color:"panel"},i," ",(0,P.V6)(i)," ",i>1?"are":"is"," below recommend agent version"," ",Ee._b,"."," ",r.createElement(a.Box,{"data-testid":"open-add-node",onClick:c,as:a.Text,cursor:"pointer",textDecoration:"underline",color:"panel"},"Please update them")," ","to ensure you get the latest security bug fixes."))},Ce=function(e){var t=e.warningLevel,n=e.numberOfNodesWithCriticalSeverity,o=e.onClose,a=e.onClickUpdate,i=xe[t],c=i.background,l=i.isDissmissable,u=i.icon,s=i.iconColor;return r.createElement(we.Z,{background:c,onClose:l?o:null},r.createElement(ke,{iconColor:s,icon:u,warningLevel:t,numberOfNodesWithCriticalSeverity:n,onClickUpdate:a}))},Oe=function(){var e=V().openModal,t=(0,Z.Ng)({severity:"critical"}).length;return t?r.createElement(Ce,{numberOfNodesWithCriticalSeverity:t,warningLevel:"critical",onClickUpdate:e}):r.createElement(r.Fragment,null)},Se=function(){var e=(0,Z.Ng)({severity:"critical"}).length;return r.createElement(r.Fragment,null,!e&&r.createElement(ye.Z,null),r.createElement(Oe,null))},Ze=function(e){var t=e.onOpenModalClick,n=(0,Z.Ng)({severity:"critical"}).length,o=(0,Z.Ng)().length;return o?r.createElement(re.Z,{borderColor:"borderSecondary",cursor:"pointer",testId:"update-netdata-version-menu-item",hasBorder:!0,padding:[2,0]},r.createElement(a.Pill,{"data-testid":"update-netdata-version-badge",flavour:n?"error":"warning",icon:"warning_triangle_hollow",iconSize:"16px",onClick:t,size:"small"},o)):null},Pe=n(24533),Ie=n(70842),je=n(64599),De={offline:{icon:"switch_off",color:"attention",text:"Offline"},online:{icon:"checkmark_s",color:"primary",text:"Online"}},Te=function(){var e=(0,s.Q6)(),t=(0,i.Iy)("isAnonymous"),n=(0,Pe.Lz)(),o=(0,p.Z)(n,1)[0],c=o.canBeClaimed,l=o.cloudStatus;if(t)return r.createElement(je.Z,null);if(!e)return null;if(De[l]){var u=De[l],d=u.icon,m=u.color,f=u.text;return r.createElement(a.Flex,{alignItems:"center",gap:1},r.createElement(a.Icon,{name:d,color:m,width:"14px",height:"14px"}),r.createElement(a.TextSmall,{color:m},f))}return c?r.createElement(Ie.Z,null):null},Ne=(0,o.Z)((function(){return Promise.all([n.e(367),n.e(714)]).then(n.bind(n,40644))}),"NodesIndicator"),_e=function(){var e=V(),t=e.isModalVisible,n=e.closeModal,o=e.openModal;return r.createElement(r.Fragment,null,r.createElement(Se,null),r.createElement(a.Flex,{as:"header","data-testid":"header",padding:[2],justifyContent:"between",alignItems:"center",height:12,position:"sticky",background:"topBarBg",zIndex:5},t&&r.createElement(K,{onClose:n}),r.createElement(S,null),r.createElement(a.Flex,{alignItems:"center","data-testid":"header-features",gap:3},r.createElement(ve,null),r.createElement(pe,null),r.createElement(r.Suspense,{fallback:r.createElement(be.c,{disabled:!0})},r.createElement(Ne,null)),r.createElement(Te,{margin:[0,1,0,0],padding:[2,4]}),r.createElement(Ze,{onOpenModalClick:o}))))},Fe=n(15257),Me=(0,w.default)(a.Flex).withConfig({displayName:"layout__UserControlContainer",componentId:"sc-18en99b-0"})(["bottom:0;left:0;"]),Ae=function(e){var t=e.children;return r.createElement(a.Flex,{width:"100vw",height:"100vh",column:!0,justifyContent:"center",alignItems:"center",background:"mainBackground",position:"relative"},t,r.createElement(Me,{position:"absolute",padding:[4]},r.createElement(Fe.Z,null)))},Le=(0,w.keyframes)(["from{opacity:0.4;}to{opacity:1;}"]),Be=(0,w.default)(a.Icon).withConfig({displayName:"loading__StyledIcon",componentId:"sc-11p1wp-0"})(["width:208px;height:177px;animation:"," 1.6s ease-in infinite;"],Le),Re=function(){return r.createElement(r.Fragment,null,r.createElement(Be,{name:"netdata",color:"primary",title:"Loading","data-testid":"spaceCreationLoading-logo"}),r.createElement(a.H3,{color:"text",margin:[1,0,0]},"We are attempting to create your space but the system is currently busy."),r.createElement(a.Text,{color:"text",margin:[4.5,0,0]},"Thank you for your patience!"))},ze=n(83732),Ve=function(){var e=(0,i.jr)(),t=(0,i.Iy)("email"),n=(0,r.useState)(!1),o=(0,p.Z)(n,2),c=o[0],l=o[1],u=(0,r.useCallback)((function(){return l(!1)}),[]),s=(0,ze.Z)({onSuccess:u,onError:u,isDefault:!0}),d=(0,r.useCallback)((function(){l(!0),s({userId:e,email:t})}),[e,t]);return r.createElement(a.Flex,{column:!0,gap:6,alignItems:"center"},r.createElement(a.Flex,{column:!0,gap:2,alignItems:"center"},r.createElement(a.H3,{color:"text"},"There was a problem with automatically creating your space"),r.createElement(a.Text,{color:"text"},"Please try again below")),r.createElement(a.Button,{label:"Continue",isLoading:c,onClick:d}))},Ue=function(){var e=(0,r.useState)(!0),t=(0,p.Z)(e,2),n=t[0],o=t[1];return(0,r.useEffect)((function(){var e=setTimeout((function(){return o(!1)}),1e4);return function(){return clearTimeout(e)}}),[]),r.createElement(Ae,null,n?r.createElement(Re,null):r.createElement(Ve,null))},He=n(78710),We=n(27622),Ge=function(){return r.createElement(a.Flex,{background:"sideBarMini","data-testid":"workspaceBar",padding:[3,2],column:!0,alignItems:"center",gap:6,height:"100vh",justifyContent:"between"},r.createElement(We.Z,{"data-testid":"workspaceBar-netdataLogo"}))},Ye=(0,o.Z)((function(){return n.e(264).then(n.bind(n,26264))}),"Sidebar"),Ke=(0,o.Z)((function(){return Promise.all([n.e(440),n.e(969)]).then(n.bind(n,65969))}),"Modals"),Je=(0,o.Z)((function(){return n.e(102).then(n.bind(n,48102))}),"AcceptTermsDialog"),qe=(0,o.Z)((function(){return Promise.all([n.e(193),n.e(663),n.e(367),n.e(380)]).then(n.bind(n,98478))}),"SpacePages"),Qe=function(e){var t=e.isUserLoaded;!function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).isUserLoaded,t=(0,l._8)((function(e){var t=e.set;return function(e){var n=e.results;t((0,s.YH)(),n),n.forEach((function(e){var n=e.id,r=e.permissions;t((0,d.SX)(n),r)}))}}),[]);(0,c.Z)((function(){return{key:"spaces",cache:!1,autorun:!!e,fetch:u.oq,association:{getIds:function(){return(0,s.st)("ids")},getError:function(){return(0,s.st)("error")},getLoaded:function(){return(0,s.st)("loaded")},getUpdatedAt:function(){return(0,s.st)("updatedAt")}},getResource:function(e){return(0,s.U7)({id:e})},onReceive:t,pollingOptions:{pollingInterval:412e3}}}),[!!e])}({isUserLoaded:t}),(0,m.Z)();var n=(0,s.Iw)(),o=(0,s.GM)("loaded"),p=(0,s.GM)("error"),g=(0,i.Iy)("isAnonymous");if(!t||!p&&!g&&!o)return r.createElement(f.Z,{title:"Loading your space..."});var h=n.length;if(p&&!h)throw p;return He.ZP||g||h?r.createElement(a.Flex,{overflow:"hidden",height:"100vh",width:"100vw"},r.createElement(r.Suspense,{fallback:r.createElement(Ge,null)},r.createElement(Ye,null)),r.createElement(a.Flex,{column:!0,position:"relative",overflow:"hidden",flex:!0},r.createElement(_e,null),r.createElement(a.Flex,{column:!0,as:"main",background:"mainBackground",flex:!0,basis:"100%",height:"100%",overflow:"hidden"},r.createElement(r.Suspense,{fallback:r.createElement(f.Z,{title:"Loading your space..."})},r.createElement(qe,null)))),r.createElement(r.Suspense,{fallback:""},r.createElement(Ke,null),r.createElement(Je,null))):r.createElement(Ue,null)}},27622:function(e,t,n){var r=n(87462),o=n(67294),a=n(15557);t.Z=function(e){return o.createElement(a.Icon,(0,r.Z)({name:"netdataPress",color:"success",height:"32px",width:"32px"},e))}},67622:function(e,t,n){n.d(t,{z:function(){return d}});var r=n(87462),o=n(45987),a=n(67294),i=n(60677),c=n(15557),l=n(89250),u=["disabled","children","Wrapper","textProps","to","onClick","testid","icon","iconHeight","iconWidth","iconColor","textColor","padding","margin","round","gap","actions","selected","loading","width","isSidebar","isSecondary"],s=function(e){return e?"selected":"borderSecondary"},d=(0,i.default)(c.Flex).withConfig({displayName:"item__PanelRowContainer",componentId:"sc-lf007z-0"})(["cursor:pointer;&:hover{background:",";}",""],(function(e){return(0,c.getColor)(s(e.isSidebar))(e)}),(function(e){return e.selected&&"background: ".concat((0,c.getColor)(s(e.isSidebar))(e),";")})),m=(0,i.default)(c.Icon).withConfig({displayName:"item__StyledIcon",componentId:"sc-lf007z-1"})(["flex:0 0 auto;"]),f=(0,i.default)(c.IconComponents.LoaderIcon).withConfig({displayName:"item__StyledLoaderIcon",componentId:"sc-lf007z-2"})(["flex:0 0 auto;height:16px;width:16px;"]),p=(0,a.forwardRef)((function(e,t){var n=e.disabled,i=e.children,s=e.Wrapper,p=void 0===s?c.Text:s,g=e.textProps,h=e.to,v=void 0===h?"":h,b=e.onClick,y=e.testid,w=e.icon,E=e.iconHeight,x=void 0===E?"16px":E,k=e.iconWidth,C=void 0===k?"16px":k,O=e.iconColor,S=void 0===O?"text":O,Z=e.textColor,P=void 0===Z?"text":Z,I=e.padding,j=void 0===I?[2,4]:I,D=e.margin,T=void 0===D?[0]:D,N=e.round,_=void 0===N?0:N,F=e.gap,M=void 0===F?3:F,A=e.actions,L=e.selected,B=e.loading,R=e.width,z=void 0===R?"100%":R,V=e.isSidebar,U=void 0!==V&&V,H=e.isSecondary,W=(0,o.Z)(e,u),G=(0,l.s0)(),Y=(0,a.useCallback)((function(){n||(b&&b(),v&&G(v))}),[b,n,v]),K=W["data-ga"]||"";return a.createElement(d,(0,r.Z)({ref:t,flexWrap:!1,justifyContent:"between",alignItems:"center",padding:j,margin:T,round:_,onClick:Y,"data-testid":y,width:z,selected:L,disabled:n,isSidebar:U},K&&{"data-ga":K}),a.createElement(c.Flex,{alignItems:"center",gap:M,flex:!0,basis:""},B?a.createElement(f,null):"string"===typeof w?a.createElement(m,{name:w,disabled:n,color:S,height:x,width:C}):w,a.createElement(p,(0,r.Z)({opacity:n?"medium":void 0,width:"150px",color:P,italic:H},g),i)),A)}));t.Z=p},61458:function(e,t,n){n.d(t,{g:function(){return u}});var r=n(87462),o=n(45987),a=n(67294),i=n(60677),c=n(15557),l=["disabled","isOpen","toggleOpen","label","children","headerTestId","Header"],u=(0,i.default)(c.H4).attrs({padding:[0,2],background:"error"}).withConfig({displayName:"list__DefaultListHeader",componentId:"sc-5df7lw-0"})(["cursor:pointer;pointer-events:",";"],(function(e){return e.disabled?"none":"auto"})),s=function(e){var t=e.disabled,n=e.toggleOpen,r=e.label,o=e.testid,i=e.Header,c=void 0===i?u:i;return a.createElement(c,{"data-testid":o,onClick:n,opacity:t?"medium":void 0,disabled:t},r)};t.Z=function(e){var t=e.disabled,n=e.isOpen,i=void 0!==n&&n,u=e.toggleOpen,d=e.label,m=e.children,f=e.headerTestId,p=e.Header,g=(0,o.Z)(e,l);return a.createElement(c.Flex,(0,r.Z)({column:!0},g),a.createElement(s,{disabled:t,Header:p,toggleOpen:u,label:d,testid:f}),a.createElement(c.Collapsible,{open:i},m))}},13710:function(e,t,n){var r=n(29439),o=(n(26699),n(32023),n(67294)),a=n(37518),i=n(96929),c=n(45916),l=n(15557),u=n(5795),s=n(46667),d=n(89250),m=n(53338),f=n(33335);t.Z=function(){var e=(0,a.UL)(),t=(0,i.X7)(e,"ids"),n=(0,s.Z)(),p=(0,r.Z)(n,4),g=p[0],h=p[2],v=p[3],b=(0,i.X7)(e,"loaded"),y=(0,d.TH)().pathname,w=(0,f.gI)("node:Create"),E=(0,a.vf)(),x=y.includes("/overview")||y.includes("/nodes")&&!y.includes("/nodes/"),k=0===t.length?"You have no nodes. To unleash the full power of Netdata please add":"You only have one node! To unleash the full power of Netdata please add",C=t.length<2,O=b&&!t.length;return C&&b&&(x||O)&&w&&E===m.i_?o.createElement(c.Z,{background:"successBackground"},o.createElement(l.Flex,{justifyContent:"center",alignItems:"center",width:"100%",gap:2},o.createElement(l.Icon,{"data-testid":"icon-banner-need-more-nodes",color:"primary",name:"add_node"}),o.createElement(l.Text,{"data-testid":"text-need-more-nodes",color:"panel"},k," ",o.createElement(l.Box,{"data-testid":"open-add-node",onClick:h,as:l.Text,cursor:"pointer",textDecoration:"underline",color:"panel"},"two or more nodes!")),g&&o.createElement(u.Z,{onClose:v,room:e}))):null}},83925:function(e,t,n){var r=n(87462),o=n(4942),a=n(45987),i=(n(92222),n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),c=n(15557),l=n(62200),u=n(82902),s=n(64637),d=["warningLevel","text","container","os","name","labels","version"];function m(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}var f={warning:{icon:"warning_triangle_hollow",iconColor:"warning",flavour:"warning",hollow:"warning",reccomendedVersion:l.I3,warningText:"is below the latest stable agent version"},critical:{icon:"warning_triangle_hollow",iconColor:"error",flavour:"error",hollow:"error",reccomendedVersion:l._b,warningText:"is below the recommend agent version"}},p=function(e){var t=e.icon,n=e.iconColor,r=e.warningLevel,o=e.handeleNavigateToDocs,a=e.message;return i.createElement(c.Flex,{column:!0,width:{max:"200px"},gap:2},i.createElement(c.Flex,{alignItems:"center",gap:2},i.createElement(c.Icon,{name:t,color:n}),i.createElement(c.TextMicro,{color:"white"},(0,s.fm)(r))),i.createElement(c.Flex,{column:!0,gap:2},i.createElement(c.TextMicro,{color:"white"},a),i.createElement(c.TextMicro,{"data-testid":"text-agent-outdated-critical",color:"white"},i.createElement(c.Box,{"data-testid":"open-add-node",onClick:o,as:c.TextMicro,cursor:"pointer",textDecoration:"underline",color:"white"}," ","Please update them"," "),"to ensure you get the latest security bug fixes.")))};t.Z=function(e){var t=e.warningLevel,n=e.text,l=void 0===n?"Needs Update":n,g=e.container,h=e.os,v=e.name,b=e.labels,y=e.version,w=(0,a.Z)(e,d),E=f[t],x=E.icon,k=E.flavour,C=E.hollow,O=E.reccomendedVersion,S=E.iconColor,Z=E.warningText,P=(0,i.useCallback)((function(){var e=(0,u.Ly)(function(e){for(var t=1;t label{margin-bottom:0;}"]),u=["value","onChange"],s=(0,a.forwardRef)((function(e,t){var n=e.value,i=e.onChange,c=(0,o.Z)(e,u);return a.createElement(l,(0,r.Z)({inputRef:t,value:n,onChange:i,placeholder:"Search",name:"search",metaShrinked:!0},c))}))},7693:function(e,t,n){n.d(t,{A:function(){return l},x:function(){return u}});var r=n(87462),o=n(45987),a=n(67294),i=n(15557),c=["children","isSubmodal","onClose","title"],l=14,u=function(e){var t=e.children,n=e.isSubmodal,u=e.onClose,s=e.title,d=(0,o.Z)(e,c);return a.createElement(i.Flex,{justifyContent:"between",background:"modalHeaderBackground",alignItems:"center",padding:[0,4]},a.createElement(i.Flex,{alignItems:"center",height:l},a.createElement(i.Button,{neutral:!0,flavour:"borderless",icon:n?"chevron_left":"x",onClick:u,"data-testid":"sidebarModalHeader_".concat(n?"chevron_left":"close_button")}),a.createElement(i.H4,(0,r.Z)({color:"text"},d),s)),t)}},16645:function(e,t,n){n.d(t,{TZ:function(){return s},ZW:function(){return d},oU:function(){return u},u6:function(){return l}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(60677),a=n(15557),i=n(7693);function c(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}var l=(0,o.default)(a.PortalSidebar).withConfig({displayName:"sidebar__SidebarModal",componentId:"sc-tmwerm-0"})(["z-index:35;background:",";width:50%;max-width:",";overflow:",";"],(0,a.getColor)("mainBackground"),(0,a.getSizeBy)(90),(function(e){var t=e.overflow;return void 0===t?"hidden":t})),u=(0,o.default)(a.PortalSidebar).withConfig({displayName:"sidebar__FullModal",componentId:"sc-tmwerm-1"})(["z-index:35;background:",";width:100%;overflow:",";"],(0,a.getColor)("mainBackground"),(function(e){var t=e.overflow;return void 0===t?"hidden":t})),s=(0,o.default)(a.Flex).attrs((function(e){return function(e){for(var t=1;t .button-icon{width:24px;height:24px;}}"]),I=function(e){var t=e.dropdownBackground,n=void 0===t?"dropdown":t,i=(0,p.Iy)("avatarURL"),v=(0,p.Iy)("isAnonymous"),b=(0,f.Z)(),y=(0,a.Z)(b,4),E=y[0],I=y[2],j=y[3],D=(0,c.useCallback)((function(){window.open("https://status.netdata.cloud","_blank")}),[]),T=(0,g.UQ)(),N=(0,h.Z)(),_=(0,w.Z)(),F=_.handleOpenProfileModal,M=_.handleCloseProfileModal,A=_.isProfileModalOpen,L=(0,c.useMemo)((function(){return[{name:"Settings",onClick:F,hasSeparator:!1,testid:"userControl-settings"},{name:"Operational Status",onClick:D,hasSeparator:!1,testid:"userControl-operationalStatus"},{name:"Sign In",onClick:N,hasSeparator:!0,testid:"userControl-signOut"},{name:"Sign Out",onClick:T,hasSeparator:!0,testid:"userControl-signOut"}].filter((function(e){return Z[e.name]({isAgent:O.ZP,isAnonymous:v})}))}),[v,O.ZP]);return c.createElement(u.Z,null,c.createElement(k.Z,!v&&{content:"Edit your account settings and manage your notifications",align:"right"},v?c.createElement(k.Z,{content:"Sign In",align:"right"},c.createElement(P,{small:!0,icon:"sign_in",onClick:I,"data-ga":"sidebar-sign-in::click-dropdown::global-view","data-testid":"sign-in-dropdown",iconSize:"medium",margin:[0,0,2]})):c.createElement(m.Z,{src:i||"","data-testid":"userControl-userAvatar",onClick:I})),E&&c.createElement(l.Layer,{margin:[5,17],position:"bottom-left",onClickOutside:j,onEsc:j},c.createElement(C,{width:52,background:n,padding:[3]},L.map((function(e){var t=e.hasSeparator,n=e.name,a=(0,o.Z)(e,S);return c.createElement(c.Fragment,{key:n},t&&c.createElement(s,{key:"".concat(n,"-itemSeparator")}),c.createElement(d.Z,(0,r.Z)({key:n,round:1},a),n))})))),A&&c.createElement(x,{onClose:M}))}},16772:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(15557),c=["onChange","value","onKeyDown","label"];t.Z=function(e){var t=e.onChange,n=e.value,l=e.onKeyDown,u=e.label,s=(0,o.Z)(e,c);return a.createElement(i.TextInput,(0,r.Z)({label:u,name:"userEmail",placeholder:"Enter an email address",value:n,onChange:t,onKeyDown:l},s))}},62289:function(e,t,n){n.d(t,{Z:function(){return et}});var r=n(29439),o=(n(57327),n(41539),n(88449),n(2490),n(59849),n(47941),n(26699),n(32023),n(67294)),a=n(65351),i=n(13477),c=n(15557),l=n(30688),u=n(31203),s=n(1043),d=n(46667),m=n(87462),f=n(93433),p=n(45987),g=(n(92222),n(71752)),h=["value","isValid","setIsValid","onChange","label","validators","fieldMessage"],v="User name cannot exceed ".concat(40," characters"),b=function(e){var t=e.length<=40;return(0,l.f)(t,v)},y=function(e){var t=e.value,n=e.isValid,a=e.setIsValid,i=e.onChange,u=e.label,s=e.validators,d=void 0===s?[]:s,v=e.fieldMessage,y=(0,p.Z)(e,h),w=(0,l.A)([b].concat((0,f.Z)(d))),E=(0,o.useState)(""),x=(0,r.Z)(E,2),k=x[0],C=x[1];return(0,o.useEffect)((function(){var e=w(t),r=e.isValid,o=(0,g.T)(e);!n&&r?a(!0):n&&!r&&a(!1),C(o||"")}),[n,t]),o.createElement(c.TextInput,(0,m.Z)({label:u||" ",name:"userName",placeholder:"Enter the user's name",value:t,onChange:i,fieldMessage:v,error:!n&&k},y))},w=n(16772),E=n(46715),x=n(74059),k=n(94666),C=n(72671),O=n(60677),S=(0,O.default)(c.Text).withConfig({displayName:"styled__Label",componentId:"sc-anprf9-0"})(["height:",";font-weight:bold;display:flex;align-items:center;margin-bottom:",";"],(0,c.getSizeBy)(3),(0,c.getSizeBy)(3)),Z=O.default.div.withConfig({displayName:"styled__AvatarBlock",componentId:"sc-anprf9-1"})(["height:",";display:flex;margin-bottom:",";"],(0,c.getSizeBy)(10),(0,c.getSizeBy)(4)),P=(O.default.div.withConfig({displayName:"styled__GravatarInfo",componentId:"sc-anprf9-2"})(["padding:0 ",";display:flex;flex-direction:column;justify-content:center;"],(0,c.getSizeBy)(2)),(0,O.default)(c.TextSmall).withConfig({displayName:"styled__StyledTextSmall",componentId:"sc-anprf9-3"})(["margin-bottom:",";"],(0,c.getSizeBy)(2)),(0,O.default)(c.TextNano).withConfig({displayName:"styled__StyledTextNano",componentId:"sc-anprf9-4"})(["color:",";"],(0,c.getColor)("textFocus")),O.default.div.withConfig({displayName:"styled__RadioRow",componentId:"sc-anprf9-5"})(["display:flex;flex-flow:row nowrap;align-items:center;padding:0 0 "," ",";"],(0,c.getSizeBy)(2),(0,c.getSizeBy)(1))),I=O.default.section.withConfig({displayName:"styled__StyledSection",componentId:"sc-anprf9-6"})(["display:flex;margin-top:auto;justify-content:flex-end;"]),j=[function(e){return(0,l.f)(!!e,"Name should not be empty")}],D=function(){},T=(0,C.F)((function(e){var t=e.isLastMember,n=e.spaceName,r=e.children;return o.createElement(c.Flex,{column:!0,gap:2},o.createElement(c.Text,null,"You are about to delete your account at ",o.createElement("strong",null,"Netdata"),". All data related to your account will be deleted."),t&&o.createElement(o.Fragment,null,o.createElement(c.Text,null,o.createElement(c.Text,{strong:!0},n)," space will be deleted since you are the last member."),r),o.createElement(c.Text,null,"This cannot be undone. Are you sure you want to continue?"))})),N=function(e){var t=e.setFormValid,n=e.setFormState,a=(0,i.Iy)("name"),l=(0,c.useInputValue)({value:a,maxChars:40}),m=(0,r.Z)(l,4),f=m[0],p=m[1],g=m[2],h=m[3],v=(0,o.useState)(!1),b=(0,r.Z)(v,2),C=b[0],O=b[1],P=(0,d.Z)(),N=(0,r.Z)(P,4),_=N[0],F=N[2],M=N[3],A=(0,d.Z)(),L=(0,r.Z)(A,2),B=L[0],R=L[1],z=(0,E.RP)().value,V=(0,x.OS)(),U=1===(0,k.H4)().length,H=(0,i.Iy)("email"),W=(0,i.Iy)("avatarURL");(0,o.useEffect)((function(){h&&t(C)}),[h,C]),(0,o.useEffect)((function(){n({name:f})}),[f]);var G=(0,s.R2)();return o.createElement(o.Fragment,null,o.createElement(S,{"data-testid":"userProfile-label"},"Photo"),o.createElement(Z,{"data-testid":"userProfile-avatarSection"},o.createElement(u.Z,{src:W||"","data-testid":"userProfile-avatar",width:24,height:24})),o.createElement(y,{"data-testid":"userProfile-username",value:f,label:"Name",onChange:p,isValid:C,setIsValid:O,validators:j,fieldIndicator:g,instantFeedback:"positiveFirst",isDirty:h}),o.createElement(w.Z,{"data-testid":"userProfile-email",label:"Email",disabled:!0,value:H,onChange:D}),o.createElement(I,{"data-testid":"userProfile-actions"},o.createElement(c.Button,{danger:!0,onClick:F,label:"Delete account","data-ga":"user-profile-settings::click-delete::global-view","data-testid":"userProfile-deleteAccount-button"}),_&&o.createElement(c.ConfirmationDialog,{confirmLabel:B?"Deleting...":"Yes, delete","data-ga":"delete-account-dialog","data-testid":"deleteAccountDialog",handleConfirm:function(){R(),G()},handleDecline:M,message:o.createElement(T,{isLastMember:U,spaceName:V.name,currentPlan:z}),title:"Delete Account",isConfirmDisabled:B,isConfirmLoading:B,isDeclineDisabled:B})))},_=n(91008),F=function(e){var t=e.gaPrefix,n=void 0===t?"cookie-consent":t,r=e.gaView,a=void 0===r?"global-view":r,i=e.testPrefix,l=void 0===i?"cookieConsent":i;return o.createElement(c.TextSmall,{"data-testid":"".concat(l,"-description")},"This website stores cookies on your computer. These cookies are used to collect information about how you interact with our website and allow us to remember you. We use this information to improve and customize your browsing experience and for analytics and metrics about our visitors on this website and other media. To find out more about the cookies we use, see Netdata's"," ",o.createElement(_.Z,{alignSelf:"start",Component:c.TextSmall,"data-ga":"".concat(n,"::click-policy-link::").concat(a),"data-testid":"".concat(l,"-policyLink"),href:"https://netdata.cloud/privacy",rel:"noopener noreferer",target:"_blank"},"Privacy Policy"),".")},M=n(4942),A=(n(15581),n(34514),n(54747),n(39714),n(21249),n(57640),n(9924),n(26833),n(82526),n(41817),n(38880),n(49337),n(33321),n(69070),n(92432)),L=n(80606),B=n(78401),R=n(52971),z=n(85456),V=(0,O.default)(c.Button).attrs({textTransform:"none",width:"auto"}).withConfig({displayName:"styled__Action",componentId:"sc-aj53iu-0"})(["&&{height:36px;","}"],(function(e){return e.isBanner&&"\n border-width: 0;\n \n > span {\n align-items: center;\n display: flex;\n }\n "}));(0,O.default)(c.Box).withConfig({displayName:"styled__AppContainer",componentId:"sc-aj53iu-1"})(["backdrop-filter:blur(2.5px);background-color:rgba(255,255,255,0.7);inset:0;pointer-events:all;position:absolute;z-index:10;"]),(0,O.default)(c.Icon).attrs({color:"primary",name:"chevron_down_thin"}).withConfig({displayName:"styled__ArrowIcon",componentId:"sc-aj53iu-2"})(["",";"],(function(e){return e.isOpen&&"transform: rotate(180deg);"})),(0,O.default)(c.Box).attrs({background:"bright",border:{color:"borderSecondary",side:"top"},width:"100%"}).withConfig({displayName:"styled__BannerContainer",componentId:"sc-aj53iu-3"})(["bottom:0;position:absolute;"]);function U(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 H(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};return function(){(0,ae.Z)(e);var n=(0,ce.sc)(ue(ue({},ue({header:"Copied",text:"Token copied to your clipboard!",icon:"gear"},t)),{},{success:!0}));ie.Am.success(n,{context:"copy"})}},de=function(e){var t=e.onCloseModal,n=e.token;return o.createElement(c.ModalContent,null,o.createElement(c.ModalHeader,null,"Token Generated",o.createElement(c.ModalCloseButton,{testId:"close-button",onClose:t})),o.createElement(c.ModalBody,null,o.createElement(c.Flex,{column:!0,gap:4},o.createElement(te,null,o.createElement("span",{"data-testid":"token"},n),o.createElement(oe,{name:"copy",size:"small",color:"primary",onClick:se(n),"data-ga":"profile::click-copytoken::all-pages::api-token"})),o.createElement(c.Flex,{alignItems:"center",background:"warningBackground",gap:4,padding:[3,3],round:!0},o.createElement(ne,{"data-testid":"noNodesView-warningBannerIcon",name:"exclamation",color:"warning"}),o.createElement(re,{"data-testid":"warning-message"},"Make sure to copy or store this token and add it where you need it. Once you close this modal you will not be able to retrieve it again.")))),o.createElement(c.ModalFooter,null,o.createElement(c.Button,{label:"Close",onClick:t})))},me=n(26398),fe=function(e){return me.Z.post("/api/v1/auth/account/api-token",{description:e})},pe=function(e){var t=e.onCloseModal,n=e.onTokenCreated,a=e.view,i=e.token,l=(0,o.useState)(a),u=(0,r.Z)(l,2),s=u[0],d=u[1],m=(0,o.useState)(i),f=(0,r.Z)(m,2),p=f[0],g=f[1],h=function(){var e=(0,Q.Z)(X().mark((function e(t){var r;return X().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fe(t);case 2:r=e.sent,(0,A.L)("api-token","create-token","profile",t),g(r.data.token),d("CopyTokenView"),n();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return o.createElement(c.Modal,null,"CreateView"===s&&o.createElement(ee,{"data-testid":"create-view",onCloseModal:t,onCreate:h}),"CopyTokenView"===s&&p&&o.createElement(de,{onCloseModal:t,token:p}))},ge=n(49546);function he(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 ve(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{}).modalName,t=void 0===e?"profile":e,n=(0,i.Iy)("isAnonymous"),c=(0,o.useMemo)((function(){return Object.keys($e).filter((function(e){return Qe[n?"offline":"online"].includes(e)}))}),[n]),l=(0,a.Z)(t),u=l.isModalOpen,s=l.currentModalTab,d=l.handleOpenModal,m=l.handleCloseModal,f=l.handleChangeModalTab,p=(0,o.useState)(Xe(s)),g=(0,r.Z)(p,2),h=g[0],v=g[1],b=function(e){f(e)};return(0,o.useEffect)((function(){v(Xe(s))}),[s]),{handleOpenProfileModal:function(){d(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"profile")},handleCloseProfileModal:function(){m()},getPreselectedTab:Xe,setCurrentTab:b,handleChangeTab:function(e){var t=c[e];v(e),b(t)},tabs:c,tabsByName:$e,activeTabIndex:h,isProfileModalOpen:u}}},83356:function(e,t,n){n(74916),n(15306),n(92222);var r=n(67294),o=n(89250),a=n(64637),i=n(78710);t.Z=function(){var e=(0,o.s0)();return(0,r.useCallback)((function(){if(i.ZP){var t=window.location.origin+window.location.pathname.replace(i.tj,"");window.location.href=(0,a.h2)("".concat(window.envSettings.cloudUrl,"/trust?redirect_uri=").concat(encodeURIComponent(window.location.href),"&agent_uri=").concat(encodeURIComponent(t||window.envSettings.agentApiUrl)))}else e("/sign-in")}),[])}},82040:function(e,t,n){n.d(t,{IC:function(){return g},Sq:function(){return f},cA:function(){return v},l9:function(){return p}});var r=n(87462),o=n(15861),a=n(64687),i=n.n(a),c=(n(92222),n(67294)),l=n(15557),u=n(55899),s="delete-node-dialog",d="deleteNodeDialog",m=function(e){var t=1===e;return"Delete ".concat(e," ").concat(t?"node":"nodes")},f=function(e){return"Delete ".concat(e," node")},p=function(e){var t=e.name,n=e.nodesLength;return n?1===n&&t?f(t):m(n):""},g=function(e){var t=e.name;return c.createElement(c.Fragment,null,"You are about to delete offline node ",c.createElement("strong",null,t),".",c.createElement("br",null),"Node will be removed from all rooms and will no longer be accessible. Plus all metadata will be removed.",c.createElement("br",null),"Are you sure you want to continue?")},h=function(e){var t=e.nodesLength,n=1===t;return c.createElement(c.Fragment,null,"You are about to delete ",n?"this":"these"," ",c.createElement("strong",null,t," offline ",n?"node":"nodes"),".",c.createElement("br",null),n?"Node":"Nodes"," will be removed from all rooms and will no longer be accessible. Plus all metadata will be removed.",c.createElement("br",null),"Are you sure you want to continue?")},v=function(e){var t=e.name,n=e.nodesLength;return n?1===n&&t?c.createElement(g,{name:t}):c.createElement(h,{nodesLength:n}):""};t.ZP=function(e){var t=e.ids,n=void 0===t?[]:t,a=e.name,p=e.onClose,v=(0,u.Z)(),b=function(){var e=(0,o.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v(n);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),y=a?{"data-ga":"".concat(s,"-with-name"),"data-testid":"".concat(d,"WithName"),message:c.createElement(g,{name:a}),title:f(a)}:{"data-ga":"".concat(s,"Bulk"),"data-testid":"".concat(d,"Bulk"),message:c.createElement(h,{nodesLength:n.length}),title:m(n.length)};return c.createElement(l.ConfirmationDialog,(0,r.Z)({confirmLabel:"Yes, delete",handleConfirm:b,handleDecline:p},y))}},5633:function(e,t,n){n.d(t,{Br:function(){return f},O3:function(){return h},ar:function(){return b},d1:function(){return g}});var r=n(87462),o=n(15861),a=n(64687),i=n.n(a),c=(n(92222),n(67294)),l=n(15557),u=n(27624),s=n(37518),d="remove-node-dialog",m="removeNodeDialog",f=function(e){return"Remove ".concat(e," node")},p=function(e){var t=1===e;return"Remove ".concat(e," ").concat(t?"node":"nodes")},g=function(e){var t=e.name,n=e.nodesLength;return n?1===n&&t?f(t):p(n):""},h=function(e){var t=e.name,n=e.roomName;return c.createElement(c.Fragment,null,"You are about to remove ",c.createElement("strong",null,t)," from room ",c.createElement("strong",null,n),".",c.createElement("br",null),"Are you sure you want to continue?")},v=function(e){var t=e.nodesLength,n=e.roomName,r=1===t;return c.createElement(c.Fragment,null,"You are about to remove"," ",c.createElement("strong",null,t," ",r?"node":"nodes")," ","from room ",c.createElement("strong",null,n),".",c.createElement("br",null),"Are you sure you want to continue?")},b=function(e){var t=e.name,n=e.nodesLength,r=e.roomName;return n?1===n&&t?c.createElement(h,{name:t,roomName:r}):c.createElement(v,{nodesLength:n,roomName:r}):""};t.ZP=function(e){var t=e.ids,n=void 0===t?[]:t,a=e.name,g=e.onClose,b=(0,u.Z)(),y=n.length,w=(0,s.Hm)("name"),E=function(){var e=(0,o.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b(n);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),x=a?{"data-ga":"".concat(d,"WithName"),"data-testid":"".concat(m,"WithName"),message:c.createElement(h,{name:a,roomName:w}),title:f(a)}:{"data-ga":"".concat(d,"Bulk"),"data-testid":"".concat(m,"Bulk"),message:c.createElement(v,{nodesLength:y,roomName:w}),title:p(y)};return c.createElement(l.ConfirmationDialog,(0,r.Z)({handleConfirm:E,handleDecline:g},x))}},89014:function(e,t,n){n.d(t,{m4:function(){return f},aJ:function(){return d},Ho:function(){return s},h8:function(){return u},Id:function(){return m},d6:function(){return g},Lo:function(){return p},En:function(){return h}});var r,o=n(4942),a="clear",i="warning",c="critical",l="unreachable",u="N/A",s={groupsOrder:{alertStatus:(r={},(0,o.Z)(r,c,1),(0,o.Z)(r,i,2),(0,o.Z)(r,a,3),(0,o.Z)(r,l,4),r),nodeStatus:{Online:1,Stale:2,Offline:3}},prioritySettings:{unprioritizedGroupsPlacement:1}},d=48,m=88,f=75,p=74,g=2,h=0},89050:function(e,t,n){n.d(t,{Aw:function(){return L},Br:function(){return B},Dy:function(){return C},I$:function(){return v},Lt:function(){return k},MC:function(){return Z},O2:function(){return O},Q5:function(){return x},V3:function(){return p},_0:function(){return b},cB:function(){return S},jG:function(){return R},jo:function(){return A},kR:function(){return w},oy:function(){return h},yK:function(){return T},yo:function(){return D},ys:function(){return I}});n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(15861),o=n(4942),a=n(64687),i=n.n(a),c=(n(85827),n(41539),n(25387),n(2490),n(72608),n(66992),n(33948),n(92222),n(69826),n(31672),n(59461),n(47941),n(47042),n(26699),n(32023),n(57327),n(88449),n(59849),n(21249),n(57640),n(9924),n(67294)),l=n(41379),u=n(71172),s=n(89014);function d(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 m(e){for(var t=1;t9?"9+":"".concat(e)},w=function(e){var t=e.count,n=e.dataTestId,r=e.isLive,o=e.onAlertClick,a=e.type,i=n?"".concat(n,"-alertIndicator"):"alertIndicator",c={"data-testid":"".concat(i,"-").concat(a)};return r?m(m(m(m({},c),t&&{flavour:"critical"===a?"error":"warning"}),t&&o&&{onClick:function(){return o(a)}}),{},{text:y(t)}):c},E={created:"Unseen",reachable:"Live",stale:"Stale",unreachable:"Offline"},x=function(e){return E[e]||E.stale},k=function(e){return"created"===e?"Pending":"Completed"},C=function(e){return e?{background:"nodeBadgeBackground",border:"successText",color:"successText",label:"ON",status:"ON"}:{background:"nodeBadgeBackground",border:"warningText",color:"warningText",label:"OFF",status:"OFF"}},O=function(e){return!e||"unknown"===e},S=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" \u2022 ";return O(e)?s.h8:"".concat(e).concat(n).concat(t)},Z=function(e,t){return O(e)?s.h8:t?"".concat(e," ").concat(t):e},P={HZ:1,KHz:1e3,MHz:1e6,GHz:1e9,THz:1e12,PHz:1e15,EHz:1e18},I=function(e){if(O(e))return s.h8;var t=Object.keys(P).find((function(t){return 1e3>e/P[t]}));return"".concat((e/=P[t]).toFixed(2)," ").concat(t||"")},j={B:1,KiB:1024,MiB:1048576,GiB:1073741824,TiB:1099511627776,PiB:0x4000000000000,EiB:0x1000000000000000},D=function(e){if(O(e))return s.h8;var t=Object.keys(j).find((function(t){return 1024>e/j[t]}));return"".concat((e/=j[t]).toFixed(2)," ").concat(t||"")},T=function(e,t,n,r,o){var a={Live:c.createElement(c.Fragment,null,"is currently connected"),Offline:c.createElement(c.Fragment,null,"is currently not connected"),Stale:c.createElement(c.Fragment,null,"is currently not",c.createElement("br",null),"connected and has",c.createElement("br",null),"only historical data")},i={actionObsolete:c.createElement(c.Fragment,null,"Delete Node"),actionRemove:c.createElement(c.Fragment,null,"Remove Node from room"),alerts:c.createElement(c.Fragment,null,"The current Critical and",c.createElement("br",null),"Warning alerts for",c.createElement("br",null),r),cloudInfo:c.createElement(c.Fragment,null,r,c.createElement("br",null),"cloud information:",c.createElement("br",null),"Cloud Provider \u2022 Instance Type"),connectivity:t in a?c.createElement(c.Fragment,null,r,c.createElement("br",null),a[t]):c.createElement(c.Fragment,null),info:c.createElement(c.Fragment,null,"View node information"),k8s:c.createElement(c.Fragment,null,r," runs on Kubernetes cluster"),kernel:c.createElement(c.Fragment,null,"Kernel information of ",r),ml:c.createElement(c.Fragment,null,"Machine Learning status of ",r," is: ",n),fn:c.createElement(c.Fragment,null,"Functions capability of ",r," is: ",n),functions:c.createElement(c.Fragment,null,r," functions"),systemInfo:c.createElement(c.Fragment,null,r,c.createElement("br",null),"hardware information:",c.createElement("br",null),"O/S \u2022 CPU Frequency \u2022 CPU Cores \u2022 Architecture \u2022 Memory \u2022 Hard Disk Space"),type:c.createElement(c.Fragment,null,"The type of ",r,c.createElement("br",null),"is: ",o)};return e in i?i[e]:""},N={none:!0,null:!0,unknown:!0},_=function(e){return!!e&&!N[e]},F={container:"container","container-other":"container",other:"container"},M={"$(systemd-detect-virt -v)":"vm","$(systemd-detect-virt -v) docker-compose up":"vm","${VIRTUALIZATION}":"vm","(systemd-detect-virt -v)":"vm","detect-virt -v":"vm",lxc:"vm","none #vmware":"vmware",other:"vm","systemd-detect-virt -v":"vm",unknown:"vm","vm-other":"vm","VMware Virtual Platform":"vmware"},A=function(e,t){return _(e)?{icon:"container",iconSize:"18px",label:F[e]||e}:_(t)?{icon:"cluster",iconSize:"18px",label:M[t]||t}:{icon:"ram",iconSize:"14px",label:"Bare Metal"}},L=function(e){var t=e.orderedRows,n=e.start,r=e.end;return t.slice(n,r+1).reduce((function(e,t){return t.original&&!e.includes(t.original.id)&&e.push(t.original.id),e}),[])},B=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r,o,a,c,s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.cacheKeyPrefix,r=t.nodeIds,o=t.roomId,a=t.spaceId,c=function(e){return e.results.filter((function(e){return!r.includes(e.id)}))},s="".concat(n).concat((0,l.A)({id:o,spaceId:a})),e.next=5,(0,u.c)({key:s,handleResults:c});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),R=function(){var e=(0,r.Z)(i().mark((function e(t){var n,o,a,c,s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.cacheKeyPrefix,o=t.nodeIds,a=t.roomIds,c=t.spaceId,s=function(e){return e.results.filter((function(e){return!o.includes(e.id)}))},a.map(function(){var e=(0,r.Z)(i().mark((function e(t){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="".concat(n).concat((0,l.A)({id:t,spaceId:c})),e.next=3,(0,u.c)({key:r,handleResults:s});case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},18129:function(e,t,n){n.d(t,{Z:function(){return Q}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(67294),a=n(15557),i=n(96929),c=n(5795),l=n(33335),u=n(29439),s=(n(26699),n(32023),n(21249),n(57640),n(9924),n(89250)),d=n(37518),m=n(97945),f=n(46322),p=(n(64211),n(41874),n(11389)),g=(n(92222),n(62200)),h=n(64637),v=n(89050),b=function(e){var t=e.icon,n=e.status,r=e.handleNavigateToDocs,i=e.message;return o.createElement(a.Flex,{column:!0,width:{max:"200px"},gap:2},o.createElement(a.Flex,{alignItems:"center",gap:2},o.createElement(a.Icon,{name:t,color:"bright",size:"small"}),o.createElement(a.TextMicro,{color:"white"},(0,h.fm)(n))),o.createElement(a.Flex,{column:!0,gap:2},o.createElement(a.TextMicro,{color:"white"},i),r&&o.createElement(a.TextMicro,{"data-testid":"text-agent-outdated-critical",color:"white"},o.createElement(a.Box,{"data-testid":"open-add-node",onClick:r,as:a.TextMicro,cursor:"pointer",textDecoration:"underline",color:"white"}," ","Check here"," "),"for troubleshooting")))},y=function(e){var t=e.state,n=e.name,r=(0,v.Lt)(t),i=g.R7[r.toLocaleLowerCase()],c=i.icon,l=i.text,u=i.textColor,s=i.indicatorWrapperColor,d=i.tooltip,m=(0,o.useCallback)((function(){window.open("https://learn.netdata.cloud/guides/troubleshoot/troubleshooting-agent-with-cloud-connection","_blank","noopener,noreferrer")}),[]),f="".concat(n," ").concat(d);return o.createElement(a.Tooltip,{allowHoverOnTooltip:!0,content:o.createElement(b,{message:f,icon:c,status:l,handleNavigateToDocs:"Pending"===r?m:void 0})},o.createElement(a.Flex,{margin:[0,"auto",0,"auto"],height:"20px",padding:[.5,0],border:{side:"all",color:s},background:"nodeBadgeBackground",justifyContent:"center",width:30,round:4,gap:2,alignItems:"center"},o.createElement(a.Icon,{name:c,size:"small",color:u}),o.createElement(a.TextMicro,{strong:!0,color:u},l)))},w=n(61536),E=n(86711),x=n(83925);function k(e,t){return e===t?0:e>t?1:-1}var C=[{id:"name",accessor:"name",header:"Name"},{id:"agent",accessor:"os",header:"Name",size:120,enableColumnFilter:!1,filterFn:function(e,t,n){var r,o=(null===(r=e.original)||void 0===r?void 0:r.name)||"";return null===o||void 0===o?void 0:o.toLowerCase().includes(n)},cell:function(e){var t=e.getValue,n=e.row,r=t();return o.createElement(w.E,{title:r||"Unknown OS",url:r,name:n.original.name})}},{id:"version",accessor:"version",header:"Version",cell:function(e){var t=e.getValue,n=e.row;return o.createElement(a.Flex,{gap:1,flexWrap:!0},o.createElement(a.Pill,{color:"neutralPillColor",hollow:!0,margin:[1,0]},t()),n.original.updateSeverity&&o.createElement(x.Z,{name:n.original.name,os:n.original.os.id,container:n.original.hw.container,warningLevel:"critical"===n.original.updateSeverity?"critical":"warning",labels:n.original.labels,version:t(),margin:[1,0]}))},minSize:50},{id:"state",accessor:"state",header:"Status",cell:function(e){var t=e.getValue;return o.createElement(p.Z,{state:t()})},sortingFn:function(e,t){return k((0,v.Q5)(e.original.state),(0,v.Q5)(t.original.state))},enableColumnFilter:!0,filterFn:function(e,t,n){var r=e.original.state;return n.length<1||n.some((function(e){var t=e.value;return"all"===t||t===(0,v.Q5)(r)}))},meta:{filter:{component:"select",isMulti:!0,options:[{value:"Offline",label:"Offline"},{value:"Live",label:"Live"},{value:"Stale",label:"Stale"},{value:"Unseen",label:"Unseen"}]},tooltip:o.createElement(E.Z,null)}},{id:"connectionToCloud",accessorKey:"state",header:"Connection To Cloud",cell:function(e){var t=e.getValue,n=e.row.original;return o.createElement(y,{state:t(),name:n.name})},sortingFn:function(e,t){return k((0,v.Lt)(e.original.state),(0,v.Lt)(t.original.state))},enableColumnFilter:!0,filterFn:function(e,t,n){var r=e.original.state;return n.length<1||n.some((function(e){var t=e.value;return"all"===t||("created"===r&&"created"===t||("created"!==r&&"completed"===t||void 0))}))},size:50,meta:{filter:{component:"select",isMulti:!0,options:[{value:"created",label:"Pending"},{value:"completed",label:"Completed"}]}}},{id:"updateSeverity",accessor:"updateSeverity",header:"Severity",cell:function(e){var t=e.getValue,n=e.row.original;return o.createElement(x.Z,{name:n.name,os:n.os.id,container:n.hw.container,warningLevel:n.updateSeverity,labels:n.labels||{},version:n.version,text:t()})}}],O=n(46667),S=n(15861),Z=n(64687),P=n.n(Z),I=n(82040),j=n(5633),D=n(55899),T=n(27624);function N(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}var _=function(e){return Array.isArray(e)?e.filter((function(e){return!e.hasAccessibleData})):e.hasAccessibleData?[]:[{id:e.id}]},F=function(e){return Array.isArray(e)?e:[{id:e.id}]},M=function(e){var t=e.openClaimNodeModal,n=e.roomUntouchable,a=e.isSpace,i=(0,D.Z)(),c=(0,T.Z)(),u=(0,d.Hm)("name"),s=(0,l.gI)("node:Delete"),m=(0,l.gI)("room:RemoveNode"),f=(0,l.gI)("node:Create"),p=(0,l.gI)("room:AddNode"),g=function(){var e=(0,S.Z)(P().mark((function e(t,n){var r,o;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return r=_(t),o=r.map((function(e){return e.id})),e.next=6,i(o);case 6:n.resetRowSelection();case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),h=function(){var e=(0,S.Z)(P().mark((function e(t,n){var r,o;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return r=F(t),o=r.map((function(e){return e.id})),e.next=6,c(o);case 6:n.resetRowSelection();case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),v=(0,o.useMemo)((function(){return{delete:{confirmLabel:"Yes, delete",confirmationMessage:function(e){return o.createElement(I.IC,{name:e.name})},confirmationTitle:function(e){return(0,I.Sq)(e.name)},declineLabel:"Cancel",disabledTooltipText:s?"Delete is disabled":"Only admins can delete",handleAction:g,isVisible:!!a,isDisabled:function(e){return e.disabled||!s},tooltipText:"Delete node from space"},remove:{confirmLabel:"Yes, remove",confirmationMessage:function(e){return o.createElement(j.O3,{name:e.name,roomName:u})},confirmationTitle:function(e){return(0,j.Br)(e.name)},declineLabel:"Cancel",handleAction:h,tooltipText:"Remove node from room",isVisible:!a,isDisabled:function(e){return e.disabled||n||!m},disabledTooltipText:n?"Remove is disabled":"Only admins can remove"}}}),[I.IC,I.Sq,j.Br,g,h,j.O3,n,a,s,m]),b=(0,o.useMemo)((function(){return function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{}).shouldPersist,n=void 0===t||t,i=(0,u.Zl)(C(e)),c=function(e){return(0,w.Z)((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.Z.patch(b(e),t)}),[e.domain,e.spaceId,e.roomId])}(e),m=(0,s.Z)(),f=(0,o.Z)(m,2)[1];return(0,u._8)((function(t){var o=t.snapshot;return function(){var t=(0,r.Z)(l().mark((function t(r){var u,s;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i(r),n){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,o.getPromise(C(e));case 5:return u=t.sent,s=e.prop,t.prev=7,t.next=10,c(k({},s?(0,a.Z)({},s,r):r));case 10:t.next=16;break;case 12:t.prev=12,t.t0=t.catch(7),f(t.t0),i(s?u[s]:u);case 16:case"end":return t.stop()}}),t,null,[[7,12]])})));return function(e){return t.apply(this,arguments)}}()}),[e])},S=function(e){return(0,u.$P)(C(e))},Z=function(){return(0,u.$P)(y({domain:"me"}))},P=function(e){var t={domain:"me"},n=S(t),r="hasValue"!==n.state?g:n.contents,o=O(k(k({},t),{},{prop:e}));return[e?r[e]:r,o]},I=function(e){var t=e.roomId,n=e.spaceId,r=e.key,o={domain:"room",roomId:t,spaceId:n},a=S(o),i="hasValue"!==a.state?h:a.contents,c=O(k(k({},o),{},{prop:r}));return[r?i[r]:i,c]}},45736:function(e,t,n){n.d(t,{Cz:function(){return g},R1:function(){return y},h3:function(){return m},pV:function(){return p},ry:function(){return b},rz:function(){return h},su:function(){return d}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(4480),a=n(45939),i=n(15635),c=n(69414);function l(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 u(e){for(var t=1;tw))}},w?{maxlength:w}:{}),E?{minlength:E}:{}),{},{onChange:function(e){var t=e.id,n=e.setSecrets,r=e.subsetId;return function(e){return n((function(n){return m(m({},n),{},r?(0,o.Z)({},t,m(m({},n[t]),{},(0,o.Z)({},r,e))):(0,o.Z)({},t,e))}))}},type:"uri"===b?"url":b||"text"},v)}if("object"===p){var x=g.oneOf,k=g.patternProperties;if(x)return m(m({component:"select",getValue:function(e){var t,n,r=e.id,o=e.secrets;return{label:(null===(t=x.find((function(e){var t;return e.properties.selection.const===(null===(t=o[r])||void 0===t?void 0:t.selection)})))||void 0===t?void 0:t.title)||(h?x[0].title:"None"),value:(null===(n=o[r])||void 0===n?void 0:n.selection)||(h?x[0].properties.selection.const:"")}},onChange:function(e){var t=e.id,n=e.setRequiredSubsets,r=e.setSecrets;return function(e){var a=e.label,i=e.value;if(!i)return n((function(e){return l()(e,t)})),void r((function(e){return l()(e,t)}));var c=x.find((function(e){return e.title===a}));null!==c&&void 0!==c&&c.required&&n((function(e){return m(m({},e),{},(0,o.Z)({},t,x.find((function(e){return e.title===a})).required))})),r((function(e){return m(m({},e),{},(0,o.Z)({},t,{selection:i}))}))}}},x.reduce((function(e,t){return{fields:m(m({},e.fields),{},(0,o.Z)({},t.properties.selection.const,y(t))),options:[].concat((0,a.Z)(e.options),[{label:t.title,value:t.properties.selection.const}]),required:m(m({},e.required),{},(0,o.Z)({},t.properties.selection.const,t.required))}}),{fields:{},options:h?[]:[{label:"None",value:""}],required:{}})),v);if(k)return m({component:"pairs",componentPairs:Object.entries(k).map((function(e){var t=(0,r.Z)(e,2),n=t[0],o=t[1].type;return[u.zK[n],u.q7[o]]}))},v)}return null};function p(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 g(e){for(var t=1;t0?a.createElement(c.Z,{"data-testid":"nodesTable-layout",overflow:"hidden",height:"100%"},a.createElement(s.Z,{enableSelection:!0,customNodes:n,showdDefaultRowActions:!1,showDefaultBulkActions:!1,customBulkActions:O,onRowSelected:x,columnVisibility:w,alwaysEnableNodeSelection:!0})):a.createElement(g,{spaceName:k.name}))}},86242:function(e,t,n){n.d(t,{Z:function(){return p}});var r=n(29439),o=(n(57327),n(41539),n(88449),n(2490),n(59849),n(21249),n(57640),n(9924),n(26699),n(32023),n(67294)),a=n(62554),i=n(74059),c=n(37518),l=n(53338),u=n(25819),s=n(96929),d=n(46322),m=n(5429),f=n(93017),p=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).addNodesCallback,n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=(0,o.useState)(e),n=(0,r.Z)(t,2),i=n[0],c=n[1],l=(0,o.useState)([]),u=(0,r.Z)(l,2),s=u[0],d=u[1];(0,a.Z)((function(){d([i])}),300,[i]);var m=(0,o.useCallback)((function(e){return c(e.currentTarget.value)}),[c]);return[i,m,s]}(),p=(0,r.Z)(n,3),g=p[0],h=p[1],v=p[2],b=(0,o.useState)([]),y=(0,r.Z)(b,2),w=y[0],E=y[1],x=(0,i.th)(),k=(0,c.HM)(x,l.i_),C=(0,f.Z)(),O=(0,r.Z)(C,2)[1],S=(0,m.Z)((function(){return{enabled:!!k,fetch:function(){return(0,u.Fz)({roomId:k,spaceId:x})},initialValue:[],onFail:function(e){O(e)}}}),[k,x]),Z=(0,r.Z)(S,1)[0],P=(0,s.X7)(e,"ids"),I=(0,o.useMemo)((function(){return Z.map((function(e){return e.id})).filter((function(e){return!P.includes(e)}))}),[P,Z]),j=(0,o.useMemo)((function(){return(0,d.C)(Z)}),[Z]),D=(0,s.iB)(x,e,{onSuccess:t});return[{claimedNodeIds:I,data:j,filter:g,setFilter:h,debouncedFilter:v,setNodes:E},{onAddNodes:(0,o.useCallback)((function(){return D(w.map((function(e){return e.id})))}),[D,w]),onAddNode:(0,o.useCallback)((function(e){D([e],{makeCallback:!1})}),[D]),selectedNodes:w}]}},5795:function(e,t,n){var r=n(87462),o=n(29439),a=n(67294),i=n(15557),c=n(37518),l=n(74059),u=n(16645),s=n(7693),d=n(92903),m=n(38346),f=n(28350),p=n(86242),g=n(97346);t.Z=function(e){var t=e.onClose,n=e.isSubmodal,h=(0,l.th)(),v=(0,c.Hm)(),b=(0,p.Z)(v.id,{addNodesCallback:t}),y=(0,o.Z)(b,2),w=y[0],E=y[1],x=E.onAddNodes,k=E.selectedNodes;return a.createElement(u.u6,{"data-testid":"addWarRoomModal",right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:t},a.createElement(s.x,{"data-testid":"addWarRoomModal-header",title:a.createElement(a.Fragment,null,"Manage room",a.createElement(i.TextBig,{color:"textLite"},"\xa0/ Add Nodes")),isSubmodal:n,onClose:t}),a.createElement(d.B,{"data-testid":"addWarRoomModal-title"},"Add nodes to\xa0",null===v||void 0===v?void 0:v.name),a.createElement(u.TZ,{"data-testid":"addWarRoomModal-content",overflow:"auto",hasFooter:!0},a.createElement(g.Z,{permission:"node:Create"},a.createElement(m.Z,{"data-testid":"addWarRoomModal-adminClaimNodes",rooms:[v.id],spaceId:h})),!v.untouchable&&a.createElement(f.Z,(0,r.Z)({"data-testid":"addWarRoomModal-availableNodes"},w,{onAddNodes:x,canAddNodes:!!k.length,addNodesGA:"add-war-room-modal::click-add-node::global-view"}))),a.createElement(u.ZW,{"data-testid":"addWarRoomModal-footer"},a.createElement(i.Button,{"data-ga":"add-war-room-modal::click-back::global-view","data-testid":"addWarRoomModal-backAction",neutral:!0,flavour:"borderless",label:"Back",onClick:t})))}},56662:function(e,t,n){n.d(t,{U:function(){return f}});var r=n(29439),o=n(67294),a=n(89250),i=n(12599),c=n(15557),l=n(97323),u=n(74059),s=n(37518),d=n(16645),m=n(7693),f=function(e){var t=e.onClose,n=e.onDone,f=e.isSubmodal,p=void 0===f||f,g=(0,u.th)(),h=(0,o.useState)(""),v=(0,r.Z)(h,2),b=v[0],y=v[1],w=(0,c.useInputValue)({maxChars:255,value:""}),E=(0,r.Z)(w,3),x=E[0],k=E[1],C=E[2],O=function(e){var t=(0,a.s0)(),n=(0,u.uk)();return(0,o.useMemo)((function(){return function(r){var o=r.slug,a=(0,i.Gn)("/spaces/:spaceSlug/rooms/:roomSlug",{spaceSlug:n,roomSlug:o});e(),t(a)}}),[n])}(t),S=(0,s.Dq)(g,{onSuccess:n||O}),Z=(0,o.useCallback)((function(){S({name:b,description:x})}),[b,x]);return o.createElement(d.u6,{right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:t},o.createElement(m.x,{onClose:t,isSubmodal:p,title:"Create a new room"},o.createElement(c.Button,{label:"Add",onClick:Z,disabled:!b})),o.createElement(d.TZ,null,o.createElement(l.Q,{roomName:b,setRoomName:y,roomDescription:x,charsDescIndicator:C,setRoomDescription:k,isCreateForm:!0})))}},7724:function(e,t,n){n.d(t,{CE:function(){return s},M5:function(){return m},R4:function(){return d}});var r=n(29439),o=(n(92222),n(67294)),a=n(15557),i=n(74059),c=n(46667),l=n(37518),u=n(33335),s=function(e){var t=1===e;return"Delete ".concat(e," ").concat(t?"room":"rooms")},d=function(e){return"Delete ".concat(e," room")},m=function(e){var t=e.name,n=e.roomsLength,r=e.spaceName,a=t||"".concat(n,1===n?" room":" rooms");return o.createElement(o.Fragment,null,"You are about to delete ",o.createElement("strong",null,a)," from ",o.createElement("strong",null,r)," space.",o.createElement("br",null),"This cannot be undone. Are you sure you want to continue?")};t.ZP=function(e){var t=e.id,n=e.name,s=e.navigateToParent,f=(0,i.OS)("name"),p=(0,l.tE)(t,"untouchable"),g=(0,u.gI)("room:Delete")&&!p,h=(0,l.IX)(t,{onSuccess:s}),v=(0,c.Z)(),b=(0,r.Z)(v,4),y=b[0],w=b[2],E=b[3];return g?o.createElement(o.Fragment,null,o.createElement(a.Button,{"data-testid":"manageWarRoom-delete",flavour:"hollow",onClick:w,label:"Delete room",danger:!0}),y&&o.createElement(a.ConfirmationDialog,{confirmLabel:"Yes, delete","data-ga":"delete-war-room-dialog","data-testid":"deleteWarRoomDialog",handleConfirm:h,handleDecline:E,message:o.createElement(m,{name:n,spaceName:f}),title:d(n)})):null}},97323:function(e,t,n){n.d(t,{Q:function(){return C}});var r=n(87462),o=n(29439),a=n(45987),i=(n(24603),n(74916),n(88386),n(39714),n(82526),n(41817),n(77601),n(67294)),c=n(15557),l=n(62200),u=n(95383),s=n(37518),d=n(33335),m=n(1229),f=n(46667),p="leave-war-room-dialog",g="leaveWarRoomDialog",h=function(e){var t=e.id,n=e.name,a=e.navigateToParent,l=(0,m.IT)(t,"ids"),u=(0,s.iC)(t,{onSuccess:a}),d=(0,s.tE)(t,"untouchable"),h=(0,f.Z)(),v=(0,o.Z)(h,4),b=v[0],y=v[2],w=v[3],E=1===l.length&&!d?{"data-ga":"".concat(p,"-last-member"),"data-testid":"".concat(g,"LastMember"),message:i.createElement(i.Fragment,null,"If you leave, ",i.createElement("strong",null,n)," room will be deleted immediately.",i.createElement("br",null),"Are you sure you want to continue?"),title:"Leave and delete ".concat(n," room")}:{"data-ga":p,"data-testid":g,message:i.createElement(i.Fragment,null,"You are about to leave ",i.createElement("strong",null,n)," room.",i.createElement("br",null),"Are you sure you want to continue?"),title:"Leave ".concat(n," room")};return i.createElement(i.Fragment,null,i.createElement(c.Button,{"data-ga":"manage-war-room-tab::click-leave-war-room::manage-war-room-modal","data-testid":"manageWarRoom-leave",icon:"switch_off",flavour:"borderless",label:"Leave room",neutral:!0,padding:[0],width:"fit-content",onClick:y}),b&&i.createElement(c.ConfirmationDialog,(0,r.Z)({confirmLabel:"Yes, leave",handleConfirm:u,handleDecline:w},E)))},v=n(7724),b=n(30688),y=["charsIndicator","isDisabled","isValid","handleChange","setIsValid","setValidationMessage","validationMessage","value"],w=(0,b.A)([function(e){var t=e.length>=1;return(0,b.f)(t,"Give your room a name that's at least one character.")},function(e){var t=e.length<=20;return(0,b.f)(t,"A room's name can't exceed 20 characters.")}]),E=function(e){var t=e.charsIndicator,n=e.isDisabled,l=e.isValid,u=e.handleChange,s=e.setIsValid,d=e.setValidationMessage,m=e.validationMessage,f=e.value,p=(0,a.Z)(e,y),g=(0,c.useTouchedState)({}),h=(0,o.Z)(g,2),v=h[0],b=h[1];return(0,i.useEffect)((function(){var e=w(f),t=e.isValid,n=e.messages&&e.messages.length?e.messages[0]:void 0;!l&&t?s(!0):l&&!t&&s(!1),n&&d(n)}),[l,s,f,v,d]),i.createElement(c.TextInput,(0,r.Z)({"data-testid":"warRoomOptions-warRoomNameInput",label:"Room name",name:"createRoom",placeholder:"Enter your room's name",fieldMessage:"Tip: Use rooms to group your Nodes by their service, purpose, or location.",fieldIndicator:t,value:f,touched:v,onBlur:b,onChange:u,success:l,error:!l&&m,instantFeedback:"all",disabled:n,autoFocus:!0},p))},x=["id","navigateToParent","isCreateForm","roomName","setRoomName","roomDescription","setRoomDescription","charsDescIndicator","onSaveClick"],k=new RegExp(/^[\w\s\d]*?$/),C=function(e){var t=e.id,n=e.navigateToParent,m=e.isCreateForm,f=e.roomName,p=e.setRoomName,g=e.roomDescription,b=e.setRoomDescription,y=e.charsDescIndicator,w=e.onSaveClick,C=(0,a.Z)(e,x),O=(0,s.tE)(t),S=(0,u.J7)(),Z=(0,i.useState)(!1),P=(0,o.Z)(Z,2),I=P[0],j=P[1],D=(0,i.useState)(""),T=(0,o.Z)(D,2),N=T[0],_=T[1],F=(0,i.useState)(""),M=(0,o.Z)(F,2),A=M[0],L=M[1],B=(0,c.useInputValue)({maxChars:l.v$}),R=(0,o.Z)(B,1)[0],z=(0,i.useCallback)((function(e){return p(e.target.value)}),[p]),V=!!t,U=((0,d.gI)("room:LeaveAllNodes")||!O.untouchable)&&S.length>1&&O.isMember,H=(0,c.useTouchedState)({defaultState:!0}),W=(0,o.Z)(H,2),G=W[0],Y=W[1],K=!O.name||f===O.name&&g===O.description;return(0,i.useEffect)((function(){L(k.test(g)&&G?"":"The description can only contain digits, letters, and spaces.")}),[G,g]),i.createElement(c.Flex,(0,r.Z)({column:!0,"data-testid":"manageWarRoom",flex:"grow",justifyContent:"between",height:"100%"},C),i.createElement(c.Flex,{column:!0,"data-testid":"manageWarRoom-settings",gap:2},i.createElement(c.Box,{"data-testid":"manageWarRoom-createRoomInputBox"},i.createElement(E,{"data-testid":"manageWarRoom-createRoomInput",value:f,handleChange:z,charsIndicator:R,validationMessage:N,setValidationMessage:_,isValid:I,setIsValid:j,isDisabled:V&&O.untouchable})),i.createElement(c.Box,{"data-testid":"manageWarRoom-descriptionInputBox"},i.createElement(c.TextInput,{"data-testid":"manageWarRoom-descriptionInput",label:"Description",name:"roomDescription",placeholder:"A room description...",instantFeedback:"positiveFirst",touched:G,onBlur:Y,fieldIndicator:y,error:""!==A&&A,success:""===A,value:g,onChange:b}))),i.createElement(c.Flex,{"data-testid":"manageWarRoom-actions"},i.createElement(c.Flex,{"data-testid":"manageWarRoom-deleteLeaveActions",gap:4},V&&U&&i.createElement(h,{id:t,name:O.name,navigateToParent:n}),V&&i.createElement(v.ZP,{id:t,name:f,navigateToParent:n})),!m&&i.createElement(c.Button,{"data-ga":"manage-war-room-tab::click-save::manage-war-room-modal","data-testid":"manageRoom-saveButton",label:"Save",onClick:w,disabled:K,margin:[0,0,0,"auto"]})))}},61536:function(e,t,n){n.d(t,{E:function(){return s},M:function(){return d}});var r=n(67294),o=n(60677),a=n(15557),i=n(64637),c=n(31203),l=o.default.div.withConfig({displayName:"styled__CellBox",componentId:"sc-1nen61k-0"})(["",";display:flex;flex-direction:",";height:",";align-items:center;"],(function(e){var t=e.width;return t?"width: ".concat(t,"px"):"width: auto"}),(function(e){return e.reversed?"row-reverse":"row"}),(0,a.getSizeBy)(5)),u=o.default.div.withConfig({displayName:"styled__IconContainer",componentId:"sc-1nen61k-1"})(["margin:0 "," 0 0;"],(0,a.getSizeBy)(1)),s=function(e){var t=e.url,n=e.name,o=e.title,s=(e.width-32)/7,d=(0,r.useMemo)((function(){return s?(0,i.a)(n,s):n}),[s,n]);return r.createElement(l,null,r.createElement(a.Flex,{alignItems:"center"},r.createElement(u,null,r.createElement(c.Z,{src:t,title:o})),r.createElement(a.TextSmall,null,d)))},d=o.default.div.withConfig({displayName:"styled__TableArea",componentId:"sc-1nen61k-2"})(["display:flex;flex-direction:column;justify-content:center;align-items:flex-start;width:100%;margin:"," 0;",""],(0,a.getSizeBy)(2),(function(e){return e.isVirtualized&&"min-height: 300px;"}))},46322:function(e,t,n){n.d(t,{C:function(){return l},k:function(){return c}});var r=n(4942),o=(n(85827),n(41539),n(25387),n(2490),n(72608),n(92222),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(46189)),a=n(88866);function i(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}var c=function(e){var t=e.data,n=e.untouchable,r=e.currentUserId,o=e.canRemoveUser;return t.reduce((function(e,t){var a=r===(null===t||void 0===t?void 0:t.id);return e.push({name:t.name,email:t.email,user:{avatarURL:t.avatarURL,name:t.name,email:t.email,id:t.id},type:t.role,disabled:!o||a||n}),e}),[])},l=function(e){return e.reduce((function(e,t){var n;return e.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"update";return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="update"==e?o.Z.put:o.Z.post;return"function"!==typeof r?i():r("/api/v2/spaces/".concat(t,"/billing/plan"),(0,c.v)(n),{transform:function(e){return e.url}})}},v=function(e,t){return h("checkout")(e,t)},b=function(e,t){return h()(e,t)},y=function(e,t){return o.Z.get("/api/v2/spaces/".concat(e,"/billing/portal?redirect_url=").concat(encodeURIComponent(t)),{transform:function(e){return e.url}})},w=function(e,t){var n=t.after,r=t.before;return o.Z.get("/api/v2/spaces/".concat(e,"/billing/node-count?from=").concat(n,"&to=").concat(r))},E=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.Z.put("/api/v2/spaces/".concat(e,"/billing/plan/preview"),(0,c.v)(t),{transform:f})}},46715:function(e,t,n){n.d(t,{Gl:function(){return p},RP:function(){return y},SH:function(){return w},Zn:function(){return k},eY:function(){return x},fG:function(){return v}});var r=n(29439),o=(n(41539),n(88674),n(17727),n(67294)),a=n(4480),i=n(50308),c=n.n(i),l=n(74059),u=n(93017),s=n(69019),d=n(49489),m=[],f=(0,a.CG)({key:"plans",get:function(e){return function(){return(0,s.ZQ)(e)}}}),p=function(){var e,t=(0,l.th)(),n=(0,a.$P)(f(t));return{loaded:"loading"!==n.state,value:(null===(e=n.contents)||void 0===e?void 0:e.data)||m,hasError:"hasError"===n.state}},g=(0,a.CG)({key:"previewPlan",get:function(e){var t=e.spaceId,n=e.payload;return function(){return(0,s.uV)(t,n)}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),h=function(e){var t;return d.Fi[null===e||void 0===e||null===(t=e.response)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.errorMsgKey]},v=function(e,t){var n,r=(0,l.th)(),o=(0,a.$P)(g({spaceId:r,payload:e,forceFetch:t}));return{loading:"loading"===o.state,value:(null===(n=o.contents)||void 0===n?void 0:n.data)||{},promoCodeError:"hasError"===o.state?h(o.contents):void 0}},b=(0,a.CG)({key:"currentPlan",get:function(e){return function(){return e?(0,s.fh)(e):Promise.resolve()}}}),y=function(){var e,t=(0,l.th)(),n=(0,a.$P)(b(t)),r=(0,a.C)(b(t));return{loaded:"loading"!==n.state,value:(null===(e=n.contents)||void 0===e?void 0:e.data)||s.E3,hasError:"hasError"===n.state,refresh:r}},w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.href,t=(0,o.useState)(!1),n=(0,r.Z)(t,2),a=n[0],i=n[1],c=(0,l.th)();return[(0,o.useCallback)((function(){i(!0),(0,s.fz)(c,e).then((function(e){var t=e.data;return location.href=t})).finally((function(){return i(!1)}))}),[c,e]),a]},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.Vs,t=(0,u.Z)(),n=(0,r.Z)(t,2)[1],o=(0,l.th)(),a=y();return!a.loaded||a.hasError?c():function(t){return e(o,t).then((function(e){a.refresh(),null!==e&&void 0!==e&&e.data&&(location.href=e.data)})).catch(n)}},x=function(){return E(s.Cl)},k=function(){return E()}},33582:function(e,t,n){n.d(t,{Z:function(){return f}});var r=n(15861),o=n(64687),a=n.n(o),i=n(67294),c=n(4480),l=n(33335),u=n(26398),s=function(e){return u.Z.post("/api/v1/spaces/".concat(e,"/tokens"),void 0,{allow401:!0})},d=(0,c.xu)({key:"spaceClaimingTokens",default:[]}),m=(0,c.CG)({key:"claimingTokensState",get:function(e){return function(t){return(0,t.get)(d(e))}},set:function(e){return function(t,n){(0,t.set)(d(e),[n])}}}),f=function(e){var t=(0,c.sJ)(m(e)),n=(0,l.gI)("node:Create",e),o=(0,c._8)((function(e){var t=e.snapshot,n=e.set;return function(){var e=(0,r.Z)(a().mark((function e(r){var o,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getPromise(m(r));case 2:if(e.sent.length){e.next=9;break}return e.next=6,s(r);case 6:o=e.sent,i=o.data,n(m(r),i);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),[]);return(0,i.useEffect)((function(){n&&e&&o(e)}),[n,e]),t}},49489:function(e,t,n){n.d(t,{FC:function(){return o},Fi:function(){return i},Vc:function(){return r},go:function(){return a}});var r={free:{level:0,title:"Community"},earlyBird:{level:0,title:"Early Bird",features:['"Member" role available with existing permissions.','"Member" role with access to _All Nodes_ room.']},pro:{level:10,title:"Pro",features:["7 days of alert history and auditing events.",'Unlock the "Troubleshooter" role and add members to the space without providing management permission.',"Enable webhook alert notification integration."]},business:{level:20,title:"Business",features:["Up-to 90 days of alert history and topology events. Never miss an important event while troubleshooting.",'Unlock all user roles including "Manager", "Observer" and "Billing". Empower your teams to excel.',"Enable alert notification integrations (Slack, PagerDuty and more)."]}},o=["year","month"],a={year:"yearly",month:"monthly"},i={ErrInvalidPromotionCode:"Promotion code is invalid",ErrInactivePromotionCode:"Promotion code is inactive",ErrInvalidPromotionCodePlan:"Promotion code cannot be applied to this plan"}},36065:function(e,t,n){n.d(t,{Z:function(){return h}});var r=n(29439),o=n(67294),a=n(15557),i=n(83732),c=n(62200),l=n(16645),u=n(7693),s=n(92903),d=(n(24603),n(74916),n(88386),n(39714),n(77601),n(46585)),m=n(30688),f=new RegExp(/(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]|[!@#$%^&*()_+=\-])/),p=(0,m.A)([function(e){var t=e.length>=d.Pf;return(0,m.f)(t,"Please enter a name for the Space that is at least 5 characters.")},function(e){var t=e.length<=d.Qy;return(0,m.f)(t,"A Space's name can't exceed 20 characters.")},function(e){return f.test(e)?{isValid:!1,message:"There's an unexpected character in the Space's name. Use only alphanumberic characters (A-Z, a-z, 0-9) and spaces."}:{isValid:!0}}]),g=function(e){var t=e.value,n=e.isValid,i=e.setIsValid,c=e.charsIndicator,l=e.isDirty,u=e.handleChange,s=e.validationMessage,d=e.setValidationMessage,m=e.onKeyDown,f=(0,a.useTouchedState)({}),g=(0,r.Z)(f,2),h=g[0],v=g[1];return(0,o.useEffect)((function(){var e=p(t),r=e.isValid,o=e.messages&&e.messages.length?e.messages[0]:void 0;!n&&r?i(!0):n&&!r&&i(!1),o&&d(o)}),[n,t,h,i,d]),o.createElement(a.TextInput,{label:"Space name",name:"createWorkspace",placeholder:"Enter your Space's name",fieldMessage:"Give your Space a name that's between 5-20 characters. This cannot change.",fieldIndicator:c,value:t,touched:h,onBlur:v,onChange:u,success:n,error:!n&&s,instantFeedback:"positiveFirst",isDirty:l,onKeyDown:m})},h=function(e){var t=e.onClose,n=e.onDone,m=(0,o.useState)(!1),f=(0,r.Z)(m,2),p=f[0],h=f[1],v=(0,o.useState)(!1),b=(0,r.Z)(v,2),y=b[0],w=b[1],E=(0,a.useInputValue)({maxChars:d.Qy}),x=(0,r.Z)(E,4),k=x[0],C=x[1],O=x[2],S=x[3],Z=(0,o.useState)(""),P=(0,r.Z)(Z,2),I=P[0],j=P[1],D=(0,o.useCallback)((function(e){w(!1),t(),null===n||void 0===n||n(e)}),[t]),T=(0,i.Z)({onSuccess:D,onError:function(){return w(!1)}}),N=(0,o.useCallback)((function(){p&&(w(!0),T({name:k}))}),[k,p]);return o.createElement(l.u6,{right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:t},o.createElement(u.x,{onClose:t,title:"Create Space"},o.createElement(a.Button,{disabled:!p,isLoading:y,loadingLabel:"Creating",label:"Save",onClick:N})),o.createElement(s.B,null,"Create a new Space"),o.createElement(l.TZ,null,o.createElement(g,{isDirty:S,isValid:p,setIsValid:h,value:k,handleChange:C,charsIndicator:O,validationMessage:I,setValidationMessage:j,onKeyDown:function(e){e.keyCode===c.DV&&p&&N()}})))}},2509:function(e,t,n){n.d(t,{Q$:function(){return s},Sr:function(){return g},bK:function(){return u},dH:function(){return m},eq:function(){return i},fM:function(){return d},fV:function(){return f},m3:function(){return a},xN:function(){return h},z2:function(){return p}});var r,o=n(4942),a="info",i="rooms",c="nodes",l="users",u="notifications",s="integrations",d="billing",m=[a,i,c,l,u,d],f=(r={},(0,o.Z)(r,a,"Info"),(0,o.Z)(r,i,"Rooms"),(0,o.Z)(r,c,"Nodes"),(0,o.Z)(r,l,"Users"),(0,o.Z)(r,u,"Alerts & Notifications"),(0,o.Z)(r,s,"Services"),(0,o.Z)(r,d,"Plan & Billing"),r),p=m[0],g="/spaces/:spaceSlug/settings/:settingsTab/*",h="/spaces/:spaceSlug/settings/:settingsTab/:settingsSubTab/*"},72671:function(e,t,n){n.d(t,{F:function(){return y}});var r=n(87462),o=n(29439),a=n(45987),i=(n(92222),n(26699),n(67294)),c=n(89250),l=n(15557),u=n(97346),s=n(91008),d=n(82351),m=n(53606),f=n(46585),p=n(13477),g=n(46667),h=n(46715),v=["currentPlan"],b=["id","isLastSpace","name","onClose"],y=function(e){return function(t){var n=t.currentPlan,r=(0,a.Z)(t,v),o=n.class,c=n.interval,u=n.billingEmail,d="year"===c?"yearly":"monthy",m="".concat(o," ").concat(d),f=!["Community","EarlyBird"].includes(o),p=!!u&&!f;return i.createElement(e,r,f&&i.createElement(i.Fragment,null,i.createElement(l.Text,null,"You are currently on ",i.createElement(l.Text,{strong:!0},m)," subscription, which will be cancelled automatically and any due credit from unused period will be given to your credit balance."),i.createElement(l.Text,null,"Any available credit with us won't be automatically lost. If you want to use it in the future, within the defined period on our"," ",i.createElement(s.Z,{href:"https://www.netdata.cloud/service-terms/",rel:"noopener noreferrer",target:"_blank"},"Terms of Service"),", or have any requests about previous invoices you can reach out to"," ",i.createElement(l.Text,{strong:!0},"support@netdata.cloud"))),p&&i.createElement(l.Text,null,"You will lose direct access to you invoices and billing information. If you want to retrieve this information in the future, you'll have to contact"," ",i.createElement(l.Text,{strong:!0},"support@netdata.cloud")))}},w=y((function(e){var t=e.spaceName,n=e.children;return i.createElement(l.Flex,{column:!0,gap:2},i.createElement(l.Text,null,"You are about to delete ",i.createElement("strong",null,t)," space."),n,i.createElement(l.Text,null,"Are you sure you want to continue?"))}));t.Z=function(e){var t=e.id,n=e.isLastSpace,s=e.name,v=e.onClose,y=(0,a.Z)(e,b),E=(0,c.s0)(),x=(0,m.Z)(t),k=(0,p.jr)(),C=(0,h.RP)().value,O=(0,g.Z)(),S=(0,o.Z)(O,4),Z=S[0],P=S[2],I=S[3],j=(0,g.Z)(),D=(0,o.Z)(j,2),T=D[0],N=D[1],_=(0,i.useCallback)((function(e){v(),E("/spaces/".concat(e))}),[]);return k&&i.createElement(u.Z,{permission:"space:Delete"},i.createElement(d.Z,{align:"top",content:n&&f.T$.delete,isBasic:!0,stretch:"align"},i.createElement(l.Box,null,i.createElement(l.Button,(0,r.Z)({danger:!0,"data-ga":"manage-space-tab::click-delete-space::manage-space-modal","data-testid":"deleteSpace-button",disabled:n,flavour:"hollow",label:"DELETE SPACE",onClick:P},y)))),Z&&i.createElement(l.ConfirmationDialog,{confirmLabel:T?"Deleting...":"Yes, delete","data-ga":"delete-space","data-testid":"deleteSpaceDialog",handleConfirm:function(){N(),x({onSuccess:_})},handleDecline:I,message:i.createElement(w,{spaceName:s,currentPlan:C}),title:"Delete ".concat(s," space"),isConfirmDisabled:T,isConfirmLoading:T,isDeclineDisabled:T}))}},73398:function(e,t,n){n.d(t,{Z:function(){return x}});var r=n(87462),o=n(45987),a=(n(92222),n(67294)),i=n(15557),c=n(45781),l=(n(69826),n(41539),n(31672),n(2490),n(59461),n(4480)),u=n(74059),s={alertCounter:{warning:0,critical:0},unreachableCount:0},d=(0,l.CG)({key:"roomAlertSummaryState",get:function(e){var t=e.id,n=e.key;return function(e){var r=e.get,o=r(u.BN),a=r((0,c.e$)({id:o,key:"entries"})).find((function(e){return e.id===t}))||s;return n?a[n]:a}}}),m=n(37518),f=n(67622),p=n(82351),g=n(60677),h=(0,g.default)(i.Flex).attrs({flex:{grow:0,shrink:0},width:2,height:2,margin:[0,1,0,0],round:1,background:"error",justifyContent:"center",alignItems:"center"}).withConfig({displayName:"indicators__ErrorIndicator",componentId:"sc-19hg3ay-0"})([""]),v=(0,g.default)(h).attrs({background:"warning"}).withConfig({displayName:"indicators__WarningIndicator",componentId:"sc-19hg3ay-1"})([""]),b=(0,g.default)(h).attrs({background:"textLite"}).withConfig({displayName:"indicators__UnreachableIndicator",componentId:"sc-19hg3ay-2"})([""]),y=n(81488),w=n(20031),E=["id","selectedId","spaceSlug","isSidebar","hideAlerts","differentiateIsMember"],x=function(e){var t=e.id,n=e.selectedId,u=e.spaceSlug,s=e.isSidebar,g=e.hideAlerts,x=e.differentiateIsMember,k=(0,o.Z)(e,E),C=function(e,t){return(0,l.sJ)(d({id:e,key:t}))}(t),O=C.alertCounter,S=O.critical,Z=O.warning,P=C.unreachableCount,I=(0,m.tE)(t,"slug"),j=(0,m.tE)(t,"name"),D=(0,m.tE)(t,"isMember"),T=(0,c.Mt)("error"),N=(0,c.Mt)("updatedAt");return a.createElement(f.Z,(0,r.Z)({},!!u&&{to:"/spaces/".concat(u,"/rooms/").concat(I)},{testid:"roomLabel-warRoom-".concat(j),actions:g?null:a.createElement(p.Z,{content:a.createElement(y.Z,{error:T,text:"Room alerts",updatedAt:N}),isBasic:!0,align:"right"},a.createElement(i.Flex,{flex:!1,flexWrap:!1,justifyContent:"end",width:{min:6},height:{min:2}},S>0&&a.createElement(h,null),Z>0&&a.createElement(v,null),P>0&&a.createElement(b,null))),icon:x&&D&&a.createElement(w.Z,null),iconColor:"successLite",iconHeight:"12px",iconWidth:"12px",gap:1,textProps:x&&!D&&{padding:[0,0,0,4]},selected:t===n,isSidebar:s,isSecondary:!D},k),j)}},22613:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(15557),c=n(55917),l=["onFilterClick","showAllRooms"];t.Z=function(e){var t=e.onFilterClick,n=e.showAllRooms,u=(0,o.Z)(e,l);return a.createElement(i.Flex,(0,r.Z)({gap:2,padding:[1,2],"data-testid":"roomFilterPills"},u),a.createElement(c.S,{flavour:n?"hollow":"default",onClick:t(!1),label:"My Rooms","data-ga":"roomFilterPills::click-my::global-view","data-testid":"roomFilterPills-showMy"}),a.createElement(c.S,{flavour:n?"default":"hollow",onClick:t(!0),label:"All Rooms","data-ga":"roomFilterPills::click-show-all::global-view","data-testid":"roomFilterPills-showAll"}))}},59636:function(e,t,n){var r=n(87462),o=n(29439),a=n(45987),i=(n(57327),n(41539),n(88449),n(2490),n(59849),n(21249),n(57640),n(9924),n(67294)),c=n(48286),l=n(15557),u=n(95383),s=n(74059),d=n(37518),m=n(33335),f=n(73398),p=n(22613),g=["isSidebar"];t.Z=function(e){var t=e.isSidebar,n=(0,a.Z)(e,g),h=(0,u.J7)(),v=(0,i.useState)(!1),b=(0,o.Z)(v,2),y=b[0],w=b[1],E=(0,s.th)(),x=(0,s.uk)();(0,c.Z)((function(){w(!1)}),[E]);var k=(0,m.gI)("room:ReadAll"),C=(0,i.useMemo)((function(){return h.filter((function(e){return e.isMember}))}),[h]),O=k&&C.length>0,S=O&&!y?C:h,Z=(0,d.UL)();return i.createElement(i.Fragment,null,O&&i.createElement(p.Z,{onFilterClick:function(e){return function(t){t.stopPropagation(),w(e)}},showAllRooms:y}),S.map((function(e,o){var a=e.id,c=e.untouchable;return i.createElement(i.Fragment,{key:a},i.createElement(f.Z,(0,r.Z)({id:a,hideAlerts:!t,Wrapper:l.Text,isSidebar:t,differentiateIsMember:y,spaceSlug:x,selectedId:Z},n)),c&&o!==S.length-1&&i.createElement(l.Flex,{border:{side:"top",color:"tabsBorder"},margin:[1.5,0],"data-testid":"roomLabel-warRoomSeparator"}))})))}},55917:function(e,t,n){n.d(t,{S:function(){return i},x:function(){return a}});var r=n(60677),o=n(15557),a=(0,r.default)(o.Icon).withConfig({displayName:"styled__StyledIcon",componentId:"sc-i0gfkp-0"})(["transform:",";"],(function(e){return e.right?"rotate(0)":"rotate(180deg)"})),i=(0,r.default)(o.Button).withConfig({displayName:"styled__StyledButton",componentId:"sc-i0gfkp-1"})(["&&{padding:2px 16px;font-size:12px;height:auto;width:auto;min-width:96px;}"])},77872:function(e,t,n){var r=n(87462),o=n(4942),a=n(45987),i=n(29439),c=(n(92222),n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),l=n(60677),u=n(89250),s=n(15557),d=n(82351),m=n(74059),f=["active","background","showFullname"],p=["active","spaceId","testIdPrefix","local","onClick","showFullname","color"];function g(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}var h=[],v=(0,l.default)(s.Flex).attrs((function(e){var t=e.active,n=e.background,r=e.showFullname;return function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;"string"===typeof t&&p(t),s(e),n&&b(n)};return(0,o.useEffect)((function(){t&&y(n,i)}),[]),{isModalOpen:e===u,currentModalTab:f,handleChangeModalTab:p,handleOpenModal:y,handleCloseModal:function(){p(""),s(""),b()},params:v}}},55899:function(e,t,n){var r=n(15861),o=n(64687),a=n.n(o),i=n(67294),c=n(7335),l=n(89050),u=n(96929),s=n(74059),d=n(95383),m=n(19368);t.Z=function(){var e=(0,m.P)(),t=(0,d.yE)(),n=(0,s.th)(),o=(0,c.XU)(),f=(0,u.Ww)(n,t,{onSuccess:function(r){return(0,l.jG)({cacheKeyPrefix:e,nodeIds:r,roomIds:t,spaceId:n})}});return(0,i.useCallback)(function(){var e=(0,r.Z)(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f(t);case 2:return e.next=4,o(t);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[f,o])}},91128:function(e,t,n){var r=n(29439),o=n(67294),a=n(48286),i=n(46667),c=n(9058);t.Z=function(){var e=(0,i.Z)(!1),t=(0,r.Z)(e,2),n=t[0],l=t[1],u=(0,c.e)(),s=(0,o.useRef)(null);return(0,a.Z)((function(){if(u)return s.current=null===s.current&&u.getRoot().getAttribute("after")>0,u.getRoot().updateAttribute("paused",n),function(){return u&&u.getRoot().updateAttribute("paused",s.current)}}),[n]),l}},93033:function(e,t,n){var r=n(89250),o=n(67294),a=n(12599),i=n(74059),c=n(2509);t.Z=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).roomSlug,t=(0,i.uk)(),n=(0,r.s0)(),l=(0,r.TH)().pathname,u="".concat(l);return(0,o.useCallback)((function(){var r=e?(0,a.Gn)(c.xN,{spaceSlug:t,settingsTab:c.eq,settingsSubTab:e}):"/spaces/".concat(t,"/settings");n(r,{state:{previousUrlPath:u}})}),[u,n,e,t])}},27624:function(e,t,n){var r=n(37518),o=n(96929),a=n(89050),i=n(19368);t.Z=function(e){var t=(0,i.P)(),n=(0,r.UL)(),c=(0,r.tE)(e||n,"spaceId");return(0,o.nI)(c,e||n,{onSuccess:function(r){return(0,a.Br)({cacheKeyPrefix:t,nodeIds:r,roomId:e||n,spaceId:c})}})}},61152:function(e,t,n){var r=n(65351);t.Z=function(e,t){var n=(0,r.Z)(e,t),o=n.isModalOpen,a=n.handleOpenModal,i=n.handleCloseModal;return[o,o?i:a,a,i,n.params]}},78401:function(e,t,n){n.d(t,{O:function(){return u}});n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(29439),a=(n(85827),n(41539),n(25387),n(2490),n(72608),n(69720),n(26699),n(32023),n(52971)),i=n(85456);function c(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 l(e){for(var t=1;t'}),v=(L().add(g),g),Z=function(){return a.createElement(m.Flex,{width:"100%",justifyContent:"center",alignItems:"center",gap:3},a.createElement("svg",{viewBox:v.viewBox,height:"222px"},a.createElement("use",{xlinkHref:"#".concat(v.id)})),a.createElement(m.TextBig,{strong:!0},"Your nodes are either offline or not configured for ML"))},y=n(91008),b=function(){return a.createElement(m.Flex,{height:10.5,width:{min:10.5},background:"warningText",justifyContent:"center",alignItems:"center",round:"50%",sx:{borderRadius:"50%"}},a.createElement(m.Icon,{color:"warningBackground",name:"informationPress"}))},M=function(e){var t=e.to,n=e.children;return a.createElement(y.Z,{Component:m.Text,href:t,target:"_blank",rel:"noopener noreferrer"},n)},E=function(){return a.createElement(m.Flex,{column:!0,gap:1},a.createElement(m.Text,{strong:!0,color:"textDescription"},"Not Configured Nodes"),a.createElement(m.Text,{color:"textDescription"},"Learn how to configure your nodes"," ",a.createElement(M,{to:"https://learn.netdata.cloud/docs/cloud/insights/anomaly-advisor#enable-ml-on-netdata-agent"},"to support anomaly advisor"),"."))},w=function(){return a.createElement(m.Flex,{column:!0,gap:1},a.createElement(m.Text,{strong:!0,color:"textDescription"},"Not Capable Nodes"),a.createElement(m.Text,{color:"textDescription"},"All nodes need to be updated to a version higher than"," ",a.createElement(m.Text,{strong:!0,color:"textDescription"},"1.32"),". Learn how to"," ",a.createElement(M,{to:"https://learn.netdata.cloud/docs/agent/packaging/installer/update"},"update to the latest Netdata version"),"."))},x=function(){return a.createElement(m.Box,{round:!0,background:"elementBackground",padding:[4]},a.createElement(m.Flex,{gap:4,alignItems:"start"},a.createElement(b,null),a.createElement(m.Flex,{gap:4,column:!0},a.createElement(E,null),a.createElement(w,null))))},C=function(){return a.createElement(m.Flex,{column:!0,width:"100%",height:"100%",justifyContent:"start",padding:[8,4]},a.createElement(m.Flex,{column:!0,gap:8},a.createElement(Z,null),a.createElement(x,null)))},k=n(29439),A=n(88553),I=n(91268),D=n(37518),O=n(89479),S=n(74059),T=n(74662),_=n(25517),H=n(49887),B=n(39612),F=(n(82526),n(38880),n(49337),n(33321),n(69070),n(4942)),N=(n(47941),n(15581),n(34514),n(54747),n(66992),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(21249),n(57640),n(9924),n(89692)),j=n(87462),V=n(45987),P=n(2077),R=n(89405),G=n(78122),U=function(e){return Math.floor(e/1e3)},z=function(){var e=(0,_.$B)(),t=(0,k.Z)(e,2),n=t[0],r=t[1],o=(0,R.rA)().localeTimeString,i=(0,a.useMemo)((function(){var e=U(n),t=U(r);return[(0,G.getDateDiff)(e,t),o(n,{secs:!0}),o(r,{secs:!0})]}),[n,r]),l=(0,k.Z)(i,3),c=l[0],s=l[1],d=l[2];return n&&r?a.createElement(m.Flex,{gap:1,alignItems:"baseline"},a.createElement(m.TextMicro,{strong:!0,color:"textLite"},a.createElement(m.TextSmall,{strong:!0,color:"textLite"},s," \u2192 ",d," \u2022")," ","Duration: ",c)):null},K=n(60677),Y=(0,K.keyframes)(["from{transform:translate(412px,0);}"]),$=K.default.g.withConfig({displayName:"skeleton__Animated",componentId:"sc-gwkfye-0"})(["animation:",";"],(function(e){return e.animate?(0,K.css)([""," 1s linear infinite"],Y):""})),q=function(e){var t=e.animate,n=void 0!==t&&t;return a.createElement("svg",{width:"1140",height:"80",viewBox:"0 0 1140 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("mask",{id:"mask0_467_73096",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"1140",height:"80"},a.createElement("rect",{width:"1140",height:"80",fill:"#C4C4C4"})),a.createElement("g",{mask:"url(#mask0_467_73096)"},a.createElement($,{animate:n},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-374 70L-401 78H-192.5H14H25.5H212L180 70L157 55L144 70L105 11L69.5 70H41L17.8524 76.8586L-8 73L-39 38L-62 71L-85.5 61.5L-100.5 73L-114.5 61.5L-146 41L-168 70L-192.5 78L-235 70L-258 55L-271 70L-310 11L-327.75 40.5L-345.5 70H-374Z",fill:"#8F9EAA"}),a.createElement("path",{d:"M-401 78L-401.142 77.5206L-401 78.5V78ZM-374 70V69.5H-374.073L-374.142 69.5206L-374 70ZM212 78V78.5L212.121 77.5149L212 78ZM180 70L179.727 70.4188L179.797 70.4647L179.879 70.4851L180 70ZM157 55L157.273 54.5812L156.908 54.3429L156.622 54.6725L157 55ZM144 70L143.583 70.2757L143.946 70.8254L144.378 70.3275L144 70ZM105 11L105.417 10.7243L104.98 10.0632L104.572 10.7422L105 11ZM69.5 70V70.5H69.7827L69.9284 70.2578L69.5 70ZM41 70V69.5H40.9275L40.8579 69.5206L41 70ZM17.8524 76.8586L17.7785 77.3531L17.8882 77.3694L17.9944 77.338L17.8524 76.8586ZM-8 73L-8.3743 73.3315L-8.25369 73.4677L-8.07382 73.4945L-8 73ZM-39 38L-38.6257 37.6685L-39.0469 37.1929L-39.4102 37.7141L-39 38ZM-62 71L-62.1874 71.4636L-61.8178 71.613L-61.5898 71.2859L-62 71ZM-85.5 61.5L-85.3126 61.0365L-85.5775 60.9294L-85.8042 61.1032L-85.5 61.5ZM-100.5 73L-100.817 73.3864L-100.511 73.6383L-100.196 73.3968L-100.5 73ZM-114.5 61.5L-114.183 61.1137L-114.204 61.0961L-114.227 61.0809L-114.5 61.5ZM-146 41L-145.727 40.5809L-146.117 40.3272L-146.398 40.6978L-146 41ZM-168 70L-167.845 70.4753L-167.696 70.4268L-167.602 70.3022L-168 70ZM-235 70L-235.273 70.4188L-235.19 70.473L-235.092 70.4914L-235 70ZM-258 55L-257.727 54.5812L-258.092 54.3429L-258.378 54.6725L-258 55ZM-271 70L-271.417 70.2757L-271.054 70.8254L-270.622 70.3275L-271 70ZM-310 11L-309.583 10.7243L-310.02 10.0632L-310.428 10.7422L-310 11ZM-345.5 70V70.5H-345.217L-345.072 70.2578L-345.5 70ZM-400.858 78.4794L-373.858 70.4794L-374.142 69.5206L-401.142 77.5206L-400.858 78.4794ZM-192.5 77.5H-401V78.5H-192.5V77.5ZM14 77.5H-192.5V78.5H14V77.5ZM14 78.5H25.5V77.5H14V78.5ZM25.5 78.5H212V77.5H25.5V78.5ZM212.121 77.5149L180.121 69.5149L179.879 70.4851L211.879 78.4851L212.121 77.5149ZM180.273 69.5812L157.273 54.5812L156.727 55.4188L179.727 70.4188L180.273 69.5812ZM156.622 54.6725L143.622 69.6725L144.378 70.3275L157.378 55.3275L156.622 54.6725ZM144.417 69.7243L105.417 10.7243L104.583 11.2757L143.583 70.2757L144.417 69.7243ZM104.572 10.7422L69.0716 69.7422L69.9284 70.2578L105.428 11.2578L104.572 10.7422ZM69.5 69.5H41V70.5H69.5V69.5ZM40.8579 69.5206L17.7103 76.3792L17.9944 77.338L41.1421 70.4794L40.8579 69.5206ZM-8.07382 73.4945L17.7785 77.3531L17.9262 76.364L-7.92618 72.5055L-8.07382 73.4945ZM-39.3743 38.3315L-8.3743 73.3315L-7.6257 72.6685L-38.6257 37.6685L-39.3743 38.3315ZM-61.5898 71.2859L-38.5898 38.2859L-39.4102 37.7141L-62.4102 70.7141L-61.5898 71.2859ZM-85.6874 61.9636L-62.1874 71.4636L-61.8126 70.5364L-85.3126 61.0365L-85.6874 61.9636ZM-100.196 73.3968L-85.1958 61.8968L-85.8042 61.1032L-100.804 72.6032L-100.196 73.3968ZM-114.817 61.8864L-100.817 73.3864L-100.183 72.6136L-114.183 61.1137L-114.817 61.8864ZM-146.273 41.4191L-114.773 61.9191L-114.227 61.0809L-145.727 40.5809L-146.273 41.4191ZM-167.602 70.3022L-145.602 41.3022L-146.398 40.6978L-168.398 69.6978L-167.602 70.3022ZM-192.345 78.4753L-167.845 70.4753L-168.155 69.5247L-192.655 77.5247L-192.345 78.4753ZM-235.092 70.4914L-192.592 78.4914L-192.408 77.5086L-234.908 69.5086L-235.092 70.4914ZM-258.273 55.4188L-235.273 70.4188L-234.727 69.5812L-257.727 54.5812L-258.273 55.4188ZM-270.622 70.3275L-257.622 55.3275L-258.378 54.6725L-271.378 69.6725L-270.622 70.3275ZM-310.417 11.2757L-271.417 70.2757L-270.583 69.7243L-309.583 10.7243L-310.417 11.2757ZM-327.322 40.7578L-309.572 11.2578L-310.428 10.7422L-328.178 40.2422L-327.322 40.7578ZM-345.072 70.2578L-327.322 40.7578L-328.178 40.2422L-345.928 69.7422L-345.072 70.2578ZM-374 70.5H-345.5V69.5H-374V70.5Z",fill:"#CFD5DA"})),a.createElement("mask",{id:"mask1_467_73096",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"52",y:"0",width:"1140",height:"80"},a.createElement("rect",{x:"52",width:"1140",height:"80",fill:"#C4C4C4"})),a.createElement("g",{mask:"url(#mask1_467_73096)"},a.createElement("rect",{x:"55.5",y:"-1.5",width:"1140",height:"80",fill:"#CFD5DA",fillOpacity:"0.25",stroke:"#8F9EAA",strokeDasharray:"2 5"}),a.createElement("rect",{x:"55",width:"86",height:"3",fill:"#CFD5DA"}))))},J=new(f())({id:"error-state",use:"error-state-usage",viewBox:"0 0 199 79",content:''}),Q=(L().add(J),J),W=function(){return a.createElement("svg",{viewBox:Q.viewBox,width:"197"},a.createElement("use",{xlinkHref:"#".concat(Q.id)}))},X=(0,K.default)(m.Button).withConfig({displayName:"errorView__RetryButton",componentId:"sc-1n9qb8k-0"})(["white-space:normal !important;align-items:flex-start !important;width:230px !important;font-size:12px !important;font-weight:normal !important;& > *{align-items:start !important;margin:0 !important;padding:0 !important;}"]),ee=function(e){var t=e.onRetry;return a.createElement(m.Flex,{column:!0,alignItems:"center",width:"100%"},a.createElement(W,null),a.createElement(m.TextSmall,{margin:[1,0,0],color:"textDescription"},"Something went wrong."),a.createElement(X,{margin:[2,0,0],padding:[0],onClick:t,icon:"reload",flavour:"borderless",label:"Retry fetching anomalies for the same timeframe",height:"initial",width:"initial"}))},te=["error","loading","hasData","onRetry","totalDimensionsCount"],ne=function(e){var t=e.error,n=e.loading,r=e.hasData;return t?a.createElement(m.TextSmall,null,"No data"===t?"No data for this period. Try highlighting an other area.":t.errorMessage||"Something went wrong"):n?a.createElement(m.TextSmall,null,"Searching for anomalies..."):r?a.createElement(m.TextSmall,{color:"sectionDescription"},"Anomalous metrics in the selected timeframe sorted from most anomalous to least."):a.createElement(m.TextSmall,null,"You haven't highlighted any timeframe yet.")},ae=function(e){var t=e.error,n=e.loading,r=e.hasData,o=e.onRetry,i=e.totalDimensionsCount,l=(0,V.Z)(e,te);return a.createElement(m.Flex,(0,j.Z)({column:!0,gap:2,padding:[4],background:"sideBar"},l),a.createElement(m.Flex,{gap:1,alignItems:"baseline"},a.createElement(m.H4,{color:"sectionTitle"},i?"".concat(i," "):"","Anomalous metrics"),a.createElement(z,null)),a.createElement(ne,{hasData:r,loading:n,error:t}),t?a.createElement(ee,{onRetry:o}):a.createElement(q,{animate:n}))},re=function(e){var t=(0,r.TA)({extraKey:"anomalies"}),n=(0,P.$g)({nodeIds:t,flavour:"anomaly"}),o=n.loaded,i=n.loading,l=n.error,c=n.totalDimensionsCount;return a.createElement(ae,(0,j.Z)({loading:i,error:l,hasData:o,totalDimensionsCount:c},e))};function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function ie(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{}).os,a={},r=function(e,t){var n={},a={},r={};return se.forEach((function(e,n){t[e]={chartId:e,id:"Anomaly advisor",subMenuId:e,priority:-(n+1)}})),e.forEach((function(e,n){t[e]={chartId:e,id:"Anomalous metrics",subMenuId:e,priority:n+1}})),[].concat(se,(0,o.Z)(e)).forEach((function(e){var o=t[e],i="".concat(o.id,"|").concat(o.subMenuId);a[i]||(a[i]=[]),n[o.id]||(n[o.id]=new Set),r[o.id]||(r[o.id]=[]),o.chartId&&(a[i].push(o.chartId),r[o.id].push(o.chartId)),i&&n[o.id].add(i)})),{chartMenus:t,menuGroups:n,subMenus:a,menuGroupChartIds:r}}(e,a),i=r.menuGroups,l=r.subMenus,c=r.menuGroupChartIds,s={},d=Object.keys(i).reduce((function(e,t){var n=c[t],r=(0,o.Z)(i[t]),l=a[n[0]];return e[t]=ie(ie(ie({},l),ce[t]),{},{level:0,id:t,subMenuIds:r,subMenuChartIds:n,link:"".concat((0,B.Z)("menu_".concat(t))),size:24,forceVisibility:!0,arFlavour:"anomaly"}),e}),{}),u=Object.keys(l).reduce((function(e,t){var n=l[t];if(!n.length)return e;var r=a[n[0]],o=d[r.id].id,i=r.chartId.split("::"),c=(0,k.Z)(i,2),s=c[0],u=c[1],m=le[r.chartId];return e[t]=ie(ie(ie({},r),{},{name:u?"".concat(s," > ").concat(u):s},m),{},{level:1,id:t,menuGroupId:o,chartIds:n,link:"".concat((0,B.Z)("menu_".concat(r.id,"_submenu_").concat(r.subMenuId))),size:24,forceVisibility:!0,arFlavour:"anomaly",showAR:!m,weightKey:"score"}),e}),{}),m=Object.keys(i),h=m.reduce((function(e,t){1;var r=d[t];return[].concat((0,o.Z)(e),[r],(0,o.Z)(d[t].subMenuIds.reduce((function(e,r){1;var i=u[r];return[].concat((0,o.Z)(e),[i],(0,o.Z)(u[r].chartIds.map((function(e){var o=a[e];if(o)return 1,s[e]=(0,N.ZP)(ie(ie({},o),{},{id:e,context:e}),{menuId:t,subMenuId:r,sectionInfo:u[r].info},{os:n}),ie(ie({},s[e]),{},{level:2,size:365,menuKey:d[t].id,forceVisibility:!0})}))))}),[])))}),[]);return a=null,{stickyIndexes:[],allCharts:h,menuGroupIds:m,menuGroupById:d,subMenuById:u,menuChartsAttributeById:s}},ue=n(15394),me=n(13962),he=n(22962),fe=n(61152),pe=n(69743),Le=n(56102),ge=n(11835),ve=["id"],Ze=function(e){var t=e.id,n=(0,V.Z)(e,ve);return a.createElement(pe.d,(0,j.Z)({id:t},n),a.createElement(Le.Y,{id:t}),a.createElement(ge.f,{id:t}))},ye=(0,a.memo)(Ze),be=n(71824),Me=n(9058),Ee=n(16978),we=(n(69826),n(31672),n(59461),n(74916),n(4723),n(24298)),xe=n(96415),Ce=n(70873),ke=n(43460),Ae=n(84817),Ie=n(18039),De=function(e,t){return e&&e.getRoot().getChildren().find((function(e){return e.match({id:"anomalies-".concat(t)})}))},Oe=function(e){return function(t){return"overview-page::".concat(e.getAttribute("id"),"::").concat(t)}},Se=["id"],Te=["height"];function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function He(e){for(var t=1;t0;return n&&!c?a.createElement(C,null):a.createElement(Qe,{nodeIds:e})}}}]); \ No newline at end of file +!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e56d15d7-ab70-4586-9c15-e358edf27201",e._sentryDebugIdIdentifier="sentry-dbid-e56d15d7-ab70-4586-9c15-e358edf27201")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"bc401569f0a5aac35c96315fba57182a8ad450f2"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[359],{57359:function(e,t,n){n.r(t),n.d(t,{default:function(){return We}});var a=n(67294),r=n(95248),o=n(93433),i=(n(26699),n(32023),n(57327),n(41539),n(88449),n(2490),n(59849),n(92222),n(85827),n(25387),n(72608),n(4480)),l=n(97945),c={nodes:(0,i.xu)({key:"anomalyFilters",default:[]})},s=((0,i.CG)({key:"anomalyFilterState",get:function(e){var t=e.roomId,n=e.filterKey;return function(e){return(0,e.get)(c[n](t))}},set:function(e){var t=e.roomId,n=e.filterKey;return function(e,a){var r=e.set,i=e.get;if(Array.isArray(a))return r(c[n](t),a);var l=i(c[n](t)),s=l.includes(a)?l.filter((function(e){return e!==a})):[].concat((0,o.Z)(l),[a]);r(c[n](t),s)}}}),function(e,t){return t?e[t]:e}),d=n(36560),u=n(96929),m=n(15557),h=n(87854),f=n.n(h),p=n(95348),L=n.n(p),g=new(f())({id:"notCapableNodes",use:"notCapableNodes-usage",viewBox:"0 0 231 230",content:''}),v=(L().add(g),g),Z=function(){return a.createElement(m.Flex,{width:"100%",justifyContent:"center",alignItems:"center",gap:3},a.createElement("svg",{viewBox:v.viewBox,height:"222px"},a.createElement("use",{xlinkHref:"#".concat(v.id)})),a.createElement(m.TextBig,{strong:!0},"Your nodes are either offline or not configured for ML"))},y=n(91008),b=function(){return a.createElement(m.Flex,{height:10.5,width:{min:10.5},background:"warningText",justifyContent:"center",alignItems:"center",round:"50%",sx:{borderRadius:"50%"}},a.createElement(m.Icon,{color:"warningBackground",name:"informationPress"}))},M=function(e){var t=e.to,n=e.children;return a.createElement(y.Z,{Component:m.Text,href:t,target:"_blank",rel:"noopener noreferrer"},n)},E=function(){return a.createElement(m.Flex,{column:!0,gap:1},a.createElement(m.Text,{strong:!0,color:"textDescription"},"Not Configured Nodes"),a.createElement(m.Text,{color:"textDescription"},"Learn how to configure your nodes"," ",a.createElement(M,{to:"https://learn.netdata.cloud/docs/cloud/insights/anomaly-advisor#enable-ml-on-netdata-agent"},"to support anomaly advisor"),"."))},w=function(){return a.createElement(m.Flex,{column:!0,gap:1},a.createElement(m.Text,{strong:!0,color:"textDescription"},"Not Capable Nodes"),a.createElement(m.Text,{color:"textDescription"},"All nodes need to be updated to a version higher than"," ",a.createElement(m.Text,{strong:!0,color:"textDescription"},"1.32"),". Learn how to"," ",a.createElement(M,{to:"https://learn.netdata.cloud/docs/agent/packaging/installer/update"},"update to the latest Netdata version"),"."))},x=function(){return a.createElement(m.Box,{round:!0,background:"elementBackground",padding:[4]},a.createElement(m.Flex,{gap:4,alignItems:"start"},a.createElement(b,null),a.createElement(m.Flex,{gap:4,column:!0},a.createElement(E,null),a.createElement(w,null))))},C=function(){return a.createElement(m.Flex,{column:!0,width:"100%",height:"100%",justifyContent:"start",padding:[8,4]},a.createElement(m.Flex,{column:!0,gap:8},a.createElement(Z,null),a.createElement(x,null)))},k=n(29439),A=n(88553),I=n(91268),D=n(37518),O=n(89479),S=n(74059),T=n(74662),_=n(25517),H=n(49887),B=n(39612),F=(n(82526),n(38880),n(49337),n(33321),n(69070),n(4942)),N=(n(47941),n(15581),n(34514),n(54747),n(66992),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(21249),n(57640),n(9924),n(89692)),j=n(87462),V=n(45987),P=n(2077),R=n(89405),G=n(78122),U=function(e){return Math.floor(e/1e3)},z=function(){var e=(0,_.$B)(),t=(0,k.Z)(e,2),n=t[0],r=t[1],o=(0,R.rA)().localeTimeString,i=(0,a.useMemo)((function(){var e=U(n),t=U(r);return[(0,G.getDateDiff)(e,t),o(n,{secs:!0}),o(r,{secs:!0})]}),[n,r]),l=(0,k.Z)(i,3),c=l[0],s=l[1],d=l[2];return n&&r?a.createElement(m.Flex,{gap:1,alignItems:"baseline"},a.createElement(m.TextMicro,{strong:!0,color:"textLite"},a.createElement(m.TextSmall,{strong:!0,color:"textLite"},s," \u2192 ",d," \u2022")," ","Duration: ",c)):null},K=n(60677),Y=(0,K.keyframes)(["from{transform:translate(412px,0);}"]),$=K.default.g.withConfig({displayName:"skeleton__Animated",componentId:"sc-gwkfye-0"})(["animation:",";"],(function(e){return e.animate?(0,K.css)([""," 1s linear infinite"],Y):""})),q=function(e){var t=e.animate,n=void 0!==t&&t;return a.createElement("svg",{width:"1140",height:"80",viewBox:"0 0 1140 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("mask",{id:"mask0_467_73096",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"1140",height:"80"},a.createElement("rect",{width:"1140",height:"80",fill:"#C4C4C4"})),a.createElement("g",{mask:"url(#mask0_467_73096)"},a.createElement($,{animate:n},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-374 70L-401 78H-192.5H14H25.5H212L180 70L157 55L144 70L105 11L69.5 70H41L17.8524 76.8586L-8 73L-39 38L-62 71L-85.5 61.5L-100.5 73L-114.5 61.5L-146 41L-168 70L-192.5 78L-235 70L-258 55L-271 70L-310 11L-327.75 40.5L-345.5 70H-374Z",fill:"#8F9EAA"}),a.createElement("path",{d:"M-401 78L-401.142 77.5206L-401 78.5V78ZM-374 70V69.5H-374.073L-374.142 69.5206L-374 70ZM212 78V78.5L212.121 77.5149L212 78ZM180 70L179.727 70.4188L179.797 70.4647L179.879 70.4851L180 70ZM157 55L157.273 54.5812L156.908 54.3429L156.622 54.6725L157 55ZM144 70L143.583 70.2757L143.946 70.8254L144.378 70.3275L144 70ZM105 11L105.417 10.7243L104.98 10.0632L104.572 10.7422L105 11ZM69.5 70V70.5H69.7827L69.9284 70.2578L69.5 70ZM41 70V69.5H40.9275L40.8579 69.5206L41 70ZM17.8524 76.8586L17.7785 77.3531L17.8882 77.3694L17.9944 77.338L17.8524 76.8586ZM-8 73L-8.3743 73.3315L-8.25369 73.4677L-8.07382 73.4945L-8 73ZM-39 38L-38.6257 37.6685L-39.0469 37.1929L-39.4102 37.7141L-39 38ZM-62 71L-62.1874 71.4636L-61.8178 71.613L-61.5898 71.2859L-62 71ZM-85.5 61.5L-85.3126 61.0365L-85.5775 60.9294L-85.8042 61.1032L-85.5 61.5ZM-100.5 73L-100.817 73.3864L-100.511 73.6383L-100.196 73.3968L-100.5 73ZM-114.5 61.5L-114.183 61.1137L-114.204 61.0961L-114.227 61.0809L-114.5 61.5ZM-146 41L-145.727 40.5809L-146.117 40.3272L-146.398 40.6978L-146 41ZM-168 70L-167.845 70.4753L-167.696 70.4268L-167.602 70.3022L-168 70ZM-235 70L-235.273 70.4188L-235.19 70.473L-235.092 70.4914L-235 70ZM-258 55L-257.727 54.5812L-258.092 54.3429L-258.378 54.6725L-258 55ZM-271 70L-271.417 70.2757L-271.054 70.8254L-270.622 70.3275L-271 70ZM-310 11L-309.583 10.7243L-310.02 10.0632L-310.428 10.7422L-310 11ZM-345.5 70V70.5H-345.217L-345.072 70.2578L-345.5 70ZM-400.858 78.4794L-373.858 70.4794L-374.142 69.5206L-401.142 77.5206L-400.858 78.4794ZM-192.5 77.5H-401V78.5H-192.5V77.5ZM14 77.5H-192.5V78.5H14V77.5ZM14 78.5H25.5V77.5H14V78.5ZM25.5 78.5H212V77.5H25.5V78.5ZM212.121 77.5149L180.121 69.5149L179.879 70.4851L211.879 78.4851L212.121 77.5149ZM180.273 69.5812L157.273 54.5812L156.727 55.4188L179.727 70.4188L180.273 69.5812ZM156.622 54.6725L143.622 69.6725L144.378 70.3275L157.378 55.3275L156.622 54.6725ZM144.417 69.7243L105.417 10.7243L104.583 11.2757L143.583 70.2757L144.417 69.7243ZM104.572 10.7422L69.0716 69.7422L69.9284 70.2578L105.428 11.2578L104.572 10.7422ZM69.5 69.5H41V70.5H69.5V69.5ZM40.8579 69.5206L17.7103 76.3792L17.9944 77.338L41.1421 70.4794L40.8579 69.5206ZM-8.07382 73.4945L17.7785 77.3531L17.9262 76.364L-7.92618 72.5055L-8.07382 73.4945ZM-39.3743 38.3315L-8.3743 73.3315L-7.6257 72.6685L-38.6257 37.6685L-39.3743 38.3315ZM-61.5898 71.2859L-38.5898 38.2859L-39.4102 37.7141L-62.4102 70.7141L-61.5898 71.2859ZM-85.6874 61.9636L-62.1874 71.4636L-61.8126 70.5364L-85.3126 61.0365L-85.6874 61.9636ZM-100.196 73.3968L-85.1958 61.8968L-85.8042 61.1032L-100.804 72.6032L-100.196 73.3968ZM-114.817 61.8864L-100.817 73.3864L-100.183 72.6136L-114.183 61.1137L-114.817 61.8864ZM-146.273 41.4191L-114.773 61.9191L-114.227 61.0809L-145.727 40.5809L-146.273 41.4191ZM-167.602 70.3022L-145.602 41.3022L-146.398 40.6978L-168.398 69.6978L-167.602 70.3022ZM-192.345 78.4753L-167.845 70.4753L-168.155 69.5247L-192.655 77.5247L-192.345 78.4753ZM-235.092 70.4914L-192.592 78.4914L-192.408 77.5086L-234.908 69.5086L-235.092 70.4914ZM-258.273 55.4188L-235.273 70.4188L-234.727 69.5812L-257.727 54.5812L-258.273 55.4188ZM-270.622 70.3275L-257.622 55.3275L-258.378 54.6725L-271.378 69.6725L-270.622 70.3275ZM-310.417 11.2757L-271.417 70.2757L-270.583 69.7243L-309.583 10.7243L-310.417 11.2757ZM-327.322 40.7578L-309.572 11.2578L-310.428 10.7422L-328.178 40.2422L-327.322 40.7578ZM-345.072 70.2578L-327.322 40.7578L-328.178 40.2422L-345.928 69.7422L-345.072 70.2578ZM-374 70.5H-345.5V69.5H-374V70.5Z",fill:"#CFD5DA"})),a.createElement("mask",{id:"mask1_467_73096",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"52",y:"0",width:"1140",height:"80"},a.createElement("rect",{x:"52",width:"1140",height:"80",fill:"#C4C4C4"})),a.createElement("g",{mask:"url(#mask1_467_73096)"},a.createElement("rect",{x:"55.5",y:"-1.5",width:"1140",height:"80",fill:"#CFD5DA",fillOpacity:"0.25",stroke:"#8F9EAA",strokeDasharray:"2 5"}),a.createElement("rect",{x:"55",width:"86",height:"3",fill:"#CFD5DA"}))))},J=new(f())({id:"error-state",use:"error-state-usage",viewBox:"0 0 199 79",content:''}),Q=(L().add(J),J),W=function(){return a.createElement("svg",{viewBox:Q.viewBox,width:"197"},a.createElement("use",{xlinkHref:"#".concat(Q.id)}))},X=(0,K.default)(m.Button).withConfig({displayName:"errorView__RetryButton",componentId:"sc-1n9qb8k-0"})(["white-space:normal !important;align-items:flex-start !important;width:230px !important;font-size:12px !important;font-weight:normal !important;& > *{align-items:start !important;margin:0 !important;padding:0 !important;}"]),ee=function(e){var t=e.onRetry;return a.createElement(m.Flex,{column:!0,alignItems:"center",width:"100%"},a.createElement(W,null),a.createElement(m.TextSmall,{margin:[1,0,0],color:"textDescription"},"Something went wrong."),a.createElement(X,{margin:[2,0,0],padding:[0],onClick:t,icon:"reload",flavour:"borderless",label:"Retry fetching anomalies for the same timeframe",height:"initial",width:"initial"}))},te=["error","loading","hasData","onRetry","totalDimensionsCount"],ne=function(e){var t=e.error,n=e.loading,r=e.hasData;return t?a.createElement(m.TextSmall,null,"No data"===t?"No data for this period. Try highlighting an other area.":t.errorMessage||"Something went wrong"):n?a.createElement(m.TextSmall,null,"Searching for anomalies..."):r?a.createElement(m.TextSmall,{color:"sectionDescription"},"Anomalous metrics in the selected timeframe sorted from most anomalous to least."):a.createElement(m.TextSmall,null,"You haven't highlighted any timeframe yet.")},ae=function(e){var t=e.error,n=e.loading,r=e.hasData,o=e.onRetry,i=e.totalDimensionsCount,l=(0,V.Z)(e,te);return a.createElement(m.Flex,(0,j.Z)({column:!0,gap:2,padding:[4],background:"sideBar"},l),a.createElement(m.Flex,{gap:1,alignItems:"baseline"},a.createElement(m.H4,{color:"sectionTitle"},i?"".concat(i," "):"","Anomalous metrics"),a.createElement(z,null)),a.createElement(ne,{hasData:r,loading:n,error:t}),t?a.createElement(ee,{onRetry:o}):a.createElement(q,{animate:n}))},re=function(e){var t=(0,r.TA)({extraKey:"anomalies"}),n=(0,P.$g)({nodeIds:t,flavour:"anomaly"}),o=n.loaded,i=n.loading,l=n.error,c=n.totalDimensionsCount;return a.createElement(ae,(0,j.Z)({loading:i,error:l,hasData:o,totalDimensionsCount:c},e))};function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function ie(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{}).os,a={},r=function(e,t){var n={},a={},r={};return se.forEach((function(e,n){t[e]={chartId:e,id:"Anomaly advisor",subMenuId:e,priority:-(n+1)}})),e.forEach((function(e,n){t[e]={chartId:e,id:"Anomalous metrics",subMenuId:e,priority:n+1}})),[].concat(se,(0,o.Z)(e)).forEach((function(e){var o=t[e],i="".concat(o.id,"|").concat(o.subMenuId);a[i]||(a[i]=[]),n[o.id]||(n[o.id]=new Set),r[o.id]||(r[o.id]=[]),o.chartId&&(a[i].push(o.chartId),r[o.id].push(o.chartId)),i&&n[o.id].add(i)})),{chartMenus:t,menuGroups:n,subMenus:a,menuGroupChartIds:r}}(e,a),i=r.menuGroups,l=r.subMenus,c=r.menuGroupChartIds,s={},d=Object.keys(i).reduce((function(e,t){var n=c[t],r=(0,o.Z)(i[t]),l=a[n[0]];return e[t]=ie(ie(ie({},l),ce[t]),{},{level:0,id:t,subMenuIds:r,subMenuChartIds:n,link:"".concat((0,B.Z)("menu_".concat(t))),size:24,forceVisibility:!0,arFlavour:"anomaly"}),e}),{}),u=Object.keys(l).reduce((function(e,t){var n=l[t];if(!n.length)return e;var r=a[n[0]],o=d[r.id].id,i=r.chartId.split("::"),c=(0,k.Z)(i,2),s=c[0],u=c[1],m=le[r.chartId];return e[t]=ie(ie(ie({},r),{},{name:u?"".concat(s," > ").concat(u):s},m),{},{level:1,id:t,menuGroupId:o,chartIds:n,link:"".concat((0,B.Z)("menu_".concat(r.id,"_submenu_").concat(r.subMenuId))),size:24,forceVisibility:!0,arFlavour:"anomaly",showAR:!m,weightKey:"score"}),e}),{}),m=Object.keys(i),h=m.reduce((function(e,t){1;var r=d[t];return[].concat((0,o.Z)(e),[r],(0,o.Z)(d[t].subMenuIds.reduce((function(e,r){1;var i=u[r];return[].concat((0,o.Z)(e),[i],(0,o.Z)(u[r].chartIds.map((function(e){var o=a[e];if(o)return 1,s[e]=(0,N.ZP)(ie(ie({},o),{},{id:e,context:e}),{menuId:t,subMenuId:r,sectionInfo:u[r].info},{os:n}),ie(ie({},s[e]),{},{level:2,size:365,menuKey:d[t].id,forceVisibility:!0})}))))}),[])))}),[]);return a=null,{stickyIndexes:[],allCharts:h,menuGroupIds:m,menuGroupById:d,subMenuById:u,menuChartsAttributeById:s}},ue=n(15394),me=n(13962),he=n(22962),fe=n(61152),pe=n(69743),Le=n(56102),ge=n(11835),ve=["id"],Ze=function(e){var t=e.id,n=(0,V.Z)(e,ve);return a.createElement(pe.d,(0,j.Z)({id:t},n),a.createElement(Le.Y,{id:t}),a.createElement(ge.f,{id:t}))},ye=(0,a.memo)(Ze),be=n(71824),Me=n(9058),Ee=n(16978),we=(n(69826),n(31672),n(59461),n(74916),n(4723),n(24298)),xe=n(96415),Ce=n(70873),ke=n(43460),Ae=n(84817),Ie=n(18039),De=function(e,t){return e&&e.getRoot().getChildren().find((function(e){return e.match({id:"anomalies-".concat(t)})}))},Oe=function(e){return function(t){return"overview-page::".concat(e.getAttribute("id"),"::").concat(t)}},Se=["id"],Te=["height"];function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function He(e){for(var t=1;t0;return n&&!c?a.createElement(C,null):a.createElement(Qe,{nodeIds:e})}}}]); \ No newline at end of file diff --git a/web/gui/v2/360.e28d3f347876d6316fe9.chunk.js b/web/gui/v2/360.e28d3f347876d6316fe9.chunk.js new file mode 100644 index 00000000000000..28699eebe8718b --- /dev/null +++ b/web/gui/v2/360.e28d3f347876d6316fe9.chunk.js @@ -0,0 +1 @@ +!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a55e90cf-09e9-4e4a-9113-03f469734a77",e._sentryDebugIdIdentifier="sentry-dbid-a55e90cf-09e9-4e4a-9113-03f469734a77")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"bc401569f0a5aac35c96315fba57182a8ad450f2"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[360],{79360:function(e,n,t){t.r(n),t.d(n,{default:function(){return I}});var r=t(67294),o=t(89250),a=(t(47042),t(91038),t(77601),t(82526),t(41817),t(32165),t(29439)),c=t(15861),i=t(64687),u=t.n(i),l=(t(66992),t(41539),t(78783),t(33948),t(41637),t(74916),t(64765),t(88674),t(60285),t(39714),t(21249),t(57640),t(9924),t(64211),t(2490),t(41874),t(23157),t(57327),t(88449),t(59849),t(9170),t(34668),t(92222),t(15557)),f=t(13477),d=t(28234),s=t(18761);function p(e,n){var t="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(!e)return;if("string"===typeof e)return m(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return m(e,n)}(e))||n&&e&&"number"===typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=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 a,c=!0,i=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return c=e.done,e},e:function(e){i=!0,a=e},f:function(){try{c||null==t.return||t.return()}finally{if(i)throw a}}}}function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t
Getting you back to Netdata..."),(a=new Error((0,d.r)(null===o||void 0===o?void 0:o.errorMsgKey)||"Redirect error")).name="".concat((null===o||void 0===o?void 0:o.errorMsgKey)||"Server error"),a.stack="".concat((null===o||void 0===o?void 0:o.errorCode)||"Redirect error code"),a;case 15:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(n,t){return e.apply(this,arguments)}}(),g=function(e){return fetch(e,{redirect:"follow"}).then((function(){return e}))},b=function(e){var n,t="top;nowelcome=1",r=p(h.entries());try{for(r.s();!(n=r.n()).done;){var o=(0,a.Z)(n.value,2),c=o[0],i=o[1];"agentID"!==(c=decodeURIComponent(c))&&(t+=";".concat(encodeURIComponent(c)),""!==(i=decodeURIComponent(i))&&(t+="=".concat(encodeURIComponent(i))))}}catch(l){r.e(l)}finally{r.f()}var u=new URL(e);return"/"===u.pathname&&(u.pathname=""),u.hash=t,u.toString()},w=function(){var e=(0,f.jr)(),n=(0,o.TH)().search;return(0,r.useEffect)((function(){e&&function(e,n){if(h.has("agentID")){var t=decodeURIComponent(h.get("agentID")||"unknown_agent_id");v(t,e).catch((function(e){if("ErrVisitedNodeNotFound"!==(null===e||void 0===e?void 0:e.name))throw document.body.innerHTML="

".concat(null===e||void 0===e?void 0:e.message,"

"),e;y()})).then((function(e){var t,r=null===e||void 0===e||null===(t=e.urls)||void 0===t?void 0:t.map(b),o="https:"===location.protocol&&r.some((function(e){return!e.startsWith("https:")})),a=o?r.filter((function(e){return e.startsWith("https:")})):r;if(0!==a.length)return Promise.any(a.map(g)).then((function(){location.assign("url".concat(n))}),(function(){o?location.protocol="http:":document.body.innerHTML="\n
    \n ".concat(r.map((function(e){return'
  • ').concat(e,"
  • ")})).join("\n"),"\n
\n ")}));o?location.protocol="http:":y()}))}else document.body.innerHTML='

missing "agentID" query string parameter

'}(e,n||"")}),[e,n]),r.createElement(l.H4,null,"Redirecting...")},I=function(){return r.createElement(o.Z5,null,r.createElement(o.AW,{path:"/redirects/alerts",element:r.createElement(w,null)}),r.createElement(o.AW,{path:"/redirects/alarms",element:r.createElement(w,null)})," ")}}}]); \ No newline at end of file diff --git a/web/gui/v2/360.fad154c858b78a20d8f5.chunk.js b/web/gui/v2/360.fad154c858b78a20d8f5.chunk.js deleted file mode 100644 index cfba060298ed1d..00000000000000 --- a/web/gui/v2/360.fad154c858b78a20d8f5.chunk.js +++ /dev/null @@ -1 +0,0 @@ -!function(){try{var n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new Error).stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="3b4f777e-1cbb-4a40-ad8b-80a9c7bc8afd",n._sentryDebugIdIdentifier="sentry-dbid-3b4f777e-1cbb-4a40-ad8b-80a9c7bc8afd")}catch(n){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"068845a823c962888381794c354a8f6b6e263031"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[360],{79360:function(n,e,t){t.r(e),t.d(e,{default:function(){return I}});var r=t(67294),o=t(89250),a=(t(47042),t(91038),t(77601),t(82526),t(41817),t(32165),t(29439)),c=t(15861),i=t(64687),u=t.n(i),l=(t(66992),t(41539),t(78783),t(33948),t(41637),t(74916),t(64765),t(88674),t(60285),t(39714),t(21249),t(57640),t(9924),t(64211),t(2490),t(41874),t(23157),t(57327),t(88449),t(59849),t(9170),t(34668),t(92222),t(15557)),d=t(13477),f=t(28234),s=t(18761);function p(n,e){var t="undefined"!==typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"===typeof n)return m(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return m(n,e)}(n))||e&&n&&"number"===typeof n.length){t&&(n=t);var r=0,o=function(){};return{s:o,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},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 a,c=!0,i=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){i=!0,a=n},f:function(){try{c||null==t.return||t.return()}finally{if(i)throw a}}}}function m(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t
Getting you back to Netdata..."),(a=new Error((0,f.r)(null===o||void 0===o?void 0:o.errorMsgKey)||"Redirect error")).name="".concat((null===o||void 0===o?void 0:o.errorMsgKey)||"Server error"),a.stack="".concat((null===o||void 0===o?void 0:o.errorCode)||"Redirect error code"),a;case 15:case"end":return n.stop()}}),n,null,[[0,7]])})));return function(e,t){return n.apply(this,arguments)}}(),v=function(n){return fetch(n,{redirect:"follow"}).then((function(){return n}))},g=function(n){var e,t="top;nowelcome=1",r=p(h.entries());try{for(r.s();!(e=r.n()).done;){var o=(0,a.Z)(e.value,2),c=o[0],i=o[1];"agentID"!==(c=decodeURIComponent(c))&&(t+=";".concat(encodeURIComponent(c)),""!==(i=decodeURIComponent(i))&&(t+="=".concat(encodeURIComponent(i))))}}catch(l){r.e(l)}finally{r.f()}var u=new URL(n);return"/"===u.pathname&&(u.pathname=""),u.hash=t,u.toString()},w=function(){var n=(0,d.jr)(),e=(0,o.TH)().search;return(0,r.useEffect)((function(){n&&function(n,e){if(h.has("agentID")){var t=decodeURIComponent(h.get("agentID")||"unknown_agent_id");y(t,n).catch((function(n){if("ErrVisitedNodeNotFound"!==(null===n||void 0===n?void 0:n.name))throw document.body.innerHTML="

".concat(null===n||void 0===n?void 0:n.message,"

"),n;b()})).then((function(n){var t,r=null===n||void 0===n||null===(t=n.urls)||void 0===t?void 0:t.map(g),o="https:"===location.protocol&&r.some((function(n){return!n.startsWith("https:")})),a=o?r.filter((function(n){return n.startsWith("https:")})):r;if(0!==a.length)return Promise.any(a.map(v)).then((function(){location.assign("url".concat(e))}),(function(){o?location.protocol="http:":document.body.innerHTML="\n
    \n ".concat(r.map((function(n){return'
  • ').concat(n,"
  • ")})).join("\n"),"\n
\n ")}));o?location.protocol="http:":b()}))}else document.body.innerHTML='

missing "agentID" query string parameter

'}(n,e||"")}),[n,e]),r.createElement(l.H4,null,"Redirecting...")},I=function(){return r.createElement(o.Z5,null,r.createElement(o.AW,{path:"/redirects/alerts",element:r.createElement(w,null)}),r.createElement(o.AW,{path:"/redirects/alarms",element:r.createElement(w,null)})," ")}}}]); \ No newline at end of file diff --git a/web/gui/v2/367.cf3f661f1c7bdb62b59b.chunk.js b/web/gui/v2/367.fb1db20b6e9893ffb1d3.chunk.js similarity index 98% rename from web/gui/v2/367.cf3f661f1c7bdb62b59b.chunk.js rename to web/gui/v2/367.fb1db20b6e9893ffb1d3.chunk.js index d16b5ef93b5b03..183e21d5fe3804 100644 --- a/web/gui/v2/367.cf3f661f1c7bdb62b59b.chunk.js +++ b/web/gui/v2/367.fb1db20b6e9893ffb1d3.chunk.js @@ -1 +1 @@ -!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7b297f8f-801b-4789-9b60-685e570b28f6",e._sentryDebugIdIdentifier="sentry-dbid-7b297f8f-801b-4789-9b60-685e570b28f6")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"068845a823c962888381794c354a8f6b6e263031"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[367],{46742:function(e,t,n){n.d(t,{lG:function(){return w},om:function(){return h}});var r=n(29439),o=n(93433),a=n(87462),i=n(45987),c=n(4942),l=(n(47042),n(92222),n(41539),n(39714),n(85827),n(25387),n(2490),n(72608),n(26699),n(32023),n(21249),n(57640),n(9924),n(57327),n(88449),n(59849),n(64211),n(41874),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),u=n(60677),s=n(95248),d=n(15557),f=n(39434),m=["item","onItemClick","itemProps"],p=["value","disabled","onClick","label","selected","indeterminate","textColor","iconName","count","level"],g=["baseKey","extraKey","param","Item","testIdPrefix","collection","getValue","getLabel","itemsProps","itemProps","capitalized","multi"];function v(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 y(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?n?t:[]:n?[].concat((0,o.Z)(e),[t]):e.filter((function(e){return e!==t}))}:function(){return n?[t]:[]})}),[j]),Z=(0,l.useMemo)((function(){return function(e){var t=e.collection,n=e.selected,r=e.getValue,a=e.getLabel,i=e.itemsProps,c=e.multi;if(!t.length)return[];var l=c&&t.length<=n.length,u=c&&!l&&!!n.length;return t.reduce((function(e,t){var c=n.includes(r(t));return[].concat((0,o.Z)(e),[y(y(y({},i.row),t),{},{value:r(t),label:a(t),selected:c})])}),c?[y(y({},i.head),{},{label:"Select all",value:t.map(r),selected:l,indeterminate:u})]:[])}({collection:m,selected:E,getValue:p,getLabel:v,itemsProps:b,multi:k})}),[E,j,m]);return l.createElement(d.MenuDropdown,(0,a.Z)({hideShadow:!0,height:{max:"300px"},width:{max:"600px"},background:"mainBackground",overflow:"auto","data-testid":"".concat(f,'-filter-selections"'),searchMargin:[0,0,2],items:Z,Item:u,onItemClick:L,value:E,"data-value":E.join(",")||"all-selected",hasSearch:m.length>5,itemProps:y(y({},h),{},{testIdPrefix:f,capitalized:x,multi:k})},C))},O=function(e){return e};x.defaultProps={itemProps:{padding:[1,.5],maxLength:30,multi:!0},itemsProps:{head:{textColor:"textLite"},row:{textColor:"text"}},Item:function(e){var t=e.item,n=e.onItemClick,r=e.itemProps,o=(0,i.Z)(e,m),c=t.value,u=t.disabled,s=t.onClick,g=t.label,v=t.selected,y=t.indeterminate,x=t.textColor,O=t.iconName,k=t.count,C=t.level,I=void 0===C?0:C,P=(0,i.Z)(t,p),E=r.capitalized,j=r.multi,L=u||!j&&v,Z=function(e){u||(s&&s(e),n({value:c,label:g,checked:!v,item:t}))};return l.createElement(h,(0,a.Z)({"aria-selected":v,selected:v,disabled:L,stale:0===k||"0"===k},P,o,r,{"data-testid":"".concat(r.testIdPrefix,"-filters-item")}),l.createElement(d.Flex,{gap:2,alignItems:"center",padding:[0,0,0,4*I],width:"100%"},j?l.createElement(w,{"data-testid":"".concat(r.testIdPrefix,"-filters-checkbox-").concat(g),checked:v,disabled:L,indeterminate:y,onChange:Z,label:l.createElement(d.Flex,{gap:1,alignItems:"center",width:"100%"},O&&l.createElement(d.Icon,{name:O,size:"small",color:"textLite"}),l.createElement(f.default,{Component:d.TextSmall,title:g,text:"string"===typeof g&&E?b(g):g.toString(),maxLength:r.maxLength||80,color:x}))}):l.createElement(d.Flex,{gap:1,padding:[0,1],alignItems:"center",onClick:Z,"data-testid":"".concat(r.testIdPrefix,"-filters-item-").concat(g)},l.createElement(f.default,{Component:d.TextSmall,title:g,text:"string"===typeof g&&E?b(g):g.toString(),maxLength:r.maxLength||80,color:x}))),!isNaN(k)&&l.createElement(d.Pill,{flavour:"neutral",hollow:!0,"data-testid":"".concat(r.testIdPrefix,"-filters-").concat(g,"-count")},k.toString()))},getValue:O,getLabel:O},t.ZP=x},97193:function(e,t,n){n.d(t,{c:function(){return P}});var r=n(29439),o=n(4942),a=n(93433),i=n(87462),c=n(45987),l=(n(92222),n(41539),n(39714),n(64211),n(2490),n(41874),n(26699),n(32023),n(85827),n(25387),n(72608),n(57327),n(88449),n(59849),n(66992),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),u=n(91966),s=n.n(u),d=n(79655),f=n(97945),m=n(95248),p=n(15557),g=n(39434),v=n(91008),y=n(72233),b=n(39583),h=n(46742),w=["value","disabled","onClick","label","nodeId","selected","status","indeterminate","textColor","iconName","hasAlerts","hasML","hasFn","showAlerts","showMl","showFn","requireML","requireFn","capabilities","count","multi"],x=["item","onItemClick","itemProps","close"],O=["baseKey","extraKey","statusProps","multi","useFilteredIds","nodeCounts"];function k(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 C(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?n?(0,a.Z)(new Set([].concat((0,a.Z)(e),(0,a.Z)(t)))):s()(e,t):n?[].concat((0,a.Z)(e),[t]):e.filter((function(e){return e!==t}))}:function(){return n?[t]:[]})}),[L]),D=(0,f.d$)(),A=(0,l.useMemo)((function(){var e=E({ids:Z,status:"Live",selectedIds:C,nodesById:D,statusProps:u,multi:g,nodeCounts:b}),t=E({ids:S,status:"Stale",selectedIds:C,nodesById:D,statusProps:u,multi:g,nodeCounts:b}),n=E({ids:_,status:"Offline",selectedIds:C,nodesById:D,statusProps:u,multi:g,nodeCounts:b});return e.concat(t,n)}),[C,Z.length,S.length,_.length,b]);return l.createElement(p.MenuDropdown,(0,i.Z)({hideShadow:!0,height:{max:"60vh"},width:{max:"600px"},overflow:"auto","data-testid":"filterNodes-drop",searchMargin:[2],items:A,Item:P,onItemClick:N,value:C,"data-value":C.join(",")||"all-nodes",hasSearch:!0},h))}},48450:function(e,t,n){n.d(t,{Kp:function(){return d},MN:function(){return w},ND:function(){return m},hN:function(){return y},jc:function(){return h},sr:function(){return g},uk:function(){return f}});var r=n(4942),o=(n(21249),n(57640),n(9924),n(41539),n(88674),n(92087),n(74916),n(15306),n(92222),n(82481),n(47941),n(82526),n(57327),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(26398)),a=n(66152),i=n(78710);function c(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 l(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.class,r=t.component,o=t.type,a=t.info,i=t.value,c=i.calc,u=void 0===c?"":c,s=i.update_every,d=i.units,f=i.db,m=t.status,p=t.notification||{},g=p.type,v=p.exec,y=p.to,b=p.delay,h=p.repeat||{},w=h.warn,x=h.crit,O=m||{},k=O.warn,C=O.crit,I=O.green,P=O.red,E=f||{},j=E.dimensions,L=E.method,Z=E.after,S=E.before,_=E.options;return l(l({info:a},e),{},{configInfo:a,class:n,component:r,type:o,calculation:u,updateEvery:s,units:d,warning:k,critical:C,lookupDimensions:j,lookupMethod:L,lookupAfter:Z,lookupBefore:S,lookupOptions:_,notificationType:g,exec:v,recipient:y,delay:b,warnRepeatEvery:w,critRepeatEvery:x,green:I,red:P})}},O=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,i.Ly)(e)?o.Z.get("/api/v2/alert_config?options=minify&config=".concat(n),{baseURL:window.envSettings.agentApiUrl,transform:x(r)}):o.Z.post("/api/v2/spaces/".concat(e,"/rooms/").concat(t,"/alert_config"),{config:n},{transform:x(r)})}},84074:function(e,t,n){n.d(t,{E3:function(){return i},Gs:function(){return d},HI:function(){return s},IG:function(){return u},bc:function(){return c},p$:function(){return l}});var r=n(4480),o=n(80239),a=n(48450),i={id:null,loaded:!1,nodeId:null,instance:null,instanceName:null,name:"",calculation:"",lookupAfter:0,lookupBefore:0,status:"unknown",date:"",fullyLoaded:!1,fullyLoading:!1,info:"",configInfo:"",warning:"",critical:"",updateEvery:0,source:"",recipient:"Unknown",units:"",delayUpDuration:null,delayDownDuration:null,delayMaxDuration:null,delayMultiplier:null,delayUpToTimestamp:null,lookupDimensions:"",lookupMethod:"",lookupOptions:"",class:"Unknown",type:"Unknown",component:"Unknown"};t.ZP=(0,r.cn)({key:"alert",default:{}});var c=(0,r.cn)({key:"selectedAlert",default:null}),l=(0,r.cn)({key:"alertsTabsAtom",default:o.U}),u=(0,r.xu)({key:"alertConfigurations",default:function(e){var t=e.spaceId,n=e.roomId;return(0,a.jc)(t,n)}}),s=(0,r.xu)({key:"alertInstances",default:function(e){var t=e.spaceId,n=e.roomId,r=e.name;return(0,a.MN)(t,n,r)}}),d=(0,r.xu)({key:"selectedAlertConfiguration",default:{alertName:null,nodeId:null}})},12008:function(e,t,n){n.d(t,{Bk:function(){return P},E5:function(){return b},ER:function(){return x},E_:function(){return C},JU:function(){return Z},O0:function(){return h},__:function(){return S},fp:function(){return y},n_:function(){return j},sb:function(){return k},v3:function(){return _},w4:function(){return L},yx:function(){return O}});var r=n(4942),o=(n(21249),n(57640),n(9924),n(57327),n(41539),n(88449),n(2490),n(59849),n(85827),n(25387),n(72608),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),a=n(4480),i=n(37518),c=n(96929),l=n(99322),u=n(97945),s=n(80239),d=n(74059),f=n(84074),m=n(48450),p=n(45771);function g(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 v(e){for(var t=1;t=1e9||Math.abs(n)<=1e-5&&0!==n?n.toExponential(3):n},o=function(e){return e.includes("critical")?"critical":e.includes("warning")?"warning":e.includes("clear")?"clear":e[0]}},77796:function(e,t,n){n.d(t,{in:function(){return s},ev:function(){return m},rw:function(){return p}});var r=n(93433),o=n(4942),a=(n(2707),n(85827),n(41539),n(25387),n(2490),n(72608),n(92222),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(4480)),i=(0,a.cn)({key:"alertIdsByNodeId",default:{}});function c(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 l(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?n?t:[]:n?[].concat((0,o.Z)(e),[t]):e.filter((function(e){return e!==t}))}:function(){return n?[t]:[]})}),[j]),Z=(0,l.useMemo)((function(){return function(e){var t=e.collection,n=e.selected,r=e.getValue,a=e.getLabel,i=e.itemsProps,c=e.multi;if(!t.length)return[];var l=c&&t.length<=n.length,u=c&&!l&&!!n.length;return t.reduce((function(e,t){var c=n.includes(r(t));return[].concat((0,o.Z)(e),[y(y(y({},i.row),t),{},{value:r(t),label:a(t),selected:c})])}),c?[y(y({},i.head),{},{label:"Select all",value:t.map(r),selected:l,indeterminate:u})]:[])}({collection:m,selected:E,getValue:p,getLabel:v,itemsProps:b,multi:k})}),[E,j,m]);return l.createElement(d.MenuDropdown,(0,a.Z)({hideShadow:!0,height:{max:"300px"},width:{max:"600px"},background:"mainBackground",overflow:"auto","data-testid":"".concat(f,'-filter-selections"'),searchMargin:[0,0,2],items:Z,Item:u,onItemClick:L,value:E,"data-value":E.join(",")||"all-selected",hasSearch:m.length>5,itemProps:y(y({},h),{},{testIdPrefix:f,capitalized:x,multi:k})},C))},O=function(e){return e};x.defaultProps={itemProps:{padding:[1,.5],maxLength:30,multi:!0},itemsProps:{head:{textColor:"textLite"},row:{textColor:"text"}},Item:function(e){var t=e.item,n=e.onItemClick,r=e.itemProps,o=(0,i.Z)(e,m),c=t.value,u=t.disabled,s=t.onClick,g=t.label,v=t.selected,y=t.indeterminate,x=t.textColor,O=t.iconName,k=t.count,C=t.level,I=void 0===C?0:C,P=(0,i.Z)(t,p),E=r.capitalized,j=r.multi,L=u||!j&&v,Z=function(e){u||(s&&s(e),n({value:c,label:g,checked:!v,item:t}))};return l.createElement(h,(0,a.Z)({"aria-selected":v,selected:v,disabled:L,stale:0===k||"0"===k},P,o,r,{"data-testid":"".concat(r.testIdPrefix,"-filters-item")}),l.createElement(d.Flex,{gap:2,alignItems:"center",padding:[0,0,0,4*I],width:"100%"},j?l.createElement(w,{"data-testid":"".concat(r.testIdPrefix,"-filters-checkbox-").concat(g),checked:v,disabled:L,indeterminate:y,onChange:Z,label:l.createElement(d.Flex,{gap:1,alignItems:"center",width:"100%"},O&&l.createElement(d.Icon,{name:O,size:"small",color:"textLite"}),l.createElement(f.default,{Component:d.TextSmall,title:g,text:"string"===typeof g&&E?b(g):g.toString(),maxLength:r.maxLength||80,color:x}))}):l.createElement(d.Flex,{gap:1,padding:[0,1],alignItems:"center",onClick:Z,"data-testid":"".concat(r.testIdPrefix,"-filters-item-").concat(g)},l.createElement(f.default,{Component:d.TextSmall,title:g,text:"string"===typeof g&&E?b(g):g.toString(),maxLength:r.maxLength||80,color:x}))),!isNaN(k)&&l.createElement(d.Pill,{flavour:"neutral",hollow:!0,"data-testid":"".concat(r.testIdPrefix,"-filters-").concat(g,"-count")},k.toString()))},getValue:O,getLabel:O},t.ZP=x},97193:function(e,t,n){n.d(t,{c:function(){return P}});var r=n(29439),o=n(4942),a=n(93433),i=n(87462),c=n(45987),l=(n(92222),n(41539),n(39714),n(64211),n(2490),n(41874),n(26699),n(32023),n(85827),n(25387),n(72608),n(57327),n(88449),n(59849),n(66992),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),u=n(91966),s=n.n(u),d=n(79655),f=n(97945),m=n(95248),p=n(15557),g=n(39434),v=n(91008),y=n(72233),b=n(39583),h=n(46742),w=["value","disabled","onClick","label","nodeId","selected","status","indeterminate","textColor","iconName","hasAlerts","hasML","hasFn","showAlerts","showMl","showFn","requireML","requireFn","capabilities","count","multi"],x=["item","onItemClick","itemProps","close"],O=["baseKey","extraKey","statusProps","multi","useFilteredIds","nodeCounts"];function k(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 C(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?n?(0,a.Z)(new Set([].concat((0,a.Z)(e),(0,a.Z)(t)))):s()(e,t):n?[].concat((0,a.Z)(e),[t]):e.filter((function(e){return e!==t}))}:function(){return n?[t]:[]})}),[L]),D=(0,f.d$)(),A=(0,l.useMemo)((function(){var e=E({ids:Z,status:"Live",selectedIds:C,nodesById:D,statusProps:u,multi:g,nodeCounts:b}),t=E({ids:S,status:"Stale",selectedIds:C,nodesById:D,statusProps:u,multi:g,nodeCounts:b}),n=E({ids:_,status:"Offline",selectedIds:C,nodesById:D,statusProps:u,multi:g,nodeCounts:b});return e.concat(t,n)}),[C,Z.length,S.length,_.length,b]);return l.createElement(p.MenuDropdown,(0,i.Z)({hideShadow:!0,height:{max:"60vh"},width:{max:"600px"},overflow:"auto","data-testid":"filterNodes-drop",searchMargin:[2],items:A,Item:P,onItemClick:N,value:C,"data-value":C.join(",")||"all-nodes",hasSearch:!0},h))}},48450:function(e,t,n){n.d(t,{Kp:function(){return d},MN:function(){return w},ND:function(){return m},hN:function(){return y},jc:function(){return h},sr:function(){return g},uk:function(){return f}});var r=n(4942),o=(n(21249),n(57640),n(9924),n(41539),n(88674),n(92087),n(74916),n(15306),n(92222),n(82481),n(47941),n(82526),n(57327),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(26398)),a=n(66152),i=n(78710);function c(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 l(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.class,r=t.component,o=t.type,a=t.info,i=t.value,c=i.calc,u=void 0===c?"":c,s=i.update_every,d=i.units,f=i.db,m=t.status,p=t.notification||{},g=p.type,v=p.exec,y=p.to,b=p.delay,h=p.repeat||{},w=h.warn,x=h.crit,O=m||{},k=O.warn,C=O.crit,I=O.green,P=O.red,E=f||{},j=E.dimensions,L=E.method,Z=E.after,S=E.before,_=E.options;return l(l({info:a},e),{},{configInfo:a,class:n,component:r,type:o,calculation:u,updateEvery:s,units:d,warning:k,critical:C,lookupDimensions:j,lookupMethod:L,lookupAfter:Z,lookupBefore:S,lookupOptions:_,notificationType:g,exec:v,recipient:y,delay:b,warnRepeatEvery:w,critRepeatEvery:x,green:I,red:P})}},O=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,i.Ly)(e)?o.Z.get("/api/v2/alert_config?options=minify&config=".concat(n),{baseURL:window.envSettings.agentApiUrl,transform:x(r)}):o.Z.post("/api/v2/spaces/".concat(e,"/rooms/").concat(t,"/alert_config"),{config:n},{transform:x(r)})}},84074:function(e,t,n){n.d(t,{E3:function(){return i},Gs:function(){return d},HI:function(){return s},IG:function(){return u},bc:function(){return c},p$:function(){return l}});var r=n(4480),o=n(80239),a=n(48450),i={id:null,loaded:!1,nodeId:null,instance:null,instanceName:null,name:"",calculation:"",lookupAfter:0,lookupBefore:0,status:"unknown",date:"",fullyLoaded:!1,fullyLoading:!1,info:"",configInfo:"",warning:"",critical:"",updateEvery:0,source:"",recipient:"Unknown",units:"",delayUpDuration:null,delayDownDuration:null,delayMaxDuration:null,delayMultiplier:null,delayUpToTimestamp:null,lookupDimensions:"",lookupMethod:"",lookupOptions:"",class:"Unknown",type:"Unknown",component:"Unknown"};t.ZP=(0,r.cn)({key:"alert",default:{}});var c=(0,r.cn)({key:"selectedAlert",default:null}),l=(0,r.cn)({key:"alertsTabsAtom",default:o.U}),u=(0,r.xu)({key:"alertConfigurations",default:function(e){var t=e.spaceId,n=e.roomId;return(0,a.jc)(t,n)}}),s=(0,r.xu)({key:"alertInstances",default:function(e){var t=e.spaceId,n=e.roomId,r=e.name;return(0,a.MN)(t,n,r)}}),d=(0,r.xu)({key:"selectedAlertConfiguration",default:{alertName:null,nodeId:null}})},12008:function(e,t,n){n.d(t,{Bk:function(){return P},E5:function(){return b},ER:function(){return x},E_:function(){return C},JU:function(){return Z},O0:function(){return h},__:function(){return S},fp:function(){return y},n_:function(){return j},sb:function(){return k},v3:function(){return _},w4:function(){return L},yx:function(){return O}});var r=n(4942),o=(n(21249),n(57640),n(9924),n(57327),n(41539),n(88449),n(2490),n(59849),n(85827),n(25387),n(72608),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),a=n(4480),i=n(37518),c=n(96929),l=n(99322),u=n(97945),s=n(80239),d=n(74059),f=n(84074),m=n(48450),p=n(45771);function g(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 v(e){for(var t=1;t=1e9||Math.abs(n)<=1e-5&&0!==n?n.toExponential(3):n},o=function(e){return e.includes("critical")?"critical":e.includes("warning")?"warning":e.includes("clear")?"clear":e[0]}},77796:function(e,t,n){n.d(t,{in:function(){return s},ev:function(){return m},rw:function(){return p}});var r=n(93433),o=n(4942),a=(n(2707),n(85827),n(41539),n(25387),n(2490),n(72608),n(92222),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(4480)),i=(0,a.cn)({key:"alertIdsByNodeId",default:{}});function c(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 l(e){for(var t=1;ti&&(d=c(d,0,i)),e?p+d:d+p)}};e.exports={start:d(!1),end:d(!0)}},38415:function(e,t,n){"use strict";var r=n(19303),a=n(41340),o=n(84488),i=RangeError;e.exports=function(e){var t=a(o(this)),n="",s=r(e);if(s<0||s==1/0)throw i("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(t+=t))1&s&&(n+=t);return n}},33161:function(e,t,n){n(82109)({target:"Number",stat:!0},{isInteger:n(55988)})},66528:function(e,t,n){"use strict";var r=n(82109),a=n(76650).end;r({target:"String",proto:!0,forced:n(54986)},{padEnd:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},83112:function(e,t,n){"use strict";var r=n(82109),a=n(76650).start;r({target:"String",proto:!0,forced:n(54986)},{padStart:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},41817:function(e,t,n){"use strict";var r=n(82109),a=n(19781),o=n(17854),i=n(1702),s=n(92597),u=n(60614),c=n(47976),l=n(41340),d=n(47045),p=n(99920),f=o.Symbol,h=f&&f.prototype;if(a&&u(f)&&(!("description"in h)||void 0!==f().description)){var v={},m=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=c(h,this)?new f(e):void 0===e?f():f(e);return""===e&&(v[t]=!0),t};p(m,f),m.prototype=h,h.constructor=m;var g="Symbol(test)"==String(f("test")),y=i(h.valueOf),w=i(h.toString),b=/^Symbol\((.*)\)[^)]+$/,D=i("".replace),k=i("".slice);d(h,"description",{configurable:!0,get:function(){var e=y(this);if(s(v,e))return"";var t=w(e),n=g?k(t,7,-1):D(t,b,"$1");return""===n?void 0:n}}),r({global:!0,constructor:!0,forced:!0},{Symbol:m})}},52149:function(e,t,n){"use strict";function r(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}n.d(t,{Z:function(){return r}})},8958:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},a=function(e,t,n){var a,o=r[e];return a="string"===typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!==n&&void 0!==n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function o(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var i={date:o({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:o({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:o({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},s={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},u=function(e,t,n,r){return s[e]};function c(e){return function(t,n){var r;if("formatting"===(null!==n&&void 0!==n&&n.context?String(n.context):"standalone")&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=null!==n&&void 0!==n&&n.width?String(n.width):a;r=e.formattingValues[o]||e.formattingValues[a]}else{var i=e.defaultWidth,s=null!==n&&void 0!==n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[i]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var l={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:c({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:c({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:c({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:c({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:c({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function d(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;var i,s=o[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(u)?function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(p.matchPattern);if(!n)return null;var r=n[0],a=e.match(p.parsePattern);if(!a)return null;var o=p.valueCallback?p.valueCallback(a[0]):a[0];return{value:o=t.valueCallback?t.valueCallback(o):o,rest:e.slice(r.length)}}),era:d({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:d({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:d({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:d({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:d({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},h={code:"en-US",formatDistance:a,formatLong:i,formatRelative:u,localize:l,match:f,options:{weekStartsOn:0,firstWeekContainsDate:1}}},84314:function(e,t,n){"use strict";n.d(t,{j:function(){return a}});var r={};function a(){return r}},97621:function(e,t){"use strict";var n=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},r=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},a={p:r,P:function(e,t){var a,o=e.match(/(P+)(p+)?/)||[],i=o[1],s=o[2];if(!s)return n(e,t);switch(i){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",n(i,t)).replace("{{time}}",r(s,t))}};t.Z=a},24262:function(e,t,n){"use strict";function r(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}n.d(t,{Z:function(){return r}})},49702:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(19013),a=n(66979),o=n(7032),i=n(13882);var s=6048e5;function u(e){(0,i.Z)(1,arguments);var t=(0,r.default)(e),n=(0,a.Z)(t).getTime()-function(e){(0,i.Z)(1,arguments);var t=(0,o.Z)(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),(0,a.Z)(n)}(t).getTime();return Math.round(n/s)+1}},7032:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(19013),a=n(13882),o=n(66979);function i(e){(0,a.Z)(1,arguments);var t=(0,r.default)(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var s=(0,o.Z)(i),u=new Date(0);u.setUTCFullYear(n,0,4),u.setUTCHours(0,0,0,0);var c=(0,o.Z)(u);return t.getTime()>=s.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}},23324:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(19013),a=n(59025),o=n(7651),i=n(13882),s=n(83946),u=n(84314);var c=6048e5;function l(e,t){(0,i.Z)(1,arguments);var n=(0,r.default)(e),l=(0,a.Z)(n,t).getTime()-function(e,t){var n,r,c,l,d,p,f,h;(0,i.Z)(1,arguments);var v=(0,u.j)(),m=(0,s.Z)(null!==(n=null!==(r=null!==(c=null!==(l=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==l?l:null===t||void 0===t||null===(d=t.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==c?c:v.firstWeekContainsDate)&&void 0!==r?r:null===(f=v.locale)||void 0===f||null===(h=f.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==n?n:1),g=(0,o.Z)(e,t),y=new Date(0);return y.setUTCFullYear(g,0,m),y.setUTCHours(0,0,0,0),(0,a.Z)(y,t)}(n,t).getTime();return Math.round(l/c)+1}},7651:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(19013),a=n(13882),o=n(59025),i=n(83946),s=n(84314);function u(e,t){var n,u,c,l,d,p,f,h;(0,a.Z)(1,arguments);var v=(0,r.default)(e),m=v.getUTCFullYear(),g=(0,s.j)(),y=(0,i.Z)(null!==(n=null!==(u=null!==(c=null!==(l=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==l?l:null===t||void 0===t||null===(d=t.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==c?c:g.firstWeekContainsDate)&&void 0!==u?u:null===(f=g.locale)||void 0===f||null===(h=f.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==n?n:1);if(!(y>=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var w=new Date(0);w.setUTCFullYear(m+1,0,y),w.setUTCHours(0,0,0,0);var b=(0,o.Z)(w,t),D=new Date(0);D.setUTCFullYear(m,0,y),D.setUTCHours(0,0,0,0);var k=(0,o.Z)(D,t);return v.getTime()>=b.getTime()?m+1:v.getTime()>=k.getTime()?m:m-1}},5267:function(e,t,n){"use strict";n.d(t,{Do:function(){return i},Iu:function(){return o},qp:function(){return s}});var r=["D","DD"],a=["YY","YYYY"];function o(e){return-1!==r.indexOf(e)}function i(e){return-1!==a.indexOf(e)}function s(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}},13882:function(e,t,n){"use strict";function r(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}n.d(t,{Z:function(){return r}})},93645:function(e,t,n){"use strict";n.d(t,{u:function(){return o}});var r={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},a="trunc";function o(e){return e?r[e]:r[a]}},66979:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(19013),a=n(13882);function o(e){(0,a.Z)(1,arguments);var t=(0,r.default)(e),n=t.getUTCDay(),o=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-o),t.setUTCHours(0,0,0,0),t}},59025:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(19013),a=n(13882),o=n(83946),i=n(84314);function s(e,t){var n,s,u,c,l,d,p,f;(0,a.Z)(1,arguments);var h=(0,i.j)(),v=(0,o.Z)(null!==(n=null!==(s=null!==(u=null!==(c=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==c?c:null===t||void 0===t||null===(l=t.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==u?u:h.weekStartsOn)&&void 0!==s?s:null===(p=h.locale)||void 0===p||null===(f=p.options)||void 0===f?void 0:f.weekStartsOn)&&void 0!==n?n:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,r.default)(e),g=m.getUTCDay(),y=(g=u.getDate()?u:(n.setFullYear(u.getFullYear(),u.getMonth(),s),n)}},8791:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(83946),a=n(11640),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=3*(0,r.Z)(t);return(0,a.default)(e,n)}},63500:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(83946),a=n(77349),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=7*(0,r.Z)(t);return(0,a.default)(e,n)}},21593:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(83946),a=n(11640),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=(0,r.Z)(t);return(0,a.default)(e,12*n)}},49474:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(19013),a=n(13882);function o(e,t){(0,a.Z)(2,arguments);var n=(0,r.default)(e),o=(0,r.default)(t),i=n.getTime()-o.getTime();return i<0?-1:i>0?1:i}},36948:function(e,t,n){"use strict";n.d(t,{qk:function(){return o},vh:function(){return a},yJ:function(){return r}});Math.pow(10,8);var r=6e4,a=36e5,o=1e3},92300:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return s}});var r=n(24262),a=n(69119),o=n(13882),i=864e5;function s(e,t){(0,o.Z)(2,arguments);var n=(0,a.default)(e),s=(0,a.default)(t),u=n.getTime()-(0,r.Z)(n),c=s.getTime()-(0,r.Z)(s);return Math.round((u-c)/i)}},84129:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e,t){(0,a.Z)(2,arguments);var n=(0,r.default)(e),o=(0,r.default)(t);return 12*(n.getFullYear()-o.getFullYear())+(n.getMonth()-o.getMonth())}},91857:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e,t){(0,a.Z)(2,arguments);var n=(0,r.default)(e),o=(0,r.default)(t);return n.getFullYear()-o.getFullYear()}},67803:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(19013),a=n(92300),o=n(13882);function i(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function s(e,t){(0,o.Z)(2,arguments);var n=(0,r.default)(e),s=(0,r.default)(t),u=i(n,s),c=Math.abs((0,a.default)(n,s));n.setDate(n.getDate()-u*c);var l=u*(c-Number(i(n,s)===-u));return 0===l?0:l}},76972:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(36948),a=n(59910),o=n(13882),i=n(93645);function s(e,t,n){(0,o.Z)(2,arguments);var s=(0,a.Z)(e,t)/r.vh;return(0,i.u)(null===n||void 0===n?void 0:n.roundingMethod)(s)}},59910:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(19013),a=n(13882);function o(e,t){return(0,a.Z)(2,arguments),(0,r.default)(e).getTime()-(0,r.default)(t).getTime()}},69690:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(36948),a=n(59910),o=n(13882),i=n(93645);function s(e,t,n){(0,o.Z)(2,arguments);var s=(0,a.Z)(e,t)/r.yJ;return(0,i.u)(null===n||void 0===n?void 0:n.roundingMethod)(s)}},50157:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(19013),a=n(84129),o=n(49474),i=n(13882),s=n(83894),u=n(4135);function c(e,t){(0,i.Z)(2,arguments);var n,c=(0,r.default)(e),l=(0,r.default)(t),d=(0,o.Z)(c,l),p=Math.abs((0,a.default)(c,l));if(p<1)n=0;else{1===c.getMonth()&&c.getDate()>27&&c.setDate(30),c.setMonth(c.getMonth()-d*p);var f=(0,o.Z)(c,l)===-d;(function(e){(0,i.Z)(1,arguments);var t=(0,r.default)(e);return(0,s.default)(t).getTime()===(0,u.default)(t).getTime()})((0,r.default)(e))&&1===p&&1===(0,o.Z)(e,l)&&(f=!1),n=d*(p-Number(f))}return 0===n?0:n}},11699:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(59910),a=n(13882),o=n(93645);function i(e,t,n){(0,a.Z)(2,arguments);var i=(0,r.Z)(e,t)/1e3;return(0,o.u)(null===n||void 0===n?void 0:n.roundingMethod)(i)}},5001:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(19013),a=n(91857),o=n(49474),i=n(13882);function s(e,t){(0,i.Z)(2,arguments);var n=(0,r.default)(e),s=(0,r.default)(t),u=(0,o.Z)(n,s),c=Math.abs((0,a.default)(n,s));n.setFullYear(1584),s.setFullYear(1584);var l=(0,o.Z)(n,s)===-u,d=u*(c-Number(l));return 0===d?0:d}},83894:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){(0,a.Z)(1,arguments);var t=(0,r.default)(e);return t.setHours(23,59,59,999),t}},4135:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){(0,a.Z)(1,arguments);var t=(0,r.default)(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}},67090:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return s}});var r=n(84314),a=n(19013),o=n(83946),i=n(13882);function s(e,t){var n,s,u,c,l,d,p,f;(0,i.Z)(1,arguments);var h=(0,r.j)(),v=(0,o.Z)(null!==(n=null!==(s=null!==(u=null!==(c=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==c?c:null===t||void 0===t||null===(l=t.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==u?u:h.weekStartsOn)&&void 0!==s?s:null===(p=h.locale)||void 0===p||null===(f=p.options)||void 0===f?void 0:f.weekStartsOn)&&void 0!==n?n:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,a.default)(e),g=m.getDay(),y=6+(g0?n:1-n;return d("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):d(n+1,2)},d:function(e,t){return d(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return d(e.getUTCHours()%12||12,t.length)},H:function(e,t){return d(e.getUTCHours(),t.length)},m:function(e,t){return d(e.getUTCMinutes(),t.length)},s:function(e,t){return d(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return d(Math.floor(r*Math.pow(10,n-3)),t.length)}},f="midnight",h="noon",v="morning",m="afternoon",g="evening",y="night",w={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return p.y(e,t)},Y:function(e,t,n,r){var a=(0,l.Z)(e,r),o=a>0?a:1-a;return"YY"===t?d(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):d(o,t.length)},R:function(e,t){return d((0,u.Z)(e),t.length)},u:function(e,t){return d(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return d(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return d(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return p.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return d(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var a=(0,c.Z)(e,r);return"wo"===t?n.ordinalNumber(a,{unit:"week"}):d(a,t.length)},I:function(e,t,n){var r=(0,s.Z)(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):d(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):p.d(e,t)},D:function(e,t,n){var r=function(e){(0,i.Z)(1,arguments);var t=(0,o.default)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):d(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var a=e.getUTCDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return d(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var a=e.getUTCDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return d(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),a=0===r?7:r;switch(t){case"i":return String(a);case"ii":return d(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,a=e.getUTCHours();switch(r=12===a?h:0===a?f:a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,a=e.getUTCHours();switch(r=a>=17?g:a>=12?m:a>=4?v:y,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return p.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):p.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):d(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):d(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):p.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):p.s(e,t)},S:function(e,t){return p.S(e,t)},X:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();if(0===a)return"Z";switch(t){case"X":return D(a);case"XXXX":case"XX":return k(a);default:return k(a,":")}},x:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return D(a);case"xxxx":case"xx":return k(a);default:return k(a,":")}},O:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+b(a,":");default:return"GMT"+k(a,":")}},z:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+b(a,":");default:return"GMT"+k(a,":")}},t:function(e,t,n,r){var a=r._originalDate||e;return d(Math.floor(a.getTime()/1e3),t.length)},T:function(e,t,n,r){return d((r._originalDate||e).getTime(),t.length)}};function b(e,t){var n=e>0?"-":"+",r=Math.abs(e),a=Math.floor(r/60),o=r%60;if(0===o)return n+String(a);var i=t||"";return n+String(a)+i+d(o,2)}function D(e,t){return e%60===0?(e>0?"-":"+")+d(Math.abs(e)/60,2):k(e,t)}function k(e,t){var n=t||"",r=e>0?"-":"+",a=Math.abs(e);return r+d(Math.floor(a/60),2)+n+d(a%60,2)}var C=w,S=n(97621),M=n(24262),x=n(5267),T=n(83946),Z=n(84314),_=n(8958),E=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,N=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,P=/^'([^]*?)'?$/,O=/''/g,Y=/[a-zA-Z]/;function R(e,t,n){var s,u,c,l,d,p,f,h,v,m,g,y,w,b,D,k,R,I;(0,i.Z)(2,arguments);var L=String(t),A=(0,Z.j)(),F=null!==(s=null!==(u=null===n||void 0===n?void 0:n.locale)&&void 0!==u?u:A.locale)&&void 0!==s?s:_.Z,U=(0,T.Z)(null!==(c=null!==(l=null!==(d=null!==(p=null===n||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==p?p:null===n||void 0===n||null===(f=n.locale)||void 0===f||null===(h=f.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==d?d:A.firstWeekContainsDate)&&void 0!==l?l:null===(v=A.locale)||void 0===v||null===(m=v.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==c?c:1);if(!(U>=1&&U<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=(0,T.Z)(null!==(g=null!==(y=null!==(w=null!==(b=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==b?b:null===n||void 0===n||null===(D=n.locale)||void 0===D||null===(k=D.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==w?w:A.weekStartsOn)&&void 0!==y?y:null===(R=A.locale)||void 0===R||null===(I=R.options)||void 0===I?void 0:I.weekStartsOn)&&void 0!==g?g:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!F.localize)throw new RangeError("locale must contain localize property");if(!F.formatLong)throw new RangeError("locale must contain formatLong property");var H=(0,o.default)(e);if(!(0,r.default)(H))throw new RangeError("Invalid time value");var W=(0,M.Z)(H),B=(0,a.Z)(H,W),q={firstWeekContainsDate:U,weekStartsOn:j,locale:F,_originalDate:H};return L.match(N).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,S.Z[t])(e,F.formatLong):e})).join("").match(E).map((function(r){if("''"===r)return"'";var a=r[0];if("'"===a)return function(e){var t=e.match(P);if(!t)return e;return t[1].replace(O,"'")}(r);var o=C[a];if(o)return null!==n&&void 0!==n&&n.useAdditionalWeekYearTokens||!(0,x.Do)(r)||(0,x.qp)(r,t,String(e)),null!==n&&void 0!==n&&n.useAdditionalDayOfYearTokens||!(0,x.Iu)(r)||(0,x.qp)(r,t,String(e)),o(B,r,F.localize,q);if(a.match(Y))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return r})).join("")}},936:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(84314),a=n(24262),o=n(49474),i=n(19013),s=n(52149);var u=n(8958),c=n(13882),l=6e4,d=1440,p=30*d,f=365*d;function h(e,t,n){var h,v,m;(0,c.Z)(2,arguments);var g=(0,r.j)(),y=null!==(h=null!==(v=null===n||void 0===n?void 0:n.locale)&&void 0!==v?v:g.locale)&&void 0!==h?h:u.Z;if(!y.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var w=(0,o.Z)(e,t);if(isNaN(w))throw new RangeError("Invalid time value");var b,D,k,C=(0,s.Z)((b=n,(0,s.Z)({},b)),{addSuffix:Boolean(null===n||void 0===n?void 0:n.addSuffix),comparison:w});w>0?(D=(0,i.default)(t),k=(0,i.default)(e)):(D=(0,i.default)(e),k=(0,i.default)(t));var S,M=String(null!==(m=null===n||void 0===n?void 0:n.roundingMethod)&&void 0!==m?m:"round");if("floor"===M)S=Math.floor;else if("ceil"===M)S=Math.ceil;else{if("round"!==M)throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");S=Math.round}var x,T=k.getTime()-D.getTime(),Z=T/l,_=(T-((0,a.Z)(k)-(0,a.Z)(D)))/l,E=null===n||void 0===n?void 0:n.unit;if("second"===(x=E?String(E):Z<1?"second":Z<60?"minute":Z=s.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),i(n)}var u=6048e5;function c(e){(0,o.Z)(1,arguments);var t=(0,r.default)(e),n=i(t).getTime()-s(t).getTime();return Math.round(n/u)+1}},39159:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){return(0,a.Z)(1,arguments),(0,r.default)(e).getMinutes()}},78966:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){return(0,a.Z)(1,arguments),(0,r.default)(e).getMonth()}},56605:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){(0,a.Z)(1,arguments);var t=(0,r.default)(e);return Math.floor(t.getMonth()/3)+1}},77881:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){return(0,a.Z)(1,arguments),(0,r.default)(e).getSeconds()}},28789:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){return(0,a.Z)(1,arguments),(0,r.default)(e).getTime()}},99982:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(28789),a=n(13882);function o(e){return(0,a.Z)(1,arguments),Math.floor((0,r.default)(e)/1e3)}},95570:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){return(0,a.Z)(1,arguments),(0,r.default)(e).getFullYear()}},33926:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(49474),a=n(29422),o=n(67803),i=n(76972),s=n(69690),u=n(50157),c=n(11699),l=n(5001),d=n(19013),p=n(13882);function f(e){(0,p.Z)(1,arguments);var t=(0,d.default)(e.start),n=(0,d.default)(e.end);if(isNaN(t.getTime()))throw new RangeError("Start Date is invalid");if(isNaN(n.getTime()))throw new RangeError("End Date is invalid");var f={};f.years=Math.abs((0,l.Z)(n,t));var h=(0,r.Z)(n,t),v=(0,a.Z)(t,{years:h*f.years});f.months=Math.abs((0,u.Z)(n,v));var m=(0,a.Z)(v,{months:h*f.months});f.days=Math.abs((0,o.Z)(n,m));var g=(0,a.Z)(m,{days:h*f.days});f.hours=Math.abs((0,i.Z)(n,g));var y=(0,a.Z)(g,{hours:h*f.hours});f.minutes=Math.abs((0,s.Z)(n,y));var w=(0,a.Z)(y,{minutes:h*f.minutes});return f.seconds=Math.abs((0,c.Z)(n,w)),f}},42699:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e,t){(0,a.Z)(2,arguments);var n=(0,r.default)(e),o=(0,r.default)(t);return n.getTime()>o.getTime()}},313:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e,t){(0,a.Z)(2,arguments);var n=(0,r.default)(e),o=(0,r.default)(t);return n.getTime()=o&&n<=i}},99890:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(71002),a=n(19013),o=n(13882);function i(e){var t,n;if((0,o.Z)(1,arguments),e&&"function"===typeof e.forEach)t=e;else{if("object"!==(0,r.Z)(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=(0,a.default)(e);(void 0===n||nt||isNaN(t.getDate()))&&(n=t)})),n||new Date(NaN)}},76417:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Ye}});var r=n(71002),a=n(40181);function o(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,a.Z)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=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,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}var i=n(8958),s=n(91218),u=n(19013),c=n(52149),l=n(97621),d=n(24262),p=n(5267),f=n(83946),h=n(13882),v=n(97326),m=n(60136),g=n(29388),y=n(15671),w=n(43144),b=n(4942),D=function(){function e(){(0,y.Z)(this,e),(0,b.Z)(this,"priority",void 0),(0,b.Z)(this,"subPriority",0)}return(0,w.Z)(e,[{key:"validate",value:function(e,t){return!0}}]),e}(),k=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(e,r,a,o,i){var s;return(0,y.Z)(this,n),(s=t.call(this)).value=e,s.validateValue=r,s.setValue=a,s.priority=o,i&&(s.subPriority=i),s}return(0,w.Z)(n,[{key:"validate",value:function(e,t){return this.validateValue(e,this.value,t)}},{key:"set",value:function(e,t,n){return this.setValue(e,t,this.value,n)}}]),n}(D),C=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o0,a=r?t:1-t;if(a<=50)n=e||100;else{var o=a+50;n=e+100*Math.floor(o/100)-(e>=o%100?100:0)}return r?n:1-n}function j(e){return e%400===0||e%4===0&&e%100!==0}var H=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o0}},{key:"set",value:function(e,t,n){var r=e.getUTCFullYear();if(n.isTwoDigitYear){var a=U(n.year,r);return e.setUTCFullYear(a,0,1),e.setUTCHours(0,0,0,0),e}var o="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e}}]),n}(S),W=n(7651),B=n(59025),q=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o0}},{key:"set",value:function(e,t,n,r){var a=(0,W.Z)(e,r);if(n.isTwoDigitYear){var o=U(n.year,a);return e.setUTCFullYear(o,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),(0,B.Z)(e,r)}var i="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(i,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),(0,B.Z)(e,r)}}]),n}(S),Q=n(66979),K=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),n}(S),X=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),n}(S),G=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),n}(S),$=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),n}(S),J=n(23324);var ee=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&t<=53}},{key:"set",value:function(e,t,n,r){return(0,B.Z)(function(e,t,n){(0,h.Z)(2,arguments);var r=(0,u.default)(e),a=(0,f.Z)(t),o=(0,J.Z)(r,n)-a;return r.setUTCDate(r.getUTCDate()-7*o),r}(e,n,r),r)}}]),n}(S),te=n(49702);var ne=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&t<=53}},{key:"set",value:function(e,t,n){return(0,Q.Z)(function(e,t){(0,h.Z)(2,arguments);var n=(0,u.default)(e),r=(0,f.Z)(t),a=(0,te.Z)(n)-r;return n.setUTCDate(n.getUTCDate()-7*a),n}(e,n))}}]),n}(S),re=[31,28,31,30,31,30,31,31,30,31,30,31],ae=[31,29,31,30,31,30,31,31,30,31,30,31],oe=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&t<=ae[r]:t>=1&&t<=re[r]}},{key:"set",value:function(e,t,n){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e}}]),n}(S),ie=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&t<=366:t>=1&&t<=365}},{key:"set",value:function(e,t,n){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e}}]),n}(S),se=n(84314);function ue(e,t,n){var r,a,o,i,s,c,l,d;(0,h.Z)(2,arguments);var p=(0,se.j)(),v=(0,f.Z)(null!==(r=null!==(a=null!==(o=null!==(i=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==i?i:null===n||void 0===n||null===(s=n.locale)||void 0===s||null===(c=s.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==o?o:p.weekStartsOn)&&void 0!==a?a:null===(l=p.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==r?r:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,u.default)(e),g=(0,f.Z)(t),y=((g%7+7)%7=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=ue(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(S),le=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=ue(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(S),de=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=ue(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(S);var pe=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&t<=7}},{key:"set",value:function(e,t,n){return e=function(e,t){(0,h.Z)(2,arguments);var n=(0,f.Z)(t);n%7===0&&(n-=7);var r=(0,u.default)(e),a=((n%7+7)%7<1?7:0)+n-r.getUTCDay();return r.setUTCDate(r.getUTCDate()+a),r}(e,n),e.setUTCHours(0,0,0,0),e}}]),n}(S),fe=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&t<=12}},{key:"set",value:function(e,t,n){var r=e.getUTCHours()>=12;return r&&n<12?e.setUTCHours(n+12,0,0,0):r||12!==n?e.setUTCHours(n,0,0,0):e.setUTCHours(0,0,0,0),e}}]),n}(S),ge=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=0&&t<=23}},{key:"set",value:function(e,t,n){return e.setUTCHours(n,0,0,0),e}}]),n}(S),ye=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=0&&t<=11}},{key:"set",value:function(e,t,n){return e.getUTCHours()>=12&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e}}]),n}(S),we=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&t<=24}},{key:"set",value:function(e,t,n){var r=n<=24?n%24:n;return e.setUTCHours(r,0,0,0),e}}]),n}(S),be=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCMinutes(n,0,0),e}}]),n}(S),De=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCSeconds(n,0),e}}]),n}(S),ke=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var F=(0,f.Z)(null!==(x=null!==(T=null!==(Z=null!==(_=null===a||void 0===a?void 0:a.weekStartsOn)&&void 0!==_?_:null===a||void 0===a||null===(E=a.locale)||void 0===E||null===(N=E.options)||void 0===N?void 0:N.weekStartsOn)&&void 0!==Z?Z:I.weekStartsOn)&&void 0!==T?T:null===(P=I.locale)||void 0===P||null===(O=P.options)||void 0===O?void 0:O.weekStartsOn)&&void 0!==x?x:0);if(!(F>=0&&F<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===R)return""===Y?(0,u.default)(n):new Date(NaN);var U,j={firstWeekContainsDate:A,weekStartsOn:F,locale:L},H=[new C],W=R.match(_e).map((function(e){var t=e[0];return t in l.Z?(0,l.Z[t])(e,L.formatLong):e})).join("").match(Ze),B=[],q=o(W);try{var Q=function(){var t=U.value;null!==a&&void 0!==a&&a.useAdditionalWeekYearTokens||!(0,p.Do)(t)||(0,p.qp)(t,R,e),null!==a&&void 0!==a&&a.useAdditionalDayOfYearTokens||!(0,p.Iu)(t)||(0,p.qp)(t,R,e);var n=t[0],r=Te[n];if(r){var o=r.incompatibleTokens;if(Array.isArray(o)){var i=B.find((function(e){return o.includes(e.token)||e.token===n}));if(i)throw new RangeError("The format string mustn't contain `".concat(i.fullToken,"` and `").concat(t,"` at the same time"))}else if("*"===r.incompatibleTokens&&B.length>0)throw new RangeError("The format string mustn't contain `".concat(t,"` and any other token at the same time"));B.push({token:n,fullToken:t});var s=r.run(Y,t,L.match,j);if(!s)return{v:new Date(NaN)};H.push(s.setter),Y=s.rest}else{if(n.match(Oe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===t?t="'":"'"===n&&(t=t.match(Ee)[1].replace(Ne,"'")),0!==Y.indexOf(t))return{v:new Date(NaN)};Y=Y.slice(t.length)}};for(q.s();!(U=q.n()).done;){var K=Q();if("object"===(0,r.Z)(K))return K.v}}catch(ne){q.e(ne)}finally{q.f()}if(Y.length>0&&Pe.test(Y))return new Date(NaN);var V=H.map((function(e){return e.priority})).sort((function(e,t){return t-e})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return H.filter((function(t){return t.priority===e})).sort((function(e,t){return t.subPriority-e.subPriority}))})).map((function(e){return e[0]})),z=(0,u.default)(n);if(isNaN(z.getTime()))return new Date(NaN);var X,G=(0,s.Z)(z,(0,d.Z)(z)),$={},J=o(V);try{for(J.s();!(X=J.n()).done;){var ee=X.value;if(!ee.validate(G,j))return new Date(NaN);var te=ee.set(G,$,j);Array.isArray(te)?(G=te[0],(0,c.Z)($,te[1])):G=te}}catch(ne){J.e(ne)}finally{J.f()}return G}},23855:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(36948),a=n(13882),o=n(83946);function i(e,t){var n;(0,a.Z)(1,arguments);var i=(0,o.Z)(null!==(n=null===t||void 0===t?void 0:t.additionalDigits)&&void 0!==n?n:2);if(2!==i&&1!==i&&0!==i)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!==typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var v,m=function(e){var t,n={},r=e.split(s.dateTimeDelimiter);if(r.length>2)return n;/:/.test(r[0])?t=r[0]:(n.date=r[0],t=r[1],s.timeZoneDelimiter.test(n.date)&&(n.date=e.split(s.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length)));if(t){var a=s.timezone.exec(t);a?(n.time=t.replace(a[1],""),n.timezone=a[1]):n.time=t}return n}(e);if(m.date){var g=function(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var a=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:null===o?a:100*o,restDateString:e.slice((r[1]||r[2]).length)}}(m.date,i);v=function(e,t){if(null===t)return new Date(NaN);var n=e.match(u);if(!n)return new Date(NaN);var r=!!n[4],a=d(n[1]),o=d(n[2])-1,i=d(n[3]),s=d(n[4]),c=d(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,c)?function(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var a=r.getUTCDay()||7,o=7*(t-1)+n+1-a;return r.setUTCDate(r.getUTCDate()+o),r}(t,s,c):new Date(NaN);var l=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(f[t]||(h(e)?29:28))}(t,o,i)&&function(e,t){return t>=1&&t<=(h(e)?366:365)}(t,a)?(l.setUTCFullYear(t,o,Math.max(a,i)),l):new Date(NaN)}(g.restDateString,g.year)}if(!v||isNaN(v.getTime()))return new Date(NaN);var y,w=v.getTime(),b=0;if(m.time&&(b=function(e){var t=e.match(c);if(!t)return NaN;var n=p(t[1]),a=p(t[2]),o=p(t[3]);if(!function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,a,o))return NaN;return n*r.vh+a*r.yJ+1e3*o}(m.time),isNaN(b)))return new Date(NaN);if(!m.timezone){var D=new Date(w+b),k=new Date(0);return k.setFullYear(D.getUTCFullYear(),D.getUTCMonth(),D.getUTCDate()),k.setHours(D.getUTCHours(),D.getUTCMinutes(),D.getUTCSeconds(),D.getUTCMilliseconds()),k}return y=function(e){if("Z"===e)return 0;var t=e.match(l);if(!t)return 0;var n="+"===t[1]?-1:1,a=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,o))return NaN;return n*(a*r.vh+o*r.yJ)}(m.timezone),isNaN(y)?new Date(NaN):new Date(w+b+y)}var s={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},u=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,c=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,l=/^([+-])(\d{2})(?::?(\d{2}))?$/;function d(e){return e?parseInt(e):1}function p(e){return e&&parseFloat(e.replace(",","."))||0}var f=[31,null,31,30,31,30,31,31,30,31,30,31];function h(e){return e%400===0||e%4===0&&e%100!==0}},92311:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return u}});var r=n(71002),a=n(19013),o=n(62225),i=n(83946),s=n(13882);function u(e,t){if((0,s.Z)(2,arguments),"object"!==(0,r.Z)(t)||null===t)throw new RangeError("values parameter must be an object");var n=(0,a.default)(e);return isNaN(n.getTime())?new Date(NaN):(null!=t.year&&n.setFullYear(t.year),null!=t.month&&(n=(0,o.default)(n,t.month)),null!=t.date&&n.setDate((0,i.Z)(t.date)),null!=t.hours&&n.setHours((0,i.Z)(t.hours)),null!=t.minutes&&n.setMinutes((0,i.Z)(t.minutes)),null!=t.seconds&&n.setSeconds((0,i.Z)(t.seconds)),null!=t.milliseconds&&n.setMilliseconds((0,i.Z)(t.milliseconds)),n)}},37042:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(83946),a=n(19013),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=(0,a.default)(e),i=(0,r.Z)(t);return n.setHours(i),n}},4543:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(83946),a=n(19013),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=(0,a.default)(e),i=(0,r.Z)(t);return n.setMinutes(i),n}},62225:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(83946),a=n(19013),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=(0,a.default)(e),i=(0,r.Z)(t),s=n.getFullYear(),u=n.getDate(),c=new Date(0);c.setFullYear(s,i,15),c.setHours(0,0,0,0);var l=function(e){(0,o.Z)(1,arguments);var t=(0,a.default)(e),n=t.getFullYear(),r=t.getMonth(),i=new Date(0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}(c);return n.setMonth(i,Math.min(u,l)),n}},11503:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return s}});var r=n(83946),a=n(19013),o=n(62225),i=n(13882);function s(e,t){(0,i.Z)(2,arguments);var n=(0,a.default)(e),s=(0,r.Z)(t)-(Math.floor(n.getMonth()/3)+1);return(0,o.default)(n,n.getMonth()+3*s)}},39880:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(83946),a=n(19013),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=(0,a.default)(e),i=(0,r.Z)(t);return n.setSeconds(i),n}},44749:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(83946),a=n(19013),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=(0,a.default)(e),i=(0,r.Z)(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(i),n)}},69119:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){(0,a.Z)(1,arguments);var t=(0,r.default)(e);return t.setHours(0,0,0,0),t}},43703:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){(0,a.Z)(1,arguments);var t=(0,r.default)(e);return t.setDate(1),t.setHours(0,0,0,0),t}},94431:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){(0,a.Z)(1,arguments);var t=(0,r.default)(e),n=t.getMonth(),o=n-n%3;return t.setMonth(o,1),t.setHours(0,0,0,0),t}},584:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return s}});var r=n(19013),a=n(83946),o=n(13882),i=n(84314);function s(e,t){var n,s,u,c,l,d,p,f;(0,o.Z)(1,arguments);var h=(0,i.j)(),v=(0,a.Z)(null!==(n=null!==(s=null!==(u=null!==(c=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==c?c:null===t||void 0===t||null===(l=t.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==u?u:h.weekStartsOn)&&void 0!==s?s:null===(p=h.locale)||void 0===p||null===(f=p.options)||void 0===f?void 0:f.weekStartsOn)&&void 0!==n?n:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,r.default)(e),g=m.getDay(),y=(gl))return!1;var p=u.get(e),f=u.get(t);if(p&&f)return p==t&&f==e;var h=-1,v=!0,m=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++he.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate,a=t.excludeDates,o=t.excludeDateIntervals,i=t.includeDates,s=t.includeDateIntervals,u=t.filterDate;return fn(e,{minDate:n,maxDate:r})||a&&a.some((function(t){return Gt(e,t)}))||o&&o.some((function(t){var n=t.start,r=t.end;return lt.default(e,{start:n,end:r})}))||i&&!i.some((function(t){return Gt(e,t)}))||s&&!s.some((function(t){var n=t.start,r=t.end;return lt.default(e,{start:n,end:r})}))||u&&!u(At(e))||!1}function on(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.excludeDates,r=t.excludeDateIntervals;return r&&r.length>0?r.some((function(t){var n=t.start,r=t.end;return lt.default(e,{start:n,end:r})})):n&&n.some((function(t){return Gt(e,t)}))||!1}function sn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate,a=t.excludeDates,o=t.includeDates,i=t.filterDate;return fn(e,{minDate:Ge.default(n),maxDate:tt.default(r)})||a&&a.some((function(t){return zt(e,t)}))||o&&!o.some((function(t){return zt(e,t)}))||i&&!i(At(e))||!1}function un(e,t,n,r){var a=Ie.default(e),o=Ye.default(e),i=Ie.default(t),s=Ye.default(t),u=Ie.default(r);return a===i&&a===u?o<=n&&n<=s:a=n||ua:void 0}function cn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate,a=t.excludeDates,o=t.includeDates,i=t.filterDate;return fn(e,{minDate:n,maxDate:r})||a&&a.some((function(t){return Xt(e,t)}))||o&&!o.some((function(t){return Xt(e,t)}))||i&&!i(At(e))||!1}function ln(e,t,n){if(!he.default(t)||!he.default(n))return!1;var r=Ie.default(t),a=Ie.default(n);return r<=e&&a>=e}function dn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate,a=t.excludeDates,o=t.includeDates,i=t.filterDate,s=new Date(e,0,1);return fn(s,{minDate:Je.default(n),maxDate:nt.default(r)})||a&&a.some((function(e){return Vt(s,e)}))||o&&!o.some((function(e){return Vt(s,e)}))||i&&!i(At(s))||!1}function pn(e,t,n,r){var a=Ie.default(e),o=Re.default(e),i=Ie.default(t),s=Re.default(t),u=Ie.default(r);return a===i&&a===u?o<=n&&n<=s:a=n||ua:void 0}function fn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate;return n&&Qe.default(e,n)<0||r&&Qe.default(e,r)>0}function hn(e,t){return t.some((function(t){return Ee.default(t)===Ee.default(e)&&_e.default(t)===_e.default(e)}))}function vn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.excludeTimes,r=t.includeTimes,a=t.filterTime;return n&&hn(e,n)||r&&!hn(e,r)||a&&!a(e)||!1}function mn(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var a,o=At(),i=Ue.default(Fe.default(o,_e.default(e)),Ee.default(e)),s=Ue.default(Fe.default(o,_e.default(n)),Ee.default(n)),u=Ue.default(Fe.default(o,_e.default(r)),Ee.default(r));try{a=!lt.default(i,{start:s,end:u})}catch(e){a=!1}return a}function gn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.includeDates,a=Me.default(e,1);return n&&Ke.default(n,a)>0||r&&r.every((function(e){return Ke.default(e,a)>0}))||!1}function yn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.maxDate,r=t.includeDates,a=be.default(e,1);return n&&Ke.default(a,n)>0||r&&r.every((function(e){return Ke.default(a,e)>0}))||!1}function wn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.includeDates,a=Te.default(e,1);return n&&Ve.default(n,a)>0||r&&r.every((function(e){return Ve.default(e,a)>0}))||!1}function bn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.maxDate,r=t.includeDates,a=ke.default(e,1);return n&&Ve.default(a,n)>0||r&&r.every((function(e){return Ve.default(a,e)>0}))||!1}function Dn(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter((function(e){return Qe.default(e,t)>=0}));return Be.default(r)}return n?Be.default(n):t}function kn(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter((function(e){return Qe.default(e,t)<=0}));return qe.default(r)}return n?qe.default(n):t}function Cn(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"react-datepicker__day--highlighted",n=new Map,r=0,a=e.length;r1&&void 0!==arguments[1]?arguments[1]:It,n=Math.ceil(Ie.default(e)/t)*t;return{startPeriod:n-(t-1),endPeriod:n}}function Tn(e,t,n,r){for(var a=[],o=0;o<2*t+1;o++){var i=e+t-o,s=!0;n&&(s=Ie.default(n)<=i),r&&s&&(s=Ie.default(r)>=i),s&&a.push(i)}return a}var Zn=function(e){Mt(r,e);var n=_t(r);function r(e){var a;bt(this,r),Ct(Zt(a=n.call(this,e)),"renderOptions",(function(){var e=a.props.year,t=a.state.yearsList.map((function(t){return de.default.createElement("div",{className:e===t?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:t,onClick:a.onChange.bind(Zt(a),t),"aria-selected":e===t?"true":void 0},e===t?de.default.createElement("span",{className:"react-datepicker__year-option--selected"},"\u2713"):"",t)})),n=a.props.minDate?Ie.default(a.props.minDate):null,r=a.props.maxDate?Ie.default(a.props.maxDate):null;return r&&a.state.yearsList.find((function(e){return e===r}))||t.unshift(de.default.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:a.incrementYears},de.default.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),n&&a.state.yearsList.find((function(e){return e===n}))||t.push(de.default.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:a.decrementYears},de.default.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),t})),Ct(Zt(a),"onChange",(function(e){a.props.onChange(e)})),Ct(Zt(a),"handleClickOutside",(function(){a.props.onCancel()})),Ct(Zt(a),"shiftYears",(function(e){var t=a.state.yearsList.map((function(t){return t+e}));a.setState({yearsList:t})})),Ct(Zt(a),"incrementYears",(function(){return a.shiftYears(1)})),Ct(Zt(a),"decrementYears",(function(){return a.shiftYears(-1)}));var o=e.yearDropdownItemNumber,i=e.scrollableYearDropdown,s=o||(i?10:5);return a.state={yearsList:Tn(a.props.year,s,a.props.minDate,a.props.maxDate)},a.dropdownRef=t.createRef(),a}return kt(r,[{key:"componentDidMount",value:function(){var e=this.dropdownRef.current;if(e){var t=e.children?Array.from(e.children):null,n=t?t.find((function(e){return e.ariaSelected})):null;e.scrollTop=n?n.offsetTop+(n.clientHeight-e.clientHeight)/2:(e.scrollHeight-e.clientHeight)/2}}},{key:"render",value:function(){var e=pe.default({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return de.default.createElement("div",{className:e,ref:this.dropdownRef},this.renderOptions())}}]),r}(de.default.Component),_n=ht.default(Zn),En=function(e){Mt(n,e);var t=_t(n);function n(){var e;bt(this,n);for(var r=arguments.length,a=new Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},n=!1;0===e.getTabIndex()&&!t.isInputFocused&&e.isSameDay(e.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(n=!0),e.props.inline&&!e.props.shouldFocusDayInline&&(n=!1),e.props.containerRef&&e.props.containerRef.current&&e.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(n=!0),e.props.monthShowsDuplicateDaysEnd&&e.isAfterMonth()&&(n=!1),e.props.monthShowsDuplicateDaysStart&&e.isBeforeMonth()&&(n=!1)),n&&e.dayEl.current.focus({preventScroll:!0})})),Ct(Zt(e),"renderDayContents",(function(){return e.props.monthShowsDuplicateDaysEnd&&e.isAfterMonth()||e.props.monthShowsDuplicateDaysStart&&e.isBeforeMonth()?null:e.props.renderDayContents?e.props.renderDayContents(Pe.default(e.props.day),e.props.day):Pe.default(e.props.day)})),Ct(Zt(e),"render",(function(){return de.default.createElement("div",{ref:e.dayEl,className:e.getClassNames(e.props.day),onKeyDown:e.handleOnKeyDown,onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,tabIndex:e.getTabIndex(),"aria-label":e.getAriaLabel(),role:"option","aria-disabled":e.isDisabled(),"aria-current":e.isCurrentDay()?"date":void 0,"aria-selected":e.isSelected()||e.isInRange()},e.renderDayContents())})),e}return kt(n,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(e){this.handleFocusDay(e)}}]),n}(de.default.Component),Un=function(e){Mt(n,e);var t=_t(n);function n(){var e;bt(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=6,s=!n&&!e.isWeekInMonth(o);if(i||s){if(!e.props.peekNextMonth)break;a=!0}}return t})),Ct(Zt(e),"onMonthClick",(function(t,n){e.handleDayClick(Bt(je.default(e.props.day,n)),t)})),Ct(Zt(e),"onMonthMouseEnter",(function(t){e.handleDayMouseEnter(Bt(je.default(e.props.day,t)))})),Ct(Zt(e),"handleMonthNavigation",(function(t,n){e.isDisabled(n)||e.isExcluded(n)||(e.props.setPreSelection(n),e.MONTH_REFS[t].current&&e.MONTH_REFS[t].current.focus())})),Ct(Zt(e),"onMonthKeyDown",(function(t,n){var r=e.props,a=r.selected,o=r.preSelection,i=r.disabledKeyboardNavigation,s=r.showTwoColumnMonthYearPicker,u=r.showFourColumnMonthYearPicker,c=r.setPreSelection,l=t.key;if("Tab"!==l&&t.preventDefault(),!i){var d=Qn(u,s),p=qn[d].verticalNavigationOffset,f=qn[d].grid;switch(l){case"Enter":e.onMonthClick(t,n),c(a);break;case"ArrowRight":e.handleMonthNavigation(11===n?0:n+1,be.default(o,1));break;case"ArrowLeft":e.handleMonthNavigation(0===n?11:n-1,Me.default(o,1));break;case"ArrowUp":e.handleMonthNavigation(f[0].includes(n)?n+12-p:n-p,Me.default(o,p));break;case"ArrowDown":e.handleMonthNavigation(f[f.length-1].includes(n)?n-12+p:n+p,be.default(o,p))}}})),Ct(Zt(e),"onQuarterClick",(function(t,n){e.handleDayClick(Qt(He.default(e.props.day,n)),t)})),Ct(Zt(e),"onQuarterMouseEnter",(function(t){e.handleDayMouseEnter(Qt(He.default(e.props.day,t)))})),Ct(Zt(e),"handleQuarterNavigation",(function(t,n){e.isDisabled(n)||e.isExcluded(n)||(e.props.setPreSelection(n),e.QUARTER_REFS[t-1].current&&e.QUARTER_REFS[t-1].current.focus())})),Ct(Zt(e),"onQuarterKeyDown",(function(t,n){var r=t.key;if(!e.props.disabledKeyboardNavigation)switch(r){case"Enter":e.onQuarterClick(t,n),e.props.setPreSelection(e.props.selected);break;case"ArrowRight":e.handleQuarterNavigation(4===n?1:n+1,De.default(e.props.preSelection,1));break;case"ArrowLeft":e.handleQuarterNavigation(1===n?4:n-1,xe.default(e.props.preSelection,1))}})),Ct(Zt(e),"getMonthClassNames",(function(t){var n=e.props,r=n.day,a=n.startDate,o=n.endDate,i=n.selected,s=n.minDate,u=n.maxDate,c=n.preSelection,l=n.monthClassName,d=n.excludeDates,p=n.includeDates,f=l?l(je.default(r,t)):void 0,h=je.default(r,t);return pe.default("react-datepicker__month-text","react-datepicker__month-".concat(t),f,{"react-datepicker__month-text--disabled":(s||u||d||p)&&sn(h,e.props),"react-datepicker__month-text--selected":e.isSelectedMonth(r,t,i),"react-datepicker__month-text--keyboard-selected":!e.props.disabledKeyboardNavigation&&Ye.default(c)===t,"react-datepicker__month-text--in-selecting-range":e.isInSelectingRangeMonth(t),"react-datepicker__month-text--in-range":un(a,o,t,r),"react-datepicker__month-text--range-start":e.isRangeStartMonth(t),"react-datepicker__month-text--range-end":e.isRangeEndMonth(t),"react-datepicker__month-text--selecting-range-start":e.isSelectingMonthRangeStart(t),"react-datepicker__month-text--selecting-range-end":e.isSelectingMonthRangeEnd(t),"react-datepicker__month-text--today":e.isCurrentMonth(r,t)})})),Ct(Zt(e),"getTabIndex",(function(t){var n=Ye.default(e.props.preSelection);return e.props.disabledKeyboardNavigation||t!==n?"-1":"0"})),Ct(Zt(e),"getQuarterTabIndex",(function(t){var n=Re.default(e.props.preSelection);return e.props.disabledKeyboardNavigation||t!==n?"-1":"0"})),Ct(Zt(e),"getAriaLabel",(function(t){var n=e.props,r=n.chooseDayAriaLabelPrefix,a=void 0===r?"Choose":r,o=n.disabledDayAriaLabelPrefix,i=void 0===o?"Not available":o,s=n.day,u=je.default(s,t),c=e.isDisabled(u)||e.isExcluded(u)?i:a;return"".concat(c," ").concat(Ut(u,"MMMM yyyy"))})),Ct(Zt(e),"getQuarterClassNames",(function(t){var n=e.props,r=n.day,a=n.startDate,o=n.endDate,i=n.selected,s=n.minDate,u=n.maxDate,c=n.preSelection;return pe.default("react-datepicker__quarter-text","react-datepicker__quarter-".concat(t),{"react-datepicker__quarter-text--disabled":(s||u)&&cn(He.default(r,t),e.props),"react-datepicker__quarter-text--selected":e.isSelectedQuarter(r,t,i),"react-datepicker__quarter-text--keyboard-selected":Re.default(c)===t,"react-datepicker__quarter-text--in-selecting-range":e.isInSelectingRangeQuarter(t),"react-datepicker__quarter-text--in-range":pn(a,o,t,r),"react-datepicker__quarter-text--range-start":e.isRangeStartQuarter(t),"react-datepicker__quarter-text--range-end":e.isRangeEndQuarter(t)})})),Ct(Zt(e),"getMonthContent",(function(t){var n=e.props,r=n.showFullMonthYearPicker,a=n.renderMonthContent,o=n.locale,i=rn(t,o),s=nn(t,o);return a?a(t,i,s):r?s:i})),Ct(Zt(e),"getQuarterContent",(function(t){var n=e.props,r=n.renderQuarterContent,a=function(e,t){return Ut(He.default(At(),e),"QQQ",t)}(t,n.locale);return r?r(t,a):a})),Ct(Zt(e),"renderMonths",(function(){var t=e.props,n=t.showTwoColumnMonthYearPicker,r=t.showFourColumnMonthYearPicker,a=t.day,o=t.selected;return qn[Qn(r,n)].grid.map((function(t,n){return de.default.createElement("div",{className:"react-datepicker__month-wrapper",key:n},t.map((function(t,n){return de.default.createElement("div",{ref:e.MONTH_REFS[t],key:n,onClick:function(n){e.onMonthClick(n,t)},onKeyDown:function(n){e.onMonthKeyDown(n,t)},onMouseEnter:function(){return e.onMonthMouseEnter(t)},tabIndex:e.getTabIndex(t),className:e.getMonthClassNames(t),role:"option","aria-label":e.getAriaLabel(t),"aria-current":e.isCurrentMonth(a,t)?"date":void 0,"aria-selected":e.isSelectedMonth(a,t,o)},e.getMonthContent(t))})))}))})),Ct(Zt(e),"renderQuarters",(function(){var t=e.props,n=t.day,r=t.selected;return de.default.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map((function(t,a){return de.default.createElement("div",{key:a,ref:e.QUARTER_REFS[a],role:"option",onClick:function(n){e.onQuarterClick(n,t)},onKeyDown:function(n){e.onQuarterKeyDown(n,t)},onMouseEnter:function(){return e.onQuarterMouseEnter(t)},className:e.getQuarterClassNames(t),"aria-selected":e.isSelectedQuarter(n,t,r),tabIndex:e.getQuarterTabIndex(t),"aria-current":e.isCurrentQuarter(n,t)?"date":void 0},e.getQuarterContent(t))})))})),Ct(Zt(e),"getClassNames",(function(){var t=e.props,n=t.selectingDate,r=t.selectsStart,a=t.selectsEnd,o=t.showMonthYearPicker,i=t.showQuarterYearPicker;return pe.default("react-datepicker__month",{"react-datepicker__month--selecting-range":n&&(r||a)},{"react-datepicker__monthPicker":o},{"react-datepicker__quarterPicker":i})})),e}return kt(n,[{key:"render",value:function(){var e=this.props,t=e.showMonthYearPicker,n=e.showQuarterYearPicker,r=e.day,a=e.ariaLabelPrefix,o=void 0===a?"month ":a;return de.default.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(o," ").concat(Ut(r,"yyyy-MM")),role:"listbox"},t?this.renderMonths():n?this.renderQuarters():this.renderWeeks())}}]),n}(de.default.Component),Vn=function(e){Mt(n,e);var t=_t(n);function n(){var e;bt(this,n);for(var r=arguments.length,a=new Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:{}).className||"").split(/\s+/);return $n.some((function(t){return e.indexOf(t)>=0}))})(e.target)&&r.props.onDropdownFocus()})),Ct(Zt(r),"getDateInView",(function(){var e=r.props,t=e.preSelection,n=e.selected,a=e.openToDate,o=Dn(r.props),i=kn(r.props),s=At();return a||n||t||(o&&ct.default(s,o)?o:i&&ut.default(s,i)?i:s)})),Ct(Zt(r),"increaseMonth",(function(){r.setState((function(e){var t=e.date;return{date:be.default(t,1)}}),(function(){return r.handleMonthChange(r.state.date)}))})),Ct(Zt(r),"decreaseMonth",(function(){r.setState((function(e){var t=e.date;return{date:Me.default(t,1)}}),(function(){return r.handleMonthChange(r.state.date)}))})),Ct(Zt(r),"handleDayClick",(function(e,t,n){r.props.onSelect(e,t,n),r.props.setPreSelection&&r.props.setPreSelection(e)})),Ct(Zt(r),"handleDayMouseEnter",(function(e){r.setState({selectingDate:e}),r.props.onDayMouseEnter&&r.props.onDayMouseEnter(e)})),Ct(Zt(r),"handleMonthMouseLeave",(function(){r.setState({selectingDate:null}),r.props.onMonthMouseLeave&&r.props.onMonthMouseLeave()})),Ct(Zt(r),"handleYearMouseEnter",(function(e,t){r.setState({selectingDate:We.default(At(),t)}),r.props.onYearMouseEnter&&r.props.onYearMouseEnter(e,t)})),Ct(Zt(r),"handleYearMouseLeave",(function(e,t){r.props.onYearMouseLeave&&r.props.onYearMouseLeave(e,t)})),Ct(Zt(r),"handleYearChange",(function(e){r.props.onYearChange&&(r.props.onYearChange(e),r.setState({isRenderAriaLiveMessage:!0})),r.props.adjustDateOnChange&&(r.props.onSelect&&r.props.onSelect(e),r.props.setOpen&&r.props.setOpen(!0)),r.props.setPreSelection&&r.props.setPreSelection(e)})),Ct(Zt(r),"handleMonthChange",(function(e){r.handleCustomMonthChange(e),r.props.adjustDateOnChange&&(r.props.onSelect&&r.props.onSelect(e),r.props.setOpen&&r.props.setOpen(!0)),r.props.setPreSelection&&r.props.setPreSelection(e)})),Ct(Zt(r),"handleCustomMonthChange",(function(e){r.props.onMonthChange&&(r.props.onMonthChange(e),r.setState({isRenderAriaLiveMessage:!0}))})),Ct(Zt(r),"handleMonthYearChange",(function(e){r.handleYearChange(e),r.handleMonthChange(e)})),Ct(Zt(r),"changeYear",(function(e){r.setState((function(t){var n=t.date;return{date:We.default(n,e)}}),(function(){return r.handleYearChange(r.state.date)}))})),Ct(Zt(r),"changeMonth",(function(e){r.setState((function(t){var n=t.date;return{date:je.default(n,e)}}),(function(){return r.handleMonthChange(r.state.date)}))})),Ct(Zt(r),"changeMonthYear",(function(e){r.setState((function(t){var n=t.date;return{date:We.default(je.default(n,Ye.default(e)),Ie.default(e))}}),(function(){return r.handleMonthYearChange(r.state.date)}))})),Ct(Zt(r),"header",(function(){var e=Wt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.state.date,r.props.locale,r.props.calendarStartDay),t=[];return r.props.showWeekNumbers&&t.push(de.default.createElement("div",{key:"W",className:"react-datepicker__day-name"},r.props.weekLabel||"#")),t.concat([0,1,2,3,4,5,6].map((function(t){var n=ye.default(e,t),a=r.formatWeekday(n,r.props.locale),o=r.props.weekDayClassName?r.props.weekDayClassName(n):void 0;return de.default.createElement("div",{key:t,className:pe.default("react-datepicker__day-name",o)},a)})))})),Ct(Zt(r),"formatWeekday",(function(e,t){return r.props.formatWeekDay?function(e,t,n){return t(Ut(e,"EEEE",n))}(e,r.props.formatWeekDay,t):r.props.useWeekdaysShort?function(e,t){return Ut(e,"EEE",t)}(e,t):function(e,t){return Ut(e,"EEEEEE",t)}(e,t)})),Ct(Zt(r),"decreaseYear",(function(){r.setState((function(e){var t=e.date;return{date:Te.default(t,r.props.showYearPicker?r.props.yearItemNumber:1)}}),(function(){return r.handleYearChange(r.state.date)}))})),Ct(Zt(r),"clearSelectingDate",(function(){r.setState({selectingDate:null})})),Ct(Zt(r),"renderPreviousButton",(function(){if(!r.props.renderCustomHeader){var e;switch(!0){case r.props.showMonthYearPicker:e=wn(r.state.date,r.props);break;case r.props.showYearPicker:e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.yearItemNumber,a=void 0===r?It:r,o=xn(qt(Te.default(e,a)),a).endPeriod,i=n&&Ie.default(n);return i&&i>o||!1}(r.state.date,r.props);break;default:e=gn(r.state.date,r.props)}if((r.props.forceShowMonthNavigation||r.props.showDisabledMonthNavigation||!e)&&!r.props.showTimeSelectOnly){var t=["react-datepicker__navigation","react-datepicker__navigation--previous"],n=r.decreaseMonth;(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker)&&(n=r.decreaseYear),e&&r.props.showDisabledMonthNavigation&&(t.push("react-datepicker__navigation--previous--disabled"),n=null);var a=r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker,o=r.props,i=o.previousMonthButtonLabel,s=o.previousYearButtonLabel,u=r.props,c=u.previousMonthAriaLabel,l=void 0===c?"string"==typeof i?i:"Previous Month":c,d=u.previousYearAriaLabel,p=void 0===d?"string"==typeof s?s:"Previous Year":d;return de.default.createElement("button",{type:"button",className:t.join(" "),onClick:n,onKeyDown:r.props.handleOnKeyDown,"aria-label":a?p:l},de.default.createElement("span",{className:["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"].join(" ")},a?r.props.previousYearButtonLabel:r.props.previousMonthButtonLabel))}}})),Ct(Zt(r),"increaseYear",(function(){r.setState((function(e){var t=e.date;return{date:ke.default(t,r.props.showYearPicker?r.props.yearItemNumber:1)}}),(function(){return r.handleYearChange(r.state.date)}))})),Ct(Zt(r),"renderNextButton",(function(){if(!r.props.renderCustomHeader){var e;switch(!0){case r.props.showMonthYearPicker:e=bn(r.state.date,r.props);break;case r.props.showYearPicker:e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.maxDate,r=t.yearItemNumber,a=void 0===r?It:r,o=xn(ke.default(e,a),a).startPeriod,i=n&&Ie.default(n);return i&&i0&&void 0!==arguments[0]?arguments[0]:r.state.date,t=["react-datepicker__current-month"];return r.props.showYearDropdown&&t.push("react-datepicker__current-month--hasYearDropdown"),r.props.showMonthDropdown&&t.push("react-datepicker__current-month--hasMonthDropdown"),r.props.showMonthYearDropdown&&t.push("react-datepicker__current-month--hasMonthYearDropdown"),de.default.createElement("div",{className:t.join(" ")},Ut(e,r.props.dateFormat,r.props.locale))})),Ct(Zt(r),"renderYearDropdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(r.props.showYearDropdown&&!e)return de.default.createElement(En,{adjustDateOnChange:r.props.adjustDateOnChange,date:r.state.date,onSelect:r.props.onSelect,setOpen:r.props.setOpen,dropdownMode:r.props.dropdownMode,onChange:r.changeYear,minDate:r.props.minDate,maxDate:r.props.maxDate,year:Ie.default(r.state.date),scrollableYearDropdown:r.props.scrollableYearDropdown,yearDropdownItemNumber:r.props.yearDropdownItemNumber})})),Ct(Zt(r),"renderMonthDropdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(r.props.showMonthDropdown&&!e)return de.default.createElement(On,{dropdownMode:r.props.dropdownMode,locale:r.props.locale,onChange:r.changeMonth,month:Ye.default(r.state.date),useShortMonthInDropdown:r.props.useShortMonthInDropdown})})),Ct(Zt(r),"renderMonthYearDropdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(r.props.showMonthYearDropdown&&!e)return de.default.createElement(An,{dropdownMode:r.props.dropdownMode,locale:r.props.locale,dateFormat:r.props.dateFormat,onChange:r.changeMonthYear,minDate:r.props.minDate,maxDate:r.props.maxDate,date:r.state.date,scrollableMonthYearDropdown:r.props.scrollableMonthYearDropdown})})),Ct(Zt(r),"handleTodayButtonClick",(function(e){r.props.onSelect(Kt(),e),r.props.setPreSelection&&r.props.setPreSelection(Kt())})),Ct(Zt(r),"renderTodayButton",(function(){if(r.props.todayButton&&!r.props.showTimeSelectOnly)return de.default.createElement("div",{className:"react-datepicker__today-button",onClick:function(e){return r.handleTodayButtonClick(e)}},r.props.todayButton)})),Ct(Zt(r),"renderDefaultHeader",(function(e){var t=e.monthDate,n=e.i;return de.default.createElement("div",{className:"react-datepicker__header ".concat(r.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},r.renderCurrentMonth(t),de.default.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(r.props.dropdownMode),onFocus:r.handleDropdownFocus},r.renderMonthDropdown(0!==n),r.renderMonthYearDropdown(0!==n),r.renderYearDropdown(0!==n)),de.default.createElement("div",{className:"react-datepicker__day-names"},r.header(t)))})),Ct(Zt(r),"renderCustomHeader",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.monthDate,n=e.i;if(r.props.showTimeSelect&&!r.state.monthContainer||r.props.showTimeSelectOnly)return null;var a=gn(r.state.date,r.props),o=yn(r.state.date,r.props),i=wn(r.state.date,r.props),s=bn(r.state.date,r.props),u=!r.props.showMonthYearPicker&&!r.props.showQuarterYearPicker&&!r.props.showYearPicker;return de.default.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:r.props.onDropdownFocus},r.props.renderCustomHeader(yt(yt({},r.state),{},{customHeaderCount:n,monthDate:t,changeMonth:r.changeMonth,changeYear:r.changeYear,decreaseMonth:r.decreaseMonth,increaseMonth:r.increaseMonth,decreaseYear:r.decreaseYear,increaseYear:r.increaseYear,prevMonthButtonDisabled:a,nextMonthButtonDisabled:o,prevYearButtonDisabled:i,nextYearButtonDisabled:s})),u&&de.default.createElement("div",{className:"react-datepicker__day-names"},r.header(t)))})),Ct(Zt(r),"renderYearHeader",(function(){var e=r.state.date,t=r.props,n=t.showYearPicker,a=xn(e,t.yearItemNumber),o=a.startPeriod,i=a.endPeriod;return de.default.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},n?"".concat(o," - ").concat(i):Ie.default(e))})),Ct(Zt(r),"renderHeader",(function(e){switch(!0){case void 0!==r.props.renderCustomHeader:return r.renderCustomHeader(e);case r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker:return r.renderYearHeader(e);default:return r.renderDefaultHeader(e)}})),Ct(Zt(r),"renderMonths",(function(){if(!r.props.showTimeSelectOnly&&!r.props.showYearPicker){for(var e=[],t=r.props.showPreviousMonths?r.props.monthsShown-1:0,n=Me.default(r.state.date,t),a=0;a0;e.push(de.default.createElement("div",{key:s,ref:function(e){r.monthContainer=e},className:"react-datepicker__month-container"},r.renderHeader({monthDate:i,i:a}),de.default.createElement(Kn,{chooseDayAriaLabelPrefix:r.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:r.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:r.props.weekAriaLabelPrefix,ariaLabelPrefix:r.props.monthAriaLabelPrefix,onChange:r.changeMonthYear,day:i,dayClassName:r.props.dayClassName,calendarStartDay:r.props.calendarStartDay,monthClassName:r.props.monthClassName,onDayClick:r.handleDayClick,handleOnKeyDown:r.props.handleOnDayKeyDown,onDayMouseEnter:r.handleDayMouseEnter,onMouseLeave:r.handleMonthMouseLeave,onWeekSelect:r.props.onWeekSelect,orderInDisplay:a,formatWeekNumber:r.props.formatWeekNumber,locale:r.props.locale,minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,highlightDates:r.props.highlightDates,selectingDate:r.state.selectingDate,includeDates:r.props.includeDates,includeDateIntervals:r.props.includeDateIntervals,inline:r.props.inline,shouldFocusDayInline:r.props.shouldFocusDayInline,fixedHeight:r.props.fixedHeight,filterDate:r.props.filterDate,preSelection:r.props.preSelection,setPreSelection:r.props.setPreSelection,selected:r.props.selected,selectsStart:r.props.selectsStart,selectsEnd:r.props.selectsEnd,selectsRange:r.props.selectsRange,selectsDisabledDaysInRange:r.props.selectsDisabledDaysInRange,showWeekNumbers:r.props.showWeekNumbers,startDate:r.props.startDate,endDate:r.props.endDate,peekNextMonth:r.props.peekNextMonth,setOpen:r.props.setOpen,shouldCloseOnSelect:r.props.shouldCloseOnSelect,renderDayContents:r.props.renderDayContents,renderMonthContent:r.props.renderMonthContent,renderQuarterContent:r.props.renderQuarterContent,renderYearContent:r.props.renderYearContent,disabledKeyboardNavigation:r.props.disabledKeyboardNavigation,showMonthYearPicker:r.props.showMonthYearPicker,showFullMonthYearPicker:r.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:r.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:r.props.showFourColumnMonthYearPicker,showYearPicker:r.props.showYearPicker,showQuarterYearPicker:r.props.showQuarterYearPicker,isInputFocused:r.props.isInputFocused,containerRef:r.containerRef,monthShowsDuplicateDaysEnd:u,monthShowsDuplicateDaysStart:c})))}return e}})),Ct(Zt(r),"renderYears",(function(){if(!r.props.showTimeSelectOnly)return r.props.showYearPicker?de.default.createElement("div",{className:"react-datepicker__year--container"},r.renderHeader(),de.default.createElement(zn,St({onDayClick:r.handleDayClick,selectingDate:r.state.selectingDate,clearSelectingDate:r.clearSelectingDate,date:r.state.date},r.props,{onYearMouseEnter:r.handleYearMouseEnter,onYearMouseLeave:r.handleYearMouseLeave}))):void 0})),Ct(Zt(r),"renderTimeSection",(function(){if(r.props.showTimeSelect&&(r.state.monthContainer||r.props.showTimeSelectOnly))return de.default.createElement(Vn,{selected:r.props.selected,openToDate:r.props.openToDate,onChange:r.props.onTimeChange,timeClassName:r.props.timeClassName,format:r.props.timeFormat,includeTimes:r.props.includeTimes,intervals:r.props.timeIntervals,minTime:r.props.minTime,maxTime:r.props.maxTime,excludeTimes:r.props.excludeTimes,filterTime:r.props.filterTime,timeCaption:r.props.timeCaption,todayButton:r.props.todayButton,showMonthDropdown:r.props.showMonthDropdown,showMonthYearDropdown:r.props.showMonthYearDropdown,showYearDropdown:r.props.showYearDropdown,withPortal:r.props.withPortal,monthRef:r.state.monthContainer,injectTimes:r.props.injectTimes,locale:r.props.locale,handleOnKeyDown:r.props.handleOnKeyDown,showTimeSelectOnly:r.props.showTimeSelectOnly})})),Ct(Zt(r),"renderInputTimeSection",(function(){var e=new Date(r.props.selected),t=Ft(e)&&Boolean(r.props.selected)?"".concat(Mn(e.getHours()),":").concat(Mn(e.getMinutes())):"";if(r.props.showTimeInput)return de.default.createElement(Xn,{date:e,timeString:t,timeInputLabel:r.props.timeInputLabel,onChange:r.props.onTimeChange,customTimeInput:r.props.customTimeInput})})),Ct(Zt(r),"renderAriaLiveRegion",(function(){var e,t=xn(r.state.date,r.props.yearItemNumber),n=t.startPeriod,a=t.endPeriod;return e=r.props.showYearPicker?"".concat(n," - ").concat(a):r.props.showMonthYearPicker||r.props.showQuarterYearPicker?Ie.default(r.state.date):"".concat(nn(Ye.default(r.state.date),r.props.locale)," ").concat(Ie.default(r.state.date)),de.default.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},r.state.isRenderAriaLiveMessage&&e)})),Ct(Zt(r),"renderChildren",(function(){if(r.props.children)return de.default.createElement("div",{className:"react-datepicker__children-container"},r.props.children)})),r.containerRef=de.default.createRef(),r.state={date:r.getDateInView(),selectingDate:null,monthContainer:null,isRenderAriaLiveMessage:!1},r}return kt(n,[{key:"componentDidMount",value:function(){var e=this;this.props.showTimeSelect&&(this.assignMonthContainer=void e.setState({monthContainer:e.monthContainer}))}},{key:"componentDidUpdate",value:function(e){var t=this;if(!this.props.preSelection||Gt(this.props.preSelection,e.preSelection)&&this.props.monthSelectedIn===e.monthSelectedIn)this.props.openToDate&&!Gt(this.props.openToDate,e.openToDate)&&this.setState({date:this.props.openToDate});else{var n=!zt(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},(function(){return n&&t.handleCustomMonthChange(t.state.date)}))}}},{key:"render",value:function(){var e=this.props.container||Gn;return de.default.createElement("div",{ref:this.containerRef},de.default.createElement(e,{className:pe.default("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))}}],[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:It}}}]),n}(de.default.Component),er=function(e){Mt(n,e);var t=_t(n);function n(e){var r;return bt(this,n),(r=t.call(this,e)).el=document.createElement("div"),r}return kt(n,[{key:"componentDidMount",value:function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.portalRoot.removeChild(this.el)}},{key:"render",value:function(){return vt.default.createPortal(this.props.children,this.el)}}]),n}(de.default.Component),tr=function(e){return!e.disabled&&-1!==e.tabIndex},nr=function(e){Mt(n,e);var t=_t(n);function n(e){var r;return bt(this,n),Ct(Zt(r=t.call(this,e)),"getTabChildren",(function(){return Array.prototype.slice.call(r.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter(tr)})),Ct(Zt(r),"handleFocusStart",(function(){var e=r.getTabChildren();e&&e.length>1&&e[e.length-1].focus()})),Ct(Zt(r),"handleFocusEnd",(function(){var e=r.getTabChildren();e&&e.length>1&&e[0].focus()})),r.tabLoopRef=de.default.createRef(),r}return kt(n,[{key:"render",value:function(){return this.props.enableTabLoop?de.default.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},de.default.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,de.default.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),n}(de.default.Component),rr=function(e){Mt(n,e);var t=_t(n);function n(){return bt(this,n),t.apply(this,arguments)}return kt(n,[{key:"render",value:function(){var e,t=this.props,n=t.className,r=t.wrapperClassName,a=t.hidePopper,o=t.popperComponent,i=t.popperModifiers,s=t.popperPlacement,u=t.popperProps,c=t.targetComponent,l=t.enableTabLoop,d=t.popperOnKeyDown,p=t.portalId,f=t.portalHost;if(!a){var h=pe.default("react-datepicker-popper",n);e=de.default.createElement(ue.Popper,St({modifiers:i,placement:s},u),(function(e){var t=e.ref,n=e.style,r=e.placement,a=e.arrowProps;return de.default.createElement(nr,{enableTabLoop:l},de.default.createElement("div",{ref:t,style:n,className:h,"data-placement":r,onKeyDown:d},de.default.cloneElement(o,{arrowProps:a})))}))}this.props.popperContainer&&(e=de.default.createElement(this.props.popperContainer,{},e)),p&&!a&&(e=de.default.createElement(er,{portalId:p,portalHost:f},e));var v=pe.default("react-datepicker-wrapper",r);return de.default.createElement(ue.Manager,{className:"react-datepicker-manager"},de.default.createElement(ue.Reference,null,(function(e){var t=e.ref;return de.default.createElement("div",{ref:t,className:v},c)})),e)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:[],popperProps:{},popperPlacement:"bottom-start"}}}]),n}(de.default.Component),ar="react-datepicker-ignore-onclickoutside",or=ht.default(Jn),ir="Date input not valid.",sr=function(e){Mt(n,e);var t=_t(n);function n(e){var r;return bt(this,n),Ct(Zt(r=t.call(this,e)),"getPreSelection",(function(){return r.props.openToDate?r.props.openToDate:r.props.selectsEnd&&r.props.startDate?r.props.startDate:r.props.selectsStart&&r.props.endDate?r.props.endDate:At()})),Ct(Zt(r),"calcInitialState",(function(){var e,t=r.getPreSelection(),n=Dn(r.props),a=kn(r.props),o=n&&ct.default(t,ze.default(n))?n:a&&ut.default(t,et.default(a))?a:t;return{open:r.props.startOpen||!1,preventFocus:!1,preSelection:null!==(e=r.props.selectsRange?r.props.startDate:r.props.selected)&&void 0!==e?e:o,highlightDates:Cn(r.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1}})),Ct(Zt(r),"clearPreventFocusTimeout",(function(){r.preventFocusTimeout&&clearTimeout(r.preventFocusTimeout)})),Ct(Zt(r),"setFocus",(function(){r.input&&r.input.focus&&r.input.focus({preventScroll:!0})})),Ct(Zt(r),"setBlur",(function(){r.input&&r.input.blur&&r.input.blur(),r.cancelFocusInput()})),Ct(Zt(r),"setOpen",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r.setState({open:e,preSelection:e&&r.state.open?r.state.preSelection:r.calcInitialState().preSelection,lastPreSelectChange:cr},(function(){e||r.setState((function(e){return{focused:!!t&&e.focused}}),(function(){!t&&r.setBlur(),r.setState({inputValue:null})}))}))})),Ct(Zt(r),"inputOk",(function(){return fe.default(r.state.preSelection)})),Ct(Zt(r),"isCalendarOpen",(function(){return void 0===r.props.open?r.state.open&&!r.props.disabled&&!r.props.readOnly:r.props.open})),Ct(Zt(r),"handleFocus",(function(e){r.state.preventFocus||(r.props.onFocus(e),r.props.preventOpenOnFocus||r.props.readOnly||r.setOpen(!0)),r.setState({focused:!0})})),Ct(Zt(r),"cancelFocusInput",(function(){clearTimeout(r.inputFocusTimeout),r.inputFocusTimeout=null})),Ct(Zt(r),"deferFocusInput",(function(){r.cancelFocusInput(),r.inputFocusTimeout=setTimeout((function(){return r.setFocus()}),1)})),Ct(Zt(r),"handleDropdownFocus",(function(){r.cancelFocusInput()})),Ct(Zt(r),"handleBlur",(function(e){(!r.state.open||r.props.withPortal||r.props.showTimeInput)&&r.props.onBlur(e),r.setState({focused:!1})})),Ct(Zt(r),"handleCalendarClickOutside",(function(e){r.props.inline||r.setOpen(!1),r.props.onClickOutside(e),r.props.withPortal&&e.preventDefault()})),Ct(Zt(r),"handleChange",(function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&(l=pt.default(o,i.slice(0,o.length),new Date)),Ft(l)||(l=new Date(o))),Ft(l)&&p?l:null));r.props.showTimeSelectOnly&&r.props.selected&&!Gt(f,r.props.selected)&&(f=null==f?mt.default(r.props.selected,{hours:Ee.default(r.props.selected),minutes:_e.default(r.props.selected),seconds:Ze.default(r.props.selected)}):mt.default(r.props.selected,{hours:Ee.default(f),minutes:_e.default(f),seconds:Ze.default(f)})),!f&&a.target.value||r.setSelected(f,a,!0)}})),Ct(Zt(r),"handleSelect",(function(e,t,n){if(r.setState({preventFocus:!0},(function(){return r.preventFocusTimeout=setTimeout((function(){return r.setState({preventFocus:!1})}),50),r.preventFocusTimeout})),r.props.onChangeRaw&&r.props.onChangeRaw(t),r.setSelected(e,t,!1,n),r.props.showDateSelect&&r.setState({isRenderAriaLiveMessage:!0}),!r.props.shouldCloseOnSelect||r.props.showTimeSelect)r.setPreSelection(e);else if(!r.props.inline){r.props.selectsRange||r.setOpen(!1);var a=r.props,o=a.startDate,i=a.endDate;!o||i||ct.default(e,o)||r.setOpen(!1)}})),Ct(Zt(r),"setSelected",(function(e,t,n,a){var o=e;if(r.props.showYearPicker){if(null!==o&&dn(Ie.default(o),r.props))return}else if(r.props.showMonthYearPicker){if(null!==o&&sn(o,r.props))return}else if(null!==o&&an(o,r.props))return;var i=r.props,s=i.onChange,u=i.selectsRange,c=i.startDate,l=i.endDate;if(!$t(r.props.selected,o)||r.props.allowSameDay||u)if(null!==o&&(!r.props.selected||n&&(r.props.showTimeSelect||r.props.showTimeSelectOnly||r.props.showTimeInput)||(o=Ht(o,{hour:Ee.default(r.props.selected),minute:_e.default(r.props.selected),second:Ze.default(r.props.selected)})),r.props.inline||r.setState({preSelection:o}),r.props.focusSelectedMonth||r.setState({monthSelectedIn:a})),u){var d=c&&l;c||l?c&&!l&&(ct.default(o,c)?s([o,null],t):s([c,o],t)):s([o,null],t),d&&s([o,null],t)}else s(o,t);n||(r.props.onSelect(o,t),r.setState({inputValue:null}))})),Ct(Zt(r),"setPreSelection",(function(e){var t=void 0!==r.props.minDate,n=void 0!==r.props.maxDate,a=!0;if(e){var o=ze.default(e);if(t&&n)a=Jt(e,r.props.minDate,r.props.maxDate);else if(t){var i=ze.default(r.props.minDate);a=ut.default(e,i)||$t(o,i)}else if(n){var s=et.default(r.props.maxDate);a=ct.default(e,s)||$t(o,s)}}a&&r.setState({preSelection:e})})),Ct(Zt(r),"handleTimeChange",(function(e){var t=Ht(r.props.selected?r.props.selected:r.getPreSelection(),{hour:Ee.default(e),minute:_e.default(e)});r.setState({preSelection:t}),r.props.onChange(t),r.props.shouldCloseOnSelect&&r.setOpen(!1),r.props.showTimeInput&&r.setOpen(!0),(r.props.showTimeSelectOnly||r.props.showTimeSelect)&&r.setState({isRenderAriaLiveMessage:!0}),r.setState({inputValue:null})})),Ct(Zt(r),"onInputClick",(function(){r.props.disabled||r.props.readOnly||r.setOpen(!0),r.props.onInputClick()})),Ct(Zt(r),"onInputKeyDown",(function(e){r.props.onKeyDown(e);var t=e.key;if(r.state.open||r.props.inline||r.props.preventOpenOnFocus){if(r.state.open){if("ArrowDown"===t||"ArrowUp"===t){e.preventDefault();var n=r.calendar.componentNode&&r.calendar.componentNode.querySelector('.react-datepicker__day[tabindex="0"]');return void(n&&n.focus({preventScroll:!0}))}var a=At(r.state.preSelection);"Enter"===t?(e.preventDefault(),r.inputOk()&&r.state.lastPreSelectChange===cr?(r.handleSelect(a,e),!r.props.shouldCloseOnSelect&&r.setPreSelection(a)):r.setOpen(!1)):"Escape"===t?(e.preventDefault(),r.setOpen(!1)):"Tab"===t&&e.shiftKey&&r.setOpen(!1),r.inputOk()||r.props.onInputError({code:1,msg:ir})}}else"ArrowDown"!==t&&"ArrowUp"!==t&&"Enter"!==t||r.onInputClick()})),Ct(Zt(r),"onPortalKeyDown",(function(e){"Escape"===e.key&&(e.preventDefault(),r.setState({preventFocus:!0},(function(){r.setOpen(!1),setTimeout((function(){r.setFocus(),r.setState({preventFocus:!1})}))})))})),Ct(Zt(r),"onDayKeyDown",(function(e){r.props.onKeyDown(e);var t=e.key,n=At(r.state.preSelection);if("Enter"===t)e.preventDefault(),r.handleSelect(n,e),!r.props.shouldCloseOnSelect&&r.setPreSelection(n);else if("Escape"===t)e.preventDefault(),r.setOpen(!1),r.inputOk()||r.props.onInputError({code:1,msg:ir});else if(!r.props.disabledKeyboardNavigation){var a;switch(t){case"ArrowLeft":a=Ce.default(n,1);break;case"ArrowRight":a=ye.default(n,1);break;case"ArrowUp":a=Se.default(n,1);break;case"ArrowDown":a=we.default(n,1);break;case"PageUp":a=Me.default(n,1);break;case"PageDown":a=be.default(n,1);break;case"Home":a=Te.default(n,1);break;case"End":a=ke.default(n,1)}if(!a)return void(r.props.onInputError&&r.props.onInputError({code:1,msg:ir}));if(e.preventDefault(),r.setState({lastPreSelectChange:cr}),r.props.adjustDateOnChange&&r.setSelected(a),r.setPreSelection(a),r.props.inline){var o=Ye.default(n),i=Ye.default(a),s=Ie.default(n),u=Ie.default(a);o!==i||s!==u?r.setState({shouldFocusDayInline:!0}):r.setState({shouldFocusDayInline:!1})}}})),Ct(Zt(r),"onPopperKeyDown",(function(e){"Escape"===e.key&&(e.preventDefault(),r.setState({preventFocus:!0},(function(){r.setOpen(!1),setTimeout((function(){r.setFocus(),r.setState({preventFocus:!1})}))})))})),Ct(Zt(r),"onClearClick",(function(e){e&&e.preventDefault&&e.preventDefault(),r.props.selectsRange?r.props.onChange([null,null],e):r.props.onChange(null,e),r.setState({inputValue:null})})),Ct(Zt(r),"clear",(function(){r.onClearClick()})),Ct(Zt(r),"onScroll",(function(e){"boolean"==typeof r.props.closeOnScroll&&r.props.closeOnScroll?e.target!==document&&e.target!==document.documentElement&&e.target!==document.body||r.setOpen(!1):"function"==typeof r.props.closeOnScroll&&r.props.closeOnScroll(e)&&r.setOpen(!1)})),Ct(Zt(r),"renderCalendar",(function(){return r.props.inline||r.isCalendarOpen()?de.default.createElement(or,{ref:function(e){r.calendar=e},locale:r.props.locale,calendarStartDay:r.props.calendarStartDay,chooseDayAriaLabelPrefix:r.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:r.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:r.props.weekAriaLabelPrefix,monthAriaLabelPrefix:r.props.monthAriaLabelPrefix,adjustDateOnChange:r.props.adjustDateOnChange,setOpen:r.setOpen,shouldCloseOnSelect:r.props.shouldCloseOnSelect,dateFormat:r.props.dateFormatCalendar,useWeekdaysShort:r.props.useWeekdaysShort,formatWeekDay:r.props.formatWeekDay,dropdownMode:r.props.dropdownMode,selected:r.props.selected,preSelection:r.state.preSelection,onSelect:r.handleSelect,onWeekSelect:r.props.onWeekSelect,openToDate:r.props.openToDate,minDate:r.props.minDate,maxDate:r.props.maxDate,selectsStart:r.props.selectsStart,selectsEnd:r.props.selectsEnd,selectsRange:r.props.selectsRange,startDate:r.props.startDate,endDate:r.props.endDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,filterDate:r.props.filterDate,onClickOutside:r.handleCalendarClickOutside,formatWeekNumber:r.props.formatWeekNumber,highlightDates:r.state.highlightDates,includeDates:r.props.includeDates,includeDateIntervals:r.props.includeDateIntervals,includeTimes:r.props.includeTimes,injectTimes:r.props.injectTimes,inline:r.props.inline,shouldFocusDayInline:r.state.shouldFocusDayInline,peekNextMonth:r.props.peekNextMonth,showMonthDropdown:r.props.showMonthDropdown,showPreviousMonths:r.props.showPreviousMonths,useShortMonthInDropdown:r.props.useShortMonthInDropdown,showMonthYearDropdown:r.props.showMonthYearDropdown,showWeekNumbers:r.props.showWeekNumbers,showYearDropdown:r.props.showYearDropdown,withPortal:r.props.withPortal,forceShowMonthNavigation:r.props.forceShowMonthNavigation,showDisabledMonthNavigation:r.props.showDisabledMonthNavigation,scrollableYearDropdown:r.props.scrollableYearDropdown,scrollableMonthYearDropdown:r.props.scrollableMonthYearDropdown,todayButton:r.props.todayButton,weekLabel:r.props.weekLabel,outsideClickIgnoreClass:ar,fixedHeight:r.props.fixedHeight,monthsShown:r.props.monthsShown,monthSelectedIn:r.state.monthSelectedIn,onDropdownFocus:r.handleDropdownFocus,onMonthChange:r.props.onMonthChange,onYearChange:r.props.onYearChange,dayClassName:r.props.dayClassName,weekDayClassName:r.props.weekDayClassName,monthClassName:r.props.monthClassName,timeClassName:r.props.timeClassName,showDateSelect:r.props.showDateSelect,showTimeSelect:r.props.showTimeSelect,showTimeSelectOnly:r.props.showTimeSelectOnly,onTimeChange:r.handleTimeChange,timeFormat:r.props.timeFormat,timeIntervals:r.props.timeIntervals,minTime:r.props.minTime,maxTime:r.props.maxTime,excludeTimes:r.props.excludeTimes,filterTime:r.props.filterTime,timeCaption:r.props.timeCaption,className:r.props.calendarClassName,container:r.props.calendarContainer,yearItemNumber:r.props.yearItemNumber,yearDropdownItemNumber:r.props.yearDropdownItemNumber,previousMonthAriaLabel:r.props.previousMonthAriaLabel,previousMonthButtonLabel:r.props.previousMonthButtonLabel,nextMonthAriaLabel:r.props.nextMonthAriaLabel,nextMonthButtonLabel:r.props.nextMonthButtonLabel,previousYearAriaLabel:r.props.previousYearAriaLabel,previousYearButtonLabel:r.props.previousYearButtonLabel,nextYearAriaLabel:r.props.nextYearAriaLabel,nextYearButtonLabel:r.props.nextYearButtonLabel,timeInputLabel:r.props.timeInputLabel,disabledKeyboardNavigation:r.props.disabledKeyboardNavigation,renderCustomHeader:r.props.renderCustomHeader,popperProps:r.props.popperProps,renderDayContents:r.props.renderDayContents,renderMonthContent:r.props.renderMonthContent,renderQuarterContent:r.props.renderQuarterContent,renderYearContent:r.props.renderYearContent,onDayMouseEnter:r.props.onDayMouseEnter,onMonthMouseLeave:r.props.onMonthMouseLeave,onYearMouseEnter:r.props.onYearMouseEnter,onYearMouseLeave:r.props.onYearMouseLeave,selectsDisabledDaysInRange:r.props.selectsDisabledDaysInRange,showTimeInput:r.props.showTimeInput,showMonthYearPicker:r.props.showMonthYearPicker,showFullMonthYearPicker:r.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:r.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:r.props.showFourColumnMonthYearPicker,showYearPicker:r.props.showYearPicker,showQuarterYearPicker:r.props.showQuarterYearPicker,showPopperArrow:r.props.showPopperArrow,excludeScrollbar:r.props.excludeScrollbar,handleOnKeyDown:r.props.onKeyDown,handleOnDayKeyDown:r.onDayKeyDown,isInputFocused:r.state.focused,customTimeInput:r.props.customTimeInput,setPreSelection:r.setPreSelection},r.props.children):null})),Ct(Zt(r),"renderAriaLiveRegion",(function(){var e,t=r.props,n=t.dateFormat,a=t.locale,o=r.props.showTimeInput||r.props.showTimeSelect?"PPPPp":"PPPP";return e=r.props.selectsRange?"Selected start date: ".concat(jt(r.props.startDate,{dateFormat:o,locale:a}),". ").concat(r.props.endDate?"End date: "+jt(r.props.endDate,{dateFormat:o,locale:a}):""):r.props.showTimeSelectOnly?"Selected time: ".concat(jt(r.props.selected,{dateFormat:n,locale:a})):r.props.showYearPicker?"Selected year: ".concat(jt(r.props.selected,{dateFormat:"yyyy",locale:a})):r.props.showMonthYearPicker?"Selected month: ".concat(jt(r.props.selected,{dateFormat:"MMMM yyyy",locale:a})):r.props.showQuarterYearPicker?"Selected quarter: ".concat(jt(r.props.selected,{dateFormat:"yyyy, QQQ",locale:a})):"Selected date: ".concat(jt(r.props.selected,{dateFormat:o,locale:a})),de.default.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},e)})),Ct(Zt(r),"renderDateInput",(function(){var e,t=pe.default(r.props.className,Ct({},ar,r.state.open)),n=r.props.customInput||de.default.createElement("input",{type:"text"}),a=r.props.customInputRef||"ref",o="string"==typeof r.props.value?r.props.value:"string"==typeof r.state.inputValue?r.state.inputValue:r.props.selectsRange?function(e,t,n){if(!e)return"";var r=jt(e,n),a=t?jt(t,n):"";return"".concat(r," - ").concat(a)}(r.props.startDate,r.props.endDate,r.props):jt(r.props.selected,r.props);return de.default.cloneElement(n,(Ct(e={},a,(function(e){r.input=e})),Ct(e,"value",o),Ct(e,"onBlur",r.handleBlur),Ct(e,"onChange",r.handleChange),Ct(e,"onClick",r.onInputClick),Ct(e,"onFocus",r.handleFocus),Ct(e,"onKeyDown",r.onInputKeyDown),Ct(e,"id",r.props.id),Ct(e,"name",r.props.name),Ct(e,"form",r.props.form),Ct(e,"autoFocus",r.props.autoFocus),Ct(e,"placeholder",r.props.placeholderText),Ct(e,"disabled",r.props.disabled),Ct(e,"autoComplete",r.props.autoComplete),Ct(e,"className",pe.default(n.props.className,t)),Ct(e,"title",r.props.title),Ct(e,"readOnly",r.props.readOnly),Ct(e,"required",r.props.required),Ct(e,"tabIndex",r.props.tabIndex),Ct(e,"aria-describedby",r.props.ariaDescribedBy),Ct(e,"aria-invalid",r.props.ariaInvalid),Ct(e,"aria-labelledby",r.props.ariaLabelledBy),Ct(e,"aria-required",r.props.ariaRequired),e))})),Ct(Zt(r),"renderClearButton",(function(){var e=r.props,t=e.isClearable,n=e.selected,a=e.startDate,o=e.endDate,i=e.clearButtonTitle,s=e.clearButtonClassName,u=void 0===s?"":s,c=e.ariaLabelClose,l=void 0===c?"Close":c;return!t||null==n&&null==a&&null==o?null:de.default.createElement("button",{type:"button",className:"react-datepicker__close-icon ".concat(u).trim(),"aria-label":l,onClick:r.onClearClick,title:i,tabIndex:-1})})),r.state=r.calcInitialState(),r}return kt(n,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.onScroll,!0)}},{key:"componentDidUpdate",value:function(e,t){var n,r;e.inline&&(n=e.selected,r=this.props.selected,n&&r?Ye.default(n)!==Ye.default(r)||Ie.default(n)!==Ie.default(r):n!==r)&&this.setPreSelection(this.props.selected),void 0!==this.state.monthSelectedIn&&e.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),e.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Cn(this.props.highlightDates)}),t.focused||$t(e.selected,this.props.selected)||this.setState({inputValue:null}),t.open!==this.state.open&&(!1===t.open&&!0===this.state.open&&this.props.onCalendarOpen(),!0===t.open&&!1===this.state.open&&this.props.onCalendarClose())}},{key:"componentWillUnmount",value:function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0)}},{key:"renderInputContainer",value:function(){var e=this.props.showIcon;return de.default.createElement("div",{className:"react-datepicker__input-container".concat(e?" react-datepicker__view-calendar-icon":"")},e&&de.default.createElement("svg",{className:"react-datepicker__calendar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},de.default.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"})),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())}},{key:"render",value:function(){var e=this.renderCalendar();if(this.props.inline)return e;if(this.props.withPortal){var t=this.state.open?de.default.createElement(nr,{enableTabLoop:this.props.enableTabLoop},de.default.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},e)):null;return this.state.open&&this.props.portalId&&(t=de.default.createElement(er,{portalId:this.props.portalId,portalHost:this.props.portalHost},t)),de.default.createElement("div",null,this.renderInputContainer(),t)}return de.default.createElement(rr,{className:this.props.popperClassName,wrapperClassName:this.props.wrapperClassName,hidePopper:!this.isCalendarOpen(),portalId:this.props.portalId,portalHost:this.props.portalHost,popperModifiers:this.props.popperModifiers,targetComponent:this.renderInputContainer(),popperContainer:this.props.popperContainer,popperComponent:e,popperPlacement:this.props.popperPlacement,popperProps:this.props.popperProps,popperOnKeyDown:this.onPopperKeyDown,enableTabLoop:this.props.enableTabLoop})}}],[{key:"defaultProps",get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",onChange:function(){},disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onInputClick:function(){},onSelect:function(){},onClickOutside:function(){},onMonthChange:function(){},onCalendarOpen:function(){},onCalendarClose:function(){},preventOpenOnFocus:!1,onYearChange:function(){},onInputError:function(){},monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,strictParsing:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:It,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0}}}]),n}(de.default.Component),ur="input",cr="navigate";e.CalendarContainer=Gn,e.default=sr,e.getDefaultLocale=en,e.registerLocale=function(e,t){var n="undefined"!=typeof window?window:globalThis;n.__localeData__||(n.__localeData__={}),n.__localeData__[e]=t},e.setDefaultLocale=function(e){("undefined"!=typeof window?window:globalThis).__localeId__=e},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(67294),n(45697),n(94184),n(71381),n(12274),n(49546),n(58545),n(78343),n(77349),n(63500),n(11640),n(8791),n(21593),n(7069),n(77982),n(54559),n(58793),n(59319),n(77881),n(39159),n(85817),n(20466),n(55855),n(9827),n(78966),n(56605),n(95570),n(28789),n(39880),n(4543),n(37042),n(62225),n(11503),n(44749),n(37950),n(99890),n(92300),n(84129),n(91857),n(69119),n(584),n(43703),n(94431),n(38148),n(83894),n(67090),n(4135),n(10876),n(96843),n(3151),n(49160),n(60792),n(86117),n(42699),n(313),n(24257),n(19013),n(76417),n(23855),n(58949),n(73935),n(12053),n(92311))},69590:function(e){var t="undefined"!==typeof Element,n="function"===typeof Map,r="function"===typeof Set,a="function"===typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){if(e.constructor!==i.constructor)return!1;var s,u,c,l;if(Array.isArray(e)){if((s=e.length)!=i.length)return!1;for(u=s;0!==u--;)if(!o(e[u],i[u]))return!1;return!0}if(n&&e instanceof Map&&i instanceof Map){if(e.size!==i.size)return!1;for(l=e.entries();!(u=l.next()).done;)if(!i.has(u.value[0]))return!1;for(l=e.entries();!(u=l.next()).done;)if(!o(u.value[1],i.get(u.value[0])))return!1;return!0}if(r&&e instanceof Set&&i instanceof Set){if(e.size!==i.size)return!1;for(l=e.entries();!(u=l.next()).done;)if(!i.has(u.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(i)){if((s=e.length)!=i.length)return!1;for(u=s;0!==u--;)if(e[u]!==i[u])return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===i.toString();if((s=(c=Object.keys(e)).length)!==Object.keys(i).length)return!1;for(u=s;0!==u--;)if(!Object.prototype.hasOwnProperty.call(i,c[u]))return!1;if(t&&e instanceof Element)return!1;for(u=s;0!==u--;)if(("_owner"!==c[u]&&"__v"!==c[u]&&"__o"!==c[u]||!e.$$typeof)&&!o(e[c[u]],i[c[u]]))return!1;return!0}return e!==e&&i!==i}e.exports=function(e,t){try{return o(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},58949:function(e,t,n){"use strict";n.r(t),n.d(t,{IGNORE_CLASS_NAME:function(){return h}});var r=n(67294),a=n(73935);function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t,n){return e===t||(e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n))}var u,c,l=(void 0===u&&(u=0),function(){return++u}),d={},p={},f=["touchstart","touchmove"],h="ignore-react-onclickoutside";function v(e,t){var n={};return-1!==f.indexOf(t)&&c&&(n.passive=!e.props.preventDefault),n}t.default=function(e,t){var n,u,f=e.displayName||e.name||"Component";return u=n=function(n){var u,h;function m(e){var r;return(r=n.call(this,e)||this).__outsideClickHandler=function(e){if("function"!==typeof r.__clickOutsideHandlerProp){var t=r.getInstance();if("function"!==typeof t.props.handleClickOutside){if("function"!==typeof t.handleClickOutside)throw new Error("WrappedComponent: "+f+" lacks a handleClickOutside(event) function for processing outside click events.");t.handleClickOutside(e)}else t.props.handleClickOutside(e)}else r.__clickOutsideHandlerProp(e)},r.__getComponentNode=function(){var e=r.getInstance();return t&&"function"===typeof t.setClickOutsideRef?t.setClickOutsideRef()(e):"function"===typeof e.setClickOutsideRef?e.setClickOutsideRef():(0,a.findDOMNode)(e)},r.enableOnClickOutside=function(){if("undefined"!==typeof document&&!p[r._uid]){"undefined"===typeof c&&(c=function(){if("undefined"!==typeof window&&"function"===typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),e}}()),p[r._uid]=!0;var e=r.props.eventTypes;e.forEach||(e=[e]),d[r._uid]=function(e){var t;null!==r.componentNode&&(r.props.preventDefault&&e.preventDefault(),r.props.stopPropagation&&e.stopPropagation(),r.props.excludeScrollbar&&(t=e,document.documentElement.clientWidth<=t.clientX||document.documentElement.clientHeight<=t.clientY)||function(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&s(e,t,n))return!0;e=e.parentNode||e.host}return e}(e.composed&&e.composedPath&&e.composedPath().shift()||e.target,r.componentNode,r.props.outsideClickIgnoreClass)===document&&r.__outsideClickHandler(e))},e.forEach((function(e){document.addEventListener(e,d[r._uid],v(i(r),e))}))}},r.disableOnClickOutside=function(){delete p[r._uid];var e=d[r._uid];if(e&&"undefined"!==typeof document){var t=r.props.eventTypes;t.forEach||(t=[t]),t.forEach((function(t){return document.removeEventListener(t,e,v(i(r),t))})),delete d[r._uid]}},r.getRef=function(e){return r.instanceRef=e},r._uid=l(),r}h=n,(u=m).prototype=Object.create(h.prototype),u.prototype.constructor=u,o(u,h);var g=m.prototype;return g.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var t=this.instanceRef;return t.getInstance?t.getInstance():t},g.componentDidMount=function(){if("undefined"!==typeof document&&document.createElement){var e=this.getInstance();if(t&&"function"===typeof t.handleClickOutside&&(this.__clickOutsideHandlerProp=t.handleClickOutside(e),"function"!==typeof this.__clickOutsideHandlerProp))throw new Error("WrappedComponent: "+f+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),this.props.disableOnClickOutside||this.enableOnClickOutside()}},g.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},g.componentWillUnmount=function(){this.disableOnClickOutside()},g.render=function(){var t=this.props;t.excludeScrollbar;var n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(t,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,(0,r.createElement)(e,n)},m}(r.Component),n.displayName="OnClickOutside("+f+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:h,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},u}},12053:function(e,t,n){"use strict";n.r(t),n.d(t,{Manager:function(){return i},Popper:function(){return Re},Reference:function(){return Ae},usePopper:function(){return Ne}});var r=n(67294),a=r.createContext(),o=r.createContext();function i(e){var t=e.children,n=r.useState(null),i=n[0],s=n[1],u=r.useRef(!1);r.useEffect((function(){return function(){u.current=!0}}),[]);var c=r.useCallback((function(e){u.current||s(e)}),[]);return r.createElement(a.Provider,{value:i},r.createElement(o.Provider,{value:c},t))}var s=function(e){return Array.isArray(e)?e[0]:e},u=function(e){if("function"===typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&w(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&w(r.height)/e.offsetHeight||1);var i=(h(e)?f(e):window).visualViewport,s=!D()&&n,u=(r.left+(s&&i?i.offsetLeft:0))/a,c=(r.top+(s&&i?i.offsetTop:0))/o,l=r.width/a,d=r.height/o;return{width:l,height:d,top:c,right:u+l,bottom:c+d,left:u,x:u,y:c}}function C(e){var t=f(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function S(e){return e?(e.nodeName||"").toLowerCase():null}function M(e){return((h(e)?e.ownerDocument:e.document)||window.document).documentElement}function x(e){return k(M(e)).left+C(e).scrollLeft}function T(e){return f(e).getComputedStyle(e)}function Z(e){var t=T(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+r)}function _(e,t,n){void 0===n&&(n=!1);var r=v(t),a=v(t)&&function(e){var t=e.getBoundingClientRect(),n=w(t.width)/e.offsetWidth||1,r=w(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),o=M(t),i=k(e,a,n),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==S(t)||Z(o))&&(s=function(e){return e!==f(e)&&v(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:C(e);var t}(t)),v(t)?((u=k(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):o&&(u.x=x(o))),{x:i.left+s.scrollLeft-u.x,y:i.top+s.scrollTop-u.y,width:i.width,height:i.height}}function E(e){var t=k(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function N(e){return"html"===S(e)?e:e.assignedSlot||e.parentNode||(m(e)?e.host:null)||M(e)}function P(e){return["html","body","#document"].indexOf(S(e))>=0?e.ownerDocument.body:v(e)&&Z(e)?e:P(N(e))}function O(e,t){var n;void 0===t&&(t=[]);var r=P(e),a=r===(null==(n=e.ownerDocument)?void 0:n.body),o=f(r),i=a?[o].concat(o.visualViewport||[],Z(r)?r:[]):r,s=t.concat(i);return a?s:s.concat(O(N(i)))}function Y(e){return["table","td","th"].indexOf(S(e))>=0}function R(e){return v(e)&&"fixed"!==T(e).position?e.offsetParent:null}function I(e){for(var t=f(e),n=R(e);n&&Y(n)&&"static"===T(n).position;)n=R(n);return n&&("html"===S(n)||"body"===S(n)&&"static"===T(n).position)?t:n||function(e){var t=/firefox/i.test(b());if(/Trident/i.test(b())&&v(e)&&"fixed"===T(e).position)return null;var n=N(e);for(m(n)&&(n=n.host);v(n)&&["html","body"].indexOf(S(n))<0;){var r=T(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var L="top",A="bottom",F="right",U="left",j="auto",H=[L,A,F,U],W="start",B="end",q="clippingParents",Q="viewport",K="popper",V="reference",z=H.reduce((function(e,t){return e.concat([t+"-"+W,t+"-"+B])}),[]),X=[].concat(H,[j]).reduce((function(e,t){return e.concat([t,t+"-"+W,t+"-"+B])}),[]),G=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function $(e){var t=new Map,n=new Set,r=[];function a(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&a(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||a(e)})),r}function J(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var ee={placement:"bottom",modifiers:[],strategy:"absolute"};function te(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function se(e){var t,n=e.reference,r=e.element,a=e.placement,o=a?ae(a):null,i=a?oe(a):null,s=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(o){case L:t={x:s,y:n.y-r.height};break;case A:t={x:s,y:n.y+n.height};break;case F:t={x:n.x+n.width,y:u};break;case U:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var c=o?ie(o):null;if(null!=c){var l="y"===c?"height":"width";switch(i){case W:t[c]=t[c]-(n[l]/2-r[l]/2);break;case B:t[c]=t[c]+(n[l]/2-r[l]/2)}}return t}var ue={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ce(e){var t,n=e.popper,r=e.popperRect,a=e.placement,o=e.variation,i=e.offsets,s=e.position,u=e.gpuAcceleration,c=e.adaptive,l=e.roundOffsets,d=e.isFixed,p=i.x,h=void 0===p?0:p,v=i.y,m=void 0===v?0:v,g="function"===typeof l?l({x:h,y:m}):{x:h,y:m};h=g.x,m=g.y;var y=i.hasOwnProperty("x"),b=i.hasOwnProperty("y"),D=U,k=L,C=window;if(c){var S=I(n),x="clientHeight",Z="clientWidth";if(S===f(n)&&"static"!==T(S=M(n)).position&&"absolute"===s&&(x="scrollHeight",Z="scrollWidth"),a===L||(a===U||a===F)&&o===B)k=A,m-=(d&&S===C&&C.visualViewport?C.visualViewport.height:S[x])-r.height,m*=u?1:-1;if(a===U||(a===L||a===A)&&o===B)D=F,h-=(d&&S===C&&C.visualViewport?C.visualViewport.width:S[Z])-r.width,h*=u?1:-1}var _,E=Object.assign({position:s},c&&ue),N=!0===l?function(e,t){var n=e.x,r=e.y,a=t.devicePixelRatio||1;return{x:w(n*a)/a||0,y:w(r*a)/a||0}}({x:h,y:m},f(n)):{x:h,y:m};return h=N.x,m=N.y,u?Object.assign({},E,((_={})[k]=b?"0":"",_[D]=y?"0":"",_.transform=(C.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",_)):Object.assign({},E,((t={})[k]=b?m+"px":"",t[D]=y?h+"px":"",t.transform="",t))}var le={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,a=n.offset,o=void 0===a?[0,0]:a,i=X.reduce((function(e,n){return e[n]=function(e,t,n){var r=ae(e),a=[U,L].indexOf(r)>=0?-1:1,o="function"===typeof n?n(Object.assign({},t,{placement:e})):n,i=o[0],s=o[1];return i=i||0,s=(s||0)*a,[U,F].indexOf(r)>=0?{x:s,y:i}:{x:i,y:s}}(n,t.rects,o),e}),{}),s=i[t.placement],u=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=i}},de={left:"right",right:"left",bottom:"top",top:"bottom"};function pe(e){return e.replace(/left|right|bottom|top/g,(function(e){return de[e]}))}var fe={start:"end",end:"start"};function he(e){return e.replace(/start|end/g,(function(e){return fe[e]}))}function ve(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&m(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function me(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ge(e,t,n){return t===Q?me(function(e,t){var n=f(e),r=M(e),a=n.visualViewport,o=r.clientWidth,i=r.clientHeight,s=0,u=0;if(a){o=a.width,i=a.height;var c=D();(c||!c&&"fixed"===t)&&(s=a.offsetLeft,u=a.offsetTop)}return{width:o,height:i,x:s+x(e),y:u}}(e,n)):h(t)?function(e,t){var n=k(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):me(function(e){var t,n=M(e),r=C(e),a=null==(t=e.ownerDocument)?void 0:t.body,o=g(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),i=g(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),s=-r.scrollLeft+x(e),u=-r.scrollTop;return"rtl"===T(a||n).direction&&(s+=g(n.clientWidth,a?a.clientWidth:0)-o),{width:o,height:i,x:s,y:u}}(M(e)))}function ye(e,t,n,r){var a="clippingParents"===t?function(e){var t=O(N(e)),n=["absolute","fixed"].indexOf(T(e).position)>=0&&v(e)?I(e):e;return h(n)?t.filter((function(e){return h(e)&&ve(e,n)&&"body"!==S(e)})):[]}(e):[].concat(t),o=[].concat(a,[n]),i=o[0],s=o.reduce((function(t,n){var a=ge(e,n,r);return t.top=g(a.top,t.top),t.right=y(a.right,t.right),t.bottom=y(a.bottom,t.bottom),t.left=g(a.left,t.left),t}),ge(e,i,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function we(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function be(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function De(e,t){void 0===t&&(t={});var n=t,r=n.placement,a=void 0===r?e.placement:r,o=n.strategy,i=void 0===o?e.strategy:o,s=n.boundary,u=void 0===s?q:s,c=n.rootBoundary,l=void 0===c?Q:c,d=n.elementContext,p=void 0===d?K:d,f=n.altBoundary,v=void 0!==f&&f,m=n.padding,g=void 0===m?0:m,y=we("number"!==typeof g?g:be(g,H)),w=p===K?V:K,b=e.rects.popper,D=e.elements[v?w:p],C=ye(h(D)?D:D.contextElement||M(e.elements.popper),u,l,i),S=k(e.elements.reference),x=se({reference:S,element:b,strategy:"absolute",placement:a}),T=me(Object.assign({},b,x)),Z=p===K?T:S,_={top:C.top-Z.top+y.top,bottom:Z.bottom-C.bottom+y.bottom,left:C.left-Z.left+y.left,right:Z.right-C.right+y.right},E=e.modifiersData.offset;if(p===K&&E){var N=E[a];Object.keys(_).forEach((function(e){var t=[F,A].indexOf(e)>=0?1:-1,n=[L,A].indexOf(e)>=0?"y":"x";_[e]+=N[n]*t}))}return _}function ke(e,t,n){return g(e,y(t,n))}var Ce={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,a=n.mainAxis,o=void 0===a||a,i=n.altAxis,s=void 0!==i&&i,u=n.boundary,c=n.rootBoundary,l=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,h=n.tetherOffset,v=void 0===h?0:h,m=De(t,{boundary:u,rootBoundary:c,padding:d,altBoundary:l}),w=ae(t.placement),b=oe(t.placement),D=!b,k=ie(w),C="x"===k?"y":"x",S=t.modifiersData.popperOffsets,M=t.rects.reference,x=t.rects.popper,T="function"===typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,Z="number"===typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(S){if(o){var P,O="y"===k?L:U,Y="y"===k?A:F,R="y"===k?"height":"width",j=S[k],H=j+m[O],B=j-m[Y],q=f?-x[R]/2:0,Q=b===W?M[R]:x[R],K=b===W?-x[R]:-M[R],V=t.elements.arrow,z=f&&V?E(V):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},G=X[O],$=X[Y],J=ke(0,M[R],z[R]),ee=D?M[R]/2-q-J-G-Z.mainAxis:Q-J-G-Z.mainAxis,te=D?-M[R]/2+q+J+$+Z.mainAxis:K+J+$+Z.mainAxis,ne=t.elements.arrow&&I(t.elements.arrow),re=ne?"y"===k?ne.clientTop||0:ne.clientLeft||0:0,se=null!=(P=null==_?void 0:_[k])?P:0,ue=j+te-se,ce=ke(f?y(H,j+ee-se-re):H,j,f?g(B,ue):B);S[k]=ce,N[k]=ce-j}if(s){var le,de="x"===k?L:U,pe="x"===k?A:F,fe=S[C],he="y"===C?"height":"width",ve=fe+m[de],me=fe-m[pe],ge=-1!==[L,U].indexOf(w),ye=null!=(le=null==_?void 0:_[C])?le:0,we=ge?ve:fe-M[he]-x[he]-ye+Z.altAxis,be=ge?fe+M[he]+x[he]-ye-Z.altAxis:me,Ce=f&&ge?function(e,t,n){var r=ke(e,t,n);return r>n?n:r}(we,fe,be):ke(f?we:ve,fe,f?be:me);S[C]=Ce,N[C]=Ce-fe}t.modifiersData[r]=N}},requiresIfExists:["offset"]};var Se={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,a=e.options,o=n.elements.arrow,i=n.modifiersData.popperOffsets,s=ae(n.placement),u=ie(s),c=[U,F].indexOf(s)>=0?"height":"width";if(o&&i){var l=function(e,t){return we("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:be(e,H))}(a.padding,n),d=E(o),p="y"===u?L:U,f="y"===u?A:F,h=n.rects.reference[c]+n.rects.reference[u]-i[u]-n.rects.popper[c],v=i[u]-n.rects.reference[u],m=I(o),g=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,y=h/2-v/2,w=l[p],b=g-d[c]-l[f],D=g/2-d[c]/2+y,k=ke(w,D,b),C=u;n.modifiersData[r]=((t={})[C]=k,t.centerOffset=k-D,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&ve(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Me(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function xe(e){return[L,F,A,U].some((function(t){return e[t]>=0}))}var Te=ne({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,a=r.scroll,o=void 0===a||a,i=r.resize,s=void 0===i||i,u=f(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach((function(e){e.addEventListener("scroll",n.update,re)})),s&&u.addEventListener("resize",n.update,re),function(){o&&c.forEach((function(e){e.removeEventListener("scroll",n.update,re)})),s&&u.removeEventListener("resize",n.update,re)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=se({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,a=void 0===r||r,o=n.adaptive,i=void 0===o||o,s=n.roundOffsets,u=void 0===s||s,c={placement:ae(t.placement),variation:oe(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ce(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ce(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},a=t.elements[e];v(a)&&S(a)&&(Object.assign(a.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?a.removeAttribute(e):a.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],a=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});v(r)&&S(r)&&(Object.assign(r.style,o),Object.keys(a).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},le,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var a=n.mainAxis,o=void 0===a||a,i=n.altAxis,s=void 0===i||i,u=n.fallbackPlacements,c=n.padding,l=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=void 0===f||f,v=n.allowedAutoPlacements,m=t.options.placement,g=ae(m),y=u||(g===m||!h?[pe(m)]:function(e){if(ae(e)===j)return[];var t=pe(e);return[he(e),t,he(t)]}(m)),w=[m].concat(y).reduce((function(e,n){return e.concat(ae(n)===j?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,a=n.boundary,o=n.rootBoundary,i=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,c=void 0===u?X:u,l=oe(r),d=l?s?z:z.filter((function(e){return oe(e)===l})):H,p=d.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=d);var f=p.reduce((function(t,n){return t[n]=De(e,{placement:n,boundary:a,rootBoundary:o,padding:i})[ae(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:l,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:v}):n)}),[]),b=t.rects.reference,D=t.rects.popper,k=new Map,C=!0,S=w[0],M=0;M=0,E=_?"width":"height",N=De(t,{placement:x,boundary:l,rootBoundary:d,altBoundary:p,padding:c}),P=_?Z?F:U:Z?A:L;b[E]>D[E]&&(P=pe(P));var O=pe(P),Y=[];if(o&&Y.push(N[T]<=0),s&&Y.push(N[P]<=0,N[O]<=0),Y.every((function(e){return e}))){S=x,C=!1;break}k.set(x,Y)}if(C)for(var R=function(e){var t=w.find((function(t){var n=k.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return S=t,"break"},I=h?3:1;I>0;I--){if("break"===R(I))break}t.placement!==S&&(t.modifiersData[r]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},Ce,Se,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,a=t.rects.popper,o=t.modifiersData.preventOverflow,i=De(t,{elementContext:"reference"}),s=De(t,{altBoundary:!0}),u=Me(i,r),c=Me(s,a,o),l=xe(u),d=xe(c);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":d})}}]}),Ze=n(69590),_e=n.n(Ze),Ee=[],Ne=function(e,t,n){void 0===n&&(n={});var a=r.useRef(null),o={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||Ee},i=r.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=i[0],u=i[1],c=r.useMemo((function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(e){var t=e.state,n=Object.keys(t.elements);p.flushSync((function(){u({styles:l(n.map((function(e){return[e,t.styles[e]||{}]}))),attributes:l(n.map((function(e){return[e,t.attributes[e]]})))})}))},requires:["computeStyles"]}}),[]),f=r.useMemo((function(){var e={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[c,{name:"applyStyles",enabled:!1}])};return _e()(a.current,e)?a.current||e:(a.current=e,e)}),[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,c]),h=r.useRef();return d((function(){h.current&&h.current.setOptions(f)}),[f]),d((function(){if(null!=e&&null!=t){var r=(n.createPopper||Te)(e,t,f);return h.current=r,function(){r.destroy(),h.current=null}}}),[e,t,n.createPopper]),{state:h.current?h.current.state:null,styles:s.styles,attributes:s.attributes,update:h.current?h.current.update:null,forceUpdate:h.current?h.current.forceUpdate:null}},Pe=function(){},Oe=function(){return Promise.resolve(null)},Ye=[];function Re(e){var t=e.placement,n=void 0===t?"bottom":t,o=e.strategy,i=void 0===o?"absolute":o,u=e.modifiers,l=void 0===u?Ye:u,d=e.referenceElement,p=e.onFirstUpdate,f=e.innerRef,h=e.children,v=r.useContext(a),m=r.useState(null),g=m[0],y=m[1],w=r.useState(null),b=w[0],D=w[1];r.useEffect((function(){c(f,g)}),[f,g]);var k=r.useMemo((function(){return{placement:n,strategy:i,onFirstUpdate:p,modifiers:[].concat(l,[{name:"arrow",enabled:null!=b,options:{element:b}}])}}),[n,i,p,l,b]),C=Ne(d||v,g,k),S=C.state,M=C.styles,x=C.forceUpdate,T=C.update,Z=r.useMemo((function(){return{ref:y,style:M.popper,placement:S?S.placement:n,hasPopperEscaped:S&&S.modifiersData.hide?S.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:S&&S.modifiersData.hide?S.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:M.arrow,ref:D},forceUpdate:x||Pe,update:T||Oe}}),[y,D,n,S,M,T,x]);return s(h)(Z)}var Ie=n(42473),Le=n.n(Ie);function Ae(e){var t=e.children,n=e.innerRef,a=r.useContext(o),i=r.useCallback((function(e){c(n,e),u(a,e)}),[n,a]);return r.useEffect((function(){return function(){return c(n,null)}}),[]),r.useEffect((function(){Le()(Boolean(a),"`Reference` should not be used outside of a `Manager` component.")}),[a]),s(t)({ref:i})}},62554:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(67294),a=n(34513);function o(e,t,n){void 0===t&&(t=0),void 0===n&&(n=[]);var o=(0,a.Z)(e,t),i=o[0],s=o[1],u=o[2];return(0,r.useEffect)(u,n),[i,s]}},18127:function(e,t,n){"use strict";var r=n(67294);t.Z=function(e){(0,r.useEffect)(e,[])}},43337:function(e,t,n){"use strict";var r=n(67294);t.Z=function(e,t){var n=(0,r.useRef)((function(){}));(0,r.useEffect)((function(){n.current=e})),(0,r.useEffect)((function(){if(null!==t){var e=setInterval((function(){return n.current()}),t||0);return function(){return clearInterval(e)}}}),[t])}},34513:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(67294);function a(e,t){void 0===t&&(t=0);var n=(0,r.useRef)(!1),a=(0,r.useRef)(),o=(0,r.useRef)(e),i=(0,r.useCallback)((function(){return n.current}),[]),s=(0,r.useCallback)((function(){n.current=!1,a.current&&clearTimeout(a.current),a.current=setTimeout((function(){n.current=!0,o.current()}),t)}),[t]),u=(0,r.useCallback)((function(){n.current=null,a.current&&clearTimeout(a.current)}),[]);return(0,r.useEffect)((function(){o.current=e}),[e]),(0,r.useEffect)((function(){return s(),u}),[t]),[i,u,s]}},89211:function(e,t,n){"use strict";var r=n(67294),a=function(e,t){return"boolean"===typeof t?t:!e};t.Z=function(e){return(0,r.useReducer)(a,e)}},77823:function(e,t,n){"use strict";var r=n(67294),a=n(18127);t.Z=function(e){var t=(0,r.useRef)(e);t.current=e,(0,a.Z)((function(){return function(){return t.current()}}))}},42473:function(e){"use strict";var t=function(){};e.exports=t},58206:function(e,t,n){"use strict";function r(e,{target:t=document.body}={}){if("string"!==typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const n=document.createElement("textarea"),r=document.activeElement;n.value=e,n.setAttribute("readonly",""),n.style.contain="strict",n.style.position="absolute",n.style.left="-9999px",n.style.fontSize="12pt";const a=document.getSelection(),o=a.rangeCount>0&&a.getRangeAt(0);t.append(n),n.select(),n.selectionStart=0,n.selectionEnd=e.length;let i=!1;try{i=document.execCommand("copy")}catch{}return n.remove(),o&&(a.removeAllRanges(),a.addRange(o)),r&&r.focus(),i}n.d(t,{Z:function(){return r}})}}]); \ No newline at end of file +/*! For license information please see 370.2d8fa0858d94bd842b7c.chunk.js.LICENSE.txt */ +!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="aafd5d0f-68c8-4cbb-85b4-b5af938d1c43",e._sentryDebugIdIdentifier="sentry-dbid-aafd5d0f-68c8-4cbb-85b4-b5af938d1c43")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"bc401569f0a5aac35c96315fba57182a8ad450f2"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[370],{94184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;ti&&(d=c(d,0,i)),e?p+d:d+p)}};e.exports={start:d(!1),end:d(!0)}},38415:function(e,t,n){"use strict";var r=n(19303),a=n(41340),o=n(84488),i=RangeError;e.exports=function(e){var t=a(o(this)),n="",s=r(e);if(s<0||s==1/0)throw i("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(t+=t))1&s&&(n+=t);return n}},33161:function(e,t,n){n(82109)({target:"Number",stat:!0},{isInteger:n(55988)})},66528:function(e,t,n){"use strict";var r=n(82109),a=n(76650).end;r({target:"String",proto:!0,forced:n(54986)},{padEnd:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},83112:function(e,t,n){"use strict";var r=n(82109),a=n(76650).start;r({target:"String",proto:!0,forced:n(54986)},{padStart:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},41817:function(e,t,n){"use strict";var r=n(82109),a=n(19781),o=n(17854),i=n(1702),s=n(92597),u=n(60614),c=n(47976),l=n(41340),d=n(47045),p=n(99920),f=o.Symbol,h=f&&f.prototype;if(a&&u(f)&&(!("description"in h)||void 0!==f().description)){var v={},m=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=c(h,this)?new f(e):void 0===e?f():f(e);return""===e&&(v[t]=!0),t};p(m,f),m.prototype=h,h.constructor=m;var g="Symbol(test)"==String(f("test")),y=i(h.valueOf),w=i(h.toString),b=/^Symbol\((.*)\)[^)]+$/,D=i("".replace),k=i("".slice);d(h,"description",{configurable:!0,get:function(){var e=y(this);if(s(v,e))return"";var t=w(e),n=g?k(t,7,-1):D(t,b,"$1");return""===n?void 0:n}}),r({global:!0,constructor:!0,forced:!0},{Symbol:m})}},52149:function(e,t,n){"use strict";function r(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}n.d(t,{Z:function(){return r}})},8958:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},a=function(e,t,n){var a,o=r[e];return a="string"===typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!==n&&void 0!==n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function o(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var i={date:o({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:o({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:o({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},s={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},u=function(e,t,n,r){return s[e]};function c(e){return function(t,n){var r;if("formatting"===(null!==n&&void 0!==n&&n.context?String(n.context):"standalone")&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=null!==n&&void 0!==n&&n.width?String(n.width):a;r=e.formattingValues[o]||e.formattingValues[a]}else{var i=e.defaultWidth,s=null!==n&&void 0!==n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[i]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var l={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:c({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:c({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:c({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:c({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:c({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function d(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;var i,s=o[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(u)?function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(p.matchPattern);if(!n)return null;var r=n[0],a=e.match(p.parsePattern);if(!a)return null;var o=p.valueCallback?p.valueCallback(a[0]):a[0];return{value:o=t.valueCallback?t.valueCallback(o):o,rest:e.slice(r.length)}}),era:d({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:d({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:d({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:d({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:d({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},h={code:"en-US",formatDistance:a,formatLong:i,formatRelative:u,localize:l,match:f,options:{weekStartsOn:0,firstWeekContainsDate:1}}},84314:function(e,t,n){"use strict";n.d(t,{j:function(){return a}});var r={};function a(){return r}},97621:function(e,t){"use strict";var n=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},r=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},a={p:r,P:function(e,t){var a,o=e.match(/(P+)(p+)?/)||[],i=o[1],s=o[2];if(!s)return n(e,t);switch(i){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",n(i,t)).replace("{{time}}",r(s,t))}};t.Z=a},24262:function(e,t,n){"use strict";function r(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}n.d(t,{Z:function(){return r}})},49702:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(19013),a=n(66979),o=n(7032),i=n(13882);var s=6048e5;function u(e){(0,i.Z)(1,arguments);var t=(0,r.default)(e),n=(0,a.Z)(t).getTime()-function(e){(0,i.Z)(1,arguments);var t=(0,o.Z)(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),(0,a.Z)(n)}(t).getTime();return Math.round(n/s)+1}},7032:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(19013),a=n(13882),o=n(66979);function i(e){(0,a.Z)(1,arguments);var t=(0,r.default)(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var s=(0,o.Z)(i),u=new Date(0);u.setUTCFullYear(n,0,4),u.setUTCHours(0,0,0,0);var c=(0,o.Z)(u);return t.getTime()>=s.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}},23324:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(19013),a=n(59025),o=n(7651),i=n(13882),s=n(83946),u=n(84314);var c=6048e5;function l(e,t){(0,i.Z)(1,arguments);var n=(0,r.default)(e),l=(0,a.Z)(n,t).getTime()-function(e,t){var n,r,c,l,d,p,f,h;(0,i.Z)(1,arguments);var v=(0,u.j)(),m=(0,s.Z)(null!==(n=null!==(r=null!==(c=null!==(l=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==l?l:null===t||void 0===t||null===(d=t.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==c?c:v.firstWeekContainsDate)&&void 0!==r?r:null===(f=v.locale)||void 0===f||null===(h=f.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==n?n:1),g=(0,o.Z)(e,t),y=new Date(0);return y.setUTCFullYear(g,0,m),y.setUTCHours(0,0,0,0),(0,a.Z)(y,t)}(n,t).getTime();return Math.round(l/c)+1}},7651:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(19013),a=n(13882),o=n(59025),i=n(83946),s=n(84314);function u(e,t){var n,u,c,l,d,p,f,h;(0,a.Z)(1,arguments);var v=(0,r.default)(e),m=v.getUTCFullYear(),g=(0,s.j)(),y=(0,i.Z)(null!==(n=null!==(u=null!==(c=null!==(l=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==l?l:null===t||void 0===t||null===(d=t.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==c?c:g.firstWeekContainsDate)&&void 0!==u?u:null===(f=g.locale)||void 0===f||null===(h=f.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==n?n:1);if(!(y>=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var w=new Date(0);w.setUTCFullYear(m+1,0,y),w.setUTCHours(0,0,0,0);var b=(0,o.Z)(w,t),D=new Date(0);D.setUTCFullYear(m,0,y),D.setUTCHours(0,0,0,0);var k=(0,o.Z)(D,t);return v.getTime()>=b.getTime()?m+1:v.getTime()>=k.getTime()?m:m-1}},5267:function(e,t,n){"use strict";n.d(t,{Do:function(){return i},Iu:function(){return o},qp:function(){return s}});var r=["D","DD"],a=["YY","YYYY"];function o(e){return-1!==r.indexOf(e)}function i(e){return-1!==a.indexOf(e)}function s(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}},13882:function(e,t,n){"use strict";function r(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}n.d(t,{Z:function(){return r}})},93645:function(e,t,n){"use strict";n.d(t,{u:function(){return o}});var r={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},a="trunc";function o(e){return e?r[e]:r[a]}},66979:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(19013),a=n(13882);function o(e){(0,a.Z)(1,arguments);var t=(0,r.default)(e),n=t.getUTCDay(),o=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-o),t.setUTCHours(0,0,0,0),t}},59025:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(19013),a=n(13882),o=n(83946),i=n(84314);function s(e,t){var n,s,u,c,l,d,p,f;(0,a.Z)(1,arguments);var h=(0,i.j)(),v=(0,o.Z)(null!==(n=null!==(s=null!==(u=null!==(c=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==c?c:null===t||void 0===t||null===(l=t.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==u?u:h.weekStartsOn)&&void 0!==s?s:null===(p=h.locale)||void 0===p||null===(f=p.options)||void 0===f?void 0:f.weekStartsOn)&&void 0!==n?n:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,r.default)(e),g=m.getUTCDay(),y=(g=u.getDate()?u:(n.setFullYear(u.getFullYear(),u.getMonth(),s),n)}},8791:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(83946),a=n(11640),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=3*(0,r.Z)(t);return(0,a.default)(e,n)}},63500:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(83946),a=n(77349),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=7*(0,r.Z)(t);return(0,a.default)(e,n)}},21593:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(83946),a=n(11640),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=(0,r.Z)(t);return(0,a.default)(e,12*n)}},49474:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(19013),a=n(13882);function o(e,t){(0,a.Z)(2,arguments);var n=(0,r.default)(e),o=(0,r.default)(t),i=n.getTime()-o.getTime();return i<0?-1:i>0?1:i}},36948:function(e,t,n){"use strict";n.d(t,{qk:function(){return o},vh:function(){return a},yJ:function(){return r}});Math.pow(10,8);var r=6e4,a=36e5,o=1e3},92300:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return s}});var r=n(24262),a=n(69119),o=n(13882),i=864e5;function s(e,t){(0,o.Z)(2,arguments);var n=(0,a.default)(e),s=(0,a.default)(t),u=n.getTime()-(0,r.Z)(n),c=s.getTime()-(0,r.Z)(s);return Math.round((u-c)/i)}},84129:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e,t){(0,a.Z)(2,arguments);var n=(0,r.default)(e),o=(0,r.default)(t);return 12*(n.getFullYear()-o.getFullYear())+(n.getMonth()-o.getMonth())}},91857:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e,t){(0,a.Z)(2,arguments);var n=(0,r.default)(e),o=(0,r.default)(t);return n.getFullYear()-o.getFullYear()}},67803:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(19013),a=n(92300),o=n(13882);function i(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function s(e,t){(0,o.Z)(2,arguments);var n=(0,r.default)(e),s=(0,r.default)(t),u=i(n,s),c=Math.abs((0,a.default)(n,s));n.setDate(n.getDate()-u*c);var l=u*(c-Number(i(n,s)===-u));return 0===l?0:l}},76972:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(36948),a=n(59910),o=n(13882),i=n(93645);function s(e,t,n){(0,o.Z)(2,arguments);var s=(0,a.Z)(e,t)/r.vh;return(0,i.u)(null===n||void 0===n?void 0:n.roundingMethod)(s)}},59910:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(19013),a=n(13882);function o(e,t){return(0,a.Z)(2,arguments),(0,r.default)(e).getTime()-(0,r.default)(t).getTime()}},69690:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(36948),a=n(59910),o=n(13882),i=n(93645);function s(e,t,n){(0,o.Z)(2,arguments);var s=(0,a.Z)(e,t)/r.yJ;return(0,i.u)(null===n||void 0===n?void 0:n.roundingMethod)(s)}},50157:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(19013),a=n(84129),o=n(49474),i=n(13882),s=n(83894),u=n(4135);function c(e,t){(0,i.Z)(2,arguments);var n,c=(0,r.default)(e),l=(0,r.default)(t),d=(0,o.Z)(c,l),p=Math.abs((0,a.default)(c,l));if(p<1)n=0;else{1===c.getMonth()&&c.getDate()>27&&c.setDate(30),c.setMonth(c.getMonth()-d*p);var f=(0,o.Z)(c,l)===-d;(function(e){(0,i.Z)(1,arguments);var t=(0,r.default)(e);return(0,s.default)(t).getTime()===(0,u.default)(t).getTime()})((0,r.default)(e))&&1===p&&1===(0,o.Z)(e,l)&&(f=!1),n=d*(p-Number(f))}return 0===n?0:n}},11699:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(59910),a=n(13882),o=n(93645);function i(e,t,n){(0,a.Z)(2,arguments);var i=(0,r.Z)(e,t)/1e3;return(0,o.u)(null===n||void 0===n?void 0:n.roundingMethod)(i)}},5001:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(19013),a=n(91857),o=n(49474),i=n(13882);function s(e,t){(0,i.Z)(2,arguments);var n=(0,r.default)(e),s=(0,r.default)(t),u=(0,o.Z)(n,s),c=Math.abs((0,a.default)(n,s));n.setFullYear(1584),s.setFullYear(1584);var l=(0,o.Z)(n,s)===-u,d=u*(c-Number(l));return 0===d?0:d}},83894:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){(0,a.Z)(1,arguments);var t=(0,r.default)(e);return t.setHours(23,59,59,999),t}},4135:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){(0,a.Z)(1,arguments);var t=(0,r.default)(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}},67090:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return s}});var r=n(84314),a=n(19013),o=n(83946),i=n(13882);function s(e,t){var n,s,u,c,l,d,p,f;(0,i.Z)(1,arguments);var h=(0,r.j)(),v=(0,o.Z)(null!==(n=null!==(s=null!==(u=null!==(c=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==c?c:null===t||void 0===t||null===(l=t.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==u?u:h.weekStartsOn)&&void 0!==s?s:null===(p=h.locale)||void 0===p||null===(f=p.options)||void 0===f?void 0:f.weekStartsOn)&&void 0!==n?n:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,a.default)(e),g=m.getDay(),y=6+(g0?n:1-n;return d("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):d(n+1,2)},d:function(e,t){return d(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return d(e.getUTCHours()%12||12,t.length)},H:function(e,t){return d(e.getUTCHours(),t.length)},m:function(e,t){return d(e.getUTCMinutes(),t.length)},s:function(e,t){return d(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return d(Math.floor(r*Math.pow(10,n-3)),t.length)}},f="midnight",h="noon",v="morning",m="afternoon",g="evening",y="night",w={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return p.y(e,t)},Y:function(e,t,n,r){var a=(0,l.Z)(e,r),o=a>0?a:1-a;return"YY"===t?d(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):d(o,t.length)},R:function(e,t){return d((0,u.Z)(e),t.length)},u:function(e,t){return d(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return d(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return d(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return p.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return d(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var a=(0,c.Z)(e,r);return"wo"===t?n.ordinalNumber(a,{unit:"week"}):d(a,t.length)},I:function(e,t,n){var r=(0,s.Z)(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):d(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):p.d(e,t)},D:function(e,t,n){var r=function(e){(0,i.Z)(1,arguments);var t=(0,o.default)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):d(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var a=e.getUTCDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return d(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var a=e.getUTCDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return d(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),a=0===r?7:r;switch(t){case"i":return String(a);case"ii":return d(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,a=e.getUTCHours();switch(r=12===a?h:0===a?f:a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,a=e.getUTCHours();switch(r=a>=17?g:a>=12?m:a>=4?v:y,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return p.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):p.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):d(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):d(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):p.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):p.s(e,t)},S:function(e,t){return p.S(e,t)},X:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();if(0===a)return"Z";switch(t){case"X":return D(a);case"XXXX":case"XX":return k(a);default:return k(a,":")}},x:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return D(a);case"xxxx":case"xx":return k(a);default:return k(a,":")}},O:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+b(a,":");default:return"GMT"+k(a,":")}},z:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+b(a,":");default:return"GMT"+k(a,":")}},t:function(e,t,n,r){var a=r._originalDate||e;return d(Math.floor(a.getTime()/1e3),t.length)},T:function(e,t,n,r){return d((r._originalDate||e).getTime(),t.length)}};function b(e,t){var n=e>0?"-":"+",r=Math.abs(e),a=Math.floor(r/60),o=r%60;if(0===o)return n+String(a);var i=t||"";return n+String(a)+i+d(o,2)}function D(e,t){return e%60===0?(e>0?"-":"+")+d(Math.abs(e)/60,2):k(e,t)}function k(e,t){var n=t||"",r=e>0?"-":"+",a=Math.abs(e);return r+d(Math.floor(a/60),2)+n+d(a%60,2)}var C=w,S=n(97621),M=n(24262),x=n(5267),T=n(83946),Z=n(84314),_=n(8958),E=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,N=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,P=/^'([^]*?)'?$/,O=/''/g,Y=/[a-zA-Z]/;function R(e,t,n){var s,u,c,l,d,p,f,h,v,m,g,y,w,b,D,k,R,I;(0,i.Z)(2,arguments);var L=String(t),A=(0,Z.j)(),F=null!==(s=null!==(u=null===n||void 0===n?void 0:n.locale)&&void 0!==u?u:A.locale)&&void 0!==s?s:_.Z,U=(0,T.Z)(null!==(c=null!==(l=null!==(d=null!==(p=null===n||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==p?p:null===n||void 0===n||null===(f=n.locale)||void 0===f||null===(h=f.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==d?d:A.firstWeekContainsDate)&&void 0!==l?l:null===(v=A.locale)||void 0===v||null===(m=v.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==c?c:1);if(!(U>=1&&U<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=(0,T.Z)(null!==(g=null!==(y=null!==(w=null!==(b=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==b?b:null===n||void 0===n||null===(D=n.locale)||void 0===D||null===(k=D.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==w?w:A.weekStartsOn)&&void 0!==y?y:null===(R=A.locale)||void 0===R||null===(I=R.options)||void 0===I?void 0:I.weekStartsOn)&&void 0!==g?g:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!F.localize)throw new RangeError("locale must contain localize property");if(!F.formatLong)throw new RangeError("locale must contain formatLong property");var H=(0,o.default)(e);if(!(0,r.default)(H))throw new RangeError("Invalid time value");var W=(0,M.Z)(H),B=(0,a.Z)(H,W),q={firstWeekContainsDate:U,weekStartsOn:j,locale:F,_originalDate:H};return L.match(N).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,S.Z[t])(e,F.formatLong):e})).join("").match(E).map((function(r){if("''"===r)return"'";var a=r[0];if("'"===a)return function(e){var t=e.match(P);if(!t)return e;return t[1].replace(O,"'")}(r);var o=C[a];if(o)return null!==n&&void 0!==n&&n.useAdditionalWeekYearTokens||!(0,x.Do)(r)||(0,x.qp)(r,t,String(e)),null!==n&&void 0!==n&&n.useAdditionalDayOfYearTokens||!(0,x.Iu)(r)||(0,x.qp)(r,t,String(e)),o(B,r,F.localize,q);if(a.match(Y))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return r})).join("")}},936:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(84314),a=n(24262),o=n(49474),i=n(19013),s=n(52149);var u=n(8958),c=n(13882),l=6e4,d=1440,p=30*d,f=365*d;function h(e,t,n){var h,v,m;(0,c.Z)(2,arguments);var g=(0,r.j)(),y=null!==(h=null!==(v=null===n||void 0===n?void 0:n.locale)&&void 0!==v?v:g.locale)&&void 0!==h?h:u.Z;if(!y.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var w=(0,o.Z)(e,t);if(isNaN(w))throw new RangeError("Invalid time value");var b,D,k,C=(0,s.Z)((b=n,(0,s.Z)({},b)),{addSuffix:Boolean(null===n||void 0===n?void 0:n.addSuffix),comparison:w});w>0?(D=(0,i.default)(t),k=(0,i.default)(e)):(D=(0,i.default)(e),k=(0,i.default)(t));var S,M=String(null!==(m=null===n||void 0===n?void 0:n.roundingMethod)&&void 0!==m?m:"round");if("floor"===M)S=Math.floor;else if("ceil"===M)S=Math.ceil;else{if("round"!==M)throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");S=Math.round}var x,T=k.getTime()-D.getTime(),Z=T/l,_=(T-((0,a.Z)(k)-(0,a.Z)(D)))/l,E=null===n||void 0===n?void 0:n.unit;if("second"===(x=E?String(E):Z<1?"second":Z<60?"minute":Z=s.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),i(n)}var u=6048e5;function c(e){(0,o.Z)(1,arguments);var t=(0,r.default)(e),n=i(t).getTime()-s(t).getTime();return Math.round(n/u)+1}},39159:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){return(0,a.Z)(1,arguments),(0,r.default)(e).getMinutes()}},78966:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){return(0,a.Z)(1,arguments),(0,r.default)(e).getMonth()}},56605:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){(0,a.Z)(1,arguments);var t=(0,r.default)(e);return Math.floor(t.getMonth()/3)+1}},77881:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){return(0,a.Z)(1,arguments),(0,r.default)(e).getSeconds()}},28789:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){return(0,a.Z)(1,arguments),(0,r.default)(e).getTime()}},99982:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(28789),a=n(13882);function o(e){return(0,a.Z)(1,arguments),Math.floor((0,r.default)(e)/1e3)}},95570:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){return(0,a.Z)(1,arguments),(0,r.default)(e).getFullYear()}},33926:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(49474),a=n(29422),o=n(67803),i=n(76972),s=n(69690),u=n(50157),c=n(11699),l=n(5001),d=n(19013),p=n(13882);function f(e){(0,p.Z)(1,arguments);var t=(0,d.default)(e.start),n=(0,d.default)(e.end);if(isNaN(t.getTime()))throw new RangeError("Start Date is invalid");if(isNaN(n.getTime()))throw new RangeError("End Date is invalid");var f={};f.years=Math.abs((0,l.Z)(n,t));var h=(0,r.Z)(n,t),v=(0,a.Z)(t,{years:h*f.years});f.months=Math.abs((0,u.Z)(n,v));var m=(0,a.Z)(v,{months:h*f.months});f.days=Math.abs((0,o.Z)(n,m));var g=(0,a.Z)(m,{days:h*f.days});f.hours=Math.abs((0,i.Z)(n,g));var y=(0,a.Z)(g,{hours:h*f.hours});f.minutes=Math.abs((0,s.Z)(n,y));var w=(0,a.Z)(y,{minutes:h*f.minutes});return f.seconds=Math.abs((0,c.Z)(n,w)),f}},42699:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e,t){(0,a.Z)(2,arguments);var n=(0,r.default)(e),o=(0,r.default)(t);return n.getTime()>o.getTime()}},313:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e,t){(0,a.Z)(2,arguments);var n=(0,r.default)(e),o=(0,r.default)(t);return n.getTime()=o&&n<=i}},99890:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(71002),a=n(19013),o=n(13882);function i(e){var t,n;if((0,o.Z)(1,arguments),e&&"function"===typeof e.forEach)t=e;else{if("object"!==(0,r.Z)(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=(0,a.default)(e);(void 0===n||nt||isNaN(t.getDate()))&&(n=t)})),n||new Date(NaN)}},76417:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Ye}});var r=n(71002),a=n(40181);function o(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,a.Z)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=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,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}var i=n(8958),s=n(91218),u=n(19013),c=n(52149),l=n(97621),d=n(24262),p=n(5267),f=n(83946),h=n(13882),v=n(97326),m=n(60136),g=n(29388),y=n(15671),w=n(43144),b=n(4942),D=function(){function e(){(0,y.Z)(this,e),(0,b.Z)(this,"priority",void 0),(0,b.Z)(this,"subPriority",0)}return(0,w.Z)(e,[{key:"validate",value:function(e,t){return!0}}]),e}(),k=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(e,r,a,o,i){var s;return(0,y.Z)(this,n),(s=t.call(this)).value=e,s.validateValue=r,s.setValue=a,s.priority=o,i&&(s.subPriority=i),s}return(0,w.Z)(n,[{key:"validate",value:function(e,t){return this.validateValue(e,this.value,t)}},{key:"set",value:function(e,t,n){return this.setValue(e,t,this.value,n)}}]),n}(D),C=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o0,a=r?t:1-t;if(a<=50)n=e||100;else{var o=a+50;n=e+100*Math.floor(o/100)-(e>=o%100?100:0)}return r?n:1-n}function j(e){return e%400===0||e%4===0&&e%100!==0}var H=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o0}},{key:"set",value:function(e,t,n){var r=e.getUTCFullYear();if(n.isTwoDigitYear){var a=U(n.year,r);return e.setUTCFullYear(a,0,1),e.setUTCHours(0,0,0,0),e}var o="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e}}]),n}(S),W=n(7651),B=n(59025),q=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o0}},{key:"set",value:function(e,t,n,r){var a=(0,W.Z)(e,r);if(n.isTwoDigitYear){var o=U(n.year,a);return e.setUTCFullYear(o,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),(0,B.Z)(e,r)}var i="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(i,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),(0,B.Z)(e,r)}}]),n}(S),Q=n(66979),K=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),n}(S),X=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),n}(S),G=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),n}(S),$=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),n}(S),J=n(23324);var ee=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&t<=53}},{key:"set",value:function(e,t,n,r){return(0,B.Z)(function(e,t,n){(0,h.Z)(2,arguments);var r=(0,u.default)(e),a=(0,f.Z)(t),o=(0,J.Z)(r,n)-a;return r.setUTCDate(r.getUTCDate()-7*o),r}(e,n,r),r)}}]),n}(S),te=n(49702);var ne=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&t<=53}},{key:"set",value:function(e,t,n){return(0,Q.Z)(function(e,t){(0,h.Z)(2,arguments);var n=(0,u.default)(e),r=(0,f.Z)(t),a=(0,te.Z)(n)-r;return n.setUTCDate(n.getUTCDate()-7*a),n}(e,n))}}]),n}(S),re=[31,28,31,30,31,30,31,31,30,31,30,31],ae=[31,29,31,30,31,30,31,31,30,31,30,31],oe=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&t<=ae[r]:t>=1&&t<=re[r]}},{key:"set",value:function(e,t,n){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e}}]),n}(S),ie=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&t<=366:t>=1&&t<=365}},{key:"set",value:function(e,t,n){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e}}]),n}(S),se=n(84314);function ue(e,t,n){var r,a,o,i,s,c,l,d;(0,h.Z)(2,arguments);var p=(0,se.j)(),v=(0,f.Z)(null!==(r=null!==(a=null!==(o=null!==(i=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==i?i:null===n||void 0===n||null===(s=n.locale)||void 0===s||null===(c=s.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==o?o:p.weekStartsOn)&&void 0!==a?a:null===(l=p.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==r?r:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,u.default)(e),g=(0,f.Z)(t),y=((g%7+7)%7=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=ue(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(S),le=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=ue(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(S),de=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=ue(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(S);var pe=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&t<=7}},{key:"set",value:function(e,t,n){return e=function(e,t){(0,h.Z)(2,arguments);var n=(0,f.Z)(t);n%7===0&&(n-=7);var r=(0,u.default)(e),a=((n%7+7)%7<1?7:0)+n-r.getUTCDay();return r.setUTCDate(r.getUTCDate()+a),r}(e,n),e.setUTCHours(0,0,0,0),e}}]),n}(S),fe=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&t<=12}},{key:"set",value:function(e,t,n){var r=e.getUTCHours()>=12;return r&&n<12?e.setUTCHours(n+12,0,0,0):r||12!==n?e.setUTCHours(n,0,0,0):e.setUTCHours(0,0,0,0),e}}]),n}(S),ge=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=0&&t<=23}},{key:"set",value:function(e,t,n){return e.setUTCHours(n,0,0,0),e}}]),n}(S),ye=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=0&&t<=11}},{key:"set",value:function(e,t,n){return e.getUTCHours()>=12&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e}}]),n}(S),we=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&t<=24}},{key:"set",value:function(e,t,n){var r=n<=24?n%24:n;return e.setUTCHours(r,0,0,0),e}}]),n}(S),be=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCMinutes(n,0,0),e}}]),n}(S),De=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCSeconds(n,0),e}}]),n}(S),ke=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,y.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var F=(0,f.Z)(null!==(x=null!==(T=null!==(Z=null!==(_=null===a||void 0===a?void 0:a.weekStartsOn)&&void 0!==_?_:null===a||void 0===a||null===(E=a.locale)||void 0===E||null===(N=E.options)||void 0===N?void 0:N.weekStartsOn)&&void 0!==Z?Z:I.weekStartsOn)&&void 0!==T?T:null===(P=I.locale)||void 0===P||null===(O=P.options)||void 0===O?void 0:O.weekStartsOn)&&void 0!==x?x:0);if(!(F>=0&&F<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===R)return""===Y?(0,u.default)(n):new Date(NaN);var U,j={firstWeekContainsDate:A,weekStartsOn:F,locale:L},H=[new C],W=R.match(_e).map((function(e){var t=e[0];return t in l.Z?(0,l.Z[t])(e,L.formatLong):e})).join("").match(Ze),B=[],q=o(W);try{var Q=function(){var t=U.value;null!==a&&void 0!==a&&a.useAdditionalWeekYearTokens||!(0,p.Do)(t)||(0,p.qp)(t,R,e),null!==a&&void 0!==a&&a.useAdditionalDayOfYearTokens||!(0,p.Iu)(t)||(0,p.qp)(t,R,e);var n=t[0],r=Te[n];if(r){var o=r.incompatibleTokens;if(Array.isArray(o)){var i=B.find((function(e){return o.includes(e.token)||e.token===n}));if(i)throw new RangeError("The format string mustn't contain `".concat(i.fullToken,"` and `").concat(t,"` at the same time"))}else if("*"===r.incompatibleTokens&&B.length>0)throw new RangeError("The format string mustn't contain `".concat(t,"` and any other token at the same time"));B.push({token:n,fullToken:t});var s=r.run(Y,t,L.match,j);if(!s)return{v:new Date(NaN)};H.push(s.setter),Y=s.rest}else{if(n.match(Oe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===t?t="'":"'"===n&&(t=t.match(Ee)[1].replace(Ne,"'")),0!==Y.indexOf(t))return{v:new Date(NaN)};Y=Y.slice(t.length)}};for(q.s();!(U=q.n()).done;){var K=Q();if("object"===(0,r.Z)(K))return K.v}}catch(ne){q.e(ne)}finally{q.f()}if(Y.length>0&&Pe.test(Y))return new Date(NaN);var V=H.map((function(e){return e.priority})).sort((function(e,t){return t-e})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return H.filter((function(t){return t.priority===e})).sort((function(e,t){return t.subPriority-e.subPriority}))})).map((function(e){return e[0]})),z=(0,u.default)(n);if(isNaN(z.getTime()))return new Date(NaN);var X,G=(0,s.Z)(z,(0,d.Z)(z)),$={},J=o(V);try{for(J.s();!(X=J.n()).done;){var ee=X.value;if(!ee.validate(G,j))return new Date(NaN);var te=ee.set(G,$,j);Array.isArray(te)?(G=te[0],(0,c.Z)($,te[1])):G=te}}catch(ne){J.e(ne)}finally{J.f()}return G}},23855:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(36948),a=n(13882),o=n(83946);function i(e,t){var n;(0,a.Z)(1,arguments);var i=(0,o.Z)(null!==(n=null===t||void 0===t?void 0:t.additionalDigits)&&void 0!==n?n:2);if(2!==i&&1!==i&&0!==i)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!==typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var v,m=function(e){var t,n={},r=e.split(s.dateTimeDelimiter);if(r.length>2)return n;/:/.test(r[0])?t=r[0]:(n.date=r[0],t=r[1],s.timeZoneDelimiter.test(n.date)&&(n.date=e.split(s.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length)));if(t){var a=s.timezone.exec(t);a?(n.time=t.replace(a[1],""),n.timezone=a[1]):n.time=t}return n}(e);if(m.date){var g=function(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var a=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:null===o?a:100*o,restDateString:e.slice((r[1]||r[2]).length)}}(m.date,i);v=function(e,t){if(null===t)return new Date(NaN);var n=e.match(u);if(!n)return new Date(NaN);var r=!!n[4],a=d(n[1]),o=d(n[2])-1,i=d(n[3]),s=d(n[4]),c=d(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,c)?function(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var a=r.getUTCDay()||7,o=7*(t-1)+n+1-a;return r.setUTCDate(r.getUTCDate()+o),r}(t,s,c):new Date(NaN);var l=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(f[t]||(h(e)?29:28))}(t,o,i)&&function(e,t){return t>=1&&t<=(h(e)?366:365)}(t,a)?(l.setUTCFullYear(t,o,Math.max(a,i)),l):new Date(NaN)}(g.restDateString,g.year)}if(!v||isNaN(v.getTime()))return new Date(NaN);var y,w=v.getTime(),b=0;if(m.time&&(b=function(e){var t=e.match(c);if(!t)return NaN;var n=p(t[1]),a=p(t[2]),o=p(t[3]);if(!function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,a,o))return NaN;return n*r.vh+a*r.yJ+1e3*o}(m.time),isNaN(b)))return new Date(NaN);if(!m.timezone){var D=new Date(w+b),k=new Date(0);return k.setFullYear(D.getUTCFullYear(),D.getUTCMonth(),D.getUTCDate()),k.setHours(D.getUTCHours(),D.getUTCMinutes(),D.getUTCSeconds(),D.getUTCMilliseconds()),k}return y=function(e){if("Z"===e)return 0;var t=e.match(l);if(!t)return 0;var n="+"===t[1]?-1:1,a=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,o))return NaN;return n*(a*r.vh+o*r.yJ)}(m.timezone),isNaN(y)?new Date(NaN):new Date(w+b+y)}var s={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},u=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,c=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,l=/^([+-])(\d{2})(?::?(\d{2}))?$/;function d(e){return e?parseInt(e):1}function p(e){return e&&parseFloat(e.replace(",","."))||0}var f=[31,null,31,30,31,30,31,31,30,31,30,31];function h(e){return e%400===0||e%4===0&&e%100!==0}},92311:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return u}});var r=n(71002),a=n(19013),o=n(62225),i=n(83946),s=n(13882);function u(e,t){if((0,s.Z)(2,arguments),"object"!==(0,r.Z)(t)||null===t)throw new RangeError("values parameter must be an object");var n=(0,a.default)(e);return isNaN(n.getTime())?new Date(NaN):(null!=t.year&&n.setFullYear(t.year),null!=t.month&&(n=(0,o.default)(n,t.month)),null!=t.date&&n.setDate((0,i.Z)(t.date)),null!=t.hours&&n.setHours((0,i.Z)(t.hours)),null!=t.minutes&&n.setMinutes((0,i.Z)(t.minutes)),null!=t.seconds&&n.setSeconds((0,i.Z)(t.seconds)),null!=t.milliseconds&&n.setMilliseconds((0,i.Z)(t.milliseconds)),n)}},37042:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(83946),a=n(19013),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=(0,a.default)(e),i=(0,r.Z)(t);return n.setHours(i),n}},4543:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(83946),a=n(19013),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=(0,a.default)(e),i=(0,r.Z)(t);return n.setMinutes(i),n}},62225:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(83946),a=n(19013),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=(0,a.default)(e),i=(0,r.Z)(t),s=n.getFullYear(),u=n.getDate(),c=new Date(0);c.setFullYear(s,i,15),c.setHours(0,0,0,0);var l=function(e){(0,o.Z)(1,arguments);var t=(0,a.default)(e),n=t.getFullYear(),r=t.getMonth(),i=new Date(0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}(c);return n.setMonth(i,Math.min(u,l)),n}},11503:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return s}});var r=n(83946),a=n(19013),o=n(62225),i=n(13882);function s(e,t){(0,i.Z)(2,arguments);var n=(0,a.default)(e),s=(0,r.Z)(t)-(Math.floor(n.getMonth()/3)+1);return(0,o.default)(n,n.getMonth()+3*s)}},39880:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(83946),a=n(19013),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=(0,a.default)(e),i=(0,r.Z)(t);return n.setSeconds(i),n}},44749:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(83946),a=n(19013),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=(0,a.default)(e),i=(0,r.Z)(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(i),n)}},69119:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){(0,a.Z)(1,arguments);var t=(0,r.default)(e);return t.setHours(0,0,0,0),t}},43703:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){(0,a.Z)(1,arguments);var t=(0,r.default)(e);return t.setDate(1),t.setHours(0,0,0,0),t}},94431:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(19013),a=n(13882);function o(e){(0,a.Z)(1,arguments);var t=(0,r.default)(e),n=t.getMonth(),o=n-n%3;return t.setMonth(o,1),t.setHours(0,0,0,0),t}},584:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return s}});var r=n(19013),a=n(83946),o=n(13882),i=n(84314);function s(e,t){var n,s,u,c,l,d,p,f;(0,o.Z)(1,arguments);var h=(0,i.j)(),v=(0,a.Z)(null!==(n=null!==(s=null!==(u=null!==(c=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==c?c:null===t||void 0===t||null===(l=t.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==u?u:h.weekStartsOn)&&void 0!==s?s:null===(p=h.locale)||void 0===p||null===(f=p.options)||void 0===f?void 0:f.weekStartsOn)&&void 0!==n?n:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,r.default)(e),g=m.getDay(),y=(gl))return!1;var p=u.get(e),f=u.get(t);if(p&&f)return p==t&&f==e;var h=-1,v=!0,m=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++he.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate,a=t.excludeDates,o=t.excludeDateIntervals,i=t.includeDates,s=t.includeDateIntervals,u=t.filterDate;return fn(e,{minDate:n,maxDate:r})||a&&a.some((function(t){return Gt(e,t)}))||o&&o.some((function(t){var n=t.start,r=t.end;return lt.default(e,{start:n,end:r})}))||i&&!i.some((function(t){return Gt(e,t)}))||s&&!s.some((function(t){var n=t.start,r=t.end;return lt.default(e,{start:n,end:r})}))||u&&!u(At(e))||!1}function on(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.excludeDates,r=t.excludeDateIntervals;return r&&r.length>0?r.some((function(t){var n=t.start,r=t.end;return lt.default(e,{start:n,end:r})})):n&&n.some((function(t){return Gt(e,t)}))||!1}function sn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate,a=t.excludeDates,o=t.includeDates,i=t.filterDate;return fn(e,{minDate:Ge.default(n),maxDate:tt.default(r)})||a&&a.some((function(t){return zt(e,t)}))||o&&!o.some((function(t){return zt(e,t)}))||i&&!i(At(e))||!1}function un(e,t,n,r){var a=Ie.default(e),o=Ye.default(e),i=Ie.default(t),s=Ye.default(t),u=Ie.default(r);return a===i&&a===u?o<=n&&n<=s:a=n||ua:void 0}function cn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate,a=t.excludeDates,o=t.includeDates,i=t.filterDate;return fn(e,{minDate:n,maxDate:r})||a&&a.some((function(t){return Xt(e,t)}))||o&&!o.some((function(t){return Xt(e,t)}))||i&&!i(At(e))||!1}function ln(e,t,n){if(!he.default(t)||!he.default(n))return!1;var r=Ie.default(t),a=Ie.default(n);return r<=e&&a>=e}function dn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate,a=t.excludeDates,o=t.includeDates,i=t.filterDate,s=new Date(e,0,1);return fn(s,{minDate:Je.default(n),maxDate:nt.default(r)})||a&&a.some((function(e){return Vt(s,e)}))||o&&!o.some((function(e){return Vt(s,e)}))||i&&!i(At(s))||!1}function pn(e,t,n,r){var a=Ie.default(e),o=Re.default(e),i=Ie.default(t),s=Re.default(t),u=Ie.default(r);return a===i&&a===u?o<=n&&n<=s:a=n||ua:void 0}function fn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate;return n&&Qe.default(e,n)<0||r&&Qe.default(e,r)>0}function hn(e,t){return t.some((function(t){return Ee.default(t)===Ee.default(e)&&_e.default(t)===_e.default(e)}))}function vn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.excludeTimes,r=t.includeTimes,a=t.filterTime;return n&&hn(e,n)||r&&!hn(e,r)||a&&!a(e)||!1}function mn(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var a,o=At(),i=Ue.default(Fe.default(o,_e.default(e)),Ee.default(e)),s=Ue.default(Fe.default(o,_e.default(n)),Ee.default(n)),u=Ue.default(Fe.default(o,_e.default(r)),Ee.default(r));try{a=!lt.default(i,{start:s,end:u})}catch(e){a=!1}return a}function gn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.includeDates,a=Me.default(e,1);return n&&Ke.default(n,a)>0||r&&r.every((function(e){return Ke.default(e,a)>0}))||!1}function yn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.maxDate,r=t.includeDates,a=be.default(e,1);return n&&Ke.default(a,n)>0||r&&r.every((function(e){return Ke.default(a,e)>0}))||!1}function wn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.includeDates,a=Te.default(e,1);return n&&Ve.default(n,a)>0||r&&r.every((function(e){return Ve.default(e,a)>0}))||!1}function bn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.maxDate,r=t.includeDates,a=ke.default(e,1);return n&&Ve.default(a,n)>0||r&&r.every((function(e){return Ve.default(a,e)>0}))||!1}function Dn(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter((function(e){return Qe.default(e,t)>=0}));return Be.default(r)}return n?Be.default(n):t}function kn(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter((function(e){return Qe.default(e,t)<=0}));return qe.default(r)}return n?qe.default(n):t}function Cn(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"react-datepicker__day--highlighted",n=new Map,r=0,a=e.length;r1&&void 0!==arguments[1]?arguments[1]:It,n=Math.ceil(Ie.default(e)/t)*t;return{startPeriod:n-(t-1),endPeriod:n}}function Tn(e,t,n,r){for(var a=[],o=0;o<2*t+1;o++){var i=e+t-o,s=!0;n&&(s=Ie.default(n)<=i),r&&s&&(s=Ie.default(r)>=i),s&&a.push(i)}return a}var Zn=function(e){Mt(r,e);var n=_t(r);function r(e){var a;bt(this,r),Ct(Zt(a=n.call(this,e)),"renderOptions",(function(){var e=a.props.year,t=a.state.yearsList.map((function(t){return de.default.createElement("div",{className:e===t?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:t,onClick:a.onChange.bind(Zt(a),t),"aria-selected":e===t?"true":void 0},e===t?de.default.createElement("span",{className:"react-datepicker__year-option--selected"},"\u2713"):"",t)})),n=a.props.minDate?Ie.default(a.props.minDate):null,r=a.props.maxDate?Ie.default(a.props.maxDate):null;return r&&a.state.yearsList.find((function(e){return e===r}))||t.unshift(de.default.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:a.incrementYears},de.default.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),n&&a.state.yearsList.find((function(e){return e===n}))||t.push(de.default.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:a.decrementYears},de.default.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),t})),Ct(Zt(a),"onChange",(function(e){a.props.onChange(e)})),Ct(Zt(a),"handleClickOutside",(function(){a.props.onCancel()})),Ct(Zt(a),"shiftYears",(function(e){var t=a.state.yearsList.map((function(t){return t+e}));a.setState({yearsList:t})})),Ct(Zt(a),"incrementYears",(function(){return a.shiftYears(1)})),Ct(Zt(a),"decrementYears",(function(){return a.shiftYears(-1)}));var o=e.yearDropdownItemNumber,i=e.scrollableYearDropdown,s=o||(i?10:5);return a.state={yearsList:Tn(a.props.year,s,a.props.minDate,a.props.maxDate)},a.dropdownRef=t.createRef(),a}return kt(r,[{key:"componentDidMount",value:function(){var e=this.dropdownRef.current;if(e){var t=e.children?Array.from(e.children):null,n=t?t.find((function(e){return e.ariaSelected})):null;e.scrollTop=n?n.offsetTop+(n.clientHeight-e.clientHeight)/2:(e.scrollHeight-e.clientHeight)/2}}},{key:"render",value:function(){var e=pe.default({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return de.default.createElement("div",{className:e,ref:this.dropdownRef},this.renderOptions())}}]),r}(de.default.Component),_n=ht.default(Zn),En=function(e){Mt(n,e);var t=_t(n);function n(){var e;bt(this,n);for(var r=arguments.length,a=new Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},n=!1;0===e.getTabIndex()&&!t.isInputFocused&&e.isSameDay(e.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(n=!0),e.props.inline&&!e.props.shouldFocusDayInline&&(n=!1),e.props.containerRef&&e.props.containerRef.current&&e.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(n=!0),e.props.monthShowsDuplicateDaysEnd&&e.isAfterMonth()&&(n=!1),e.props.monthShowsDuplicateDaysStart&&e.isBeforeMonth()&&(n=!1)),n&&e.dayEl.current.focus({preventScroll:!0})})),Ct(Zt(e),"renderDayContents",(function(){return e.props.monthShowsDuplicateDaysEnd&&e.isAfterMonth()||e.props.monthShowsDuplicateDaysStart&&e.isBeforeMonth()?null:e.props.renderDayContents?e.props.renderDayContents(Pe.default(e.props.day),e.props.day):Pe.default(e.props.day)})),Ct(Zt(e),"render",(function(){return de.default.createElement("div",{ref:e.dayEl,className:e.getClassNames(e.props.day),onKeyDown:e.handleOnKeyDown,onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,tabIndex:e.getTabIndex(),"aria-label":e.getAriaLabel(),role:"option","aria-disabled":e.isDisabled(),"aria-current":e.isCurrentDay()?"date":void 0,"aria-selected":e.isSelected()||e.isInRange()},e.renderDayContents())})),e}return kt(n,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(e){this.handleFocusDay(e)}}]),n}(de.default.Component),Un=function(e){Mt(n,e);var t=_t(n);function n(){var e;bt(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=6,s=!n&&!e.isWeekInMonth(o);if(i||s){if(!e.props.peekNextMonth)break;a=!0}}return t})),Ct(Zt(e),"onMonthClick",(function(t,n){e.handleDayClick(Bt(je.default(e.props.day,n)),t)})),Ct(Zt(e),"onMonthMouseEnter",(function(t){e.handleDayMouseEnter(Bt(je.default(e.props.day,t)))})),Ct(Zt(e),"handleMonthNavigation",(function(t,n){e.isDisabled(n)||e.isExcluded(n)||(e.props.setPreSelection(n),e.MONTH_REFS[t].current&&e.MONTH_REFS[t].current.focus())})),Ct(Zt(e),"onMonthKeyDown",(function(t,n){var r=e.props,a=r.selected,o=r.preSelection,i=r.disabledKeyboardNavigation,s=r.showTwoColumnMonthYearPicker,u=r.showFourColumnMonthYearPicker,c=r.setPreSelection,l=t.key;if("Tab"!==l&&t.preventDefault(),!i){var d=Qn(u,s),p=qn[d].verticalNavigationOffset,f=qn[d].grid;switch(l){case"Enter":e.onMonthClick(t,n),c(a);break;case"ArrowRight":e.handleMonthNavigation(11===n?0:n+1,be.default(o,1));break;case"ArrowLeft":e.handleMonthNavigation(0===n?11:n-1,Me.default(o,1));break;case"ArrowUp":e.handleMonthNavigation(f[0].includes(n)?n+12-p:n-p,Me.default(o,p));break;case"ArrowDown":e.handleMonthNavigation(f[f.length-1].includes(n)?n-12+p:n+p,be.default(o,p))}}})),Ct(Zt(e),"onQuarterClick",(function(t,n){e.handleDayClick(Qt(He.default(e.props.day,n)),t)})),Ct(Zt(e),"onQuarterMouseEnter",(function(t){e.handleDayMouseEnter(Qt(He.default(e.props.day,t)))})),Ct(Zt(e),"handleQuarterNavigation",(function(t,n){e.isDisabled(n)||e.isExcluded(n)||(e.props.setPreSelection(n),e.QUARTER_REFS[t-1].current&&e.QUARTER_REFS[t-1].current.focus())})),Ct(Zt(e),"onQuarterKeyDown",(function(t,n){var r=t.key;if(!e.props.disabledKeyboardNavigation)switch(r){case"Enter":e.onQuarterClick(t,n),e.props.setPreSelection(e.props.selected);break;case"ArrowRight":e.handleQuarterNavigation(4===n?1:n+1,De.default(e.props.preSelection,1));break;case"ArrowLeft":e.handleQuarterNavigation(1===n?4:n-1,xe.default(e.props.preSelection,1))}})),Ct(Zt(e),"getMonthClassNames",(function(t){var n=e.props,r=n.day,a=n.startDate,o=n.endDate,i=n.selected,s=n.minDate,u=n.maxDate,c=n.preSelection,l=n.monthClassName,d=n.excludeDates,p=n.includeDates,f=l?l(je.default(r,t)):void 0,h=je.default(r,t);return pe.default("react-datepicker__month-text","react-datepicker__month-".concat(t),f,{"react-datepicker__month-text--disabled":(s||u||d||p)&&sn(h,e.props),"react-datepicker__month-text--selected":e.isSelectedMonth(r,t,i),"react-datepicker__month-text--keyboard-selected":!e.props.disabledKeyboardNavigation&&Ye.default(c)===t,"react-datepicker__month-text--in-selecting-range":e.isInSelectingRangeMonth(t),"react-datepicker__month-text--in-range":un(a,o,t,r),"react-datepicker__month-text--range-start":e.isRangeStartMonth(t),"react-datepicker__month-text--range-end":e.isRangeEndMonth(t),"react-datepicker__month-text--selecting-range-start":e.isSelectingMonthRangeStart(t),"react-datepicker__month-text--selecting-range-end":e.isSelectingMonthRangeEnd(t),"react-datepicker__month-text--today":e.isCurrentMonth(r,t)})})),Ct(Zt(e),"getTabIndex",(function(t){var n=Ye.default(e.props.preSelection);return e.props.disabledKeyboardNavigation||t!==n?"-1":"0"})),Ct(Zt(e),"getQuarterTabIndex",(function(t){var n=Re.default(e.props.preSelection);return e.props.disabledKeyboardNavigation||t!==n?"-1":"0"})),Ct(Zt(e),"getAriaLabel",(function(t){var n=e.props,r=n.chooseDayAriaLabelPrefix,a=void 0===r?"Choose":r,o=n.disabledDayAriaLabelPrefix,i=void 0===o?"Not available":o,s=n.day,u=je.default(s,t),c=e.isDisabled(u)||e.isExcluded(u)?i:a;return"".concat(c," ").concat(Ut(u,"MMMM yyyy"))})),Ct(Zt(e),"getQuarterClassNames",(function(t){var n=e.props,r=n.day,a=n.startDate,o=n.endDate,i=n.selected,s=n.minDate,u=n.maxDate,c=n.preSelection;return pe.default("react-datepicker__quarter-text","react-datepicker__quarter-".concat(t),{"react-datepicker__quarter-text--disabled":(s||u)&&cn(He.default(r,t),e.props),"react-datepicker__quarter-text--selected":e.isSelectedQuarter(r,t,i),"react-datepicker__quarter-text--keyboard-selected":Re.default(c)===t,"react-datepicker__quarter-text--in-selecting-range":e.isInSelectingRangeQuarter(t),"react-datepicker__quarter-text--in-range":pn(a,o,t,r),"react-datepicker__quarter-text--range-start":e.isRangeStartQuarter(t),"react-datepicker__quarter-text--range-end":e.isRangeEndQuarter(t)})})),Ct(Zt(e),"getMonthContent",(function(t){var n=e.props,r=n.showFullMonthYearPicker,a=n.renderMonthContent,o=n.locale,i=rn(t,o),s=nn(t,o);return a?a(t,i,s):r?s:i})),Ct(Zt(e),"getQuarterContent",(function(t){var n=e.props,r=n.renderQuarterContent,a=function(e,t){return Ut(He.default(At(),e),"QQQ",t)}(t,n.locale);return r?r(t,a):a})),Ct(Zt(e),"renderMonths",(function(){var t=e.props,n=t.showTwoColumnMonthYearPicker,r=t.showFourColumnMonthYearPicker,a=t.day,o=t.selected;return qn[Qn(r,n)].grid.map((function(t,n){return de.default.createElement("div",{className:"react-datepicker__month-wrapper",key:n},t.map((function(t,n){return de.default.createElement("div",{ref:e.MONTH_REFS[t],key:n,onClick:function(n){e.onMonthClick(n,t)},onKeyDown:function(n){e.onMonthKeyDown(n,t)},onMouseEnter:function(){return e.onMonthMouseEnter(t)},tabIndex:e.getTabIndex(t),className:e.getMonthClassNames(t),role:"option","aria-label":e.getAriaLabel(t),"aria-current":e.isCurrentMonth(a,t)?"date":void 0,"aria-selected":e.isSelectedMonth(a,t,o)},e.getMonthContent(t))})))}))})),Ct(Zt(e),"renderQuarters",(function(){var t=e.props,n=t.day,r=t.selected;return de.default.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map((function(t,a){return de.default.createElement("div",{key:a,ref:e.QUARTER_REFS[a],role:"option",onClick:function(n){e.onQuarterClick(n,t)},onKeyDown:function(n){e.onQuarterKeyDown(n,t)},onMouseEnter:function(){return e.onQuarterMouseEnter(t)},className:e.getQuarterClassNames(t),"aria-selected":e.isSelectedQuarter(n,t,r),tabIndex:e.getQuarterTabIndex(t),"aria-current":e.isCurrentQuarter(n,t)?"date":void 0},e.getQuarterContent(t))})))})),Ct(Zt(e),"getClassNames",(function(){var t=e.props,n=t.selectingDate,r=t.selectsStart,a=t.selectsEnd,o=t.showMonthYearPicker,i=t.showQuarterYearPicker;return pe.default("react-datepicker__month",{"react-datepicker__month--selecting-range":n&&(r||a)},{"react-datepicker__monthPicker":o},{"react-datepicker__quarterPicker":i})})),e}return kt(n,[{key:"render",value:function(){var e=this.props,t=e.showMonthYearPicker,n=e.showQuarterYearPicker,r=e.day,a=e.ariaLabelPrefix,o=void 0===a?"month ":a;return de.default.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(o," ").concat(Ut(r,"yyyy-MM")),role:"listbox"},t?this.renderMonths():n?this.renderQuarters():this.renderWeeks())}}]),n}(de.default.Component),Vn=function(e){Mt(n,e);var t=_t(n);function n(){var e;bt(this,n);for(var r=arguments.length,a=new Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:{}).className||"").split(/\s+/);return $n.some((function(t){return e.indexOf(t)>=0}))})(e.target)&&r.props.onDropdownFocus()})),Ct(Zt(r),"getDateInView",(function(){var e=r.props,t=e.preSelection,n=e.selected,a=e.openToDate,o=Dn(r.props),i=kn(r.props),s=At();return a||n||t||(o&&ct.default(s,o)?o:i&&ut.default(s,i)?i:s)})),Ct(Zt(r),"increaseMonth",(function(){r.setState((function(e){var t=e.date;return{date:be.default(t,1)}}),(function(){return r.handleMonthChange(r.state.date)}))})),Ct(Zt(r),"decreaseMonth",(function(){r.setState((function(e){var t=e.date;return{date:Me.default(t,1)}}),(function(){return r.handleMonthChange(r.state.date)}))})),Ct(Zt(r),"handleDayClick",(function(e,t,n){r.props.onSelect(e,t,n),r.props.setPreSelection&&r.props.setPreSelection(e)})),Ct(Zt(r),"handleDayMouseEnter",(function(e){r.setState({selectingDate:e}),r.props.onDayMouseEnter&&r.props.onDayMouseEnter(e)})),Ct(Zt(r),"handleMonthMouseLeave",(function(){r.setState({selectingDate:null}),r.props.onMonthMouseLeave&&r.props.onMonthMouseLeave()})),Ct(Zt(r),"handleYearMouseEnter",(function(e,t){r.setState({selectingDate:We.default(At(),t)}),r.props.onYearMouseEnter&&r.props.onYearMouseEnter(e,t)})),Ct(Zt(r),"handleYearMouseLeave",(function(e,t){r.props.onYearMouseLeave&&r.props.onYearMouseLeave(e,t)})),Ct(Zt(r),"handleYearChange",(function(e){r.props.onYearChange&&(r.props.onYearChange(e),r.setState({isRenderAriaLiveMessage:!0})),r.props.adjustDateOnChange&&(r.props.onSelect&&r.props.onSelect(e),r.props.setOpen&&r.props.setOpen(!0)),r.props.setPreSelection&&r.props.setPreSelection(e)})),Ct(Zt(r),"handleMonthChange",(function(e){r.handleCustomMonthChange(e),r.props.adjustDateOnChange&&(r.props.onSelect&&r.props.onSelect(e),r.props.setOpen&&r.props.setOpen(!0)),r.props.setPreSelection&&r.props.setPreSelection(e)})),Ct(Zt(r),"handleCustomMonthChange",(function(e){r.props.onMonthChange&&(r.props.onMonthChange(e),r.setState({isRenderAriaLiveMessage:!0}))})),Ct(Zt(r),"handleMonthYearChange",(function(e){r.handleYearChange(e),r.handleMonthChange(e)})),Ct(Zt(r),"changeYear",(function(e){r.setState((function(t){var n=t.date;return{date:We.default(n,e)}}),(function(){return r.handleYearChange(r.state.date)}))})),Ct(Zt(r),"changeMonth",(function(e){r.setState((function(t){var n=t.date;return{date:je.default(n,e)}}),(function(){return r.handleMonthChange(r.state.date)}))})),Ct(Zt(r),"changeMonthYear",(function(e){r.setState((function(t){var n=t.date;return{date:We.default(je.default(n,Ye.default(e)),Ie.default(e))}}),(function(){return r.handleMonthYearChange(r.state.date)}))})),Ct(Zt(r),"header",(function(){var e=Wt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.state.date,r.props.locale,r.props.calendarStartDay),t=[];return r.props.showWeekNumbers&&t.push(de.default.createElement("div",{key:"W",className:"react-datepicker__day-name"},r.props.weekLabel||"#")),t.concat([0,1,2,3,4,5,6].map((function(t){var n=ye.default(e,t),a=r.formatWeekday(n,r.props.locale),o=r.props.weekDayClassName?r.props.weekDayClassName(n):void 0;return de.default.createElement("div",{key:t,className:pe.default("react-datepicker__day-name",o)},a)})))})),Ct(Zt(r),"formatWeekday",(function(e,t){return r.props.formatWeekDay?function(e,t,n){return t(Ut(e,"EEEE",n))}(e,r.props.formatWeekDay,t):r.props.useWeekdaysShort?function(e,t){return Ut(e,"EEE",t)}(e,t):function(e,t){return Ut(e,"EEEEEE",t)}(e,t)})),Ct(Zt(r),"decreaseYear",(function(){r.setState((function(e){var t=e.date;return{date:Te.default(t,r.props.showYearPicker?r.props.yearItemNumber:1)}}),(function(){return r.handleYearChange(r.state.date)}))})),Ct(Zt(r),"clearSelectingDate",(function(){r.setState({selectingDate:null})})),Ct(Zt(r),"renderPreviousButton",(function(){if(!r.props.renderCustomHeader){var e;switch(!0){case r.props.showMonthYearPicker:e=wn(r.state.date,r.props);break;case r.props.showYearPicker:e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.yearItemNumber,a=void 0===r?It:r,o=xn(qt(Te.default(e,a)),a).endPeriod,i=n&&Ie.default(n);return i&&i>o||!1}(r.state.date,r.props);break;default:e=gn(r.state.date,r.props)}if((r.props.forceShowMonthNavigation||r.props.showDisabledMonthNavigation||!e)&&!r.props.showTimeSelectOnly){var t=["react-datepicker__navigation","react-datepicker__navigation--previous"],n=r.decreaseMonth;(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker)&&(n=r.decreaseYear),e&&r.props.showDisabledMonthNavigation&&(t.push("react-datepicker__navigation--previous--disabled"),n=null);var a=r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker,o=r.props,i=o.previousMonthButtonLabel,s=o.previousYearButtonLabel,u=r.props,c=u.previousMonthAriaLabel,l=void 0===c?"string"==typeof i?i:"Previous Month":c,d=u.previousYearAriaLabel,p=void 0===d?"string"==typeof s?s:"Previous Year":d;return de.default.createElement("button",{type:"button",className:t.join(" "),onClick:n,onKeyDown:r.props.handleOnKeyDown,"aria-label":a?p:l},de.default.createElement("span",{className:["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"].join(" ")},a?r.props.previousYearButtonLabel:r.props.previousMonthButtonLabel))}}})),Ct(Zt(r),"increaseYear",(function(){r.setState((function(e){var t=e.date;return{date:ke.default(t,r.props.showYearPicker?r.props.yearItemNumber:1)}}),(function(){return r.handleYearChange(r.state.date)}))})),Ct(Zt(r),"renderNextButton",(function(){if(!r.props.renderCustomHeader){var e;switch(!0){case r.props.showMonthYearPicker:e=bn(r.state.date,r.props);break;case r.props.showYearPicker:e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.maxDate,r=t.yearItemNumber,a=void 0===r?It:r,o=xn(ke.default(e,a),a).startPeriod,i=n&&Ie.default(n);return i&&i0&&void 0!==arguments[0]?arguments[0]:r.state.date,t=["react-datepicker__current-month"];return r.props.showYearDropdown&&t.push("react-datepicker__current-month--hasYearDropdown"),r.props.showMonthDropdown&&t.push("react-datepicker__current-month--hasMonthDropdown"),r.props.showMonthYearDropdown&&t.push("react-datepicker__current-month--hasMonthYearDropdown"),de.default.createElement("div",{className:t.join(" ")},Ut(e,r.props.dateFormat,r.props.locale))})),Ct(Zt(r),"renderYearDropdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(r.props.showYearDropdown&&!e)return de.default.createElement(En,{adjustDateOnChange:r.props.adjustDateOnChange,date:r.state.date,onSelect:r.props.onSelect,setOpen:r.props.setOpen,dropdownMode:r.props.dropdownMode,onChange:r.changeYear,minDate:r.props.minDate,maxDate:r.props.maxDate,year:Ie.default(r.state.date),scrollableYearDropdown:r.props.scrollableYearDropdown,yearDropdownItemNumber:r.props.yearDropdownItemNumber})})),Ct(Zt(r),"renderMonthDropdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(r.props.showMonthDropdown&&!e)return de.default.createElement(On,{dropdownMode:r.props.dropdownMode,locale:r.props.locale,onChange:r.changeMonth,month:Ye.default(r.state.date),useShortMonthInDropdown:r.props.useShortMonthInDropdown})})),Ct(Zt(r),"renderMonthYearDropdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(r.props.showMonthYearDropdown&&!e)return de.default.createElement(An,{dropdownMode:r.props.dropdownMode,locale:r.props.locale,dateFormat:r.props.dateFormat,onChange:r.changeMonthYear,minDate:r.props.minDate,maxDate:r.props.maxDate,date:r.state.date,scrollableMonthYearDropdown:r.props.scrollableMonthYearDropdown})})),Ct(Zt(r),"handleTodayButtonClick",(function(e){r.props.onSelect(Kt(),e),r.props.setPreSelection&&r.props.setPreSelection(Kt())})),Ct(Zt(r),"renderTodayButton",(function(){if(r.props.todayButton&&!r.props.showTimeSelectOnly)return de.default.createElement("div",{className:"react-datepicker__today-button",onClick:function(e){return r.handleTodayButtonClick(e)}},r.props.todayButton)})),Ct(Zt(r),"renderDefaultHeader",(function(e){var t=e.monthDate,n=e.i;return de.default.createElement("div",{className:"react-datepicker__header ".concat(r.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},r.renderCurrentMonth(t),de.default.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(r.props.dropdownMode),onFocus:r.handleDropdownFocus},r.renderMonthDropdown(0!==n),r.renderMonthYearDropdown(0!==n),r.renderYearDropdown(0!==n)),de.default.createElement("div",{className:"react-datepicker__day-names"},r.header(t)))})),Ct(Zt(r),"renderCustomHeader",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.monthDate,n=e.i;if(r.props.showTimeSelect&&!r.state.monthContainer||r.props.showTimeSelectOnly)return null;var a=gn(r.state.date,r.props),o=yn(r.state.date,r.props),i=wn(r.state.date,r.props),s=bn(r.state.date,r.props),u=!r.props.showMonthYearPicker&&!r.props.showQuarterYearPicker&&!r.props.showYearPicker;return de.default.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:r.props.onDropdownFocus},r.props.renderCustomHeader(yt(yt({},r.state),{},{customHeaderCount:n,monthDate:t,changeMonth:r.changeMonth,changeYear:r.changeYear,decreaseMonth:r.decreaseMonth,increaseMonth:r.increaseMonth,decreaseYear:r.decreaseYear,increaseYear:r.increaseYear,prevMonthButtonDisabled:a,nextMonthButtonDisabled:o,prevYearButtonDisabled:i,nextYearButtonDisabled:s})),u&&de.default.createElement("div",{className:"react-datepicker__day-names"},r.header(t)))})),Ct(Zt(r),"renderYearHeader",(function(){var e=r.state.date,t=r.props,n=t.showYearPicker,a=xn(e,t.yearItemNumber),o=a.startPeriod,i=a.endPeriod;return de.default.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},n?"".concat(o," - ").concat(i):Ie.default(e))})),Ct(Zt(r),"renderHeader",(function(e){switch(!0){case void 0!==r.props.renderCustomHeader:return r.renderCustomHeader(e);case r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker:return r.renderYearHeader(e);default:return r.renderDefaultHeader(e)}})),Ct(Zt(r),"renderMonths",(function(){if(!r.props.showTimeSelectOnly&&!r.props.showYearPicker){for(var e=[],t=r.props.showPreviousMonths?r.props.monthsShown-1:0,n=Me.default(r.state.date,t),a=0;a0;e.push(de.default.createElement("div",{key:s,ref:function(e){r.monthContainer=e},className:"react-datepicker__month-container"},r.renderHeader({monthDate:i,i:a}),de.default.createElement(Kn,{chooseDayAriaLabelPrefix:r.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:r.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:r.props.weekAriaLabelPrefix,ariaLabelPrefix:r.props.monthAriaLabelPrefix,onChange:r.changeMonthYear,day:i,dayClassName:r.props.dayClassName,calendarStartDay:r.props.calendarStartDay,monthClassName:r.props.monthClassName,onDayClick:r.handleDayClick,handleOnKeyDown:r.props.handleOnDayKeyDown,onDayMouseEnter:r.handleDayMouseEnter,onMouseLeave:r.handleMonthMouseLeave,onWeekSelect:r.props.onWeekSelect,orderInDisplay:a,formatWeekNumber:r.props.formatWeekNumber,locale:r.props.locale,minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,highlightDates:r.props.highlightDates,selectingDate:r.state.selectingDate,includeDates:r.props.includeDates,includeDateIntervals:r.props.includeDateIntervals,inline:r.props.inline,shouldFocusDayInline:r.props.shouldFocusDayInline,fixedHeight:r.props.fixedHeight,filterDate:r.props.filterDate,preSelection:r.props.preSelection,setPreSelection:r.props.setPreSelection,selected:r.props.selected,selectsStart:r.props.selectsStart,selectsEnd:r.props.selectsEnd,selectsRange:r.props.selectsRange,selectsDisabledDaysInRange:r.props.selectsDisabledDaysInRange,showWeekNumbers:r.props.showWeekNumbers,startDate:r.props.startDate,endDate:r.props.endDate,peekNextMonth:r.props.peekNextMonth,setOpen:r.props.setOpen,shouldCloseOnSelect:r.props.shouldCloseOnSelect,renderDayContents:r.props.renderDayContents,renderMonthContent:r.props.renderMonthContent,renderQuarterContent:r.props.renderQuarterContent,renderYearContent:r.props.renderYearContent,disabledKeyboardNavigation:r.props.disabledKeyboardNavigation,showMonthYearPicker:r.props.showMonthYearPicker,showFullMonthYearPicker:r.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:r.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:r.props.showFourColumnMonthYearPicker,showYearPicker:r.props.showYearPicker,showQuarterYearPicker:r.props.showQuarterYearPicker,isInputFocused:r.props.isInputFocused,containerRef:r.containerRef,monthShowsDuplicateDaysEnd:u,monthShowsDuplicateDaysStart:c})))}return e}})),Ct(Zt(r),"renderYears",(function(){if(!r.props.showTimeSelectOnly)return r.props.showYearPicker?de.default.createElement("div",{className:"react-datepicker__year--container"},r.renderHeader(),de.default.createElement(zn,St({onDayClick:r.handleDayClick,selectingDate:r.state.selectingDate,clearSelectingDate:r.clearSelectingDate,date:r.state.date},r.props,{onYearMouseEnter:r.handleYearMouseEnter,onYearMouseLeave:r.handleYearMouseLeave}))):void 0})),Ct(Zt(r),"renderTimeSection",(function(){if(r.props.showTimeSelect&&(r.state.monthContainer||r.props.showTimeSelectOnly))return de.default.createElement(Vn,{selected:r.props.selected,openToDate:r.props.openToDate,onChange:r.props.onTimeChange,timeClassName:r.props.timeClassName,format:r.props.timeFormat,includeTimes:r.props.includeTimes,intervals:r.props.timeIntervals,minTime:r.props.minTime,maxTime:r.props.maxTime,excludeTimes:r.props.excludeTimes,filterTime:r.props.filterTime,timeCaption:r.props.timeCaption,todayButton:r.props.todayButton,showMonthDropdown:r.props.showMonthDropdown,showMonthYearDropdown:r.props.showMonthYearDropdown,showYearDropdown:r.props.showYearDropdown,withPortal:r.props.withPortal,monthRef:r.state.monthContainer,injectTimes:r.props.injectTimes,locale:r.props.locale,handleOnKeyDown:r.props.handleOnKeyDown,showTimeSelectOnly:r.props.showTimeSelectOnly})})),Ct(Zt(r),"renderInputTimeSection",(function(){var e=new Date(r.props.selected),t=Ft(e)&&Boolean(r.props.selected)?"".concat(Mn(e.getHours()),":").concat(Mn(e.getMinutes())):"";if(r.props.showTimeInput)return de.default.createElement(Xn,{date:e,timeString:t,timeInputLabel:r.props.timeInputLabel,onChange:r.props.onTimeChange,customTimeInput:r.props.customTimeInput})})),Ct(Zt(r),"renderAriaLiveRegion",(function(){var e,t=xn(r.state.date,r.props.yearItemNumber),n=t.startPeriod,a=t.endPeriod;return e=r.props.showYearPicker?"".concat(n," - ").concat(a):r.props.showMonthYearPicker||r.props.showQuarterYearPicker?Ie.default(r.state.date):"".concat(nn(Ye.default(r.state.date),r.props.locale)," ").concat(Ie.default(r.state.date)),de.default.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},r.state.isRenderAriaLiveMessage&&e)})),Ct(Zt(r),"renderChildren",(function(){if(r.props.children)return de.default.createElement("div",{className:"react-datepicker__children-container"},r.props.children)})),r.containerRef=de.default.createRef(),r.state={date:r.getDateInView(),selectingDate:null,monthContainer:null,isRenderAriaLiveMessage:!1},r}return kt(n,[{key:"componentDidMount",value:function(){var e=this;this.props.showTimeSelect&&(this.assignMonthContainer=void e.setState({monthContainer:e.monthContainer}))}},{key:"componentDidUpdate",value:function(e){var t=this;if(!this.props.preSelection||Gt(this.props.preSelection,e.preSelection)&&this.props.monthSelectedIn===e.monthSelectedIn)this.props.openToDate&&!Gt(this.props.openToDate,e.openToDate)&&this.setState({date:this.props.openToDate});else{var n=!zt(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},(function(){return n&&t.handleCustomMonthChange(t.state.date)}))}}},{key:"render",value:function(){var e=this.props.container||Gn;return de.default.createElement("div",{ref:this.containerRef},de.default.createElement(e,{className:pe.default("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))}}],[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:It}}}]),n}(de.default.Component),er=function(e){Mt(n,e);var t=_t(n);function n(e){var r;return bt(this,n),(r=t.call(this,e)).el=document.createElement("div"),r}return kt(n,[{key:"componentDidMount",value:function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.portalRoot.removeChild(this.el)}},{key:"render",value:function(){return vt.default.createPortal(this.props.children,this.el)}}]),n}(de.default.Component),tr=function(e){return!e.disabled&&-1!==e.tabIndex},nr=function(e){Mt(n,e);var t=_t(n);function n(e){var r;return bt(this,n),Ct(Zt(r=t.call(this,e)),"getTabChildren",(function(){return Array.prototype.slice.call(r.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter(tr)})),Ct(Zt(r),"handleFocusStart",(function(){var e=r.getTabChildren();e&&e.length>1&&e[e.length-1].focus()})),Ct(Zt(r),"handleFocusEnd",(function(){var e=r.getTabChildren();e&&e.length>1&&e[0].focus()})),r.tabLoopRef=de.default.createRef(),r}return kt(n,[{key:"render",value:function(){return this.props.enableTabLoop?de.default.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},de.default.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,de.default.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),n}(de.default.Component),rr=function(e){Mt(n,e);var t=_t(n);function n(){return bt(this,n),t.apply(this,arguments)}return kt(n,[{key:"render",value:function(){var e,t=this.props,n=t.className,r=t.wrapperClassName,a=t.hidePopper,o=t.popperComponent,i=t.popperModifiers,s=t.popperPlacement,u=t.popperProps,c=t.targetComponent,l=t.enableTabLoop,d=t.popperOnKeyDown,p=t.portalId,f=t.portalHost;if(!a){var h=pe.default("react-datepicker-popper",n);e=de.default.createElement(ue.Popper,St({modifiers:i,placement:s},u),(function(e){var t=e.ref,n=e.style,r=e.placement,a=e.arrowProps;return de.default.createElement(nr,{enableTabLoop:l},de.default.createElement("div",{ref:t,style:n,className:h,"data-placement":r,onKeyDown:d},de.default.cloneElement(o,{arrowProps:a})))}))}this.props.popperContainer&&(e=de.default.createElement(this.props.popperContainer,{},e)),p&&!a&&(e=de.default.createElement(er,{portalId:p,portalHost:f},e));var v=pe.default("react-datepicker-wrapper",r);return de.default.createElement(ue.Manager,{className:"react-datepicker-manager"},de.default.createElement(ue.Reference,null,(function(e){var t=e.ref;return de.default.createElement("div",{ref:t,className:v},c)})),e)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:[],popperProps:{},popperPlacement:"bottom-start"}}}]),n}(de.default.Component),ar="react-datepicker-ignore-onclickoutside",or=ht.default(Jn),ir="Date input not valid.",sr=function(e){Mt(n,e);var t=_t(n);function n(e){var r;return bt(this,n),Ct(Zt(r=t.call(this,e)),"getPreSelection",(function(){return r.props.openToDate?r.props.openToDate:r.props.selectsEnd&&r.props.startDate?r.props.startDate:r.props.selectsStart&&r.props.endDate?r.props.endDate:At()})),Ct(Zt(r),"calcInitialState",(function(){var e,t=r.getPreSelection(),n=Dn(r.props),a=kn(r.props),o=n&&ct.default(t,ze.default(n))?n:a&&ut.default(t,et.default(a))?a:t;return{open:r.props.startOpen||!1,preventFocus:!1,preSelection:null!==(e=r.props.selectsRange?r.props.startDate:r.props.selected)&&void 0!==e?e:o,highlightDates:Cn(r.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1}})),Ct(Zt(r),"clearPreventFocusTimeout",(function(){r.preventFocusTimeout&&clearTimeout(r.preventFocusTimeout)})),Ct(Zt(r),"setFocus",(function(){r.input&&r.input.focus&&r.input.focus({preventScroll:!0})})),Ct(Zt(r),"setBlur",(function(){r.input&&r.input.blur&&r.input.blur(),r.cancelFocusInput()})),Ct(Zt(r),"setOpen",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r.setState({open:e,preSelection:e&&r.state.open?r.state.preSelection:r.calcInitialState().preSelection,lastPreSelectChange:cr},(function(){e||r.setState((function(e){return{focused:!!t&&e.focused}}),(function(){!t&&r.setBlur(),r.setState({inputValue:null})}))}))})),Ct(Zt(r),"inputOk",(function(){return fe.default(r.state.preSelection)})),Ct(Zt(r),"isCalendarOpen",(function(){return void 0===r.props.open?r.state.open&&!r.props.disabled&&!r.props.readOnly:r.props.open})),Ct(Zt(r),"handleFocus",(function(e){r.state.preventFocus||(r.props.onFocus(e),r.props.preventOpenOnFocus||r.props.readOnly||r.setOpen(!0)),r.setState({focused:!0})})),Ct(Zt(r),"cancelFocusInput",(function(){clearTimeout(r.inputFocusTimeout),r.inputFocusTimeout=null})),Ct(Zt(r),"deferFocusInput",(function(){r.cancelFocusInput(),r.inputFocusTimeout=setTimeout((function(){return r.setFocus()}),1)})),Ct(Zt(r),"handleDropdownFocus",(function(){r.cancelFocusInput()})),Ct(Zt(r),"handleBlur",(function(e){(!r.state.open||r.props.withPortal||r.props.showTimeInput)&&r.props.onBlur(e),r.setState({focused:!1})})),Ct(Zt(r),"handleCalendarClickOutside",(function(e){r.props.inline||r.setOpen(!1),r.props.onClickOutside(e),r.props.withPortal&&e.preventDefault()})),Ct(Zt(r),"handleChange",(function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&(l=pt.default(o,i.slice(0,o.length),new Date)),Ft(l)||(l=new Date(o))),Ft(l)&&p?l:null));r.props.showTimeSelectOnly&&r.props.selected&&!Gt(f,r.props.selected)&&(f=null==f?mt.default(r.props.selected,{hours:Ee.default(r.props.selected),minutes:_e.default(r.props.selected),seconds:Ze.default(r.props.selected)}):mt.default(r.props.selected,{hours:Ee.default(f),minutes:_e.default(f),seconds:Ze.default(f)})),!f&&a.target.value||r.setSelected(f,a,!0)}})),Ct(Zt(r),"handleSelect",(function(e,t,n){if(r.setState({preventFocus:!0},(function(){return r.preventFocusTimeout=setTimeout((function(){return r.setState({preventFocus:!1})}),50),r.preventFocusTimeout})),r.props.onChangeRaw&&r.props.onChangeRaw(t),r.setSelected(e,t,!1,n),r.props.showDateSelect&&r.setState({isRenderAriaLiveMessage:!0}),!r.props.shouldCloseOnSelect||r.props.showTimeSelect)r.setPreSelection(e);else if(!r.props.inline){r.props.selectsRange||r.setOpen(!1);var a=r.props,o=a.startDate,i=a.endDate;!o||i||ct.default(e,o)||r.setOpen(!1)}})),Ct(Zt(r),"setSelected",(function(e,t,n,a){var o=e;if(r.props.showYearPicker){if(null!==o&&dn(Ie.default(o),r.props))return}else if(r.props.showMonthYearPicker){if(null!==o&&sn(o,r.props))return}else if(null!==o&&an(o,r.props))return;var i=r.props,s=i.onChange,u=i.selectsRange,c=i.startDate,l=i.endDate;if(!$t(r.props.selected,o)||r.props.allowSameDay||u)if(null!==o&&(!r.props.selected||n&&(r.props.showTimeSelect||r.props.showTimeSelectOnly||r.props.showTimeInput)||(o=Ht(o,{hour:Ee.default(r.props.selected),minute:_e.default(r.props.selected),second:Ze.default(r.props.selected)})),r.props.inline||r.setState({preSelection:o}),r.props.focusSelectedMonth||r.setState({monthSelectedIn:a})),u){var d=c&&l;c||l?c&&!l&&(ct.default(o,c)?s([o,null],t):s([c,o],t)):s([o,null],t),d&&s([o,null],t)}else s(o,t);n||(r.props.onSelect(o,t),r.setState({inputValue:null}))})),Ct(Zt(r),"setPreSelection",(function(e){var t=void 0!==r.props.minDate,n=void 0!==r.props.maxDate,a=!0;if(e){var o=ze.default(e);if(t&&n)a=Jt(e,r.props.minDate,r.props.maxDate);else if(t){var i=ze.default(r.props.minDate);a=ut.default(e,i)||$t(o,i)}else if(n){var s=et.default(r.props.maxDate);a=ct.default(e,s)||$t(o,s)}}a&&r.setState({preSelection:e})})),Ct(Zt(r),"handleTimeChange",(function(e){var t=Ht(r.props.selected?r.props.selected:r.getPreSelection(),{hour:Ee.default(e),minute:_e.default(e)});r.setState({preSelection:t}),r.props.onChange(t),r.props.shouldCloseOnSelect&&r.setOpen(!1),r.props.showTimeInput&&r.setOpen(!0),(r.props.showTimeSelectOnly||r.props.showTimeSelect)&&r.setState({isRenderAriaLiveMessage:!0}),r.setState({inputValue:null})})),Ct(Zt(r),"onInputClick",(function(){r.props.disabled||r.props.readOnly||r.setOpen(!0),r.props.onInputClick()})),Ct(Zt(r),"onInputKeyDown",(function(e){r.props.onKeyDown(e);var t=e.key;if(r.state.open||r.props.inline||r.props.preventOpenOnFocus){if(r.state.open){if("ArrowDown"===t||"ArrowUp"===t){e.preventDefault();var n=r.calendar.componentNode&&r.calendar.componentNode.querySelector('.react-datepicker__day[tabindex="0"]');return void(n&&n.focus({preventScroll:!0}))}var a=At(r.state.preSelection);"Enter"===t?(e.preventDefault(),r.inputOk()&&r.state.lastPreSelectChange===cr?(r.handleSelect(a,e),!r.props.shouldCloseOnSelect&&r.setPreSelection(a)):r.setOpen(!1)):"Escape"===t?(e.preventDefault(),r.setOpen(!1)):"Tab"===t&&e.shiftKey&&r.setOpen(!1),r.inputOk()||r.props.onInputError({code:1,msg:ir})}}else"ArrowDown"!==t&&"ArrowUp"!==t&&"Enter"!==t||r.onInputClick()})),Ct(Zt(r),"onPortalKeyDown",(function(e){"Escape"===e.key&&(e.preventDefault(),r.setState({preventFocus:!0},(function(){r.setOpen(!1),setTimeout((function(){r.setFocus(),r.setState({preventFocus:!1})}))})))})),Ct(Zt(r),"onDayKeyDown",(function(e){r.props.onKeyDown(e);var t=e.key,n=At(r.state.preSelection);if("Enter"===t)e.preventDefault(),r.handleSelect(n,e),!r.props.shouldCloseOnSelect&&r.setPreSelection(n);else if("Escape"===t)e.preventDefault(),r.setOpen(!1),r.inputOk()||r.props.onInputError({code:1,msg:ir});else if(!r.props.disabledKeyboardNavigation){var a;switch(t){case"ArrowLeft":a=Ce.default(n,1);break;case"ArrowRight":a=ye.default(n,1);break;case"ArrowUp":a=Se.default(n,1);break;case"ArrowDown":a=we.default(n,1);break;case"PageUp":a=Me.default(n,1);break;case"PageDown":a=be.default(n,1);break;case"Home":a=Te.default(n,1);break;case"End":a=ke.default(n,1)}if(!a)return void(r.props.onInputError&&r.props.onInputError({code:1,msg:ir}));if(e.preventDefault(),r.setState({lastPreSelectChange:cr}),r.props.adjustDateOnChange&&r.setSelected(a),r.setPreSelection(a),r.props.inline){var o=Ye.default(n),i=Ye.default(a),s=Ie.default(n),u=Ie.default(a);o!==i||s!==u?r.setState({shouldFocusDayInline:!0}):r.setState({shouldFocusDayInline:!1})}}})),Ct(Zt(r),"onPopperKeyDown",(function(e){"Escape"===e.key&&(e.preventDefault(),r.setState({preventFocus:!0},(function(){r.setOpen(!1),setTimeout((function(){r.setFocus(),r.setState({preventFocus:!1})}))})))})),Ct(Zt(r),"onClearClick",(function(e){e&&e.preventDefault&&e.preventDefault(),r.props.selectsRange?r.props.onChange([null,null],e):r.props.onChange(null,e),r.setState({inputValue:null})})),Ct(Zt(r),"clear",(function(){r.onClearClick()})),Ct(Zt(r),"onScroll",(function(e){"boolean"==typeof r.props.closeOnScroll&&r.props.closeOnScroll?e.target!==document&&e.target!==document.documentElement&&e.target!==document.body||r.setOpen(!1):"function"==typeof r.props.closeOnScroll&&r.props.closeOnScroll(e)&&r.setOpen(!1)})),Ct(Zt(r),"renderCalendar",(function(){return r.props.inline||r.isCalendarOpen()?de.default.createElement(or,{ref:function(e){r.calendar=e},locale:r.props.locale,calendarStartDay:r.props.calendarStartDay,chooseDayAriaLabelPrefix:r.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:r.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:r.props.weekAriaLabelPrefix,monthAriaLabelPrefix:r.props.monthAriaLabelPrefix,adjustDateOnChange:r.props.adjustDateOnChange,setOpen:r.setOpen,shouldCloseOnSelect:r.props.shouldCloseOnSelect,dateFormat:r.props.dateFormatCalendar,useWeekdaysShort:r.props.useWeekdaysShort,formatWeekDay:r.props.formatWeekDay,dropdownMode:r.props.dropdownMode,selected:r.props.selected,preSelection:r.state.preSelection,onSelect:r.handleSelect,onWeekSelect:r.props.onWeekSelect,openToDate:r.props.openToDate,minDate:r.props.minDate,maxDate:r.props.maxDate,selectsStart:r.props.selectsStart,selectsEnd:r.props.selectsEnd,selectsRange:r.props.selectsRange,startDate:r.props.startDate,endDate:r.props.endDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,filterDate:r.props.filterDate,onClickOutside:r.handleCalendarClickOutside,formatWeekNumber:r.props.formatWeekNumber,highlightDates:r.state.highlightDates,includeDates:r.props.includeDates,includeDateIntervals:r.props.includeDateIntervals,includeTimes:r.props.includeTimes,injectTimes:r.props.injectTimes,inline:r.props.inline,shouldFocusDayInline:r.state.shouldFocusDayInline,peekNextMonth:r.props.peekNextMonth,showMonthDropdown:r.props.showMonthDropdown,showPreviousMonths:r.props.showPreviousMonths,useShortMonthInDropdown:r.props.useShortMonthInDropdown,showMonthYearDropdown:r.props.showMonthYearDropdown,showWeekNumbers:r.props.showWeekNumbers,showYearDropdown:r.props.showYearDropdown,withPortal:r.props.withPortal,forceShowMonthNavigation:r.props.forceShowMonthNavigation,showDisabledMonthNavigation:r.props.showDisabledMonthNavigation,scrollableYearDropdown:r.props.scrollableYearDropdown,scrollableMonthYearDropdown:r.props.scrollableMonthYearDropdown,todayButton:r.props.todayButton,weekLabel:r.props.weekLabel,outsideClickIgnoreClass:ar,fixedHeight:r.props.fixedHeight,monthsShown:r.props.monthsShown,monthSelectedIn:r.state.monthSelectedIn,onDropdownFocus:r.handleDropdownFocus,onMonthChange:r.props.onMonthChange,onYearChange:r.props.onYearChange,dayClassName:r.props.dayClassName,weekDayClassName:r.props.weekDayClassName,monthClassName:r.props.monthClassName,timeClassName:r.props.timeClassName,showDateSelect:r.props.showDateSelect,showTimeSelect:r.props.showTimeSelect,showTimeSelectOnly:r.props.showTimeSelectOnly,onTimeChange:r.handleTimeChange,timeFormat:r.props.timeFormat,timeIntervals:r.props.timeIntervals,minTime:r.props.minTime,maxTime:r.props.maxTime,excludeTimes:r.props.excludeTimes,filterTime:r.props.filterTime,timeCaption:r.props.timeCaption,className:r.props.calendarClassName,container:r.props.calendarContainer,yearItemNumber:r.props.yearItemNumber,yearDropdownItemNumber:r.props.yearDropdownItemNumber,previousMonthAriaLabel:r.props.previousMonthAriaLabel,previousMonthButtonLabel:r.props.previousMonthButtonLabel,nextMonthAriaLabel:r.props.nextMonthAriaLabel,nextMonthButtonLabel:r.props.nextMonthButtonLabel,previousYearAriaLabel:r.props.previousYearAriaLabel,previousYearButtonLabel:r.props.previousYearButtonLabel,nextYearAriaLabel:r.props.nextYearAriaLabel,nextYearButtonLabel:r.props.nextYearButtonLabel,timeInputLabel:r.props.timeInputLabel,disabledKeyboardNavigation:r.props.disabledKeyboardNavigation,renderCustomHeader:r.props.renderCustomHeader,popperProps:r.props.popperProps,renderDayContents:r.props.renderDayContents,renderMonthContent:r.props.renderMonthContent,renderQuarterContent:r.props.renderQuarterContent,renderYearContent:r.props.renderYearContent,onDayMouseEnter:r.props.onDayMouseEnter,onMonthMouseLeave:r.props.onMonthMouseLeave,onYearMouseEnter:r.props.onYearMouseEnter,onYearMouseLeave:r.props.onYearMouseLeave,selectsDisabledDaysInRange:r.props.selectsDisabledDaysInRange,showTimeInput:r.props.showTimeInput,showMonthYearPicker:r.props.showMonthYearPicker,showFullMonthYearPicker:r.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:r.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:r.props.showFourColumnMonthYearPicker,showYearPicker:r.props.showYearPicker,showQuarterYearPicker:r.props.showQuarterYearPicker,showPopperArrow:r.props.showPopperArrow,excludeScrollbar:r.props.excludeScrollbar,handleOnKeyDown:r.props.onKeyDown,handleOnDayKeyDown:r.onDayKeyDown,isInputFocused:r.state.focused,customTimeInput:r.props.customTimeInput,setPreSelection:r.setPreSelection},r.props.children):null})),Ct(Zt(r),"renderAriaLiveRegion",(function(){var e,t=r.props,n=t.dateFormat,a=t.locale,o=r.props.showTimeInput||r.props.showTimeSelect?"PPPPp":"PPPP";return e=r.props.selectsRange?"Selected start date: ".concat(jt(r.props.startDate,{dateFormat:o,locale:a}),". ").concat(r.props.endDate?"End date: "+jt(r.props.endDate,{dateFormat:o,locale:a}):""):r.props.showTimeSelectOnly?"Selected time: ".concat(jt(r.props.selected,{dateFormat:n,locale:a})):r.props.showYearPicker?"Selected year: ".concat(jt(r.props.selected,{dateFormat:"yyyy",locale:a})):r.props.showMonthYearPicker?"Selected month: ".concat(jt(r.props.selected,{dateFormat:"MMMM yyyy",locale:a})):r.props.showQuarterYearPicker?"Selected quarter: ".concat(jt(r.props.selected,{dateFormat:"yyyy, QQQ",locale:a})):"Selected date: ".concat(jt(r.props.selected,{dateFormat:o,locale:a})),de.default.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},e)})),Ct(Zt(r),"renderDateInput",(function(){var e,t=pe.default(r.props.className,Ct({},ar,r.state.open)),n=r.props.customInput||de.default.createElement("input",{type:"text"}),a=r.props.customInputRef||"ref",o="string"==typeof r.props.value?r.props.value:"string"==typeof r.state.inputValue?r.state.inputValue:r.props.selectsRange?function(e,t,n){if(!e)return"";var r=jt(e,n),a=t?jt(t,n):"";return"".concat(r," - ").concat(a)}(r.props.startDate,r.props.endDate,r.props):jt(r.props.selected,r.props);return de.default.cloneElement(n,(Ct(e={},a,(function(e){r.input=e})),Ct(e,"value",o),Ct(e,"onBlur",r.handleBlur),Ct(e,"onChange",r.handleChange),Ct(e,"onClick",r.onInputClick),Ct(e,"onFocus",r.handleFocus),Ct(e,"onKeyDown",r.onInputKeyDown),Ct(e,"id",r.props.id),Ct(e,"name",r.props.name),Ct(e,"form",r.props.form),Ct(e,"autoFocus",r.props.autoFocus),Ct(e,"placeholder",r.props.placeholderText),Ct(e,"disabled",r.props.disabled),Ct(e,"autoComplete",r.props.autoComplete),Ct(e,"className",pe.default(n.props.className,t)),Ct(e,"title",r.props.title),Ct(e,"readOnly",r.props.readOnly),Ct(e,"required",r.props.required),Ct(e,"tabIndex",r.props.tabIndex),Ct(e,"aria-describedby",r.props.ariaDescribedBy),Ct(e,"aria-invalid",r.props.ariaInvalid),Ct(e,"aria-labelledby",r.props.ariaLabelledBy),Ct(e,"aria-required",r.props.ariaRequired),e))})),Ct(Zt(r),"renderClearButton",(function(){var e=r.props,t=e.isClearable,n=e.selected,a=e.startDate,o=e.endDate,i=e.clearButtonTitle,s=e.clearButtonClassName,u=void 0===s?"":s,c=e.ariaLabelClose,l=void 0===c?"Close":c;return!t||null==n&&null==a&&null==o?null:de.default.createElement("button",{type:"button",className:"react-datepicker__close-icon ".concat(u).trim(),"aria-label":l,onClick:r.onClearClick,title:i,tabIndex:-1})})),r.state=r.calcInitialState(),r}return kt(n,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.onScroll,!0)}},{key:"componentDidUpdate",value:function(e,t){var n,r;e.inline&&(n=e.selected,r=this.props.selected,n&&r?Ye.default(n)!==Ye.default(r)||Ie.default(n)!==Ie.default(r):n!==r)&&this.setPreSelection(this.props.selected),void 0!==this.state.monthSelectedIn&&e.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),e.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Cn(this.props.highlightDates)}),t.focused||$t(e.selected,this.props.selected)||this.setState({inputValue:null}),t.open!==this.state.open&&(!1===t.open&&!0===this.state.open&&this.props.onCalendarOpen(),!0===t.open&&!1===this.state.open&&this.props.onCalendarClose())}},{key:"componentWillUnmount",value:function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0)}},{key:"renderInputContainer",value:function(){var e=this.props.showIcon;return de.default.createElement("div",{className:"react-datepicker__input-container".concat(e?" react-datepicker__view-calendar-icon":"")},e&&de.default.createElement("svg",{className:"react-datepicker__calendar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},de.default.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"})),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())}},{key:"render",value:function(){var e=this.renderCalendar();if(this.props.inline)return e;if(this.props.withPortal){var t=this.state.open?de.default.createElement(nr,{enableTabLoop:this.props.enableTabLoop},de.default.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},e)):null;return this.state.open&&this.props.portalId&&(t=de.default.createElement(er,{portalId:this.props.portalId,portalHost:this.props.portalHost},t)),de.default.createElement("div",null,this.renderInputContainer(),t)}return de.default.createElement(rr,{className:this.props.popperClassName,wrapperClassName:this.props.wrapperClassName,hidePopper:!this.isCalendarOpen(),portalId:this.props.portalId,portalHost:this.props.portalHost,popperModifiers:this.props.popperModifiers,targetComponent:this.renderInputContainer(),popperContainer:this.props.popperContainer,popperComponent:e,popperPlacement:this.props.popperPlacement,popperProps:this.props.popperProps,popperOnKeyDown:this.onPopperKeyDown,enableTabLoop:this.props.enableTabLoop})}}],[{key:"defaultProps",get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",onChange:function(){},disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onInputClick:function(){},onSelect:function(){},onClickOutside:function(){},onMonthChange:function(){},onCalendarOpen:function(){},onCalendarClose:function(){},preventOpenOnFocus:!1,onYearChange:function(){},onInputError:function(){},monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,strictParsing:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:It,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0}}}]),n}(de.default.Component),ur="input",cr="navigate";e.CalendarContainer=Gn,e.default=sr,e.getDefaultLocale=en,e.registerLocale=function(e,t){var n="undefined"!=typeof window?window:globalThis;n.__localeData__||(n.__localeData__={}),n.__localeData__[e]=t},e.setDefaultLocale=function(e){("undefined"!=typeof window?window:globalThis).__localeId__=e},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(67294),n(45697),n(94184),n(71381),n(12274),n(49546),n(58545),n(78343),n(77349),n(63500),n(11640),n(8791),n(21593),n(7069),n(77982),n(54559),n(58793),n(59319),n(77881),n(39159),n(85817),n(20466),n(55855),n(9827),n(78966),n(56605),n(95570),n(28789),n(39880),n(4543),n(37042),n(62225),n(11503),n(44749),n(37950),n(99890),n(92300),n(84129),n(91857),n(69119),n(584),n(43703),n(94431),n(38148),n(83894),n(67090),n(4135),n(10876),n(96843),n(3151),n(49160),n(60792),n(86117),n(42699),n(313),n(24257),n(19013),n(76417),n(23855),n(58949),n(73935),n(12053),n(92311))},69590:function(e){var t="undefined"!==typeof Element,n="function"===typeof Map,r="function"===typeof Set,a="function"===typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){if(e.constructor!==i.constructor)return!1;var s,u,c,l;if(Array.isArray(e)){if((s=e.length)!=i.length)return!1;for(u=s;0!==u--;)if(!o(e[u],i[u]))return!1;return!0}if(n&&e instanceof Map&&i instanceof Map){if(e.size!==i.size)return!1;for(l=e.entries();!(u=l.next()).done;)if(!i.has(u.value[0]))return!1;for(l=e.entries();!(u=l.next()).done;)if(!o(u.value[1],i.get(u.value[0])))return!1;return!0}if(r&&e instanceof Set&&i instanceof Set){if(e.size!==i.size)return!1;for(l=e.entries();!(u=l.next()).done;)if(!i.has(u.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(i)){if((s=e.length)!=i.length)return!1;for(u=s;0!==u--;)if(e[u]!==i[u])return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===i.toString();if((s=(c=Object.keys(e)).length)!==Object.keys(i).length)return!1;for(u=s;0!==u--;)if(!Object.prototype.hasOwnProperty.call(i,c[u]))return!1;if(t&&e instanceof Element)return!1;for(u=s;0!==u--;)if(("_owner"!==c[u]&&"__v"!==c[u]&&"__o"!==c[u]||!e.$$typeof)&&!o(e[c[u]],i[c[u]]))return!1;return!0}return e!==e&&i!==i}e.exports=function(e,t){try{return o(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},58949:function(e,t,n){"use strict";n.r(t),n.d(t,{IGNORE_CLASS_NAME:function(){return h}});var r=n(67294),a=n(73935);function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t,n){return e===t||(e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n))}var u,c,l=(void 0===u&&(u=0),function(){return++u}),d={},p={},f=["touchstart","touchmove"],h="ignore-react-onclickoutside";function v(e,t){var n={};return-1!==f.indexOf(t)&&c&&(n.passive=!e.props.preventDefault),n}t.default=function(e,t){var n,u,f=e.displayName||e.name||"Component";return u=n=function(n){var u,h;function m(e){var r;return(r=n.call(this,e)||this).__outsideClickHandler=function(e){if("function"!==typeof r.__clickOutsideHandlerProp){var t=r.getInstance();if("function"!==typeof t.props.handleClickOutside){if("function"!==typeof t.handleClickOutside)throw new Error("WrappedComponent: "+f+" lacks a handleClickOutside(event) function for processing outside click events.");t.handleClickOutside(e)}else t.props.handleClickOutside(e)}else r.__clickOutsideHandlerProp(e)},r.__getComponentNode=function(){var e=r.getInstance();return t&&"function"===typeof t.setClickOutsideRef?t.setClickOutsideRef()(e):"function"===typeof e.setClickOutsideRef?e.setClickOutsideRef():(0,a.findDOMNode)(e)},r.enableOnClickOutside=function(){if("undefined"!==typeof document&&!p[r._uid]){"undefined"===typeof c&&(c=function(){if("undefined"!==typeof window&&"function"===typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),e}}()),p[r._uid]=!0;var e=r.props.eventTypes;e.forEach||(e=[e]),d[r._uid]=function(e){var t;null!==r.componentNode&&(r.props.preventDefault&&e.preventDefault(),r.props.stopPropagation&&e.stopPropagation(),r.props.excludeScrollbar&&(t=e,document.documentElement.clientWidth<=t.clientX||document.documentElement.clientHeight<=t.clientY)||function(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&s(e,t,n))return!0;e=e.parentNode||e.host}return e}(e.composed&&e.composedPath&&e.composedPath().shift()||e.target,r.componentNode,r.props.outsideClickIgnoreClass)===document&&r.__outsideClickHandler(e))},e.forEach((function(e){document.addEventListener(e,d[r._uid],v(i(r),e))}))}},r.disableOnClickOutside=function(){delete p[r._uid];var e=d[r._uid];if(e&&"undefined"!==typeof document){var t=r.props.eventTypes;t.forEach||(t=[t]),t.forEach((function(t){return document.removeEventListener(t,e,v(i(r),t))})),delete d[r._uid]}},r.getRef=function(e){return r.instanceRef=e},r._uid=l(),r}h=n,(u=m).prototype=Object.create(h.prototype),u.prototype.constructor=u,o(u,h);var g=m.prototype;return g.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var t=this.instanceRef;return t.getInstance?t.getInstance():t},g.componentDidMount=function(){if("undefined"!==typeof document&&document.createElement){var e=this.getInstance();if(t&&"function"===typeof t.handleClickOutside&&(this.__clickOutsideHandlerProp=t.handleClickOutside(e),"function"!==typeof this.__clickOutsideHandlerProp))throw new Error("WrappedComponent: "+f+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),this.props.disableOnClickOutside||this.enableOnClickOutside()}},g.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},g.componentWillUnmount=function(){this.disableOnClickOutside()},g.render=function(){var t=this.props;t.excludeScrollbar;var n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(t,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,(0,r.createElement)(e,n)},m}(r.Component),n.displayName="OnClickOutside("+f+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:h,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},u}},12053:function(e,t,n){"use strict";n.r(t),n.d(t,{Manager:function(){return i},Popper:function(){return Re},Reference:function(){return Ae},usePopper:function(){return Ne}});var r=n(67294),a=r.createContext(),o=r.createContext();function i(e){var t=e.children,n=r.useState(null),i=n[0],s=n[1],u=r.useRef(!1);r.useEffect((function(){return function(){u.current=!0}}),[]);var c=r.useCallback((function(e){u.current||s(e)}),[]);return r.createElement(a.Provider,{value:i},r.createElement(o.Provider,{value:c},t))}var s=function(e){return Array.isArray(e)?e[0]:e},u=function(e){if("function"===typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&w(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&w(r.height)/e.offsetHeight||1);var i=(h(e)?f(e):window).visualViewport,s=!D()&&n,u=(r.left+(s&&i?i.offsetLeft:0))/a,c=(r.top+(s&&i?i.offsetTop:0))/o,l=r.width/a,d=r.height/o;return{width:l,height:d,top:c,right:u+l,bottom:c+d,left:u,x:u,y:c}}function C(e){var t=f(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function S(e){return e?(e.nodeName||"").toLowerCase():null}function M(e){return((h(e)?e.ownerDocument:e.document)||window.document).documentElement}function x(e){return k(M(e)).left+C(e).scrollLeft}function T(e){return f(e).getComputedStyle(e)}function Z(e){var t=T(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+r)}function _(e,t,n){void 0===n&&(n=!1);var r=v(t),a=v(t)&&function(e){var t=e.getBoundingClientRect(),n=w(t.width)/e.offsetWidth||1,r=w(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),o=M(t),i=k(e,a,n),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==S(t)||Z(o))&&(s=function(e){return e!==f(e)&&v(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:C(e);var t}(t)),v(t)?((u=k(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):o&&(u.x=x(o))),{x:i.left+s.scrollLeft-u.x,y:i.top+s.scrollTop-u.y,width:i.width,height:i.height}}function E(e){var t=k(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function N(e){return"html"===S(e)?e:e.assignedSlot||e.parentNode||(m(e)?e.host:null)||M(e)}function P(e){return["html","body","#document"].indexOf(S(e))>=0?e.ownerDocument.body:v(e)&&Z(e)?e:P(N(e))}function O(e,t){var n;void 0===t&&(t=[]);var r=P(e),a=r===(null==(n=e.ownerDocument)?void 0:n.body),o=f(r),i=a?[o].concat(o.visualViewport||[],Z(r)?r:[]):r,s=t.concat(i);return a?s:s.concat(O(N(i)))}function Y(e){return["table","td","th"].indexOf(S(e))>=0}function R(e){return v(e)&&"fixed"!==T(e).position?e.offsetParent:null}function I(e){for(var t=f(e),n=R(e);n&&Y(n)&&"static"===T(n).position;)n=R(n);return n&&("html"===S(n)||"body"===S(n)&&"static"===T(n).position)?t:n||function(e){var t=/firefox/i.test(b());if(/Trident/i.test(b())&&v(e)&&"fixed"===T(e).position)return null;var n=N(e);for(m(n)&&(n=n.host);v(n)&&["html","body"].indexOf(S(n))<0;){var r=T(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var L="top",A="bottom",F="right",U="left",j="auto",H=[L,A,F,U],W="start",B="end",q="clippingParents",Q="viewport",K="popper",V="reference",z=H.reduce((function(e,t){return e.concat([t+"-"+W,t+"-"+B])}),[]),X=[].concat(H,[j]).reduce((function(e,t){return e.concat([t,t+"-"+W,t+"-"+B])}),[]),G=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function $(e){var t=new Map,n=new Set,r=[];function a(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&a(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||a(e)})),r}function J(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var ee={placement:"bottom",modifiers:[],strategy:"absolute"};function te(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function se(e){var t,n=e.reference,r=e.element,a=e.placement,o=a?ae(a):null,i=a?oe(a):null,s=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(o){case L:t={x:s,y:n.y-r.height};break;case A:t={x:s,y:n.y+n.height};break;case F:t={x:n.x+n.width,y:u};break;case U:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var c=o?ie(o):null;if(null!=c){var l="y"===c?"height":"width";switch(i){case W:t[c]=t[c]-(n[l]/2-r[l]/2);break;case B:t[c]=t[c]+(n[l]/2-r[l]/2)}}return t}var ue={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ce(e){var t,n=e.popper,r=e.popperRect,a=e.placement,o=e.variation,i=e.offsets,s=e.position,u=e.gpuAcceleration,c=e.adaptive,l=e.roundOffsets,d=e.isFixed,p=i.x,h=void 0===p?0:p,v=i.y,m=void 0===v?0:v,g="function"===typeof l?l({x:h,y:m}):{x:h,y:m};h=g.x,m=g.y;var y=i.hasOwnProperty("x"),b=i.hasOwnProperty("y"),D=U,k=L,C=window;if(c){var S=I(n),x="clientHeight",Z="clientWidth";if(S===f(n)&&"static"!==T(S=M(n)).position&&"absolute"===s&&(x="scrollHeight",Z="scrollWidth"),a===L||(a===U||a===F)&&o===B)k=A,m-=(d&&S===C&&C.visualViewport?C.visualViewport.height:S[x])-r.height,m*=u?1:-1;if(a===U||(a===L||a===A)&&o===B)D=F,h-=(d&&S===C&&C.visualViewport?C.visualViewport.width:S[Z])-r.width,h*=u?1:-1}var _,E=Object.assign({position:s},c&&ue),N=!0===l?function(e,t){var n=e.x,r=e.y,a=t.devicePixelRatio||1;return{x:w(n*a)/a||0,y:w(r*a)/a||0}}({x:h,y:m},f(n)):{x:h,y:m};return h=N.x,m=N.y,u?Object.assign({},E,((_={})[k]=b?"0":"",_[D]=y?"0":"",_.transform=(C.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",_)):Object.assign({},E,((t={})[k]=b?m+"px":"",t[D]=y?h+"px":"",t.transform="",t))}var le={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,a=n.offset,o=void 0===a?[0,0]:a,i=X.reduce((function(e,n){return e[n]=function(e,t,n){var r=ae(e),a=[U,L].indexOf(r)>=0?-1:1,o="function"===typeof n?n(Object.assign({},t,{placement:e})):n,i=o[0],s=o[1];return i=i||0,s=(s||0)*a,[U,F].indexOf(r)>=0?{x:s,y:i}:{x:i,y:s}}(n,t.rects,o),e}),{}),s=i[t.placement],u=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=i}},de={left:"right",right:"left",bottom:"top",top:"bottom"};function pe(e){return e.replace(/left|right|bottom|top/g,(function(e){return de[e]}))}var fe={start:"end",end:"start"};function he(e){return e.replace(/start|end/g,(function(e){return fe[e]}))}function ve(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&m(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function me(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ge(e,t,n){return t===Q?me(function(e,t){var n=f(e),r=M(e),a=n.visualViewport,o=r.clientWidth,i=r.clientHeight,s=0,u=0;if(a){o=a.width,i=a.height;var c=D();(c||!c&&"fixed"===t)&&(s=a.offsetLeft,u=a.offsetTop)}return{width:o,height:i,x:s+x(e),y:u}}(e,n)):h(t)?function(e,t){var n=k(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):me(function(e){var t,n=M(e),r=C(e),a=null==(t=e.ownerDocument)?void 0:t.body,o=g(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),i=g(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),s=-r.scrollLeft+x(e),u=-r.scrollTop;return"rtl"===T(a||n).direction&&(s+=g(n.clientWidth,a?a.clientWidth:0)-o),{width:o,height:i,x:s,y:u}}(M(e)))}function ye(e,t,n,r){var a="clippingParents"===t?function(e){var t=O(N(e)),n=["absolute","fixed"].indexOf(T(e).position)>=0&&v(e)?I(e):e;return h(n)?t.filter((function(e){return h(e)&&ve(e,n)&&"body"!==S(e)})):[]}(e):[].concat(t),o=[].concat(a,[n]),i=o[0],s=o.reduce((function(t,n){var a=ge(e,n,r);return t.top=g(a.top,t.top),t.right=y(a.right,t.right),t.bottom=y(a.bottom,t.bottom),t.left=g(a.left,t.left),t}),ge(e,i,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function we(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function be(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function De(e,t){void 0===t&&(t={});var n=t,r=n.placement,a=void 0===r?e.placement:r,o=n.strategy,i=void 0===o?e.strategy:o,s=n.boundary,u=void 0===s?q:s,c=n.rootBoundary,l=void 0===c?Q:c,d=n.elementContext,p=void 0===d?K:d,f=n.altBoundary,v=void 0!==f&&f,m=n.padding,g=void 0===m?0:m,y=we("number"!==typeof g?g:be(g,H)),w=p===K?V:K,b=e.rects.popper,D=e.elements[v?w:p],C=ye(h(D)?D:D.contextElement||M(e.elements.popper),u,l,i),S=k(e.elements.reference),x=se({reference:S,element:b,strategy:"absolute",placement:a}),T=me(Object.assign({},b,x)),Z=p===K?T:S,_={top:C.top-Z.top+y.top,bottom:Z.bottom-C.bottom+y.bottom,left:C.left-Z.left+y.left,right:Z.right-C.right+y.right},E=e.modifiersData.offset;if(p===K&&E){var N=E[a];Object.keys(_).forEach((function(e){var t=[F,A].indexOf(e)>=0?1:-1,n=[L,A].indexOf(e)>=0?"y":"x";_[e]+=N[n]*t}))}return _}function ke(e,t,n){return g(e,y(t,n))}var Ce={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,a=n.mainAxis,o=void 0===a||a,i=n.altAxis,s=void 0!==i&&i,u=n.boundary,c=n.rootBoundary,l=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,h=n.tetherOffset,v=void 0===h?0:h,m=De(t,{boundary:u,rootBoundary:c,padding:d,altBoundary:l}),w=ae(t.placement),b=oe(t.placement),D=!b,k=ie(w),C="x"===k?"y":"x",S=t.modifiersData.popperOffsets,M=t.rects.reference,x=t.rects.popper,T="function"===typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,Z="number"===typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(S){if(o){var P,O="y"===k?L:U,Y="y"===k?A:F,R="y"===k?"height":"width",j=S[k],H=j+m[O],B=j-m[Y],q=f?-x[R]/2:0,Q=b===W?M[R]:x[R],K=b===W?-x[R]:-M[R],V=t.elements.arrow,z=f&&V?E(V):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},G=X[O],$=X[Y],J=ke(0,M[R],z[R]),ee=D?M[R]/2-q-J-G-Z.mainAxis:Q-J-G-Z.mainAxis,te=D?-M[R]/2+q+J+$+Z.mainAxis:K+J+$+Z.mainAxis,ne=t.elements.arrow&&I(t.elements.arrow),re=ne?"y"===k?ne.clientTop||0:ne.clientLeft||0:0,se=null!=(P=null==_?void 0:_[k])?P:0,ue=j+te-se,ce=ke(f?y(H,j+ee-se-re):H,j,f?g(B,ue):B);S[k]=ce,N[k]=ce-j}if(s){var le,de="x"===k?L:U,pe="x"===k?A:F,fe=S[C],he="y"===C?"height":"width",ve=fe+m[de],me=fe-m[pe],ge=-1!==[L,U].indexOf(w),ye=null!=(le=null==_?void 0:_[C])?le:0,we=ge?ve:fe-M[he]-x[he]-ye+Z.altAxis,be=ge?fe+M[he]+x[he]-ye-Z.altAxis:me,Ce=f&&ge?function(e,t,n){var r=ke(e,t,n);return r>n?n:r}(we,fe,be):ke(f?we:ve,fe,f?be:me);S[C]=Ce,N[C]=Ce-fe}t.modifiersData[r]=N}},requiresIfExists:["offset"]};var Se={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,a=e.options,o=n.elements.arrow,i=n.modifiersData.popperOffsets,s=ae(n.placement),u=ie(s),c=[U,F].indexOf(s)>=0?"height":"width";if(o&&i){var l=function(e,t){return we("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:be(e,H))}(a.padding,n),d=E(o),p="y"===u?L:U,f="y"===u?A:F,h=n.rects.reference[c]+n.rects.reference[u]-i[u]-n.rects.popper[c],v=i[u]-n.rects.reference[u],m=I(o),g=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,y=h/2-v/2,w=l[p],b=g-d[c]-l[f],D=g/2-d[c]/2+y,k=ke(w,D,b),C=u;n.modifiersData[r]=((t={})[C]=k,t.centerOffset=k-D,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&ve(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Me(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function xe(e){return[L,F,A,U].some((function(t){return e[t]>=0}))}var Te=ne({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,a=r.scroll,o=void 0===a||a,i=r.resize,s=void 0===i||i,u=f(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach((function(e){e.addEventListener("scroll",n.update,re)})),s&&u.addEventListener("resize",n.update,re),function(){o&&c.forEach((function(e){e.removeEventListener("scroll",n.update,re)})),s&&u.removeEventListener("resize",n.update,re)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=se({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,a=void 0===r||r,o=n.adaptive,i=void 0===o||o,s=n.roundOffsets,u=void 0===s||s,c={placement:ae(t.placement),variation:oe(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ce(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ce(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},a=t.elements[e];v(a)&&S(a)&&(Object.assign(a.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?a.removeAttribute(e):a.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],a=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});v(r)&&S(r)&&(Object.assign(r.style,o),Object.keys(a).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},le,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var a=n.mainAxis,o=void 0===a||a,i=n.altAxis,s=void 0===i||i,u=n.fallbackPlacements,c=n.padding,l=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=void 0===f||f,v=n.allowedAutoPlacements,m=t.options.placement,g=ae(m),y=u||(g===m||!h?[pe(m)]:function(e){if(ae(e)===j)return[];var t=pe(e);return[he(e),t,he(t)]}(m)),w=[m].concat(y).reduce((function(e,n){return e.concat(ae(n)===j?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,a=n.boundary,o=n.rootBoundary,i=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,c=void 0===u?X:u,l=oe(r),d=l?s?z:z.filter((function(e){return oe(e)===l})):H,p=d.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=d);var f=p.reduce((function(t,n){return t[n]=De(e,{placement:n,boundary:a,rootBoundary:o,padding:i})[ae(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:l,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:v}):n)}),[]),b=t.rects.reference,D=t.rects.popper,k=new Map,C=!0,S=w[0],M=0;M=0,E=_?"width":"height",N=De(t,{placement:x,boundary:l,rootBoundary:d,altBoundary:p,padding:c}),P=_?Z?F:U:Z?A:L;b[E]>D[E]&&(P=pe(P));var O=pe(P),Y=[];if(o&&Y.push(N[T]<=0),s&&Y.push(N[P]<=0,N[O]<=0),Y.every((function(e){return e}))){S=x,C=!1;break}k.set(x,Y)}if(C)for(var R=function(e){var t=w.find((function(t){var n=k.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return S=t,"break"},I=h?3:1;I>0;I--){if("break"===R(I))break}t.placement!==S&&(t.modifiersData[r]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},Ce,Se,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,a=t.rects.popper,o=t.modifiersData.preventOverflow,i=De(t,{elementContext:"reference"}),s=De(t,{altBoundary:!0}),u=Me(i,r),c=Me(s,a,o),l=xe(u),d=xe(c);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":d})}}]}),Ze=n(69590),_e=n.n(Ze),Ee=[],Ne=function(e,t,n){void 0===n&&(n={});var a=r.useRef(null),o={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||Ee},i=r.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=i[0],u=i[1],c=r.useMemo((function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(e){var t=e.state,n=Object.keys(t.elements);p.flushSync((function(){u({styles:l(n.map((function(e){return[e,t.styles[e]||{}]}))),attributes:l(n.map((function(e){return[e,t.attributes[e]]})))})}))},requires:["computeStyles"]}}),[]),f=r.useMemo((function(){var e={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[c,{name:"applyStyles",enabled:!1}])};return _e()(a.current,e)?a.current||e:(a.current=e,e)}),[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,c]),h=r.useRef();return d((function(){h.current&&h.current.setOptions(f)}),[f]),d((function(){if(null!=e&&null!=t){var r=(n.createPopper||Te)(e,t,f);return h.current=r,function(){r.destroy(),h.current=null}}}),[e,t,n.createPopper]),{state:h.current?h.current.state:null,styles:s.styles,attributes:s.attributes,update:h.current?h.current.update:null,forceUpdate:h.current?h.current.forceUpdate:null}},Pe=function(){},Oe=function(){return Promise.resolve(null)},Ye=[];function Re(e){var t=e.placement,n=void 0===t?"bottom":t,o=e.strategy,i=void 0===o?"absolute":o,u=e.modifiers,l=void 0===u?Ye:u,d=e.referenceElement,p=e.onFirstUpdate,f=e.innerRef,h=e.children,v=r.useContext(a),m=r.useState(null),g=m[0],y=m[1],w=r.useState(null),b=w[0],D=w[1];r.useEffect((function(){c(f,g)}),[f,g]);var k=r.useMemo((function(){return{placement:n,strategy:i,onFirstUpdate:p,modifiers:[].concat(l,[{name:"arrow",enabled:null!=b,options:{element:b}}])}}),[n,i,p,l,b]),C=Ne(d||v,g,k),S=C.state,M=C.styles,x=C.forceUpdate,T=C.update,Z=r.useMemo((function(){return{ref:y,style:M.popper,placement:S?S.placement:n,hasPopperEscaped:S&&S.modifiersData.hide?S.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:S&&S.modifiersData.hide?S.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:M.arrow,ref:D},forceUpdate:x||Pe,update:T||Oe}}),[y,D,n,S,M,T,x]);return s(h)(Z)}var Ie=n(42473),Le=n.n(Ie);function Ae(e){var t=e.children,n=e.innerRef,a=r.useContext(o),i=r.useCallback((function(e){c(n,e),u(a,e)}),[n,a]);return r.useEffect((function(){return function(){return c(n,null)}}),[]),r.useEffect((function(){Le()(Boolean(a),"`Reference` should not be used outside of a `Manager` component.")}),[a]),s(t)({ref:i})}},62554:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(67294),a=n(34513);function o(e,t,n){void 0===t&&(t=0),void 0===n&&(n=[]);var o=(0,a.Z)(e,t),i=o[0],s=o[1],u=o[2];return(0,r.useEffect)(u,n),[i,s]}},18127:function(e,t,n){"use strict";var r=n(67294);t.Z=function(e){(0,r.useEffect)(e,[])}},43337:function(e,t,n){"use strict";var r=n(67294);t.Z=function(e,t){var n=(0,r.useRef)((function(){}));(0,r.useEffect)((function(){n.current=e})),(0,r.useEffect)((function(){if(null!==t){var e=setInterval((function(){return n.current()}),t||0);return function(){return clearInterval(e)}}}),[t])}},34513:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(67294);function a(e,t){void 0===t&&(t=0);var n=(0,r.useRef)(!1),a=(0,r.useRef)(),o=(0,r.useRef)(e),i=(0,r.useCallback)((function(){return n.current}),[]),s=(0,r.useCallback)((function(){n.current=!1,a.current&&clearTimeout(a.current),a.current=setTimeout((function(){n.current=!0,o.current()}),t)}),[t]),u=(0,r.useCallback)((function(){n.current=null,a.current&&clearTimeout(a.current)}),[]);return(0,r.useEffect)((function(){o.current=e}),[e]),(0,r.useEffect)((function(){return s(),u}),[t]),[i,u,s]}},89211:function(e,t,n){"use strict";var r=n(67294),a=function(e,t){return"boolean"===typeof t?t:!e};t.Z=function(e){return(0,r.useReducer)(a,e)}},77823:function(e,t,n){"use strict";var r=n(67294),a=n(18127);t.Z=function(e){var t=(0,r.useRef)(e);t.current=e,(0,a.Z)((function(){return function(){return t.current()}}))}},42473:function(e){"use strict";var t=function(){};e.exports=t},58206:function(e,t,n){"use strict";function r(e,{target:t=document.body}={}){if("string"!==typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const n=document.createElement("textarea"),r=document.activeElement;n.value=e,n.setAttribute("readonly",""),n.style.contain="strict",n.style.position="absolute",n.style.left="-9999px",n.style.fontSize="12pt";const a=document.getSelection(),o=a.rangeCount>0&&a.getRangeAt(0);t.append(n),n.select(),n.selectionStart=0,n.selectionEnd=e.length;let i=!1;try{i=document.execCommand("copy")}catch{}return n.remove(),o&&(a.removeAllRanges(),a.addRange(o)),r&&r.focus(),i}n.d(t,{Z:function(){return r}})}}]); \ No newline at end of file diff --git a/web/gui/v2/376.ce2d4577bc3aaaa82b0c.js b/web/gui/v2/376.f94e9188edb8b5a2ee26.js similarity index 99% rename from web/gui/v2/376.ce2d4577bc3aaaa82b0c.js rename to web/gui/v2/376.f94e9188edb8b5a2ee26.js index d36e8bb65de4fe..9a1dcee3f34673 100644 --- a/web/gui/v2/376.ce2d4577bc3aaaa82b0c.js +++ b/web/gui/v2/376.f94e9188edb8b5a2ee26.js @@ -1,2 +1,2 @@ -/*! For license information please see 376.ce2d4577bc3aaaa82b0c.js.LICENSE.txt */ -!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8682387d-1c79-4255-ad0f-68b86c2df277",e._sentryDebugIdIdentifier="sentry-dbid-8682387d-1c79-4255-ad0f-68b86c2df277")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"068845a823c962888381794c354a8f6b6e263031"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[376],{78081:function(e,t,n){var r=n(82215),o=n(82584),i=n(20609),a=n(98420),s=n(20738),u=n(18923),l=Date.prototype.getTime;function c(e,t,n){var p=n||{};return!!(p.strict?i(e,t):e===t)||(!e||!t||"object"!==typeof e&&"object"!==typeof t?p.strict?i(e,t):e==t:function(e,t,n){var i,p;if(typeof e!==typeof t)return!1;if(f(e)||f(t))return!1;if(e.prototype!==t.prototype)return!1;if(o(e)!==o(t))return!1;var h=a(e),g=a(t);if(h!==g)return!1;if(h||g)return e.source===t.source&&s(e)===s(t);if(u(e)&&u(t))return l.call(e)===l.call(t);var v=d(e),m=d(t);if(v!==m)return!1;if(v||m){if(e.length!==t.length)return!1;for(i=0;i=0;i--)if(y[i]!=b[i])return!1;for(i=y.length-1;i>=0;i--)if(!c(e[p=y[i]],t[p],n))return!1;return!0}(e,t,p))}function f(e){return null===e||void 0===e}function d(e){return!(!e||"object"!==typeof e||"number"!==typeof e.length)&&("function"===typeof e.copy&&"function"===typeof e.slice&&!(e.length>0&&"number"!==typeof e[0]))}e.exports=c},21782:function(e,t,n){"use strict";var r=n(82215),o="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,u=n(31044)(),l=s&&u,c=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!==typeof(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;l?s(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n},f=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=a.call(i,Object.getOwnPropertySymbols(t)));for(var s=0;s-1?e.split(","):e},l=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(i),l=s?i.slice(0,s.index):i,c=[];if(l){if(!n.plainObjects&&o.call(Object.prototype,l)&&!n.allowPrototypes)return;c.push(l)}for(var f=0;n.depth>0&&null!==(s=a.exec(i))&&f=0;--i){var a,s=e[i];if("[]"===s&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=parseInt(l,10);n.parseArrays||""!==l?!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(a=[])[c]=o:"__proto__"!==l&&(a[l]=o):a={0:o}}o=a}return o}(c,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var c="string"===typeof e?function(e,t){var n,l={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=c.split(t.delimiter,f),p=-1,h=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(v=i(v)?[v]:v),o.call(l,g)?l[g]=r.combine(l[g],v):l[g]=v}return l}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(c),p=0;p0?O.join(",")||null:void 0}];else if(u(d))k=d;else{var R=Object.keys(O);k=g?R.sort(g):R}for(var T=a&&u(O)&&1===O.length?n+"[]":n,I=0;I0?x+w:""}},74872:function(e,t,n){"use strict";var r=n(34474),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],o=0;o=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===r.RFC1738&&(40===c||41===c)?u+=s.charAt(l):c<128?u+=a[c]:c<2048?u+=a[192|c>>6]+a[128|63&c]:c<55296||c>=57344?u+=a[224|c>>12]+a[128|c>>6&63]+a[128|63&c]:(l+=1,c=65536+((1023&c)<<10|1023&s.charCodeAt(l)),u+=a[240|c>>18]+a[128|c>>12&63]+a[128|c>>6&63]+a[128|63&c])}return u},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;re.x+e.w||t.x+t.we.y+e.h)},getColorShade:function(e,t){(e=String(e).replace(/[^0-9a-f]/gi,"")).length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;for(var n="#",r=0;r<3;r++){var o=parseInt(e.substr(2*r,2),16);n+=("00"+(o=Math.round(Math.min(Math.max(0,o+o*t),255)).toString(16))).substr(o.length)}return n},initSegmentColors:function(e){for(var t=e.options.data.content,n=e.options.misc.colors.segments,r=[],o=0;o=t.value?(r.push(e[c]),o+=e[c].value,i++):(e[c].isGrouped=!1,n.push(e[c]))}else if("percentage"===t.valueType){var f=u.getTotalPieSize(e);for(c=0;c99?99:a)<0?0:a;var u=r0&&(u-=l)}s=Math.floor(u/100*a)/2}else s=parseInt(t.pieOuterRadius,10);/%/.test(t.pieInnerRadius)?(a=(a=(a=parseInt(t.pieInnerRadius.replace(/[\D]/,""),10))>99?99:a)<0?0:a,i=Math.floor(s/100*a)):i=parseInt(t.pieInnerRadius,10),e.innerRadius=i,e.outerRadius=s},getTotalPieSize:function(e){for(var t=0,n=0;nt.label.toLowerCase()?1:-1}));break;case"label-desc":t.sort((function(e,t){return e.label.toLowerCase()o.truncation.truncateLength&&(n=e.label.substring(0,o.truncation.truncateLength)+"..."),n})).style("font-size",o.mainLabel.fontSize).style("font-family",o.mainLabel.font).style("font-weight",o.mainLabel.fontWeight).style("fill",(function(t,n){return"segment"===o.mainLabel.color?e.options.colors[n]:o.mainLabel.color})),r.percentage&&a.append("text").attr("id",(function(n,r){return e.cssPrefix+"segmentPercentage"+r+"-"+t})).attr("class",e.cssPrefix+"segmentPercentage-"+t).text((function(e,t){var n=e.percentage;return o.formatter?(s.index=t,s.part="percentage",s.value=e.value,s.label=e.percentage,n=o.formatter(s)):n+="%",n})).style("font-size",o.percentage.fontSize).style("font-family",o.percentage.font).style("font-weight",o.percentage.fontWeight).style("fill",o.percentage.color),r.value&&a.append("text").attr("id",(function(n,r){return e.cssPrefix+"segmentValue"+r+"-"+t})).attr("class",e.cssPrefix+"segmentValue-"+t).text((function(e,t){return s.index=t,s.part="value",s.value=e.value,s.label=e.value,s.realLabel=e.label,o.formatter?o.formatter(s,e.value):e.value})).style("font-size",o.value.fontSize).style("font-family",o.value.font).style("font-weight",o.value.fontWeight).style("fill",o.value.color)},positionLabelElements:function(e,t,n){c["dimensions-"+t]=[],e.__labels[t].each((function(n,r){var o=a.select(this).selectAll("."+e.cssPrefix+"segmentMainLabel-"+t),i=a.select(this).selectAll("."+e.cssPrefix+"segmentPercentage-"+t),s=a.select(this).selectAll("."+e.cssPrefix+"segmentValue-"+t);c["dimensions-"+t].push({mainLabel:null!==o.node()?o.node().getBBox():null,percentage:null!==i.node()?i.node().getBBox():null,value:null!==s.node()?s.node().getBBox():null})}));var r=5,o=c["dimensions-"+t];switch(n){case"label-value1":e.svg.selectAll("."+e.cssPrefix+"segmentValue-"+t).attr("dx",(function(e,t){return o[t].mainLabel.width+r}));break;case"label-value2":e.svg.selectAll("."+e.cssPrefix+"segmentValue-"+t).attr("dy",(function(e,t){return o[t].mainLabel.height}));break;case"label-percentage1":e.svg.selectAll("."+e.cssPrefix+"segmentPercentage-"+t).attr("dx",(function(e,t){return o[t].mainLabel.width+r}));break;case"label-percentage2":e.svg.selectAll("."+e.cssPrefix+"segmentPercentage-"+t).attr("dx",(function(e,t){return o[t].mainLabel.width/2-o[t].percentage.width/2})).attr("dy",(function(e,t){return o[t].mainLabel.height}))}},computeLabelLinePositions:function(e){e.lineCoordGroups=[],e.__labels.outer.each((function(t,n){return c.computeLinePosition(e,n)}))},computeLinePosition:function(e,t){var n,r,o,i,a=f.getSegmentAngle(t,e.options.data.content,e.totalSize,{midpoint:!0}),s=u.rotate(e.pieCenter.x,e.pieCenter.y-e.outerRadius,e.pieCenter.x,e.pieCenter.y,a),l=e.outerLabelGroupData[t].h/5,c=6,d=Math.floor(a/90),p=4;switch(2===d&&180===a&&(d=1),d){case 0:n=e.outerLabelGroupData[t].x-c-(e.outerLabelGroupData[t].x-c-s.x)/2,r=e.outerLabelGroupData[t].y+(s.y-e.outerLabelGroupData[t].y)/p,o=e.outerLabelGroupData[t].x-c,i=e.outerLabelGroupData[t].y-l;break;case 1:n=s.x+(e.outerLabelGroupData[t].x-s.x)/p,r=s.y+(e.outerLabelGroupData[t].y-s.y)/p,o=e.outerLabelGroupData[t].x-c,i=e.outerLabelGroupData[t].y-l;break;case 2:var h=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+c;n=s.x-(s.x-h)/p,r=s.y+(e.outerLabelGroupData[t].y-s.y)/p,o=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+c,i=e.outerLabelGroupData[t].y-l;break;case 3:var g=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+c;n=g+(s.x-g)/p,r=e.outerLabelGroupData[t].y+(s.y-e.outerLabelGroupData[t].y)/p,o=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+c,i=e.outerLabelGroupData[t].y-l}"straight"===e.options.labels.lines.style?e.lineCoordGroups[t]=[{x:s.x,y:s.y},{x:o,y:i}]:e.lineCoordGroups[t]=[{x:s.x,y:s.y},{x:n,y:r},{x:o,y:i}]},addLabelLines:function(e){var t=e.svg.insert("g","."+e.cssPrefix+"pieChart").attr("class",e.cssPrefix+"lineGroups").style("opacity",1).selectAll("."+e.cssPrefix+"lineGroup").data(e.lineCoordGroups).enter().append("g").attr("class",e.cssPrefix+"lineGroup"),n=a.line().curve(a.curveBasis).x((function(e){return e.x})).y((function(e){return e.y}));t.append("path").attr("d",n).attr("stroke",(function(t,n){return"segment"===e.options.labels.lines.color?e.options.colors[n]:e.options.labels.lines.color})).attr("stroke-width",1).attr("fill","none").style("opacity",(function(t,n){var r=e.options.labels.outer.hideWhenLessThanPercentage;return null!==r&&t.percentage0){var c=f.getSegmentAngle(r,e.options.data.content,e.totalSize,{midpoint:!0}),d=u.translate(e.pieCenter.x,e.pieCenter.y,e.innerRadius,c);l.x=d.x,l.y=d.y}var p=i.getDimensions(e.cssPrefix+"labelGroup"+r+"-inner"),h=p.w/2,g=p.h/4;o=l.x+(e.lineCoordGroups[r][0].x-l.x)/1.8,a=l.y+(e.lineCoordGroups[r][0].y-l.y)/1.8,o-=h,a+=g}return"translate("+o+","+a+")"}))},getIncludes:function(e){var t=!1,n=!1,r=!1;switch(e){case"label":t=!0;break;case"value":n=!0;break;case"percentage":r=!0;break;case"label-value1":case"label-value2":t=!0,n=!0;break;case"label-percentage1":case"label-percentage2":t=!0,r=!0}return{mainLabel:t,value:n,percentage:r}},computeOuterLabelCoords:function(e){e.__labels.outer.each((function(t,n){return c.getIdealOuterLabelPositions(e,n)})),c.resolveOuterLabelCollisions(e)},resolveOuterLabelCollisions:function(e){if("none"!==e.options.labels.outer.format){var t=e.options.data.content.length;c.checkConflict(e,0,"clockwise",t),c.checkConflict(e,t-1,"anticlockwise",t)}},checkConflict:function(e,t,n,r){var o,a;if(!(r<=1)){var s=e.outerLabelGroupData[t].hs;if(("clockwise"!==n||"right"===s)&&("anticlockwise"!==n||"left"===s)){var u="clockwise"===n?t+1:t-1,l=e.outerLabelGroupData[t],f=e.outerLabelGroupData[u],d={labelHeights:e.outerLabelGroupData[0].h,center:e.pieCenter,lineLength:e.outerRadius+e.options.labels.outer.pieDistance,heightChange:e.outerLabelGroupData[0].h+1};if("clockwise"===n){for(o=0;o<=t;o++)if(a=e.outerLabelGroupData[o],!c.isLabelHidden(e,o)&&i.rectIntersect(a,f)){c.adjustLabelPos(e,u,l,d);break}}else for(o=r-1;o>=t;o--)if(a=e.outerLabelGroupData[o],!c.isLabelHidden(e,o)&&i.rectIntersect(a,f)){c.adjustLabelPos(e,u,l,d);break}c.checkConflict(e,u,n,r)}}},isLabelHidden:function(e,t){var n=e.options.labels.outer.hideWhenLessThanPercentage;return null!==n&&d.percentageMath.abs(i)?Math.sqrt(r.lineLength*r.lineLength-i*i):Math.sqrt(i*i-r.lineLength*r.lineLength),a="right"===n.hs?r.center.x+o:r.center.x-o-e.outerLabelGroupData[t].w,e.outerLabelGroupData[t].x=a,e.outerLabelGroupData[t].y=s},getIdealOuterLabelPositions:function(e,t){var n=e.svg.select("#"+e.cssPrefix+"labelGroup"+t+"-outer").node();if(n){var r=n.getBBox(),o=f.getSegmentAngle(t,e.options.data.content,e.totalSize,{midpoint:!0}),i=e.pieCenter.x,a=e.pieCenter.y-(e.outerRadius+e.options.labels.outer.pieDistance),s=u.rotate(i,a,e.pieCenter.x,e.pieCenter.y,o),l="right";o>180?(s.x-=r.width+8,l="left"):s.x+=8,e.outerLabelGroupData[t]={x:s.x,y:s.y,w:r.width,h:r.height,hs:l}}}},f={effectMap:{none:a.easeLinear,bounce:a.easeBounce,linear:a.easeLinear,sin:a.easeSin,elastic:a.easeElastic,back:a.easeBack,quad:a.easeQuad,circle:a.easeCircle,exp:a.easeExp},create:function(e){var t=e.pieCenter,n=e.options.colors,r=(e.options.effects.load,e.options.misc.colors.segmentStroke),o=e.svg.insert("g","#"+e.cssPrefix+"title").attr("transform",(function(){return u.getPieTranslateCenter(t)})).attr("class",e.cssPrefix+"pieChart"),i=a.arc().innerRadius(e.innerRadius).outerRadius(e.outerRadius).startAngle(0).endAngle((function(t){return t.value/e.totalSize*2*Math.PI}));o.selectAll("."+e.cssPrefix+"arc").data(e.options.data.content).enter().append("g").attr("class",e.cssPrefix+"arc").append("path").attr("id",(function(t,n){return e.cssPrefix+"segment"+n})).attr("fill",(function(t,r){var o=n[r];return e.options.misc.gradient.enabled&&(o="url(#"+e.cssPrefix+"grad"+r+")"),o})).style("stroke",r).style("stroke-width",1).attr("data-index",(function(e,t){return t})).attr("d",i),e.svg.selectAll("g."+e.cssPrefix+"arc").attr("transform",(function(t,n){var r=0;return n>0&&(r=f.getSegmentAngle(n-1,e.options.data.content,e.totalSize)),"rotate("+r+")"})),e.arc=i},addGradients:function(e){var t=e.svg.append("defs").selectAll("radialGradient").data(e.options.data.content).enter().append("radialGradient").attr("gradientUnits","userSpaceOnUse").attr("cx",0).attr("cy",0).attr("r","120%").attr("id",(function(t,n){return e.cssPrefix+"grad"+n}));t.append("stop").attr("offset","0%").style("stop-color",(function(t,n){return e.options.colors[n]})),t.append("stop").attr("offset",e.options.misc.gradient.percentage+"%").style("stop-color",e.options.misc.gradient.color)},addSegmentEventHandlers:function(e){var t=e.svg.selectAll("."+e.cssPrefix+"arc");(t=t.merge(e.__labels.inner.merge(e.__labels.outer))).on("click",(function(){var t,n=a.select(this);if(n.attr("class")===e.cssPrefix+"arc")t=n.select("path");else{var r=n.attr("data-index");t=a.select("#"+e.cssPrefix+"segment"+r)}var o=t.attr("class")===e.cssPrefix+"expanded";f.onSegmentEvent(e,e.options.callbacks.onClickSegment,t,o),"none"!==e.options.effects.pullOutSegmentOnClick.effect&&(o?f.closeSegment(e,t.node()):f.openSegment(e,t.node()))})),t.on("mouseover",(function(){var t,n,r=a.select(this);if(r.attr("class")===e.cssPrefix+"arc"?t=r.select("path"):(n=r.attr("data-index"),t=a.select("#"+e.cssPrefix+"segment"+n)),e.options.effects.highlightSegmentOnMouseover){n=t.attr("data-index");var o=e.options.colors[n];t.style("fill",i.getColorShade(o,e.options.effects.highlightLuminosity))}e.options.tooltips.enabled&&(n=t.attr("data-index"),h.showTooltip(e,n));var s=t.attr("class")===e.cssPrefix+"expanded";f.onSegmentEvent(e,e.options.callbacks.onMouseoverSegment,t,s)})),t.on("mousemove",(function(){h.moveTooltip(e)})),t.on("mouseout",(function(){var t,n,r=a.select(this);if(r.attr("class")===e.cssPrefix+"arc"?t=r.select("path"):(n=r.attr("data-index"),t=a.select("#"+e.cssPrefix+"segment"+n)),e.options.effects.highlightSegmentOnMouseover){n=t.attr("data-index");var o=e.options.colors[n];e.options.misc.gradient.enabled&&(o="url(#"+e.cssPrefix+"grad"+n+")"),t.style("fill",o)}e.options.tooltips.enabled&&(n=t.attr("data-index"),h.hideTooltip(e,n));var i=t.attr("class")===e.cssPrefix+"expanded";f.onSegmentEvent(e,e.options.callbacks.onMouseoutSegment,t,i)}))},onSegmentEvent:function(e,t,n,r){if(i.isFunction(t)){var o=parseInt(n.attr("data-index"),10);t({segment:n.node(),index:o,expanded:r,data:e.options.data.content[o]})}},openSegment:function(e,t){e.isOpeningSegment||(e.isOpeningSegment=!0,f.maybeCloseOpenSegment(e),a.select(t).transition().ease(f.effectMap[e.options.effects.pullOutSegmentOnClick.effect]).duration(e.options.effects.pullOutSegmentOnClick.speed).attr("transform",(function(t,n){var r=e.arc.centroid(t),o=r[0],i=r[1],a=Math.sqrt(o*o+i*i),s=parseInt(e.options.effects.pullOutSegmentOnClick.size,10);return"translate("+o/a*s+","+i/a*s+")"})).on("end",(function(n,r){e.currentlyOpenSegment=t,e.isOpeningSegment=!1,a.select(t).attr("class",e.cssPrefix+"expanded")})))},maybeCloseOpenSegment:function(e){"undefined"!==typeof e&&e.svg.selectAll("."+e.cssPrefix+"expanded").size()>0&&f.closeSegment(e,e.svg.select("."+e.cssPrefix+"expanded").node())},closeSegment:function(e,t){a.select(t).transition().duration(400).attr("transform","translate(0,0)").on("end",(function(n,r){a.select(t).attr("class",""),e.currentlyOpenSegment=null}))},getCentroid:function(e){var t=e.getBBox();return{x:t.x+t.width/2,y:t.y+t.height/2}},getSegmentAngle:function(e,t,n,r){var o,i=s({compounded:!0,midpoint:!1},r),a=t[e].value;if(i.compounded){o=0;for(var u=0;u<=e;u++)o+=t[u].value}"undefined"===typeof o&&(o=a);var l=o/n*360;return i.midpoint&&(l-=a/n*360/2),l}},p={offscreenCoord:-1e4,addTitle:function(e){e.__title=e.svg.selectAll("."+e.cssPrefix+"title").data([e.options.header.title]).enter().append("text").text((function(e){return e.text})).attr("id",e.cssPrefix+"title").attr("class",e.cssPrefix+"title").attr("x",p.offscreenCoord).attr("y",p.offscreenCoord).attr("text-anchor",(function(){return"top-center"===e.options.header.location||"pie-center"===e.options.header.location?"middle":"left"})).attr("fill",(function(e){return e.color})).style("font-size",(function(e){return e.fontSize})).style("font-weight",(function(e){return e.fontWeight})).style("font-family",(function(e){return e.font}))},positionTitle:function(e){var t,n=e.textComponents,r=e.options.header.location,o=e.options.misc.canvasPadding,i=e.options.size.canvasWidth,a=e.options.header.titleSubtitlePadding;t="top-left"===r?o.left:(i-o.right)/2+o.left,t+=e.options.misc.pieCenterOffset.x;var s=o.top+n.title.h;"pie-center"===r&&(s=e.pieCenter.y,n.subtitle.exists?s=s-(n.title.h+a+n.subtitle.h)/2+n.title.h:s+=n.title.h/4),e.__title.attr("x",t).attr("y",s)},addSubtitle:function(e){var t=e.options.header.location;e.__subtitle=e.svg.selectAll("."+e.cssPrefix+"subtitle").data([e.options.header.subtitle]).enter().append("text").text((function(e){return e.text})).attr("x",p.offscreenCoord).attr("y",p.offscreenCoord).attr("id",e.cssPrefix+"subtitle").attr("class",e.cssPrefix+"subtitle").attr("text-anchor",(function(){return"top-center"===t||"pie-center"===t?"middle":"left"})).attr("fill",(function(e){return e.color})).style("font-size",(function(e){return e.fontSize})).style("font-weight",(function(e){return e.fontWeight})).style("font-family",(function(e){return e.font}))},positionSubtitle:function(e){var t,n=e.options.misc.canvasPadding,r=e.options.size.canvasWidth;t="top-left"===e.options.header.location?n.left:(r-n.right)/2+n.left,t+=e.options.misc.pieCenterOffset.x;var o=p.getHeaderHeight(e);e.__subtitle.attr("x",t).attr("y",o)},addFooter:function(e){e.__footer=e.svg.selectAll("."+e.cssPrefix+"footer").data([e.options.footer]).enter().append("text").text((function(e){return e.text})).attr("x",p.offscreenCoord).attr("y",p.offscreenCoord).attr("id",e.cssPrefix+"footer").attr("class",e.cssPrefix+"footer").attr("text-anchor",(function(){var t="left";return"bottom-center"===e.options.footer.location?t="middle":"bottom-right"===e.options.footer.location&&(t="left"),t})).attr("fill",(function(e){return e.color})).style("font-size",(function(e){return e.fontSize})).style("font-weight",(function(e){return e.fontWeight})).style("font-family",(function(e){return e.font}))},positionFooter:function(e){var t,n=e.options.footer.location,r=e.textComponents.footer.w,o=e.options.size.canvasWidth,i=e.options.size.canvasHeight,a=e.options.misc.canvasPadding;t="bottom-left"===n?a.left:"bottom-right"===n?o-r-a.right:o/2,e.__footer.attr("x",t).attr("y",i-a.bottom)},getHeaderHeight:function(e){var t;if(e.textComponents.title.exists){var n=e.textComponents.title.h+e.options.header.titleSubtitlePadding+e.textComponents.subtitle.h;t="pie-center"===e.options.header.location?e.pieCenter.y-n/2+n:n+e.options.misc.canvasPadding.top}else if("pie-center"===e.options.header.location){var r=e.options.misc.canvasPadding.bottom+e.textComponents.footer.h;t=(e.options.size.canvasHeight-r)/2+e.options.misc.canvasPadding.top+e.textComponents.subtitle.h/2}else t=e.options.misc.canvasPadding.top+e.textComponents.subtitle.h;return t}},h={addTooltips:function(e){var t=e.svg.insert("g").attr("class",e.cssPrefix+"tooltips");t.selectAll("."+e.cssPrefix+"tooltip").data(e.options.data.content).enter().append("g").attr("class",e.cssPrefix+"tooltip").attr("id",(function(t,n){return e.cssPrefix+"tooltip"+n})).style("opacity",0).append("rect").attr("rx",e.options.tooltips.styles.borderRadius).attr("ry",e.options.tooltips.styles.borderRadius).attr("x",-e.options.tooltips.styles.padding).attr("opacity",e.options.tooltips.styles.backgroundOpacity).style("fill",e.options.tooltips.styles.backgroundColor),t.selectAll("."+e.cssPrefix+"tooltip").data(e.options.data.content).append("text").attr("fill",(function(t){return e.options.tooltips.styles.color})).style("font-size",(function(t){return e.options.tooltips.styles.fontSize})).style("font-weight",(function(t){return e.options.tooltips.styles.fontWeight})).style("font-family",(function(t){return e.options.tooltips.styles.font})).text((function(t,n){var r=e.options.tooltips.string;return"caption"===e.options.tooltips.type&&(r=t.caption),h.replacePlaceholders(e,r,n,{label:t.label,value:t.value,percentage:t.percentage})})),t.selectAll("."+e.cssPrefix+"tooltip rect").attr("width",(function(t,n){return i.getDimensions(e.cssPrefix+"tooltip"+n).w+2*e.options.tooltips.styles.padding})).attr("height",(function(t,n){return i.getDimensions(e.cssPrefix+"tooltip"+n).h+2*e.options.tooltips.styles.padding})).attr("y",(function(t,n){return-i.getDimensions(e.cssPrefix+"tooltip"+n).h/2+1}))},showTooltip:function(e,t){var n=e.options.tooltips.styles.fadeInSpeed;h.currentTooltip===t&&(n=1),h.currentTooltip=t,a.select("#"+e.cssPrefix+"tooltip"+t).transition().duration(n).style("opacity",(function(){return 1})),h.moveTooltip(e)},moveTooltip:function(e){a.selectAll("#"+e.cssPrefix+"tooltip"+h.currentTooltip).attr("transform",(function(t){var n=a.pointer(this.parentNode);return"translate("+(n[0]+e.options.tooltips.styles.padding+2)+","+(n[1]-2*e.options.tooltips.styles.padding-2)+")"}))},hideTooltip:function(e,t){a.select("#"+e.cssPrefix+"tooltip"+t).style("opacity",(function(){return 0})),a.select("#"+e.cssPrefix+"tooltip"+h.currentTooltip).attr("transform",(function(t,n){return"translate("+(e.options.size.canvasWidth+1e3)+","+(e.options.size.canvasHeight+1e3)+")"}))},replacePlaceholders:function(e,t,n,r){i.isFunction(e.options.tooltips.placeholderParser)&&e.options.tooltips.placeholderParser(n,r);var o=function(){return function(e){var t=arguments[1];return r.hasOwnProperty(t)?r[arguments[1]]:arguments[0]}};return t.replace(/\{(\w+)\}/g,o(r))}},g=function(i,u){if(this.element=i,"string"===typeof i){var l=i.replace(/^#/,"");this.element=document.getElementById(l)}var c={};s(!0,c,r,u),this.options=c,null!==this.options.misc.cssPrefix?this.cssPrefix=this.options.misc.cssPrefix:(this.cssPrefix="p"+n+"_",n++),o.initialCheck(this)&&(a.select(this.element).attr(e,t),v.call(this),m.call(this))};g.prototype.recreate=function(){o.initialCheck(this)&&(v.call(this),m.call(this))},g.prototype.redraw=function(){this.element.innerHTML="",m.call(this)},g.prototype.destroy=function(){this.element.innerHTML="",a.select(this.element).attr(e,null)},g.prototype.getOpenSegment=function(){var e=this.currentlyOpenSegment;if(null!==e&&"undefined"!==typeof e){var t=parseInt(a.select(e).attr("data-index"),10);return{element:e,index:t,data:this.options.data.content[t]}}return null},g.prototype.openSegment=function(e){(e=parseInt(e,10))<0||e>this.options.data.content.length-1||f.openSegment(this,a.select("#"+this.cssPrefix+"segment"+e).node())},g.prototype.closeSegment=function(){f.maybeCloseOpenSegment(this)},g.prototype.updateProp=function(e,t){switch(e){case"header.title.text":var n=i.processObj(this.options,e);i.processObj(this.options,e,t),a.select("#"+this.cssPrefix+"title").html(t),(""===n&&""!==t||""!==n&&""===t)&&this.redraw();break;case"header.subtitle.text":var r=i.processObj(this.options,e);i.processObj(this.options,e,t),a.select("#"+this.cssPrefix+"subtitle").html(t),(""===r&&""!==t||""!==r&&""===t)&&this.redraw();break;case"callbacks.onload":case"callbacks.onMouseoverSegment":case"callbacks.onMouseoutSegment":case"callbacks.onClickSegment":case"effects.pullOutSegmentOnClick.effect":case"effects.pullOutSegmentOnClick.speed":case"effects.pullOutSegmentOnClick.size":case"effects.highlightSegmentOnMouseover":case"effects.highlightLuminosity":i.processObj(this.options,e,t);break;default:i.processObj(this.options,e,t),this.destroy(),this.recreate()}};var v=function(){this.options.data.content=u.sortPieData(this),this.options.data.smallSegmentGrouping.enabled&&(this.options.data.content=i.applySmallSegmentGrouping(this.options.data.content,this.options.data.smallSegmentGrouping)),this.options.colors=i.initSegmentColors(this),this.totalSize=u.getTotalPieSize(this.options.data.content);for(var e=this.options.labels.percentage.decimalPlaces,t=0;te.getDygraph().getArea().h-10)return"ANNOTATIONS";if(r<15)return"ANOMALY_RATE";for(var o=n[0],i=Math.abs(n[0].canvasy-r),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&E.length>1,stackedGraphNaNFill:"none",plotter:c,errorBars:b,axes:{x:a?{ticker:r.default.dateTicker,axisLabelFormatter:t.formatXAxis,axisLabelWidth:60}:{drawAxis:!1},y:u?y(y(y({},O&&{ticker:O}),{},{axisLabelFormatter:S},l&&{axisLabelWidth:l}),{},{pixelsPerLabel:15}):{drawAxis:!1}},ylabel:t.getAttribute("hasYlabel")&&t.getUnitSign({long:!0,real:(0,s.isHeatmap)(o)})}},k=function(){var e=m.chart.getThemeAttribute("themeGridColor");return{axisLineColor:e,gridLineColor:e}},P=function(){var e=t.getPayloadDimensionIds();if(!e.length)return{visibility:!1};var n=t.getAttribute("selectedLegendDimensions"),r=Array(t.getPayload().labels.length-e.length).fill(!0);return{visibility:[].concat(g(e.map(n.length?t.isDimensionVisible:function(){return!0})),g(r))}},R=function(){var e=t.getAttributes(),n=e.outOfLimits,r=e.getValueRange,o=e.staticValueRange,i=e.chartType,a=t.getPayload(),u=a.data,l=a.labels,c=t.getDateWindow(),f=n||0===u.length;return{file:f?[[0]]:u,labels:f?["X"]:l,dateWindow:c,valueRange:o||((0,s.isHeatmap)(i)?[0,t.getVisibleDimensionIds().length]:r(t,{dygraph:!0}))}},T=function(){return t.isSparkline()?{drawGrid:!1,drawAxis:!1,ylabel:void 0,yLabelWidth:0,highlightCircleSize:3,fillAlpha:1,strokeWidth:0}:null},I=function(){var e=t.getPayloadDimensionIds();return e.length?{colors:e.map(t.selectDimensionColor)}:{}},B=y(y({},m),{},{getChartWidth:function(){return b?b.getArea().w:m.getChartWidth()},getChartHeight:function(){return b?b.getArea().h:100},getPreceded:function(){if(!b)return-1;if(1e3*t.getFirstEntry()l+c)){r.zoomMoved=!0,r.dragEndX=(0,i.dragGetX_)(e,r);var f=r.dragStartX,d=r.dragEndX;o.clearRect(0,0,a.width,a.height),o.fillStyle="rgba(128,128,128,0.3)",o.fillRect(Math.min(f,d),s.y,Math.abs(d-f),s.h),r.prevEndX=d,n=d}}},a=function o(i,a,s){if(s.isZooming){a.clearZoomRect_(),s.destroy();var u=function(e){return-1===n||Math.abs(t-n)<5?null:[Math.round(e.toDataXCoord(t)/1e3),Math.round(e.toDataXCoord(n)/1e3)].sort((function(e,t){return e-t}))}(a);e.sdk.trigger("highlightEnd",e.chart,u)}e.off("mousemove",r),e.off("mouseup",o)};return e.on("mousedown",(function(i,s,u){e.sdk.trigger("highlightStart",e.chart),u.initializeMouseDown(i,s,u),o.default.startZoom(i,s,u),t=u.dragStartX,n=-1,e.on("mousemove",r).on("mouseup",a)}))}},37108:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(7494))&&r.__esModule?r:{default:r},i=n(72247);t.default=function(e){var t,n,r=function(e,t,r){if(r.isZooming){var o=t.canvas_ctx_,a=t.canvas_,s=a.getBoundingClientRect();if(!(e.pageYs.bottom)){r.zoomMoved=!0,r.dragEndY=(0,i.dragGetY_)(e,r);var u=r.dragStartY,l=r.dragEndY,c=t.getArea();o.clearRect(0,0,a.width,a.height),o.fillStyle="rgba(128,128,128,0.3)",o.fillRect(c.x,Math.min(u,l),c.w,Math.abs(l-u)),r.prevEndY=l,n=l}}},a=function o(i,a,s){if(s.isZooming){a.clearZoomRect_(),s.destroy();var u=-1===n||Math.abs(t-n)<5?null:[a.toDataYCoord(t),a.toDataYCoord(n)].sort((function(e,t){return e-t}));e.sdk.trigger("highlightVerticalEnd",e.chart,u)}e.off("mousemove",r),e.off("mouseup",o)};return e.on("mousedown",(function(i,s,u){e.sdk.trigger("highlightVerticalStart",e.chart),u.initializeMouseDown(i,s,u),o.default.startZoom(i,s,u),t=u.dragStartY,n=-1,e.on("mousemove",r).on("mouseup",a)}))}},1991:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(41062),o={warning:"#F9A825",critical:"#FF4136",clear:"#00AB44"};t.default=function(e,t){var n=e.chart.getAttribute("overlays")[t],i=n.when,a=n.status,s=e.getDygraph(),u=s.getArea().h,l=s.hidden_ctx_,c=(0,r.getArea)(s,[i,i]);if(!c)return(0,r.trigger)(e,t);var f=c.from;(0,r.trigger)(e,t,c),l.save(),l.beginPath(),l.moveTo(f-1,0),l.lineTo(f-1,u),l.globalAlpha=1,l.lineWidth=2,l.setLineDash([4,4]),l.strokeStyle=o[a],l.stroke(),l.closePath(),l.restore()}},3288:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(41062),o={warning:"#FFF8E1",critical:"#FFEBEF",clear:"#E5F5E8"},i={warning:"#FFC300",critical:"#F59B9B",clear:"#68C47D"},a={warning:"#F9A825",critical:"#FF4136",clear:"#00AB44"};t.default=function(e,t){var n=e.chart.getAttribute("overlays")[t],s=n.whenTriggered,u=n.whenLast,l=void 0===u?Math.floor((new Date).getTime()/1e3):u,c=n.status,f=e.getDygraph(),d=f.getArea().h,p=f.hidden_ctx_,h=(0,r.getArea)(f,[s,l]);if(!h)return(0,r.trigger)(e,t);var g=h.from,v=h.width,m=h.to;(0,r.trigger)(e,t,h),p.save(),p.beginPath(),p.rect(g,0,v,d-1),p.fillStyle=i[c],p.globalAlpha=.1,p.fill();p.beginPath(),p.moveTo(g,0),p.lineTo(g,d),p.globalAlpha=1,p.lineWidth=2,p.setLineDash([4,4]),p.strokeStyle=o[c],p.stroke(),p.beginPath(),p.moveTo(m-2,0),p.lineTo(m-2,d),p.strokeStyle=a[c],p.stroke(),p.closePath(),p.restore()}},41062:function(e,t){"use strict";t.__esModule=!0,t.trigger=t.getArea=void 0;t.getArea=function(e,t){var n=e.xAxisRange(),r=n[0],o=n[1],i=1e3*t[0],a=1e3*t[1];if(ao)return null;var s=Math.max(r,i),u=Math.min(o,a),l=e.toDomXCoord(s),c=e.toDomXCoord(u);return{from:l,to:c,width:c-l}};t.trigger=function(e,t,n){return requestAnimationFrame((function(){return e.trigger("overlayedAreaChanged:"+t,n)}))}},4241:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(41062);t.default=function(e,t){var n=e.chart.getAttribute("overlays")[t].range;if(n){var o=e.getDygraph(),i=o.getArea().h,a=o.hidden_ctx_,s=(0,r.getArea)(o,n);if(!s)return(0,r.trigger)(e,t);var u=s.from,l=s.width;(0,r.trigger)(e,t,s),a.save(),a.beginPath(),a.rect(u,0,l,i-1),a.fillStyle="rgba(207, 213, 218, 0.12)",a.fill(),a.beginPath(),a.rect(u,0,0,i-1),a.rect(u+l,0,0,i-1),a.fill(),a.setLineDash([2,7]),a.lineWidth=1,a.strokeStyle="#CFD5DA",a.stroke(),a.stroke(),a.closePath(),a.restore()}}},34613:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(82415))&&r.__esModule?r:{default:r};t.default=function(e){var t=null,n=function(t){var n=e.chart.getAttribute("overlays")[t].type,r=o.default[n];r&&r(e,t)},r=function(){var t=e.chart.getAttribute("overlays");Object.keys(t).forEach(n)},i=function(){var t=e.getDygraph();t&&t.renderGraph_(!1)},a=function(){t&&(i(),t(),t=null)};return{toggle:function(){var n=e.chart.getAttribute("overlays");if(!Object.keys(n).length)return a();t?i():t=e.on("underlayCallback",r)},destroy:a}}},85362:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(41062);t.default=function(e,t){var n=e.getDygraph(),o=n.xAxisRange()[1],i=o/1e3,a=e.chart.getFirstEntry(),s=e.chart.getAttributes(),u=s.outOfLimits,l=s.error;if(u||a&&!(a>i)||l){var c=u||l?[o,o]:[a,a],f=(0,r.getArea)(n,c);(0,r.trigger)(e,t,f)}}},82415:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(1991)),o=s(n(3288)),i=s(n(4241)),a=s(n(85362));function s(e){return e&&e.__esModule?e:{default:e}}var u={alarm:r.default,alarmRange:o.default,highlight:i.default,proceeded:a.default};t.default=u},9806:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(35890);function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n(r||0)?e:r||0:e}),0);n.strokeStyle=n.fillStyle=s(i),n.fillRect(r-a/2,0,a,15),n.strokeRect(r-a/2,0,a,15)}))}}}},43492:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(93501);t.default=function(e){return function(t){if(e&&0===t.seriesIndex){var n=e.chart.getVisibleDimensionIds(),o=e.chart.getVisibleDimensionIndexesById(),i=t.dygraph,a=t.drawingContext,s=t.allSeriesPoints,u=i.layout_.setNames,l=1/0;s.forEach((function(e){var t=e[1].canvasx-e[0].canvasx;t1?o.length-1:1));n.fillRect(r,e.canvasy,s/o.length,i-e.canvasy),n.strokeRect(r,e.canvasy,s/o.length,i-e.canvasy)}))}))}}}},60810:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(96556);t.default=function(){return function(e){var t=e.drawingContext,n=e.points,o=e.dygraph.toDomYCoord(0);t.fillStyle=(0,r.darkenColor)(e.color);var i=n[1].canvasx-n[0].canvasx,a=Math.floor(2/3*i);n.forEach((function(e){var n=e.canvasx;t.fillRect(n-a/2,e.canvasy,a,o-e.canvasy),t.strokeRect(n-a/2,e.canvasy,a,o-e.canvasy)}))}}},35484:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(93501);function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nf));u++);for(h>g&&(p*=-1),s=0;s<=c;s++)l=h+s*p,d.push({v:l})}var x=o("axisLabelFormatter");for(s=0;s.08}))),[{label_v:S+C,label:"i"}])}},76081:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(26712)),o=s(n(58960)),i=n(24298),a=s(n(93492));function s(e){return e&&e.__esModule?e:{default:e}}function u(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 l(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nt?t:e.clientHeight);e.firstChild.G__height=n,e.firstChild.style.height=n+"px";var r=t;e.firstChild.G__width=r,e.firstChild.style.width=r+"px",p.setOptions({}),p.update(!0),d.trigger("resize")}));var m=t.getAttributes().loaded;n=(0,i.unregister)(t.onAttributeChange("hoverX",v),!m&&t.onceAttributeChange("loaded",v),t.onAttributeChange("theme",(function(){var e=h(),t=e.color,n=e.strokeColor;p.setOptions({strokeColor:n,pointer:{color:t}})})));var y=e.clientWidth,b=.9*(e.clientHeight>y?y:e.clientHeight);e.firstChild.G__height=b,e.firstChild.style.height=b+"px";var w=y;e.firstChild.G__width=w,e.firstChild.style.width=w+"px",p.setOptions({}),d.trigger("resize"),v()}},unmount:function(){n&&n(),c&&c(),p=null,s=null,l=null,d.unmount()},render:v,getMinMax:g})}},63902:function(e,t){"use strict";t.__esModule=!0,t.default=void 0;var n=function(e,t){for(var n in t.prototype)t.hasOwnProperty(n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},r=function(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);return n},o=function(e){return"#"===e.charAt(0)?e.substring(1,7):e};function i(e,t){null==e&&(e=!0),this.clear=null==t||t,e&&l.add(this)}function a(){return a.__super__.constructor.apply(this,arguments)}function s(e){if(this.gauge=e,void 0===this.gauge)throw new Error("The element isn't defined.");this.ctx=this.gauge.ctx,this.canvas=this.gauge.canvas,s.__super__.constructor.call(this,!1,!1),this.setOptions()}function u(e){var t,n;this.canvas=e,u.__super__.constructor.call(this),this.percentColors=null,"undefined"!==typeof G_vmlCanvasManager&&(this.canvas=window.G_vmlCanvasManager.initElement(this.canvas)),this.ctx=this.canvas.getContext("2d"),t=this.canvas.clientHeight,n=this.canvas.clientWidth,this.canvas.height=t,this.canvas.width=n,this.gp=[new s(this)],this.setOptions()}i.prototype.animationSpeed=32,i.prototype.update=function(e){var t;return null==e&&(e=!1),!(!e&&this.displayedValue===this.value)&&(this.ctx&&this.clear&&this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),t=this.value-this.displayedValue,Math.abs(t/this.animationSpeed)<=.001?this.displayedValue=this.value:this.displayedValue=this.displayedValue+t/this.animationSpeed,this.render(),!0)},n(a,i),a.prototype.displayScale=1,a.prototype.forceUpdate=!0,a.prototype.setMinValue=function(e,t){var n,r,o,i,a;if(this.minValue=e,null==t&&(t=!0),t){for(this.displayedValue=this.minValue,a=[],r=0,o=(i=this.gp||[]).length;r.5&&(this.options.angle=.5),this.configDisplayScale(),this},a.prototype.configDisplayScale=function(){var e,t,n,r;return!1===this.options.highDpiSupport?delete this.displayScale:(t=window.devicePixelRatio||1,e=this.ctx.webkitBackingStorePixelRatio||this.ctx.mozBackingStorePixelRatio||this.ctx.msBackingStorePixelRatio||this.ctx.oBackingStorePixelRatio||this.ctx.backingStorePixelRatio||1,this.displayScale=t/e),r=this.canvas.G__width||this.canvas.width,n=this.canvas.G__height||this.canvas.height,this.canvas.width=r*this.displayScale,this.canvas.height=n*this.displayScale,this.canvas.style.width=r+"px",this.canvas.style.height=n+"px",this.canvas.G__width=r,this.canvas.G__height=n,this},a.prototype.parseValue=function(e){return e=parseFloat(e)||Number(e),isFinite(e)?e:0},n(s,i),s.prototype.displayedValue=0,s.prototype.value=0,s.prototype.options={strokeWidth:.035,length:.1,color:"#000000",iconPath:null,iconScale:1,iconAngle:0},s.prototype.img=null,s.prototype.setOptions=function(e){if(null==e&&(e=null),this.options=r(this.options,e),this.length=2*this.gauge.radius*this.gauge.options.radiusScale*this.options.length,this.strokeWidth=this.canvas.height*this.options.strokeWidth,this.maxValue=this.gauge.maxValue,this.minValue=this.gauge.minValue,this.animationSpeed=this.gauge.animationSpeed,this.options.angle=this.gauge.options.angle,this.options.iconPath)return this.img=new Image,this.img.src=this.options.iconPath},s.prototype.render=function(){var e,t,n,r,o,i,a,s,u;if(e=this.gauge.getAngle.call(this,this.displayedValue),s=Math.round(this.length*Math.cos(e)),u=Math.round(this.length*Math.sin(e)),i=Math.round(this.strokeWidth*Math.cos(e-Math.PI/2)),a=Math.round(this.strokeWidth*Math.sin(e-Math.PI/2)),t=Math.round(this.strokeWidth*Math.cos(e+Math.PI/2)),n=Math.round(this.strokeWidth*Math.sin(e+Math.PI/2)),this.ctx.beginPath(),this.ctx.fillStyle=this.options.color,this.ctx.arc(0,0,this.strokeWidth,0,2*Math.PI,!1),this.ctx.fill(),this.ctx.beginPath(),this.ctx.moveTo(i,a),this.ctx.lineTo(s,u),this.ctx.lineTo(t,n),this.ctx.fill(),this.img)return r=Math.round(this.img.width*this.options.iconScale),o=Math.round(this.img.height*this.options.iconScale),this.ctx.save(),this.ctx.translate(s,u),this.ctx.rotate(e+Math.PI/180*(90+this.options.iconAngle)),this.ctx.drawImage(this.img,-r/2,-o/2,r,o),this.ctx.restore()},n(u,a),u.prototype.elem=null,u.prototype.value=[20],u.prototype.maxValue=80,u.prototype.minValue=0,u.prototype.displayedAngle=0,u.prototype.displayedValue=0,u.prototype.lineWidth=40,u.prototype.paddingTop=.1,u.prototype.paddingBottom=.1,u.prototype.percentColors=null,u.prototype.options={colorStart:"#6fadcf",colorStop:void 0,gradientType:0,strokeColor:"#e0e0e0",pointer:{length:.8,strokeWidth:.035,iconScale:1},angle:.15,lineWidth:.44,radiusScale:1,limitMax:!1,limitMin:!1},u.prototype.setOptions=function(e){var t,n,r,o,i;for(null==e&&(e=null),u.__super__.setOptions.call(this,e),this.configPercentColors(),this.extraPadding=0,this.options.angle<0&&(o=Math.PI*(1+this.options.angle),this.extraPadding=Math.sin(o)),this.availableHeight=this.canvas.height*(1-this.paddingTop-this.paddingBottom),this.lineWidth=this.availableHeight*this.options.lineWidth,this.radius=(this.availableHeight-this.lineWidth/2)/(1+this.extraPadding),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),n=0,r=(i=this.gp).length;n=i;n=0<=i?++r:--r)s=parseInt(o(this.options.percentColors[n][1]).substring(0,2),16),t=parseInt(o(this.options.percentColors[n][1]).substring(2,4),16),e=parseInt(o(this.options.percentColors[n][1]).substring(4,6),16),a.push(this.percentColors[n]={pct:this.options.percentColors[n][0],color:{r:s,g:t,b:e}});return a}},u.prototype.set=function(e){var t,n,r,o,i,a,u,c,f;for(e instanceof Array||(e=[e]),n=r=0,u=e.length-1;0<=u?r<=u:r>=u;n=0<=u?++r:--r)e[n]=this.parseValue(e[n]);if(e.length>this.gp.length)for(n=o=0,c=e.length-this.gp.length;0<=c?oc;n=0<=c?++o:--o)(t=new s(this)).setOptions(this.options.pointer),this.gp.push(t);else e.lengththis.maxValue?this.options.limitMax?f=this.maxValue:this.maxValue=f+1:f=s;o=0<=s?++i:--i)if(e<=this.percentColors[o].pct){!0===t?(u=this.percentColors[o-1]||this.percentColors[0],r=this.percentColors[o],a=(e-u.pct)/(r.pct-u.pct),n={r:Math.floor(u.color.r*(1-a)+r.color.r*a),g:Math.floor(u.color.g*(1-a)+r.color.g*a),b:Math.floor(u.color.b*(1-a)+r.color.b*a)}):n=this.percentColors[o].color;break}return"rgb("+[n.r,n.g,n.b].join(",")+")"},u.prototype.getColorForValue=function(e,t){var n;return n=(e-this.minValue)/(this.maxValue-this.minValue),this.getColorForPercentage(n,t)},u.prototype.renderTicks=function(e,t,n,r){var o,i,a,s,u,l,c,f,d,p,h,g,v,m,y,b,w,x,_,S;if(e!=={}){for(l=e.divisions||0,x=e.subDivisions||0,a=e.divColor||"#fff",m=e.subColor||"#fff",s=e.divLength||.7,b=e.subLength||.2,d=parseFloat(this.maxValue)-parseFloat(this.minValue),p=parseFloat(d)/parseFloat(e.divisions),y=parseFloat(p)/parseFloat(e.subDivisions),o=parseFloat(this.minValue),i=0+y,u=(f=d/400)*(e.divWidth||1),w=f*(e.subWidth||1),g=[],_=c=0,h=l+1;c0?g.push(function(){var e,t,n;for(n=[],e=0,t=x-1;ethis.maxValue&&(s=this.maxValue),p=this.radius*this.options.radiusScale,g.height&&(this.ctx.lineWidth=this.lineWidth*g.height,d=this.lineWidth/2*(g.offset||1-g.height),p=this.radius*this.options.radiusScale+d),this.ctx.strokeStyle=g.strokeStyle,this.ctx.beginPath(),this.ctx.arc(0,0,p,this.getAngle(u),this.getAngle(s),!1),this.ctx.stroke();else void 0!==this.options.customFillStyle?t=this.options.customFillStyle(this):null!==this.percentColors?t=this.getColorForValue(this.displayedValue,this.options.generateGradient):void 0!==this.options.colorStop?((t=0===this.options.gradientType?this.ctx.createRadialGradient(h,n,9,h,n,70):this.ctx.createLinearGradient(0,0,h,0)).addColorStop(0,this.options.colorStart),t.addColorStop(1,this.options.colorStop)):t=this.options.colorStart,this.ctx.strokeStyle=t,this.ctx.beginPath(),this.ctx.arc(h,n,l,(1+this.options.angle)*Math.PI,e,!1),this.ctx.lineWidth=this.lineWidth,this.ctx.stroke(),this.ctx.strokeStyle=this.options.strokeColor,this.ctx.beginPath(),this.ctx.arc(h,n,l,e,(2-this.options.angle)*Math.PI,!1),this.ctx.stroke(),this.ctx.save(),this.ctx.translate(h,n);for(this.options.renderTicks&&this.renderTicks(this.options.renderTicks,h,n,l),this.ctx.restore(),this.ctx.translate(h,n),o=0,a=(f=this.gp).length;o=0;o+=-1)r=s[o],l.elements.splice(r,1);return l.animId=t?null:requestAnimationFrame(l.run)}if(!1===e)return!0===l.animId&&cancelAnimationFrame(l.animId),l.animId=requestAnimationFrame(l.run)}},c=u;t.default=c},1271:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=n(24298),i=(r=n(58960))&&r.__esModule?r:{default:r};function a(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 s(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,s);return l(l({},a),{},{children:t,active:a.active||a["aria-expanded"],hoverIndicator:r,padding:i})})).withConfig({displayName:"button__Button",componentId:"sc-oqiqxn-0"})(["border:initial;padding:",";height:fit-content;line-height:0;background:",";cursor:pointer;svg{fill:",";stroke:",";}"," &:hover{",";svg{fill:",";stroke:",";}}"],(function(e){return e.padding}),(function(e){var t=e.theme;return e.active?(0,i.getColor)("borderSecondary")({theme:t}):"initial"}),(function(e){var t=e.active,n=e.disabled,r=e.theme;return e.stroked?"none":(0,i.getColor)(f({active:t,disabled:n}))({theme:r})}),(function(e){var t=e.active,n=e.disabled,r=e.theme;return e.stroked?(0,i.getColor)(f({active:t,disabled:n}))({theme:r}):"none"}),(function(e){var t=e.active,n=e.hoverIndicator;return(t||n)&&"\n border-radius: 4px;\n "}),(function(e){var t=e.theme,n=e.hoverIndicator,r=e.disabled;return n&&!r&&"background: "+(0,i.getColor)("borderSecondary")({theme:t})+";"}),(function(e){var t=e.theme,n=e.stroked,r=e.disabled;return n?"none":(0,i.getColor)(f({defaultColor:"textDescription",disabled:r}))({theme:t})}),(function(e){var t=e.theme,n=e.stroked,r=e.disabled;return n?(0,i.getColor)(f({defaultColor:"textDescription",disabled:r}))({theme:t}):"none"})),p=(0,a.withTooltip)(d);t.default=p},3701:function(e,t,n){"use strict";t.__esModule=!0,t.default=t.Button=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),o=u(n(2568)),i=n(10114),a=u(n(71896));t.Button=a.default;var s=["svg","size","width","height"];function u(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t