tabby-group-server-stats 1.7.2 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +3 -2
- package/PUBLISHING.zh-CN.md +21 -9
- package/README.en.md +50 -16
- package/README.md +52 -18
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/package.json +20 -6
- package/presets.json +60 -60
- package/typings/components/bottom-bar.component.d.ts +2 -0
- package/typings/components/settings.component.d.ts +13 -0
- package/typings/config.d.ts +1 -0
- package/typings/display-scope.d.ts +23 -0
- package/typings/index.d.ts +0 -4
- package/typings/metric-display.d.ts +2 -0
- package/typings/metric-model.d.ts +2 -0
- package/typings/preset-library.d.ts +19 -0
- package/typings/services/metric-scope.service.d.ts +19 -0
- package/typings/services/stats.service.d.ts +2 -0
- package/typings/toolbar-button.provider.d.ts +1 -4
package/dist/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("tabby-core"),require("tabby-settings"),require("fs"),require("os"),require("path"),require("@angular/platform-browser"));else if("function"==typeof define&&define.amd)define(["@angular/core","@angular/common","@angular/forms","rxjs","rxjs/operators","tabby-core","tabby-settings","fs","os","path","@angular/platform-browser"],e);else{var n="object"==typeof exports?e(require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("tabby-core"),require("tabby-settings"),require("fs"),require("os"),require("path"),require("@angular/platform-browser")):e(t["@angular/core"],t["@angular/common"],t["@angular/forms"],t.rxjs,t["rxjs/operators"],t["tabby-core"],t["tabby-settings"],t.fs,t.os,t.path,t["@angular/platform-browser"]);for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(this,(t,e,n,i,s,a,o,r,l,c,d)=>(()=>{"use strict";var p,h,u={165:t=>{t.exports=d},182:t=>{t.exports=n},234:t=>{t.exports=l},358:t=>{t.exports=e},439:t=>{t.exports=s},650:t=>{t.exports=a},700:t=>{t.exports=o},860:e=>{e.exports=t},911:t=>{t.exports=c},943:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\r\n <polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>\r\n</svg>'},947:t=>{t.exports=r},961:t=>{t.exports=i},977:t=>{t.exports=JSON.parse('[{"id":"single-uptime","kind":"metric","label":"运行时间","labels":{"en":"Uptime","zh":"运行时间"},"description":"系统持续运行时间。","descriptions":{"en":"System uptime.","zh":"系统持续运行时间。"},"metric":{"label":"Uptime","command":"awk \'{d=int($1/86400); h=int(($1%86400)/3600); print d\\"d \\"h\\"h\\"}\' /proc/uptime 2>/dev/null || echo \\"-\\"","type":"text","icon":"stats-uptime","color":"#00ff00","interval":60,"suffix":"","id":"single-uptime","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-temperature","kind":"metric","label":"温度","labels":{"en":"Temperature","zh":"温度"},"description":"第一个温度传感器读数。","descriptions":{"en":"Temperature from the first thermal zone.","zh":"第一个温度传感器读数。"},"metric":{"label":"Temp","command":"awk \'{printf \\"%.1f\\\\n\\",$1/1000}\' /sys/class/thermal/thermal_zone0/temp","type":"text","icon":"stats-temperature","color":"#00ff00","interval":5,"suffix":"°C","colorRules":[{"operator":">=","value":"80","color":"#ff0000"},{"operator":">=","value":"65","color":"#ffa500"}],"id":"single-temperature","checkCommand":"test -r /sys/class/thermal/thermal_zone0/temp","checkMode":"exitCode","checkExpected":"0","unavailableText":"Unavailable","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-load","kind":"metric","label":"系统负载","labels":{"en":"Load","zh":"系统负载"},"description":"系统的一分钟平均负载。","descriptions":{"en":"One-minute system load.","zh":"系统的一分钟平均负载。"},"metric":{"label":"Load","command":"cat /proc/loadavg | awk \'{print $1}\'","type":"text","icon":"stats-cpu-load","color":"#00ff00","interval":5,"suffix":"","id":"single-load","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-users","kind":"metric","label":"登录用户","labels":{"en":"Users","zh":"登录用户"},"description":"系统记录的登录会话数量;悬停按用户名汇总会话数,包含终端与控制台登录,不等同于全部 TCP 或后台 SSH 连接。","descriptions":{"en":"Login sessions recorded by the system. Hover to group session counts by username, including terminal and console logins; this is not a count of all TCP or background SSH connections.","zh":"系统记录的登录会话数量;悬停按用户名汇总会话数,包含终端与控制台登录,不等同于全部 TCP 或后台 SSH 连接。"},"metric":{"label":"Users","command":"_tabby_who=$(LC_ALL=C who 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$_tabby_who\\" | awk \'NF {count++} END {print count+0}\'","checkCommand":"command -v who >/dev/null 2>&1","checkMode":"exitCode","checkExpected":"0","unavailableText":"Unavailable","detailCommand":"_tabby_who=$(LC_ALL=C who 2>/dev/null) || exit 1; _tabby_users=$(printf \'%s\\\\n\' \\"$_tabby_who\\" | awk \'NF {count[$1]++} END {for(user in count) printf \\"%s\\\\t%d\\\\n\\",user,count[user]}\') || exit 1; _tabby_users=$(printf \'%s\\\\n\' \\"$_tabby_users\\" | LC_ALL=C sort) || exit 1; printf \'%s\\\\n\' \\"$_tabby_users\\" | awk -F \'\\\\t\' \'NF {printf \\"%s%s ×%d\\",n++?\\", \\":\\"\\",$1,$2} END {if(!n) printf \\"-\\"; printf \\"\\\\n\\"}\'","type":"text","icon":"users","color":"#00ff00","interval":10,"suffix":"","id":"single-users","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-docker","kind":"metric","label":"Docker 容器","labels":{"en":"Docker","zh":"Docker 容器"},"description":"运行中的 Docker 容器数量。","descriptions":{"en":"Number of running Docker containers.","zh":"运行中的 Docker 容器数量。"},"metric":{"label":"Docker","command":"docker ps -q 2>/dev/null | wc -l","type":"text","icon":"stats-container","color":"#00ff00","interval":10,"suffix":" run","id":"single-docker","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-gpu-memory","kind":"metric","label":"GPU 显存","labels":{"en":"GPU memory","zh":"GPU 显存"},"description":"总显存使用率;悬停显示剩余/总显存(GiB)。","descriptions":{"en":"Total VRAM usage percentage; hover for free/total GiB.","zh":"总显存使用率;悬停显示剩余/总显存(GiB)。"},"metric":{"id":"single-gpu-memory","label":"GPU","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"tabby_gpu_value() { printf \'%s\\\\n\' \\"$1\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'; }; if gpu_data=$(nvidia-smi --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) && tabby_gpu_value \\"$gpu_data\\"; then :; else gpu_data=$(for gpu_index in 0 1 2 3 4 5 6 7; do gpu_row=$(nvidia-smi --id=\\"$gpu_index\\" --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || continue; tabby_gpu_value \\"$gpu_row\\" >/dev/null && printf \'%s\\\\n\' \\"$gpu_row\\"; done); tabby_gpu_value \\"$gpu_data\\"; fi","detailCommand":"tabby_gpu_value() { printf \'%s\\\\n\' \\"$1\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GiB\\\\n\\",free/1024,total/1024}\'; }; if gpu_data=$(nvidia-smi --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) && tabby_gpu_value \\"$gpu_data\\"; then :; else gpu_data=$(for gpu_index in 0 1 2 3 4 5 6 7; do gpu_row=$(nvidia-smi --id=\\"$gpu_index\\" --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || continue; tabby_gpu_value \\"$gpu_row\\" >/dev/null && printf \'%s\\\\n\' \\"$gpu_row\\"; done); tabby_gpu_value \\"$gpu_data\\"; fi","checkCommand":"tabby_gpu_exists() { gpu_data=$(nvidia-smi \\"$@\\" --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || return 1; printf \'%s\\\\n\' \\"$gpu_data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 ~ /^[0-9]+$/) found=1} END {exit !found}\'; }; tabby_gpu_exists || (for gpu_index in 0 1 2 3 4 5 6 7; do tabby_gpu_exists --id=\\"$gpu_index\\" && exit 0; done; exit 1)","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":true,"visibleWhenUnavailable":true,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}],"displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"Tabby Group Server Stats","url":"https://github.com/lishuainan0209/tabby-group-server-stats","license":"MIT"}},{"id":"single-ssh-sessions","kind":"metric","label":"SSH 会话","labels":{"en":"SSH Sessions","zh":"SSH 会话"},"description":"已建立的 SSH 会话数量。","descriptions":{"en":"Established SSH session count.","zh":"已建立的 SSH 会话数量。"},"metric":{"label":"SSH Sessions","command":"ss -tnp | grep sshd | grep ESTAB | wc -l","type":"text","icon":"terminal","color":"#00ff00","interval":10,"suffix":"","id":"single-ssh-sessions","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-ssh-latency","kind":"metric","label":"SSH 延迟","labels":{"en":"SSH latency","zh":"SSH 延迟"},"description":"当前 SSH 连接的往返延迟。","descriptions":{"en":"Round-trip latency for this SSH connection.","zh":"当前 SSH 连接的往返延迟。"},"metric":{"label":"Ping","command":"set -- $SSH_CONNECTION; v=$(ss -ti \\"dst $1 and dport = $2\\" 2>/dev/null | grep -o \\"rtt:[0-9.]*\\" | head -n1 | cut -d: -f2); awk -v v=\\"${v:-0}\\" \\"BEGIN{printf \\\\\\"%.1f\\\\\\", v}\\"","type":"text","icon":"stats-latency","color":"#00ff00","interval":5,"suffix":" ms","id":"single-ssh-latency","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-i-o-wait","kind":"metric","label":"I/O 等待","labels":{"en":"I/O Wait","zh":"I/O 等待"},"description":"一秒采样中 CPU 等待 I/O 的时间百分比。","descriptions":{"en":"CPU time spent waiting for I/O, sampled over one second.","zh":"一秒采样中 CPU 等待 I/O 的时间百分比。"},"metric":{"label":"I/O Wait","command":"a=$(awk \'/^cpu / { t=0; for(i=2;i<=9;i++) t+=$i; print t,$6; found=1; exit } END { if(!found) exit 1 }\' /proc/stat) || exit 1; sleep 1; b=$(awk \'/^cpu / { t=0; for(i=2;i<=9;i++) t+=$i; print t,$6; found=1; exit } END { if(!found) exit 1 }\' /proc/stat) || exit 1; printf \'%s\\\\n%s\\\\n\' \\"$a\\" \\"$b\\" | awk \'NR==1 { t1=$1; v1=$2 } NR==2 { dt=$1-t1; v=$2; result=dt>0?(v-v1)*100/dt:0; if(result<0) result=0; if(result>100) result=100; printf \\"%.1f\\\\n\\",result }\'","type":"text","icon":"stats-io-wait","color":"#00ff00","interval":10,"suffix":"%","id":"single-i-o-wait","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-steal","kind":"metric","label":"CPU 被占用时间","labels":{"en":"Steal","zh":"CPU 被占用时间"},"description":"一秒采样中被虚拟机监控器占用的 CPU 时间百分比。","descriptions":{"en":"CPU time taken by the hypervisor, sampled over one second.","zh":"一秒采样中被虚拟机监控器占用的 CPU 时间百分比。"},"metric":{"label":"Steal","command":"a=$(awk \'/^cpu / { t=0; for(i=2;i<=9;i++) t+=$i; print t,$9; found=1; exit } END { if(!found) exit 1 }\' /proc/stat) || exit 1; sleep 1; b=$(awk \'/^cpu / { t=0; for(i=2;i<=9;i++) t+=$i; print t,$9; found=1; exit } END { if(!found) exit 1 }\' /proc/stat) || exit 1; printf \'%s\\\\n%s\\\\n\' \\"$a\\" \\"$b\\" | awk \'NR==1 { t1=$1; v1=$2 } NR==2 { dt=$1-t1; v=$2; result=dt>0?(v-v1)*100/dt:0; if(result<0) result=0; if(result>100) result=100; printf \\"%.1f\\\\n\\",result }\'","type":"text","icon":"stats-cpu","color":"#00ff00","interval":10,"suffix":"%","id":"single-steal","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-failed-units","kind":"metric","label":"失败的服务","labels":{"en":"Failed Units","zh":"失败的服务"},"description":"systemd 失败单元数量。","descriptions":{"en":"Failed systemd units.","zh":"systemd 失败单元数量。"},"metric":{"label":"Failed Units","command":"systemctl --failed --no-legend 2>/dev/null | wc -l","type":"text","icon":"stats-health","color":"#00ff00","interval":30,"suffix":"","colorRules":[{"operator":">=","value":"1","color":"#ff0000"}],"id":"single-failed-units","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-services","kind":"metric","label":"服务状态","labels":{"en":"Services","zh":"服务状态"},"description":"服务检查示例;使用前请按服务器修改服务名称。","descriptions":{"en":"Example service checks; edit service names to fit the server.","zh":"服务检查示例;使用前请按服务器修改服务名称。"},"metric":{"label":"Services","command":"down=$(for s in kong nginx mongod asterisk redis rabbitmq-server; do systemctl is-active --quiet $s 2>/dev/null || echo $s; done | xargs); if ! systemctl list-units --type=service --state=active 2>/dev/null | grep -q postgres; then down=\\"${down:+$down }postgres\\"; fi; [ -z \\"$down\\" ] && echo \\"OK\\" || echo \\"DOWN: $down\\"","type":"text","icon":"stats-service","color":"#00ff00","interval":30,"suffix":"","colorRules":[{"operator":"==","value":"OK","color":"#00ff00"},{"operator":"contains","value":"DOWN","color":"#ff0000"}],"id":"single-services","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"gpu-memory-group","kind":"group","label":"GPU 显存","labels":{"en":"GPU memory","zh":"GPU 显存"},"description":"显存使用率;悬停显示剩余/总显存。自动隐藏不存在的 GPU 0–7。","descriptions":{"en":"VRAM use percentage; hover for free/total GiB. Missing GPUs 0–7 are hidden.","zh":"显存使用率;悬停显示剩余/总显存(GiB)。自动隐藏不存在的 GPU 0–7。"},"source":{"name":"Tabby Group Server Stats","url":"https://github.com/lishuainan0209/tabby-group-server-stats","license":"MIT"},"group":{"id":"gpu-memory-group","label":"GPU 显存","mode":"overview","layout":"vertical","interval":3,"displayScope":{"mode":"all","profileIds":[]},"main":{"id":"gpu-main","label":"GPU","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"tabby_gpu_value() { printf \'%s\\\\n\' \\"$1\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'; }; if gpu_data=$(nvidia-smi --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) && tabby_gpu_value \\"$gpu_data\\"; then :; else gpu_data=$(for gpu_index in 0 1 2 3 4 5 6 7; do gpu_row=$(nvidia-smi --id=\\"$gpu_index\\" --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || continue; tabby_gpu_value \\"$gpu_row\\" >/dev/null && printf \'%s\\\\n\' \\"$gpu_row\\"; done); tabby_gpu_value \\"$gpu_data\\"; fi","detailCommand":"tabby_gpu_value() { printf \'%s\\\\n\' \\"$1\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GiB\\\\n\\",free/1024,total/1024}\'; }; if gpu_data=$(nvidia-smi --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) && tabby_gpu_value \\"$gpu_data\\"; then :; else gpu_data=$(for gpu_index in 0 1 2 3 4 5 6 7; do gpu_row=$(nvidia-smi --id=\\"$gpu_index\\" --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || continue; tabby_gpu_value \\"$gpu_row\\" >/dev/null && printf \'%s\\\\n\' \\"$gpu_row\\"; done); tabby_gpu_value \\"$gpu_data\\"; fi","checkCommand":"tabby_gpu_exists() { gpu_data=$(nvidia-smi \\"$@\\" --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || return 1; printf \'%s\\\\n\' \\"$gpu_data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 ~ /^[0-9]+$/) found=1} END {exit !found}\'; }; tabby_gpu_exists || (for gpu_index in 0 1 2 3 4 5 6 7; do tabby_gpu_exists --id=\\"$gpu_index\\" && exit 0; done; exit 1)","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":true,"visibleWhenUnavailable":true,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}]},"children":[{"id":"gpu-0","label":"GPU 0","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"data=$(nvidia-smi --id=0 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'","detailCommand":"data=$(nvidia-smi --id=0 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GiB\\\\n\\",free/1024,total/1024}\'","checkCommand":"data=$(nvidia-smi --id=0 --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 == \\"0\\") found=1} END {exit !found}\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":false,"visibleWhenUnavailable":false,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}]},{"id":"gpu-1","label":"GPU 1","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"data=$(nvidia-smi --id=1 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'","detailCommand":"data=$(nvidia-smi --id=1 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GiB\\\\n\\",free/1024,total/1024}\'","checkCommand":"data=$(nvidia-smi --id=1 --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 == \\"1\\") found=1} END {exit !found}\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":false,"visibleWhenUnavailable":false,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}]},{"id":"gpu-2","label":"GPU 2","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"data=$(nvidia-smi --id=2 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'","detailCommand":"data=$(nvidia-smi --id=2 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GiB\\\\n\\",free/1024,total/1024}\'","checkCommand":"data=$(nvidia-smi --id=2 --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 == \\"2\\") found=1} END {exit !found}\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":false,"visibleWhenUnavailable":false,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}]},{"id":"gpu-3","label":"GPU 3","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"data=$(nvidia-smi --id=3 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'","detailCommand":"data=$(nvidia-smi --id=3 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GiB\\\\n\\",free/1024,total/1024}\'","checkCommand":"data=$(nvidia-smi --id=3 --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 == \\"3\\") found=1} END {exit !found}\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":false,"visibleWhenUnavailable":false,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}]},{"id":"gpu-4","label":"GPU 4","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"data=$(nvidia-smi --id=4 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'","detailCommand":"data=$(nvidia-smi --id=4 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GiB\\\\n\\",free/1024,total/1024}\'","checkCommand":"data=$(nvidia-smi --id=4 --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 == \\"4\\") found=1} END {exit !found}\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":false,"visibleWhenUnavailable":false,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}]},{"id":"gpu-5","label":"GPU 5","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"data=$(nvidia-smi --id=5 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'","detailCommand":"data=$(nvidia-smi --id=5 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GiB\\\\n\\",free/1024,total/1024}\'","checkCommand":"data=$(nvidia-smi --id=5 --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 == \\"5\\") found=1} END {exit !found}\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":false,"visibleWhenUnavailable":false,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}]},{"id":"gpu-6","label":"GPU 6","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"data=$(nvidia-smi --id=6 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'","detailCommand":"data=$(nvidia-smi --id=6 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GiB\\\\n\\",free/1024,total/1024}\'","checkCommand":"data=$(nvidia-smi --id=6 --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 == \\"6\\") found=1} END {exit !found}\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":false,"visibleWhenUnavailable":false,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}]},{"id":"gpu-7","label":"GPU 7","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"data=$(nvidia-smi --id=7 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'","detailCommand":"data=$(nvidia-smi --id=7 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GiB\\\\n\\",free/1024,total/1024}\'","checkCommand":"data=$(nvidia-smi --id=7 --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 == \\"7\\") found=1} END {exit !found}\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":false,"visibleWhenUnavailable":false,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}]}]}},{"id":"disks-P0磁盘","kind":"group","label":"P0磁盘","group":{"id":"disk-group","label":"P0磁盘","mode":"overview","layout":"vertical","interval":3,"main":{"id":"disk-total","label":"磁盘总余量","type":"text","icon":"stats-disk-space","color":"#00ff00","suffix":" GiB","interval":20,"timeout":60,"checkCommand":"","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/data\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.0f\\\\n\\",int(available/1048576)}\'","detailCommand":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/data\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GiB\\\\n\\",available/1048576,total/1048576}\'","colorRules":[{"operator":"<","value":"50","color":"#ff0000"},{"operator":"<=","value":"100","color":"#ffa500"}]},"children":[{"id":"disk-root","label":"系统盘","type":"text","icon":"stats-system-disk","color":"#00ff00","suffix":" GiB","interval":20,"timeout":60,"checkCommand":"test -d \'/\' && df -Pk -- \'/\' >/dev/null 2>&1","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GiB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]},{"id":"disk-mount-0","label":"/data","type":"text","icon":"stats-data-disk","color":"#00ff00","suffix":" GiB","interval":20,"timeout":60,"checkCommand":"mountpoint -q -- \'/data\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/data\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/data\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GiB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]}],"displayScope":{"mode":"selected","profileIds":[]}},"source":{"name":"Tabby Group Server Stats","url":"https://github.com/lishuainan0209/tabby-group-server-stats","license":"MIT"},"audience":"author-lab","description":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。","descriptions":{"en":"For the author\'s laboratory only. Other users: please do not download or use this preset. Total free capacity across valid unique filesystems; children show the system disk first, then data mounts. Hover for free/total capacity; missing mounts remain visible.","zh":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。"},"profileNames":["P0(ai)","P0(s_lsn)"]},{"id":"disks-P1磁盘","kind":"group","label":"P1磁盘","group":{"id":"disk-group","label":"P1磁盘","mode":"overview","layout":"vertical","interval":3,"main":{"id":"disk-total","label":"磁盘总余量","type":"text","icon":"stats-disk-space","color":"#00ff00","suffix":" GiB","interval":20,"timeout":60,"checkCommand":"","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"_disk_rows=$(\\nfor _disk_path in \'/\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.0f\\\\n\\",int(available/1048576)}\'","detailCommand":"_disk_rows=$(\\nfor _disk_path in \'/\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GiB\\\\n\\",available/1048576,total/1048576}\'","colorRules":[{"operator":"<","value":"50","color":"#ff0000"},{"operator":"<=","value":"100","color":"#ffa500"}]},"children":[{"id":"disk-root","label":"系统盘","type":"text","icon":"stats-system-disk","color":"#00ff00","suffix":" GiB","interval":20,"timeout":60,"checkCommand":"test -d \'/\' && df -Pk -- \'/\' >/dev/null 2>&1","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GiB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]}],"displayScope":{"mode":"selected","profileIds":[]}},"source":{"name":"Tabby Group Server Stats","url":"https://github.com/lishuainan0209/tabby-group-server-stats","license":"MIT"},"audience":"author-lab","description":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。","descriptions":{"en":"For the author\'s laboratory only. Other users: please do not download or use this preset. Total free capacity across valid unique filesystems; children show the system disk first, then data mounts. Hover for free/total capacity; missing mounts remain visible.","zh":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。"},"profileNames":["P1(ai)"],"labels":{"en":"P1 host disks","zh":"P1磁盘"}},{"id":"disks-P1容器磁盘","kind":"group","label":"P1容器磁盘","group":{"id":"disk-group","label":"P1容器磁盘","mode":"overview","layout":"vertical","interval":3,"main":{"id":"disk-total","label":"磁盘总余量","type":"text","icon":"stats-disk-space","color":"#00ff00","suffix":" GiB","interval":20,"timeout":60,"checkCommand":"","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/public\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.0f\\\\n\\",int(available/1048576)}\'","detailCommand":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/public\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GiB\\\\n\\",available/1048576,total/1048576}\'","colorRules":[{"operator":"<","value":"50","color":"#ff0000"},{"operator":"<=","value":"100","color":"#ffa500"}]},"children":[{"id":"disk-root","label":"系统盘","type":"text","icon":"stats-system-disk","color":"#00ff00","suffix":" GiB","interval":20,"timeout":60,"checkCommand":"test -d \'/\' && df -Pk -- \'/\' >/dev/null 2>&1","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GiB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]},{"id":"disk-mount-0","label":"/public","type":"text","icon":"stats-data-disk","color":"#00ff00","suffix":" GiB","interval":20,"timeout":60,"checkCommand":"mountpoint -q -- \'/public\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/public\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/public\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GiB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]}],"displayScope":{"mode":"selected","profileIds":[]}},"source":{"name":"Tabby Group Server Stats","url":"https://github.com/lishuainan0209/tabby-group-server-stats","license":"MIT"},"audience":"author-lab","description":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。","descriptions":{"en":"For the author\'s laboratory only. Other users: please do not download or use this preset. Total free capacity across valid unique filesystems; children show the system disk first, then data mounts. Hover for free/total capacity; missing mounts remain visible.","zh":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。"},"profileNames":["P1(s_lsn)"],"labels":{"en":"P1 container disks","zh":"P1容器磁盘"}},{"id":"disks-P2磁盘","kind":"group","label":"P2磁盘","group":{"id":"disk-group","label":"P2磁盘","mode":"overview","layout":"vertical","interval":3,"main":{"id":"disk-total","label":"磁盘总余量","type":"text","icon":"stats-disk-space","color":"#00ff00","suffix":" GiB","interval":20,"timeout":60,"checkCommand":"","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/data\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.0f\\\\n\\",int(available/1048576)}\'","detailCommand":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/data\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GiB\\\\n\\",available/1048576,total/1048576}\'","colorRules":[{"operator":"<","value":"50","color":"#ff0000"},{"operator":"<=","value":"100","color":"#ffa500"}]},"children":[{"id":"disk-root","label":"系统盘","type":"text","icon":"stats-system-disk","color":"#00ff00","suffix":" GiB","interval":20,"timeout":60,"checkCommand":"test -d \'/\' && df -Pk -- \'/\' >/dev/null 2>&1","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GiB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]},{"id":"disk-mount-0","label":"/data","type":"text","icon":"stats-data-disk","color":"#00ff00","suffix":" GiB","interval":20,"timeout":60,"checkCommand":"mountpoint -q -- \'/data\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/data\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/data\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GiB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]}],"displayScope":{"mode":"selected","profileIds":[]}},"source":{"name":"Tabby Group Server Stats","url":"https://github.com/lishuainan0209/tabby-group-server-stats","license":"MIT"},"audience":"author-lab","description":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。","descriptions":{"en":"For the author\'s laboratory only. Other users: please do not download or use this preset. Total free capacity across valid unique filesystems; children show the system disk first, then data mounts. Hover for free/total capacity; missing mounts remain visible.","zh":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。"},"profileNames":["P2(ai)","P2(s_lsn)"]},{"id":"disks-P3磁盘","kind":"group","label":"P3磁盘","group":{"id":"disk-group","label":"P3磁盘","mode":"overview","layout":"vertical","interval":3,"main":{"id":"disk-total","label":"磁盘总余量","type":"text","icon":"stats-disk-space","color":"#00ff00","suffix":" GiB","interval":20,"timeout":60,"checkCommand":"","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/data\' \'/lsn_disk1\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.0f\\\\n\\",int(available/1048576)}\'","detailCommand":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/data\' \'/lsn_disk1\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GiB\\\\n\\",available/1048576,total/1048576}\'","colorRules":[{"operator":"<","value":"50","color":"#ff0000"},{"operator":"<=","value":"100","color":"#ffa500"}]},"children":[{"id":"disk-root","label":"系统盘","type":"text","icon":"stats-system-disk","color":"#00ff00","suffix":" GiB","interval":20,"timeout":60,"checkCommand":"test -d \'/\' && df -Pk -- \'/\' >/dev/null 2>&1","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GiB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]},{"id":"disk-mount-0","label":"/data","type":"text","icon":"stats-data-disk","color":"#00ff00","suffix":" GiB","interval":20,"timeout":60,"checkCommand":"mountpoint -q -- \'/data\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/data\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/data\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GiB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]},{"id":"disk-mount-1","label":"/lsn_disk1","type":"text","icon":"stats-data-disk","color":"#00ff00","suffix":" GiB","interval":20,"timeout":60,"checkCommand":"mountpoint -q -- \'/lsn_disk1\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/lsn_disk1\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/lsn_disk1\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GiB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]}],"displayScope":{"mode":"selected","profileIds":[]}},"source":{"name":"Tabby Group Server Stats","url":"https://github.com/lishuainan0209/tabby-group-server-stats","license":"MIT"},"audience":"author-lab","description":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。","descriptions":{"en":"For the author\'s laboratory only. Other users: please do not download or use this preset. Total free capacity across valid unique filesystems; children show the system disk first, then data mounts. Hover for free/total capacity; missing mounts remain visible.","zh":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。"},"profileNames":["P3(ai)","P3(s_lsn)"]},{"id":"disks-P4磁盘","kind":"group","label":"P4磁盘","group":{"id":"disk-group","label":"P4磁盘","mode":"overview","layout":"vertical","interval":3,"main":{"id":"disk-total","label":"磁盘总余量","type":"text","icon":"stats-disk-space","color":"#00ff00","suffix":" GiB","interval":20,"timeout":60,"checkCommand":"","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/data\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.0f\\\\n\\",int(available/1048576)}\'","detailCommand":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/data\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GiB\\\\n\\",available/1048576,total/1048576}\'","colorRules":[{"operator":"<","value":"50","color":"#ff0000"},{"operator":"<=","value":"100","color":"#ffa500"}]},"children":[{"id":"disk-root","label":"系统盘","type":"text","icon":"stats-system-disk","color":"#00ff00","suffix":" GiB","interval":20,"timeout":60,"checkCommand":"test -d \'/\' && df -Pk -- \'/\' >/dev/null 2>&1","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GiB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]},{"id":"disk-mount-0","label":"/data","type":"text","icon":"stats-data-disk","color":"#00ff00","suffix":" GiB","interval":20,"timeout":60,"checkCommand":"mountpoint -q -- \'/data\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/data\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/data\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GiB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]}],"displayScope":{"mode":"selected","profileIds":[]}},"source":{"name":"Tabby Group Server Stats","url":"https://github.com/lishuainan0209/tabby-group-server-stats","license":"MIT"},"audience":"author-lab","description":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。","descriptions":{"en":"For the author\'s laboratory only. Other users: please do not download or use this preset. Total free capacity across valid unique filesystems; children show the system disk first, then data mounts. Hover for free/total capacity; missing mounts remain visible.","zh":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。"},"profileNames":["P4(ai)","P4(s_lsn)"]},{"id":"cpu-load-group","kind":"group","label":"CPU负载","labels":{"en":"CPU load","zh":"CPU负载"},"description":"线程数与按处理器数量归一化的 1 分钟、5 分钟负载。","descriptions":{"en":"Runnable/total task count and 1-minute / 5-minute load normalized by processor count.","zh":"线程数与按处理器数量归一化的 1 分钟、5 分钟负载。"},"source":{"name":"Tabby Group Server Stats","url":"https://github.com/lishuainan0209/tabby-group-server-stats","license":"MIT"},"group":{"id":"cpu-load-group","label":"CPU负载","mode":"overview","layout":"vertical","interval":3,"emptyText":"","main":{"type":"text","color":"#00ff00","maxValue":100,"suffix":"","icon":"stats-cpu-load","colorRules":[],"checkCommand":"","checkMode":"exitCode","checkExpected":"0","unavailableText":"Unavailable","detailCommand":"","showWhenUnavailable":true,"id":"cpu-load-main","label":"线程数","command":"awk \'{print $4}\' /proc/loadavg"},"children":[{"type":"text","color":"#00ff00","maxValue":100,"suffix":"%","icon":"stats-cpu-load","colorRules":[{"operator":">","value":"150","color":"#ff0000"},{"operator":">","value":"100","color":"#ffa500"}],"checkCommand":"","checkMode":"exitCode","checkExpected":"0","unavailableText":"Unavailable","detailCommand":"awk -v cores=$(nproc) \'{split($4, a, \\"/\\"); printf \\"%d/%d\\\\n\\", a[1], cores}\' /proc/loadavg","showWhenUnavailable":true,"id":"cpu-load-0","label":"1min","command":"awk \'{printf \\"%d\\\\n\\", ($1/\'$(nproc)\')*100}\' /proc/loadavg"},{"type":"text","color":"#00ff00","maxValue":100,"suffix":"%","icon":"stats-cpu-load","colorRules":[{"operator":">","value":"150","color":"#ff0000"},{"operator":">","value":"100","color":"#ffa500"}],"checkCommand":"","checkMode":"exitCode","checkExpected":"0","unavailableText":"Unavailable","detailCommand":"awk -v cores=$(nproc) \'{printf \\"%d/%d\\\\n\\", $2, cores}\' /proc/loadavg","showWhenUnavailable":true,"id":"cpu-load-1","label":"5min","command":"awk \'{printf \\"%d\\\\n\\", ($2/\'$(nproc)\')*100}\' /proc/loadavg"}],"displayScope":{"mode":"all","profileIds":[]}}}]')}},m={};function g(t){var e=m[t];if(void 0!==e)return e.exports;var n=m[t]={exports:{}};return u[t](n,n.exports,g),n.exports}g.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return g.d(e,{a:e}),e},h=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,g.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var n=Object.create(null);g.r(n);var i={};p=p||[null,h({}),h([]),h(h)];for(var s=2&e&&t;("object"==typeof s||"function"==typeof s)&&!~p.indexOf(s);s=h(s))Object.getOwnPropertyNames(s).forEach(e=>i[e]=()=>t[e]);return i.default=()=>t,g.d(n,i),n},g.d=(t,e)=>{for(var n in e)g.o(e,n)&&!g.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},g.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),g.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var f={};function b(t,e,n,i){var s,a=arguments.length,o=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(o=(a<3?s(o):a>3?s(e,n,o):s(e,n))||o);return a>3&&o&&Object.defineProperty(e,n,o),o}function v(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}g.r(f),g.d(f,{default:()=>nf}),Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var y=g(860),x=g.t(y,2),_=g(358),w=g(182),k=g(961),D=g(439),I={left:"right",right:"left",bottom:"top",top:"bottom"};function C(t){return t.replace(/left|right|bottom|top/g,function(t){return I[t]})}function M(t){return t.split("-")[0]}var S={start:"end",end:"start"};function $(t){return t.replace(/start|end/g,function(t){return S[t]})}var T="top",O="bottom",E="right",R="left",P="auto",N=[T,O,E,R],F="start",V="end",A="viewport",L="popper",j=N.reduce(function(t,e){return t.concat([e+"-"+F,e+"-"+V])},[]),H=[].concat(N,[P]).reduce(function(t,e){return t.concat([e,e+"-"+F,e+"-"+V])},[]),z=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function B(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function G(t){return t instanceof B(t).Element||t instanceof Element}function W(t){return t instanceof B(t).HTMLElement||t instanceof HTMLElement}function U(t){return"undefined"!=typeof ShadowRoot&&(t instanceof B(t).ShadowRoot||t instanceof ShadowRoot)}function q(t){return((G(t)?t.ownerDocument:t.document)||window.document).documentElement}var Z=Math.max,K=Math.min,Y=Math.round;function J(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function X(){return!/^((?!chrome|android).)*safari/i.test(J())}function Q(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),s=1,a=1;e&&W(t)&&(s=t.offsetWidth>0&&Y(i.width)/t.offsetWidth||1,a=t.offsetHeight>0&&Y(i.height)/t.offsetHeight||1);var o=(G(t)?B(t):window).visualViewport,r=!X()&&n,l=(i.left+(r&&o?o.offsetLeft:0))/s,c=(i.top+(r&&o?o.offsetTop:0))/a,d=i.width/s,p=i.height/a;return{width:d,height:p,top:c,right:l+d,bottom:c+p,left:l,x:l,y:c}}function tt(t){var e=B(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function et(t){return Q(q(t)).left+tt(t).scrollLeft}function nt(t){return B(t).getComputedStyle(t)}function it(t){return t?(t.nodeName||"").toLowerCase():null}function st(t){return"html"===it(t)?t:t.assignedSlot||t.parentNode||(U(t)?t.host:null)||q(t)}function at(t){var e=nt(t),n=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function ot(t){return["html","body","#document"].indexOf(it(t))>=0?t.ownerDocument.body:W(t)&&at(t)?t:ot(st(t))}function rt(t,e){var n;void 0===e&&(e=[]);var i=ot(t),s=i===(null==(n=t.ownerDocument)?void 0:n.body),a=B(i),o=s?[a].concat(a.visualViewport||[],at(i)?i:[]):i,r=e.concat(o);return s?r:r.concat(rt(st(o)))}function lt(t){return["table","td","th"].indexOf(it(t))>=0}function ct(t){return W(t)&&"fixed"!==nt(t).position?t.offsetParent:null}function dt(t){for(var e=B(t),n=ct(t);n&<(n)&&"static"===nt(n).position;)n=ct(n);return n&&("html"===it(n)||"body"===it(n)&&"static"===nt(n).position)?e:n||function(t){var e=/firefox/i.test(J());if(/Trident/i.test(J())&&W(t)&&"fixed"===nt(t).position)return null;var n=st(t);for(U(n)&&(n=n.host);W(n)&&["html","body"].indexOf(it(n))<0;){var i=nt(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}function pt(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&U(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function ht(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ut(t,e,n){return e===A?ht(function(t,e){var n=B(t),i=q(t),s=n.visualViewport,a=i.clientWidth,o=i.clientHeight,r=0,l=0;if(s){a=s.width,o=s.height;var c=X();(c||!c&&"fixed"===e)&&(r=s.offsetLeft,l=s.offsetTop)}return{width:a,height:o,x:r+et(t),y:l}}(t,n)):G(e)?function(t,e){var n=Q(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):ht(function(t){var e,n=q(t),i=tt(t),s=null==(e=t.ownerDocument)?void 0:e.body,a=Z(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=Z(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),r=-i.scrollLeft+et(t),l=-i.scrollTop;return"rtl"===nt(s||n).direction&&(r+=Z(n.clientWidth,s?s.clientWidth:0)-a),{width:a,height:o,x:r,y:l}}(q(t)))}function mt(t){return t.split("-")[1]}function gt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ft(t){var e,n=t.reference,i=t.element,s=t.placement,a=s?M(s):null,o=s?mt(s):null,r=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(a){case T:e={x:r,y:n.y-i.height};break;case O:e={x:r,y:n.y+n.height};break;case E:e={x:n.x+n.width,y:l};break;case R:e={x:n.x-i.width,y:l};break;default:e={x:n.x,y:n.y}}var c=a?gt(a):null;if(null!=c){var d="y"===c?"height":"width";switch(o){case F:e[c]=e[c]-(n[d]/2-i[d]/2);break;case V:e[c]=e[c]+(n[d]/2-i[d]/2)}}return e}function bt(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function vt(t,e){return e.reduce(function(e,n){return e[n]=t,e},{})}function yt(t,e){void 0===e&&(e={});var n=e,i=n.placement,s=void 0===i?t.placement:i,a=n.strategy,o=void 0===a?t.strategy:a,r=n.boundary,l=void 0===r?"clippingParents":r,c=n.rootBoundary,d=void 0===c?A:c,p=n.elementContext,h=void 0===p?L:p,u=n.altBoundary,m=void 0!==u&&u,g=n.padding,f=void 0===g?0:g,b=bt("number"!=typeof f?f:vt(f,N)),v=h===L?"reference":L,y=t.rects.popper,x=t.elements[m?v:h],_=function(t,e,n,i){var s="clippingParents"===e?function(t){var e=rt(st(t)),n=["absolute","fixed"].indexOf(nt(t).position)>=0&&W(t)?dt(t):t;return G(n)?e.filter(function(t){return G(t)&&pt(t,n)&&"body"!==it(t)}):[]}(t):[].concat(e),a=[].concat(s,[n]),o=a[0],r=a.reduce(function(e,n){var s=ut(t,n,i);return e.top=Z(s.top,e.top),e.right=K(s.right,e.right),e.bottom=K(s.bottom,e.bottom),e.left=Z(s.left,e.left),e},ut(t,o,i));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}(G(x)?x:x.contextElement||q(t.elements.popper),l,d,o),w=Q(t.elements.reference),k=ft({reference:w,element:y,strategy:"absolute",placement:s}),D=ht(Object.assign({},y,k)),I=h===L?D:w,C={top:_.top-I.top+b.top,bottom:I.bottom-_.bottom+b.bottom,left:_.left-I.left+b.left,right:I.right-_.right+b.right},M=t.modifiersData.offset;if(h===L&&M){var S=M[s];Object.keys(C).forEach(function(t){var e=[E,O].indexOf(t)>=0?1:-1,n=[T,O].indexOf(t)>=0?"y":"x";C[t]+=S[n]*e})}return C}const xt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var s=n.mainAxis,a=void 0===s||s,o=n.altAxis,r=void 0===o||o,l=n.fallbackPlacements,c=n.padding,d=n.boundary,p=n.rootBoundary,h=n.altBoundary,u=n.flipVariations,m=void 0===u||u,g=n.allowedAutoPlacements,f=e.options.placement,b=M(f),v=l||(b!==f&&m?function(t){if(M(t)===P)return[];var e=C(t);return[$(t),e,$(e)]}(f):[C(f)]),y=[f].concat(v).reduce(function(t,n){return t.concat(M(n)===P?function(t,e){void 0===e&&(e={});var n=e,i=n.placement,s=n.boundary,a=n.rootBoundary,o=n.padding,r=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?H:l,d=mt(i),p=d?r?j:j.filter(function(t){return mt(t)===d}):N,h=p.filter(function(t){return c.indexOf(t)>=0});0===h.length&&(h=p);var u=h.reduce(function(e,n){return e[n]=yt(t,{placement:n,boundary:s,rootBoundary:a,padding:o})[M(n)],e},{});return Object.keys(u).sort(function(t,e){return u[t]-u[e]})}(e,{placement:n,boundary:d,rootBoundary:p,padding:c,flipVariations:m,allowedAutoPlacements:g}):n)},[]),x=e.rects.reference,_=e.rects.popper,w=new Map,k=!0,D=y[0],I=0;I<y.length;I++){var S=y[I],V=M(S),A=mt(S)===F,L=[T,O].indexOf(V)>=0,z=L?"width":"height",B=yt(e,{placement:S,boundary:d,rootBoundary:p,altBoundary:h,padding:c}),G=L?A?E:R:A?O:T;x[z]>_[z]&&(G=C(G));var W=C(G),U=[];if(a&&U.push(B[V]<=0),r&&U.push(B[G]<=0,B[W]<=0),U.every(function(t){return t})){D=S,k=!1;break}w.set(S,U)}if(k)for(var q=function(t){var e=y.find(function(e){var n=w.get(e);if(n)return n.slice(0,t).every(function(t){return t})});if(e)return D=e,"break"},Z=m?3:1;Z>0&&"break"!==q(Z);Z--);e.placement!==D&&(e.modifiersData[i]._skip=!0,e.placement=D,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function _t(t,e,n){return Z(t,K(e,n))}function wt(t){var e=Q(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}const kt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,s=n.mainAxis,a=void 0===s||s,o=n.altAxis,r=void 0!==o&&o,l=n.boundary,c=n.rootBoundary,d=n.altBoundary,p=n.padding,h=n.tether,u=void 0===h||h,m=n.tetherOffset,g=void 0===m?0:m,f=yt(e,{boundary:l,rootBoundary:c,padding:p,altBoundary:d}),b=M(e.placement),v=mt(e.placement),y=!v,x=gt(b),_="x"===x?"y":"x",w=e.modifiersData.popperOffsets,k=e.rects.reference,D=e.rects.popper,I="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,C="number"==typeof I?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),S=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,$={x:0,y:0};if(w){if(a){var P,N="y"===x?T:R,V="y"===x?O:E,A="y"===x?"height":"width",L=w[x],j=L+f[N],H=L-f[V],z=u?-D[A]/2:0,B=v===F?k[A]:D[A],G=v===F?-D[A]:-k[A],W=e.elements.arrow,U=u&&W?wt(W):{width:0,height:0},q=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Y=q[N],J=q[V],X=_t(0,k[A],U[A]),Q=y?k[A]/2-z-X-Y-C.mainAxis:B-X-Y-C.mainAxis,tt=y?-k[A]/2+z+X+J+C.mainAxis:G+X+J+C.mainAxis,et=e.elements.arrow&&dt(e.elements.arrow),nt=et?"y"===x?et.clientTop||0:et.clientLeft||0:0,it=null!=(P=null==S?void 0:S[x])?P:0,st=L+tt-it,at=_t(u?K(j,L+Q-it-nt):j,L,u?Z(H,st):H);w[x]=at,$[x]=at-L}if(r){var ot,rt="x"===x?T:R,lt="x"===x?O:E,ct=w[_],pt="y"===_?"height":"width",ht=ct+f[rt],ut=ct-f[lt],ft=-1!==[T,R].indexOf(b),bt=null!=(ot=null==S?void 0:S[_])?ot:0,vt=ft?ht:ct-k[pt]-D[pt]-bt+C.altAxis,xt=ft?ct+k[pt]+D[pt]-bt-C.altAxis:ut,kt=u&&ft?function(t,e,n){var i=_t(t,e,n);return i>n?n:i}(vt,ct,xt):_t(u?vt:ht,ct,u?xt:ut);w[_]=kt,$[_]=kt-ct}e.modifiersData[i]=$}},requiresIfExists:["offset"]},Dt={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,s=t.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,r=M(n.placement),l=gt(r),c=[R,E].indexOf(r)>=0?"height":"width";if(a&&o){var d=function(t,e){return bt("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:vt(t,N))}(s.padding,n),p=wt(a),h="y"===l?T:R,u="y"===l?O:E,m=n.rects.reference[c]+n.rects.reference[l]-o[l]-n.rects.popper[c],g=o[l]-n.rects.reference[l],f=dt(a),b=f?"y"===l?f.clientHeight||0:f.clientWidth||0:0,v=m/2-g/2,y=d[h],x=b-p[c]-d[u],_=b/2-p[c]/2+v,w=_t(y,_,x),k=l;n.modifiersData[i]=((e={})[k]=w,e.centerOffset=w-_,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&pt(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function It(t,e,n){void 0===n&&(n=!1);var i,s,a=W(e),o=W(e)&&function(t){var e=t.getBoundingClientRect(),n=Y(e.width)/t.offsetWidth||1,i=Y(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),r=q(e),l=Q(t,o,n),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(a||!a&&!n)&&(("body"!==it(e)||at(r))&&(c=(i=e)!==B(i)&&W(i)?{scrollLeft:(s=i).scrollLeft,scrollTop:s.scrollTop}:tt(i)),W(e)?((d=Q(e,!0)).x+=e.clientLeft,d.y+=e.clientTop):r&&(d.x=et(r))),{x:l.left+c.scrollLeft-d.x,y:l.top+c.scrollTop-d.y,width:l.width,height:l.height}}function Ct(t){var e=new Map,n=new Set,i=[];function s(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!n.has(t)){var i=e.get(t);i&&s(i)}}),i.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){n.has(t.name)||s(t)}),i}var Mt={placement:"bottom",modifiers:[],strategy:"absolute"};function St(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function $t(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,i=void 0===n?[]:n,s=e.defaultOptions,a=void 0===s?Mt:s;return function(t,e,n){void 0===n&&(n=a);var s,o,r={placement:"bottom",orderedModifiers:[],options:Object.assign({},Mt,a),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,d={state:r,setOptions:function(n){var s="function"==typeof n?n(r.options):n;p(),r.options=Object.assign({},a,r.options,s),r.scrollParents={reference:G(t)?rt(t):t.contextElement?rt(t.contextElement):[],popper:rt(e)};var o,c,h=function(t){var e=Ct(t);return z.reduce(function(t,n){return t.concat(e.filter(function(t){return t.phase===n}))},[])}((o=[].concat(i,r.options.modifiers),c=o.reduce(function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t},{}),Object.keys(c).map(function(t){return c[t]})));return r.orderedModifiers=h.filter(function(t){return t.enabled}),r.orderedModifiers.forEach(function(t){var e=t.name,n=t.options,i=void 0===n?{}:n,s=t.effect;if("function"==typeof s){var a=s({state:r,name:e,instance:d,options:i});l.push(a||function(){})}}),d.update()},forceUpdate:function(){if(!c){var t=r.elements,e=t.reference,n=t.popper;if(St(e,n)){r.rects={reference:It(e,dt(n),"fixed"===r.options.strategy),popper:wt(n)},r.reset=!1,r.placement=r.options.placement,r.orderedModifiers.forEach(function(t){return r.modifiersData[t.name]=Object.assign({},t.data)});for(var i=0;i<r.orderedModifiers.length;i++)if(!0!==r.reset){var s=r.orderedModifiers[i],a=s.fn,o=s.options,l=void 0===o?{}:o,p=s.name;"function"==typeof a&&(r=a({state:r,options:l,name:p,instance:d})||r)}else r.reset=!1,i=-1}}},update:(s=function(){return new Promise(function(t){d.forceUpdate(),t(r)})},function(){return o||(o=new Promise(function(t){Promise.resolve().then(function(){o=void 0,t(s())})})),o}),destroy:function(){p(),c=!0}};if(!St(t,e))return d;function p(){l.forEach(function(t){return t()}),l=[]}return d.setOptions(n).then(function(t){!c&&n.onFirstUpdate&&n.onFirstUpdate(t)}),d}}var Tt={passive:!0},Ot={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Et(t){var e,n=t.popper,i=t.popperRect,s=t.placement,a=t.variation,o=t.offsets,r=t.position,l=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,p=t.isFixed,h=o.x,u=void 0===h?0:h,m=o.y,g=void 0===m?0:m,f="function"==typeof d?d({x:u,y:g}):{x:u,y:g};u=f.x,g=f.y;var b=o.hasOwnProperty("x"),v=o.hasOwnProperty("y"),y=R,x=T,_=window;if(c){var w=dt(n),k="clientHeight",D="clientWidth";w===B(n)&&"static"!==nt(w=q(n)).position&&"absolute"===r&&(k="scrollHeight",D="scrollWidth"),(s===T||(s===R||s===E)&&a===V)&&(x=O,g-=(p&&w===_&&_.visualViewport?_.visualViewport.height:w[k])-i.height,g*=l?1:-1),s!==R&&(s!==T&&s!==O||a!==V)||(y=E,u-=(p&&w===_&&_.visualViewport?_.visualViewport.width:w[D])-i.width,u*=l?1:-1)}var I,C=Object.assign({position:r},c&&Ot),M=!0===d?function(t,e){var n=t.x,i=t.y,s=e.devicePixelRatio||1;return{x:Y(n*s)/s||0,y:Y(i*s)/s||0}}({x:u,y:g},B(n)):{x:u,y:g};return u=M.x,g=M.y,l?Object.assign({},C,((I={})[x]=v?"0":"",I[y]=b?"0":"",I.transform=(_.devicePixelRatio||1)<=1?"translate("+u+"px, "+g+"px)":"translate3d("+u+"px, "+g+"px, 0)",I)):Object.assign({},C,((e={})[x]=v?g+"px":"",e[y]=b?u+"px":"",e.transform="",e))}var Rt=$t({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,s=i.scroll,a=void 0===s||s,o=i.resize,r=void 0===o||o,l=B(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&c.forEach(function(t){t.addEventListener("scroll",n.update,Tt)}),r&&l.addEventListener("resize",n.update,Tt),function(){a&&c.forEach(function(t){t.removeEventListener("scroll",n.update,Tt)}),r&&l.removeEventListener("resize",n.update,Tt)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=ft({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,s=void 0===i||i,a=n.adaptive,o=void 0===a||a,r=n.roundOffsets,l=void 0===r||r,c={placement:M(e.placement),variation:mt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Et(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Et(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},s=e.elements[t];W(s)&&it(s)&&(Object.assign(s.style,n),Object.keys(i).forEach(function(t){var e=i[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(t){var i=e.elements[t],s=e.attributes[t]||{},a=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(function(t,e){return t[e]="",t},{});W(i)&&it(i)&&(Object.assign(i.style,a),Object.keys(s).forEach(function(t){i.removeAttribute(t)}))})}},requires:["computeStyles"]}]});const Pt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,i=t.name,s=n.offset,a=void 0===s?[0,0]:s,o=H.reduce(function(t,n){return t[n]=function(t,e,n){var i=M(t),s=[R,T].indexOf(i)>=0?-1:1,a="function"==typeof n?n(Object.assign({},e,{placement:t})):n,o=a[0],r=a[1];return o=o||0,r=(r||0)*s,[R,E].indexOf(i)>=0?{x:r,y:o}:{x:o,y:r}}(n,e.rects,a),t},{}),r=o[e.placement],l=r.x,c=r.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=o}};function Nt(t){return parseInt(`${t}`,10)}function Ft(t){return null!=t?`${t}`:""}function Vt(t,e,n=0){return Math.max(Math.min(t,e),n)}function At(t){return"string"==typeof t}function Lt(t){return!isNaN(Nt(t))}function jt(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}function Ht(t){return null!=t}function zt(t){return t&&t.then}function Bt(t){return Lt(t)?`0${t}`.slice(-2):""}function Gt(t,e){return t&&t.className&&t.className.split&&t.className.split(/\s+/).indexOf(e)>=0}function Wt(t){return(t||document.body).getBoundingClientRect()}function Ut(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}const qt={animation:!0,transitionTimerDelayMs:5},Zt=()=>{},{transitionTimerDelayMs:Kt}=qt,Yt=new Map,Jt=(t,e,n,i)=>{let s=i.context||{};const a=Yt.get(e);if(a)switch(i.runningTransition){case"continue":return k.EMPTY;case"stop":t.run(()=>a.transition$.complete()),s=Object.assign(a.context,s),Yt.delete(e)}const o=n(e,i.animation,s)||Zt;if(!i.animation||"none"===window.getComputedStyle(e).transitionProperty)return t.run(()=>o()),(0,k.of)(void 0).pipe(function(t){return e=>new k.Observable(n=>e.subscribe({next:e=>t.run(()=>n.next(e)),error:e=>t.run(()=>n.error(e)),complete:()=>t.run(()=>n.complete())}))}(t));const r=new k.Subject,l=new k.Subject,c=r.pipe((0,D.endWith)(!0));Yt.set(e,{transition$:r,complete:()=>{l.next(),l.complete()},context:s});const d=function(t){const{transitionDelay:e,transitionDuration:n}=window.getComputedStyle(t);return 1e3*(parseFloat(e)+parseFloat(n))}(e);return t.runOutsideAngular(()=>{const n=(0,k.fromEvent)(e,"transitionend").pipe((0,D.takeUntil)(c),(0,D.filter)(({target:t})=>t===e)),i=(0,k.timer)(d+Kt).pipe((0,D.takeUntil)(c));(0,k.race)(i,n,l).pipe((0,D.takeUntil)(c)).subscribe(()=>{Yt.delete(e),t.run(()=>{o(),r.next(),r.complete()})})}),r.asObservable()},Xt=(t,e,n)=>{let{direction:i,maxSize:s,dimension:a}=n;const{classList:o}=t;function r(){o.add("collapse"),"show"===i?o.add("show"):o.remove("show")}if(e)return s||(s=function(t,e){if("undefined"==typeof navigator)return"0px";const{classList:n}=t,i=n.contains("show");i||n.add("show"),t.style[e]="";const s=t.getBoundingClientRect()[e]+"px";return i||n.remove("show"),s}(t,a),n.maxSize=s,t.style[a]="show"!==i?s:"0px",o.remove("collapse"),o.remove("collapsing"),o.remove("show"),Wt(t),o.add("collapsing")),t.style[a]="show"===i?s:"0px",()=>{r(),o.remove("collapsing"),t.style[a]=""};r()};class Qt{constructor(){this.animation=qt.animation}}Qt.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Qt,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),Qt.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Qt,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Qt,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});class te{constructor(t){this._ngbConfig=t,this.closeOthers=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}te.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:te,deps:[{token:Qt}],target:y["ɵɵFactoryTarget"].Injectable}),te.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:te,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:te,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Qt}]}});let ee=0;class ne{constructor(t){this.templateRef=t}}ne.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ne,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),ne.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ne,isStandalone:!0,selector:"ng-template[ngbPanelHeader]",ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ne,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPanelHeader]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class ie{constructor(t){this.templateRef=t}}ie.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ie,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),ie.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ie,isStandalone:!0,selector:"ng-template[ngbPanelTitle]",ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ie,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPanelTitle]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class se{constructor(t){this.templateRef=t}}se.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:se,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),se.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:se,isStandalone:!0,selector:"ng-template[ngbPanelContent]",ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:se,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPanelContent]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class ae{constructor(){this.disabled=!1,this.id="ngb-panel-"+ee++,this.isOpen=!1,this.initClassDone=!1,this.transitionRunning=!1,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter}ngAfterContentChecked(){this.titleTpl=this.titleTpls.first,this.headerTpl=this.headerTpls.first,this.contentTpl=this.contentTpls.first}}ae.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ae,deps:[],target:y["ɵɵFactoryTarget"].Directive}),ae.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ae,isStandalone:!0,selector:"ngb-panel",inputs:{disabled:"disabled",id:"id",title:"title",type:"type",cardClass:"cardClass"},outputs:{shown:"shown",hidden:"hidden"},queries:[{propertyName:"titleTpls",predicate:ie},{propertyName:"headerTpls",predicate:ne},{propertyName:"contentTpls",predicate:se}],ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ae,decorators:[{type:y.Directive,args:[{selector:"ngb-panel",standalone:!0}]}],propDecorators:{disabled:[{type:y.Input}],id:[{type:y.Input}],title:[{type:y.Input}],type:[{type:y.Input}],cardClass:[{type:y.Input}],shown:[{type:y.Output}],hidden:[{type:y.Output}],titleTpls:[{type:y.ContentChildren,args:[ie,{descendants:!1}]}],headerTpls:[{type:y.ContentChildren,args:[ne,{descendants:!1}]}],contentTpls:[{type:y.ContentChildren,args:[se,{descendants:!1}]}]}});class oe{constructor(t){this._El=t,this.ngbRef=new y.EventEmitter}ngOnInit(){this.ngbRef.emit(this._El.nativeElement)}ngOnDestroy(){this.ngbRef.emit(null)}}oe.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:oe,deps:[{token:y.ElementRef}],target:y["ɵɵFactoryTarget"].Directive}),oe.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:oe,isStandalone:!0,selector:"[ngbRef]",outputs:{ngbRef:"ngbRef"},ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:oe,decorators:[{type:y.Directive,args:[{selector:"[ngbRef]",standalone:!0}]}],ctorParameters:function(){return[{type:y.ElementRef}]},propDecorators:{ngbRef:[{type:y.Output}]}});class re{constructor(t,e){this.accordion=t,this.panel=e}set ngbPanelToggle(t){t&&(this.panel=t)}}re.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:re,deps:[{token:(0,y.forwardRef)(()=>le)},{token:ae,host:!0,optional:!0}],target:y["ɵɵFactoryTarget"].Directive}),re.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:re,isStandalone:!0,selector:"button[ngbPanelToggle]",inputs:{ngbPanelToggle:"ngbPanelToggle"},host:{attributes:{type:"button"},listeners:{click:"accordion.toggle(panel.id)"},properties:{disabled:"panel.disabled","class.collapsed":"!panel.isOpen","attr.aria-expanded":"panel.isOpen","attr.aria-controls":"panel.id"}},ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:re,decorators:[{type:y.Directive,args:[{selector:"button[ngbPanelToggle]",standalone:!0,host:{type:"button","[disabled]":"panel.disabled","[class.collapsed]":"!panel.isOpen","[attr.aria-expanded]":"panel.isOpen","[attr.aria-controls]":"panel.id","(click)":"accordion.toggle(panel.id)"}}]}],ctorParameters:function(){return[{type:le,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>le)]}]},{type:ae,decorators:[{type:y.Optional},{type:y.Host}]}]},propDecorators:{ngbPanelToggle:[{type:y.Input}]}});class le{constructor(t,e,n){this._ngZone=e,this._changeDetector=n,this.activeIds=[],this.destroyOnHide=!0,this.panelChange=new y.EventEmitter,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter,this.animation=t.animation,this.type=t.type,this.closeOtherPanels=t.closeOthers}isExpanded(t){return this.activeIds.indexOf(t)>-1}expand(t){this._changeOpenState(this._findPanelById(t),!0)}expandAll(){this.closeOtherPanels?0===this.activeIds.length&&this.panels.length&&this._changeOpenState(this.panels.first,!0):this.panels.forEach(t=>this._changeOpenState(t,!0))}collapse(t){this._changeOpenState(this._findPanelById(t),!1)}collapseAll(){this.panels.forEach(t=>{this._changeOpenState(t,!1)})}toggle(t){const e=this._findPanelById(t);e&&this._changeOpenState(e,!e.isOpen)}ngAfterContentChecked(){At(this.activeIds)&&(this.activeIds=this.activeIds.split(/\s*,\s*/)),this.panels.forEach(t=>{t.isOpen=!t.disabled&&this.activeIds.indexOf(t.id)>-1}),this.activeIds.length>1&&this.closeOtherPanels&&(this._closeOthers(this.activeIds[0],!1),this._updateActiveIds()),this._ngZone.onStable.pipe((0,D.take)(1)).subscribe(()=>{this.panels.forEach(t=>{const e=t.panelDiv;e?t.initClassDone||(t.initClassDone=!0,Jt(this._ngZone,e,Xt,{animation:!1,runningTransition:"continue",context:{direction:t.isOpen?"show":"hide",dimension:"height"}})):t.initClassDone=!1})})}_changeOpenState(t,e){if(null!=t&&!t.disabled&&t.isOpen!==e){let n=!1;this.panelChange.emit({panelId:t.id,nextState:e,preventDefault:()=>{n=!0}}),n||(t.isOpen=e,t.transitionRunning=!0,e&&this.closeOtherPanels&&this._closeOthers(t.id),this._updateActiveIds(),this._runTransitions(this.animation))}}_closeOthers(t,e=!0){this.panels.forEach(n=>{n.id!==t&&n.isOpen&&(n.isOpen=!1,n.transitionRunning=e)})}_findPanelById(t){return this.panels.find(e=>e.id===t)||null}_updateActiveIds(){this.activeIds=this.panels.filter(t=>t.isOpen&&!t.disabled).map(t=>t.id)}_runTransitions(t){this._changeDetector.detectChanges(),this.panels.forEach(e=>{if(e.transitionRunning){const n=e.panelDiv;Jt(this._ngZone,n,Xt,{animation:t,runningTransition:"stop",context:{direction:e.isOpen?"show":"hide",dimension:"height"}}).subscribe(()=>{e.transitionRunning=!1;const{id:t}=e;e.isOpen?(e.shown.emit(),this.shown.emit(t)):(e.hidden.emit(),this.hidden.emit(t))})}})}}le.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:le,deps:[{token:te},{token:y.NgZone},{token:y.ChangeDetectorRef}],target:y["ɵɵFactoryTarget"].Component}),le.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:le,isStandalone:!0,selector:"ngb-accordion",inputs:{animation:"animation",activeIds:"activeIds",closeOtherPanels:["closeOthers","closeOtherPanels"],destroyOnHide:"destroyOnHide",type:"type"},outputs:{panelChange:"panelChange",shown:"shown",hidden:"hidden"},host:{attributes:{role:"tablist"},properties:{"attr.aria-multiselectable":"!closeOtherPanels"},classAttribute:"accordion"},queries:[{propertyName:"panels",predicate:ae}],exportAs:["ngbAccordion"],ngImport:x,template:'\n\t\t<ng-template #t ngbPanelHeader let-panel>\n\t\t\t<button class="accordion-button" [ngbPanelToggle]="panel">\n\t\t\t\t{{ panel.title }}\n\t\t\t\t<ng-template [ngTemplateOutlet]="panel.titleTpl?.templateRef"></ng-template>\n\t\t\t</button>\n\t\t</ng-template>\n\t\t<ng-template ngFor let-panel [ngForOf]="panels">\n\t\t\t<div [class]="\'accordion-item \' + (panel.cardClass || \'\')">\n\t\t\t\t<div\n\t\t\t\t\trole="tab"\n\t\t\t\t\tid="{{ panel.id }}-header"\n\t\t\t\t\t[class]="\'accordion-header \' + (panel.type ? \'bg-\' + panel.type : type ? \'bg-\' + type : \'\')"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="panel.headerTpl?.templateRef || t"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: panel, opened: panel.isOpen }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tid="{{ panel.id }}"\n\t\t\t\t\t(ngbRef)="panel.panelDiv = $event"\n\t\t\t\t\trole="tabpanel"\n\t\t\t\t\t[attr.aria-labelledby]="panel.id + \'-header\'"\n\t\t\t\t\t*ngIf="!destroyOnHide || panel.isOpen || panel.transitionRunning"\n\t\t\t\t>\n\t\t\t\t\t<div class="accordion-body">\n\t\t\t\t\t\t<ng-template [ngTemplateOutlet]="panel.contentTpl?.templateRef || null"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-template>\n\t',isInline:!0,dependencies:[{kind:"directive",type:_.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:re,selector:"button[ngbPanelToggle]",inputs:["ngbPanelToggle"]},{kind:"directive",type:oe,selector:"[ngbRef]",outputs:["ngbRef"]},{kind:"directive",type:ne,selector:"ng-template[ngbPanelHeader]"},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:le,decorators:[{type:y.Component,args:[{selector:"ngb-accordion",exportAs:"ngbAccordion",standalone:!0,imports:[_.NgFor,_.NgTemplateOutlet,re,oe,ne,_.NgIf],encapsulation:y.ViewEncapsulation.None,host:{class:"accordion",role:"tablist","[attr.aria-multiselectable]":"!closeOtherPanels"},template:'\n\t\t<ng-template #t ngbPanelHeader let-panel>\n\t\t\t<button class="accordion-button" [ngbPanelToggle]="panel">\n\t\t\t\t{{ panel.title }}\n\t\t\t\t<ng-template [ngTemplateOutlet]="panel.titleTpl?.templateRef"></ng-template>\n\t\t\t</button>\n\t\t</ng-template>\n\t\t<ng-template ngFor let-panel [ngForOf]="panels">\n\t\t\t<div [class]="\'accordion-item \' + (panel.cardClass || \'\')">\n\t\t\t\t<div\n\t\t\t\t\trole="tab"\n\t\t\t\t\tid="{{ panel.id }}-header"\n\t\t\t\t\t[class]="\'accordion-header \' + (panel.type ? \'bg-\' + panel.type : type ? \'bg-\' + type : \'\')"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="panel.headerTpl?.templateRef || t"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: panel, opened: panel.isOpen }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tid="{{ panel.id }}"\n\t\t\t\t\t(ngbRef)="panel.panelDiv = $event"\n\t\t\t\t\trole="tabpanel"\n\t\t\t\t\t[attr.aria-labelledby]="panel.id + \'-header\'"\n\t\t\t\t\t*ngIf="!destroyOnHide || panel.isOpen || panel.transitionRunning"\n\t\t\t\t>\n\t\t\t\t\t<div class="accordion-body">\n\t\t\t\t\t\t<ng-template [ngTemplateOutlet]="panel.contentTpl?.templateRef || null"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-template>\n\t'}]}],ctorParameters:function(){return[{type:te},{type:y.NgZone},{type:y.ChangeDetectorRef}]},propDecorators:{panels:[{type:y.ContentChildren,args:[ae]}],animation:[{type:y.Input}],activeIds:[{type:y.Input}],closeOtherPanels:[{type:y.Input,args:["closeOthers"]}],destroyOnHide:[{type:y.Input}],type:[{type:y.Input}],panelChange:[{type:y.Output}],shown:[{type:y.Output}],hidden:[{type:y.Output}]}});class ce{constructor(t){this._ngbConfig=t,this.horizontal=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}ce.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ce,deps:[{token:Qt}],target:y["ɵɵFactoryTarget"].Injectable}),ce.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ce,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ce,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Qt}]}});class de{constructor(t,e,n){this._element=t,this._zone=n,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new y.EventEmitter,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter,this.animation=e.animation,this.horizontal=e.horizontal}set collapsed(t){this._isCollapsed!==t&&(this._isCollapsed=t,this._afterInit&&this._runTransitionWithEvents(t,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(t=this._isCollapsed){this.collapsed=!t,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(t,e){return Jt(this._zone,this._element.nativeElement,Xt,{animation:e,runningTransition:"stop",context:{direction:t?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(t,e){this._runTransition(t,e).subscribe(()=>{t?this.hidden.emit():this.shown.emit()})}}de.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:de,deps:[{token:y.ElementRef},{token:ce},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Directive}),de.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:de,isStandalone:!0,selector:"[ngbCollapse]",inputs:{animation:"animation",collapsed:["ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},host:{properties:{"class.collapse-horizontal":"horizontal"}},exportAs:["ngbCollapse"],ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:de,decorators:[{type:y.Directive,args:[{selector:"[ngbCollapse]",exportAs:"ngbCollapse",standalone:!0,host:{"[class.collapse-horizontal]":"horizontal"}}]}],ctorParameters:function(){return[{type:y.ElementRef},{type:ce},{type:y.NgZone}]},propDecorators:{animation:[{type:y.Input}],collapsed:[{type:y.Input,args:["ngbCollapse"]}],ngbCollapseChange:[{type:y.Output}],horizontal:[{type:y.Input}],shown:[{type:y.Output}],hidden:[{type:y.Output}]}});let pe=0;class he{constructor(){this._appRef=(0,y.inject)(y.ApplicationRef),this._element=(0,y.inject)(y.ElementRef).nativeElement,this._item=(0,y.inject)(be),this._viewRef=null}ngAfterContentChecked(){this._bodyTpl&&(this._item.animatingBodyCollapse||!this._item.destroyOnHide?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef&&(this._appRef.detachView(this._viewRef),this._viewRef.destroy(),this._viewRef=null)}_createViewIfNotExists(){if(!this._viewRef){this._viewRef=this._bodyTpl.createEmbeddedView(null),this._viewRef.detectChanges(),this._appRef.attachView(this._viewRef);for(const t of this._viewRef.rootNodes)this._element.appendChild(t)}}}he.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:he,deps:[],target:y["ɵɵFactoryTarget"].Directive}),he.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:he,isStandalone:!0,selector:"[ngbAccordionBody]",host:{properties:{"class.accordion-body":"true"}},queries:[{propertyName:"_bodyTpl",first:!0,predicate:y.TemplateRef,descendants:!0,static:!0}],ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:he,decorators:[{type:y.Directive,args:[{selector:"[ngbAccordionBody]",standalone:!0,host:{"[class.accordion-body]":"true"}}]}],propDecorators:{_bodyTpl:[{type:y.ContentChild,args:[y.TemplateRef,{static:!0}]}]}});class ue{constructor(t,e){this.item=t,this.ngbCollapse=e}}ue.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ue,deps:[{token:(0,y.forwardRef)(()=>be)},{token:de}],target:y["ɵɵFactoryTarget"].Directive}),ue.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ue,isStandalone:!0,selector:"[ngbAccordionCollapse]",host:{attributes:{role:"region"},properties:{"class.accordion-collapse":"true",id:"item.collapseId","attr.aria-labelledby":"item.toggleId"}},exportAs:["ngbAccordionCollapse"],hostDirectives:[{directive:de}],ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ue,decorators:[{type:y.Directive,args:[{exportAs:"ngbAccordionCollapse",standalone:!0,selector:"[ngbAccordionCollapse]",host:{role:"region","[class.accordion-collapse]":"true","[id]":"item.collapseId","[attr.aria-labelledby]":"item.toggleId"},hostDirectives:[{directive:de}]}]}],ctorParameters:function(){return[{type:be,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>be)]}]},{type:de}]}});class me{constructor(t,e){this.item=t,this.accordion=e}}me.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:me,deps:[{token:(0,y.forwardRef)(()=>be)},{token:(0,y.forwardRef)(()=>ve)}],target:y["ɵɵFactoryTarget"].Directive}),me.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:me,isStandalone:!0,selector:"[ngbAccordionToggle]",host:{listeners:{click:"!item.disabled && accordion.toggle(item.id)"},properties:{id:"item.toggleId","class.collapsed":"item.collapsed","attr.aria-controls":"item.collapseId","attr.aria-expanded":"!item.collapsed"}},ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:me,decorators:[{type:y.Directive,args:[{selector:"[ngbAccordionToggle]",standalone:!0,host:{"[id]":"item.toggleId","[class.collapsed]":"item.collapsed","[attr.aria-controls]":"item.collapseId","[attr.aria-expanded]":"!item.collapsed","(click)":"!item.disabled && accordion.toggle(item.id)"}}]}],ctorParameters:function(){return[{type:be,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>be)]}]},{type:ve,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>ve)]}]}]}});class ge{constructor(t){this.item=t}}ge.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ge,deps:[{token:(0,y.forwardRef)(()=>be)}],target:y["ɵɵFactoryTarget"].Directive}),ge.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ge,isStandalone:!0,selector:"button[ngbAccordionButton]",host:{attributes:{type:"button"},properties:{disabled:"item.disabled","class.accordion-button":"true"}},hostDirectives:[{directive:me}],ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ge,decorators:[{type:y.Directive,args:[{selector:"button[ngbAccordionButton]",standalone:!0,host:{"[disabled]":"item.disabled","[class.accordion-button]":"true",type:"button"},hostDirectives:[{directive:me}]}]}],ctorParameters:function(){return[{type:be,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>be)]}]}]}});class fe{constructor(t){this.item=t}}fe.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:fe,deps:[{token:(0,y.forwardRef)(()=>be)}],target:y["ɵɵFactoryTarget"].Directive}),fe.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:fe,isStandalone:!0,selector:"[ngbAccordionHeader]",host:{attributes:{role:"heading"},properties:{"class.accordion-header":"true","class.collapsed":"item.collapsed"}},ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:fe,decorators:[{type:y.Directive,args:[{selector:"[ngbAccordionHeader]",standalone:!0,host:{role:"heading","[class.accordion-header]":"true","[class.collapsed]":"item.collapsed"}}]}],ctorParameters:function(){return[{type:be,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>be)]}]}]}});class be{constructor(t,e){this._accordion=t,this._cd=e,this._subscriptions=[],this._collapsed=!0,this._id="ngb-accordion-item-"+pe++,this.animatingBodyCollapse=!1,this.destroyOnHide=this._accordion.destroyOnHide,this.disabled=!1,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter}set id(t){At(t)&&""!==t&&(this._id=t)}set collapsed(t){if(this.collapsed!==t){if(this.collapsed&&!this._accordion._ensureCanExpand(this))return;this._collapsed=t,this._cd.markForCheck(),this.collapsed||(this.animatingBodyCollapse=!0,this._cd.detectChanges()),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=this.collapsed}}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}ngAfterContentInit(){const{ngbCollapse:t}=this._collapse;t.animation=!1,t.collapsed=this.collapsed,t.animation=this._accordion.animation,this._subscriptions.push(t.hidden.subscribe(()=>{this.animatingBodyCollapse=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id)}),t.shown.subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id)}))}ngOnDestroy(){this._subscriptions.forEach(t=>t.unsubscribe())}toggle(){this.collapsed=!this.collapsed}expand(){this.collapsed=!1}collapse(){this.collapsed=!0}}be.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:be,deps:[{token:(0,y.forwardRef)(()=>ve)},{token:y.ChangeDetectorRef}],target:y["ɵɵFactoryTarget"].Directive}),be.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:be,isStandalone:!0,selector:"[ngbAccordionItem]",inputs:{id:["ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{shown:"shown",hidden:"hidden"},host:{properties:{"class.accordion-item":"true",id:"id"}},queries:[{propertyName:"_collapse",first:!0,predicate:ue,descendants:!0,static:!0}],exportAs:["ngbAccordionItem"],ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:be,decorators:[{type:y.Directive,args:[{selector:"[ngbAccordionItem]",exportAs:"ngbAccordionItem",standalone:!0,host:{"[class.accordion-item]":"true","[id]":"id"}}]}],ctorParameters:function(){return[{type:ve,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>ve)]}]},{type:y.ChangeDetectorRef}]},propDecorators:{_collapse:[{type:y.ContentChild,args:[ue,{static:!0}]}],id:[{type:y.Input,args:["ngbAccordionItem"]}],destroyOnHide:[{type:y.Input}],disabled:[{type:y.Input}],collapsed:[{type:y.Input}],shown:[{type:y.Output}],hidden:[{type:y.Output}]}});class ve{constructor(t){this.destroyOnHide=!0,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter,this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=t.animation,this.closeOthers=t.closeOthers}toggle(t){var e;null===(e=this._getItem(t))||void 0===e||e.toggle()}expand(t){var e;null===(e=this._getItem(t))||void 0===e||e.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(t=>!t.collapsed)||this._items.first.expand():this._items.forEach(t=>t.expand()))}collapse(t){var e;null===(e=this._getItem(t))||void 0===e||e.collapse()}collapseAll(){var t;null===(t=this._items)||void 0===t||t.forEach(t=>t.collapse())}isExpanded(t){const e=this._getItem(t);return!!e&&!e.collapsed}_ensureCanExpand(t){var e;return!(this.closeOthers&&(this._items?(null===(e=this._items.find(e=>!e.collapsed&&t!==e))||void 0===e||e.collapse(),0):this._anItemWasAlreadyExpandedDuringInitialisation||(this._anItemWasAlreadyExpandedDuringInitialisation=!0,0)))}_getItem(t){var e;return null===(e=this._items)||void 0===e?void 0:e.find(e=>e.id===t)}}ve.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ve,deps:[{token:te}],target:y["ɵɵFactoryTarget"].Directive}),ve.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ve,isStandalone:!0,selector:"[ngbAccordion]",inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{shown:"shown",hidden:"hidden"},host:{properties:{"class.accordion":"true"}},queries:[{propertyName:"_items",predicate:be}],exportAs:["ngbAccordion"],ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ve,decorators:[{type:y.Directive,args:[{selector:"[ngbAccordion]",standalone:!0,exportAs:"ngbAccordion",host:{"[class.accordion]":"true"}}]}],ctorParameters:function(){return[{type:te}]},propDecorators:{_items:[{type:y.ContentChildren,args:[be,{descendants:!1}]}],animation:[{type:y.Input}],closeOthers:[{type:y.Input}],destroyOnHide:[{type:y.Input}],shown:[{type:y.Output}],hidden:[{type:y.Output}]}});const ye=[le,ae,ie,se,ne,re,ge,ve,be,fe,me,he,ue];class xe{}xe.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:xe,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),xe.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:x,type:xe,imports:[le,ae,ie,se,ne,re,ge,ve,be,fe,me,he,ue],exports:[le,ae,ie,se,ne,re,ge,ve,be,fe,me,he,ue]}),xe.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:xe,imports:[le]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:xe,decorators:[{type:y.NgModule,args:[{imports:ye,exports:ye}]}]});const _e=({classList:t})=>{t.remove("show")};class we{constructor(t){this._ngbConfig=t,this.dismissible=!0,this.type="warning"}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}we.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:we,deps:[{token:Qt}],target:y["ɵɵFactoryTarget"].Injectable}),we.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:we,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:we,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Qt}]}});class ke{constructor(t,e,n,i){this._renderer=e,this._element=n,this._zone=i,this.closed=new y.EventEmitter,this.dismissible=t.dismissible,this.type=t.type,this.animation=t.animation}close(){const t=Jt(this._zone,this._element.nativeElement,_e,{animation:this.animation,runningTransition:"continue"});return t.subscribe(()=>this.closed.emit()),t}ngOnChanges(t){const e=t.type;e&&!e.firstChange&&(this._renderer.removeClass(this._element.nativeElement,`alert-${e.previousValue}`),this._renderer.addClass(this._element.nativeElement,`alert-${e.currentValue}`))}ngOnInit(){this._renderer.addClass(this._element.nativeElement,`alert-${this.type}`)}}ke.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ke,deps:[{token:we},{token:y.Renderer2},{token:y.ElementRef},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Component}),ke.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ke,isStandalone:!0,selector:"ngb-alert",inputs:{animation:"animation",dismissible:"dismissible",type:"type"},outputs:{closed:"closed"},host:{attributes:{role:"alert"},properties:{"class.fade":"animation","class.alert-dismissible":"dismissible"},classAttribute:"alert show"},exportAs:["ngbAlert"],usesOnChanges:!0,ngImport:x,template:'\n\t\t<ng-content></ng-content>\n\t\t<button\n\t\t\t*ngIf="dismissible"\n\t\t\ttype="button"\n\t\t\tclass="btn-close"\n\t\t\taria-label="Close"\n\t\t\ti18n-aria-label="@@ngb.alert.close"\n\t\t\t(click)="close()"\n\t\t>\n\t\t</button>\n\t',isInline:!0,styles:["ngb-alert{display:block}\n"],dependencies:[{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ke,decorators:[{type:y.Component,args:[{selector:"ngb-alert",exportAs:"ngbAlert",standalone:!0,imports:[_.NgIf],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,host:{role:"alert",class:"alert show","[class.fade]":"animation","[class.alert-dismissible]":"dismissible"},template:'\n\t\t<ng-content></ng-content>\n\t\t<button\n\t\t\t*ngIf="dismissible"\n\t\t\ttype="button"\n\t\t\tclass="btn-close"\n\t\t\taria-label="Close"\n\t\t\ti18n-aria-label="@@ngb.alert.close"\n\t\t\t(click)="close()"\n\t\t>\n\t\t</button>\n\t',styles:["ngb-alert{display:block}\n"]}]}],ctorParameters:function(){return[{type:we},{type:y.Renderer2},{type:y.ElementRef},{type:y.NgZone}]},propDecorators:{animation:[{type:y.Input}],dismissible:[{type:y.Input}],type:[{type:y.Input}],closed:[{type:y.Output}]}});class De{}var Ie;De.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:De,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),De.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:x,type:De,imports:[ke],exports:[ke]}),De.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:De,imports:[ke]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:De,decorators:[{type:y.NgModule,args:[{imports:[ke],exports:[ke]}]}]}),function(t){t.START="start",t.END="end"}(Ie||(Ie={}));const Ce=({classList:t})=>t.contains("carousel-item-start")||t.contains("carousel-item-end"),Me=t=>{t.remove("carousel-item-start"),t.remove("carousel-item-end")},Se=t=>{Me(t),t.remove("carousel-item-prev"),t.remove("carousel-item-next")},$e=(t,e,{direction:n})=>{const{classList:i}=t;return e?(Ce(t)?Me(i):(i.add("carousel-item-"+(n===Ie.START?"next":"prev")),Wt(t),i.add("carousel-item-"+n)),()=>{Se(i),i.add("active")}):(Me(i),Se(i),void i.add("active"))},Te=(t,e,{direction:n})=>{const{classList:i}=t;return e?(Ce(t)?Me(i):i.add("carousel-item-"+n),()=>{Se(i),i.remove("active")}):(Me(i),Se(i),void i.remove("active"))};class Oe{constructor(t){this._ngbConfig=t,this.interval=5e3,this.wrap=!0,this.keyboard=!0,this.pauseOnHover=!0,this.pauseOnFocus=!0,this.showNavigationArrows=!0,this.showNavigationIndicators=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}Oe.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Oe,deps:[{token:Qt}],target:y["ɵɵFactoryTarget"].Injectable}),Oe.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Oe,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Oe,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Qt}]}});let Ee=0;class Re{constructor(t){this.tplRef=t,this.id="ngb-slide-"+Ee++,this.slid=new y.EventEmitter}}Re.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Re,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),Re.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Re,isStandalone:!0,selector:"ng-template[ngbSlide]",inputs:{id:"id"},outputs:{slid:"slid"},ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Re,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbSlide]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]},propDecorators:{id:[{type:y.Input}],slid:[{type:y.Output}]}});class Pe{constructor(t,e,n,i,s){this._platformId=e,this._ngZone=n,this._cd=i,this._container=s,this.NgbSlideEventSource=Ne,this._destroy$=new k.Subject,this._interval$=new k.BehaviorSubject(0),this._mouseHover$=new k.BehaviorSubject(!1),this._focused$=new k.BehaviorSubject(!1),this._pauseOnHover$=new k.BehaviorSubject(!1),this._pauseOnFocus$=new k.BehaviorSubject(!1),this._pause$=new k.BehaviorSubject(!1),this._wrap$=new k.BehaviorSubject(!1),this.slide=new y.EventEmitter,this.slid=new y.EventEmitter,this._transitionIds=null,this.animation=t.animation,this.interval=t.interval,this.wrap=t.wrap,this.keyboard=t.keyboard,this.pauseOnHover=t.pauseOnHover,this.pauseOnFocus=t.pauseOnFocus,this.showNavigationArrows=t.showNavigationArrows,this.showNavigationIndicators=t.showNavigationIndicators}set interval(t){this._interval$.next(t)}get interval(){return this._interval$.value}set wrap(t){this._wrap$.next(t)}get wrap(){return this._wrap$.value}set pauseOnHover(t){this._pauseOnHover$.next(t)}get pauseOnHover(){return this._pauseOnHover$.value}set pauseOnFocus(t){this._pauseOnFocus$.next(t)}get pauseOnFocus(){return this._pauseOnFocus$.value}set mouseHover(t){this._mouseHover$.next(t)}get mouseHover(){return this._mouseHover$.value}set focused(t){this._focused$.next(t)}get focused(){return this._focused$.value}arrowLeft(){this.focus(),this.prev(Ne.ARROW_LEFT)}arrowRight(){this.focus(),this.next(Ne.ARROW_RIGHT)}ngAfterContentInit(){(0,_.isPlatformBrowser)(this._platformId)&&this._ngZone.runOutsideAngular(()=>{const t=(0,k.combineLatest)([this.slide.pipe((0,D.map)(t=>t.current),(0,D.startWith)(this.activeId)),this._wrap$,this.slides.changes.pipe((0,D.startWith)(null))]).pipe((0,D.map)(([t,e])=>{const n=this.slides.toArray(),i=this._getSlideIdxById(t);return e?n.length>1:i<n.length-1}),(0,D.distinctUntilChanged)());(0,k.combineLatest)([this._pause$,this._pauseOnHover$,this._mouseHover$,this._pauseOnFocus$,this._focused$,this._interval$,t]).pipe((0,D.map)(([t,e,n,i,s,a,o])=>t||e&&n||i&&s||!o?0:a),(0,D.distinctUntilChanged)(),(0,D.switchMap)(t=>t>0?(0,k.timer)(t,t):k.NEVER),(0,D.takeUntil)(this._destroy$)).subscribe(()=>this._ngZone.run(()=>this.next(Ne.TIMER)))}),this.slides.changes.pipe((0,D.takeUntil)(this._destroy$)).subscribe(()=>{var t;null===(t=this._transitionIds)||void 0===t||t.forEach(t=>(t=>{var e;null===(e=Yt.get(t))||void 0===e||e.complete()})(this._getSlideElement(t))),this._transitionIds=null,this._cd.markForCheck(),this._ngZone.onStable.pipe((0,D.take)(1)).subscribe(()=>{for(const{id:t}of this.slides){const e=this._getSlideElement(t);t===this.activeId?e.classList.add("active"):e.classList.remove("active")}})})}ngAfterContentChecked(){let t=this._getSlideById(this.activeId);this.activeId=t?t.id:this.slides.length?this.slides.first.id:""}ngAfterViewInit(){if(this.activeId){const t=this._getSlideElement(this.activeId);t&&t.classList.add("active")}}ngOnDestroy(){this._destroy$.next()}select(t,e){this._cycleToSelected(t,this._getSlideEventDirection(this.activeId,t),e)}prev(t){this._cycleToSelected(this._getPrevSlide(this.activeId),Ie.END,t)}next(t){this._cycleToSelected(this._getNextSlide(this.activeId),Ie.START,t)}pause(){this._pause$.next(!0)}cycle(){this._pause$.next(!1)}focus(){this._container.nativeElement.focus()}_cycleToSelected(t,e,n){const i=this._transitionIds;if(i&&(i[0]!==t||i[1]!==this.activeId))return;let s=this._getSlideById(t);if(s&&s.id!==this.activeId){this._transitionIds=[this.activeId,t],this.slide.emit({prev:this.activeId,current:s.id,direction:e,paused:this._pause$.value,source:n});const i={animation:this.animation,runningTransition:"stop",context:{direction:e}},a=[],o=this._getSlideById(this.activeId);if(o){const t=Jt(this._ngZone,this._getSlideElement(o.id),Te,i);t.subscribe(()=>{o.slid.emit({isShown:!1,direction:e,source:n})}),a.push(t)}const r=this.activeId;this.activeId=s.id;const l=this._getSlideById(this.activeId),c=Jt(this._ngZone,this._getSlideElement(s.id),$e,i);c.subscribe(()=>{null==l||l.slid.emit({isShown:!0,direction:e,source:n})}),a.push(c),(0,k.zip)(...a).pipe((0,D.take)(1)).subscribe(()=>{this._transitionIds=null,this.slid.emit({prev:r,current:s.id,direction:e,paused:this._pause$.value,source:n})})}this._cd.markForCheck()}_getSlideEventDirection(t,e){return this._getSlideIdxById(t)>this._getSlideIdxById(e)?Ie.END:Ie.START}_getSlideById(t){return this.slides.find(e=>e.id===t)||null}_getSlideIdxById(t){const e=this._getSlideById(t);return null!=e?this.slides.toArray().indexOf(e):-1}_getNextSlide(t){const e=this.slides.toArray(),n=this._getSlideIdxById(t);return n===e.length-1?this.wrap?e[0].id:e[e.length-1].id:e[n+1].id}_getPrevSlide(t){const e=this.slides.toArray(),n=this._getSlideIdxById(t);return 0===n?this.wrap?e[e.length-1].id:e[0].id:e[n-1].id}_getSlideElement(t){return this._container.nativeElement.querySelector(`#slide-${t}`)}}var Ne,Fe,Ve;Pe.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Pe,deps:[{token:Oe},{token:y.PLATFORM_ID},{token:y.NgZone},{token:y.ChangeDetectorRef},{token:y.ElementRef}],target:y["ɵɵFactoryTarget"].Component}),Pe.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Pe,isStandalone:!0,selector:"ngb-carousel",inputs:{animation:"animation",activeId:"activeId",interval:"interval",wrap:"wrap",keyboard:"keyboard",pauseOnHover:"pauseOnHover",pauseOnFocus:"pauseOnFocus",showNavigationArrows:"showNavigationArrows",showNavigationIndicators:"showNavigationIndicators"},outputs:{slide:"slide",slid:"slid"},host:{attributes:{tabIndex:"0"},listeners:{"keydown.arrowLeft":"keyboard && arrowLeft()","keydown.arrowRight":"keyboard && arrowRight()",mouseenter:"mouseHover = true",mouseleave:"mouseHover = false",focusin:"focused = true",focusout:"focused = false"},properties:{"style.display":'"block"',"attr.aria-activedescendant":"'slide-' + activeId"},classAttribute:"carousel slide"},queries:[{propertyName:"slides",predicate:Re}],exportAs:["ngbCarousel"],ngImport:x,template:'\n\t\t<div class="carousel-indicators" [class.visually-hidden]="!showNavigationIndicators" role="tablist">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tdata-bs-target\n\t\t\t\t*ngFor="let slide of slides"\n\t\t\t\t[class.active]="slide.id === activeId"\n\t\t\t\trole="tab"\n\t\t\t\t[attr.aria-labelledby]="\'slide-\' + slide.id"\n\t\t\t\t[attr.aria-controls]="\'slide-\' + slide.id"\n\t\t\t\t[attr.aria-selected]="slide.id === activeId"\n\t\t\t\t(click)="focus(); select(slide.id, NgbSlideEventSource.INDICATOR)"\n\t\t\t></button>\n\t\t</div>\n\t\t<div class="carousel-inner">\n\t\t\t<div\n\t\t\t\t*ngFor="let slide of slides; index as i; count as c"\n\t\t\t\tclass="carousel-item"\n\t\t\t\t[id]="\'slide-\' + slide.id"\n\t\t\t\trole="tabpanel"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tclass="visually-hidden"\n\t\t\t\t\ti18n="Currently selected slide number read by screen reader@@ngb.carousel.slide-number"\n\t\t\t\t>\n\t\t\t\t\tSlide {{ i + 1 }} of {{ c }}\n\t\t\t\t</span>\n\t\t\t\t<ng-template [ngTemplateOutlet]="slide.tplRef"></ng-template>\n\t\t\t</div>\n\t\t</div>\n\t\t<button class="carousel-control-prev" type="button" (click)="arrowLeft()" *ngIf="showNavigationArrows">\n\t\t\t<span class="carousel-control-prev-icon" aria-hidden="true"></span>\n\t\t\t<span class="visually-hidden" i18n="@@ngb.carousel.previous">Previous</span>\n\t\t</button>\n\t\t<button class="carousel-control-next" type="button" (click)="arrowRight()" *ngIf="showNavigationArrows">\n\t\t\t<span class="carousel-control-next-icon" aria-hidden="true"></span>\n\t\t\t<span class="visually-hidden" i18n="@@ngb.carousel.next">Next</span>\n\t\t</button>\n\t',isInline:!0,dependencies:[{kind:"directive",type:_.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Pe,decorators:[{type:y.Component,args:[{selector:"ngb-carousel",exportAs:"ngbCarousel",standalone:!0,imports:[_.NgFor,_.NgTemplateOutlet,_.NgIf],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,host:{class:"carousel slide","[style.display]":'"block"',tabIndex:"0","(keydown.arrowLeft)":"keyboard && arrowLeft()","(keydown.arrowRight)":"keyboard && arrowRight()","(mouseenter)":"mouseHover = true","(mouseleave)":"mouseHover = false","(focusin)":"focused = true","(focusout)":"focused = false","[attr.aria-activedescendant]":"'slide-' + activeId"},template:'\n\t\t<div class="carousel-indicators" [class.visually-hidden]="!showNavigationIndicators" role="tablist">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tdata-bs-target\n\t\t\t\t*ngFor="let slide of slides"\n\t\t\t\t[class.active]="slide.id === activeId"\n\t\t\t\trole="tab"\n\t\t\t\t[attr.aria-labelledby]="\'slide-\' + slide.id"\n\t\t\t\t[attr.aria-controls]="\'slide-\' + slide.id"\n\t\t\t\t[attr.aria-selected]="slide.id === activeId"\n\t\t\t\t(click)="focus(); select(slide.id, NgbSlideEventSource.INDICATOR)"\n\t\t\t></button>\n\t\t</div>\n\t\t<div class="carousel-inner">\n\t\t\t<div\n\t\t\t\t*ngFor="let slide of slides; index as i; count as c"\n\t\t\t\tclass="carousel-item"\n\t\t\t\t[id]="\'slide-\' + slide.id"\n\t\t\t\trole="tabpanel"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tclass="visually-hidden"\n\t\t\t\t\ti18n="Currently selected slide number read by screen reader@@ngb.carousel.slide-number"\n\t\t\t\t>\n\t\t\t\t\tSlide {{ i + 1 }} of {{ c }}\n\t\t\t\t</span>\n\t\t\t\t<ng-template [ngTemplateOutlet]="slide.tplRef"></ng-template>\n\t\t\t</div>\n\t\t</div>\n\t\t<button class="carousel-control-prev" type="button" (click)="arrowLeft()" *ngIf="showNavigationArrows">\n\t\t\t<span class="carousel-control-prev-icon" aria-hidden="true"></span>\n\t\t\t<span class="visually-hidden" i18n="@@ngb.carousel.previous">Previous</span>\n\t\t</button>\n\t\t<button class="carousel-control-next" type="button" (click)="arrowRight()" *ngIf="showNavigationArrows">\n\t\t\t<span class="carousel-control-next-icon" aria-hidden="true"></span>\n\t\t\t<span class="visually-hidden" i18n="@@ngb.carousel.next">Next</span>\n\t\t</button>\n\t'}]}],ctorParameters:function(){return[{type:Oe},{type:void 0,decorators:[{type:y.Inject,args:[y.PLATFORM_ID]}]},{type:y.NgZone},{type:y.ChangeDetectorRef},{type:y.ElementRef}]},propDecorators:{slides:[{type:y.ContentChildren,args:[Re]}],animation:[{type:y.Input}],activeId:[{type:y.Input}],interval:[{type:y.Input}],wrap:[{type:y.Input}],keyboard:[{type:y.Input}],pauseOnHover:[{type:y.Input}],pauseOnFocus:[{type:y.Input}],showNavigationArrows:[{type:y.Input}],showNavigationIndicators:[{type:y.Input}],slide:[{type:y.Output}],slid:[{type:y.Output}]}}),function(t){t.TIMER="timer",t.ARROW_LEFT="arrowLeft",t.ARROW_RIGHT="arrowRight",t.INDICATOR="indicator"}(Ne||(Ne={}));class Ae{}Ae.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ae,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Ae.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:x,type:Ae,imports:[Pe,Re],exports:[Pe,Re]}),Ae.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ae,imports:[Pe]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ae,decorators:[{type:y.NgModule,args:[{imports:[Pe,Re],exports:[Pe,Re]}]}]});class Le{}Le.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Le,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Le.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:x,type:Le,imports:[de],exports:[de]}),Le.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Le}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Le,decorators:[{type:y.NgModule,args:[{imports:[de],exports:[de]}]}]});class je{constructor(t,e,n){this.year=jt(t)?t:null,this.month=jt(e)?e:null,this.day=jt(n)?n:null}static from(t){return t instanceof je?t:t?new je(t.year,t.month,t.day):null}equals(t){return null!=t&&this.year===t.year&&this.month===t.month&&this.day===t.day}before(t){return!!t&&(this.year===t.year?this.month===t.month?this.day!==t.day&&this.day<t.day:this.month<t.month:this.year<t.year)}after(t){return!!t&&(this.year===t.year?this.month===t.month?this.day!==t.day&&this.day>t.day:this.month>t.month:this.year>t.year)}}function He(t,e){return!function(t,e){return!t&&!e||!!t&&!!e&&t.equals(e)}(t,e)}function ze(t,e){return!(!t&&!e||t&&e&&t.year===e.year&&t.month===e.month)}function Be(t,e,n){return t&&e&&t.before(e)?e:t&&n&&t.after(n)?n:t||null}function Ge(t,e){const{minDate:n,maxDate:i,disabled:s,markDisabled:a}=e;return!(null==t||s||a&&a(t,{year:t.year,month:t.month})||n&&t.before(n)||i&&t.after(i))}function We(t){return new je(t.getFullYear(),t.getMonth()+1,t.getDate())}function Ue(t){const e=new Date(t.year,t.month-1,t.day,12);return isNaN(e.getTime())||e.setFullYear(t.year),e}function qe(){return new Ke}class Ze{}Ze.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ze,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),Ze.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ze,providedIn:"root",useFactory:qe}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ze,decorators:[{type:y.Injectable,args:[{providedIn:"root",useFactory:qe}]}]});class Ke extends Ze{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(t,e="d",n=1){let i=Ue(t),s=!0,a=i.getMonth();switch(e){case"y":i.setFullYear(i.getFullYear()+n);break;case"m":a+=n,i.setMonth(a),a%=12,a<0&&(a+=12);break;case"d":i.setDate(i.getDate()+n),s=!1;break;default:return t}return s&&i.getMonth()!==a&&i.setDate(0),We(i)}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){let e=Ue(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=Ue(t[(11-e)%7]);n.setDate(n.getDate()+4-(n.getDay()||7));const i=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((i-n.getTime())/864e5)/7)+1}getToday(){return We(new Date)}isValid(t){if(!(t&&jt(t.year)&&jt(t.month)&&jt(t.day)))return!1;if(0===t.year)return!1;const e=Ue(t);return!isNaN(e.getTime())&&e.getFullYear()===t.year&&e.getMonth()+1===t.month&&e.getDate()===t.day}}function Ye(t){return new Xe(t)}Ke.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ke,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),Ke.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ke}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ke,decorators:[{type:y.Injectable}]});class Je{getMonthLabel(t){return`${this.getMonthFullName(t.month,t.year)} ${this.getYearNumerals(t.year)}`}getDayNumerals(t){return`${t.day}`}getWeekNumerals(t){return`${t}`}getYearNumerals(t){return`${t}`}getWeekLabel(){return""}}Je.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Je,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),Je.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Je,providedIn:"root",useFactory:Ye,deps:[{token:y.LOCALE_ID}]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Je,decorators:[{type:y.Injectable,args:[{providedIn:"root",useFactory:Ye,deps:[y.LOCALE_ID]}]}]});class Xe extends Je{constructor(t){super(),this._locale=t,this._monthsShort=(0,_.getLocaleMonthNames)(t,_.FormStyle.Standalone,_.TranslationWidth.Abbreviated),this._monthsFull=(0,_.getLocaleMonthNames)(t,_.FormStyle.Standalone,_.TranslationWidth.Wide)}getWeekdayLabel(t,e){const n=(0,_.getLocaleDayNames)(this._locale,_.FormStyle.Standalone,void 0===e?_.TranslationWidth.Short:e),i=n.map((t,e)=>n[(e+1)%7]);return i[t-1]||""}getMonthShortName(t){return this._monthsShort[t-1]||""}getMonthFullName(t){return this._monthsFull[t-1]||""}getDayAriaLabel(t){const e=new Date(t.year,t.month-1,t.day);return(0,_.formatDate)(e,"fullDate",this._locale)}}Xe.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Xe,deps:[{token:y.LOCALE_ID}],target:y["ɵɵFactoryTarget"].Injectable}),Xe.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Xe}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Xe,decorators:[{type:y.Injectable}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Inject,args:[y.LOCALE_ID]}]}]}});class Qe{constructor(t,e){this._calendar=t,this._i18n=e,this._VALIDATORS={dayTemplateData:t=>{if(this._state.dayTemplateData!==t)return{dayTemplateData:t}},displayMonths:t=>{if(jt(t=Nt(t))&&t>0&&this._state.displayMonths!==t)return{displayMonths:t}},disabled:t=>{if(this._state.disabled!==t)return{disabled:t}},firstDayOfWeek:t=>{if(jt(t=Nt(t))&&t>=0&&this._state.firstDayOfWeek!==t)return{firstDayOfWeek:t}},focusVisible:t=>{if(this._state.focusVisible!==t&&!this._state.disabled)return{focusVisible:t}},markDisabled:t=>{if(this._state.markDisabled!==t)return{markDisabled:t}},maxDate:t=>{const e=this.toValidDate(t,null);if(He(this._state.maxDate,e))return{maxDate:e}},minDate:t=>{const e=this.toValidDate(t,null);if(He(this._state.minDate,e))return{minDate:e}},navigation:t=>{if(this._state.navigation!==t)return{navigation:t}},outsideDays:t=>{if(this._state.outsideDays!==t)return{outsideDays:t}},weekdays:t=>{const e=!0===t||!1===t?_.TranslationWidth.Short:t,n=!0!==t&&!1!==t||t;if(this._state.weekdayWidth!==e||this._state.weekdaysVisible!==n)return{weekdayWidth:e,weekdaysVisible:n}}},this._model$=new k.Subject,this._dateSelect$=new k.Subject,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]},weekdayWidth:_.TranslationWidth.Short,weekdaysVisible:!0}}get model$(){return this._model$.pipe((0,D.filter)(t=>t.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe((0,D.filter)(t=>null!==t))}set(t){let e=Object.keys(t).map(e=>this._VALIDATORS[e](t[e])).reduce((t,e)=>Object.assign(Object.assign({},t),e),{});Object.keys(e).length>0&&this._nextState(e)}focus(t){const e=this.toValidDate(t,null);null!=e&&!this._state.disabled&&He(this._state.focusDate,e)&&this._nextState({focusDate:t})}focusSelect(){Ge(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(t){const e=this.toValidDate(t,this._calendar.getToday());null==e||this._state.disabled||this._state.firstDate&&!ze(this._state.firstDate,e)||this._nextState({firstDate:e})}select(t,e={}){const n=this.toValidDate(t,null);null==n||this._state.disabled||(He(this._state.selectedDate,n)&&this._nextState({selectedDate:n}),e.emitEvent&&Ge(n,this._state)&&this._dateSelect$.next(n))}toValidDate(t,e){const n=je.from(t);return void 0===e&&(e=this._calendar.getToday()),this._calendar.isValid(n)?n:e}getMonth(t){for(let e of this._state.months)if(t.month===e.number&&t.year===e.year)return e;throw new Error(`month ${t.month} of year ${t.year} not found`)}_nextState(t){const e=this._updateState(t);this._patchContexts(e),this._state=e,this._model$.next(this._state)}_patchContexts(t){const{months:e,displayMonths:n,selectedDate:i,focusDate:s,focusVisible:a,disabled:o,outsideDays:r}=t;t.months.forEach(t=>{t.weeks.forEach(l=>{l.days.forEach(l=>{s&&(l.context.focused=s.equals(l.date)&&a),l.tabindex=!o&&s&&l.date.equals(s)&&s.month===t.number?0:-1,!0===o&&(l.context.disabled=!0),void 0!==i&&(l.context.selected=null!==i&&i.equals(l.date)),t.number!==l.date.month&&(l.hidden="hidden"===r||"collapsed"===r||n>1&&l.date.after(e[0].firstDate)&&l.date.before(e[n-1].lastDate))})})})}_updateState(t){const e=Object.assign({},this._state,t);let n=e.firstDate;if(("minDate"in t||"maxDate"in t)&&(function(t,e){if(e&&t&&e.before(t))throw new Error(`'maxDate' ${e} should be greater than 'minDate' ${t}`)}(e.minDate,e.maxDate),e.focusDate=Be(e.focusDate,e.minDate,e.maxDate),e.firstDate=Be(e.firstDate,e.minDate,e.maxDate),n=e.focusDate),"disabled"in t&&(e.focusVisible=!1),"selectedDate"in t&&0===this._state.months.length&&(n=e.selectedDate),"focusVisible"in t)return e;if("focusDate"in t&&(e.focusDate=Be(e.focusDate,e.minDate,e.maxDate),n=e.focusDate,0!==e.months.length&&e.focusDate&&!e.focusDate.before(e.firstDate)&&!e.focusDate.after(e.lastDate)))return e;if("firstDate"in t&&(e.firstDate=Be(e.firstDate,e.minDate,e.maxDate),n=e.firstDate),n){const i="dayTemplateData"in t||"firstDayOfWeek"in t||"markDisabled"in t||"minDate"in t||"maxDate"in t||"disabled"in t||"outsideDays"in t||"weekdaysVisible"in t,s=function(t,e,n,i,s){const{displayMonths:a,months:o}=n,r=o.splice(0,o.length);return Array.from({length:a},(n,i)=>{const a=Object.assign(t.getNext(e,"m",i),{day:1});if(o[i]=null,!s){const t=r.findIndex(t=>t.firstDate.equals(a));-1!==t&&(o[i]=r.splice(t,1)[0])}return a}).forEach((e,s)=>{null===o[s]&&(o[s]=function(t,e,n,i,s={}){const{dayTemplateData:a,minDate:o,maxDate:r,firstDayOfWeek:l,markDisabled:c,outsideDays:d,weekdayWidth:p,weekdaysVisible:h}=n,u=t.getToday();s.firstDate=null,s.lastDate=null,s.number=e.month,s.year=e.year,s.weeks=s.weeks||[],s.weekdays=s.weekdays||[],e=function(t,e,n){const i=t.getDaysPerWeek(),s=new je(e.year,e.month,1),a=t.getWeekday(s)%i;return t.getPrev(s,"d",(i+a-n)%i)}(t,e,l),h||(s.weekdays.length=0);for(let n=0;n<t.getWeeksPerMonth();n++){let m=s.weeks[n];m||(m=s.weeks[n]={number:0,days:[],collapsed:!0});const g=m.days;for(let l=0;l<t.getDaysPerWeek();l++){0===n&&h&&(s.weekdays[l]=i.getWeekdayLabel(t.getWeekday(e),p));const d=new je(e.year,e.month,e.day),m=t.getNext(d),f=i.getDayAriaLabel(d);let b=!!(o&&d.before(o)||r&&d.after(r));!b&&c&&(b=c(d,{month:s.number,year:s.year}));let v=d.equals(u),y=a?a(d,{month:s.number,year:s.year}):void 0;null===s.firstDate&&d.month===s.number&&(s.firstDate=d),d.month===s.number&&m.month!==s.number&&(s.lastDate=d);let x=g[l];x||(x=g[l]={}),x.date=d,x.context=Object.assign(x.context||{},{$implicit:d,date:d,data:y,currentMonth:s.number,currentYear:s.year,disabled:b,focused:!1,selected:!1,today:v}),x.tabindex=-1,x.ariaLabel=f,x.hidden=!1,e=m}m.number=t.getWeekNumber(g.map(t=>t.date),l),m.collapsed="collapsed"===d&&g[0].date.month!==s.number&&g[g.length-1].date.month!==s.number}return s}(t,e,n,i,r.shift()||{}))}),o}(this._calendar,n,e,this._i18n,i);e.months=s,e.firstDate=s[0].firstDate,e.lastDate=s[s.length-1].lastDate,"selectedDate"in t&&!Ge(e.selectedDate,e)&&(e.selectedDate=null),"firstDate"in t&&(!e.focusDate||e.focusDate.before(e.firstDate)||e.focusDate.after(e.lastDate))&&(e.focusDate=n);const a=!this._state.firstDate||this._state.firstDate.year!==e.firstDate.year,o=!this._state.firstDate||this._state.firstDate.month!==e.firstDate.month;"select"===e.navigation?(("minDate"in t||"maxDate"in t||0===e.selectBoxes.years.length||a)&&(e.selectBoxes.years=function(t,e,n){if(!t)return[];const i=e?Math.max(e.year,t.year-500):t.year-10,s=(n?Math.min(n.year,t.year+500):t.year+10)-i+1,a=Array(s);for(let t=0;t<s;t++)a[t]=i+t;return a}(e.firstDate,e.minDate,e.maxDate)),("minDate"in t||"maxDate"in t||0===e.selectBoxes.months.length||a)&&(e.selectBoxes.months=function(t,e,n,i){if(!e)return[];let s=t.getMonths(e.year);if(n&&e.year===n.year){const t=s.findIndex(t=>t===n.month);s=s.slice(t)}if(i&&e.year===i.year){const t=s.findIndex(t=>t===i.month);s=s.slice(0,t+1)}return s}(this._calendar,e.firstDate,e.minDate,e.maxDate))):e.selectBoxes={years:[],months:[]},"arrows"!==e.navigation&&"select"!==e.navigation||!(o||a||"minDate"in t||"maxDate"in t||"disabled"in t)||(e.prevDisabled=e.disabled||function(t,e,n){const i=Object.assign(t.getPrev(e,"m"),{day:1});return null!=n&&(i.year===n.year&&i.month<n.month||i.year<n.year&&1===n.month)}(this._calendar,e.firstDate,e.minDate),e.nextDisabled=e.disabled||function(t,e,n){const i=Object.assign(t.getNext(e,"m"),{day:1});return null!=n&&i.after(n)}(this._calendar,e.lastDate,e.maxDate))}return e}}Qe.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Qe,deps:[{token:Ze},{token:Je}],target:y["ɵɵFactoryTarget"].Injectable}),Qe.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Qe}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Qe,decorators:[{type:y.Injectable}],ctorParameters:function(){return[{type:Ze},{type:Je}]}}),function(t){t[t.PREV=0]="PREV",t[t.NEXT=1]="NEXT"}(Fe||(Fe={}));class tn{constructor(t){this.i18n=t}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}}tn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:tn,deps:[{token:Je}],target:y["ɵɵFactoryTarget"].Component}),tn.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:tn,isStandalone:!0,selector:"[ngbDatepickerDayView]",inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},host:{properties:{"class.bg-primary":"selected","class.text-white":"selected","class.text-muted":"isMuted()","class.outside":"isMuted()","class.active":"focused"},classAttribute:"btn-light"},ngImport:x,template:"{{ i18n.getDayNumerals(date) }}",isInline:!0,styles:["[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-btn-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5}\n"],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:tn,decorators:[{type:y.Component,args:[{selector:"[ngbDatepickerDayView]",standalone:!0,changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,host:{class:"btn-light","[class.bg-primary]":"selected","[class.text-white]":"selected","[class.text-muted]":"isMuted()","[class.outside]":"isMuted()","[class.active]":"focused"},template:"{{ i18n.getDayNumerals(date) }}",styles:["[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-btn-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5}\n"]}]}],ctorParameters:function(){return[{type:Je}]},propDecorators:{currentMonth:[{type:y.Input}],date:[{type:y.Input}],disabled:[{type:y.Input}],focused:[{type:y.Input}],selected:[{type:y.Input}]}});class en{constructor(t,e){this.i18n=t,this._renderer=e,this.select=new y.EventEmitter,this._month=-1,this._year=-1}changeMonth(t){this.select.emit(new je(this.date.year,Nt(t),1))}changeYear(t){this.select.emit(new je(Nt(t),this.date.month,1))}ngAfterViewChecked(){this.date&&(this.date.month!==this._month&&(this._month=this.date.month,this._renderer.setProperty(this.monthSelect.nativeElement,"value",this._month)),this.date.year!==this._year&&(this._year=this.date.year,this._renderer.setProperty(this.yearSelect.nativeElement,"value",this._year)))}}en.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:en,deps:[{token:Je},{token:y.Renderer2}],target:y["ɵɵFactoryTarget"].Component}),en.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:en,isStandalone:!0,selector:"ngb-datepicker-navigation-select",inputs:{date:"date",disabled:"disabled",months:"months",years:"years"},outputs:{select:"select"},viewQueries:[{propertyName:"monthSelect",first:!0,predicate:["month"],descendants:!0,read:y.ElementRef,static:!0},{propertyName:"yearSelect",first:!0,predicate:["year"],descendants:!0,read:y.ElementRef,static:!0}],ngImport:x,template:'\n\t\t<select\n\t\t\t#month\n\t\t\t[disabled]="disabled"\n\t\t\tclass="form-select"\n\t\t\ti18n-aria-label="@@ngb.datepicker.select-month"\n\t\t\taria-label="Select month"\n\t\t\ti18n-title="@@ngb.datepicker.select-month"\n\t\t\ttitle="Select month"\n\t\t\t(change)="changeMonth($any($event).target.value)"\n\t\t>\n\t\t\t<option *ngFor="let m of months" [attr.aria-label]="i18n.getMonthFullName(m, date.year)" [value]="m">{{\n\t\t\t\ti18n.getMonthShortName(m, date.year)\n\t\t\t}}</option> </select\n\t\t><select\n\t\t\t#year\n\t\t\t[disabled]="disabled"\n\t\t\tclass="form-select"\n\t\t\ti18n-aria-label="@@ngb.datepicker.select-year"\n\t\t\taria-label="Select year"\n\t\t\ti18n-title="@@ngb.datepicker.select-year"\n\t\t\ttitle="Select year"\n\t\t\t(change)="changeYear($any($event).target.value)"\n\t\t>\n\t\t\t<option *ngFor="let y of years" [value]="y">{{ i18n.getYearNumerals(y) }}</option>\n\t\t</select>\n\t',isInline:!0,styles:["ngb-datepicker-navigation-select>.form-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.form-select:focus{z-index:1}ngb-datepicker-navigation-select>.form-select::-ms-value{background-color:transparent!important}\n"],dependencies:[{kind:"directive",type:_.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:en,decorators:[{type:y.Component,args:[{selector:"ngb-datepicker-navigation-select",standalone:!0,imports:[_.NgFor],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,template:'\n\t\t<select\n\t\t\t#month\n\t\t\t[disabled]="disabled"\n\t\t\tclass="form-select"\n\t\t\ti18n-aria-label="@@ngb.datepicker.select-month"\n\t\t\taria-label="Select month"\n\t\t\ti18n-title="@@ngb.datepicker.select-month"\n\t\t\ttitle="Select month"\n\t\t\t(change)="changeMonth($any($event).target.value)"\n\t\t>\n\t\t\t<option *ngFor="let m of months" [attr.aria-label]="i18n.getMonthFullName(m, date.year)" [value]="m">{{\n\t\t\t\ti18n.getMonthShortName(m, date.year)\n\t\t\t}}</option> </select\n\t\t><select\n\t\t\t#year\n\t\t\t[disabled]="disabled"\n\t\t\tclass="form-select"\n\t\t\ti18n-aria-label="@@ngb.datepicker.select-year"\n\t\t\taria-label="Select year"\n\t\t\ti18n-title="@@ngb.datepicker.select-year"\n\t\t\ttitle="Select year"\n\t\t\t(change)="changeYear($any($event).target.value)"\n\t\t>\n\t\t\t<option *ngFor="let y of years" [value]="y">{{ i18n.getYearNumerals(y) }}</option>\n\t\t</select>\n\t',styles:["ngb-datepicker-navigation-select>.form-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.form-select:focus{z-index:1}ngb-datepicker-navigation-select>.form-select::-ms-value{background-color:transparent!important}\n"]}]}],ctorParameters:function(){return[{type:Je},{type:y.Renderer2}]},propDecorators:{date:[{type:y.Input}],disabled:[{type:y.Input}],months:[{type:y.Input}],years:[{type:y.Input}],select:[{type:y.Output}],monthSelect:[{type:y.ViewChild,args:["month",{static:!0,read:y.ElementRef}]}],yearSelect:[{type:y.ViewChild,args:["year",{static:!0,read:y.ElementRef}]}]}});class nn{constructor(t){this.i18n=t,this.navigation=Fe,this.months=[],this.navigate=new y.EventEmitter,this.select=new y.EventEmitter}onClickPrev(t){t.currentTarget.focus(),this.navigate.emit(this.navigation.PREV)}onClickNext(t){t.currentTarget.focus(),this.navigate.emit(this.navigation.NEXT)}}nn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:nn,deps:[{token:Je}],target:y["ɵɵFactoryTarget"].Component}),nn.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:nn,isStandalone:!0,selector:"ngb-datepicker-navigation",inputs:{date:"date",disabled:"disabled",months:"months",showSelect:"showSelect",prevDisabled:"prevDisabled",nextDisabled:"nextDisabled",selectBoxes:"selectBoxes"},outputs:{navigate:"navigate",select:"select"},ngImport:x,template:'\n\t\t<div class="ngb-dp-arrow">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="btn btn-link ngb-dp-arrow-btn"\n\t\t\t\t(click)="onClickPrev($event)"\n\t\t\t\t[disabled]="prevDisabled"\n\t\t\t\ti18n-aria-label="@@ngb.datepicker.previous-month"\n\t\t\t\taria-label="Previous month"\n\t\t\t\ti18n-title="@@ngb.datepicker.previous-month"\n\t\t\t\ttitle="Previous month"\n\t\t\t>\n\t\t\t\t<span class="ngb-dp-navigation-chevron"></span>\n\t\t\t</button>\n\t\t</div>\n\t\t<ngb-datepicker-navigation-select\n\t\t\t*ngIf="showSelect"\n\t\t\tclass="ngb-dp-navigation-select"\n\t\t\t[date]="date"\n\t\t\t[disabled]="disabled"\n\t\t\t[months]="selectBoxes.months"\n\t\t\t[years]="selectBoxes.years"\n\t\t\t(select)="select.emit($event)"\n\t\t>\n\t\t</ngb-datepicker-navigation-select>\n\n\t\t<ng-template *ngIf="!showSelect" ngFor let-month [ngForOf]="months" let-i="index">\n\t\t\t<div class="ngb-dp-arrow" *ngIf="i > 0"></div>\n\t\t\t<div class="ngb-dp-month-name">\n\t\t\t\t{{ i18n.getMonthLabel(month.firstDate) }}\n\t\t\t</div>\n\t\t\t<div class="ngb-dp-arrow" *ngIf="i !== months.length - 1"></div>\n\t\t</ng-template>\n\t\t<div class="ngb-dp-arrow right">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="btn btn-link ngb-dp-arrow-btn"\n\t\t\t\t(click)="onClickNext($event)"\n\t\t\t\t[disabled]="nextDisabled"\n\t\t\t\ti18n-aria-label="@@ngb.datepicker.next-month"\n\t\t\t\taria-label="Next month"\n\t\t\t\ti18n-title="@@ngb.datepicker.next-month"\n\t\t\t\ttitle="Next month"\n\t\t\t>\n\t\t\t\t<span class="ngb-dp-navigation-chevron"></span>\n\t\t\t</button>\n\t\t</div>\n\t',isInline:!0,styles:["ngb-datepicker-navigation{display:flex;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;transform:rotate(-135deg)}.ngb-dp-arrow{display:flex;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{justify-content:flex-end}.ngb-dp-arrow.right .ngb-dp-navigation-chevron{transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:flex;flex:1 1 9rem}\n"],dependencies:[{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"component",type:en,selector:"ngb-datepicker-navigation-select",inputs:["date","disabled","months","years"],outputs:["select"]}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:nn,decorators:[{type:y.Component,args:[{selector:"ngb-datepicker-navigation",standalone:!0,imports:[_.NgIf,_.NgFor,en],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,template:'\n\t\t<div class="ngb-dp-arrow">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="btn btn-link ngb-dp-arrow-btn"\n\t\t\t\t(click)="onClickPrev($event)"\n\t\t\t\t[disabled]="prevDisabled"\n\t\t\t\ti18n-aria-label="@@ngb.datepicker.previous-month"\n\t\t\t\taria-label="Previous month"\n\t\t\t\ti18n-title="@@ngb.datepicker.previous-month"\n\t\t\t\ttitle="Previous month"\n\t\t\t>\n\t\t\t\t<span class="ngb-dp-navigation-chevron"></span>\n\t\t\t</button>\n\t\t</div>\n\t\t<ngb-datepicker-navigation-select\n\t\t\t*ngIf="showSelect"\n\t\t\tclass="ngb-dp-navigation-select"\n\t\t\t[date]="date"\n\t\t\t[disabled]="disabled"\n\t\t\t[months]="selectBoxes.months"\n\t\t\t[years]="selectBoxes.years"\n\t\t\t(select)="select.emit($event)"\n\t\t>\n\t\t</ngb-datepicker-navigation-select>\n\n\t\t<ng-template *ngIf="!showSelect" ngFor let-month [ngForOf]="months" let-i="index">\n\t\t\t<div class="ngb-dp-arrow" *ngIf="i > 0"></div>\n\t\t\t<div class="ngb-dp-month-name">\n\t\t\t\t{{ i18n.getMonthLabel(month.firstDate) }}\n\t\t\t</div>\n\t\t\t<div class="ngb-dp-arrow" *ngIf="i !== months.length - 1"></div>\n\t\t</ng-template>\n\t\t<div class="ngb-dp-arrow right">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="btn btn-link ngb-dp-arrow-btn"\n\t\t\t\t(click)="onClickNext($event)"\n\t\t\t\t[disabled]="nextDisabled"\n\t\t\t\ti18n-aria-label="@@ngb.datepicker.next-month"\n\t\t\t\taria-label="Next month"\n\t\t\t\ti18n-title="@@ngb.datepicker.next-month"\n\t\t\t\ttitle="Next month"\n\t\t\t>\n\t\t\t\t<span class="ngb-dp-navigation-chevron"></span>\n\t\t\t</button>\n\t\t</div>\n\t',styles:["ngb-datepicker-navigation{display:flex;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;transform:rotate(-135deg)}.ngb-dp-arrow{display:flex;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{justify-content:flex-end}.ngb-dp-arrow.right .ngb-dp-navigation-chevron{transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:flex;flex:1 1 9rem}\n"]}]}],ctorParameters:function(){return[{type:Je}]},propDecorators:{date:[{type:y.Input}],disabled:[{type:y.Input}],months:[{type:y.Input}],showSelect:[{type:y.Input}],prevDisabled:[{type:y.Input}],nextDisabled:[{type:y.Input}],selectBoxes:[{type:y.Input}],navigate:[{type:y.Output}],select:[{type:y.Output}]}}),function(t){t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown"}(Ve||(Ve={}));class sn{processKey(t,e){const{state:n,calendar:i}=e;switch(t.which){case Ve.PageUp:e.focusDate(i.getPrev(n.focusedDate,t.shiftKey?"y":"m",1));break;case Ve.PageDown:e.focusDate(i.getNext(n.focusedDate,t.shiftKey?"y":"m",1));break;case Ve.End:e.focusDate(t.shiftKey?n.maxDate:n.lastDate);break;case Ve.Home:e.focusDate(t.shiftKey?n.minDate:n.firstDate);break;case Ve.ArrowLeft:e.focusDate(i.getPrev(n.focusedDate,"d",1));break;case Ve.ArrowUp:e.focusDate(i.getPrev(n.focusedDate,"d",i.getDaysPerWeek()));break;case Ve.ArrowRight:e.focusDate(i.getNext(n.focusedDate,"d",1));break;case Ve.ArrowDown:e.focusDate(i.getNext(n.focusedDate,"d",i.getDaysPerWeek()));break;case Ve.Enter:case Ve.Space:e.focusSelect();break;default:return}t.preventDefault(),t.stopPropagation()}}sn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:sn,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),sn.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:sn,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:sn,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});class an{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekNumbers=!1,this.weekdays=_.TranslationWidth.Short}}function on(){return new ln}an.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:an,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),an.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:an,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:an,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});class rn{}rn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:rn,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),rn.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:rn,providedIn:"root",useFactory:on}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:rn,decorators:[{type:y.Injectable,args:[{providedIn:"root",useFactory:on}]}]});class ln extends rn{fromModel(t){return t&&jt(t.year)&&jt(t.month)&&jt(t.day)?{year:t.year,month:t.month,day:t.day}:null}toModel(t){return t&&jt(t.year)&&jt(t.month)&&jt(t.day)?{year:t.year,month:t.month,day:t.day}:null}}ln.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ln,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),ln.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ln}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ln,decorators:[{type:y.Injectable}]});class cn{constructor(t){this.templateRef=t}}cn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:cn,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),cn.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:cn,isStandalone:!0,selector:"ng-template[ngbDatepickerContent]",ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:cn,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbDatepickerContent]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class dn{constructor(t,e,n,i){this.i18n=t,this.datepicker=e,this._keyboardService=n,this._service=i}set month(t){this.viewModel=this._service.getMonth(t)}onKeyDown(t){this._keyboardService.processKey(t,this.datepicker)}doSelect(t){t.context.disabled||t.hidden||this.datepicker.onDateSelect(t.date)}}dn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:dn,deps:[{token:Je},{token:(0,y.forwardRef)(()=>pn)},{token:sn},{token:Qe}],target:y["ɵɵFactoryTarget"].Component}),dn.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:dn,isStandalone:!0,selector:"ngb-datepicker-month",inputs:{month:"month"},host:{attributes:{role:"grid"},listeners:{keydown:"onKeyDown($event)"}},ngImport:x,template:'\n\t\t<div *ngIf="viewModel.weekdays.length > 0" class="ngb-dp-week ngb-dp-weekdays" role="row">\n\t\t\t<div *ngIf="datepicker.showWeekNumbers" class="ngb-dp-weekday ngb-dp-showweek small">{{\n\t\t\t\ti18n.getWeekLabel()\n\t\t\t}}</div>\n\t\t\t<div *ngFor="let weekday of viewModel.weekdays" class="ngb-dp-weekday small" role="columnheader">{{\n\t\t\t\tweekday\n\t\t\t}}</div>\n\t\t</div>\n\t\t<ng-template ngFor let-week [ngForOf]="viewModel.weeks">\n\t\t\t<div *ngIf="!week.collapsed" class="ngb-dp-week" role="row">\n\t\t\t\t<div *ngIf="datepicker.showWeekNumbers" class="ngb-dp-week-number small text-muted">{{\n\t\t\t\t\ti18n.getWeekNumerals(week.number)\n\t\t\t\t}}</div>\n\t\t\t\t<div\n\t\t\t\t\t*ngFor="let day of week.days"\n\t\t\t\t\t(click)="doSelect(day); $event.preventDefault()"\n\t\t\t\t\tclass="ngb-dp-day"\n\t\t\t\t\trole="gridcell"\n\t\t\t\t\t[class.disabled]="day.context.disabled"\n\t\t\t\t\t[tabindex]="day.tabindex"\n\t\t\t\t\t[class.hidden]="day.hidden"\n\t\t\t\t\t[class.ngb-dp-today]="day.context.today"\n\t\t\t\t\t[attr.aria-label]="day.ariaLabel"\n\t\t\t\t>\n\t\t\t\t\t<ng-template [ngIf]="!day.hidden">\n\t\t\t\t\t\t<ng-template\n\t\t\t\t\t\t\t[ngTemplateOutlet]="datepicker.dayTemplate"\n\t\t\t\t\t\t\t[ngTemplateOutletContext]="day.context"\n\t\t\t\t\t\t></ng-template>\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-template>\n\t',isInline:!0,styles:['ngb-datepicker-month{display:block}.ngb-dp-weekday,.ngb-dp-week-number{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:var(--bs-info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid var(--bs-border-color);border-radius:0;background-color:var(--bs-light)}.ngb-dp-day,.ngb-dp-weekday,.ngb-dp-week-number{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1}\n'],dependencies:[{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:dn,decorators:[{type:y.Component,args:[{selector:"ngb-datepicker-month",standalone:!0,imports:[_.NgIf,_.NgFor,_.NgTemplateOutlet],host:{role:"grid","(keydown)":"onKeyDown($event)"},encapsulation:y.ViewEncapsulation.None,template:'\n\t\t<div *ngIf="viewModel.weekdays.length > 0" class="ngb-dp-week ngb-dp-weekdays" role="row">\n\t\t\t<div *ngIf="datepicker.showWeekNumbers" class="ngb-dp-weekday ngb-dp-showweek small">{{\n\t\t\t\ti18n.getWeekLabel()\n\t\t\t}}</div>\n\t\t\t<div *ngFor="let weekday of viewModel.weekdays" class="ngb-dp-weekday small" role="columnheader">{{\n\t\t\t\tweekday\n\t\t\t}}</div>\n\t\t</div>\n\t\t<ng-template ngFor let-week [ngForOf]="viewModel.weeks">\n\t\t\t<div *ngIf="!week.collapsed" class="ngb-dp-week" role="row">\n\t\t\t\t<div *ngIf="datepicker.showWeekNumbers" class="ngb-dp-week-number small text-muted">{{\n\t\t\t\t\ti18n.getWeekNumerals(week.number)\n\t\t\t\t}}</div>\n\t\t\t\t<div\n\t\t\t\t\t*ngFor="let day of week.days"\n\t\t\t\t\t(click)="doSelect(day); $event.preventDefault()"\n\t\t\t\t\tclass="ngb-dp-day"\n\t\t\t\t\trole="gridcell"\n\t\t\t\t\t[class.disabled]="day.context.disabled"\n\t\t\t\t\t[tabindex]="day.tabindex"\n\t\t\t\t\t[class.hidden]="day.hidden"\n\t\t\t\t\t[class.ngb-dp-today]="day.context.today"\n\t\t\t\t\t[attr.aria-label]="day.ariaLabel"\n\t\t\t\t>\n\t\t\t\t\t<ng-template [ngIf]="!day.hidden">\n\t\t\t\t\t\t<ng-template\n\t\t\t\t\t\t\t[ngTemplateOutlet]="datepicker.dayTemplate"\n\t\t\t\t\t\t\t[ngTemplateOutletContext]="day.context"\n\t\t\t\t\t\t></ng-template>\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-template>\n\t',styles:['ngb-datepicker-month{display:block}.ngb-dp-weekday,.ngb-dp-week-number{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:var(--bs-info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid var(--bs-border-color);border-radius:0;background-color:var(--bs-light)}.ngb-dp-day,.ngb-dp-weekday,.ngb-dp-week-number{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1}\n']}]}],ctorParameters:function(){return[{type:Je},{type:pn,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>pn)]}]},{type:sn},{type:Qe}]},propDecorators:{month:[{type:y.Input}]}});class pn{constructor(t,e,n,i,s,a,o,r){this._service=t,this._calendar=e,this._i18n=n,this._elementRef=a,this._ngbDateAdapter=o,this._ngZone=r,this.injector=(0,y.inject)(y.Injector),this._controlValue=null,this._destroyed$=new k.Subject,this._publicState={},this.navigate=new y.EventEmitter,this.dateSelect=new y.EventEmitter,this.onChange=t=>{},this.onTouched=()=>{},["contentTemplate","dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showWeekNumbers","startDate","weekdays"].forEach(t=>this[t]=i[t]),t.dateSelect$.pipe((0,D.takeUntil)(this._destroyed$)).subscribe(t=>{this.dateSelect.emit(t)}),t.model$.pipe((0,D.takeUntil)(this._destroyed$)).subscribe(t=>{const e=t.firstDate,n=this.model?this.model.firstDate:null;this._publicState={maxDate:t.maxDate,minDate:t.minDate,firstDate:t.firstDate,lastDate:t.lastDate,focusedDate:t.focusDate,months:t.months.map(t=>t.firstDate)};let i=!1;if(!e.equals(n)&&(this.navigate.emit({current:n?{year:n.year,month:n.month}:null,next:{year:e.year,month:e.month},preventDefault:()=>i=!0}),i&&null!==n))return void this._service.open(n);const a=t.selectedDate,o=t.focusDate,r=this.model?this.model.focusDate:null;this.model=t,He(a,this._controlValue)&&(this._controlValue=a,this.onTouched(),this.onChange(this._ngbDateAdapter.toModel(a))),He(o,r)&&r&&t.focusVisible&&this.focus(),s.markForCheck()})}get state(){return this._publicState}get calendar(){return this._calendar}get i18n(){return this._i18n}focusDate(t){this._service.focus(je.from(t))}focusSelect(){this._service.focusSelect()}focus(){this._ngZone.onStable.asObservable().pipe((0,D.take)(1)).subscribe(()=>{const t=this._elementRef.nativeElement.querySelector('div.ngb-dp-day[tabindex="0"]');t&&t.focus()})}navigateTo(t){this._service.open(je.from(t?t.day?t:Object.assign(Object.assign({},t),{day:1}):null))}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{const t=(0,k.fromEvent)(this._contentEl.nativeElement,"focusin"),e=(0,k.fromEvent)(this._contentEl.nativeElement,"focusout"),{nativeElement:n}=this._elementRef;(0,k.merge)(t,e).pipe((0,D.filter)(({target:t,relatedTarget:e})=>!(Gt(t,"ngb-dp-day")&&Gt(e,"ngb-dp-day")&&n.contains(t)&&n.contains(e))),(0,D.takeUntil)(this._destroyed$)).subscribe(({type:t})=>this._ngZone.run(()=>this._service.set({focusVisible:"focusin"===t})))})}ngOnDestroy(){this._destroyed$.next()}ngOnInit(){if(void 0===this.model){const t={};["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].forEach(e=>t[e]=this[e]),this._service.set(t),this.navigateTo(this.startDate)}this.dayTemplate||(this.dayTemplate=this._defaultDayTemplate)}ngOnChanges(t){const e={};if(["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].filter(e=>e in t).forEach(t=>e[t]=this[t]),this._service.set(e),"startDate"in t){const{currentValue:e,previousValue:n}=t.startDate;ze(n,e)&&this.navigateTo(this.startDate)}}onDateSelect(t){this._service.focus(t),this._service.select(t,{emitEvent:!0})}onNavigateDateSelect(t){this._service.open(t)}onNavigateEvent(t){switch(t){case Fe.PREV:this._service.open(this._calendar.getPrev(this.model.firstDate,"m",1));break;case Fe.NEXT:this._service.open(this._calendar.getNext(this.model.firstDate,"m",1))}}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._service.set({disabled:t})}writeValue(t){this._controlValue=je.from(this._ngbDateAdapter.fromModel(t)),this._service.select(this._controlValue)}}pn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:pn,deps:[{token:Qe},{token:Ze},{token:Je},{token:an},{token:y.ChangeDetectorRef},{token:y.ElementRef},{token:rn},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Component}),pn.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:pn,isStandalone:!0,selector:"ngb-datepicker",inputs:{contentTemplate:"contentTemplate",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",maxDate:"maxDate",minDate:"minDate",navigation:"navigation",outsideDays:"outsideDays",showWeekNumbers:"showWeekNumbers",startDate:"startDate",weekdays:"weekdays"},outputs:{navigate:"navigate",dateSelect:"dateSelect"},host:{properties:{"class.disabled":"model.disabled"}},providers:[{provide:w.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>pn),multi:!0},Qe],queries:[{propertyName:"contentTemplateFromContent",first:!0,predicate:cn,descendants:!0,static:!0}],viewQueries:[{propertyName:"_defaultDayTemplate",first:!0,predicate:["defaultDayTemplate"],descendants:!0,static:!0},{propertyName:"_contentEl",first:!0,predicate:["content"],descendants:!0,static:!0}],exportAs:["ngbDatepicker"],usesOnChanges:!0,ngImport:x,template:'\n\t\t<ng-template\n\t\t\t#defaultDayTemplate\n\t\t\tlet-date="date"\n\t\t\tlet-currentMonth="currentMonth"\n\t\t\tlet-selected="selected"\n\t\t\tlet-disabled="disabled"\n\t\t\tlet-focused="focused"\n\t\t>\n\t\t\t<div\n\t\t\t\tngbDatepickerDayView\n\t\t\t\t[date]="date"\n\t\t\t\t[currentMonth]="currentMonth"\n\t\t\t\t[selected]="selected"\n\t\t\t\t[disabled]="disabled"\n\t\t\t\t[focused]="focused"\n\t\t\t>\n\t\t\t</div>\n\t\t</ng-template>\n\n\t\t<ng-template #defaultContentTemplate>\n\t\t\t<div *ngFor="let month of model.months; let i = index" class="ngb-dp-month">\n\t\t\t\t<div *ngIf="navigation === \'none\' || (displayMonths > 1 && navigation === \'select\')" class="ngb-dp-month-name">\n\t\t\t\t\t{{ i18n.getMonthLabel(month.firstDate) }}\n\t\t\t\t</div>\n\t\t\t\t<ngb-datepicker-month [month]="month.firstDate"></ngb-datepicker-month>\n\t\t\t</div>\n\t\t</ng-template>\n\n\t\t<div class="ngb-dp-header">\n\t\t\t<ngb-datepicker-navigation\n\t\t\t\t*ngIf="navigation !== \'none\'"\n\t\t\t\t[date]="model.firstDate!"\n\t\t\t\t[months]="model.months"\n\t\t\t\t[disabled]="model.disabled"\n\t\t\t\t[showSelect]="model.navigation === \'select\'"\n\t\t\t\t[prevDisabled]="model.prevDisabled"\n\t\t\t\t[nextDisabled]="model.nextDisabled"\n\t\t\t\t[selectBoxes]="model.selectBoxes"\n\t\t\t\t(navigate)="onNavigateEvent($event)"\n\t\t\t\t(select)="onNavigateDateSelect($event)"\n\t\t\t>\n\t\t\t</ngb-datepicker-navigation>\n\t\t</div>\n\n\t\t<div class="ngb-dp-content" [class.ngb-dp-months]="!contentTemplate" #content>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="contentTemplate || contentTemplateFromContent?.templateRef || defaultContentTemplate"\n\t\t\t\t[ngTemplateOutletContext]="{ $implicit: this }"\n\t\t\t\t[ngTemplateOutletInjector]="injector"\n\t\t\t></ng-template>\n\t\t</div>\n\n\t\t<ng-template [ngTemplateOutlet]="footerTemplate"></ng-template>\n\t',isInline:!0,styles:["ngb-datepicker{border:1px solid var(--bs-border-color);border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}ngb-datepicker.disabled .ngb-dp-weekday,ngb-datepicker.disabled .ngb-dp-week-number,ngb-datepicker.disabled .ngb-dp-month-name{color:var(--bs-text-muted)}.ngb-dp-body{z-index:1055}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:var(--bs-light)}.ngb-dp-months{display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:var(--bs-light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}\n"],dependencies:[{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"component",type:tn,selector:"[ngbDatepickerDayView]",inputs:["currentMonth","date","disabled","focused","selected"]},{kind:"component",type:dn,selector:"ngb-datepicker-month",inputs:["month"]},{kind:"component",type:nn,selector:"ngb-datepicker-navigation",inputs:["date","disabled","months","showSelect","prevDisabled","nextDisabled","selectBoxes"],outputs:["navigate","select"]}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:pn,decorators:[{type:y.Component,args:[{exportAs:"ngbDatepicker",selector:"ngb-datepicker",standalone:!0,imports:[_.NgIf,_.NgFor,_.NgTemplateOutlet,tn,dn,nn],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,host:{"[class.disabled]":"model.disabled"},template:'\n\t\t<ng-template\n\t\t\t#defaultDayTemplate\n\t\t\tlet-date="date"\n\t\t\tlet-currentMonth="currentMonth"\n\t\t\tlet-selected="selected"\n\t\t\tlet-disabled="disabled"\n\t\t\tlet-focused="focused"\n\t\t>\n\t\t\t<div\n\t\t\t\tngbDatepickerDayView\n\t\t\t\t[date]="date"\n\t\t\t\t[currentMonth]="currentMonth"\n\t\t\t\t[selected]="selected"\n\t\t\t\t[disabled]="disabled"\n\t\t\t\t[focused]="focused"\n\t\t\t>\n\t\t\t</div>\n\t\t</ng-template>\n\n\t\t<ng-template #defaultContentTemplate>\n\t\t\t<div *ngFor="let month of model.months; let i = index" class="ngb-dp-month">\n\t\t\t\t<div *ngIf="navigation === \'none\' || (displayMonths > 1 && navigation === \'select\')" class="ngb-dp-month-name">\n\t\t\t\t\t{{ i18n.getMonthLabel(month.firstDate) }}\n\t\t\t\t</div>\n\t\t\t\t<ngb-datepicker-month [month]="month.firstDate"></ngb-datepicker-month>\n\t\t\t</div>\n\t\t</ng-template>\n\n\t\t<div class="ngb-dp-header">\n\t\t\t<ngb-datepicker-navigation\n\t\t\t\t*ngIf="navigation !== \'none\'"\n\t\t\t\t[date]="model.firstDate!"\n\t\t\t\t[months]="model.months"\n\t\t\t\t[disabled]="model.disabled"\n\t\t\t\t[showSelect]="model.navigation === \'select\'"\n\t\t\t\t[prevDisabled]="model.prevDisabled"\n\t\t\t\t[nextDisabled]="model.nextDisabled"\n\t\t\t\t[selectBoxes]="model.selectBoxes"\n\t\t\t\t(navigate)="onNavigateEvent($event)"\n\t\t\t\t(select)="onNavigateDateSelect($event)"\n\t\t\t>\n\t\t\t</ngb-datepicker-navigation>\n\t\t</div>\n\n\t\t<div class="ngb-dp-content" [class.ngb-dp-months]="!contentTemplate" #content>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="contentTemplate || contentTemplateFromContent?.templateRef || defaultContentTemplate"\n\t\t\t\t[ngTemplateOutletContext]="{ $implicit: this }"\n\t\t\t\t[ngTemplateOutletInjector]="injector"\n\t\t\t></ng-template>\n\t\t</div>\n\n\t\t<ng-template [ngTemplateOutlet]="footerTemplate"></ng-template>\n\t',providers:[{provide:w.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>pn),multi:!0},Qe],styles:["ngb-datepicker{border:1px solid var(--bs-border-color);border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}ngb-datepicker.disabled .ngb-dp-weekday,ngb-datepicker.disabled .ngb-dp-week-number,ngb-datepicker.disabled .ngb-dp-month-name{color:var(--bs-text-muted)}.ngb-dp-body{z-index:1055}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:var(--bs-light)}.ngb-dp-months{display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:var(--bs-light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}\n"]}]}],ctorParameters:function(){return[{type:Qe},{type:Ze},{type:Je},{type:an},{type:y.ChangeDetectorRef},{type:y.ElementRef},{type:rn},{type:y.NgZone}]},propDecorators:{_defaultDayTemplate:[{type:y.ViewChild,args:["defaultDayTemplate",{static:!0}]}],_contentEl:[{type:y.ViewChild,args:["content",{static:!0}]}],contentTemplate:[{type:y.Input}],contentTemplateFromContent:[{type:y.ContentChild,args:[cn,{static:!0}]}],dayTemplate:[{type:y.Input}],dayTemplateData:[{type:y.Input}],displayMonths:[{type:y.Input}],firstDayOfWeek:[{type:y.Input}],footerTemplate:[{type:y.Input}],markDisabled:[{type:y.Input}],maxDate:[{type:y.Input}],minDate:[{type:y.Input}],navigation:[{type:y.Input}],outsideDays:[{type:y.Input}],showWeekNumbers:[{type:y.Input}],startDate:[{type:y.Input}],weekdays:[{type:y.Input}],navigate:[{type:y.Output}],dateSelect:[{type:y.Output}]}});const hn=(t,e)=>!!e&&e.some(e=>e.contains(t)),un=(t,e)=>!e||null!=function(t,e){return e?void 0===t.closest?null:t.closest(e):null}(t,e),mn="undefined"!=typeof navigator&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent));function gn(t,e,n,i,s,a,o,r){var l;n&&t.runOutsideAngular((l=()=>{const l=(0,k.fromEvent)(e,"keydown").pipe((0,D.takeUntil)(s),(0,D.filter)(t=>t.which===Ve.Escape),(0,D.tap)(t=>t.preventDefault())),c=(0,k.fromEvent)(e,"mousedown").pipe((0,D.map)(t=>{const e=t.target;return 2!==t.button&&!hn(e,o)&&("inside"===n?hn(e,a)&&un(e,r):"outside"===n?!hn(e,a):un(e,r)||!hn(e,a))}),(0,D.takeUntil)(s)),d=(0,k.fromEvent)(e,"mouseup").pipe((0,D.withLatestFrom)(c),(0,D.filter)(([t,e])=>e),(0,D.delay)(0),(0,D.takeUntil)(s));(0,k.race)([l.pipe((0,D.map)(t=>0)),d.pipe((0,D.map)(t=>1))]).subscribe(e=>t.run(()=>i(e)))},mn?()=>setTimeout(()=>l(),100):l))}const fn=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function bn(t){const e=Array.from(t.querySelectorAll(fn)).filter(t=>-1!==t.tabIndex);return[e[0],e[e.length-1]]}const vn=(t,e,n,i=!1)=>{t.runOutsideAngular(()=>{const t=(0,k.fromEvent)(e,"focusin").pipe((0,D.takeUntil)(n),(0,D.map)(t=>t.target));(0,k.fromEvent)(e,"keydown").pipe((0,D.takeUntil)(n),(0,D.filter)(t=>t.which===Ve.Tab),(0,D.withLatestFrom)(t)).subscribe(([t,n])=>{const[i,s]=bn(e);n!==i&&n!==e||!t.shiftKey||(s.focus(),t.preventDefault()),n!==s||t.shiftKey||(i.focus(),t.preventDefault())}),i&&(0,k.fromEvent)(e,"click").pipe((0,D.takeUntil)(n),(0,D.withLatestFrom)(t),(0,D.map)(t=>t[1])).subscribe(t=>t.focus())})};class yn{constructor(t){this._element=t.documentElement}isRTL(){return"rtl"===(this._element.getAttribute("dir")||"").toLowerCase()}}yn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:yn,deps:[{token:_.DOCUMENT}],target:y["ɵɵFactoryTarget"].Injectable}),yn.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:yn,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:yn,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Inject,args:[_.DOCUMENT]}]}]}});const xn=/\s+/,_n=/ +/gi,wn={top:["top"],bottom:["bottom"],start:["left","right"],left:["left"],end:["right","left"],right:["right"],"top-start":["top-start","top-end"],"top-left":["top-start"],"top-end":["top-end","top-start"],"top-right":["top-end"],"bottom-start":["bottom-start","bottom-end"],"bottom-left":["bottom-start"],"bottom-end":["bottom-end","bottom-start"],"bottom-right":["bottom-end"],"start-top":["left-start","right-start"],"left-top":["left-start"],"start-bottom":["left-end","right-end"],"left-bottom":["left-end"],"end-top":["right-start","left-start"],"right-top":["right-start"],"end-bottom":["right-end","left-end"],"right-bottom":["right-end"]},kn=/^left/,Dn=/^right/,In=/^start/,Cn=/^end/;function Mn({placement:t,baseClass:e},n){let i=Array.isArray(t)?t:t.split(xn);let s=i.findIndex(t=>"auto"===t);s>=0&&["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"].forEach(function(t){null==i.find(e=>-1!==e.search("^"+t))&&i.splice(s++,1,t)});const a=i.map(t=>function(t,e){const[n,i]=wn[t];return e&&i||n}(t,n.isRTL()));let o=a.shift();const r={name:"bootstrapClasses",enabled:!!e,phase:"write",fn({state:t}){const n=new RegExp(e+"(-[a-z]+)*","gi"),i=t.elements.popper,s=t.placement;let a=i.className;a=a.replace(n,""),a+=` ${function(t,e){let[n,i]=e.split("-");const s=n.replace(kn,"start").replace(Dn,"end");let a=[s];if(i){let t=i;"left"!==n&&"right"!==n||(t=t.replace(In,"top").replace(Cn,"bottom")),a.push(`${s}-${t}`)}return t&&(a=a.map(e=>`${t}-${e}`)),a.join(" ")}(e,s)}`,a=a.trim().replace(_n," "),i.className=a}};return{placement:o,modifiers:[r,xt,kt,Dt,{enabled:!0,name:"flip",options:{fallbackPlacements:a}},{enabled:!0,name:"preventOverflow",phase:"main",fn:function(){}}]}}function Sn(t){return t}function $n(){const t=(0,y.inject)(yn);let e=null;return{createPopper(n){if(!e){let i=(n.updatePopperOptions||Sn)(Mn(n,t));e=Rt(n.hostElement,n.targetElement,i)}},update(){e&&e.update()},setOptions(n){if(e){let i=(n.updatePopperOptions||Sn)(Mn(n,t));e.setOptions(i)}},destroy(){e&&(e.destroy(),e=null)}}}class Tn extends an{constructor(){super(...arguments),this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=t=>t,this.restoreFocus=!0}}function On(t){return e=>(e.modifiers.push(Pt,{name:"offset",options:{offset:()=>t}}),e)}function En(){return new Pn}Tn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Tn,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),Tn.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Tn,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Tn,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});class Rn{}Rn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Rn,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),Rn.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Rn,providedIn:"root",useFactory:En}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Rn,decorators:[{type:y.Injectable,args:[{providedIn:"root",useFactory:En}]}]});class Pn extends Rn{parse(t){if(null!=t){const e=t.trim().split("-");if(1===e.length&&Lt(e[0]))return{year:Nt(e[0]),month:null,day:null};if(2===e.length&&Lt(e[0])&&Lt(e[1]))return{year:Nt(e[0]),month:Nt(e[1]),day:null};if(3===e.length&&Lt(e[0])&&Lt(e[1])&&Lt(e[2]))return{year:Nt(e[0]),month:Nt(e[1]),day:Nt(e[2])}}return null}format(t){return t?`${t.year}-${Lt(t.month)?Bt(t.month):""}-${Lt(t.day)?Bt(t.day):""}`:""}}Pn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Pn,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),Pn.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Pn}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Pn,decorators:[{type:y.Injectable}]});class Nn{constructor(t,e,n,i,s,a,o,r,l,c){this._parserFormatter=t,this._elRef=e,this._vcRef=n,this._renderer=i,this._ngZone=s,this._calendar=a,this._dateAdapter=o,this._document=r,this._changeDetector=l,this._cRef=null,this._disabled=!1,this._elWithFocus=null,this._model=null,this._destroyCloseHandlers$=new k.Subject,this.dateSelect=new y.EventEmitter,this.navigate=new y.EventEmitter,this.closed=new y.EventEmitter,this._onChange=t=>{},this._onTouched=()=>{},this._validatorChange=()=>{},["autoClose","container","positionTarget","placement","popperOptions"].forEach(t=>this[t]=c[t]),this._positioning=$n()}get disabled(){return this._disabled}set disabled(t){this._disabled=""===t||t&&"false"!==t,this.isOpen()&&this._cRef.instance.setDisabledState(this._disabled)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}registerOnValidatorChange(t){this._validatorChange=t}setDisabledState(t){this.disabled=t}validate(t){const{value:e}=t;if(null!=e){const t=this._fromDateStruct(this._dateAdapter.fromModel(e));if(!t)return{ngbDate:{invalid:e}};if(this.minDate&&t.before(je.from(this.minDate)))return{ngbDate:{minDate:{minDate:this.minDate,actual:e}}};if(this.maxDate&&t.after(je.from(this.maxDate)))return{ngbDate:{maxDate:{maxDate:this.maxDate,actual:e}}}}return null}writeValue(t){this._model=this._fromDateStruct(this._dateAdapter.fromModel(t)),this._writeModelValue(this._model)}manualDateChange(t,e=!1){const n=t!==this._inputValue;n&&(this._inputValue=t,this._model=this._fromDateStruct(this._parserFormatter.parse(t))),!n&&e||this._onChange(this._model?this._dateAdapter.toModel(this._model):""===t?null:t),e&&this._model&&this._writeModelValue(this._model)}isOpen(){return!!this._cRef}open(){if(!this.isOpen()){let t;if(this._cRef=this._vcRef.createComponent(pn),this._applyPopupStyling(this._cRef.location.nativeElement),this._applyDatepickerInputs(this._cRef),this._subscribeForDatepickerOutputs(this._cRef.instance),this._cRef.instance.ngOnInit(),this._cRef.instance.writeValue(this._dateAdapter.toModel(this._model)),this._cRef.instance.registerOnChange(t=>{this.writeValue(t),this._onChange(t),this._onTouched()}),this._cRef.changeDetectorRef.detectChanges(),this._cRef.instance.setDisabledState(this.disabled),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._cRef.location.nativeElement),this._elWithFocus=this._document.activeElement,vn(this._ngZone,this._cRef.location.nativeElement,this.closed,!0),setTimeout(()=>{var t;return null===(t=this._cRef)||void 0===t?void 0:t.instance.focus()}),t=At(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget instanceof HTMLElement?this.positionTarget:this._elRef.nativeElement,this._ngZone.runOutsideAngular(()=>{this._cRef&&(this._positioning.createPopper({hostElement:t,targetElement:this._cRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,updatePopperOptions:t=>this.popperOptions(On([0,2])(t))}),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update()))}),this.positionTarget&&!t)throw new Error("ngbDatepicker could not find element declared in [positionTarget] to position against.");this._setCloseHandlers()}}close(){var t;if(this.isOpen()){this._vcRef.remove(this._vcRef.indexOf(this._cRef.hostView)),this._cRef=null,this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this._destroyCloseHandlers$.next(),this.closed.emit(),this._changeDetector.markForCheck();let e=this._elWithFocus;At(this.restoreFocus)?e=this._document.querySelector(this.restoreFocus):void 0!==this.restoreFocus&&(e=this.restoreFocus),e&&e.focus?e.focus():this._document.body.focus()}}toggle(){this.isOpen()?this.close():this.open()}navigateTo(t){this.isOpen()&&this._cRef.instance.navigateTo(t)}onBlur(){this._onTouched()}onFocus(){this._elWithFocus=this._elRef.nativeElement}ngOnChanges(t){if((t.minDate||t.maxDate)&&(this._validatorChange(),this.isOpen()&&(t.minDate&&(this._cRef.instance.minDate=this.minDate),t.maxDate&&(this._cRef.instance.maxDate=this.maxDate),this._cRef.instance.ngOnChanges(t))),t.datepickerClass){const{currentValue:e,previousValue:n}=t.datepickerClass;this._applyPopupClass(e,n)}t.autoClose&&this.isOpen()&&this._setCloseHandlers()}ngOnDestroy(){this.close()}_applyDatepickerInputs(t){["contentTemplate","dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showNavigation","showWeekNumbers","weekdays"].forEach(e=>{void 0!==this[e]&&t.setInput(e,this[e])}),t.setInput("startDate",this.startDate||this._model)}_applyPopupClass(t,e){var n;const i=null===(n=this._cRef)||void 0===n?void 0:n.location.nativeElement;i&&(t&&this._renderer.addClass(i,t),e&&this._renderer.removeClass(i,e))}_applyPopupStyling(t){this._renderer.addClass(t,"dropdown-menu"),this._renderer.addClass(t,"show"),"body"===this.container&&this._renderer.addClass(t,"ngb-dp-body"),this._applyPopupClass(this.datepickerClass)}_subscribeForDatepickerOutputs(t){t.navigate.subscribe(t=>this.navigate.emit(t)),t.dateSelect.subscribe(t=>{this.dateSelect.emit(t),!0!==this.autoClose&&"inside"!==this.autoClose||this.close()})}_writeModelValue(t){const e=this._parserFormatter.format(t);this._inputValue=e,this._renderer.setProperty(this._elRef.nativeElement,"value",e),this.isOpen()&&(this._cRef.instance.writeValue(this._dateAdapter.toModel(t)),this._onTouched())}_fromDateStruct(t){const e=t?new je(t.year,t.month,t.day):null;return this._calendar.isValid(e)?e:null}_setCloseHandlers(){this._destroyCloseHandlers$.next(),gn(this._ngZone,this._document,this.autoClose,()=>this.close(),this._destroyCloseHandlers$,[],[this._elRef.nativeElement,this._cRef.location.nativeElement])}}Nn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Nn,deps:[{token:Rn},{token:y.ElementRef},{token:y.ViewContainerRef},{token:y.Renderer2},{token:y.NgZone},{token:Ze},{token:rn},{token:_.DOCUMENT},{token:y.ChangeDetectorRef},{token:Tn}],target:y["ɵɵFactoryTarget"].Directive}),Nn.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Nn,isStandalone:!0,selector:"input[ngbDatepicker]",inputs:{autoClose:"autoClose",contentTemplate:"contentTemplate",datepickerClass:"datepickerClass",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",minDate:"minDate",maxDate:"maxDate",navigation:"navigation",outsideDays:"outsideDays",placement:"placement",popperOptions:"popperOptions",restoreFocus:"restoreFocus",showWeekNumbers:"showWeekNumbers",startDate:"startDate",container:"container",positionTarget:"positionTarget",weekdays:"weekdays",disabled:"disabled"},outputs:{dateSelect:"dateSelect",navigate:"navigate",closed:"closed"},host:{listeners:{input:"manualDateChange($event.target.value)",change:"manualDateChange($event.target.value, true)",focus:"onFocus()",blur:"onBlur()"},properties:{disabled:"disabled"}},providers:[{provide:w.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>Nn),multi:!0},{provide:w.NG_VALIDATORS,useExisting:(0,y.forwardRef)(()=>Nn),multi:!0},{provide:an,useExisting:Tn}],exportAs:["ngbDatepicker"],usesOnChanges:!0,ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Nn,decorators:[{type:y.Directive,args:[{selector:"input[ngbDatepicker]",exportAs:"ngbDatepicker",standalone:!0,host:{"(input)":"manualDateChange($event.target.value)","(change)":"manualDateChange($event.target.value, true)","(focus)":"onFocus()","(blur)":"onBlur()","[disabled]":"disabled"},providers:[{provide:w.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>Nn),multi:!0},{provide:w.NG_VALIDATORS,useExisting:(0,y.forwardRef)(()=>Nn),multi:!0},{provide:an,useExisting:Tn}]}]}],ctorParameters:function(){return[{type:Rn},{type:y.ElementRef},{type:y.ViewContainerRef},{type:y.Renderer2},{type:y.NgZone},{type:Ze},{type:rn},{type:void 0,decorators:[{type:y.Inject,args:[_.DOCUMENT]}]},{type:y.ChangeDetectorRef},{type:Tn}]},propDecorators:{autoClose:[{type:y.Input}],contentTemplate:[{type:y.Input}],datepickerClass:[{type:y.Input}],dayTemplate:[{type:y.Input}],dayTemplateData:[{type:y.Input}],displayMonths:[{type:y.Input}],firstDayOfWeek:[{type:y.Input}],footerTemplate:[{type:y.Input}],markDisabled:[{type:y.Input}],minDate:[{type:y.Input}],maxDate:[{type:y.Input}],navigation:[{type:y.Input}],outsideDays:[{type:y.Input}],placement:[{type:y.Input}],popperOptions:[{type:y.Input}],restoreFocus:[{type:y.Input}],showWeekNumbers:[{type:y.Input}],startDate:[{type:y.Input}],container:[{type:y.Input}],positionTarget:[{type:y.Input}],weekdays:[{type:y.Input}],dateSelect:[{type:y.Output}],navigate:[{type:y.Output}],closed:[{type:y.Output}],disabled:[{type:y.Input}]}});class Fn extends Ze{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(t,e="d",n=1){switch(t=new je(t.year,t.month,t.day),e){case"y":return(t=this._setYear(t,t.year+n)).month=1,t.day=1,t;case"m":return(t=this._setMonth(t,t.month+n)).day=1,t;case"d":return this._setDay(t,t.day+n);default:return t}}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){const e=this.toGregorian(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=t[(11-e)%7],i=this.toGregorian(n);i.setDate(i.getDate()+4-(i.getDay()||7));const s=i.getTime(),a=this.toGregorian(new je(n.year,1,1));return Math.floor(Math.round((s-a.getTime())/864e5)/7)+1}getToday(){return this.fromGregorian(new Date)}isValid(t){return null!=t&&Lt(t.year)&&Lt(t.month)&&Lt(t.day)&&!isNaN(this.toGregorian(t).getTime())}_setDay(t,e){e=+e;let n=this.getDaysPerMonth(t.month,t.year);if(e<=0)for(;e<=0;)t=this._setMonth(t,t.month-1),n=this.getDaysPerMonth(t.month,t.year),e+=n;else if(e>n)for(;e>n;)e-=n,t=this._setMonth(t,t.month+1),n=this.getDaysPerMonth(t.month,t.year);return t.day=e,t}_setMonth(t,e){return e=+e,t.year=t.year+Math.floor((e-1)/12),t.month=Math.floor(((e-1)%12+12)%12)+1,t}_setYear(t,e){return t.year=+e,t}}function Vn(t){const e=t.getFullYear();return e%4==0&&e%100!=0||e%400==0}function An(t,e){return t-e*Math.floor(t/e)}Fn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Fn,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),Fn.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Fn}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Fn,decorators:[{type:y.Injectable}]});const Ln=1721425.5,jn=1948439.5;class Hn extends Fn{fromGregorian(t){const e=t.getFullYear(),n=t.getMonth(),i=t.getDate();let s=1721424.5+365*(e-1)+Math.floor((e-1)/4)+-Math.floor((e-1)/100)+Math.floor((e-1)/400)+Math.floor((367*(n+1)-362)/12+(n+1<=2?0:Vn(t)?-1:-2)+i);s=Math.floor(s)+.5;const a=s-jn,o=Math.floor((30*a+10646)/10631);let r=Math.ceil((a-29-(354*((l=o)-1)+Math.floor((3+11*l)/30)))/29.5);var l;r=Math.min(r,11);const c=Math.ceil(a-function(t,e){return Math.ceil(29.5*e)+354*(t-1)+Math.floor((3+11*t)/30)}(o,r))+1;return new je(o,r+1,c)}toGregorian(t){const e=t.year,n=t.month-1,i=t.day+Math.ceil(29.5*n)+354*(e-1)+Math.floor((3+11*e)/30)+jn-1,s=Math.floor(i-.5)+.5,a=s-Ln,o=Math.floor(a/146097),r=An(a,146097),l=Math.floor(r/36524),c=An(r,36524),d=Math.floor(c/1461),p=An(c,1461),h=Math.floor(p/365);let u=400*o+100*l+4*d+h;4!==l&&4!==h&&u++;const m=s-(Ln+365*(u-1)+Math.floor((u-1)/4)-Math.floor((u-1)/100)+Math.floor((u-1)/400)),g=s<1721424.5+365*(u-1)+Math.floor((u-1)/4)-Math.floor((u-1)/100)+Math.floor((u-1)/400)+Math.floor(739/12+(Vn(new Date(u,3,1))?-1:-2)+1)?0:Vn(new Date(u,3,1))?1:2,f=Math.floor((12*(m+g)+373)/367),b=1721424.5+365*(u-1)+Math.floor((u-1)/4)-Math.floor((u-1)/100)+Math.floor((u-1)/400)+Math.floor((367*f-362)/12+(f<=2?0:Vn(new Date(u,f-1,1))?-1:-2)+1);return new Date(u,f-1,s-b+1)}getDaysPerMonth(t,e){e+=Math.floor(t/13);let n=29+(t=(t-1)%12+1)%2;return 12===t&&(14+11*e)%30<11&&n++,n}}Hn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Hn,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),Hn.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Hn}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Hn,decorators:[{type:y.Injectable}]});const zn=new Date(1882,10,12),Bn=new Date(2174,10,25),Gn=1300,Wn=["101010101010","110101010100","111011001001","011011010100","011011101010","001101101100","101010101101","010101010101","011010101001","011110010010","101110101001","010111010100","101011011010","010101011100","110100101101","011010010101","011101001010","101101010100","101101101010","010110101101","010010101110","101001001111","010100010111","011010001011","011010100101","101011010101","001011010110","100101011011","010010011101","101001001101","110100100110","110110010101","010110101100","100110110110","001010111010","101001011011","010100101011","101010010101","011011001010","101011101001","001011110100","100101110110","001010110110","100101010110","101011001010","101110100100","101111010010","010111011001","001011011100","100101101101","010101001101","101010100101","101101010010","101110100101","010110110100","100110110110","010101010111","001010010111","010101001011","011010100011","011101010010","101101100101","010101101010","101010101011","010100101011","110010010101","110101001010","110110100101","010111001010","101011010110","100101010111","010010101011","100101001011","101010100101","101101010010","101101101010","010101110101","001001110110","100010110111","010001011011","010101010101","010110101001","010110110100","100111011010","010011011101","001001101110","100100110110","101010101010","110101010100","110110110010","010111010101","001011011010","100101011011","010010101011","101001010101","101101001001","101101100100","101101110001","010110110100","101010110101","101001010101","110100100101","111010010010","111011001001","011011010100","101011101001","100101101011","010010101011","101010010011","110101001001","110110100100","110110110010","101010111001","010010111010","101001011011","010100101011","101010010101","101100101010","101101010101","010101011100","010010111101","001000111101","100100011101","101010010101","101101001010","101101011010","010101101101","001010110110","100100111011","010010011011","011001010101","011010101001","011101010100","101101101010","010101101100","101010101101","010101010101","101100101001","101110010010","101110101001","010111010100","101011011010","010101011010","101010101011","010110010101","011101001001","011101100100","101110101010","010110110101","001010110110","101001010110","111001001101","101100100101","101101010010","101101101010","010110101101","001010101110","100100101111","010010010111","011001001011","011010100101","011010101100","101011010110","010101011101","010010011101","101001001101","110100010110","110110010101","010110101010","010110110101","001011011010","100101011011","010010101101","010110010101","011011001010","011011100100","101011101010","010011110101","001010110110","100101010110","101010101010","101101010100","101111010010","010111011001","001011101010","100101101101","010010101101","101010010101","101101001010","101110100101","010110110010","100110110101","010011010110","101010010111","010101000111","011010010011","011101001001","101101010101","010101101010","101001101011","010100101011","101010001011","110101000110","110110100011","010111001010","101011010110","010011011011","001001101011","100101001011","101010100101","101101010010","101101101001","010101110101","000101110110","100010110111","001001011011","010100101011","010101100101","010110110100","100111011010","010011101101","000101101101","100010110110","101010100110","110101010010","110110101001","010111010100","101011011010","100101011011","010010101011","011001010011","011100101001","011101100010","101110101001","010110110010","101010110101","010101010101","101100100101","110110010010","111011001001","011011010010","101011101001","010101101011","010010101011","101001010101","110100101001","110101010100","110110101010","100110110101","010010111010","101000111011","010010011011","101001001101","101010101010","101011010101","001011011010","100101011101","010001011110","101000101110","110010011010","110101010101","011010110010","011010111001","010010111010","101001011101","010100101101","101010010101","101101010010","101110101000","101110110100","010110111001","001011011010","100101011010","101101001010","110110100100","111011010001","011011101000","101101101010","010101101101","010100110101","011010010101","110101001010","110110101000","110111010100","011011011010","010101011011","001010011101","011000101011","101100010101","101101001010","101110010101","010110101010","101010101110","100100101110","110010001111","010100100111","011010010101","011010101010","101011010110","010101011101","001010011101"];class Un extends Hn{fromGregorian(t){let e=1,n=0,i=1300,s=function(t,e){const n=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()),i=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),s=Math.abs(n-i);return Math.round(s/864e5)}(t,zn);if(t.getTime()-zn.getTime()>=0&&t.getTime()-Bn.getTime()<=0){let t=1300;for(let a=0;a<Wn.length;a++,t++)for(let o=0;o<12;o++){let r=+Wn[a][o]+29;if(s<=r)return e=s+1,e>r&&(e=1,o++),o>11&&(o=0,t++),n=o,i=t,new je(i,n+1,e);s-=r}return null}return super.fromGregorian(t)}toGregorian(t){const e=t.year,n=t.month-1,i=t.day;let s=new Date(zn),a=i-1;if(e>=Gn&&e<=1600){for(let t=0;t<e-Gn;t++)for(let e=0;e<12;e++)a+=+Wn[t][e]+29;for(let t=0;t<n;t++)a+=+Wn[e-Gn][t]+29;s.setDate(zn.getDate()+a)}else s=super.toGregorian(t);return s}getDaysPerMonth(t,e){return e>=Gn&&e<=1600?+Wn[e-Gn][t-1]+29:super.getDaysPerMonth(t,e)}}function qn(t){let e=Xn(function(t,e,n){let i=Jn(t);return Qn(i.gy,3,i.march)+31*(e-1)-Yn(e,7)*(e-7)+n-1}(t.year,t.month,t.day));return e.setHours(6,30,3,200),e}function Zn(t,e){return e=+e,t.year=t.year+Math.floor((e-1)/12),t.month=Math.floor(((e-1)%12+12)%12)+1,t}function Kn(t,e){return t-e*Math.floor(t/e)}function Yn(t,e){return Math.trunc(t/e)}function Jn(t){let e=[-61,9,38,199,426,686,756,818,1111,1181,1210,1635,2060,2097,2192,2262,2324,2394,2456,3178];const n=e.length,i=t+621;let s,a=-14,o=e[0];if(t<o||t>=e[n-1])throw new Error("Invalid Jalali year "+t);for(let i=1;i<n;i+=1){const n=e[i];if(s=n-o,t<n)break;a=a+8*Yn(s,33)+Yn(Kn(s,33),4),o=n}let r=t-o;a=a+8*Yn(r,33)+Yn(Kn(r,33)+3,4),4===Kn(s,33)&&s-r===4&&(a+=1);const l=20+a-(Yn(i,4)-Yn(3*(Yn(i,100)+1),4)-150);s-r<6&&(r=r-s+33*Yn(s+4,33));let c=Kn(Kn(r+1,33)-1,4);return-1===c&&(c=4),{leap:c,gy:i,march:l}}function Xn(t){let e=4*t+139361631;e=e+4*Yn(3*Yn(4*t+183187720,146097),4)-3908;const n=5*Yn(Kn(e,1461),4)+308,i=Yn(Kn(n,153),5)+1,s=Kn(Yn(n,153),12)+1,a=Yn(e,1461)-100100+Yn(8-s,6);return new Date(a,s-1,i)}function Qn(t,e,n){let i=Yn(1461*(t+Yn(e-8,6)+100100),4)+Yn(153*Kn(e+9,12)+2,5)+n-34840408;return i=i-Yn(3*Yn(t+100100+Yn(e-8,6),100),4)+752,i}function ti(t,e){return t<=6?31:t<=11||0===Jn(e).leap?30:29}Un.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Un,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),Un.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Un}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Un,decorators:[{type:y.Injectable}]});class ei extends Ze{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(t,e="d",n=1){switch(t=new je(t.year,t.month,t.day),e){case"y":return(t=function(t,e){return t.year=+e,t}(t,t.year+n)).month=1,t.day=1,t;case"m":return(t=Zn(t,t.month+n)).day=1,t;case"d":return function(t,e){let n=ti(t.month,t.year);if(e<=0)for(;e<=0;)n=ti((t=Zn(t,t.month-1)).month,t.year),e+=n;else if(e>n)for(;e>n;)e-=n,n=ti((t=Zn(t,t.month+1)).month,t.year);return t.day=e,t}(t,t.day+n);default:return t}}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){const e=qn(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=t[(11-e)%7],i=qn(n);i.setDate(i.getDate()+4-(i.getDay()||7));const s=i.getTime(),a=qn(new je(n.year,1,1));return Math.floor(Math.round((s-a.getTime())/864e5)/7)+1}getToday(){return function(t){let e,n,i,s=Xn(t).getFullYear(),a=s-621,o=Jn(a);if(i=t-Qn(s,3,o.march),i>=0){if(i<=185)return n=1+Yn(i,31),e=Kn(i,31)+1,new je(a,n,e);i-=186}else a-=1,i+=179,1===o.leap&&(i+=1);return n=7+Yn(i,30),e=Kn(i,30)+1,new je(a,n,e)}(Qn((t=new Date).getFullYear(),t.getMonth()+1,t.getDate()));var t}isValid(t){return null!=t&&jt(t.year)&&jt(t.month)&&jt(t.day)&&!isNaN(qn(t).getTime())}}ei.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ei,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),ei.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ei}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ei,decorators:[{type:y.Injectable}]});const ni=25920;function ii(t){return t%4==0&&t%100!=0||t%400==0}function si(t){let e=Math.floor((235*t-234)/19),n=13753*e+12084,i=29*e+Math.floor(n/ni),s=n%ni,a=i%7;return 2!==a&&4!==a&&6!==a||(i++,a=i%7),1===a&&s>16404&&!li(t)?i+=2:0===a&&s>23269&&li(t-1)&&i++,i}function ai(t,e){let n=[31,28,31,30,31,30,31,31,30,31,30,31];return ii(e)&&n[1]++,n[t-1]}function oi(t){return li(t)?13:12}function ri(t){return si(t+1)-si(t)}function li(t){if(null!=t){let e=(12*t+17)%19;return e>=(e<0?-7:12)}return!1}function ci(t,e){let n=si(e+1)-si(e),i=(n<=380?n:n-30)-353,s=li(e)?[30,29,29,29,30,30,29,30,29,30,29,30,29]:[30,29,29,29,30,29,30,29,30,29,30,29];return i>0&&s[2]++,i>1&&s[1]++,s[t-1]}function di(t){let e=0;for(let n=1;n<t.month;n++)e+=ci(n,t.year);return e+t.day}function pi(t){const e=new Date(t),n=e.getFullYear(),i=e.getMonth(),s=e.getDate();let a=1721424.5+365*(n-1)+Math.floor((n-1)/4)-Math.floor((n-1)/100)+Math.floor((n-1)/400)+Math.floor((367*(i+1)-362)/12+(i+1<=2?0:ii(n)?-1:-2)+s);a=Math.floor(a+.5);let o=a-347997,r=Math.floor(o*ni/765433),l=Math.floor((19*r+234)/235)+1,c=si(l),d=o-c;for(;d<1;)l--,c=si(l),d=o-c;let p=1,h=d;for(;h>ci(p,l);)h-=ci(p,l),p++;return new je(l,p,h)}function hi(t){const e=t.year,n=t.month,i=t.day;let s=si(e);for(let t=1;t<n;t++)s+=ci(t,e);s+=i;let a=s-2092591,o=a>=0;o||(a=-a);let r=1970,l=1,c=1;for(;a>0;)o?a>=(ii(r)?366:365)?(a-=ii(r)?366:365,r++):a>=ai(l,r)?(a-=ai(l,r),l++):(c+=a,a=0):a>=(ii(r-1)?366:365)?(a-=ii(r-1)?366:365,r--):(l>1?l--:(l=12,r--),a>=ai(l,r)?a-=ai(l,r):(c=ai(l,r)-a+1,a=0));return new Date(r,l-1,c)}function ui(t){if(!t)return"";const e=["","א","ב","ג","ד","ה","ו","ז","ח","ט"],n=["י","יא","יב","יג","יד","טו","טז","יז","יח","יט"],i=["","","כ","ל","מ","נ","ס","ע","פ","צ"],s=["","ק","ר","ש","ת","תק","תר","תש","תת","תתק"],a=["","א","ב","בא","בב","ה","הא","הב","הבא","הבב"];let o=0,r=[],l=0;for(;t>0;){let c=t%10;if(0===l)o=c;else if(1===l)1!==c?r.unshift(i[c],e[o]):r.unshift(n[o]);else{if(2!==l){5!==c&&r.unshift(a[c],"׳"," ");break}r.unshift(s[c])}t=Math.floor(t/10),0===l&&0===t&&r.unshift(e[c]),l++}return r=r.join("").split(""),1===r.length?r.push("׳"):r.length>1&&r.splice(r.length-1,0,"״"),r.join("")}class mi extends Ze{getDaysPerWeek(){return 7}getMonths(t){return t&&li(t)?[1,2,3,4,5,6,7,8,9,10,11,12,13]:[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}isValid(t){if(null!=t){let e=Lt(t.year)&&Lt(t.month)&&Lt(t.day);return e=e&&t.month>0&&t.month<=(li(t.year)?13:12),e=e&&t.day>0&&t.day<=ci(t.month,t.year),e&&!isNaN(hi(t).getTime())}return!1}getNext(t,e="d",n=1){switch(t=new je(t.year,t.month,t.day),e){case"y":return t.year+=n,t.month=1,t.day=1,t;case"m":return(t=function(t,e){let n=e>=0;for(n||(e=-e);e>0;)n?e>oi(t.year)-t.month?(e-=oi(t.year)-t.month+1,t.year++,t.month=1):(t.month+=e,e=0):e>=t.month?(t.year--,e-=t.month,t.month=oi(t.year)):(t.month-=e,e=0);return t}(t,n)).day=1,t;case"d":return function(t,e){let n=e>=0;for(n||(e=-e);e>0;)n?e>ri(t.year)-di(t)?(e-=ri(t.year)-di(t)+1,t.year++,t.month=1,t.day=1):e>ci(t.month,t.year)-t.day?(e-=ci(t.month,t.year)-t.day+1,t.month++,t.day=1):(t.day+=e,e=0):e>=t.day?(e-=t.day,t.month--,0===t.month&&(t.year--,t.month=oi(t.year)),t.day=ci(t.month,t.year)):(t.day-=e,e=0);return t}(t,n);default:return t}}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){const e=hi(t).getDay();return 0===e?7:e}getWeekNumber(t,e){const n=t[t.length-1];return Math.ceil(di(n)/7)}getToday(){return pi(new Date)}toGregorian(t){return We(hi(t))}fromGregorian(t){return pi(Ue(t))}}mi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:mi,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),mi.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:mi}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:mi,decorators:[{type:y.Injectable}]});const gi=["שני","שלישי","רביעי","חמישי","שישי","שבת","ראשון"],fi=["תשרי","חשון","כסלו","טבת","שבט","אדר","ניסן","אייר","סיון","תמוז","אב","אלול"],bi=["תשרי","חשון","כסלו","טבת","שבט","אדר א׳","אדר ב׳","ניסן","אייר","סיון","תמוז","אב","אלול"];class vi extends Je{getMonthShortName(t,e){return this.getMonthFullName(t,e)}getMonthFullName(t,e){return li(e)?bi[t-1]||"":fi[t-1]||""}getWeekdayLabel(t,e){return gi[t-1]||""}getDayAriaLabel(t){return`${ui(t.day)} ${this.getMonthFullName(t.month,t.year)} ${ui(t.year)}`}getDayNumerals(t){return ui(t.day)}getWeekNumerals(t){return ui(t)}getYearNumerals(t){return ui(t)}}function yi(t){return new Date(t.year-543,t.month-1,t.day)}function xi(t){return new je(t.getFullYear()+543,t.getMonth()+1,t.getDate())}vi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:vi,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),vi.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:vi}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:vi,decorators:[{type:y.Injectable}]});class _i extends Ke{getToday(){return xi(new Date)}getNext(t,e="d",n=1){let i=yi(t),s=!0,a=i.getMonth();switch(e){case"y":i.setFullYear(i.getFullYear()+n);break;case"m":a+=n,i.setMonth(a),a%=12,a<0&&(a+=12);break;case"d":i.setDate(i.getDate()+n),s=!1;break;default:return t}return s&&i.getMonth()!==a&&i.setDate(0),xi(i)}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){let e=yi(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=yi(t[(11-e)%7]);n.setDate(n.getDate()+4-(n.getDay()||7));const i=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((i-n.getTime())/864e5)/7)+1}isValid(t){if(!(t&&jt(t.year)&&jt(t.month)&&jt(t.day)))return!1;if(0===t.year)return!1;const e=yi(t);return!isNaN(e.getTime())&&e.getFullYear()===t.year-543&&e.getMonth()+1===t.month&&e.getDate()===t.day}}_i.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:_i,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),_i.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:_i}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:_i,decorators:[{type:y.Injectable}]});class wi extends rn{fromModel(t){return t instanceof Date&&!isNaN(t.getTime())?this._fromNativeDate(t):null}toModel(t){return t&&jt(t.year)&&jt(t.month)&&jt(t.day)?this._toNativeDate(t):null}_fromNativeDate(t){return{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}}_toNativeDate(t){const e=new Date(t.year,t.month-1,t.day,12);return e.setFullYear(t.year),e}}wi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:wi,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),wi.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:wi}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:wi,decorators:[{type:y.Injectable}]});class ki extends wi{_fromNativeDate(t){return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate()}}_toNativeDate(t){const e=new Date(Date.UTC(t.year,t.month-1,t.day));return e.setUTCFullYear(t.year),e}}ki.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ki,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),ki.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ki}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ki,decorators:[{type:y.Injectable}]});const Di=[pn,cn,Nn,dn];class Ii{}Ii.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ii,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Ii.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:x,type:Ii,imports:[pn,cn,Nn,dn],exports:[pn,cn,Nn,dn]}),Ii.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ii,imports:[pn,dn]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ii,decorators:[{type:y.NgModule,args:[{exports:Di,imports:Di}]}]});class Ci{constructor(){this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=t=>t}}Ci.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ci,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),Ci.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ci,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ci,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});class Mi{}Mi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Mi,deps:[],target:y["ɵɵFactoryTarget"].Directive}),Mi.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Mi,isStandalone:!0,selector:".navbar",ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Mi,decorators:[{type:y.Directive,args:[{selector:".navbar",standalone:!0}]}]});class Si{constructor(t,e){this.elementRef=t,this._renderer=e,this._disabled=!1}set disabled(t){this._disabled=""===t||!0===t,this._renderer.setProperty(this.elementRef.nativeElement,"disabled",this._disabled)}get disabled(){return this._disabled}}Si.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Si,deps:[{token:y.ElementRef},{token:y.Renderer2}],target:y["ɵɵFactoryTarget"].Directive}),Si.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Si,isStandalone:!0,selector:"[ngbDropdownItem]",inputs:{disabled:"disabled"},host:{properties:{"class.disabled":"disabled",tabIndex:"disabled ? -1 : 0"},classAttribute:"dropdown-item"},ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Si,decorators:[{type:y.Directive,args:[{selector:"[ngbDropdownItem]",standalone:!0,host:{class:"dropdown-item","[class.disabled]":"disabled","[tabIndex]":"disabled ? -1 : 0"}}]}],ctorParameters:function(){return[{type:y.ElementRef},{type:y.Renderer2}]},propDecorators:{disabled:[{type:y.Input}]}});class $i{constructor(t,e){this.dropdown=t,this.placement="bottom",this.isOpen=!1,this.nativeElement=e.nativeElement}}$i.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:$i,deps:[{token:(0,y.forwardRef)(()=>Ei)},{token:y.ElementRef}],target:y["ɵɵFactoryTarget"].Directive}),$i.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:$i,isStandalone:!0,selector:"[ngbDropdownMenu]",host:{listeners:{"keydown.ArrowUp":"dropdown.onKeyDown($event)","keydown.ArrowDown":"dropdown.onKeyDown($event)","keydown.Home":"dropdown.onKeyDown($event)","keydown.End":"dropdown.onKeyDown($event)","keydown.Enter":"dropdown.onKeyDown($event)","keydown.Space":"dropdown.onKeyDown($event)","keydown.Tab":"dropdown.onKeyDown($event)","keydown.Shift.Tab":"dropdown.onKeyDown($event)"},properties:{"class.dropdown-menu":"true","class.show":"dropdown.isOpen()"}},queries:[{propertyName:"menuItems",predicate:Si}],ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:$i,decorators:[{type:y.Directive,args:[{selector:"[ngbDropdownMenu]",standalone:!0,host:{"[class.dropdown-menu]":"true","[class.show]":"dropdown.isOpen()","(keydown.ArrowUp)":"dropdown.onKeyDown($event)","(keydown.ArrowDown)":"dropdown.onKeyDown($event)","(keydown.Home)":"dropdown.onKeyDown($event)","(keydown.End)":"dropdown.onKeyDown($event)","(keydown.Enter)":"dropdown.onKeyDown($event)","(keydown.Space)":"dropdown.onKeyDown($event)","(keydown.Tab)":"dropdown.onKeyDown($event)","(keydown.Shift.Tab)":"dropdown.onKeyDown($event)"}}]}],ctorParameters:function(){return[{type:Ei,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>Ei)]}]},{type:y.ElementRef}]},propDecorators:{menuItems:[{type:y.ContentChildren,args:[Si]}]}});class Ti{constructor(t,e){this.dropdown=t,this.nativeElement=e.nativeElement}}Ti.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ti,deps:[{token:(0,y.forwardRef)(()=>Ei)},{token:y.ElementRef}],target:y["ɵɵFactoryTarget"].Directive}),Ti.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ti,isStandalone:!0,selector:"[ngbDropdownAnchor]",host:{properties:{"attr.aria-expanded":"dropdown.isOpen()"},classAttribute:"dropdown-toggle"},ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ti,decorators:[{type:y.Directive,args:[{selector:"[ngbDropdownAnchor]",standalone:!0,host:{class:"dropdown-toggle","[attr.aria-expanded]":"dropdown.isOpen()"}}]}],ctorParameters:function(){return[{type:Ei,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>Ei)]}]},{type:y.ElementRef}]}});class Oi extends Ti{constructor(t,e){super(t,e)}}Oi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Oi,deps:[{token:(0,y.forwardRef)(()=>Ei)},{token:y.ElementRef}],target:y["ɵɵFactoryTarget"].Directive}),Oi.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Oi,isStandalone:!0,selector:"[ngbDropdownToggle]",host:{listeners:{click:"dropdown.toggle()","keydown.ArrowUp":"dropdown.onKeyDown($event)","keydown.ArrowDown":"dropdown.onKeyDown($event)","keydown.Home":"dropdown.onKeyDown($event)","keydown.End":"dropdown.onKeyDown($event)","keydown.Tab":"dropdown.onKeyDown($event)","keydown.Shift.Tab":"dropdown.onKeyDown($event)"},properties:{"attr.aria-expanded":"dropdown.isOpen()"},classAttribute:"dropdown-toggle"},providers:[{provide:Ti,useExisting:(0,y.forwardRef)(()=>Oi)}],usesInheritance:!0,ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Oi,decorators:[{type:y.Directive,args:[{selector:"[ngbDropdownToggle]",standalone:!0,host:{class:"dropdown-toggle","[attr.aria-expanded]":"dropdown.isOpen()","(click)":"dropdown.toggle()","(keydown.ArrowUp)":"dropdown.onKeyDown($event)","(keydown.ArrowDown)":"dropdown.onKeyDown($event)","(keydown.Home)":"dropdown.onKeyDown($event)","(keydown.End)":"dropdown.onKeyDown($event)","(keydown.Tab)":"dropdown.onKeyDown($event)","(keydown.Shift.Tab)":"dropdown.onKeyDown($event)"},providers:[{provide:Ti,useExisting:(0,y.forwardRef)(()=>Oi)}]}]}],ctorParameters:function(){return[{type:Ei,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>Ei)]}]},{type:y.ElementRef}]}});class Ei{constructor(t,e,n,i,s,a){this._changeDetector=t,this._document=n,this._ngZone=i,this._elementRef=s,this._renderer=a,this._destroyCloseHandlers$=new k.Subject,this._bodyContainer=null,this._open=!1,this.openChange=new y.EventEmitter,this.placement=e.placement,this.popperOptions=e.popperOptions,this.container=e.container,this.autoClose=e.autoClose,this._positioning=$n(),this.display=this._elementRef.nativeElement.closest(".navbar")?"static":"dynamic"}ngAfterContentInit(){this._ngZone.onStable.pipe((0,D.take)(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(t){if(t.container&&this._open&&this._applyContainer(this.container),t.placement&&!t.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:"body"===this.container}),this._applyPlacementClasses()),t.dropdownClass){const{currentValue:e,previousValue:n}=t.dropdownClass;this._applyCustomDropdownClass(e,n)}t.autoClose&&this._open&&(this.autoClose=t.autoClose.currentValue,this._setCloseHandlers())}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&(this._anchor.nativeElement.focus(),"dynamic"===this.display&&this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:"body"===this.container,updatePopperOptions:t=>this.popperOptions(On([0,2])(t))}),this._applyPlacementClasses(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positionMenu())})))}_setCloseHandlers(){this._destroyCloseHandlers$.next(),gn(this._ngZone,this._document,this.autoClose,t=>{this.close(),0===t&&this._anchor.nativeElement.focus()},this._destroyCloseHandlers$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){var t;this._open&&(this._open=!1,this._resetContainer(),this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this._destroyCloseHandlers$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this.close()}onKeyDown(t){const e=t.which,n=this._getMenuElements();let i=-1,s=null;const a=this._isEventFromToggle(t);if(!a&&n.length&&n.forEach((e,n)=>{e.contains(t.target)&&(s=e),e===this._document.activeElement&&(i=n)}),e!==Ve.Space&&e!==Ve.Enter){if(e!==Ve.Tab){if(a||s){if(this.open(),n.length){switch(e){case Ve.ArrowDown:i=Math.min(i+1,n.length-1);break;case Ve.ArrowUp:if(this._isDropup()&&-1===i){i=n.length-1;break}i=Math.max(i-1,0);break;case Ve.Home:i=0;break;case Ve.End:i=n.length-1}n[i].focus()}t.preventDefault()}}else if(t.target&&this.isOpen()&&this.autoClose){if(this._anchor.nativeElement===t.target)return void("body"!==this.container||t.shiftKey?t.shiftKey&&this.close():(this._renderer.setAttribute(this._menu.nativeElement,"tabindex","0"),this._menu.nativeElement.focus(),this._renderer.removeAttribute(this._menu.nativeElement,"tabindex")));if("body"===this.container){const e=this._menu.nativeElement.querySelectorAll(fn);t.shiftKey&&t.target===e[0]?(this._anchor.nativeElement.focus(),t.preventDefault()):t.shiftKey||t.target!==e[e.length-1]||(this._anchor.nativeElement.focus(),this.close())}else(0,k.fromEvent)(t.target,"focusout").pipe((0,D.take)(1)).subscribe(({relatedTarget:t})=>{this._elementRef.nativeElement.contains(t)||this.close()})}}else!s||!0!==this.autoClose&&"inside"!==this.autoClose||(0,k.fromEvent)(s,"click").pipe((0,D.take)(1)).subscribe(()=>this.close())}_isDropup(){return this._elementRef.nativeElement.classList.contains("dropup")}_isEventFromToggle(t){return this._anchor.nativeElement.contains(t.target)}_getMenuElements(){const t=this._menu;return null==t?[]:t.menuItems.filter(t=>!t.disabled).map(t=>t.elementRef.nativeElement)}_positionMenu(){const t=this._menu;this.isOpen()&&t&&("dynamic"===this.display?(this._positioning.update(),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(t){return Array.isArray(t)?t[0]:t.split(" ")[0]}_resetContainer(){const t=this._renderer;if(this._menu){const e=this._elementRef.nativeElement,n=this._menu.nativeElement;t.appendChild(e,n)}this._bodyContainer&&(t.removeChild(this._document.body,this._bodyContainer),this._bodyContainer=null)}_applyContainer(t=null){if(this._resetContainer(),"body"===t){const t=this._renderer,e=this._menu.nativeElement,n=this._bodyContainer=this._bodyContainer||t.createElement("div");t.setStyle(n,"position","absolute"),t.setStyle(e,"position","static"),t.setStyle(n,"z-index","1055"),t.appendChild(n,e),t.appendChild(this._document.body,n)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(t,e){const n="body"===this.container?this._bodyContainer:this._elementRef.nativeElement;n&&(e&&this._renderer.removeClass(n,e),t&&this._renderer.addClass(n,t))}_applyPlacementClasses(t){const e=this._menu;if(e){t||(t=this._getFirstPlacement(this.placement));const n=this._renderer,i=this._elementRef.nativeElement;n.removeClass(i,"dropup"),n.removeClass(i,"dropdown");const{nativeElement:s}=e;"static"===this.display?(e.placement=null,n.setAttribute(s,"data-bs-popper","static")):(e.placement=t,n.removeAttribute(s,"data-bs-popper"));const a=-1!==t.search("^top")?"dropup":"dropdown";n.addClass(i,a);const o=this._bodyContainer;o&&(n.removeClass(o,"dropup"),n.removeClass(o,"dropdown"),n.addClass(o,a))}}}Ei.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ei,deps:[{token:y.ChangeDetectorRef},{token:Ci},{token:_.DOCUMENT},{token:y.NgZone},{token:y.ElementRef},{token:y.Renderer2}],target:y["ɵɵFactoryTarget"].Directive}),Ei.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ei,isStandalone:!0,selector:"[ngbDropdown]",inputs:{autoClose:"autoClose",dropdownClass:"dropdownClass",_open:["open","_open"],placement:"placement",popperOptions:"popperOptions",container:"container",display:"display"},outputs:{openChange:"openChange"},host:{properties:{"class.show":"isOpen()"}},queries:[{propertyName:"_menu",first:!0,predicate:$i,descendants:!0},{propertyName:"_anchor",first:!0,predicate:Ti,descendants:!0}],exportAs:["ngbDropdown"],usesOnChanges:!0,ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ei,decorators:[{type:y.Directive,args:[{selector:"[ngbDropdown]",exportAs:"ngbDropdown",standalone:!0,host:{"[class.show]":"isOpen()"}}]}],ctorParameters:function(){return[{type:y.ChangeDetectorRef},{type:Ci},{type:void 0,decorators:[{type:y.Inject,args:[_.DOCUMENT]}]},{type:y.NgZone},{type:y.ElementRef},{type:y.Renderer2}]},propDecorators:{_menu:[{type:y.ContentChild,args:[$i,{static:!1}]}],_anchor:[{type:y.ContentChild,args:[Ti,{static:!1}]}],autoClose:[{type:y.Input}],dropdownClass:[{type:y.Input}],_open:[{type:y.Input,args:["open"]}],placement:[{type:y.Input}],popperOptions:[{type:y.Input}],container:[{type:y.Input}],display:[{type:y.Input}],openChange:[{type:y.Output}]}});const Ri=[Ei,Ti,Oi,$i,Si];class Pi{}Pi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Pi,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Pi.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:x,type:Pi,imports:[Ei,Ti,Oi,$i,Si],exports:[Ei,Ti,Oi,$i,Si]}),Pi.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Pi}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Pi,decorators:[{type:y.NgModule,args:[{imports:Ri,exports:Ri}]}]});class Ni{constructor(t,e,n){this.nodes=t,this.viewRef=e,this.componentRef=n}}class Fi{constructor(t,e,n,i,s,a){this._componentType=t,this._injector=e,this._viewContainerRef=n,this._renderer=i,this._ngZone=s,this._applicationRef=a,this._windowRef=null,this._contentRef=null}open(t,e,n=!1){this._windowRef||(this._contentRef=this._getContentRef(t,e),this._windowRef=this._viewContainerRef.createComponent(this._componentType,{injector:this._injector,projectableNodes:this._contentRef.nodes}));const{nativeElement:i}=this._windowRef.location,s=this._ngZone.onStable.pipe((0,D.take)(1),(0,D.mergeMap)(()=>Jt(this._ngZone,i,({classList:t})=>t.add("show"),{animation:n,runningTransition:"continue"})));return{windowRef:this._windowRef,transition$:s}}close(t=!1){return this._windowRef?Jt(this._ngZone,this._windowRef.location.nativeElement,({classList:t})=>t.remove("show"),{animation:t,runningTransition:"stop"}).pipe((0,D.tap)(()=>{var t;this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null),(null===(t=this._contentRef)||void 0===t?void 0:t.viewRef)&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null)})):(0,k.of)(void 0)}_getContentRef(t,e){if(t){if(t instanceof y.TemplateRef){const n=t.createEmbeddedView(e);return this._applicationRef.attachView(n),new Ni([n.rootNodes],n)}return new Ni([[this._renderer.createText(`${t}`)]])}return new Ni([])}}class Vi{constructor(t,e){this._el=t,this._zone=e}ngOnInit(){this._zone.onStable.asObservable().pipe((0,D.take)(1)).subscribe(()=>{Jt(this._zone,this._el.nativeElement,(t,e)=>{e&&Wt(t),t.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Jt(this._zone,this._el.nativeElement,({classList:t})=>t.remove("show"),{animation:this.animation,runningTransition:"stop"})}}Vi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Vi,deps:[{token:y.ElementRef},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Component}),Vi.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Vi,isStandalone:!0,selector:"ngb-modal-backdrop",inputs:{animation:"animation",backdropClass:"backdropClass"},host:{properties:{class:'"modal-backdrop" + (backdropClass ? " " + backdropClass : "")',"class.show":"!animation","class.fade":"animation"},styleAttribute:"z-index: 1055"},ngImport:x,template:"",isInline:!0,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Vi,decorators:[{type:y.Component,args:[{selector:"ngb-modal-backdrop",standalone:!0,encapsulation:y.ViewEncapsulation.None,template:"",host:{"[class]":'"modal-backdrop" + (backdropClass ? " " + backdropClass : "")',"[class.show]":"!animation","[class.fade]":"animation",style:"z-index: 1055"}}]}],ctorParameters:function(){return[{type:y.ElementRef},{type:y.NgZone}]},propDecorators:{animation:[{type:y.Input}],backdropClass:[{type:y.Input}]}});class Ai{update(t){}close(t){}dismiss(t){}}const Li=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","scrollable","size","windowClass","modalDialogClass"],ji=["animation","backdropClass"];class Hi{constructor(t,e,n,i){this._windowCmptRef=t,this._contentRef=e,this._backdropCmptRef=n,this._beforeDismiss=i,this._closed=new k.Subject,this._dismissed=new k.Subject,this._hidden=new k.Subject,t.instance.dismissEvent.subscribe(t=>{this.dismiss(t)}),this.result=new Promise((t,e)=>{this._resolve=t,this._reject=e}),this.result.then(null,()=>{})}_applyWindowOptions(t,e){Li.forEach(n=>{Ht(e[n])&&(t[n]=e[n])})}_applyBackdropOptions(t,e){ji.forEach(n=>{Ht(e[n])&&(t[n]=e[n])})}update(t){this._applyWindowOptions(this._windowCmptRef.instance,t),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._applyBackdropOptions(this._backdropCmptRef.instance,t)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe((0,D.takeUntil)(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe((0,D.takeUntil)(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(t){this._windowCmptRef&&(this._closed.next(t),this._resolve(t),this._removeModalElements())}_dismiss(t){this._dismissed.next(t),this._reject(t),this._removeModalElements()}dismiss(t){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();zt(e)?e.then(e=>{!1!==e&&this._dismiss(t)},()=>{}):!1!==e&&this._dismiss(t)}else this._dismiss(t)}_removeModalElements(){const t=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():(0,k.of)(void 0);t.subscribe(()=>{const{nativeElement:t}=this._windowCmptRef.location;t.parentNode.removeChild(t),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:t}=this._backdropCmptRef.location;t.parentNode.removeChild(t),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),(0,k.zip)(t,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var zi;!function(t){t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC"}(zi||(zi={}));class Bi{constructor(t,e,n){this._document=t,this._elRef=e,this._zone=n,this._closed$=new k.Subject,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new y.EventEmitter,this.shown=new k.Subject,this.hidden=new k.Subject}get fullscreenClass(){return!0===this.fullscreen?" modal-fullscreen":At(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(t){this.dismissEvent.emit(t)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe((0,D.take)(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:t}=this._elRef,e={animation:this.animation,runningTransition:"stop"},n=Jt(this._zone,t,()=>t.classList.remove("show"),e),i=Jt(this._zone,this._dialogEl.nativeElement,()=>{},e),s=(0,k.zip)(n,i);return s.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),s}_show(){const t={animation:this.animation,runningTransition:"continue"},e=Jt(this._zone,this._elRef.nativeElement,(t,e)=>{e&&Wt(t),t.classList.add("show")},t),n=Jt(this._zone,this._dialogEl.nativeElement,()=>{},t);(0,k.zip)(e,n).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:t}=this._elRef;this._zone.runOutsideAngular(()=>{(0,k.fromEvent)(t,"keydown").pipe((0,D.takeUntil)(this._closed$),(0,D.filter)(t=>t.which===Ve.Escape)).subscribe(t=>{this.keyboard?requestAnimationFrame(()=>{t.defaultPrevented||this._zone.run(()=>this.dismiss(zi.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let e=!1;(0,k.fromEvent)(this._dialogEl.nativeElement,"mousedown").pipe((0,D.takeUntil)(this._closed$),(0,D.tap)(()=>e=!1),(0,D.switchMap)(()=>(0,k.fromEvent)(t,"mouseup").pipe((0,D.takeUntil)(this._closed$),(0,D.take)(1))),(0,D.filter)(({target:e})=>t===e)).subscribe(()=>{e=!0}),(0,k.fromEvent)(t,"click").pipe((0,D.takeUntil)(this._closed$)).subscribe(({target:n})=>{t===n&&("static"===this.backdrop?this._bumpBackdrop():!0!==this.backdrop||e||this._zone.run(()=>this.dismiss(zi.BACKDROP_CLICK))),e=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:t}=this._elRef;if(!t.contains(document.activeElement)){const e=t.querySelector("[ngbAutofocus]"),n=bn(t)[0];(e||n||t).focus()}}_restoreFocus(){const t=this._document.body,e=this._elWithFocus;let n;n=e&&e.focus&&t.contains(e)?e:t,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&Jt(this._zone,this._elRef.nativeElement,({classList:t})=>(t.add("modal-static"),()=>t.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}Bi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Bi,deps:[{token:_.DOCUMENT},{token:y.ElementRef},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Component}),Bi.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Bi,isStandalone:!0,selector:"ngb-modal-window",inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},host:{attributes:{role:"dialog",tabindex:"-1"},properties:{class:'"modal d-block" + (windowClass ? " " + windowClass : "")',"class.fade":"animation","attr.aria-modal":"true","attr.aria-labelledby":"ariaLabelledBy","attr.aria-describedby":"ariaDescribedBy"}},viewQueries:[{propertyName:"_dialogEl",first:!0,predicate:["dialog"],descendants:!0,static:!0}],ngImport:x,template:"\n\t\t<div\n\t\t\t#dialog\n\t\t\t[class]=\"\n\t\t\t\t'modal-dialog' +\n\t\t\t\t(size ? ' modal-' + size : '') +\n\t\t\t\t(centered ? ' modal-dialog-centered' : '') +\n\t\t\t\tfullscreenClass +\n\t\t\t\t(scrollable ? ' modal-dialog-scrollable' : '') +\n\t\t\t\t(modalDialogClass ? ' ' + modalDialogClass : '')\n\t\t\t\"\n\t\t\trole=\"document\"\n\t\t>\n\t\t\t<div class=\"modal-content\"><ng-content></ng-content></div>\n\t\t</div>\n\t",isInline:!0,styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}\n"],encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Bi,decorators:[{type:y.Component,args:[{selector:"ngb-modal-window",standalone:!0,host:{"[class]":'"modal d-block" + (windowClass ? " " + windowClass : "")',"[class.fade]":"animation",role:"dialog",tabindex:"-1","[attr.aria-modal]":"true","[attr.aria-labelledby]":"ariaLabelledBy","[attr.aria-describedby]":"ariaDescribedBy"},template:"\n\t\t<div\n\t\t\t#dialog\n\t\t\t[class]=\"\n\t\t\t\t'modal-dialog' +\n\t\t\t\t(size ? ' modal-' + size : '') +\n\t\t\t\t(centered ? ' modal-dialog-centered' : '') +\n\t\t\t\tfullscreenClass +\n\t\t\t\t(scrollable ? ' modal-dialog-scrollable' : '') +\n\t\t\t\t(modalDialogClass ? ' ' + modalDialogClass : '')\n\t\t\t\"\n\t\t\trole=\"document\"\n\t\t>\n\t\t\t<div class=\"modal-content\"><ng-content></ng-content></div>\n\t\t</div>\n\t",encapsulation:y.ViewEncapsulation.None,styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}\n"]}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Inject,args:[_.DOCUMENT]}]},{type:y.ElementRef},{type:y.NgZone}]},propDecorators:{_dialogEl:[{type:y.ViewChild,args:["dialog",{static:!0}]}],animation:[{type:y.Input}],ariaLabelledBy:[{type:y.Input}],ariaDescribedBy:[{type:y.Input}],backdrop:[{type:y.Input}],centered:[{type:y.Input}],fullscreen:[{type:y.Input}],keyboard:[{type:y.Input}],scrollable:[{type:y.Input}],size:[{type:y.Input}],windowClass:[{type:y.Input}],modalDialogClass:[{type:y.Input}],dismissEvent:[{type:y.Output,args:["dismiss"]}]}});class Gi{constructor(t){this._document=t}hide(){const t=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),e=this._document.body,n=e.style,{overflow:i,paddingRight:s}=n;if(t>0){const i=parseFloat(window.getComputedStyle(e).paddingRight);n.paddingRight=`${i+t}px`}return n.overflow="hidden",()=>{t>0&&(n.paddingRight=s),n.overflow=i}}}Gi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Gi,deps:[{token:_.DOCUMENT}],target:y["ɵɵFactoryTarget"].Injectable}),Gi.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Gi,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Gi,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Inject,args:[_.DOCUMENT]}]}]}});class Wi{constructor(t,e,n,i,s,a,o){this._applicationRef=t,this._injector=e,this._environmentInjector=n,this._document=i,this._scrollBar=s,this._rendererFactory=a,this._ngZone=o,this._activeWindowCmptHasChanged=new k.Subject,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new y.EventEmitter,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const t=this._windowCmpts[this._windowCmpts.length-1];vn(this._ngZone,t.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(t.location.nativeElement)}})}_restoreScrollBar(){const t=this._scrollBarRestoreFn;t&&(this._scrollBarRestoreFn=null,t())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(t,e,n){const i=n.container instanceof HTMLElement?n.container:Ht(n.container)?this._document.querySelector(n.container):this._document.body,s=this._rendererFactory.createRenderer(null,null);if(!i)throw new Error(`The specified modal container "${n.container||"body"}" was not found in the DOM.`);this._hideScrollBar();const a=new Ai,o=(t=n.injector||t).get(y.EnvironmentInjector,null)||this._environmentInjector,r=this._getContentRef(t,o,e,a,n);let l=!1!==n.backdrop?this._attachBackdrop(i):void 0,c=this._attachWindowComponent(i,r.nodes),d=new Hi(c,r,l,n.beforeDismiss);return this._registerModalRef(d),this._registerWindowCmpt(c),d.hidden.pipe((0,D.take)(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(s.removeClass(this._document.body,"modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),a.close=t=>{d.close(t)},a.dismiss=t=>{d.dismiss(t)},a.update=t=>{d.update(t)},d.update(n),1===this._modalRefs.length&&s.addClass(this._document.body,"modal-open"),l&&l.instance&&l.changeDetectorRef.detectChanges(),c.changeDetectorRef.detectChanges(),d}get activeInstances(){return this._activeInstances}dismissAll(t){this._modalRefs.forEach(e=>e.dismiss(t))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(t){let e=(0,y.createComponent)(Vi,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(e.hostView),t.appendChild(e.location.nativeElement),e}_attachWindowComponent(t,e){let n=(0,y.createComponent)(Bi,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:e});return this._applicationRef.attachView(n.hostView),t.appendChild(n.location.nativeElement),n}_getContentRef(t,e,n,i,s){return n?n instanceof y.TemplateRef?this._createFromTemplateRef(n,i):At(n)?this._createFromString(n):this._createFromComponent(t,e,n,i,s):new Ni([])}_createFromTemplateRef(t,e){const n={$implicit:e,close(t){e.close(t)},dismiss(t){e.dismiss(t)}},i=t.createEmbeddedView(n);return this._applicationRef.attachView(i),new Ni([i.rootNodes],i)}_createFromString(t){const e=this._document.createTextNode(`${t}`);return new Ni([[e]])}_createFromComponent(t,e,n,i,s){const a=y.Injector.create({providers:[{provide:Ai,useValue:i}],parent:t}),o=(0,y.createComponent)(n,{environmentInjector:e,elementInjector:a}),r=o.location.nativeElement;return s.scrollable&&r.classList.add("component-host-scrollable"),this._applicationRef.attachView(o.hostView),new Ni([[r]],o.hostView,o)}_setAriaHidden(t){const e=t.parentElement;e&&t!==this._document.body&&(Array.from(e.children).forEach(e=>{e!==t&&"SCRIPT"!==e.nodeName&&(this._ariaHiddenValues.set(e,e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}),this._setAriaHidden(e))}_revertAriaHidden(){this._ariaHiddenValues.forEach((t,e)=>{t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(t){const e=()=>{const e=this._modalRefs.indexOf(t);e>-1&&(this._modalRefs.splice(e,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(t),this._activeInstances.emit(this._modalRefs),t.result.then(e,e)}_registerWindowCmpt(t){this._windowCmpts.push(t),this._activeWindowCmptHasChanged.next(),t.onDestroy(()=>{const e=this._windowCmpts.indexOf(t);e>-1&&(this._windowCmpts.splice(e,1),this._activeWindowCmptHasChanged.next())})}}Wi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Wi,deps:[{token:y.ApplicationRef},{token:y.Injector},{token:y.EnvironmentInjector},{token:_.DOCUMENT},{token:Gi},{token:y.RendererFactory2},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Injectable}),Wi.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Wi,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Wi,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:y.ApplicationRef},{type:y.Injector},{type:y.EnvironmentInjector},{type:void 0,decorators:[{type:y.Inject,args:[_.DOCUMENT]}]},{type:Gi},{type:y.RendererFactory2},{type:y.NgZone}]}});class Ui{constructor(t){this._ngbConfig=t,this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}Ui.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ui,deps:[{token:Qt}],target:y["ɵɵFactoryTarget"].Injectable}),Ui.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ui,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ui,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Qt}]}});class qi{constructor(t,e,n){this._injector=t,this._modalStack=e,this._config=n}open(t,e={}){const n=Object.assign(Object.assign(Object.assign({},this._config),{animation:this._config.animation}),e);return this._modalStack.open(this._injector,t,n)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(t){this._modalStack.dismissAll(t)}hasOpenModals(){return this._modalStack.hasOpenModals()}}qi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:qi,deps:[{token:y.Injector},{token:Wi},{token:Ui}],target:y["ɵɵFactoryTarget"].Injectable}),qi.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:qi,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:qi,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:y.Injector},{type:Wi},{type:Ui}]}});class Zi{}Zi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Zi,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Zi.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:x,type:Zi}),Zi.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Zi,providers:[qi]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Zi,decorators:[{type:y.NgModule,args:[{providers:[qi]}]}]});class Ki{constructor(t){this._ngbConfig=t,this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}Ki.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ki,deps:[{token:Qt}],target:y["ɵɵFactoryTarget"].Injectable}),Ki.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ki,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ki,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Qt}]}});const Yi=t=>Ht(t)&&""!==t;let Ji=0;class Xi{constructor(t){this.templateRef=t}}Xi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Xi,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),Xi.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Xi,isStandalone:!0,selector:"ng-template[ngbNavContent]",ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Xi,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbNavContent]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class Qi{constructor(t,e){this.role=t,this.nav=e}}Qi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Qi,deps:[{token:"role",attribute:!0},{token:(0,y.forwardRef)(()=>es)}],target:y["ɵɵFactoryTarget"].Directive}),Qi.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Qi,isStandalone:!0,selector:"[ngbNavItem]:not(ng-container)",host:{properties:{"attr.role":"role ? role : nav.roles ? 'presentation' : undefined"}},ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Qi,decorators:[{type:y.Directive,args:[{selector:"[ngbNavItem]:not(ng-container)",standalone:!0,host:{"[attr.role]":"role ? role : nav.roles ? 'presentation' : undefined"}}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Attribute,args:["role"]}]},{type:es,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>es)]}]}]}});class ts{constructor(t,e){this._nav=t,this.elementRef=e,this.disabled=!1,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter}ngAfterContentChecked(){this.contentTpl=this.contentTpls.first}ngOnInit(){Ht(this.domId)||(this.domId="ngb-nav-"+Ji++)}get active(){return this._nav.activeId===this.id}get id(){return Yi(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(Ht(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}}ts.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ts,deps:[{token:(0,y.forwardRef)(()=>es)},{token:y.ElementRef}],target:y["ɵɵFactoryTarget"].Directive}),ts.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ts,isStandalone:!0,selector:"[ngbNavItem]",inputs:{destroyOnHide:"destroyOnHide",disabled:"disabled",domId:"domId",_id:["ngbNavItem","_id"]},outputs:{shown:"shown",hidden:"hidden"},host:{properties:{"class.nav-item":"true"}},queries:[{propertyName:"contentTpls",predicate:Xi}],exportAs:["ngbNavItem"],ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ts,decorators:[{type:y.Directive,args:[{selector:"[ngbNavItem]",exportAs:"ngbNavItem",standalone:!0,host:{"[class.nav-item]":"true"}}]}],ctorParameters:function(){return[{type:es,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>es)]}]},{type:y.ElementRef}]},propDecorators:{destroyOnHide:[{type:y.Input}],disabled:[{type:y.Input}],domId:[{type:y.Input}],_id:[{type:y.Input,args:["ngbNavItem"]}],shown:[{type:y.Output}],hidden:[{type:y.Output}],contentTpls:[{type:y.ContentChildren,args:[Xi,{descendants:!1}]}]}});class es{constructor(t,e,n,i){this.role=t,this._cd=n,this._document=i,this.activeIdChange=new y.EventEmitter,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter,this.destroy$=new k.Subject,this.navItemChange$=new k.Subject,this.navChange=new y.EventEmitter,this.animation=e.animation,this.destroyOnHide=e.destroyOnHide,this.orientation=e.orientation,this.roles=e.roles,this.keyboard=e.keyboard}click(t){t.disabled||this._updateActiveId(t.id)}onKeyDown(t){if("tablist"!==this.roles||!this.keyboard)return;const e=t.which,n=this.links.filter(t=>!t.navItem.disabled),{length:i}=n;let s=-1;if(n.forEach((t,e)=>{t.elRef.nativeElement===this._document.activeElement&&(s=e)}),i){switch(e){case Ve.ArrowLeft:if("vertical"===this.orientation)return;s=(s-1+i)%i;break;case Ve.ArrowRight:if("vertical"===this.orientation)return;s=(s+1)%i;break;case Ve.ArrowDown:if("horizontal"===this.orientation)return;s=(s+1)%i;break;case Ve.ArrowUp:if("horizontal"===this.orientation)return;s=(s-1+i)%i;break;case Ve.Home:s=0;break;case Ve.End:s=i-1}"changeWithArrows"===this.keyboard&&this.select(n[s].navItem.id),n[s].elRef.nativeElement.focus(),t.preventDefault()}}select(t){this._updateActiveId(t,!1)}ngAfterContentInit(){if(!Ht(this.activeId)){const t=this.items.first?this.items.first.id:null;Yi(t)&&(this._updateActiveId(t,!1),this._cd.detectChanges())}this.items.changes.pipe((0,D.takeUntil)(this.destroy$)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:t}){t&&!t.firstChange&&this._notifyItemChanged(t.currentValue)}ngOnDestroy(){this.destroy$.next()}_updateActiveId(t,e=!0){if(this.activeId!==t){let n=!1;e&&this.navChange.emit({activeId:this.activeId,nextId:t,preventDefault:()=>{n=!0}}),n||(this.activeId=t,this.activeIdChange.emit(t),this._notifyItemChanged(t))}}_notifyItemChanged(t){this.navItemChange$.next(this._getItemById(t))}_getItemById(t){return this.items&&this.items.find(e=>e.id===t)||null}}es.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:es,deps:[{token:"role",attribute:!0},{token:Ki},{token:y.ChangeDetectorRef},{token:_.DOCUMENT}],target:y["ɵɵFactoryTarget"].Directive}),es.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:es,isStandalone:!0,selector:"[ngbNav]",inputs:{activeId:"activeId",animation:"animation",destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard"},outputs:{activeIdChange:"activeIdChange",shown:"shown",hidden:"hidden",navChange:"navChange"},host:{listeners:{"keydown.arrowLeft":"onKeyDown($event)","keydown.arrowRight":"onKeyDown($event)","keydown.arrowDown":"onKeyDown($event)","keydown.arrowUp":"onKeyDown($event)","keydown.Home":"onKeyDown($event)","keydown.End":"onKeyDown($event)"},properties:{"class.nav":"true","class.flex-column":"orientation === 'vertical'","attr.aria-orientation":"orientation === 'vertical' && roles === 'tablist' ? 'vertical' : undefined","attr.role":"role ? role : roles ? 'tablist' : undefined"}},queries:[{propertyName:"items",predicate:ts},{propertyName:"links",predicate:y.forwardRef(function(){return ns}),descendants:!0}],exportAs:["ngbNav"],usesOnChanges:!0,ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:es,decorators:[{type:y.Directive,args:[{selector:"[ngbNav]",exportAs:"ngbNav",standalone:!0,host:{"[class.nav]":"true","[class.flex-column]":"orientation === 'vertical'","[attr.aria-orientation]":"orientation === 'vertical' && roles === 'tablist' ? 'vertical' : undefined","[attr.role]":"role ? role : roles ? 'tablist' : undefined","(keydown.arrowLeft)":"onKeyDown($event)","(keydown.arrowRight)":"onKeyDown($event)","(keydown.arrowDown)":"onKeyDown($event)","(keydown.arrowUp)":"onKeyDown($event)","(keydown.Home)":"onKeyDown($event)","(keydown.End)":"onKeyDown($event)"}}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Attribute,args:["role"]}]},{type:Ki},{type:y.ChangeDetectorRef},{type:void 0,decorators:[{type:y.Inject,args:[_.DOCUMENT]}]}]},propDecorators:{activeId:[{type:y.Input}],activeIdChange:[{type:y.Output}],animation:[{type:y.Input}],destroyOnHide:[{type:y.Input}],orientation:[{type:y.Input}],roles:[{type:y.Input}],keyboard:[{type:y.Input}],shown:[{type:y.Output}],hidden:[{type:y.Output}],items:[{type:y.ContentChildren,args:[ts]}],links:[{type:y.ContentChildren,args:[(0,y.forwardRef)(()=>ns),{descendants:!0}]}],navChange:[{type:y.Output}]}});class ns{constructor(t,e,n,i){this.role=t,this.navItem=e,this.nav=n,this.elRef=i}hasNavItemClass(){return this.navItem.elementRef.nativeElement.nodeType===Node.COMMENT_NODE}}ns.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ns,deps:[{token:"role",attribute:!0},{token:ts},{token:es},{token:y.ElementRef}],target:y["ɵɵFactoryTarget"].Directive}),ns.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ns,isStandalone:!0,selector:"[ngbNavLink]",host:{properties:{id:"navItem.domId","class.nav-link":"true","class.nav-item":"hasNavItemClass()","attr.role":"role ? role : nav.roles ? 'tab' : undefined","class.active":"navItem.active","class.disabled":"navItem.disabled","attr.tabindex":"navItem.disabled ? -1 : undefined","attr.aria-controls":"navItem.isPanelInDom() ? navItem.panelDomId : null","attr.aria-selected":"navItem.active","attr.aria-disabled":"navItem.disabled"}},ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ns,decorators:[{type:y.Directive,args:[{selector:"[ngbNavLink]",standalone:!0,host:{"[id]":"navItem.domId","[class.nav-link]":"true","[class.nav-item]":"hasNavItemClass()","[attr.role]":"role ? role : nav.roles ? 'tab' : undefined","[class.active]":"navItem.active","[class.disabled]":"navItem.disabled","[attr.tabindex]":"navItem.disabled ? -1 : undefined","[attr.aria-controls]":"navItem.isPanelInDom() ? navItem.panelDomId : null","[attr.aria-selected]":"navItem.active","[attr.aria-disabled]":"navItem.disabled"}}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Attribute,args:["role"]}]},{type:ts},{type:es},{type:y.ElementRef}]}});class is{constructor(t,e){this.navItem=t,this.nav=e}}is.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:is,deps:[{token:ts},{token:es}],target:y["ɵɵFactoryTarget"].Directive}),is.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:is,isStandalone:!0,selector:"button[ngbNavLink]",host:{attributes:{type:"button"},listeners:{click:"nav.click(navItem)"},properties:{disabled:"navItem.disabled"}},hostDirectives:[{directive:ns}],ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:is,decorators:[{type:y.Directive,args:[{selector:"button[ngbNavLink]",standalone:!0,hostDirectives:[ns],host:{type:"button","[disabled]":"navItem.disabled","(click)":"nav.click(navItem)"}}]}],ctorParameters:function(){return[{type:ts},{type:es}]}});class ss{constructor(t,e){this.navItem=t,this.nav=e}}ss.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ss,deps:[{token:ts},{token:es}],target:y["ɵɵFactoryTarget"].Directive}),ss.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ss,isStandalone:!0,selector:"a[ngbNavLink]",host:{attributes:{href:""},listeners:{click:"nav.click(navItem); $event.preventDefault()"}},hostDirectives:[{directive:ns}],ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ss,decorators:[{type:y.Directive,args:[{selector:"a[ngbNavLink]",standalone:!0,hostDirectives:[ns],host:{href:"","(click)":"nav.click(navItem); $event.preventDefault()"}}]}],ctorParameters:function(){return[{type:ts},{type:es}]}});const as=({classList:t})=>(t.remove("show"),()=>t.remove("active")),os=(t,e)=>{e&&Wt(t),t.classList.add("show")};class rs{constructor(t){this.elRef=t}}rs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:rs,deps:[{token:y.ElementRef}],target:y["ɵɵFactoryTarget"].Directive}),rs.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:rs,isStandalone:!0,selector:"[ngbNavPane]",inputs:{item:"item",nav:"nav",role:"role"},host:{properties:{id:"item.panelDomId","class.fade":"nav.animation","attr.role":'role ? role : nav.roles ? "tabpanel" : undefined',"attr.aria-labelledby":"item.domId"},classAttribute:"tab-pane"},ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:rs,decorators:[{type:y.Directive,args:[{selector:"[ngbNavPane]",standalone:!0,host:{"[id]":"item.panelDomId",class:"tab-pane","[class.fade]":"nav.animation","[attr.role]":'role ? role : nav.roles ? "tabpanel" : undefined',"[attr.aria-labelledby]":"item.domId"}}]}],ctorParameters:function(){return[{type:y.ElementRef}]},propDecorators:{item:[{type:y.Input}],nav:[{type:y.Input}],role:[{type:y.Input}]}});class ls{constructor(t,e){this._cd=t,this._ngZone=e,this._activePane=null}isPanelTransitioning(t){var e;return(null===(e=this._activePane)||void 0===e?void 0:e.item)===t}ngAfterViewInit(){var t;this._updateActivePane(),this.nav.navItemChange$.pipe((0,D.takeUntil)(this.nav.destroy$),(0,D.startWith)((null===(t=this._activePane)||void 0===t?void 0:t.item)||null),(0,D.distinctUntilChanged)(),(0,D.skip)(1)).subscribe(t=>{const e={animation:this.nav.animation,runningTransition:"stop"};this._cd.detectChanges(),this._activePane?Jt(this._ngZone,this._activePane.elRef.nativeElement,as,e).subscribe(()=>{var n;const i=null===(n=this._activePane)||void 0===n?void 0:n.item;this._activePane=this._getPaneForItem(t),this._cd.markForCheck(),this._activePane&&(this._activePane.elRef.nativeElement.classList.add("active"),Jt(this._ngZone,this._activePane.elRef.nativeElement,os,e).subscribe(()=>{t&&(t.shown.emit(),this.nav.shown.emit(t.id))})),i&&(i.hidden.emit(),this.nav.hidden.emit(i.id))}):this._updateActivePane()})}_updateActivePane(){var t,e;this._activePane=this._getActivePane(),null===(t=this._activePane)||void 0===t||t.elRef.nativeElement.classList.add("show"),null===(e=this._activePane)||void 0===e||e.elRef.nativeElement.classList.add("active")}_getPaneForItem(t){return this._panes&&this._panes.find(e=>e.item===t)||null}_getActivePane(){return this._panes&&this._panes.find(t=>t.item.active)||null}}ls.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ls,deps:[{token:y.ChangeDetectorRef},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Component}),ls.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ls,isStandalone:!0,selector:"[ngbNavOutlet]",inputs:{paneRole:"paneRole",nav:["ngbNavOutlet","nav"]},host:{properties:{"class.tab-content":"true"}},viewQueries:[{propertyName:"_panes",predicate:rs,descendants:!0}],ngImport:x,template:'\n\t\t<ng-template ngFor let-item [ngForOf]="nav.items">\n\t\t\t<div\n\t\t\t\tngbNavPane\n\t\t\t\t*ngIf="item.isPanelInDom() || isPanelTransitioning(item)"\n\t\t\t\t[item]="item"\n\t\t\t\t[nav]="nav"\n\t\t\t\t[role]="paneRole"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="item.contentTpl?.templateRef || null"\n\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: item.active || isPanelTransitioning(item) }"\n\t\t\t\t></ng-template>\n\t\t\t</div>\n\t\t</ng-template>\n\t',isInline:!0,dependencies:[{kind:"directive",type:rs,selector:"[ngbNavPane]",inputs:["item","nav","role"]},{kind:"directive",type:_.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ls,decorators:[{type:y.Component,args:[{selector:"[ngbNavOutlet]",standalone:!0,imports:[rs,_.NgFor,_.NgIf,_.NgTemplateOutlet],host:{"[class.tab-content]":"true"},encapsulation:y.ViewEncapsulation.None,changeDetection:y.ChangeDetectionStrategy.OnPush,template:'\n\t\t<ng-template ngFor let-item [ngForOf]="nav.items">\n\t\t\t<div\n\t\t\t\tngbNavPane\n\t\t\t\t*ngIf="item.isPanelInDom() || isPanelTransitioning(item)"\n\t\t\t\t[item]="item"\n\t\t\t\t[nav]="nav"\n\t\t\t\t[role]="paneRole"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="item.contentTpl?.templateRef || null"\n\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: item.active || isPanelTransitioning(item) }"\n\t\t\t\t></ng-template>\n\t\t\t</div>\n\t\t</ng-template>\n\t'}]}],ctorParameters:function(){return[{type:y.ChangeDetectorRef},{type:y.NgZone}]},propDecorators:{_panes:[{type:y.ViewChildren,args:[rs]}],paneRole:[{type:y.Input}],nav:[{type:y.Input,args:["ngbNavOutlet"]}]}});const cs=[Xi,es,ts,Qi,ss,is,ns,ls,rs];class ds{}ds.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ds,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),ds.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:x,type:ds,imports:[Xi,es,ts,Qi,ss,is,ns,ls,rs],exports:[Xi,es,ts,Qi,ss,is,ns,ls,rs]}),ds.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ds,imports:[ls]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ds,decorators:[{type:y.NgModule,args:[{imports:cs,exports:cs}]}]});class ps{constructor(){this.disabled=!1,this.boundaryLinks=!1,this.directionLinks=!0,this.ellipses=!0,this.maxSize=0,this.pageSize=10,this.rotate=!1}}ps.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ps,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),ps.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ps,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ps,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});class hs{constructor(t){this.templateRef=t}}hs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:hs,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),hs.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:hs,isStandalone:!0,selector:"ng-template[ngbPaginationEllipsis]",ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:hs,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPaginationEllipsis]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class us{constructor(t){this.templateRef=t}}us.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:us,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),us.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:us,isStandalone:!0,selector:"ng-template[ngbPaginationFirst]",ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:us,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPaginationFirst]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class ms{constructor(t){this.templateRef=t}}ms.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ms,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),ms.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ms,isStandalone:!0,selector:"ng-template[ngbPaginationLast]",ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ms,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPaginationLast]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class gs{constructor(t){this.templateRef=t}}gs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:gs,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),gs.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:gs,isStandalone:!0,selector:"ng-template[ngbPaginationNext]",ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:gs,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPaginationNext]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class fs{constructor(t){this.templateRef=t}}fs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:fs,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),fs.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:fs,isStandalone:!0,selector:"ng-template[ngbPaginationNumber]",ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:fs,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPaginationNumber]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class bs{constructor(t){this.templateRef=t}}bs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:bs,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),bs.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:bs,isStandalone:!0,selector:"ng-template[ngbPaginationPrevious]",ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:bs,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPaginationPrevious]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class vs{constructor(t){this.templateRef=t}}vs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:vs,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),vs.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:vs,isStandalone:!0,selector:"ng-template[ngbPaginationPages]",ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:vs,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPaginationPages]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class ys{constructor(t){this.pageCount=0,this.pages=[],this.page=1,this.pageChange=new y.EventEmitter(!0),this.disabled=t.disabled,this.boundaryLinks=t.boundaryLinks,this.directionLinks=t.directionLinks,this.ellipses=t.ellipses,this.maxSize=t.maxSize,this.pageSize=t.pageSize,this.rotate=t.rotate,this.size=t.size}hasPrevious(){return this.page>1}hasNext(){return this.page<this.pageCount}nextDisabled(){return!this.hasNext()||this.disabled}previousDisabled(){return!this.hasPrevious()||this.disabled}selectPage(t){this._updatePages(t)}ngOnChanges(t){this._updatePages(this.page)}isEllipsis(t){return-1===t}_applyEllipses(t,e){this.ellipses&&(t>0&&(t>2?this.pages.unshift(-1):2===t&&this.pages.unshift(2),this.pages.unshift(1)),e<this.pageCount&&(e<this.pageCount-2?this.pages.push(-1):e===this.pageCount-2&&this.pages.push(this.pageCount-1),this.pages.push(this.pageCount)))}_applyRotation(){let t=0,e=this.pageCount,n=Math.floor(this.maxSize/2),i=this.maxSize%2==0?n-1:n;return this.page<=n?e=this.maxSize:this.pageCount-this.page<n?t=this.pageCount-this.maxSize:(t=this.page-n-1,e=this.page+i),[t,e]}_applyPagination(){let t=(Math.ceil(this.page/this.maxSize)-1)*this.maxSize;return[t,t+this.maxSize]}_setPageInRange(t){const e=this.page;this.page=Vt(t,this.pageCount,1),this.page!==e&&Lt(this.collectionSize)&&this.pageChange.emit(this.page)}_updatePages(t){this.pageCount=Math.ceil(this.collectionSize/this.pageSize),Lt(this.pageCount)||(this.pageCount=0),this.pages.length=0;for(let t=1;t<=this.pageCount;t++)this.pages.push(t);if(this._setPageInRange(t),this.maxSize>0&&this.pageCount>this.maxSize){let t=0,e=this.pageCount;this.rotate?[t,e]=this._applyRotation():[t,e]=this._applyPagination(),this.pages=this.pages.slice(t,e),this._applyEllipses(t,e)}}}ys.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ys,deps:[{token:ps}],target:y["ɵɵFactoryTarget"].Component}),ys.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ys,isStandalone:!0,selector:"ngb-pagination",inputs:{disabled:"disabled",boundaryLinks:"boundaryLinks",directionLinks:"directionLinks",ellipses:"ellipses",rotate:"rotate",collectionSize:"collectionSize",maxSize:"maxSize",page:"page",pageSize:"pageSize",size:"size"},outputs:{pageChange:"pageChange"},host:{attributes:{role:"navigation"}},queries:[{propertyName:"tplEllipsis",first:!0,predicate:hs,descendants:!0},{propertyName:"tplFirst",first:!0,predicate:us,descendants:!0},{propertyName:"tplLast",first:!0,predicate:ms,descendants:!0},{propertyName:"tplNext",first:!0,predicate:gs,descendants:!0},{propertyName:"tplNumber",first:!0,predicate:fs,descendants:!0},{propertyName:"tplPrevious",first:!0,predicate:bs,descendants:!0},{propertyName:"tplPages",first:!0,predicate:vs,descendants:!0}],usesOnChanges:!0,ngImport:x,template:'\n\t\t<ng-template #first><span aria-hidden="true" i18n="@@ngb.pagination.first">««</span></ng-template>\n\t\t<ng-template #previous><span aria-hidden="true" i18n="@@ngb.pagination.previous">«</span></ng-template>\n\t\t<ng-template #next><span aria-hidden="true" i18n="@@ngb.pagination.next">»</span></ng-template>\n\t\t<ng-template #last><span aria-hidden="true" i18n="@@ngb.pagination.last">»»</span></ng-template>\n\t\t<ng-template #ellipsis>...</ng-template>\n\t\t<ng-template #defaultNumber let-page let-currentPage="currentPage">{{ page }}</ng-template>\n\t\t<ng-template #defaultPages let-page let-pages="pages" let-disabled="disabled">\n\t\t\t<li\n\t\t\t\t*ngFor="let pageNumber of pages"\n\t\t\t\tclass="page-item"\n\t\t\t\t[class.active]="pageNumber === page"\n\t\t\t\t[class.disabled]="isEllipsis(pageNumber) || disabled"\n\t\t\t\t[attr.aria-current]="pageNumber === page ? \'page\' : null"\n\t\t\t>\n\t\t\t\t<a *ngIf="isEllipsis(pageNumber)" class="page-link" tabindex="-1" aria-disabled="true">\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplEllipsis?.templateRef || ellipsis"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: true, currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t\t<a\n\t\t\t\t\t*ngIf="!isEllipsis(pageNumber)"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(pageNumber); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="disabled ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="disabled ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplNumber?.templateRef || defaultNumber"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: disabled, $implicit: pageNumber, currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ng-template>\n\t\t<ul [class]="\'pagination\' + (size ? \' pagination-\' + size : \'\')">\n\t\t\t<li *ngIf="boundaryLinks" class="page-item" [class.disabled]="previousDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="First"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.first-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="previousDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="previousDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplFirst?.templateRef || first"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: previousDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\n\t\t\t<li *ngIf="directionLinks" class="page-item" [class.disabled]="previousDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Previous"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.previous-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(page - 1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="previousDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="previousDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplPrevious?.templateRef || previous"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: previousDisabled() }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="tplPages?.templateRef || defaultPages"\n\t\t\t\t[ngTemplateOutletContext]="{ $implicit: page, pages: pages, disabled: disabled }"\n\t\t\t>\n\t\t\t</ng-template>\n\t\t\t<li *ngIf="directionLinks" class="page-item" [class.disabled]="nextDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Next"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.next-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(page + 1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="nextDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="nextDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplNext?.templateRef || next"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: nextDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\n\t\t\t<li *ngIf="boundaryLinks" class="page-item" [class.disabled]="nextDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Last"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.last-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(pageCount); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="nextDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="nextDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplLast?.templateRef || last"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: nextDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ul>\n\t',isInline:!0,dependencies:[{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],changeDetection:y.ChangeDetectionStrategy.OnPush}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ys,decorators:[{type:y.Component,args:[{selector:"ngb-pagination",standalone:!0,imports:[_.NgIf,_.NgFor,_.NgTemplateOutlet],changeDetection:y.ChangeDetectionStrategy.OnPush,host:{role:"navigation"},template:'\n\t\t<ng-template #first><span aria-hidden="true" i18n="@@ngb.pagination.first">««</span></ng-template>\n\t\t<ng-template #previous><span aria-hidden="true" i18n="@@ngb.pagination.previous">«</span></ng-template>\n\t\t<ng-template #next><span aria-hidden="true" i18n="@@ngb.pagination.next">»</span></ng-template>\n\t\t<ng-template #last><span aria-hidden="true" i18n="@@ngb.pagination.last">»»</span></ng-template>\n\t\t<ng-template #ellipsis>...</ng-template>\n\t\t<ng-template #defaultNumber let-page let-currentPage="currentPage">{{ page }}</ng-template>\n\t\t<ng-template #defaultPages let-page let-pages="pages" let-disabled="disabled">\n\t\t\t<li\n\t\t\t\t*ngFor="let pageNumber of pages"\n\t\t\t\tclass="page-item"\n\t\t\t\t[class.active]="pageNumber === page"\n\t\t\t\t[class.disabled]="isEllipsis(pageNumber) || disabled"\n\t\t\t\t[attr.aria-current]="pageNumber === page ? \'page\' : null"\n\t\t\t>\n\t\t\t\t<a *ngIf="isEllipsis(pageNumber)" class="page-link" tabindex="-1" aria-disabled="true">\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplEllipsis?.templateRef || ellipsis"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: true, currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t\t<a\n\t\t\t\t\t*ngIf="!isEllipsis(pageNumber)"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(pageNumber); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="disabled ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="disabled ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplNumber?.templateRef || defaultNumber"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: disabled, $implicit: pageNumber, currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ng-template>\n\t\t<ul [class]="\'pagination\' + (size ? \' pagination-\' + size : \'\')">\n\t\t\t<li *ngIf="boundaryLinks" class="page-item" [class.disabled]="previousDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="First"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.first-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="previousDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="previousDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplFirst?.templateRef || first"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: previousDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\n\t\t\t<li *ngIf="directionLinks" class="page-item" [class.disabled]="previousDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Previous"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.previous-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(page - 1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="previousDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="previousDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplPrevious?.templateRef || previous"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: previousDisabled() }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="tplPages?.templateRef || defaultPages"\n\t\t\t\t[ngTemplateOutletContext]="{ $implicit: page, pages: pages, disabled: disabled }"\n\t\t\t>\n\t\t\t</ng-template>\n\t\t\t<li *ngIf="directionLinks" class="page-item" [class.disabled]="nextDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Next"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.next-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(page + 1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="nextDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="nextDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplNext?.templateRef || next"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: nextDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\n\t\t\t<li *ngIf="boundaryLinks" class="page-item" [class.disabled]="nextDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Last"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.last-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(pageCount); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="nextDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="nextDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplLast?.templateRef || last"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: nextDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ul>\n\t'}]}],ctorParameters:function(){return[{type:ps}]},propDecorators:{tplEllipsis:[{type:y.ContentChild,args:[hs,{static:!1}]}],tplFirst:[{type:y.ContentChild,args:[us,{static:!1}]}],tplLast:[{type:y.ContentChild,args:[ms,{static:!1}]}],tplNext:[{type:y.ContentChild,args:[gs,{static:!1}]}],tplNumber:[{type:y.ContentChild,args:[fs,{static:!1}]}],tplPrevious:[{type:y.ContentChild,args:[bs,{static:!1}]}],tplPages:[{type:y.ContentChild,args:[vs,{static:!1}]}],disabled:[{type:y.Input}],boundaryLinks:[{type:y.Input}],directionLinks:[{type:y.Input}],ellipses:[{type:y.Input}],rotate:[{type:y.Input}],collectionSize:[{type:y.Input}],maxSize:[{type:y.Input}],page:[{type:y.Input}],pageSize:[{type:y.Input}],pageChange:[{type:y.Output}],size:[{type:y.Input}]}});const xs=[ys,hs,us,ms,gs,fs,bs,vs];class _s{}_s.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:_s,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),_s.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:x,type:_s,imports:[ys,hs,us,ms,gs,fs,bs,vs],exports:[ys,hs,us,ms,gs,fs,bs,vs]}),_s.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:_s,imports:[ys]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:_s,decorators:[{type:y.NgModule,args:[{imports:xs,exports:xs}]}]});class ws{constructor(t,e){this.open=t,this.close=e,e||(this.close=t)}isManual(){return"manual"===this.open||"manual"===this.close}}const ks={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]},Ds=t=>t>0?(0,D.delay)(t):t=>t;function Is(t,e,n,i,s,a,o=0,r=0){const l=function(t,e=ks){const n=(t||"").trim();if(0===n.length)return[];const i=n.split(/\s+/).map(t=>t.split(":")).map(t=>{let n=e[t[0]]||t;return new ws(n[0],n[1])}),s=i.filter(t=>t.isManual());if(s.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(1===s.length&&i.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i}(n);if(1===l.length&&l[0].isManual())return()=>{};const c=function(t,e,n,i){return new k.Observable(s=>{const a=[],o=()=>s.next(!0),r=()=>s.next(!1),l=()=>s.next(!i());return n.forEach(n=>{n.open===n.close?a.push(t.listen(e,n.open,l)):a.push(t.listen(e,n.open,o),t.listen(e,n.close,r))}),()=>{a.forEach(t=>t())}})}(t,e,l,i).pipe(function(t,e,n){return i=>{let s=null;const a=i.pipe((0,D.map)(t=>({open:t})),(0,D.filter)(t=>{const e=n();return e===t.open||s&&s.open!==e?(s&&s.open!==t.open&&(s=null),!1):(s=t,!0)}),(0,D.share)()),o=a.pipe((0,D.filter)(t=>t.open),Ds(t)),r=a.pipe((0,D.filter)(t=>!t.open),Ds(e));return(0,k.merge)(o,r).pipe((0,D.filter)(t=>t===s&&(s=null,t.open!==n())),(0,D.map)(t=>t.open))}}(o,r,i)).subscribe(t=>t?s():a());return()=>c.unsubscribe()}class Cs{constructor(t){this._ngbConfig=t,this.autoClose=!0,this.placement="auto",this.popperOptions=t=>t,this.triggers="click",this.disablePopover=!1,this.openDelay=0,this.closeDelay=0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}Cs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Cs,deps:[{token:Qt}],target:y["ɵɵFactoryTarget"].Injectable}),Cs.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Cs,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Cs,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Qt}]}});let Ms=0;class Ss{isTitleTemplate(){return this.title instanceof y.TemplateRef}}Ss.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ss,deps:[],target:y["ɵɵFactoryTarget"].Component}),Ss.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Ss,isStandalone:!0,selector:"ngb-popover-window",inputs:{animation:"animation",title:"title",id:"id",popoverClass:"popoverClass",context:"context"},host:{attributes:{role:"tooltip"},properties:{class:'"popover" + (popoverClass ? " " + popoverClass : "")',"class.fade":"animation",id:"id"},styleAttribute:"position: absolute;"},ngImport:x,template:' <div class="popover-arrow" data-popper-arrow></div>\n\t\t<h3 class="popover-header" *ngIf="title">\n\t\t\t<ng-template #simpleTitle>{{ title }}</ng-template>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="isTitleTemplate() ? $any(title) : simpleTitle"\n\t\t\t\t[ngTemplateOutletContext]="context"\n\t\t\t></ng-template>\n\t\t</h3>\n\t\t<div class="popover-body"><ng-content></ng-content></div>',isInline:!0,dependencies:[{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ss,decorators:[{type:y.Component,args:[{selector:"ngb-popover-window",standalone:!0,imports:[_.NgTemplateOutlet,_.NgIf],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,host:{"[class]":'"popover" + (popoverClass ? " " + popoverClass : "")',"[class.fade]":"animation",role:"tooltip","[id]":"id",style:"position: absolute;"},template:' <div class="popover-arrow" data-popper-arrow></div>\n\t\t<h3 class="popover-header" *ngIf="title">\n\t\t\t<ng-template #simpleTitle>{{ title }}</ng-template>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="isTitleTemplate() ? $any(title) : simpleTitle"\n\t\t\t\t[ngTemplateOutletContext]="context"\n\t\t\t></ng-template>\n\t\t</h3>\n\t\t<div class="popover-body"><ng-content></ng-content></div>'}]}],propDecorators:{animation:[{type:y.Input}],title:[{type:y.Input}],id:[{type:y.Input}],popoverClass:[{type:y.Input}],context:[{type:y.Input}]}});class $s{constructor(t,e,n,i,s,a,o,r,l){this._elementRef=t,this._renderer=e,this._ngZone=a,this._document=o,this._changeDetector=r,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter,this._ngbPopoverWindowId="ngb-popover-"+Ms++,this._windowRef=null,this.animation=s.animation,this.autoClose=s.autoClose,this.placement=s.placement,this.popperOptions=s.popperOptions,this.triggers=s.triggers,this.container=s.container,this.disablePopover=s.disablePopover,this.popoverClass=s.popoverClass,this.openDelay=s.openDelay,this.closeDelay=s.closeDelay,this._positioning=$n(),this._popupService=new Fi(Ss,n,i,e,this._ngZone,l)}_isDisabled(){return!!this.disablePopover||!this.ngbPopover&&!this.popoverTitle}open(t){if(!this._windowRef&&!this._isDisabled()){const{windowRef:e,transition$:n}=this._popupService.open(this.ngbPopover,t,this.animation);this._windowRef=e,this._windowRef.setInput("animation",this.animation),this._windowRef.setInput("title",this.popoverTitle),this._windowRef.setInput("context",t),this._windowRef.setInput("popoverClass",this.popoverClass),this._windowRef.setInput("id",this._ngbPopoverWindowId),this._renderer.setAttribute(this._getPositionTargetElement(),"aria-describedby",this._ngbPopoverWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,baseClass:"bs-popover",updatePopperOptions:t=>this.popperOptions(On([0,8])(t))}),Promise.resolve().then(()=>{this._positioning.update(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update())})}),gn(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),n.subscribe(()=>this.shown.emit())}}close(t=this.animation){this._windowRef&&(this._renderer.removeAttribute(this._getPositionTargetElement(),"aria-describedby"),this._popupService.close(t).subscribe(()=>{var t;this._windowRef=null,this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=Is(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({ngbPopover:t,popoverTitle:e,disablePopover:n,popoverClass:i}){i&&this.isOpen()&&(this._windowRef.instance.popoverClass=i.currentValue),(t||e||n)&&this._isDisabled()&&this.close()}ngOnDestroy(){var t;this.close(!1),null===(t=this._unregisterListenersFn)||void 0===t||t.call(this)}_getPositionTargetElement(){return(At(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._elementRef.nativeElement}}$s.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:$s,deps:[{token:y.ElementRef},{token:y.Renderer2},{token:y.Injector},{token:y.ViewContainerRef},{token:Cs},{token:y.NgZone},{token:_.DOCUMENT},{token:y.ChangeDetectorRef},{token:y.ApplicationRef}],target:y["ɵɵFactoryTarget"].Directive}),$s.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:$s,isStandalone:!0,selector:"[ngbPopover]",inputs:{animation:"animation",autoClose:"autoClose",ngbPopover:"ngbPopover",popoverTitle:"popoverTitle",placement:"placement",popperOptions:"popperOptions",triggers:"triggers",positionTarget:"positionTarget",container:"container",disablePopover:"disablePopover",popoverClass:"popoverClass",openDelay:"openDelay",closeDelay:"closeDelay"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbPopover"],usesOnChanges:!0,ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:$s,decorators:[{type:y.Directive,args:[{selector:"[ngbPopover]",exportAs:"ngbPopover",standalone:!0}]}],ctorParameters:function(){return[{type:y.ElementRef},{type:y.Renderer2},{type:y.Injector},{type:y.ViewContainerRef},{type:Cs},{type:y.NgZone},{type:void 0,decorators:[{type:y.Inject,args:[_.DOCUMENT]}]},{type:y.ChangeDetectorRef},{type:y.ApplicationRef}]},propDecorators:{animation:[{type:y.Input}],autoClose:[{type:y.Input}],ngbPopover:[{type:y.Input}],popoverTitle:[{type:y.Input}],placement:[{type:y.Input}],popperOptions:[{type:y.Input}],triggers:[{type:y.Input}],positionTarget:[{type:y.Input}],container:[{type:y.Input}],disablePopover:[{type:y.Input}],popoverClass:[{type:y.Input}],openDelay:[{type:y.Input}],closeDelay:[{type:y.Input}],shown:[{type:y.Output}],hidden:[{type:y.Output}]}});class Ts{}Ts.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ts,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Ts.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:x,type:Ts,imports:[$s],exports:[$s]}),Ts.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ts}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ts,decorators:[{type:y.NgModule,args:[{imports:[$s],exports:[$s]}]}]});class Os{constructor(){this.max=100,this.animated=!1,this.ariaLabel="progress bar",this.striped=!1,this.showValue=!1}}Os.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Os,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),Os.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Os,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Os,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});class Es{constructor(t){this.value=0,this.max=t.max,this.animated=t.animated,this.ariaLabel=t.ariaLabel,this.striped=t.striped,this.textType=t.textType,this.type=t.type,this.showValue=t.showValue,this.height=t.height}set max(t){this._max=!Lt(t)||t<=0?100:t}get max(){return this._max}getValue(){return Vt(this.value,this.max)}getPercentValue(){return 100*this.getValue()/this.max}}Es.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Es,deps:[{token:Os}],target:y["ɵɵFactoryTarget"].Component}),Es.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Es,isStandalone:!0,selector:"ngb-progressbar",inputs:{max:"max",animated:"animated",ariaLabel:"ariaLabel",striped:"striped",showValue:"showValue",textType:"textType",type:"type",value:"value",height:"height"},host:{attributes:{role:"progressbar","aria-valuemin":"0"},properties:{"attr.aria-valuenow":"getValue()","attr.aria-valuemax":"max","attr.aria-label":"ariaLabel","style.height":"this.height"},classAttribute:"progress"},ngImport:x,template:'\n\t\t<div\n\t\t\tclass="progress-bar{{ type ? (textType ? \' bg-\' + type : \' text-bg-\' + type) : \'\' }}{{\n\t\t\t\ttextType ? \' text-\' + textType : \'\'\n\t\t\t}}"\n\t\t\t[class.progress-bar-animated]="animated"\n\t\t\t[class.progress-bar-striped]="striped"\n\t\t\t[style.width.%]="getPercentValue()"\n\t\t>\n\t\t\t<span *ngIf="showValue" i18n="@@ngb.progressbar.value">{{ getValue() / max | percent }}</span\n\t\t\t><ng-content></ng-content>\n\t\t</div>\n\t',isInline:!0,dependencies:[{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"pipe",type:_.PercentPipe,name:"percent"}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Es,decorators:[{type:y.Component,args:[{selector:"ngb-progressbar",standalone:!0,imports:[_.NgIf,_.PercentPipe],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,host:{class:"progress",role:"progressbar","[attr.aria-valuenow]":"getValue()","aria-valuemin":"0","[attr.aria-valuemax]":"max","[attr.aria-label]":"ariaLabel"},template:'\n\t\t<div\n\t\t\tclass="progress-bar{{ type ? (textType ? \' bg-\' + type : \' text-bg-\' + type) : \'\' }}{{\n\t\t\t\ttextType ? \' text-\' + textType : \'\'\n\t\t\t}}"\n\t\t\t[class.progress-bar-animated]="animated"\n\t\t\t[class.progress-bar-striped]="striped"\n\t\t\t[style.width.%]="getPercentValue()"\n\t\t>\n\t\t\t<span *ngIf="showValue" i18n="@@ngb.progressbar.value">{{ getValue() / max | percent }}</span\n\t\t\t><ng-content></ng-content>\n\t\t</div>\n\t'}]}],ctorParameters:function(){return[{type:Os}]},propDecorators:{max:[{type:y.Input}],animated:[{type:y.Input}],ariaLabel:[{type:y.Input}],striped:[{type:y.Input}],showValue:[{type:y.Input}],textType:[{type:y.Input}],type:[{type:y.Input}],value:[{type:y.Input}],height:[{type:y.Input},{type:y.HostBinding,args:["style.height"]}]}});class Rs{}Rs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Rs,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Rs.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:x,type:Rs,imports:[Es],exports:[Es]}),Rs.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Rs,imports:[Es]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Rs,decorators:[{type:y.NgModule,args:[{imports:[Es],exports:[Es]}]}]});class Ps{constructor(){this.max=10,this.readonly=!1,this.resettable=!1,this.tabindex=0}}Ps.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ps,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),Ps.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ps,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ps,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});class Ns{constructor(t,e){this._changeDetectorRef=e,this.contexts=[],this.disabled=!1,this.hover=new y.EventEmitter,this.leave=new y.EventEmitter,this.rateChange=new y.EventEmitter(!0),this.onChange=t=>{},this.onTouched=()=>{},this.max=t.max,this.readonly=t.readonly,this.tabindex=t.tabindex}ariaValueText(t,e){return`${t} out of ${e}`}isInteractive(){return!this.readonly&&!this.disabled}enter(t){this.isInteractive()&&this._updateState(t),this.hover.emit(t)}handleBlur(){this.onTouched()}handleClick(t){this.isInteractive()&&this.update(this.resettable&&this.rate===t?0:t)}handleKeyDown(t){switch(t.which){case Ve.ArrowDown:case Ve.ArrowLeft:this.update(this.rate-1);break;case Ve.ArrowUp:case Ve.ArrowRight:this.update(this.rate+1);break;case Ve.Home:this.update(0);break;case Ve.End:this.update(this.max);break;default:return}t.preventDefault()}ngOnChanges(t){t.rate&&this.update(this.rate),t.max&&this._updateMax()}ngOnInit(){this._setupContexts(),this._updateState(this.rate)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}reset(){this.leave.emit(this.nextRate),this._updateState(this.rate)}setDisabledState(t){this.disabled=t}update(t,e=!0){const n=Vt(t,this.max,0);this.isInteractive()&&this.rate!==n&&(this.rate=n,this.rateChange.emit(this.rate)),e&&(this.onChange(this.rate),this.onTouched()),this._updateState(this.rate)}writeValue(t){this.update(t,!1),this._changeDetectorRef.markForCheck()}_updateState(t){this.nextRate=t,this.contexts.forEach((e,n)=>e.fill=Math.round(100*Vt(t-n,1,0)))}_updateMax(){this.max>0&&(this._setupContexts(),this.update(this.rate))}_setupContexts(){this.contexts=Array.from({length:this.max},(t,e)=>({fill:0,index:e}))}}Ns.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ns,deps:[{token:Ps},{token:y.ChangeDetectorRef}],target:y["ɵɵFactoryTarget"].Component}),Ns.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Ns,isStandalone:!0,selector:"ngb-rating",inputs:{max:"max",rate:"rate",readonly:"readonly",resettable:"resettable",starTemplate:"starTemplate",tabindex:"tabindex",ariaValueText:"ariaValueText"},outputs:{hover:"hover",leave:"leave",rateChange:"rateChange"},host:{attributes:{role:"slider","aria-valuemin":"0"},listeners:{blur:"handleBlur()",keydown:"handleKeyDown($event)",mouseleave:"reset()"},properties:{tabindex:"disabled ? -1 : tabindex","attr.aria-valuemax":"max","attr.aria-valuenow":"nextRate","attr.aria-valuetext":"ariaValueText(nextRate, max)","attr.aria-disabled":"readonly ? true : null"},classAttribute:"d-inline-flex"},providers:[{provide:w.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>Ns),multi:!0}],queries:[{propertyName:"starTemplateFromContent",first:!0,predicate:y.TemplateRef,descendants:!0}],usesOnChanges:!0,ngImport:x,template:'\n\t\t<ng-template #t let-fill="fill">{{ fill === 100 ? \'★\' : \'☆\' }}</ng-template>\n\t\t<ng-template ngFor [ngForOf]="contexts" let-index="index">\n\t\t\t<span class="visually-hidden">({{ index < nextRate ? \'*\' : \' \' }})</span>\n\t\t\t<span\n\t\t\t\t(mouseenter)="enter(index + 1)"\n\t\t\t\t(click)="handleClick(index + 1)"\n\t\t\t\t[style.cursor]="isInteractive() ? \'pointer\' : \'default\'"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="starTemplate || starTemplateFromContent || t"\n\t\t\t\t\t[ngTemplateOutletContext]="contexts[index]"\n\t\t\t\t>\n\t\t\t\t</ng-template>\n\t\t\t</span>\n\t\t</ng-template>\n\t',isInline:!0,dependencies:[{kind:"directive",type:_.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ns,decorators:[{type:y.Component,args:[{selector:"ngb-rating",standalone:!0,imports:[_.NgFor,_.NgTemplateOutlet],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,host:{class:"d-inline-flex","[tabindex]":"disabled ? -1 : tabindex",role:"slider","aria-valuemin":"0","[attr.aria-valuemax]":"max","[attr.aria-valuenow]":"nextRate","[attr.aria-valuetext]":"ariaValueText(nextRate, max)","[attr.aria-disabled]":"readonly ? true : null","(blur)":"handleBlur()","(keydown)":"handleKeyDown($event)","(mouseleave)":"reset()"},template:'\n\t\t<ng-template #t let-fill="fill">{{ fill === 100 ? \'★\' : \'☆\' }}</ng-template>\n\t\t<ng-template ngFor [ngForOf]="contexts" let-index="index">\n\t\t\t<span class="visually-hidden">({{ index < nextRate ? \'*\' : \' \' }})</span>\n\t\t\t<span\n\t\t\t\t(mouseenter)="enter(index + 1)"\n\t\t\t\t(click)="handleClick(index + 1)"\n\t\t\t\t[style.cursor]="isInteractive() ? \'pointer\' : \'default\'"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="starTemplate || starTemplateFromContent || t"\n\t\t\t\t\t[ngTemplateOutletContext]="contexts[index]"\n\t\t\t\t>\n\t\t\t\t</ng-template>\n\t\t\t</span>\n\t\t</ng-template>\n\t',providers:[{provide:w.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>Ns),multi:!0}]}]}],ctorParameters:function(){return[{type:Ps},{type:y.ChangeDetectorRef}]},propDecorators:{max:[{type:y.Input}],rate:[{type:y.Input}],readonly:[{type:y.Input}],resettable:[{type:y.Input}],starTemplate:[{type:y.Input}],starTemplateFromContent:[{type:y.ContentChild,args:[y.TemplateRef,{static:!1}]}],tabindex:[{type:y.Input}],ariaValueText:[{type:y.Input}],hover:[{type:y.Output}],leave:[{type:y.Output}],rateChange:[{type:y.Output}]}});class Fs{}Fs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Fs,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Fs.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:x,type:Fs,imports:[Ns],exports:[Ns]}),Fs.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Fs,imports:[Ns]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Fs,decorators:[{type:y.NgModule,args:[{imports:[Ns],exports:[Ns]}]}]});class Vs{constructor(t,e,n){this.hour=Nt(t),this.minute=Nt(e),this.second=Nt(n)}changeHour(t=1){this.updateHour((isNaN(this.hour)?0:this.hour)+t)}updateHour(t){Lt(t)?this.hour=(t<0?24+t:t)%24:this.hour=NaN}changeMinute(t=1){this.updateMinute((isNaN(this.minute)?0:this.minute)+t)}updateMinute(t){Lt(t)?(this.minute=t%60<0?60+t%60:t%60,this.changeHour(Math.floor(t/60))):this.minute=NaN}changeSecond(t=1){this.updateSecond((isNaN(this.second)?0:this.second)+t)}updateSecond(t){Lt(t)?(this.second=t<0?60+t%60:t%60,this.changeMinute(Math.floor(t/60))):this.second=NaN}isValid(t=!0){return Lt(this.hour)&&Lt(this.minute)&&(!t||Lt(this.second))}toString(){return`${this.hour||0}:${this.minute||0}:${this.second||0}`}}class As{constructor(){this.meridian=!1,this.spinners=!0,this.seconds=!1,this.hourStep=1,this.minuteStep=1,this.secondStep=1,this.disabled=!1,this.readonlyInputs=!1,this.size="medium"}}function Ls(){return new Hs}As.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:As,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),As.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:As,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:As,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});class js{}js.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:js,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),js.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:js,providedIn:"root",useFactory:Ls}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:js,decorators:[{type:y.Injectable,args:[{providedIn:"root",useFactory:Ls}]}]});class Hs extends js{fromModel(t){return t&&jt(t.hour)&&jt(t.minute)?{hour:t.hour,minute:t.minute,second:jt(t.second)?t.second:null}:null}toModel(t){return t&&jt(t.hour)&&jt(t.minute)?{hour:t.hour,minute:t.minute,second:jt(t.second)?t.second:null}:null}}function zs(t){return new Gs(t)}Hs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Hs,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),Hs.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Hs}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Hs,decorators:[{type:y.Injectable}]});class Bs{}Bs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Bs,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),Bs.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Bs,providedIn:"root",useFactory:zs,deps:[{token:y.LOCALE_ID}]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Bs,decorators:[{type:y.Injectable,args:[{providedIn:"root",useFactory:zs,deps:[y.LOCALE_ID]}]}]});class Gs extends Bs{constructor(t){super(),this._periods=(0,_.getLocaleDayPeriods)(t,_.FormStyle.Standalone,_.TranslationWidth.Narrow)}getMorningPeriod(){return this._periods[0]}getAfternoonPeriod(){return this._periods[1]}}Gs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Gs,deps:[{token:y.LOCALE_ID}],target:y["ɵɵFactoryTarget"].Injectable}),Gs.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Gs}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Gs,decorators:[{type:y.Injectable}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Inject,args:[y.LOCALE_ID]}]}]}});const Ws=/[^0-9]/g;class Us{constructor(t,e,n,i){this._config=t,this._ngbTimeAdapter=e,this._cd=n,this.i18n=i,this.onChange=t=>{},this.onTouched=()=>{},this.meridian=t.meridian,this.spinners=t.spinners,this.seconds=t.seconds,this.hourStep=t.hourStep,this.minuteStep=t.minuteStep,this.secondStep=t.secondStep,this.disabled=t.disabled,this.readonlyInputs=t.readonlyInputs,this.size=t.size}set hourStep(t){this._hourStep=jt(t)?t:this._config.hourStep}get hourStep(){return this._hourStep}set minuteStep(t){this._minuteStep=jt(t)?t:this._config.minuteStep}get minuteStep(){return this._minuteStep}set secondStep(t){this._secondStep=jt(t)?t:this._config.secondStep}get secondStep(){return this._secondStep}writeValue(t){const e=this._ngbTimeAdapter.fromModel(t);this.model=e?new Vs(e.hour,e.minute,e.second):new Vs,this.seconds||e&&Lt(e.second)||(this.model.second=0),this._cd.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}changeHour(t){var e;null===(e=this.model)||void 0===e||e.changeHour(t),this.propagateModelChange()}changeMinute(t){var e;null===(e=this.model)||void 0===e||e.changeMinute(t),this.propagateModelChange()}changeSecond(t){var e;null===(e=this.model)||void 0===e||e.changeSecond(t),this.propagateModelChange()}updateHour(t){var e,n;const i=!!this.model&&this.model.hour>=12,s=Nt(t);this.meridian&&(i&&s<12||!i&&12===s)?null===(e=this.model)||void 0===e||e.updateHour(s+12):null===(n=this.model)||void 0===n||n.updateHour(s),this.propagateModelChange()}updateMinute(t){var e;null===(e=this.model)||void 0===e||e.updateMinute(Nt(t)),this.propagateModelChange()}updateSecond(t){var e;null===(e=this.model)||void 0===e||e.updateSecond(Nt(t)),this.propagateModelChange()}toggleMeridian(){this.meridian&&this.changeHour(12)}formatInput(t){t.value=t.value.replace(Ws,"")}formatHour(t){return Lt(t)?this.meridian?Bt(t%12==0?12:t%12):Bt(t%24):Bt(NaN)}formatMinSec(t){return Bt(Lt(t)?t:NaN)}handleBlur(){this.onTouched()}get isSmallSize(){return"small"===this.size}get isLargeSize(){return"large"===this.size}ngOnChanges(t){t.seconds&&!this.seconds&&this.model&&!Lt(this.model.second)&&(this.model.second=0,this.propagateModelChange(!1))}propagateModelChange(t=!0){var e;t&&this.onTouched(),(null===(e=this.model)||void 0===e?void 0:e.isValid(this.seconds))?this.onChange(this._ngbTimeAdapter.toModel({hour:this.model.hour,minute:this.model.minute,second:this.model.second})):this.onChange(this._ngbTimeAdapter.toModel(null))}}Us.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Us,deps:[{token:As},{token:js},{token:y.ChangeDetectorRef},{token:Bs}],target:y["ɵɵFactoryTarget"].Component}),Us.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Us,isStandalone:!0,selector:"ngb-timepicker",inputs:{meridian:"meridian",spinners:"spinners",seconds:"seconds",hourStep:"hourStep",minuteStep:"minuteStep",secondStep:"secondStep",readonlyInputs:"readonlyInputs",size:"size"},providers:[{provide:w.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>Us),multi:!0}],exportAs:["ngbTimepicker"],usesOnChanges:!0,ngImport:x,template:'\n\t\t<fieldset [disabled]="disabled" [class.disabled]="disabled">\n\t\t\t<div class="ngb-tp">\n\t\t\t\t<div class="ngb-tp-input-container ngb-tp-hour">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeHour(hourStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-hours">Increment hours</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="HH"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.HH"\n\t\t\t\t\t\t[value]="formatHour(model?.hour)"\n\t\t\t\t\t\t(change)="updateHour($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Hours"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.hours"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeHour(hourStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeHour(-hourStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeHour(-hourStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-hours">Decrement hours</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div class="ngb-tp-spacer">:</div>\n\t\t\t\t<div class="ngb-tp-input-container ngb-tp-minute">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeMinute(minuteStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-minutes">Increment minutes</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="MM"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.MM"\n\t\t\t\t\t\t[value]="formatMinSec(model?.minute)"\n\t\t\t\t\t\t(change)="updateMinute($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Minutes"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.minutes"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeMinute(minuteStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeMinute(-minuteStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeMinute(-minuteStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-minutes">Decrement minutes</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf="seconds" class="ngb-tp-spacer">:</div>\n\t\t\t\t<div *ngIf="seconds" class="ngb-tp-input-container ngb-tp-second">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeSecond(secondStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-seconds">Increment seconds</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="SS"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.SS"\n\t\t\t\t\t\t[value]="formatMinSec(model?.second)"\n\t\t\t\t\t\t(change)="updateSecond($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Seconds"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.seconds"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeSecond(secondStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeSecond(-secondStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeSecond(-secondStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-seconds">Decrement seconds</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf="meridian" class="ngb-tp-spacer"></div>\n\t\t\t\t<div *ngIf="meridian" class="ngb-tp-meridian">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\tclass="btn btn-outline-primary"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t(click)="toggleMeridian()"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ng-container *ngIf="model && model.hour >= 12; else am" i18n="@@ngb.timepicker.PM">{{\n\t\t\t\t\t\t\ti18n.getAfternoonPeriod()\n\t\t\t\t\t\t}}</ng-container>\n\t\t\t\t\t\t<ng-template #am i18n="@@ngb.timepicker.AM">{{ i18n.getMorningPeriod() }}</ng-template>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</fieldset>\n\t',isInline:!0,styles:['ngb-timepicker{font-size:1rem}.ngb-tp{display:flex;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron:before{border-style:solid;border-width:.29em .29em 0 0;content:"";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-minute,.ngb-tp-second,.ngb-tp-meridian{display:flex;flex-direction:column;align-items:center;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}\n'],dependencies:[{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Us,decorators:[{type:y.Component,args:[{exportAs:"ngbTimepicker",selector:"ngb-timepicker",standalone:!0,imports:[_.NgIf],encapsulation:y.ViewEncapsulation.None,template:'\n\t\t<fieldset [disabled]="disabled" [class.disabled]="disabled">\n\t\t\t<div class="ngb-tp">\n\t\t\t\t<div class="ngb-tp-input-container ngb-tp-hour">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeHour(hourStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-hours">Increment hours</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="HH"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.HH"\n\t\t\t\t\t\t[value]="formatHour(model?.hour)"\n\t\t\t\t\t\t(change)="updateHour($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Hours"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.hours"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeHour(hourStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeHour(-hourStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeHour(-hourStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-hours">Decrement hours</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div class="ngb-tp-spacer">:</div>\n\t\t\t\t<div class="ngb-tp-input-container ngb-tp-minute">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeMinute(minuteStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-minutes">Increment minutes</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="MM"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.MM"\n\t\t\t\t\t\t[value]="formatMinSec(model?.minute)"\n\t\t\t\t\t\t(change)="updateMinute($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Minutes"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.minutes"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeMinute(minuteStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeMinute(-minuteStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeMinute(-minuteStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-minutes">Decrement minutes</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf="seconds" class="ngb-tp-spacer">:</div>\n\t\t\t\t<div *ngIf="seconds" class="ngb-tp-input-container ngb-tp-second">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeSecond(secondStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-seconds">Increment seconds</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="SS"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.SS"\n\t\t\t\t\t\t[value]="formatMinSec(model?.second)"\n\t\t\t\t\t\t(change)="updateSecond($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Seconds"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.seconds"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeSecond(secondStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeSecond(-secondStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeSecond(-secondStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-seconds">Decrement seconds</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf="meridian" class="ngb-tp-spacer"></div>\n\t\t\t\t<div *ngIf="meridian" class="ngb-tp-meridian">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\tclass="btn btn-outline-primary"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t(click)="toggleMeridian()"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ng-container *ngIf="model && model.hour >= 12; else am" i18n="@@ngb.timepicker.PM">{{\n\t\t\t\t\t\t\ti18n.getAfternoonPeriod()\n\t\t\t\t\t\t}}</ng-container>\n\t\t\t\t\t\t<ng-template #am i18n="@@ngb.timepicker.AM">{{ i18n.getMorningPeriod() }}</ng-template>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</fieldset>\n\t',providers:[{provide:w.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>Us),multi:!0}],styles:['ngb-timepicker{font-size:1rem}.ngb-tp{display:flex;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron:before{border-style:solid;border-width:.29em .29em 0 0;content:"";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-minute,.ngb-tp-second,.ngb-tp-meridian{display:flex;flex-direction:column;align-items:center;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}\n']}]}],ctorParameters:function(){return[{type:As},{type:js},{type:y.ChangeDetectorRef},{type:Bs}]},propDecorators:{meridian:[{type:y.Input}],spinners:[{type:y.Input}],seconds:[{type:y.Input}],hourStep:[{type:y.Input}],minuteStep:[{type:y.Input}],secondStep:[{type:y.Input}],readonlyInputs:[{type:y.Input}],size:[{type:y.Input}]}});class qs{}qs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:qs,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),qs.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:x,type:qs,imports:[Us],exports:[Us]}),qs.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:qs,imports:[Us]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:qs,decorators:[{type:y.NgModule,args:[{imports:[Us],exports:[Us]}]}]});const Zs=(t,e)=>{const{classList:n}=t;if(e)return n.add("fade"),Wt(t),n.add("show","showing"),()=>{n.remove("showing")};n.add("show")},Ks=({classList:t})=>(t.add("showing"),()=>{t.remove("show","showing")});class Ys{constructor(t){this._ngbConfig=t,this.autohide=!0,this.delay=5e3,this.ariaLive="polite"}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}Ys.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ys,deps:[{token:Qt}],target:y["ɵɵFactoryTarget"].Injectable}),Ys.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ys,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Ys,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Qt}]}});class Js{}Js.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Js,deps:[],target:y["ɵɵFactoryTarget"].Directive}),Js.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Js,isStandalone:!0,selector:"[ngbToastHeader]",ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Js,decorators:[{type:y.Directive,args:[{selector:"[ngbToastHeader]",standalone:!0}]}]});class Xs{constructor(t,e,n,i){this.ariaLive=t,this._zone=n,this._element=i,this.contentHeaderTpl=null,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter,null==this.ariaLive&&(this.ariaLive=e.ariaLive),this.delay=e.delay,this.autohide=e.autohide,this.animation=e.animation}ngAfterContentInit(){this._zone.onStable.asObservable().pipe((0,D.take)(1)).subscribe(()=>{this._init(),this.show()})}ngOnChanges(t){"autohide"in t&&(this._clearTimeout(),this._init())}hide(){this._clearTimeout();const t=Jt(this._zone,this._element.nativeElement,Ks,{animation:this.animation,runningTransition:"stop"});return t.subscribe(()=>{this.hidden.emit()}),t}show(){const t=Jt(this._zone,this._element.nativeElement,Zs,{animation:this.animation,runningTransition:"continue"});return t.subscribe(()=>{this.shown.emit()}),t}_init(){this.autohide&&!this._timeoutID&&(this._timeoutID=setTimeout(()=>this.hide(),this.delay))}_clearTimeout(){this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=null)}}Xs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Xs,deps:[{token:"aria-live",attribute:!0},{token:Ys},{token:y.NgZone},{token:y.ElementRef}],target:y["ɵɵFactoryTarget"].Component}),Xs.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Xs,isStandalone:!0,selector:"ngb-toast",inputs:{animation:"animation",delay:"delay",autohide:"autohide",header:"header"},outputs:{shown:"shown",hidden:"hidden"},host:{attributes:{role:"alert","aria-atomic":"true"},properties:{"attr.aria-live":"ariaLive","class.fade":"animation"},classAttribute:"toast"},queries:[{propertyName:"contentHeaderTpl",first:!0,predicate:Js,descendants:!0,read:y.TemplateRef,static:!0}],exportAs:["ngbToast"],usesOnChanges:!0,ngImport:x,template:'\n\t\t<ng-template #headerTpl>\n\t\t\t<strong class="me-auto">{{ header }}</strong>\n\t\t</ng-template>\n\t\t<ng-template [ngIf]="contentHeaderTpl || header">\n\t\t\t<div class="toast-header">\n\t\t\t\t<ng-template [ngTemplateOutlet]="contentHeaderTpl || headerTpl"></ng-template>\n\t\t\t\t<button\n\t\t\t\t\ttype="button"\n\t\t\t\t\tclass="btn-close"\n\t\t\t\t\taria-label="Close"\n\t\t\t\t\ti18n-aria-label="@@ngb.toast.close-aria"\n\t\t\t\t\t(click)="hide()"\n\t\t\t\t>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</ng-template>\n\t\t<div class="toast-body">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t',isInline:!0,styles:["ngb-toast{display:block}ngb-toast .toast-header .close{margin-left:auto;margin-bottom:.25rem}\n"],dependencies:[{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Xs,decorators:[{type:y.Component,args:[{selector:"ngb-toast",exportAs:"ngbToast",standalone:!0,imports:[_.NgIf,_.NgTemplateOutlet],encapsulation:y.ViewEncapsulation.None,host:{role:"alert","[attr.aria-live]":"ariaLive","aria-atomic":"true",class:"toast","[class.fade]":"animation"},template:'\n\t\t<ng-template #headerTpl>\n\t\t\t<strong class="me-auto">{{ header }}</strong>\n\t\t</ng-template>\n\t\t<ng-template [ngIf]="contentHeaderTpl || header">\n\t\t\t<div class="toast-header">\n\t\t\t\t<ng-template [ngTemplateOutlet]="contentHeaderTpl || headerTpl"></ng-template>\n\t\t\t\t<button\n\t\t\t\t\ttype="button"\n\t\t\t\t\tclass="btn-close"\n\t\t\t\t\taria-label="Close"\n\t\t\t\t\ti18n-aria-label="@@ngb.toast.close-aria"\n\t\t\t\t\t(click)="hide()"\n\t\t\t\t>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</ng-template>\n\t\t<div class="toast-body">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t',styles:["ngb-toast{display:block}ngb-toast .toast-header .close{margin-left:auto;margin-bottom:.25rem}\n"]}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Attribute,args:["aria-live"]}]},{type:Ys},{type:y.NgZone},{type:y.ElementRef}]},propDecorators:{animation:[{type:y.Input}],delay:[{type:y.Input}],autohide:[{type:y.Input}],header:[{type:y.Input}],contentHeaderTpl:[{type:y.ContentChild,args:[Js,{read:y.TemplateRef,static:!0}]}],shown:[{type:y.Output}],hidden:[{type:y.Output}]}});class Qs{}Qs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Qs,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Qs.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:x,type:Qs,imports:[Xs,Js],exports:[Xs,Js]}),Qs.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Qs,imports:[Xs]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Qs,decorators:[{type:y.NgModule,args:[{imports:[Xs,Js],exports:[Xs,Js]}]}]});class ta{constructor(t){this._ngbConfig=t,this.autoClose=!0,this.placement="auto",this.popperOptions=t=>t,this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}ta.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ta,deps:[{token:Qt}],target:y["ɵɵFactoryTarget"].Injectable}),ta.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ta,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ta,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Qt}]}});let ea=0;class na{}na.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:na,deps:[],target:y["ɵɵFactoryTarget"].Component}),na.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:na,isStandalone:!0,selector:"ngb-tooltip-window",inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass"},host:{attributes:{role:"tooltip"},properties:{class:'"tooltip" + (tooltipClass ? " " + tooltipClass : "")',"class.fade":"animation",id:"id"},styleAttribute:"position: absolute;"},ngImport:x,template:'<div class="tooltip-arrow" data-popper-arrow></div\n\t\t><div class="tooltip-inner"><ng-content></ng-content></div>',isInline:!0,changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:na,decorators:[{type:y.Component,args:[{selector:"ngb-tooltip-window",standalone:!0,changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,host:{"[class]":'"tooltip" + (tooltipClass ? " " + tooltipClass : "")',"[class.fade]":"animation",role:"tooltip","[id]":"id",style:"position: absolute;"},template:'<div class="tooltip-arrow" data-popper-arrow></div\n\t\t><div class="tooltip-inner"><ng-content></ng-content></div>'}]}],propDecorators:{animation:[{type:y.Input}],id:[{type:y.Input}],tooltipClass:[{type:y.Input}]}});class ia{constructor(t,e,n,i,s,a,o,r,l){this._elementRef=t,this._renderer=e,this._ngZone=a,this._document=o,this._changeDetector=r,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter,this._ngbTooltipWindowId="ngb-tooltip-"+ea++,this._windowRef=null,this.animation=s.animation,this.autoClose=s.autoClose,this.placement=s.placement,this.popperOptions=s.popperOptions,this.triggers=s.triggers,this.container=s.container,this.disableTooltip=s.disableTooltip,this.tooltipClass=s.tooltipClass,this.openDelay=s.openDelay,this.closeDelay=s.closeDelay,this._popupService=new Fi(na,n,i,e,this._ngZone,l),this._positioning=$n()}set ngbTooltip(t){this._ngbTooltip=t,!t&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(t){if(!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){const{windowRef:e,transition$:n}=this._popupService.open(this._ngbTooltip,t,this.animation);this._windowRef=e,this._windowRef.setInput("animation",this.animation),this._windowRef.setInput("tooltipClass",this.tooltipClass),this._windowRef.setInput("id",this._ngbTooltipWindowId),this._renderer.setAttribute(this._getPositionTargetElement(),"aria-describedby",this._ngbTooltipWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,baseClass:"bs-tooltip",updatePopperOptions:t=>this.popperOptions(t)}),Promise.resolve().then(()=>{this._positioning.update(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update())})}),gn(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),n.subscribe(()=>this.shown.emit())}}close(t=this.animation){null!=this._windowRef&&(this._renderer.removeAttribute(this._getPositionTargetElement(),"aria-describedby"),this._popupService.close(t).subscribe(()=>{var t;this._windowRef=null,this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=Is(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({tooltipClass:t}){t&&this.isOpen()&&(this._windowRef.instance.tooltipClass=t.currentValue)}ngOnDestroy(){var t;this.close(!1),null===(t=this._unregisterListenersFn)||void 0===t||t.call(this)}_getPositionTargetElement(){return(At(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._elementRef.nativeElement}}ia.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ia,deps:[{token:y.ElementRef},{token:y.Renderer2},{token:y.Injector},{token:y.ViewContainerRef},{token:ta},{token:y.NgZone},{token:_.DOCUMENT},{token:y.ChangeDetectorRef},{token:y.ApplicationRef}],target:y["ɵɵFactoryTarget"].Directive}),ia.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ia,isStandalone:!0,selector:"[ngbTooltip]",inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",popperOptions:"popperOptions",triggers:"triggers",positionTarget:"positionTarget",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],usesOnChanges:!0,ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ia,decorators:[{type:y.Directive,args:[{selector:"[ngbTooltip]",standalone:!0,exportAs:"ngbTooltip"}]}],ctorParameters:function(){return[{type:y.ElementRef},{type:y.Renderer2},{type:y.Injector},{type:y.ViewContainerRef},{type:ta},{type:y.NgZone},{type:void 0,decorators:[{type:y.Inject,args:[_.DOCUMENT]}]},{type:y.ChangeDetectorRef},{type:y.ApplicationRef}]},propDecorators:{animation:[{type:y.Input}],autoClose:[{type:y.Input}],placement:[{type:y.Input}],popperOptions:[{type:y.Input}],triggers:[{type:y.Input}],positionTarget:[{type:y.Input}],container:[{type:y.Input}],disableTooltip:[{type:y.Input}],tooltipClass:[{type:y.Input}],openDelay:[{type:y.Input}],closeDelay:[{type:y.Input}],shown:[{type:y.Output}],hidden:[{type:y.Output}],ngbTooltip:[{type:y.Input}]}});class sa{}sa.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:sa,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),sa.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:x,type:sa,imports:[ia],exports:[ia]}),sa.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:sa}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:sa,decorators:[{type:y.NgModule,args:[{imports:[ia],exports:[ia]}]}]});class aa{constructor(){this.highlightClass="ngb-highlight",this.accentSensitive=!0}ngOnChanges(t){this.accentSensitive||String.prototype.normalize||(console.warn("The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser that does not implement the `String.normalize` function. You will have to include a polyfill in your application to use this feature in the current browser."),this.accentSensitive=!0);const e=Ft(this.result),n=Array.isArray(this.term)?this.term:[this.term],i=t=>this.accentSensitive?t:Ut(t),s=n.map(t=>i(Ft(t)).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")).filter(t=>t),a=this.accentSensitive?e:Ut(e),o=s.length?a.split(new RegExp(`(${s.join("|")})`,"gmi")):[e];if(this.accentSensitive)this.parts=o;else{let t=0;this.parts=o.map(n=>e.substring(t,t+=n.length))}}}aa.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:aa,deps:[],target:y["ɵɵFactoryTarget"].Component}),aa.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:aa,isStandalone:!0,selector:"ngb-highlight",inputs:{highlightClass:"highlightClass",result:"result",term:"term",accentSensitive:"accentSensitive"},usesOnChanges:!0,ngImport:x,template:'<ng-template ngFor [ngForOf]="parts" let-part let-isOdd="odd"><span *ngIf="isOdd; else even" [class]="highlightClass">{{part}}</span><ng-template #even>{{part}}</ng-template></ng-template>',isInline:!0,styles:[".ngb-highlight{font-weight:700}\n"],dependencies:[{kind:"directive",type:_.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:_.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:aa,decorators:[{type:y.Component,args:[{selector:"ngb-highlight",standalone:!0,imports:[_.NgIf,_.NgFor],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,template:'<ng-template ngFor [ngForOf]="parts" let-part let-isOdd="odd"><span *ngIf="isOdd; else even" [class]="highlightClass">{{part}}</span><ng-template #even>{{part}}</ng-template></ng-template>',styles:[".ngb-highlight{font-weight:700}\n"]}]}],propDecorators:{highlightClass:[{type:y.Input}],result:[{type:y.Input}],term:[{type:y.Input}],accentSensitive:[{type:y.Input}]}});class oa{constructor(){this.activeIdx=0,this.focusFirst=!0,this.formatter=Ft,this.selectEvent=new y.EventEmitter,this.activeChangeEvent=new y.EventEmitter}hasActive(){return this.activeIdx>-1&&this.activeIdx<this.results.length}getActive(){return this.results[this.activeIdx]}markActive(t){this.activeIdx=t,this._activeChanged()}next(){this.activeIdx===this.results.length-1?this.activeIdx=this.focusFirst?(this.activeIdx+1)%this.results.length:-1:this.activeIdx++,this._activeChanged()}prev(){this.activeIdx<0?this.activeIdx=this.results.length-1:0===this.activeIdx?this.activeIdx=this.focusFirst?this.results.length-1:-1:this.activeIdx--,this._activeChanged()}resetActive(){this.activeIdx=this.focusFirst?0:-1,this._activeChanged()}select(t){this.selectEvent.emit(t)}ngOnInit(){this.resetActive()}_activeChanged(){this.activeChangeEvent.emit(this.activeIdx>=0?this.id+"-"+this.activeIdx:void 0)}}oa.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:oa,deps:[],target:y["ɵɵFactoryTarget"].Component}),oa.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:oa,isStandalone:!0,selector:"ngb-typeahead-window",inputs:{id:"id",focusFirst:"focusFirst",results:"results",term:"term",formatter:"formatter",resultTemplate:"resultTemplate",popupClass:"popupClass"},outputs:{selectEvent:"select",activeChangeEvent:"activeChange"},host:{attributes:{role:"listbox"},listeners:{mousedown:"$event.preventDefault()"},properties:{class:'"dropdown-menu show" + (popupClass ? " " + popupClass : "")',id:"id"}},exportAs:["ngbTypeaheadWindow"],ngImport:x,template:'\n\t\t<ng-template #rt let-result="result" let-term="term" let-formatter="formatter">\n\t\t\t<ngb-highlight [result]="formatter(result)" [term]="term"></ngb-highlight>\n\t\t</ng-template>\n\t\t<ng-template ngFor [ngForOf]="results" let-result let-idx="index">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="dropdown-item"\n\t\t\t\trole="option"\n\t\t\t\t[id]="id + \'-\' + idx"\n\t\t\t\t[class.active]="idx === activeIdx"\n\t\t\t\t(mouseenter)="markActive(idx)"\n\t\t\t\t(click)="select(result)"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="resultTemplate || rt"\n\t\t\t\t\t[ngTemplateOutletContext]="{ result: result, term: term, formatter: formatter }"\n\t\t\t\t></ng-template>\n\t\t\t</button>\n\t\t</ng-template>\n\t',isInline:!0,dependencies:[{kind:"component",type:aa,selector:"ngb-highlight",inputs:["highlightClass","result","term","accentSensitive"]},{kind:"directive",type:_.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:_.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:oa,decorators:[{type:y.Component,args:[{selector:"ngb-typeahead-window",exportAs:"ngbTypeaheadWindow",standalone:!0,imports:[aa,_.NgFor,_.NgTemplateOutlet],encapsulation:y.ViewEncapsulation.None,host:{"(mousedown)":"$event.preventDefault()","[class]":'"dropdown-menu show" + (popupClass ? " " + popupClass : "")',role:"listbox","[id]":"id"},template:'\n\t\t<ng-template #rt let-result="result" let-term="term" let-formatter="formatter">\n\t\t\t<ngb-highlight [result]="formatter(result)" [term]="term"></ngb-highlight>\n\t\t</ng-template>\n\t\t<ng-template ngFor [ngForOf]="results" let-result let-idx="index">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="dropdown-item"\n\t\t\t\trole="option"\n\t\t\t\t[id]="id + \'-\' + idx"\n\t\t\t\t[class.active]="idx === activeIdx"\n\t\t\t\t(mouseenter)="markActive(idx)"\n\t\t\t\t(click)="select(result)"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="resultTemplate || rt"\n\t\t\t\t\t[ngTemplateOutletContext]="{ result: result, term: term, formatter: formatter }"\n\t\t\t\t></ng-template>\n\t\t\t</button>\n\t\t</ng-template>\n\t'}]}],propDecorators:{id:[{type:y.Input}],focusFirst:[{type:y.Input}],results:[{type:y.Input}],term:[{type:y.Input}],formatter:[{type:y.Input}],resultTemplate:[{type:y.Input}],popupClass:[{type:y.Input}],selectEvent:[{type:y.Output,args:["select"]}],activeChangeEvent:[{type:y.Output,args:["activeChange"]}]}});class ra{constructor(){this.editable=!0,this.focusFirst=!0,this.selectOnExact=!1,this.showHint=!1,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=t=>t}}ra.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ra,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),ra.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ra,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ra,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});const la=new y.InjectionToken("live announcer delay",{providedIn:"root",factory:function(){return 100}});function ca(t,e=!1){let n=t.body.querySelector("#ngb-live");return null==n&&e&&(n=t.createElement("div"),n.setAttribute("id","ngb-live"),n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),n.classList.add("visually-hidden"),t.body.appendChild(n)),n}class da{constructor(t,e){this._document=t,this._delay=e}ngOnDestroy(){const t=ca(this._document);t&&t.parentElement.removeChild(t)}say(t){const e=ca(this._document,!0),n=this._delay;if(null!=e){e.textContent="";const i=()=>e.textContent=t;null===n?i():setTimeout(i,n)}}}da.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:da,deps:[{token:_.DOCUMENT},{token:la}],target:y["ɵɵFactoryTarget"].Injectable}),da.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:da,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:da,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Inject,args:[_.DOCUMENT]}]},{type:void 0,decorators:[{type:y.Inject,args:[la]}]}]}});let pa=0;class ha{constructor(t,e,n,i,s,a,o,r,l,c,d){this._elementRef=t,this._renderer=n,this._live=o,this._document=r,this._ngZone=l,this._changeDetector=c,this._subscription=null,this._closed$=new k.Subject,this._inputValueBackup=null,this._inputValueForSelectOnExact=null,this._windowRef=null,this.autocomplete="off",this.placement="bottom-start",this.selectItem=new y.EventEmitter,this.activeDescendant=null,this.popupId="ngb-typeahead-"+pa++,this._onTouched=()=>{},this._onChange=t=>{},this.container=s.container,this.editable=s.editable,this.focusFirst=s.focusFirst,this.selectOnExact=s.selectOnExact,this.showHint=s.showHint,this.placement=s.placement,this.popperOptions=s.popperOptions,this._valueChanges=(0,k.fromEvent)(t.nativeElement,"input").pipe((0,D.map)(t=>t.target.value)),this._resubscribeTypeahead=new k.BehaviorSubject(null),this._popupService=new Fi(oa,i,e,n,this._ngZone,d),this._positioning=$n()}ngOnInit(){this._subscribeToUserInput()}ngOnChanges({ngbTypeahead:t}){t&&!t.firstChange&&(this._unsubscribeFromUserInput(),this._subscribeToUserInput())}ngOnDestroy(){this._closePopup(),this._unsubscribeFromUserInput()}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}writeValue(t){this._writeInputValue(this._formatItemForInput(t)),this.showHint&&(this._inputValueBackup=t)}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}dismissPopup(){this.isPopupOpen()&&(this._resubscribeTypeahead.next(null),this._closePopup(),this.showHint&&null!==this._inputValueBackup&&this._writeInputValue(this._inputValueBackup),this._changeDetector.markForCheck())}isPopupOpen(){return null!=this._windowRef}handleBlur(){this._resubscribeTypeahead.next(null),this._onTouched()}handleKeyDown(t){if(this.isPopupOpen())switch(t.which){case Ve.ArrowDown:t.preventDefault(),this._windowRef.instance.next(),this._showHint();break;case Ve.ArrowUp:t.preventDefault(),this._windowRef.instance.prev(),this._showHint();break;case Ve.Enter:case Ve.Tab:{const e=this._windowRef.instance.getActive();Ht(e)&&(t.preventDefault(),t.stopPropagation(),this._selectResult(e)),this._closePopup();break}}}_openPopup(){if(!this.isPopupOpen()){this._inputValueBackup=this._elementRef.nativeElement.value;const{windowRef:t}=this._popupService.open();this._windowRef=t,this._windowRef.setInput("id",this.popupId),this._windowRef.setInput("popupClass",this.popupClass),this._windowRef.instance.selectEvent.subscribe(t=>this._selectResultClosePopup(t)),this._windowRef.instance.activeChangeEvent.subscribe(t=>this.activeDescendant=t),"body"===this.container&&(this._renderer.setStyle(this._windowRef.location.nativeElement,"z-index","1055"),this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement)),this._changeDetector.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._windowRef&&(this._positioning.createPopper({hostElement:this._elementRef.nativeElement,targetElement:this._windowRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,updatePopperOptions:t=>this.popperOptions(On([0,2])(t))}),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update()))}),gn(this._ngZone,this._document,"outside",()=>this.dismissPopup(),this._closed$,[this._elementRef.nativeElement,this._windowRef.location.nativeElement])}}_closePopup(){this._popupService.close().subscribe(()=>{var t;this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this._closed$.next(),this._windowRef=null,this.activeDescendant=null})}_selectResult(t){let e=!1;this.selectItem.emit({item:t,preventDefault:()=>{e=!0}}),this._resubscribeTypeahead.next(null),e||(this.writeValue(t),this._onChange(t))}_selectResultClosePopup(t){this._selectResult(t),this._closePopup()}_showHint(){var t;if(this.showHint&&(null===(t=this._windowRef)||void 0===t?void 0:t.instance.hasActive())&&null!=this._inputValueBackup){const t=this._inputValueBackup.toLowerCase(),e=this._formatItemForInput(this._windowRef.instance.getActive());t===e.substring(0,this._inputValueBackup.length).toLowerCase()?(this._writeInputValue(this._inputValueBackup+e.substring(this._inputValueBackup.length)),this._elementRef.nativeElement.setSelectionRange.apply(this._elementRef.nativeElement,[this._inputValueBackup.length,e.length])):this._writeInputValue(e)}}_formatItemForInput(t){return null!=t&&this.inputFormatter?this.inputFormatter(t):Ft(t)}_writeInputValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",Ft(t))}_subscribeToUserInput(){const t=this._valueChanges.pipe((0,D.tap)(t=>{this._inputValueBackup=this.showHint?t:null,this._inputValueForSelectOnExact=this.selectOnExact?t:null,this._onChange(this.editable?t:void 0)}),this.ngbTypeahead?this.ngbTypeahead:()=>(0,k.of)([]));this._subscription=this._resubscribeTypeahead.pipe((0,D.switchMap)(()=>t)).subscribe(t=>{t&&0!==t.length?this.selectOnExact&&1===t.length&&this._formatItemForInput(t[0])===this._inputValueForSelectOnExact?(this._selectResult(t[0]),this._closePopup()):(this._openPopup(),this._windowRef.instance.focusFirst=this.focusFirst,this._windowRef.instance.results=t,this._windowRef.instance.term=this._elementRef.nativeElement.value,this.resultFormatter&&(this._windowRef.instance.formatter=this.resultFormatter),this.resultTemplate&&(this._windowRef.instance.resultTemplate=this.resultTemplate),this._windowRef.instance.resetActive(),this._windowRef.changeDetectorRef.detectChanges(),this._showHint()):this._closePopup();const e=t?t.length:0;this._live.say(0===e?"No results available":`${e} result${1===e?"":"s"} available`)})}_unsubscribeFromUserInput(){this._subscription&&this._subscription.unsubscribe(),this._subscription=null}}ha.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ha,deps:[{token:y.ElementRef},{token:y.ViewContainerRef},{token:y.Renderer2},{token:y.Injector},{token:ra},{token:y.NgZone},{token:da},{token:_.DOCUMENT},{token:y.NgZone},{token:y.ChangeDetectorRef},{token:y.ApplicationRef}],target:y["ɵɵFactoryTarget"].Directive}),ha.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ha,isStandalone:!0,selector:"input[ngbTypeahead]",inputs:{autocomplete:"autocomplete",container:"container",editable:"editable",focusFirst:"focusFirst",inputFormatter:"inputFormatter",ngbTypeahead:"ngbTypeahead",resultFormatter:"resultFormatter",resultTemplate:"resultTemplate",selectOnExact:"selectOnExact",showHint:"showHint",placement:"placement",popperOptions:"popperOptions",popupClass:"popupClass"},outputs:{selectItem:"selectItem"},host:{attributes:{autocapitalize:"off",autocorrect:"off",role:"combobox"},listeners:{blur:"handleBlur()",keydown:"handleKeyDown($event)"},properties:{"class.open":"isPopupOpen()",autocomplete:"autocomplete","attr.aria-autocomplete":'showHint ? "both" : "list"',"attr.aria-activedescendant":"activeDescendant","attr.aria-owns":"isPopupOpen() ? popupId : null","attr.aria-expanded":"isPopupOpen()"}},providers:[{provide:w.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>ha),multi:!0}],exportAs:["ngbTypeahead"],usesOnChanges:!0,ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ha,decorators:[{type:y.Directive,args:[{selector:"input[ngbTypeahead]",exportAs:"ngbTypeahead",standalone:!0,host:{"(blur)":"handleBlur()","[class.open]":"isPopupOpen()","(keydown)":"handleKeyDown($event)","[autocomplete]":"autocomplete",autocapitalize:"off",autocorrect:"off",role:"combobox","[attr.aria-autocomplete]":'showHint ? "both" : "list"',"[attr.aria-activedescendant]":"activeDescendant","[attr.aria-owns]":"isPopupOpen() ? popupId : null","[attr.aria-expanded]":"isPopupOpen()"},providers:[{provide:w.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>ha),multi:!0}]}]}],ctorParameters:function(){return[{type:y.ElementRef},{type:y.ViewContainerRef},{type:y.Renderer2},{type:y.Injector},{type:ra},{type:y.NgZone},{type:da},{type:void 0,decorators:[{type:y.Inject,args:[_.DOCUMENT]}]},{type:y.NgZone},{type:y.ChangeDetectorRef},{type:y.ApplicationRef}]},propDecorators:{autocomplete:[{type:y.Input}],container:[{type:y.Input}],editable:[{type:y.Input}],focusFirst:[{type:y.Input}],inputFormatter:[{type:y.Input}],ngbTypeahead:[{type:y.Input}],resultFormatter:[{type:y.Input}],resultTemplate:[{type:y.Input}],selectOnExact:[{type:y.Input}],showHint:[{type:y.Input}],placement:[{type:y.Input}],popperOptions:[{type:y.Input}],popupClass:[{type:y.Input}],selectItem:[{type:y.Output}]}});class ua{}ua.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ua,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),ua.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:x,type:ua,imports:[aa,ha],exports:[aa,ha]}),ua.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ua,imports:[aa]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ua,decorators:[{type:y.NgModule,args:[{imports:[aa,ha],exports:[aa,ha]}]}]});class ma{close(t){}dismiss(t){}}class ga{constructor(t,e,n,i){this._panelCmptRef=t,this._contentRef=e,this._backdropCmptRef=n,this._beforeDismiss=i,this._closed=new k.Subject,this._dismissed=new k.Subject,this._hidden=new k.Subject,t.instance.dismissEvent.subscribe(t=>{this.dismiss(t)}),n&&n.instance.dismissEvent.subscribe(t=>{this.dismiss(t)}),this.result=new Promise((t,e)=>{this._resolve=t,this._reject=e}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe((0,D.takeUntil)(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe((0,D.takeUntil)(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._panelCmptRef.instance.shown.asObservable()}close(t){this._panelCmptRef&&(this._closed.next(t),this._resolve(t),this._removeOffcanvasElements())}_dismiss(t){this._dismissed.next(t),this._reject(t),this._removeOffcanvasElements()}dismiss(t){if(this._panelCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();zt(e)?e.then(e=>{!1!==e&&this._dismiss(t)},()=>{}):!1!==e&&this._dismiss(t)}else this._dismiss(t)}_removeOffcanvasElements(){const t=this._panelCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():(0,k.of)(void 0);t.subscribe(()=>{const{nativeElement:t}=this._panelCmptRef.location;t.parentNode.removeChild(t),this._panelCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._panelCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:t}=this._backdropCmptRef.location;t.parentNode.removeChild(t),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),(0,k.zip)(t,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var fa;!function(t){t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC"}(fa||(fa={}));class ba{constructor(t,e){this._el=t,this._zone=e,this.dismissEvent=new y.EventEmitter}ngOnInit(){this._zone.onStable.asObservable().pipe((0,D.take)(1)).subscribe(()=>{Jt(this._zone,this._el.nativeElement,(t,e)=>{e&&Wt(t),t.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Jt(this._zone,this._el.nativeElement,({classList:t})=>t.remove("show"),{animation:this.animation,runningTransition:"stop"})}dismiss(){this.static||this.dismissEvent.emit(fa.BACKDROP_CLICK)}}ba.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ba,deps:[{token:y.ElementRef},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Component}),ba.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ba,isStandalone:!0,selector:"ngb-offcanvas-backdrop",inputs:{animation:"animation",backdropClass:"backdropClass",static:"static"},outputs:{dismissEvent:"dismiss"},host:{listeners:{mousedown:"dismiss()"},properties:{class:'"offcanvas-backdrop" + (backdropClass ? " " + backdropClass : "")',"class.show":"!animation","class.fade":"animation"}},ngImport:x,template:"",isInline:!0,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ba,decorators:[{type:y.Component,args:[{selector:"ngb-offcanvas-backdrop",standalone:!0,encapsulation:y.ViewEncapsulation.None,template:"",host:{"[class]":'"offcanvas-backdrop" + (backdropClass ? " " + backdropClass : "")',"[class.show]":"!animation","[class.fade]":"animation","(mousedown)":"dismiss()"}}]}],ctorParameters:function(){return[{type:y.ElementRef},{type:y.NgZone}]},propDecorators:{animation:[{type:y.Input}],backdropClass:[{type:y.Input}],static:[{type:y.Input}],dismissEvent:[{type:y.Output,args:["dismiss"]}]}});class va{constructor(t,e,n){this._document=t,this._elRef=e,this._zone=n,this._closed$=new k.Subject,this._elWithFocus=null,this.keyboard=!0,this.position="start",this.dismissEvent=new y.EventEmitter,this.shown=new k.Subject,this.hidden=new k.Subject}dismiss(t){this.dismissEvent.emit(t)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe((0,D.take)(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:t}=this._elRef,e={animation:this.animation,runningTransition:"stop"},n=Jt(this._zone,this._elRef.nativeElement,e=>(t.classList.remove("showing"),t.classList.add("hiding"),()=>t.classList.remove("show","hiding")),e);return n.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),n}_show(){const t={animation:this.animation,runningTransition:"continue"};Jt(this._zone,this._elRef.nativeElement,(t,e)=>(e&&Wt(t),t.classList.add("show","showing"),()=>t.classList.remove("showing")),t).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:t}=this._elRef;this._zone.runOutsideAngular(()=>{(0,k.fromEvent)(t,"keydown").pipe((0,D.takeUntil)(this._closed$),(0,D.filter)(t=>t.which===Ve.Escape)).subscribe(t=>{this.keyboard&&requestAnimationFrame(()=>{t.defaultPrevented||this._zone.run(()=>this.dismiss(fa.ESC))})})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:t}=this._elRef;if(!t.contains(document.activeElement)){const e=t.querySelector("[ngbAutofocus]"),n=bn(t)[0];(e||n||t).focus()}}_restoreFocus(){const t=this._document.body,e=this._elWithFocus;let n;n=e&&e.focus&&t.contains(e)?e:t,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null})}}va.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:va,deps:[{token:_.DOCUMENT},{token:y.ElementRef},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Component}),va.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:va,isStandalone:!0,selector:"ngb-offcanvas-panel",inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",keyboard:"keyboard",panelClass:"panelClass",position:"position"},outputs:{dismissEvent:"dismiss"},host:{attributes:{role:"dialog",tabindex:"-1"},properties:{class:'"offcanvas offcanvas-" + position + (panelClass ? " " + panelClass : "")',"attr.aria-modal":"true","attr.aria-labelledby":"ariaLabelledBy","attr.aria-describedby":"ariaDescribedBy"}},ngImport:x,template:"<ng-content></ng-content>",isInline:!0,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:va,decorators:[{type:y.Component,args:[{selector:"ngb-offcanvas-panel",standalone:!0,template:"<ng-content></ng-content>",encapsulation:y.ViewEncapsulation.None,host:{"[class]":'"offcanvas offcanvas-" + position + (panelClass ? " " + panelClass : "")',role:"dialog",tabindex:"-1","[attr.aria-modal]":"true","[attr.aria-labelledby]":"ariaLabelledBy","[attr.aria-describedby]":"ariaDescribedBy"}}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Inject,args:[_.DOCUMENT]}]},{type:y.ElementRef},{type:y.NgZone}]},propDecorators:{animation:[{type:y.Input}],ariaLabelledBy:[{type:y.Input}],ariaDescribedBy:[{type:y.Input}],keyboard:[{type:y.Input}],panelClass:[{type:y.Input}],position:[{type:y.Input}],dismissEvent:[{type:y.Output,args:["dismiss"]}]}});class ya{constructor(t,e,n,i,s){this._applicationRef=t,this._injector=e,this._document=n,this._scrollBar=i,this._ngZone=s,this._activePanelCmptHasChanged=new k.Subject,this._scrollBarRestoreFn=null,this._backdropAttributes=["animation","backdropClass"],this._panelAttributes=["animation","ariaDescribedBy","ariaLabelledBy","keyboard","panelClass","position"],this._activeInstance=new y.EventEmitter,this._activePanelCmptHasChanged.subscribe(()=>{this._panelCmpt&&vn(this._ngZone,this._panelCmpt.location.nativeElement,this._activePanelCmptHasChanged)})}_restoreScrollBar(){const t=this._scrollBarRestoreFn;t&&(this._scrollBarRestoreFn=null,t())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(t,e,n){const i=n.container instanceof HTMLElement?n.container:Ht(n.container)?this._document.querySelector(n.container):this._document.body;if(!i)throw new Error(`The specified offcanvas container "${n.container||"body"}" was not found in the DOM.`);n.scroll||this._hideScrollBar();const s=new ma,a=this._getContentRef(n.injector||t,e,s);let o=!1!==n.backdrop?this._attachBackdrop(i):void 0,r=this._attachWindowComponent(i,a.nodes),l=new ga(r,a,o,n.beforeDismiss);return this._registerOffcanvasRef(l),this._registerPanelCmpt(r),l.hidden.pipe((0,D.finalize)(()=>this._restoreScrollBar())).subscribe(),s.close=t=>{l.close(t)},s.dismiss=t=>{l.dismiss(t)},this._applyPanelOptions(r.instance,n),o&&o.instance&&(this._applyBackdropOptions(o.instance,n),o.changeDetectorRef.detectChanges()),r.changeDetectorRef.detectChanges(),l}get activeInstance(){return this._activeInstance}dismiss(t){var e;null===(e=this._offcanvasRef)||void 0===e||e.dismiss(t)}hasOpenOffcanvas(){return!!this._offcanvasRef}_attachBackdrop(t){let e=(0,y.createComponent)(ba,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(e.hostView),t.appendChild(e.location.nativeElement),e}_attachWindowComponent(t,e){let n=(0,y.createComponent)(va,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:e});return this._applicationRef.attachView(n.hostView),t.appendChild(n.location.nativeElement),n}_applyPanelOptions(t,e){this._panelAttributes.forEach(n=>{Ht(e[n])&&(t[n]=e[n])})}_applyBackdropOptions(t,e){this._backdropAttributes.forEach(n=>{Ht(e[n])&&(t[n]=e[n])}),t.static="static"===e.backdrop}_getContentRef(t,e,n){return e?e instanceof y.TemplateRef?this._createFromTemplateRef(e,n):At(e)?this._createFromString(e):this._createFromComponent(t,e,n):new Ni([])}_createFromTemplateRef(t,e){const n={$implicit:e,close(t){e.close(t)},dismiss(t){e.dismiss(t)}},i=t.createEmbeddedView(n);return this._applicationRef.attachView(i),new Ni([i.rootNodes],i)}_createFromString(t){const e=this._document.createTextNode(`${t}`);return new Ni([[e]])}_createFromComponent(t,e,n){const i=y.Injector.create({providers:[{provide:ma,useValue:n}],parent:t}),s=(0,y.createComponent)(e,{environmentInjector:this._applicationRef.injector,elementInjector:i}),a=s.location.nativeElement;return this._applicationRef.attachView(s.hostView),new Ni([[a]],s.hostView,s)}_registerOffcanvasRef(t){const e=()=>{this._offcanvasRef=void 0,this._activeInstance.emit(this._offcanvasRef)};this._offcanvasRef=t,this._activeInstance.emit(this._offcanvasRef),t.result.then(e,e)}_registerPanelCmpt(t){this._panelCmpt=t,this._activePanelCmptHasChanged.next(),t.onDestroy(()=>{this._panelCmpt=void 0,this._activePanelCmptHasChanged.next()})}}ya.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ya,deps:[{token:y.ApplicationRef},{token:y.Injector},{token:_.DOCUMENT},{token:Gi},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Injectable}),ya.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ya,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:ya,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:y.ApplicationRef},{type:y.Injector},{type:void 0,decorators:[{type:y.Inject,args:[_.DOCUMENT]}]},{type:Gi},{type:y.NgZone}]}});class xa{constructor(t){this._ngbConfig=t,this.backdrop=!0,this.keyboard=!0,this.position="start",this.scroll=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}xa.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:xa,deps:[{token:Qt}],target:y["ɵɵFactoryTarget"].Injectable}),xa.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:xa,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:xa,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Qt}]}});class _a{constructor(t,e,n){this._injector=t,this._offcanvasStack=e,this._config=n}open(t,e={}){const n=Object.assign(Object.assign(Object.assign({},this._config),{animation:this._config.animation}),e);return this._offcanvasStack.open(this._injector,t,n)}get activeInstance(){return this._offcanvasStack.activeInstance}dismiss(t){this._offcanvasStack.dismiss(t)}hasOpenOffcanvas(){return this._offcanvasStack.hasOpenOffcanvas()}}_a.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:_a,deps:[{token:y.Injector},{token:ya},{token:xa}],target:y["ɵɵFactoryTarget"].Injectable}),_a.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:_a,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:_a,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:y.Injector},{type:ya},{type:xa}]}});class wa{}wa.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:wa,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),wa.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:x,type:wa}),wa.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:wa}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:wa,decorators:[{type:y.NgModule,args:[{}]}]});const ka=[xe,De,Ae,Le,Ii,Pi,Zi,ds,wa,_s,Ts,Rs,Fs,qs,Qs,sa,ua];class Da{}Da.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Da,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Da.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:x,type:Da,imports:[xe,De,Ae,Le,Ii,Pi,Zi,ds,wa,_s,Ts,Rs,Fs,qs,Qs,sa,ua],exports:[xe,De,Ae,Le,Ii,Pi,Zi,ds,wa,_s,Ts,Rs,Fs,qs,Qs,sa,ua]}),Da.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Da,imports:[ka,xe,De,Ae,Le,Ii,Pi,Zi,ds,wa,_s,Ts,Rs,Fs,qs,Qs,sa,ua]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:x,type:Da,decorators:[{type:y.NgModule,args:[{imports:ka,exports:ka}]}]});var Ia=g(650),Ca=g.n(Ia),Ma=g(700);function Sa(t){return t+.5|0}const $a=(t,e,n)=>Math.max(Math.min(t,n),e);function Ta(t){return $a(Sa(2.55*t),0,255)}function Oa(t){return $a(Sa(255*t),0,255)}function Ea(t){return $a(Sa(t/2.55)/100,0,1)}function Ra(t){return $a(Sa(100*t),0,100)}const Pa={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Na=[..."0123456789ABCDEF"],Fa=t=>Na[15&t],Va=t=>Na[(240&t)>>4]+Na[15&t],Aa=t=>(240&t)>>4==(15&t);const La=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ja(t,e,n){const i=e*Math.min(n,1-n),s=(e,s=(e+t/30)%12)=>n-i*Math.max(Math.min(s-3,9-s,1),-1);return[s(0),s(8),s(4)]}function Ha(t,e,n){const i=(i,s=(i+t/60)%6)=>n-n*e*Math.max(Math.min(s,4-s,1),0);return[i(5),i(3),i(1)]}function za(t,e,n){const i=ja(t,1,.5);let s;for(e+n>1&&(s=1/(e+n),e*=s,n*=s),s=0;s<3;s++)i[s]*=1-e-n,i[s]+=e;return i}function Ba(t){const e=t.r/255,n=t.g/255,i=t.b/255,s=Math.max(e,n,i),a=Math.min(e,n,i),o=(s+a)/2;let r,l,c;return s!==a&&(c=s-a,l=o>.5?c/(2-s-a):c/(s+a),r=function(t,e,n,i,s){return t===s?(e-n)/i+(e<n?6:0):e===s?(n-t)/i+2:(t-e)/i+4}(e,n,i,c,s),r=60*r+.5),[0|r,l||0,o]}function Ga(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(Oa)}function Wa(t,e,n){return Ga(ja,t,e,n)}function Ua(t){return(t%360+360)%360}const qa={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Za={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let Ka;const Ya=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,Ja=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Xa=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Qa(t,e,n){if(t){let i=Ba(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,0===e?360:1)),i=Wa(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function to(t,e){return t?Object.assign(e||{},t):t}function eo(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Oa(t[3]))):(e=to(t,{r:0,g:0,b:0,a:1})).a=Oa(e.a),e}function no(t){return"r"===t.charAt(0)?function(t){const e=Ya.exec(t);let n,i,s,a=255;if(e){if(e[7]!==n){const t=+e[7];a=e[8]?Ta(t):$a(255*t,0,255)}return n=+e[1],i=+e[3],s=+e[5],n=255&(e[2]?Ta(n):$a(n,0,255)),i=255&(e[4]?Ta(i):$a(i,0,255)),s=255&(e[6]?Ta(s):$a(s,0,255)),{r:n,g:i,b:s,a}}}(t):function(t){const e=La.exec(t);let n,i=255;if(!e)return;e[5]!==n&&(i=e[6]?Ta(+e[5]):Oa(+e[5]));const s=Ua(+e[2]),a=+e[3]/100,o=+e[4]/100;return n="hwb"===e[1]?function(t,e,n){return Ga(za,t,e,n)}(s,a,o):"hsv"===e[1]?function(t,e,n){return Ga(Ha,t,e,n)}(s,a,o):Wa(s,a,o),{r:n[0],g:n[1],b:n[2],a:i}}(t)}class io{constructor(t){if(t instanceof io)return t;const e=typeof t;let n;var i,s,a;"object"===e?n=eo(t):"string"===e&&(a=(i=t).length,"#"===i[0]&&(4===a||5===a?s={r:255&17*Pa[i[1]],g:255&17*Pa[i[2]],b:255&17*Pa[i[3]],a:5===a?17*Pa[i[4]]:255}:7!==a&&9!==a||(s={r:Pa[i[1]]<<4|Pa[i[2]],g:Pa[i[3]]<<4|Pa[i[4]],b:Pa[i[5]]<<4|Pa[i[6]],a:9===a?Pa[i[7]]<<4|Pa[i[8]]:255})),n=s||function(t){Ka||(Ka=function(){const t={},e=Object.keys(Za),n=Object.keys(qa);let i,s,a,o,r;for(i=0;i<e.length;i++){for(o=r=e[i],s=0;s<n.length;s++)a=n[s],r=r.replace(a,qa[a]);a=parseInt(Za[o],16),t[r]=[a>>16&255,a>>8&255,255&a]}return t}(),Ka.transparent=[0,0,0,0]);const e=Ka[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||no(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=to(this._rgb);return t&&(t.a=Ea(t.a)),t}set rgb(t){this._rgb=eo(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Ea(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?(t=this._rgb,e=(t=>Aa(t.r)&&Aa(t.g)&&Aa(t.b)&&Aa(t.a))(t)?Fa:Va,t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0):void 0;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=Ba(t),n=e[0],i=Ra(e[1]),s=Ra(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${s}%, ${Ea(t.a)})`:`hsl(${n}, ${i}%, ${s}%)`}(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,i=t.rgb;let s;const a=e===s?.5:e,o=2*a-1,r=n.a-i.a,l=((o*r===-1?o:(o+r)/(1+o*r))+1)/2;s=1-l,n.r=255&l*n.r+s*i.r+.5,n.g=255&l*n.g+s*i.g+.5,n.b=255&l*n.b+s*i.b+.5,n.a=a*n.a+(1-a)*i.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,n){const i=Xa(Ea(t.r)),s=Xa(Ea(t.g)),a=Xa(Ea(t.b));return{r:Oa(Ja(i+n*(Xa(Ea(e.r))-i))),g:Oa(Ja(s+n*(Xa(Ea(e.g))-s))),b:Oa(Ja(a+n*(Xa(Ea(e.b))-a))),a:t.a+n*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new io(this.rgb)}alpha(t){return this._rgb.a=Oa(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=Sa(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Qa(this._rgb,2,t),this}darken(t){return Qa(this._rgb,2,-t),this}saturate(t){return Qa(this._rgb,1,t),this}desaturate(t){return Qa(this._rgb,1,-t),this}rotate(t){return function(t,e){var n=Ba(t);n[0]=Ua(n[0]+e),n=Wa(n),t.r=n[0],t.g=n[1],t.b=n[2]}(this._rgb,t),this}}function so(){}const ao=(()=>{let t=0;return()=>t++})();function oo(t){return null==t}function ro(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function lo(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function co(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function po(t,e){return co(t)?t:e}function ho(t,e){return void 0===t?e:t}const uo=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function mo(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)}function go(t,e,n,i){let s,a,o;if(ro(t))if(a=t.length,i)for(s=a-1;s>=0;s--)e.call(n,t[s],s);else for(s=0;s<a;s++)e.call(n,t[s],s);else if(lo(t))for(o=Object.keys(t),a=o.length,s=0;s<a;s++)e.call(n,t[o[s]],o[s])}function fo(t,e){let n,i,s,a;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(s=t[n],a=e[n],s.datasetIndex!==a.datasetIndex||s.index!==a.index)return!1;return!0}function bo(t){if(ro(t))return t.map(bo);if(lo(t)){const e=Object.create(null),n=Object.keys(t),i=n.length;let s=0;for(;s<i;++s)e[n[s]]=bo(t[n[s]]);return e}return t}function vo(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function yo(t,e,n,i){if(!vo(t))return;const s=e[t],a=n[t];lo(s)&&lo(a)?xo(s,a,i):e[t]=bo(a)}function xo(t,e,n){const i=ro(e)?e:[e],s=i.length;if(!lo(t))return t;const a=(n=n||{}).merger||yo;let o;for(let e=0;e<s;++e){if(o=i[e],!lo(o))continue;const s=Object.keys(o);for(let e=0,i=s.length;e<i;++e)a(s[e],t,o,n)}return t}function _o(t,e){return xo(t,e,{merger:wo})}function wo(t,e,n){if(!vo(t))return;const i=e[t],s=n[t];lo(i)&&lo(s)?_o(i,s):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=bo(s))}const ko={"":t=>t,x:t=>t.x,y:t=>t.y};function Do(t,e){const n=ko[e]||(ko[e]=function(t){const e=function(t){const e=t.split("."),n=[];let i="";for(const t of e)i+=t,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}(t);return t=>{for(const n of e){if(""===n)break;t=t&&t[n]}return t}}(e));return n(t)}function Io(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Co=t=>void 0!==t,Mo=t=>"function"==typeof t,So=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0},$o=Math.PI,To=2*$o,Oo=To+$o,Eo=Number.POSITIVE_INFINITY,Ro=$o/180,Po=$o/2,No=$o/4,Fo=2*$o/3,Vo=Math.log10,Ao=Math.sign;function Lo(t,e,n){return Math.abs(t-e)<n}function jo(t){const e=Math.round(t);t=Lo(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(Vo(t))),i=t/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function Ho(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function zo(t,e,n){let i,s,a;for(i=0,s=t.length;i<s;i++)a=t[i][n],isNaN(a)||(e.min=Math.min(e.min,a),e.max=Math.max(e.max,a))}function Bo(t){return t*($o/180)}function Go(t){return t*(180/$o)}function Wo(t){if(!co(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Uo(t,e){const n=e.x-t.x,i=e.y-t.y,s=Math.sqrt(n*n+i*i);let a=Math.atan2(i,n);return a<-.5*$o&&(a+=To),{angle:a,distance:s}}function qo(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Zo(t,e){return(t-e+Oo)%To-$o}function Ko(t){return(t%To+To)%To}function Yo(t,e,n,i){const s=Ko(t),a=Ko(e),o=Ko(n),r=Ko(a-s),l=Ko(o-s),c=Ko(s-a),d=Ko(s-o);return s===a||s===o||i&&a===o||r>l&&c<d}function Jo(t,e,n){return Math.max(e,Math.min(n,t))}function Xo(t,e,n,i=1e-6){return t>=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function Qo(t,e,n){n=n||(n=>t[n]<e);let i,s=t.length-1,a=0;for(;s-a>1;)i=a+s>>1,n(i)?a=i:s=i;return{lo:a,hi:s}}const tr=(t,e,n,i)=>Qo(t,n,i?i=>{const s=t[i][e];return s<n||s===n&&t[i+1][e]===n}:i=>t[i][e]<n),er=(t,e,n)=>Qo(t,n,i=>t[i][e]>=n),nr=["push","pop","shift","splice","unshift"];function ir(t,e){const n=t._chartjs;if(!n)return;const i=n.listeners,s=i.indexOf(e);-1!==s&&i.splice(s,1),i.length>0||(nr.forEach(e=>{delete t[e]}),delete t._chartjs)}function sr(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const ar="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function or(t,e){let n=[],i=!1;return function(...s){n=s,i||(i=!0,ar.call(window,()=>{i=!1,t.apply(e,n)}))}}const rr=t=>"start"===t?"left":"end"===t?"right":"center",lr=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2;function cr(t,e,n){const i=e.length;let s=0,a=i;if(t._sorted){const{iScale:o,vScale:r,_parsed:l}=t,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,d=o.axis,{min:p,max:h,minDefined:u,maxDefined:m}=o.getUserBounds();if(u){if(s=Math.min(tr(l,d,p).lo,n?i:tr(e,d,o.getPixelForValue(p)).lo),c){const t=l.slice(0,s+1).reverse().findIndex(t=>!oo(t[r.axis]));s-=Math.max(0,t)}s=Jo(s,0,i-1)}if(m){let t=Math.max(tr(l,o.axis,h,!0).hi+1,n?0:tr(e,d,o.getPixelForValue(h),!0).hi+1);if(c){const e=l.slice(t-1).findIndex(t=>!oo(t[r.axis]));t+=Math.max(0,e)}a=Jo(t,s,i)-s}else a=i-s}return{start:s,count:a}}function dr(t){const{xScale:e,yScale:n,_scaleRanges:i}=t,s={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!i)return t._scaleRanges=s,!0;const a=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,s),a}const pr=t=>0===t||1===t,hr=(t,e,n)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*To/n),ur=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*To/n)+1,mr={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*Po),easeOutSine:t=>Math.sin(t*Po),easeInOutSine:t=>-.5*(Math.cos($o*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>pr(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>pr(t)?t:hr(t,.075,.3),easeOutElastic:t=>pr(t)?t:ur(t,.075,.3),easeInOutElastic(t){const e=.1125;return pr(t)?t:t<.5?.5*hr(2*t,e,.45):.5+.5*ur(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-mr.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},easeInOutBounce:t=>t<.5?.5*mr.easeInBounce(2*t):.5*mr.easeOutBounce(2*t-1)+.5};function gr(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function fr(t){return gr(t)?t:new io(t)}function br(t){return gr(t)?t:new io(t).saturate(.5).darken(.1).hexString()}const vr=["x","y","borderWidth","radius","tension"],yr=["color","borderColor","backgroundColor"],xr=new Map;function _r(t,e,n){return function(t,e){e=e||{};const n=t+JSON.stringify(e);let i=xr.get(n);return i||(i=new Intl.NumberFormat(t,e),xr.set(n,i)),i}(e,n).format(t)}const wr={values:t=>ro(t)?t:""+t,numeric(t,e,n){if(0===t)return"0";const i=this.chart.options.locale;let s,a=t;if(n.length>1){const e=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(e<1e-4||e>1e15)&&(s="scientific"),a=function(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}(t,n)}const o=Vo(Math.abs(a)),r=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),_r(t,i,l)},logarithmic(t,e,n){if(0===t)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(Vo(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?wr.numeric.call(this,t,e,n):""}};var kr={formatters:wr};const Dr=Object.create(null),Ir=Object.create(null);function Cr(t,e){if(!e)return t;const n=e.split(".");for(let e=0,i=n.length;e<i;++e){const i=n[e];t=t[i]||(t[i]=Object.create(null))}return t}function Mr(t,e,n){return"string"==typeof e?xo(Cr(t,e),n):xo(Cr(t,""),e)}class Sr{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>br(e.backgroundColor),this.hoverBorderColor=(t,e)=>br(e.borderColor),this.hoverColor=(t,e)=>br(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Mr(this,t,e)}get(t){return Cr(this,t)}describe(t,e){return Mr(Ir,t,e)}override(t,e){return Mr(Dr,t,e)}route(t,e,n,i){const s=Cr(this,t),a=Cr(this,n),o="_"+e;Object.defineProperties(s,{[o]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[o],e=a[i];return lo(t)?Object.assign({},e,t):ho(t,e)},set(t){this[o]=t}}})}apply(t){t.forEach(t=>t(this))}}var $r=new Sr({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:yr},numbers:{type:"number",properties:vr}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:kr.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function Tr(t,e,n,i,s){let a=e[s];return a||(a=e[s]=t.measureText(s).width,n.push(s)),a>i&&(i=a),i}function Or(t,e,n,i){let s=(i=i||{}).data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},a=i.garbageCollect=[],i.font=e),t.save(),t.font=e;let o=0;const r=n.length;let l,c,d,p,h;for(l=0;l<r;l++)if(p=n[l],null==p||ro(p)){if(ro(p))for(c=0,d=p.length;c<d;c++)h=p[c],null==h||ro(h)||(o=Tr(t,s,a,o,h))}else o=Tr(t,s,a,o,p);t.restore();const u=a.length/2;if(u>n.length){for(l=0;l<u;l++)delete s[a[l]];a.splice(0,u)}return o}function Er(t,e,n){const i=t.currentDevicePixelRatio,s=0!==n?Math.max(n/2,.5):0;return Math.round((e-s)*i)/i+s}function Rr(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Pr(t,e,n,i){Nr(t,e,n,i,null)}function Nr(t,e,n,i,s){let a,o,r,l,c,d,p,h;const u=e.pointStyle,m=e.rotation,g=e.radius;let f=(m||0)*Ro;if(u&&"object"==typeof u&&(a=u.toString(),"[object HTMLImageElement]"===a||"[object HTMLCanvasElement]"===a))return t.save(),t.translate(n,i),t.rotate(f),t.drawImage(u,-u.width/2,-u.height/2,u.width,u.height),void t.restore();if(!(isNaN(g)||g<=0)){switch(t.beginPath(),u){default:s?t.ellipse(n,i,s/2,g,0,0,To):t.arc(n,i,g,0,To),t.closePath();break;case"triangle":d=s?s/2:g,t.moveTo(n+Math.sin(f)*d,i-Math.cos(f)*g),f+=Fo,t.lineTo(n+Math.sin(f)*d,i-Math.cos(f)*g),f+=Fo,t.lineTo(n+Math.sin(f)*d,i-Math.cos(f)*g),t.closePath();break;case"rectRounded":c=.516*g,l=g-c,o=Math.cos(f+No)*l,p=Math.cos(f+No)*(s?s/2-c:l),r=Math.sin(f+No)*l,h=Math.sin(f+No)*(s?s/2-c:l),t.arc(n-p,i-r,c,f-$o,f-Po),t.arc(n+h,i-o,c,f-Po,f),t.arc(n+p,i+r,c,f,f+Po),t.arc(n-h,i+o,c,f+Po,f+$o),t.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*g,d=s?s/2:l,t.rect(n-d,i-l,2*d,2*l);break}f+=No;case"rectRot":p=Math.cos(f)*(s?s/2:g),o=Math.cos(f)*g,r=Math.sin(f)*g,h=Math.sin(f)*(s?s/2:g),t.moveTo(n-p,i-r),t.lineTo(n+h,i-o),t.lineTo(n+p,i+r),t.lineTo(n-h,i+o),t.closePath();break;case"crossRot":f+=No;case"cross":p=Math.cos(f)*(s?s/2:g),o=Math.cos(f)*g,r=Math.sin(f)*g,h=Math.sin(f)*(s?s/2:g),t.moveTo(n-p,i-r),t.lineTo(n+p,i+r),t.moveTo(n+h,i-o),t.lineTo(n-h,i+o);break;case"star":p=Math.cos(f)*(s?s/2:g),o=Math.cos(f)*g,r=Math.sin(f)*g,h=Math.sin(f)*(s?s/2:g),t.moveTo(n-p,i-r),t.lineTo(n+p,i+r),t.moveTo(n+h,i-o),t.lineTo(n-h,i+o),f+=No,p=Math.cos(f)*(s?s/2:g),o=Math.cos(f)*g,r=Math.sin(f)*g,h=Math.sin(f)*(s?s/2:g),t.moveTo(n-p,i-r),t.lineTo(n+p,i+r),t.moveTo(n+h,i-o),t.lineTo(n-h,i+o);break;case"line":o=s?s/2:Math.cos(f)*g,r=Math.sin(f)*g,t.moveTo(n-o,i-r),t.lineTo(n+o,i+r);break;case"dash":t.moveTo(n,i),t.lineTo(n+Math.cos(f)*(s?s/2:g),i+Math.sin(f)*g);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function Fr(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function Vr(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Ar(t){t.restore()}function Lr(t,e,n,i,s){if(!e)return t.lineTo(n.x,n.y);if("middle"===s){const i=(e.x+n.x)/2;t.lineTo(i,e.y),t.lineTo(i,n.y)}else"after"===s!=!!i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function jr(t,e,n,i){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function Hr(t,e,n,i,s){if(s.strikethrough||s.underline){const a=t.measureText(i),o=e-a.actualBoundingBoxLeft,r=e+a.actualBoundingBoxRight,l=n-a.actualBoundingBoxAscent,c=n+a.actualBoundingBoxDescent,d=s.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=s.decorationWidth||2,t.moveTo(o,d),t.lineTo(r,d),t.stroke()}}function zr(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Br(t,e,n,i,s,a={}){const o=ro(e)?e:[e],r=a.strokeWidth>0&&""!==a.strokeColor;let l,c;for(t.save(),t.font=s.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),oo(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,a),l=0;l<o.length;++l)c=o[l],a.backdrop&&zr(t,a.backdrop),r&&(a.strokeColor&&(t.strokeStyle=a.strokeColor),oo(a.strokeWidth)||(t.lineWidth=a.strokeWidth),t.strokeText(c,n,i,a.maxWidth)),t.fillText(c,n,i,a.maxWidth),Hr(t,n,i,c,a),i+=Number(s.lineHeight);t.restore()}function Gr(t,e){const{x:n,y:i,w:s,h:a,radius:o}=e;t.arc(n+o.topLeft,i+o.topLeft,o.topLeft,1.5*$o,$o,!0),t.lineTo(n,i+a-o.bottomLeft),t.arc(n+o.bottomLeft,i+a-o.bottomLeft,o.bottomLeft,$o,Po,!0),t.lineTo(n+s-o.bottomRight,i+a),t.arc(n+s-o.bottomRight,i+a-o.bottomRight,o.bottomRight,Po,0,!0),t.lineTo(n+s,i+o.topRight),t.arc(n+s-o.topRight,i+o.topRight,o.topRight,0,-Po,!0),t.lineTo(n+o.topLeft,i)}const Wr=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Ur=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function qr(t,e){const n=(""+t).match(Wr);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t}const Zr=t=>+t||0;function Kr(t,e){const n={},i=lo(e),s=i?Object.keys(e):e,a=lo(t)?i?n=>ho(t[n],t[e[n]]):e=>t[e]:()=>t;for(const t of s)n[t]=Zr(a(t));return n}function Yr(t){return Kr(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Jr(t){return Kr(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Xr(t){const e=Yr(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Qr(t,e){t=t||{},e=e||$r.font;let n=ho(t.size,e.size);"string"==typeof n&&(n=parseInt(n,10));let i=ho(t.style,e.style);i&&!(""+i).match(Ur)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:ho(t.family,e.family),lineHeight:qr(ho(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:ho(t.weight,e.weight),string:""};return s.string=function(t){return!t||oo(t.size)||oo(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(s),s}function tl(t,e,n,i){let s,a,o,r=!0;for(s=0,a=t.length;s<a;++s)if(o=t[s],void 0!==o&&(void 0!==e&&"function"==typeof o&&(o=o(e),r=!1),void 0!==n&&ro(o)&&(o=o[n%o.length],r=!1),void 0!==o))return i&&!r&&(i.cacheable=!1),o}function el(t,e){return Object.assign(Object.create(t),e)}function nl(t,e=[""],n,i,s=()=>t[0]){const a=n||t;void 0===i&&(i=ul("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:a,_fallback:i,_getTarget:s,override:n=>nl([n,...t],e,a,i)};return new Proxy(o,{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,i)=>rl(n,i,()=>function(t,e,n,i){let s;for(const a of e)if(s=ul(al(a,t),n),void 0!==s)return ol(t,s)?pl(n,i,t,s):s}(i,e,t,n)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>ml(t).includes(e),ownKeys:t=>ml(t),set(t,e,n){const i=t._storage||(t._storage=s());return t[e]=i[e]=n,delete t._keys,!0}})}function il(t,e,n,i){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:sl(t,i),setContext:e=>il(t,e,n,i),override:s=>il(t.override(s),e,n,i)};return new Proxy(s,{deleteProperty:(e,n)=>(delete e[n],delete t[n],!0),get:(t,e,n)=>rl(t,e,()=>function(t,e,n){const{_proxy:i,_context:s,_subProxy:a,_descriptors:o}=t;let r=i[e];return Mo(r)&&o.isScriptable(e)&&(r=function(t,e,n,i){const{_proxy:s,_context:a,_subProxy:o,_stack:r}=n;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let l=e(a,o||i);return r.delete(t),ol(t,l)&&(l=pl(s._scopes,s,t,l)),l}(e,r,t,n)),ro(r)&&r.length&&(r=function(t,e,n,i){const{_proxy:s,_context:a,_subProxy:o,_descriptors:r}=n;if(void 0!==a.index&&i(t))return e[a.index%e.length];if(lo(e[0])){const n=e,i=s._scopes.filter(t=>t!==n);e=[];for(const l of n){const n=pl(i,s,t,l);e.push(il(n,a,o&&o[t],r))}}return e}(e,r,t,o.isIndexable)),ol(e,r)&&(r=il(r,s,a&&a[e],o)),r}(t,e,n)),getOwnPropertyDescriptor:(e,n)=>e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,n)=>Reflect.has(t,n),ownKeys:()=>Reflect.ownKeys(t),set:(e,n,i)=>(t[n]=i,delete e[n],!0)})}function sl(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:n,indexable:i,isScriptable:Mo(n)?n:()=>n,isIndexable:Mo(i)?i:()=>i}}const al=(t,e)=>t?t+Io(e):e,ol=(t,e)=>lo(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function rl(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const i=n();return t[e]=i,i}function ll(t,e,n){return Mo(t)?t(e,n):t}const cl=(t,e)=>!0===t?e:"string"==typeof t?Do(e,t):void 0;function dl(t,e,n,i,s){for(const a of e){const e=cl(n,a);if(e){t.add(e);const a=ll(e._fallback,n,s);if(void 0!==a&&a!==n&&a!==i)return a}else if(!1===e&&void 0!==i&&n!==i)return null}return!1}function pl(t,e,n,i){const s=e._rootScopes,a=ll(e._fallback,n,i),o=[...t,...s],r=new Set;r.add(i);let l=hl(r,o,n,a||n,i);return null!==l&&(void 0===a||a===n||(l=hl(r,o,a,l,i),null!==l))&&nl(Array.from(r),[""],s,a,()=>function(t,e,n){const i=t._getTarget();e in i||(i[e]={});const s=i[e];return ro(s)&&lo(n)?n:s||{}}(e,n,i))}function hl(t,e,n,i,s){for(;n;)n=dl(t,e,n,i,s);return n}function ul(t,e){for(const n of e){if(!n)continue;const e=n[t];if(void 0!==e)return e}}function ml(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const n of t)for(const t of Object.keys(n).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}function gl(t,e,n,i){const{iScale:s}=t,{key:a="r"}=this._parsing,o=new Array(i);let r,l,c,d;for(r=0,l=i;r<l;++r)c=r+n,d=e[c],o[r]={r:s.parse(Do(d,a),c)};return o}const fl=Number.EPSILON||1e-14,bl=(t,e)=>e<t.length&&!t[e].skip&&t[e],vl=t=>"x"===t?"y":"x";function yl(t,e,n,i){const s=t.skip?e:t,a=e,o=n.skip?e:n,r=qo(a,s),l=qo(o,a);let c=r/(r+l),d=l/(r+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;const p=i*c,h=i*d;return{previous:{x:a.x-p*(o.x-s.x),y:a.y-p*(o.y-s.y)},next:{x:a.x+h*(o.x-s.x),y:a.y+h*(o.y-s.y)}}}function xl(t,e,n){return Math.max(Math.min(t,n),e)}function _l(t,e,n,i,s){let a,o,r,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const n=vl(e),i=t.length,s=Array(i).fill(0),a=Array(i);let o,r,l,c=bl(t,0);for(o=0;o<i;++o)if(r=l,l=c,c=bl(t,o+1),l){if(c){const t=c[e]-l[e];s[o]=0!==t?(c[n]-l[n])/t:0}a[o]=r?c?Ao(s[o-1])!==Ao(s[o])?0:(s[o-1]+s[o])/2:s[o-1]:s[o]}!function(t,e,n){const i=t.length;let s,a,o,r,l,c=bl(t,0);for(let d=0;d<i-1;++d)l=c,c=bl(t,d+1),l&&c&&(Lo(e[d],0,fl)?n[d]=n[d+1]=0:(s=n[d]/e[d],a=n[d+1]/e[d],r=Math.pow(s,2)+Math.pow(a,2),r<=9||(o=3/Math.sqrt(r),n[d]=s*o*e[d],n[d+1]=a*o*e[d])))}(t,s,a),function(t,e,n="x"){const i=vl(n),s=t.length;let a,o,r,l=bl(t,0);for(let c=0;c<s;++c){if(o=r,r=l,l=bl(t,c+1),!r)continue;const s=r[n],d=r[i];o&&(a=(s-o[n])/3,r[`cp1${n}`]=s-a,r[`cp1${i}`]=d-a*e[c]),l&&(a=(l[n]-s)/3,r[`cp2${n}`]=s+a,r[`cp2${i}`]=d+a*e[c])}}(t,a,e)}(t,s);else{let n=i?t[t.length-1]:t[0];for(a=0,o=t.length;a<o;++a)r=t[a],l=yl(n,r,t[Math.min(a+1,o-(i?0:1))%o],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,n=r}e.capBezierPoints&&function(t,e){let n,i,s,a,o,r=Fr(t[0],e);for(n=0,i=t.length;n<i;++n)o=a,a=r,r=n<i-1&&Fr(t[n+1],e),a&&(s=t[n],o&&(s.cp1x=xl(s.cp1x,e.left,e.right),s.cp1y=xl(s.cp1y,e.top,e.bottom)),r&&(s.cp2x=xl(s.cp2x,e.left,e.right),s.cp2y=xl(s.cp2y,e.top,e.bottom)))}(t,n)}function wl(){return"undefined"!=typeof window&&"undefined"!=typeof document}function kl(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Dl(t,e,n){let i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}const Il=t=>t.ownerDocument.defaultView.getComputedStyle(t,null),Cl=["top","right","bottom","left"];function Ml(t,e,n){const i={};n=n?"-"+n:"";for(let s=0;s<4;s++){const a=Cl[s];i[a]=parseFloat(t[e+"-"+a+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function Sl(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,s=Il(n),a="border-box"===s.boxSizing,o=Ml(s,"padding"),r=Ml(s,"border","width"),{x:l,y:c,box:d}=function(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:s,offsetY:a}=i;let o,r,l=!1;if(((t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot))(s,a,t.target))o=s,r=a;else{const t=e.getBoundingClientRect();o=i.clientX-t.left,r=i.clientY-t.top,l=!0}return{x:o,y:r,box:l}}(t,n),p=o.left+(d&&r.left),h=o.top+(d&&r.top);let{width:u,height:m}=e;return a&&(u-=o.width+r.width,m-=o.height+r.height),{x:Math.round((l-p)/u*n.width/i),y:Math.round((c-h)/m*n.height/i)}}const $l=t=>Math.round(10*t)/10;function Tl(t,e,n){const i=e||1,s=$l(t.height*i),a=$l(t.width*i);t.height=$l(t.height),t.width=$l(t.width);const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==i||o.height!==s||o.width!==a)&&(t.currentDevicePixelRatio=i,o.height=s,o.width=a,t.ctx.setTransform(i,0,0,i,0,0),!0)}const Ol=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};wl()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function El(t,e){const n=function(t,e){return Il(t).getPropertyValue(e)}(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Rl(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function Pl(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:"middle"===i?n<.5?t.y:e.y:"after"===i?n<1?t.y:e.y:n>0?e.y:t.y}}function Nl(t,e,n,i){const s={x:t.cp2x,y:t.cp2y},a={x:e.cp1x,y:e.cp1y},o=Rl(t,s,n),r=Rl(s,a,n),l=Rl(a,e,n),c=Rl(o,r,n),d=Rl(r,l,n);return Rl(c,d,n)}function Fl(t,e,n){return t?function(t,e){return{x:n=>t+t+e-n,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,n):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Vl(t,e){let n,i;"ltr"!==e&&"rtl"!==e||(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}function Al(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Ll(t){return"angle"===t?{between:Yo,compare:Zo,normalize:Ko}:{between:Xo,compare:(t,e)=>t-e,normalize:t=>t}}function jl({start:t,end:e,count:n,loop:i,style:s}){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n==0,style:s}}function Hl(t,e,n){if(!n)return[t];const{property:i,start:s,end:a}=n,o=e.length,{compare:r,between:l,normalize:c}=Ll(i),{start:d,end:p,loop:h,style:u}=function(t,e,n){const{property:i,start:s,end:a}=n,{between:o,normalize:r}=Ll(i),l=e.length;let c,d,{start:p,end:h,loop:u}=t;if(u){for(p+=l,h+=l,c=0,d=l;c<d&&o(r(e[p%l][i]),s,a);++c)p--,h--;p%=l,h%=l}return h<p&&(h+=l),{start:p,end:h,loop:u,style:t.style}}(t,e,n),m=[];let g,f,b,v=!1,y=null;const x=()=>v||l(s,b,g)&&0!==r(s,b),_=()=>!v||0===r(a,g)||l(a,b,g);for(let t=d,n=d;t<=p;++t)f=e[t%o],f.skip||(g=c(f[i]),g!==b&&(v=l(g,s,a),null===y&&x()&&(y=0===r(g,s)?t:n),null!==y&&_()&&(m.push(jl({start:y,end:t,loop:h,count:o,style:u})),y=null),n=t,b=g));return null!==y&&m.push(jl({start:y,end:p,loop:h,count:o,style:u})),m}function zl(t,e){const n=[],i=t.segments;for(let s=0;s<i.length;s++){const a=Hl(i[s],t.points,e);a.length&&n.push(...a)}return n}function Bl(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Gl(t,e){if(!e)return!1;const n=[],i=function(t,e){return gr(e)?(n.includes(e)||n.push(e),n.indexOf(e)):e};return JSON.stringify(t,i)!==JSON.stringify(e,i)}function Wl(t,e,n){return t.options.clip?t[n]:e[n]}function Ul(t,e){const n=e._clip;if(n.disabled)return!1;const i=function(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:Wl(n,e,"left"),right:Wl(n,e,"right"),top:Wl(i,e,"top"),bottom:Wl(i,e,"bottom")}:e}(e,t.chartArea);return{left:!1===n.left?0:i.left-(!0===n.left?0:n.left),right:!1===n.right?t.width:i.right+(!0===n.right?0:n.right),top:!1===n.top?0:i.top-(!0===n.top?0:n.top),bottom:!1===n.bottom?t.height:i.bottom+(!0===n.bottom?0:n.bottom)}}class ql{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,i){const s=e.listeners[i],a=e.duration;s.forEach(i=>i({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(n-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=ar.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((n,i)=>{if(!n.running||!n.items.length)return;const s=n.items;let a,o=s.length-1,r=!1;for(;o>=0;--o)a=s[o],a._active?(a._total>n.duration&&(n.duration=a._total),a.tick(t),r=!0):(s[o]=s[s.length-1],s.pop());r&&(i.draw(),this._notify(i,n,t,"progress")),s.length||(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),e+=s.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Zl=new ql;const Kl="transparent",Yl={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){const i=fr(t||Kl),s=i.valid&&fr(e||Kl);return s&&s.valid?s.mix(i,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class Jl{constructor(t,e,n,i){const s=e[n];i=tl([t.to,i,s,t.from]);const a=tl([t.from,s,i]);this._active=!0,this._fn=t.fn||Yl[t.type||typeof a],this._easing=mr[t.easing]||mr.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const i=this._target[this._prop],s=n-this._start,a=this._duration-s;this._start=n,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=tl([t.to,e,i,t.from]),this._from=tl([t.from,i,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,i=this._prop,s=this._from,a=this._loop,o=this._to;let r;if(this._active=s!==o&&(a||e<n),!this._active)return this._target[i]=o,void this._notify(!0);e<0?this._target[i]=s:(r=e/n%2,r=a&&r>1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[i]=this._fn(s,o,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let t=0;t<n.length;t++)n[t][e]()}}class Xl{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!lo(t))return;const e=Object.keys($r.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const s=t[i];if(!lo(s))return;const a={};for(const t of e)a[t]=s[t];(ro(s.properties)&&s.properties||[i]).forEach(t=>{t!==i&&n.has(t)||n.set(t,a)})})}_animateOptions(t,e){const n=e.options,i=function(t,e){if(!e)return;let n=t.options;if(n)return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n;t.options=e}(t,n);if(!i)return[];const s=this._createAnimations(i,n);return n.$shared&&function(t,e){const n=[],i=Object.keys(e);for(let e=0;e<i.length;e++){const s=t[i[e]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}(t.options.$animations,n).then(()=>{t.options=n},()=>{}),s}_createAnimations(t,e){const n=this._properties,i=[],s=t.$animations||(t.$animations={}),a=Object.keys(e),o=Date.now();let r;for(r=a.length-1;r>=0;--r){const l=a[r];if("$"===l.charAt(0))continue;if("options"===l){i.push(...this._animateOptions(t,e));continue}const c=e[l];let d=s[l];const p=n.get(l);if(d){if(p&&d.active()){d.update(p,c,o);continue}d.cancel()}p&&p.duration?(s[l]=d=new Jl(p,t,l,c),i.push(d)):t[l]=c}return i}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(Zl.add(this._chart,n),!0):void 0}}function Ql(t,e){const n=t&&t.options||{},i=n.reverse,s=void 0===n.min?e:0,a=void 0===n.max?e:0;return{start:i?a:s,end:i?s:a}}function tc(t,e){const n=[],i=t._getSortedDatasetMetas(e);let s,a;for(s=0,a=i.length;s<a;++s)n.push(i[s].index);return n}function ec(t,e,n,i={}){const s=t.keys,a="single"===i.mode;let o,r,l,c;if(null===e)return;let d=!1;for(o=0,r=s.length;o<r;++o){if(l=+s[o],l===n){if(d=!0,i.all)continue;break}c=t.values[l],co(c)&&(a||0===e||Ao(e)===Ao(c))&&(e+=c)}return d||i.all?e:0}function nc(t,e){const n=t&&t.options.stacked;return n||void 0===n&&void 0!==e.stack}function ic(t,e,n){const i=t[e]||(t[e]={});return i[n]||(i[n]={})}function sc(t,e,n,i){for(const s of e.getMatchingVisibleMetas(i).reverse()){const e=t[s.index];if(n&&e>0||!n&&e<0)return s.index}return null}function ac(t,e){const{chart:n,_cachedMeta:i}=t,s=n._stacks||(n._stacks={}),{iScale:a,vScale:o,index:r}=i,l=a.axis,c=o.axis,d=function(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}(a,o,i),p=e.length;let h;for(let t=0;t<p;++t){const n=e[t],{[l]:a,[c]:p}=n;h=(n._stacks||(n._stacks={}))[c]=ic(s,d,a),h[r]=p,h._top=sc(h,o,!0,i.type),h._bottom=sc(h,o,!1,i.type),(h._visualValues||(h._visualValues={}))[r]=p}}function oc(t,e){const n=t.scales;return Object.keys(n).filter(t=>n[t].axis===e).shift()}function rc(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[i]||void 0===e[i][n])return;delete e[i][n],void 0!==e[i]._visualValues&&void 0!==e[i]._visualValues[n]&&delete e[i]._visualValues[n]}}}const lc=t=>"reset"===t||"none"===t,cc=(t,e)=>e?t:Object.assign({},t);class dc{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=nc(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&rc(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),i=(t,e,n,i)=>"x"===t?e:"r"===t?i:n,s=e.xAxisID=ho(n.xAxisID,oc(t,"x")),a=e.yAxisID=ho(n.yAxisID,oc(t,"y")),o=e.rAxisID=ho(n.rAxisID,oc(t,"r")),r=e.indexAxis,l=e.iAxisID=i(r,s,a,o),c=e.vAxisID=i(r,a,s,o);e.xScale=this.getScaleForId(s),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ir(this._data,this),t._stacked&&rc(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(lo(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:n,vScale:i}=e,s="x"===n.axis?"x":"y",a="x"===i.axis?"x":"y",o=Object.keys(t),r=new Array(o.length);let l,c,d;for(l=0,c=o.length;l<c;++l)d=o[l],r[l]={[s]:d,[a]:t[d]};return r}(e,t)}else if(n!==e){if(n){ir(n,this);const t=this._cachedMeta;rc(t),t._parsed=[]}e&&Object.isExtensible(e)&&((i=e)._chartjs?i._chartjs.listeners.push(this):(Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[this]}}),nr.forEach(t=>{const e="_onData"+Io(t),n=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(...t){const s=n.apply(this,t);return i._chartjs.listeners.forEach(n=>{"function"==typeof n[e]&&n[e](...t)}),s}})}))),this._syncList=[],this._data=e}var i}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const s=e._stacked;e._stacked=nc(e.vScale,e),e.stack!==n.stack&&(i=!0,rc(e),e.stack=n.stack),this._resyncElements(t),(i||s!==e._stacked)&&(ac(this,e._parsed),e._stacked=nc(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:i}=this,{iScale:s,_stacked:a}=n,o=s.axis;let r,l,c,d=0===t&&e===i.length||n._sorted,p=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=i,n._sorted=!0,c=i;else{c=ro(i[t])?this.parseArrayData(n,i,t,e):lo(i[t])?this.parseObjectData(n,i,t,e):this.parsePrimitiveData(n,i,t,e);const s=()=>null===l[o]||p&&l[o]<p[o];for(r=0;r<e;++r)n._parsed[r+t]=l=c[r],d&&(s()&&(d=!1),p=l);n._sorted=d}a&&ac(this,c)}parsePrimitiveData(t,e,n,i){const{iScale:s,vScale:a}=t,o=s.axis,r=a.axis,l=s.getLabels(),c=s===a,d=new Array(i);let p,h,u;for(p=0,h=i;p<h;++p)u=p+n,d[p]={[o]:c||s.parse(l[u],u),[r]:a.parse(e[u],u)};return d}parseArrayData(t,e,n,i){const{xScale:s,yScale:a}=t,o=new Array(i);let r,l,c,d;for(r=0,l=i;r<l;++r)c=r+n,d=e[c],o[r]={x:s.parse(d[0],c),y:a.parse(d[1],c)};return o}parseObjectData(t,e,n,i){const{xScale:s,yScale:a}=t,{xAxisKey:o="x",yAxisKey:r="y"}=this._parsing,l=new Array(i);let c,d,p,h;for(c=0,d=i;c<d;++c)p=c+n,h=e[p],l[c]={x:s.parse(Do(h,o),p),y:a.parse(Do(h,r),p)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const i=this.chart,s=this._cachedMeta,a=e[t.axis];return ec({keys:tc(i,!0),values:e._stacks[t.axis]._visualValues},a,s.index,{mode:n})}updateRangeFromParsed(t,e,n,i){const s=n[e.axis];let a=null===s?NaN:s;const o=i&&n._stacks[e.axis];i&&o&&(i.values=o,a=ec(i,s,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const n=this._cachedMeta,i=n._parsed,s=n._sorted&&t===n.iScale,a=i.length,o=this._getOtherScale(t),r=((t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:tc(n,!0),values:null})(e,n,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=function(t){const{min:e,max:n,minDefined:i,maxDefined:s}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}(o);let p,h;function u(){h=i[p];const e=h[o.axis];return!co(h[t.axis])||c>e||d<e}for(p=0;p<a&&(u()||(this.updateRangeFromParsed(l,t,h,r),!s));++p);if(s)for(p=a-1;p>=0;--p)if(!u()){this.updateRangeFromParsed(l,t,h,r);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let i,s,a;for(i=0,s=e.length;i<s;++i)a=e[i][t.axis],co(a)&&n.push(a);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,i=e.vScale,s=this.getParsed(t);return{label:n?""+n.getLabelForValue(s[n.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,n,i,s;return lo(t)?(e=t.top,n=t.right,i=t.bottom,s=t.left):e=n=i=s=t,{top:e,right:n,bottom:i,left:s,disabled:!1===t}}(ho(this.options.clip,function(t,e,n){if(!1===n)return!1;const i=Ql(t,n),s=Ql(e,n);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,n=this._cachedMeta,i=n.data||[],s=e.chartArea,a=[],o=this._drawStart||0,r=this._drawCount||i.length-o,l=this.options.drawActiveElementsOnTop;let c;for(n.dataset&&n.dataset.draw(t,s,o,r),c=o;c<o+r;++c){const e=i[c];e.hidden||(e.active&&l?a.push(e):e.draw(t,s))}for(c=0;c<a.length;++c)a[c].draw(t,s)}getStyle(t,e){const n=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const i=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];s=e.$context||(e.$context=function(t,e,n){return el(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),s.parsed=this.getParsed(t),s.raw=i.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=function(t,e){return el(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!e,s.mode=n,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){const i="active"===e,s=this._cachedDataOpts,a=t+"-"+e,o=s[a],r=this.enableOptionSharing&&Co(n);if(o)return cc(o,r);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],p=l.getOptionScopes(this.getDataset(),c),h=Object.keys($r.elements[t]),u=l.resolveNamedOptions(p,h,()=>this.getContext(n,i,e),d);return u.$shared&&(u.$shared=r,s[a]=Object.freeze(cc(u,r))),u}_resolveAnimations(t,e,n){const i=this.chart,s=this._cachedDataOpts,a=`animation-${e}`,o=s[a];if(o)return o;let r;if(!1!==i.options.animation){const i=this.chart.config,s=i.datasetAnimationScopeKeys(this._type,e),a=i.getOptionScopes(this.getDataset(),s);r=i.createResolver(a,this.getContext(t,n,e))}const l=new Xl(i,r&&r.animations);return r&&r._cacheable&&(s[a]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||lc(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),i=this._sharedOptions,s=this.getSharedOptions(n),a=this.includeOptions(e,s)||s!==i;return this.updateSharedOptions(s,e,n),{sharedOptions:s,includeOptions:a}}updateElement(t,e,n,i){lc(i)?Object.assign(t,n):this._resolveAnimations(e,i).update(t,n)}updateSharedOptions(t,e,n){t&&!lc(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,i){t.active=i;const s=this.getStyle(e,i);this._resolveAnimations(e,n,i).update(t,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[t,e,n]of this._syncList)this[t](e,n);this._syncList=[];const i=n.length,s=e.length,a=Math.min(s,i);a&&this.parse(0,a),s>i?this._insertElements(i,s-i,t):s<i&&this._removeElements(s,i-s)}_insertElements(t,e,n=!0){const i=this._cachedMeta,s=i.data,a=t+e;let o;const r=t=>{for(t.length+=e,o=t.length-1;o>=a;o--)t[o]=t[o-e]};for(r(s),o=t;o<a;++o)s[o]=new this.dataElementType;this._parsing&&r(i._parsed),this.parse(t,e),n&&this.updateElements(s,t,e,"reset")}updateElements(t,e,n,i){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const i=n._parsed.splice(t,e);n._stacked&&rc(n,i)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,n,i]=t;this[e](n,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function pc(t){const e=t.iScale,n=function(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let i=[];for(let e=0,s=n.length;e<s;e++)i=i.concat(n[e].controller.getAllParsedValues(t));t._cache.$bar=sr(i.sort((t,e)=>t-e))}return t._cache.$bar}(e,t.type);let i,s,a,o,r=e._length;const l=()=>{32767!==a&&-32768!==a&&(Co(o)&&(r=Math.min(r,Math.abs(a-o)||r)),o=a)};for(i=0,s=n.length;i<s;++i)a=e.getPixelForValue(n[i]),l();for(o=void 0,i=0,s=e.ticks.length;i<s;++i)a=e.getPixelForTick(i),l();return r}function hc(t,e,n,i){return ro(t)?function(t,e,n,i){const s=n.parse(t[0],i),a=n.parse(t[1],i),o=Math.min(s,a),r=Math.max(s,a);let l=o,c=r;Math.abs(o)>Math.abs(r)&&(l=r,c=o),e[n.axis]=c,e._custom={barStart:l,barEnd:c,start:s,end:a,min:o,max:r}}(t,e,n,i):e[n.axis]=n.parse(t,i),e}function uc(t,e,n,i){const s=t.iScale,a=t.vScale,o=s.getLabels(),r=s===a,l=[];let c,d,p,h;for(c=n,d=n+i;c<d;++c)h=e[c],p={},p[s.axis]=r||s.parse(o[c],c),l.push(hc(h,p,a,c));return l}function mc(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function gc(t,e,n,i){let s=e.borderSkipped;const a={};if(!s)return void(t.borderSkipped=a);if(!0===s)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:o,end:r,reverse:l,top:c,bottom:d}=function(t){let e,n,i,s,a;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.base<t.y,n="bottom",i="top"),e?(s="end",a="start"):(s="start",a="end"),{start:n,end:i,reverse:e,top:s,bottom:a}}(t);"middle"===s&&n&&(t.enableBorderRadius=!0,(n._top||0)===i?s=c:(n._bottom||0)===i?s=d:(a[fc(d,o,r,l)]=!0,s=c)),a[fc(s,o,r,l)]=!0,t.borderSkipped=a}function fc(t,e,n,i){var s,a,o;return i?(o=n,t=bc(t=(s=t)===(a=e)?o:s===o?a:s,n,e)):t=bc(t,e,n),t}function bc(t,e,n){return"start"===t?e:"end"===t?n:t}function vc(t,{inflateAmount:e},n){t.inflateAmount="auto"===e?1===n?.33:0:e}class yc extends dc{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:n,textAlign:i,color:s,useBorderRadius:a,borderRadius:o}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((e,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:e,fillStyle:l.backgroundColor,fontColor:s,hidden:!t.getDataVisibility(r),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:i,pointStyle:n,borderRadius:a&&(o||l.borderRadius),index:r}}):[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const n=this.getDataset().data,i=this._cachedMeta;if(!1===this._parsing)i._parsed=n;else{let s,a,o=t=>+n[t];if(lo(n[t])){const{key:t="value"}=this._parsing;o=e=>+Do(n[e],t)}for(s=t,a=t+e;s<a;++s)i._parsed[s]=o(s)}}_getRotation(){return Bo(this.options.rotation-90)}_getCircumference(){return Bo(this.options.circumference)}_getRotationExtents(){let t=To,e=-To;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const i=this.chart.getDatasetMeta(n).controller,s=i._getRotation(),a=i._getCircumference();t=Math.min(t,s),e=Math.max(e,s+a)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:n}=e,i=this._cachedMeta,s=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,o=Math.max((Math.min(n.width,n.height)-a)/2,0),r=Math.min((c=o,"string"==typeof(l=this.options.cutout)&&l.endsWith("%")?parseFloat(l)/100:+l/c),1);var l,c;const d=this._getRingWeight(this.index),{circumference:p,rotation:h}=this._getRotationExtents(),{ratioX:u,ratioY:m,offsetX:g,offsetY:f}=function(t,e,n){let i=1,s=1,a=0,o=0;if(e<To){const r=t,l=r+e,c=Math.cos(r),d=Math.sin(r),p=Math.cos(l),h=Math.sin(l),u=(t,e,i)=>Yo(t,r,l,!0)?1:Math.max(e,e*n,i,i*n),m=(t,e,i)=>Yo(t,r,l,!0)?-1:Math.min(e,e*n,i,i*n),g=u(0,c,p),f=u(Po,d,h),b=m($o,c,p),v=m($o+Po,d,h);i=(g-b)/2,s=(f-v)/2,a=-(g+b)/2,o=-(f+v)/2}return{ratioX:i,ratioY:s,offsetX:a,offsetY:o}}(h,p,r),b=(n.width-a)/u,v=(n.height-a)/m,y=Math.max(Math.min(b,v)/2,0),x=uo(this.options.radius,y),_=(x-Math.max(x*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=f*x,i.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*d,0),this.updateElements(s,0,s.length,t)}_circumference(t,e){const n=this.options,i=this._cachedMeta,s=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===i._parsed[t]||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*s/To)}updateElements(t,e,n,i){const s="reset"===i,a=this.chart,o=a.chartArea,r=a.options.animation,l=(o.left+o.right)/2,c=(o.top+o.bottom)/2,d=s&&r.animateScale,p=d?0:this.innerRadius,h=d?0:this.outerRadius,{sharedOptions:u,includeOptions:m}=this._getSharedOptions(e,i);let g,f=this._getRotation();for(g=0;g<e;++g)f+=this._circumference(g,s);for(g=e;g<e+n;++g){const e=this._circumference(g,s),n=t[g],a={x:l+this.offsetX,y:c+this.offsetY,startAngle:f,endAngle:f+e,circumference:e,outerRadius:h,innerRadius:p};m&&(a.options=u||this.resolveDataElementOptions(g,n.active?"active":i)),f+=e,this.updateElement(n,g,a,i)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let n,i=0;for(n=0;n<e.length;n++){const s=t._parsed[n];null===s||isNaN(s)||!this.chart.getDataVisibility(n)||e[n].hidden||(i+=Math.abs(s))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?To*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,i=n.data.labels||[],s=_r(e._parsed[t],n.options.locale);return{label:i[t]||"",value:s}}getMaxBorderWidth(t){let e=0;const n=this.chart;let i,s,a,o,r;if(!t)for(i=0,s=n.data.datasets.length;i<s;++i)if(n.isDatasetVisible(i)){a=n.getDatasetMeta(i),t=a.data,o=a.controller;break}if(!t)return 0;for(i=0,s=t.length;i<s;++i)r=o.resolveDataElementOptions(i),"inner"!==r.borderAlign&&(e=Math.max(e,r.borderWidth||0,r.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let n=0,i=t.length;n<i;++n){const t=this.resolveDataElementOptions(n);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max(ho(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class xc extends dc{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:i}}=t.legend.options;return e.labels.map((e,s)=>{const a=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:i,lineWidth:a.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,i=n.data.labels||[],s=_r(e._parsed[t].r,n.options.locale);return{label:i[t]||"",value:s}}parseObjectData(t,e,n,i){return gl.bind(this)(t,e,n,i)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((t,n)=>{const i=this.getParsed(n).r;!isNaN(i)&&this.chart.getDataVisibility(n)&&(i<e.min&&(e.min=i),i>e.max&&(e.max=i))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,n=t.options,i=Math.min(e.right-e.left,e.bottom-e.top),s=Math.max(i/2,0),a=(s-Math.max(n.cutoutPercentage?s/100*n.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=s-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,n,i){const s="reset"===i,a=this.chart,o=a.options.animation,r=this._cachedMeta.rScale,l=r.xCenter,c=r.yCenter,d=r.getIndexAngle(0)-.5*$o;let p,h=d;const u=360/this.countVisibleElements();for(p=0;p<e;++p)h+=this._computeAngle(p,i,u);for(p=e;p<e+n;p++){const e=t[p];let n=h,m=h+this._computeAngle(p,i,u),g=a.getDataVisibility(p)?r.getDistanceFromCenterForValue(this.getParsed(p).r):0;h=m,s&&(o.animateScale&&(g=0),o.animateRotate&&(n=m=d));const f={x:l,y:c,innerRadius:0,outerRadius:g,startAngle:n,endAngle:m,options:this.resolveDataElementOptions(p,e.active?"active":i)};this.updateElement(e,p,f,i)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((t,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?Bo(this.resolveDataElementOptions(t,e).angle||n):0}}var _c=Object.freeze({__proto__:null,BarController:class extends dc{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,n,i){return uc(t,e,n,i)}parseArrayData(t,e,n,i){return uc(t,e,n,i)}parseObjectData(t,e,n,i){const{iScale:s,vScale:a}=t,{xAxisKey:o="x",yAxisKey:r="y"}=this._parsing,l="x"===s.axis?o:r,c="x"===a.axis?o:r,d=[];let p,h,u,m;for(p=n,h=n+i;p<h;++p)m=e[p],u={},u[s.axis]=s.parse(Do(m,l),p),d.push(hc(Do(m,c),u,a,p));return d}updateRangeFromParsed(t,e,n,i){super.updateRangeFromParsed(t,e,n,i);const s=n._custom;s&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:n,vScale:i}=e,s=this.getParsed(t),a=s._custom,o=mc(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+n.getLabelForValue(s[n.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,i){const s="reset"===i,{index:a,_cachedMeta:{vScale:o}}=this,r=o.getBasePixel(),l=o.isHorizontal(),c=this._getRuler(),{sharedOptions:d,includeOptions:p}=this._getSharedOptions(e,i);for(let h=e;h<e+n;h++){const e=this.getParsed(h),n=s||oo(e[o.axis])?{base:r,head:r}:this._calculateBarValuePixels(h),u=this._calculateBarIndexPixels(h,c),m=(e._stacks||{})[o.axis],g={horizontal:l,base:n.base,enableBorderRadius:!m||mc(e._custom)||a===m._top||a===m._bottom,x:l?n.head:u.center,y:l?u.center:n.head,height:l?u.size:Math.abs(n.size),width:l?Math.abs(n.size):u.size};p&&(g.options=d||this.resolveDataElementOptions(h,t[h].active?"active":i));const f=g.options||t[h].options;gc(g,f,m,a),vc(g,f,c.ratio),this.updateElement(t[h],h,g,i)}}_getStacks(t,e){const{iScale:n}=this._cachedMeta,i=n.getMatchingVisibleMetas(this._type).filter(t=>t.controller.options.grouped),s=n.options.stacked,a=[],o=this._cachedMeta.controller.getParsed(e),r=o&&o[n.axis],l=t=>{const e=t._parsed.find(t=>t[n.axis]===r),i=e&&e[t.vScale.axis];if(oo(i)||isNaN(i))return!0};for(const n of i)if((void 0===e||!l(n))&&((!1===s||-1===a.indexOf(n.stack)||void 0===s&&void 0===n.stack)&&a.push(n.stack),n.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(n=>t[n].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const n of this.chart.data.datasets)t[ho("x"===this.chart.options.indexAxis?n.xAxisID:n.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,n){const i=this._getStacks(t,n),s=void 0!==e?i.indexOf(e):-1;return-1===s?i.length-1:s}_getRuler(){const t=this.options,e=this._cachedMeta,n=e.iScale,i=[];let s,a;for(s=0,a=e.data.length;s<a;++s)i.push(n.getPixelForValue(this.getParsed(s)[n.axis],s));const o=t.barThickness;return{min:o||pc(e),pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:n,index:i},options:{base:s,minBarLength:a}}=this,o=s||0,r=this.getParsed(t),l=r._custom,c=mc(l);let d,p,h=r[e.axis],u=0,m=n?this.applyStack(e,r,n):h;m!==h&&(u=m-h,m=h),c&&(h=l.barStart,m=l.barEnd-l.barStart,0!==h&&Ao(h)!==Ao(l.barEnd)&&(u=0),u+=h);const g=oo(s)||c?u:s;let f=e.getPixelForValue(g);if(d=this.chart.getDataVisibility(t)?e.getPixelForValue(u+m):f,p=d-f,Math.abs(p)<a){p=function(t,e,n){return 0!==t?Ao(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}(p,e,o)*a,h===o&&(f-=p/2);const t=e.getPixelForDecimal(0),s=e.getPixelForDecimal(1),l=Math.min(t,s),u=Math.max(t,s);f=Math.max(Math.min(f,u),l),d=f+p,n&&!c&&(r._stacks[e.axis]._visualValues[i]=e.getValueForPixel(d)-e.getValueForPixel(f))}if(f===e.getPixelForValue(o)){const t=Ao(p)*e.getLineWidthForValue(o)/2;f+=t,p-=t}return{size:p,base:f,head:d,center:d+p/2}}_calculateBarIndexPixels(t,e){const n=e.scale,i=this.options,s=i.skipNull,a=ho(i.maxBarThickness,1/0);let o,r;const l=this._getAxisCount();if(e.grouped){const n=s?this._getStackCount(t):e.stackCount,c="flex"===i.barThickness?function(t,e,n,i){const s=e.pixels,a=s[t];let o=t>0?s[t-1]:null,r=t<s.length-1?s[t+1]:null;const l=n.categoryPercentage;null===o&&(o=a-(null===r?e.end-e.start:r-a)),null===r&&(r=a+a-o);const c=a-(a-Math.min(o,r))/2*l;return{chunk:Math.abs(r-o)/2*l/i,ratio:n.barPercentage,start:c}}(t,e,i,n*l):function(t,e,n,i){const s=n.barThickness;let a,o;return oo(s)?(a=e.min*n.categoryPercentage,o=n.barPercentage):(a=s*i,o=1),{chunk:a/i,ratio:o,start:e.pixels[t]-a/2}}(t,e,i,n*l),d="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(ho(d,this.getFirstScaleIdForIndexAxis())),h=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0)+p;o=c.start+c.chunk*h+c.chunk/2,r=Math.min(a,c.chunk*c.ratio)}else o=n.getPixelForValue(this.getParsed(t)[n.axis],t),r=Math.min(a,e.min*e.ratio);return{base:o-r/2,head:o+r/2,center:o,size:r}}draw(){const t=this._cachedMeta,e=t.vScale,n=t.data,i=n.length;let s=0;for(;s<i;++s)null===this.getParsed(s)[e.axis]||n[s].hidden||n[s].draw(this._ctx)}},BubbleController:class extends dc{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,n,i){const s=super.parsePrimitiveData(t,e,n,i);for(let t=0;t<s.length;t++)s[t]._custom=this.resolveDataElementOptions(t+n).radius;return s}parseArrayData(t,e,n,i){const s=super.parseArrayData(t,e,n,i);for(let t=0;t<s.length;t++){const i=e[n+t];s[t]._custom=ho(i[2],this.resolveDataElementOptions(t+n).radius)}return s}parseObjectData(t,e,n,i){const s=super.parseObjectData(t,e,n,i);for(let t=0;t<s.length;t++){const i=e[n+t];s[t]._custom=ho(i&&i.r&&+i.r,this.resolveDataElementOptions(t+n).radius)}return s}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:i,yScale:s}=e,a=this.getParsed(t),o=i.getLabelForValue(a.x),r=s.getLabelForValue(a.y),l=a._custom;return{label:n[t]||"",value:"("+o+", "+r+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,n,i){const s="reset"===i,{iScale:a,vScale:o}=this._cachedMeta,{sharedOptions:r,includeOptions:l}=this._getSharedOptions(e,i),c=a.axis,d=o.axis;for(let p=e;p<e+n;p++){const e=t[p],n=!s&&this.getParsed(p),h={},u=h[c]=s?a.getPixelForDecimal(.5):a.getPixelForValue(n[c]),m=h[d]=s?o.getBasePixel():o.getPixelForValue(n[d]);h.skip=isNaN(u)||isNaN(m),l&&(h.options=r||this.resolveDataElementOptions(p,e.active?"active":i),s&&(h.options.radius=0)),this.updateElement(e,p,h,i)}}resolveDataElementOptions(t,e){const n=this.getParsed(t);let i=super.resolveDataElementOptions(t,e);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const s=i.radius;return"active"!==e&&(i.radius=0),i.radius+=ho(n&&n._custom,s),i}},DoughnutController:yc,LineController:class extends dc{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:n,data:i=[],_dataset:s}=e,a=this.chart._animationsDisabled;let{start:o,count:r}=cr(e,i,a);this._drawStart=o,this._drawCount=r,dr(e)&&(o=0,r=i.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!s._decimated,n.points=i;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(n,void 0,{animated:!a,options:l},t),this.updateElements(i,o,r,t)}updateElements(t,e,n,i){const s="reset"===i,{iScale:a,vScale:o,_stacked:r,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(e,i),p=a.axis,h=o.axis,{spanGaps:u,segment:m}=this.options,g=Ho(u)?u:Number.POSITIVE_INFINITY,f=this.chart._animationsDisabled||s||"none"===i,b=e+n,v=t.length;let y=e>0&&this.getParsed(e-1);for(let n=0;n<v;++n){const u=t[n],v=f?u:{};if(n<e||n>=b){v.skip=!0;continue}const x=this.getParsed(n),_=oo(x[h]),w=v[p]=a.getPixelForValue(x[p],n),k=v[h]=s||_?o.getBasePixel():o.getPixelForValue(r?this.applyStack(o,x,r):x[h],n);v.skip=isNaN(w)||isNaN(k)||_,v.stop=n>0&&Math.abs(x[p]-y[p])>g,m&&(v.parsed=x,v.raw=l.data[n]),d&&(v.options=c||this.resolveDataElementOptions(n,u.active?"active":i)),f||this.updateElement(u,n,v,i),y=x}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return n;const s=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,s,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},PieController:class extends yc{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},PolarAreaController:xc,RadarController:class extends dc{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,n=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(n[e.axis])}}parseObjectData(t,e,n,i){return gl.bind(this)(t,e,n,i)}update(t){const e=this._cachedMeta,n=e.dataset,i=e.data||[],s=e.iScale.getLabels();if(n.points=i,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===i.length,options:e};this.updateElement(n,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,e,n,i){const s=this._cachedMeta.rScale,a="reset"===i;for(let o=e;o<e+n;o++){const e=t[o],n=this.resolveDataElementOptions(o,e.active?"active":i),r=s.getPointPositionForValue(o,this.getParsed(o).r),l=a?s.xCenter:r.x,c=a?s.yCenter:r.y,d={x:l,y:c,angle:r.angle,skip:isNaN(l)||isNaN(c),options:n};this.updateElement(e,o,d,i)}}},ScatterController:class extends dc{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:i,yScale:s}=e,a=this.getParsed(t),o=i.getLabelForValue(a.x),r=s.getLabelForValue(a.y);return{label:n[t]||"",value:"("+o+", "+r+")"}}update(t){const e=this._cachedMeta,{data:n=[]}=e,i=this.chart._animationsDisabled;let{start:s,count:a}=cr(e,n,i);if(this._drawStart=s,this._drawCount=a,dr(e)&&(s=0,a=n.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:s,_dataset:a}=e;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!a._decimated,s.points=n;const o=this.resolveDatasetElementOptions(t);o.segment=this.options.segment,this.updateElement(s,void 0,{animated:!i,options:o},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(n,s,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,n,i){const s="reset"===i,{iScale:a,vScale:o,_stacked:r,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,i),d=this.getSharedOptions(c),p=this.includeOptions(i,d),h=a.axis,u=o.axis,{spanGaps:m,segment:g}=this.options,f=Ho(m)?m:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||s||"none"===i;let v=e>0&&this.getParsed(e-1);for(let c=e;c<e+n;++c){const e=t[c],n=this.getParsed(c),m=b?e:{},y=oo(n[u]),x=m[h]=a.getPixelForValue(n[h],c),_=m[u]=s||y?o.getBasePixel():o.getPixelForValue(r?this.applyStack(o,n,r):n[u],c);m.skip=isNaN(x)||isNaN(_)||y,m.stop=c>0&&Math.abs(n[h]-v[h])>f,g&&(m.parsed=n,m.raw=l.data[c]),p&&(m.options=d||this.resolveDataElementOptions(c,e.active?"active":i)),b||this.updateElement(e,c,m,i),v=n}this.updateSharedOptions(d,i,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let n=e.length-1;n>=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}const n=t.dataset,i=n.options&&n.options.borderWidth||0;if(!e.length)return i;const s=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(i,s,a)/2}}});function wc(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class kc{static override(t){Object.assign(kc.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return wc()}parse(){return wc()}format(){return wc()}add(){return wc()}diff(){return wc()}startOf(){return wc()}endOf(){return wc()}}var Dc=kc;function Ic(t,e,n,i){const{controller:s,data:a,_sorted:o}=t,r=s._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(r&&e===r.axis&&"r"!==e&&o&&a.length){const o=r._reversePixels?er:tr;if(!i){const i=o(a,e,n);if(l){const{vScale:e}=s._cachedMeta,{_parsed:n}=t,a=n.slice(0,i.lo+1).reverse().findIndex(t=>!oo(t[e.axis]));i.lo-=Math.max(0,a);const o=n.slice(i.hi).findIndex(t=>!oo(t[e.axis]));i.hi+=Math.max(0,o)}return i}if(s._sharedOptions){const t=a[0],i="function"==typeof t.getRange&&t.getRange(e);if(i){const t=o(a,e,n-i),s=o(a,e,n+i);return{lo:t.lo,hi:s.hi}}}}return{lo:0,hi:a.length-1}}function Cc(t,e,n,i,s){const a=t.getSortedVisibleDatasetMetas(),o=n[e];for(let t=0,n=a.length;t<n;++t){const{index:n,data:r}=a[t],{lo:l,hi:c}=Ic(a[t],e,o,s);for(let t=l;t<=c;++t){const e=r[t];e.skip||i(e,n,t)}}}function Mc(t,e,n,i,s){const a=[];return s||t.isPointInArea(e)?(Cc(t,n,e,function(n,o,r){(s||Fr(n,t.chartArea,0))&&n.inRange(e.x,e.y,i)&&a.push({element:n,datasetIndex:o,index:r})},!0),a):a}function Sc(t,e,n,i,s,a){return a||t.isPointInArea(e)?"r"!==n||i?function(t,e,n,i,s,a){let o=[];const r=function(t){const e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){const s=e?Math.abs(t.x-i.x):0,a=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(a,2))}}(n);let l=Number.POSITIVE_INFINITY;return Cc(t,n,e,function(n,c,d){const p=n.inRange(e.x,e.y,s);if(i&&!p)return;const h=n.getCenterPoint(s);if(!a&&!t.isPointInArea(h)&&!p)return;const u=r(e,h);u<l?(o=[{element:n,datasetIndex:c,index:d}],l=u):u===l&&o.push({element:n,datasetIndex:c,index:d})}),o}(t,e,n,i,s,a):function(t,e,n,i){let s=[];return Cc(t,n,e,function(t,n,a){const{startAngle:o,endAngle:r}=t.getProps(["startAngle","endAngle"],i),{angle:l}=Uo(t,{x:e.x,y:e.y});Yo(l,o,r)&&s.push({element:t,datasetIndex:n,index:a})}),s}(t,e,n,s):[]}function $c(t,e,n,i,s){const a=[],o="x"===n?"inXRange":"inYRange";let r=!1;return Cc(t,n,e,(t,i,l)=>{t[o]&&t[o](e[n],s)&&(a.push({element:t,datasetIndex:i,index:l}),r=r||t.inRange(e.x,e.y,s))}),i&&!r?[]:a}var Tc={evaluateInteractionItems:Cc,modes:{index(t,e,n,i){const s=Sl(e,t),a=n.axis||"x",o=n.includeInvisible||!1,r=n.intersect?Mc(t,s,a,i,o):Sc(t,s,a,!1,i,o),l=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=r[0].index,n=t.data[e];n&&!n.skip&&l.push({element:n,datasetIndex:t.index,index:e})}),l):[]},dataset(t,e,n,i){const s=Sl(e,t),a=n.axis||"xy",o=n.includeInvisible||!1;let r=n.intersect?Mc(t,s,a,i,o):Sc(t,s,a,!1,i,o);if(r.length>0){const e=r[0].datasetIndex,n=t.getDatasetMeta(e).data;r=[];for(let t=0;t<n.length;++t)r.push({element:n[t],datasetIndex:e,index:t})}return r},point:(t,e,n,i)=>Mc(t,Sl(e,t),n.axis||"xy",i,n.includeInvisible||!1),nearest(t,e,n,i){const s=Sl(e,t),a=n.axis||"xy",o=n.includeInvisible||!1;return Sc(t,s,a,n.intersect,i,o)},x:(t,e,n,i)=>$c(t,Sl(e,t),"x",n.intersect,i),y:(t,e,n,i)=>$c(t,Sl(e,t),"y",n.intersect,i)}};const Oc=["left","top","right","bottom"];function Ec(t,e){return t.filter(t=>t.pos===e)}function Rc(t,e){return t.filter(t=>-1===Oc.indexOf(t.pos)&&t.box.axis===e)}function Pc(t,e){return t.sort((t,n)=>{const i=e?n:t,s=e?t:n;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function Nc(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function Fc(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Vc(t,e,n,i){const{pos:s,box:a}=n,o=t.maxPadding;if(!lo(s)){n.size&&(t[s]-=n.size);const e=i[n.stack]||{size:0,count:1};e.size=Math.max(e.size,n.horizontal?a.height:a.width),n.size=e.size/e.count,t[s]+=n.size}a.getPadding&&Fc(o,a.getPadding());const r=Math.max(0,e.outerWidth-Nc(o,t,"left","right")),l=Math.max(0,e.outerHeight-Nc(o,t,"top","bottom")),c=r!==t.w,d=l!==t.h;return t.w=r,t.h=l,n.horizontal?{same:c,other:d}:{same:d,other:c}}function Ac(t,e){const n=e.maxPadding;return function(t){const i={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{i[t]=Math.max(e[t],n[t])}),i}(t?["left","right"]:["top","bottom"])}function Lc(t,e,n,i){const s=[];let a,o,r,l,c,d;for(a=0,o=t.length,c=0;a<o;++a){r=t[a],l=r.box,l.update(r.width||e.w,r.height||e.h,Ac(r.horizontal,e));const{same:o,other:p}=Vc(e,n,r,i);c|=o&&s.length,d=d||p,l.fullSize||s.push(r)}return c&&Lc(s,e,n,i)||d}function jc(t,e,n,i,s){t.top=n,t.left=e,t.right=e+i,t.bottom=n+s,t.width=i,t.height=s}function Hc(t,e,n,i){const s=n.padding;let{x:a,y:o}=e;for(const r of t){const t=r.box,l=i[r.stack]||{count:1,placed:0,weight:1},c=r.stackWeight/l.weight||1;if(r.horizontal){const i=e.w*c,a=l.size||t.height;Co(l.start)&&(o=l.start),t.fullSize?jc(t,s.left,o,n.outerWidth-s.right-s.left,a):jc(t,e.left+l.placed,o,i,a),l.start=o,l.placed+=i,o=t.bottom}else{const i=e.h*c,o=l.size||t.width;Co(l.start)&&(a=l.start),t.fullSize?jc(t,a,s.top,o,n.outerHeight-s.bottom-s.top):jc(t,a,e.top+l.placed,o,i),l.start=a,l.placed+=i,a=t.right}}e.x=a,e.y=o}var zc={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,i){if(!t)return;const s=Xr(t.options.layout.padding),a=Math.max(e-s.width,0),o=Math.max(n-s.height,0),r=function(t){const e=function(t){const e=[];let n,i,s,a,o,r;for(n=0,i=(t||[]).length;n<i;++n)s=t[n],({position:a,options:{stack:o,stackWeight:r=1}}=s),e.push({index:n,box:s,pos:a,horizontal:s.isHorizontal(),weight:s.weight,stack:o&&a+o,stackWeight:r});return e}(t),n=Pc(e.filter(t=>t.box.fullSize),!0),i=Pc(Ec(e,"left"),!0),s=Pc(Ec(e,"right")),a=Pc(Ec(e,"top"),!0),o=Pc(Ec(e,"bottom")),r=Rc(e,"x"),l=Rc(e,"y");return{fullSize:n,leftAndTop:i.concat(a),rightAndBottom:s.concat(l).concat(o).concat(r),chartArea:Ec(e,"chartArea"),vertical:i.concat(s).concat(l),horizontal:a.concat(o).concat(r)}}(t.boxes),l=r.vertical,c=r.horizontal;go(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const d=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,p=Object.freeze({outerWidth:e,outerHeight:n,padding:s,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/d,hBoxMaxHeight:o/2}),h=Object.assign({},s);Fc(h,Xr(i));const u=Object.assign({maxPadding:h,w:a,h:o,x:s.left,y:s.top},s),m=function(t,e){const n=function(t){const e={};for(const n of t){const{stack:t,pos:i,stackWeight:s}=n;if(!t||!Oc.includes(i))continue;const a=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=s}return e}(t),{vBoxMaxWidth:i,hBoxMaxHeight:s}=e;let a,o,r;for(a=0,o=t.length;a<o;++a){r=t[a];const{fullSize:o}=r.box,l=n[r.stack],c=l&&r.stackWeight/l.weight;r.horizontal?(r.width=c?c*i:o&&e.availableWidth,r.height=s):(r.width=i,r.height=c?c*s:o&&e.availableHeight)}return n}(l.concat(c),p);Lc(r.fullSize,u,p,m),Lc(l,u,p,m),Lc(c,u,p,m)&&Lc(l,u,p,m),function(t){const e=t.maxPadding;function n(n){const i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(u),Hc(r.leftAndTop,u,p,m),u.x+=u.w,u.y+=u.h,Hc(r.rightAndBottom,u,p,m),t.chartArea={left:u.left,top:u.top,right:u.left+u.w,bottom:u.top+u.h,height:u.h,width:u.w},go(r.chartArea,e=>{const n=e.box;Object.assign(n,t.chartArea),n.update(u.w,u.h,{left:0,top:0,right:0,bottom:0})})}};class Bc{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,i){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):n)}}isAttached(t){return!0}updateConfig(t){}}class Gc extends Bc{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Wc="$chartjs",Uc={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},qc=t=>null===t||""===t,Zc=!!Ol&&{passive:!0};function Kc(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Zc)}function Yc(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Jc(t,e,n){const i=t.canvas,s=new MutationObserver(t=>{let e=!1;for(const n of t)e=e||Yc(n.addedNodes,i),e=e&&!Yc(n.removedNodes,i);e&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function Xc(t,e,n){const i=t.canvas,s=new MutationObserver(t=>{let e=!1;for(const n of t)e=e||Yc(n.removedNodes,i),e=e&&!Yc(n.addedNodes,i);e&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const Qc=new Map;let td=0;function ed(){const t=window.devicePixelRatio;t!==td&&(td=t,Qc.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function nd(t,e,n){const i=t.canvas,s=i&&kl(i);if(!s)return;const a=or((t,e)=>{const i=s.clientWidth;n(t,e),i<s.clientWidth&&n()},window),o=new ResizeObserver(t=>{const e=t[0],n=e.contentRect.width,i=e.contentRect.height;0===n&&0===i||a(n,i)});return o.observe(s),function(t,e){Qc.size||window.addEventListener("resize",ed),Qc.set(t,e)}(t,a),o}function id(t,e,n){n&&n.disconnect(),"resize"===e&&function(t){Qc.delete(t),Qc.size||window.removeEventListener("resize",ed)}(t)}function sd(t,e,n){const i=t.canvas,s=or(e=>{null!==t.ctx&&n(function(t,e){const n=Uc[t.type]||t.type,{x:i,y:s}=Sl(t,e);return{type:n,chart:e,native:t,x:void 0!==i?i:null,y:void 0!==s?s:null}}(e,t))},t);return function(t,e,n){t&&t.addEventListener(e,n,Zc)}(i,e,s),s}class ad extends Bc{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){const n=t.style,i=t.getAttribute("height"),s=t.getAttribute("width");if(t[Wc]={initial:{height:i,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",qc(s)){const e=El(t,"width");void 0!==e&&(t.width=e)}if(qc(i))if(""===t.style.height)t.height=t.width/(e||2);else{const e=El(t,"height");void 0!==e&&(t.height=e)}}(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[Wc])return!1;const n=e[Wc].initial;["height","width"].forEach(t=>{const i=n[t];oo(i)?e.removeAttribute(t):e.setAttribute(t,i)});const i=n.style||{};return Object.keys(i).forEach(t=>{e.style[t]=i[t]}),e.width=e.width,delete e[Wc],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={}),s={attach:Jc,detach:Xc,resize:nd}[e]||sd;i[e]=s(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),i=n[e];i&&(({attach:id,detach:id,resize:id}[e]||Kc)(t,e,i),n[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,i){return function(t,e,n,i){const s=Il(t),a=Ml(s,"margin"),o=Dl(s.maxWidth,t,"clientWidth")||Eo,r=Dl(s.maxHeight,t,"clientHeight")||Eo,l=function(t,e,n){let i,s;if(void 0===e||void 0===n){const a=t&&kl(t);if(a){const t=a.getBoundingClientRect(),o=Il(a),r=Ml(o,"border","width"),l=Ml(o,"padding");e=t.width-l.width-r.width,n=t.height-l.height-r.height,i=Dl(o.maxWidth,a,"clientWidth"),s=Dl(o.maxHeight,a,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:i||Eo,maxHeight:s||Eo}}(t,e,n);let{width:c,height:d}=l;if("content-box"===s.boxSizing){const t=Ml(s,"border","width"),e=Ml(s,"padding");c-=e.width+t.width,d-=e.height+t.height}return c=Math.max(0,c-a.width),d=Math.max(0,i?c/i:d-a.height),c=$l(Math.min(c,o,l.maxWidth)),d=$l(Math.min(d,r,l.maxHeight)),c&&!d&&(d=$l(c/2)),(void 0!==e||void 0!==n)&&i&&l.height&&d>l.height&&(d=l.height,c=$l(Math.floor(d*i))),{width:c,height:d}}(t,e,n,i)}isAttached(t){const e=t&&kl(t);return!(!e||!e.isConnected)}}class od{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return Ho(this.x)&&Ho(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const i={};return t.forEach(t=>{i[t]=n[t]&&n[t].active()?n[t]._to:this[t]}),i}}function rd(t,e,n,i,s){const a=ho(i,0),o=Math.min(ho(s,t.length),t.length);let r,l,c,d=0;for(n=Math.ceil(n),s&&(r=s-i,n=r/Math.floor(r/n)),c=a;c<0;)d++,c=Math.round(a+d*n);for(l=Math.max(a,0);l<o;l++)l===c&&(e.push(t[l]),d++,c=Math.round(a+d*n))}const ld=(t,e,n)=>"top"===e||"left"===e?t[e]+n:t[e]-n,cd=(t,e)=>Math.min(e||t,t);function dd(t,e){const n=[],i=t.length/e,s=t.length;let a=0;for(;a<s;a+=i)n.push(t[Math.floor(a)]);return n}function pd(t,e,n){const i=t.ticks.length,s=Math.min(e,i-1),a=t._startPixel,o=t._endPixel,r=1e-6;let l,c=t.getPixelForTick(s);if(!(n&&(l=1===i?Math.max(c-a,o-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(s-1))/2,c+=s<e?l:-l,c<a-r||c>o+r)))return c}function hd(t){return t.drawTicks?t.tickLength:0}function ud(t,e){if(!t.display)return 0;const n=Qr(t.font,e),i=Xr(t.padding);return(ro(t.text)?t.text.length:1)*n.lineHeight+i.height}function md(t,e,n){let i=rr(t);return(n&&"right"!==e||!n&&"right"===e)&&(i=(t=>"left"===t?"right":"right"===t?"left":t)(i)),i}class gd extends od{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:i}=this;return t=po(t,Number.POSITIVE_INFINITY),e=po(e,Number.NEGATIVE_INFINITY),n=po(n,Number.POSITIVE_INFINITY),i=po(i,Number.NEGATIVE_INFINITY),{min:po(t,n),max:po(e,i),minDefined:co(t),maxDefined:co(e)}}getMinMax(t){let e,{min:n,max:i,minDefined:s,maxDefined:a}=this.getUserBounds();if(s&&a)return{min:n,max:i};const o=this.getMatchingVisibleMetas();for(let r=0,l=o.length;r<l;++r)e=o[r].controller.getMinMax(this,t),s||(n=Math.min(n,e.min)),a||(i=Math.max(i,e.max));return n=a&&n>i?i:n,i=s&&n>i?n:i,{min:po(n,po(i,n)),max:po(i,po(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){mo(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:i,grace:s,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,n){const{min:i,max:s}=t,a=uo(e,(s-i)/2),o=(t,e)=>n&&0===t?0:t+e;return{min:o(i,-Math.abs(a)),max:o(s,a)}}(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=o<this.ticks.length;this._convertTicksToLabels(r?dd(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||"auto"===a.source)&&(this.ticks=function(t,e){const n=t.options.ticks,i=function(t){const e=t.options.offset,n=t._tickSize(),i=t._length/n+(e?0:1),s=t._maxLength/n;return Math.floor(Math.min(i,s))}(t),s=Math.min(n.maxTicksLimit||i,i),a=n.major.enabled?function(t){const e=[];let n,i;for(n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}(e):[],o=a.length,r=a[0],l=a[o-1],c=[];if(o>s)return function(t,e,n,i){let s,a=0,o=n[0];for(i=Math.ceil(i),s=0;s<t.length;s++)s===o&&(e.push(t[s]),a++,o=n[a*i])}(e,c,a,o/s),c;const d=function(t,e,n){const i=function(t){const e=t.length;let n,i;if(e<2)return!1;for(i=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==i)return!1;return i}(t),s=e.length/n;if(!i)return Math.max(s,1);const a=function(t){const e=[],n=Math.sqrt(t);let i;for(i=1;i<n;i++)t%i===0&&(e.push(i),e.push(t/i));return n===(0|n)&&e.push(n),e.sort((t,e)=>t-e).pop(),e}(i);for(let t=0,e=a.length-1;t<e;t++){const e=a[t];if(e>s)return e}return Math.max(s,1)}(a,e,s);if(o>0){let t,n;const i=o>1?Math.round((l-r)/(o-1)):null;for(rd(e,c,d,oo(i)?0:r-i,r),t=0,n=o-1;t<n;t++)rd(e,c,d,a[t],a[t+1]);return rd(e,c,d,l,oo(i)?e.length:l+i),c}return rd(e,c,d),c}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),r&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,n=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,n=!n),this._startPixel=t,this._endPixel=e,this._reversePixels=n,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){mo(this.options.afterUpdate,[this])}beforeSetDimensions(){mo(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){mo(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),mo(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){mo(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let n,i,s;for(n=0,i=t.length;n<i;n++)s=t[n],s.label=mo(e.callback,[s.value,n,t],this)}afterTickToLabelConversion(){mo(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){mo(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,n=cd(this.ticks.length,t.ticks.maxTicksLimit),i=e.minRotation||0,s=e.maxRotation;let a,o,r,l=i;if(!this._isVisible()||!e.display||i>=s||n<=1||!this.isHorizontal())return void(this.labelRotation=i);const c=this._getLabelSizes(),d=c.widest.width,p=c.highest.height,h=Jo(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/n:h/(n-1),d+6>a&&(a=h/(n-(t.offset?.5:1)),o=this.maxHeight-hd(t.grid)-e.padding-ud(t.title,this.chart.options.font),r=Math.sqrt(d*d+p*p),l=Go(Math.min(Math.asin(Jo((c.highest.height+6)/a,-1,1)),Math.asin(Jo(o/r,-1,1))-Math.asin(Jo(p/r,-1,1)))),l=Math.max(i,Math.min(s,l))),this.labelRotation=l}afterCalculateLabelRotation(){mo(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){mo(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:i,grid:s}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){const a=ud(i,e.options.font);if(o?(t.width=this.maxWidth,t.height=hd(s)+a):(t.height=this.maxHeight,t.width=hd(s)+a),n.display&&this.ticks.length){const{first:e,last:i,widest:s,highest:a}=this._getLabelSizes(),r=2*n.padding,l=Bo(this.labelRotation),c=Math.cos(l),d=Math.sin(l);if(o){const e=n.mirror?0:d*s.width+c*a.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=n.mirror?0:c*s.width+d*a.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,i,d,c)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,i){const{ticks:{align:s,padding:a},position:o}=this.options,r=0!==this.labelRotation,l="top"!==o&&"x"===this.axis;if(this.isHorizontal()){const o=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,p=0;r?l?(d=i*t.width,p=n*e.height):(d=n*t.height,p=i*e.width):"start"===s?p=e.width:"end"===s?d=t.width:"inner"!==s&&(d=t.width/2,p=e.width/2),this.paddingLeft=Math.max((d-o+a)*this.width/(this.width-o),0),this.paddingRight=Math.max((p-c+a)*this.width/(this.width-c),0)}else{let n=e.height/2,i=t.height/2;"start"===s?(n=0,i=t.height):"end"===s&&(n=e.height,i=0),this.paddingTop=n+a,this.paddingBottom=i+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){mo(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,n=t.length;e<n;e++)oo(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let n=this.ticks;e<n.length&&(n=dd(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,n){const{ctx:i,_longestTextCache:s}=this,a=[],o=[],r=Math.floor(e/cd(e,n));let l,c,d,p,h,u,m,g,f,b,v,y=0,x=0;for(l=0;l<e;l+=r){if(p=t[l].label,h=this._resolveTickFontOptions(l),i.font=u=h.string,m=s[u]=s[u]||{data:{},gc:[]},g=h.lineHeight,f=b=0,oo(p)||ro(p)){if(ro(p))for(c=0,d=p.length;c<d;++c)v=p[c],oo(v)||ro(v)||(f=Tr(i,m.data,m.gc,f,v),b+=g)}else f=Tr(i,m.data,m.gc,f,p),b=g;a.push(f),o.push(b),y=Math.max(f,y),x=Math.max(b,x)}!function(t,e){go(t,t=>{const n=t.gc,i=n.length/2;let s;if(i>e){for(s=0;s<i;++s)delete t.data[n[s]];n.splice(0,i)}})}(s,e);const _=a.indexOf(y),w=o.indexOf(x),k=t=>({width:a[t]||0,height:o[t]||0});return{first:k(0),last:k(e-1),widest:k(_),highest:k(w),widths:a,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Jo(this._alignToPixels?Er(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const n=e[t];return n.$context||(n.$context=function(t,e,n){return el(t,{tick:n,index:e,type:"tick"})}(this.getContext(),t,n))}return this.$context||(this.$context=el(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=Bo(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),s=this._getLabelSizes(),a=t.autoSkipPadding||0,o=s?s.widest.width+a:0,r=s?s.highest.height+a:0;return this.isHorizontal()?r*n>o*i?o/n:r/i:r*i<o*n?r/n:o/i}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,n=this.chart,i=this.options,{grid:s,position:a,border:o}=i,r=s.offset,l=this.isHorizontal(),c=this.ticks.length+(r?1:0),d=hd(s),p=[],h=o.setContext(this.getContext()),u=h.display?h.width:0,m=u/2,g=function(t){return Er(n,t,u)};let f,b,v,y,x,_,w,k,D,I,C,M;if("top"===a)f=g(this.bottom),_=this.bottom-d,k=f-m,I=g(t.top)+m,M=t.bottom;else if("bottom"===a)f=g(this.top),I=t.top,M=g(t.bottom)-m,_=f+m,k=this.top+d;else if("left"===a)f=g(this.right),x=this.right-d,w=f-m,D=g(t.left)+m,C=t.right;else if("right"===a)f=g(this.left),D=t.left,C=g(t.right)-m,x=f+m,w=this.left+d;else if("x"===e){if("center"===a)f=g((t.top+t.bottom)/2+.5);else if(lo(a)){const t=Object.keys(a)[0],e=a[t];f=g(this.chart.scales[t].getPixelForValue(e))}I=t.top,M=t.bottom,_=f+m,k=_+d}else if("y"===e){if("center"===a)f=g((t.left+t.right)/2);else if(lo(a)){const t=Object.keys(a)[0],e=a[t];f=g(this.chart.scales[t].getPixelForValue(e))}x=f-m,w=x-d,D=t.left,C=t.right}const S=ho(i.ticks.maxTicksLimit,c),$=Math.max(1,Math.ceil(c/S));for(b=0;b<c;b+=$){const t=this.getContext(b),e=s.setContext(t),i=o.setContext(t),a=e.lineWidth,c=e.color,d=i.dash||[],h=i.dashOffset,u=e.tickWidth,m=e.tickColor,g=e.tickBorderDash||[],f=e.tickBorderDashOffset;v=pd(this,b,r),void 0!==v&&(y=Er(n,v,a),l?x=w=D=C=y:_=k=I=M=y,p.push({tx1:x,ty1:_,tx2:w,ty2:k,x1:D,y1:I,x2:C,y2:M,width:a,color:c,borderDash:d,borderDashOffset:h,tickWidth:u,tickColor:m,tickBorderDash:g,tickBorderDashOffset:f}))}return this._ticksLength=c,this._borderValue=f,p}_computeLabelItems(t){const e=this.axis,n=this.options,{position:i,ticks:s}=n,a=this.isHorizontal(),o=this.ticks,{align:r,crossAlign:l,padding:c,mirror:d}=s,p=hd(n.grid),h=p+c,u=d?-c:h,m=-Bo(this.labelRotation),g=[];let f,b,v,y,x,_,w,k,D,I,C,M,S="middle";if("top"===i)_=this.bottom-u,w=this._getXAxisLabelAlignment();else if("bottom"===i)_=this.top+u,w=this._getXAxisLabelAlignment();else if("left"===i){const t=this._getYAxisLabelAlignment(p);w=t.textAlign,x=t.x}else if("right"===i){const t=this._getYAxisLabelAlignment(p);w=t.textAlign,x=t.x}else if("x"===e){if("center"===i)_=(t.top+t.bottom)/2+h;else if(lo(i)){const t=Object.keys(i)[0],e=i[t];_=this.chart.scales[t].getPixelForValue(e)+h}w=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===i)x=(t.left+t.right)/2-h;else if(lo(i)){const t=Object.keys(i)[0],e=i[t];x=this.chart.scales[t].getPixelForValue(e)}w=this._getYAxisLabelAlignment(p).textAlign}"y"===e&&("start"===r?S="top":"end"===r&&(S="bottom"));const $=this._getLabelSizes();for(f=0,b=o.length;f<b;++f){v=o[f],y=v.label;const t=s.setContext(this.getContext(f));k=this.getPixelForTick(f)+s.labelOffset,D=this._resolveTickFontOptions(f),I=D.lineHeight,C=ro(y)?y.length:1;const e=C/2,n=t.color,r=t.textStrokeColor,c=t.textStrokeWidth;let p,h=w;if(a?(x=k,"inner"===w&&(h=f===b-1?this.options.reverse?"left":"right":0===f?this.options.reverse?"right":"left":"center"),M="top"===i?"near"===l||0!==m?-C*I+I/2:"center"===l?-$.highest.height/2-e*I+I:-$.highest.height+I/2:"near"===l||0!==m?I/2:"center"===l?$.highest.height/2-e*I:$.highest.height-C*I,d&&(M*=-1),0===m||t.showLabelBackdrop||(x+=I/2*Math.sin(m))):(_=k,M=(1-C)*I/2),t.showLabelBackdrop){const e=Xr(t.backdropPadding),n=$.heights[f],i=$.widths[f];let s=M-e.top,a=0-e.left;switch(S){case"middle":s-=n/2;break;case"bottom":s-=n}switch(w){case"center":a-=i/2;break;case"right":a-=i;break;case"inner":f===b-1?a-=i:f>0&&(a-=i/2)}p={left:a,top:s,width:i+e.width,height:n+e.height,color:t.backdropColor}}g.push({label:y,font:D,textOffset:M,options:{rotation:m,color:n,strokeColor:r,strokeWidth:c,textAlign:h,textBaseline:S,translation:[x,_],backdrop:p}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Bo(this.labelRotation))return"top"===t?"left":"right";let n="center";return"start"===e.align?n="left":"end"===e.align?n="right":"inner"===e.align&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:i,padding:s}}=this.options,a=t+s,o=this._getLabelSizes().widest.width;let r,l;return"left"===e?i?(l=this.right+s,"near"===n?r="left":"center"===n?(r="center",l+=o/2):(r="right",l+=o)):(l=this.right-a,"near"===n?r="right":"center"===n?(r="center",l-=o/2):(r="left",l=this.left)):"right"===e?i?(l=this.left+s,"near"===n?r="right":"center"===n?(r="center",l-=o/2):(r="left",l-=o)):(l=this.left+a,"near"===n?r="left":"center"===n?(r="center",l+=o/2):(r="right",l=this.right)):r="right",{textAlign:r,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:i,width:s,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,i,s,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(e=>e.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,a;const o=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(e.display)for(s=0,a=i.length;s<a;++s){const t=i[s];e.drawOnChartArea&&o({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&o({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:n,grid:i}}=this,s=n.setContext(this.getContext()),a=n.display?s.width:0;if(!a)return;const o=i.setContext(this.getContext(0)).lineWidth,r=this._borderValue;let l,c,d,p;this.isHorizontal()?(l=Er(t,this.left,a)-a/2,c=Er(t,this.right,o)+o/2,d=p=r):(d=Er(t,this.top,a)-a/2,p=Er(t,this.bottom,o)+o/2,l=c=r),e.save(),e.lineWidth=s.width,e.strokeStyle=s.color,e.beginPath(),e.moveTo(l,d),e.lineTo(c,p),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,n=this._computeLabelArea();n&&Vr(e,n);const i=this.getLabelItems(t);for(const t of i){const n=t.options,i=t.font;Br(e,t.label,0,t.textOffset,i,n)}n&&Ar(e)}drawTitle(){const{ctx:t,options:{position:e,title:n,reverse:i}}=this;if(!n.display)return;const s=Qr(n.font),a=Xr(n.padding),o=n.align;let r=s.lineHeight/2;"bottom"===e||"center"===e||lo(e)?(r+=a.bottom,ro(n.text)&&(r+=s.lineHeight*(n.text.length-1))):r+=a.top;const{titleX:l,titleY:c,maxWidth:d,rotation:p}=function(t,e,n,i){const{top:s,left:a,bottom:o,right:r,chart:l}=t,{chartArea:c,scales:d}=l;let p,h,u,m=0;const g=o-s,f=r-a;if(t.isHorizontal()){if(h=lr(i,a,r),lo(n)){const t=Object.keys(n)[0],i=n[t];u=d[t].getPixelForValue(i)+g-e}else u="center"===n?(c.bottom+c.top)/2+g-e:ld(t,n,e);p=r-a}else{if(lo(n)){const t=Object.keys(n)[0],i=n[t];h=d[t].getPixelForValue(i)-f+e}else h="center"===n?(c.left+c.right)/2-f+e:ld(t,n,e);u=lr(i,o,s),m="left"===n?-Po:Po}return{titleX:h,titleY:u,maxWidth:p,rotation:m}}(this,r,e,o);Br(t,n.text,0,0,s,{color:n.color,maxWidth:d,rotation:p,textAlign:md(o,e,i),textBaseline:"middle",translation:[l,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,n=ho(t.grid&&t.grid.z,-1),i=ho(t.border&&t.border.z,0);return this._isVisible()&&this.draw===gd.prototype.draw?[{z:n,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let s,a;for(s=0,a=e.length;s<a;++s){const a=e[s];a[n]!==this.id||t&&a.type!==t||i.push(a)}return i}_resolveTickFontOptions(t){return Qr(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class fd{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let n;(function(t){return"id"in t&&"defaults"in t})(e)&&(n=this.register(e));const i=this.items,s=t.id,a=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in i||(i[s]=t,function(t,e,n){const i=xo(Object.create(null),[n?$r.get(n):{},$r.get(e),t.defaults]);$r.set(e,i),t.defaultRoutes&&function(t,e){Object.keys(e).forEach(n=>{const i=n.split("."),s=i.pop(),a=[t].concat(i).join("."),o=e[n].split("."),r=o.pop(),l=o.join(".");$r.route(a,s,l,r)})}(e,t.defaultRoutes),t.descriptors&&$r.describe(e,t.descriptors)}(t,a,n),this.override&&$r.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,i=this.scope;n in e&&delete e[n],i&&n in $r[i]&&(delete $r[i][n],this.override&&delete Dr[n])}}class bd{constructor(){this.controllers=new fd(dc,"datasets",!0),this.elements=new fd(od,"elements"),this.plugins=new fd(Object,"plugins"),this.scales=new fd(gd,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach(e=>{const i=n||this._getRegistryForType(e);n||i.isForType(e)||i===this.plugins&&e.id?this._exec(t,i,e):go(e,e=>{const i=n||this._getRegistryForType(e);this._exec(t,i,e)})})}_exec(t,e,n){const i=Io(t);mo(n["before"+i],[],n),e[t](n),mo(n["after"+i],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){const i=e.get(t);if(void 0===i)throw new Error('"'+t+'" is not a registered '+n+".");return i}}var vd=new bd;class yd{constructor(){this._init=void 0}notify(t,e,n,i){if("beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),void 0===this._init)return;const s=i?this._descriptors(t).filter(i):this._descriptors(t),a=this._notify(s,t,e,n);return"afterDestroy"===e&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),a}_notify(t,e,n,i){i=i||{};for(const s of t){const t=s.plugin;if(!1===mo(t[n],[e,i,s.options],t)&&i.cancelable)return!1}return!0}invalidate(){oo(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const n=t&&t.config,i=ho(n.options&&n.options.plugins,{}),s=function(t){const e={},n=[],i=Object.keys(vd.plugins.items);for(let t=0;t<i.length;t++)n.push(vd.getPlugin(i[t]));const s=t.plugins||[];for(let t=0;t<s.length;t++){const i=s[t];-1===n.indexOf(i)&&(n.push(i),e[i.id]=!0)}return{plugins:n,localIds:e}}(n);return!1!==i||e?function(t,{plugins:e,localIds:n},i,s){const a=[],o=t.getContext();for(const r of e){const e=r.id,l=xd(i[e],s);null!==l&&a.push({plugin:r,options:_d(t.config,{plugin:r,local:n[e]},l,o)})}return a}(t,s,i,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],n=this._cache,i=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(i(e,n),t,"stop"),this._notify(i(n,e),t,"start")}}function xd(t,e){return e||!1!==t?!0===t?{}:t:null}function _d(t,{plugin:e,local:n},i,s){const a=t.pluginScopeKeys(e),o=t.getOptionScopes(i,a);return n&&e.defaults&&o.push(e.defaults),t.createResolver(o,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function wd(t,e){const n=$r.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function kd(t){if("x"===t||"y"===t||"r"===t)return t}function Dd(t){return"top"===t||"bottom"===t?"x":"left"===t||"right"===t?"y":void 0}function Id(t,...e){if(kd(t))return t;for(const n of e){const e=n.axis||Dd(n.position)||t.length>1&&kd(t[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Cd(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function Md(t){const e=t.options||(t.options={});e.plugins=ho(e.plugins,{}),e.scales=function(t,e){const n=Dr[t.type]||{scales:{}},i=e.scales||{},s=wd(t.type,e),a=Object.create(null);return Object.keys(i).forEach(e=>{const o=i[e];if(!lo(o))return console.error(`Invalid scale configuration for scale: ${e}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const r=Id(e,o,function(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(e=>e.xAxisID===t||e.yAxisID===t);if(n.length)return Cd(t,"x",n[0])||Cd(t,"y",n[0])}return{}}(e,t),$r.scales[o.type]),l=function(t,e){return t===e?"_index_":"_value_"}(r,s),c=n.scales||{};a[e]=_o(Object.create(null),[{axis:r},o,c[r],c[l]])}),t.data.datasets.forEach(n=>{const s=n.type||t.type,o=n.indexAxis||wd(s,e),r=(Dr[s]||{}).scales||{};Object.keys(r).forEach(t=>{const e=function(t,e){let n=t;return"_index_"===t?n=e:"_value_"===t&&(n="x"===e?"y":"x"),n}(t,o),s=n[e+"AxisID"]||e;a[s]=a[s]||Object.create(null),_o(a[s],[{axis:e},i[s],r[t]])})}),Object.keys(a).forEach(t=>{const e=a[t];_o(e,[$r.scales[e.type],$r.scale])}),a}(t,e)}function Sd(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const $d=new Map,Td=new Set;function Od(t,e){let n=$d.get(t);return n||(n=e(),$d.set(t,n),Td.add(n)),n}const Ed=(t,e,n)=>{const i=Do(e,n);void 0!==i&&t.add(i)};class Rd{constructor(t){this._config=function(t){return(t=t||{}).data=Sd(t.data),Md(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Sd(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Md(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Od(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Od(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Od(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id;return Od(`${this.type}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const n=this._scopeCache;let i=n.get(t);return i&&!e||(i=new Map,n.set(t,i)),i}getOptionScopes(t,e,n){const{options:i,type:s}=this,a=this._cachedScopes(t,n),o=a.get(e);if(o)return o;const r=new Set;e.forEach(e=>{t&&(r.add(t),e.forEach(e=>Ed(r,t,e))),e.forEach(t=>Ed(r,i,t)),e.forEach(t=>Ed(r,Dr[s]||{},t)),e.forEach(t=>Ed(r,$r,t)),e.forEach(t=>Ed(r,Ir,t))});const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),Td.has(e)&&a.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Dr[e]||{},$r.datasets[e]||{},{type:e},$r,Ir]}resolveNamedOptions(t,e,n,i=[""]){const s={$shared:!0},{resolver:a,subPrefixes:o}=Pd(this._resolverCache,t,i);let r=a;(function(t,e){const{isScriptable:n,isIndexable:i}=sl(t);for(const s of e){const e=n(s),a=i(s),o=(a||e)&&t[s];if(e&&(Mo(o)||Nd(o))||a&&ro(o))return!0}return!1})(a,e)&&(s.$shared=!1,r=il(a,n=Mo(n)?n():n,this.createResolver(t,n,o)));for(const t of e)s[t]=r[t];return s}createResolver(t,e,n=[""],i){const{resolver:s}=Pd(this._resolverCache,t,n);return lo(e)?il(s,e,void 0,i):s}}function Pd(t,e,n){let i=t.get(e);i||(i=new Map,t.set(e,i));const s=n.join();let a=i.get(s);return a||(a={resolver:nl(e,n),subPrefixes:n.filter(t=>!t.toLowerCase().includes("hover"))},i.set(s,a)),a}const Nd=t=>lo(t)&&Object.getOwnPropertyNames(t).some(e=>Mo(t[e])),Fd=["top","bottom","left","right","chartArea"];function Vd(t,e){return"top"===t||"bottom"===t||-1===Fd.indexOf(t)&&"x"===e}function Ad(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function Ld(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),mo(n&&n.onComplete,[t],e)}function jd(t){const e=t.chart,n=e.options.animation;mo(n&&n.onProgress,[t],e)}function Hd(t){return wl()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const zd={},Bd=t=>{const e=Hd(t);return Object.values(zd).filter(t=>t.canvas===e).pop()};function Gd(t,e,n){const i=Object.keys(t);for(const s of i){const i=+s;if(i>=e){const a=t[s];delete t[s],(n>0||i>e)&&(t[i+n]=a)}}}class Wd{static defaults=$r;static instances=zd;static overrides=Dr;static registry=vd;static version="4.5.1";static getChart=Bd;static register(...t){vd.add(...t),Ud()}static unregister(...t){vd.remove(...t),Ud()}constructor(t,e){const n=this.config=new Rd(e),i=Hd(t),s=Bd(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(t){return!wl()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Gc:ad}(i)),this.platform.updateConfig(n);const o=this.platform.acquireContext(i,a.aspectRatio),r=o&&o.canvas,l=r&&r.height,c=r&&r.width;this.id=ao(),this.ctx=o,this.canvas=r,this.width=c,this.height=l,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new yd,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}(t=>this.update(t),a.resizeDelay||0),this._dataChanges=[],zd[this.id]=this,o&&r?(Zl.listen(this,"complete",Ld),Zl.listen(this,"progress",jd),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:i,_aspectRatio:s}=this;return oo(t)?e&&s?s:i?n/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return vd}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Tl(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Rr(this.canvas,this.ctx),this}stop(){return Zl.stop(this),this}resize(t,e){Zl.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,i=this.canvas,s=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,e,s),o=n.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Tl(this,o,!0)&&(this.notifyPlugins("resize",{size:a}),mo(n.onResize,[this,a],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){go(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,i=Object.keys(n).reduce((t,e)=>(t[e]=!1,t),{});let s=[];e&&(s=s.concat(Object.keys(e).map(t=>{const n=e[t],i=Id(t,n),s="r"===i,a="x"===i;return{options:n,dposition:s?"chartArea":a?"bottom":"left",dtype:s?"radialLinear":a?"category":"linear"}}))),go(s,e=>{const s=e.options,a=s.id,o=Id(a,s),r=ho(s.type,e.dtype);void 0!==s.position&&Vd(s.position,o)===Vd(e.dposition)||(s.position=e.dposition),i[a]=!0;let l=null;a in n&&n[a].type===r?l=n[a]:(l=new(vd.getScale(r))({id:a,type:r,ctx:this.ctx,chart:this}),n[l.id]=l),l.init(s,t)}),go(i,(t,e)=>{t||delete n[e]}),go(n,t=>{zc.configure(this,t,t.options),zc.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((t,e)=>t.index-e.index),n>e){for(let t=e;t<n;++t)this._destroyDatasetMeta(t);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(Ad("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((t,n)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,i;for(this._removeUnreferencedMetasets(),n=0,i=e.length;n<i;n++){const i=e[n];let s=this.getDatasetMeta(n);const a=i.type||this.config.type;if(s.type&&s.type!==a&&(this._destroyDatasetMeta(n),s=this.getDatasetMeta(n)),s.type=a,s.indexAxis=i.indexAxis||wd(a,this.options),s.order=i.order||0,s.index=n,s.label=""+i.label,s.visible=this.isDatasetVisible(n),s.controller)s.controller.updateIndex(n),s.controller.linkScales();else{const e=vd.getController(a),{datasetElementType:i,dataElementType:o}=$r.datasets[a];Object.assign(e,{dataElementType:vd.getElement(o),datasetElementType:i&&vd.getElement(i)}),s.controller=new e(this,n),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){go(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),n=!i&&-1===s.indexOf(e);e.buildOrUpdateElements(n),a=Math.max(+e.getMaxOverflow(),a)}a=this._minPadding=n.layout.autoPadding?a:0,this._updateLayout(a),i||go(s,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Ad("z","_idx"));const{_active:o,_lastEvent:r}=this;r?this._eventHandler(r,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){go(this.scales,t=>{zc.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);So(e,n)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:s}of e)Gd(t,i,"_removeElements"===n?-s:s)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),i=n(0);for(let t=1;t<e;t++)if(!So(i,n(t)))return;return Array.from(i).map(t=>t.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;zc.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],go(this.boxes,t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,Mo(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const n=this.getDatasetMeta(t),i={meta:n,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",i)&&(n.controller._update(e),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(Zl.has(this)?this.attached&&!Zl.running(this)&&Zl.start(this):(this.draw(),Ld({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,n=[];let i,s;for(i=0,s=e.length;i<s;++i){const s=e[i];t&&!s.visible||n.push(s)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n={meta:t,index:t.index,cancelable:!0},i=Ul(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(i&&Vr(e,i),t.controller.draw(),i&&Ar(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return Fr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,i){const s=Tc.modes[e];return"function"==typeof s?s(this,t,n,i):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let i=n.filter(t=>t&&t._dataset===e).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=el(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return"boolean"==typeof n.hidden?!n.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const i=n?"show":"hide",s=this.getDatasetMeta(t),a=s.controller._resolveAnimations(void 0,i);Co(e)?(s.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),a.update(s,{visible:n}),this.update(e=>e.datasetIndex===t?i:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Zl.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Rr(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete zd[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(t,e,n)=>{t.offsetX=e,t.offsetY=n,this._eventHandler(t)};go(this.options.events,t=>n(t,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(n,i)=>{t[n]&&(e.removeEventListener(this,n,i),delete t[n])},s=(t,e)=>{this.canvas&&this.resize(t,e)};let a;const o=()=>{i("attach",o),this.attached=!0,this.resize(),n("resize",s),n("detach",a)};a=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),n("attach",o)},e.isAttached(this.canvas)?o():a()}unbindEvents(){go(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},go(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const i=n?"set":"remove";let s,a,o,r;for("dataset"===e&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),o=0,r=t.length;o<r;++o){a=t[o];const e=a&&this.getDatasetMeta(a.datasetIndex).controller;e&&e[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],n=t.map(({datasetIndex:t,index:e})=>{const n=this.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[e],index:e}});!fo(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,n){const i=this.options.hover,s=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),a=s(e,t),o=n?t:s(t,e);a.length&&this.updateHoverStyle(a,i.mode,!1),o.length&&i.mode&&this.updateHoverStyle(o,i.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",n,i))return;const s=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(s||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:i=[],options:s}=this,a=e,o=this._getActiveElements(t,i,n,a),r=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,n,i){return n&&"mouseout"!==t.type?i?e:t:null}(t,this._lastEvent,n,r);n&&(this._lastEvent=null,mo(s.onHover,[t,o,this],this),r&&mo(s.onClick,[t,o,this],this));const c=!fo(o,i);return(c||e)&&(this._active=o,this._updateHoverStyles(o,i,e)),this._lastEvent=l,c}_getActiveElements(t,e,n,i){if("mouseout"===t.type)return[];if(!n)return e;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,i)}}function Ud(){return go(Wd.instances,t=>t._plugins.invalidate())}function qd(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function Zd(t,e,n,i,s,a){const{x:o,y:r,startAngle:l,pixelMargin:c,innerRadius:d}=e,p=Math.max(e.outerRadius+i+n-c,0),h=d>0?d+i+n+c:0;let u=0;const m=s-l;if(i){const t=((d>0?d-i:0)+(p>0?p-i:0))/2;u=(m-(0!==t?m*t/(t+i):m))/2}const g=(m-Math.max(.001,m*p-n/$o)/p)/2,f=l+g+u,b=s-g-u,{outerStart:v,outerEnd:y,innerStart:x,innerEnd:_}=function(t,e,n,i){const s=Kr(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),a=(n-e)/2,o=Math.min(a,i*e/2),r=t=>{const e=(n-Math.min(a,t))*i/2;return Jo(t,0,Math.min(a,e))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:Jo(s.innerStart,0,o),innerEnd:Jo(s.innerEnd,0,o)}}(e,h,p,b-f),w=p-v,k=p-y,D=f+v/w,I=b-y/k,C=h+x,M=h+_,S=f+x/C,$=b-_/M;if(t.beginPath(),a){const e=(D+I)/2;if(t.arc(o,r,p,D,e),t.arc(o,r,p,e,I),y>0){const e=qd(k,I,o,r);t.arc(e.x,e.y,y,I,b+Po)}const n=qd(M,b,o,r);if(t.lineTo(n.x,n.y),_>0){const e=qd(M,$,o,r);t.arc(e.x,e.y,_,b+Po,$+Math.PI)}const i=(b-_/h+(f+x/h))/2;if(t.arc(o,r,h,b-_/h,i,!0),t.arc(o,r,h,i,f+x/h,!0),x>0){const e=qd(C,S,o,r);t.arc(e.x,e.y,x,S+Math.PI,f-Po)}const s=qd(w,f,o,r);if(t.lineTo(s.x,s.y),v>0){const e=qd(w,D,o,r);t.arc(e.x,e.y,v,f-Po,D)}}else{t.moveTo(o,r);const e=Math.cos(D)*p+o,n=Math.sin(D)*p+r;t.lineTo(e,n);const i=Math.cos(I)*p+o,s=Math.sin(I)*p+r;t.lineTo(i,s)}t.closePath()}function Kd(t,e,n=e){t.lineCap=ho(n.borderCapStyle,e.borderCapStyle),t.setLineDash(ho(n.borderDash,e.borderDash)),t.lineDashOffset=ho(n.borderDashOffset,e.borderDashOffset),t.lineJoin=ho(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=ho(n.borderWidth,e.borderWidth),t.strokeStyle=ho(n.borderColor,e.borderColor)}function Yd(t,e,n){t.lineTo(n.x,n.y)}function Jd(t,e,n={}){const i=t.length,{start:s=0,end:a=i-1}=n,{start:o,end:r}=e,l=Math.max(s,o),c=Math.min(a,r),d=s<o&&a<o||s>r&&a>r;return{count:i,start:l,loop:e.loop,ilen:c<l&&!d?i+c-l:c-l}}function Xd(t,e,n,i){const{points:s,options:a}=e,{count:o,start:r,loop:l,ilen:c}=Jd(s,n,i),d=function(t){return t.stepped?Lr:t.tension||"monotone"===t.cubicInterpolationMode?jr:Yd}(a);let p,h,u,{move:m=!0,reverse:g}=i||{};for(p=0;p<=c;++p)h=s[(r+(g?c-p:p))%o],h.skip||(m?(t.moveTo(h.x,h.y),m=!1):d(t,u,h,g,a.stepped),u=h);return l&&(h=s[(r+(g?c:0))%o],d(t,u,h,g,a.stepped)),!!l}function Qd(t,e,n,i){const s=e.points,{count:a,start:o,ilen:r}=Jd(s,n,i),{move:l=!0,reverse:c}=i||{};let d,p,h,u,m,g,f=0,b=0;const v=t=>(o+(c?r-t:t))%a,y=()=>{u!==m&&(t.lineTo(f,m),t.lineTo(f,u),t.lineTo(f,g))};for(l&&(p=s[v(0)],t.moveTo(p.x,p.y)),d=0;d<=r;++d){if(p=s[v(d)],p.skip)continue;const e=p.x,n=p.y,i=0|e;i===h?(n<u?u=n:n>m&&(m=n),f=(b*f+e)/++b):(y(),t.lineTo(e,n),h=i,b=0,u=m=n),g=n}y()}function tp(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||n?Xd:Qd}const ep="function"==typeof Path2D;class np extends od{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const i=n.spanGaps?this._loop:this._fullLoop;_l(this._points,n,t,i,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const n=t.points,i=t.options.spanGaps,s=n.length;if(!s)return[];const a=!!t._loop,{start:o,end:r}=function(t,e,n,i){let s=0,a=e-1;if(n&&!i)for(;s<e&&!t[s].skip;)s++;for(;s<e&&t[s].skip;)s++;for(s%=e,n&&(a+=s);a>s&&t[a%e].skip;)a--;return a%=e,{start:s,end:a}}(n,s,a,i);return function(t,e,n,i){return i&&i.setContext&&n?function(t,e,n,i){const s=t._chart.getContext(),a=Bl(t.options),{_datasetIndex:o,options:{spanGaps:r}}=t,l=n.length,c=[];let d=a,p=e[0].start,h=p;function u(t,e,i,s){const a=r?-1:1;if(t!==e){for(t+=l;n[t%l].skip;)t-=a;for(;n[e%l].skip;)e+=a;t%l!==e%l&&(c.push({start:t%l,end:e%l,loop:i,style:s}),d=s,p=e%l)}}for(const t of e){p=r?p:t.start;let e,a=n[p%l];for(h=p+1;h<=t.end;h++){const r=n[h%l];e=Bl(i.setContext(el(s,{type:"segment",p0:a,p1:r,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:o}))),Gl(e,d)&&u(p,h-1,t.loop,d),a=r,d=e}p<h-1&&u(p,h-1,t.loop,d)}return c}(t,e,n,i):e}(t,!0===i?[{start:o,end:r,loop:a}]:function(t,e,n,i){const s=t.length,a=[];let o,r=e,l=t[e];for(o=e+1;o<=n;++o){const n=t[o%s];n.skip||n.stop?l.skip||(i=!1,a.push({start:e%s,end:(o-1)%s,loop:i}),e=r=n.stop?o:null):(r=o,l.skip&&(e=o)),l=n}return null!==r&&a.push({start:e%s,end:r%s,loop:i}),a}(n,o,r<o?r+s:r,!!t._fullLoop&&0===o&&r===s-1),n,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,i=t[e],s=this.points,a=zl(this,{property:e,start:i,end:i});if(!a.length)return;const o=[],r=function(t){return t.stepped?Pl:t.tension||"monotone"===t.cubicInterpolationMode?Nl:Rl}(n);let l,c;for(l=0,c=a.length;l<c;++l){const{start:c,end:d}=a[l],p=s[c],h=s[d];if(p===h){o.push(p);continue}const u=r(p,h,Math.abs((i-p[e])/(h[e]-p[e])),n.stepped);u[e]=t[e],o.push(u)}return 1===o.length?o[0]:o}pathSegment(t,e,n){return tp(this)(t,this,e,n)}path(t,e,n){const i=this.segments,s=tp(this);let a=this._loop;e=e||0,n=n||this.points.length-e;for(const o of i)a&=s(t,this,o,{start:e,end:e+n-1});return!!a}draw(t,e,n,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),function(t,e,n,i){ep&&!e.options.segment?function(t,e,n,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,n,i)&&s.closePath()),Kd(t,e.options),t.stroke(s)}(t,e,n,i):function(t,e,n,i){const{segments:s,options:a}=e,o=tp(e);for(const r of s)Kd(t,a,r.style),t.beginPath(),o(t,e,r,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}(t,e,n,i)}(t,this,n,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function ip(t,e,n,i){const s=t.options,{[n]:a}=t.getProps([n],i);return Math.abs(e-a)<s.radius+s.hitRadius}function sp(t,e){const{x:n,y:i,base:s,width:a,height:o}=t.getProps(["x","y","base","width","height"],e);let r,l,c,d,p;return t.horizontal?(p=o/2,r=Math.min(n,s),l=Math.max(n,s),c=i-p,d=i+p):(p=a/2,r=n-p,l=n+p,c=Math.min(i,s),d=Math.max(i,s)),{left:r,top:c,right:l,bottom:d}}function ap(t,e,n,i){return t?0:Jo(e,n,i)}function op(t,e,n,i){const s=null===e,a=null===n,o=t&&!(s&&a)&&sp(t,i);return o&&(s||Xo(e,o.left,o.right))&&(a||Xo(n,o.top,o.bottom))}function rp(t,e){t.rect(e.x,e.y,e.w,e.h)}function lp(t,e,n={}){const i=t.x!==n.x?-e:0,s=t.y!==n.y?-e:0,a=(t.x+t.w!==n.x+n.w?e:0)-i,o=(t.y+t.h!==n.y+n.h?e:0)-s;return{x:t.x+i,y:t.y+s,w:t.w+a,h:t.h+o,radius:t.radius}}var cp=Object.freeze({__proto__:null,ArcElement:class extends od{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,n){const i=this.getProps(["x","y"],n),{angle:s,distance:a}=Uo(i,{x:t,y:e}),{startAngle:o,endAngle:r,innerRadius:l,outerRadius:c,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),p=(this.options.spacing+this.options.borderWidth)/2,h=ho(d,r-o),u=Yo(s,o,r)&&o!==r,m=h>=To||u,g=Xo(a,l+p,c+p);return m&&g}getCenterPoint(t){const{x:e,y:n,startAngle:i,endAngle:s,innerRadius:a,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:r,spacing:l}=this.options,c=(i+s)/2,d=(a+o+l+r)/2;return{x:e+Math.cos(c)*d,y:n+Math.sin(c)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:n}=this,i=(e.offset||0)/4,s=(e.spacing||0)/2,a=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=n>To?Math.floor(n/To):0,0===n||this.innerRadius<0||this.outerRadius<0)return;t.save();const o=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(o)*i,Math.sin(o)*i);const r=i*(1-Math.sin(Math.min($o,n||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,n,i,s){const{fullCircles:a,startAngle:o,circumference:r}=e;let l=e.endAngle;if(a){Zd(t,e,n,i,l,s);for(let e=0;e<a;++e)t.fill();isNaN(r)||(l=o+(r%To||To))}Zd(t,e,n,i,l,s),t.fill()}(t,this,r,s,a),function(t,e,n,i,s){const{fullCircles:a,startAngle:o,circumference:r,options:l}=e,{borderWidth:c,borderJoinStyle:d,borderDash:p,borderDashOffset:h,borderRadius:u}=l,m="inner"===l.borderAlign;if(!c)return;t.setLineDash(p||[]),t.lineDashOffset=h,m?(t.lineWidth=2*c,t.lineJoin=d||"round"):(t.lineWidth=c,t.lineJoin=d||"bevel");let g=e.endAngle;if(a){Zd(t,e,n,i,g,s);for(let e=0;e<a;++e)t.stroke();isNaN(r)||(g=o+(r%To||To))}m&&function(t,e,n){const{startAngle:i,pixelMargin:s,x:a,y:o,outerRadius:r,innerRadius:l}=e;let c=s/r;t.beginPath(),t.arc(a,o,r,i-c,n+c),l>s?(c=s/l,t.arc(a,o,l,n+c,i-c,!0)):t.arc(a,o,s,n+Po,i-Po),t.closePath(),t.clip()}(t,e,g),l.selfJoin&&g-o>=$o&&0===u&&"miter"!==d&&function(t,e,n){const{startAngle:i,x:s,y:a,outerRadius:o,innerRadius:r,options:l}=e,{borderWidth:c,borderJoinStyle:d}=l,p=Math.min(c/o,Ko(i-n));if(t.beginPath(),t.arc(s,a,o-c/2,i+p/2,n-p/2),r>0){const e=Math.min(c/r,Ko(i-n));t.arc(s,a,r+c/2,n-e/2,i+e/2,!0)}else{const e=Math.min(c/2,o*Ko(i-n));if("round"===d)t.arc(s,a,e,n-$o/2,i+$o/2,!0);else if("bevel"===d){const o=2*e*e,r=-o*Math.cos(n+$o/2)+s,l=-o*Math.sin(n+$o/2)+a,c=o*Math.cos(i+$o/2)+s,d=o*Math.sin(i+$o/2)+a;t.lineTo(r,l),t.lineTo(c,d)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}(t,e,g),a||(Zd(t,e,n,i,g,s),t.stroke())}(t,this,r,s,a),t.restore()}},BarElement:class extends od{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:n,backgroundColor:i}}=this,{inner:s,outer:a}=function(t){const e=sp(t),n=e.right-e.left,i=e.bottom-e.top,s=function(t,e,n){const i=t.options.borderWidth,s=t.borderSkipped,a=Yr(i);return{t:ap(s.top,a.top,0,n),r:ap(s.right,a.right,0,e),b:ap(s.bottom,a.bottom,0,n),l:ap(s.left,a.left,0,e)}}(t,n/2,i/2),a=function(t,e,n){const{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]),s=t.options.borderRadius,a=Jr(s),o=Math.min(e,n),r=t.borderSkipped,l=i||lo(s);return{topLeft:ap(!l||r.top||r.left,a.topLeft,0,o),topRight:ap(!l||r.top||r.right,a.topRight,0,o),bottomLeft:ap(!l||r.bottom||r.left,a.bottomLeft,0,o),bottomRight:ap(!l||r.bottom||r.right,a.bottomRight,0,o)}}(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i,radius:a},inner:{x:e.left+s.l,y:e.top+s.t,w:n-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,a.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(s.b,s.r))}}}}(this),o=(r=a.radius).topLeft||r.topRight||r.bottomLeft||r.bottomRight?Gr:rp;var r;t.save(),a.w===s.w&&a.h===s.h||(t.beginPath(),o(t,lp(a,e,s)),t.clip(),o(t,lp(s,-e,a)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),o(t,lp(s,e)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,e,n){return op(this,t,e,n)}inXRange(t,e){return op(this,t,null,e)}inYRange(t,e){return op(this,null,t,e)}getCenterPoint(t){const{x:e,y:n,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(e+i)/2:e,y:s?n:(n+i)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}},LineElement:np,PointElement:class extends od{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,n){const i=this.options,{x:s,y:a}=this.getProps(["x","y"],n);return Math.pow(t-s,2)+Math.pow(e-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,e){return ip(this,t,"x",e)}inYRange(t,e){return ip(this,t,"y",e)}getCenterPoint(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}size(t){let e=(t=t||this.options||{}).radius||0;return e=Math.max(e,e&&t.hoverRadius||0),2*(e+(e&&t.borderWidth||0))}draw(t,e){const n=this.options;this.skip||n.radius<.1||!Fr(this,e,this.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,Pr(t,n,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}});const dp=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],pp=dp.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function hp(t){return dp[t%dp.length]}function up(t){return pp[t%pp.length]}function mp(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var gp={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:i},options:s}=t.config,{elements:a}=s,o=mp(i)||(r=s)&&(r.borderColor||r.backgroundColor)||a&&mp(a)||"rgba(0,0,0,0.1)"!==$r.borderColor||"rgba(0,0,0,0.1)"!==$r.backgroundColor;var r;if(!n.forceOverride&&o)return;const l=function(t){let e=0;return(n,i)=>{const s=t.getDatasetMeta(i).controller;s instanceof yc?e=function(t,e){return t.backgroundColor=t.data.map(()=>hp(e++)),e}(n,e):s instanceof xc?e=function(t,e){return t.backgroundColor=t.data.map(()=>up(e++)),e}(n,e):s&&(e=function(t,e){return t.borderColor=hp(e),t.backgroundColor=up(e),++e}(n,e))}}(t);i.forEach(l)}};function fp(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function bp(t){t.data.datasets.forEach(t=>{fp(t)})}var vp={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled)return void bp(t);const i=t.width;t.data.datasets.forEach((e,s)=>{const{_data:a,indexAxis:o}=e,r=t.getDatasetMeta(s),l=a||e.data;if("y"===tl([o,t.options.indexAxis]))return;if(!r.controller.supportsDecimation)return;const c=t.scales[r.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let d,{start:p,count:h}=function(t,e){const n=e.length;let i,s=0;const{iScale:a}=t,{min:o,max:r,minDefined:l,maxDefined:c}=a.getUserBounds();return l&&(s=Jo(tr(e,a.axis,o).lo,0,n-1)),i=c?Jo(tr(e,a.axis,r).hi+1,s,n)-s:n-s,{start:s,count:i}}(r,l);if(h<=(n.threshold||4*i))fp(e);else{switch(oo(a)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),n.algorithm){case"lttb":d=function(t,e,n,i,s){const a=s.samples||i;if(a>=n)return t.slice(e,e+n);const o=[],r=(n-2)/(a-2);let l=0;const c=e+n-1;let d,p,h,u,m,g=e;for(o[l++]=t[g],d=0;d<a-2;d++){let i,s=0,a=0;const c=Math.floor((d+1)*r)+1+e,f=Math.min(Math.floor((d+2)*r)+1,n)+e,b=f-c;for(i=c;i<f;i++)s+=t[i].x,a+=t[i].y;s/=b,a/=b;const v=Math.floor(d*r)+1+e,y=Math.min(Math.floor((d+1)*r)+1,n)+e,{x,y:_}=t[g];for(h=u=-1,i=v;i<y;i++)u=.5*Math.abs((x-s)*(t[i].y-_)-(x-t[i].x)*(a-_)),u>h&&(h=u,p=t[i],m=i);o[l++]=p,g=m}return o[l++]=t[c],o}(l,p,h,i,n);break;case"min-max":d=function(t,e,n,i){let s,a,o,r,l,c,d,p,h,u,m=0,g=0;const f=[],b=e+n-1,v=t[e].x,y=t[b].x-v;for(s=e;s<e+n;++s){a=t[s],o=(a.x-v)/y*i,r=a.y;const e=0|o;if(e===l)r<h?(h=r,c=s):r>u&&(u=r,d=s),m=(g*m+a.x)/++g;else{const n=s-1;if(!oo(c)&&!oo(d)){const e=Math.min(c,d),i=Math.max(c,d);e!==p&&e!==n&&f.push({...t[e],x:m}),i!==p&&i!==n&&f.push({...t[i],x:m})}s>0&&n!==p&&f.push(t[n]),f.push(a),l=e,g=0,h=u=r,c=d=p=s}}return f}(l,p,h,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}e._decimated=d}})},destroy(t){bp(t)}};function yp(t,e,n,i){if(i)return;let s=e[t],a=n[t];return"angle"===t&&(s=Ko(s),a=Ko(a)),{property:t,start:s,end:a}}function xp(t,e,n){for(;e>t;e--){const t=n[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function _p(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function wp(t,e){let n=[],i=!1;return ro(t)?(i=!0,n=t):n=function(t,e){const{x:n=null,y:i=null}=t||{},s=e.points,a=[];return e.segments.forEach(({start:t,end:e})=>{e=xp(t,e,s);const o=s[t],r=s[e];null!==i?(a.push({x:o.x,y:i}),a.push({x:r.x,y:i})):null!==n&&(a.push({x:n,y:o.y}),a.push({x:n,y:r.y}))}),a}(t,e),n.length?new np({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function kp(t){return t&&!1!==t.fill}function Dp(t,e,n){let i=t[e].fill;const s=[e];let a;if(!n)return i;for(;!1!==i&&-1===s.indexOf(i);){if(!co(i))return i;if(a=t[i],!a)return!1;if(a.visible)return i;s.push(i),i=a.fill}return!1}function Ip(t,e,n){const i=function(t){const e=t.options,n=e.fill;let i=ho(n&&n.target,n);return void 0===i&&(i=!!e.backgroundColor),!1!==i&&null!==i&&(!0===i?"origin":i)}(t);if(lo(i))return!isNaN(i.value)&&i;let s=parseFloat(i);return co(s)&&Math.floor(s)===s?function(t,e,n,i){return"-"!==t&&"+"!==t||(n=e+n),!(n===e||n<0||n>=i)&&n}(i[0],e,s,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function Cp(t,e,n){const i=[];for(let s=0;s<n.length;s++){const a=n[s],{first:o,last:r,point:l}=Mp(a,e,"x");if(!(!l||o&&r))if(o)i.unshift(l);else if(t.push(l),!r)break}t.push(...i)}function Mp(t,e,n){const i=t.interpolate(e,n);if(!i)return{};const s=i[n],a=t.segments,o=t.points;let r=!1,l=!1;for(let t=0;t<a.length;t++){const e=a[t],i=o[e.start][n],c=o[e.end][n];if(Xo(s,i,c)){r=s===i,l=s===c;break}}return{first:r,last:l,point:i}}class Sp{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,n){const{x:i,y:s,radius:a}=this;return e=e||{start:0,end:To},t.arc(i,s,a,e.end,e.start,!0),!n.bounds}interpolate(t){const{x:e,y:n,radius:i}=this,s=t.angle;return{x:e+Math.cos(s)*i,y:n+Math.sin(s)*i,angle:s}}}function $p(t,e,n){const i=function(t){const{chart:e,fill:n,line:i}=t;if(co(n))return function(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}(e,n);if("stack"===n)return function(t){const{scale:e,index:n,line:i}=t,s=[],a=i.segments,o=i.points,r=function(t,e){const n=[],i=t.getMatchingVisibleMetas("line");for(let t=0;t<i.length;t++){const s=i[t];if(s.index===e)break;s.hidden||n.unshift(s.dataset)}return n}(e,n);r.push(wp({x:null,y:e.bottom},i));for(let t=0;t<a.length;t++){const e=a[t];for(let t=e.start;t<=e.end;t++)Cp(s,o[t],r)}return new np({points:s,options:{}})}(t);if("shape"===n)return!0;const s=function(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:n}=t,i=e.options,s=e.getLabels().length,a=i.reverse?e.max:e.min,o=function(t,e,n){let i;return i="start"===t?n:"end"===t?e.options.reverse?e.min:e.max:lo(t)?t.value:e.getBaseValue(),i}(n,e,a),r=[];if(i.grid.circular){const t=e.getPointPositionForValue(0,a);return new Sp({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(o)})}for(let t=0;t<s;++t)r.push(e.getPointPositionForValue(t,o));return r}(t):function(t){const{scale:e={},fill:n}=t,i=function(t,e){let n=null;return"start"===t?n=e.bottom:"end"===t?n=e.top:lo(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}(n,e);if(co(i)){const t=e.isHorizontal();return{x:t?i:null,y:t?null:i}}return null}(t)}(t);return s instanceof Sp?s:wp(s,i)}(e),{chart:s,index:a,line:o,scale:r,axis:l}=e,c=o.options,d=c.fill,p=c.backgroundColor,{above:h=p,below:u=p}=d||{},m=s.getDatasetMeta(a),g=Ul(s,m);i&&o.points.length&&(Vr(t,n),function(t,e){const{line:n,target:i,above:s,below:a,area:o,scale:r,clip:l}=e,c=n._loop?"angle":e.axis;t.save();let d=a;a!==s&&("x"===c?(Tp(t,i,o.top),Ep(t,{line:n,target:i,color:s,scale:r,property:c,clip:l}),t.restore(),t.save(),Tp(t,i,o.bottom)):"y"===c&&(Op(t,i,o.left),Ep(t,{line:n,target:i,color:a,scale:r,property:c,clip:l}),t.restore(),t.save(),Op(t,i,o.right),d=s)),Ep(t,{line:n,target:i,color:d,scale:r,property:c,clip:l}),t.restore()}(t,{line:o,target:i,above:h,below:u,area:n,scale:r,axis:l,clip:g}),Ar(t))}function Tp(t,e,n){const{segments:i,points:s}=e;let a=!0,o=!1;t.beginPath();for(const r of i){const{start:i,end:l}=r,c=s[i],d=s[xp(i,l,s)];a?(t.moveTo(c.x,c.y),a=!1):(t.lineTo(c.x,n),t.lineTo(c.x,c.y)),o=!!e.pathSegment(t,r,{move:o}),o?t.closePath():t.lineTo(d.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function Op(t,e,n){const{segments:i,points:s}=e;let a=!0,o=!1;t.beginPath();for(const r of i){const{start:i,end:l}=r,c=s[i],d=s[xp(i,l,s)];a?(t.moveTo(c.x,c.y),a=!1):(t.lineTo(n,c.y),t.lineTo(c.x,c.y)),o=!!e.pathSegment(t,r,{move:o}),o?t.closePath():t.lineTo(n,d.y)}t.lineTo(n,e.first().y),t.closePath(),t.clip()}function Ep(t,e){const{line:n,target:i,property:s,color:a,scale:o,clip:r}=e,l=function(t,e,n){const i=t.segments,s=t.points,a=e.points,o=[];for(const t of i){let{start:i,end:r}=t;r=xp(i,r,s);const l=yp(n,s[i],s[r],t.loop);if(!e.segments){o.push({source:t,target:l,start:s[i],end:s[r]});continue}const c=zl(e,l);for(const e of c){const i=yp(n,a[e.start],a[e.end],e.loop),r=Hl(t,s,i);for(const t of r)o.push({source:t,target:e,start:{[n]:_p(l,i,"start",Math.max)},end:{[n]:_p(l,i,"end",Math.min)}})}}return o}(n,i,s);for(const{source:e,target:c,start:d,end:p}of l){const{style:{backgroundColor:l=a}={}}=e,h=!0!==i;t.save(),t.fillStyle=l,Rp(t,o,r,h&&yp(s,d,p)),t.beginPath();const u=!!n.pathSegment(t,e);let m;if(h){u?t.closePath():Pp(t,i,p,s);const e=!!i.pathSegment(t,c,{move:u,reverse:!0});m=u&&e,m||Pp(t,i,d,s)}t.closePath(),t.fill(m?"evenodd":"nonzero"),t.restore()}}function Rp(t,e,n,i){const s=e.chart.chartArea,{property:a,start:o,end:r}=i||{};if("x"===a||"y"===a){let e,i,l,c;"x"===a?(e=o,i=s.top,l=r,c=s.bottom):(e=s.left,i=o,l=s.right,c=r),t.beginPath(),n&&(e=Math.max(e,n.left),l=Math.min(l,n.right),i=Math.max(i,n.top),c=Math.min(c,n.bottom)),t.rect(e,i,l-e,c-i),t.clip()}}function Pp(t,e,n,i){const s=e.interpolate(n,i);s&&t.lineTo(s.x,s.y)}var Np={id:"filler",afterDatasetsUpdate(t,e,n){const i=(t.data.datasets||[]).length,s=[];let a,o,r,l;for(o=0;o<i;++o)a=t.getDatasetMeta(o),r=a.dataset,l=null,r&&r.options&&r instanceof np&&(l={visible:t.isDatasetVisible(o),index:o,fill:Ip(r,o,i),chart:t,axis:a.controller.options.indexAxis,scale:a.vScale,line:r}),a.$filler=l,s.push(l);for(o=0;o<i;++o)l=s[o],l&&!1!==l.fill&&(l.fill=Dp(s,o,n.propagate))},beforeDraw(t,e,n){const i="beforeDraw"===n.drawTime,s=t.getSortedVisibleDatasetMetas(),a=t.chartArea;for(let e=s.length-1;e>=0;--e){const n=s[e].$filler;n&&(n.line.updateControlPoints(a,n.axis),i&&n.fill&&$p(t.ctx,n,a))}},beforeDatasetsDraw(t,e,n){if("beforeDatasetsDraw"!==n.drawTime)return;const i=t.getSortedVisibleDatasetMetas();for(let e=i.length-1;e>=0;--e){const n=i[e].$filler;kp(n)&&$p(t.ctx,n,t.chartArea)}},beforeDatasetDraw(t,e,n){const i=e.meta.$filler;kp(i)&&"beforeDatasetDraw"===n.drawTime&&$p(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Fp=(t,e)=>{let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}};class Vp extends od{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=mo(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(e=>t.filter(e,this.chart.data))),t.sort&&(e=e.sort((e,n)=>t.sort(e,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const n=t.labels,i=Qr(n.font),s=i.size,a=this._computeTitleHeight(),{boxWidth:o,itemHeight:r}=Fp(n,s);let l,c;e.font=i.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(a,s,o,r)+10):(c=this.maxHeight,l=this._fitCols(a,i,o,r)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,i){const{ctx:s,maxWidth:a,options:{labels:{padding:o}}}=this,r=this.legendHitBoxes=[],l=this.lineWidths=[0],c=i+o;let d=t;s.textAlign="left",s.textBaseline="middle";let p=-1,h=-c;return this.legendItems.forEach((t,u)=>{const m=n+e/2+s.measureText(t.text).width;(0===u||l[l.length-1]+m+2*o>a)&&(d+=c,l[l.length-(u>0?0:1)]=0,h+=c,p++),r[u]={left:0,top:h,row:p,width:m,height:i},l[l.length-1]+=m+o}),d}_fitCols(t,e,n,i){const{ctx:s,maxHeight:a,options:{labels:{padding:o}}}=this,r=this.legendHitBoxes=[],l=this.columnSizes=[],c=a-t;let d=o,p=0,h=0,u=0,m=0;return this.legendItems.forEach((t,a)=>{const{itemWidth:g,itemHeight:f}=function(t,e,n,i,s){const a=function(t,e,n,i){let s=t.text;return s&&"string"!=typeof s&&(s=s.reduce((t,e)=>t.length>e.length?t:e)),e+n.size/2+i.measureText(s).width}(i,t,e,n),o=function(t,e,n){let i=t;return"string"!=typeof e.text&&(i=Ap(e,n)),i}(s,i,e.lineHeight);return{itemWidth:a,itemHeight:o}}(n,e,s,t,i);a>0&&h+f+2*o>c&&(d+=p+o,l.push({width:p,height:h}),u+=p+o,m++,p=h=0),r[a]={left:u,top:h,col:m,width:g,height:f},p=Math.max(p,g),h+=f+o}),d+=p,l.push({width:p,height:h}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:i},rtl:s}}=this,a=Fl(s,this.left,this.width);if(this.isHorizontal()){let s=0,o=lr(n,this.left+i,this.right-this.lineWidths[s]);for(const r of e)s!==r.row&&(s=r.row,o=lr(n,this.left+i,this.right-this.lineWidths[s])),r.top+=this.top+t+i,r.left=a.leftForLtr(a.x(o),r.width),o+=r.width+i}else{let s=0,o=lr(n,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const r of e)r.col!==s&&(s=r.col,o=lr(n,this.top+t+i,this.bottom-this.columnSizes[s].height)),r.top=o,r.left+=this.left+i,r.left=a.leftForLtr(a.x(r.left),r.width),o+=r.height+i}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;Vr(t,this),this._draw(),Ar(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:i}=this,{align:s,labels:a}=t,o=$r.color,r=Fl(t.rtl,this.left,this.width),l=Qr(a.font),{padding:c}=a,d=l.size,p=d/2;let h;this.drawTitle(),i.textAlign=r.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=l.string;const{boxWidth:u,boxHeight:m,itemHeight:g}=Fp(a,d),f=this.isHorizontal(),b=this._computeTitleHeight();h=f?{x:lr(s,this.left+c,this.right-n[0]),y:this.top+c+b,line:0}:{x:this.left+c,y:lr(s,this.top+b+c,this.bottom-e[0].height),line:0},Vl(this.ctx,t.textDirection);const v=g+c;this.legendItems.forEach((y,x)=>{i.strokeStyle=y.fontColor,i.fillStyle=y.fontColor;const _=i.measureText(y.text).width,w=r.textAlign(y.textAlign||(y.textAlign=a.textAlign)),k=u+p+_;let D=h.x,I=h.y;if(r.setWidth(this.width),f?x>0&&D+k+c>this.right&&(I=h.y+=v,h.line++,D=h.x=lr(s,this.left+c,this.right-n[h.line])):x>0&&I+v>this.bottom&&(D=h.x=D+e[h.line].width+c,h.line++,I=h.y=lr(s,this.top+b+c,this.bottom-e[h.line].height)),function(t,e,n){if(isNaN(u)||u<=0||isNaN(m)||m<0)return;i.save();const s=ho(n.lineWidth,1);if(i.fillStyle=ho(n.fillStyle,o),i.lineCap=ho(n.lineCap,"butt"),i.lineDashOffset=ho(n.lineDashOffset,0),i.lineJoin=ho(n.lineJoin,"miter"),i.lineWidth=s,i.strokeStyle=ho(n.strokeStyle,o),i.setLineDash(ho(n.lineDash,[])),a.usePointStyle){const o={radius:m*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:s},l=r.xPlus(t,u/2);Nr(i,o,l,e+p,a.pointStyleWidth&&u)}else{const a=e+Math.max((d-m)/2,0),o=r.leftForLtr(t,u),l=Jr(n.borderRadius);i.beginPath(),Object.values(l).some(t=>0!==t)?Gr(i,{x:o,y:a,w:u,h:m,radius:l}):i.rect(o,a,u,m),i.fill(),0!==s&&i.stroke()}i.restore()}(r.x(D),I,y),D=((t,e,n,i)=>t===(i?"left":"right")?n:"center"===t?(e+n)/2:e)(w,D+u+p,f?D+k:this.right,t.rtl),function(t,e,n){Br(i,n.text,t,e+g/2,l,{strikethrough:n.hidden,textAlign:r.textAlign(n.textAlign)})}(r.x(D),I,y),f)h.x+=k+c;else if("string"!=typeof y.text){const t=l.lineHeight;h.y+=Ap(y,t)+c}else h.y+=v}),Al(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=Qr(e.font),i=Xr(e.padding);if(!e.display)return;const s=Fl(t.rtl,this.left,this.width),a=this.ctx,o=e.position,r=n.size/2,l=i.top+r;let c,d=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),c=this.top+l,d=lr(t.align,d,this.right-p);else{const e=this.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);c=l+lr(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const h=lr(o,d,d+p);a.textAlign=s.textAlign(rr(o)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=n.string,Br(a,e.text,h,c,n)}_computeTitleHeight(){const t=this.options.title,e=Qr(t.font),n=Xr(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,i,s;if(Xo(t,this.left,this.right)&&Xo(e,this.top,this.bottom))for(s=this.legendHitBoxes,n=0;n<s.length;++n)if(i=s[n],Xo(t,i.left,i.left+i.width)&&Xo(e,i.top,i.top+i.height))return this.legendItems[n];return null}handleEvent(t){const e=this.options;if(!function(t,e){return!("mousemove"!==t&&"mouseout"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}(t.type,e))return;const n=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const a=this._hoveredItem,o=(s=n,null!==(i=a)&&null!==s&&i.datasetIndex===s.datasetIndex&&i.index===s.index);a&&!o&&mo(e.onLeave,[t,a,this],this),this._hoveredItem=n,n&&!o&&mo(e.onHover,[t,n,this],this)}else n&&mo(e.onClick,[t,n,this],this);var i,s}}function Ap(t,e){return e*(t.text?t.text.length:0)}var Lp={id:"legend",_element:Vp,start(t,e,n){const i=t.legend=new Vp({ctx:t.ctx,options:n,chart:t});zc.configure(t,i,n),zc.addBox(t,i)},stop(t){zc.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;zc.configure(t,i,n),i.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const i=e.datasetIndex,s=n.chart;s.isDatasetVisible(i)?(s.hide(i),e.hidden=!0):(s.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:s,color:a,useBorderRadius:o,borderRadius:r}}=t.legend.options;return t._getSortedDatasetMetas().map(t=>{const l=t.controller.getStyle(n?0:void 0),c=Xr(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:a,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:i||l.pointStyle,rotation:l.rotation,textAlign:s||l.textAlign,borderRadius:o&&(r||l.borderRadius),datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class jp extends od{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const i=ro(n.text)?n.text.length:1;this._padding=Xr(n.padding);const s=i*Qr(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:n,bottom:i,right:s,options:a}=this,o=a.align;let r,l,c,d=0;return this.isHorizontal()?(l=lr(o,n,s),c=e+t,r=s-n):("left"===a.position?(l=n+t,c=lr(o,i,e),d=-.5*$o):(l=s-t,c=lr(o,e,i),d=.5*$o),r=i-e),{titleX:l,titleY:c,maxWidth:r,rotation:d}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=Qr(e.font),i=n.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:o,rotation:r}=this._drawArgs(i);Br(t,e.text,0,0,n,{color:e.color,maxWidth:o,rotation:r,textAlign:rr(e.align),textBaseline:"middle",translation:[s,a]})}}var Hp={id:"title",_element:jp,start(t,e,n){!function(t,e){const n=new jp({ctx:t.ctx,options:e,chart:t});zc.configure(t,n,e),zc.addBox(t,n),t.titleBlock=n}(t,n)},stop(t){const e=t.titleBlock;zc.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;zc.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const zp=new WeakMap;var Bp={id:"subtitle",start(t,e,n){const i=new jp({ctx:t.ctx,options:n,chart:t});zc.configure(t,i,n),zc.addBox(t,i),zp.set(t,i)},stop(t){zc.removeBox(t,zp.get(t)),zp.delete(t)},beforeUpdate(t,e,n){const i=zp.get(t);zc.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Gp={average(t){if(!t.length)return!1;let e,n,i=new Set,s=0,a=0;for(e=0,n=t.length;e<n;++e){const n=t[e].element;if(n&&n.hasValue()){const t=n.tooltipPosition();i.add(t.x),s+=t.y,++a}}return 0!==a&&0!==i.size&&{x:[...i].reduce((t,e)=>t+e)/i.size,y:s/a}},nearest(t,e){if(!t.length)return!1;let n,i,s,a=e.x,o=e.y,r=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){const i=t[n].element;if(i&&i.hasValue()){const t=qo(e,i.getCenterPoint());t<r&&(r=t,s=i)}}if(s){const t=s.tooltipPosition();a=t.x,o=t.y}return{x:a,y:o}}};function Wp(t,e){return e&&(ro(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Up(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function qp(t,e){const{element:n,datasetIndex:i,index:s}=e,a=t.getDatasetMeta(i).controller,{label:o,value:r}=a.getLabelAndValue(s);return{chart:t,label:o,parsed:a.getParsed(s),raw:t.data.datasets[i].data[s],formattedValue:r,dataset:a.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function Zp(t,e){const n=t.chart.ctx,{body:i,footer:s,title:a}=t,{boxWidth:o,boxHeight:r}=e,l=Qr(e.bodyFont),c=Qr(e.titleFont),d=Qr(e.footerFont),p=a.length,h=s.length,u=i.length,m=Xr(e.padding);let g=m.height,f=0,b=i.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);b+=t.beforeBody.length+t.afterBody.length,p&&(g+=p*c.lineHeight+(p-1)*e.titleSpacing+e.titleMarginBottom),b&&(g+=u*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(b-u)*l.lineHeight+(b-1)*e.bodySpacing),h&&(g+=e.footerMarginTop+h*d.lineHeight+(h-1)*e.footerSpacing);let v=0;const y=function(t){f=Math.max(f,n.measureText(t).width+v)};return n.save(),n.font=c.string,go(t.title,y),n.font=l.string,go(t.beforeBody.concat(t.afterBody),y),v=e.displayColors?o+2+e.boxPadding:0,go(i,t=>{go(t.before,y),go(t.lines,y),go(t.after,y)}),v=0,n.font=d.string,go(t.footer,y),n.restore(),f+=m.width,{width:f,height:g}}function Kp(t,e,n,i){const{x:s,width:a}=n,{width:o,chartArea:{left:r,right:l}}=t;let c="center";return"center"===i?c=s<=(r+l)/2?"left":"right":s<=a/2?c="left":s>=o-a/2&&(c="right"),function(t,e,n,i){const{x:s,width:a}=i,o=n.caretSize+n.caretPadding;return"left"===t&&s+a+o>e.width||"right"===t&&s-a-o<0||void 0}(c,t,e,n)&&(c="center"),c}function Yp(t,e,n){const i=n.yAlign||e.yAlign||function(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}(t,n);return{xAlign:n.xAlign||e.xAlign||Kp(t,e,n,i),yAlign:i}}function Jp(t,e,n,i){const{caretSize:s,caretPadding:a,cornerRadius:o}=t,{xAlign:r,yAlign:l}=n,c=s+a,{topLeft:d,topRight:p,bottomLeft:h,bottomRight:u}=Jr(o);let m=function(t,e){let{x:n,width:i}=t;return"right"===e?n-=i:"center"===e&&(n-=i/2),n}(e,r);const g=function(t,e,n){let{y:i,height:s}=t;return"top"===e?i+=n:i-="bottom"===e?s+n:s/2,i}(e,l,c);return"center"===l?"left"===r?m+=c:"right"===r&&(m-=c):"left"===r?m-=Math.max(d,h)+s:"right"===r&&(m+=Math.max(p,u)+s),{x:Jo(m,0,i.width-e.width),y:Jo(g,0,i.height-e.height)}}function Xp(t,e,n){const i=Xr(n.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-i.right:t.x+i.left}function Qp(t){return Wp([],Up(t))}function th(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const eh={beforeTitle:so,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:so,beforeBody:so,beforeLabel:so,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return oo(n)||(e+=n),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:so,afterBody:so,beforeFooter:so,footer:so,afterFooter:so};function nh(t,e,n,i){const s=t[e].call(n,i);return void 0===s?eh[e].call(n,i):s}class ih extends od{static positioners=Gp;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&e.options.animation&&n.animations,s=new Xl(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=el(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"}))}getTitle(t,e){const{callbacks:n}=e,i=nh(n,"beforeTitle",this,t),s=nh(n,"title",this,t),a=nh(n,"afterTitle",this,t);let o=[];return o=Wp(o,Up(i)),o=Wp(o,Up(s)),o=Wp(o,Up(a)),o}getBeforeBody(t,e){return Qp(nh(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:n}=e,i=[];return go(t,t=>{const e={before:[],lines:[],after:[]},s=th(n,t);Wp(e.before,Up(nh(s,"beforeLabel",this,t))),Wp(e.lines,nh(s,"label",this,t)),Wp(e.after,Up(nh(s,"afterLabel",this,t))),i.push(e)}),i}getAfterBody(t,e){return Qp(nh(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,i=nh(n,"beforeFooter",this,t),s=nh(n,"footer",this,t),a=nh(n,"afterFooter",this,t);let o=[];return o=Wp(o,Up(i)),o=Wp(o,Up(s)),o=Wp(o,Up(a)),o}_createItems(t){const e=this._active,n=this.chart.data,i=[],s=[],a=[];let o,r,l=[];for(o=0,r=e.length;o<r;++o)l.push(qp(this.chart,e[o]));return t.filter&&(l=l.filter((e,i,s)=>t.filter(e,i,s,n))),t.itemSort&&(l=l.sort((e,i)=>t.itemSort(e,i,n))),go(l,e=>{const n=th(t.callbacks,e);i.push(nh(n,"labelColor",this,e)),s.push(nh(n,"labelPointStyle",this,e)),a.push(nh(n,"labelTextColor",this,e))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=a,this.dataPoints=l,l}update(t,e){const n=this.options.setContext(this.getContext()),i=this._active;let s,a=[];if(i.length){const t=Gp[n.position].call(this,i,this._eventPosition);a=this._createItems(n),this.title=this.getTitle(a,n),this.beforeBody=this.getBeforeBody(a,n),this.body=this.getBody(a,n),this.afterBody=this.getAfterBody(a,n),this.footer=this.getFooter(a,n);const e=this._size=Zp(this,n),o=Object.assign({},t,e),r=Yp(this.chart,n,o),l=Jp(n,o,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,s={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(s={opacity:0});this._tooltipItems=a,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,i){const s=this.getCaretPosition(t,n,i);e.lineTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.lineTo(s.x3,s.y3)}getCaretPosition(t,e,n){const{xAlign:i,yAlign:s}=this,{caretSize:a,cornerRadius:o}=n,{topLeft:r,topRight:l,bottomLeft:c,bottomRight:d}=Jr(o),{x:p,y:h}=t,{width:u,height:m}=e;let g,f,b,v,y,x;return"center"===s?(y=h+m/2,"left"===i?(g=p,f=g-a,v=y+a,x=y-a):(g=p+u,f=g+a,v=y-a,x=y+a),b=g):(f="left"===i?p+Math.max(r,c)+a:"right"===i?p+u-Math.max(l,d)-a:this.caretX,"top"===s?(v=h,y=v-a,g=f-a,b=f+a):(v=h+m,y=v+a,g=f+a,b=f-a),x=v),{x1:g,x2:f,x3:b,y1:v,y2:y,y3:x}}drawTitle(t,e,n){const i=this.title,s=i.length;let a,o,r;if(s){const l=Fl(n.rtl,this.x,this.width);for(t.x=Xp(this,n.titleAlign,n),e.textAlign=l.textAlign(n.titleAlign),e.textBaseline="middle",a=Qr(n.titleFont),o=n.titleSpacing,e.fillStyle=n.titleColor,e.font=a.string,r=0;r<s;++r)e.fillText(i[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+o,r+1===s&&(t.y+=n.titleMarginBottom-o)}}_drawColorBox(t,e,n,i,s){const a=this.labelColors[n],o=this.labelPointStyles[n],{boxHeight:r,boxWidth:l}=s,c=Qr(s.bodyFont),d=Xp(this,"left",s),p=i.x(d),h=r<c.lineHeight?(c.lineHeight-r)/2:0,u=e.y+h;if(s.usePointStyle){const e={radius:Math.min(l,r)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},n=i.leftForLtr(p,l)+l/2,c=u+r/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,Pr(t,e,n,c),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Pr(t,e,n,c)}else{t.lineWidth=lo(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const e=i.leftForLtr(p,l),n=i.leftForLtr(i.xPlus(p,1),l-2),o=Jr(a.borderRadius);Object.values(o).some(t=>0!==t)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,Gr(t,{x:e,y:u,w:l,h:r,radius:o}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Gr(t,{x:n,y:u+1,w:l-2,h:r-2,radius:o}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(e,u,l,r),t.strokeRect(e,u,l,r),t.fillStyle=a.backgroundColor,t.fillRect(n,u+1,l-2,r-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:i}=this,{bodySpacing:s,bodyAlign:a,displayColors:o,boxHeight:r,boxWidth:l,boxPadding:c}=n,d=Qr(n.bodyFont);let p=d.lineHeight,h=0;const u=Fl(n.rtl,this.x,this.width),m=function(n){e.fillText(n,u.x(t.x+h),t.y+p/2),t.y+=p+s},g=u.textAlign(a);let f,b,v,y,x,_,w;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=Xp(this,g,n),e.fillStyle=n.bodyColor,go(this.beforeBody,m),h=o&&"right"!==g?"center"===a?l/2+c:l+2+c:0,y=0,_=i.length;y<_;++y){for(f=i[y],b=this.labelTextColors[y],e.fillStyle=b,go(f.before,m),v=f.lines,o&&v.length&&(this._drawColorBox(e,t,y,u,n),p=Math.max(d.lineHeight,r)),x=0,w=v.length;x<w;++x)m(v[x]),p=d.lineHeight;go(f.after,m)}h=0,p=d.lineHeight,go(this.afterBody,m),t.y-=s}drawFooter(t,e,n){const i=this.footer,s=i.length;let a,o;if(s){const r=Fl(n.rtl,this.x,this.width);for(t.x=Xp(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=r.textAlign(n.footerAlign),e.textBaseline="middle",a=Qr(n.footerFont),e.fillStyle=n.footerColor,e.font=a.string,o=0;o<s;++o)e.fillText(i[o],r.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+n.footerSpacing}}drawBackground(t,e,n,i){const{xAlign:s,yAlign:a}=this,{x:o,y:r}=t,{width:l,height:c}=n,{topLeft:d,topRight:p,bottomLeft:h,bottomRight:u}=Jr(i.cornerRadius);e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.beginPath(),e.moveTo(o+d,r),"top"===a&&this.drawCaret(t,e,n,i),e.lineTo(o+l-p,r),e.quadraticCurveTo(o+l,r,o+l,r+p),"center"===a&&"right"===s&&this.drawCaret(t,e,n,i),e.lineTo(o+l,r+c-u),e.quadraticCurveTo(o+l,r+c,o+l-u,r+c),"bottom"===a&&this.drawCaret(t,e,n,i),e.lineTo(o+h,r+c),e.quadraticCurveTo(o,r+c,o,r+c-h),"center"===a&&"left"===s&&this.drawCaret(t,e,n,i),e.lineTo(o,r+d),e.quadraticCurveTo(o,r,o+d,r),e.closePath(),e.fill(),i.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,i=n&&n.x,s=n&&n.y;if(i||s){const n=Gp[t.position].call(this,this._active,this._eventPosition);if(!n)return;const a=this._size=Zp(this,t),o=Object.assign({},n,this._size),r=Yp(e,t,o),l=Jp(t,o,r,e);i._to===l.x&&s._to===l.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=a.width,this.height=a.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const a=Xr(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=n,this.drawBackground(s,t,i,e),Vl(t,e.textDirection),s.y+=a.top,this.drawTitle(s,t,e),this.drawBody(s,t,e),this.drawFooter(s,t,e),Al(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,i=t.map(({datasetIndex:t,index:e})=>{const n=this.chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}}),s=!fo(n,i),a=this._positionChanged(i,e);(s||a)&&(this._active=i,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],a=this._getActiveElements(t,s,e,n),o=this._positionChanged(a,t),r=e||!fo(a,s)||o;return r&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,n,i){const s=this.options;if("mouseout"===t.type)return[];if(!i)return e.filter(t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index));const a=this.chart.getElementsAtEventForMode(t,s.mode,s,n);return s.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:n,caretY:i,options:s}=this,a=Gp[s.position].call(this,t,e);return!1!==a&&(n!==a.x||i!==a.y)}}var sh={id:"tooltip",_element:ih,positioners:Gp,afterInit(t,e,n){n&&(t.tooltip=new ih({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:eh},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},ah=Object.freeze({__proto__:null,Colors:gp,Decimation:vp,Filler:Np,Legend:Lp,SubTitle:Bp,Title:Hp,Tooltip:sh});function oh(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}function rh(t,e,{horizontal:n,minRotation:i}){const s=Bo(i),a=(n?Math.sin(s):Math.cos(s))||.001,o=.75*e*(""+t).length;return Math.min(e/a,o)}class lh extends gd{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return oo(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:i,max:s}=this;const a=t=>i=e?i:t,o=t=>s=n?s:t;if(t){const t=Ao(i),e=Ao(s);t<0&&e<0?o(0):t>0&&e>0&&a(0)}if(i===s){let e=0===s?1:Math.abs(.05*s);o(s+e),t||a(i-e)}this.min=i,this.max=s}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:n,stepSize:i}=t;return i?(e=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const i=function(t,e){const n=[],{bounds:i,step:s,min:a,max:o,precision:r,count:l,maxTicks:c,maxDigits:d,includeBounds:p}=t,h=s||1,u=c-1,{min:m,max:g}=e,f=!oo(a),b=!oo(o),v=!oo(l),y=(g-m)/(d+1);let x,_,w,k,D=jo((g-m)/u/h)*h;if(D<1e-14&&!f&&!b)return[{value:m},{value:g}];k=Math.ceil(g/D)-Math.floor(m/D),k>u&&(D=jo(k*D/u/h)*h),oo(r)||(x=Math.pow(10,r),D=Math.ceil(D*x)/x),"ticks"===i?(_=Math.floor(m/D)*D,w=Math.ceil(g/D)*D):(_=m,w=g),f&&b&&s&&function(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}((o-a)/s,D/1e3)?(k=Math.round(Math.min((o-a)/D,c)),D=(o-a)/k,_=a,w=o):v?(_=f?a:_,w=b?o:w,k=l-1,D=(w-_)/k):(k=(w-_)/D,k=Lo(k,Math.round(k),D/1e3)?Math.round(k):Math.ceil(k));const I=Math.max(Wo(D),Wo(_));x=Math.pow(10,oo(r)?I:r),_=Math.round(_*x)/x,w=Math.round(w*x)/x;let C=0;for(f&&(p&&_!==a?(n.push({value:a}),_<a&&C++,Lo(Math.round((_+C*D)*x)/x,a,rh(a,y,t))&&C++):_<a&&C++);C<k;++C){const t=Math.round((_+C*D)*x)/x;if(b&&t>o)break;n.push({value:t})}return b&&p&&w!==o?n.length&&Lo(n[n.length-1].value,o,rh(o,y,t))?n[n.length-1].value=o:n.push({value:o}):b&&w!==o||n.push({value:w}),n}({maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&zo(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const i=(n-e)/Math.max(t.length-1,1)/2;e-=i,n+=i}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return _r(t,this.chart.options.locale,this.options.ticks.format)}}class ch extends lh{static id="linear";static defaults={ticks:{callback:kr.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=co(t)?t:0,this.max=co(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=Bo(this.options.ticks.minRotation),i=(t?Math.sin(n):Math.cos(n))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,s.lineHeight/i))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const dh=t=>Math.floor(Vo(t)),ph=(t,e)=>Math.pow(10,dh(t)+e);function hh(t){return 1===t/Math.pow(10,dh(t))}function uh(t,e,n){const i=Math.pow(10,n),s=Math.floor(t/i);return Math.ceil(e/i)-s}class mh extends gd{static id="logarithmic";static defaults={ticks:{callback:kr.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const n=lh.prototype.parse.apply(this,[t,e]);if(0!==n)return co(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=co(t)?Math.max(0,t):null,this.max=co(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!co(this._userMin)&&(this.min=t===ph(this.min,0)?ph(this.min,-1):ph(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let n=this.min,i=this.max;const s=e=>n=t?n:e,a=t=>i=e?i:t;n===i&&(n<=0?(s(1),a(10)):(s(ph(n,-1)),a(ph(i,1)))),n<=0&&s(ph(i,-1)),i<=0&&a(ph(n,1)),this.min=n,this.max=i}buildTicks(){const t=this.options,e=function(t,{min:e,max:n}){e=po(t.min,e);const i=[],s=dh(e);let a=function(t,e){let n=dh(e-t);for(;uh(t,e,n)>10;)n++;for(;uh(t,e,n)<10;)n--;return Math.min(n,dh(t))}(e,n),o=a<0?Math.pow(10,Math.abs(a)):1;const r=Math.pow(10,a),l=s>a?Math.pow(10,s):0,c=Math.round((e-l)*o)/o,d=Math.floor((e-l)/r/10)*r*10;let p=Math.floor((c-d)/Math.pow(10,a)),h=po(t.min,Math.round((l+d+p*Math.pow(10,a))*o)/o);for(;h<n;)i.push({value:h,major:hh(h),significand:p}),p>=10?p=p<15?15:20:p++,p>=20&&(a++,p=2,o=a>=0?1:o),h=Math.round((l+d+p*Math.pow(10,a))*o)/o;const u=po(t.max,h);return i.push({value:u,major:hh(u),significand:p}),i}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&zo(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":_r(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Vo(t),this._valueRange=Vo(this.max)-Vo(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Vo(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function gh(t){const e=t.ticks;if(e.display&&t.display){const t=Xr(e.backdropPadding);return ho(e.font&&e.font.size,$r.font.size)+t.height}return 0}function fh(t,e,n){return n=ro(n)?n:[n],{w:Or(t,e.string,n),h:n.length*e.lineHeight}}function bh(t,e,n,i,s){return t===i||t===s?{start:e-n/2,end:e+n/2}:t<i||t>s?{start:e-n,end:e}:{start:e,end:e+n}}function vh(t,e,n,i,s){const a=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let r=0,l=0;i.start<e.l?(r=(e.l-i.start)/a,t.l=Math.min(t.l,e.l-r)):i.end>e.r&&(r=(i.end-e.r)/a,t.r=Math.max(t.r,e.r+r)),s.start<e.t?(l=(e.t-s.start)/o,t.t=Math.min(t.t,e.t-l)):s.end>e.b&&(l=(s.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function yh(t,e,n){const i=t.drawingArea,{extra:s,additionalAngle:a,padding:o,size:r}=n,l=t.getPointPosition(e,i+s+o,a),c=Math.round(Go(Ko(l.angle+Po))),d=function(t,e,n){return 90===n||270===n?t-=e/2:(n>270||n<90)&&(t-=e),t}(l.y,r.h,c),p=function(t){return 0===t||180===t?"center":t<180?"left":"right"}(c),h=(u=l.x,m=r.w,"right"===(g=p)?u-=m:"center"===g&&(u-=m/2),u);var u,m,g;return{visible:!0,x:l.x,y:d,textAlign:p,left:h,top:d,right:h+r.w,bottom:d+r.h}}function xh(t,e){if(!e)return!0;const{left:n,top:i,right:s,bottom:a}=t;return!(Fr({x:n,y:i},e)||Fr({x:n,y:a},e)||Fr({x:s,y:i},e)||Fr({x:s,y:a},e))}function _h(t,e,n){const{left:i,top:s,right:a,bottom:o}=n,{backdropColor:r}=e;if(!oo(r)){const n=Jr(e.borderRadius),l=Xr(e.backdropPadding);t.fillStyle=r;const c=i-l.left,d=s-l.top,p=a-i+l.width,h=o-s+l.height;Object.values(n).some(t=>0!==t)?(t.beginPath(),Gr(t,{x:c,y:d,w:p,h,radius:n}),t.fill()):t.fillRect(c,d,p,h)}}function wh(t,e,n,i){const{ctx:s}=t;if(n)s.arc(t.xCenter,t.yCenter,e,0,To);else{let n=t.getPointPosition(0,e);s.moveTo(n.x,n.y);for(let a=1;a<i;a++)n=t.getPointPosition(a,e),s.lineTo(n.x,n.y)}}class kh extends lh{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:kr.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Xr(gh(this.options)/2),e=this.width=this.maxWidth-t.width,n=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+n/2+t.top),this.drawingArea=Math.floor(Math.min(e,n)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=co(t)&&!isNaN(t)?t:0,this.max=co(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/gh(this.options))}generateTickLabels(t){lh.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((t,e)=>{const n=mo(this.options.pointLabels.callback,[t,e],this);return n||0===n?n:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){const t=this.options;t.display&&t.pointLabels.display?function(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),i=[],s=[],a=t._pointLabels.length,o=t.options.pointLabels,r=o.centerPointLabels?$o/a:0;for(let l=0;l<a;l++){const a=o.setContext(t.getPointLabelContext(l));s[l]=a.padding;const c=t.getPointPosition(l,t.drawingArea+s[l],r),d=Qr(a.font),p=fh(t.ctx,d,t._pointLabels[l]);i[l]=p;const h=Ko(t.getIndexAngle(l)+r),u=Math.round(Go(h));vh(n,e,h,bh(u,c.x,p.w,0,180),bh(u,c.y,p.h,90,270))}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=function(t,e,n){const i=[],s=t._pointLabels.length,a=t.options,{centerPointLabels:o,display:r}=a.pointLabels,l={extra:gh(a)/2,additionalAngle:o?$o/s:0};let c;for(let a=0;a<s;a++){l.padding=n[a],l.size=e[a];const s=yh(t,a,l);i.push(s),"auto"===r&&(s.visible=xh(s,c),s.visible&&(c=s))}return i}(t,i,s)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,i){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,i))}getIndexAngle(t){return Ko(t*(To/(this._pointLabels.length||1))+Bo(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(oo(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(oo(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const n=e[t];return function(t,e,n){return el(t,{label:n,index:e,type:"pointLabel"})}(this.getContext(),t,n)}}getPointPosition(t,e,n=0){const i=this.getIndexAngle(t)-Po+n;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter,angle:i}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:n,right:i,bottom:s}=this._pointLabelItems[t];return{left:e,top:n,right:i,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const n=this.ctx;n.save(),n.beginPath(),wh(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:n,grid:i,border:s}=e,a=this._pointLabels.length;let o,r,l;if(e.pointLabels.display&&function(t,e){const{ctx:n,options:{pointLabels:i}}=t;for(let s=e-1;s>=0;s--){const e=t._pointLabelItems[s];if(!e.visible)continue;const a=i.setContext(t.getPointLabelContext(s));_h(n,a,e);const o=Qr(a.font),{x:r,y:l,textAlign:c}=e;Br(n,t._pointLabels[s],r,l+o.lineHeight/2,o,{color:a.color,textAlign:c,textBaseline:"middle"})}}(this,a),i.display&&this.ticks.forEach((t,e)=>{if(0!==e||0===e&&this.min<0){r=this.getDistanceFromCenterForValue(t.value);const n=this.getContext(e),o=i.setContext(n),l=s.setContext(n);!function(t,e,n,i,s){const a=t.ctx,o=e.circular,{color:r,lineWidth:l}=e;!o&&!i||!r||!l||n<0||(a.save(),a.strokeStyle=r,a.lineWidth=l,a.setLineDash(s.dash||[]),a.lineDashOffset=s.dashOffset,a.beginPath(),wh(t,n,o,i),a.closePath(),a.stroke(),a.restore())}(this,o,r,a,l)}}),n.display){for(t.save(),o=a-1;o>=0;o--){const i=n.setContext(this.getPointLabelContext(o)),{color:s,lineWidth:a}=i;a&&s&&(t.lineWidth=a,t.strokeStyle=s,t.setLineDash(i.borderDash),t.lineDashOffset=i.borderDashOffset,r=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),l=this.getPointPosition(o,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;const i=this.getIndexAngle(0);let s,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((i,o)=>{if(0===o&&this.min>=0&&!e.reverse)return;const r=n.setContext(this.getContext(o)),l=Qr(r.font);if(s=this.getDistanceFromCenterForValue(this.ticks[o].value),r.showLabelBackdrop){t.font=l.string,a=t.measureText(i.label).width,t.fillStyle=r.backdropColor;const e=Xr(r.backdropPadding);t.fillRect(-a/2-e.left,-s-l.size/2-e.top,a+e.width,l.size+e.height)}Br(t,i.label,0,-s,l,{color:r.color,strokeColor:r.textStrokeColor,strokeWidth:r.textStrokeWidth})}),t.restore()}drawTitle(){}}const Dh={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ih=Object.keys(Dh);function Ch(t,e){return t-e}function Mh(t,e){if(oo(e))return null;const n=t._adapter,{parser:i,round:s,isoWeekday:a}=t._parseOpts;let o=e;return"function"==typeof i&&(o=i(o)),co(o)||(o="string"==typeof i?n.parse(o,i):n.parse(o)),null===o?null:(s&&(o="week"!==s||!Ho(a)&&!0!==a?n.startOf(o,s):n.startOf(o,"isoWeek",a)),+o)}function Sh(t,e,n,i){const s=Ih.length;for(let a=Ih.indexOf(t);a<s-1;++a){const t=Dh[Ih[a]],s=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((n-e)/(s*t.size))<=i)return Ih[a]}return Ih[s-1]}function $h(t,e,n){if(n){if(n.length){const{lo:i,hi:s}=Qo(n,e);t[n[i]>=e?n[i]:n[s]]=!0}}else t[e]=!0}function Th(t,e,n){const i=[],s={},a=e.length;let o,r;for(o=0;o<a;++o)r=e[o],s[r]=o,i.push({value:r,major:!1});return 0!==a&&n?function(t,e,n,i){const s=t._adapter,a=+s.startOf(e[0].value,i),o=e[e.length-1].value;let r,l;for(r=a;r<=o;r=+s.add(r,1,i))l=n[r],l>=0&&(e[l].major=!0);return e}(t,i,s,n):i}class Oh extends gd{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const n=t.time||(t.time={}),i=this._adapter=new Dc(t.adapters.date);i.init(e),_o(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Mh(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,n=t.time.unit||"day";let{min:i,max:s,minDefined:a,maxDefined:o}=this.getUserBounds();function r(t){a||isNaN(t.min)||(i=Math.min(i,t.min)),o||isNaN(t.max)||(s=Math.max(s,t.max))}a&&o||(r(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||r(this.getMinMax(!1))),i=co(i)&&!isNaN(i)?i:+e.startOf(Date.now(),n),s=co(s)&&!isNaN(s)?s:+e.endOf(Date.now(),n)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){const t=this.options,e=t.time,n=t.ticks,i="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,a=function(t,e,n){let i=0,s=t.length;for(;i<s&&t[i]<e;)i++;for(;s>i&&t[s-1]>n;)s--;return i>0||s<t.length?t.slice(i,s):t}(i,s,this.max);return this._unit=e.unit||(n.autoSkip?Sh(e.minUnit,this.min,this.max,this._getLabelCapacity(s)):function(t,e,n,i,s){for(let a=Ih.length-1;a>=Ih.indexOf(n);a--){const n=Ih[a];if(Dh[n].common&&t._adapter.diff(s,i,n)>=e-1)return n}return Ih[n?Ih.indexOf(n):0]}(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function(t){for(let e=Ih.indexOf(t)+1,n=Ih.length;e<n;++e)if(Dh[Ih[e]].common)return Ih[e]}(this._unit):void 0,this.initOffsets(i),t.reverse&&a.reverse(),Th(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e,n,i=0,s=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),i=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,n=this.getDecimalForValue(t[t.length-1]),s=1===t.length?n:(n-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;i=Jo(i,0,a),s=Jo(s,0,a),this._offsets={start:i,end:s,factor:1/(i+1+s)}}_generate(){const t=this._adapter,e=this.min,n=this.max,i=this.options,s=i.time,a=s.unit||Sh(s.minUnit,e,n,this._getLabelCapacity(e)),o=ho(i.ticks.stepSize,1),r="week"===a&&s.isoWeekday,l=Ho(r)||!0===r,c={};let d,p,h=e;if(l&&(h=+t.startOf(h,"isoWeek",r)),h=+t.startOf(h,l?"day":a),t.diff(n,e,a)>1e5*o)throw new Error(e+" and "+n+" are too far apart with stepSize of "+o+" "+a);const u="data"===i.ticks.source&&this.getDataTimestamps();for(d=h,p=0;d<n;d=+t.add(d,o,a),p++)$h(c,d,u);return d!==n&&"ticks"!==i.bounds&&1!==p||$h(c,d,u),Object.keys(c).sort(Ch).map(t=>+t)}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,i=this._unit,s=e||n[i];return this._adapter.format(t,s)}_tickFormatFunction(t,e,n,i){const s=this.options,a=s.ticks.callback;if(a)return mo(a,[t,e,n],this);const o=s.time.displayFormats,r=this._unit,l=this._majorUnit,c=r&&o[r],d=l&&o[l],p=n[e],h=l&&d&&p&&p.major;return this._adapter.format(t,i||(h?d:c))}generateTickLabels(t){let e,n,i;for(e=0,n=t.length;e<n;++e)i=t[e],i.label=this._tickFormatFunction(i.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+n)*e.factor)}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,n=this.ctx.measureText(t).width,i=Bo(this.isHorizontal()?e.maxRotation:e.minRotation),s=Math.cos(i),a=Math.sin(i),o=this._resolveTickFontOptions(0).size;return{w:n*s+o*a,h:n*a+o*s}}_getLabelCapacity(t){const e=this.options.time,n=e.displayFormats,i=n[e.unit]||n.millisecond,s=this._tickFormatFunction(t,0,Th(this,[t],this._majorUnit),i),a=this._getLabelSize(s),o=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return o>0?o:1}getDataTimestamps(){let t,e,n=this._cache.data||[];if(n.length)return n;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(t=0,e=i.length;t<e;++t)n=n.concat(i[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const t=this._cache.labels||[];let e,n;if(t.length)return t;const i=this.getLabels();for(e=0,n=i.length;e<n;++e)t.push(Mh(this,i[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return sr(t.sort(Ch))}}function Eh(t,e,n){let i,s,a,o,r=0,l=t.length-1;n?(e>=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=tr(t,"pos",e)),({pos:i,time:a}=t[r]),({pos:s,time:o}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=tr(t,"time",e)),({time:i,pos:a}=t[r]),({time:s,pos:o}=t[l]));const c=s-i;return c?a+(o-a)*(e-i)/c:a}var Rh=Object.freeze({__proto__:null,CategoryScale:class extends gd{static id="category";static defaults={ticks:{callback:oh}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:n,label:i}of e)t[n]===i&&t.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(oo(t))return null;const n=this.getLabels();return((t,e)=>null===t?null:Jo(Math.round(t),0,e))(e=isFinite(e)&&n[e]===t?e:function(t,e,n,i){const s=t.indexOf(e);return-1===s?((t,e,n,i)=>("string"==typeof e?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n))(t,e,n,i):s!==t.lastIndexOf(e)?n:s}(n,t,ho(e,t),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:i}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(n=0),e||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,i=[];let s=this.getLabels();s=0===t&&e===s.length-1?s:s.slice(t,e+1),this._valueRange=Math.max(s.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let n=t;n<=e;n++)i.push({value:n});return i}getLabelForValue(t){return oh.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},LinearScale:ch,LogarithmicScale:mh,RadialLinearScale:kh,TimeScale:Oh,TimeSeriesScale:class extends Oh{static id="timeseries";static defaults=Oh.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Eh(e,this.min),this._tableRange=Eh(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:n}=this,i=[],s=[];let a,o,r,l,c;for(a=0,o=t.length;a<o;++a)l=t[a],l>=e&&l<=n&&i.push(l);if(i.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(a=0,o=i.length;a<o;++a)c=i[a+1],r=i[a-1],l=i[a],Math.round((c+r)/2)!==l&&s.push({time:l,pos:a/(o-1)});return s}_generate(){const t=this.min,e=this.max;let n=super.getDataTimestamps();return n.includes(t)&&n.length||n.splice(0,0,t),n.includes(e)&&1!==n.length||n.push(e),n.sort((t,e)=>t-e)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),n=this.getLabelTimestamps();return t=e.length&&n.length?this.normalize(e.concat(n)):e.length?e:n,t=this._cache.all=t,t}getDecimalForValue(t){return(Eh(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return Eh(this._table,n*this._tableRange+this._minPos,!0)}}});const Ph=[_c,cp,ah,Rh],Nh=function(t,e){return t===e||t!=t&&e!=e},Fh=function(t,e){for(var n=t.length;n--;)if(Nh(t[n][0],e))return n;return-1};var Vh=Array.prototype.splice;function Ah(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}Ah.prototype.clear=function(){this.__data__=[],this.size=0},Ah.prototype.delete=function(t){var e=this.__data__,n=Fh(e,t);return!(n<0||(n==e.length-1?e.pop():Vh.call(e,n,1),--this.size,0))},Ah.prototype.get=function(t){var e=this.__data__,n=Fh(e,t);return n<0?void 0:e[n][1]},Ah.prototype.has=function(t){return Fh(this.__data__,t)>-1},Ah.prototype.set=function(t,e){var n=this.__data__,i=Fh(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};const Lh=Ah,jh="object"==typeof global&&global&&global.Object===Object&&global;var Hh="object"==typeof self&&self&&self.Object===Object&&self;const zh=jh||Hh||Function("return this")(),Bh=zh.Symbol;var Gh=Object.prototype,Wh=Gh.hasOwnProperty,Uh=Gh.toString,qh=Bh?Bh.toStringTag:void 0;var Zh=Object.prototype.toString;var Kh=Bh?Bh.toStringTag:void 0;const Yh=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Kh&&Kh in Object(t)?function(t){var e=Wh.call(t,qh),n=t[qh];try{t[qh]=void 0;var i=!0}catch(t){}var s=Uh.call(t);return i&&(e?t[qh]=n:delete t[qh]),s}(t):function(t){return Zh.call(t)}(t)},Jh=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Xh=function(t){if(!Jh(t))return!1;var e=Yh(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Qh=zh["__core-js_shared__"];var tu=function(){var t=/[^.]+$/.exec(Qh&&Qh.keys&&Qh.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();var eu=Function.prototype.toString;var nu=/^\[object .+?Constructor\]$/,iu=Function.prototype,su=Object.prototype,au=iu.toString,ou=su.hasOwnProperty,ru=RegExp("^"+au.call(ou).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const lu=function(t){return!(!Jh(t)||(e=t,tu&&tu in e))&&(Xh(t)?ru:nu).test(function(t){if(null!=t){try{return eu.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e},cu=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return lu(n)?n:void 0},du=cu(zh,"Map"),pu=cu(Object,"create");var hu=Object.prototype.hasOwnProperty;var uu=Object.prototype.hasOwnProperty;function mu(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}mu.prototype.clear=function(){this.__data__=pu?pu(null):{},this.size=0},mu.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},mu.prototype.get=function(t){var e=this.__data__;if(pu){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return hu.call(e,t)?e[t]:void 0},mu.prototype.has=function(t){var e=this.__data__;return pu?void 0!==e[t]:uu.call(e,t)},mu.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=pu&&void 0===e?"__lodash_hash_undefined__":e,this};const gu=mu,fu=function(t,e){var n,i,s=t.__data__;return("string"==(i=typeof(n=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?s["string"==typeof e?"string":"hash"]:s.map};function bu(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}bu.prototype.clear=function(){this.size=0,this.__data__={hash:new gu,map:new(du||Lh),string:new gu}},bu.prototype.delete=function(t){var e=fu(this,t).delete(t);return this.size-=e?1:0,e},bu.prototype.get=function(t){return fu(this,t).get(t)},bu.prototype.has=function(t){return fu(this,t).has(t)},bu.prototype.set=function(t,e){var n=fu(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this};const vu=bu;function yu(t){var e=this.__data__=new Lh(t);this.size=e.size}yu.prototype.clear=function(){this.__data__=new Lh,this.size=0},yu.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},yu.prototype.get=function(t){return this.__data__.get(t)},yu.prototype.has=function(t){return this.__data__.has(t)},yu.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Lh){var i=n.__data__;if(!du||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new vu(i)}return n.set(t,e),this.size=n.size,this};const xu=yu,_u=function(){try{var t=cu(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),wu=function(t,e,n){"__proto__"==e&&_u?_u(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},ku=function(t,e,n){(void 0!==n&&!Nh(t[e],n)||void 0===n&&!(e in t))&&wu(t,e,n)},Du=function(t,e,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var r=a[Iu?o:++i];if(!1===e(s[r],r,s))break}return t};var Iu,Cu="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mu=Cu&&"object"==typeof module&&module&&!module.nodeType&&module,Su=Mu&&Mu.exports===Cu?zh.Buffer:void 0,$u=Su?Su.allocUnsafe:void 0;const Tu=zh.Uint8Array,Ou=function(t,e){var n,i,s=e?(n=t.buffer,i=new n.constructor(n.byteLength),new Tu(i).set(new Tu(n)),i):t.buffer;return new t.constructor(s,t.byteOffset,t.length)};var Eu=Object.create;const Ru=function(){function t(){}return function(e){if(!Jh(e))return{};if(Eu)return Eu(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),Pu=(Nu=Object.getPrototypeOf,Fu=Object,function(t){return Nu(Fu(t))});var Nu,Fu,Vu=Object.prototype;const Au=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Vu)},Lu=function(t){return null!=t&&"object"==typeof t},ju=function(t){return Lu(t)&&"[object Arguments]"==Yh(t)};var Hu=Object.prototype,zu=Hu.hasOwnProperty,Bu=Hu.propertyIsEnumerable;const Gu=ju(function(){return arguments}())?ju:function(t){return Lu(t)&&zu.call(t,"callee")&&!Bu.call(t,"callee")},Wu=Array.isArray,Uu=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},qu=function(t){return null!=t&&Uu(t.length)&&!Xh(t)};var Zu="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ku=Zu&&"object"==typeof module&&module&&!module.nodeType&&module,Yu=Ku&&Ku.exports===Zu?zh.Buffer:void 0;const Ju=(Yu?Yu.isBuffer:void 0)||function(){return!1};var Xu=Function.prototype,Qu=Object.prototype,tm=Xu.toString,em=Qu.hasOwnProperty,nm=tm.call(Object);var im={};im["[object Float32Array]"]=im["[object Float64Array]"]=im["[object Int8Array]"]=im["[object Int16Array]"]=im["[object Int32Array]"]=im["[object Uint8Array]"]=im["[object Uint8ClampedArray]"]=im["[object Uint16Array]"]=im["[object Uint32Array]"]=!0,im["[object Arguments]"]=im["[object Array]"]=im["[object ArrayBuffer]"]=im["[object Boolean]"]=im["[object DataView]"]=im["[object Date]"]=im["[object Error]"]=im["[object Function]"]=im["[object Map]"]=im["[object Number]"]=im["[object Object]"]=im["[object RegExp]"]=im["[object Set]"]=im["[object String]"]=im["[object WeakMap]"]=!1;var sm="object"==typeof exports&&exports&&!exports.nodeType&&exports,am=sm&&"object"==typeof module&&module&&!module.nodeType&&module,om=am&&am.exports===sm&&jh.process,rm=function(){try{return am&&am.require&&am.require("util").types||om&&om.binding&&om.binding("util")}catch(t){}}(),lm=rm&&rm.isTypedArray;const cm=lm?function(t){return function(e){return t(e)}}(lm):function(t){return Lu(t)&&Uu(t.length)&&!!im[Yh(t)]},dm=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var pm=Object.prototype.hasOwnProperty;const hm=function(t,e,n){var i=t[e];pm.call(t,e)&&Nh(i,n)&&(void 0!==n||e in t)||wu(t,e,n)};var um=/^(?:0|[1-9]\d*)$/;const mm=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&um.test(t))&&t>-1&&t%1==0&&t<e};var gm=Object.prototype.hasOwnProperty;const fm=function(t,e){var n=Wu(t),i=!n&&Gu(t),s=!n&&!i&&Ju(t),a=!n&&!i&&!s&&cm(t),o=n||i||s||a,r=o?function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}(t.length,String):[],l=r.length;for(var c in t)!e&&!gm.call(t,c)||o&&("length"==c||s&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||mm(c,l))||r.push(c);return r};var bm=Object.prototype.hasOwnProperty;const vm=function(t){if(!Jh(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Au(t),n=[];for(var i in t)("constructor"!=i||!e&&bm.call(t,i))&&n.push(i);return n},ym=function(t){return qu(t)?fm(t,!0):vm(t)},xm=function(t){return function(t,e,n,i){var s=!n;n||(n={});for(var a=-1,o=e.length;++a<o;){var r=e[a],l=i?i(n[r],t[r],r,n,t):void 0;void 0===l&&(l=t[r]),s?wu(n,r,l):hm(n,r,l)}return n}(t,ym(t))},_m=function(t,e,n,i,s,a,o){var r,l=dm(t,n),c=dm(e,n),d=o.get(c);if(d)ku(t,n,d);else{var p=a?a(l,c,n+"",t,e,o):void 0,h=void 0===p;if(h){var u=Wu(c),m=!u&&Ju(c),g=!u&&!m&&cm(c);p=c,u||m||g?Wu(l)?p=l:Lu(r=l)&&qu(r)?p=function(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}(l):m?(h=!1,p=function(t,e){if(e)return t.slice();var n=t.length,i=$u?$u(n):new t.constructor(n);return t.copy(i),i}(c,!0)):g?(h=!1,p=Ou(c,!0)):p=[]:function(t){if(!Lu(t)||"[object Object]"!=Yh(t))return!1;var e=Pu(t);if(null===e)return!0;var n=em.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&tm.call(n)==nm}(c)||Gu(c)?(p=l,Gu(l)?p=xm(l):Jh(l)&&!Xh(l)||(p=function(t){return"function"!=typeof t.constructor||Au(t)?{}:Ru(Pu(t))}(c))):h=!1}h&&(o.set(c,p),s(p,c,i,a,o),o.delete(c)),ku(t,n,p)}},wm=function t(e,n,i,s,a){e!==n&&Du(n,function(o,r){if(a||(a=new xu),Jh(o))_m(e,n,r,i,t,s,a);else{var l=s?s(dm(e,r),o,r+"",e,n,a):void 0;void 0===l&&(l=o),ku(e,r,l)}},ym)},km=function(t){return t};var Dm=Math.max;const Im=_u?function(t,e){return _u(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:km;var Cm=Date.now;const Mm=function(t){var e=0,n=0;return function(){var i=Cm(),s=16-(i-n);if(n=i,s>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Im),Sm=function(t,e){return Mm(function(t,e,n){return e=Dm(void 0===e?t.length-1:e,0),function(){for(var i=arguments,s=-1,a=Dm(i.length-e,0),o=Array(a);++s<a;)o[s]=i[e+s];s=-1;for(var r=Array(e+1);++s<e;)r[s]=i[s];return r[e]=n(o),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(t,this,r)}}(t,e,km),t+"")},$m=(Tm=function(t,e,n){wm(t,e,n)},Sm(function(t,e){var n=-1,i=e.length,s=i>1?e[i-1]:void 0,a=i>2?e[2]:void 0;for(s=Tm.length>3&&"function"==typeof s?(i--,s):void 0,a&&function(t,e,n){if(!Jh(n))return!1;var i=typeof e;return!!("number"==i?qu(n)&&mm(e,n.length):"string"==i&&e in n)&&Nh(n[e],t)}(e[0],e[1],a)&&(s=i<3?void 0:s,i=1),t=Object(t);++n<i;){var o=e[n];o&&Tm(t,o,n,s)}return t}));var Tm;class Om{constructor(){this.colorschemesOptions=new k.BehaviorSubject(void 0)}setColorschemesOptions(t){this.pColorschemesOptions=t,this.colorschemesOptions.next(t)}getColorschemesOptions(){return this.pColorschemesOptions}}Om.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:x,type:Om,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),Om.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"14.2.12",ngImport:x,type:Om,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:x,type:Om,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[]}});class Em{constructor(t,e,n){this.zone=e,this.themeService=n,this.type="bar",this.plugins=[],this.chartClick=new y.EventEmitter,this.chartHover=new y.EventEmitter,this.subs=[],this.themeOverrides={},this.ctx=t.nativeElement.getContext("2d"),this.subs.push(this.themeService.colorschemesOptions.pipe((0,D.distinctUntilChanged)()).subscribe(t=>this.themeChanged(t)))}ngOnChanges(t){const e=["type"],n=Object.getOwnPropertyNames(t);if(n.some(t=>e.includes(t))||n.every(e=>t[e].isFirstChange()))this.render();else{const t=this.getChartConfiguration();this.chart&&(Object.assign(this.chart.config.data,t.data),this.chart.config.plugins&&Object.assign(this.chart.config.plugins,t.plugins),this.chart.config.options&&Object.assign(this.chart.config.options,t.options)),this.update()}}ngOnDestroy(){this.chart&&(this.chart.destroy(),this.chart=void 0),this.subs.forEach(t=>t.unsubscribe())}render(){return this.chart&&this.chart.destroy(),this.zone.runOutsideAngular(()=>this.chart=new Wd(this.ctx,this.getChartConfiguration()))}update(t){this.chart&&this.zone.runOutsideAngular(()=>{var e;return null===(e=this.chart)||void 0===e?void 0:e.update(t)})}hideDataset(t,e){this.chart&&(this.chart.getDatasetMeta(t).hidden=e,this.update())}isDatasetHidden(t){var e,n;return null===(n=null===(e=this.chart)||void 0===e?void 0:e.getDatasetMeta(t))||void 0===n?void 0:n.hidden}toBase64Image(){var t;return null===(t=this.chart)||void 0===t?void 0:t.toBase64Image()}themeChanged(t){this.themeOverrides=t,this.chart&&(this.chart.config.options&&Object.assign(this.chart.config.options,this.getChartOptions()),this.update())}getChartOptions(){return $m({onHover:(t,e)=>{var n;(this.chartHover.observed||(null===(n=this.chartHover.observers)||void 0===n?void 0:n.length))&&this.zone.run(()=>this.chartHover.emit({event:t,active:e}))},onClick:(t,e)=>{var n;(this.chartClick.observed||(null===(n=this.chartClick.observers)||void 0===n?void 0:n.length))&&this.zone.run(()=>this.chartClick.emit({event:t,active:e}))}},this.themeOverrides,this.options,{plugins:{legend:{display:this.legend}}})}getChartConfiguration(){return{type:this.type,data:this.getChartData(),options:this.getChartOptions(),plugins:this.plugins}}getChartData(){return this.data?this.data:{labels:this.labels||[],datasets:this.datasets||[]}}}Em.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:x,type:Em,deps:[{token:y.ElementRef},{token:y.NgZone},{token:Om}],target:y["ɵɵFactoryTarget"].Directive}),Em.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"14.2.12",type:Em,selector:"canvas[baseChart]",inputs:{type:"type",legend:"legend",data:"data",options:"options",plugins:"plugins",labels:"labels",datasets:"datasets"},outputs:{chartClick:"chartClick",chartHover:"chartHover"},exportAs:["base-chart"],usesOnChanges:!0,ngImport:x}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:x,type:Em,decorators:[{type:y.Directive,args:[{selector:"canvas[baseChart]",exportAs:"base-chart"}]}],ctorParameters:function(){return[{type:y.ElementRef},{type:y.NgZone},{type:Om}]},propDecorators:{type:[{type:y.Input}],legend:[{type:y.Input}],data:[{type:y.Input}],options:[{type:y.Input}],plugins:[{type:y.Input}],labels:[{type:y.Input}],datasets:[{type:y.Input}],chartClick:[{type:y.Output}],chartHover:[{type:y.Output}]}});const Rm=[[255,99,132],[54,162,235],[255,206,86],[231,233,237],[75,192,192],[151,187,205],[220,220,220],[247,70,74],[70,191,189],[253,180,92],[148,159,177],[77,83,96]],Pm={plugins:{colors:{enabled:!1}},datasets:{line:{backgroundColor:t=>Nm(Vm(t.datasetIndex),.4),borderColor:t=>Nm(Vm(t.datasetIndex),1),pointBackgroundColor:t=>Nm(Vm(t.datasetIndex),1),pointBorderColor:"#fff"},bar:{backgroundColor:t=>Nm(Vm(t.datasetIndex),.6),borderColor:t=>Nm(Vm(t.datasetIndex),1)},get radar(){return this.line},doughnut:{backgroundColor:t=>Nm(Vm(t.dataIndex),.6),borderColor:"#fff"},get pie(){return this.doughnut},polarArea:{backgroundColor:t=>Nm(Vm(t.dataIndex),.6),borderColor:t=>Nm(Vm(t.dataIndex),1)},get bubble(){return this.doughnut},get scatter(){return this.doughnut},get area(){return this.polarArea}}};function Nm(t,e){return"rgba("+t.concat(e).join(",")+")"}function Fm(t,e){return Math.floor(Math.random()*(e-t+1))+t}function Vm(t=0){return Rm[t]||[Fm(0,255),Fm(0,255),Fm(0,255)]}class Am{constructor(){this.generateColors=!0}}Am.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:x,type:Am,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),Am.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"14.2.12",ngImport:x,type:Am,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:x,type:Am,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]}),Wd.register(...Ph);class Lm{constructor(t){(null==t?void 0:t.plugins)&&Wd.register(...null==t?void 0:t.plugins);const e=$m((null==t?void 0:t.generateColors)?Pm:{},(null==t?void 0:t.defaults)||{});$r.set(e)}static forRoot(t){return{ngModule:Lm,providers:[{provide:Am,useValue:t}]}}}Lm.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:x,type:Lm,deps:[{token:Am,optional:!0}],target:y["ɵɵFactoryTarget"].NgModule}),Lm.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"14.2.12",ngImport:x,type:Lm,declarations:[Em],exports:[Em]}),Lm.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"14.2.12",ngImport:x,type:Lm}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:x,type:Lm,decorators:[{type:y.NgModule,args:[{imports:[],declarations:[Em],exports:[Em]}]}],ctorParameters:function(){return[{type:Am,decorators:[{type:y.Optional}]}]}});var jm=g(947),Hm=g(234),zm=g(911);const Bm={green:"#00ff00",orange:"#ffa500",red:"#ff0000"},Gm=Object.assign(Object.assign({},{"stats-system-disk":"M5 2H19V11H14V13H21V22H3V13H10V11H5Z M7 4V9H17V4Z M5 15V20H19V15Z M7 17H11V19H7Z M15 17H17V19H15Z","stats-data-disk":"M3 3H10L12 5H21V12H3Z M5 5V10H19V7H11L9 5Z M3 14H21V22H3Z M5 16V20H19V16Z M7 17H11V19H7Z M15 17H17V19H15Z","stats-disk-space":"M3 2H21V22H3Z M5 4V20H19V4Z M7 6H17V9H7Z M7 11H17V14H7Z M7 16H12V18H7Z","stats-disk-read":"M12 1L18 7H14V13H10V7H6Z M3 15H21V22H3Z M5 17V20H19V17Z M15 18H17V19H15Z","stats-disk-write":"M10 1H14V7H18L12 13L6 7H10Z M3 15H21V22H3Z M5 17V20H19V17Z M15 18H17V19H15Z","stats-disk-io":"M7 1L12 6H9V12H5V6H2Z M15 1H19V7H22L17 12L12 7H15Z M3 15H21V22H3Z M5 17V20H19V17Z M15 18H17V19H15Z","stats-gpu":"M1 3H4V5H22V18H4V21H1V19H2V5H1Z M4 7V16H20V7Z M6 9H10V13H6Z M14 8L18 12L14 15L11 12Z M6 19H17V22H6Z M18 19H20V22H18Z","stats-vram":"M2 4H22V18H19V21H5V18H2Z M4 6V16H20V6Z M6 8H10V14H6Z M14 8H18V14H14Z M7 18V20H9V18Z M11 18V20H13V18Z M15 18V20H17V18Z","stats-cpu":"M6 2H8V5H11V2H13V5H16V2H18V5H19V6H22V8H19V11H22V13H19V16H22V18H19V19H18V22H16V19H13V22H11V19H8V22H6V19H5V18H2V16H5V13H2V11H5V8H2V6H5V5H6Z M7 7V17H17V7Z M9 9H15V15H9Z","stats-cpu-load":"M2 14A10 10 0 0 1 22 14V20H2Z M4 14V18H20V14A8 8 0 0 0 4 14Z M12 11L18 6L15 14A3 3 0 1 1 12 11Z M6 10L8 11L7 13L5 12Z M10 5H12V8H10Z","stats-io-wait":"M2 14H11V16H4V20H16V19H18V22H2Z M13 1A9 9 0 1 1 13 19A9 9 0 1 1 13 1Z M13 3A7 7 0 1 0 13 17A7 7 0 1 0 13 3Z M12 5H14V10H18V12H12Z M6 17H9V19H6Z","stats-memory":"M2 5H22V18H20V21H17V18H14V21H11V18H8V21H5V18H2Z M4 7V16H20V7Z M5 9H8V14H5Z M10 9H14V14H10Z M16 9H19V14H16Z","stats-swap":"M2 3H17V1L22 6L17 11V8H2Z M22 16H7V13L2 18L7 23V21H22Z","stats-network":"M9 2H15V8H13V11H21V15H23V22H15V15H19V13H5V15H9V22H1V15H3V11H11V8H9Z M11 4V6H13V4Z M3 17V20H7V17Z M17 17V20H21V17Z","stats-network-upload":"M12 1L19 8H14V17H10V8H5Z M2 16H5V20H19V16H22V23H2Z","stats-network-download":"M10 1H14V10H19L12 17L5 10H10Z M2 16H5V20H19V16H22V23H2Z","stats-latency":"M3 2H17V0L22 5L17 10V7H3Z M21 22H7V24L2 19L7 14V17H21Z M12 8A4 4 0 1 1 12 16A4 4 0 1 1 12 8Z M11 9V13H14V11H13V9Z","stats-temperature":"M8 4A4 4 0 0 1 16 4V13A6 6 0 1 1 8 13Z M10 4V14L9 15A4 4 0 1 0 15 15L14 14V4A2 2 0 0 0 10 4Z M11 7H13V15A3 3 0 1 1 11 15Z M18 4H22V6H18Z M18 9H21V11H18Z","stats-fan":"M12 10C7 10 4 7 6 4C9 0 14 1 15 6L14 10Z M14 12C14 7 17 4 20 6C24 9 23 14 18 15L14 14Z M12 14C17 14 20 17 18 20C15 24 10 23 9 18L10 14Z M10 12C10 17 7 20 4 18C0 15 1 10 6 9L10 10Z M12 10A2 2 0 1 1 12 14A2 2 0 1 1 12 10Z","stats-power":"M13 1L4 14H10L9 23L21 9H14L16 1Z","stats-process":"M2 2H22V22H2Z M4 4V20H20V4Z M6 6H9V9H6Z M11 6H18V9H11Z M6 11H9V14H6Z M11 11H16V14H11Z M6 16H9V18H6Z M11 16H18V18H11Z","stats-service":"M3 2H21V10H3Z M5 4V8H19V4Z M6 5H8V7H6Z M3 12H12V14H5V18H10V20H3Z M18 11L23 14V20L18 23L13 20V14Z M17 14V20L21 17Z","stats-health":"M12 1L21 5V12C21 17 17 21 12 23C7 21 3 17 3 12V5Z M12 3L5 6V12C5 16 8 19 12 21C16 19 19 16 19 12V6Z M7 11H10L12 7L15 14L16 11H18V13H17L15 18L12 12L11 13H7Z","stats-database":"M3 5C3 0 21 0 21 5V19C21 24 3 24 3 19Z M5 5C5 7 19 7 19 5C19 3 5 3 5 5Z M5 8V11C8 13 16 13 19 11V8C15 10 9 10 5 8Z M5 14V18C8 20 16 20 19 18V14C15 16 9 16 5 14Z","stats-container":"M3 3H21V21H3Z M5 5V19H19V5Z M7 7H10V17H7Z M12 7H15V17H12Z M17 7H18V17H17Z M1 1H6V3H3V6H1Z M18 1H23V6H21V3H18Z M1 18H3V21H6V23H1Z M21 18H23V23H18V21H21Z","stats-uptime":"M11 0H14V10H11Z M6 3L8 6A8 8 0 1 0 17 6L19 3A11 11 0 1 1 6 3Z M11 13H13V17H16V19H11Z"}),{postgresql:"M23.5594 14.7228a.5269.5269 0 0 0-.0563-.1191c-.139-.2632-.4768-.3418-1.0074-.2321-1.6533.3411-2.2935.1312-2.5256-.0191 1.342-2.0482 2.445-4.522 3.0411-6.8297.2714-1.0507.7982-3.5237.1222-4.7316a1.5641 1.5641 0 0 0-.1509-.235C21.6931.9086 19.8007.0248 17.5099.0005c-1.4947-.0158-2.7705.3461-3.1161.4794a9.449 9.449 0 0 0-.5159-.0816 8.044 8.044 0 0 0-1.3114-.1278c-1.1822-.0184-2.2038.2642-3.0498.8406-.8573-.3211-4.7888-1.645-7.2219.0788C.9359 2.1526.3086 3.8733.4302 6.3043c.0409.818.5069 3.334 1.2423 5.7436.4598 1.5065.9387 2.7019 1.4334 3.582.553.9942 1.1259 1.5933 1.7143 1.7895.4474.1491 1.1327.1441 1.8581-.7279.8012-.9635 1.5903-1.8258 1.9446-2.2069.4351.2355.9064.3625 1.39.3772a.0569.0569 0 0 0 .0004.0041 11.0312 11.0312 0 0 0-.2472.3054c-.3389.4302-.4094.5197-1.5002.7443-.3102.064-1.1344.2339-1.1464.8115-.0025.1224.0329.2309.0919.3268.2269.4231.9216.6097 1.015.6331 1.3345.3335 2.5044.092 3.3714-.6787-.017 2.231.0775 4.4174.3454 5.0874.2212.5529.7618 1.9045 2.4692 1.9043.2505 0 .5263-.0291.8296-.0941 1.7819-.3821 2.5557-1.1696 2.855-2.9059.1503-.8707.4016-2.8753.5388-4.1012.0169-.0703.0357-.1207.057-.1362.0007-.0005.0697-.0471.4272.0307a.3673.3673 0 0 0 .0443.0068l.2539.0223.0149.001c.8468.0384 1.9114-.1426 2.5312-.4308.6438-.2988 1.8057-1.0323 1.5951-1.6698z",redis:"M22.71 13.145c-1.66 2.092-3.452 4.483-7.038 4.483-3.203 0-4.397-2.825-4.48-5.12.701 1.484 2.073 2.685 4.214 2.63 4.117-.133 6.94-3.852 6.94-7.239 0-4.05-3.022-6.972-8.268-6.972-3.752 0-8.4 1.428-11.455 3.685C2.59 6.937 3.885 9.958 4.35 9.626c2.648-1.904 4.748-3.13 6.784-3.744C8.12 9.244.886 17.05 0 18.425c.1 1.261 1.66 4.648 2.424 4.648.232 0 .431-.133.664-.365a100.49 100.49 0 0 0 5.54-6.765c.222 3.104 1.748 6.898 6.014 6.898 3.819 0 7.604-2.756 9.33-8.965.2-.764-.73-1.361-1.261-.73zm-4.349-5.013c0 1.959-1.926 2.922-3.685 2.922-.941 0-1.664-.247-2.235-.568 1.051-1.592 2.092-3.225 3.21-4.973 1.972.334 2.71 1.43 2.71 2.619z",mongodb:"M17.193 9.555c-1.264-5.58-4.252-7.414-4.573-8.115-.28-.394-.53-.954-.735-1.44-.036.495-.055.685-.523 1.184-.723.566-4.438 3.682-4.74 10.02-.282 5.912 4.27 9.435 4.888 9.884l.07.05A73.49 73.49 0 0111.91 24h.481c.114-1.032.284-2.056.51-3.07.417-.296.604-.463.85-.693a11.342 11.342 0 003.639-8.464c.01-.814-.103-1.662-.197-2.218zm-5.336 8.195s0-8.291.275-8.29c.213 0 .49 10.695.49 10.695-.381-.045-.765-1.76-.765-2.405z",rabbitmq:"M23.035 9.601h-7.677a.956.956 0 01-.962-.962V.962a.956.956 0 00-.962-.956H10.56a.956.956 0 00-.962.956V8.64a.956.956 0 01-.962.962H5.762a.956.956 0 01-.961-.962V.962A.956.956 0 003.839 0H.959a.956.956 0 00-.956.962v22.076A.956.956 0 00.965 24h22.07a.956.956 0 00.962-.962V10.58a.956.956 0 00-.962-.98zm-3.86 8.152a1.437 1.437 0 01-1.437 1.443h-1.924a1.437 1.437 0 01-1.436-1.443v-1.917a1.437 1.437 0 011.436-1.443h1.924a1.437 1.437 0 011.437 1.443z",nginx:"M12 0L1.605 6v12L12 24l10.395-6V6L12 0zm6 16.59c0 .705-.646 1.29-1.529 1.29-.631 0-1.351-.255-1.801-.81l-6-7.141v6.66c0 .721-.57 1.29-1.274 1.29H7.32c-.721 0-1.29-.6-1.29-1.29V7.41c0-.705.63-1.29 1.5-1.29.646 0 1.38.255 1.83.81l5.97 7.141V7.41c0-.721.6-1.29 1.29-1.29h.075c.72 0 1.29.6 1.29 1.29v9.18H18z",mysql:"M16.405 5.501c-.115 0-.193.014-.274.033v.013h.014c.054.104.146.18.214.273.054.107.1.214.154.32l.014-.015c.094-.066.14-.172.14-.333-.04-.047-.046-.094-.08-.14-.04-.067-.126-.1-.18-.153zM5.77 18.695h-.927a50.854 50.854 0 00-.27-4.41h-.008l-1.41 4.41H2.45l-1.4-4.41h-.01a72.892 72.892 0 00-.195 4.41H0c.055-1.966.192-3.81.41-5.53h1.15l1.335 4.064h.008l1.347-4.064h1.095c.242 2.015.384 3.86.428 5.53zm4.017-4.08c-.378 2.045-.876 3.533-1.492 4.46-.482.716-1.01 1.073-1.583 1.073-.153 0-.34-.046-.566-.138v-.494c.11.017.24.026.386.026.268 0 .483-.075.647-.222.197-.18.295-.382.295-.605 0-.155-.077-.47-.23-.944L6.23 14.615h.91l.727 2.36c.164.536.233.91.205 1.123.4-1.064.678-2.227.835-3.483zm12.325 4.08h-2.63v-5.53h.885v4.85h1.745zm-3.32.135l-1.016-.5c.09-.076.177-.158.255-.25.433-.506.648-1.258.648-2.253 0-1.83-.718-2.746-2.155-2.746-.704 0-1.254.232-1.65.697-.43.508-.646 1.256-.646 2.245 0 .972.19 1.686.574 2.14.35.41.877.615 1.583.615.264 0 .506-.033.725-.098l1.325.772.36-.622zM15.5 17.588c-.225-.36-.337-.94-.337-1.736 0-1.393.424-2.09 1.27-2.09.443 0 .77.167.977.5.224.362.336.936.336 1.723 0 1.404-.424 2.108-1.27 2.108-.445 0-.77-.167-.978-.5zm-1.658-.425c0 .47-.172.856-.516 1.156-.344.3-.803.45-1.384.45-.543 0-1.064-.172-1.573-.515l.237-.476c.438.22.833.328 1.19.328.332 0 .593-.073.783-.22a.754.754 0 00.3-.615c0-.33-.23-.61-.648-.845-.388-.213-1.163-.657-1.163-.657-.422-.307-.632-.636-.632-1.177 0-.45.157-.81.47-1.085.315-.278.72-.415 1.22-.415.512 0 .98.136 1.4.41l-.213.476a2.726 2.726 0 00-1.064-.23c-.283 0-.502.068-.654.206a.685.685 0 00-.248.524c0 .328.234.61.666.85.393.215 1.187.67 1.187.67.433.305.648.63.648 1.168zm9.382-5.852c-.535-.014-.95.04-1.297.188-.1.04-.26.04-.274.167.055.053.063.14.11.214.08.134.218.313.346.407.14.11.28.216.427.31.26.16.555.255.81.416.145.094.293.213.44.313.073.05.12.14.214.172v-.02c-.046-.06-.06-.147-.105-.214-.067-.067-.134-.127-.2-.193a3.223 3.223 0 00-.695-.675c-.214-.146-.682-.35-.77-.595l-.013-.014c.146-.013.32-.066.46-.106.227-.06.435-.047.67-.106.106-.027.213-.06.32-.094v-.06c-.12-.12-.21-.283-.334-.395a8.867 8.867 0 00-1.104-.823c-.21-.134-.476-.22-.697-.334-.08-.04-.214-.06-.26-.127-.12-.146-.19-.34-.275-.514a17.69 17.69 0 01-.547-1.163c-.12-.262-.193-.523-.34-.763-.69-1.137-1.437-1.826-2.586-2.5-.247-.14-.543-.2-.856-.274-.167-.008-.334-.02-.5-.027-.11-.047-.216-.174-.31-.235-.38-.24-1.364-.76-1.644-.072-.18.434.267.862.422 1.082.115.153.26.328.34.5.047.116.06.235.107.356.106.294.207.622.347.897.073.14.153.287.247.413.054.073.146.107.167.227-.094.136-.1.334-.154.5-.24.757-.146 1.693.194 2.25.107.166.362.534.703.393.3-.12.234-.5.32-.835.02-.08.007-.133.048-.187v.015c.094.188.188.367.274.555.206.328.566.668.867.895.16.12.287.328.487.402v-.02h-.015c-.043-.058-.1-.086-.154-.133a3.445 3.445 0 01-.35-.4 8.76 8.76 0 01-.747-1.218c-.11-.21-.202-.436-.29-.643-.04-.08-.04-.2-.107-.24-.1.146-.247.273-.32.453-.127.288-.14.642-.188 1.01-.027.007-.014 0-.027.014-.214-.052-.287-.274-.367-.46-.2-.475-.233-1.238-.06-1.785.047-.14.247-.582.167-.716-.042-.127-.174-.2-.247-.303a2.478 2.478 0 01-.24-.427c-.16-.374-.24-.788-.414-1.162-.08-.173-.22-.354-.334-.513-.127-.18-.267-.307-.368-.52-.033-.073-.08-.194-.027-.274.014-.054.042-.075.094-.09.088-.072.335.022.422.062.247.1.455.194.662.334.094.066.195.193.315.226h.14c.214.047.455.014.655.073.355.114.675.28.962.46a5.953 5.953 0 012.085 2.286c.08.154.115.295.188.455.14.33.313.663.455.982.14.315.275.636.476.897.1.14.502.213.682.286.133.06.34.115.46.188.23.14.454.3.67.454.11.076.443.243.463.378z",docker:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288Z",kubernetes:"M10.204 14.35l.007.01-.999 2.413a5.171 5.171 0 0 1-2.075-2.597l2.578-.437.004.005a.44.44 0 0 1 .484.606zm-.833-2.129a.44.44 0 0 0 .173-.756l.002-.011L7.585 9.7a5.143 5.143 0 0 0-.73 3.255l2.514-.725.002-.009zm1.145-1.98a.44.44 0 0 0 .699-.337l.01-.005.15-2.62a5.144 5.144 0 0 0-3.01 1.442l2.147 1.523.004-.002zm.76 2.75l.723.349.722-.347.18-.78-.5-.623h-.804l-.5.623.179.779zm1.5-3.095a.44.44 0 0 0 .7.336l.008.003 2.134-1.513a5.188 5.188 0 0 0-2.992-1.442l.148 2.615.002.001zm10.876 5.97l-5.773 7.181a1.6 1.6 0 0 1-1.248.594l-9.261.003a1.6 1.6 0 0 1-1.247-.596l-5.776-7.18a1.583 1.583 0 0 1-.307-1.34L2.1 5.573c.108-.47.425-.864.863-1.073L11.305.513a1.606 1.606 0 0 1 1.385 0l8.345 3.985c.438.209.755.604.863 1.073l2.062 8.955c.108.47-.005.963-.308 1.34zm-3.289-2.057c-.042-.01-.103-.026-.145-.034-.174-.033-.315-.025-.479-.038-.35-.037-.638-.067-.895-.148-.105-.04-.18-.165-.216-.216l-.201-.059a6.45 6.45 0 0 0-.105-2.332 6.465 6.465 0 0 0-.936-2.163c.052-.047.15-.133.177-.159.008-.09.001-.183.094-.282.197-.185.444-.338.743-.522.142-.084.273-.137.415-.242.032-.024.076-.062.11-.089.24-.191.295-.52.123-.736-.172-.216-.506-.236-.745-.045-.034.027-.08.062-.111.088-.134.116-.217.23-.33.35-.246.25-.45.458-.673.609-.097.056-.239.037-.303.033l-.19.135a6.545 6.545 0 0 0-4.146-2.003l-.012-.223c-.065-.062-.143-.115-.163-.25-.022-.268.015-.557.057-.905.023-.163.061-.298.068-.475.001-.04-.001-.099-.001-.142 0-.306-.224-.555-.5-.555-.275 0-.499.249-.499.555l.001.014c0 .041-.002.092 0 .128.006.177.044.312.067.475.042.348.078.637.056.906a.545.545 0 0 1-.162.258l-.012.211a6.424 6.424 0 0 0-4.166 2.003 8.373 8.373 0 0 1-.18-.128c-.09.012-.18.04-.297-.029-.223-.15-.427-.358-.673-.608-.113-.12-.195-.234-.329-.349-.03-.026-.077-.062-.111-.088a.594.594 0 0 0-.348-.132.481.481 0 0 0-.398.176c-.172.216-.117.546.123.737l.007.005.104.083c.142.105.272.159.414.242.299.185.546.338.743.522.076.082.09.226.1.288l.16.143a6.462 6.462 0 0 0-1.02 4.506l-.208.06c-.055.072-.133.184-.215.217-.257.081-.546.11-.895.147-.164.014-.305.006-.48.039-.037.007-.09.02-.133.03l-.004.002-.007.002c-.295.071-.484.342-.423.608.061.267.349.429.645.365l.007-.001.01-.003.129-.029c.17-.046.294-.113.448-.172.33-.118.604-.217.87-.256.112-.009.23.069.288.101l.217-.037a6.5 6.5 0 0 0 2.88 3.596l-.09.218c.033.084.069.199.044.282-.097.252-.263.517-.452.813-.091.136-.185.242-.268.399-.02.037-.045.095-.064.134-.128.275-.034.591.213.71.248.12.556-.007.69-.282v-.002c.02-.039.046-.09.062-.127.07-.162.094-.301.144-.458.132-.332.205-.68.387-.897.05-.06.13-.082.215-.105l.113-.205a6.453 6.453 0 0 0 4.609.012l.106.192c.086.028.18.042.256.155.136.232.229.507.342.84.05.156.074.295.145.457.016.037.043.09.062.129.133.276.442.402.69.282.247-.118.341-.435.213-.71-.02-.039-.045-.096-.065-.134-.083-.156-.177-.261-.268-.398-.19-.296-.346-.541-.443-.793-.04-.13.007-.21.038-.294-.018-.022-.059-.144-.083-.202a6.499 6.499 0 0 0 2.88-3.622c.064.01.176.03.213.038.075-.05.144-.114.28-.104.266.039.54.138.87.256.154.06.277.128.448.173.036.01.088.019.13.028l.009.003.007.001c.297.064.584-.098.645-.365.06-.266-.128-.537-.423-.608z",elasticsearch:"M13.394 0C8.683 0 4.609 2.716 2.644 6.667h15.641a4.77 4.77 0 0 0 3.073-1.11c.446-.375.864-.785 1.247-1.243l.001-.002A11.974 11.974 0 0 0 13.394 0zM1.804 8.889a12.009 12.009 0 0 0 0 6.222h14.7a3.111 3.111 0 1 0 0-6.222zm.84 8.444C4.61 21.283 8.684 24 13.395 24c3.701 0 7.011-1.677 9.212-4.312l-.001-.002a9.958 9.958 0 0 0-1.247-1.243 4.77 4.77 0 0 0-3.073-1.11z",apachekafka:"M9.71 2.136a1.43 1.43 0 0 0-2.047 0h-.007a1.48 1.48 0 0 0-.421 1.042c0 .41.161.777.422 1.039l.007.007c.257.264.616.426 1.019.426.404 0 .766-.162 1.027-.426l.003-.007c.261-.262.421-.629.421-1.039 0-.408-.159-.777-.421-1.042H9.71zM8.683 22.295c.404 0 .766-.167 1.027-.429l.003-.008c.261-.261.421-.631.421-1.036 0-.41-.159-.778-.421-1.044H9.71a1.42 1.42 0 0 0-1.027-.432 1.4 1.4 0 0 0-1.02.432h-.007c-.26.266-.422.634-.422 1.044 0 .406.161.775.422 1.036l.007.008c.258.262.617.429 1.02.429zm7.89-4.462c.359-.096.683-.33.882-.684l.027-.052a1.47 1.47 0 0 0 .114-1.067 1.454 1.454 0 0 0-.675-.896l-.021-.014a1.425 1.425 0 0 0-1.078-.132c-.36.091-.684.335-.881.686-.2.349-.241.75-.146 1.119.099.363.33.691.675.896h.002c.346.203.737.239 1.101.144zm-6.405-7.342a2.083 2.083 0 0 0-1.485-.627c-.58 0-1.103.242-1.482.627-.378.385-.612.916-.612 1.507s.233 1.124.612 1.514a2.08 2.08 0 0 0 2.967 0c.379-.39.612-.923.612-1.514s-.233-1.122-.612-1.507z",prometheus:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12s12-5.373 12-12c0-6.628-5.373-12-12-12zm0 22.46c-1.885 0-3.414-1.26-3.414-2.814h6.828c0 1.553-1.528 2.813-3.414 2.813zm5.64-3.745H6.36v-2.046h11.28v2.046zm-.04-3.098H6.391c-.037-.043-.075-.086-.111-.13-1.155-1.401-1.427-2.133-1.69-2.879-.005-.025 1.4.287 2.395.511 0 0 .513.119 1.262.255-.72-.843-1.147-1.915-1.147-3.01 0-2.406 1.845-4.508 1.18-6.207.648.053 1.34 1.367 1.387 3.422.689-.951.977-2.69.977-3.755 0-1.103.727-2.385 1.454-2.429-.648 1.069.168 1.984.894 4.256.272.854.237 2.29.447 3.201.07-1.892.395-4.652 1.595-5.605-.529 1.2.079 2.702.494 3.424.671 1.164 1.078 2.047 1.078 3.716a4.642 4.642 0 01-1.11 2.996c.792-.149 1.34-.283 1.34-.283l2.573-.502s-.374 1.538-1.81 3.019z",grafana:"M23.02 10.59a8.578 8.578 0 0 0-.862-3.034 8.911 8.911 0 0 0-1.789-2.445c.337-1.342-.413-2.505-.413-2.505-1.292-.08-2.113.4-2.416.62-.052-.02-.102-.044-.154-.064-.22-.089-.446-.172-.677-.247-.231-.073-.47-.14-.711-.197a9.867 9.867 0 0 0-.875-.161C14.557.753 12.94 0 12.94 0c-1.804 1.145-2.147 2.744-2.147 2.744l-.018.093c-.098.029-.2.057-.298.088-.138.042-.275.094-.413.143-.138.055-.275.107-.41.166a8.869 8.869 0 0 0-1.557.87l-.063-.029c-2.497-.955-4.716.195-4.716.195-.203 2.658.996 4.33 1.235 4.636a11.608 11.608 0 0 0-.607 2.635C1.636 12.677.953 15.014.953 15.014c1.926 2.214 4.171 2.351 4.171 2.351.003-.002.006-.002.006-.005.285.509.615.994.986 1.446.156.19.32.371.488.548-.704 2.009.099 3.68.099 3.68 2.144.08 3.553-.937 3.849-1.173a9.784 9.784 0 0 0 3.164.501h.08l.055-.003.107-.002.103-.005.003.002c1.01 1.44 2.788 1.646 2.788 1.646 1.264-1.332 1.337-2.653 1.337-2.94v-.058c0-.02-.003-.039-.003-.06.265-.187.52-.387.758-.6a7.875 7.875 0 0 0 1.415-1.7c1.43.083 2.437-.885 2.437-.885-.236-1.49-1.085-2.216-1.264-2.354l-.018-.013-.016-.013a.217.217 0 0 1-.031-.02c.008-.092.016-.18.02-.27.011-.162.016-.323.016-.48v-.253l-.005-.098-.008-.135a1.891 1.891 0 0 0-.01-.13c-.003-.042-.008-.083-.013-.125l-.016-.124-.018-.122a6.215 6.215 0 0 0-2.032-3.73 6.015 6.015 0 0 0-3.222-1.46 6.292 6.292 0 0 0-.85-.048l-.107.002h-.063l-.044.003-.104.008a4.777 4.777 0 0 0-3.335 1.695c-.332.4-.592.84-.768 1.297a4.594 4.594 0 0 0-.312 1.817l.003.091c.005.055.007.11.013.164a3.615 3.615 0 0 0 .698 1.82 3.53 3.53 0 0 0 1.827 1.282c.33.098.66.14.971.137.039 0 .078 0 .114-.002l.063-.003c.02 0 .041-.003.062-.003.034-.002.065-.007.099-.01.007 0 .018-.003.028-.003l.031-.005.06-.008a1.18 1.18 0 0 0 .112-.02c.036-.008.072-.013.109-.024a2.634 2.634 0 0 0 .914-.415c.028-.02.056-.041.085-.065a.248.248 0 0 0 .039-.35.244.244 0 0 0-.309-.06l-.078.042c-.09.044-.184.083-.283.116a2.476 2.476 0 0 1-.475.096c-.028.003-.054.006-.083.006l-.083.002c-.026 0-.054 0-.08-.002l-.102-.006h-.012l-.024.006c-.016-.003-.031-.003-.044-.006-.031-.002-.06-.007-.091-.01a2.59 2.59 0 0 1-.724-.213 2.557 2.557 0 0 1-.667-.438 2.52 2.52 0 0 1-.805-1.475 2.306 2.306 0 0 1-.029-.444l.006-.122v-.023l.002-.031c.003-.021.003-.04.005-.06a3.163 3.163 0 0 1 1.352-2.29 3.12 3.12 0 0 1 .937-.43 2.946 2.946 0 0 1 .776-.101h.06l.07.002.045.003h.026l.07.005a4.041 4.041 0 0 1 1.635.49 3.94 3.94 0 0 1 1.602 1.662 3.77 3.77 0 0 1 .397 1.414l.005.076.003.075c.002.026.002.05.002.075 0 .024.003.052 0 .07v.065l-.002.073-.008.174a6.195 6.195 0 0 1-.08.639 5.1 5.1 0 0 1-.267.927 5.31 5.31 0 0 1-.624 1.13 5.052 5.052 0 0 1-3.237 2.014 4.82 4.82 0 0 1-.649.066l-.039.003h-.287a6.607 6.607 0 0 1-1.716-.265 6.776 6.776 0 0 1-3.4-2.274 6.75 6.75 0 0 1-.746-1.15 6.616 6.616 0 0 1-.714-2.596l-.005-.083-.002-.02v-.056l-.003-.073v-.096l-.003-.104v-.07l.003-.163c.008-.22.026-.45.054-.678a8.707 8.707 0 0 1 .28-1.355c.128-.444.286-.872.473-1.277a7.04 7.04 0 0 1 1.456-2.1 5.925 5.925 0 0 1 .953-.763c.169-.111.343-.213.524-.306.089-.05.182-.091.273-.135.047-.02.093-.042.138-.062a7.177 7.177 0 0 1 .714-.267l.145-.045c.049-.015.098-.026.148-.041.098-.029.197-.052.296-.076.049-.013.1-.02.15-.033l.15-.032.151-.028.076-.013.075-.01.153-.024c.057-.01.114-.013.171-.023l.169-.021c.036-.003.073-.008.106-.01l.073-.008.036-.003.042-.002c.057-.003.114-.008.171-.01l.086-.006h.023l.037-.003.145-.007a7.999 7.999 0 0 1 1.708.125 7.917 7.917 0 0 1 2.048.68 8.253 8.253 0 0 1 1.672 1.09l.09.077.089.078c.06.052.114.107.171.159.057.052.112.106.166.16.052.055.107.107.159.164a8.671 8.671 0 0 1 1.41 1.978c.012.026.028.052.04.078l.04.078.075.156c.023.051.05.1.07.153l.065.15a8.848 8.848 0 0 1 .45 1.34.19.19 0 0 0 .201.142.186.186 0 0 0 .172-.184c.01-.246.002-.532-.024-.856z",sqlite:"M21.678.521c-1.032-.92-2.28-.55-3.513.544a8.71 8.71 0 0 0-.547.535c-2.109 2.237-4.066 6.38-4.674 9.544.237.48.422 1.093.544 1.561a13.044 13.044 0 0 1 .164.703s-.019-.071-.096-.296l-.05-.146a1.689 1.689 0 0 0-.033-.08c-.138-.32-.518-.995-.686-1.289-.143.423-.27.818-.376 1.176.484.884.778 2.4.778 2.4s-.025-.099-.147-.442c-.107-.303-.644-1.244-.772-1.464-.217.804-.304 1.346-.226 1.478.152.256.296.698.422 1.186.286 1.1.485 2.44.485 2.44l.017.224a22.41 22.41 0 0 0 .056 2.748c.095 1.146.273 2.13.5 2.657l.155-.084c-.334-1.038-.47-2.399-.41-3.967.09-2.398.642-5.29 1.661-8.304 1.723-4.55 4.113-8.201 6.3-9.945-1.993 1.8-4.692 7.63-5.5 9.788-.904 2.416-1.545 4.684-1.931 6.857.666-2.037 2.821-2.912 2.821-2.912s1.057-1.304 2.292-3.166c-.74.169-1.955.458-2.362.629-.6.251-.762.337-.762.337s1.945-1.184 3.613-1.72C21.695 7.9 24.195 2.767 21.678.521m-18.573.543A1.842 1.842 0 0 0 1.27 2.9v16.608a1.84 1.84 0 0 0 1.835 1.834h9.418a22.953 22.953 0 0 1-.052-2.707c-.006-.062-.011-.141-.016-.2a27.01 27.01 0 0 0-.473-2.378c-.121-.47-.275-.898-.369-1.057-.116-.197-.098-.31-.097-.432 0-.12.015-.245.037-.386a9.98 9.98 0 0 1 .234-1.045l.217-.028c-.017-.035-.014-.065-.031-.097l-.041-.381a32.8 32.8 0 0 1 .382-1.194l.2-.019c-.008-.016-.01-.038-.018-.053l-.043-.316c.63-3.28 2.587-7.443 4.8-9.791.066-.069.133-.128.198-.194Z",mariadb:"M23.157 4.412c-.676.284-.79.31-1.673.372-.65.045-.757.057-1.212.209-.75.246-1.395.75-2.02 1.59-.296.398-1.249 1.913-1.249 1.988 0 .057-.65.998-.915 1.32-.574.713-1.08 1.079-2.14 1.59-.77.36-1.224.524-4.102 1.477-1.073.353-2.133.738-2.367.864-.852.449-1.515 1.036-2.203 1.938-1.003 1.32-.972 1.313-3.042.947a12.264 12.264 0 00-.675-.063c-.644-.05-1.023.044-1.332.334L0 17.193l.177.088c.094.05.353.234.561.398.215.17.461.347.55.391.088.044.17.088.183.101.012.013-.089.17-.228.353-.435.581-.593.871-.574 1.048.019.164.032.17.43.17.517-.006.826-.056 1.261-.208.65-.233 2.058-.94 2.784-1.4.776-.5 1.717-.998 1.956-1.042.082-.02.354-.07.594-.114.58-.107 1.464-.095 2.587.05.108.013.373.045.6.064.227.025.43.057.454.076.026.012.474.037.998.056.934.026 1.104.007 1.3-.189.126-.133.385-.631.498-.985.209-.643.417-.921.366-.492-.113.966-.322 1.692-.713 2.411-.259.499-.663 1.092-.934 1.395-.322.347-.315.36.088.315.619-.063 1.471-.397 2.096-.82.827-.562 1.647-1.691 2.19-3.03.107-.27.22-.22.183.083-.013.094-.038.315-.057.498l-.031.328.353-.202c.833-.48 1.414-1.262 2.127-2.884.227-.518.877-2.922 1.073-3.976a9.64 9.64 0 01.271-1.042c.127-.429.196-.555.48-.858.183-.19.625-.555.978-.808.72-.505.953-.75 1.187-1.205.208-.417.284-1.13.132-1.357-.132-.202-.284-.196-.763.006Z",linux:"M12.504 0c-.155 0-.315.008-.48.021-4.226.333-3.105 4.807-3.17 6.298-.076 1.092-.3 1.953-1.05 3.02-.885 1.051-2.127 2.75-2.716 4.521-.278.832-.41 1.684-.287 2.489a.424.424 0 00-.11.135c-.26.268-.45.6-.663.839-.199.199-.485.267-.797.4-.313.136-.658.269-.864.68-.09.189-.136.394-.132.602 0 .199.027.4.055.536.058.399.116.728.04.97-.249.68-.28 1.145-.106 1.484.174.334.535.47.94.601.81.2 1.91.135 2.774.6.926.466 1.866.67 2.616.47.526-.116.97-.464 1.208-.946.587-.003 1.23-.269 2.26-.334.699-.058 1.574.267 2.577.2.025.134.063.198.114.333l.003.003c.391.778 1.113 1.132 1.884 1.071.771-.06 1.592-.536 2.257-1.306.631-.765 1.683-1.084 2.378-1.503.348-.199.629-.469.649-.853.023-.4-.2-.811-.714-1.376v-.097l-.003-.003c-.17-.2-.25-.535-.338-.926-.085-.401-.182-.786-.492-1.046h-.003c-.059-.054-.123-.067-.188-.135a.357.357 0 00-.19-.064c.431-1.278.264-2.55-.173-3.694-.533-1.41-1.465-2.638-2.175-3.483-.796-1.005-1.576-1.957-1.56-3.368.026-2.152.236-6.133-3.544-6.139zm.529 3.405h.013c.213 0 .396.062.584.198.19.135.33.332.438.533.105.259.158.459.166.724 0-.02.006-.04.006-.06v.105a.086.086 0 01-.004-.021l-.004-.024a1.807 1.807 0 01-.15.706.953.953 0 01-.213.335.71.71 0 00-.088-.042c-.104-.045-.198-.064-.284-.133a1.312 1.312 0 00-.22-.066c.05-.06.146-.133.183-.198.053-.128.082-.264.088-.402v-.02a1.21 1.21 0 00-.061-.4c-.045-.134-.101-.2-.183-.333-.084-.066-.167-.132-.267-.132h-.016c-.093 0-.176.03-.262.132a.8.8 0 00-.205.334 1.18 1.18 0 00-.09.4v.019c.002.089.008.179.02.267-.193-.067-.438-.135-.607-.202a1.635 1.635 0 01-.018-.2v-.02a1.772 1.772 0 01.15-.768c.082-.22.232-.406.43-.533a.985.985 0 01.594-.2zm-2.962.059h.036c.142 0 .27.048.399.135.146.129.264.288.344.465.09.199.14.4.153.667v.004c.007.134.006.2-.002.266v.08c-.03.007-.056.018-.083.024-.152.055-.274.135-.393.2.012-.09.013-.18.003-.267v-.015c-.012-.133-.04-.2-.082-.333a.613.613 0 00-.166-.267.248.248 0 00-.183-.064h-.021c-.071.006-.13.04-.186.132a.552.552 0 00-.12.27.944.944 0 00-.023.33v.015c.012.135.037.2.08.334.046.134.098.2.166.268.01.009.02.018.034.024-.07.057-.117.07-.176.136a.304.304 0 01-.131.068 2.62 2.62 0 01-.275-.402 1.772 1.772 0 01-.155-.667 1.759 1.759 0 01.08-.668 1.43 1.43 0 01.283-.535c.128-.133.26-.2.418-.2zm1.37 1.706c.332 0 .733.065 1.216.399.293.2.523.269 1.052.468h.003c.255.136.405.266.478.399v-.131a.571.571 0 01.016.47c-.123.31-.516.643-1.063.842v.002c-.268.135-.501.333-.775.465-.276.135-.588.292-1.012.267a1.139 1.139 0 01-.448-.067 3.566 3.566 0 01-.322-.198c-.195-.135-.363-.332-.612-.465v-.005h-.005c-.4-.246-.616-.512-.686-.71-.07-.268-.005-.47.193-.6.224-.135.38-.271.483-.336.104-.074.143-.102.176-.131h.002v-.003c.169-.202.436-.47.839-.601.139-.036.294-.065.466-.065zm2.8 2.142c.358 1.417 1.196 3.475 1.735 4.473.286.534.855 1.659 1.102 3.024.156-.005.33.018.513.064.646-1.671-.546-3.467-1.089-3.966-.22-.2-.232-.335-.123-.335.59.534 1.365 1.572 1.646 2.757.13.535.16 1.104.021 1.67.067.028.135.06.205.067 1.032.534 1.413.938 1.23 1.537v-.043c-.06-.003-.12 0-.18 0h-.016c.151-.467-.182-.825-1.065-1.224-.915-.4-1.646-.336-1.77.465-.008.043-.013.066-.018.135-.068.023-.139.053-.209.064-.43.268-.662.669-.793 1.187-.13.533-.17 1.156-.205 1.869v.003c-.02.334-.17.838-.319 1.35-1.5 1.072-3.58 1.538-5.348.334a2.645 2.645 0 00-.402-.533 1.45 1.45 0 00-.275-.333c.182 0 .338-.03.465-.067a.615.615 0 00.314-.334c.108-.267 0-.697-.345-1.163-.345-.467-.931-.995-1.788-1.521-.63-.4-.986-.87-1.15-1.396-.165-.534-.143-1.085-.015-1.645.245-1.07.873-2.11 1.274-2.763.107-.065.037.135-.408.974-.396.751-1.14 2.497-.122 3.854a8.123 8.123 0 01.647-2.876c.564-1.278 1.743-3.504 1.836-5.268.048.036.217.135.289.202.218.133.38.333.59.465.21.201.477.335.876.335.039.003.075.006.11.006.412 0 .73-.134.997-.268.29-.134.52-.334.74-.4h.005c.467-.135.835-.402 1.044-.7zm2.185 8.958c.037.6.343 1.245.882 1.377.588.134 1.434-.333 1.791-.765l.211-.01c.315-.007.577.01.847.268l.003.003c.208.199.305.53.391.876.085.4.154.78.409 1.066.486.527.645.906.636 1.14l.003-.007v.018l-.003-.012c-.015.262-.185.396-.498.595-.63.401-1.746.712-2.457 1.57-.618.737-1.37 1.14-2.036 1.191-.664.053-1.237-.2-1.574-.898l-.005-.003c-.21-.4-.12-1.025.056-1.69.176-.668.428-1.344.463-1.897.037-.714.076-1.335.195-1.814.12-.465.308-.797.641-.984l.045-.022zm-10.814.049h.01c.053 0 .105.005.157.014.376.055.706.333 1.023.752l.91 1.664.003.003c.243.533.754 1.064 1.189 1.637.434.598.77 1.131.729 1.57v.006c-.057.744-.48 1.148-1.125 1.294-.645.135-1.52.002-2.395-.464-.968-.536-2.118-.469-2.857-.602-.369-.066-.61-.2-.723-.4-.11-.2-.113-.602.123-1.23v-.004l.002-.003c.117-.334.03-.752-.027-1.118-.055-.401-.083-.71.043-.94.16-.334.396-.4.69-.533.294-.135.64-.202.915-.47h.002v-.002c.256-.268.445-.601.668-.838.19-.201.38-.336.663-.336zm7.159-9.074c-.435.201-.945.535-1.488.535-.542 0-.97-.267-1.28-.466-.154-.134-.28-.268-.373-.335-.164-.134-.144-.333-.074-.333.109.016.129.134.199.2.096.066.215.2.36.333.292.2.68.467 1.167.467.485 0 1.053-.267 1.398-.466.195-.135.445-.334.648-.467.156-.136.149-.267.279-.267.128.016.034.134-.147.332a8.097 8.097 0 01-.69.468zm-1.082-1.583V5.64c-.006-.02.013-.042.029-.05.074-.043.18-.027.26.004.063 0 .16.067.15.135-.006.049-.085.066-.135.066-.055 0-.092-.043-.141-.068-.052-.018-.146-.008-.163-.065zm-.551 0c-.02.058-.113.049-.166.066-.047.025-.086.068-.14.068-.05 0-.13-.02-.136-.068-.01-.066.088-.133.15-.133.08-.031.184-.047.259-.005.019.009.036.03.03.05v.02h.003z"}),Wm={postgres:"postgresql",postgresql:"postgresql",psql:"postgresql",redis:"redis",mongo:"mongodb",mongodb:"mongodb",rabbitmq:"rabbitmq",rabbit:"rabbitmq",nginx:"nginx",mysql:"mysql",mariadb:"mariadb",sqlite:"sqlite",docker:"docker",k8s:"kubernetes",kubernetes:"kubernetes",elastic:"elasticsearch",elasticsearch:"elasticsearch",kafka:"apachekafka",apachekafka:"apachekafka",prometheus:"prometheus",grafana:"grafana",linux:"linux",tux:"linux"};function Um(t){if(!t)return null;const e=t.trim().toLowerCase().replace(/^fa[srbld]?\s+fa-/,"").replace(/^fa-/,"");return Gm[Wm[e]||e]||null}function qm(t){return null!==Um(t)}function Zm(t){if(!t)return!1;const e=t.trim().toLowerCase();return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("data:image/")||e.startsWith("data:image/svg+xml")}function Km(t){return!!t&&!qm(t)&&!Zm(t)}function Ym(t){if(!t)return"";const e=t.trim();return e?qm(e)||Zm(e)?"":e.startsWith("fa-")?`fas ${e}`:e.startsWith("fas ")||e.startsWith("far ")||e.startsWith("fab ")||e.startsWith("fal ")||e.startsWith("fad ")?e:`fas fa-${e}`:""}const Jm=[{name:"stats-system-disk",label:"系统盘",category:"Storage",keywords:["system disk","root","根目录","启动盘"]},{name:"stats-data-disk",label:"数据盘",category:"Storage",keywords:["data disk","mount","挂载","文件","data2"]},{name:"stats-disk-space",label:"磁盘容量",category:"Storage",keywords:["disk space","capacity","容量","已用","可用","剩余"]},{name:"stats-disk-read",label:"磁盘读取",category:"Storage",keywords:["disk read","读取","读速","吞吐"]},{name:"stats-disk-write",label:"磁盘写入",category:"Storage",keywords:["disk write","写入","写速","吞吐"]},{name:"stats-disk-io",label:"磁盘读写",category:"Storage",keywords:["disk io","iops","读写","输入输出"]},{name:"stats-gpu",label:"GPU 显卡",category:"Compute",keywords:["gpu","graphics","显卡","图形","计算卡","nvidia"]},{name:"stats-vram",label:"GPU 显存",category:"Compute",keywords:["gpu memory","vram","显存","gddr","cuda"]},{name:"stats-cpu",label:"CPU 处理器",category:"Compute",keywords:["cpu","processor","处理器","核心"]},{name:"stats-cpu-load",label:"CPU 负载",category:"Compute",keywords:["cpu load","负载","1min","5min","15min","loadavg"]},{name:"stats-io-wait",label:"I/O 等待",category:"Compute",keywords:["io wait","iowait","cpu","等待","阻塞"]},{name:"stats-memory",label:"内存",category:"Compute",keywords:["ram","memory","内存","物理内存"]},{name:"stats-swap",label:"交换空间",category:"Compute",keywords:["swap","交换","虚拟内存"]},{name:"stats-network",label:"网络接口",category:"Network",keywords:["network","ethernet","网络","网卡","连接"]},{name:"stats-network-upload",label:"网络发送",category:"Network",keywords:["network upload","tx","发送","上传","出站"]},{name:"stats-network-download",label:"网络接收",category:"Network",keywords:["network download","rx","接收","下载","入站"]},{name:"stats-latency",label:"网络延迟",category:"Network",keywords:["latency","ping","rtt","延迟","往返"]},{name:"stats-temperature",label:"温度",category:"System",keywords:["temperature","thermal","温度","散热","传感器"]},{name:"stats-fan",label:"风扇转速",category:"System",keywords:["fan","rpm","风扇","转速","散热"]},{name:"stats-power",label:"功耗",category:"System",keywords:["power","watt","功耗","电力","瓦"]},{name:"stats-process",label:"进程",category:"System",keywords:["process","pid","task","进程","任务","线程"]},{name:"stats-uptime",label:"运行时间",category:"System",keywords:["uptime","运行时间","开机","在线时长"]},{name:"stats-service",label:"服务状态",category:"Services",keywords:["service","systemd","服务","运行状态","守护进程"]},{name:"stats-health",label:"健康检查",category:"Services",keywords:["health","check","健康","检查","心跳"]},{name:"stats-database",label:"数据库",category:"Services",keywords:["database","db","数据库","连接数"]},{name:"stats-container",label:"容器",category:"Services",keywords:["container","docker","容器","pod","kubernetes"]},{name:"postgresql",label:"PostgreSQL"},{name:"redis",label:"Redis"},{name:"mongodb",label:"MongoDB"},{name:"mysql",label:"MySQL"},{name:"mariadb",label:"MariaDB"},{name:"sqlite",label:"SQLite"},{name:"rabbitmq",label:"RabbitMQ"},{name:"nginx",label:"Nginx"},{name:"docker",label:"Docker"},{name:"kubernetes",label:"Kubernetes"},{name:"elasticsearch",label:"Elasticsearch"},{name:"apachekafka",label:"Kafka"},{name:"prometheus",label:"Prometheus"},{name:"grafana",label:"Grafana"},{name:"linux",label:"Linux"},{name:"microchip",label:"CPU"},{name:"memory",label:"Memory"},{name:"hdd",label:"Disk"},{name:"network-wired",label:"Network"},{name:"wifi",label:"Wi‑Fi"},{name:"server",label:"Server"},{name:"database",label:"Database"},{name:"terminal",label:"Terminal"},{name:"clock",label:"Clock"},{name:"thermometer-half",label:"Temperature"},{name:"chart-line",label:"Chart Line"},{name:"chart-bar",label:"Chart Bar"},{name:"chart-pie",label:"Chart Pie"},{name:"tachometer-alt",label:"Gauge"},{name:"users",label:"Users"},{name:"user",label:"User"},{name:"bolt",label:"Bolt"},{name:"fire",label:"Fire"},{name:"heartbeat",label:"Heartbeat"},{name:"desktop",label:"Desktop"},{name:"laptop",label:"Laptop"},{name:"cloud",label:"Cloud"},{name:"globe",label:"Globe"},{name:"plug",label:"Plug"},{name:"cog",label:"Settings"},{name:"cogs",label:"Cogs"},{name:"sync",label:"Sync"},{name:"download",label:"Download"},{name:"upload",label:"Upload"},{name:"exchange-alt",label:"Transfer"},{name:"shield-alt",label:"Shield"},{name:"lock",label:"Lock"},{name:"key",label:"Key"},{name:"exclamation-triangle",label:"Warning"},{name:"check-circle",label:"OK"},{name:"times-circle",label:"Error"},{name:"info-circle",label:"Info"},{name:"power-off",label:"Power"},{name:"play",label:"Play"},{name:"pause",label:"Pause"},{name:"stop",label:"Stop"},{name:"envelope",label:"Mail"},{name:"folder",label:"Folder"},{name:"file",label:"File"},{name:"code",label:"Code"},{name:"layer-group",label:"Layers"},{name:"boxes",label:"Boxes"},{name:"cube",label:"Cube"},{name:"sitemap",label:"Sitemap"},{name:"project-diagram",label:"Diagram"},{name:"stream",label:"Stream"},{name:"broadcast-tower",label:"Broadcast"},{name:"satellite-dish",label:"Satellite"},{name:"ethernet",label:"Ethernet"},{name:"sd-card",label:"SD Card"},{name:"battery-full",label:"Battery"},{name:"fan",label:"Fan"},{name:"thermometer",label:"Thermometer"},{name:"stopwatch",label:"Stopwatch"},{name:"hourglass-half",label:"Hourglass"},{name:"history",label:"History"},{name:"list",label:"List"},{name:"tasks",label:"Tasks"},{name:"clipboard-list",label:"Clipboard"},{name:"bug",label:"Bug"},{name:"rocket",label:"Rocket"},{name:"star",label:"Star"},{name:"heart",label:"Heart"},{name:"eye",label:"Eye"},{name:"search",label:"Search"},{name:"filter",label:"Filter"},{name:"sliders-h",label:"Sliders"},{name:"tools",label:"Tools"},{name:"wrench",label:"Wrench"}];let Xm=class extends Ia.ConfigProvider{constructor(){super(...arguments),this.defaults={plugin:{serverStats:{enabled:!0,displayMode:"bottomBar",defaultInterval:3,debugLogging:!1,location:{x:null,y:null},style:{background:"rgba(20, 20, 20, 0.90)",size:100,layout:"vertical"},defaultMetrics:{cpu:!0,ram:!0,disk:!0,net:!0},defaultMetricOverrides:{},showDefaultIcons:!0,customMetrics:[],metricGroups:[]}}}}};Xm=b([(0,y.Injectable)()],Xm);const Qm={"zh-CN":{"Server Stats":"服务器状态",Appearance:"外观","Display Mode":"显示模式","Floating Panel":"浮动面板","Bottom Bar":"底部栏","Layout Direction":"排列方向",Vertical:"纵向",Horizontal:"横向","Background Color":"背景颜色",Opacity:"不透明度","Chart Size":"图表大小","Panel Position":"面板位置","Reset Position":"重置位置","Show Server Stats":"显示服务器状态",CPU:"CPU",RAM:"内存",DISK:"磁盘",NET:"网络","Reset Panel Position":"重置面板位置",Reset:"重置","Vertical or Horizontal layout":"纵向或横向排列","Background color and opacity":"背景颜色与不透明度","Unit: px":"单位:像素","Reset to default position":"重置回默认位置",Layout:"布局","Choose between floating panel or bottom bar":"选择浮动面板或底部栏","Custom Metrics":"单标签","Define custom shell commands to fetch data. The command must output a single value (number or text).":"定义自定义 Shell 命令来获取数据。命令必须输出单个值(数字或文本)。","Add New Metric":"添加单标签","Edit Metric":"编辑单标签",Label:"标签",Type:"类型","Progress Bar":"进度条","Text Value":"文本值",Color:"颜色","Default Color":"默认颜色","Max Value":"最大值",Suffix:"后缀","Command (Shell)":"功能命令(Shell)","Command executed on the server. The output (number or text) will be displayed.":"在服务器上执行的命令。输出(数字或文本)将显示在界面中。",Add:"添加",Save:"保存",Cancel:"取消","No custom metrics defined.":"尚未创建单标签。","Preset Library":"预设库","Fetch from GitHub":"从 GitHub 拉取","Load Presets":"加载预设","Loading...":"加载中...","Add to my metrics":"添加到我的指标","Preset added":"预设已添加","Failed to load presets":"加载预设失败","No presets found":"未找到预设","Import commonly used metrics from the community":"从社区导入常用指标配置","I want to submit my own preset":"我想提交我的预设","Default Metrics":"默认指标","Select which default indicators to display":"选择要显示的默认指标","CPU Usage":"CPU 使用率","RAM Usage":"内存使用率","Disk Usage":"磁盘使用率","Network Speed":"网络网速","Show icons for default metrics":"显示默认指标图标","Choose preset icon":"选择预设图标","Preset Icons":"预设图标","Default Update Interval":"默认更新频率","Base interval (in seconds) for collecting metrics":"收集指标的基础频率(秒)","Interval (sec)":"频率(秒)","Execution Interval":"执行频率",Default:"默认","Conditional Color Rules":"条件颜色规则","Color rules are checked from top to bottom. The first matching rule determines the color.":"颜色规则自上而下匹配。首个满足条件的规则决定颜色。","No conditional rules defined. Default color will always be used.":"未定义条件规则。将始终使用默认颜色。","Add Rule":"添加规则",If:"若","Greater or equal":"大于等于","Greater than":"大于","Less or equal":"小于等于","Less than":"小于",Equal:"等于","Not equal":"不等于",Contains:"包含","Does not contain":"不包含","Starts with":"开头为",Regex:"正则表达式","Value, e.g. 80, OK, DOWN":"匹配值,如 80, OK, DOWN","Rule color":"规则颜色","Remove rule":"删除规则",seconds:"秒",rule:"条规则",rules:"条规则","Timeout (sec)":"超时时间(秒)",Timeout:"超时","Icon (FontAwesome)":"图标 (FontAwesome)","Icon (Preset, FontAwesome or URL)":"图标 (预设/FontAwesome/URL)","Icon (FontAwesome or SVG)":"图标 (FontAwesome 或 SVG)","Icon (FontAwesome or custom SVG)":"图标 (FontAwesome 或自定义 SVG)","Use FontAwesome (ex: database, server, memory) or upload a custom .svg file":"使用 FontAwesome(如 database, server, memory)或上传自定义 .svg 文件","Upload Custom SVG":"上传自定义 SVG","Upload SVG":"上传 SVG",SVG:"SVG","Clear icon":"清除图标","Remove Icon":"删除图标",Icon:"图标","Upload custom SVG":"上传自定义 SVG","e.g. GPU (optional if icon set)":"例如 GPU(设置图标后可选)","e.g. PostgreSQL (optional if icon set)":"例如 PostgreSQL(设置图标后可选)","e.g. GB (or % if empty)":"例如 GB(留空则默认为 %)","e.g. °C, ms":"例如 °C, ms","fa-database, server, redis...":"fa-database, server, redis...","Debug Logging":"调试日志","Write detailed execution logs to file for troubleshooting":"将详细执行日志写入临时文件以便排查问题"},"pt-BR":{"Server Stats":"Status do Servidor",Appearance:"Aparência","Display Mode":"Modo de Exibição","Floating Panel":"Painel Flutuante","Bottom Bar":"Barra Inferior","Layout Direction":"Direção do Layout",Vertical:"Vertical",Horizontal:"Horizontal","Background Color":"Cor de Fundo",Opacity:"Opacidade","Chart Size":"Tamanho dos Gráficos","Panel Position":"Posição do Painel","Reset Position":"Redefinir Posição","Show Server Stats":"Exibir Status do Servidor",CPU:"CPU",RAM:"RAM",DISK:"DISCO",NET:"REDE","Reset Panel Position":"Redefinir Posição do Painel",Reset:"Redefinir","Vertical or Horizontal layout":"Disposição vertical ou horizontal","Background color and opacity":"Cor de fundo e opacidade","Unit: px":"Unidade: px","Reset to default position":"Redefinir para a posição padrão",Layout:"Layout","Choose between floating panel or bottom bar":"Escolha entre painel flutuante ou barra inferior","Custom Metrics":"Métricas Personalizadas","Define custom shell commands to fetch data. The command must output a single value (number or text).":"Defina comandos shell personalizados para coletar dados. O comando deve retornar um único valor (número ou texto).","Add New Metric":"Adicionar Nova Métrica","Edit Metric":"Editar Métrica",Label:"Rótulo",Type:"Tipo","Progress Bar":"Barra de Progresso","Text Value":"Valor de Texto",Color:"Cor","Default Color":"Cor Padrão","Max Value":"Valor Máximo",Suffix:"Sufixo","Command (Shell)":"Comando (Shell)","Command executed on the server. The output (number or text) will be displayed.":"Comando executado no servidor. O resultado (número ou texto) será exibido na interface.",Add:"Adicionar",Save:"Salvar",Cancel:"Cancelar","No custom metrics defined.":"Nenhuma métrica personalizada definida.","Preset Library":"Biblioteca de Predefinições","Fetch from GitHub":"Buscar do GitHub","Load Presets":"Carregar Predefinições","Loading...":"Carregando...","Add to my metrics":"Adicionar às minhas métricas","Preset added":"Predefinição adicionada","Failed to load presets":"Falha ao carregar predefinições","No presets found":"Nenhuma predefinição encontrada","Import commonly used metrics from the community":"Importe métricas de uso comum da comunidade","I want to submit my own preset":"Quero enviar minha própria predefinição","Default Metrics":"Métricas Padrão","Select which default indicators to display":"Selecione quais indicadores padrão exibir","CPU Usage":"Uso de CPU","RAM Usage":"Uso de RAM","Disk Usage":"Uso de Disco","Network Speed":"Velocidade de Rede","Show icons for default metrics":"Mostrar ícones nas métricas padrão","Choose preset icon":"Escolher ícone predefinido","Preset Icons":"Ícones Predefinidos","Default Update Interval":"Intervalo de Atualização Padrão","Base interval (in seconds) for collecting metrics":"Intervalo base (em segundos) para coleta de métricas","Interval (sec)":"Intervalo (seg)","Execution Interval":"Intervalo de Execução",Default:"Padrão","Conditional Color Rules":"Regras de Cores Condicionais","Color rules are checked from top to bottom. The first matching rule determines the color.":"As regras são verificadas de cima para baixo. A primeira correspondência define a cor.","No conditional rules defined. Default color will always be used.":"Nenhuma regra condicional definida. A cor padrão será sempre utilizada.","Add Rule":"Adicionar Regra",If:"Se","Greater or equal":"Maior ou igual","Greater than":"Maior que","Less or equal":"Menor ou igual","Less than":"Menor que",Equal:"Igual a","Not equal":"Diferente de",Contains:"Contém","Does not contain":"Não contém","Starts with":"Começa com",Regex:"Expressão regular (Regex)","Value, e.g. 80, OK, DOWN":"Valor, ex: 80, OK, DOWN","Rule color":"Cor da regra","Remove rule":"Remover regra",seconds:"segundos",rule:"regra",rules:"regras","Timeout (sec)":"Timeout (seg)",Timeout:"Timeout","Icon (FontAwesome)":"Ícone (FontAwesome)","Icon (Preset, FontAwesome or URL)":"Ícone (Preset, FontAwesome ou URL)","Icon (FontAwesome or SVG)":"Ícone (FontAwesome ou SVG)","Icon (FontAwesome or custom SVG)":"Ícone (FontAwesome ou SVG customizado)","Use FontAwesome (ex: database, server, memory) or upload a custom .svg file":"Use FontAwesome (ex: database, server, memory) ou carregue um arquivo .svg customizado","Upload Custom SVG":"Carregar SVG Customizado","Upload SVG":"Carregar SVG",SVG:"SVG","Clear icon":"Remover ícone","Remove Icon":"Remover Ícone",Icon:"Ícone","Upload custom SVG":"Carregar SVG personalizado","e.g. GPU (optional if icon set)":"ex: GPU (opcional se houver ícone)","e.g. PostgreSQL (optional if icon set)":"ex: PostgreSQL (opcional se houver ícone)","e.g. GB (or % if empty)":"ex: GB (ou % se vazio)","e.g. °C, ms":"ex: °C, ms","fa-database, server, redis...":"fa-database, server, redis...","Debug Logging":"Logs de Depuração","Write detailed execution logs to file for troubleshooting":"Gravar logs detalhados de execução em arquivo para diagnóstico"}},tg=[["Author's lab only","作者实验室自用","Somente para o laboratório do autor"],["Received total","累计接收","Total recebido"],["Sent total","累计发送","Total enviado"],["Combined total","累计收发","Total combinado"],["Since interface creation or counter reset","自网卡建立或计数器重置起","Desde a criação da interface ou reinício do contador"],["Download and upload are current rates. Hover shows separate received and sent totals since interface creation or counter reset, not since SSH login. Default-route interfaces are preferred; without a route, eligible non-loopback interfaces are used.","下载、上传是当前速率;悬停分别显示累计接收、累计发送量。累计从网卡建立或计数器重置起计算,与 SSH 登录时间无关。优先统计默认路由网卡;没有默认路由时使用可用的非回环网卡。","Download e upload mostram as taxas atuais. Os detalhes mostram os totais recebidos e enviados desde a criação da interface ou reinício do contador, não desde o login SSH. Preferem-se interfaces de rota padrão; sem rota, usam-se interfaces elegíveis não loopback."],["Import from GitHub","从 GitHub 导入","Importar do GitHub"],["GitHub source","GitHub 来源","Fonte do GitHub"],["Only GitHub JSON file URLs are supported.","请使用 GitHub 上 JSON 文件的链接。","Use um link de arquivo JSON no GitHub."],["GitHub returned an HTTP error.","GitHub 下载失败,请检查仓库文件是否存在后重试。","Falha no GitHub. Verifique se o arquivo existe e tente novamente."],["GitHub preset download timed out.","下载超时,请检查网络后重试。现有预设仍然保留。","Tempo esgotado. Verifique a rede e tente novamente. As predefinições existentes foram mantidas."],["GitHub preset file is too large.","预设文件超过 2 MiB,无法导入。","O arquivo de predefinições excede 2 MiB."],["GitHub preset file is not valid JSON.","GitHub 文件不是有效的 JSON,现有预设仍然保留。","O arquivo do GitHub não é JSON válido. As predefinições existentes foram mantidas."],["GitHub preset file has an unsupported format.","GitHub 文件格式不受支持,请使用标签预设库 JSON。","Formato não suportado. Use um JSON de biblioteca de predefinições."],["Unable to download presets from GitHub.","无法连接 GitHub,请检查网络后重试。现有预设仍然保留。","Não foi possível acessar o GitHub. Verifique a rede e tente novamente."],["GitHub preset download was canceled.","GitHub 下载已取消,现有预设仍然保留。","Download cancelado. As predefinições existentes foram mantidas."],["Move items up or down to set their order in the bottom bar and floating panel.","使用上移、下移调整显示顺序,底部状态栏和浮动面板同步生效。","Mova para cima ou para baixo para ajustar a ordem na barra inferior e no painel flutuante."],["Equals (==)","等于 (==)","Igual (==)"],["Not Equals (!=)","不等于 (!=)","Diferente (!=)"],["Greater than (>)","大于 (>)","Maior que (>)"],["Greater or Equal (>=)","大于等于 (>=)","Maior ou igual (>=)"],["Less than (<)","小于 (<)","Menor que (<)"],["Less or Equal (<=)","小于等于 (<=)","Menor ou igual (<=)"],["Contains","包含","Contém"],["Not Contains","不包含","Não contém"],["Starts With","开头为","Começa com"],["Regex Match","正则匹配","Correspondência de expressão regular"],["Threshold / Value","阈值 / 匹配值","Limite / Valor"],["Metric group","标签组","Grupo de Métricas"],["Enabled","已启用","Ativado"],["Disabled","已禁用","Desativado"],["Enable metric","启用标签","Ativar Métrica"],["Disable metric","禁用标签","Desativar Métrica"],["Show this label when its check fails","前置校验失败时显示此标签","Exibir esta métrica quando a verificação falhar"],["Enabled by default. Turning this off hides the label in every display mode and also removes it from the carousel.","默认开启。关闭后,此标签在所有显示模式中隐藏,并且不会参与轮播。","Ativado por padrão. Desativar oculta a métrica em todos os modos e a remove do carrossel."],["When the failed label remains visible, this option controls whether it participates in the carousel. Static and hover views retain it.","标签在校验失败时仍显示的前提下,此选项控制是否参与轮播;静态显示和悬停详情仍保留该标签。","Quando a métrica com falha permanece visível, esta opção controla sua participação no carrossel."],["Edit built-in commands and appearance, or restore an item to its defaults.","可以编辑内置标签的命令和外观,也可以单独恢复默认设置。","Edite comandos e aparência das métricas integradas ou restaure os padrões de um item."],["Edit Built-in Metric","编辑内置标签","Editar Métrica Integrada"],["Customized","已自定义","Personalizado"],["Restore defaults","恢复默认","Restaurar Padrões"],["Memory","内存","Memória"],["Disk","磁盘","Disco"],["Delete this group and all of its metrics?","确定删除此标签组及其中的全部标签吗?","Excluir este grupo e todas as suas métricas?"],["Are you sure you want to delete this metric?","确定删除此标签吗?","Deseja excluir esta métrica?"],["Upload","上传","Envio"],["Download","下载","Recebimento"],["Import JSON","导入 JSON","Importar JSON"],["Export my labels","导出我的标签","Exportar Minhas Métricas"],["Bundled presets work offline. Importing a library only previews it; commands run after you add a label or group.","内置预设库可离线使用。导入文件只加载预览,添加为单标签或标签组后才会执行命令。","Predefinições incluídas funcionam offline. Importar apenas visualiza; os comandos executam após adicionar um item."],["Search presets","搜索预设","Buscar Predefinições"],["No presets match this search.","没有匹配的预设。","Nenhuma predefinição corresponde à busca."],["Suggested connections","建议绑定连接","Conexões Sugeridas"],["Source","来源","Fonte"],["Library loaded. Review an item and click Add to enable it.","预设库已加载。检查内容后点击“添加”即可启用。","Biblioteca carregada. Revise e clique em Adicionar para ativar."],["Unable to read this preset library. Choose a valid JSON library.","无法读取预设库,请选择有效的 JSON 预设文件。","Não foi possível ler a biblioteca. Escolha um arquivo JSON válido."],["Label library exported.","标签预设库已导出。","Biblioteca exportada."],["Added with a restricted scope. Choose the missing connections before use.","已添加并保留指定范围。请在使用前选择缺失的连接。","Adicionado com escopo restrito. Selecione as conexões ausentes antes de usar."],["Preset added.","预设已添加。","Predefinição adicionada."],["Single Labels","单标签","Rótulos Individuais"],["Add Single Label","添加单标签","Adicionar Rótulo Individual"],["Search icons by name or purpose","搜索图标名称或用途","Buscar ícone por nome ou finalidade"],["Icon category","图标分类","Categoria do Ícone"],["All icon categories","全部分类","Todas as Categorias"],["No icons match this search.","没有匹配的图标。","Nenhum ícone corresponde à busca."],["Other","其他","Outros"],["Storage","存储","Armazenamento"],["Compute","计算","Computação"],["Network","网络","Rede"],["System","系统","Sistema"],["Services","服务","Serviços"],["No detail received","未收到扩展信息","Nenhum detalhe recebido"],["Detail command timed out","扩展命令超时","Tempo limite do comando de detalhes"],["Unable to fetch details","扩展信息获取失败","Não foi possível obter detalhes"],["Detail command failed","扩展命令失败","Falha no comando de detalhes"],["Detail check timed out","扩展校验超时","Tempo limite da verificação de detalhes"],["Detail unavailable","扩展信息不可用","Detalhes indisponíveis"],["Detail returned no data","扩展信息未返回数据","Detalhes sem dados retornados"],["Incomplete detail response","扩展信息接收不完整","Resposta de detalhes incompleta"],["Remote detail command failed","远程扩展命令失败","Falha no comando remoto de detalhes"],["Display Scope","显示范围","Escopo de Exibição"],["All terminal panes (default)","所有终端窗格(默认)","Todos os painéis de terminal (padrão)"],["Selected connections or layouts","指定连接或已保存布局(可多选)","Conexões ou layouts selecionados"],["The entire group shares this scope, including its main metric and children.","此范围属于整个标签组,主标签和所有子标签共同使用。","Todo o grupo usa este escopo, incluindo a métrica principal e as filhas."],["Show in every supported terminal pane, including new connections and split panes.","在所有支持的终端窗格中显示,包括新连接和分屏窗格。","Exibe em todos os painéis compatíveis, incluindo novas conexões e divisões."],["A connection matches each pane using that saved connection. A layout matches every pane opened within that saved layout. Multiple selections are combined.","选择连接:匹配每个使用该连接配置的窗格。选择布局:匹配该已保存布局中的全部窗格。多选时合并显示范围。","Uma conexão corresponde a cada painel que usa essa configuração. Um layout corresponde a todos os painéis desse layout salvo. As seleções são combinadas."],["For a mixed P1 / P2 / P1 layout, select P1 for metrics that belong only to its two P1 panes. Select the layout only for metrics shared by all panes.","例如 P1 / P2 / P1 混合布局:P1 专用指标选择 P1,只在两个 P1 窗格中显示;所有窗格共用的指标才选择整个布局。","Em um layout P1 / P2 / P1, selecione P1 para métricas exclusivas dos dois painéis P1. Selecione o layout para métricas comuns a todos."],["Find a saved connection or layout","查找已保存的连接或布局","Buscar conexão ou layout salvo"],["Search by name","按名称搜索","Buscar por nome"],["Saved connections and layouts","已保存的连接与布局","Conexões e layouts salvos"],["Saved Layout","已保存的布局","Layout Salvo"],["Saved Connection","连接配置","Conexão Salva"],["No matching saved connections or layouts.","没有匹配的已保存连接或布局。","Nenhuma conexão ou layout salvo corresponde à busca."],["Deleted or unavailable","已删除或不可用","Excluído ou indisponível"],["Remove scope selection","移除此范围选择","Remover seleção de escopo"],["No targets selected: this item will not appear in any pane. Choose targets or switch explicitly to all panes.","尚未选择目标:此项不会在任何窗格显示。请选择目标,或明确切换为“所有终端窗格”。","Nenhum destino selecionado: este item não aparecerá em nenhum painel. Selecione destinos ou altere para todos os painéis."],["Missing targets remain selected but cannot match a pane. Remove or replace them; deletion never changes this item to all panes.","失效目标会保留在选择中,但不再匹配窗格。可以移除或重新选择;删除目标不会自动变成全局显示。","Destinos ausentes permanecem selecionados, mas não correspondem a painéis. Remova ou substitua; a exclusão nunca altera o escopo para todos os painéis."],["Metric Groups","多标签组","Grupos de Métricas"],["Metric Group","标签组","Grupo de Métricas"],["Add Group","添加标签组","Adicionar Grupo"],["Edit Group","编辑标签组","Editar Grupo"],["Save Group","保存整个标签组","Salvar Grupo Inteiro"],["Group Name","组名称","Nome do Grupo"],["Group Display Mode","组显示模式","Modo de Exibição do Grupo"],["Group a main metric and child metrics. Each metric keeps its own commands and refresh interval.","将主标签和多个子标签整理成一组,每个标签独立设置命令和刷新频率。","Agrupe uma métrica principal e métricas filhas, cada uma com seus comandos e intervalo de atualização."],["No metric groups defined.","尚未创建标签组。","Nenhum grupo definido."],["Main Metric","主标签","Métrica Principal"],["Child Metric","子标签","Métrica Filha"],["Child Metrics","个子标签","Métricas Filhas"],["Unnamed Metric","未命名标签","Métrica sem Nome"],["Add Child","添加子标签","Adicionar Métrica Filha"],["Remove Child","删除子标签","Remover Métrica Filha"],["Edits to all members are saved together with the group.","切换主标签或子标签会保留当前编辑,点击“保存整个标签组”后一起生效。","As alterações de todos os membros são salvas juntas com o grupo."],["Overview","概览","Visão Geral"],["Carousel","轮播显示","Carrossel"],["Static","静态显示","Estático"],["Carousel Interval (sec)","轮播间隔(秒)","Intervalo do Carrossel (seg)"],["Controls display switching, independently of command refresh intervals.","只控制显示切换,与各命令的数据刷新频率独立。","Controla a troca de exibição, independentemente dos intervalos de coleta."],["Empty Carousel Text","轮播没有可显示项时的提示","Texto para Carrossel Vazio"],["No available metrics","无可显示标签","Nenhuma métrica disponível"],["No available items","无可显示标签","Nenhum item disponível"],["Show the main metric. Hover to show the main metric and all children with details.","平时显示主标签;悬停后竖排展示主标签、全部子标签及各自的扩展信息。","Mostra a métrica principal. Ao passar o mouse, mostra todos os membros e seus detalhes."],["Rotate child metrics. Hover to pause and show the main metric and all children with details.","轮播子标签;悬停时暂停轮播,并竖排展示主标签、全部子标签及扩展信息。","Alterna as métricas filhas. Ao passar o mouse, pausa e mostra todos os membros e detalhes."],["Show the main metric and all children. Horizontal hover expands one member; vertical hover expands all members.","同时显示主标签和全部子标签;横排悬停只扩展对应标签,竖排悬停扩展整组。","Mostra todos os membros. Na horizontal, expande um membro; na vertical, expande todos."],["Object Check Command (optional)","对象校验命令(可选)","Comando de Verificação (opcional)"],["Leave empty to run the metric directly. A failed check prevents both metric and detail commands from running.","留空则直接执行功能命令。校验不通过时,不执行功能命令和扩展信息命令。","Deixe vazio para executar diretamente. Uma falha na verificação impede os comandos da métrica e dos detalhes."],["Compare","比较对象","Comparar"],["Exit Code","退出码","Código de Saída"],["Output Text","输出文本","Texto de Saída"],["Expected Value","期望值","Valor Esperado"],["Check Failure Text","校验失败显示内容","Texto de Falha na Verificação"],["Unavailable","不可用","Indisponível"],["Output text is compared exactly after trimming surrounding whitespace. Exit code 0 usually means success.","输出文本去除首尾空白后精确比较,区分大小写;退出码 0 通常表示成功。","O texto é comparado exatamente após remover espaços nas extremidades. O código 0 geralmente indica sucesso."],["Hover Detail Command (optional)","悬停扩展信息命令(可选)","Comando de Detalhes ao Passar o Mouse (opcional)"],["Append this command output on hover. Leave empty for no extra information.","鼠标移入时将输出追加到功能命令结果后,移出收起;留空则不显示扩展信息。","Acrescenta a saída ao passar o mouse e oculta ao sair. Deixe vazio para não exibir detalhes."],["Keep in carousel when its check fails","前置校验失败时仍参与轮播","Manter no carrossel quando a verificação falhar"],["Enabled by default. Disable to skip this child immediately in the carousel. Static views and hover details still show its failure text.","默认开启并显示失败提示。关闭后,轮播立即跳过此子标签;静态显示和悬停详情仍保留失败提示。","Ativado por padrão. Desative para pular esta filha imediatamente no carrossel. Exibições estáticas e detalhes ainda mostram a falha."],["Every member needs a label or icon and a metric command. Intervals and timeouts must be positive; exit codes must be whole numbers from 0 to 255.","每个标签都需要名称或图标,以及功能命令。频率、超时须不小于 1;退出码须为 0~255 的整数。","Cada membro precisa de nome ou ícone e comando. Intervalos e tempos limite devem ser positivos; códigos de saída devem ser inteiros de 0 a 255."],["Move up","上移","Mover para Cima"],["Move down","下移","Mover para Baixo"],["Edit","编辑","Editar"],["Remove","删除","Remover"]];Qm.en=Qm.en||{};for(const[t,e,n]of tg)Qm.en[t]=t,Qm["zh-CN"][t]=e,Qm["pt-BR"][t]=n;Qm.pt=Qm["pt-BR"];for(const[t,e]of[["系统盘","System disk"],["数据盘","Data disk"],["磁盘容量","Disk capacity"],["磁盘读取","Disk read"],["磁盘写入","Disk write"],["磁盘读写","Disk I/O"],["GPU 显卡","GPU"],["GPU 显存","GPU memory"],["CPU 处理器","CPU processor"],["CPU 负载","CPU load"],["CPU负载","CPU load"],["线程数","Threads"],["I/O 等待","I/O wait"],["内存","Memory"],["交换空间","Swap"],["网络接口","Network interface"],["网络发送","Network upload"],["网络接收","Network download"],["网络延迟","Network latency"],["温度","Temperature"],["风扇转速","Fan speed"],["功耗","Power usage"],["进程","Processes"],["运行时间","Uptime"],["服务状态","Service status"],["健康检查","Health check"],["数据库","Database"],["容器","Containers"],["无GPU","No GPU"],["未挂载","Not mounted"]])Qm.en[t]=e,Qm.en[e]=e,Qm["zh-CN"][t]=t,Qm["zh-CN"][e]=t;function eg(t){const e=[...t.customMetrics||[]];for(const n of t.metricGroups||[])!1!==n.enabled&&(n.main&&e.push(n.main),e.push(...n.children||[]));const n=new Set;return e.filter(t=>!(!t||!1===t.enabled||"string"!=typeof t.id||n.has(t.id)||(n.add(t.id),0)))}function ng(t){return Number.isFinite(t.timeout)&&t.timeout>0?Math.max(1,t.timeout):30}function ig(t){return"'"+t.replace(/'/g,"'\"'\"'")+"'"}function sg(t,e,n="value"){var i,s,a;if(!/^[a-zA-Z0-9_]+$/.test(e))throw new Error("Invalid metric protocol token");const o=ng(t),r=t=>`if command -v timeout >/dev/null 2>&1; then\n timeout --kill-after=2s ${o}s /bin/sh -c ${ig(t)}\nelif command -v gtimeout >/dev/null 2>&1; then\n gtimeout --kill-after=2s ${o}s /bin/sh -c ${ig(t)}\nelse\n # Kill the whole process group, including children of a timed-out script.\n setsid /bin/sh -c ${ig(t)} &\n _child=$!\n (sleep ${o}; kill -TERM "-$_child" 2>/dev/null; sleep 2; kill -KILL "-$_child" 2>/dev/null) >/dev/null 2>&1 &\n _watchdog=$!\n wait "$_child"\n _result=$?\n kill -KILL "-$_child" 2>/dev/null\n kill "$_watchdog" 2>/dev/null\n wait "$_watchdog" 2>/dev/null\n if [ "$_result" -eq 143 ] || [ "$_result" -eq 137 ]; then exit 124; fi\n exit "$_result"\nfi`;return`(\nif ! command -v timeout >/dev/null 2>&1 && ! command -v gtimeout >/dev/null 2>&1 && ! command -v setsid >/dev/null 2>&1; then\n printf 'TABBY-METRIC-RESULT:${e}:error:Err: Install timeout or setsid\\n'\n exit 0\nfi\n${(null===(i=t.checkCommand)||void 0===i?void 0:i.trim())?`\n_check_out=$(\n${r(t.checkCommand)}\n)\n_check_code=$?\nif [ "$_check_code" -eq 124 ] || [ "$_check_code" -eq 137 ]; then\n printf 'TABBY-METRIC-RESULT:${e}:error:Err: Check timeout\\n'\n exit 0\nfi\n${"output"===t.checkMode?`_check_value=$(printf '%s' "$_check_out" | awk 'BEGIN { value="" } { if (NR>1) value=value "\\n"; value=value $0 } END { sub(/^[[:space:]]+/, "", value); sub(/[[:space:]]+$/, "", value); printf "%s", value }')\nif [ "$_check_code" -ne 0 ] || [ "$_check_value" != ${ig((null!==(s=t.checkExpected)&&void 0!==s?s:"").trim())} ]; then`:`if [ "$_check_code" != ${ig((null!==(a=t.checkExpected)&&void 0!==a?a:"0").trim())} ]; then`}\n printf 'TABBY-METRIC-RESULT:${e}:unavailable:\\n'\n exit 0\nfi\n`:""}\n_out=$(\n${r("detail"===n?t.detailCommand||"":t.command)}\n)\n_code=$?\nif [ "$_code" -eq 124 ] || [ "$_code" -eq 137 ]; then\n _status=error\n _val='Err: Timeout'\nelif [ "$_code" -eq 0 ]; then\n _status=ok\n ${"detail"===n?"_val=$(printf '%s' \"$_out\" | tr '\\r\\n' ' ' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')":"_val=$(printf '%s\\n' \"$_out\" | awk 'NF{p=$0} END{print p}' | tr '\\r\\n' ' ' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')\n [ -z \"$_val\" ] && _val=0"}\nelse\n _status=error\n _val="Err: Exit $_code"\nfi\n# Stay below PIPE_BUF, so parallel results cannot interleave.\n_val=$(printf '%s' "$_val" | cut -c 1-2000)\nprintf 'TABBY-METRIC-RESULT:${e}:%s:%s\\n' "$_status" "$_val"\n) &`}function ag(t){const e=[],n=/^TABBY-METRIC-RESULT:([a-zA-Z0-9_]+):(ok|unavailable|error):([^\r\n]*)\r?\n/gm;let i;for(;i=n.exec(t);)e.push({token:i[1],status:i[2],value:i[3].replace(/\x1B\[[0-9;]*[a-zA-Z]/g,"").trim()});return e}function og(t,e,n){if(!t||"all"===t.mode)return!0;if("selected"!==t.mode||!Array.isArray(t.profileIds))return!1;const i=new Set((n||[]).map(t=>null==t?void 0:t.id).filter(Boolean));return t.profileIds.some(t=>i.has(t)&&e.profileIds.includes(t))}const rg="__tabbyGroupServerStatsLayoutProfileId";let lg=class{constructor(t,e,n){this.config=t,this.app=e,this.profiles=n,this.subscriptions=[],this.tokenPatches=new Map,this.destroyed=!1,this.installProfileHook();for(const t of[this.app.tabOpened$,this.app.tabsChanged$,this.config.ready$])(null==t?void 0:t.subscribe)&&this.subscriptions.push(t.subscribe(()=>this.observeTabs()));this.observeTabs()}installProfileHook(){const t=this.profiles;if("function"!=typeof(null==t?void 0:t.newTabParametersForProfile))return;const e=t.newTabParametersForProfile,n=this,i=async function(t,...i){var s;const a=await e.call(this,t,...i);if(n.destroyed||"split-layout"!==(null==t?void 0:t.type)||"string"!=typeof t.id||!t.id)return a;const o=null===(s=null==a?void 0:a.inputs)||void 0===s?void 0:s._recoveredState;if(!o||"app:split-tab"!==o.type)return a;const r=JSON.parse(JSON.stringify(o));return r[rg]=t.id,Object.assign(Object.assign({},a),{inputs:Object.assign(Object.assign({},a.inputs),{_recoveredState:r})})};this.originalParameters=e,this.wrappedParameters=i,t.newTabParametersForProfile=i}marker(t){const e=null==t?void 0:t._recoveredState;if("app:split-tab"!==(null==e?void 0:e.type))return;const n=e[rg];return"string"==typeof n&&n?n:void 0}observeTabs(){if(this.destroyed)return;const t=new Set,e=n=>{if(!n||t.has(n))return;t.add(n),this.preserveRecoveryMarker(n);const i="function"==typeof n.getAllTabs?n.getAllTabs():[];for(const t of Array.isArray(i)?i:[])e(t)};for(const t of this.app.tabs||[])e(t)}preserveRecoveryMarker(t){var e;if(!this.marker(t)||"function"!=typeof t.getRecoveryToken||this.tokenPatches.has(t))return;const n=t.getRecoveryToken,i=this,s=async function(...t){const e=await n.apply(this,t),s=i.marker(this);return!i.destroyed&&s&&"app:split-tab"===(null==e?void 0:e.type)?Object.assign(Object.assign({},e),{[rg]:s}):e},a={original:n,wrapped:s,hadOwnMethod:Object.prototype.hasOwnProperty.call(t,"getRecoveryToken")};this.tokenPatches.set(t,a),t.getRecoveryToken=s,(null===(e=t.destroyed$)||void 0===e?void 0:e.subscribe)&&(a.destroyed=t.destroyed$.subscribe(()=>this.releaseTab(t)))}releaseTab(t){var e;const n=this.tokenPatches.get(t);n&&(t.getRecoveryToken===n.wrapped&&(n.hadOwnMethod?t.getRecoveryToken=n.original:delete t.getRecoveryToken),null===(e=n.destroyed)||void 0===e||e.unsubscribe(),this.tokenPatches.delete(t))}contextForSession(t){var e,n;if(this.destroyed||!t||!1===t.open)return{profileIds:[]};this.observeTabs();const i=function(t,e){if(!e)return null;const n=new Set,i=t=>{if(!t||n.has(t))return null;if(n.add(t),t.session===e)return t;const s="function"==typeof t.getAllTabs?t.getAllTabs():[];for(const t of Array.isArray(s)?s:[]){const e=i(t);if(e)return e}return null};for(const e of t||[]){const t=i(e);if(t)return t}return null}(this.app.tabs||[],t),s=new Set,a="string"==typeof(null===(e=null==i?void 0:i.profile)||void 0===e?void 0:e.id)&&i.profile.id?i.profile.id:null===(n=t.profile)||void 0===n?void 0:n.id;"string"==typeof a&&a&&s.add(a);const o=new Set;let r=null==i?void 0:i.parent;for(;r&&!o.has(r);){o.add(r),this.preserveRecoveryMarker(r);const t=this.marker(r);t&&s.add(t),r=r.parent}return{profileIds:[...s]}}ngOnDestroy(){this.destroyed=!0,this.subscriptions.forEach(t=>t.unsubscribe()),this.subscriptions=[];const t=this.profiles;this.wrappedParameters&&(null==t?void 0:t.newTabParametersForProfile)===this.wrappedParameters&&(t.newTabParametersForProfile=this.originalParameters);for(const t of[...this.tokenPatches.keys()])this.releaseTab(t)}};lg=b([(0,y.Injectable)({providedIn:"root"}),v("design:paramtypes",[Ia.ConfigService,Ia.AppService,Ia.ProfilesService])],lg);const cg=["cpu","ram","disk","net"];function dg(t){const e=Array.isArray(t)?t:[];return[...new Set([...e.filter(t=>cg.includes(t)),...cg])]}const pg=t=>JSON.parse(JSON.stringify(t)),hg=[{operator:">=",value:"90",color:Bm.red},{operator:">=",value:"75",color:Bm.orange}],ug=t=>`total=$(sysctl -n hw.memsize 2>/dev/null) || exit 1; data=$(vm_stat 2>/dev/null) || exit 1; printf '%s\\n' "$data" | awk -v total="$total" '/page size of/ {for(i=1;i<NF;i++) if($i=="of") size=$(i+1)} /^Pages free:/ {free=$3+0} /^Pages inactive:/ {inactive=$3+0} /^Pages speculative:/ {speculative=$3+0} END {if(total<=0 || size<=0) exit 1; available=(free+inactive+speculative)*size; if(available>total) available=total; ${t?'printf "%.1f/%.1f GiB available\\n",available/1073741824,total/1073741824':'printf "%.1f\\n",(total-available)*100/total'}}'`,mg=(t,e)=>`if [ "$(uname -s)" = Darwin ]; then ${e}; else ${t}; fi`;function gg(t="busy"){const e=`awk '/^cpu / { t=0; for(i=2;i<=9;i++) t+=$i; print t,${"busy"===t?"$5+$6":"iowait"===t?"$6":"$9"}; found=1; exit } END { if(!found) exit 1 }' /proc/stat`;return`a=$(${e}) || exit 1; sleep 1; b=$(${e}) || exit 1; printf '%s\\n%s\\n' "$a" "$b" | awk 'NR==1 { t1=$1; v1=$2 } NR==2 { dt=$1-t1; v=$2; result=dt>0?(${"busy"===t?"dt-(v-v1)":"v-v1"})*100/dt:0; if(result<0) result=0; if(result>100) result=100; printf "%.1f\\n",result }'`}const fg='net_os=$(uname -s) || exit 1;\ntabby_net_rows() { if [ "$net_os" = Darwin ]; then net_data=$(netstat -ibn 2>/dev/null) || return 1; printf \'%s\\n\' "$net_data" | awk \'$1=="Name" {columns=NF; for(i=1;i<=NF;i++) {if($i=="Ibytes") ri=i; if($i=="Obytes") ti=i} next} $3 ~ /^<Link#[0-9]+>/ && $1 !~ /\\*$/ && $1!="lo0" && $1 ~ /^[[:alnum:]_.:-]+$/ {r=NF-columns+ri; t=NF-columns+ti; if(ri && ti && r>3 && t>3 && $r ~ /^[0-9]+$/ && $t ~ /^[0-9]+$/ && !seen[$1]++) {print $1,$r,$t; count++}} END {if(!count) exit 1}\'; else awk \'NR>2 { sub(/^[[:space:]]+/, ""); split($0,a,/[[:space:]:]+/); if(a[1]!="lo" && a[1] ~ /^[[:alnum:]_.:-]+$/ && a[2] ~ /^[0-9]+$/ && a[10] ~ /^[0-9]+$/) { print a[1],a[2],a[10]; count++ } } END {if(!count) exit 1}\' /proc/net/dev; fi; };\ntabby_net_interfaces() {\n if [ "$net_os" = Darwin ]; then\n net_candidates=$({ route -n get default 2>/dev/null; route -n get -inet6 default 2>/dev/null; } | awk \'$1=="interface:" {print $2}\');\n else\n net_candidates=$({ awk \'NR>1 && $2=="00000000" && $8=="00000000" && $4 ~ /[13579bBdDfF]$/ {print $1}\' /proc/net/route 2>/dev/null; awk \'$1=="00000000000000000000000000000000" && $2=="00" && $9 ~ /[13579bBdDfF]$/ {print $10}\' /proc/net/ipv6_route 2>/dev/null; });\n fi;\n net_candidates=$(printf \'%s\\n\' "$net_candidates" | awk -v rows="$1" \'BEGIN {n=split(rows,a,"\\n"); for(i=1;i<=n;i++) {split(a[i],b," "); available[b[1]]=1}} available[$1] && !seen[$1]++ {printf "%s%s",sep,$1; sep=" "}\');\n if [ -n "$net_candidates" ]; then printf \'%s\\n\' "$net_candidates"; return 0; fi;\n printf \'%s\\n\' "$1" | while read -r net_iface net_rx net_tx; do\n if [ "$net_os" != Darwin ]; then\n [ -e "/sys/class/net/$net_iface/master" ] && continue;\n if [ -r "/sys/class/net/$net_iface/operstate" ]; then read -r net_state < "/sys/class/net/$net_iface/operstate"; case "$net_state" in up|unknown) ;; *) continue;; esac; fi;\n fi;\n printf \'%s\\n\' "$net_iface";\n done | awk \'!seen[$1]++ {printf "%s%s",sep,$1; sep=" "}\';\n};\ntabby_net_snapshot() {\n net_rows=$(tabby_net_rows) || return 1;\n printf \'%s\\n\' "$net_rows" | awk -v interfaces="$net_interfaces" \'BEGIN {n=split(interfaces,a," "); for(i=1;i<=n;i++) selected[a[i]]=1} $1 in selected {print; seen[$1]=1} END {for(name in selected) if(!seen[name]) exit 1}\';\n};\nnet_rows=$(tabby_net_rows) || exit 1;\nnet_interfaces=$(tabby_net_interfaces "$net_rows") || exit 1;\n[ -n "$net_interfaces" ] || exit 1;';function bg(t){return`${fg}\ntabby_net_clock() { if [ "$net_os" = Darwin ]; then if command -v perl >/dev/null 2>&1; then perl -MTime::HiRes=time -e 'printf "%.6f\\n", time' 2>/dev/null || date +%s; else date +%s; fi; else awk 'NR==1 {print $1; found=1; exit} END {if(!found) exit 1}' /proc/uptime; fi; };\na=$(tabby_net_snapshot) || exit 1; ta=$(tabby_net_clock) || exit 1; sleep 1;\nb=$(tabby_net_snapshot) || exit 1; tb=$(tabby_net_clock) || exit 1;\nprintf '%s\\n--TABBY-NET-NEXT--\\n%s\\n' "$a" "$b" | awk -v start="$ta" -v finish="$tb" 'BEGIN {if(start !~ /^[0-9]+([.][0-9]+)?$/ || finish !~ /^[0-9]+([.][0-9]+)?$/ || finish<=start) {bad=1; exit 1}} $0=="--TABBY-NET-NEXT--" {second=1; next} !second {rx[$1]=$2; tx[$1]=$3; next} {if(!($1 in rx)) {bad=1; next} dr=$2-rx[$1]; dt=$3-tx[$1]; if(dr<0) dr=0; if(dt<0) dt=0; bytes+=${"rx"===t?"dr":"tx"===t?"dt":"dr+dt"}; count++} END {if(bad || !count) exit 1; rate=bytes/1024/(finish-start); if(rate>=1) printf "%.2f\\n",rate; else if(rate>0) printf "%.6f\\n",rate; else print "0"}'`}function vg(t){return`${fg}\ndata=$(tabby_net_snapshot) || exit 1; printf '%s\\n' "$data" | awk -v interfaces="$net_interfaces" '{bytes+=${"rx"===t?"$2":"tx"===t?"$3":"$2+$3"}; count++} END {if(!count) exit 1; gsub(/ /,",",interfaces); printf "${"rx"===t?"Received":"tx"===t?"Sent":"Combined"} total: %.3f GiB (since interface reset; %s)\\n",bytes/1073741824,interfaces}'`}function yg(t,e={}){var n,i;const s=function(){const t={type:"progress",maxValue:100,suffix:"%",color:Bm.green,colorRules:hg,checkMode:"exitCode",checkExpected:"0",unavailableText:"Unavailable"},e=(t,e,n,i)=>({id:t,label:e,type:"text",icon:i,color:Bm.green,suffix:" KiB/s",command:bg(n),checkCommand:mg("test -r /proc/net/dev && test -r /proc/uptime","command -v netstat >/dev/null && command -v route >/dev/null && command -v date >/dev/null"),checkMode:"exitCode",checkExpected:"0",unavailableText:"Unavailable",detailCommand:vg(n)}),n={cpu:Object.assign(Object.assign({},t),{id:"builtin-cpu",label:"CPU",icon:"stats-cpu",command:mg(gg(),'cores=$(sysctl -n hw.logicalcpu 2>/dev/null) || exit 1; data=$(ps -A -o %cpu= 2>/dev/null) || exit 1; printf \'%s\\n\' "$data" | awk -v cores="$cores" \'{sum+=$1} END {if(cores<=0) exit 1; usage=sum/cores; if(usage>100) usage=100; printf "%.1f\\n",usage}\''),checkCommand:mg("test -r /proc/stat","command -v ps >/dev/null && command -v sysctl >/dev/null"),detailCommand:mg("awk '{printf \"load %.2f / %.2f / %.2f\\n\",$1,$2,$3}' /proc/loadavg","sysctl -n vm.loadavg")}),ram:Object.assign(Object.assign({},t),{id:"builtin-ram",label:"Memory",icon:"stats-memory",colorRules:[{operator:">",value:String(80),color:Bm.red},{operator:">",value:String(60),color:Bm.orange}],checkCommand:mg("test -r /proc/meminfo","command -v vm_stat >/dev/null && command -v sysctl >/dev/null"),command:mg("awk '/^MemTotal:/ {t=$2} /^MemAvailable:/ {a=$2; found=1} /^MemFree:/ {f=$2} /^Buffers:/ {b=$2} /^Cached:/ {c=$2} END {if(t<=0) exit 1; if(!found) a=f+b+c; printf \"%.1f\\n\",(t-a)*100/t}' /proc/meminfo",ug(!1)),detailCommand:mg("awk '/^MemTotal:/ {t=$2} /^MemAvailable:/ {a=$2; found=1} /^MemFree:/ {f=$2} /^Buffers:/ {b=$2} /^Cached:/ {c=$2} END {if(t<=0) exit 1; if(!found) a=f+b+c; printf \"%.1f/%.1f GiB available\\n\",a/1048576,t/1048576}' /proc/meminfo",ug(!0))}),disk:Object.assign(Object.assign({},t),{id:"builtin-disk",label:"Disk",icon:"stats-system-disk",checkCommand:"df -Pk / >/dev/null 2>&1",command:"data=$(df -Pk / 2>/dev/null) || exit 1; printf '%s\\n' \"$data\" | awk 'NR==2 {gsub(/%/,\"\",$5); print $5; found=1} END {if(!found) exit 1}'",detailCommand:"data=$(df -Pk / 2>/dev/null) || exit 1; printf '%s\\n' \"$data\" | awk 'NR==2 {printf \"%.1f/%.1f GiB available\\n\",$4/1048576,$2/1048576; found=1} END {if(!found) exit 1}'"}),net:{id:"builtin-net",label:"Network",mode:"static",layout:"vertical",main:Object.assign(Object.assign({},e("builtin-net-main","Network","total","stats-network")),{enabled:!1}),children:[e("builtin-net-rx","Download","rx","stats-network-download"),e("builtin-net-tx","Upload","tx","stats-network-upload")]}};return pg(n)}(),a=null===(n=e.defaultMetricOverrides)||void 0===n?void 0:n[t];if("net"===t){const t=a,e=s.net;return pg(Object.assign(Object.assign(Object.assign({},e),t),{id:e.id,main:Object.assign(Object.assign(Object.assign({},e.main),null==t?void 0:t.main),{id:e.main.id}),children:null!==(i=null==t?void 0:t.children)&&void 0!==i?i:e.children}))}return pg(Object.assign(Object.assign(Object.assign({},s[t]),a),{id:s[t].id}))}const xg=require("child_process");var _g;const wg=zm.join(Hm.tmpdir(),"tabby-server-stats.log");let kg=0;function Dg(t){if(!Ig.isDebugEnabled)return;const e=`[${(new Date).toISOString()}] ${t}\n`;try{if(kg++,kg%100==0)try{jm.statSync(wg).size>2097152&&jm.writeFileSync(wg,`[${(new Date).toISOString()}] [log rotated]\n`)}catch(t){}jm.appendFileSync(wg,e)}catch(t){}console.log(`[ServerStats] ${t}`)}let Ig=_g=class{constructor(t,e=null){this.config=t,this.scopes=e,this.serverCaches=new Map,this.fetchTasks=new Map,this.detailTasks=new Map,this.sessionKeys=new WeakMap,this.nextSessionId=0,this.revision=0,this.statsUpdated$=new k.Subject,this.updateDebugState(),this.config.changed$.subscribe(()=>{this.updateDebugState(),this.revision++,this.serverCaches.clear(),this.fetchTasks.clear(),this.detailTasks.clear()}),this.config.ready$.subscribe(()=>this.updateDebugState())}updateDebugState(){var t,e,n,i;_g.isDebugEnabled=Boolean(null===(i=null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.debugLogging)}getServerKey(t){if(!t||"object"!=typeof t)return"default";let e=this.sessionKeys.get(t);return e||(e="session:"+ ++this.nextSessionId,this.sessionKeys.set(t,e)),e}scopeContext(t){var e,n;return(null===(e=this.scopes)||void 0===e?void 0:e.contextForSession(t))||{profileIds:(null===(n=null==t?void 0:t.profile)||void 0===n?void 0:n.id)?[t.profile.id]:[]}}getVisibleConfig(t){var e,n,i,s,a;const o=(null===(i=null===(n=null===(e=this.config)||void 0===e?void 0:e.store)||void 0===n?void 0:n.plugin)||void 0===i?void 0:i.serverStats)||{},r=function(t={}){const e=t.defaultMetrics||{cpu:!0,ram:!0,disk:!0,net:!0},n=dg(t.builtinOrder).filter(t=>"net"!==t&&!!e[t]).map(e=>yg(e,t)),i=e.net?[yg("net",t)]:[];return!1===t.showDefaultIcons&&(n.forEach(t=>{t.icon=""}),i.forEach(t=>{t.main.icon="",t.children.forEach(t=>{t.icon=""})})),{customMetrics:n,metricGroups:i}}(o);return l={customMetrics:[...r.customMetrics,...o.customMetrics||[]],metricGroups:[...r.metricGroups,...o.metricGroups||[]]},c=this.scopeContext(t),d=(null===(a=null===(s=this.config)||void 0===s?void 0:s.store)||void 0===a?void 0:a.profiles)||[],{customMetrics:(l.customMetrics||[]).filter(t=>!1!==t.enabled&&og(t.displayScope,c,d)),metricGroups:(l.metricGroups||[]).filter(t=>!1!==t.enabled&&og(t.displayScope,c,d))};var l,c,d}scopeSignature(t){const e=this.scopeContext(t),n=this.getVisibleConfig(t);return JSON.stringify([[...new Set(e.profileIds)].sort(),eg(n).map(t=>t.id).sort()])}discardSessionCache(t){this.serverCaches.delete(t),this.fetchTasks.delete(t);for(const e of this.detailTasks.keys())e.startsWith(`${t}:`)&&this.detailTasks.delete(e)}getSessionCache(t){const e=this.getServerKey(t),n=this.scopeSignature(t);let i=this.serverCaches.get(e);return i&&i.scopeSignature!==n&&(this.discardSessionCache(e),i=void 0),i||(i={scopeSignature:n,metricStates:new Map},this.serverCaches.set(e,i)),i}snapshot(t,e){const n=eg(this.getVisibleConfig(e)),i=new Set(n.map(t=>t.id)),s=e=>{const n=i.has(e)?t.metricStates.get(e):void 0,s="ok"===(null==n?void 0:n.status)?Number.parseFloat(n.value):0;return Number.isFinite(s)?s:0};return{cpu:s("builtin-cpu"),mem:s("builtin-ram"),disk:s("builtin-disk"),netRx:1024*s("builtin-net-rx"),netTx:1024*s("builtin-net-tx"),custom:n.map(e=>{var n,i;const s=t.metricStates.get(e.id);return{id:e.id,value:null!==(n=null==s?void 0:s.value)&&void 0!==n?n:"-",status:null!==(i=null==s?void 0:s.status)&&void 0!==i?i:"pending"}})}}getCachedStats(t){if(!t||!1===t.open)return null;const e=this.getServerKey(t),n=this.serverCaches.get(e);return n&&n.scopeSignature!==this.scopeSignature(t)?(this.discardSessionCache(e),null):n?this.snapshot(n,t):null}getState(t,e){let n=t.metricStates.get(e.id);return n||(n={lastAttempt:0,lastSuccess:0,value:"-",status:"pending",isFetching:!1,detail:"",detailAt:0},t.metricStates.set(e.id,n)),n}isCurrent(t,e,n){return!1!==t.open&&this.revision===n&&this.serverCaches.get(this.getServerKey(t))===e&&e.scopeSignature===this.scopeSignature(t)}publish(t,e,n){this.isCurrent(t,e,n)&&this.statsUpdated$.next({serverKey:this.getServerKey(t),stats:this.snapshot(e,t)})}isPlatformSupport(t){var e;if(!t||!1===t.open)return!1;const n=null===(e=t.ssh)||void 0===e?void 0:e.ssh;return Boolean(n&&"function"==typeof n.openSessionChannel)||"linux"===process.platform||"darwin"===process.platform||Boolean(this.getLocalShell())}getLocalShell(){return"win32"!==process.platform?null:[process.env.MSYS2_SH,...(process.env.PATH||"").split(zm.delimiter).map(t=>zm.join(t,"sh.exe")),"C:\\msys64\\usr\\bin\\sh.exe","C:\\msys32\\usr\\bin\\sh.exe"].find(t=>Boolean(t&&jm.existsSync(t)))||null}async execute(t,e,n,i){var s;if(!this.isPlatformSupport(t))throw new Error("Session unavailable");Dg(`[execute] ${this.getServerKey(t)}, timeout=${n}ms, length=${e.length}`);const a=null===(s=t.ssh)||void 0===s?void 0:s.ssh;return a&&"function"==typeof a.openSessionChannel?this.exec(a,e,n,i):this.execLocal(e,n,this.getLocalShell())}async fetchStats(t){if(!this.isPlatformSupport(t))return null;this.getSessionCache(t);const e=this.getServerKey(t),n=this.fetchTasks.get(e);if(n)return n;const i=this.collectStats(t);this.fetchTasks.set(e,i);try{return await i}finally{this.fetchTasks.get(e)===i&&this.fetchTasks.delete(e)}}async collectStats(t){var e,n,i;const s=this.getSessionCache(t),a=this.revision,o=Date.now(),r=(null===(i=null===(n=null===(e=this.config)||void 0===e?void 0:e.store)||void 0===n?void 0:n.plugin)||void 0===i?void 0:i.serverStats)||{},l=Number.isFinite(r.defaultInterval)&&r.defaultInterval>0?r.defaultInterval:3,c=eg(this.getVisibleConfig(t)).filter(e=>{const n=this.getState(s,e),i=Number.isFinite(e.interval)&&e.interval>0?e.interval:l;return!n.isFetching&&!this.detailTasks.has(`${this.getServerKey(t)}:${e.id}`)&&(0===n.lastAttempt||o-n.lastAttempt>=1e3*Math.max(1,i))});if(!c.length)return this.snapshot(s,t);Dg(`[collect] ${this.getServerKey(t)}, metrics=${c.length}`);const d=new Map(c.map((t,e)=>[`m_${e}`,t])),p=new Set;c.forEach(t=>{const e=this.getState(s,t);e.isFetching=!0,e.lastAttempt=o});const h=e=>{var n;if(!this.isCurrent(t,s,a))return;let i=!1;for(const t of ag(e)){const e=d.get(t.token);if(!e||p.has(t.token))continue;p.add(t.token);const a=this.getState(s,e);a.isFetching=!1,a.status=t.status,a.value="unavailable"===t.status?null!==(n=e.unavailableText)&&void 0!==n?n:"Unavailable":t.value,Dg(`[metric] ${e.id}: ${t.status}`),"ok"===t.status?a.lastSuccess=Date.now():(a.detail="",a.detailAt=0),i=!0}i&&this.publish(t,s,a)},u=['export LC_ALL=C PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH"'];d.forEach((t,e)=>u.push(sg(t,e))),u.push("wait","echo TABBY-STATS-END");try{const e=1e3*Math.max(15,...c.map(t=>2*ng(t)+5));h(await this.execute(t,u.join("\n")+"\n",e,h)),this.isCurrent(t,s,a)&&d.forEach((t,e)=>{if(!p.has(e)){const e=this.getState(s,t);e.status="error",e.value="Err: No result",e.detail="",e.detailAt=0}})}catch(e){Dg(`[collect:error] ${(null==e?void 0:e.message)||e}`),this.isCurrent(t,s,a)&&d.forEach((t,n)=>{if(!p.has(n)){const n=this.getState(s,t);n.status="error",n.value=this.executionErrorValue(e),n.detail="",n.detailAt=0}})}finally{c.forEach(t=>{this.getState(s,t).isFetching=!1}),this.publish(t,s,a)}return this.isCurrent(t,s,a)?this.snapshot(s,t):null}async fetchDetails(t,e){if(!this.isPlatformSupport(t))return{};const n=this.getServerKey(t),i=this.revision,s=this.getSessionCache(t),a=this.fetchTasks.get(n),o=new Map(eg(this.getVisibleConfig(t)).map(t=>[t.id,t])),r=e.some(t=>{var e;const n=o.get(t.id);if(!(null===(e=null==n?void 0:n.detailCommand)||void 0===e?void 0:e.trim()))return!1;const i=s.metricStates.get(n.id);return!i||i.isFetching||"pending"===i.status});if(a&&r&&await a,!this.isCurrent(t,s,i))return{};const l={};return await Promise.all(e.map(async e=>{var a,r,c,d,p;const h=o.get(e.id);if(!(null===(a=null==h?void 0:h.detailCommand)||void 0===a?void 0:a.trim()))return;const u=this.getState(s,h);if("unavailable"===u.status||"error"===u.status)return void(l[h.id]="");const m=null===(p=null===(d=null===(c=null===(r=this.config)||void 0===r?void 0:r.store)||void 0===c?void 0:c.plugin)||void 0===d?void 0:d.serverStats)||void 0===p?void 0:p.defaultInterval,g=Number.isFinite(m)&&m>0?m:3,f=Number.isFinite(h.interval)&&h.interval>0?h.interval:g;if(u.detailAt&&Date.now()-u.detailAt<1e3*Math.max(1,f))return void(l[h.id]=u.detail);const b=`${n}:${h.id}`;let v=this.detailTasks.get(b);v||(v=this.collectDetail(t,h,s,i),this.detailTasks.set(b,v));try{l[h.id]=await v}finally{this.detailTasks.get(b)===v&&this.detailTasks.delete(b)}})),this.isCurrent(t,s,i)?l:{}}async collectDetail(t,e,n,i){var s,a;const o=this.getState(n,e);try{const r=['export LC_ALL=C PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH"',sg(e,"detail","detail"),"wait","echo TABBY-STATS-END",""].join("\n"),l=await this.execute(t,r,1e3*(2*ng(e)+5));if(!this.isCurrent(t,n,i))return"";const c=ag(l).find(t=>"detail"===t.token);return"unavailable"===(null==c?void 0:c.status)?(o.status="unavailable",o.value=null!==(s=e.unavailableText)&&void 0!==s?s:"Unavailable",o.detail="",o.detailAt=0,this.publish(t,n,i),""):(o.detail=null!==(a=null==c?void 0:c.value)&&void 0!==a?a:"Err: No result",c&&"error"!==c.status||Dg(`[detail:error] ${e.id}: ${o.detail}; stdout=${l.length} bytes`),o.detailAt=Date.now(),o.detail)}catch(s){return this.isCurrent(t,n,i)?(o.detail=this.executionErrorValue(s),o.detailAt=Date.now(),Dg(`[detail:error] ${e.id}: ${o.detail}`),o.detail):""}}executionErrorValue(t){const e=String((null==t?void 0:t.message)||t);if(e.includes("Timeout"))return"Err: Timeout";const n=e.match(/^Stats: (No output|Incomplete output|No result|Remote error(?:: [\s\S]*)?)$/);return n?`Err: ${n[1]}`:"Err: Connection"}execLocal(t,e=45e3,n){return new Promise((i,s)=>{(0,xg.exec)(t,Object.assign({timeout:e},n?{shell:n}:{}),(t,e)=>{t?s(new Error(t.killed?"Stats: Timeout":t.message)):i(e)})})}exec(t,e,n=45e3,i){const s=e.includes("TABBY-STATS-END"),a=`\n# TABBY-STATS-ACK-WAIT\nif command -v timeout >/dev/null 2>&1 && timeout -k 1 1 /bin/sh -c ':' >/dev/null 2>&1; then\n timeout -k 1 5 /bin/sh -c 'IFS= read -r _tabby_ack' || :\nelif command -v gtimeout >/dev/null 2>&1 && gtimeout -k 1 1 /bin/sh -c ':' >/dev/null 2>&1; then\n gtimeout -k 1 5 /bin/sh -c 'IFS= read -r _tabby_ack' || :\nelse\n /bin/sh -c ${ig('\n_tabby_reader=$$\n(\n trap \'kill "$_tabby_sleep" 2>/dev/null; exit 0\' TERM\n sleep 5 & _tabby_sleep=$!\n wait "$_tabby_sleep"\n kill -TERM "$_tabby_reader" 2>/dev/null\n) </dev/null >/dev/null 2>&1 &\n_tabby_watchdog=$!\ntrap \'kill "$_tabby_watchdog" 2>/dev/null; exit 0\' TERM\nIFS= read -r _tabby_ack\nkill "$_tabby_watchdog" 2>/dev/null\nwait "$_tabby_watchdog" 2>/dev/null\nexit 0\n')}\nfi\n`,o="/bin/sh -s",r=Buffer.from(`{\n${e}\n${s?a:""}\nexit\n}\n`,"utf8");return new Promise((a,l)=>{let c,d,p=null,h=!1,u="",m="",g=!1,f=!1,b=!1,v=!1;const y=[],x=new TextDecoder("utf-8"),_=new TextDecoder("utf-8"),w=t=>{if(h)return;h=!0,clearTimeout(k),clearTimeout(c),clearTimeout(d),u+=x.decode(),m+=_.decode();const n=e.includes("TABBY-METRIC-RESULT:")||e.includes("TABBY-STATS-START"),i=ag(u).length>0||/(?:^|\n)TABBY-STATS-START[^\r\n]*\r?\n/.test(u);if(!t&&n&&!i){const e=m.replace(/[\x00-\x1f\x7f]+/g," ").trim().slice(0,500),n=e?`Remote error: ${e}`:u.trim()?u.includes("TABBY-METRIC-RESULT:")?"Incomplete output":"No result":"No output";t=new Error(`Stats: ${n}`)}for(const t of y)try{t.unsubscribe()}catch(t){}try{Promise.resolve(null==p?void 0:p.close()).catch(()=>{})}catch(t){}t?l(t):a(u)},k=setTimeout(()=>w(new Error("Stats: Timeout")),n),D=()=>{if(!h&&!f)if(s){if(v||(v=!0,clearTimeout(k),clearTimeout(c),d=setTimeout(()=>w(),1e3)),b){f=!0;try{const t=p.write(Buffer.from("TABBY-STATS-ACK\n"));Promise.resolve(t).then(()=>w(),()=>w())}catch(t){w()}}}else w()},I=()=>{g=!0,clearTimeout(c),c=setTimeout(()=>w(),100)},C=(t,e)=>{const n=t.subscribe(e);h?n.unsubscribe():y.push(n)};(async()=>{const e=await t.openSessionChannel();if(h)try{null==e||e.close()}catch(t){}else if(p=await t.activateChannel(e),h)try{null==p||p.close()}catch(t){}else{if(!p.data$)throw new Error("Channel has no data observable");if(C(p.data$,{next:t=>{h||("string"==typeof t?u+=t:Buffer.isBuffer(t)||t instanceof ArrayBuffer||ArrayBuffer.isView(t)?u+=x.decode(t,{stream:!0}):u+=String(t),null==i||i(u),/(?:^|\n)TABBY-STATS-END\r?\n/.test(u)?D():g&&I())},error:t=>w(t),complete:I}),!h&&(p.closed$&&C(p.closed$,I),p.extendedData$&&C(p.extendedData$,{next:t=>{const e=Array.isArray(t)?t[1]:t;"string"==typeof e?m+=e:(Buffer.isBuffer(e)||e instanceof ArrayBuffer||ArrayBuffer.isView(e))&&(m+=_.decode(e,{stream:!0})),m=m.slice(-2048),g&&I()},error:t=>w(t)}),!h)){if("function"!=typeof p.write)throw new Error("SSH channel does not support stdin upload");if("function"==typeof p.requestExec)await p.requestExec(o);else{if("function"!=typeof p.exec)throw new Error("Channel has no exec method");await p.exec(o)}for(let t=0;t<r.length;t+=8192){if(h||g)return;await p.write(r.subarray(t,t+8192))}h||(b=!0,v?D():s||"function"!=typeof p.eof||await p.eof())}}})().catch(t=>w(t))})}};var Cg;Ig.isDebugEnabled=!1,Ig=_g=b([(0,y.Injectable)({providedIn:"root"}),v("design:paramtypes",[Ia.ConfigService,lg])],Ig);let Mg=class extends Ia.ToolbarButtonProvider{constructor(t,e){super(),this.config=t,this.translate=e}provide(){return[{icon:g(943),title:this.translate.instant("Show Server Stats"),click:()=>{var t;if(!(null===(t=this.config)||void 0===t?void 0:t.store))return;this.config.store.plugin||(this.config.store.plugin={}),this.config.store.plugin.serverStats||(this.config.store.plugin.serverStats={});const e=this.config.store.plugin.serverStats.enabled;this.config.store.plugin.serverStats.enabled=!e,this.config.save();const n=window.serverStatsFloating,i=window.serverStatsBottomBar;n&&n.forceUpdate(),i&&i.forceUpdate()}}]}};Mg=b([(0,y.Injectable)(),v("design:paramtypes",[Ia.ConfigService,"function"==typeof(Cg=void 0!==Ia.TranslateService&&Ia.TranslateService)?Cg:Object])],Mg);var Sg=g(165);let $g=class{constructor(t,e,n,i,s,a){this.statsService=t,this.config=e,this.app=n,this.cdr=i,this.zone=s,this.sanitizer=a,this.visible=!1,this.currentStats={cpu:0,mem:0,disk:0,netRx:0,netTx:0,custom:[]},this.customMetrics=[],this.metricGroups=[],this.builtinOrder=[],this.isDragging=!1,this.dragOffset={x:0,y:0},this.dragDimensions={width:0,height:0},this.pos={x:null,y:null},this.styleConfig={background:"rgba(20, 20, 20, 0.90)",size:100,layout:"vertical"},this.timerId=null,this.tabSubscription=null,this.destroyed=!1,this.displaySession=null,this.viewRevision=0,this.subscriptions=[],this.hoveredCustom=null,window.serverStatsFloating=this}ngOnInit(){this.loadConfig(),this.subscriptions.push(this.config.ready$.subscribe(()=>{this.loadConfig(),setTimeout(()=>this.checkAndFetch(),100)})),this.subscriptions.push(this.config.changed$.subscribe(()=>this.loadConfig())),this.subscriptions.push(this.statsService.statsUpdated$.subscribe(t=>{if(this.destroyed)return;const e=this.activeSession();this.synchronizeSession(e),this.canDisplay(e)?this.statsService.getServerKey(e)===t.serverKey?(this.visible=!0,this.updateCharts(t.stats),this.cdr.detectChanges()):this.cdr.detectChanges():this.hide()})),this.app.activeTabChange&&(this.tabSubscription=this.app.activeTabChange.subscribe(()=>{this.checkAndFetch()})),setTimeout(()=>this.checkAndFetch(),100),this.zone.runOutsideAngular(()=>{this.timerId=window.setInterval(()=>{this.zone.run(()=>{this.checkAndFetch()})},1e3)})}loadConfig(){var t,e,n;if(this.destroyed)return;this.viewRevision++;const i=(null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||{};i.location?this.pos={x:i.location.x,y:i.location.y}:this.pos={x:null,y:null},i.style&&(this.styleConfig=Object.assign(Object.assign({},this.styleConfig),i.style)),this.applyMetricScope(this.activeSession()),this.canDisplay(this.activeSession())||this.hide(),setTimeout(()=>this.adjustPositionToViewport(),100),this.cdr.detectChanges()}startDrag(t){if(0!==t.button)return;this.isDragging=!0;const e=t.currentTarget.getBoundingClientRect();this.dragDimensions.width=e.width,this.dragDimensions.height=e.height,this.dragOffset.x=t.clientX-e.left,this.dragOffset.y=t.clientY-e.top,t.preventDefault()}onMouseMove(t){if(!this.isDragging)return;let e=t.clientX-this.dragOffset.x,n=t.clientY-this.dragOffset.y;const i=window.innerWidth-this.dragDimensions.width,s=window.innerHeight-this.dragDimensions.height;this.pos.x=Math.min(Math.max(0,e),i),this.pos.y=Math.min(Math.max(0,n),s)}onMouseUp(){this.isDragging&&(this.isDragging=!1,this.adjustPositionToViewport(),this.config.store.plugin.serverStats||(this.config.store.plugin.serverStats={}),this.config.store.plugin.serverStats.location||(this.config.store.plugin.serverStats.location={}),this.config.store.plugin.serverStats.location.x=this.pos.x,this.config.store.plugin.serverStats.location.y=this.pos.y,this.config.save())}adjustPositionToViewport(){var t;if(this.destroyed)return;if(null===this.pos.x||null===this.pos.y)return;const e=(null===(t=this.panel)||void 0===t?void 0:t.nativeElement.getBoundingClientRect())||{width:240,height:100},n=10,i=Math.max(n,window.innerWidth-e.width-n),s=Math.max(n,window.innerHeight-e.height-n);let a=this.pos.x,o=this.pos.y;a<n&&(a=n),a>i&&(a=i),o<n&&(o=n),o>s&&(o=s),a===this.pos.x&&o===this.pos.y||(this.pos.x=a,this.pos.y=o,this.cdr.detectChanges())}onWindowResize(){this.adjustPositionToViewport()}forceUpdate(){this.checkAndFetch()}async checkAndFetch(){var t,e,n,i,s,a,o,r;if(this.destroyed)return;const l=this.activeSession();this.synchronizeSession(l);const c=null===(i=null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.enabled;if("floatingPanel"!==((null===(r=null===(o=null===(a=null===(s=this.config)||void 0===s?void 0:s.store)||void 0===a?void 0:a.plugin)||void 0===o?void 0:o.serverStats)||void 0===r?void 0:r.displayMode)||"bottomBar"))return void this.hide();let d=this.app.activeTab;if(!c||!d)return void this.hide();if(d.focusedTab&&(d=d.focusedTab),!1===d.frontendIsReady||!d.frontend)return void this.hide();this.cdr.detectChanges();const p=this.viewRevision;if(l&&!1!==l.open&&this.statsService.isPlatformSupport(l))try{const t=await this.statsService.fetchStats(l);if(!this.isCurrentRequest(l,p))return;if(t)return this.visible=!0,this.updateCharts(t),void this.cdr.detectChanges()}catch(t){}this.isCurrentRequest(l,p)&&this.hide()}activeSession(){let t=this.app.activeTab;return(null==t?void 0:t.focusedTab)&&(t=t.focusedTab),(null==t?void 0:t.session)||null}get metricSession(){return this.displaySession}canDisplay(t){var e,n,i;const s=null===(i=null===(n=null===(e=this.config)||void 0===e?void 0:e.store)||void 0===n?void 0:n.plugin)||void 0===i?void 0:i.serverStats;let a=this.app.activeTab;return(null==a?void 0:a.focusedTab)&&(a=a.focusedTab),!(this.destroyed||!(null==s?void 0:s.enabled)||"floatingPanel"!==s.displayMode||!t||!1===t.open||(null==a?void 0:a.session)!==t||!1===a.frontendIsReady||!a.frontend)}synchronizeSession(t){if(this.applyMetricScope(t),this.displaySession===t)return;this.viewRevision++,this.displaySession=t,this.hoveredCustom=null,this.visible=!1;const e=!1!==(null==t?void 0:t.open)&&t?this.statsService.getCachedStats(t):null;this.updateCharts(e||{cpu:0,mem:0,disk:0,netRx:0,netTx:0,custom:[]}),this.visible=!!e&&this.canDisplay(t)}applyMetricScope(t){var e,n,i,s,a;const o=(null===(i=null===(n=null===(e=this.config)||void 0===e?void 0:e.store)||void 0===n?void 0:n.plugin)||void 0===i?void 0:i.serverStats)||{},r=(null===(a=(s=this.statsService).getVisibleConfig)||void 0===a?void 0:a.call(s,t))||o;this.builtinOrder=o.builtinOrder||[];const l=r.customMetrics||[],c=this.customMetrics.map(t=>t.id).join("|")!==l.map(t=>t.id).join("|");this.customMetrics=l,this.metricGroups=r.metricGroups||[],c&&(this.hoveredCustom=null)}isCurrentRequest(t,e){return this.viewRevision===e&&this.displaySession===t&&this.canDisplay(t)}hide(){this.destroyed||(this.viewRevision++,this.synchronizeSession(null),this.visible=!1,this.hoveredCustom=null,this.cdr.detectChanges())}updateCharts(t){this.currentStats=t}ngOnDestroy(){this.destroyed=!0,this.viewRevision++,this.displaySession=null,this.hoveredCustom=null,this.visible=!1,this.timerId&&clearInterval(this.timerId),this.tabSubscription&&this.tabSubscription.unsubscribe(),this.subscriptions.forEach(t=>t.unsubscribe())}};b([(0,y.ViewChild)("panel"),v("design:type",y.ElementRef)],$g.prototype,"panel",void 0),b([(0,y.HostListener)("document:mousemove",["$event"]),v("design:type",Function),v("design:paramtypes",[MouseEvent]),v("design:returntype",void 0)],$g.prototype,"onMouseMove",null),b([(0,y.HostListener)("document:mouseup"),v("design:type",Function),v("design:paramtypes",[]),v("design:returntype",void 0)],$g.prototype,"onMouseUp",null),b([(0,y.HostListener)("window:resize"),v("design:type",Function),v("design:paramtypes",[]),v("design:returntype",void 0)],$g.prototype,"onWindowResize",null),$g=b([(0,y.Component)({selector:"server-stats-floating-panel",template:'\n <div #panel class="stats-container"\n *ngIf="visible"\n (mousedown)="startDrag($event)"\n [style.top.px]="pos.y" \n [style.left.px]="pos.x" \n [style.background]="styleConfig.background"\n [style.flex-direction]="styleConfig.layout === \'vertical\' ? \'column\' : \'row\'">\n \n <server-stats-metric-strip [metrics]="customMetrics" [groups]="metricGroups"\n [builtinOrder]="builtinOrder"\n [stats]="currentStats" [session]="metricSession"\n [style.flex-direction]="styleConfig.layout === \'vertical\' ? \'column\' : \'row\'"\n (mousedown)="$event.stopPropagation()"></server-stats-metric-strip>\n </div>\n ',styles:["\n :host { display: block; position: absolute; z-index: 99999; }\n .stats-container {\n position: fixed;\n top: 100px; \n right: 20px; \n z-index: 10000; \n backdrop-filter: blur(12px);\n padding: 10px 14px;\n display: flex; \n gap: 15px;\n border-radius: 8px;\n border: 1px solid rgba(255,255,255,0.2);\n box-shadow: 0 10px 30px rgba(0,0,0,0.5);\n min-width: 100px;\n max-width: calc(100vw - 20px);\n box-sizing: border-box;\n color: white;\n cursor: move;\n user-select: none;\n }\n "]}),v("design:paramtypes",[Ig,Ia.ConfigService,Ia.AppService,y.ChangeDetectorRef,y.NgZone,Sg.DomSanitizer])],$g);const Tg=/^[+-]?(?:(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?|\.\d+)(?:[eE][+-]?\d+)?$/,Og=new Intl.NumberFormat("en-US",{minimumFractionDigits:3,maximumFractionDigits:3,useGrouping:!0});function Eg(t){return Tg.test(t.trim())&&Number.isFinite(Number(t.replace(/,/g,"")))}function Rg(t){return(null==t?void 0:t.status)||(t&&"-"!==t.value?t.value.startsWith("Err:")?"error":"ok":"pending")}function Pg(t,e){return!!t&&!1!==t.enabled&&(!1!==t.visibleWhenUnavailable||"unavailable"!==Rg(e.find(e=>e.id===t.id)))}function Ng(t,e){return!1===t.enabled?[]:(t.children||[]).filter(t=>Pg(t,e)&&(!1!==t.showWhenUnavailable||"unavailable"!==Rg(e.find(e=>e.id===t.id))))}function Fg(t,e,n){const i=new Set(Ng(t,e).map(t=>t.id)),s=t.children||[],a=s.findIndex(t=>t.id===n);for(let t=1;t<=s.length;t++){const e=s[(a+t)%s.length];if(i.has(e.id))return e.id}}let Vg=class{constructor(t,e,n,i){this.service=t,this.cdr=e,this.zone=n,this.sanitizer=i,this.colors=Bm,this.metrics=[],this.groups=[],this.builtinOrder=[],this.stats={custom:[]},this.session=null,this.autoDetailMetric=null,this.portal=null,this.carouselWidths=new Map,this.details={},this.hoveredMetric=null,this.hoveredGroup=null,this.popup={left:8,top:8,width:480,maxHeight:300},this.selections=new Map,this.anchor=null,this.generation=0,this.destroyed=!1,this.detailRequest=!1,this.lastDetailsAt=0,this.configSignature="",this.svgPath=Um,this.isUrl=Zm,this.isFa=Km,this.iconClass=Ym}ngAfterViewChecked(){var t;this.measureCarousels();const e=(null===(t=this.groupPopup)||void 0===t?void 0:t.nativeElement)||null;if(this.portal&&this.portal!==e&&this.portal.remove(),e&&e.parentElement!==document.body&&document.body.appendChild(e),this.portal=e,e&&this.anchor){const t=this.anchor.getBoundingClientRect(),n=e.getBoundingClientRect(),i=t.top>=Math.min(n.height,140),s=i?t.top-14:window.innerHeight-t.bottom-14;e.style.maxHeight=`${Math.max(60,Math.min(380,s))}px`;const a=e.getBoundingClientRect();e.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-a.width-8))}px`,e.style.top=`${i?Math.max(8,t.top-a.height-6):t.bottom+6}px`}}ngOnInit(){this.refreshDetails(),this.zone.runOutsideAngular(()=>{this.timer=setInterval(()=>this.zone.run(()=>{this.destroyed||(this.session&&!1!==this.session.open?(this.updateCarousel(Date.now(),!0),Date.now()-this.lastDetailsAt>=1e3&&this.refreshDetails(),this.cdr.markForCheck()):this.closeHover())}),250)})}ngOnChanges(){const t=JSON.stringify([this.metrics,this.groups,this.builtinOrder]);this.previousSession===this.session&&t===this.configSignature||(this.generation++,this.details={},this.closeHover(),this.selections.clear(),this.carouselWidths.clear(),this.previousSession=this.session,this.configSignature=t),this.updateCarousel(Date.now(),!1)}get results(){var t;return(null===(t=this.stats)||void 0===t?void 0:t.custom)||[]}get visibleMetrics(){return this.metrics.filter(t=>Pg(t,this.results))}get visibleGroups(){return this.groups.filter(t=>this.allMetrics(t).length>0)}get visibleItems(){return function(t,e,n){const i=new Map(dg(n).map((t,e)=>[`builtin-${t}`,e]));return[...t.map(t=>({id:t.id,metric:t})),...e.map(t=>({id:t.id,group:t}))].sort((t,e)=>{var n,s;return(null!==(n=i.get(t.id))&&void 0!==n?n:cg.length)-(null!==(s=i.get(e.id))&&void 0!==s?s:cg.length)})}(this.visibleMetrics,this.visibleGroups,this.builtinOrder)}trackId(t,e){return e.id}allMetrics(t){return function(t,e){return!1===t.enabled?[]:[t.main,...t.children||[]].filter(t=>Pg(t,e))}(t,this.results)}carouselCandidates(t){return Ng(t,this.results)}measureCarousels(){var t;for(const e of(null===(t=this.carouselSlots)||void 0===t?void 0:t.toArray())||[]){const t=e.nativeElement,n=t.getAttribute("data-carousel-group");if(!n)continue;const i=this.groups.find(t=>t.id===n);if(!i)continue;let s=this.carouselWidths.get(n);if(!(null==s?void 0:s.settled)){const e=Array.from(t.querySelectorAll(".carousel-measure")).map(t=>t.getBoundingClientRect().width),a=Math.ceil(Math.max(0,...e));if(!a)continue;s={width:Math.max((null==s?void 0:s.width)||0,a),settled:i.children.filter(t=>!1!==t.enabled).every(t=>"pending"!==this.status(t))},this.carouselWidths.set(n,s)}t.style.setProperty("--carousel-width",`${s.width}px`)}}result(t){return this.results.find(e=>e.id===t.id)||{id:t.id,value:"-",status:"pending"}}status(t){return Rg(this.result(t))}color(t){const e=this.status(t);return"pending"===e?"#8a929e":"error"===e?Bm.red:function(t,e,n=Bm.green){if(!e||0===e.length)return n;const i=null!=t?String(t).trim():"",s=i.match(/-?\d+(?:\.\d+)?/),a=s?parseFloat(s[0]):NaN,o=!isNaN(a)&&isFinite(a);for(const t of e){if(!t||!t.color)continue;const e=void 0!==t.value&&null!==t.value?String(t.value).trim():"",n=e.match(/-?\d+(?:\.\d+)?/),s=n?parseFloat(n[0]):NaN,r=!isNaN(s)&&isFinite(s);let l=!1;switch(t.operator){case">=":o&&r&&(l=a>=s);break;case">":o&&r&&(l=a>s);break;case"<=":o&&r&&(l=a<=s);break;case"<":o&&r&&(l=a<s);break;case"==":l=o&&r&&i===String(a)&&e===String(s)?a===s:i.toLowerCase()===e.toLowerCase();break;case"!=":l=o&&r&&i===String(a)&&e===String(s)?a!==s:i.toLowerCase()!==e.toLowerCase();break;case"contains":l=i.toLowerCase().includes(e.toLowerCase());break;case"not_contains":l=!i.toLowerCase().includes(e.toLowerCase());break;case"starts_with":l=i.toLowerCase().startsWith(e.toLowerCase());break;case"regex":try{l=new RegExp(e,"i").test(i)}catch(t){l=!1}}if(l)return t.color}return n}(this.result(t).value,t.colorRules,"unavailable"===e?Bm.orange:t.color||Bm.green)}progress(t){const e=parseFloat(this.result(t).value);return Number.isFinite(e)?Math.min(100,Math.max(0,e/(t.maxValue||100)*100)):0}isNetworkRate(t){var e;return"KiB/s"===(null===(e=t.suffix)||void 0===e?void 0:e.trim())&&"ok"===this.status(t)&&Eg(this.result(t).value)}displayValue(t){const e=this.result(t).value;return this.isNetworkRate(t)?function(t){if(!Eg(t))return t;const e=.001024*Number(t.replace(/,/g,""));return Number.isFinite(e)?Og.format(Math.abs(e)<5e-4?0:e):t}(e):e}suffix(t){var e;const n=this.isNetworkRate(t)?"MB/s":(null===(e=t.suffix)||void 0===e?void 0:e.trim())||("progress"===t.type?"%":"");return n&&!n.startsWith("%")?" "+n:n}detailRatio(t){return this.detailError(t)?null:function(t){const e=/^\s*([^/\r\n]+?)\s*\/\s*([^/\s]+?)\s*([KMGTPE]?i?B|%)?\s*$/i.exec(t||"");if(!e)return null;const n=e[1].trim(),i=e[2].trim();return[n,i].every(Eg)?{numerator:n,denominator:i,suffix:e[3]||""}:null}(this.details[t.id]||"")}ratioColumnWidth(t,e){return`${Math.max(1,...this.allMetrics(t).map(t=>{var n;return(null===(n=this.detailRatio(t))||void 0===n?void 0:n[e].length)||0}))}ch`}ratioUnitWidth(t){return`${Math.max(0,...this.allMetrics(t).map(t=>{var e;const n=null===(e=this.detailRatio(t))||void 0===e?void 0:e.suffix;return n?n.length+1:0}))}ch`}networkAmountWidth(t){return`${Math.max(1,...this.allMetrics(t).map(t=>{var e;return(null===(e=this.networkDetail(t))||void 0===e?void 0:e.amount.length)||0}))}ch`}detailError(t){return(this.details[t.id]||"").startsWith("Err:")}networkDetail(t){return/^builtin-net-(main|rx|tx)$/.test(t.id)?function(t){const e=/^(Received|Sent|Combined) total: ([0-9]+(?:\.[0-9]+)?) GiB \(since interface reset; ([^)\r\n]+)\)$/.exec(t||"");return e?{label:`${e[1]} total`,amount:e[2],interfaces:e[3]}:null}(this.details[t.id]):null}detailText(t){const e=this.details[t.id]||"";return this.detailError(t)?"Err: No result"===e?"No detail received":"Err: No output"===e?"Detail returned no data":"Err: Incomplete output"===e?"Incomplete detail response":e.startsWith("Err: Remote error")?"Remote detail command failed":"Err: Timeout"===e?"Detail command timed out":"Err: Check timeout"===e?"Detail check timed out":"Err: Connection"===e?"Unable to fetch details":"Detail command failed":e}detailExitCode(t){const e=/^Err: Exit (\d+)$/.exec(this.details[t.id]||"");return e?` (${e[1]})`:""}iconUrl(t){return(null==t?void 0:t.startsWith("data:image/"))?this.sanitizer.bypassSecurityTrustUrl(t):t}collapsedMetric(t){if(!1!==t.enabled)return"overview"===t.mode?Pg(t.main,this.results)?t.main:void 0:Ng(t,this.results).find(e=>{var n;return e.id===(null===(n=this.selections.get(t.id))||void 0===n?void 0:n.id)})}updateCarousel(t,e){for(const n of this.visibleGroups){if("carousel"!==n.mode)continue;let i=this.selections.get(n.id);i||(i={since:t},this.selections.set(n.id,i)),Ng(n,this.results).some(t=>t.id===i.id)?this.hoveredGroup===n.id?i.since=t:e&&t-i.since>=1e3*Math.max(1,n.interval||3)&&(i.id=Fg(n,this.results,i.id),i.since=t):(i.id=Fg(n,this.results,i.id),i.since=t)}}expanded(t,e){return"vertical"===t.layout?this.hoveredGroup===t.id:this.hoveredMetric===e.id}enterMetric(t){this.hoveredMetric=t.id,this.refreshDetails()}leaveMetric(t){this.hoveredMetric===t.id&&(this.hoveredMetric=null)}enterChild(t,e){"vertical"!==t.layout&&this.enterMetric(e)}enterGroup(t,e){clearTimeout(this.closeTimer),this.hoveredGroup=t.id,this.anchor=e.currentTarget,this.positionPopup(),this.refreshDetails()}keepGroup(t){clearTimeout(this.closeTimer),this.hoveredGroup=t.id}leaveGroup(t){this.closeTimer=setTimeout(()=>{this.hoveredGroup===t.id&&(this.hoveredGroup=null,this.hoveredMetric=null,this.cdr.markForCheck())},"static"===t.mode?0:100)}blurGroup(t,e){e.currentTarget.contains(e.relatedTarget)||this.leaveGroup(t)}closeHover(){clearTimeout(this.closeTimer),this.hoveredMetric=null,this.hoveredGroup=null}positionPopup(){if(!this.anchor)return;const t=this.anchor.getBoundingClientRect(),e=Math.max(120,Math.min(560,window.innerWidth-16)),n=this.groups.find(t=>t.id===this.hoveredGroup),i=Math.min(380,54+38*this.allMetrics(n||{children:[]}).length),s=t.top>=Math.min(i,140),a=Math.max(70,s?t.top-12:window.innerHeight-t.bottom-12);this.popup={left:Math.max(8,Math.min(t.left,window.innerWidth-e-8)),top:s?Math.max(8,t.top-Math.min(i,a)):t.bottom,width:e,maxHeight:Math.min(i,a)}}async refreshDetails(){if(this.detailRequest||!this.session||!1===this.session.open)return;const t=this.visibleGroups.find(t=>t.id===this.hoveredGroup),e=[...this.visibleMetrics,...this.visibleGroups.reduce((t,e)=>t.concat(this.allMetrics(e)),[])],n=(!t||"static"===t.mode&&"vertical"!==t.layout?e.filter(t=>t.id===(this.hoveredMetric||this.autoDetailMetric)):this.allMetrics(t)).filter(t=>{var e;return null===(e=t.detailCommand)||void 0===e?void 0:e.trim()});if(!n.length)return;this.detailRequest=!0,this.lastDetailsAt=Date.now();const i=this.generation;try{const t=await this.service.fetchDetails(this.session,n);this.destroyed||i!==this.generation||(this.details=Object.assign(Object.assign({},this.details),t),this.cdr.markForCheck())}catch(t){}finally{this.detailRequest=!1}}ngOnDestroy(){var t;this.destroyed=!0,this.generation++,clearInterval(this.timer),clearTimeout(this.closeTimer),null===(t=this.portal)||void 0===t||t.remove()}};b([(0,y.Input)(),v("design:type",Array)],Vg.prototype,"metrics",void 0),b([(0,y.Input)(),v("design:type",Array)],Vg.prototype,"groups",void 0),b([(0,y.Input)(),v("design:type",Array)],Vg.prototype,"builtinOrder",void 0),b([(0,y.Input)(),v("design:type",Object)],Vg.prototype,"stats",void 0),b([(0,y.Input)(),v("design:type",Object)],Vg.prototype,"session",void 0),b([(0,y.Input)(),v("design:type",String)],Vg.prototype,"autoDetailMetric",void 0),b([(0,y.ViewChild)("groupPopup"),v("design:type",y.ElementRef)],Vg.prototype,"groupPopup",void 0),b([(0,y.ViewChildren)("carouselSlot"),v("design:type",y.QueryList)],Vg.prototype,"carouselSlots",void 0),b([(0,y.HostListener)("keydown.escape"),v("design:type",Function),v("design:paramtypes",[]),v("design:returntype",void 0)],Vg.prototype,"closeHover",null),b([(0,y.HostListener)("window:resize"),v("design:type",Function),v("design:paramtypes",[]),v("design:returntype",void 0)],Vg.prototype,"positionPopup",null),Vg=b([(0,y.Component)({selector:"server-stats-metric-strip",template:'\n <ng-template #value let-metric let-expanded="expanded">\n <span class="metric-label" [attr.title]="metric.label | translate">\n <svg *ngIf="svgPath(metric.icon)" viewBox="0 0 24 24" aria-hidden="true"><path [attr.d]="svgPath(metric.icon)"></path></svg>\n <img *ngIf="isUrl(metric.icon)" [src]="iconUrl(metric.icon)" alt="">\n <i *ngIf="isFa(metric.icon)" [class]="iconClass(metric.icon)" aria-hidden="true"></i>\n <span>{{metric.label | translate}}</span>\n </span>\n <span class="metric-reading">\n <span class="meter" *ngIf="metric.type === \'progress\' && status(metric) === \'ok\'">\n <span [style.width.%]="progress(metric)" [style.background]="color(metric)"></span>\n </span>\n <span class="metric-value" [style.color]="color(metric)">{{status(metric) === \'unavailable\' ? (result(metric).value | translate) : displayValue(metric)}}<span *ngIf="status(metric) === \'ok\'">{{suffix(metric)}}</span></span>\n </span>\n <span class="metric-detail" *ngIf="expanded && metric.detailCommand && status(metric) === \'ok\'"\n [class.detail-error]="detailError(metric)" [style.color]="detailError(metric) ? colors.red : color(metric)"\n [attr.title]="detailError(metric) ? details[metric.id] : networkDetail(metric) ? ((\'Since interface creation or counter reset\' | translate) + \' · \' + networkDetail(metric).interfaces) : null">\n <span class="network-detail" *ngIf="networkDetail(metric) as network; else ordinaryDetail"><span>{{network.label | translate}} </span><span class="network-amount">{{network.amount}}</span><span class="network-unit"> GiB</span></span>\n <ng-template #ordinaryDetail>\n <span class="numeric-ratio" *ngIf="detailRatio(metric) as ratio; else plainDetail"><span class="ratio-numerator">{{ratio.numerator}}</span><span class="ratio-slash">/</span><span class="ratio-denominator">{{ratio.denominator}}</span><span class="ratio-unit">{{ratio.suffix ? \' \' + ratio.suffix : \'\'}}</span></span>\n <ng-template #plainDetail>{{detailText(metric) | translate}}{{detailExitCode(metric)}}</ng-template>\n </ng-template>\n </span>\n </ng-template>\n\n <ng-container *ngFor="let item of visibleItems; trackBy: trackId">\n <div *ngIf="item.metric as metric" class="single metric-row" tabindex="0"\n (mouseenter)="enterMetric(metric)" (mouseleave)="leaveMetric(metric)"\n (focusin)="enterMetric(metric)" (focusout)="leaveMetric(metric)"\n [attr.aria-label]="(metric.label || metric.id) | translate">\n <ng-container *ngTemplateOutlet="value; context: { $implicit: metric, expanded: hoveredMetric === metric.id || autoDetailMetric === metric.id }"></ng-container>\n </div>\n\n <div *ngIf="item.group as group" class="metric-group" tabindex="0"\n [style.--ratio-left-width]="ratioColumnWidth(group, \'numerator\')" [style.--ratio-right-width]="ratioColumnWidth(group, \'denominator\')"\n [style.--ratio-unit-width]="ratioUnitWidth(group)"\n [style.--detail-amount-width]="networkAmountWidth(group)"\n [class.vertical]="group.mode === \'static\' && group.layout === \'vertical\'"\n (mouseenter)="enterGroup(group, $event)" (mouseleave)="leaveGroup(group)"\n (focusin)="enterGroup(group, $event)" (focusout)="blurGroup(group, $event)"\n [attr.aria-label]="(group.label || \'Metric group\') | translate"\n [attr.aria-expanded]="group.mode !== \'static\' ? hoveredGroup === group.id : null">\n <ng-container *ngIf="group.mode === \'static\'">\n <div *ngFor="let metric of allMetrics(group); trackBy: trackId" class="metric-row" tabindex="0" [class.child-row]="metric.id !== group.main?.id"\n (mouseenter)="enterChild(group, metric)" (mouseleave)="leaveMetric(metric)"\n (focusin)="enterChild(group, metric)" (focusout)="leaveMetric(metric)">\n <ng-container *ngTemplateOutlet="value; context: { $implicit: metric, expanded: expanded(group, metric) }"></ng-container>\n </div>\n </ng-container>\n <ng-container *ngIf="group.mode !== \'static\'">\n <div #carouselSlot class="collapsed-slot" [class.carousel-slot]="group.mode === \'carousel\'" [attr.data-carousel-group]="group.mode === \'carousel\' ? group.id : null">\n <div class="carousel-measures" *ngIf="group.mode === \'carousel\'" aria-hidden="true">\n <div class="carousel-measure metric-row" aria-hidden="true" *ngFor="let candidate of carouselCandidates(group); trackBy: trackId">\n <ng-container *ngTemplateOutlet="value; context: { $implicit: candidate, expanded: false }"></ng-container>\n </div>\n </div>\n <div class="metric-row collapsed-row" [class.carousel-active]="group.mode === \'carousel\'" *ngIf="collapsedMetric(group) as metric; else empty">\n <ng-container *ngTemplateOutlet="value; context: { $implicit: metric, expanded: false }"></ng-container>\n </div>\n <ng-template #empty><span class="empty">{{group.emptyText || (\'No available items\' | translate)}}</span></ng-template>\n </div>\n <span class="expand-hint" aria-hidden="true">▴</span>\n <div *ngIf="hoveredGroup === group.id" #groupPopup class="group-details" role="region"\n [style.--ratio-left-width]="ratioColumnWidth(group, \'numerator\')" [style.--ratio-right-width]="ratioColumnWidth(group, \'denominator\')"\n [style.--ratio-unit-width]="ratioUnitWidth(group)"\n [style.--detail-amount-width]="networkAmountWidth(group)"\n [style.left.px]="popup.left" [style.top.px]="popup.top" [style.max-height.px]="popup.maxHeight"\n [style.max-width.px]="popup.width" (mouseenter)="keepGroup(group)" (mouseleave)="leaveGroup(group)">\n <div class="details-title">{{(group.label || \'Metric group\') | translate}}</div>\n <div class="detail-grid">\n <div *ngFor="let metric of allMetrics(group); trackBy: trackId" class="metric-row detail-row" [class.child-row]="metric.id !== group.main?.id">\n <ng-container *ngTemplateOutlet="value; context: { $implicit: metric, expanded: true }"></ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n ',styles:["\n :host { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; min-width: 0; font-size: 11px; color: #ddd; }\n .single, .metric-group { border-right: 1px solid #ffffff40; padding-right: 6px; }\n .metric-row { display: inline-flex; align-items: center; gap: 6px; min-height: 18px; max-width: 100%; }\n .metric-row:focus-visible, .metric-group:focus-visible { outline: 1px solid #5baaff; outline-offset: 3px; }\n .metric-label { display: inline-flex; gap: 4px; align-items: center; color: #bfc5cd; white-space: nowrap; }\n .metric-label svg, .metric-label img { width: 12px; height: 12px; object-fit: contain; fill: currentColor; }\n .metric-value { font: 600 11px monospace; font-variant-numeric: tabular-nums; text-align: right; white-space: pre-wrap; overflow-wrap: anywhere; }\n .metric-detail { font: 11px monospace; font-variant-numeric: tabular-nums; text-align: right; color: #d1d7e0; white-space: pre-wrap; overflow-wrap: anywhere; }\n .numeric-ratio { display: inline-grid; grid-template-columns: var(--ratio-left-width, max-content) 1ch var(--ratio-right-width, max-content) var(--ratio-unit-width, max-content); align-items: baseline; white-space: pre; }\n .ratio-unit { text-align: left; }\n .ratio-numerator, .ratio-denominator, .network-amount { text-align: right; }\n .ratio-slash { text-align: center; }\n .network-detail { display: inline-grid; grid-template-columns: max-content var(--detail-amount-width, max-content) max-content; align-items: baseline; white-space: pre; }\n .metric-detail:not(:empty) { border-left: 1px solid #ffffff40; padding-left: 6px; }\n .metric-reading { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }\n .meter { display: inline-block; height: 7px; width: 50px; flex: 0 0 50px; overflow: hidden; background: #ffffff26; border-radius: 4px; }\n .meter > span { display: block; height: 100%; transition: width .3s; }\n .metric-group { display: inline-flex; gap: 6px; align-items: center; position: relative; cursor: default; min-width: 0; max-width: 100%; box-sizing: border-box; }\n .metric-group:not(.vertical) > .metric-row + .metric-row { border-left: 1px solid #ffffff40; padding-left: 6px; }\n .collapsed-slot { min-width: 0; }\n .carousel-slot { flex: 0 1 auto; width: var(--carousel-width, max-content); max-width: calc(100vw - 48px); }\n .carousel-measures { position: absolute; left: 0; top: 0; width: 0; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; }\n .carousel-measure { position: absolute; visibility: hidden; pointer-events: none; width: max-content; max-width: none; }\n .carousel-measure .metric-value { white-space: pre; }\n .carousel-active { display: flex; flex-wrap: wrap; width: 100%; }\n .carousel-active .metric-label { white-space: normal; overflow-wrap: anywhere; min-width: 0; }\n .carousel-active .metric-reading { min-width: 0; max-width: 100%; }\n .carousel-active .metric-value { min-width: 0; }\n .metric-group.vertical { display: grid; grid-template-columns: max-content max-content minmax(0, max-content); align-items: center; gap: 0 6px; }\n .metric-group.vertical > .metric-row { display: contents; }\n .metric-group.vertical > .metric-row + .metric-row::before { content: ''; grid-column: 1 / -1; height: 1px; background: #ffffff40; }\n .metric-group.vertical .metric-label, .metric-group.vertical .metric-reading, .metric-group.vertical .metric-value, .metric-group.vertical .metric-detail { line-height: 12px; }\n .metric-group.vertical .metric-label { grid-column: 1; }\n .metric-group.vertical .metric-reading { grid-column: 2; }\n .metric-group.vertical .metric-detail { grid-column: 3; }\n .metric-group.vertical .child-row .metric-label { padding-left: 12px; }\n .expand-hint { color: #8493a5; font-size: 9px; }\n .group-details { position: fixed; z-index: 100000; box-sizing: border-box; width: max-content; background: #181c23; border: 1px solid #ffffff32; border-radius: 8px; padding: 10px 12px; box-shadow: 0 5px 24px #0009; overflow: auto; color: #ddd; }\n .details-title { font-size: 15px; font-weight: 600; padding-bottom: 7px; border-bottom: 1px solid #ffffff40; margin-bottom: 7px; }\n .detail-grid { display: grid; grid-template-columns: minmax(0, max-content) max-content minmax(0, max-content); align-items: center; gap: 4px 6px; }\n .detail-row { display: contents; }\n .detail-row .metric-label { grid-column: 1; min-width: 0; font-size: 14px; white-space: normal; overflow-wrap: anywhere; }\n .detail-row.child-row .metric-label { padding-left: 16px; }\n .detail-row .metric-label svg, .detail-row .metric-label img { width: 15px; height: 15px; flex: 0 0 15px; }\n .detail-row .metric-reading { grid-column: 2; }\n .detail-row .metric-value, .detail-row .metric-detail { font-size: 13px; }\n .detail-row .metric-detail { grid-column: 3; min-width: 0; }\n .detail-error { font-weight: 500; }\n .empty { color: #c7a66c; }\n "]}),v("design:paramtypes",[Ig,y.ChangeDetectorRef,y.NgZone,Sg.DomSanitizer])],Vg);let Ag=class{constructor(t,e,n,i,s,a){this.statsService=t,this.config=e,this.app=n,this.cdr=i,this.zone=s,this.sanitizer=a,this.visible=!1,this.loading=!0,this.currentStats={cpu:0,mem:0,disk:0,netRx:0,netTx:0,custom:[]},this.customMetrics=[],this.metricGroups=[],this.builtinOrder=[],this.styleConfig={background:"rgba(20, 20, 20, 0.85)"},this.timerId=null,this.tabSubscription=null,this.configSubscriptions=[],this.boundSession=null,this.displaySession=null,this.destroyed=!1,this.viewRevision=0,this.useExternalController=!1,this.externalSessionResolver=null}bindToSession(t){this.destroyed||(this.boundSession=t,this.synchronizeSession(t),this.visible=this.canDisplay(t),this.cdr.detectChanges())}synchronizeSession(t){if(this.applyMetricScope(t),this.displaySession===t)return;this.viewRevision++,this.displaySession=t;const e=!1!==(null==t?void 0:t.open)&&t?this.statsService.getCachedStats(t):null;this.currentStats=e||{cpu:0,mem:0,disk:0,netRx:0,netTx:0,custom:[]},this.loading=!e}applyMetricScope(t){var e,n,i,s,a;const o=(null===(i=null===(n=null===(e=this.config)||void 0===e?void 0:e.store)||void 0===n?void 0:n.plugin)||void 0===i?void 0:i.serverStats)||{},r=(null===(a=(s=this.statsService).getVisibleConfig)||void 0===a?void 0:a.call(s,t))||o;this.builtinOrder=o.builtinOrder||[],this.customMetrics=r.customMetrics||[],this.metricGroups=r.metricGroups||[]}canDisplay(t){var e,n,i;const s=null===(i=null===(n=null===(e=this.config)||void 0===e?void 0:e.store)||void 0===n?void 0:n.plugin)||void 0===i?void 0:i.serverStats;return!this.destroyed&&!!(null==s?void 0:s.enabled)&&"bottomBar"===(s.displayMode||"bottomBar")&&!!t&&!1!==t.open&&this.resolveSession()===t}isCurrentRequest(t,e){return this.viewRevision===e&&this.displaySession===t&&this.canDisplay(t)}renderExternalStats(t){this.canDisplay(this.boundSession)&&(this.synchronizeSession(this.boundSession),this.visible=!0,t?(this.visible=!0,this.loading=!1,this.updateStats(t),this.currentStats=t):this.loading=!1,this.cdr.detectChanges())}setExternalLoading(t){this.canDisplay(this.boundSession)&&(this.synchronizeSession(this.boundSession),this.visible=!0,this.loading=t,this.cdr.detectChanges())}hideExternal(){this.destroyed||(this.viewRevision++,this.synchronizeSession(null),this.visible=!1,this.loading=!0,this.cdr.detectChanges())}resolveSession(){if(this.useExternalController&&this.externalSessionResolver)return this.externalSessionResolver();if(this.useExternalController||this.boundSession)return this.boundSession;let t=this.app.activeTab;return t?(t.focusedTab&&(t=t.focusedTab),t.session||null):null}ngOnInit(){this.loadConfig(),this.configSubscriptions.push(this.config.ready$.subscribe(()=>{this.loadConfig(),setTimeout(()=>this.checkAndFetch(),100)})),this.configSubscriptions.push(this.config.changed$.subscribe(()=>this.loadConfig())),this.configSubscriptions.push(this.statsService.statsUpdated$.subscribe(t=>{if(this.destroyed)return;const e=this.resolveSession();this.synchronizeSession(e),this.canDisplay(e)?this.canDisplay(e)&&this.statsService.getServerKey(e)===t.serverKey?(this.visible=!0,this.loading=!1,this.updateStats(t.stats),this.currentStats=t.stats,this.cdr.detectChanges()):this.cdr.detectChanges():this.hideExternal()})),this.useExternalController||(!this.boundSession&&this.app.activeTabChange&&(this.tabSubscription=this.app.activeTabChange.subscribe(()=>{this.checkAndFetch()})),setTimeout(()=>this.checkAndFetch(),100),this.zone.runOutsideAngular(()=>{this.timerId=window.setInterval(()=>{this.zone.run(()=>{this.checkAndFetch()})},1e3)}))}loadConfig(){var t,e,n;if(this.destroyed)return;this.viewRevision++;const i=(null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||{};i.style&&(this.styleConfig=Object.assign(Object.assign({},this.styleConfig),i.style)),this.applyMetricScope(this.resolveSession()),this.canDisplay(this.resolveSession())||(this.visible=!1,this.synchronizeSession(null)),this.cdr.detectChanges()}forceUpdate(){this.checkAndFetch()}async checkAndFetch(){var t,e,n,i,s,a,o,r;if(this.destroyed||this.useExternalController)return;const l=null===(i=null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.enabled;if("bottomBar"!==((null===(r=null===(o=null===(a=null===(s=this.config)||void 0===s?void 0:s.store)||void 0===a?void 0:a.plugin)||void 0===o?void 0:o.serverStats)||void 0===r?void 0:r.displayMode)||"bottomBar"))return void(this.visible&&(this.visible=!1,this.loading=!0,this.cdr.detectChanges()));const c=this.resolveSession();if(this.synchronizeSession(c),l&&c&&!1!==c.open)if(c&&this.statsService.isPlatformSupport(c)){this.visible||(this.visible=!0,this.loading=!0,this.cdr.detectChanges()),this.cdr.detectChanges();const t=this.viewRevision;try{const e=await this.statsService.fetchStats(c);if(!this.isCurrentRequest(c,t))return;this.loading=!1,e&&(this.updateStats(e),this.currentStats=e),this.cdr.detectChanges()}catch(e){if(!this.isCurrentRequest(c,t))return;this.loading=!1,this.cdr.detectChanges()}}else this.visible&&(this.visible=!1,this.loading=!0,this.cdr.detectChanges());else this.visible&&(this.visible=!1,this.loading=!0,this.cdr.detectChanges())}updateStats(t){this.currentStats=t}ngOnDestroy(){this.destroyed=!0,this.viewRevision++,this.visible=!1,this.displaySession=null,this.timerId&&clearInterval(this.timerId),this.tabSubscription&&this.tabSubscription.unsubscribe(),this.configSubscriptions.forEach(t=>t.unsubscribe())}};Ag=b([(0,y.Component)({selector:"server-stats-bottom-bar",template:'\n <div class="stats-container" \n *ngIf="visible"\n [style.background]="styleConfig.background">\n <div class="stat-section" *ngIf="loading">\n <div class="loading-text">Loading...</div>\n </div>\n \n <server-stats-metric-strip *ngIf="!loading" [metrics]="customMetrics" [groups]="metricGroups"\n [builtinOrder]="builtinOrder"\n [stats]="currentStats" [session]="displaySession"></server-stats-metric-strip>\n </div>\n ',styles:["\n :host { display: block; width: 100%; position: relative; box-sizing: border-box; }\n .stats-container {\n position: relative;\n width: 100%;\n box-sizing: border-box;\n backdrop-filter: blur(8px);\n padding: 1px 12px;\n display: flex;\n flex-wrap: wrap;\n gap: 4px 10px;\n justify-content: flex-start;\n align-items: center;\n border-top: 1px solid rgba(255,255,255,0.15);\n color: rgba(255,255,255,0.9);\n user-select: none;\n font-size: 11px;\n min-height: 22px;\n }\n .stat-section { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; height: 20px; }\n .loading-text { color: rgba(255,255,255,0.6); font-size: 10px; font-style: italic; }\n "]}),v("design:paramtypes",[Ig,Ia.ConfigService,Ia.AppService,y.ChangeDetectorRef,y.NgZone,Sg.DomSanitizer])],Ag);const Lg=t=>JSON.parse(JSON.stringify(t));function jg(t){return Boolean(t&&"object"==typeof t&&"string"==typeof t.command&&(void 0===t.type||"text"===t.type||"progress"===t.type))}function Hg(t,e){if(!jg(t))throw new Error("Invalid preset metric");return Object.assign(Object.assign({},Lg(t)),{id:"string"==typeof t.id?t.id:e,type:t.type||"text"})}function zg(t){const e=Array.isArray(t)?t:null==t?void 0:t.presets;if(!Array.isArray(e)||e.length>1e3)throw new Error("Invalid preset library");return e.map((t,e)=>{if(!t||"object"!=typeof t)throw new Error("Invalid preset entry");if(!t.kind&&jg(t))return{id:`legacy-${e}`,kind:"metric",label:t.label||`Metric ${e+1}`,metric:Hg(t,`legacy-${e}`)};const n=Object.assign(Object.assign({},Lg(t)),{id:"string"==typeof t.id?t.id:`preset-${e}`,label:t.label||`Preset ${e+1}`});if("metric"===n.kind)n.metric=Hg(t.metric,`${n.id}-metric`);else{if("group"!==n.kind||!t.group||!Array.isArray(t.group.children))throw new Error("Invalid preset kind");n.group=Object.assign(Object.assign({},Lg(t.group)),{id:t.group.id||n.id,mode:["overview","carousel","static"].includes(t.group.mode)?t.group.mode:"overview",layout:"horizontal"===t.group.layout?"horizontal":"vertical",main:Hg(t.group.main,`${n.id}-main`),children:t.group.children.map((t,e)=>Hg(t,`${n.id}-${e}`))})}if(void 0!==n.profileNames){if(!Array.isArray(n.profileNames)||n.profileNames.some(t=>"string"!=typeof t))throw new Error("Invalid preset profile names");n.profileNames=[...new Set(n.profileNames.map(t=>t.trim()).filter(Boolean))]}return n})}let Bg=0;gg("iowait"),gg("steal");const Gg="https://raw.githubusercontent.com/lishuainan0209/tabby-group-server-stats/main/presets.json",Wg=2097152,Ug={"invalid-url":"Only GitHub JSON file URLs are supported.",http:"GitHub returned an HTTP error.",timeout:"GitHub preset download timed out.","too-large":"GitHub preset file is too large.","invalid-json":"GitHub preset file is not valid JSON.","invalid-library":"GitHub preset file has an unsupported format.",network:"Unable to download presets from GitHub.",aborted:"GitHub preset download was canceled."};class qg extends Error{constructor(t,e){super(Ug[t]),this.code=t,this.status=e,this.name="PresetGitHubError"}}var Zg;let Kg=class{get builtinKeys(){return dg(this.config.store.plugin.serverStats.builtinOrder)}moveBuiltin(t,e){const n=this.builtinKeys,i=n.indexOf(t),s=i+e;i<0||s<0||s>=n.length||([n[i],n[s]]=[n[s],n[i]],this.config.store.plugin.serverStats.builtinOrder=n,this.save())}constructor(t,e,n){this.platform=t,this.config=e,this.sanitizer=n,this.defaultMetric={type:"text",color:"#00ff00",maxValue:100,suffix:"",icon:"",interval:void 0,timeout:void 0,colorRules:[],checkCommand:"",checkMode:"output",checkExpected:"",unavailableText:"",detailCommand:"",enabled:!0,visibleWhenUnavailable:!0,showWhenUnavailable:!0},this.currentMetric=Object.assign(Object.assign({},this.defaultMetric),{colorRules:[]}),this.editingIndex=-1,this.newSingleOpen=!1,this.editingBuiltinKey=null,this.currentGroup=null,this.editingGroupId=null,this.editingChildIndex=-1,this.expandedMemberId=null,this.draggedIndex=null,this.isDragging=!1,this.iconPickerOpen=!1,this.iconPresets=Jm,this.iconSearch="",this.iconCategory="all",this.scopeSearch="",this.presets=zg(g(977)),this.loadingPresets=!1,this.fetchError=!1,this.presetSearch="",this.presetMessage="",this.presetMissingNames=[]}get scopeOwner(){return this.currentGroup||this.currentMetric}get scopeMode(){var t;return"selected"===(null===(t=this.scopeOwner.displayScope)||void 0===t?void 0:t.mode)?"selected":"all"}setScopeMode(t){const e=this.scopeOwner.displayScope;this.scopeOwner.displayScope={mode:t,profileIds:[...(null==e?void 0:e.profileIds)||[]],profileNames:Object.assign({},(null==e?void 0:e.profileNames)||{})}}get savedScopeProfiles(){const t=this.config.store.profiles;if(!Array.isArray(t))return[];const e=this.config.store.groups,n=new Map((Array.isArray(e)?e:[]).filter(t=>t&&"string"==typeof t.id&&"string"==typeof t.name).map(t=>[t.id,t.name])),i=new Set,s=t.filter(t=>!(!t||"string"!=typeof t.id||!t.id||i.has(t.id)||(i.add(t.id),0))).map(t=>({id:t.id,name:"string"==typeof t.name&&t.name?t.name:t.id,type:"string"==typeof t.type?t.type:"",group:n.get(t.group)||("string"==typeof t.group?t.group:"")}));for(const t of s)s.some(e=>e.id!==t.id&&e.name===t.name&&e.group===t.group)&&(t.disambiguator=t.id.slice(-8));return s}get scopeChoices(){const t=this.scopeSearch.trim().toLocaleLowerCase();return this.savedScopeProfiles.filter(e=>!t||`${e.group} ${e.name}`.toLocaleLowerCase().includes(t)).sort((t,e)=>t.group.localeCompare(e.group)||t.name.localeCompare(e.name)||t.id.localeCompare(e.id))}get scopeSelectedProfiles(){const t=this.scopeOwner.displayScope,e=new Map(this.savedScopeProfiles.map(t=>[t.id,t]));return[...new Set((null==t?void 0:t.profileIds)||[])].map(n=>{var i;const s=e.get(n);return s?Object.assign(Object.assign({},s),{missing:!1}):{id:n,name:(null===(i=null==t?void 0:t.profileNames)||void 0===i?void 0:i[n])||n,type:"",group:"",missing:!0}})}get hasMissingScopeProfiles(){return this.scopeSelectedProfiles.some(t=>t.missing)}trackScopeChoice(t,e){return e.id}isScopeSelected(t){var e,n;return(null===(n=null===(e=this.scopeOwner.displayScope)||void 0===e?void 0:e.profileIds)||void 0===n?void 0:n.includes(t))||!1}toggleScopeProfile(t,e){const n=this.scopeOwner.displayScope,i=new Set((null==n?void 0:n.profileIds)||[]),s=Object.assign({},(null==n?void 0:n.profileNames)||{});if(e){const e=this.savedScopeProfiles.find(e=>e.id===t);if(!e)return;i.add(t),s[t]=e.name}else i.delete(t),delete s[t];this.scopeOwner.displayScope={mode:"selected",profileIds:[...i],profileNames:s}}removeScopeProfile(t){this.toggleScopeProfile(t,!1)}serializeScope(t){var e;if(!t)return;const n=[...new Set((t.profileIds||[]).filter(t=>"string"==typeof t&&Boolean(t)))],i=new Map(this.savedScopeProfiles.map(t=>[t.id,t.name])),s={};for(const a of n)s[a]=i.get(a)||(null===(e=t.profileNames)||void 0===e?void 0:e[a])||a;return{mode:"selected"===t.mode?"selected":"all",profileIds:n,profileNames:s}}onDocumentClick(){this.iconPickerOpen&&(this.iconPickerOpen=!1)}toggleIconPicker(t){t.stopPropagation(),this.iconPickerOpen=!this.iconPickerOpen}get iconCategories(){return[...new Set(this.iconPresets.map(t=>t.category||"Other"))]}get filteredIconPresets(){const t=this.iconSearch.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);return this.iconPresets.filter(e=>{const n=e.category||"Other";if("all"!==this.iconCategory&&n!==this.iconCategory)return!1;const i=Array.isArray(e.keywords)?e.keywords.join(" "):e.keywords||"",s=`${e.name} ${e.label} ${n} ${i}`.toLocaleLowerCase();return t.every(t=>s.includes(t))})}trackIconPreset(t,e){return e.name}selectPresetIcon(t){this.currentMetric.icon=t,this.iconPickerOpen=!1}getIconClass(t){return Ym(t)}getSvgPath(t){return Um(t)}isUrl(t){return Zm(t)}isFa(t){return Km(t)}getSafeIconUrl(t){return t?t.startsWith("data:image/")?this.sanitizer.bypassSecurityTrustUrl(t):t:""}clearIcon(){this.currentMetric.icon="",this.iconPickerOpen=!1}onSvgFileSelected(t){var e,n;const i=null===(n=null===(e=t.target)||void 0===e?void 0:e.files)||void 0===n?void 0:n[0];if(!i)return;const s=new FileReader;s.onload=t=>{var e;const n=null===(e=t.target)||void 0===e?void 0:e.result;n&&(this.currentMetric.icon=n,this.iconPickerOpen=!1)},s.readAsDataURL(i),t.target.value=""}get defaultInterval(){var t,e,n,i;return(null===(i=null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.defaultInterval)||3}set defaultInterval(t){var e,n,i;if(!(null===(i=null===(n=null===(e=this.config)||void 0===e?void 0:e.store)||void 0===n?void 0:n.plugin)||void 0===i?void 0:i.serverStats))return;const s=Number(t);this.config.store.plugin.serverStats.defaultInterval=isNaN(s)||s<1?3:s}get debugLogging(){var t,e,n,i;return Boolean(null===(i=null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.debugLogging)}set debugLogging(t){var e;(null===(e=this.config)||void 0===e?void 0:e.store)&&(this.config.store.plugin||(this.config.store.plugin={}),this.config.store.plugin.serverStats||(this.config.store.plugin.serverStats={}),this.config.store.plugin.serverStats.debugLogging=Boolean(t))}get showDefaultIcons(){var t,e,n,i;return!1!==(null===(i=null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.showDefaultIcons)}set showDefaultIcons(t){var e;(null===(e=this.config)||void 0===e?void 0:e.store)&&(this.config.store.plugin||(this.config.store.plugin={}),this.config.store.plugin.serverStats||(this.config.store.plugin.serverStats={}),this.config.store.plugin.serverStats.showDefaultIcons=Boolean(t))}addColorRule(){this.currentMetric.colorRules||(this.currentMetric.colorRules=[]),this.currentMetric.colorRules.push({operator:"==",value:"",color:Bm.red})}removeColorRule(t){this.currentMetric.colorRules&&this.currentMetric.colorRules.splice(t,1)}get customMetrics(){return this.config.store.plugin.serverStats.customMetrics||[]}get metricGroups(){return this.config.store.plugin.serverStats.metricGroups||[]}get metricEditorTitle(){return this.editingBuiltinKey&&!this.currentGroup?"Edit Built-in Metric":this.currentGroup?this.editingChildIndex<0?"Main Metric":"Child Metric":this.editingIndex<0?"Add New Metric":"Edit Metric"}uiText(t){var e,n;const i=this.config.store.language,s=String(i&&"auto"!==i?i:"undefined"!=typeof navigator?navigator.language:"en");return(null===(e=Qm[s])||void 0===e?void 0:e[t])||(null===(n=Qm[s.toLowerCase().startsWith("zh")?"zh-CN":"en"])||void 0===n?void 0:n[t])||t}groupModeLabel(t){return"carousel"===t?"Carousel":"static"===t?"Static":"Overview"}groupModeHelp(t){return"carousel"===t?"Rotate child metrics. Hover to pause and show the main metric and all children with details.":"static"===t?"Show the main metric and all children. Horizontal hover expands one member; vertical hover expands all members.":"Show the main metric. Hover to show the main metric and all children with details."}newId(t){return`${t}_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,12)}`}draftMetric(t){var e;return Object.assign(Object.assign(Object.assign(Object.assign({},this.defaultMetric),{id:this.newId("metric"),label:"",command:"",type:"text"}),JSON.parse(JSON.stringify(t||{}))),{checkMode:t?t.checkMode||"exitCode":"output",checkExpected:t?String(null!==(e=t.checkExpected)&&void 0!==e?e:"0"):"",enabled:!1!==(null==t?void 0:t.enabled),visibleWhenUnavailable:!1!==(null==t?void 0:t.visibleWhenUnavailable),showWhenUnavailable:!1!==(null==t?void 0:t.visibleWhenUnavailable)&&!1!==(null==t?void 0:t.showWhenUnavailable),colorRules:JSON.parse(JSON.stringify((null==t?void 0:t.colorRules)||[]))})}newSingle(){this.cancelEdit(),this.newSingleOpen=!0}newGroup(){this.cancelEdit(),this.currentGroup={id:this.newId("group"),label:"",mode:"overview",layout:"vertical",enabled:!0,interval:3,emptyText:"",main:this.draftMetric(),children:[]},this.selectGroupMetric(-1)}editGroup(t){const e=this.metricGroups[t];e&&(this.editingGroupId===e.id&&this.currentGroup||(this.cancelEdit(),this.editingGroupId=e.id,this.currentGroup=Object.assign(Object.assign({},JSON.parse(JSON.stringify(e))),{main:this.draftMetric(e.main),children:(e.children||[]).map(t=>this.draftMetric(t))}),this.selectGroupMetric(-1)))}toggleGroupMetric(t){if(!this.currentGroup)return;const e=t<0?this.currentGroup.main:this.currentGroup.children[t];e&&(this.expandedMemberId===e.id?(this.expandedMemberId=null,this.iconPickerOpen=!1):this.selectGroupMetric(t))}toggleMetricEnabled(t){const e=this.customMetrics[t];e&&(e.enabled=!1===e.enabled,this.currentGroup||this.currentMetric.id!==e.id||(this.currentMetric.enabled=e.enabled),this.save())}toggleGroupEnabled(t){var e;const n=this.metricGroups[t];n&&(n.enabled=!1===n.enabled,(null===(e=this.currentGroup)||void 0===e?void 0:e.id)===n.id&&(this.currentGroup.enabled=n.enabled),this.save())}toggleMemberEnabled(t){t.enabled=!1===t.enabled}setUnavailableVisibility(t){this.currentMetric.visibleWhenUnavailable=t,t||(this.currentMetric.showWhenUnavailable=!1)}selectGroupMetric(t){if(!this.currentGroup)return;const e=t<0?this.currentGroup.main:this.currentGroup.children[t];e&&(this.editingChildIndex=t,this.currentMetric=e,this.expandedMemberId=e.id,this.iconPickerOpen=!1)}addChild(){this.currentGroup&&(this.currentGroup.children.push(this.draftMetric()),this.selectGroupMetric(this.currentGroup.children.length-1))}removeChild(t){var e;if(!(null===(e=this.currentGroup)||void 0===e?void 0:e.children[t]))return;const n=this.currentMetric.id,i=null===this.expandedMemberId;this.currentGroup.children.splice(t,1),this.selectGroupMetric(this.currentGroup.children.findIndex(t=>t.id===n)),i&&(this.expandedMemberId=null)}moveChild(t,e){if(!this.currentGroup)return;const n=this.currentGroup.children,i=t+e;if(i<0||i>=n.length)return;const s=this.currentMetric.id,a=null===this.expandedMemberId,o=n.splice(t,1)[0];n.splice(i,0,o),this.selectGroupMetric(n.findIndex(t=>t.id===s)),a&&(this.expandedMemberId=null)}moveGroup(t,e){const n=[...this.metricGroups],i=t+e;if(i<0||i>=n.length)return;const s=n.splice(t,1)[0];n.splice(i,0,s),this.config.store.plugin.serverStats.metricGroups=n,this.save()}removeGroup(t){const e=this.metricGroups[t];e&&confirm(this.uiText("Delete this group and all of its metrics?"))&&(this.config.store.plugin.serverStats.metricGroups=this.metricGroups.filter(t=>t.id!==e.id),this.editingGroupId===e.id&&this.cancelEdit(),this.save())}positiveOrAbsent(t){return null==t||""===t||Number.isFinite(Number(t))&&Number(t)>=1}isMetricValid(t){var e,n,i,s,a;if(!(null===(e=t.label)||void 0===e?void 0:e.trim())&&!(null===(n=t.icon)||void 0===n?void 0:n.trim())||!(null===(i=t.command)||void 0===i?void 0:i.trim()))return!1;if(!this.positiveOrAbsent(t.interval)||!this.positiveOrAbsent(t.timeout))return!1;if("progress"===t.type&&!this.positiveOrAbsent(t.maxValue))return!1;if((null===(s=t.checkCommand)||void 0===s?void 0:s.trim())&&"output"!==t.checkMode){const e=String(null!==(a=t.checkExpected)&&void 0!==a?a:"0").trim();if(!/^\d+$/.test(e)||Number(e)>255)return!1}return!0}isGroupValid(){return Boolean(this.currentGroup&&this.positiveOrAbsent(this.currentGroup.interval)&&[this.currentGroup.main,...this.currentGroup.children].every(t=>this.isMetricValid(t)))}serializeMetric(t,e=!1){var n,i,s,a;const o=t=>null==t||""===t?void 0:Number(t);return Object.assign(Object.assign({},JSON.parse(JSON.stringify(t))),{id:t.id||this.newId("metric"),label:(null===(n=t.label)||void 0===n?void 0:n.trim())||"",command:t.command,type:t.type||"text",icon:(null===(i=t.icon)||void 0===i?void 0:i.trim())||void 0,color:t.color||"#00ff00",maxValue:o(t.maxValue),interval:o(t.interval),timeout:o(t.timeout),checkCommand:t.checkCommand||"",checkMode:t.checkMode||"exitCode",checkExpected:String(null!==(s=t.checkExpected)&&void 0!==s?s:"0"),unavailableText:(null===(a=t.unavailableText)||void 0===a?void 0:a.trim())||"Unavailable",detailCommand:t.detailCommand||"",enabled:!1!==t.enabled,visibleWhenUnavailable:!1!==t.visibleWhenUnavailable,showWhenUnavailable:!1!==t.visibleWhenUnavailable&&!1!==t.showWhenUnavailable,displayScope:e?void 0:this.serializeScope(t.displayScope),colorRules:JSON.parse(JSON.stringify(t.colorRules||[]))})}saveGroup(){var t;if(this.editingBuiltinKey)return void this.saveBuiltin();if(!this.currentGroup||!this.isGroupValid())return;const e=Object.assign(Object.assign({},this.currentGroup),{label:(null===(t=this.currentGroup.label)||void 0===t?void 0:t.trim())||"",interval:Number(this.currentGroup.interval)||3,displayScope:this.serializeScope(this.currentGroup.displayScope),main:this.serializeMetric(this.currentGroup.main,!0),children:this.currentGroup.children.map(t=>this.serializeMetric(t,!0))}),n=[...this.metricGroups],i=this.editingGroupId?n.findIndex(t=>t.id===this.editingGroupId):-1;i<0?n.push(e):n[i]=e,this.config.store.plugin.serverStats.metricGroups=n,this.save(),this.cancelEdit()}get defaultMetricsConfig(){return this.config.store.plugin.serverStats.defaultMetrics||(this.config.store.plugin.serverStats.defaultMetrics={cpu:!0,ram:!0,disk:!0,net:!0}),this.config.store.plugin.serverStats.defaultMetrics}builtinMain(t){const e=yg(t,this.config.store.plugin.serverStats);return"net"===t?e.main:e}builtinTitle(t){return yg(t,this.config.store.plugin.serverStats).label||t}hasBuiltinOverride(t){var e;return Boolean(null===(e=this.config.store.plugin.serverStats.defaultMetricOverrides)||void 0===e?void 0:e[t])}toggleBuiltinEnabled(t){this.defaultMetricsConfig[t]=!1===this.defaultMetricsConfig[t],this.save()}editBuiltin(t){if(this.editingBuiltinKey===t)return;this.cancelEdit(),this.editingBuiltinKey=t;const e=yg(t,this.config.store.plugin.serverStats);if("net"===t){const t=JSON.parse(JSON.stringify(e));this.currentGroup=Object.assign(Object.assign({},t),{main:this.draftMetric(t.main),children:t.children.map(t=>this.draftMetric(t))}),this.selectGroupMetric(-1)}else this.currentMetric=this.draftMetric(e)}restoreBuiltin(t){const e=this.config.store.plugin.serverStats.defaultMetricOverrides;e&&delete e[t],this.editingBuiltinKey===t&&this.cancelEdit(),this.save()}saveBuiltin(){var t;const e=this.editingBuiltinKey;if(!e||("net"===e?!this.isGroupValid():!this.isMetricValid(this.currentMetric)))return;const n=this.config.store.plugin.serverStats;n.defaultMetricOverrides=n.defaultMetricOverrides||{},n.defaultMetricOverrides[e]="net"===e?Object.assign(Object.assign({},this.currentGroup),{label:(null===(t=this.currentGroup.label)||void 0===t?void 0:t.trim())||"",interval:Number(this.currentGroup.interval)||3,displayScope:this.serializeScope(this.currentGroup.displayScope),main:this.serializeMetric(this.currentGroup.main,!0),children:this.currentGroup.children.map(t=>this.serializeMetric(t,!0))}):this.serializeMetric(this.currentMetric),this.save(),this.cancelEdit()}presetText(t,e){const n=this.config.store.language,i=n&&"auto"!==n?n:"undefined"!=typeof navigator?navigator.language:"en",s=String(i).toLowerCase().startsWith("zh")?"zh":"en",a="label"===e?t.labels:t.descriptions;return(null==a?void 0:a[s])||t[e]||""}presetMain(t){return"group"===t.kind?t.group.main:t.metric}trackPreset(t,e){return e.id}get filteredPresets(){const t=this.presetSearch.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);return this.presets.filter(e=>{const n=[e.label,e.description,...Object.values(e.labels||{}),...Object.values(e.descriptions||{}),...e.profileNames||[]].join(" ").toLocaleLowerCase();return t.every(t=>n.includes(t))})}loadPresetLibrary(t){const e=zg(t),n=new Set(e.map(t=>t.id));this.presets=[...e,...this.presets.filter(t=>!n.has(t.id))],this.presetSearch="",this.presetMissingNames=[],this.fetchError=!1,this.presetMessage="Library loaded. Review an item and click Add to enable it."}openPresetSource(){this.platform.openExternal(Gg)}async fetchPresets(){if(!this.loadingPresets){this.loadingPresets=!0,this.fetchError=!1,this.presetMessage="",this.presetMissingNames=[];try{const t=await async function(t=Gg,e={}){var n,i,s;const a=function(t=Gg){if("string"!=typeof t)throw new qg("invalid-url");let e;try{e=new URL(t.trim()||Gg)}catch(t){throw new qg("invalid-url")}if("https:"!==e.protocol||e.username||e.password||e.port)throw new qg("invalid-url");if("github.com"===e.hostname){if(!/^\/[^/]+\/[^/]+\/blob\/[^/]+\/.+\.json$/i.test(e.pathname))throw new qg("invalid-url");e.hostname="raw.githubusercontent.com",e.pathname=e.pathname.replace(/^(\/[^/]+\/[^/]+)\/blob\//,"$1/")}else if("raw.githubusercontent.com"!==e.hostname||!/^\/[^/]+\/[^/]+\/[^/]+\/.+\.json$/i.test(e.pathname))throw new qg("invalid-url");try{if(e.pathname.split("/").some(t=>/[\x00-\x1f\x7f\\]/.test(decodeURIComponent(t))))throw new Error("Invalid path")}catch(t){throw new qg("invalid-url")}return e.search="",e.hash="",e.href}(t);if(null===(n=e.signal)||void 0===n?void 0:n.aborted)throw new qg("aborted");const o=Number.isFinite(e.timeoutMs)&&e.timeoutMs>0?Math.min(e.timeoutMs,12e4):15e3,r=Number.isFinite(e.maxBytes)&&e.maxBytes>0?Math.min(e.maxBytes,Wg):Wg,l=new AbortController;let c,d,p=()=>{};const h=new Promise((t,e)=>{p=e}),u=t=>{d||(d=t,l.abort(),c&&c.cancel().catch(()=>{}),p(t))},m=()=>u(new qg("aborted"));null===(i=e.signal)||void 0===i||i.addEventListener("abort",m,{once:!0});const g=setTimeout(()=>u(new qg("timeout")),o),f=async()=>{const t=e.fetch||fetch,n=await t(a,{method:"GET",credentials:"omit",redirect:"error",cache:"no-store",referrerPolicy:"no-referrer",headers:{Accept:"application/json, text/plain;q=0.9"},signal:l.signal});if(d)throw d;if(!n.ok)throw new qg("http",n.status);const i=n.headers.get("content-length");if(i&&/^\d+$/.test(i)&&Number(i)>r)throw n.body&&n.body.cancel().catch(()=>{}),new qg("too-large");if(!n.body||"function"!=typeof n.body.getReader)throw new qg("invalid-json");c=n.body.getReader();const s=new TextDecoder("utf-8",{fatal:!0});let o,p=0,h="";for(;;){const{value:t,done:e}=await c.read();if(d)throw d;if(e)break;if(p+=t.byteLength,p>r)throw new qg("too-large");try{h+=s.decode(t,{stream:!0})}catch(t){throw new qg("invalid-json")}}try{h+=s.decode(),o=JSON.parse(h)}catch(t){throw new qg("invalid-json")}try{return zg(o)}catch(t){throw new qg("invalid-library")}};try{return await Promise.race([f(),h])}catch(t){if(l.abort(),c&&c.cancel().catch(()=>{}),d)throw d;if(t instanceof qg)throw t;throw new qg("network")}finally{clearTimeout(g),null===(s=e.signal)||void 0===s||s.removeEventListener("abort",m)}}();this.loadPresetLibrary(t)}catch(t){this.fetchError=!0,this.presetMessage=t instanceof qg?t.message:"Unable to download presets from GitHub."}finally{this.loadingPresets=!1}}}importPresetFile(t){var e,n;const i=null===(n=null===(e=t.target)||void 0===e?void 0:e.files)||void 0===n?void 0:n[0];if(!i)return;this.fetchError=!1;const s=new FileReader;s.onload=()=>{try{this.loadPresetLibrary(JSON.parse(String(s.result||"")))}catch(t){this.presetMessage="Unable to read this preset library. Choose a valid JSON library.",this.presetMissingNames=[]}},s.onerror=()=>{this.presetMessage="Unable to read this preset library. Choose a valid JSON library."},s.readAsText(i),t.target.value=""}currentPresetLibrary(){const t=new Map((this.config.store.profiles||[]).map(t=>[t.id,t.name])),e=e=>{var n;return((null===(n=e.displayScope)||void 0===n?void 0:n.profileIds)||[]).map(n=>{var i,s;const a=t.get(n)||(null===(s=null===(i=e.displayScope)||void 0===i?void 0:i.profileNames)||void 0===s?void 0:s[n]);return"string"==typeof a?a.trim():""}).filter(Boolean)},n=(t,n)=>{var i;const s=JSON.parse(JSON.stringify(t)),a=s.presetMetadata;return delete s.presetMetadata,Object.assign(Object.assign({id:t.id,kind:n,label:t.label||("metric"===n?t.icon||"Metric":t.main.label||"Group"),labels:(null==a?void 0:a.importedLabel)===t.label?a.labels:void 0,description:null==a?void 0:a.description,descriptions:null==a?void 0:a.descriptions,source:null==a?void 0:a.source,audience:null==a?void 0:a.audience},"metric"===n?{metric:s}:{group:s}),{profileNames:"selected"===(null===(i=t.displayScope)||void 0===i?void 0:i.mode)?e(t):void 0})};return function(t){const e=zg(t).map(t=>{var e,n;const i="group"===t.kind?t.group:t.metric;if("selected"===(null===(e=i.displayScope)||void 0===e?void 0:e.mode)&&(t.profileNames=null!==(n=t.profileNames)&&void 0!==n?n:Object.values(i.displayScope.profileNames||{})),i.displayScope={mode:void 0===t.profileNames?"all":"selected",profileIds:[]},t.group)for(const e of[t.group.main,...t.group.children])delete e.displayScope;return t});return JSON.stringify(e,null,2)+"\n"}([...this.customMetrics.map(t=>n(t,"metric")),...this.metricGroups.map(t=>n(t,"group"))])}exportCurrentPresets(){const t=URL.createObjectURL(new Blob([this.currentPresetLibrary()],{type:"application/json;charset=utf-8"})),e=document.createElement("a");e.href=t,e.download="tabby-metric-presets.json",e.click(),setTimeout(()=>URL.revokeObjectURL(t),1e3),this.presetMessage="Label library exported.",this.presetMissingNames=[]}addPreset(t){const e="kind"in t?t:zg([t])[0];if(!e)return;const n=function(t,e,n=()=>`preset-${Date.now()}-${++Bg}`){var i,s,a;const o=zg([t])[0],r=[];let l={mode:"all",profileIds:[]};const c="group"===o.kind?null===(i=o.group)||void 0===i?void 0:i.displayScope:null===(s=o.metric)||void 0===s?void 0:s.displayScope,d=null!==(a=o.profileNames)&&void 0!==a?a:"selected"===(null==c?void 0:c.mode)?Object.values(c.profileNames||{}):void 0;if(void 0!==d){l={mode:"selected",profileIds:[],profileNames:{}};for(const t of[...new Set(d)]){const n=e.filter(e=>{var n;return e.id&&(null===(n=e.name)||void 0===n?void 0:n.trim())===t.trim()});1===n.length?(l.profileIds.push(n[0].id),l.profileNames[n[0].id]=n[0].name):r.push(t)}}const p=t=>Object.assign(Object.assign({},Lg(t)),{id:n(),displayScope:void 0});if("metric"===o.kind)return{customMetrics:[Object.assign(Object.assign({},p(o.metric)),{displayScope:l})],metricGroups:[],missingProfileNames:r};const h=o.group;return{customMetrics:[],metricGroups:[Object.assign(Object.assign({},Lg(h)),{id:n(),displayScope:l,main:p(h.main),children:h.children.map(p)})],missingProfileNames:r}}(e,this.config.store.profiles||[],()=>this.newId("metric"));e.labels&&(n.customMetrics.forEach(t=>{t.label=this.presetText(e,"label")}),n.metricGroups.forEach(t=>{t.label=this.presetText(e,"label")}));for(const t of[...n.customMetrics,...n.metricGroups])t.presetMetadata={importedLabel:t.label||"",labels:e.labels,description:e.description,descriptions:e.descriptions,source:e.source,audience:e.audience};const i=this.config.store.plugin.serverStats;i.customMetrics=[...i.customMetrics||[],...n.customMetrics],i.metricGroups=[...i.metricGroups||[],...n.metricGroups],this.presetMissingNames=n.missingProfileNames,this.presetMessage=n.missingProfileNames.length?"Added with a restricted scope. Choose the missing connections before use.":"Preset added.",this.save()}editMetric(t){this.cancelEdit(),this.editingIndex=t,this.iconPickerOpen=!1,this.currentMetric=this.draftMetric(this.customMetrics[t])}cancelEdit(){this.editingBuiltinKey=null,this.scopeSearch="",this.iconSearch="",this.iconCategory="all",this.currentGroup=null,this.editingGroupId=null,this.newSingleOpen=!1,this.editingChildIndex=-1,this.expandedMemberId=null,this.editingIndex=-1,this.iconPickerOpen=!1,this.currentMetric=Object.assign(Object.assign({},this.defaultMetric),{colorRules:[]})}saveMetric(){if(this.editingBuiltinKey)return void this.saveBuiltin();if(this.currentGroup)return void this.saveGroup();if(!this.isMetricValid(this.currentMetric))return;this.config.store.plugin.serverStats.customMetrics||(this.config.store.plugin.serverStats.customMetrics=[]);const t=this.serializeMetric(this.currentMetric);if(-1===this.editingIndex)this.config.store.plugin.serverStats.customMetrics.push(t);else{const e=this.customMetrics.findIndex(e=>e.id===t.id);if(e<0)return;this.config.store.plugin.serverStats.customMetrics[e]=t,this.editingIndex=-1}this.save(),this.cancelEdit()}removeMetric(t){var e;if(confirm(this.uiText("Are you sure you want to delete this metric?"))){const n=null===(e=this.customMetrics[t])||void 0===e?void 0:e.id;this.config.store.plugin.serverStats.customMetrics.splice(t,1),this.save(),this.currentGroup||this.currentMetric.id!==n||this.cancelEdit()}}onDragStart(t){this.draggedIndex=t}onDragOver(t,e){t.preventDefault()}onDrop(t){if(this.isDragging=!1,null===this.draggedIndex||this.draggedIndex===t)return;const e=this.customMetrics,n=e[this.draggedIndex];e.splice(this.draggedIndex,1),e.splice(t,0,n),this.config.store.plugin.serverStats.customMetrics=[...e],this.save(),this.draggedIndex=null}get hexColor(){const t=this.config.store.plugin.serverStats.style.background;if(!t)return"#141414";if(t.startsWith("rgba")){const e=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(e)return`#${parseInt(e[1]).toString(16).padStart(2,"0")}${parseInt(e[2]).toString(16).padStart(2,"0")}${parseInt(e[3]).toString(16).padStart(2,"0")}`}return t.startsWith("#")?t.substring(0,7):"#141414"}get opacity(){const t=this.config.store.plugin.serverStats.style.background;if(!t)return.9;if(t.startsWith("rgba")){const e=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(e&&e[4])return parseFloat(e[4])}return 1}setHexColor(t){const e=this.opacity;this.updateColor(t,e)}setOpacity(t){const e=this.hexColor;this.updateColor(e,t)}openGitHubLink(){this.platform.openExternal("https://github.com/lishuainan0209/tabby-group-server-stats")}updateColor(t,e){const n=parseInt(t.slice(1,3),16),i=parseInt(t.slice(3,5),16),s=parseInt(t.slice(5,7),16);this.config.store.plugin.serverStats.style.background=`rgba(${n}, ${i}, ${s}, ${e})`,this.save()}save(){this.config.save()}};b([(0,y.HostListener)("document:click"),v("design:type",Function),v("design:paramtypes",[]),v("design:returntype",void 0)],Kg.prototype,"onDocumentClick",null),Kg=b([(0,y.Component)({selector:"server-stats-settings",template:'\n <h3 translate>Server Stats</h3>\n \n \x3c!-- 显示模式选择 --\x3e\n <div class="form-line">\n <div class="header">\n <div class="title" translate>Display Mode</div>\n <div class="description" translate>Choose between floating panel or bottom bar</div>\n </div>\n <div class="btn-group">\n <input type="radio" class="btn-check" name="displayMode" id="displayModeFloating" \n autocomplete="off" value="floatingPanel"\n [(ngModel)]="config.store.plugin.serverStats.displayMode" \n (ngModelChange)="save()">\n <label class="btn btn-secondary" for="displayModeFloating" translate>Floating Panel</label>\n <input type="radio" class="btn-check" name="displayMode" id="displayModeBottom" \n autocomplete="off" value="bottomBar"\n [(ngModel)]="config.store.plugin.serverStats.displayMode" \n (ngModelChange)="save()">\n <label class="btn btn-secondary" for="displayModeBottom" translate>Bottom Bar</label>\n </div>\n </div>\n\n \x3c!-- 样式配置 --\x3e\n <div class="form-line">\n <div class="header">\n <div class="title" translate>Background Color</div>\n <div class="description" translate>Background color and opacity</div>\n </div>\n <div class="d-flex align-items-center">\n <input type="color" class="form-control form-control-color me-3" \n style="width: 60px;"\n [ngModel]="hexColor" \n (ngModelChange)="setHexColor($event)">\n <span class="text-muted me-2" translate>Opacity</span>\n <input type="range" class="form-range me-2" style="width: 100px" min="0" max="1" step="0.01"\n [ngModel]="opacity" \n (ngModelChange)="setOpacity($event)">\n </div>\n </div>\n\n \x3c!-- 默认更新周期配置 --\x3e\n <div class="form-line">\n <div class="header">\n <div class="title" translate>Default Update Interval</div>\n <div class="description" translate>Base interval (in seconds) for collecting metrics</div>\n </div>\n <div class="d-flex align-items-center">\n <input type="number" class="form-control form-control-sm" style="width: 90px;" min="1" max="3600"\n [(ngModel)]="defaultInterval"\n (ngModelChange)="save()">\n <span class="text-muted ms-2" translate>seconds</span>\n </div>\n </div>\n\n \x3c!-- 调试日志配置 --\x3e\n <div class="form-line">\n <div class="header">\n <div class="title" translate>Debug Logging</div>\n <div class="description" translate>Write detailed execution logs to file for troubleshooting</div>\n </div>\n <div class="form-check form-switch">\n <input class="form-check-input" type="checkbox" id="debugLogging"\n [(ngModel)]="debugLogging"\n (ngModelChange)="save()">\n </div>\n </div>\n\n <section class="settings-section builtin-metrics mt-4 mb-3">\n <h4 translate>Default Metrics</h4>\n <p class="text-muted" translate>Edit built-in commands and appearance, or restore an item to its defaults.</p>\n <p class="text-muted builtin-order-help" translate>Move items up or down to set their order in the bottom bar and floating panel.</p>\n <div class="list-group-item custom-metric-item builtin-card p-3 mb-2" *ngFor="let key of builtinKeys; let b = index" [attr.data-builtin]="key" [class.metric-disabled]="defaultMetricsConfig[key] === false">\n <div class="builtin-header">\n <div class="group-summary">\n <span class="group-card-icon"><ng-container *ngTemplateOutlet="metricIcon; context: { $implicit: builtinMain(key) }"></ng-container></span>\n <strong>{{ builtinTitle(key) | translate }}</strong>\n <span class="badge bg-secondary" *ngIf="key === \'net\'" translate>Metric Group</span>\n <span class="badge bg-info" *ngIf="hasBuiltinOverride(key)" translate>Customized</span>\n </div>\n <div class="btn-group btn-group-sm builtin-actions">\n <button type="button" class="btn btn-outline-secondary builtin-move-up" [disabled]="b === 0" (click)="moveBuiltin(key, -1)" [title]="\'Move up\' | translate" [attr.aria-label]="\'Move up\' | translate">↑</button>\n <button type="button" class="btn btn-outline-secondary builtin-move-down" [disabled]="b === builtinKeys.length - 1" (click)="moveBuiltin(key, 1)" [title]="\'Move down\' | translate" [attr.aria-label]="\'Move down\' | translate">↓</button>\n <button type="button" class="btn btn-outline-secondary builtin-enabled" (click)="toggleBuiltinEnabled(key)" [attr.aria-pressed]="defaultMetricsConfig[key] !== false">{{ (defaultMetricsConfig[key] === false ? \'Disabled\' : \'Enabled\') | translate }}</button>\n <button type="button" class="btn btn-outline-secondary builtin-edit" (click)="editBuiltin(key)" [title]="\'Edit\' | translate" [attr.aria-label]="\'Edit\' | translate"><i class="fas fa-pen" aria-hidden="true"></i></button>\n <button type="button" class="btn btn-outline-secondary builtin-reset" (click)="restoreBuiltin(key)" [disabled]="!hasBuiltinOverride(key)" translate>Restore defaults</button>\n </div>\n </div>\n <p class="text-muted builtin-network-help mt-2 mb-0" *ngIf="key === \'net\'" translate>Download and upload are current rates. Hover shows separate received and sent totals since interface creation or counter reset, not since SSH login. Default-route interfaces are preferred; without a route, eligible non-loopback interfaces are used.</p>\n <div class="inline-item-editor" *ngIf="editingBuiltinKey === key"><ng-container *ngTemplateOutlet="itemEditor"></ng-container></div>\n </div>\n <div class="form-check form-switch mt-2">\n <input class="form-check-input" type="checkbox" id="showDefaultIcons" [(ngModel)]="showDefaultIcons" (ngModelChange)="save()">\n <label class="form-check-label" for="showDefaultIcons" translate>Show icons for default metrics</label>\n </div>\n </section>\n\n <div class="separator"></div>\n\n <section class="settings-section preset-library mt-4 mb-3">\n <div class="preset-library-header">\n <h4 class="mb-0" translate>Preset Library</h4>\n <div class="d-flex gap-2 flex-wrap">\n <button type="button" class="btn btn-outline-primary btn-sm preset-github" (click)="fetchPresets()" [disabled]="loadingPresets" [attr.aria-busy]="loadingPresets">\n <i class="fas fa-cloud-download-alt me-1" aria-hidden="true"></i>{{ (loadingPresets ? \'Loading...\' : \'Import from GitHub\') | translate }}\n </button>\n <input type="file" #presetFile accept=".json,application/json" (change)="importPresetFile($event)" hidden>\n <button type="button" class="btn btn-outline-secondary btn-sm preset-import" (click)="presetFile.click()" [disabled]="loadingPresets" translate>Import JSON</button>\n <button type="button" class="btn btn-outline-secondary btn-sm preset-export" (click)="exportCurrentPresets()" translate>Export my labels</button>\n </div>\n </div>\n <p class="text-muted mt-2" translate>Bundled presets work offline. Importing a library only previews it; commands run after you add a label or group.</p>\n <p class="preset-github-source"><span translate>GitHub source</span>: <button type="button" class="preset-source-link" (click)="openPresetSource()">lishuainan0209/tabby-group-server-stats · main</button></p>\n <input class="form-control form-control-sm preset-search" [(ngModel)]="presetSearch" [placeholder]="\'Search presets\' | translate" [attr.aria-label]="\'Search presets\' | translate">\n <div class="preset-message mt-2" role="status" [class.preset-error]="fetchError" *ngIf="presetMessage">{{ presetMessage | translate }}<span *ngIf="presetMissingNames.length">: {{ presetMissingNames.join(\', \') }}</span></div>\n <div class="list-group mt-3 preset-list">\n <div class="list-group-item custom-metric-item preset-card p-3 mb-2" *ngFor="let p of filteredPresets; trackBy: trackPreset" [class.preset-lab-only]="p.audience === \'author-lab\'">\n <div class="preset-card-header">\n <span class="group-card-icon"><ng-container *ngTemplateOutlet="metricIcon; context: { $implicit: presetMain(p) }"></ng-container></span>\n <strong>{{ presetText(p, \'label\') }}</strong>\n <span class="badge bg-secondary">{{ (p.kind === \'group\' ? \'Metric Group\' : \'Single Labels\') | translate }}</span>\n <span class="badge preset-lab-badge" *ngIf="p.audience === \'author-lab\'" translate>Author\'s lab only</span>\n <button type="button" class="btn btn-outline-primary btn-sm preset-add" (click)="addPreset(p)" translate>Add</button>\n </div>\n <p class="preset-description mb-2" *ngIf="presetText(p, \'description\')">{{ presetText(p, \'description\') }}</p>\n <div class="command-box group-command" [title]="presetMain(p)?.command">{{ presetMain(p)?.command }}</div>\n <div class="preset-targets mt-2" *ngIf="p.profileNames?.length"><span translate>Suggested connections</span>: {{ p.profileNames.join(\', \') }}</div>\n <div class="preset-source mt-2" *ngIf="p.source"><span translate>Source</span>: {{ p.source.name }}<span *ngIf="p.source.license"> · {{ p.source.license }}</span></div>\n </div>\n <div class="text-muted p-3" *ngIf="filteredPresets.length === 0" translate>No presets match this search.</div>\n </div>\n </section>\n\n <div class="separator"></div>\n\n \x3c!-- 自定义指标管理区域 --\x3e\n <section class="settings-section single-labels-section mt-4 mb-3">\n <div class="mb-3">\n <div class="d-flex justify-content-between align-items-center gap-2">\n <h4 class="mb-0" translate>Single Labels</h4>\n <button type="button" class="btn btn-outline-primary btn-sm add-single-btn" (click)="newSingle()" translate>Add Single Label</button>\n </div>\n <div class="text-muted mt-2 mb-2" style="font-size: 13px;" translate>\n Define custom shell commands to fetch data. The command must output a single value (number or text).\n </div>\n </div>\n\n <div class="list-group mb-3">\n <div class="list-group-item user-select-none custom-metric-item p-3 mb-2" \n *ngFor="let metric of customMetrics; let i = index"\n [class.metric-disabled]="metric.enabled === false"\n [draggable]="currentMetric.id !== metric.id || editingIndex === -1"\n (dragstart)="onDragStart(i)"\n (dragover)="onDragOver($event, i)"\n (drop)="onDrop(i)"\n [class.opacity-50]="draggedIndex === i && !isDragging"\n style="cursor: grab; overflow: hidden;">\n \n <div class="d-flex align-items-start justify-content-between gap-3 w-100">\n \x3c!-- Drag handle --\x3e\n <div class="pt-1 flex-shrink-0">\n <i class="fas fa-grip-vertical text-muted" style="cursor: grab; font-size: 14px;" title="{{ \'Drag to reorder\' | translate }}"></i>\n </div>\n\n \x3c!-- Content Area (with min-width: 0 to prevent overflow) --\x3e\n <div class="flex-grow-1" style="min-width: 0; overflow: hidden;">\n \x3c!-- Header row: Icon, Label, and Badges --\x3e\n <div class="d-flex align-items-center flex-wrap gap-2 mb-2">\n <span class="d-inline-flex align-items-center justify-content-center text-primary flex-shrink-0" *ngIf="metric.icon" style="width: 20px; height: 20px;">\n <svg *ngIf="getSvgPath(metric.icon)" viewBox="0 0 24 24" width="16" height="16" fill="currentColor">\n <path [attr.d]="getSvgPath(metric.icon)"></path>\n </svg>\n <img *ngIf="isUrl(metric.icon)" [src]="getSafeIconUrl(metric.icon)" width="16" height="16" style="object-fit: contain;" />\n <i *ngIf="isFa(metric.icon)" [class]="getIconClass(metric.icon)" style="font-size: 15px;"></i>\n </span>\n\n <strong class="fs-6 text-truncate" style="max-width: 280px;" [title]="metric.label || metric.icon">\n {{ metric.label || metric.icon }}\n </strong>\n\n <span class="badge" [style.background-color]="metric.color || \'#666\'">\n {{ (metric.type === \'progress\' ? \'Progress Bar\' : \'Text Value\') | translate }}\n </span>\n\n <span class="badge bg-secondary" *ngIf="metric.interval" title="{{ \'Execution Interval\' | translate }}">\n <i class="fas fa-clock me-1"></i>{{ metric.interval }}s\n </span>\n\n <span class="badge bg-warning text-dark" *ngIf="metric.timeout" title="{{ \'Timeout\' | translate }}">\n <i class="fas fa-stopwatch me-1"></i>{{ metric.timeout }}s\n </span>\n\n <span class="badge bg-info text-dark" *ngIf="metric.colorRules && metric.colorRules.length > 0" title="{{ \'Conditional Color Rules\' | translate }}">\n <i class="fas fa-palette me-1"></i>{{ metric.colorRules.length }} {{ (metric.colorRules.length === 1 ? \'rule\' : \'rules\') | translate }}\n </span>\n </div>\n\n \x3c!-- Command display: elegant monospace code snippet with line-clamp, text-break, and copy tooltip --\x3e\n <div class="command-box font-monospace text-muted p-2 rounded" \n style="font-size: 11px; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.08); word-break: break-all; max-height: 48px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4;"\n [title]="metric.command">\n {{ metric.command }}\n </div>\n </div>\n\n \x3c!-- Action buttons: always pinned right, never pushed away --\x3e\n <div class="btn-group btn-group-sm flex-shrink-0 pt-1">\n <button type="button" class="btn btn-outline-secondary metric-enabled" (click)="toggleMetricEnabled(i)" [attr.aria-pressed]="metric.enabled !== false" [title]="(metric.enabled === false ? \'Enable metric\' : \'Disable metric\') | translate">{{ (metric.enabled === false ? \'Disabled\' : \'Enabled\') | translate }}</button>\n <button class="btn btn-outline-secondary" (click)="editMetric(i)" [title]="\'Edit\' | translate">\n <i class="fas fa-pen"></i>\n </button>\n <button class="btn btn-outline-danger" (click)="removeMetric(i)" [title]="\'Remove\' | translate">\n <i class="fas fa-trash"></i>\n </button>\n </div>\n </div>\n <div class="inline-item-editor" *ngIf="!currentGroup && editingIndex !== -1 && currentMetric.id === metric.id">\n <ng-container *ngTemplateOutlet="itemEditor"></ng-container>\n </div>\n </div>\n \n <div class="list-group-item text-center text-muted p-4" *ngIf="customMetrics.length === 0" translate>\n No custom metrics defined.\n </div>\n </div>\n\n <div class="list-group new-item-editor" *ngIf="!editingBuiltinKey && editingIndex === -1 && !editingGroupId && newSingleOpen && !currentGroup">\n <div class="list-group-item custom-metric-item p-3"><ng-container *ngTemplateOutlet="itemEditor"></ng-container></div>\n </div>\n </section>\n\n <section class="settings-section metric-groups-section mt-4 mb-3">\n <div class="d-flex justify-content-between align-items-center gap-2">\n <h4 class="mb-0" translate>Metric Groups</h4>\n <button class="btn btn-outline-primary btn-sm" (click)="newGroup()" translate>Add Group</button>\n </div>\n <p class="text-muted mt-2" translate>Group a main metric and child metrics. Each metric keeps its own commands and refresh interval.</p>\n <div class="list-group metric-group-list">\n <div class="list-group-item custom-metric-item group-card p-3 mb-2" *ngFor="let group of metricGroups; let g = index" [class.metric-disabled]="group.enabled === false">\n <div class="group-card-header">\n <div class="group-card-heading">\n <span class="group-card-icon" [style.color]="group.main.color || \'#00ff00\'">\n <ng-container *ngTemplateOutlet="metricIcon; context: { $implicit: group.main }"></ng-container>\n <i *ngIf="!group.main.icon" class="fas fa-layer-group" aria-hidden="true"></i>\n </span>\n <span class="group-summary">\n <strong>{{ group.label || group.main.label || (\'Metric Group\' | translate) }}</strong>\n <span class="badge bg-primary">{{ groupModeLabel(group.mode) | translate }}</span>\n <span class="badge group-count">{{ group.children.length }} {{ \'Child Metrics\' | translate }}</span>\n </span>\n </div>\n <div class="btn-group btn-group-sm group-card-actions">\n <button type="button" class="btn btn-outline-secondary group-enabled" (click)="toggleGroupEnabled(g)" [attr.aria-pressed]="group.enabled !== false" [title]="(group.enabled === false ? \'Enable metric\' : \'Disable metric\') | translate">{{ (group.enabled === false ? \'Disabled\' : \'Enabled\') | translate }}</button>\n <button class="btn btn-outline-secondary" [disabled]="g === 0" (click)="moveGroup(g, -1)" [title]="\'Move up\' | translate" [attr.aria-label]="\'Move up\' | translate">↑</button>\n <button class="btn btn-outline-secondary" [disabled]="g === metricGroups.length - 1" (click)="moveGroup(g, 1)" [title]="\'Move down\' | translate" [attr.aria-label]="\'Move down\' | translate">↓</button>\n <button type="button" class="btn btn-outline-secondary group-edit" (click)="editGroup(g)" [title]="\'Edit\' | translate" [attr.aria-label]="\'Edit\' | translate" [attr.aria-controls]="\'group-editor-\' + group.id"><i class="fas fa-pen" aria-hidden="true"></i></button>\n <button class="btn btn-outline-danger" (click)="removeGroup(g)" [title]="\'Remove\' | translate" [attr.aria-label]="\'Remove\' | translate"><i class="fas fa-trash" aria-hidden="true"></i></button>\n </div>\n </div>\n <div class="group-card-preview" *ngIf="editingGroupId !== group.id">\n <div class="group-main-summary"><span class="member-kind" translate>Main Metric</span><strong>{{ group.main.label || group.main.icon || (\'Unnamed Metric\' | translate) }}</strong></div>\n <div class="command-box group-command" [title]="group.main.command">{{ group.main.command }}</div>\n <div class="group-child-summary" *ngIf="group.children.length">\n <span *ngFor="let child of group.children" class="child-summary-chip">\n <span [style.color]="child.color || \'#00ff00\'"><ng-container *ngTemplateOutlet="metricIcon; context: { $implicit: child }"></ng-container></span>\n {{ child.label || child.icon || (\'Unnamed Metric\' | translate) }}\n </span>\n </div>\n </div>\n <div class="inline-item-editor" *ngIf="editingGroupId === group.id" [id]="\'group-editor-\' + group.id">\n <ng-container *ngTemplateOutlet="itemEditor"></ng-container>\n </div>\n </div>\n <div class="list-group-item text-muted p-3" *ngIf="metricGroups.length === 0" translate>No metric groups defined.</div>\n </div>\n <div class="list-group new-item-editor" *ngIf="!editingBuiltinKey && !editingGroupId && currentGroup">\n <div class="list-group-item custom-metric-item p-3"><ng-container *ngTemplateOutlet="itemEditor"></ng-container></div>\n </div>\n </section>\n\n <ng-template #metricIcon let-metric>\n <svg *ngIf="getSvgPath(metric.icon)" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true"><path [attr.d]="getSvgPath(metric.icon)"></path></svg>\n <img *ngIf="isUrl(metric.icon)" [src]="getSafeIconUrl(metric.icon)" width="18" height="18" alt="" />\n <i *ngIf="isFa(metric.icon)" [class]="getIconClass(metric.icon)" aria-hidden="true"></i>\n </ng-template>\n <ng-template #itemEditor>\n <div class="scope-editor border rounded p-3 mb-3">\n <label class="form-label fw-bold" for="stats-scope-mode" translate>Display Scope</label>\n <select id="stats-scope-mode" class="form-select form-select-sm" [ngModel]="scopeMode" (ngModelChange)="setScopeMode($event)">\n <option value="all" translate>All terminal panes (default)</option>\n <option value="selected" translate>Selected connections or layouts</option>\n </select>\n <div class="form-text" *ngIf="currentGroup" translate>The entire group shares this scope, including its main metric and children.</div>\n <div class="form-text" *ngIf="scopeMode === \'all\'" translate>Show in every supported terminal pane, including new connections and split panes.</div>\n <ng-container *ngIf="scopeMode === \'selected\'">\n <div class="scope-help mt-2" translate>A connection matches each pane using that saved connection. A layout matches every pane opened within that saved layout. Multiple selections are combined.</div>\n <div class="form-text mb-2" translate>For a mixed P1 / P2 / P1 layout, select P1 for metrics that belong only to its two P1 panes. Select the layout only for metrics shared by all panes.</div>\n <label class="form-label mt-2" for="stats-scope-search" translate>Find a saved connection or layout</label>\n <input id="stats-scope-search" class="form-control form-control-sm mb-2" [(ngModel)]="scopeSearch" [placeholder]="\'Search by name\' | translate">\n <div class="scope-options" role="group" [attr.aria-label]="\'Saved connections and layouts\' | translate">\n <label class="scope-option" *ngFor="let profile of scopeChoices; trackBy: trackScopeChoice" [attr.title]="profile.id">\n <input type="checkbox" class="form-check-input" [checked]="isScopeSelected(profile.id)" (change)="toggleScopeProfile(profile.id, $any($event.target).checked)">\n <span class="scope-name"><small class="text-muted" *ngIf="profile.group">{{profile.group}} / </small>{{profile.name}}<small class="text-muted ms-2" *ngIf="profile.disambiguator">#{{profile.disambiguator}}</small></span>\n <span class="badge bg-secondary">{{(profile.type === \'split-layout\' ? \'Saved Layout\' : \'Saved Connection\') | translate}}</span>\n </label>\n <div class="text-muted p-2" *ngIf="scopeChoices.length === 0" translate>No matching saved connections or layouts.</div>\n </div>\n <div class="scope-selected mt-2" *ngIf="scopeSelectedProfiles.length">\n <div class="scope-selection" *ngFor="let profile of scopeSelectedProfiles; trackBy: trackScopeChoice" [class.scope-missing]="profile.missing">\n <span><small class="text-muted" *ngIf="profile.group">{{profile.group}} / </small>{{profile.name}}</span>\n <span class="badge bg-warning text-dark" *ngIf="profile.missing" translate>Deleted or unavailable</span>\n <button type="button" class="btn btn-outline-secondary btn-sm" (click)="removeScopeProfile(profile.id)" [attr.aria-label]="(\'Remove scope selection\' | translate) + \': \' + profile.name">×</button>\n </div>\n </div>\n <div class="text-warning mt-2" *ngIf="scopeSelectedProfiles.length === 0" translate>No targets selected: this item will not appear in any pane. Choose targets or switch explicitly to all panes.</div>\n <div class="text-warning mt-2" *ngIf="hasMissingScopeProfiles" translate>Missing targets remain selected but cannot match a pane. Remove or replace them; deletion never changes this item to all panes.</div>\n </ng-container>\n </div>\n <ng-container *ngIf="currentGroup">\n <h5 class="mb-3">{{ (editingGroupId || editingBuiltinKey ? \'Edit Group\' : \'Add Group\') | translate }}</h5>\n <div class="row g-3 mb-3">\n <div class="col-md-6">\n <label class="form-label" translate>Group Name</label>\n <input class="form-control form-control-sm" [(ngModel)]="currentGroup.label">\n </div>\n <div class="col-md-6">\n <label class="form-label" translate>Group Display Mode</label>\n <select class="form-select form-select-sm" [(ngModel)]="currentGroup.mode">\n <option value="overview" translate>Overview</option>\n <option value="carousel" translate>Carousel</option>\n <option value="static" translate>Static</option>\n </select>\n </div>\n <div class="col-md-6" *ngIf="currentGroup.mode === \'static\'">\n <label class="form-label" translate>Layout Direction</label>\n <select class="form-select form-select-sm" [(ngModel)]="currentGroup.layout">\n <option value="horizontal" translate>Horizontal</option>\n <option value="vertical" translate>Vertical</option>\n </select>\n </div>\n <div class="col-md-6" *ngIf="currentGroup.mode === \'carousel\'">\n <label class="form-label" translate>Carousel Interval (sec)</label>\n <input type="number" min="1" class="form-control form-control-sm" [(ngModel)]="currentGroup.interval">\n <div class="form-text" translate>Controls display switching, independently of command refresh intervals.</div>\n </div>\n <div class="col-md-6" *ngIf="currentGroup.mode === \'carousel\'">\n <label class="form-label" translate>Empty Carousel Text</label>\n <input class="form-control form-control-sm" [(ngModel)]="currentGroup.emptyText" [placeholder]="\'No available metrics\' | translate">\n </div>\n </div>\n <div class="group-mode-help text-muted mb-3">{{ groupModeHelp(currentGroup.mode) | translate }}</div>\n <div class="group-members mb-3">\n <section class="group-member group-member-main" [class.member-open]="expandedMemberId === currentGroup.main.id" [class.metric-disabled]="currentGroup.main.enabled === false">\n <div class="member-header">\n <button type="button" class="member-toggle" (click)="toggleGroupMetric(-1)" [attr.aria-expanded]="expandedMemberId === currentGroup.main.id" [attr.aria-controls]="\'member-editor-\' + currentGroup.main.id">\n <span class="member-icon" [style.color]="currentGroup.main.color || \'#00ff00\'"><ng-container *ngTemplateOutlet="metricIcon; context: { $implicit: currentGroup.main }"></ng-container></span>\n <span class="member-kind" translate>Main Metric</span>\n <strong>{{ currentGroup.main.label || currentGroup.main.icon || (\'Unnamed Metric\' | translate) }}</strong>\n <i class="fas member-chevron" [class.fa-chevron-down]="expandedMemberId !== currentGroup.main.id" [class.fa-chevron-up]="expandedMemberId === currentGroup.main.id" aria-hidden="true"></i>\n </button>\n <button type="button" class="btn btn-outline-secondary btn-sm member-enabled" (click)="toggleMemberEnabled(currentGroup.main)" [attr.aria-pressed]="currentGroup.main.enabled !== false">{{ (currentGroup.main.enabled === false ? \'Disabled\' : \'Enabled\') | translate }}</button>\n </div>\n <div class="member-editor" *ngIf="expandedMemberId === currentGroup.main.id" [id]="\'member-editor-\' + currentGroup.main.id">\n <ng-container *ngTemplateOutlet="metricFields"></ng-container>\n </div>\n </section>\n <section class="group-member group-member-child" *ngFor="let child of currentGroup.children; let c = index" [class.member-open]="expandedMemberId === child.id" [class.metric-disabled]="child.enabled === false">\n <div class="member-header">\n <button type="button" class="member-toggle" (click)="toggleGroupMetric(c)" [attr.aria-expanded]="expandedMemberId === child.id" [attr.aria-controls]="\'member-editor-\' + child.id">\n <span class="member-icon" [style.color]="child.color || \'#00ff00\'"><ng-container *ngTemplateOutlet="metricIcon; context: { $implicit: child }"></ng-container></span>\n <span class="member-kind">{{ \'Child Metric\' | translate }} {{ c + 1 }}</span>\n <strong>{{ child.label || child.icon || (\'Unnamed Metric\' | translate) }}</strong>\n <i class="fas member-chevron" [class.fa-chevron-down]="expandedMemberId !== child.id" [class.fa-chevron-up]="expandedMemberId === child.id" aria-hidden="true"></i>\n </button>\n <div class="btn-group btn-group-sm member-actions">\n <button type="button" class="btn btn-outline-secondary member-enabled" (click)="toggleMemberEnabled(child)" [attr.aria-pressed]="child.enabled !== false">{{ (child.enabled === false ? \'Disabled\' : \'Enabled\') | translate }}</button>\n <button class="btn btn-outline-secondary" [disabled]="c === 0" (click)="moveChild(c, -1)" [title]="\'Move up\' | translate" [attr.aria-label]="\'Move up\' | translate">↑</button>\n <button class="btn btn-outline-secondary" [disabled]="c === currentGroup.children.length - 1" (click)="moveChild(c, 1)" [title]="\'Move down\' | translate" [attr.aria-label]="\'Move down\' | translate">↓</button>\n <button class="btn btn-outline-danger" (click)="removeChild(c)" [title]="\'Remove Child\' | translate" [attr.aria-label]="\'Remove Child\' | translate">×</button>\n </div>\n </div>\n <div class="member-editor" *ngIf="expandedMemberId === child.id" [id]="\'member-editor-\' + child.id">\n <ng-container *ngTemplateOutlet="metricFields"></ng-container>\n </div>\n </section>\n <button class="btn btn-outline-primary add-child-btn" (click)="addChild()"><i class="fas fa-plus" aria-hidden="true"></i> <span translate>Add Child</span></button>\n <div class="form-text mt-2" translate>Edits to all members are saved together with the group.</div>\n </div>\n </ng-container>\n <ng-container *ngIf="!currentGroup">\n <h5 class="mb-3">{{ metricEditorTitle | translate }}</h5>\n <ng-container *ngTemplateOutlet="metricFields"></ng-container>\n </ng-container>\n <div class="editor-actions text-end">\n <div class="text-warning text-start mb-2" *ngIf="currentGroup && !isGroupValid()" translate>Every member needs a label or icon and a metric command. Intervals and timeouts must be positive; exit codes must be whole numbers from 0 to 255.</div>\n <button class="btn btn-secondary me-2" (click)="cancelEdit()" translate>Cancel</button>\n <button class="btn btn-primary text-white" (click)="saveMetric()" [disabled]="currentGroup ? !isGroupValid() : !isMetricValid(currentMetric)">\n <i class="fas" [class.fa-plus]="editingIndex === -1 && !currentGroup && !editingBuiltinKey" [class.fa-save]="editingIndex !== -1 || currentGroup || editingBuiltinKey"></i>\n {{ (currentGroup ? \'Save Group\' : (editingBuiltinKey || editingIndex !== -1 ? \'Save\' : \'Add\')) | translate }}\n </button>\n </div>\n </ng-template>\n <ng-template #metricFields>\n <div class="row g-3 metric-fields">\n <div class="col-md-4">\n <label class="form-label" translate>Label</label>\n <input type="text" class="form-control form-control-sm" [(ngModel)]="currentMetric.label" placeholder="{{ \'e.g. PostgreSQL (optional if icon set)\' | translate }}">\n </div>\n <div class="col-md-8">\n <label class="form-label" translate>Icon (FontAwesome or custom SVG)</label>\n <div class="icon-input-wrap position-relative">\n <div class="input-group input-group-sm">\n <span class="input-group-text" *ngIf="currentMetric.icon" style="padding: 0 8px; width: 34px; justify-content: center;">\n <svg *ngIf="getSvgPath(currentMetric.icon)" viewBox="0 0 24 24" width="16" height="16" fill="currentColor">\n <path [attr.d]="getSvgPath(currentMetric.icon)"></path>\n </svg>\n <img *ngIf="isUrl(currentMetric.icon)" [src]="getSafeIconUrl(currentMetric.icon)" width="16" height="16" style="object-fit: contain;" />\n <i *ngIf="isFa(currentMetric.icon)" [class]="getIconClass(currentMetric.icon)"></i>\n </span>\n <input type="text" \n class="form-control" \n [(ngModel)]="currentMetric.icon" \n placeholder="{{ \'fa-database, server, redis...\' | translate }}">\n <button type="button" \n class="btn btn-outline-secondary icon-picker-toggle"\n (click)="toggleIconPicker($event)"\n title="{{ \'Choose preset icon\' | translate }}">\n <i class="fas fa-ellipsis-v"></i>\n </button>\n <input type="file" \n #svgFileInput \n accept=".svg,image/svg+xml" \n (change)="onSvgFileSelected($event)" \n style="display: none;">\n <button type="button" \n class="btn btn-outline-secondary" \n (click)="svgFileInput.click()" \n title="{{ \'Upload Custom SVG\' | translate }}">\n <i class="fas fa-file-upload me-1"></i> <span translate>SVG</span>\n </button>\n <button type="button" \n class="btn btn-outline-danger" \n *ngIf="currentMetric.icon" \n (click)="clearIcon()" \n title="{{ \'Remove Icon\' | translate }}">\n <i class="fas fa-times"></i>\n </button>\n </div>\n <div class="icon-picker-panel" *ngIf="iconPickerOpen" (click)="$event.stopPropagation()">\n <div class="icon-picker-title" translate>Preset Icons</div>\n <div class="icon-picker-filters">\n <input type="search" class="form-control form-control-sm icon-search" [(ngModel)]="iconSearch" [placeholder]="\'Search icons by name or purpose\' | translate" [attr.aria-label]="\'Search icons by name or purpose\' | translate">\n <select class="form-select form-select-sm icon-category" [(ngModel)]="iconCategory" [attr.aria-label]="\'Icon category\' | translate">\n <option value="all" translate>All icon categories</option>\n <option *ngFor="let category of iconCategories" [value]="category">{{ category | translate }}</option>\n </select>\n </div>\n <div class="icon-picker-grid">\n <button type="button"\n class="icon-picker-item"\n *ngFor="let preset of filteredIconPresets; trackBy: trackIconPreset"\n [class.active]="currentMetric.icon === preset.name"\n [title]="(preset.label | translate) + \' (\' + preset.name + \')\'"\n [attr.aria-label]="preset.label | translate"\n [attr.aria-pressed]="currentMetric.icon === preset.name"\n (click)="selectPresetIcon(preset.name)">\n <svg *ngIf="getSvgPath(preset.name)" viewBox="0 0 24 24" width="22" height="22" fill="currentColor" aria-hidden="true">\n <path [attr.d]="getSvgPath(preset.name)"></path>\n </svg>\n <i *ngIf="isFa(preset.name)" [class]="getIconClass(preset.name)" aria-hidden="true"></i>\n <span class="icon-preset-label">{{ preset.label | translate }}</span>\n </button>\n </div>\n <div class="icon-empty" *ngIf="filteredIconPresets.length === 0" translate>No icons match this search.</div>\n </div>\n </div>\n <div class="form-text text-muted" style="font-size: 11px;">\n <span translate>Use FontAwesome (ex: database, server, memory) or upload a custom .svg file</span>\n </div>\n </div>\n\n <div class="col-md-3">\n <label class="form-label" translate>Type</label>\n <select class="form-select form-select-sm" [(ngModel)]="currentMetric.type">\n <option value="text" translate>Text Value</option>\n <option value="progress" translate>Progress Bar</option>\n </select>\n </div>\n <div class="col-md-3">\n <label class="form-label" translate>Default Color</label>\n <input type="color" class="form-control form-control-color form-control-sm w-100" [(ngModel)]="currentMetric.color">\n </div>\n <div class="col-md-3" *ngIf="currentMetric.type === \'progress\'">\n <label class="form-label" translate>Max Value</label>\n <input type="number" class="form-control form-control-sm" [(ngModel)]="currentMetric.maxValue" placeholder="100">\n </div>\n <div class="col-md-3">\n <label class="form-label" translate>Suffix</label>\n <input type="text" class="form-control form-control-sm" [(ngModel)]="currentMetric.suffix" [placeholder]="currentMetric.type === \'progress\' ? (\'e.g. GB (or % if empty)\' | translate) : (\'e.g. °C, ms\' | translate)">\n </div>\n <div class="col-md-3">\n <label class="form-label" translate>Interval (sec)</label>\n <input type="number" min="1" class="form-control form-control-sm" [(ngModel)]="currentMetric.interval" placeholder="{{ defaultInterval }}s">\n </div>\n <div class="col-md-3">\n <label class="form-label" translate>Timeout (sec)</label>\n <input type="number" min="1" class="form-control form-control-sm" [(ngModel)]="currentMetric.timeout" placeholder="15s">\n </div>\n <div class="col-12 check-command">\n <label class="form-label" translate>Object Check Command (optional)</label>\n <textarea class="form-control form-control-sm font-monospace" rows="2" [(ngModel)]="currentMetric.checkCommand" [placeholder]="currentMetric.checkMode === \'output\' ? \'mountpoint -q /data2 && echo exists\' : \'mountpoint -q /data2\'"></textarea>\n <div class="form-text" translate>Leave empty to run the metric directly. A failed check prevents both metric and detail commands from running.</div>\n </div>\n <ng-container *ngIf="currentMetric.checkCommand && currentMetric.checkCommand.trim()">\n <div class="col-md-4">\n <label class="form-label" translate>Compare</label>\n <select class="form-select form-select-sm" [(ngModel)]="currentMetric.checkMode">\n <option value="output" translate>Output Text</option>\n <option value="exitCode" translate>Exit Code</option>\n </select>\n </div>\n <div class="col-md-4">\n <label class="form-label" translate>Expected Value</label>\n <input class="form-control form-control-sm" [(ngModel)]="currentMetric.checkExpected" [placeholder]="currentMetric.checkMode === \'output\' ? \'exists\' : \'0\'">\n </div>\n <div class="col-md-4">\n <label class="form-label" translate>Check Failure Text</label>\n <input class="form-control form-control-sm" [(ngModel)]="currentMetric.unavailableText" [placeholder]="\'Unavailable\' | translate">\n </div>\n <div class="col-12 form-text" translate>Output text is compared exactly after trimming surrounding whitespace. Exit code 0 usually means success.</div>\n </ng-container>\n <div class="col-12 metric-command">\n <label class="form-label" translate>Command (Shell)</label>\n <div class="input-group input-group-sm">\n <textarea class="form-control font-monospace" \n rows="2" \n [(ngModel)]="currentMetric.command" \n placeholder="e.g. mongosh ... or redis-cli info | grep used_memory_human"></textarea>\n </div>\n <div class="form-text text-muted" style="font-size: 11px;" translate>\n Command executed on the server. The output (number or text) will be displayed.\n </div>\n </div>\n\n <div class="col-12 detail-command">\n <label class="form-label" translate>Hover Detail Command (optional)</label>\n <textarea class="form-control form-control-sm font-monospace" rows="2" [(ngModel)]="currentMetric.detailCommand"></textarea>\n <div class="form-text" translate>Append this command output on hover. Leave empty for no extra information.</div>\n </div>\n <div class="col-12 unavailable-visibility">\n <label class="form-check">\n <input class="form-check-input visible-unavailable" type="checkbox" [ngModel]="currentMetric.visibleWhenUnavailable !== false" (ngModelChange)="setUnavailableVisibility($event)">\n <span class="form-check-label" translate>Show this label when its check fails</span>\n </label>\n <div class="form-text" translate>Enabled by default. Turning this off hides the label in every display mode and also removes it from the carousel.</div>\n </div>\n <div class="col-12" *ngIf="currentGroup && editingChildIndex >= 0">\n <label class="form-check">\n <input class="form-check-input carousel-unavailable" type="checkbox" [(ngModel)]="currentMetric.showWhenUnavailable" [disabled]="currentMetric.visibleWhenUnavailable === false">\n <span class="form-check-label" translate>Keep in carousel when its check fails</span>\n </label>\n <div class="form-text" translate>When the failed label remains visible, this option controls whether it participates in the carousel. Static and hover views retain it.</div>\n </div>\n\n \x3c!-- 条件颜色规则区域 --\x3e\n <div class="col-md-12 mt-3">\n <div class="d-flex justify-content-between align-items-center mb-2">\n <label class="form-label mb-0 fw-bold" translate>Conditional Color Rules</label>\n <button type="button" class="btn btn-outline-primary btn-sm" (click)="addColorRule()">\n <i class="fas fa-plus me-1"></i> <span translate>Add Rule</span>\n </button>\n </div>\n <div class="text-muted mb-2" style="font-size: 12px;" translate>\n Color rules are checked from top to bottom. The first matching rule determines the color.\n </div>\n\n <div *ngIf="!currentMetric.colorRules || currentMetric.colorRules.length === 0" class="text-muted fst-italic p-2 border rounded text-center" style="font-size: 12px;">\n <span translate>No conditional rules defined. Default color will always be used.</span>\n </div>\n\n <div class="border rounded p-2 mb-2 bg-light bg-opacity-10" *ngFor="let rule of currentMetric.colorRules; let rIndex = index">\n <div class="row g-2 align-items-center">\n <div class="col-md-4">\n <select class="form-select form-select-sm" [(ngModel)]="rule.operator">\n <option value="==" translate>Equals (==)</option>\n <option value="!=" translate>Not Equals (!=)</option>\n <option value=">" translate>Greater than (>)</option>\n <option value=">=" translate>Greater or Equal (>=)</option>\n <option value="<" translate>Less than (<)</option>\n <option value="<=" translate>Less or Equal (<=)</option>\n <option value="contains" translate>Contains</option>\n <option value="not_contains" translate>Not Contains</option>\n <option value="starts_with" translate>Starts With</option>\n <option value="regex" translate>Regex Match</option>\n </select>\n </div>\n <div class="col-md-4">\n <input type="text" class="form-control form-control-sm" [(ngModel)]="rule.value" placeholder="{{ \'Threshold / Value\' | translate }}">\n </div>\n <div class="col-md-3">\n <input type="color" class="form-control form-control-color form-control-sm w-100" [(ngModel)]="rule.color">\n </div>\n <div class="col-md-1 text-end">\n <button type="button" class="btn btn-outline-danger btn-sm" (click)="removeColorRule(rIndex)">\n <i class="fas fa-times"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n </ng-template>\n ',styles:['\n :host {\n --stats-field-bg: #242e3c;\n --stats-field-border: #596a82;\n --stats-field-hover: #8194ad;\n --stats-field-fg: var(--theme-fg, var(--bs-body-color, #e5ecf5));\n --stats-field-muted: #b4c0d0;\n --stats-field-placeholder: #9caec2;\n --stats-focus: #579eff;\n --stats-card-border: #7389a5;\n --stats-section-accent: #7389a5;\n --stats-section-bg: #1d222b;\n --stats-card-bg: #191d24;\n }\n @supports (color: color-mix(in srgb, white, black)) {\n :host {\n --stats-field-bg: color-mix(in srgb, var(--theme-bg, var(--bs-body-bg, #181c23)) 82%, #7897bf 18%);\n --stats-field-border: color-mix(in srgb, var(--stats-field-fg) 40%, var(--theme-bg, var(--bs-body-bg, #181c23)) 60%);\n --stats-field-hover: color-mix(in srgb, var(--stats-field-fg) 58%, var(--theme-bg, var(--bs-body-bg, #181c23)) 42%);\n --stats-field-muted: color-mix(in srgb, var(--stats-field-fg) 78%, var(--theme-bg, var(--bs-body-bg, #181c23)) 22%);\n --stats-field-placeholder: color-mix(in srgb, var(--stats-field-fg) 65%, var(--theme-bg, var(--bs-body-bg, #181c23)) 35%);\n --stats-card-border: color-mix(in srgb, var(--stats-field-fg) 52%, var(--theme-bg, var(--bs-body-bg, #181c23)) 48%);\n --stats-section-bg: color-mix(in srgb, var(--theme-bg, var(--bs-body-bg, #181c23)) 95%, var(--stats-section-accent) 5%);\n --stats-card-bg: color-mix(in srgb, var(--theme-bg, var(--bs-body-bg, #181c23)) 90%, var(--stats-section-accent) 10%);\n }\n }\n .form-control, .form-select, .input-group-text {\n color: var(--stats-field-fg);\n background-color: var(--stats-field-bg);\n border: 1px solid var(--stats-field-border);\n border-radius: 6px;\n min-height: 36px;\n box-shadow: inset 0 1px 2px #00000012;\n transition: border-color .15s, box-shadow .15s;\n }\n .form-control:hover, .form-select:hover { border-color: var(--stats-field-hover); }\n .form-control:focus, .form-select:focus {\n color: var(--stats-field-fg);\n background-color: var(--stats-field-bg);\n border-color: var(--stats-focus);\n outline: 2px solid #579eff55;\n outline-offset: 1px;\n box-shadow: 0 0 0 3px #579eff1a;\n }\n .form-control::placeholder { color: var(--stats-field-placeholder); opacity: 1; }\n .form-select option { color: var(--stats-field-fg); background-color: var(--stats-field-bg); }\n .form-label, .form-check-label { color: var(--stats-field-fg); }\n .metric-fields .form-text, .scope-editor .form-text, .scope-help, .group-mode-help,\n .scope-option .text-muted, .scope-selection .text-muted, .member-kind {\n color: var(--stats-field-muted) !important;\n opacity: 1;\n }\n .metric-fields .text-muted { color: var(--stats-field-muted) !important; opacity: 1; }\n .form-check-input {\n border: 1px solid var(--stats-field-border);\n background-color: var(--stats-field-bg);\n accent-color: var(--stats-focus);\n }\n .form-check-input:checked { border-color: #3d8beb; background-color: #2877d6; }\n .form-check-input:focus-visible { outline: 2px solid var(--stats-focus); outline-offset: 2px; }\n .form-control:disabled, .form-select:disabled { opacity: .6; }\n .check-command textarea { border-left: 3px solid #aa9660; }\n .metric-command textarea { border-left: 3px solid #709bd6; }\n .detail-command textarea { border-left: 3px solid #679e99; }\n .check-command textarea:focus, .metric-command textarea:focus, .detail-command textarea:focus { border-color: var(--stats-focus); }\n .scope-editor { background-color: #7897bf0b; border-color: var(--stats-field-border) !important; }\n .scope-options { background-color: var(--stats-field-bg); border-color: var(--stats-field-border) !important; }\n .scope-option { border-color: var(--stats-field-border); }\n .scope-option:hover { background-color: #7897bf20; }\n .param-input { width: 80px; text-align: right; }\n .user-select-none { user-select: none; }\n .opacity-50 { opacity: 0.5; }\n .separator { height: 1px; background: rgba(0,0,0,0.1); margin: 20px 0; }\n .white-space-nowrap { white-space: nowrap; }\n .add-preset-btn { width: 12%; justify-content: center; }\n .submit-own-preset-btn { color: #00ffc8ff; text-decoration: none; }\n .submit-own-preset-btn:hover { color: #00daaaff; text-decoration: underline; }\n .settings-section { border: 2px solid var(--stats-section-accent); border-left-width: 5px; border-radius: 12px; padding: 20px; background: var(--stats-section-bg); }\n .single-labels-section { --stats-section-accent: #5f95d6; }\n .metric-groups-section { --stats-section-accent: #4e9a90; }\n .preset-library { --stats-section-accent: #9985c8; }\n .settings-section > h4, .settings-section > .preset-library-header, .settings-section > .d-flex:first-child { margin-bottom: 12px; }\n .custom-metric-item, .settings-section .custom-metric-item { border: 2px solid var(--stats-card-border); border-radius: 9px; transition: border-color 0.2s ease; }\n .custom-metric-item:hover, .custom-metric-item:focus-within { border-color: var(--stats-section-accent); }\n .metric-disabled { border-style: dashed !important; }\n .metric-enabled[aria-pressed="true"], .group-enabled[aria-pressed="true"], .member-enabled[aria-pressed="true"] { color: #70c7a0; border-color: #598c75; }\n .member-enabled { flex-shrink: 0; }\n .builtin-header, .preset-library-header, .preset-card-header { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }\n .builtin-actions { margin-left: auto; }\n .preset-library-header { justify-content: space-between; }\n .preset-list { max-height: 420px; overflow-y: auto; padding: 2px; }\n .preset-add { margin-left: auto; }\n .preset-description { margin-top: 10px; font-size: 13px; color: var(--stats-field-muted); }\n .preset-lab-badge { color: var(--stats-field-fg); background: #ffa50020; border: 1px solid #ffa500; }\n .preset-lab-only .preset-description { color: var(--stats-field-fg); border-left: 3px solid #ffa500; padding-left: 10px; }\n .preset-targets, .preset-source { font-size: 12px; color: var(--stats-field-muted); }\n .preset-message { font-size: 13px; color: var(--stats-field-muted); }\n .preset-message.preset-error { color: #ef8f95; border-left: 3px solid #ef8f95; padding: 8px 10px; }\n .preset-github-source { font-size: 12px; color: var(--stats-field-muted); margin-bottom: 12px; overflow-wrap: anywhere; }\n .preset-source-link { border: 0; background: transparent; color: var(--stats-field-fg); text-decoration: underline; padding: 0; text-align: left; }\n .preset-source-link:focus-visible { outline: 2px solid var(--stats-focus); outline-offset: 3px; }\n .builtin-enabled[aria-pressed="true"] { color: #70c7a0; border-color: #598c75; }\n .custom-metric-item { background: var(--stats-card-bg); padding: 18px !important; margin-bottom: 12px !important; }\n .custom-metric-item strong { font-size: 16px !important; }\n .custom-metric-item .badge { font-size: 12px; padding: 5px 8px; border-radius: 7px; }\n .command-box { font-size: 13px !important; line-height: 1.5 !important; }\n h4 { font-size: 22px; font-weight: 650; }\n h5 { font-size: 18px; }\n .group-card-header { display: flex; align-items: center; gap: 14px; }\n .group-card-heading { min-width: 0; flex: 1; display: flex; gap: 12px; align-items: center; color: inherit; text-align: left; }\n .member-toggle:focus-visible { outline: 2px solid #5299ff; outline-offset: 3px; border-radius: 5px; }\n .group-card-icon, .member-icon { display: inline-flex; justify-content: center; align-items: center; width: 20px; flex: 0 0 20px; font-size: 18px; }\n .group-summary { display: flex; flex: 1; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; overflow-wrap: anywhere; }\n .group-count { background: rgba(128,128,128,.16); color: inherit; font-weight: 500; }\n .group-card-actions { flex: 0 0 auto; }\n .group-card-preview { margin: 14px 0 0 32px; }\n .group-main-summary { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }\n .member-kind { font-size: 13px; color: #929ba7; font-weight: 500; white-space: nowrap; }\n .group-command { padding: 10px 12px; background: rgba(0,0,0,.3); border: 1px solid rgba(128,128,128,.12); border-radius: 6px; font-family: monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 62px; overflow: hidden; color: #929ba7; }\n .group-child-summary { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; padding-left: 16px; border-left: 2px solid rgba(128,128,128,.2); }\n .child-summary-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; background: rgba(128,128,128,.1); border: 2px solid var(--stats-card-border); border-radius: 5px; font-size: 14px; }\n .inline-item-editor { border-top: 1px solid rgba(128,128,128,.2); margin-top: 18px; padding-top: 18px; cursor: default; user-select: text; }\n .group-members { display: flex; flex-direction: column; gap: 10px; }\n .group-member { border: 2px solid var(--stats-card-border); border-radius: 8px; background: var(--stats-card-bg); }\n .group-member-child { margin-left: 26px; width: calc(100% - 26px); }\n .group-member.member-open { border-color: var(--stats-focus); }\n .member-header { display: flex; align-items: center; gap: 8px; padding-right: 10px; }\n .member-toggle { min-width: 0; flex: 1; display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 8px; padding: 14px; background: transparent; color: inherit; text-align: left; cursor: pointer; }\n .member-toggle strong { min-width: 0; overflow-wrap: anywhere; }\n .member-open > .member-toggle, .member-open > .member-header { background: rgba(49,118,216,.12); }\n .member-chevron { margin-left: auto; flex-shrink: 0; font-size: 12px; color: #929ba7; }\n .member-actions { flex-shrink: 0; }\n .member-editor { border-top: 1px solid rgba(128,128,128,.2); padding: 18px; }\n .add-child-btn { align-self: flex-start; margin-left: 26px; }\n .editor-actions { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(128,128,128,.2); }\n .metric-fields .form-control, .metric-fields .form-select { font-size: 14px; }\n .metric-fields textarea { min-height: 72px; line-height: 1.5; }\n .metric-fields .form-text { font-size: 13px !important; line-height: 1.5; }\n .group-mode-help { font-size: 14px; line-height: 1.5; }\n @media (max-width: 600px) {\n .settings-section { padding: 12px; }\n .group-card-header { flex-wrap: wrap; }\n .group-card-preview { margin-left: 0; }\n .group-member-child { margin-left: 16px; width: calc(100% - 16px); }\n .member-toggle { flex-wrap: wrap; gap: 6px; padding: 10px; }\n .member-editor { padding: 12px; }\n }\n .form-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; margin-bottom: 4px; font-size: 14px; font-weight: 500; }\n .icon-input-wrap { position: relative; }\n .icon-picker-panel {\n margin-top: 10px;\n padding: 12px;\n border-radius: 8px;\n border: 1px solid var(--stats-field-border);\n background: var(--theme-bg, var(--bs-body-bg, #1e1e1e));\n }\n .icon-picker-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--stats-field-fg);\n margin-bottom: 10px;\n }\n .icon-picker-filters { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 8px; margin-bottom: 10px; }\n .icon-picker-filters .form-control, .icon-picker-filters .form-select { min-width: 0; font-size: 13px; }\n .icon-picker-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));\n gap: 8px;\n max-height: 282px;\n overflow-y: auto;\n padding: 3px;\n }\n .icon-picker-item {\n min-width: 0;\n min-height: 70px;\n border-radius: 6px;\n border: 1px solid var(--stats-field-border);\n background: var(--stats-field-bg);\n color: var(--stats-field-fg);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 7px;\n cursor: pointer;\n padding: 10px 6px;\n }\n .icon-picker-item svg, .icon-picker-item i { flex-shrink: 0; font-size: 22px; }\n .icon-preset-label { font-size: 12px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; text-align: center; }\n .icon-picker-item:hover { border-color: var(--stats-field-hover); }\n .icon-picker-item.active { border-color: var(--stats-focus); box-shadow: inset 0 0 0 1px var(--stats-focus); background: #3d8beb26; }\n .icon-picker-item:focus-visible { outline: 2px solid var(--stats-focus); outline-offset: 1px; }\n .icon-empty { padding: 18px 8px; text-align: center; color: var(--stats-field-muted); font-size: 13px; }\n @media (max-width: 600px) { .icon-picker-filters { grid-template-columns: minmax(0, 1fr); } }\n .scope-help { font-size: 13px; }\n .scope-options { max-height: 220px; overflow-y: auto; border: 1px solid rgba(128,128,128,.3); border-radius: 4px; }\n .scope-option { display: flex; align-items: center; gap: 9px; padding: 8px 10px; cursor: pointer; border-bottom: 1px solid rgba(128,128,128,.15); }\n .scope-option:last-child { border-bottom: 0; }\n .scope-option:hover { background: rgba(128,128,128,.08); }\n .scope-option .form-check-input { flex: 0 0 auto; margin: 0; }\n .scope-name { flex: 1 1 auto; overflow-wrap: anywhere; }\n .scope-selected { display: flex; flex-wrap: wrap; gap: 6px; }\n .scope-selection { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(128,128,128,.3); border-radius: 4px; padding: 3px 4px 3px 8px; }\n .scope-selection .btn { padding: 0 5px; }\n .scope-missing { border-color: #bf974a; }\n :host-context(.theme-dark) .separator { background: rgba(255,255,255,0.1); }\n ']}),v("design:paramtypes",[Ia.PlatformService,Ia.ConfigService,Sg.DomSanitizer])],Kg);let Yg=class extends Ma.SettingsTabProvider{constructor(t){super(),this.translate=t,this.id="server-stats",this.icon="fas fa-server",this.title=this.translate.instant("Server Stats"),setTimeout(()=>this.setTitle(this.translate.instant("Server Stats")),10)}setTitle(t){this.title=t}getComponentType(){return Kg}};var Jg;Yg=b([(0,y.Injectable)(),v("design:paramtypes",["function"==typeof(Zg=void 0!==Ia.TranslateService&&Ia.TranslateService)?Zg:Object])],Yg);const Xg=zm.join(Hm.tmpdir(),"tabby-server-stats.log");let Qg=0;const tf=t=>{if(Ig.isDebugEnabled)try{if(Qg++,Qg%100==0)try{jm.statSync(Xg).size>2097152&&jm.writeFileSync(Xg,`[${(new Date).toISOString()}] [log rotated]\n`)}catch(t){}jm.appendFileSync(Xg,`${(new Date).toISOString()} ${t}\n`)}catch(t){}};let ef=class{constructor(t,e,n,i,s,a,o){var r,l,c,d;this.app=t,this.config=e,this.componentFactoryResolver=n,this.appRef=i,this.injector=s,this.statsService=a,this.floatingRef=null,this.floatingElem=null,this.activeDisplayMode=null,this.tabInstances=new WeakMap,this.attachedTabs=new Set,this.tabElementMap=new Map,this.observer=null,this.disposables=[],this.styleNode=null,this.observerRetry=null,this.failed=!1,this.mutationScheduled=!1,this.pendingAdded=new Set,this.pendingRemoved=new Set,this.mutationBurst=0,this.mutationBurstTimer=null,this.scanTimer=null,Ig.isDebugEnabled=Boolean(null===(d=null===(c=null===(l=null===(r=this.config)||void 0===r?void 0:r.store)||void 0===l?void 0:l.plugin)||void 0===c?void 0:c.serverStats)||void 0===d?void 0:d.debugLogging),this.config.changed$.subscribe(()=>{var t,e,n,i;Ig.isDebugEnabled=Boolean(null===(i=null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.debugLogging)}),tf("[init] constructor start"),this.config.ready$.subscribe(()=>{var t,e,n,i;Ig.isDebugEnabled=Boolean(null===(i=null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.debugLogging),setTimeout(()=>{this.safeRun("translations",()=>{for(const[t,e]of Object.entries(Qm))o.setTranslation(t,e,!0)})},1e3)}),this.config.ready$.subscribe(()=>{setTimeout(()=>{tf("[event] config.ready"),this.safeRun("applyDisplayMode:ready",()=>this.applyDisplayMode(this.getDisplayMode()))},500)}),this.config.changed$.subscribe(()=>{tf("[event] config.changed"),this.safeRun("applyDisplayMode:changed",()=>this.applyDisplayMode(this.getDisplayMode()))}),tf("[init] constructor end")}getDisplayMode(){var t,e,n,i;return(null===(i=null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.displayMode)||"bottomBar"}safeRun(t,e){if(!this.failed)try{e()}catch(e){this.failed=!0,tf(`[error] ${t}: ${e instanceof Error?e.stack||e.message:String(e)}`)}}applyDisplayMode(t){tf(`[state] applyDisplayMode ${t}`);const e=this.activeDisplayMode;this.activeDisplayMode=t,e!==t?(this.destroyFloating(),this.teardownAllTabs(),"floatingPanel"===t?this.safeRun("createFloatingPanel",()=>this.createFloatingPanel()):(this.safeRun("ensureGlobalStyle",()=>this.ensureGlobalStyle()),this.safeRun("initializePerTabBars",()=>this.initializePerTabBars()))):"bottomBar"===t&&0===this.attachedTabs.size&&this.initializePerTabBars()}createFloatingPanel(){tf("[state] createFloatingPanel");const t=this.componentFactoryResolver.resolveComponentFactory($g);this.floatingRef=t.create(this.injector),this.appRef.attachView(this.floatingRef.hostView),this.floatingElem=this.floatingRef.hostView.rootNodes[0],document.body.appendChild(this.floatingElem),this.floatingRef.changeDetectorRef.detectChanges(),setTimeout(()=>this.floatingRef.instance.checkAndFetch(),100)}initializePerTabBars(){tf("[state] initializePerTabBars"),this.safeRun("rebuildTabElementMap",()=>this.rebuildTabElementMap()),this.safeRun("attachExistingTabs",()=>this.attachExistingTabs()),this.safeRun("observeTabLifecycle",()=>this.observeTabLifecycle()),this.safeRun("startMutationObserver",()=>this.startMutationObserver()),this.safeRun("startScanTimer",()=>this.startScanTimer())}ensureGlobalStyle(){if(this.styleNode)return;if(!document.head)return void this.scheduleObserverRetry();tf("[state] ensureGlobalStyle");const t=document.createElement("style");t.setAttribute("data-server-stats-style","1"),t.textContent="\n ssh-tab.server-stats-tab {\n display: flex;\n flex-direction: column;\n }\n ssh-tab.server-stats-tab > .server-stats-bottom-host {\n flex: 0 0 auto;\n width: 100%;\n }\n ssh-tab.server-stats-tab > *:not(.server-stats-bottom-host) {\n flex: 1 1 auto;\n min-height: 0;\n }\n .server-stats-bottom-host {\n width: 100%;\n }\n ",document.head.appendChild(t),this.styleNode=t}attachExistingTabs(){const t=this.getObserverTarget();if(!t)return void this.scheduleObserverRetry();const e=t.querySelectorAll("ssh-tab"),n=[];e.forEach(t=>{const e=t;this.tabInstances.has(e)||"1"===e.getAttribute("data-ss-attached")||n.push(e)}),n.length>0&&(tf(`[state] attachExistingTabs found ${n.length} unattached tabs`),this.rebuildTabElementMap(),n.forEach(t=>this.attachToSshTab(t)))}startMutationObserver(){const t=this.getObserverTarget();if(!t)return tf("[state] startMutationObserver: no target"),void this.scheduleObserverRetry();tf("[state] startMutationObserver: ok"),this.observer&&this.observer.disconnect(),this.observer=new MutationObserver(t=>{let e=0;t.forEach(t=>{const n=t.target;n&&"function"==typeof n.closest&&n.closest("ssh-tab")||(t.addedNodes.forEach(t=>this.queueMutationNode(t,!0)),t.removedNodes.forEach(t=>this.queueMutationNode(t,!1)),e++)}),e>0&&(this.trackMutationBurst(e),this.flushMutationQueue())}),this.observer.observe(t,{childList:!0,subtree:!0})}queueMutationNode(t,e){t instanceof HTMLElement&&(e?this.pendingAdded.add(t):this.pendingRemoved.add(t))}flushMutationQueue(){this.mutationScheduled||(this.mutationScheduled=!0,window.setTimeout(()=>{this.mutationScheduled=!1,this.pendingAdded.forEach(t=>this.scanNodeForTabs(t)),this.pendingRemoved.forEach(t=>this.handleRemovedNode(t)),this.pendingAdded.clear(),this.pendingRemoved.clear()},0))}getObserverTarget(){return document.querySelector("app-root > div > .content")||null}trackMutationBurst(t){this.mutationBurst+=t,this.mutationBurstTimer||(this.mutationBurstTimer=window.setTimeout(()=>{this.mutationBurst=0,this.mutationBurstTimer=null},1e3)),this.mutationBurst>2e3&&this.observer&&(tf("[state] mutation burst detected, disabling observer"),this.observer.disconnect(),this.observer=null)}scheduleObserverRetry(){this.observerRetry||(tf("[state] scheduleObserverRetry"),this.observerRetry=window.setTimeout(()=>{this.observerRetry=null,"bottomBar"===this.activeDisplayMode&&(tf("[state] observerRetry tick"),this.safeRun("ensureGlobalStyle:retry",()=>this.ensureGlobalStyle()),this.safeRun("attachExistingTabs:retry",()=>this.attachExistingTabs()),this.safeRun("startMutationObserver:retry",()=>this.startMutationObserver()))},250))}scanNodeForTabs(t){t instanceof HTMLElement&&(t.tagName&&"ssh-tab"===t.tagName.toLowerCase()?this.attachToSshTab(t):t.querySelectorAll("ssh-tab").forEach(t=>this.attachToSshTab(t)))}handleRemovedNode(t){t instanceof HTMLElement&&(t.tagName&&"ssh-tab"===t.tagName.toLowerCase()?this.tabInstances.has(t)&&this.detachFromTab(t):t.querySelectorAll("ssh-tab").forEach(t=>this.detachFromTab(t)))}startScanTimer(){this.scanTimer||(this.scanTimer=window.setInterval(()=>{"bottomBar"===this.activeDisplayMode&&this.attachExistingTabs()},1500))}attachToSshTab(t){var e,n;if("bottomBar"!==this.activeDisplayMode)return;if(!t||this.tabInstances.has(t)||"1"===t.getAttribute("data-ss-attached"))return;tf("[state] attachToSshTab"),this.rebuildTabElementMap(),t.setAttribute("data-ss-attached","1"),t.classList.add("server-stats-tab");const i=document.createElement("div");i.classList.add("server-stats-bottom-host"),i.setAttribute("data-ss-host","1"),t.appendChild(i);const s=this.componentFactoryResolver.resolveComponentFactory(Ag).create(this.injector),a=this.resolveSessionForElement(t);void 0!==s.instance.useExternalController&&(s.instance.useExternalController=!0),s.instance.externalSessionResolver=()=>this.resolveSessionForElement(t),s.instance.bindToSession&&s.instance.bindToSession(a),this.appRef.attachView(s.hostView);const o=s.hostView.rootNodes[0];i.appendChild(o),s.changeDetectorRef.detectChanges();const r=()=>{try{window.dispatchEvent(new Event("resize"))}catch(t){}const e=this.resolveTabForElement(t);if(e&&e.frontend)try{"function"==typeof e.frontend.resizeHandler?e.frontend.resizeHandler():e.frontend.fitAddon&&"function"==typeof e.frontend.fitAddon.fit&&e.frontend.fitAddon.fit()}catch(t){}};setTimeout(r,50),setTimeout(r,250);let l=null;"undefined"!=typeof ResizeObserver&&(l=new ResizeObserver(()=>{r()}),l.observe(i));const c=this.resolveTabForElement(t);if(c&&"function"==typeof c.writeRaw&&!c.__ss_patched){c.__ss_patched=!0;const t=c.writeRaw.bind(c);c.writeRaw=async function(e){if(!this.frontend&&this.frontendReady$)try{await new Promise(t=>{const e=this.frontendReady$.subscribe(()=>{e&&e.unsubscribe(),t()});setTimeout(t,2e3)})}catch(t){}try{return await t(e)}catch(t){if(t&&t.message&&t.message.includes("Frontend not ready"))return;throw t}}}let d=null;c&&c.frontendReady$&&(d=c.frontendReady$.subscribe(()=>{setTimeout(()=>{r(),f()},200)}));const p={last:null};let h=a,u=!0,m=0;const g=async()=>{if(!u)return null;const e=this.resolveTabForElement(t);if(e&&(!1===e.frontendIsReady||!e.frontend))return{data:null,session:null,supported:!1};const n=this.resolveSessionForElement(t);if(n!==h&&(h=n,p.last=null),s.instance.bindToSession&&s.instance.bindToSession(h),!h||!1===h.open)return{data:null,session:h,supported:!1};const i=h;if(!this.statsService.isPlatformSupport(i))return{data:null,session:h,supported:!1};const a=await this.statsService.fetchStats(i);if(!u||!1===i.open||h!==i||this.resolveSessionForElement(t)!==i)return null;const o=this.resolveTabForElement(t);return!o||!1!==o.frontendIsReady&&o.frontend?{data:a,session:i,supported:!0}:null},f=async()=>{var e,n,i,a,o,r,l,c,d,h,f,b;if(!u)return;const v=m,y=null===(a=null===(i=null===(n=null===(e=this.config)||void 0===e?void 0:e.store)||void 0===n?void 0:n.plugin)||void 0===i?void 0:i.serverStats)||void 0===a?void 0:a.enabled,x=this.getDisplayMode();if(!y||"bottomBar"!==x)return void(s.instance.hideExternal&&s.instance.hideExternal());let _;try{_=await g()}catch(t){return void(u&&v===m&&(null===(r=(o=s.instance).hideExternal)||void 0===r||r.call(o)))}u&&v===m&&((null===(h=null===(d=null===(c=null===(l=this.config)||void 0===l?void 0:l.store)||void 0===c?void 0:c.plugin)||void 0===d?void 0:d.serverStats)||void 0===h?void 0:h.enabled)&&"bottomBar"===this.getDisplayMode()?_&&(!_.session||!1!==_.session.open&&this.resolveSessionForElement(t)===_.session)&&(_.session&&_.supported?_.data?(p.last=_.data,s.instance.renderExternalStats&&s.instance.renderExternalStats(_.data)):s.instance.setExternalLoading&&s.instance.setExternalLoading(!1):s.instance.hideExternal&&s.instance.hideExternal()):null===(b=(f=s.instance).hideExternal)||void 0===b||b.call(f))},b=()=>{var t,e,n,i;if(!u)return;m++;const a=null===(i=null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.enabled,o=this.getDisplayMode();a&&"bottomBar"===o?(s.instance.setExternalLoading&&s.instance.setExternalLoading(!0),setTimeout(()=>f(),300)):s.instance.hideExternal&&s.instance.hideExternal()};b();const v=window.setInterval(f,1e3),y=null===(e=this.config.changed$)||void 0===e?void 0:e.subscribe(()=>{b()}),x=null===(n=this.app.tabsChanged$)||void 0===n?void 0:n.subscribe(()=>{f()});this.tabInstances.set(t,{teardown:()=>{if(u){if(u=!1,m++,null==x||x.unsubscribe(),l){try{l.disconnect()}catch(t){}l=null}v&&clearInterval(v),y&&"function"==typeof y.unsubscribe&&y.unsubscribe(),d&&"function"==typeof d.unsubscribe&&d.unsubscribe();try{s.destroy()}catch(t){}try{this.appRef.detachView(s.hostView)}catch(t){}i.parentNode===t&&i.parentNode.removeChild(i),t.removeAttribute("data-ss-attached"),t.classList.remove("server-stats-tab"),setTimeout(r,50)}},timerId:v,collector:g,state:p,configSub:y}),this.attachedTabs.add(t)}detachFromTab(t){const e=this.tabInstances.get(t);e&&(tf("[state] detachFromTab"),e.teardown(),this.tabInstances.delete(t)),this.attachedTabs.delete(t),this.tabElementMap.delete(t)}rebuildTabElementMap(){this.tabElementMap.clear(),this.getAllLeafTabs().forEach(t=>{const e=this.getTabElement(t);e&&this.tabElementMap.set(e,t)})}getAllLeafTabs(){const t=[],e=n=>{if(n){if("function"==typeof n.getAllTabs){const t=n.getAllTabs();if(Array.isArray(t))return void t.forEach(t=>e(t))}t.push(n)}};return Array.isArray(this.app.tabs)&&this.app.tabs.forEach(t=>e(t)),t}getTabElement(t){if(!t)return null;const e=t.element&&t.element.nativeElement;if(e instanceof HTMLElement)return e;const n=t.hostView&&t.hostView.rootNodes;if(n&&n[0]instanceof HTMLElement)return n[0];const i=t.viewContainerEmbeddedRef&&t.viewContainerEmbeddedRef.rootNodes;return i&&i[0]instanceof HTMLElement?i[0]:null}resolveTabForElement(t){const e=this.tabElementMap.get(t);if(e)return e;for(const[e,n]of this.tabElementMap.entries())if(e&&e.contains&&e.contains(t))return n;return null}resolveSessionForElement(t){const e=this.tabElementMap.get(t);if(e)return this.resolveSessionFromTab(e);for(const[e,n]of this.tabElementMap.entries())if(e&&e.contains&&e.contains(t))return this.resolveSessionFromTab(n);return null}resolveSessionFromTab(t){return t?t.session?t.session:t.focusedTab?this.resolveSessionFromTab(t.focusedTab):null:null}observeTabLifecycle(){var t,e,n,i;this.disposables.forEach(t=>t()),this.disposables=[],[null===(t=this.app.tabRemoved$)||void 0===t?void 0:t.subscribe(t=>{const e=this.getTabElement(t);e&&this.detachFromTab(e),this.rebuildTabElementMap()}),null===(e=this.app.tabClosed$)||void 0===e?void 0:e.subscribe(t=>{const e=this.getTabElement(t);e&&this.detachFromTab(e),this.rebuildTabElementMap()}),null===(n=this.app.tabOpened$)||void 0===n?void 0:n.subscribe(()=>{this.rebuildTabElementMap(),this.attachExistingTabs()}),null===(i=this.app.tabsChanged$)||void 0===i?void 0:i.subscribe(()=>{this.rebuildTabElementMap(),this.attachExistingTabs()})].forEach(t=>{t&&"function"==typeof t.unsubscribe&&this.disposables.push(()=>t.unsubscribe())})}destroyFloating(){if(this.floatingRef){try{this.appRef.detachView(this.floatingRef.hostView)}catch(t){}this.floatingRef.destroy(),this.floatingElem&&this.floatingElem.parentNode&&this.floatingElem.parentNode.removeChild(this.floatingElem),this.floatingRef=null,this.floatingElem=null}}teardownAllTabs(){this.observer&&(this.observer.disconnect(),this.observer=null),this.scanTimer&&(clearInterval(this.scanTimer),this.scanTimer=null),this.disposables.forEach(t=>t()),this.disposables=[],this.attachedTabs.forEach(t=>{const e=this.tabInstances.get(t);e&&e.teardown()}),this.attachedTabs.clear(),this.tabInstances=new WeakMap,this.tabElementMap.clear()}};ef=b([(0,y.NgModule)({imports:[_.CommonModule,w.FormsModule,Lm,Ca(),Da],declarations:[Vg,$g,Ag,Kg],entryComponents:[$g,Ag,Kg],providers:[{provide:Ia.ConfigProvider,useClass:Xm,multi:!0},{provide:Ia.ToolbarButtonProvider,useClass:Mg,multi:!0},{provide:Ma.SettingsTabProvider,useClass:Yg,multi:!0},Ig]}),v("design:paramtypes",[Ia.AppService,Ia.ConfigService,y.ComponentFactoryResolver,y.ApplicationRef,y.Injector,Ig,"function"==typeof(Jg=void 0!==Ia.TranslateService&&Ia.TranslateService)?Jg:Object])],ef);const nf=ef;return f})());
|
|
1
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("tabby-core"),require("tabby-settings"),require("fs"),require("os"),require("path"),require("@angular/platform-browser"));else if("function"==typeof define&&define.amd)define(["@angular/core","@angular/common","@angular/forms","rxjs","rxjs/operators","tabby-core","tabby-settings","fs","os","path","@angular/platform-browser"],e);else{var n="object"==typeof exports?e(require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("tabby-core"),require("tabby-settings"),require("fs"),require("os"),require("path"),require("@angular/platform-browser")):e(t["@angular/core"],t["@angular/common"],t["@angular/forms"],t.rxjs,t["rxjs/operators"],t["tabby-core"],t["tabby-settings"],t.fs,t.os,t.path,t["@angular/platform-browser"]);for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(this,(t,e,n,i,a,s,o,r,l,c,d)=>(()=>{"use strict";var p,u,m={165:t=>{t.exports=d},182:t=>{t.exports=n},234:t=>{t.exports=l},358:t=>{t.exports=e},439:t=>{t.exports=a},650:t=>{t.exports=s},700:t=>{t.exports=o},860:e=>{e.exports=t},911:t=>{t.exports=c},947:t=>{t.exports=r},961:t=>{t.exports=i},977:t=>{t.exports=JSON.parse('[{"id":"single-uptime","kind":"metric","label":"运行时间","labels":{"en":"Uptime","zh":"运行时间"},"description":"系统持续运行时间。","descriptions":{"en":"System uptime.","zh":"系统持续运行时间。"},"metric":{"label":"Uptime","command":"awk \'{d=int($1/86400); h=int(($1%86400)/3600); print d\\"d \\"h\\"h\\"}\' /proc/uptime 2>/dev/null || echo \\"-\\"","type":"text","icon":"stats-uptime","color":"#00ff00","interval":60,"suffix":"","id":"single-uptime","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-temperature","kind":"metric","label":"温度","labels":{"en":"Temperature","zh":"温度"},"description":"第一个温度传感器读数。","descriptions":{"en":"Temperature from the first thermal zone.","zh":"第一个温度传感器读数。"},"metric":{"label":"Temp","command":"awk \'{printf \\"%.1f\\\\n\\",$1/1000}\' /sys/class/thermal/thermal_zone0/temp","type":"text","icon":"stats-temperature","color":"#00ff00","interval":5,"suffix":"°C","colorRules":[{"operator":">=","value":"80","color":"#ff0000"},{"operator":">=","value":"65","color":"#ffa500"}],"id":"single-temperature","checkCommand":"test -r /sys/class/thermal/thermal_zone0/temp","checkMode":"exitCode","checkExpected":"0","unavailableText":"Unavailable","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-load","kind":"metric","label":"系统负载","labels":{"en":"Load","zh":"系统负载"},"description":"系统的一分钟平均负载。","descriptions":{"en":"One-minute system load.","zh":"系统的一分钟平均负载。"},"metric":{"label":"Load","command":"cat /proc/loadavg | awk \'{print $1}\'","type":"text","icon":"stats-cpu-load","color":"#00ff00","interval":5,"suffix":"","id":"single-load","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-users","kind":"metric","label":"登录用户","labels":{"en":"Users","zh":"登录用户"},"description":"系统记录的登录会话数量;悬停按用户名汇总会话数,包含终端与控制台登录,不等同于全部 TCP 或后台 SSH 连接。","descriptions":{"en":"Login sessions recorded by the system. Hover to group session counts by username, including terminal and console logins; this is not a count of all TCP or background SSH connections.","zh":"系统记录的登录会话数量;悬停按用户名汇总会话数,包含终端与控制台登录,不等同于全部 TCP 或后台 SSH 连接。"},"metric":{"label":"Users","command":"_tabby_who=$(LC_ALL=C who 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$_tabby_who\\" | awk \'NF {count++} END {print count+0}\'","checkCommand":"command -v who >/dev/null 2>&1","checkMode":"exitCode","checkExpected":"0","unavailableText":"Unavailable","detailCommand":"_tabby_who=$(LC_ALL=C who 2>/dev/null) || exit 1; _tabby_users=$(printf \'%s\\\\n\' \\"$_tabby_who\\" | awk \'NF {count[$1]++} END {for(user in count) printf \\"%s\\\\t%d\\\\n\\",user,count[user]}\') || exit 1; _tabby_users=$(printf \'%s\\\\n\' \\"$_tabby_users\\" | LC_ALL=C sort) || exit 1; printf \'%s\\\\n\' \\"$_tabby_users\\" | awk -F \'\\\\t\' \'NF {printf \\"%s%s ×%d\\",n++?\\", \\":\\"\\",$1,$2} END {if(!n) printf \\"-\\"; printf \\"\\\\n\\"}\'","type":"text","icon":"users","color":"#00ff00","interval":10,"suffix":"","id":"single-users","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-docker","kind":"metric","label":"Docker 容器","labels":{"en":"Docker","zh":"Docker 容器"},"description":"运行中的 Docker 容器数量。","descriptions":{"en":"Number of running Docker containers.","zh":"运行中的 Docker 容器数量。"},"metric":{"label":"Docker","command":"docker ps -q 2>/dev/null | wc -l","type":"text","icon":"stats-container","color":"#00ff00","interval":10,"suffix":" run","id":"single-docker","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-gpu-memory","kind":"metric","label":"GPU 显存","labels":{"en":"GPU memory","zh":"GPU 显存"},"description":"总显存使用率;悬停显示剩余/总显存(GB)。","descriptions":{"en":"Total VRAM usage percentage; hover for free/total GB.","zh":"总显存使用率;悬停显示剩余/总显存(GB)。"},"metric":{"id":"single-gpu-memory","label":"GPU","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"tabby_gpu_value() { printf \'%s\\\\n\' \\"$1\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'; }; if gpu_data=$(nvidia-smi --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) && tabby_gpu_value \\"$gpu_data\\"; then :; else gpu_data=$(for gpu_index in 0 1 2 3 4 5 6 7; do gpu_row=$(nvidia-smi --id=\\"$gpu_index\\" --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || continue; tabby_gpu_value \\"$gpu_row\\" >/dev/null && printf \'%s\\\\n\' \\"$gpu_row\\"; done); tabby_gpu_value \\"$gpu_data\\"; fi","detailCommand":"tabby_gpu_value() { printf \'%s\\\\n\' \\"$1\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GB\\\\n\\",free/1024,total/1024}\'; }; if gpu_data=$(nvidia-smi --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) && tabby_gpu_value \\"$gpu_data\\"; then :; else gpu_data=$(for gpu_index in 0 1 2 3 4 5 6 7; do gpu_row=$(nvidia-smi --id=\\"$gpu_index\\" --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || continue; tabby_gpu_value \\"$gpu_row\\" >/dev/null && printf \'%s\\\\n\' \\"$gpu_row\\"; done); tabby_gpu_value \\"$gpu_data\\"; fi","checkCommand":"tabby_gpu_exists() { gpu_data=$(nvidia-smi \\"$@\\" --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || return 1; printf \'%s\\\\n\' \\"$gpu_data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 ~ /^[0-9]+$/) found=1} END {exit !found}\'; }; tabby_gpu_exists || (for gpu_index in 0 1 2 3 4 5 6 7; do tabby_gpu_exists --id=\\"$gpu_index\\" && exit 0; done; exit 1)","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":true,"visibleWhenUnavailable":true,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}],"displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"lishuainan0209 / Tabby Group Server Stats","url":"https://github.com/lishuainan0209/tabby-group-server-stats","license":"MIT"}},{"id":"single-ssh-sessions","kind":"metric","label":"SSH 会话","labels":{"en":"SSH Sessions","zh":"SSH 会话"},"description":"已建立的 SSH 会话数量。","descriptions":{"en":"Established SSH session count.","zh":"已建立的 SSH 会话数量。"},"metric":{"label":"SSH Sessions","command":"ss -tnp | grep sshd | grep ESTAB | wc -l","type":"text","icon":"terminal","color":"#00ff00","interval":10,"suffix":"","id":"single-ssh-sessions","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-ssh-latency","kind":"metric","label":"SSH 延迟","labels":{"en":"SSH latency","zh":"SSH 延迟"},"description":"当前 SSH 连接的往返延迟。","descriptions":{"en":"Round-trip latency for this SSH connection.","zh":"当前 SSH 连接的往返延迟。"},"metric":{"label":"Ping","command":"set -- $SSH_CONNECTION; v=$(ss -ti \\"dst $1 and dport = $2\\" 2>/dev/null | grep -o \\"rtt:[0-9.]*\\" | head -n1 | cut -d: -f2); awk -v v=\\"${v:-0}\\" \\"BEGIN{printf \\\\\\"%.1f\\\\\\", v}\\"","type":"text","icon":"stats-latency","color":"#00ff00","interval":5,"suffix":" ms","id":"single-ssh-latency","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-i-o-wait","kind":"metric","label":"I/O 等待","labels":{"en":"I/O Wait","zh":"I/O 等待"},"description":"一秒采样中 CPU 等待 I/O 的时间百分比。","descriptions":{"en":"CPU time spent waiting for I/O, sampled over one second.","zh":"一秒采样中 CPU 等待 I/O 的时间百分比。"},"metric":{"label":"I/O Wait","command":"a=$(awk \'/^cpu / { t=0; for(i=2;i<=9;i++) t+=$i; print t,$6; found=1; exit } END { if(!found) exit 1 }\' /proc/stat) || exit 1; sleep 1; b=$(awk \'/^cpu / { t=0; for(i=2;i<=9;i++) t+=$i; print t,$6; found=1; exit } END { if(!found) exit 1 }\' /proc/stat) || exit 1; printf \'%s\\\\n%s\\\\n\' \\"$a\\" \\"$b\\" | awk \'NR==1 { t1=$1; v1=$2 } NR==2 { dt=$1-t1; v=$2; result=dt>0?(v-v1)*100/dt:0; if(result<0) result=0; if(result>100) result=100; printf \\"%.1f\\\\n\\",result }\'","type":"text","icon":"stats-io-wait","color":"#00ff00","interval":10,"suffix":"%","id":"single-i-o-wait","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-steal","kind":"metric","label":"CPU 被占用时间","labels":{"en":"Steal","zh":"CPU 被占用时间"},"description":"一秒采样中被虚拟机监控器占用的 CPU 时间百分比。","descriptions":{"en":"CPU time taken by the hypervisor, sampled over one second.","zh":"一秒采样中被虚拟机监控器占用的 CPU 时间百分比。"},"metric":{"label":"Steal","command":"a=$(awk \'/^cpu / { t=0; for(i=2;i<=9;i++) t+=$i; print t,$9; found=1; exit } END { if(!found) exit 1 }\' /proc/stat) || exit 1; sleep 1; b=$(awk \'/^cpu / { t=0; for(i=2;i<=9;i++) t+=$i; print t,$9; found=1; exit } END { if(!found) exit 1 }\' /proc/stat) || exit 1; printf \'%s\\\\n%s\\\\n\' \\"$a\\" \\"$b\\" | awk \'NR==1 { t1=$1; v1=$2 } NR==2 { dt=$1-t1; v=$2; result=dt>0?(v-v1)*100/dt:0; if(result<0) result=0; if(result>100) result=100; printf \\"%.1f\\\\n\\",result }\'","type":"text","icon":"stats-cpu","color":"#00ff00","interval":10,"suffix":"%","id":"single-steal","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-failed-units","kind":"metric","label":"失败的服务","labels":{"en":"Failed Units","zh":"失败的服务"},"description":"systemd 失败单元数量。","descriptions":{"en":"Failed systemd units.","zh":"systemd 失败单元数量。"},"metric":{"label":"Failed Units","command":"systemctl --failed --no-legend 2>/dev/null | wc -l","type":"text","icon":"stats-health","color":"#00ff00","interval":30,"suffix":"","colorRules":[{"operator":">=","value":"1","color":"#ff0000"}],"id":"single-failed-units","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"single-services","kind":"metric","label":"服务状态","labels":{"en":"Services","zh":"服务状态"},"description":"服务检查示例;使用前请按服务器修改服务名称。","descriptions":{"en":"Example service checks; edit service names to fit the server.","zh":"服务检查示例;使用前请按服务器修改服务名称。"},"metric":{"label":"Services","command":"down=$(for s in kong nginx mongod asterisk redis rabbitmq-server; do systemctl is-active --quiet $s 2>/dev/null || echo $s; done | xargs); if ! systemctl list-units --type=service --state=active 2>/dev/null | grep -q postgres; then down=\\"${down:+$down }postgres\\"; fi; [ -z \\"$down\\" ] && echo \\"OK\\" || echo \\"DOWN: $down\\"","type":"text","icon":"stats-service","color":"#00ff00","interval":30,"suffix":"","colorRules":[{"operator":"==","value":"OK","color":"#00ff00"},{"operator":"contains","value":"DOWN","color":"#ff0000"}],"id":"single-services","displayScope":{"mode":"all","profileIds":[]}},"source":{"name":"tabby-server-stats (adapted)","url":"https://github.com/kasuganosoras/tabby-server-stats","license":"MIT"}},{"id":"gpu-memory-group","kind":"group","label":"GPU 显存","labels":{"en":"GPU memory","zh":"GPU 显存"},"description":"显存使用率;悬停显示剩余/总显存。自动隐藏不存在的 GPU 0–7。","descriptions":{"en":"VRAM use percentage; hover for free/total GB. Missing GPUs 0–7 are hidden.","zh":"显存使用率;悬停显示剩余/总显存(GB)。自动隐藏不存在的 GPU 0–7。"},"source":{"name":"lishuainan0209 / Tabby Group Server Stats","url":"https://github.com/lishuainan0209/tabby-group-server-stats","license":"MIT"},"group":{"id":"gpu-memory-group","label":"GPU 显存","mode":"overview","layout":"vertical","interval":3,"displayScope":{"mode":"all","profileIds":[]},"main":{"id":"gpu-main","label":"GPU","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"tabby_gpu_value() { printf \'%s\\\\n\' \\"$1\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'; }; if gpu_data=$(nvidia-smi --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) && tabby_gpu_value \\"$gpu_data\\"; then :; else gpu_data=$(for gpu_index in 0 1 2 3 4 5 6 7; do gpu_row=$(nvidia-smi --id=\\"$gpu_index\\" --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || continue; tabby_gpu_value \\"$gpu_row\\" >/dev/null && printf \'%s\\\\n\' \\"$gpu_row\\"; done); tabby_gpu_value \\"$gpu_data\\"; fi","detailCommand":"tabby_gpu_value() { printf \'%s\\\\n\' \\"$1\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GB\\\\n\\",free/1024,total/1024}\'; }; if gpu_data=$(nvidia-smi --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) && tabby_gpu_value \\"$gpu_data\\"; then :; else gpu_data=$(for gpu_index in 0 1 2 3 4 5 6 7; do gpu_row=$(nvidia-smi --id=\\"$gpu_index\\" --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || continue; tabby_gpu_value \\"$gpu_row\\" >/dev/null && printf \'%s\\\\n\' \\"$gpu_row\\"; done); tabby_gpu_value \\"$gpu_data\\"; fi","checkCommand":"tabby_gpu_exists() { gpu_data=$(nvidia-smi \\"$@\\" --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || return 1; printf \'%s\\\\n\' \\"$gpu_data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 ~ /^[0-9]+$/) found=1} END {exit !found}\'; }; tabby_gpu_exists || (for gpu_index in 0 1 2 3 4 5 6 7; do tabby_gpu_exists --id=\\"$gpu_index\\" && exit 0; done; exit 1)","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":true,"visibleWhenUnavailable":true,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}]},"children":[{"id":"gpu-0","label":"GPU 0","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"data=$(nvidia-smi --id=0 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'","detailCommand":"data=$(nvidia-smi --id=0 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GB\\\\n\\",free/1024,total/1024}\'","checkCommand":"data=$(nvidia-smi --id=0 --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 == \\"0\\") found=1} END {exit !found}\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":false,"visibleWhenUnavailable":false,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}]},{"id":"gpu-1","label":"GPU 1","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"data=$(nvidia-smi --id=1 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'","detailCommand":"data=$(nvidia-smi --id=1 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GB\\\\n\\",free/1024,total/1024}\'","checkCommand":"data=$(nvidia-smi --id=1 --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 == \\"1\\") found=1} END {exit !found}\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":false,"visibleWhenUnavailable":false,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}]},{"id":"gpu-2","label":"GPU 2","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"data=$(nvidia-smi --id=2 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'","detailCommand":"data=$(nvidia-smi --id=2 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GB\\\\n\\",free/1024,total/1024}\'","checkCommand":"data=$(nvidia-smi --id=2 --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 == \\"2\\") found=1} END {exit !found}\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":false,"visibleWhenUnavailable":false,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}]},{"id":"gpu-3","label":"GPU 3","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"data=$(nvidia-smi --id=3 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'","detailCommand":"data=$(nvidia-smi --id=3 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GB\\\\n\\",free/1024,total/1024}\'","checkCommand":"data=$(nvidia-smi --id=3 --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 == \\"3\\") found=1} END {exit !found}\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":false,"visibleWhenUnavailable":false,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}]},{"id":"gpu-4","label":"GPU 4","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"data=$(nvidia-smi --id=4 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'","detailCommand":"data=$(nvidia-smi --id=4 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GB\\\\n\\",free/1024,total/1024}\'","checkCommand":"data=$(nvidia-smi --id=4 --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 == \\"4\\") found=1} END {exit !found}\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":false,"visibleWhenUnavailable":false,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}]},{"id":"gpu-5","label":"GPU 5","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"data=$(nvidia-smi --id=5 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'","detailCommand":"data=$(nvidia-smi --id=5 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GB\\\\n\\",free/1024,total/1024}\'","checkCommand":"data=$(nvidia-smi --id=5 --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 == \\"5\\") found=1} END {exit !found}\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":false,"visibleWhenUnavailable":false,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}]},{"id":"gpu-6","label":"GPU 6","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"data=$(nvidia-smi --id=6 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'","detailCommand":"data=$(nvidia-smi --id=6 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GB\\\\n\\",free/1024,total/1024}\'","checkCommand":"data=$(nvidia-smi --id=6 --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 == \\"6\\") found=1} END {exit !found}\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":false,"visibleWhenUnavailable":false,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}]},{"id":"gpu-7","label":"GPU 7","type":"text","icon":"stats-vram","suffix":"%","color":"#00ff00","interval":20,"timeout":60,"command":"data=$(nvidia-smi --id=7 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%d\\\\n\\",used*100/total}\'","detailCommand":"data=$(nvidia-smi --id=7 --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk -F, \'NF { if(NF!=3) {bad=1; next} for(i=1;i<=3;i++) {gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$i); if($i !~ /^[0-9]+([.][0-9]+)?$/) bad=1} if($2<=0) bad=1; used+=$1; total+=$2; free+=$3; count++ } END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GB\\\\n\\",free/1024,total/1024}\'","checkCommand":"data=$(nvidia-smi --id=7 --query-gpu=index --format=csv,noheader,nounits 2>/dev/null) || exit 1; printf \'%s\\\\n\' \\"$data\\" | awk \'{gsub(/^[[:space:]]+|[[:space:]]+$/,\\"\\",$0); if($0 == \\"7\\") found=1} END {exit !found}\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"无GPU","showWhenUnavailable":false,"visibleWhenUnavailable":false,"colorRules":[{"operator":">","value":"80","color":"#ff0000"},{"operator":">","value":"50","color":"#ffa500"}]}]}},{"id":"disks-P0磁盘","kind":"group","label":"P0磁盘","group":{"id":"disk-group","label":"P0磁盘","mode":"overview","layout":"vertical","interval":3,"main":{"id":"disk-total","label":"磁盘总余量","type":"text","icon":"stats-disk-space","color":"#00ff00","suffix":" GB","interval":20,"timeout":60,"checkCommand":"","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/data\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.0f\\\\n\\",int(available/1048576)}\'","detailCommand":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/data\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GB\\\\n\\",available/1048576,total/1048576}\'","colorRules":[{"operator":"<","value":"50","color":"#ff0000"},{"operator":"<=","value":"100","color":"#ffa500"}]},"children":[{"id":"disk-root","label":"系统盘","type":"text","icon":"stats-system-disk","color":"#00ff00","suffix":" GB","interval":20,"timeout":60,"checkCommand":"test -d \'/\' && df -Pk -- \'/\' >/dev/null 2>&1","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]},{"id":"disk-mount-0","label":"/data","type":"text","icon":"stats-data-disk","color":"#00ff00","suffix":" GB","interval":20,"timeout":60,"checkCommand":"mountpoint -q -- \'/data\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/data\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/data\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]}],"displayScope":{"mode":"selected","profileIds":[]}},"source":{"name":"lishuainan0209 / Tabby Group Server Stats","url":"https://github.com/lishuainan0209/tabby-group-server-stats","license":"MIT"},"audience":"author-lab","description":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。","descriptions":{"en":"For the author\'s laboratory only. Other users: please do not download or use this preset. Total free capacity across valid unique filesystems; children show the system disk first, then data mounts. Hover for free/total capacity; missing mounts remain visible.","zh":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。"},"profileNames":["P0(ai)","P0(s_lsn)"]},{"id":"disks-P1磁盘","kind":"group","label":"P1磁盘","group":{"id":"disk-group","label":"P1磁盘","mode":"overview","layout":"vertical","interval":3,"main":{"id":"disk-total","label":"磁盘总余量","type":"text","icon":"stats-disk-space","color":"#00ff00","suffix":" GB","interval":20,"timeout":60,"checkCommand":"","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"_disk_rows=$(\\nfor _disk_path in \'/\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.0f\\\\n\\",int(available/1048576)}\'","detailCommand":"_disk_rows=$(\\nfor _disk_path in \'/\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GB\\\\n\\",available/1048576,total/1048576}\'","colorRules":[{"operator":"<","value":"50","color":"#ff0000"},{"operator":"<=","value":"100","color":"#ffa500"}]},"children":[{"id":"disk-root","label":"系统盘","type":"text","icon":"stats-system-disk","color":"#00ff00","suffix":" GB","interval":20,"timeout":60,"checkCommand":"test -d \'/\' && df -Pk -- \'/\' >/dev/null 2>&1","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]}],"displayScope":{"mode":"selected","profileIds":[]}},"source":{"name":"lishuainan0209 / Tabby Group Server Stats","url":"https://github.com/lishuainan0209/tabby-group-server-stats","license":"MIT"},"audience":"author-lab","description":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。","descriptions":{"en":"For the author\'s laboratory only. Other users: please do not download or use this preset. Total free capacity across valid unique filesystems; children show the system disk first, then data mounts. Hover for free/total capacity; missing mounts remain visible.","zh":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。"},"profileNames":["P1(ai)"],"labels":{"en":"P1 host disks","zh":"P1磁盘"}},{"id":"disks-P1容器磁盘","kind":"group","label":"P1容器磁盘","group":{"id":"disk-group","label":"P1容器磁盘","mode":"overview","layout":"vertical","interval":3,"main":{"id":"disk-total","label":"磁盘总余量","type":"text","icon":"stats-disk-space","color":"#00ff00","suffix":" GB","interval":20,"timeout":60,"checkCommand":"","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/public\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.0f\\\\n\\",int(available/1048576)}\'","detailCommand":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/public\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GB\\\\n\\",available/1048576,total/1048576}\'","colorRules":[{"operator":"<","value":"50","color":"#ff0000"},{"operator":"<=","value":"100","color":"#ffa500"}]},"children":[{"id":"disk-root","label":"系统盘","type":"text","icon":"stats-system-disk","color":"#00ff00","suffix":" GB","interval":20,"timeout":60,"checkCommand":"test -d \'/\' && df -Pk -- \'/\' >/dev/null 2>&1","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]},{"id":"disk-mount-0","label":"/public","type":"text","icon":"stats-data-disk","color":"#00ff00","suffix":" GB","interval":20,"timeout":60,"checkCommand":"mountpoint -q -- \'/public\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/public\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/public\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]}],"displayScope":{"mode":"selected","profileIds":[]}},"source":{"name":"lishuainan0209 / Tabby Group Server Stats","url":"https://github.com/lishuainan0209/tabby-group-server-stats","license":"MIT"},"audience":"author-lab","description":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。","descriptions":{"en":"For the author\'s laboratory only. Other users: please do not download or use this preset. Total free capacity across valid unique filesystems; children show the system disk first, then data mounts. Hover for free/total capacity; missing mounts remain visible.","zh":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。"},"profileNames":["P1(s_lsn)"],"labels":{"en":"P1 container disks","zh":"P1容器磁盘"}},{"id":"disks-P2磁盘","kind":"group","label":"P2磁盘","group":{"id":"disk-group","label":"P2磁盘","mode":"overview","layout":"vertical","interval":3,"main":{"id":"disk-total","label":"磁盘总余量","type":"text","icon":"stats-disk-space","color":"#00ff00","suffix":" GB","interval":20,"timeout":60,"checkCommand":"","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/data\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.0f\\\\n\\",int(available/1048576)}\'","detailCommand":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/data\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GB\\\\n\\",available/1048576,total/1048576}\'","colorRules":[{"operator":"<","value":"50","color":"#ff0000"},{"operator":"<=","value":"100","color":"#ffa500"}]},"children":[{"id":"disk-root","label":"系统盘","type":"text","icon":"stats-system-disk","color":"#00ff00","suffix":" GB","interval":20,"timeout":60,"checkCommand":"test -d \'/\' && df -Pk -- \'/\' >/dev/null 2>&1","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]},{"id":"disk-mount-0","label":"/data","type":"text","icon":"stats-data-disk","color":"#00ff00","suffix":" GB","interval":20,"timeout":60,"checkCommand":"mountpoint -q -- \'/data\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/data\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/data\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]}],"displayScope":{"mode":"selected","profileIds":[]}},"source":{"name":"lishuainan0209 / Tabby Group Server Stats","url":"https://github.com/lishuainan0209/tabby-group-server-stats","license":"MIT"},"audience":"author-lab","description":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。","descriptions":{"en":"For the author\'s laboratory only. Other users: please do not download or use this preset. Total free capacity across valid unique filesystems; children show the system disk first, then data mounts. Hover for free/total capacity; missing mounts remain visible.","zh":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。"},"profileNames":["P2(ai)","P2(s_lsn)"]},{"id":"disks-P3磁盘","kind":"group","label":"P3磁盘","group":{"id":"disk-group","label":"P3磁盘","mode":"overview","layout":"vertical","interval":3,"main":{"id":"disk-total","label":"磁盘总余量","type":"text","icon":"stats-disk-space","color":"#00ff00","suffix":" GB","interval":20,"timeout":60,"checkCommand":"","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/data\' \'/lsn_disk1\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.0f\\\\n\\",int(available/1048576)}\'","detailCommand":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/data\' \'/lsn_disk1\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GB\\\\n\\",available/1048576,total/1048576}\'","colorRules":[{"operator":"<","value":"50","color":"#ff0000"},{"operator":"<=","value":"100","color":"#ffa500"}]},"children":[{"id":"disk-root","label":"系统盘","type":"text","icon":"stats-system-disk","color":"#00ff00","suffix":" GB","interval":20,"timeout":60,"checkCommand":"test -d \'/\' && df -Pk -- \'/\' >/dev/null 2>&1","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]},{"id":"disk-mount-0","label":"/data","type":"text","icon":"stats-data-disk","color":"#00ff00","suffix":" GB","interval":20,"timeout":60,"checkCommand":"mountpoint -q -- \'/data\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/data\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/data\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]},{"id":"disk-mount-1","label":"/lsn_disk1","type":"text","icon":"stats-data-disk","color":"#00ff00","suffix":" GB","interval":20,"timeout":60,"checkCommand":"mountpoint -q -- \'/lsn_disk1\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/lsn_disk1\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/lsn_disk1\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]}],"displayScope":{"mode":"selected","profileIds":[]}},"source":{"name":"lishuainan0209 / Tabby Group Server Stats","url":"https://github.com/lishuainan0209/tabby-group-server-stats","license":"MIT"},"audience":"author-lab","description":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。","descriptions":{"en":"For the author\'s laboratory only. Other users: please do not download or use this preset. Total free capacity across valid unique filesystems; children show the system disk first, then data mounts. Hover for free/total capacity; missing mounts remain visible.","zh":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。"},"profileNames":["P3(ai)","P3(s_lsn)"]},{"id":"disks-P4磁盘","kind":"group","label":"P4磁盘","group":{"id":"disk-group","label":"P4磁盘","mode":"overview","layout":"vertical","interval":3,"main":{"id":"disk-total","label":"磁盘总余量","type":"text","icon":"stats-disk-space","color":"#00ff00","suffix":" GB","interval":20,"timeout":60,"checkCommand":"","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/data\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.0f\\\\n\\",int(available/1048576)}\'","detailCommand":"_disk_rows=$(\\nfor _disk_path in \'/\' \'/data\'; do\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n _disk_device=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n case \\"$_disk_device\\" in \'\'|*[!0-9]*) continue;; esac\\n _disk_data=$(df -Pk -- \\"$_disk_path\\" 2>/dev/null) || continue\\n _disk_values=$(printf \'%s\\\\n\' \\"$_disk_data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || continue\\n _disk_current=$(stat -Lc \'%d\' -- \\"$_disk_path\\" 2>/dev/null) || continue\\n [ \\"$_disk_device\\" = \\"$_disk_current\\" ] || continue\\n if [ \\"$_disk_path\\" != / ]; then mountpoint -q -- \\"$_disk_path\\" 2>/dev/null || continue; fi\\n printf \'%s %s\\\\n\' \\"$_disk_device\\" \\"$_disk_values\\"\\ndone\\n)\\nprintf \'%s\\\\n\' \\"$_disk_rows\\" | awk \'NF {if(NF!=3 || $1 !~ /^[0-9]+$/ || $2 !~ /^[0-9]+$/ || $3 !~ /^[0-9]+$/ || $2<=0 || $3>$2) {bad=1; next} if(!seen[$1]++) {total+=$2; available+=$3; count++}} END {if(bad || !count || total<=0) exit 1; printf \\"%.1f/%.1f GB\\\\n\\",available/1048576,total/1048576}\'","colorRules":[{"operator":"<","value":"50","color":"#ff0000"},{"operator":"<=","value":"100","color":"#ffa500"}]},"children":[{"id":"disk-root","label":"系统盘","type":"text","icon":"stats-system-disk","color":"#00ff00","suffix":" GB","interval":20,"timeout":60,"checkCommand":"test -d \'/\' && df -Pk -- \'/\' >/dev/null 2>&1","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]},{"id":"disk-mount-0","label":"/data","type":"text","icon":"stats-data-disk","color":"#00ff00","suffix":" GB","interval":20,"timeout":60,"checkCommand":"mountpoint -q -- \'/data\'","checkMode":"exitCode","checkExpected":"0","unavailableText":"未挂载","showWhenUnavailable":true,"visibleWhenUnavailable":true,"command":"data=$(df -Pk -- \'/data\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.0f\\\\n\\",int($2/1048576)}\'","detailCommand":"data=$(df -Pk -- \'/data\' 2>/dev/null) || exit 1; values=$(printf \'%s\\\\n\' \\"$data\\" | awk \'NR==2 {if(NF<6 || $2 !~ /^[0-9]+$/ || $4 !~ /^[0-9]+$/ || $2<=0 || $4>$2) bad=1; else {total=$2; available=$4; found=1}} NR>2 && NF {bad=1} END {if(bad || !found) exit 1; printf \\"%.0f %.0f\\\\n\\",total,available}\') || exit 1; printf \'%s\\\\n\' \\"$values\\" | awk \'{printf \\"%.1f/%.1f GB\\\\n\\",$2/1048576,$1/1048576}\'","colorRules":[{"operator":"<","value":"20","color":"#ff0000"},{"operator":"<=","value":"40","color":"#ffa500"}]}],"displayScope":{"mode":"selected","profileIds":[]}},"source":{"name":"lishuainan0209 / Tabby Group Server Stats","url":"https://github.com/lishuainan0209/tabby-group-server-stats","license":"MIT"},"audience":"author-lab","description":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。","descriptions":{"en":"For the author\'s laboratory only. Other users: please do not download or use this preset. Total free capacity across valid unique filesystems; children show the system disk first, then data mounts. Hover for free/total capacity; missing mounts remain visible.","zh":"作者实验室自用,其他人请勿下载使用。主标签汇总有效文件系统的总余量;子标签依次为系统盘和数据盘。悬停显示剩余/总容量,未挂载的磁盘保留提醒。"},"profileNames":["P4(ai)","P4(s_lsn)"]},{"id":"cpu-load-group","kind":"group","label":"CPU负载","labels":{"en":"CPU load","zh":"CPU负载"},"description":"线程数与按处理器数量归一化的 1 分钟、5 分钟负载。","descriptions":{"en":"Runnable/total task count and 1-minute / 5-minute load normalized by processor count.","zh":"线程数与按处理器数量归一化的 1 分钟、5 分钟负载。"},"source":{"name":"lishuainan0209 / Tabby Group Server Stats","url":"https://github.com/lishuainan0209/tabby-group-server-stats","license":"MIT"},"group":{"id":"cpu-load-group","label":"CPU负载","mode":"overview","layout":"vertical","interval":3,"emptyText":"","main":{"type":"text","color":"#00ff00","maxValue":100,"suffix":"","icon":"stats-cpu-load","colorRules":[],"checkCommand":"","checkMode":"exitCode","checkExpected":"0","unavailableText":"Unavailable","detailCommand":"","showWhenUnavailable":true,"id":"cpu-load-main","label":"线程数","command":"awk \'{print $4}\' /proc/loadavg"},"children":[{"type":"text","color":"#00ff00","maxValue":100,"suffix":"%","icon":"stats-cpu-load","colorRules":[{"operator":">","value":"150","color":"#ff0000"},{"operator":">","value":"100","color":"#ffa500"}],"checkCommand":"","checkMode":"exitCode","checkExpected":"0","unavailableText":"Unavailable","detailCommand":"awk -v cores=$(nproc) \'{split($4, a, \\"/\\"); printf \\"%d/%d\\\\n\\", a[1], cores}\' /proc/loadavg","showWhenUnavailable":true,"id":"cpu-load-0","label":"1min","command":"awk \'{printf \\"%d\\\\n\\", ($1/\'$(nproc)\')*100}\' /proc/loadavg"},{"type":"text","color":"#00ff00","maxValue":100,"suffix":"%","icon":"stats-cpu-load","colorRules":[{"operator":">","value":"150","color":"#ff0000"},{"operator":">","value":"100","color":"#ffa500"}],"checkCommand":"","checkMode":"exitCode","checkExpected":"0","unavailableText":"Unavailable","detailCommand":"awk -v cores=$(nproc) \'{printf \\"%d/%d\\\\n\\", $2, cores}\' /proc/loadavg","showWhenUnavailable":true,"id":"cpu-load-1","label":"5min","command":"awk \'{printf \\"%d\\\\n\\", ($2/\'$(nproc)\')*100}\' /proc/loadavg"}],"displayScope":{"mode":"all","profileIds":[]}}}]')}},h={};function g(t){var e=h[t];if(void 0!==e)return e.exports;var n=h[t]={exports:{}};return m[t](n,n.exports,g),n.exports}g.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return g.d(e,{a:e}),e},u=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,g.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var n=Object.create(null);g.r(n);var i={};p=p||[null,u({}),u([]),u(u)];for(var a=2&e&&t;("object"==typeof a||"function"==typeof a)&&!~p.indexOf(a);a=u(a))Object.getOwnPropertyNames(a).forEach(e=>i[e]=()=>t[e]);return i.default=()=>t,g.d(n,i),n},g.d=(t,e)=>{for(var n in e)g.o(e,n)&&!g.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},g.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),g.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var f={};function b(t,e,n,i){var a,s=arguments.length,o=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,n,o):a(e,n))||o);return s>3&&o&&Object.defineProperty(e,n,o),o}function v(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}g.r(f),g.d(f,{default:()=>rr}),Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var y=g(860),w=g.t(y,2),x=g(358),k=g(182),_=g(961),I=g(439),D={left:"right",right:"left",bottom:"top",top:"bottom"};function $(t){return t.replace(/left|right|bottom|top/g,function(t){return D[t]})}function C(t){return t.split("-")[0]}var S={start:"end",end:"start"};function M(t){return t.replace(/start|end/g,function(t){return S[t]})}var T="top",E="bottom",N="right",O="left",R="auto",V=[T,E,N,O],F="start",P="end",A="viewport",H="popper",j=V.reduce(function(t,e){return t.concat([e+"-"+F,e+"-"+P])},[]),L=[].concat(V,[R]).reduce(function(t,e){return t.concat([e,e+"-"+F,e+"-"+P])},[]),G=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function B(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function z(t){return t instanceof B(t).Element||t instanceof Element}function U(t){return t instanceof B(t).HTMLElement||t instanceof HTMLElement}function W(t){return"undefined"!=typeof ShadowRoot&&(t instanceof B(t).ShadowRoot||t instanceof ShadowRoot)}function q(t){return((z(t)?t.ownerDocument:t.document)||window.document).documentElement}var Z=Math.max,K=Math.min,Y=Math.round;function J(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Q(){return!/^((?!chrome|android).)*safari/i.test(J())}function X(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),a=1,s=1;e&&U(t)&&(a=t.offsetWidth>0&&Y(i.width)/t.offsetWidth||1,s=t.offsetHeight>0&&Y(i.height)/t.offsetHeight||1);var o=(z(t)?B(t):window).visualViewport,r=!Q()&&n,l=(i.left+(r&&o?o.offsetLeft:0))/a,c=(i.top+(r&&o?o.offsetTop:0))/s,d=i.width/a,p=i.height/s;return{width:d,height:p,top:c,right:l+d,bottom:c+p,left:l,x:l,y:c}}function tt(t){var e=B(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function et(t){return X(q(t)).left+tt(t).scrollLeft}function nt(t){return B(t).getComputedStyle(t)}function it(t){return t?(t.nodeName||"").toLowerCase():null}function at(t){return"html"===it(t)?t:t.assignedSlot||t.parentNode||(W(t)?t.host:null)||q(t)}function st(t){var e=nt(t),n=e.overflow,i=e.overflowX,a=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+i)}function ot(t){return["html","body","#document"].indexOf(it(t))>=0?t.ownerDocument.body:U(t)&&st(t)?t:ot(at(t))}function rt(t,e){var n;void 0===e&&(e=[]);var i=ot(t),a=i===(null==(n=t.ownerDocument)?void 0:n.body),s=B(i),o=a?[s].concat(s.visualViewport||[],st(i)?i:[]):i,r=e.concat(o);return a?r:r.concat(rt(at(o)))}function lt(t){return["table","td","th"].indexOf(it(t))>=0}function ct(t){return U(t)&&"fixed"!==nt(t).position?t.offsetParent:null}function dt(t){for(var e=B(t),n=ct(t);n&<(n)&&"static"===nt(n).position;)n=ct(n);return n&&("html"===it(n)||"body"===it(n)&&"static"===nt(n).position)?e:n||function(t){var e=/firefox/i.test(J());if(/Trident/i.test(J())&&U(t)&&"fixed"===nt(t).position)return null;var n=at(t);for(W(n)&&(n=n.host);U(n)&&["html","body"].indexOf(it(n))<0;){var i=nt(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}function pt(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&W(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function ut(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function mt(t,e,n){return e===A?ut(function(t,e){var n=B(t),i=q(t),a=n.visualViewport,s=i.clientWidth,o=i.clientHeight,r=0,l=0;if(a){s=a.width,o=a.height;var c=Q();(c||!c&&"fixed"===e)&&(r=a.offsetLeft,l=a.offsetTop)}return{width:s,height:o,x:r+et(t),y:l}}(t,n)):z(e)?function(t,e){var n=X(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):ut(function(t){var e,n=q(t),i=tt(t),a=null==(e=t.ownerDocument)?void 0:e.body,s=Z(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),o=Z(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),r=-i.scrollLeft+et(t),l=-i.scrollTop;return"rtl"===nt(a||n).direction&&(r+=Z(n.clientWidth,a?a.clientWidth:0)-s),{width:s,height:o,x:r,y:l}}(q(t)))}function ht(t){return t.split("-")[1]}function gt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ft(t){var e,n=t.reference,i=t.element,a=t.placement,s=a?C(a):null,o=a?ht(a):null,r=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(s){case T:e={x:r,y:n.y-i.height};break;case E:e={x:r,y:n.y+n.height};break;case N:e={x:n.x+n.width,y:l};break;case O:e={x:n.x-i.width,y:l};break;default:e={x:n.x,y:n.y}}var c=s?gt(s):null;if(null!=c){var d="y"===c?"height":"width";switch(o){case F:e[c]=e[c]-(n[d]/2-i[d]/2);break;case P:e[c]=e[c]+(n[d]/2-i[d]/2)}}return e}function bt(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function vt(t,e){return e.reduce(function(e,n){return e[n]=t,e},{})}function yt(t,e){void 0===e&&(e={});var n=e,i=n.placement,a=void 0===i?t.placement:i,s=n.strategy,o=void 0===s?t.strategy:s,r=n.boundary,l=void 0===r?"clippingParents":r,c=n.rootBoundary,d=void 0===c?A:c,p=n.elementContext,u=void 0===p?H:p,m=n.altBoundary,h=void 0!==m&&m,g=n.padding,f=void 0===g?0:g,b=bt("number"!=typeof f?f:vt(f,V)),v=u===H?"reference":H,y=t.rects.popper,w=t.elements[h?v:u],x=function(t,e,n,i){var a="clippingParents"===e?function(t){var e=rt(at(t)),n=["absolute","fixed"].indexOf(nt(t).position)>=0&&U(t)?dt(t):t;return z(n)?e.filter(function(t){return z(t)&&pt(t,n)&&"body"!==it(t)}):[]}(t):[].concat(e),s=[].concat(a,[n]),o=s[0],r=s.reduce(function(e,n){var a=mt(t,n,i);return e.top=Z(a.top,e.top),e.right=K(a.right,e.right),e.bottom=K(a.bottom,e.bottom),e.left=Z(a.left,e.left),e},mt(t,o,i));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}(z(w)?w:w.contextElement||q(t.elements.popper),l,d,o),k=X(t.elements.reference),_=ft({reference:k,element:y,strategy:"absolute",placement:a}),I=ut(Object.assign({},y,_)),D=u===H?I:k,$={top:x.top-D.top+b.top,bottom:D.bottom-x.bottom+b.bottom,left:x.left-D.left+b.left,right:D.right-x.right+b.right},C=t.modifiersData.offset;if(u===H&&C){var S=C[a];Object.keys($).forEach(function(t){var e=[N,E].indexOf(t)>=0?1:-1,n=[T,E].indexOf(t)>=0?"y":"x";$[t]+=S[n]*e})}return $}const wt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var a=n.mainAxis,s=void 0===a||a,o=n.altAxis,r=void 0===o||o,l=n.fallbackPlacements,c=n.padding,d=n.boundary,p=n.rootBoundary,u=n.altBoundary,m=n.flipVariations,h=void 0===m||m,g=n.allowedAutoPlacements,f=e.options.placement,b=C(f),v=l||(b!==f&&h?function(t){if(C(t)===R)return[];var e=$(t);return[M(t),e,M(e)]}(f):[$(f)]),y=[f].concat(v).reduce(function(t,n){return t.concat(C(n)===R?function(t,e){void 0===e&&(e={});var n=e,i=n.placement,a=n.boundary,s=n.rootBoundary,o=n.padding,r=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?L:l,d=ht(i),p=d?r?j:j.filter(function(t){return ht(t)===d}):V,u=p.filter(function(t){return c.indexOf(t)>=0});0===u.length&&(u=p);var m=u.reduce(function(e,n){return e[n]=yt(t,{placement:n,boundary:a,rootBoundary:s,padding:o})[C(n)],e},{});return Object.keys(m).sort(function(t,e){return m[t]-m[e]})}(e,{placement:n,boundary:d,rootBoundary:p,padding:c,flipVariations:h,allowedAutoPlacements:g}):n)},[]),w=e.rects.reference,x=e.rects.popper,k=new Map,_=!0,I=y[0],D=0;D<y.length;D++){var S=y[D],P=C(S),A=ht(S)===F,H=[T,E].indexOf(P)>=0,G=H?"width":"height",B=yt(e,{placement:S,boundary:d,rootBoundary:p,altBoundary:u,padding:c}),z=H?A?N:O:A?E:T;w[G]>x[G]&&(z=$(z));var U=$(z),W=[];if(s&&W.push(B[P]<=0),r&&W.push(B[z]<=0,B[U]<=0),W.every(function(t){return t})){I=S,_=!1;break}k.set(S,W)}if(_)for(var q=function(t){var e=y.find(function(e){var n=k.get(e);if(n)return n.slice(0,t).every(function(t){return t})});if(e)return I=e,"break"},Z=h?3:1;Z>0&&"break"!==q(Z);Z--);e.placement!==I&&(e.modifiersData[i]._skip=!0,e.placement=I,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function xt(t,e,n){return Z(t,K(e,n))}function kt(t){var e=X(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}const _t={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,a=n.mainAxis,s=void 0===a||a,o=n.altAxis,r=void 0!==o&&o,l=n.boundary,c=n.rootBoundary,d=n.altBoundary,p=n.padding,u=n.tether,m=void 0===u||u,h=n.tetherOffset,g=void 0===h?0:h,f=yt(e,{boundary:l,rootBoundary:c,padding:p,altBoundary:d}),b=C(e.placement),v=ht(e.placement),y=!v,w=gt(b),x="x"===w?"y":"x",k=e.modifiersData.popperOffsets,_=e.rects.reference,I=e.rects.popper,D="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,$="number"==typeof D?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),S=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,M={x:0,y:0};if(k){if(s){var R,V="y"===w?T:O,P="y"===w?E:N,A="y"===w?"height":"width",H=k[w],j=H+f[V],L=H-f[P],G=m?-I[A]/2:0,B=v===F?_[A]:I[A],z=v===F?-I[A]:-_[A],U=e.elements.arrow,W=m&&U?kt(U):{width:0,height:0},q=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Y=q[V],J=q[P],Q=xt(0,_[A],W[A]),X=y?_[A]/2-G-Q-Y-$.mainAxis:B-Q-Y-$.mainAxis,tt=y?-_[A]/2+G+Q+J+$.mainAxis:z+Q+J+$.mainAxis,et=e.elements.arrow&&dt(e.elements.arrow),nt=et?"y"===w?et.clientTop||0:et.clientLeft||0:0,it=null!=(R=null==S?void 0:S[w])?R:0,at=H+tt-it,st=xt(m?K(j,H+X-it-nt):j,H,m?Z(L,at):L);k[w]=st,M[w]=st-H}if(r){var ot,rt="x"===w?T:O,lt="x"===w?E:N,ct=k[x],pt="y"===x?"height":"width",ut=ct+f[rt],mt=ct-f[lt],ft=-1!==[T,O].indexOf(b),bt=null!=(ot=null==S?void 0:S[x])?ot:0,vt=ft?ut:ct-_[pt]-I[pt]-bt+$.altAxis,wt=ft?ct+_[pt]+I[pt]-bt-$.altAxis:mt,_t=m&&ft?function(t,e,n){var i=xt(t,e,n);return i>n?n:i}(vt,ct,wt):xt(m?vt:ut,ct,m?wt:mt);k[x]=_t,M[x]=_t-ct}e.modifiersData[i]=M}},requiresIfExists:["offset"]},It={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,a=t.options,s=n.elements.arrow,o=n.modifiersData.popperOffsets,r=C(n.placement),l=gt(r),c=[O,N].indexOf(r)>=0?"height":"width";if(s&&o){var d=function(t,e){return bt("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:vt(t,V))}(a.padding,n),p=kt(s),u="y"===l?T:O,m="y"===l?E:N,h=n.rects.reference[c]+n.rects.reference[l]-o[l]-n.rects.popper[c],g=o[l]-n.rects.reference[l],f=dt(s),b=f?"y"===l?f.clientHeight||0:f.clientWidth||0:0,v=h/2-g/2,y=d[u],w=b-p[c]-d[m],x=b/2-p[c]/2+v,k=xt(y,x,w),_=l;n.modifiersData[i]=((e={})[_]=k,e.centerOffset=k-x,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&pt(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Dt(t,e,n){void 0===n&&(n=!1);var i,a,s=U(e),o=U(e)&&function(t){var e=t.getBoundingClientRect(),n=Y(e.width)/t.offsetWidth||1,i=Y(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),r=q(e),l=X(t,o,n),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(s||!s&&!n)&&(("body"!==it(e)||st(r))&&(c=(i=e)!==B(i)&&U(i)?{scrollLeft:(a=i).scrollLeft,scrollTop:a.scrollTop}:tt(i)),U(e)?((d=X(e,!0)).x+=e.clientLeft,d.y+=e.clientTop):r&&(d.x=et(r))),{x:l.left+c.scrollLeft-d.x,y:l.top+c.scrollTop-d.y,width:l.width,height:l.height}}function $t(t){var e=new Map,n=new Set,i=[];function a(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!n.has(t)){var i=e.get(t);i&&a(i)}}),i.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){n.has(t.name)||a(t)}),i}var Ct={placement:"bottom",modifiers:[],strategy:"absolute"};function St(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function Mt(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,i=void 0===n?[]:n,a=e.defaultOptions,s=void 0===a?Ct:a;return function(t,e,n){void 0===n&&(n=s);var a,o,r={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ct,s),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,d={state:r,setOptions:function(n){var a="function"==typeof n?n(r.options):n;p(),r.options=Object.assign({},s,r.options,a),r.scrollParents={reference:z(t)?rt(t):t.contextElement?rt(t.contextElement):[],popper:rt(e)};var o,c,u=function(t){var e=$t(t);return G.reduce(function(t,n){return t.concat(e.filter(function(t){return t.phase===n}))},[])}((o=[].concat(i,r.options.modifiers),c=o.reduce(function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t},{}),Object.keys(c).map(function(t){return c[t]})));return r.orderedModifiers=u.filter(function(t){return t.enabled}),r.orderedModifiers.forEach(function(t){var e=t.name,n=t.options,i=void 0===n?{}:n,a=t.effect;if("function"==typeof a){var s=a({state:r,name:e,instance:d,options:i});l.push(s||function(){})}}),d.update()},forceUpdate:function(){if(!c){var t=r.elements,e=t.reference,n=t.popper;if(St(e,n)){r.rects={reference:Dt(e,dt(n),"fixed"===r.options.strategy),popper:kt(n)},r.reset=!1,r.placement=r.options.placement,r.orderedModifiers.forEach(function(t){return r.modifiersData[t.name]=Object.assign({},t.data)});for(var i=0;i<r.orderedModifiers.length;i++)if(!0!==r.reset){var a=r.orderedModifiers[i],s=a.fn,o=a.options,l=void 0===o?{}:o,p=a.name;"function"==typeof s&&(r=s({state:r,options:l,name:p,instance:d})||r)}else r.reset=!1,i=-1}}},update:(a=function(){return new Promise(function(t){d.forceUpdate(),t(r)})},function(){return o||(o=new Promise(function(t){Promise.resolve().then(function(){o=void 0,t(a())})})),o}),destroy:function(){p(),c=!0}};if(!St(t,e))return d;function p(){l.forEach(function(t){return t()}),l=[]}return d.setOptions(n).then(function(t){!c&&n.onFirstUpdate&&n.onFirstUpdate(t)}),d}}var Tt={passive:!0},Et={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Nt(t){var e,n=t.popper,i=t.popperRect,a=t.placement,s=t.variation,o=t.offsets,r=t.position,l=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,p=t.isFixed,u=o.x,m=void 0===u?0:u,h=o.y,g=void 0===h?0:h,f="function"==typeof d?d({x:m,y:g}):{x:m,y:g};m=f.x,g=f.y;var b=o.hasOwnProperty("x"),v=o.hasOwnProperty("y"),y=O,w=T,x=window;if(c){var k=dt(n),_="clientHeight",I="clientWidth";k===B(n)&&"static"!==nt(k=q(n)).position&&"absolute"===r&&(_="scrollHeight",I="scrollWidth"),(a===T||(a===O||a===N)&&s===P)&&(w=E,g-=(p&&k===x&&x.visualViewport?x.visualViewport.height:k[_])-i.height,g*=l?1:-1),a!==O&&(a!==T&&a!==E||s!==P)||(y=N,m-=(p&&k===x&&x.visualViewport?x.visualViewport.width:k[I])-i.width,m*=l?1:-1)}var D,$=Object.assign({position:r},c&&Et),C=!0===d?function(t,e){var n=t.x,i=t.y,a=e.devicePixelRatio||1;return{x:Y(n*a)/a||0,y:Y(i*a)/a||0}}({x:m,y:g},B(n)):{x:m,y:g};return m=C.x,g=C.y,l?Object.assign({},$,((D={})[w]=v?"0":"",D[y]=b?"0":"",D.transform=(x.devicePixelRatio||1)<=1?"translate("+m+"px, "+g+"px)":"translate3d("+m+"px, "+g+"px, 0)",D)):Object.assign({},$,((e={})[w]=v?g+"px":"",e[y]=b?m+"px":"",e.transform="",e))}var Ot=Mt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,a=i.scroll,s=void 0===a||a,o=i.resize,r=void 0===o||o,l=B(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&c.forEach(function(t){t.addEventListener("scroll",n.update,Tt)}),r&&l.addEventListener("resize",n.update,Tt),function(){s&&c.forEach(function(t){t.removeEventListener("scroll",n.update,Tt)}),r&&l.removeEventListener("resize",n.update,Tt)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=ft({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,a=void 0===i||i,s=n.adaptive,o=void 0===s||s,r=n.roundOffsets,l=void 0===r||r,c={placement:C(e.placement),variation:ht(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:a,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Nt(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Nt(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},a=e.elements[t];U(a)&&it(a)&&(Object.assign(a.style,n),Object.keys(i).forEach(function(t){var e=i[t];!1===e?a.removeAttribute(t):a.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(t){var i=e.elements[t],a=e.attributes[t]||{},s=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(function(t,e){return t[e]="",t},{});U(i)&&it(i)&&(Object.assign(i.style,s),Object.keys(a).forEach(function(t){i.removeAttribute(t)}))})}},requires:["computeStyles"]}]});const Rt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,i=t.name,a=n.offset,s=void 0===a?[0,0]:a,o=L.reduce(function(t,n){return t[n]=function(t,e,n){var i=C(t),a=[O,T].indexOf(i)>=0?-1:1,s="function"==typeof n?n(Object.assign({},e,{placement:t})):n,o=s[0],r=s[1];return o=o||0,r=(r||0)*a,[O,N].indexOf(i)>=0?{x:r,y:o}:{x:o,y:r}}(n,e.rects,s),t},{}),r=o[e.placement],l=r.x,c=r.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=o}};function Vt(t){return parseInt(`${t}`,10)}function Ft(t){return null!=t?`${t}`:""}function Pt(t,e,n=0){return Math.max(Math.min(t,e),n)}function At(t){return"string"==typeof t}function Ht(t){return!isNaN(Vt(t))}function jt(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}function Lt(t){return null!=t}function Gt(t){return t&&t.then}function Bt(t){return Ht(t)?`0${t}`.slice(-2):""}function zt(t,e){return t&&t.className&&t.className.split&&t.className.split(/\s+/).indexOf(e)>=0}function Ut(t){return(t||document.body).getBoundingClientRect()}function Wt(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}const qt={animation:!0,transitionTimerDelayMs:5},Zt=()=>{},{transitionTimerDelayMs:Kt}=qt,Yt=new Map,Jt=(t,e,n,i)=>{let a=i.context||{};const s=Yt.get(e);if(s)switch(i.runningTransition){case"continue":return _.EMPTY;case"stop":t.run(()=>s.transition$.complete()),a=Object.assign(s.context,a),Yt.delete(e)}const o=n(e,i.animation,a)||Zt;if(!i.animation||"none"===window.getComputedStyle(e).transitionProperty)return t.run(()=>o()),(0,_.of)(void 0).pipe(function(t){return e=>new _.Observable(n=>e.subscribe({next:e=>t.run(()=>n.next(e)),error:e=>t.run(()=>n.error(e)),complete:()=>t.run(()=>n.complete())}))}(t));const r=new _.Subject,l=new _.Subject,c=r.pipe((0,I.endWith)(!0));Yt.set(e,{transition$:r,complete:()=>{l.next(),l.complete()},context:a});const d=function(t){const{transitionDelay:e,transitionDuration:n}=window.getComputedStyle(t);return 1e3*(parseFloat(e)+parseFloat(n))}(e);return t.runOutsideAngular(()=>{const n=(0,_.fromEvent)(e,"transitionend").pipe((0,I.takeUntil)(c),(0,I.filter)(({target:t})=>t===e)),i=(0,_.timer)(d+Kt).pipe((0,I.takeUntil)(c));(0,_.race)(i,n,l).pipe((0,I.takeUntil)(c)).subscribe(()=>{Yt.delete(e),t.run(()=>{o(),r.next(),r.complete()})})}),r.asObservable()},Qt=(t,e,n)=>{let{direction:i,maxSize:a,dimension:s}=n;const{classList:o}=t;function r(){o.add("collapse"),"show"===i?o.add("show"):o.remove("show")}if(e)return a||(a=function(t,e){if("undefined"==typeof navigator)return"0px";const{classList:n}=t,i=n.contains("show");i||n.add("show"),t.style[e]="";const a=t.getBoundingClientRect()[e]+"px";return i||n.remove("show"),a}(t,s),n.maxSize=a,t.style[s]="show"!==i?a:"0px",o.remove("collapse"),o.remove("collapsing"),o.remove("show"),Ut(t),o.add("collapsing")),t.style[s]="show"===i?a:"0px",()=>{r(),o.remove("collapsing"),t.style[s]=""};r()};class Xt{constructor(){this.animation=qt.animation}}Xt.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Xt,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),Xt.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Xt,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Xt,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});class te{constructor(t){this._ngbConfig=t,this.closeOthers=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}te.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:te,deps:[{token:Xt}],target:y["ɵɵFactoryTarget"].Injectable}),te.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:te,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:te,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Xt}]}});let ee=0;class ne{constructor(t){this.templateRef=t}}ne.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ne,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),ne.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ne,isStandalone:!0,selector:"ng-template[ngbPanelHeader]",ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ne,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPanelHeader]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class ie{constructor(t){this.templateRef=t}}ie.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ie,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),ie.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ie,isStandalone:!0,selector:"ng-template[ngbPanelTitle]",ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ie,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPanelTitle]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class ae{constructor(t){this.templateRef=t}}ae.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ae,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),ae.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ae,isStandalone:!0,selector:"ng-template[ngbPanelContent]",ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ae,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPanelContent]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class se{constructor(){this.disabled=!1,this.id="ngb-panel-"+ee++,this.isOpen=!1,this.initClassDone=!1,this.transitionRunning=!1,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter}ngAfterContentChecked(){this.titleTpl=this.titleTpls.first,this.headerTpl=this.headerTpls.first,this.contentTpl=this.contentTpls.first}}se.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:se,deps:[],target:y["ɵɵFactoryTarget"].Directive}),se.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:se,isStandalone:!0,selector:"ngb-panel",inputs:{disabled:"disabled",id:"id",title:"title",type:"type",cardClass:"cardClass"},outputs:{shown:"shown",hidden:"hidden"},queries:[{propertyName:"titleTpls",predicate:ie},{propertyName:"headerTpls",predicate:ne},{propertyName:"contentTpls",predicate:ae}],ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:se,decorators:[{type:y.Directive,args:[{selector:"ngb-panel",standalone:!0}]}],propDecorators:{disabled:[{type:y.Input}],id:[{type:y.Input}],title:[{type:y.Input}],type:[{type:y.Input}],cardClass:[{type:y.Input}],shown:[{type:y.Output}],hidden:[{type:y.Output}],titleTpls:[{type:y.ContentChildren,args:[ie,{descendants:!1}]}],headerTpls:[{type:y.ContentChildren,args:[ne,{descendants:!1}]}],contentTpls:[{type:y.ContentChildren,args:[ae,{descendants:!1}]}]}});class oe{constructor(t){this._El=t,this.ngbRef=new y.EventEmitter}ngOnInit(){this.ngbRef.emit(this._El.nativeElement)}ngOnDestroy(){this.ngbRef.emit(null)}}oe.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:oe,deps:[{token:y.ElementRef}],target:y["ɵɵFactoryTarget"].Directive}),oe.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:oe,isStandalone:!0,selector:"[ngbRef]",outputs:{ngbRef:"ngbRef"},ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:oe,decorators:[{type:y.Directive,args:[{selector:"[ngbRef]",standalone:!0}]}],ctorParameters:function(){return[{type:y.ElementRef}]},propDecorators:{ngbRef:[{type:y.Output}]}});class re{constructor(t,e){this.accordion=t,this.panel=e}set ngbPanelToggle(t){t&&(this.panel=t)}}re.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:re,deps:[{token:(0,y.forwardRef)(()=>le)},{token:se,host:!0,optional:!0}],target:y["ɵɵFactoryTarget"].Directive}),re.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:re,isStandalone:!0,selector:"button[ngbPanelToggle]",inputs:{ngbPanelToggle:"ngbPanelToggle"},host:{attributes:{type:"button"},listeners:{click:"accordion.toggle(panel.id)"},properties:{disabled:"panel.disabled","class.collapsed":"!panel.isOpen","attr.aria-expanded":"panel.isOpen","attr.aria-controls":"panel.id"}},ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:re,decorators:[{type:y.Directive,args:[{selector:"button[ngbPanelToggle]",standalone:!0,host:{type:"button","[disabled]":"panel.disabled","[class.collapsed]":"!panel.isOpen","[attr.aria-expanded]":"panel.isOpen","[attr.aria-controls]":"panel.id","(click)":"accordion.toggle(panel.id)"}}]}],ctorParameters:function(){return[{type:le,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>le)]}]},{type:se,decorators:[{type:y.Optional},{type:y.Host}]}]},propDecorators:{ngbPanelToggle:[{type:y.Input}]}});class le{constructor(t,e,n){this._ngZone=e,this._changeDetector=n,this.activeIds=[],this.destroyOnHide=!0,this.panelChange=new y.EventEmitter,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter,this.animation=t.animation,this.type=t.type,this.closeOtherPanels=t.closeOthers}isExpanded(t){return this.activeIds.indexOf(t)>-1}expand(t){this._changeOpenState(this._findPanelById(t),!0)}expandAll(){this.closeOtherPanels?0===this.activeIds.length&&this.panels.length&&this._changeOpenState(this.panels.first,!0):this.panels.forEach(t=>this._changeOpenState(t,!0))}collapse(t){this._changeOpenState(this._findPanelById(t),!1)}collapseAll(){this.panels.forEach(t=>{this._changeOpenState(t,!1)})}toggle(t){const e=this._findPanelById(t);e&&this._changeOpenState(e,!e.isOpen)}ngAfterContentChecked(){At(this.activeIds)&&(this.activeIds=this.activeIds.split(/\s*,\s*/)),this.panels.forEach(t=>{t.isOpen=!t.disabled&&this.activeIds.indexOf(t.id)>-1}),this.activeIds.length>1&&this.closeOtherPanels&&(this._closeOthers(this.activeIds[0],!1),this._updateActiveIds()),this._ngZone.onStable.pipe((0,I.take)(1)).subscribe(()=>{this.panels.forEach(t=>{const e=t.panelDiv;e?t.initClassDone||(t.initClassDone=!0,Jt(this._ngZone,e,Qt,{animation:!1,runningTransition:"continue",context:{direction:t.isOpen?"show":"hide",dimension:"height"}})):t.initClassDone=!1})})}_changeOpenState(t,e){if(null!=t&&!t.disabled&&t.isOpen!==e){let n=!1;this.panelChange.emit({panelId:t.id,nextState:e,preventDefault:()=>{n=!0}}),n||(t.isOpen=e,t.transitionRunning=!0,e&&this.closeOtherPanels&&this._closeOthers(t.id),this._updateActiveIds(),this._runTransitions(this.animation))}}_closeOthers(t,e=!0){this.panels.forEach(n=>{n.id!==t&&n.isOpen&&(n.isOpen=!1,n.transitionRunning=e)})}_findPanelById(t){return this.panels.find(e=>e.id===t)||null}_updateActiveIds(){this.activeIds=this.panels.filter(t=>t.isOpen&&!t.disabled).map(t=>t.id)}_runTransitions(t){this._changeDetector.detectChanges(),this.panels.forEach(e=>{if(e.transitionRunning){const n=e.panelDiv;Jt(this._ngZone,n,Qt,{animation:t,runningTransition:"stop",context:{direction:e.isOpen?"show":"hide",dimension:"height"}}).subscribe(()=>{e.transitionRunning=!1;const{id:t}=e;e.isOpen?(e.shown.emit(),this.shown.emit(t)):(e.hidden.emit(),this.hidden.emit(t))})}})}}le.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:le,deps:[{token:te},{token:y.NgZone},{token:y.ChangeDetectorRef}],target:y["ɵɵFactoryTarget"].Component}),le.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:le,isStandalone:!0,selector:"ngb-accordion",inputs:{animation:"animation",activeIds:"activeIds",closeOtherPanels:["closeOthers","closeOtherPanels"],destroyOnHide:"destroyOnHide",type:"type"},outputs:{panelChange:"panelChange",shown:"shown",hidden:"hidden"},host:{attributes:{role:"tablist"},properties:{"attr.aria-multiselectable":"!closeOtherPanels"},classAttribute:"accordion"},queries:[{propertyName:"panels",predicate:se}],exportAs:["ngbAccordion"],ngImport:w,template:'\n\t\t<ng-template #t ngbPanelHeader let-panel>\n\t\t\t<button class="accordion-button" [ngbPanelToggle]="panel">\n\t\t\t\t{{ panel.title }}\n\t\t\t\t<ng-template [ngTemplateOutlet]="panel.titleTpl?.templateRef"></ng-template>\n\t\t\t</button>\n\t\t</ng-template>\n\t\t<ng-template ngFor let-panel [ngForOf]="panels">\n\t\t\t<div [class]="\'accordion-item \' + (panel.cardClass || \'\')">\n\t\t\t\t<div\n\t\t\t\t\trole="tab"\n\t\t\t\t\tid="{{ panel.id }}-header"\n\t\t\t\t\t[class]="\'accordion-header \' + (panel.type ? \'bg-\' + panel.type : type ? \'bg-\' + type : \'\')"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="panel.headerTpl?.templateRef || t"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: panel, opened: panel.isOpen }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tid="{{ panel.id }}"\n\t\t\t\t\t(ngbRef)="panel.panelDiv = $event"\n\t\t\t\t\trole="tabpanel"\n\t\t\t\t\t[attr.aria-labelledby]="panel.id + \'-header\'"\n\t\t\t\t\t*ngIf="!destroyOnHide || panel.isOpen || panel.transitionRunning"\n\t\t\t\t>\n\t\t\t\t\t<div class="accordion-body">\n\t\t\t\t\t\t<ng-template [ngTemplateOutlet]="panel.contentTpl?.templateRef || null"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-template>\n\t',isInline:!0,dependencies:[{kind:"directive",type:x.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:x.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:re,selector:"button[ngbPanelToggle]",inputs:["ngbPanelToggle"]},{kind:"directive",type:oe,selector:"[ngbRef]",outputs:["ngbRef"]},{kind:"directive",type:ne,selector:"ng-template[ngbPanelHeader]"},{kind:"directive",type:x.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:le,decorators:[{type:y.Component,args:[{selector:"ngb-accordion",exportAs:"ngbAccordion",standalone:!0,imports:[x.NgFor,x.NgTemplateOutlet,re,oe,ne,x.NgIf],encapsulation:y.ViewEncapsulation.None,host:{class:"accordion",role:"tablist","[attr.aria-multiselectable]":"!closeOtherPanels"},template:'\n\t\t<ng-template #t ngbPanelHeader let-panel>\n\t\t\t<button class="accordion-button" [ngbPanelToggle]="panel">\n\t\t\t\t{{ panel.title }}\n\t\t\t\t<ng-template [ngTemplateOutlet]="panel.titleTpl?.templateRef"></ng-template>\n\t\t\t</button>\n\t\t</ng-template>\n\t\t<ng-template ngFor let-panel [ngForOf]="panels">\n\t\t\t<div [class]="\'accordion-item \' + (panel.cardClass || \'\')">\n\t\t\t\t<div\n\t\t\t\t\trole="tab"\n\t\t\t\t\tid="{{ panel.id }}-header"\n\t\t\t\t\t[class]="\'accordion-header \' + (panel.type ? \'bg-\' + panel.type : type ? \'bg-\' + type : \'\')"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="panel.headerTpl?.templateRef || t"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: panel, opened: panel.isOpen }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tid="{{ panel.id }}"\n\t\t\t\t\t(ngbRef)="panel.panelDiv = $event"\n\t\t\t\t\trole="tabpanel"\n\t\t\t\t\t[attr.aria-labelledby]="panel.id + \'-header\'"\n\t\t\t\t\t*ngIf="!destroyOnHide || panel.isOpen || panel.transitionRunning"\n\t\t\t\t>\n\t\t\t\t\t<div class="accordion-body">\n\t\t\t\t\t\t<ng-template [ngTemplateOutlet]="panel.contentTpl?.templateRef || null"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-template>\n\t'}]}],ctorParameters:function(){return[{type:te},{type:y.NgZone},{type:y.ChangeDetectorRef}]},propDecorators:{panels:[{type:y.ContentChildren,args:[se]}],animation:[{type:y.Input}],activeIds:[{type:y.Input}],closeOtherPanels:[{type:y.Input,args:["closeOthers"]}],destroyOnHide:[{type:y.Input}],type:[{type:y.Input}],panelChange:[{type:y.Output}],shown:[{type:y.Output}],hidden:[{type:y.Output}]}});class ce{constructor(t){this._ngbConfig=t,this.horizontal=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}ce.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ce,deps:[{token:Xt}],target:y["ɵɵFactoryTarget"].Injectable}),ce.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ce,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ce,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Xt}]}});class de{constructor(t,e,n){this._element=t,this._zone=n,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new y.EventEmitter,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter,this.animation=e.animation,this.horizontal=e.horizontal}set collapsed(t){this._isCollapsed!==t&&(this._isCollapsed=t,this._afterInit&&this._runTransitionWithEvents(t,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(t=this._isCollapsed){this.collapsed=!t,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(t,e){return Jt(this._zone,this._element.nativeElement,Qt,{animation:e,runningTransition:"stop",context:{direction:t?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(t,e){this._runTransition(t,e).subscribe(()=>{t?this.hidden.emit():this.shown.emit()})}}de.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:de,deps:[{token:y.ElementRef},{token:ce},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Directive}),de.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:de,isStandalone:!0,selector:"[ngbCollapse]",inputs:{animation:"animation",collapsed:["ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},host:{properties:{"class.collapse-horizontal":"horizontal"}},exportAs:["ngbCollapse"],ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:de,decorators:[{type:y.Directive,args:[{selector:"[ngbCollapse]",exportAs:"ngbCollapse",standalone:!0,host:{"[class.collapse-horizontal]":"horizontal"}}]}],ctorParameters:function(){return[{type:y.ElementRef},{type:ce},{type:y.NgZone}]},propDecorators:{animation:[{type:y.Input}],collapsed:[{type:y.Input,args:["ngbCollapse"]}],ngbCollapseChange:[{type:y.Output}],horizontal:[{type:y.Input}],shown:[{type:y.Output}],hidden:[{type:y.Output}]}});let pe=0;class ue{constructor(){this._appRef=(0,y.inject)(y.ApplicationRef),this._element=(0,y.inject)(y.ElementRef).nativeElement,this._item=(0,y.inject)(be),this._viewRef=null}ngAfterContentChecked(){this._bodyTpl&&(this._item.animatingBodyCollapse||!this._item.destroyOnHide?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef&&(this._appRef.detachView(this._viewRef),this._viewRef.destroy(),this._viewRef=null)}_createViewIfNotExists(){if(!this._viewRef){this._viewRef=this._bodyTpl.createEmbeddedView(null),this._viewRef.detectChanges(),this._appRef.attachView(this._viewRef);for(const t of this._viewRef.rootNodes)this._element.appendChild(t)}}}ue.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ue,deps:[],target:y["ɵɵFactoryTarget"].Directive}),ue.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ue,isStandalone:!0,selector:"[ngbAccordionBody]",host:{properties:{"class.accordion-body":"true"}},queries:[{propertyName:"_bodyTpl",first:!0,predicate:y.TemplateRef,descendants:!0,static:!0}],ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ue,decorators:[{type:y.Directive,args:[{selector:"[ngbAccordionBody]",standalone:!0,host:{"[class.accordion-body]":"true"}}]}],propDecorators:{_bodyTpl:[{type:y.ContentChild,args:[y.TemplateRef,{static:!0}]}]}});class me{constructor(t,e){this.item=t,this.ngbCollapse=e}}me.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:me,deps:[{token:(0,y.forwardRef)(()=>be)},{token:de}],target:y["ɵɵFactoryTarget"].Directive}),me.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:me,isStandalone:!0,selector:"[ngbAccordionCollapse]",host:{attributes:{role:"region"},properties:{"class.accordion-collapse":"true",id:"item.collapseId","attr.aria-labelledby":"item.toggleId"}},exportAs:["ngbAccordionCollapse"],hostDirectives:[{directive:de}],ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:me,decorators:[{type:y.Directive,args:[{exportAs:"ngbAccordionCollapse",standalone:!0,selector:"[ngbAccordionCollapse]",host:{role:"region","[class.accordion-collapse]":"true","[id]":"item.collapseId","[attr.aria-labelledby]":"item.toggleId"},hostDirectives:[{directive:de}]}]}],ctorParameters:function(){return[{type:be,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>be)]}]},{type:de}]}});class he{constructor(t,e){this.item=t,this.accordion=e}}he.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:he,deps:[{token:(0,y.forwardRef)(()=>be)},{token:(0,y.forwardRef)(()=>ve)}],target:y["ɵɵFactoryTarget"].Directive}),he.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:he,isStandalone:!0,selector:"[ngbAccordionToggle]",host:{listeners:{click:"!item.disabled && accordion.toggle(item.id)"},properties:{id:"item.toggleId","class.collapsed":"item.collapsed","attr.aria-controls":"item.collapseId","attr.aria-expanded":"!item.collapsed"}},ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:he,decorators:[{type:y.Directive,args:[{selector:"[ngbAccordionToggle]",standalone:!0,host:{"[id]":"item.toggleId","[class.collapsed]":"item.collapsed","[attr.aria-controls]":"item.collapseId","[attr.aria-expanded]":"!item.collapsed","(click)":"!item.disabled && accordion.toggle(item.id)"}}]}],ctorParameters:function(){return[{type:be,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>be)]}]},{type:ve,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>ve)]}]}]}});class ge{constructor(t){this.item=t}}ge.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ge,deps:[{token:(0,y.forwardRef)(()=>be)}],target:y["ɵɵFactoryTarget"].Directive}),ge.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ge,isStandalone:!0,selector:"button[ngbAccordionButton]",host:{attributes:{type:"button"},properties:{disabled:"item.disabled","class.accordion-button":"true"}},hostDirectives:[{directive:he}],ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ge,decorators:[{type:y.Directive,args:[{selector:"button[ngbAccordionButton]",standalone:!0,host:{"[disabled]":"item.disabled","[class.accordion-button]":"true",type:"button"},hostDirectives:[{directive:he}]}]}],ctorParameters:function(){return[{type:be,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>be)]}]}]}});class fe{constructor(t){this.item=t}}fe.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:fe,deps:[{token:(0,y.forwardRef)(()=>be)}],target:y["ɵɵFactoryTarget"].Directive}),fe.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:fe,isStandalone:!0,selector:"[ngbAccordionHeader]",host:{attributes:{role:"heading"},properties:{"class.accordion-header":"true","class.collapsed":"item.collapsed"}},ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:fe,decorators:[{type:y.Directive,args:[{selector:"[ngbAccordionHeader]",standalone:!0,host:{role:"heading","[class.accordion-header]":"true","[class.collapsed]":"item.collapsed"}}]}],ctorParameters:function(){return[{type:be,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>be)]}]}]}});class be{constructor(t,e){this._accordion=t,this._cd=e,this._subscriptions=[],this._collapsed=!0,this._id="ngb-accordion-item-"+pe++,this.animatingBodyCollapse=!1,this.destroyOnHide=this._accordion.destroyOnHide,this.disabled=!1,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter}set id(t){At(t)&&""!==t&&(this._id=t)}set collapsed(t){if(this.collapsed!==t){if(this.collapsed&&!this._accordion._ensureCanExpand(this))return;this._collapsed=t,this._cd.markForCheck(),this.collapsed||(this.animatingBodyCollapse=!0,this._cd.detectChanges()),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=this.collapsed}}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}ngAfterContentInit(){const{ngbCollapse:t}=this._collapse;t.animation=!1,t.collapsed=this.collapsed,t.animation=this._accordion.animation,this._subscriptions.push(t.hidden.subscribe(()=>{this.animatingBodyCollapse=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id)}),t.shown.subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id)}))}ngOnDestroy(){this._subscriptions.forEach(t=>t.unsubscribe())}toggle(){this.collapsed=!this.collapsed}expand(){this.collapsed=!1}collapse(){this.collapsed=!0}}be.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:be,deps:[{token:(0,y.forwardRef)(()=>ve)},{token:y.ChangeDetectorRef}],target:y["ɵɵFactoryTarget"].Directive}),be.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:be,isStandalone:!0,selector:"[ngbAccordionItem]",inputs:{id:["ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{shown:"shown",hidden:"hidden"},host:{properties:{"class.accordion-item":"true",id:"id"}},queries:[{propertyName:"_collapse",first:!0,predicate:me,descendants:!0,static:!0}],exportAs:["ngbAccordionItem"],ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:be,decorators:[{type:y.Directive,args:[{selector:"[ngbAccordionItem]",exportAs:"ngbAccordionItem",standalone:!0,host:{"[class.accordion-item]":"true","[id]":"id"}}]}],ctorParameters:function(){return[{type:ve,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>ve)]}]},{type:y.ChangeDetectorRef}]},propDecorators:{_collapse:[{type:y.ContentChild,args:[me,{static:!0}]}],id:[{type:y.Input,args:["ngbAccordionItem"]}],destroyOnHide:[{type:y.Input}],disabled:[{type:y.Input}],collapsed:[{type:y.Input}],shown:[{type:y.Output}],hidden:[{type:y.Output}]}});class ve{constructor(t){this.destroyOnHide=!0,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter,this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=t.animation,this.closeOthers=t.closeOthers}toggle(t){var e;null===(e=this._getItem(t))||void 0===e||e.toggle()}expand(t){var e;null===(e=this._getItem(t))||void 0===e||e.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(t=>!t.collapsed)||this._items.first.expand():this._items.forEach(t=>t.expand()))}collapse(t){var e;null===(e=this._getItem(t))||void 0===e||e.collapse()}collapseAll(){var t;null===(t=this._items)||void 0===t||t.forEach(t=>t.collapse())}isExpanded(t){const e=this._getItem(t);return!!e&&!e.collapsed}_ensureCanExpand(t){var e;return!(this.closeOthers&&(this._items?(null===(e=this._items.find(e=>!e.collapsed&&t!==e))||void 0===e||e.collapse(),0):this._anItemWasAlreadyExpandedDuringInitialisation||(this._anItemWasAlreadyExpandedDuringInitialisation=!0,0)))}_getItem(t){var e;return null===(e=this._items)||void 0===e?void 0:e.find(e=>e.id===t)}}ve.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ve,deps:[{token:te}],target:y["ɵɵFactoryTarget"].Directive}),ve.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ve,isStandalone:!0,selector:"[ngbAccordion]",inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{shown:"shown",hidden:"hidden"},host:{properties:{"class.accordion":"true"}},queries:[{propertyName:"_items",predicate:be}],exportAs:["ngbAccordion"],ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ve,decorators:[{type:y.Directive,args:[{selector:"[ngbAccordion]",standalone:!0,exportAs:"ngbAccordion",host:{"[class.accordion]":"true"}}]}],ctorParameters:function(){return[{type:te}]},propDecorators:{_items:[{type:y.ContentChildren,args:[be,{descendants:!1}]}],animation:[{type:y.Input}],closeOthers:[{type:y.Input}],destroyOnHide:[{type:y.Input}],shown:[{type:y.Output}],hidden:[{type:y.Output}]}});const ye=[le,se,ie,ae,ne,re,ge,ve,be,fe,he,ue,me];class we{}we.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:we,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),we.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:we,imports:[le,se,ie,ae,ne,re,ge,ve,be,fe,he,ue,me],exports:[le,se,ie,ae,ne,re,ge,ve,be,fe,he,ue,me]}),we.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:we,imports:[le]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:we,decorators:[{type:y.NgModule,args:[{imports:ye,exports:ye}]}]});const xe=({classList:t})=>{t.remove("show")};class ke{constructor(t){this._ngbConfig=t,this.dismissible=!0,this.type="warning"}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}ke.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ke,deps:[{token:Xt}],target:y["ɵɵFactoryTarget"].Injectable}),ke.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ke,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ke,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Xt}]}});class _e{constructor(t,e,n,i){this._renderer=e,this._element=n,this._zone=i,this.closed=new y.EventEmitter,this.dismissible=t.dismissible,this.type=t.type,this.animation=t.animation}close(){const t=Jt(this._zone,this._element.nativeElement,xe,{animation:this.animation,runningTransition:"continue"});return t.subscribe(()=>this.closed.emit()),t}ngOnChanges(t){const e=t.type;e&&!e.firstChange&&(this._renderer.removeClass(this._element.nativeElement,`alert-${e.previousValue}`),this._renderer.addClass(this._element.nativeElement,`alert-${e.currentValue}`))}ngOnInit(){this._renderer.addClass(this._element.nativeElement,`alert-${this.type}`)}}_e.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:_e,deps:[{token:ke},{token:y.Renderer2},{token:y.ElementRef},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Component}),_e.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:_e,isStandalone:!0,selector:"ngb-alert",inputs:{animation:"animation",dismissible:"dismissible",type:"type"},outputs:{closed:"closed"},host:{attributes:{role:"alert"},properties:{"class.fade":"animation","class.alert-dismissible":"dismissible"},classAttribute:"alert show"},exportAs:["ngbAlert"],usesOnChanges:!0,ngImport:w,template:'\n\t\t<ng-content></ng-content>\n\t\t<button\n\t\t\t*ngIf="dismissible"\n\t\t\ttype="button"\n\t\t\tclass="btn-close"\n\t\t\taria-label="Close"\n\t\t\ti18n-aria-label="@@ngb.alert.close"\n\t\t\t(click)="close()"\n\t\t>\n\t\t</button>\n\t',isInline:!0,styles:["ngb-alert{display:block}\n"],dependencies:[{kind:"directive",type:x.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:_e,decorators:[{type:y.Component,args:[{selector:"ngb-alert",exportAs:"ngbAlert",standalone:!0,imports:[x.NgIf],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,host:{role:"alert",class:"alert show","[class.fade]":"animation","[class.alert-dismissible]":"dismissible"},template:'\n\t\t<ng-content></ng-content>\n\t\t<button\n\t\t\t*ngIf="dismissible"\n\t\t\ttype="button"\n\t\t\tclass="btn-close"\n\t\t\taria-label="Close"\n\t\t\ti18n-aria-label="@@ngb.alert.close"\n\t\t\t(click)="close()"\n\t\t>\n\t\t</button>\n\t',styles:["ngb-alert{display:block}\n"]}]}],ctorParameters:function(){return[{type:ke},{type:y.Renderer2},{type:y.ElementRef},{type:y.NgZone}]},propDecorators:{animation:[{type:y.Input}],dismissible:[{type:y.Input}],type:[{type:y.Input}],closed:[{type:y.Output}]}});class Ie{}var De;Ie.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ie,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Ie.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:Ie,imports:[_e],exports:[_e]}),Ie.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ie,imports:[_e]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ie,decorators:[{type:y.NgModule,args:[{imports:[_e],exports:[_e]}]}]}),function(t){t.START="start",t.END="end"}(De||(De={}));const $e=({classList:t})=>t.contains("carousel-item-start")||t.contains("carousel-item-end"),Ce=t=>{t.remove("carousel-item-start"),t.remove("carousel-item-end")},Se=t=>{Ce(t),t.remove("carousel-item-prev"),t.remove("carousel-item-next")},Me=(t,e,{direction:n})=>{const{classList:i}=t;return e?($e(t)?Ce(i):(i.add("carousel-item-"+(n===De.START?"next":"prev")),Ut(t),i.add("carousel-item-"+n)),()=>{Se(i),i.add("active")}):(Ce(i),Se(i),void i.add("active"))},Te=(t,e,{direction:n})=>{const{classList:i}=t;return e?($e(t)?Ce(i):i.add("carousel-item-"+n),()=>{Se(i),i.remove("active")}):(Ce(i),Se(i),void i.remove("active"))};class Ee{constructor(t){this._ngbConfig=t,this.interval=5e3,this.wrap=!0,this.keyboard=!0,this.pauseOnHover=!0,this.pauseOnFocus=!0,this.showNavigationArrows=!0,this.showNavigationIndicators=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}Ee.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ee,deps:[{token:Xt}],target:y["ɵɵFactoryTarget"].Injectable}),Ee.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ee,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ee,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Xt}]}});let Ne=0;class Oe{constructor(t){this.tplRef=t,this.id="ngb-slide-"+Ne++,this.slid=new y.EventEmitter}}Oe.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Oe,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),Oe.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Oe,isStandalone:!0,selector:"ng-template[ngbSlide]",inputs:{id:"id"},outputs:{slid:"slid"},ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Oe,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbSlide]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]},propDecorators:{id:[{type:y.Input}],slid:[{type:y.Output}]}});class Re{constructor(t,e,n,i,a){this._platformId=e,this._ngZone=n,this._cd=i,this._container=a,this.NgbSlideEventSource=Ve,this._destroy$=new _.Subject,this._interval$=new _.BehaviorSubject(0),this._mouseHover$=new _.BehaviorSubject(!1),this._focused$=new _.BehaviorSubject(!1),this._pauseOnHover$=new _.BehaviorSubject(!1),this._pauseOnFocus$=new _.BehaviorSubject(!1),this._pause$=new _.BehaviorSubject(!1),this._wrap$=new _.BehaviorSubject(!1),this.slide=new y.EventEmitter,this.slid=new y.EventEmitter,this._transitionIds=null,this.animation=t.animation,this.interval=t.interval,this.wrap=t.wrap,this.keyboard=t.keyboard,this.pauseOnHover=t.pauseOnHover,this.pauseOnFocus=t.pauseOnFocus,this.showNavigationArrows=t.showNavigationArrows,this.showNavigationIndicators=t.showNavigationIndicators}set interval(t){this._interval$.next(t)}get interval(){return this._interval$.value}set wrap(t){this._wrap$.next(t)}get wrap(){return this._wrap$.value}set pauseOnHover(t){this._pauseOnHover$.next(t)}get pauseOnHover(){return this._pauseOnHover$.value}set pauseOnFocus(t){this._pauseOnFocus$.next(t)}get pauseOnFocus(){return this._pauseOnFocus$.value}set mouseHover(t){this._mouseHover$.next(t)}get mouseHover(){return this._mouseHover$.value}set focused(t){this._focused$.next(t)}get focused(){return this._focused$.value}arrowLeft(){this.focus(),this.prev(Ve.ARROW_LEFT)}arrowRight(){this.focus(),this.next(Ve.ARROW_RIGHT)}ngAfterContentInit(){(0,x.isPlatformBrowser)(this._platformId)&&this._ngZone.runOutsideAngular(()=>{const t=(0,_.combineLatest)([this.slide.pipe((0,I.map)(t=>t.current),(0,I.startWith)(this.activeId)),this._wrap$,this.slides.changes.pipe((0,I.startWith)(null))]).pipe((0,I.map)(([t,e])=>{const n=this.slides.toArray(),i=this._getSlideIdxById(t);return e?n.length>1:i<n.length-1}),(0,I.distinctUntilChanged)());(0,_.combineLatest)([this._pause$,this._pauseOnHover$,this._mouseHover$,this._pauseOnFocus$,this._focused$,this._interval$,t]).pipe((0,I.map)(([t,e,n,i,a,s,o])=>t||e&&n||i&&a||!o?0:s),(0,I.distinctUntilChanged)(),(0,I.switchMap)(t=>t>0?(0,_.timer)(t,t):_.NEVER),(0,I.takeUntil)(this._destroy$)).subscribe(()=>this._ngZone.run(()=>this.next(Ve.TIMER)))}),this.slides.changes.pipe((0,I.takeUntil)(this._destroy$)).subscribe(()=>{var t;null===(t=this._transitionIds)||void 0===t||t.forEach(t=>(t=>{var e;null===(e=Yt.get(t))||void 0===e||e.complete()})(this._getSlideElement(t))),this._transitionIds=null,this._cd.markForCheck(),this._ngZone.onStable.pipe((0,I.take)(1)).subscribe(()=>{for(const{id:t}of this.slides){const e=this._getSlideElement(t);t===this.activeId?e.classList.add("active"):e.classList.remove("active")}})})}ngAfterContentChecked(){let t=this._getSlideById(this.activeId);this.activeId=t?t.id:this.slides.length?this.slides.first.id:""}ngAfterViewInit(){if(this.activeId){const t=this._getSlideElement(this.activeId);t&&t.classList.add("active")}}ngOnDestroy(){this._destroy$.next()}select(t,e){this._cycleToSelected(t,this._getSlideEventDirection(this.activeId,t),e)}prev(t){this._cycleToSelected(this._getPrevSlide(this.activeId),De.END,t)}next(t){this._cycleToSelected(this._getNextSlide(this.activeId),De.START,t)}pause(){this._pause$.next(!0)}cycle(){this._pause$.next(!1)}focus(){this._container.nativeElement.focus()}_cycleToSelected(t,e,n){const i=this._transitionIds;if(i&&(i[0]!==t||i[1]!==this.activeId))return;let a=this._getSlideById(t);if(a&&a.id!==this.activeId){this._transitionIds=[this.activeId,t],this.slide.emit({prev:this.activeId,current:a.id,direction:e,paused:this._pause$.value,source:n});const i={animation:this.animation,runningTransition:"stop",context:{direction:e}},s=[],o=this._getSlideById(this.activeId);if(o){const t=Jt(this._ngZone,this._getSlideElement(o.id),Te,i);t.subscribe(()=>{o.slid.emit({isShown:!1,direction:e,source:n})}),s.push(t)}const r=this.activeId;this.activeId=a.id;const l=this._getSlideById(this.activeId),c=Jt(this._ngZone,this._getSlideElement(a.id),Me,i);c.subscribe(()=>{null==l||l.slid.emit({isShown:!0,direction:e,source:n})}),s.push(c),(0,_.zip)(...s).pipe((0,I.take)(1)).subscribe(()=>{this._transitionIds=null,this.slid.emit({prev:r,current:a.id,direction:e,paused:this._pause$.value,source:n})})}this._cd.markForCheck()}_getSlideEventDirection(t,e){return this._getSlideIdxById(t)>this._getSlideIdxById(e)?De.END:De.START}_getSlideById(t){return this.slides.find(e=>e.id===t)||null}_getSlideIdxById(t){const e=this._getSlideById(t);return null!=e?this.slides.toArray().indexOf(e):-1}_getNextSlide(t){const e=this.slides.toArray(),n=this._getSlideIdxById(t);return n===e.length-1?this.wrap?e[0].id:e[e.length-1].id:e[n+1].id}_getPrevSlide(t){const e=this.slides.toArray(),n=this._getSlideIdxById(t);return 0===n?this.wrap?e[e.length-1].id:e[0].id:e[n-1].id}_getSlideElement(t){return this._container.nativeElement.querySelector(`#slide-${t}`)}}var Ve,Fe,Pe;Re.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Re,deps:[{token:Ee},{token:y.PLATFORM_ID},{token:y.NgZone},{token:y.ChangeDetectorRef},{token:y.ElementRef}],target:y["ɵɵFactoryTarget"].Component}),Re.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Re,isStandalone:!0,selector:"ngb-carousel",inputs:{animation:"animation",activeId:"activeId",interval:"interval",wrap:"wrap",keyboard:"keyboard",pauseOnHover:"pauseOnHover",pauseOnFocus:"pauseOnFocus",showNavigationArrows:"showNavigationArrows",showNavigationIndicators:"showNavigationIndicators"},outputs:{slide:"slide",slid:"slid"},host:{attributes:{tabIndex:"0"},listeners:{"keydown.arrowLeft":"keyboard && arrowLeft()","keydown.arrowRight":"keyboard && arrowRight()",mouseenter:"mouseHover = true",mouseleave:"mouseHover = false",focusin:"focused = true",focusout:"focused = false"},properties:{"style.display":'"block"',"attr.aria-activedescendant":"'slide-' + activeId"},classAttribute:"carousel slide"},queries:[{propertyName:"slides",predicate:Oe}],exportAs:["ngbCarousel"],ngImport:w,template:'\n\t\t<div class="carousel-indicators" [class.visually-hidden]="!showNavigationIndicators" role="tablist">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tdata-bs-target\n\t\t\t\t*ngFor="let slide of slides"\n\t\t\t\t[class.active]="slide.id === activeId"\n\t\t\t\trole="tab"\n\t\t\t\t[attr.aria-labelledby]="\'slide-\' + slide.id"\n\t\t\t\t[attr.aria-controls]="\'slide-\' + slide.id"\n\t\t\t\t[attr.aria-selected]="slide.id === activeId"\n\t\t\t\t(click)="focus(); select(slide.id, NgbSlideEventSource.INDICATOR)"\n\t\t\t></button>\n\t\t</div>\n\t\t<div class="carousel-inner">\n\t\t\t<div\n\t\t\t\t*ngFor="let slide of slides; index as i; count as c"\n\t\t\t\tclass="carousel-item"\n\t\t\t\t[id]="\'slide-\' + slide.id"\n\t\t\t\trole="tabpanel"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tclass="visually-hidden"\n\t\t\t\t\ti18n="Currently selected slide number read by screen reader@@ngb.carousel.slide-number"\n\t\t\t\t>\n\t\t\t\t\tSlide {{ i + 1 }} of {{ c }}\n\t\t\t\t</span>\n\t\t\t\t<ng-template [ngTemplateOutlet]="slide.tplRef"></ng-template>\n\t\t\t</div>\n\t\t</div>\n\t\t<button class="carousel-control-prev" type="button" (click)="arrowLeft()" *ngIf="showNavigationArrows">\n\t\t\t<span class="carousel-control-prev-icon" aria-hidden="true"></span>\n\t\t\t<span class="visually-hidden" i18n="@@ngb.carousel.previous">Previous</span>\n\t\t</button>\n\t\t<button class="carousel-control-next" type="button" (click)="arrowRight()" *ngIf="showNavigationArrows">\n\t\t\t<span class="carousel-control-next-icon" aria-hidden="true"></span>\n\t\t\t<span class="visually-hidden" i18n="@@ngb.carousel.next">Next</span>\n\t\t</button>\n\t',isInline:!0,dependencies:[{kind:"directive",type:x.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:x.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:x.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Re,decorators:[{type:y.Component,args:[{selector:"ngb-carousel",exportAs:"ngbCarousel",standalone:!0,imports:[x.NgFor,x.NgTemplateOutlet,x.NgIf],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,host:{class:"carousel slide","[style.display]":'"block"',tabIndex:"0","(keydown.arrowLeft)":"keyboard && arrowLeft()","(keydown.arrowRight)":"keyboard && arrowRight()","(mouseenter)":"mouseHover = true","(mouseleave)":"mouseHover = false","(focusin)":"focused = true","(focusout)":"focused = false","[attr.aria-activedescendant]":"'slide-' + activeId"},template:'\n\t\t<div class="carousel-indicators" [class.visually-hidden]="!showNavigationIndicators" role="tablist">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tdata-bs-target\n\t\t\t\t*ngFor="let slide of slides"\n\t\t\t\t[class.active]="slide.id === activeId"\n\t\t\t\trole="tab"\n\t\t\t\t[attr.aria-labelledby]="\'slide-\' + slide.id"\n\t\t\t\t[attr.aria-controls]="\'slide-\' + slide.id"\n\t\t\t\t[attr.aria-selected]="slide.id === activeId"\n\t\t\t\t(click)="focus(); select(slide.id, NgbSlideEventSource.INDICATOR)"\n\t\t\t></button>\n\t\t</div>\n\t\t<div class="carousel-inner">\n\t\t\t<div\n\t\t\t\t*ngFor="let slide of slides; index as i; count as c"\n\t\t\t\tclass="carousel-item"\n\t\t\t\t[id]="\'slide-\' + slide.id"\n\t\t\t\trole="tabpanel"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tclass="visually-hidden"\n\t\t\t\t\ti18n="Currently selected slide number read by screen reader@@ngb.carousel.slide-number"\n\t\t\t\t>\n\t\t\t\t\tSlide {{ i + 1 }} of {{ c }}\n\t\t\t\t</span>\n\t\t\t\t<ng-template [ngTemplateOutlet]="slide.tplRef"></ng-template>\n\t\t\t</div>\n\t\t</div>\n\t\t<button class="carousel-control-prev" type="button" (click)="arrowLeft()" *ngIf="showNavigationArrows">\n\t\t\t<span class="carousel-control-prev-icon" aria-hidden="true"></span>\n\t\t\t<span class="visually-hidden" i18n="@@ngb.carousel.previous">Previous</span>\n\t\t</button>\n\t\t<button class="carousel-control-next" type="button" (click)="arrowRight()" *ngIf="showNavigationArrows">\n\t\t\t<span class="carousel-control-next-icon" aria-hidden="true"></span>\n\t\t\t<span class="visually-hidden" i18n="@@ngb.carousel.next">Next</span>\n\t\t</button>\n\t'}]}],ctorParameters:function(){return[{type:Ee},{type:void 0,decorators:[{type:y.Inject,args:[y.PLATFORM_ID]}]},{type:y.NgZone},{type:y.ChangeDetectorRef},{type:y.ElementRef}]},propDecorators:{slides:[{type:y.ContentChildren,args:[Oe]}],animation:[{type:y.Input}],activeId:[{type:y.Input}],interval:[{type:y.Input}],wrap:[{type:y.Input}],keyboard:[{type:y.Input}],pauseOnHover:[{type:y.Input}],pauseOnFocus:[{type:y.Input}],showNavigationArrows:[{type:y.Input}],showNavigationIndicators:[{type:y.Input}],slide:[{type:y.Output}],slid:[{type:y.Output}]}}),function(t){t.TIMER="timer",t.ARROW_LEFT="arrowLeft",t.ARROW_RIGHT="arrowRight",t.INDICATOR="indicator"}(Ve||(Ve={}));class Ae{}Ae.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ae,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Ae.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:Ae,imports:[Re,Oe],exports:[Re,Oe]}),Ae.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ae,imports:[Re]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ae,decorators:[{type:y.NgModule,args:[{imports:[Re,Oe],exports:[Re,Oe]}]}]});class He{}He.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:He,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),He.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:He,imports:[de],exports:[de]}),He.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:He}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:He,decorators:[{type:y.NgModule,args:[{imports:[de],exports:[de]}]}]});class je{constructor(t,e,n){this.year=jt(t)?t:null,this.month=jt(e)?e:null,this.day=jt(n)?n:null}static from(t){return t instanceof je?t:t?new je(t.year,t.month,t.day):null}equals(t){return null!=t&&this.year===t.year&&this.month===t.month&&this.day===t.day}before(t){return!!t&&(this.year===t.year?this.month===t.month?this.day!==t.day&&this.day<t.day:this.month<t.month:this.year<t.year)}after(t){return!!t&&(this.year===t.year?this.month===t.month?this.day!==t.day&&this.day>t.day:this.month>t.month:this.year>t.year)}}function Le(t,e){return!function(t,e){return!t&&!e||!!t&&!!e&&t.equals(e)}(t,e)}function Ge(t,e){return!(!t&&!e||t&&e&&t.year===e.year&&t.month===e.month)}function Be(t,e,n){return t&&e&&t.before(e)?e:t&&n&&t.after(n)?n:t||null}function ze(t,e){const{minDate:n,maxDate:i,disabled:a,markDisabled:s}=e;return!(null==t||a||s&&s(t,{year:t.year,month:t.month})||n&&t.before(n)||i&&t.after(i))}function Ue(t){return new je(t.getFullYear(),t.getMonth()+1,t.getDate())}function We(t){const e=new Date(t.year,t.month-1,t.day,12);return isNaN(e.getTime())||e.setFullYear(t.year),e}function qe(){return new Ke}class Ze{}Ze.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ze,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),Ze.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ze,providedIn:"root",useFactory:qe}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ze,decorators:[{type:y.Injectable,args:[{providedIn:"root",useFactory:qe}]}]});class Ke extends Ze{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(t,e="d",n=1){let i=We(t),a=!0,s=i.getMonth();switch(e){case"y":i.setFullYear(i.getFullYear()+n);break;case"m":s+=n,i.setMonth(s),s%=12,s<0&&(s+=12);break;case"d":i.setDate(i.getDate()+n),a=!1;break;default:return t}return a&&i.getMonth()!==s&&i.setDate(0),Ue(i)}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){let e=We(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=We(t[(11-e)%7]);n.setDate(n.getDate()+4-(n.getDay()||7));const i=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((i-n.getTime())/864e5)/7)+1}getToday(){return Ue(new Date)}isValid(t){if(!(t&&jt(t.year)&&jt(t.month)&&jt(t.day)))return!1;if(0===t.year)return!1;const e=We(t);return!isNaN(e.getTime())&&e.getFullYear()===t.year&&e.getMonth()+1===t.month&&e.getDate()===t.day}}function Ye(t){return new Qe(t)}Ke.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ke,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),Ke.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ke}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ke,decorators:[{type:y.Injectable}]});class Je{getMonthLabel(t){return`${this.getMonthFullName(t.month,t.year)} ${this.getYearNumerals(t.year)}`}getDayNumerals(t){return`${t.day}`}getWeekNumerals(t){return`${t}`}getYearNumerals(t){return`${t}`}getWeekLabel(){return""}}Je.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Je,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),Je.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Je,providedIn:"root",useFactory:Ye,deps:[{token:y.LOCALE_ID}]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Je,decorators:[{type:y.Injectable,args:[{providedIn:"root",useFactory:Ye,deps:[y.LOCALE_ID]}]}]});class Qe extends Je{constructor(t){super(),this._locale=t,this._monthsShort=(0,x.getLocaleMonthNames)(t,x.FormStyle.Standalone,x.TranslationWidth.Abbreviated),this._monthsFull=(0,x.getLocaleMonthNames)(t,x.FormStyle.Standalone,x.TranslationWidth.Wide)}getWeekdayLabel(t,e){const n=(0,x.getLocaleDayNames)(this._locale,x.FormStyle.Standalone,void 0===e?x.TranslationWidth.Short:e);return n.map((t,e)=>n[(e+1)%7])[t-1]||""}getMonthShortName(t){return this._monthsShort[t-1]||""}getMonthFullName(t){return this._monthsFull[t-1]||""}getDayAriaLabel(t){const e=new Date(t.year,t.month-1,t.day);return(0,x.formatDate)(e,"fullDate",this._locale)}}Qe.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Qe,deps:[{token:y.LOCALE_ID}],target:y["ɵɵFactoryTarget"].Injectable}),Qe.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Qe}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Qe,decorators:[{type:y.Injectable}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Inject,args:[y.LOCALE_ID]}]}]}});class Xe{constructor(t,e){this._calendar=t,this._i18n=e,this._VALIDATORS={dayTemplateData:t=>{if(this._state.dayTemplateData!==t)return{dayTemplateData:t}},displayMonths:t=>{if(jt(t=Vt(t))&&t>0&&this._state.displayMonths!==t)return{displayMonths:t}},disabled:t=>{if(this._state.disabled!==t)return{disabled:t}},firstDayOfWeek:t=>{if(jt(t=Vt(t))&&t>=0&&this._state.firstDayOfWeek!==t)return{firstDayOfWeek:t}},focusVisible:t=>{if(this._state.focusVisible!==t&&!this._state.disabled)return{focusVisible:t}},markDisabled:t=>{if(this._state.markDisabled!==t)return{markDisabled:t}},maxDate:t=>{const e=this.toValidDate(t,null);if(Le(this._state.maxDate,e))return{maxDate:e}},minDate:t=>{const e=this.toValidDate(t,null);if(Le(this._state.minDate,e))return{minDate:e}},navigation:t=>{if(this._state.navigation!==t)return{navigation:t}},outsideDays:t=>{if(this._state.outsideDays!==t)return{outsideDays:t}},weekdays:t=>{const e=!0===t||!1===t?x.TranslationWidth.Short:t,n=!0!==t&&!1!==t||t;if(this._state.weekdayWidth!==e||this._state.weekdaysVisible!==n)return{weekdayWidth:e,weekdaysVisible:n}}},this._model$=new _.Subject,this._dateSelect$=new _.Subject,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]},weekdayWidth:x.TranslationWidth.Short,weekdaysVisible:!0}}get model$(){return this._model$.pipe((0,I.filter)(t=>t.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe((0,I.filter)(t=>null!==t))}set(t){let e=Object.keys(t).map(e=>this._VALIDATORS[e](t[e])).reduce((t,e)=>Object.assign(Object.assign({},t),e),{});Object.keys(e).length>0&&this._nextState(e)}focus(t){const e=this.toValidDate(t,null);null!=e&&!this._state.disabled&&Le(this._state.focusDate,e)&&this._nextState({focusDate:t})}focusSelect(){ze(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(t){const e=this.toValidDate(t,this._calendar.getToday());null==e||this._state.disabled||this._state.firstDate&&!Ge(this._state.firstDate,e)||this._nextState({firstDate:e})}select(t,e={}){const n=this.toValidDate(t,null);null==n||this._state.disabled||(Le(this._state.selectedDate,n)&&this._nextState({selectedDate:n}),e.emitEvent&&ze(n,this._state)&&this._dateSelect$.next(n))}toValidDate(t,e){const n=je.from(t);return void 0===e&&(e=this._calendar.getToday()),this._calendar.isValid(n)?n:e}getMonth(t){for(let e of this._state.months)if(t.month===e.number&&t.year===e.year)return e;throw new Error(`month ${t.month} of year ${t.year} not found`)}_nextState(t){const e=this._updateState(t);this._patchContexts(e),this._state=e,this._model$.next(this._state)}_patchContexts(t){const{months:e,displayMonths:n,selectedDate:i,focusDate:a,focusVisible:s,disabled:o,outsideDays:r}=t;t.months.forEach(t=>{t.weeks.forEach(l=>{l.days.forEach(l=>{a&&(l.context.focused=a.equals(l.date)&&s),l.tabindex=!o&&a&&l.date.equals(a)&&a.month===t.number?0:-1,!0===o&&(l.context.disabled=!0),void 0!==i&&(l.context.selected=null!==i&&i.equals(l.date)),t.number!==l.date.month&&(l.hidden="hidden"===r||"collapsed"===r||n>1&&l.date.after(e[0].firstDate)&&l.date.before(e[n-1].lastDate))})})})}_updateState(t){const e=Object.assign({},this._state,t);let n=e.firstDate;if(("minDate"in t||"maxDate"in t)&&(function(t,e){if(e&&t&&e.before(t))throw new Error(`'maxDate' ${e} should be greater than 'minDate' ${t}`)}(e.minDate,e.maxDate),e.focusDate=Be(e.focusDate,e.minDate,e.maxDate),e.firstDate=Be(e.firstDate,e.minDate,e.maxDate),n=e.focusDate),"disabled"in t&&(e.focusVisible=!1),"selectedDate"in t&&0===this._state.months.length&&(n=e.selectedDate),"focusVisible"in t)return e;if("focusDate"in t&&(e.focusDate=Be(e.focusDate,e.minDate,e.maxDate),n=e.focusDate,0!==e.months.length&&e.focusDate&&!e.focusDate.before(e.firstDate)&&!e.focusDate.after(e.lastDate)))return e;if("firstDate"in t&&(e.firstDate=Be(e.firstDate,e.minDate,e.maxDate),n=e.firstDate),n){const i="dayTemplateData"in t||"firstDayOfWeek"in t||"markDisabled"in t||"minDate"in t||"maxDate"in t||"disabled"in t||"outsideDays"in t||"weekdaysVisible"in t,a=function(t,e,n,i,a){const{displayMonths:s,months:o}=n,r=o.splice(0,o.length);return Array.from({length:s},(n,i)=>{const s=Object.assign(t.getNext(e,"m",i),{day:1});if(o[i]=null,!a){const t=r.findIndex(t=>t.firstDate.equals(s));-1!==t&&(o[i]=r.splice(t,1)[0])}return s}).forEach((e,a)=>{null===o[a]&&(o[a]=function(t,e,n,i,a={}){const{dayTemplateData:s,minDate:o,maxDate:r,firstDayOfWeek:l,markDisabled:c,outsideDays:d,weekdayWidth:p,weekdaysVisible:u}=n,m=t.getToday();a.firstDate=null,a.lastDate=null,a.number=e.month,a.year=e.year,a.weeks=a.weeks||[],a.weekdays=a.weekdays||[],e=function(t,e,n){const i=t.getDaysPerWeek(),a=new je(e.year,e.month,1),s=t.getWeekday(a)%i;return t.getPrev(a,"d",(i+s-n)%i)}(t,e,l),u||(a.weekdays.length=0);for(let n=0;n<t.getWeeksPerMonth();n++){let h=a.weeks[n];h||(h=a.weeks[n]={number:0,days:[],collapsed:!0});const g=h.days;for(let l=0;l<t.getDaysPerWeek();l++){0===n&&u&&(a.weekdays[l]=i.getWeekdayLabel(t.getWeekday(e),p));const d=new je(e.year,e.month,e.day),h=t.getNext(d),f=i.getDayAriaLabel(d);let b=!!(o&&d.before(o)||r&&d.after(r));!b&&c&&(b=c(d,{month:a.number,year:a.year}));let v=d.equals(m),y=s?s(d,{month:a.number,year:a.year}):void 0;null===a.firstDate&&d.month===a.number&&(a.firstDate=d),d.month===a.number&&h.month!==a.number&&(a.lastDate=d);let w=g[l];w||(w=g[l]={}),w.date=d,w.context=Object.assign(w.context||{},{$implicit:d,date:d,data:y,currentMonth:a.number,currentYear:a.year,disabled:b,focused:!1,selected:!1,today:v}),w.tabindex=-1,w.ariaLabel=f,w.hidden=!1,e=h}h.number=t.getWeekNumber(g.map(t=>t.date),l),h.collapsed="collapsed"===d&&g[0].date.month!==a.number&&g[g.length-1].date.month!==a.number}return a}(t,e,n,i,r.shift()||{}))}),o}(this._calendar,n,e,this._i18n,i);e.months=a,e.firstDate=a[0].firstDate,e.lastDate=a[a.length-1].lastDate,"selectedDate"in t&&!ze(e.selectedDate,e)&&(e.selectedDate=null),"firstDate"in t&&(!e.focusDate||e.focusDate.before(e.firstDate)||e.focusDate.after(e.lastDate))&&(e.focusDate=n);const s=!this._state.firstDate||this._state.firstDate.year!==e.firstDate.year,o=!this._state.firstDate||this._state.firstDate.month!==e.firstDate.month;"select"===e.navigation?(("minDate"in t||"maxDate"in t||0===e.selectBoxes.years.length||s)&&(e.selectBoxes.years=function(t,e,n){if(!t)return[];const i=e?Math.max(e.year,t.year-500):t.year-10,a=(n?Math.min(n.year,t.year+500):t.year+10)-i+1,s=Array(a);for(let t=0;t<a;t++)s[t]=i+t;return s}(e.firstDate,e.minDate,e.maxDate)),("minDate"in t||"maxDate"in t||0===e.selectBoxes.months.length||s)&&(e.selectBoxes.months=function(t,e,n,i){if(!e)return[];let a=t.getMonths(e.year);if(n&&e.year===n.year){const t=a.findIndex(t=>t===n.month);a=a.slice(t)}if(i&&e.year===i.year){const t=a.findIndex(t=>t===i.month);a=a.slice(0,t+1)}return a}(this._calendar,e.firstDate,e.minDate,e.maxDate))):e.selectBoxes={years:[],months:[]},"arrows"!==e.navigation&&"select"!==e.navigation||!(o||s||"minDate"in t||"maxDate"in t||"disabled"in t)||(e.prevDisabled=e.disabled||function(t,e,n){const i=Object.assign(t.getPrev(e,"m"),{day:1});return null!=n&&(i.year===n.year&&i.month<n.month||i.year<n.year&&1===n.month)}(this._calendar,e.firstDate,e.minDate),e.nextDisabled=e.disabled||function(t,e,n){const i=Object.assign(t.getNext(e,"m"),{day:1});return null!=n&&i.after(n)}(this._calendar,e.lastDate,e.maxDate))}return e}}Xe.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Xe,deps:[{token:Ze},{token:Je}],target:y["ɵɵFactoryTarget"].Injectable}),Xe.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Xe}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Xe,decorators:[{type:y.Injectable}],ctorParameters:function(){return[{type:Ze},{type:Je}]}}),function(t){t[t.PREV=0]="PREV",t[t.NEXT=1]="NEXT"}(Fe||(Fe={}));class tn{constructor(t){this.i18n=t}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}}tn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:tn,deps:[{token:Je}],target:y["ɵɵFactoryTarget"].Component}),tn.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:tn,isStandalone:!0,selector:"[ngbDatepickerDayView]",inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},host:{properties:{"class.bg-primary":"selected","class.text-white":"selected","class.text-muted":"isMuted()","class.outside":"isMuted()","class.active":"focused"},classAttribute:"btn-light"},ngImport:w,template:"{{ i18n.getDayNumerals(date) }}",isInline:!0,styles:["[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-btn-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5}\n"],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:tn,decorators:[{type:y.Component,args:[{selector:"[ngbDatepickerDayView]",standalone:!0,changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,host:{class:"btn-light","[class.bg-primary]":"selected","[class.text-white]":"selected","[class.text-muted]":"isMuted()","[class.outside]":"isMuted()","[class.active]":"focused"},template:"{{ i18n.getDayNumerals(date) }}",styles:["[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-btn-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5}\n"]}]}],ctorParameters:function(){return[{type:Je}]},propDecorators:{currentMonth:[{type:y.Input}],date:[{type:y.Input}],disabled:[{type:y.Input}],focused:[{type:y.Input}],selected:[{type:y.Input}]}});class en{constructor(t,e){this.i18n=t,this._renderer=e,this.select=new y.EventEmitter,this._month=-1,this._year=-1}changeMonth(t){this.select.emit(new je(this.date.year,Vt(t),1))}changeYear(t){this.select.emit(new je(Vt(t),this.date.month,1))}ngAfterViewChecked(){this.date&&(this.date.month!==this._month&&(this._month=this.date.month,this._renderer.setProperty(this.monthSelect.nativeElement,"value",this._month)),this.date.year!==this._year&&(this._year=this.date.year,this._renderer.setProperty(this.yearSelect.nativeElement,"value",this._year)))}}en.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:en,deps:[{token:Je},{token:y.Renderer2}],target:y["ɵɵFactoryTarget"].Component}),en.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:en,isStandalone:!0,selector:"ngb-datepicker-navigation-select",inputs:{date:"date",disabled:"disabled",months:"months",years:"years"},outputs:{select:"select"},viewQueries:[{propertyName:"monthSelect",first:!0,predicate:["month"],descendants:!0,read:y.ElementRef,static:!0},{propertyName:"yearSelect",first:!0,predicate:["year"],descendants:!0,read:y.ElementRef,static:!0}],ngImport:w,template:'\n\t\t<select\n\t\t\t#month\n\t\t\t[disabled]="disabled"\n\t\t\tclass="form-select"\n\t\t\ti18n-aria-label="@@ngb.datepicker.select-month"\n\t\t\taria-label="Select month"\n\t\t\ti18n-title="@@ngb.datepicker.select-month"\n\t\t\ttitle="Select month"\n\t\t\t(change)="changeMonth($any($event).target.value)"\n\t\t>\n\t\t\t<option *ngFor="let m of months" [attr.aria-label]="i18n.getMonthFullName(m, date.year)" [value]="m">{{\n\t\t\t\ti18n.getMonthShortName(m, date.year)\n\t\t\t}}</option> </select\n\t\t><select\n\t\t\t#year\n\t\t\t[disabled]="disabled"\n\t\t\tclass="form-select"\n\t\t\ti18n-aria-label="@@ngb.datepicker.select-year"\n\t\t\taria-label="Select year"\n\t\t\ti18n-title="@@ngb.datepicker.select-year"\n\t\t\ttitle="Select year"\n\t\t\t(change)="changeYear($any($event).target.value)"\n\t\t>\n\t\t\t<option *ngFor="let y of years" [value]="y">{{ i18n.getYearNumerals(y) }}</option>\n\t\t</select>\n\t',isInline:!0,styles:["ngb-datepicker-navigation-select>.form-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.form-select:focus{z-index:1}ngb-datepicker-navigation-select>.form-select::-ms-value{background-color:transparent!important}\n"],dependencies:[{kind:"directive",type:x.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:en,decorators:[{type:y.Component,args:[{selector:"ngb-datepicker-navigation-select",standalone:!0,imports:[x.NgFor],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,template:'\n\t\t<select\n\t\t\t#month\n\t\t\t[disabled]="disabled"\n\t\t\tclass="form-select"\n\t\t\ti18n-aria-label="@@ngb.datepicker.select-month"\n\t\t\taria-label="Select month"\n\t\t\ti18n-title="@@ngb.datepicker.select-month"\n\t\t\ttitle="Select month"\n\t\t\t(change)="changeMonth($any($event).target.value)"\n\t\t>\n\t\t\t<option *ngFor="let m of months" [attr.aria-label]="i18n.getMonthFullName(m, date.year)" [value]="m">{{\n\t\t\t\ti18n.getMonthShortName(m, date.year)\n\t\t\t}}</option> </select\n\t\t><select\n\t\t\t#year\n\t\t\t[disabled]="disabled"\n\t\t\tclass="form-select"\n\t\t\ti18n-aria-label="@@ngb.datepicker.select-year"\n\t\t\taria-label="Select year"\n\t\t\ti18n-title="@@ngb.datepicker.select-year"\n\t\t\ttitle="Select year"\n\t\t\t(change)="changeYear($any($event).target.value)"\n\t\t>\n\t\t\t<option *ngFor="let y of years" [value]="y">{{ i18n.getYearNumerals(y) }}</option>\n\t\t</select>\n\t',styles:["ngb-datepicker-navigation-select>.form-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.form-select:focus{z-index:1}ngb-datepicker-navigation-select>.form-select::-ms-value{background-color:transparent!important}\n"]}]}],ctorParameters:function(){return[{type:Je},{type:y.Renderer2}]},propDecorators:{date:[{type:y.Input}],disabled:[{type:y.Input}],months:[{type:y.Input}],years:[{type:y.Input}],select:[{type:y.Output}],monthSelect:[{type:y.ViewChild,args:["month",{static:!0,read:y.ElementRef}]}],yearSelect:[{type:y.ViewChild,args:["year",{static:!0,read:y.ElementRef}]}]}});class nn{constructor(t){this.i18n=t,this.navigation=Fe,this.months=[],this.navigate=new y.EventEmitter,this.select=new y.EventEmitter}onClickPrev(t){t.currentTarget.focus(),this.navigate.emit(this.navigation.PREV)}onClickNext(t){t.currentTarget.focus(),this.navigate.emit(this.navigation.NEXT)}}nn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:nn,deps:[{token:Je}],target:y["ɵɵFactoryTarget"].Component}),nn.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:nn,isStandalone:!0,selector:"ngb-datepicker-navigation",inputs:{date:"date",disabled:"disabled",months:"months",showSelect:"showSelect",prevDisabled:"prevDisabled",nextDisabled:"nextDisabled",selectBoxes:"selectBoxes"},outputs:{navigate:"navigate",select:"select"},ngImport:w,template:'\n\t\t<div class="ngb-dp-arrow">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="btn btn-link ngb-dp-arrow-btn"\n\t\t\t\t(click)="onClickPrev($event)"\n\t\t\t\t[disabled]="prevDisabled"\n\t\t\t\ti18n-aria-label="@@ngb.datepicker.previous-month"\n\t\t\t\taria-label="Previous month"\n\t\t\t\ti18n-title="@@ngb.datepicker.previous-month"\n\t\t\t\ttitle="Previous month"\n\t\t\t>\n\t\t\t\t<span class="ngb-dp-navigation-chevron"></span>\n\t\t\t</button>\n\t\t</div>\n\t\t<ngb-datepicker-navigation-select\n\t\t\t*ngIf="showSelect"\n\t\t\tclass="ngb-dp-navigation-select"\n\t\t\t[date]="date"\n\t\t\t[disabled]="disabled"\n\t\t\t[months]="selectBoxes.months"\n\t\t\t[years]="selectBoxes.years"\n\t\t\t(select)="select.emit($event)"\n\t\t>\n\t\t</ngb-datepicker-navigation-select>\n\n\t\t<ng-template *ngIf="!showSelect" ngFor let-month [ngForOf]="months" let-i="index">\n\t\t\t<div class="ngb-dp-arrow" *ngIf="i > 0"></div>\n\t\t\t<div class="ngb-dp-month-name">\n\t\t\t\t{{ i18n.getMonthLabel(month.firstDate) }}\n\t\t\t</div>\n\t\t\t<div class="ngb-dp-arrow" *ngIf="i !== months.length - 1"></div>\n\t\t</ng-template>\n\t\t<div class="ngb-dp-arrow right">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="btn btn-link ngb-dp-arrow-btn"\n\t\t\t\t(click)="onClickNext($event)"\n\t\t\t\t[disabled]="nextDisabled"\n\t\t\t\ti18n-aria-label="@@ngb.datepicker.next-month"\n\t\t\t\taria-label="Next month"\n\t\t\t\ti18n-title="@@ngb.datepicker.next-month"\n\t\t\t\ttitle="Next month"\n\t\t\t>\n\t\t\t\t<span class="ngb-dp-navigation-chevron"></span>\n\t\t\t</button>\n\t\t</div>\n\t',isInline:!0,styles:["ngb-datepicker-navigation{display:flex;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;transform:rotate(-135deg)}.ngb-dp-arrow{display:flex;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{justify-content:flex-end}.ngb-dp-arrow.right .ngb-dp-navigation-chevron{transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:flex;flex:1 1 9rem}\n"],dependencies:[{kind:"directive",type:x.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:x.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"component",type:en,selector:"ngb-datepicker-navigation-select",inputs:["date","disabled","months","years"],outputs:["select"]}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:nn,decorators:[{type:y.Component,args:[{selector:"ngb-datepicker-navigation",standalone:!0,imports:[x.NgIf,x.NgFor,en],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,template:'\n\t\t<div class="ngb-dp-arrow">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="btn btn-link ngb-dp-arrow-btn"\n\t\t\t\t(click)="onClickPrev($event)"\n\t\t\t\t[disabled]="prevDisabled"\n\t\t\t\ti18n-aria-label="@@ngb.datepicker.previous-month"\n\t\t\t\taria-label="Previous month"\n\t\t\t\ti18n-title="@@ngb.datepicker.previous-month"\n\t\t\t\ttitle="Previous month"\n\t\t\t>\n\t\t\t\t<span class="ngb-dp-navigation-chevron"></span>\n\t\t\t</button>\n\t\t</div>\n\t\t<ngb-datepicker-navigation-select\n\t\t\t*ngIf="showSelect"\n\t\t\tclass="ngb-dp-navigation-select"\n\t\t\t[date]="date"\n\t\t\t[disabled]="disabled"\n\t\t\t[months]="selectBoxes.months"\n\t\t\t[years]="selectBoxes.years"\n\t\t\t(select)="select.emit($event)"\n\t\t>\n\t\t</ngb-datepicker-navigation-select>\n\n\t\t<ng-template *ngIf="!showSelect" ngFor let-month [ngForOf]="months" let-i="index">\n\t\t\t<div class="ngb-dp-arrow" *ngIf="i > 0"></div>\n\t\t\t<div class="ngb-dp-month-name">\n\t\t\t\t{{ i18n.getMonthLabel(month.firstDate) }}\n\t\t\t</div>\n\t\t\t<div class="ngb-dp-arrow" *ngIf="i !== months.length - 1"></div>\n\t\t</ng-template>\n\t\t<div class="ngb-dp-arrow right">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="btn btn-link ngb-dp-arrow-btn"\n\t\t\t\t(click)="onClickNext($event)"\n\t\t\t\t[disabled]="nextDisabled"\n\t\t\t\ti18n-aria-label="@@ngb.datepicker.next-month"\n\t\t\t\taria-label="Next month"\n\t\t\t\ti18n-title="@@ngb.datepicker.next-month"\n\t\t\t\ttitle="Next month"\n\t\t\t>\n\t\t\t\t<span class="ngb-dp-navigation-chevron"></span>\n\t\t\t</button>\n\t\t</div>\n\t',styles:["ngb-datepicker-navigation{display:flex;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;transform:rotate(-135deg)}.ngb-dp-arrow{display:flex;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{justify-content:flex-end}.ngb-dp-arrow.right .ngb-dp-navigation-chevron{transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:flex;flex:1 1 9rem}\n"]}]}],ctorParameters:function(){return[{type:Je}]},propDecorators:{date:[{type:y.Input}],disabled:[{type:y.Input}],months:[{type:y.Input}],showSelect:[{type:y.Input}],prevDisabled:[{type:y.Input}],nextDisabled:[{type:y.Input}],selectBoxes:[{type:y.Input}],navigate:[{type:y.Output}],select:[{type:y.Output}]}}),function(t){t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown"}(Pe||(Pe={}));class an{processKey(t,e){const{state:n,calendar:i}=e;switch(t.which){case Pe.PageUp:e.focusDate(i.getPrev(n.focusedDate,t.shiftKey?"y":"m",1));break;case Pe.PageDown:e.focusDate(i.getNext(n.focusedDate,t.shiftKey?"y":"m",1));break;case Pe.End:e.focusDate(t.shiftKey?n.maxDate:n.lastDate);break;case Pe.Home:e.focusDate(t.shiftKey?n.minDate:n.firstDate);break;case Pe.ArrowLeft:e.focusDate(i.getPrev(n.focusedDate,"d",1));break;case Pe.ArrowUp:e.focusDate(i.getPrev(n.focusedDate,"d",i.getDaysPerWeek()));break;case Pe.ArrowRight:e.focusDate(i.getNext(n.focusedDate,"d",1));break;case Pe.ArrowDown:e.focusDate(i.getNext(n.focusedDate,"d",i.getDaysPerWeek()));break;case Pe.Enter:case Pe.Space:e.focusSelect();break;default:return}t.preventDefault(),t.stopPropagation()}}an.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:an,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),an.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:an,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:an,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});class sn{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekNumbers=!1,this.weekdays=x.TranslationWidth.Short}}function on(){return new ln}sn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:sn,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),sn.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:sn,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:sn,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});class rn{}rn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:rn,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),rn.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:rn,providedIn:"root",useFactory:on}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:rn,decorators:[{type:y.Injectable,args:[{providedIn:"root",useFactory:on}]}]});class ln extends rn{fromModel(t){return t&&jt(t.year)&&jt(t.month)&&jt(t.day)?{year:t.year,month:t.month,day:t.day}:null}toModel(t){return t&&jt(t.year)&&jt(t.month)&&jt(t.day)?{year:t.year,month:t.month,day:t.day}:null}}ln.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ln,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),ln.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ln}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ln,decorators:[{type:y.Injectable}]});class cn{constructor(t){this.templateRef=t}}cn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:cn,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),cn.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:cn,isStandalone:!0,selector:"ng-template[ngbDatepickerContent]",ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:cn,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbDatepickerContent]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class dn{constructor(t,e,n,i){this.i18n=t,this.datepicker=e,this._keyboardService=n,this._service=i}set month(t){this.viewModel=this._service.getMonth(t)}onKeyDown(t){this._keyboardService.processKey(t,this.datepicker)}doSelect(t){t.context.disabled||t.hidden||this.datepicker.onDateSelect(t.date)}}dn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:dn,deps:[{token:Je},{token:(0,y.forwardRef)(()=>pn)},{token:an},{token:Xe}],target:y["ɵɵFactoryTarget"].Component}),dn.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:dn,isStandalone:!0,selector:"ngb-datepicker-month",inputs:{month:"month"},host:{attributes:{role:"grid"},listeners:{keydown:"onKeyDown($event)"}},ngImport:w,template:'\n\t\t<div *ngIf="viewModel.weekdays.length > 0" class="ngb-dp-week ngb-dp-weekdays" role="row">\n\t\t\t<div *ngIf="datepicker.showWeekNumbers" class="ngb-dp-weekday ngb-dp-showweek small">{{\n\t\t\t\ti18n.getWeekLabel()\n\t\t\t}}</div>\n\t\t\t<div *ngFor="let weekday of viewModel.weekdays" class="ngb-dp-weekday small" role="columnheader">{{\n\t\t\t\tweekday\n\t\t\t}}</div>\n\t\t</div>\n\t\t<ng-template ngFor let-week [ngForOf]="viewModel.weeks">\n\t\t\t<div *ngIf="!week.collapsed" class="ngb-dp-week" role="row">\n\t\t\t\t<div *ngIf="datepicker.showWeekNumbers" class="ngb-dp-week-number small text-muted">{{\n\t\t\t\t\ti18n.getWeekNumerals(week.number)\n\t\t\t\t}}</div>\n\t\t\t\t<div\n\t\t\t\t\t*ngFor="let day of week.days"\n\t\t\t\t\t(click)="doSelect(day); $event.preventDefault()"\n\t\t\t\t\tclass="ngb-dp-day"\n\t\t\t\t\trole="gridcell"\n\t\t\t\t\t[class.disabled]="day.context.disabled"\n\t\t\t\t\t[tabindex]="day.tabindex"\n\t\t\t\t\t[class.hidden]="day.hidden"\n\t\t\t\t\t[class.ngb-dp-today]="day.context.today"\n\t\t\t\t\t[attr.aria-label]="day.ariaLabel"\n\t\t\t\t>\n\t\t\t\t\t<ng-template [ngIf]="!day.hidden">\n\t\t\t\t\t\t<ng-template\n\t\t\t\t\t\t\t[ngTemplateOutlet]="datepicker.dayTemplate"\n\t\t\t\t\t\t\t[ngTemplateOutletContext]="day.context"\n\t\t\t\t\t\t></ng-template>\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-template>\n\t',isInline:!0,styles:['ngb-datepicker-month{display:block}.ngb-dp-weekday,.ngb-dp-week-number{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:var(--bs-info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid var(--bs-border-color);border-radius:0;background-color:var(--bs-light)}.ngb-dp-day,.ngb-dp-weekday,.ngb-dp-week-number{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1}\n'],dependencies:[{kind:"directive",type:x.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:x.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:x.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:dn,decorators:[{type:y.Component,args:[{selector:"ngb-datepicker-month",standalone:!0,imports:[x.NgIf,x.NgFor,x.NgTemplateOutlet],host:{role:"grid","(keydown)":"onKeyDown($event)"},encapsulation:y.ViewEncapsulation.None,template:'\n\t\t<div *ngIf="viewModel.weekdays.length > 0" class="ngb-dp-week ngb-dp-weekdays" role="row">\n\t\t\t<div *ngIf="datepicker.showWeekNumbers" class="ngb-dp-weekday ngb-dp-showweek small">{{\n\t\t\t\ti18n.getWeekLabel()\n\t\t\t}}</div>\n\t\t\t<div *ngFor="let weekday of viewModel.weekdays" class="ngb-dp-weekday small" role="columnheader">{{\n\t\t\t\tweekday\n\t\t\t}}</div>\n\t\t</div>\n\t\t<ng-template ngFor let-week [ngForOf]="viewModel.weeks">\n\t\t\t<div *ngIf="!week.collapsed" class="ngb-dp-week" role="row">\n\t\t\t\t<div *ngIf="datepicker.showWeekNumbers" class="ngb-dp-week-number small text-muted">{{\n\t\t\t\t\ti18n.getWeekNumerals(week.number)\n\t\t\t\t}}</div>\n\t\t\t\t<div\n\t\t\t\t\t*ngFor="let day of week.days"\n\t\t\t\t\t(click)="doSelect(day); $event.preventDefault()"\n\t\t\t\t\tclass="ngb-dp-day"\n\t\t\t\t\trole="gridcell"\n\t\t\t\t\t[class.disabled]="day.context.disabled"\n\t\t\t\t\t[tabindex]="day.tabindex"\n\t\t\t\t\t[class.hidden]="day.hidden"\n\t\t\t\t\t[class.ngb-dp-today]="day.context.today"\n\t\t\t\t\t[attr.aria-label]="day.ariaLabel"\n\t\t\t\t>\n\t\t\t\t\t<ng-template [ngIf]="!day.hidden">\n\t\t\t\t\t\t<ng-template\n\t\t\t\t\t\t\t[ngTemplateOutlet]="datepicker.dayTemplate"\n\t\t\t\t\t\t\t[ngTemplateOutletContext]="day.context"\n\t\t\t\t\t\t></ng-template>\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-template>\n\t',styles:['ngb-datepicker-month{display:block}.ngb-dp-weekday,.ngb-dp-week-number{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:var(--bs-info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid var(--bs-border-color);border-radius:0;background-color:var(--bs-light)}.ngb-dp-day,.ngb-dp-weekday,.ngb-dp-week-number{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1}\n']}]}],ctorParameters:function(){return[{type:Je},{type:pn,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>pn)]}]},{type:an},{type:Xe}]},propDecorators:{month:[{type:y.Input}]}});class pn{constructor(t,e,n,i,a,s,o,r){this._service=t,this._calendar=e,this._i18n=n,this._elementRef=s,this._ngbDateAdapter=o,this._ngZone=r,this.injector=(0,y.inject)(y.Injector),this._controlValue=null,this._destroyed$=new _.Subject,this._publicState={},this.navigate=new y.EventEmitter,this.dateSelect=new y.EventEmitter,this.onChange=t=>{},this.onTouched=()=>{},["contentTemplate","dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showWeekNumbers","startDate","weekdays"].forEach(t=>this[t]=i[t]),t.dateSelect$.pipe((0,I.takeUntil)(this._destroyed$)).subscribe(t=>{this.dateSelect.emit(t)}),t.model$.pipe((0,I.takeUntil)(this._destroyed$)).subscribe(t=>{const e=t.firstDate,n=this.model?this.model.firstDate:null;this._publicState={maxDate:t.maxDate,minDate:t.minDate,firstDate:t.firstDate,lastDate:t.lastDate,focusedDate:t.focusDate,months:t.months.map(t=>t.firstDate)};let i=!1;if(!e.equals(n)&&(this.navigate.emit({current:n?{year:n.year,month:n.month}:null,next:{year:e.year,month:e.month},preventDefault:()=>i=!0}),i&&null!==n))return void this._service.open(n);const s=t.selectedDate,o=t.focusDate,r=this.model?this.model.focusDate:null;this.model=t,Le(s,this._controlValue)&&(this._controlValue=s,this.onTouched(),this.onChange(this._ngbDateAdapter.toModel(s))),Le(o,r)&&r&&t.focusVisible&&this.focus(),a.markForCheck()})}get state(){return this._publicState}get calendar(){return this._calendar}get i18n(){return this._i18n}focusDate(t){this._service.focus(je.from(t))}focusSelect(){this._service.focusSelect()}focus(){this._ngZone.onStable.asObservable().pipe((0,I.take)(1)).subscribe(()=>{const t=this._elementRef.nativeElement.querySelector('div.ngb-dp-day[tabindex="0"]');t&&t.focus()})}navigateTo(t){this._service.open(je.from(t?t.day?t:Object.assign(Object.assign({},t),{day:1}):null))}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{const t=(0,_.fromEvent)(this._contentEl.nativeElement,"focusin"),e=(0,_.fromEvent)(this._contentEl.nativeElement,"focusout"),{nativeElement:n}=this._elementRef;(0,_.merge)(t,e).pipe((0,I.filter)(({target:t,relatedTarget:e})=>!(zt(t,"ngb-dp-day")&&zt(e,"ngb-dp-day")&&n.contains(t)&&n.contains(e))),(0,I.takeUntil)(this._destroyed$)).subscribe(({type:t})=>this._ngZone.run(()=>this._service.set({focusVisible:"focusin"===t})))})}ngOnDestroy(){this._destroyed$.next()}ngOnInit(){if(void 0===this.model){const t={};["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].forEach(e=>t[e]=this[e]),this._service.set(t),this.navigateTo(this.startDate)}this.dayTemplate||(this.dayTemplate=this._defaultDayTemplate)}ngOnChanges(t){const e={};if(["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].filter(e=>e in t).forEach(t=>e[t]=this[t]),this._service.set(e),"startDate"in t){const{currentValue:e,previousValue:n}=t.startDate;Ge(n,e)&&this.navigateTo(this.startDate)}}onDateSelect(t){this._service.focus(t),this._service.select(t,{emitEvent:!0})}onNavigateDateSelect(t){this._service.open(t)}onNavigateEvent(t){switch(t){case Fe.PREV:this._service.open(this._calendar.getPrev(this.model.firstDate,"m",1));break;case Fe.NEXT:this._service.open(this._calendar.getNext(this.model.firstDate,"m",1))}}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._service.set({disabled:t})}writeValue(t){this._controlValue=je.from(this._ngbDateAdapter.fromModel(t)),this._service.select(this._controlValue)}}pn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:pn,deps:[{token:Xe},{token:Ze},{token:Je},{token:sn},{token:y.ChangeDetectorRef},{token:y.ElementRef},{token:rn},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Component}),pn.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:pn,isStandalone:!0,selector:"ngb-datepicker",inputs:{contentTemplate:"contentTemplate",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",maxDate:"maxDate",minDate:"minDate",navigation:"navigation",outsideDays:"outsideDays",showWeekNumbers:"showWeekNumbers",startDate:"startDate",weekdays:"weekdays"},outputs:{navigate:"navigate",dateSelect:"dateSelect"},host:{properties:{"class.disabled":"model.disabled"}},providers:[{provide:k.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>pn),multi:!0},Xe],queries:[{propertyName:"contentTemplateFromContent",first:!0,predicate:cn,descendants:!0,static:!0}],viewQueries:[{propertyName:"_defaultDayTemplate",first:!0,predicate:["defaultDayTemplate"],descendants:!0,static:!0},{propertyName:"_contentEl",first:!0,predicate:["content"],descendants:!0,static:!0}],exportAs:["ngbDatepicker"],usesOnChanges:!0,ngImport:w,template:'\n\t\t<ng-template\n\t\t\t#defaultDayTemplate\n\t\t\tlet-date="date"\n\t\t\tlet-currentMonth="currentMonth"\n\t\t\tlet-selected="selected"\n\t\t\tlet-disabled="disabled"\n\t\t\tlet-focused="focused"\n\t\t>\n\t\t\t<div\n\t\t\t\tngbDatepickerDayView\n\t\t\t\t[date]="date"\n\t\t\t\t[currentMonth]="currentMonth"\n\t\t\t\t[selected]="selected"\n\t\t\t\t[disabled]="disabled"\n\t\t\t\t[focused]="focused"\n\t\t\t>\n\t\t\t</div>\n\t\t</ng-template>\n\n\t\t<ng-template #defaultContentTemplate>\n\t\t\t<div *ngFor="let month of model.months; let i = index" class="ngb-dp-month">\n\t\t\t\t<div *ngIf="navigation === \'none\' || (displayMonths > 1 && navigation === \'select\')" class="ngb-dp-month-name">\n\t\t\t\t\t{{ i18n.getMonthLabel(month.firstDate) }}\n\t\t\t\t</div>\n\t\t\t\t<ngb-datepicker-month [month]="month.firstDate"></ngb-datepicker-month>\n\t\t\t</div>\n\t\t</ng-template>\n\n\t\t<div class="ngb-dp-header">\n\t\t\t<ngb-datepicker-navigation\n\t\t\t\t*ngIf="navigation !== \'none\'"\n\t\t\t\t[date]="model.firstDate!"\n\t\t\t\t[months]="model.months"\n\t\t\t\t[disabled]="model.disabled"\n\t\t\t\t[showSelect]="model.navigation === \'select\'"\n\t\t\t\t[prevDisabled]="model.prevDisabled"\n\t\t\t\t[nextDisabled]="model.nextDisabled"\n\t\t\t\t[selectBoxes]="model.selectBoxes"\n\t\t\t\t(navigate)="onNavigateEvent($event)"\n\t\t\t\t(select)="onNavigateDateSelect($event)"\n\t\t\t>\n\t\t\t</ngb-datepicker-navigation>\n\t\t</div>\n\n\t\t<div class="ngb-dp-content" [class.ngb-dp-months]="!contentTemplate" #content>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="contentTemplate || contentTemplateFromContent?.templateRef || defaultContentTemplate"\n\t\t\t\t[ngTemplateOutletContext]="{ $implicit: this }"\n\t\t\t\t[ngTemplateOutletInjector]="injector"\n\t\t\t></ng-template>\n\t\t</div>\n\n\t\t<ng-template [ngTemplateOutlet]="footerTemplate"></ng-template>\n\t',isInline:!0,styles:["ngb-datepicker{border:1px solid var(--bs-border-color);border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}ngb-datepicker.disabled .ngb-dp-weekday,ngb-datepicker.disabled .ngb-dp-week-number,ngb-datepicker.disabled .ngb-dp-month-name{color:var(--bs-text-muted)}.ngb-dp-body{z-index:1055}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:var(--bs-light)}.ngb-dp-months{display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:var(--bs-light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}\n"],dependencies:[{kind:"directive",type:x.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:x.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:x.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"component",type:tn,selector:"[ngbDatepickerDayView]",inputs:["currentMonth","date","disabled","focused","selected"]},{kind:"component",type:dn,selector:"ngb-datepicker-month",inputs:["month"]},{kind:"component",type:nn,selector:"ngb-datepicker-navigation",inputs:["date","disabled","months","showSelect","prevDisabled","nextDisabled","selectBoxes"],outputs:["navigate","select"]}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:pn,decorators:[{type:y.Component,args:[{exportAs:"ngbDatepicker",selector:"ngb-datepicker",standalone:!0,imports:[x.NgIf,x.NgFor,x.NgTemplateOutlet,tn,dn,nn],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,host:{"[class.disabled]":"model.disabled"},template:'\n\t\t<ng-template\n\t\t\t#defaultDayTemplate\n\t\t\tlet-date="date"\n\t\t\tlet-currentMonth="currentMonth"\n\t\t\tlet-selected="selected"\n\t\t\tlet-disabled="disabled"\n\t\t\tlet-focused="focused"\n\t\t>\n\t\t\t<div\n\t\t\t\tngbDatepickerDayView\n\t\t\t\t[date]="date"\n\t\t\t\t[currentMonth]="currentMonth"\n\t\t\t\t[selected]="selected"\n\t\t\t\t[disabled]="disabled"\n\t\t\t\t[focused]="focused"\n\t\t\t>\n\t\t\t</div>\n\t\t</ng-template>\n\n\t\t<ng-template #defaultContentTemplate>\n\t\t\t<div *ngFor="let month of model.months; let i = index" class="ngb-dp-month">\n\t\t\t\t<div *ngIf="navigation === \'none\' || (displayMonths > 1 && navigation === \'select\')" class="ngb-dp-month-name">\n\t\t\t\t\t{{ i18n.getMonthLabel(month.firstDate) }}\n\t\t\t\t</div>\n\t\t\t\t<ngb-datepicker-month [month]="month.firstDate"></ngb-datepicker-month>\n\t\t\t</div>\n\t\t</ng-template>\n\n\t\t<div class="ngb-dp-header">\n\t\t\t<ngb-datepicker-navigation\n\t\t\t\t*ngIf="navigation !== \'none\'"\n\t\t\t\t[date]="model.firstDate!"\n\t\t\t\t[months]="model.months"\n\t\t\t\t[disabled]="model.disabled"\n\t\t\t\t[showSelect]="model.navigation === \'select\'"\n\t\t\t\t[prevDisabled]="model.prevDisabled"\n\t\t\t\t[nextDisabled]="model.nextDisabled"\n\t\t\t\t[selectBoxes]="model.selectBoxes"\n\t\t\t\t(navigate)="onNavigateEvent($event)"\n\t\t\t\t(select)="onNavigateDateSelect($event)"\n\t\t\t>\n\t\t\t</ngb-datepicker-navigation>\n\t\t</div>\n\n\t\t<div class="ngb-dp-content" [class.ngb-dp-months]="!contentTemplate" #content>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="contentTemplate || contentTemplateFromContent?.templateRef || defaultContentTemplate"\n\t\t\t\t[ngTemplateOutletContext]="{ $implicit: this }"\n\t\t\t\t[ngTemplateOutletInjector]="injector"\n\t\t\t></ng-template>\n\t\t</div>\n\n\t\t<ng-template [ngTemplateOutlet]="footerTemplate"></ng-template>\n\t',providers:[{provide:k.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>pn),multi:!0},Xe],styles:["ngb-datepicker{border:1px solid var(--bs-border-color);border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}ngb-datepicker.disabled .ngb-dp-weekday,ngb-datepicker.disabled .ngb-dp-week-number,ngb-datepicker.disabled .ngb-dp-month-name{color:var(--bs-text-muted)}.ngb-dp-body{z-index:1055}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:var(--bs-light)}.ngb-dp-months{display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:var(--bs-light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}\n"]}]}],ctorParameters:function(){return[{type:Xe},{type:Ze},{type:Je},{type:sn},{type:y.ChangeDetectorRef},{type:y.ElementRef},{type:rn},{type:y.NgZone}]},propDecorators:{_defaultDayTemplate:[{type:y.ViewChild,args:["defaultDayTemplate",{static:!0}]}],_contentEl:[{type:y.ViewChild,args:["content",{static:!0}]}],contentTemplate:[{type:y.Input}],contentTemplateFromContent:[{type:y.ContentChild,args:[cn,{static:!0}]}],dayTemplate:[{type:y.Input}],dayTemplateData:[{type:y.Input}],displayMonths:[{type:y.Input}],firstDayOfWeek:[{type:y.Input}],footerTemplate:[{type:y.Input}],markDisabled:[{type:y.Input}],maxDate:[{type:y.Input}],minDate:[{type:y.Input}],navigation:[{type:y.Input}],outsideDays:[{type:y.Input}],showWeekNumbers:[{type:y.Input}],startDate:[{type:y.Input}],weekdays:[{type:y.Input}],navigate:[{type:y.Output}],dateSelect:[{type:y.Output}]}});const un=(t,e)=>!!e&&e.some(e=>e.contains(t)),mn=(t,e)=>!e||null!=function(t,e){return e?void 0===t.closest?null:t.closest(e):null}(t,e),hn="undefined"!=typeof navigator&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent));function gn(t,e,n,i,a,s,o,r){var l;n&&t.runOutsideAngular((l=()=>{const l=(0,_.fromEvent)(e,"keydown").pipe((0,I.takeUntil)(a),(0,I.filter)(t=>t.which===Pe.Escape),(0,I.tap)(t=>t.preventDefault())),c=(0,_.fromEvent)(e,"mousedown").pipe((0,I.map)(t=>{const e=t.target;return 2!==t.button&&!un(e,o)&&("inside"===n?un(e,s)&&mn(e,r):"outside"===n?!un(e,s):mn(e,r)||!un(e,s))}),(0,I.takeUntil)(a)),d=(0,_.fromEvent)(e,"mouseup").pipe((0,I.withLatestFrom)(c),(0,I.filter)(([t,e])=>e),(0,I.delay)(0),(0,I.takeUntil)(a));(0,_.race)([l.pipe((0,I.map)(t=>0)),d.pipe((0,I.map)(t=>1))]).subscribe(e=>t.run(()=>i(e)))},hn?()=>setTimeout(()=>l(),100):l))}const fn=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function bn(t){const e=Array.from(t.querySelectorAll(fn)).filter(t=>-1!==t.tabIndex);return[e[0],e[e.length-1]]}const vn=(t,e,n,i=!1)=>{t.runOutsideAngular(()=>{const t=(0,_.fromEvent)(e,"focusin").pipe((0,I.takeUntil)(n),(0,I.map)(t=>t.target));(0,_.fromEvent)(e,"keydown").pipe((0,I.takeUntil)(n),(0,I.filter)(t=>t.which===Pe.Tab),(0,I.withLatestFrom)(t)).subscribe(([t,n])=>{const[i,a]=bn(e);n!==i&&n!==e||!t.shiftKey||(a.focus(),t.preventDefault()),n!==a||t.shiftKey||(i.focus(),t.preventDefault())}),i&&(0,_.fromEvent)(e,"click").pipe((0,I.takeUntil)(n),(0,I.withLatestFrom)(t),(0,I.map)(t=>t[1])).subscribe(t=>t.focus())})};class yn{constructor(t){this._element=t.documentElement}isRTL(){return"rtl"===(this._element.getAttribute("dir")||"").toLowerCase()}}yn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:yn,deps:[{token:x.DOCUMENT}],target:y["ɵɵFactoryTarget"].Injectable}),yn.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:yn,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:yn,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Inject,args:[x.DOCUMENT]}]}]}});const wn=/\s+/,xn=/ +/gi,kn={top:["top"],bottom:["bottom"],start:["left","right"],left:["left"],end:["right","left"],right:["right"],"top-start":["top-start","top-end"],"top-left":["top-start"],"top-end":["top-end","top-start"],"top-right":["top-end"],"bottom-start":["bottom-start","bottom-end"],"bottom-left":["bottom-start"],"bottom-end":["bottom-end","bottom-start"],"bottom-right":["bottom-end"],"start-top":["left-start","right-start"],"left-top":["left-start"],"start-bottom":["left-end","right-end"],"left-bottom":["left-end"],"end-top":["right-start","left-start"],"right-top":["right-start"],"end-bottom":["right-end","left-end"],"right-bottom":["right-end"]},_n=/^left/,In=/^right/,Dn=/^start/,$n=/^end/;function Cn({placement:t,baseClass:e},n){let i=Array.isArray(t)?t:t.split(wn);let a=i.findIndex(t=>"auto"===t);a>=0&&["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"].forEach(function(t){null==i.find(e=>-1!==e.search("^"+t))&&i.splice(a++,1,t)});const s=i.map(t=>function(t,e){const[n,i]=kn[t];return e&&i||n}(t,n.isRTL()));let o=s.shift();const r={name:"bootstrapClasses",enabled:!!e,phase:"write",fn({state:t}){const n=new RegExp(e+"(-[a-z]+)*","gi"),i=t.elements.popper,a=t.placement;let s=i.className;s=s.replace(n,""),s+=` ${function(t,e){let[n,i]=e.split("-");const a=n.replace(_n,"start").replace(In,"end");let s=[a];if(i){let t=i;"left"!==n&&"right"!==n||(t=t.replace(Dn,"top").replace($n,"bottom")),s.push(`${a}-${t}`)}return t&&(s=s.map(e=>`${t}-${e}`)),s.join(" ")}(e,a)}`,s=s.trim().replace(xn," "),i.className=s}};return{placement:o,modifiers:[r,wt,_t,It,{enabled:!0,name:"flip",options:{fallbackPlacements:s}},{enabled:!0,name:"preventOverflow",phase:"main",fn:function(){}}]}}function Sn(t){return t}function Mn(){const t=(0,y.inject)(yn);let e=null;return{createPopper(n){if(!e){let i=(n.updatePopperOptions||Sn)(Cn(n,t));e=Ot(n.hostElement,n.targetElement,i)}},update(){e&&e.update()},setOptions(n){if(e){let i=(n.updatePopperOptions||Sn)(Cn(n,t));e.setOptions(i)}},destroy(){e&&(e.destroy(),e=null)}}}class Tn extends sn{constructor(){super(...arguments),this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=t=>t,this.restoreFocus=!0}}function En(t){return e=>(e.modifiers.push(Rt,{name:"offset",options:{offset:()=>t}}),e)}function Nn(){return new Rn}Tn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Tn,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),Tn.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Tn,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Tn,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});class On{}On.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:On,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),On.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:On,providedIn:"root",useFactory:Nn}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:On,decorators:[{type:y.Injectable,args:[{providedIn:"root",useFactory:Nn}]}]});class Rn extends On{parse(t){if(null!=t){const e=t.trim().split("-");if(1===e.length&&Ht(e[0]))return{year:Vt(e[0]),month:null,day:null};if(2===e.length&&Ht(e[0])&&Ht(e[1]))return{year:Vt(e[0]),month:Vt(e[1]),day:null};if(3===e.length&&Ht(e[0])&&Ht(e[1])&&Ht(e[2]))return{year:Vt(e[0]),month:Vt(e[1]),day:Vt(e[2])}}return null}format(t){return t?`${t.year}-${Ht(t.month)?Bt(t.month):""}-${Ht(t.day)?Bt(t.day):""}`:""}}Rn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Rn,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),Rn.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Rn}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Rn,decorators:[{type:y.Injectable}]});class Vn{constructor(t,e,n,i,a,s,o,r,l,c){this._parserFormatter=t,this._elRef=e,this._vcRef=n,this._renderer=i,this._ngZone=a,this._calendar=s,this._dateAdapter=o,this._document=r,this._changeDetector=l,this._cRef=null,this._disabled=!1,this._elWithFocus=null,this._model=null,this._destroyCloseHandlers$=new _.Subject,this.dateSelect=new y.EventEmitter,this.navigate=new y.EventEmitter,this.closed=new y.EventEmitter,this._onChange=t=>{},this._onTouched=()=>{},this._validatorChange=()=>{},["autoClose","container","positionTarget","placement","popperOptions"].forEach(t=>this[t]=c[t]),this._positioning=Mn()}get disabled(){return this._disabled}set disabled(t){this._disabled=""===t||t&&"false"!==t,this.isOpen()&&this._cRef.instance.setDisabledState(this._disabled)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}registerOnValidatorChange(t){this._validatorChange=t}setDisabledState(t){this.disabled=t}validate(t){const{value:e}=t;if(null!=e){const t=this._fromDateStruct(this._dateAdapter.fromModel(e));if(!t)return{ngbDate:{invalid:e}};if(this.minDate&&t.before(je.from(this.minDate)))return{ngbDate:{minDate:{minDate:this.minDate,actual:e}}};if(this.maxDate&&t.after(je.from(this.maxDate)))return{ngbDate:{maxDate:{maxDate:this.maxDate,actual:e}}}}return null}writeValue(t){this._model=this._fromDateStruct(this._dateAdapter.fromModel(t)),this._writeModelValue(this._model)}manualDateChange(t,e=!1){const n=t!==this._inputValue;n&&(this._inputValue=t,this._model=this._fromDateStruct(this._parserFormatter.parse(t))),!n&&e||this._onChange(this._model?this._dateAdapter.toModel(this._model):""===t?null:t),e&&this._model&&this._writeModelValue(this._model)}isOpen(){return!!this._cRef}open(){if(!this.isOpen()){let t;if(this._cRef=this._vcRef.createComponent(pn),this._applyPopupStyling(this._cRef.location.nativeElement),this._applyDatepickerInputs(this._cRef),this._subscribeForDatepickerOutputs(this._cRef.instance),this._cRef.instance.ngOnInit(),this._cRef.instance.writeValue(this._dateAdapter.toModel(this._model)),this._cRef.instance.registerOnChange(t=>{this.writeValue(t),this._onChange(t),this._onTouched()}),this._cRef.changeDetectorRef.detectChanges(),this._cRef.instance.setDisabledState(this.disabled),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._cRef.location.nativeElement),this._elWithFocus=this._document.activeElement,vn(this._ngZone,this._cRef.location.nativeElement,this.closed,!0),setTimeout(()=>{var t;return null===(t=this._cRef)||void 0===t?void 0:t.instance.focus()}),t=At(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget instanceof HTMLElement?this.positionTarget:this._elRef.nativeElement,this._ngZone.runOutsideAngular(()=>{this._cRef&&(this._positioning.createPopper({hostElement:t,targetElement:this._cRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,updatePopperOptions:t=>this.popperOptions(En([0,2])(t))}),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update()))}),this.positionTarget&&!t)throw new Error("ngbDatepicker could not find element declared in [positionTarget] to position against.");this._setCloseHandlers()}}close(){var t;if(this.isOpen()){this._vcRef.remove(this._vcRef.indexOf(this._cRef.hostView)),this._cRef=null,this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this._destroyCloseHandlers$.next(),this.closed.emit(),this._changeDetector.markForCheck();let e=this._elWithFocus;At(this.restoreFocus)?e=this._document.querySelector(this.restoreFocus):void 0!==this.restoreFocus&&(e=this.restoreFocus),e&&e.focus?e.focus():this._document.body.focus()}}toggle(){this.isOpen()?this.close():this.open()}navigateTo(t){this.isOpen()&&this._cRef.instance.navigateTo(t)}onBlur(){this._onTouched()}onFocus(){this._elWithFocus=this._elRef.nativeElement}ngOnChanges(t){if((t.minDate||t.maxDate)&&(this._validatorChange(),this.isOpen()&&(t.minDate&&(this._cRef.instance.minDate=this.minDate),t.maxDate&&(this._cRef.instance.maxDate=this.maxDate),this._cRef.instance.ngOnChanges(t))),t.datepickerClass){const{currentValue:e,previousValue:n}=t.datepickerClass;this._applyPopupClass(e,n)}t.autoClose&&this.isOpen()&&this._setCloseHandlers()}ngOnDestroy(){this.close()}_applyDatepickerInputs(t){["contentTemplate","dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showNavigation","showWeekNumbers","weekdays"].forEach(e=>{void 0!==this[e]&&t.setInput(e,this[e])}),t.setInput("startDate",this.startDate||this._model)}_applyPopupClass(t,e){var n;const i=null===(n=this._cRef)||void 0===n?void 0:n.location.nativeElement;i&&(t&&this._renderer.addClass(i,t),e&&this._renderer.removeClass(i,e))}_applyPopupStyling(t){this._renderer.addClass(t,"dropdown-menu"),this._renderer.addClass(t,"show"),"body"===this.container&&this._renderer.addClass(t,"ngb-dp-body"),this._applyPopupClass(this.datepickerClass)}_subscribeForDatepickerOutputs(t){t.navigate.subscribe(t=>this.navigate.emit(t)),t.dateSelect.subscribe(t=>{this.dateSelect.emit(t),!0!==this.autoClose&&"inside"!==this.autoClose||this.close()})}_writeModelValue(t){const e=this._parserFormatter.format(t);this._inputValue=e,this._renderer.setProperty(this._elRef.nativeElement,"value",e),this.isOpen()&&(this._cRef.instance.writeValue(this._dateAdapter.toModel(t)),this._onTouched())}_fromDateStruct(t){const e=t?new je(t.year,t.month,t.day):null;return this._calendar.isValid(e)?e:null}_setCloseHandlers(){this._destroyCloseHandlers$.next(),gn(this._ngZone,this._document,this.autoClose,()=>this.close(),this._destroyCloseHandlers$,[],[this._elRef.nativeElement,this._cRef.location.nativeElement])}}Vn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Vn,deps:[{token:On},{token:y.ElementRef},{token:y.ViewContainerRef},{token:y.Renderer2},{token:y.NgZone},{token:Ze},{token:rn},{token:x.DOCUMENT},{token:y.ChangeDetectorRef},{token:Tn}],target:y["ɵɵFactoryTarget"].Directive}),Vn.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Vn,isStandalone:!0,selector:"input[ngbDatepicker]",inputs:{autoClose:"autoClose",contentTemplate:"contentTemplate",datepickerClass:"datepickerClass",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",minDate:"minDate",maxDate:"maxDate",navigation:"navigation",outsideDays:"outsideDays",placement:"placement",popperOptions:"popperOptions",restoreFocus:"restoreFocus",showWeekNumbers:"showWeekNumbers",startDate:"startDate",container:"container",positionTarget:"positionTarget",weekdays:"weekdays",disabled:"disabled"},outputs:{dateSelect:"dateSelect",navigate:"navigate",closed:"closed"},host:{listeners:{input:"manualDateChange($event.target.value)",change:"manualDateChange($event.target.value, true)",focus:"onFocus()",blur:"onBlur()"},properties:{disabled:"disabled"}},providers:[{provide:k.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>Vn),multi:!0},{provide:k.NG_VALIDATORS,useExisting:(0,y.forwardRef)(()=>Vn),multi:!0},{provide:sn,useExisting:Tn}],exportAs:["ngbDatepicker"],usesOnChanges:!0,ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Vn,decorators:[{type:y.Directive,args:[{selector:"input[ngbDatepicker]",exportAs:"ngbDatepicker",standalone:!0,host:{"(input)":"manualDateChange($event.target.value)","(change)":"manualDateChange($event.target.value, true)","(focus)":"onFocus()","(blur)":"onBlur()","[disabled]":"disabled"},providers:[{provide:k.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>Vn),multi:!0},{provide:k.NG_VALIDATORS,useExisting:(0,y.forwardRef)(()=>Vn),multi:!0},{provide:sn,useExisting:Tn}]}]}],ctorParameters:function(){return[{type:On},{type:y.ElementRef},{type:y.ViewContainerRef},{type:y.Renderer2},{type:y.NgZone},{type:Ze},{type:rn},{type:void 0,decorators:[{type:y.Inject,args:[x.DOCUMENT]}]},{type:y.ChangeDetectorRef},{type:Tn}]},propDecorators:{autoClose:[{type:y.Input}],contentTemplate:[{type:y.Input}],datepickerClass:[{type:y.Input}],dayTemplate:[{type:y.Input}],dayTemplateData:[{type:y.Input}],displayMonths:[{type:y.Input}],firstDayOfWeek:[{type:y.Input}],footerTemplate:[{type:y.Input}],markDisabled:[{type:y.Input}],minDate:[{type:y.Input}],maxDate:[{type:y.Input}],navigation:[{type:y.Input}],outsideDays:[{type:y.Input}],placement:[{type:y.Input}],popperOptions:[{type:y.Input}],restoreFocus:[{type:y.Input}],showWeekNumbers:[{type:y.Input}],startDate:[{type:y.Input}],container:[{type:y.Input}],positionTarget:[{type:y.Input}],weekdays:[{type:y.Input}],dateSelect:[{type:y.Output}],navigate:[{type:y.Output}],closed:[{type:y.Output}],disabled:[{type:y.Input}]}});class Fn extends Ze{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(t,e="d",n=1){switch(t=new je(t.year,t.month,t.day),e){case"y":return(t=this._setYear(t,t.year+n)).month=1,t.day=1,t;case"m":return(t=this._setMonth(t,t.month+n)).day=1,t;case"d":return this._setDay(t,t.day+n);default:return t}}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){const e=this.toGregorian(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=t[(11-e)%7],i=this.toGregorian(n);i.setDate(i.getDate()+4-(i.getDay()||7));const a=i.getTime(),s=this.toGregorian(new je(n.year,1,1));return Math.floor(Math.round((a-s.getTime())/864e5)/7)+1}getToday(){return this.fromGregorian(new Date)}isValid(t){return null!=t&&Ht(t.year)&&Ht(t.month)&&Ht(t.day)&&!isNaN(this.toGregorian(t).getTime())}_setDay(t,e){e=+e;let n=this.getDaysPerMonth(t.month,t.year);if(e<=0)for(;e<=0;)t=this._setMonth(t,t.month-1),n=this.getDaysPerMonth(t.month,t.year),e+=n;else if(e>n)for(;e>n;)e-=n,t=this._setMonth(t,t.month+1),n=this.getDaysPerMonth(t.month,t.year);return t.day=e,t}_setMonth(t,e){return e=+e,t.year=t.year+Math.floor((e-1)/12),t.month=Math.floor(((e-1)%12+12)%12)+1,t}_setYear(t,e){return t.year=+e,t}}function Pn(t){const e=t.getFullYear();return e%4==0&&e%100!=0||e%400==0}function An(t,e){return t-e*Math.floor(t/e)}Fn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Fn,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),Fn.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Fn}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Fn,decorators:[{type:y.Injectable}]});const Hn=1721425.5,jn=1948439.5;class Ln extends Fn{fromGregorian(t){const e=t.getFullYear(),n=t.getMonth(),i=t.getDate();let a=1721424.5+365*(e-1)+Math.floor((e-1)/4)+-Math.floor((e-1)/100)+Math.floor((e-1)/400)+Math.floor((367*(n+1)-362)/12+(n+1<=2?0:Pn(t)?-1:-2)+i);a=Math.floor(a)+.5;const s=a-jn,o=Math.floor((30*s+10646)/10631);let r=Math.ceil((s-29-(354*((l=o)-1)+Math.floor((3+11*l)/30)))/29.5);var l;r=Math.min(r,11);const c=Math.ceil(s-function(t,e){return Math.ceil(29.5*e)+354*(t-1)+Math.floor((3+11*t)/30)}(o,r))+1;return new je(o,r+1,c)}toGregorian(t){const e=t.year,n=t.month-1,i=t.day+Math.ceil(29.5*n)+354*(e-1)+Math.floor((3+11*e)/30)+jn-1,a=Math.floor(i-.5)+.5,s=a-Hn,o=Math.floor(s/146097),r=An(s,146097),l=Math.floor(r/36524),c=An(r,36524),d=Math.floor(c/1461),p=An(c,1461),u=Math.floor(p/365);let m=400*o+100*l+4*d+u;4!==l&&4!==u&&m++;const h=a-(Hn+365*(m-1)+Math.floor((m-1)/4)-Math.floor((m-1)/100)+Math.floor((m-1)/400)),g=a<1721424.5+365*(m-1)+Math.floor((m-1)/4)-Math.floor((m-1)/100)+Math.floor((m-1)/400)+Math.floor(739/12+(Pn(new Date(m,3,1))?-1:-2)+1)?0:Pn(new Date(m,3,1))?1:2,f=Math.floor((12*(h+g)+373)/367),b=1721424.5+365*(m-1)+Math.floor((m-1)/4)-Math.floor((m-1)/100)+Math.floor((m-1)/400)+Math.floor((367*f-362)/12+(f<=2?0:Pn(new Date(m,f-1,1))?-1:-2)+1);return new Date(m,f-1,a-b+1)}getDaysPerMonth(t,e){e+=Math.floor(t/13);let n=29+(t=(t-1)%12+1)%2;return 12===t&&(14+11*e)%30<11&&n++,n}}Ln.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ln,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),Ln.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ln}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ln,decorators:[{type:y.Injectable}]});const Gn=new Date(1882,10,12),Bn=new Date(2174,10,25),zn=1300,Un=["101010101010","110101010100","111011001001","011011010100","011011101010","001101101100","101010101101","010101010101","011010101001","011110010010","101110101001","010111010100","101011011010","010101011100","110100101101","011010010101","011101001010","101101010100","101101101010","010110101101","010010101110","101001001111","010100010111","011010001011","011010100101","101011010101","001011010110","100101011011","010010011101","101001001101","110100100110","110110010101","010110101100","100110110110","001010111010","101001011011","010100101011","101010010101","011011001010","101011101001","001011110100","100101110110","001010110110","100101010110","101011001010","101110100100","101111010010","010111011001","001011011100","100101101101","010101001101","101010100101","101101010010","101110100101","010110110100","100110110110","010101010111","001010010111","010101001011","011010100011","011101010010","101101100101","010101101010","101010101011","010100101011","110010010101","110101001010","110110100101","010111001010","101011010110","100101010111","010010101011","100101001011","101010100101","101101010010","101101101010","010101110101","001001110110","100010110111","010001011011","010101010101","010110101001","010110110100","100111011010","010011011101","001001101110","100100110110","101010101010","110101010100","110110110010","010111010101","001011011010","100101011011","010010101011","101001010101","101101001001","101101100100","101101110001","010110110100","101010110101","101001010101","110100100101","111010010010","111011001001","011011010100","101011101001","100101101011","010010101011","101010010011","110101001001","110110100100","110110110010","101010111001","010010111010","101001011011","010100101011","101010010101","101100101010","101101010101","010101011100","010010111101","001000111101","100100011101","101010010101","101101001010","101101011010","010101101101","001010110110","100100111011","010010011011","011001010101","011010101001","011101010100","101101101010","010101101100","101010101101","010101010101","101100101001","101110010010","101110101001","010111010100","101011011010","010101011010","101010101011","010110010101","011101001001","011101100100","101110101010","010110110101","001010110110","101001010110","111001001101","101100100101","101101010010","101101101010","010110101101","001010101110","100100101111","010010010111","011001001011","011010100101","011010101100","101011010110","010101011101","010010011101","101001001101","110100010110","110110010101","010110101010","010110110101","001011011010","100101011011","010010101101","010110010101","011011001010","011011100100","101011101010","010011110101","001010110110","100101010110","101010101010","101101010100","101111010010","010111011001","001011101010","100101101101","010010101101","101010010101","101101001010","101110100101","010110110010","100110110101","010011010110","101010010111","010101000111","011010010011","011101001001","101101010101","010101101010","101001101011","010100101011","101010001011","110101000110","110110100011","010111001010","101011010110","010011011011","001001101011","100101001011","101010100101","101101010010","101101101001","010101110101","000101110110","100010110111","001001011011","010100101011","010101100101","010110110100","100111011010","010011101101","000101101101","100010110110","101010100110","110101010010","110110101001","010111010100","101011011010","100101011011","010010101011","011001010011","011100101001","011101100010","101110101001","010110110010","101010110101","010101010101","101100100101","110110010010","111011001001","011011010010","101011101001","010101101011","010010101011","101001010101","110100101001","110101010100","110110101010","100110110101","010010111010","101000111011","010010011011","101001001101","101010101010","101011010101","001011011010","100101011101","010001011110","101000101110","110010011010","110101010101","011010110010","011010111001","010010111010","101001011101","010100101101","101010010101","101101010010","101110101000","101110110100","010110111001","001011011010","100101011010","101101001010","110110100100","111011010001","011011101000","101101101010","010101101101","010100110101","011010010101","110101001010","110110101000","110111010100","011011011010","010101011011","001010011101","011000101011","101100010101","101101001010","101110010101","010110101010","101010101110","100100101110","110010001111","010100100111","011010010101","011010101010","101011010110","010101011101","001010011101"];class Wn extends Ln{fromGregorian(t){let e=1,n=0,i=1300,a=function(t,e){const n=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()),i=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),a=Math.abs(n-i);return Math.round(a/864e5)}(t,Gn);if(t.getTime()-Gn.getTime()>=0&&t.getTime()-Bn.getTime()<=0){let t=1300;for(let s=0;s<Un.length;s++,t++)for(let o=0;o<12;o++){let r=+Un[s][o]+29;if(a<=r)return e=a+1,e>r&&(e=1,o++),o>11&&(o=0,t++),n=o,i=t,new je(i,n+1,e);a-=r}return null}return super.fromGregorian(t)}toGregorian(t){const e=t.year,n=t.month-1,i=t.day;let a=new Date(Gn),s=i-1;if(e>=zn&&e<=1600){for(let t=0;t<e-zn;t++)for(let e=0;e<12;e++)s+=+Un[t][e]+29;for(let t=0;t<n;t++)s+=+Un[e-zn][t]+29;a.setDate(Gn.getDate()+s)}else a=super.toGregorian(t);return a}getDaysPerMonth(t,e){return e>=zn&&e<=1600?+Un[e-zn][t-1]+29:super.getDaysPerMonth(t,e)}}function qn(t){let e=Qn(function(t,e,n){let i=Jn(t);return Xn(i.gy,3,i.march)+31*(e-1)-Yn(e,7)*(e-7)+n-1}(t.year,t.month,t.day));return e.setHours(6,30,3,200),e}function Zn(t,e){return e=+e,t.year=t.year+Math.floor((e-1)/12),t.month=Math.floor(((e-1)%12+12)%12)+1,t}function Kn(t,e){return t-e*Math.floor(t/e)}function Yn(t,e){return Math.trunc(t/e)}function Jn(t){let e=[-61,9,38,199,426,686,756,818,1111,1181,1210,1635,2060,2097,2192,2262,2324,2394,2456,3178];const n=e.length,i=t+621;let a,s=-14,o=e[0];if(t<o||t>=e[n-1])throw new Error("Invalid Jalali year "+t);for(let i=1;i<n;i+=1){const n=e[i];if(a=n-o,t<n)break;s=s+8*Yn(a,33)+Yn(Kn(a,33),4),o=n}let r=t-o;s=s+8*Yn(r,33)+Yn(Kn(r,33)+3,4),4===Kn(a,33)&&a-r===4&&(s+=1);const l=20+s-(Yn(i,4)-Yn(3*(Yn(i,100)+1),4)-150);a-r<6&&(r=r-a+33*Yn(a+4,33));let c=Kn(Kn(r+1,33)-1,4);return-1===c&&(c=4),{leap:c,gy:i,march:l}}function Qn(t){let e=4*t+139361631;e=e+4*Yn(3*Yn(4*t+183187720,146097),4)-3908;const n=5*Yn(Kn(e,1461),4)+308,i=Yn(Kn(n,153),5)+1,a=Kn(Yn(n,153),12)+1,s=Yn(e,1461)-100100+Yn(8-a,6);return new Date(s,a-1,i)}function Xn(t,e,n){let i=Yn(1461*(t+Yn(e-8,6)+100100),4)+Yn(153*Kn(e+9,12)+2,5)+n-34840408;return i=i-Yn(3*Yn(t+100100+Yn(e-8,6),100),4)+752,i}function ti(t,e){return t<=6?31:t<=11||0===Jn(e).leap?30:29}Wn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Wn,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),Wn.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Wn}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Wn,decorators:[{type:y.Injectable}]});class ei extends Ze{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(t,e="d",n=1){switch(t=new je(t.year,t.month,t.day),e){case"y":return(t=function(t,e){return t.year=+e,t}(t,t.year+n)).month=1,t.day=1,t;case"m":return(t=Zn(t,t.month+n)).day=1,t;case"d":return function(t,e){let n=ti(t.month,t.year);if(e<=0)for(;e<=0;)n=ti((t=Zn(t,t.month-1)).month,t.year),e+=n;else if(e>n)for(;e>n;)e-=n,n=ti((t=Zn(t,t.month+1)).month,t.year);return t.day=e,t}(t,t.day+n);default:return t}}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){const e=qn(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=t[(11-e)%7],i=qn(n);i.setDate(i.getDate()+4-(i.getDay()||7));const a=i.getTime(),s=qn(new je(n.year,1,1));return Math.floor(Math.round((a-s.getTime())/864e5)/7)+1}getToday(){return function(t){let e,n,i,a=Qn(t).getFullYear(),s=a-621,o=Jn(s);if(i=t-Xn(a,3,o.march),i>=0){if(i<=185)return n=1+Yn(i,31),e=Kn(i,31)+1,new je(s,n,e);i-=186}else s-=1,i+=179,1===o.leap&&(i+=1);return n=7+Yn(i,30),e=Kn(i,30)+1,new je(s,n,e)}(Xn((t=new Date).getFullYear(),t.getMonth()+1,t.getDate()));var t}isValid(t){return null!=t&&jt(t.year)&&jt(t.month)&&jt(t.day)&&!isNaN(qn(t).getTime())}}ei.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ei,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),ei.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ei}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ei,decorators:[{type:y.Injectable}]});const ni=25920;function ii(t){return t%4==0&&t%100!=0||t%400==0}function ai(t){let e=Math.floor((235*t-234)/19),n=13753*e+12084,i=29*e+Math.floor(n/ni),a=n%ni,s=i%7;return 2!==s&&4!==s&&6!==s||(i++,s=i%7),1===s&&a>16404&&!li(t)?i+=2:0===s&&a>23269&&li(t-1)&&i++,i}function si(t,e){let n=[31,28,31,30,31,30,31,31,30,31,30,31];return ii(e)&&n[1]++,n[t-1]}function oi(t){return li(t)?13:12}function ri(t){return ai(t+1)-ai(t)}function li(t){if(null!=t){let e=(12*t+17)%19;return e>=(e<0?-7:12)}return!1}function ci(t,e){let n=ai(e+1)-ai(e),i=(n<=380?n:n-30)-353,a=li(e)?[30,29,29,29,30,30,29,30,29,30,29,30,29]:[30,29,29,29,30,29,30,29,30,29,30,29];return i>0&&a[2]++,i>1&&a[1]++,a[t-1]}function di(t){let e=0;for(let n=1;n<t.month;n++)e+=ci(n,t.year);return e+t.day}function pi(t){const e=new Date(t),n=e.getFullYear(),i=e.getMonth(),a=e.getDate();let s=1721424.5+365*(n-1)+Math.floor((n-1)/4)-Math.floor((n-1)/100)+Math.floor((n-1)/400)+Math.floor((367*(i+1)-362)/12+(i+1<=2?0:ii(n)?-1:-2)+a);s=Math.floor(s+.5);let o=s-347997,r=Math.floor(o*ni/765433),l=Math.floor((19*r+234)/235)+1,c=ai(l),d=o-c;for(;d<1;)l--,c=ai(l),d=o-c;let p=1,u=d;for(;u>ci(p,l);)u-=ci(p,l),p++;return new je(l,p,u)}function ui(t){const e=t.year,n=t.month,i=t.day;let a=ai(e);for(let t=1;t<n;t++)a+=ci(t,e);a+=i;let s=a-2092591,o=s>=0;o||(s=-s);let r=1970,l=1,c=1;for(;s>0;)o?s>=(ii(r)?366:365)?(s-=ii(r)?366:365,r++):s>=si(l,r)?(s-=si(l,r),l++):(c+=s,s=0):s>=(ii(r-1)?366:365)?(s-=ii(r-1)?366:365,r--):(l>1?l--:(l=12,r--),s>=si(l,r)?s-=si(l,r):(c=si(l,r)-s+1,s=0));return new Date(r,l-1,c)}function mi(t){if(!t)return"";const e=["","א","ב","ג","ד","ה","ו","ז","ח","ט"],n=["י","יא","יב","יג","יד","טו","טז","יז","יח","יט"],i=["","","כ","ל","מ","נ","ס","ע","פ","צ"],a=["","ק","ר","ש","ת","תק","תר","תש","תת","תתק"],s=["","א","ב","בא","בב","ה","הא","הב","הבא","הבב"];let o=0,r=[],l=0;for(;t>0;){let c=t%10;if(0===l)o=c;else if(1===l)1!==c?r.unshift(i[c],e[o]):r.unshift(n[o]);else{if(2!==l){5!==c&&r.unshift(s[c],"׳"," ");break}r.unshift(a[c])}t=Math.floor(t/10),0===l&&0===t&&r.unshift(e[c]),l++}return r=r.join("").split(""),1===r.length?r.push("׳"):r.length>1&&r.splice(r.length-1,0,"״"),r.join("")}class hi extends Ze{getDaysPerWeek(){return 7}getMonths(t){return t&&li(t)?[1,2,3,4,5,6,7,8,9,10,11,12,13]:[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}isValid(t){if(null!=t){let e=Ht(t.year)&&Ht(t.month)&&Ht(t.day);return e=e&&t.month>0&&t.month<=(li(t.year)?13:12),e=e&&t.day>0&&t.day<=ci(t.month,t.year),e&&!isNaN(ui(t).getTime())}return!1}getNext(t,e="d",n=1){switch(t=new je(t.year,t.month,t.day),e){case"y":return t.year+=n,t.month=1,t.day=1,t;case"m":return(t=function(t,e){let n=e>=0;for(n||(e=-e);e>0;)n?e>oi(t.year)-t.month?(e-=oi(t.year)-t.month+1,t.year++,t.month=1):(t.month+=e,e=0):e>=t.month?(t.year--,e-=t.month,t.month=oi(t.year)):(t.month-=e,e=0);return t}(t,n)).day=1,t;case"d":return function(t,e){let n=e>=0;for(n||(e=-e);e>0;)n?e>ri(t.year)-di(t)?(e-=ri(t.year)-di(t)+1,t.year++,t.month=1,t.day=1):e>ci(t.month,t.year)-t.day?(e-=ci(t.month,t.year)-t.day+1,t.month++,t.day=1):(t.day+=e,e=0):e>=t.day?(e-=t.day,t.month--,0===t.month&&(t.year--,t.month=oi(t.year)),t.day=ci(t.month,t.year)):(t.day-=e,e=0);return t}(t,n);default:return t}}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){const e=ui(t).getDay();return 0===e?7:e}getWeekNumber(t,e){const n=t[t.length-1];return Math.ceil(di(n)/7)}getToday(){return pi(new Date)}toGregorian(t){return Ue(ui(t))}fromGregorian(t){return pi(We(t))}}hi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:hi,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),hi.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:hi}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:hi,decorators:[{type:y.Injectable}]});const gi=["שני","שלישי","רביעי","חמישי","שישי","שבת","ראשון"],fi=["תשרי","חשון","כסלו","טבת","שבט","אדר","ניסן","אייר","סיון","תמוז","אב","אלול"],bi=["תשרי","חשון","כסלו","טבת","שבט","אדר א׳","אדר ב׳","ניסן","אייר","סיון","תמוז","אב","אלול"];class vi extends Je{getMonthShortName(t,e){return this.getMonthFullName(t,e)}getMonthFullName(t,e){return li(e)?bi[t-1]||"":fi[t-1]||""}getWeekdayLabel(t,e){return gi[t-1]||""}getDayAriaLabel(t){return`${mi(t.day)} ${this.getMonthFullName(t.month,t.year)} ${mi(t.year)}`}getDayNumerals(t){return mi(t.day)}getWeekNumerals(t){return mi(t)}getYearNumerals(t){return mi(t)}}function yi(t){return new Date(t.year-543,t.month-1,t.day)}function wi(t){return new je(t.getFullYear()+543,t.getMonth()+1,t.getDate())}vi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:vi,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),vi.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:vi}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:vi,decorators:[{type:y.Injectable}]});class xi extends Ke{getToday(){return wi(new Date)}getNext(t,e="d",n=1){let i=yi(t),a=!0,s=i.getMonth();switch(e){case"y":i.setFullYear(i.getFullYear()+n);break;case"m":s+=n,i.setMonth(s),s%=12,s<0&&(s+=12);break;case"d":i.setDate(i.getDate()+n),a=!1;break;default:return t}return a&&i.getMonth()!==s&&i.setDate(0),wi(i)}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){let e=yi(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=yi(t[(11-e)%7]);n.setDate(n.getDate()+4-(n.getDay()||7));const i=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((i-n.getTime())/864e5)/7)+1}isValid(t){if(!(t&&jt(t.year)&&jt(t.month)&&jt(t.day)))return!1;if(0===t.year)return!1;const e=yi(t);return!isNaN(e.getTime())&&e.getFullYear()===t.year-543&&e.getMonth()+1===t.month&&e.getDate()===t.day}}xi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:xi,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),xi.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:xi}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:xi,decorators:[{type:y.Injectable}]});class ki extends rn{fromModel(t){return t instanceof Date&&!isNaN(t.getTime())?this._fromNativeDate(t):null}toModel(t){return t&&jt(t.year)&&jt(t.month)&&jt(t.day)?this._toNativeDate(t):null}_fromNativeDate(t){return{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}}_toNativeDate(t){const e=new Date(t.year,t.month-1,t.day,12);return e.setFullYear(t.year),e}}ki.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ki,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),ki.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ki}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ki,decorators:[{type:y.Injectable}]});class _i extends ki{_fromNativeDate(t){return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate()}}_toNativeDate(t){const e=new Date(Date.UTC(t.year,t.month-1,t.day));return e.setUTCFullYear(t.year),e}}_i.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:_i,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),_i.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:_i}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:_i,decorators:[{type:y.Injectable}]});const Ii=[pn,cn,Vn,dn];class Di{}Di.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Di,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Di.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:Di,imports:[pn,cn,Vn,dn],exports:[pn,cn,Vn,dn]}),Di.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Di,imports:[pn,dn]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Di,decorators:[{type:y.NgModule,args:[{exports:Ii,imports:Ii}]}]});class $i{constructor(){this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=t=>t}}$i.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:$i,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),$i.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:$i,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:$i,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});class Ci{}Ci.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ci,deps:[],target:y["ɵɵFactoryTarget"].Directive}),Ci.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ci,isStandalone:!0,selector:".navbar",ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ci,decorators:[{type:y.Directive,args:[{selector:".navbar",standalone:!0}]}]});class Si{constructor(t,e){this.elementRef=t,this._renderer=e,this._disabled=!1}set disabled(t){this._disabled=""===t||!0===t,this._renderer.setProperty(this.elementRef.nativeElement,"disabled",this._disabled)}get disabled(){return this._disabled}}Si.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Si,deps:[{token:y.ElementRef},{token:y.Renderer2}],target:y["ɵɵFactoryTarget"].Directive}),Si.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Si,isStandalone:!0,selector:"[ngbDropdownItem]",inputs:{disabled:"disabled"},host:{properties:{"class.disabled":"disabled",tabIndex:"disabled ? -1 : 0"},classAttribute:"dropdown-item"},ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Si,decorators:[{type:y.Directive,args:[{selector:"[ngbDropdownItem]",standalone:!0,host:{class:"dropdown-item","[class.disabled]":"disabled","[tabIndex]":"disabled ? -1 : 0"}}]}],ctorParameters:function(){return[{type:y.ElementRef},{type:y.Renderer2}]},propDecorators:{disabled:[{type:y.Input}]}});class Mi{constructor(t,e){this.dropdown=t,this.placement="bottom",this.isOpen=!1,this.nativeElement=e.nativeElement}}Mi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Mi,deps:[{token:(0,y.forwardRef)(()=>Ni)},{token:y.ElementRef}],target:y["ɵɵFactoryTarget"].Directive}),Mi.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Mi,isStandalone:!0,selector:"[ngbDropdownMenu]",host:{listeners:{"keydown.ArrowUp":"dropdown.onKeyDown($event)","keydown.ArrowDown":"dropdown.onKeyDown($event)","keydown.Home":"dropdown.onKeyDown($event)","keydown.End":"dropdown.onKeyDown($event)","keydown.Enter":"dropdown.onKeyDown($event)","keydown.Space":"dropdown.onKeyDown($event)","keydown.Tab":"dropdown.onKeyDown($event)","keydown.Shift.Tab":"dropdown.onKeyDown($event)"},properties:{"class.dropdown-menu":"true","class.show":"dropdown.isOpen()"}},queries:[{propertyName:"menuItems",predicate:Si}],ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Mi,decorators:[{type:y.Directive,args:[{selector:"[ngbDropdownMenu]",standalone:!0,host:{"[class.dropdown-menu]":"true","[class.show]":"dropdown.isOpen()","(keydown.ArrowUp)":"dropdown.onKeyDown($event)","(keydown.ArrowDown)":"dropdown.onKeyDown($event)","(keydown.Home)":"dropdown.onKeyDown($event)","(keydown.End)":"dropdown.onKeyDown($event)","(keydown.Enter)":"dropdown.onKeyDown($event)","(keydown.Space)":"dropdown.onKeyDown($event)","(keydown.Tab)":"dropdown.onKeyDown($event)","(keydown.Shift.Tab)":"dropdown.onKeyDown($event)"}}]}],ctorParameters:function(){return[{type:Ni,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>Ni)]}]},{type:y.ElementRef}]},propDecorators:{menuItems:[{type:y.ContentChildren,args:[Si]}]}});class Ti{constructor(t,e){this.dropdown=t,this.nativeElement=e.nativeElement}}Ti.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ti,deps:[{token:(0,y.forwardRef)(()=>Ni)},{token:y.ElementRef}],target:y["ɵɵFactoryTarget"].Directive}),Ti.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ti,isStandalone:!0,selector:"[ngbDropdownAnchor]",host:{properties:{"attr.aria-expanded":"dropdown.isOpen()"},classAttribute:"dropdown-toggle"},ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ti,decorators:[{type:y.Directive,args:[{selector:"[ngbDropdownAnchor]",standalone:!0,host:{class:"dropdown-toggle","[attr.aria-expanded]":"dropdown.isOpen()"}}]}],ctorParameters:function(){return[{type:Ni,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>Ni)]}]},{type:y.ElementRef}]}});class Ei extends Ti{constructor(t,e){super(t,e)}}Ei.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ei,deps:[{token:(0,y.forwardRef)(()=>Ni)},{token:y.ElementRef}],target:y["ɵɵFactoryTarget"].Directive}),Ei.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ei,isStandalone:!0,selector:"[ngbDropdownToggle]",host:{listeners:{click:"dropdown.toggle()","keydown.ArrowUp":"dropdown.onKeyDown($event)","keydown.ArrowDown":"dropdown.onKeyDown($event)","keydown.Home":"dropdown.onKeyDown($event)","keydown.End":"dropdown.onKeyDown($event)","keydown.Tab":"dropdown.onKeyDown($event)","keydown.Shift.Tab":"dropdown.onKeyDown($event)"},properties:{"attr.aria-expanded":"dropdown.isOpen()"},classAttribute:"dropdown-toggle"},providers:[{provide:Ti,useExisting:(0,y.forwardRef)(()=>Ei)}],usesInheritance:!0,ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ei,decorators:[{type:y.Directive,args:[{selector:"[ngbDropdownToggle]",standalone:!0,host:{class:"dropdown-toggle","[attr.aria-expanded]":"dropdown.isOpen()","(click)":"dropdown.toggle()","(keydown.ArrowUp)":"dropdown.onKeyDown($event)","(keydown.ArrowDown)":"dropdown.onKeyDown($event)","(keydown.Home)":"dropdown.onKeyDown($event)","(keydown.End)":"dropdown.onKeyDown($event)","(keydown.Tab)":"dropdown.onKeyDown($event)","(keydown.Shift.Tab)":"dropdown.onKeyDown($event)"},providers:[{provide:Ti,useExisting:(0,y.forwardRef)(()=>Ei)}]}]}],ctorParameters:function(){return[{type:Ni,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>Ni)]}]},{type:y.ElementRef}]}});class Ni{constructor(t,e,n,i,a,s){this._changeDetector=t,this._document=n,this._ngZone=i,this._elementRef=a,this._renderer=s,this._destroyCloseHandlers$=new _.Subject,this._bodyContainer=null,this._open=!1,this.openChange=new y.EventEmitter,this.placement=e.placement,this.popperOptions=e.popperOptions,this.container=e.container,this.autoClose=e.autoClose,this._positioning=Mn(),this.display=this._elementRef.nativeElement.closest(".navbar")?"static":"dynamic"}ngAfterContentInit(){this._ngZone.onStable.pipe((0,I.take)(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(t){if(t.container&&this._open&&this._applyContainer(this.container),t.placement&&!t.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:"body"===this.container}),this._applyPlacementClasses()),t.dropdownClass){const{currentValue:e,previousValue:n}=t.dropdownClass;this._applyCustomDropdownClass(e,n)}t.autoClose&&this._open&&(this.autoClose=t.autoClose.currentValue,this._setCloseHandlers())}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&(this._anchor.nativeElement.focus(),"dynamic"===this.display&&this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:"body"===this.container,updatePopperOptions:t=>this.popperOptions(En([0,2])(t))}),this._applyPlacementClasses(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positionMenu())})))}_setCloseHandlers(){this._destroyCloseHandlers$.next(),gn(this._ngZone,this._document,this.autoClose,t=>{this.close(),0===t&&this._anchor.nativeElement.focus()},this._destroyCloseHandlers$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){var t;this._open&&(this._open=!1,this._resetContainer(),this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this._destroyCloseHandlers$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this.close()}onKeyDown(t){const e=t.which,n=this._getMenuElements();let i=-1,a=null;const s=this._isEventFromToggle(t);if(!s&&n.length&&n.forEach((e,n)=>{e.contains(t.target)&&(a=e),e===this._document.activeElement&&(i=n)}),e!==Pe.Space&&e!==Pe.Enter){if(e!==Pe.Tab){if(s||a){if(this.open(),n.length){switch(e){case Pe.ArrowDown:i=Math.min(i+1,n.length-1);break;case Pe.ArrowUp:if(this._isDropup()&&-1===i){i=n.length-1;break}i=Math.max(i-1,0);break;case Pe.Home:i=0;break;case Pe.End:i=n.length-1}n[i].focus()}t.preventDefault()}}else if(t.target&&this.isOpen()&&this.autoClose){if(this._anchor.nativeElement===t.target)return void("body"!==this.container||t.shiftKey?t.shiftKey&&this.close():(this._renderer.setAttribute(this._menu.nativeElement,"tabindex","0"),this._menu.nativeElement.focus(),this._renderer.removeAttribute(this._menu.nativeElement,"tabindex")));if("body"===this.container){const e=this._menu.nativeElement.querySelectorAll(fn);t.shiftKey&&t.target===e[0]?(this._anchor.nativeElement.focus(),t.preventDefault()):t.shiftKey||t.target!==e[e.length-1]||(this._anchor.nativeElement.focus(),this.close())}else(0,_.fromEvent)(t.target,"focusout").pipe((0,I.take)(1)).subscribe(({relatedTarget:t})=>{this._elementRef.nativeElement.contains(t)||this.close()})}}else!a||!0!==this.autoClose&&"inside"!==this.autoClose||(0,_.fromEvent)(a,"click").pipe((0,I.take)(1)).subscribe(()=>this.close())}_isDropup(){return this._elementRef.nativeElement.classList.contains("dropup")}_isEventFromToggle(t){return this._anchor.nativeElement.contains(t.target)}_getMenuElements(){const t=this._menu;return null==t?[]:t.menuItems.filter(t=>!t.disabled).map(t=>t.elementRef.nativeElement)}_positionMenu(){const t=this._menu;this.isOpen()&&t&&("dynamic"===this.display?(this._positioning.update(),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(t){return Array.isArray(t)?t[0]:t.split(" ")[0]}_resetContainer(){const t=this._renderer;if(this._menu){const e=this._elementRef.nativeElement,n=this._menu.nativeElement;t.appendChild(e,n)}this._bodyContainer&&(t.removeChild(this._document.body,this._bodyContainer),this._bodyContainer=null)}_applyContainer(t=null){if(this._resetContainer(),"body"===t){const t=this._renderer,e=this._menu.nativeElement,n=this._bodyContainer=this._bodyContainer||t.createElement("div");t.setStyle(n,"position","absolute"),t.setStyle(e,"position","static"),t.setStyle(n,"z-index","1055"),t.appendChild(n,e),t.appendChild(this._document.body,n)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(t,e){const n="body"===this.container?this._bodyContainer:this._elementRef.nativeElement;n&&(e&&this._renderer.removeClass(n,e),t&&this._renderer.addClass(n,t))}_applyPlacementClasses(t){const e=this._menu;if(e){t||(t=this._getFirstPlacement(this.placement));const n=this._renderer,i=this._elementRef.nativeElement;n.removeClass(i,"dropup"),n.removeClass(i,"dropdown");const{nativeElement:a}=e;"static"===this.display?(e.placement=null,n.setAttribute(a,"data-bs-popper","static")):(e.placement=t,n.removeAttribute(a,"data-bs-popper"));const s=-1!==t.search("^top")?"dropup":"dropdown";n.addClass(i,s);const o=this._bodyContainer;o&&(n.removeClass(o,"dropup"),n.removeClass(o,"dropdown"),n.addClass(o,s))}}}Ni.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ni,deps:[{token:y.ChangeDetectorRef},{token:$i},{token:x.DOCUMENT},{token:y.NgZone},{token:y.ElementRef},{token:y.Renderer2}],target:y["ɵɵFactoryTarget"].Directive}),Ni.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ni,isStandalone:!0,selector:"[ngbDropdown]",inputs:{autoClose:"autoClose",dropdownClass:"dropdownClass",_open:["open","_open"],placement:"placement",popperOptions:"popperOptions",container:"container",display:"display"},outputs:{openChange:"openChange"},host:{properties:{"class.show":"isOpen()"}},queries:[{propertyName:"_menu",first:!0,predicate:Mi,descendants:!0},{propertyName:"_anchor",first:!0,predicate:Ti,descendants:!0}],exportAs:["ngbDropdown"],usesOnChanges:!0,ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ni,decorators:[{type:y.Directive,args:[{selector:"[ngbDropdown]",exportAs:"ngbDropdown",standalone:!0,host:{"[class.show]":"isOpen()"}}]}],ctorParameters:function(){return[{type:y.ChangeDetectorRef},{type:$i},{type:void 0,decorators:[{type:y.Inject,args:[x.DOCUMENT]}]},{type:y.NgZone},{type:y.ElementRef},{type:y.Renderer2}]},propDecorators:{_menu:[{type:y.ContentChild,args:[Mi,{static:!1}]}],_anchor:[{type:y.ContentChild,args:[Ti,{static:!1}]}],autoClose:[{type:y.Input}],dropdownClass:[{type:y.Input}],_open:[{type:y.Input,args:["open"]}],placement:[{type:y.Input}],popperOptions:[{type:y.Input}],container:[{type:y.Input}],display:[{type:y.Input}],openChange:[{type:y.Output}]}});const Oi=[Ni,Ti,Ei,Mi,Si];class Ri{}Ri.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ri,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Ri.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:Ri,imports:[Ni,Ti,Ei,Mi,Si],exports:[Ni,Ti,Ei,Mi,Si]}),Ri.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ri}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ri,decorators:[{type:y.NgModule,args:[{imports:Oi,exports:Oi}]}]});class Vi{constructor(t,e,n){this.nodes=t,this.viewRef=e,this.componentRef=n}}class Fi{constructor(t,e,n,i,a,s){this._componentType=t,this._injector=e,this._viewContainerRef=n,this._renderer=i,this._ngZone=a,this._applicationRef=s,this._windowRef=null,this._contentRef=null}open(t,e,n=!1){this._windowRef||(this._contentRef=this._getContentRef(t,e),this._windowRef=this._viewContainerRef.createComponent(this._componentType,{injector:this._injector,projectableNodes:this._contentRef.nodes}));const{nativeElement:i}=this._windowRef.location,a=this._ngZone.onStable.pipe((0,I.take)(1),(0,I.mergeMap)(()=>Jt(this._ngZone,i,({classList:t})=>t.add("show"),{animation:n,runningTransition:"continue"})));return{windowRef:this._windowRef,transition$:a}}close(t=!1){return this._windowRef?Jt(this._ngZone,this._windowRef.location.nativeElement,({classList:t})=>t.remove("show"),{animation:t,runningTransition:"stop"}).pipe((0,I.tap)(()=>{var t;this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null),(null===(t=this._contentRef)||void 0===t?void 0:t.viewRef)&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null)})):(0,_.of)(void 0)}_getContentRef(t,e){if(t){if(t instanceof y.TemplateRef){const n=t.createEmbeddedView(e);return this._applicationRef.attachView(n),new Vi([n.rootNodes],n)}return new Vi([[this._renderer.createText(`${t}`)]])}return new Vi([])}}class Pi{constructor(t,e){this._el=t,this._zone=e}ngOnInit(){this._zone.onStable.asObservable().pipe((0,I.take)(1)).subscribe(()=>{Jt(this._zone,this._el.nativeElement,(t,e)=>{e&&Ut(t),t.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Jt(this._zone,this._el.nativeElement,({classList:t})=>t.remove("show"),{animation:this.animation,runningTransition:"stop"})}}Pi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Pi,deps:[{token:y.ElementRef},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Component}),Pi.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Pi,isStandalone:!0,selector:"ngb-modal-backdrop",inputs:{animation:"animation",backdropClass:"backdropClass"},host:{properties:{class:'"modal-backdrop" + (backdropClass ? " " + backdropClass : "")',"class.show":"!animation","class.fade":"animation"},styleAttribute:"z-index: 1055"},ngImport:w,template:"",isInline:!0,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Pi,decorators:[{type:y.Component,args:[{selector:"ngb-modal-backdrop",standalone:!0,encapsulation:y.ViewEncapsulation.None,template:"",host:{"[class]":'"modal-backdrop" + (backdropClass ? " " + backdropClass : "")',"[class.show]":"!animation","[class.fade]":"animation",style:"z-index: 1055"}}]}],ctorParameters:function(){return[{type:y.ElementRef},{type:y.NgZone}]},propDecorators:{animation:[{type:y.Input}],backdropClass:[{type:y.Input}]}});class Ai{update(t){}close(t){}dismiss(t){}}const Hi=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","scrollable","size","windowClass","modalDialogClass"],ji=["animation","backdropClass"];class Li{constructor(t,e,n,i){this._windowCmptRef=t,this._contentRef=e,this._backdropCmptRef=n,this._beforeDismiss=i,this._closed=new _.Subject,this._dismissed=new _.Subject,this._hidden=new _.Subject,t.instance.dismissEvent.subscribe(t=>{this.dismiss(t)}),this.result=new Promise((t,e)=>{this._resolve=t,this._reject=e}),this.result.then(null,()=>{})}_applyWindowOptions(t,e){Hi.forEach(n=>{Lt(e[n])&&(t[n]=e[n])})}_applyBackdropOptions(t,e){ji.forEach(n=>{Lt(e[n])&&(t[n]=e[n])})}update(t){this._applyWindowOptions(this._windowCmptRef.instance,t),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._applyBackdropOptions(this._backdropCmptRef.instance,t)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe((0,I.takeUntil)(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe((0,I.takeUntil)(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(t){this._windowCmptRef&&(this._closed.next(t),this._resolve(t),this._removeModalElements())}_dismiss(t){this._dismissed.next(t),this._reject(t),this._removeModalElements()}dismiss(t){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();Gt(e)?e.then(e=>{!1!==e&&this._dismiss(t)},()=>{}):!1!==e&&this._dismiss(t)}else this._dismiss(t)}_removeModalElements(){const t=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():(0,_.of)(void 0);t.subscribe(()=>{const{nativeElement:t}=this._windowCmptRef.location;t.parentNode.removeChild(t),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:t}=this._backdropCmptRef.location;t.parentNode.removeChild(t),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),(0,_.zip)(t,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var Gi;!function(t){t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC"}(Gi||(Gi={}));class Bi{constructor(t,e,n){this._document=t,this._elRef=e,this._zone=n,this._closed$=new _.Subject,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new y.EventEmitter,this.shown=new _.Subject,this.hidden=new _.Subject}get fullscreenClass(){return!0===this.fullscreen?" modal-fullscreen":At(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(t){this.dismissEvent.emit(t)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe((0,I.take)(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:t}=this._elRef,e={animation:this.animation,runningTransition:"stop"},n=Jt(this._zone,t,()=>t.classList.remove("show"),e),i=Jt(this._zone,this._dialogEl.nativeElement,()=>{},e),a=(0,_.zip)(n,i);return a.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),a}_show(){const t={animation:this.animation,runningTransition:"continue"},e=Jt(this._zone,this._elRef.nativeElement,(t,e)=>{e&&Ut(t),t.classList.add("show")},t),n=Jt(this._zone,this._dialogEl.nativeElement,()=>{},t);(0,_.zip)(e,n).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:t}=this._elRef;this._zone.runOutsideAngular(()=>{(0,_.fromEvent)(t,"keydown").pipe((0,I.takeUntil)(this._closed$),(0,I.filter)(t=>t.which===Pe.Escape)).subscribe(t=>{this.keyboard?requestAnimationFrame(()=>{t.defaultPrevented||this._zone.run(()=>this.dismiss(Gi.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let e=!1;(0,_.fromEvent)(this._dialogEl.nativeElement,"mousedown").pipe((0,I.takeUntil)(this._closed$),(0,I.tap)(()=>e=!1),(0,I.switchMap)(()=>(0,_.fromEvent)(t,"mouseup").pipe((0,I.takeUntil)(this._closed$),(0,I.take)(1))),(0,I.filter)(({target:e})=>t===e)).subscribe(()=>{e=!0}),(0,_.fromEvent)(t,"click").pipe((0,I.takeUntil)(this._closed$)).subscribe(({target:n})=>{t===n&&("static"===this.backdrop?this._bumpBackdrop():!0!==this.backdrop||e||this._zone.run(()=>this.dismiss(Gi.BACKDROP_CLICK))),e=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:t}=this._elRef;if(!t.contains(document.activeElement)){const e=t.querySelector("[ngbAutofocus]"),n=bn(t)[0];(e||n||t).focus()}}_restoreFocus(){const t=this._document.body,e=this._elWithFocus;let n;n=e&&e.focus&&t.contains(e)?e:t,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&Jt(this._zone,this._elRef.nativeElement,({classList:t})=>(t.add("modal-static"),()=>t.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}Bi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Bi,deps:[{token:x.DOCUMENT},{token:y.ElementRef},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Component}),Bi.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Bi,isStandalone:!0,selector:"ngb-modal-window",inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},host:{attributes:{role:"dialog",tabindex:"-1"},properties:{class:'"modal d-block" + (windowClass ? " " + windowClass : "")',"class.fade":"animation","attr.aria-modal":"true","attr.aria-labelledby":"ariaLabelledBy","attr.aria-describedby":"ariaDescribedBy"}},viewQueries:[{propertyName:"_dialogEl",first:!0,predicate:["dialog"],descendants:!0,static:!0}],ngImport:w,template:"\n\t\t<div\n\t\t\t#dialog\n\t\t\t[class]=\"\n\t\t\t\t'modal-dialog' +\n\t\t\t\t(size ? ' modal-' + size : '') +\n\t\t\t\t(centered ? ' modal-dialog-centered' : '') +\n\t\t\t\tfullscreenClass +\n\t\t\t\t(scrollable ? ' modal-dialog-scrollable' : '') +\n\t\t\t\t(modalDialogClass ? ' ' + modalDialogClass : '')\n\t\t\t\"\n\t\t\trole=\"document\"\n\t\t>\n\t\t\t<div class=\"modal-content\"><ng-content></ng-content></div>\n\t\t</div>\n\t",isInline:!0,styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}\n"],encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Bi,decorators:[{type:y.Component,args:[{selector:"ngb-modal-window",standalone:!0,host:{"[class]":'"modal d-block" + (windowClass ? " " + windowClass : "")',"[class.fade]":"animation",role:"dialog",tabindex:"-1","[attr.aria-modal]":"true","[attr.aria-labelledby]":"ariaLabelledBy","[attr.aria-describedby]":"ariaDescribedBy"},template:"\n\t\t<div\n\t\t\t#dialog\n\t\t\t[class]=\"\n\t\t\t\t'modal-dialog' +\n\t\t\t\t(size ? ' modal-' + size : '') +\n\t\t\t\t(centered ? ' modal-dialog-centered' : '') +\n\t\t\t\tfullscreenClass +\n\t\t\t\t(scrollable ? ' modal-dialog-scrollable' : '') +\n\t\t\t\t(modalDialogClass ? ' ' + modalDialogClass : '')\n\t\t\t\"\n\t\t\trole=\"document\"\n\t\t>\n\t\t\t<div class=\"modal-content\"><ng-content></ng-content></div>\n\t\t</div>\n\t",encapsulation:y.ViewEncapsulation.None,styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}\n"]}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Inject,args:[x.DOCUMENT]}]},{type:y.ElementRef},{type:y.NgZone}]},propDecorators:{_dialogEl:[{type:y.ViewChild,args:["dialog",{static:!0}]}],animation:[{type:y.Input}],ariaLabelledBy:[{type:y.Input}],ariaDescribedBy:[{type:y.Input}],backdrop:[{type:y.Input}],centered:[{type:y.Input}],fullscreen:[{type:y.Input}],keyboard:[{type:y.Input}],scrollable:[{type:y.Input}],size:[{type:y.Input}],windowClass:[{type:y.Input}],modalDialogClass:[{type:y.Input}],dismissEvent:[{type:y.Output,args:["dismiss"]}]}});class zi{constructor(t){this._document=t}hide(){const t=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),e=this._document.body,n=e.style,{overflow:i,paddingRight:a}=n;if(t>0){const i=parseFloat(window.getComputedStyle(e).paddingRight);n.paddingRight=`${i+t}px`}return n.overflow="hidden",()=>{t>0&&(n.paddingRight=a),n.overflow=i}}}zi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:zi,deps:[{token:x.DOCUMENT}],target:y["ɵɵFactoryTarget"].Injectable}),zi.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:zi,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:zi,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Inject,args:[x.DOCUMENT]}]}]}});class Ui{constructor(t,e,n,i,a,s,o){this._applicationRef=t,this._injector=e,this._environmentInjector=n,this._document=i,this._scrollBar=a,this._rendererFactory=s,this._ngZone=o,this._activeWindowCmptHasChanged=new _.Subject,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new y.EventEmitter,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const t=this._windowCmpts[this._windowCmpts.length-1];vn(this._ngZone,t.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(t.location.nativeElement)}})}_restoreScrollBar(){const t=this._scrollBarRestoreFn;t&&(this._scrollBarRestoreFn=null,t())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(t,e,n){const i=n.container instanceof HTMLElement?n.container:Lt(n.container)?this._document.querySelector(n.container):this._document.body,a=this._rendererFactory.createRenderer(null,null);if(!i)throw new Error(`The specified modal container "${n.container||"body"}" was not found in the DOM.`);this._hideScrollBar();const s=new Ai,o=(t=n.injector||t).get(y.EnvironmentInjector,null)||this._environmentInjector,r=this._getContentRef(t,o,e,s,n);let l=!1!==n.backdrop?this._attachBackdrop(i):void 0,c=this._attachWindowComponent(i,r.nodes),d=new Li(c,r,l,n.beforeDismiss);return this._registerModalRef(d),this._registerWindowCmpt(c),d.hidden.pipe((0,I.take)(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(a.removeClass(this._document.body,"modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),s.close=t=>{d.close(t)},s.dismiss=t=>{d.dismiss(t)},s.update=t=>{d.update(t)},d.update(n),1===this._modalRefs.length&&a.addClass(this._document.body,"modal-open"),l&&l.instance&&l.changeDetectorRef.detectChanges(),c.changeDetectorRef.detectChanges(),d}get activeInstances(){return this._activeInstances}dismissAll(t){this._modalRefs.forEach(e=>e.dismiss(t))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(t){let e=(0,y.createComponent)(Pi,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(e.hostView),t.appendChild(e.location.nativeElement),e}_attachWindowComponent(t,e){let n=(0,y.createComponent)(Bi,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:e});return this._applicationRef.attachView(n.hostView),t.appendChild(n.location.nativeElement),n}_getContentRef(t,e,n,i,a){return n?n instanceof y.TemplateRef?this._createFromTemplateRef(n,i):At(n)?this._createFromString(n):this._createFromComponent(t,e,n,i,a):new Vi([])}_createFromTemplateRef(t,e){const n={$implicit:e,close(t){e.close(t)},dismiss(t){e.dismiss(t)}},i=t.createEmbeddedView(n);return this._applicationRef.attachView(i),new Vi([i.rootNodes],i)}_createFromString(t){const e=this._document.createTextNode(`${t}`);return new Vi([[e]])}_createFromComponent(t,e,n,i,a){const s=y.Injector.create({providers:[{provide:Ai,useValue:i}],parent:t}),o=(0,y.createComponent)(n,{environmentInjector:e,elementInjector:s}),r=o.location.nativeElement;return a.scrollable&&r.classList.add("component-host-scrollable"),this._applicationRef.attachView(o.hostView),new Vi([[r]],o.hostView,o)}_setAriaHidden(t){const e=t.parentElement;e&&t!==this._document.body&&(Array.from(e.children).forEach(e=>{e!==t&&"SCRIPT"!==e.nodeName&&(this._ariaHiddenValues.set(e,e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}),this._setAriaHidden(e))}_revertAriaHidden(){this._ariaHiddenValues.forEach((t,e)=>{t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(t){const e=()=>{const e=this._modalRefs.indexOf(t);e>-1&&(this._modalRefs.splice(e,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(t),this._activeInstances.emit(this._modalRefs),t.result.then(e,e)}_registerWindowCmpt(t){this._windowCmpts.push(t),this._activeWindowCmptHasChanged.next(),t.onDestroy(()=>{const e=this._windowCmpts.indexOf(t);e>-1&&(this._windowCmpts.splice(e,1),this._activeWindowCmptHasChanged.next())})}}Ui.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ui,deps:[{token:y.ApplicationRef},{token:y.Injector},{token:y.EnvironmentInjector},{token:x.DOCUMENT},{token:zi},{token:y.RendererFactory2},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Injectable}),Ui.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ui,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ui,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:y.ApplicationRef},{type:y.Injector},{type:y.EnvironmentInjector},{type:void 0,decorators:[{type:y.Inject,args:[x.DOCUMENT]}]},{type:zi},{type:y.RendererFactory2},{type:y.NgZone}]}});class Wi{constructor(t){this._ngbConfig=t,this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}Wi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Wi,deps:[{token:Xt}],target:y["ɵɵFactoryTarget"].Injectable}),Wi.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Wi,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Wi,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Xt}]}});class qi{constructor(t,e,n){this._injector=t,this._modalStack=e,this._config=n}open(t,e={}){const n=Object.assign(Object.assign(Object.assign({},this._config),{animation:this._config.animation}),e);return this._modalStack.open(this._injector,t,n)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(t){this._modalStack.dismissAll(t)}hasOpenModals(){return this._modalStack.hasOpenModals()}}qi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:qi,deps:[{token:y.Injector},{token:Ui},{token:Wi}],target:y["ɵɵFactoryTarget"].Injectable}),qi.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:qi,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:qi,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:y.Injector},{type:Ui},{type:Wi}]}});class Zi{}Zi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Zi,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Zi.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:Zi}),Zi.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Zi,providers:[qi]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Zi,decorators:[{type:y.NgModule,args:[{providers:[qi]}]}]});class Ki{constructor(t){this._ngbConfig=t,this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}Ki.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ki,deps:[{token:Xt}],target:y["ɵɵFactoryTarget"].Injectable}),Ki.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ki,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ki,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Xt}]}});const Yi=t=>Lt(t)&&""!==t;let Ji=0;class Qi{constructor(t){this.templateRef=t}}Qi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Qi,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),Qi.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Qi,isStandalone:!0,selector:"ng-template[ngbNavContent]",ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Qi,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbNavContent]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class Xi{constructor(t,e){this.role=t,this.nav=e}}Xi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Xi,deps:[{token:"role",attribute:!0},{token:(0,y.forwardRef)(()=>ea)}],target:y["ɵɵFactoryTarget"].Directive}),Xi.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Xi,isStandalone:!0,selector:"[ngbNavItem]:not(ng-container)",host:{properties:{"attr.role":"role ? role : nav.roles ? 'presentation' : undefined"}},ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Xi,decorators:[{type:y.Directive,args:[{selector:"[ngbNavItem]:not(ng-container)",standalone:!0,host:{"[attr.role]":"role ? role : nav.roles ? 'presentation' : undefined"}}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Attribute,args:["role"]}]},{type:ea,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>ea)]}]}]}});class ta{constructor(t,e){this._nav=t,this.elementRef=e,this.disabled=!1,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter}ngAfterContentChecked(){this.contentTpl=this.contentTpls.first}ngOnInit(){Lt(this.domId)||(this.domId="ngb-nav-"+Ji++)}get active(){return this._nav.activeId===this.id}get id(){return Yi(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(Lt(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}}ta.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ta,deps:[{token:(0,y.forwardRef)(()=>ea)},{token:y.ElementRef}],target:y["ɵɵFactoryTarget"].Directive}),ta.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ta,isStandalone:!0,selector:"[ngbNavItem]",inputs:{destroyOnHide:"destroyOnHide",disabled:"disabled",domId:"domId",_id:["ngbNavItem","_id"]},outputs:{shown:"shown",hidden:"hidden"},host:{properties:{"class.nav-item":"true"}},queries:[{propertyName:"contentTpls",predicate:Qi}],exportAs:["ngbNavItem"],ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ta,decorators:[{type:y.Directive,args:[{selector:"[ngbNavItem]",exportAs:"ngbNavItem",standalone:!0,host:{"[class.nav-item]":"true"}}]}],ctorParameters:function(){return[{type:ea,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>ea)]}]},{type:y.ElementRef}]},propDecorators:{destroyOnHide:[{type:y.Input}],disabled:[{type:y.Input}],domId:[{type:y.Input}],_id:[{type:y.Input,args:["ngbNavItem"]}],shown:[{type:y.Output}],hidden:[{type:y.Output}],contentTpls:[{type:y.ContentChildren,args:[Qi,{descendants:!1}]}]}});class ea{constructor(t,e,n,i){this.role=t,this._cd=n,this._document=i,this.activeIdChange=new y.EventEmitter,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter,this.destroy$=new _.Subject,this.navItemChange$=new _.Subject,this.navChange=new y.EventEmitter,this.animation=e.animation,this.destroyOnHide=e.destroyOnHide,this.orientation=e.orientation,this.roles=e.roles,this.keyboard=e.keyboard}click(t){t.disabled||this._updateActiveId(t.id)}onKeyDown(t){if("tablist"!==this.roles||!this.keyboard)return;const e=t.which,n=this.links.filter(t=>!t.navItem.disabled),{length:i}=n;let a=-1;if(n.forEach((t,e)=>{t.elRef.nativeElement===this._document.activeElement&&(a=e)}),i){switch(e){case Pe.ArrowLeft:if("vertical"===this.orientation)return;a=(a-1+i)%i;break;case Pe.ArrowRight:if("vertical"===this.orientation)return;a=(a+1)%i;break;case Pe.ArrowDown:if("horizontal"===this.orientation)return;a=(a+1)%i;break;case Pe.ArrowUp:if("horizontal"===this.orientation)return;a=(a-1+i)%i;break;case Pe.Home:a=0;break;case Pe.End:a=i-1}"changeWithArrows"===this.keyboard&&this.select(n[a].navItem.id),n[a].elRef.nativeElement.focus(),t.preventDefault()}}select(t){this._updateActiveId(t,!1)}ngAfterContentInit(){if(!Lt(this.activeId)){const t=this.items.first?this.items.first.id:null;Yi(t)&&(this._updateActiveId(t,!1),this._cd.detectChanges())}this.items.changes.pipe((0,I.takeUntil)(this.destroy$)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:t}){t&&!t.firstChange&&this._notifyItemChanged(t.currentValue)}ngOnDestroy(){this.destroy$.next()}_updateActiveId(t,e=!0){if(this.activeId!==t){let n=!1;e&&this.navChange.emit({activeId:this.activeId,nextId:t,preventDefault:()=>{n=!0}}),n||(this.activeId=t,this.activeIdChange.emit(t),this._notifyItemChanged(t))}}_notifyItemChanged(t){this.navItemChange$.next(this._getItemById(t))}_getItemById(t){return this.items&&this.items.find(e=>e.id===t)||null}}ea.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ea,deps:[{token:"role",attribute:!0},{token:Ki},{token:y.ChangeDetectorRef},{token:x.DOCUMENT}],target:y["ɵɵFactoryTarget"].Directive}),ea.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ea,isStandalone:!0,selector:"[ngbNav]",inputs:{activeId:"activeId",animation:"animation",destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard"},outputs:{activeIdChange:"activeIdChange",shown:"shown",hidden:"hidden",navChange:"navChange"},host:{listeners:{"keydown.arrowLeft":"onKeyDown($event)","keydown.arrowRight":"onKeyDown($event)","keydown.arrowDown":"onKeyDown($event)","keydown.arrowUp":"onKeyDown($event)","keydown.Home":"onKeyDown($event)","keydown.End":"onKeyDown($event)"},properties:{"class.nav":"true","class.flex-column":"orientation === 'vertical'","attr.aria-orientation":"orientation === 'vertical' && roles === 'tablist' ? 'vertical' : undefined","attr.role":"role ? role : roles ? 'tablist' : undefined"}},queries:[{propertyName:"items",predicate:ta},{propertyName:"links",predicate:y.forwardRef(function(){return na}),descendants:!0}],exportAs:["ngbNav"],usesOnChanges:!0,ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ea,decorators:[{type:y.Directive,args:[{selector:"[ngbNav]",exportAs:"ngbNav",standalone:!0,host:{"[class.nav]":"true","[class.flex-column]":"orientation === 'vertical'","[attr.aria-orientation]":"orientation === 'vertical' && roles === 'tablist' ? 'vertical' : undefined","[attr.role]":"role ? role : roles ? 'tablist' : undefined","(keydown.arrowLeft)":"onKeyDown($event)","(keydown.arrowRight)":"onKeyDown($event)","(keydown.arrowDown)":"onKeyDown($event)","(keydown.arrowUp)":"onKeyDown($event)","(keydown.Home)":"onKeyDown($event)","(keydown.End)":"onKeyDown($event)"}}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Attribute,args:["role"]}]},{type:Ki},{type:y.ChangeDetectorRef},{type:void 0,decorators:[{type:y.Inject,args:[x.DOCUMENT]}]}]},propDecorators:{activeId:[{type:y.Input}],activeIdChange:[{type:y.Output}],animation:[{type:y.Input}],destroyOnHide:[{type:y.Input}],orientation:[{type:y.Input}],roles:[{type:y.Input}],keyboard:[{type:y.Input}],shown:[{type:y.Output}],hidden:[{type:y.Output}],items:[{type:y.ContentChildren,args:[ta]}],links:[{type:y.ContentChildren,args:[(0,y.forwardRef)(()=>na),{descendants:!0}]}],navChange:[{type:y.Output}]}});class na{constructor(t,e,n,i){this.role=t,this.navItem=e,this.nav=n,this.elRef=i}hasNavItemClass(){return this.navItem.elementRef.nativeElement.nodeType===Node.COMMENT_NODE}}na.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:na,deps:[{token:"role",attribute:!0},{token:ta},{token:ea},{token:y.ElementRef}],target:y["ɵɵFactoryTarget"].Directive}),na.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:na,isStandalone:!0,selector:"[ngbNavLink]",host:{properties:{id:"navItem.domId","class.nav-link":"true","class.nav-item":"hasNavItemClass()","attr.role":"role ? role : nav.roles ? 'tab' : undefined","class.active":"navItem.active","class.disabled":"navItem.disabled","attr.tabindex":"navItem.disabled ? -1 : undefined","attr.aria-controls":"navItem.isPanelInDom() ? navItem.panelDomId : null","attr.aria-selected":"navItem.active","attr.aria-disabled":"navItem.disabled"}},ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:na,decorators:[{type:y.Directive,args:[{selector:"[ngbNavLink]",standalone:!0,host:{"[id]":"navItem.domId","[class.nav-link]":"true","[class.nav-item]":"hasNavItemClass()","[attr.role]":"role ? role : nav.roles ? 'tab' : undefined","[class.active]":"navItem.active","[class.disabled]":"navItem.disabled","[attr.tabindex]":"navItem.disabled ? -1 : undefined","[attr.aria-controls]":"navItem.isPanelInDom() ? navItem.panelDomId : null","[attr.aria-selected]":"navItem.active","[attr.aria-disabled]":"navItem.disabled"}}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Attribute,args:["role"]}]},{type:ta},{type:ea},{type:y.ElementRef}]}});class ia{constructor(t,e){this.navItem=t,this.nav=e}}ia.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ia,deps:[{token:ta},{token:ea}],target:y["ɵɵFactoryTarget"].Directive}),ia.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ia,isStandalone:!0,selector:"button[ngbNavLink]",host:{attributes:{type:"button"},listeners:{click:"nav.click(navItem)"},properties:{disabled:"navItem.disabled"}},hostDirectives:[{directive:na}],ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ia,decorators:[{type:y.Directive,args:[{selector:"button[ngbNavLink]",standalone:!0,hostDirectives:[na],host:{type:"button","[disabled]":"navItem.disabled","(click)":"nav.click(navItem)"}}]}],ctorParameters:function(){return[{type:ta},{type:ea}]}});class aa{constructor(t,e){this.navItem=t,this.nav=e}}aa.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:aa,deps:[{token:ta},{token:ea}],target:y["ɵɵFactoryTarget"].Directive}),aa.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:aa,isStandalone:!0,selector:"a[ngbNavLink]",host:{attributes:{href:""},listeners:{click:"nav.click(navItem); $event.preventDefault()"}},hostDirectives:[{directive:na}],ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:aa,decorators:[{type:y.Directive,args:[{selector:"a[ngbNavLink]",standalone:!0,hostDirectives:[na],host:{href:"","(click)":"nav.click(navItem); $event.preventDefault()"}}]}],ctorParameters:function(){return[{type:ta},{type:ea}]}});const sa=({classList:t})=>(t.remove("show"),()=>t.remove("active")),oa=(t,e)=>{e&&Ut(t),t.classList.add("show")};class ra{constructor(t){this.elRef=t}}ra.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ra,deps:[{token:y.ElementRef}],target:y["ɵɵFactoryTarget"].Directive}),ra.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ra,isStandalone:!0,selector:"[ngbNavPane]",inputs:{item:"item",nav:"nav",role:"role"},host:{properties:{id:"item.panelDomId","class.fade":"nav.animation","attr.role":'role ? role : nav.roles ? "tabpanel" : undefined',"attr.aria-labelledby":"item.domId"},classAttribute:"tab-pane"},ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ra,decorators:[{type:y.Directive,args:[{selector:"[ngbNavPane]",standalone:!0,host:{"[id]":"item.panelDomId",class:"tab-pane","[class.fade]":"nav.animation","[attr.role]":'role ? role : nav.roles ? "tabpanel" : undefined',"[attr.aria-labelledby]":"item.domId"}}]}],ctorParameters:function(){return[{type:y.ElementRef}]},propDecorators:{item:[{type:y.Input}],nav:[{type:y.Input}],role:[{type:y.Input}]}});class la{constructor(t,e){this._cd=t,this._ngZone=e,this._activePane=null}isPanelTransitioning(t){var e;return(null===(e=this._activePane)||void 0===e?void 0:e.item)===t}ngAfterViewInit(){var t;this._updateActivePane(),this.nav.navItemChange$.pipe((0,I.takeUntil)(this.nav.destroy$),(0,I.startWith)((null===(t=this._activePane)||void 0===t?void 0:t.item)||null),(0,I.distinctUntilChanged)(),(0,I.skip)(1)).subscribe(t=>{const e={animation:this.nav.animation,runningTransition:"stop"};this._cd.detectChanges(),this._activePane?Jt(this._ngZone,this._activePane.elRef.nativeElement,sa,e).subscribe(()=>{var n;const i=null===(n=this._activePane)||void 0===n?void 0:n.item;this._activePane=this._getPaneForItem(t),this._cd.markForCheck(),this._activePane&&(this._activePane.elRef.nativeElement.classList.add("active"),Jt(this._ngZone,this._activePane.elRef.nativeElement,oa,e).subscribe(()=>{t&&(t.shown.emit(),this.nav.shown.emit(t.id))})),i&&(i.hidden.emit(),this.nav.hidden.emit(i.id))}):this._updateActivePane()})}_updateActivePane(){var t,e;this._activePane=this._getActivePane(),null===(t=this._activePane)||void 0===t||t.elRef.nativeElement.classList.add("show"),null===(e=this._activePane)||void 0===e||e.elRef.nativeElement.classList.add("active")}_getPaneForItem(t){return this._panes&&this._panes.find(e=>e.item===t)||null}_getActivePane(){return this._panes&&this._panes.find(t=>t.item.active)||null}}la.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:la,deps:[{token:y.ChangeDetectorRef},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Component}),la.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:la,isStandalone:!0,selector:"[ngbNavOutlet]",inputs:{paneRole:"paneRole",nav:["ngbNavOutlet","nav"]},host:{properties:{"class.tab-content":"true"}},viewQueries:[{propertyName:"_panes",predicate:ra,descendants:!0}],ngImport:w,template:'\n\t\t<ng-template ngFor let-item [ngForOf]="nav.items">\n\t\t\t<div\n\t\t\t\tngbNavPane\n\t\t\t\t*ngIf="item.isPanelInDom() || isPanelTransitioning(item)"\n\t\t\t\t[item]="item"\n\t\t\t\t[nav]="nav"\n\t\t\t\t[role]="paneRole"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="item.contentTpl?.templateRef || null"\n\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: item.active || isPanelTransitioning(item) }"\n\t\t\t\t></ng-template>\n\t\t\t</div>\n\t\t</ng-template>\n\t',isInline:!0,dependencies:[{kind:"directive",type:ra,selector:"[ngbNavPane]",inputs:["item","nav","role"]},{kind:"directive",type:x.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:x.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:x.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:la,decorators:[{type:y.Component,args:[{selector:"[ngbNavOutlet]",standalone:!0,imports:[ra,x.NgFor,x.NgIf,x.NgTemplateOutlet],host:{"[class.tab-content]":"true"},encapsulation:y.ViewEncapsulation.None,changeDetection:y.ChangeDetectionStrategy.OnPush,template:'\n\t\t<ng-template ngFor let-item [ngForOf]="nav.items">\n\t\t\t<div\n\t\t\t\tngbNavPane\n\t\t\t\t*ngIf="item.isPanelInDom() || isPanelTransitioning(item)"\n\t\t\t\t[item]="item"\n\t\t\t\t[nav]="nav"\n\t\t\t\t[role]="paneRole"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="item.contentTpl?.templateRef || null"\n\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: item.active || isPanelTransitioning(item) }"\n\t\t\t\t></ng-template>\n\t\t\t</div>\n\t\t</ng-template>\n\t'}]}],ctorParameters:function(){return[{type:y.ChangeDetectorRef},{type:y.NgZone}]},propDecorators:{_panes:[{type:y.ViewChildren,args:[ra]}],paneRole:[{type:y.Input}],nav:[{type:y.Input,args:["ngbNavOutlet"]}]}});const ca=[Qi,ea,ta,Xi,aa,ia,na,la,ra];class da{}da.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:da,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),da.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:da,imports:[Qi,ea,ta,Xi,aa,ia,na,la,ra],exports:[Qi,ea,ta,Xi,aa,ia,na,la,ra]}),da.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:da,imports:[la]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:da,decorators:[{type:y.NgModule,args:[{imports:ca,exports:ca}]}]});class pa{constructor(){this.disabled=!1,this.boundaryLinks=!1,this.directionLinks=!0,this.ellipses=!0,this.maxSize=0,this.pageSize=10,this.rotate=!1}}pa.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:pa,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),pa.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:pa,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:pa,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});class ua{constructor(t){this.templateRef=t}}ua.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ua,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),ua.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ua,isStandalone:!0,selector:"ng-template[ngbPaginationEllipsis]",ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ua,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPaginationEllipsis]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class ma{constructor(t){this.templateRef=t}}ma.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ma,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),ma.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ma,isStandalone:!0,selector:"ng-template[ngbPaginationFirst]",ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ma,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPaginationFirst]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class ha{constructor(t){this.templateRef=t}}ha.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ha,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),ha.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ha,isStandalone:!0,selector:"ng-template[ngbPaginationLast]",ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ha,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPaginationLast]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class ga{constructor(t){this.templateRef=t}}ga.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ga,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),ga.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ga,isStandalone:!0,selector:"ng-template[ngbPaginationNext]",ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ga,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPaginationNext]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class fa{constructor(t){this.templateRef=t}}fa.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:fa,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),fa.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:fa,isStandalone:!0,selector:"ng-template[ngbPaginationNumber]",ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:fa,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPaginationNumber]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class ba{constructor(t){this.templateRef=t}}ba.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ba,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),ba.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ba,isStandalone:!0,selector:"ng-template[ngbPaginationPrevious]",ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ba,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPaginationPrevious]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class va{constructor(t){this.templateRef=t}}va.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:va,deps:[{token:y.TemplateRef}],target:y["ɵɵFactoryTarget"].Directive}),va.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:va,isStandalone:!0,selector:"ng-template[ngbPaginationPages]",ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:va,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPaginationPages]",standalone:!0}]}],ctorParameters:function(){return[{type:y.TemplateRef}]}});class ya{constructor(t){this.pageCount=0,this.pages=[],this.page=1,this.pageChange=new y.EventEmitter(!0),this.disabled=t.disabled,this.boundaryLinks=t.boundaryLinks,this.directionLinks=t.directionLinks,this.ellipses=t.ellipses,this.maxSize=t.maxSize,this.pageSize=t.pageSize,this.rotate=t.rotate,this.size=t.size}hasPrevious(){return this.page>1}hasNext(){return this.page<this.pageCount}nextDisabled(){return!this.hasNext()||this.disabled}previousDisabled(){return!this.hasPrevious()||this.disabled}selectPage(t){this._updatePages(t)}ngOnChanges(t){this._updatePages(this.page)}isEllipsis(t){return-1===t}_applyEllipses(t,e){this.ellipses&&(t>0&&(t>2?this.pages.unshift(-1):2===t&&this.pages.unshift(2),this.pages.unshift(1)),e<this.pageCount&&(e<this.pageCount-2?this.pages.push(-1):e===this.pageCount-2&&this.pages.push(this.pageCount-1),this.pages.push(this.pageCount)))}_applyRotation(){let t=0,e=this.pageCount,n=Math.floor(this.maxSize/2),i=this.maxSize%2==0?n-1:n;return this.page<=n?e=this.maxSize:this.pageCount-this.page<n?t=this.pageCount-this.maxSize:(t=this.page-n-1,e=this.page+i),[t,e]}_applyPagination(){let t=(Math.ceil(this.page/this.maxSize)-1)*this.maxSize;return[t,t+this.maxSize]}_setPageInRange(t){const e=this.page;this.page=Pt(t,this.pageCount,1),this.page!==e&&Ht(this.collectionSize)&&this.pageChange.emit(this.page)}_updatePages(t){this.pageCount=Math.ceil(this.collectionSize/this.pageSize),Ht(this.pageCount)||(this.pageCount=0),this.pages.length=0;for(let t=1;t<=this.pageCount;t++)this.pages.push(t);if(this._setPageInRange(t),this.maxSize>0&&this.pageCount>this.maxSize){let t=0,e=this.pageCount;this.rotate?[t,e]=this._applyRotation():[t,e]=this._applyPagination(),this.pages=this.pages.slice(t,e),this._applyEllipses(t,e)}}}ya.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ya,deps:[{token:pa}],target:y["ɵɵFactoryTarget"].Component}),ya.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ya,isStandalone:!0,selector:"ngb-pagination",inputs:{disabled:"disabled",boundaryLinks:"boundaryLinks",directionLinks:"directionLinks",ellipses:"ellipses",rotate:"rotate",collectionSize:"collectionSize",maxSize:"maxSize",page:"page",pageSize:"pageSize",size:"size"},outputs:{pageChange:"pageChange"},host:{attributes:{role:"navigation"}},queries:[{propertyName:"tplEllipsis",first:!0,predicate:ua,descendants:!0},{propertyName:"tplFirst",first:!0,predicate:ma,descendants:!0},{propertyName:"tplLast",first:!0,predicate:ha,descendants:!0},{propertyName:"tplNext",first:!0,predicate:ga,descendants:!0},{propertyName:"tplNumber",first:!0,predicate:fa,descendants:!0},{propertyName:"tplPrevious",first:!0,predicate:ba,descendants:!0},{propertyName:"tplPages",first:!0,predicate:va,descendants:!0}],usesOnChanges:!0,ngImport:w,template:'\n\t\t<ng-template #first><span aria-hidden="true" i18n="@@ngb.pagination.first">««</span></ng-template>\n\t\t<ng-template #previous><span aria-hidden="true" i18n="@@ngb.pagination.previous">«</span></ng-template>\n\t\t<ng-template #next><span aria-hidden="true" i18n="@@ngb.pagination.next">»</span></ng-template>\n\t\t<ng-template #last><span aria-hidden="true" i18n="@@ngb.pagination.last">»»</span></ng-template>\n\t\t<ng-template #ellipsis>...</ng-template>\n\t\t<ng-template #defaultNumber let-page let-currentPage="currentPage">{{ page }}</ng-template>\n\t\t<ng-template #defaultPages let-page let-pages="pages" let-disabled="disabled">\n\t\t\t<li\n\t\t\t\t*ngFor="let pageNumber of pages"\n\t\t\t\tclass="page-item"\n\t\t\t\t[class.active]="pageNumber === page"\n\t\t\t\t[class.disabled]="isEllipsis(pageNumber) || disabled"\n\t\t\t\t[attr.aria-current]="pageNumber === page ? \'page\' : null"\n\t\t\t>\n\t\t\t\t<a *ngIf="isEllipsis(pageNumber)" class="page-link" tabindex="-1" aria-disabled="true">\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplEllipsis?.templateRef || ellipsis"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: true, currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t\t<a\n\t\t\t\t\t*ngIf="!isEllipsis(pageNumber)"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(pageNumber); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="disabled ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="disabled ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplNumber?.templateRef || defaultNumber"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: disabled, $implicit: pageNumber, currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ng-template>\n\t\t<ul [class]="\'pagination\' + (size ? \' pagination-\' + size : \'\')">\n\t\t\t<li *ngIf="boundaryLinks" class="page-item" [class.disabled]="previousDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="First"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.first-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="previousDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="previousDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplFirst?.templateRef || first"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: previousDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\n\t\t\t<li *ngIf="directionLinks" class="page-item" [class.disabled]="previousDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Previous"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.previous-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(page - 1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="previousDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="previousDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplPrevious?.templateRef || previous"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: previousDisabled() }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="tplPages?.templateRef || defaultPages"\n\t\t\t\t[ngTemplateOutletContext]="{ $implicit: page, pages: pages, disabled: disabled }"\n\t\t\t>\n\t\t\t</ng-template>\n\t\t\t<li *ngIf="directionLinks" class="page-item" [class.disabled]="nextDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Next"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.next-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(page + 1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="nextDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="nextDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplNext?.templateRef || next"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: nextDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\n\t\t\t<li *ngIf="boundaryLinks" class="page-item" [class.disabled]="nextDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Last"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.last-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(pageCount); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="nextDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="nextDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplLast?.templateRef || last"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: nextDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ul>\n\t',isInline:!0,dependencies:[{kind:"directive",type:x.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:x.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:x.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],changeDetection:y.ChangeDetectionStrategy.OnPush}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ya,decorators:[{type:y.Component,args:[{selector:"ngb-pagination",standalone:!0,imports:[x.NgIf,x.NgFor,x.NgTemplateOutlet],changeDetection:y.ChangeDetectionStrategy.OnPush,host:{role:"navigation"},template:'\n\t\t<ng-template #first><span aria-hidden="true" i18n="@@ngb.pagination.first">««</span></ng-template>\n\t\t<ng-template #previous><span aria-hidden="true" i18n="@@ngb.pagination.previous">«</span></ng-template>\n\t\t<ng-template #next><span aria-hidden="true" i18n="@@ngb.pagination.next">»</span></ng-template>\n\t\t<ng-template #last><span aria-hidden="true" i18n="@@ngb.pagination.last">»»</span></ng-template>\n\t\t<ng-template #ellipsis>...</ng-template>\n\t\t<ng-template #defaultNumber let-page let-currentPage="currentPage">{{ page }}</ng-template>\n\t\t<ng-template #defaultPages let-page let-pages="pages" let-disabled="disabled">\n\t\t\t<li\n\t\t\t\t*ngFor="let pageNumber of pages"\n\t\t\t\tclass="page-item"\n\t\t\t\t[class.active]="pageNumber === page"\n\t\t\t\t[class.disabled]="isEllipsis(pageNumber) || disabled"\n\t\t\t\t[attr.aria-current]="pageNumber === page ? \'page\' : null"\n\t\t\t>\n\t\t\t\t<a *ngIf="isEllipsis(pageNumber)" class="page-link" tabindex="-1" aria-disabled="true">\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplEllipsis?.templateRef || ellipsis"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: true, currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t\t<a\n\t\t\t\t\t*ngIf="!isEllipsis(pageNumber)"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(pageNumber); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="disabled ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="disabled ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplNumber?.templateRef || defaultNumber"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: disabled, $implicit: pageNumber, currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ng-template>\n\t\t<ul [class]="\'pagination\' + (size ? \' pagination-\' + size : \'\')">\n\t\t\t<li *ngIf="boundaryLinks" class="page-item" [class.disabled]="previousDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="First"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.first-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="previousDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="previousDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplFirst?.templateRef || first"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: previousDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\n\t\t\t<li *ngIf="directionLinks" class="page-item" [class.disabled]="previousDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Previous"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.previous-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(page - 1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="previousDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="previousDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplPrevious?.templateRef || previous"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: previousDisabled() }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="tplPages?.templateRef || defaultPages"\n\t\t\t\t[ngTemplateOutletContext]="{ $implicit: page, pages: pages, disabled: disabled }"\n\t\t\t>\n\t\t\t</ng-template>\n\t\t\t<li *ngIf="directionLinks" class="page-item" [class.disabled]="nextDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Next"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.next-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(page + 1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="nextDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="nextDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplNext?.templateRef || next"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: nextDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\n\t\t\t<li *ngIf="boundaryLinks" class="page-item" [class.disabled]="nextDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Last"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.last-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(pageCount); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="nextDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="nextDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplLast?.templateRef || last"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: nextDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ul>\n\t'}]}],ctorParameters:function(){return[{type:pa}]},propDecorators:{tplEllipsis:[{type:y.ContentChild,args:[ua,{static:!1}]}],tplFirst:[{type:y.ContentChild,args:[ma,{static:!1}]}],tplLast:[{type:y.ContentChild,args:[ha,{static:!1}]}],tplNext:[{type:y.ContentChild,args:[ga,{static:!1}]}],tplNumber:[{type:y.ContentChild,args:[fa,{static:!1}]}],tplPrevious:[{type:y.ContentChild,args:[ba,{static:!1}]}],tplPages:[{type:y.ContentChild,args:[va,{static:!1}]}],disabled:[{type:y.Input}],boundaryLinks:[{type:y.Input}],directionLinks:[{type:y.Input}],ellipses:[{type:y.Input}],rotate:[{type:y.Input}],collectionSize:[{type:y.Input}],maxSize:[{type:y.Input}],page:[{type:y.Input}],pageSize:[{type:y.Input}],pageChange:[{type:y.Output}],size:[{type:y.Input}]}});const wa=[ya,ua,ma,ha,ga,fa,ba,va];class xa{}xa.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:xa,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),xa.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:xa,imports:[ya,ua,ma,ha,ga,fa,ba,va],exports:[ya,ua,ma,ha,ga,fa,ba,va]}),xa.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:xa,imports:[ya]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:xa,decorators:[{type:y.NgModule,args:[{imports:wa,exports:wa}]}]});class ka{constructor(t,e){this.open=t,this.close=e,e||(this.close=t)}isManual(){return"manual"===this.open||"manual"===this.close}}const _a={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]},Ia=t=>t>0?(0,I.delay)(t):t=>t;function Da(t,e,n,i,a,s,o=0,r=0){const l=function(t,e=_a){const n=(t||"").trim();if(0===n.length)return[];const i=n.split(/\s+/).map(t=>t.split(":")).map(t=>{let n=e[t[0]]||t;return new ka(n[0],n[1])}),a=i.filter(t=>t.isManual());if(a.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(1===a.length&&i.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i}(n);if(1===l.length&&l[0].isManual())return()=>{};const c=function(t,e,n,i){return new _.Observable(a=>{const s=[],o=()=>a.next(!0),r=()=>a.next(!1),l=()=>a.next(!i());return n.forEach(n=>{n.open===n.close?s.push(t.listen(e,n.open,l)):s.push(t.listen(e,n.open,o),t.listen(e,n.close,r))}),()=>{s.forEach(t=>t())}})}(t,e,l,i).pipe(function(t,e,n){return i=>{let a=null;const s=i.pipe((0,I.map)(t=>({open:t})),(0,I.filter)(t=>{const e=n();return e===t.open||a&&a.open!==e?(a&&a.open!==t.open&&(a=null),!1):(a=t,!0)}),(0,I.share)()),o=s.pipe((0,I.filter)(t=>t.open),Ia(t)),r=s.pipe((0,I.filter)(t=>!t.open),Ia(e));return(0,_.merge)(o,r).pipe((0,I.filter)(t=>t===a&&(a=null,t.open!==n())),(0,I.map)(t=>t.open))}}(o,r,i)).subscribe(t=>t?a():s());return()=>c.unsubscribe()}class $a{constructor(t){this._ngbConfig=t,this.autoClose=!0,this.placement="auto",this.popperOptions=t=>t,this.triggers="click",this.disablePopover=!1,this.openDelay=0,this.closeDelay=0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}$a.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:$a,deps:[{token:Xt}],target:y["ɵɵFactoryTarget"].Injectable}),$a.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:$a,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:$a,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Xt}]}});let Ca=0;class Sa{isTitleTemplate(){return this.title instanceof y.TemplateRef}}Sa.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Sa,deps:[],target:y["ɵɵFactoryTarget"].Component}),Sa.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Sa,isStandalone:!0,selector:"ngb-popover-window",inputs:{animation:"animation",title:"title",id:"id",popoverClass:"popoverClass",context:"context"},host:{attributes:{role:"tooltip"},properties:{class:'"popover" + (popoverClass ? " " + popoverClass : "")',"class.fade":"animation",id:"id"},styleAttribute:"position: absolute;"},ngImport:w,template:' <div class="popover-arrow" data-popper-arrow></div>\n\t\t<h3 class="popover-header" *ngIf="title">\n\t\t\t<ng-template #simpleTitle>{{ title }}</ng-template>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="isTitleTemplate() ? $any(title) : simpleTitle"\n\t\t\t\t[ngTemplateOutletContext]="context"\n\t\t\t></ng-template>\n\t\t</h3>\n\t\t<div class="popover-body"><ng-content></ng-content></div>',isInline:!0,dependencies:[{kind:"directive",type:x.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:x.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Sa,decorators:[{type:y.Component,args:[{selector:"ngb-popover-window",standalone:!0,imports:[x.NgTemplateOutlet,x.NgIf],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,host:{"[class]":'"popover" + (popoverClass ? " " + popoverClass : "")',"[class.fade]":"animation",role:"tooltip","[id]":"id",style:"position: absolute;"},template:' <div class="popover-arrow" data-popper-arrow></div>\n\t\t<h3 class="popover-header" *ngIf="title">\n\t\t\t<ng-template #simpleTitle>{{ title }}</ng-template>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="isTitleTemplate() ? $any(title) : simpleTitle"\n\t\t\t\t[ngTemplateOutletContext]="context"\n\t\t\t></ng-template>\n\t\t</h3>\n\t\t<div class="popover-body"><ng-content></ng-content></div>'}]}],propDecorators:{animation:[{type:y.Input}],title:[{type:y.Input}],id:[{type:y.Input}],popoverClass:[{type:y.Input}],context:[{type:y.Input}]}});class Ma{constructor(t,e,n,i,a,s,o,r,l){this._elementRef=t,this._renderer=e,this._ngZone=s,this._document=o,this._changeDetector=r,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter,this._ngbPopoverWindowId="ngb-popover-"+Ca++,this._windowRef=null,this.animation=a.animation,this.autoClose=a.autoClose,this.placement=a.placement,this.popperOptions=a.popperOptions,this.triggers=a.triggers,this.container=a.container,this.disablePopover=a.disablePopover,this.popoverClass=a.popoverClass,this.openDelay=a.openDelay,this.closeDelay=a.closeDelay,this._positioning=Mn(),this._popupService=new Fi(Sa,n,i,e,this._ngZone,l)}_isDisabled(){return!!this.disablePopover||!this.ngbPopover&&!this.popoverTitle}open(t){if(!this._windowRef&&!this._isDisabled()){const{windowRef:e,transition$:n}=this._popupService.open(this.ngbPopover,t,this.animation);this._windowRef=e,this._windowRef.setInput("animation",this.animation),this._windowRef.setInput("title",this.popoverTitle),this._windowRef.setInput("context",t),this._windowRef.setInput("popoverClass",this.popoverClass),this._windowRef.setInput("id",this._ngbPopoverWindowId),this._renderer.setAttribute(this._getPositionTargetElement(),"aria-describedby",this._ngbPopoverWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,baseClass:"bs-popover",updatePopperOptions:t=>this.popperOptions(En([0,8])(t))}),Promise.resolve().then(()=>{this._positioning.update(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update())})}),gn(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),n.subscribe(()=>this.shown.emit())}}close(t=this.animation){this._windowRef&&(this._renderer.removeAttribute(this._getPositionTargetElement(),"aria-describedby"),this._popupService.close(t).subscribe(()=>{var t;this._windowRef=null,this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=Da(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({ngbPopover:t,popoverTitle:e,disablePopover:n,popoverClass:i}){i&&this.isOpen()&&(this._windowRef.instance.popoverClass=i.currentValue),(t||e||n)&&this._isDisabled()&&this.close()}ngOnDestroy(){var t;this.close(!1),null===(t=this._unregisterListenersFn)||void 0===t||t.call(this)}_getPositionTargetElement(){return(At(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._elementRef.nativeElement}}Ma.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ma,deps:[{token:y.ElementRef},{token:y.Renderer2},{token:y.Injector},{token:y.ViewContainerRef},{token:$a},{token:y.NgZone},{token:x.DOCUMENT},{token:y.ChangeDetectorRef},{token:y.ApplicationRef}],target:y["ɵɵFactoryTarget"].Directive}),Ma.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ma,isStandalone:!0,selector:"[ngbPopover]",inputs:{animation:"animation",autoClose:"autoClose",ngbPopover:"ngbPopover",popoverTitle:"popoverTitle",placement:"placement",popperOptions:"popperOptions",triggers:"triggers",positionTarget:"positionTarget",container:"container",disablePopover:"disablePopover",popoverClass:"popoverClass",openDelay:"openDelay",closeDelay:"closeDelay"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbPopover"],usesOnChanges:!0,ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ma,decorators:[{type:y.Directive,args:[{selector:"[ngbPopover]",exportAs:"ngbPopover",standalone:!0}]}],ctorParameters:function(){return[{type:y.ElementRef},{type:y.Renderer2},{type:y.Injector},{type:y.ViewContainerRef},{type:$a},{type:y.NgZone},{type:void 0,decorators:[{type:y.Inject,args:[x.DOCUMENT]}]},{type:y.ChangeDetectorRef},{type:y.ApplicationRef}]},propDecorators:{animation:[{type:y.Input}],autoClose:[{type:y.Input}],ngbPopover:[{type:y.Input}],popoverTitle:[{type:y.Input}],placement:[{type:y.Input}],popperOptions:[{type:y.Input}],triggers:[{type:y.Input}],positionTarget:[{type:y.Input}],container:[{type:y.Input}],disablePopover:[{type:y.Input}],popoverClass:[{type:y.Input}],openDelay:[{type:y.Input}],closeDelay:[{type:y.Input}],shown:[{type:y.Output}],hidden:[{type:y.Output}]}});class Ta{}Ta.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ta,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Ta.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:Ta,imports:[Ma],exports:[Ma]}),Ta.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ta}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ta,decorators:[{type:y.NgModule,args:[{imports:[Ma],exports:[Ma]}]}]});class Ea{constructor(){this.max=100,this.animated=!1,this.ariaLabel="progress bar",this.striped=!1,this.showValue=!1}}Ea.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ea,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),Ea.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ea,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ea,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});class Na{constructor(t){this.value=0,this.max=t.max,this.animated=t.animated,this.ariaLabel=t.ariaLabel,this.striped=t.striped,this.textType=t.textType,this.type=t.type,this.showValue=t.showValue,this.height=t.height}set max(t){this._max=!Ht(t)||t<=0?100:t}get max(){return this._max}getValue(){return Pt(this.value,this.max)}getPercentValue(){return 100*this.getValue()/this.max}}Na.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Na,deps:[{token:Ea}],target:y["ɵɵFactoryTarget"].Component}),Na.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Na,isStandalone:!0,selector:"ngb-progressbar",inputs:{max:"max",animated:"animated",ariaLabel:"ariaLabel",striped:"striped",showValue:"showValue",textType:"textType",type:"type",value:"value",height:"height"},host:{attributes:{role:"progressbar","aria-valuemin":"0"},properties:{"attr.aria-valuenow":"getValue()","attr.aria-valuemax":"max","attr.aria-label":"ariaLabel","style.height":"this.height"},classAttribute:"progress"},ngImport:w,template:'\n\t\t<div\n\t\t\tclass="progress-bar{{ type ? (textType ? \' bg-\' + type : \' text-bg-\' + type) : \'\' }}{{\n\t\t\t\ttextType ? \' text-\' + textType : \'\'\n\t\t\t}}"\n\t\t\t[class.progress-bar-animated]="animated"\n\t\t\t[class.progress-bar-striped]="striped"\n\t\t\t[style.width.%]="getPercentValue()"\n\t\t>\n\t\t\t<span *ngIf="showValue" i18n="@@ngb.progressbar.value">{{ getValue() / max | percent }}</span\n\t\t\t><ng-content></ng-content>\n\t\t</div>\n\t',isInline:!0,dependencies:[{kind:"directive",type:x.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"pipe",type:x.PercentPipe,name:"percent"}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Na,decorators:[{type:y.Component,args:[{selector:"ngb-progressbar",standalone:!0,imports:[x.NgIf,x.PercentPipe],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,host:{class:"progress",role:"progressbar","[attr.aria-valuenow]":"getValue()","aria-valuemin":"0","[attr.aria-valuemax]":"max","[attr.aria-label]":"ariaLabel"},template:'\n\t\t<div\n\t\t\tclass="progress-bar{{ type ? (textType ? \' bg-\' + type : \' text-bg-\' + type) : \'\' }}{{\n\t\t\t\ttextType ? \' text-\' + textType : \'\'\n\t\t\t}}"\n\t\t\t[class.progress-bar-animated]="animated"\n\t\t\t[class.progress-bar-striped]="striped"\n\t\t\t[style.width.%]="getPercentValue()"\n\t\t>\n\t\t\t<span *ngIf="showValue" i18n="@@ngb.progressbar.value">{{ getValue() / max | percent }}</span\n\t\t\t><ng-content></ng-content>\n\t\t</div>\n\t'}]}],ctorParameters:function(){return[{type:Ea}]},propDecorators:{max:[{type:y.Input}],animated:[{type:y.Input}],ariaLabel:[{type:y.Input}],striped:[{type:y.Input}],showValue:[{type:y.Input}],textType:[{type:y.Input}],type:[{type:y.Input}],value:[{type:y.Input}],height:[{type:y.Input},{type:y.HostBinding,args:["style.height"]}]}});class Oa{}Oa.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Oa,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Oa.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:Oa,imports:[Na],exports:[Na]}),Oa.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Oa,imports:[Na]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Oa,decorators:[{type:y.NgModule,args:[{imports:[Na],exports:[Na]}]}]});class Ra{constructor(){this.max=10,this.readonly=!1,this.resettable=!1,this.tabindex=0}}Ra.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ra,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),Ra.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ra,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ra,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});class Va{constructor(t,e){this._changeDetectorRef=e,this.contexts=[],this.disabled=!1,this.hover=new y.EventEmitter,this.leave=new y.EventEmitter,this.rateChange=new y.EventEmitter(!0),this.onChange=t=>{},this.onTouched=()=>{},this.max=t.max,this.readonly=t.readonly,this.tabindex=t.tabindex}ariaValueText(t,e){return`${t} out of ${e}`}isInteractive(){return!this.readonly&&!this.disabled}enter(t){this.isInteractive()&&this._updateState(t),this.hover.emit(t)}handleBlur(){this.onTouched()}handleClick(t){this.isInteractive()&&this.update(this.resettable&&this.rate===t?0:t)}handleKeyDown(t){switch(t.which){case Pe.ArrowDown:case Pe.ArrowLeft:this.update(this.rate-1);break;case Pe.ArrowUp:case Pe.ArrowRight:this.update(this.rate+1);break;case Pe.Home:this.update(0);break;case Pe.End:this.update(this.max);break;default:return}t.preventDefault()}ngOnChanges(t){t.rate&&this.update(this.rate),t.max&&this._updateMax()}ngOnInit(){this._setupContexts(),this._updateState(this.rate)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}reset(){this.leave.emit(this.nextRate),this._updateState(this.rate)}setDisabledState(t){this.disabled=t}update(t,e=!0){const n=Pt(t,this.max,0);this.isInteractive()&&this.rate!==n&&(this.rate=n,this.rateChange.emit(this.rate)),e&&(this.onChange(this.rate),this.onTouched()),this._updateState(this.rate)}writeValue(t){this.update(t,!1),this._changeDetectorRef.markForCheck()}_updateState(t){this.nextRate=t,this.contexts.forEach((e,n)=>e.fill=Math.round(100*Pt(t-n,1,0)))}_updateMax(){this.max>0&&(this._setupContexts(),this.update(this.rate))}_setupContexts(){this.contexts=Array.from({length:this.max},(t,e)=>({fill:0,index:e}))}}Va.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Va,deps:[{token:Ra},{token:y.ChangeDetectorRef}],target:y["ɵɵFactoryTarget"].Component}),Va.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Va,isStandalone:!0,selector:"ngb-rating",inputs:{max:"max",rate:"rate",readonly:"readonly",resettable:"resettable",starTemplate:"starTemplate",tabindex:"tabindex",ariaValueText:"ariaValueText"},outputs:{hover:"hover",leave:"leave",rateChange:"rateChange"},host:{attributes:{role:"slider","aria-valuemin":"0"},listeners:{blur:"handleBlur()",keydown:"handleKeyDown($event)",mouseleave:"reset()"},properties:{tabindex:"disabled ? -1 : tabindex","attr.aria-valuemax":"max","attr.aria-valuenow":"nextRate","attr.aria-valuetext":"ariaValueText(nextRate, max)","attr.aria-disabled":"readonly ? true : null"},classAttribute:"d-inline-flex"},providers:[{provide:k.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>Va),multi:!0}],queries:[{propertyName:"starTemplateFromContent",first:!0,predicate:y.TemplateRef,descendants:!0}],usesOnChanges:!0,ngImport:w,template:'\n\t\t<ng-template #t let-fill="fill">{{ fill === 100 ? \'★\' : \'☆\' }}</ng-template>\n\t\t<ng-template ngFor [ngForOf]="contexts" let-index="index">\n\t\t\t<span class="visually-hidden">({{ index < nextRate ? \'*\' : \' \' }})</span>\n\t\t\t<span\n\t\t\t\t(mouseenter)="enter(index + 1)"\n\t\t\t\t(click)="handleClick(index + 1)"\n\t\t\t\t[style.cursor]="isInteractive() ? \'pointer\' : \'default\'"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="starTemplate || starTemplateFromContent || t"\n\t\t\t\t\t[ngTemplateOutletContext]="contexts[index]"\n\t\t\t\t>\n\t\t\t\t</ng-template>\n\t\t\t</span>\n\t\t</ng-template>\n\t',isInline:!0,dependencies:[{kind:"directive",type:x.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:x.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Va,decorators:[{type:y.Component,args:[{selector:"ngb-rating",standalone:!0,imports:[x.NgFor,x.NgTemplateOutlet],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,host:{class:"d-inline-flex","[tabindex]":"disabled ? -1 : tabindex",role:"slider","aria-valuemin":"0","[attr.aria-valuemax]":"max","[attr.aria-valuenow]":"nextRate","[attr.aria-valuetext]":"ariaValueText(nextRate, max)","[attr.aria-disabled]":"readonly ? true : null","(blur)":"handleBlur()","(keydown)":"handleKeyDown($event)","(mouseleave)":"reset()"},template:'\n\t\t<ng-template #t let-fill="fill">{{ fill === 100 ? \'★\' : \'☆\' }}</ng-template>\n\t\t<ng-template ngFor [ngForOf]="contexts" let-index="index">\n\t\t\t<span class="visually-hidden">({{ index < nextRate ? \'*\' : \' \' }})</span>\n\t\t\t<span\n\t\t\t\t(mouseenter)="enter(index + 1)"\n\t\t\t\t(click)="handleClick(index + 1)"\n\t\t\t\t[style.cursor]="isInteractive() ? \'pointer\' : \'default\'"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="starTemplate || starTemplateFromContent || t"\n\t\t\t\t\t[ngTemplateOutletContext]="contexts[index]"\n\t\t\t\t>\n\t\t\t\t</ng-template>\n\t\t\t</span>\n\t\t</ng-template>\n\t',providers:[{provide:k.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>Va),multi:!0}]}]}],ctorParameters:function(){return[{type:Ra},{type:y.ChangeDetectorRef}]},propDecorators:{max:[{type:y.Input}],rate:[{type:y.Input}],readonly:[{type:y.Input}],resettable:[{type:y.Input}],starTemplate:[{type:y.Input}],starTemplateFromContent:[{type:y.ContentChild,args:[y.TemplateRef,{static:!1}]}],tabindex:[{type:y.Input}],ariaValueText:[{type:y.Input}],hover:[{type:y.Output}],leave:[{type:y.Output}],rateChange:[{type:y.Output}]}});class Fa{}Fa.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Fa,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Fa.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:Fa,imports:[Va],exports:[Va]}),Fa.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Fa,imports:[Va]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Fa,decorators:[{type:y.NgModule,args:[{imports:[Va],exports:[Va]}]}]});class Pa{constructor(t,e,n){this.hour=Vt(t),this.minute=Vt(e),this.second=Vt(n)}changeHour(t=1){this.updateHour((isNaN(this.hour)?0:this.hour)+t)}updateHour(t){Ht(t)?this.hour=(t<0?24+t:t)%24:this.hour=NaN}changeMinute(t=1){this.updateMinute((isNaN(this.minute)?0:this.minute)+t)}updateMinute(t){Ht(t)?(this.minute=t%60<0?60+t%60:t%60,this.changeHour(Math.floor(t/60))):this.minute=NaN}changeSecond(t=1){this.updateSecond((isNaN(this.second)?0:this.second)+t)}updateSecond(t){Ht(t)?(this.second=t<0?60+t%60:t%60,this.changeMinute(Math.floor(t/60))):this.second=NaN}isValid(t=!0){return Ht(this.hour)&&Ht(this.minute)&&(!t||Ht(this.second))}toString(){return`${this.hour||0}:${this.minute||0}:${this.second||0}`}}class Aa{constructor(){this.meridian=!1,this.spinners=!0,this.seconds=!1,this.hourStep=1,this.minuteStep=1,this.secondStep=1,this.disabled=!1,this.readonlyInputs=!1,this.size="medium"}}function Ha(){return new La}Aa.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Aa,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),Aa.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Aa,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Aa,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});class ja{}ja.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ja,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),ja.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ja,providedIn:"root",useFactory:Ha}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ja,decorators:[{type:y.Injectable,args:[{providedIn:"root",useFactory:Ha}]}]});class La extends ja{fromModel(t){return t&&jt(t.hour)&&jt(t.minute)?{hour:t.hour,minute:t.minute,second:jt(t.second)?t.second:null}:null}toModel(t){return t&&jt(t.hour)&&jt(t.minute)?{hour:t.hour,minute:t.minute,second:jt(t.second)?t.second:null}:null}}function Ga(t){return new za(t)}La.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:La,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),La.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:La}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:La,decorators:[{type:y.Injectable}]});class Ba{}Ba.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ba,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),Ba.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ba,providedIn:"root",useFactory:Ga,deps:[{token:y.LOCALE_ID}]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ba,decorators:[{type:y.Injectable,args:[{providedIn:"root",useFactory:Ga,deps:[y.LOCALE_ID]}]}]});class za extends Ba{constructor(t){super(),this._periods=(0,x.getLocaleDayPeriods)(t,x.FormStyle.Standalone,x.TranslationWidth.Narrow)}getMorningPeriod(){return this._periods[0]}getAfternoonPeriod(){return this._periods[1]}}za.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:za,deps:[{token:y.LOCALE_ID}],target:y["ɵɵFactoryTarget"].Injectable}),za.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:za}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:za,decorators:[{type:y.Injectable}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Inject,args:[y.LOCALE_ID]}]}]}});const Ua=/[^0-9]/g;class Wa{constructor(t,e,n,i){this._config=t,this._ngbTimeAdapter=e,this._cd=n,this.i18n=i,this.onChange=t=>{},this.onTouched=()=>{},this.meridian=t.meridian,this.spinners=t.spinners,this.seconds=t.seconds,this.hourStep=t.hourStep,this.minuteStep=t.minuteStep,this.secondStep=t.secondStep,this.disabled=t.disabled,this.readonlyInputs=t.readonlyInputs,this.size=t.size}set hourStep(t){this._hourStep=jt(t)?t:this._config.hourStep}get hourStep(){return this._hourStep}set minuteStep(t){this._minuteStep=jt(t)?t:this._config.minuteStep}get minuteStep(){return this._minuteStep}set secondStep(t){this._secondStep=jt(t)?t:this._config.secondStep}get secondStep(){return this._secondStep}writeValue(t){const e=this._ngbTimeAdapter.fromModel(t);this.model=e?new Pa(e.hour,e.minute,e.second):new Pa,this.seconds||e&&Ht(e.second)||(this.model.second=0),this._cd.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}changeHour(t){var e;null===(e=this.model)||void 0===e||e.changeHour(t),this.propagateModelChange()}changeMinute(t){var e;null===(e=this.model)||void 0===e||e.changeMinute(t),this.propagateModelChange()}changeSecond(t){var e;null===(e=this.model)||void 0===e||e.changeSecond(t),this.propagateModelChange()}updateHour(t){var e,n;const i=!!this.model&&this.model.hour>=12,a=Vt(t);this.meridian&&(i&&a<12||!i&&12===a)?null===(e=this.model)||void 0===e||e.updateHour(a+12):null===(n=this.model)||void 0===n||n.updateHour(a),this.propagateModelChange()}updateMinute(t){var e;null===(e=this.model)||void 0===e||e.updateMinute(Vt(t)),this.propagateModelChange()}updateSecond(t){var e;null===(e=this.model)||void 0===e||e.updateSecond(Vt(t)),this.propagateModelChange()}toggleMeridian(){this.meridian&&this.changeHour(12)}formatInput(t){t.value=t.value.replace(Ua,"")}formatHour(t){return Ht(t)?this.meridian?Bt(t%12==0?12:t%12):Bt(t%24):Bt(NaN)}formatMinSec(t){return Bt(Ht(t)?t:NaN)}handleBlur(){this.onTouched()}get isSmallSize(){return"small"===this.size}get isLargeSize(){return"large"===this.size}ngOnChanges(t){t.seconds&&!this.seconds&&this.model&&!Ht(this.model.second)&&(this.model.second=0,this.propagateModelChange(!1))}propagateModelChange(t=!0){var e;t&&this.onTouched(),(null===(e=this.model)||void 0===e?void 0:e.isValid(this.seconds))?this.onChange(this._ngbTimeAdapter.toModel({hour:this.model.hour,minute:this.model.minute,second:this.model.second})):this.onChange(this._ngbTimeAdapter.toModel(null))}}Wa.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Wa,deps:[{token:Aa},{token:ja},{token:y.ChangeDetectorRef},{token:Ba}],target:y["ɵɵFactoryTarget"].Component}),Wa.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Wa,isStandalone:!0,selector:"ngb-timepicker",inputs:{meridian:"meridian",spinners:"spinners",seconds:"seconds",hourStep:"hourStep",minuteStep:"minuteStep",secondStep:"secondStep",readonlyInputs:"readonlyInputs",size:"size"},providers:[{provide:k.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>Wa),multi:!0}],exportAs:["ngbTimepicker"],usesOnChanges:!0,ngImport:w,template:'\n\t\t<fieldset [disabled]="disabled" [class.disabled]="disabled">\n\t\t\t<div class="ngb-tp">\n\t\t\t\t<div class="ngb-tp-input-container ngb-tp-hour">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeHour(hourStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-hours">Increment hours</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="HH"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.HH"\n\t\t\t\t\t\t[value]="formatHour(model?.hour)"\n\t\t\t\t\t\t(change)="updateHour($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Hours"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.hours"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeHour(hourStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeHour(-hourStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeHour(-hourStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-hours">Decrement hours</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div class="ngb-tp-spacer">:</div>\n\t\t\t\t<div class="ngb-tp-input-container ngb-tp-minute">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeMinute(minuteStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-minutes">Increment minutes</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="MM"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.MM"\n\t\t\t\t\t\t[value]="formatMinSec(model?.minute)"\n\t\t\t\t\t\t(change)="updateMinute($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Minutes"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.minutes"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeMinute(minuteStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeMinute(-minuteStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeMinute(-minuteStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-minutes">Decrement minutes</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf="seconds" class="ngb-tp-spacer">:</div>\n\t\t\t\t<div *ngIf="seconds" class="ngb-tp-input-container ngb-tp-second">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeSecond(secondStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-seconds">Increment seconds</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="SS"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.SS"\n\t\t\t\t\t\t[value]="formatMinSec(model?.second)"\n\t\t\t\t\t\t(change)="updateSecond($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Seconds"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.seconds"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeSecond(secondStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeSecond(-secondStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeSecond(-secondStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-seconds">Decrement seconds</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf="meridian" class="ngb-tp-spacer"></div>\n\t\t\t\t<div *ngIf="meridian" class="ngb-tp-meridian">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\tclass="btn btn-outline-primary"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t(click)="toggleMeridian()"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ng-container *ngIf="model && model.hour >= 12; else am" i18n="@@ngb.timepicker.PM">{{\n\t\t\t\t\t\t\ti18n.getAfternoonPeriod()\n\t\t\t\t\t\t}}</ng-container>\n\t\t\t\t\t\t<ng-template #am i18n="@@ngb.timepicker.AM">{{ i18n.getMorningPeriod() }}</ng-template>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</fieldset>\n\t',isInline:!0,styles:['ngb-timepicker{font-size:1rem}.ngb-tp{display:flex;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron:before{border-style:solid;border-width:.29em .29em 0 0;content:"";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-minute,.ngb-tp-second,.ngb-tp-meridian{display:flex;flex-direction:column;align-items:center;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}\n'],dependencies:[{kind:"directive",type:x.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Wa,decorators:[{type:y.Component,args:[{exportAs:"ngbTimepicker",selector:"ngb-timepicker",standalone:!0,imports:[x.NgIf],encapsulation:y.ViewEncapsulation.None,template:'\n\t\t<fieldset [disabled]="disabled" [class.disabled]="disabled">\n\t\t\t<div class="ngb-tp">\n\t\t\t\t<div class="ngb-tp-input-container ngb-tp-hour">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeHour(hourStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-hours">Increment hours</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="HH"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.HH"\n\t\t\t\t\t\t[value]="formatHour(model?.hour)"\n\t\t\t\t\t\t(change)="updateHour($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Hours"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.hours"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeHour(hourStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeHour(-hourStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeHour(-hourStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-hours">Decrement hours</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div class="ngb-tp-spacer">:</div>\n\t\t\t\t<div class="ngb-tp-input-container ngb-tp-minute">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeMinute(minuteStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-minutes">Increment minutes</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="MM"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.MM"\n\t\t\t\t\t\t[value]="formatMinSec(model?.minute)"\n\t\t\t\t\t\t(change)="updateMinute($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Minutes"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.minutes"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeMinute(minuteStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeMinute(-minuteStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeMinute(-minuteStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-minutes">Decrement minutes</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf="seconds" class="ngb-tp-spacer">:</div>\n\t\t\t\t<div *ngIf="seconds" class="ngb-tp-input-container ngb-tp-second">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeSecond(secondStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-seconds">Increment seconds</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="SS"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.SS"\n\t\t\t\t\t\t[value]="formatMinSec(model?.second)"\n\t\t\t\t\t\t(change)="updateSecond($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Seconds"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.seconds"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeSecond(secondStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeSecond(-secondStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeSecond(-secondStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-seconds">Decrement seconds</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf="meridian" class="ngb-tp-spacer"></div>\n\t\t\t\t<div *ngIf="meridian" class="ngb-tp-meridian">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\tclass="btn btn-outline-primary"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t(click)="toggleMeridian()"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ng-container *ngIf="model && model.hour >= 12; else am" i18n="@@ngb.timepicker.PM">{{\n\t\t\t\t\t\t\ti18n.getAfternoonPeriod()\n\t\t\t\t\t\t}}</ng-container>\n\t\t\t\t\t\t<ng-template #am i18n="@@ngb.timepicker.AM">{{ i18n.getMorningPeriod() }}</ng-template>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</fieldset>\n\t',providers:[{provide:k.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>Wa),multi:!0}],styles:['ngb-timepicker{font-size:1rem}.ngb-tp{display:flex;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron:before{border-style:solid;border-width:.29em .29em 0 0;content:"";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-minute,.ngb-tp-second,.ngb-tp-meridian{display:flex;flex-direction:column;align-items:center;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}\n']}]}],ctorParameters:function(){return[{type:Aa},{type:ja},{type:y.ChangeDetectorRef},{type:Ba}]},propDecorators:{meridian:[{type:y.Input}],spinners:[{type:y.Input}],seconds:[{type:y.Input}],hourStep:[{type:y.Input}],minuteStep:[{type:y.Input}],secondStep:[{type:y.Input}],readonlyInputs:[{type:y.Input}],size:[{type:y.Input}]}});class qa{}qa.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:qa,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),qa.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:qa,imports:[Wa],exports:[Wa]}),qa.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:qa,imports:[Wa]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:qa,decorators:[{type:y.NgModule,args:[{imports:[Wa],exports:[Wa]}]}]});const Za=(t,e)=>{const{classList:n}=t;if(e)return n.add("fade"),Ut(t),n.add("show","showing"),()=>{n.remove("showing")};n.add("show")},Ka=({classList:t})=>(t.add("showing"),()=>{t.remove("show","showing")});class Ya{constructor(t){this._ngbConfig=t,this.autohide=!0,this.delay=5e3,this.ariaLive="polite"}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}Ya.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ya,deps:[{token:Xt}],target:y["ɵɵFactoryTarget"].Injectable}),Ya.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ya,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ya,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Xt}]}});class Ja{}Ja.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ja,deps:[],target:y["ɵɵFactoryTarget"].Directive}),Ja.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ja,isStandalone:!0,selector:"[ngbToastHeader]",ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ja,decorators:[{type:y.Directive,args:[{selector:"[ngbToastHeader]",standalone:!0}]}]});class Qa{constructor(t,e,n,i){this.ariaLive=t,this._zone=n,this._element=i,this.contentHeaderTpl=null,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter,null==this.ariaLive&&(this.ariaLive=e.ariaLive),this.delay=e.delay,this.autohide=e.autohide,this.animation=e.animation}ngAfterContentInit(){this._zone.onStable.asObservable().pipe((0,I.take)(1)).subscribe(()=>{this._init(),this.show()})}ngOnChanges(t){"autohide"in t&&(this._clearTimeout(),this._init())}hide(){this._clearTimeout();const t=Jt(this._zone,this._element.nativeElement,Ka,{animation:this.animation,runningTransition:"stop"});return t.subscribe(()=>{this.hidden.emit()}),t}show(){const t=Jt(this._zone,this._element.nativeElement,Za,{animation:this.animation,runningTransition:"continue"});return t.subscribe(()=>{this.shown.emit()}),t}_init(){this.autohide&&!this._timeoutID&&(this._timeoutID=setTimeout(()=>this.hide(),this.delay))}_clearTimeout(){this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=null)}}Qa.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Qa,deps:[{token:"aria-live",attribute:!0},{token:Ya},{token:y.NgZone},{token:y.ElementRef}],target:y["ɵɵFactoryTarget"].Component}),Qa.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Qa,isStandalone:!0,selector:"ngb-toast",inputs:{animation:"animation",delay:"delay",autohide:"autohide",header:"header"},outputs:{shown:"shown",hidden:"hidden"},host:{attributes:{role:"alert","aria-atomic":"true"},properties:{"attr.aria-live":"ariaLive","class.fade":"animation"},classAttribute:"toast"},queries:[{propertyName:"contentHeaderTpl",first:!0,predicate:Ja,descendants:!0,read:y.TemplateRef,static:!0}],exportAs:["ngbToast"],usesOnChanges:!0,ngImport:w,template:'\n\t\t<ng-template #headerTpl>\n\t\t\t<strong class="me-auto">{{ header }}</strong>\n\t\t</ng-template>\n\t\t<ng-template [ngIf]="contentHeaderTpl || header">\n\t\t\t<div class="toast-header">\n\t\t\t\t<ng-template [ngTemplateOutlet]="contentHeaderTpl || headerTpl"></ng-template>\n\t\t\t\t<button\n\t\t\t\t\ttype="button"\n\t\t\t\t\tclass="btn-close"\n\t\t\t\t\taria-label="Close"\n\t\t\t\t\ti18n-aria-label="@@ngb.toast.close-aria"\n\t\t\t\t\t(click)="hide()"\n\t\t\t\t>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</ng-template>\n\t\t<div class="toast-body">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t',isInline:!0,styles:["ngb-toast{display:block}ngb-toast .toast-header .close{margin-left:auto;margin-bottom:.25rem}\n"],dependencies:[{kind:"directive",type:x.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:x.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Qa,decorators:[{type:y.Component,args:[{selector:"ngb-toast",exportAs:"ngbToast",standalone:!0,imports:[x.NgIf,x.NgTemplateOutlet],encapsulation:y.ViewEncapsulation.None,host:{role:"alert","[attr.aria-live]":"ariaLive","aria-atomic":"true",class:"toast","[class.fade]":"animation"},template:'\n\t\t<ng-template #headerTpl>\n\t\t\t<strong class="me-auto">{{ header }}</strong>\n\t\t</ng-template>\n\t\t<ng-template [ngIf]="contentHeaderTpl || header">\n\t\t\t<div class="toast-header">\n\t\t\t\t<ng-template [ngTemplateOutlet]="contentHeaderTpl || headerTpl"></ng-template>\n\t\t\t\t<button\n\t\t\t\t\ttype="button"\n\t\t\t\t\tclass="btn-close"\n\t\t\t\t\taria-label="Close"\n\t\t\t\t\ti18n-aria-label="@@ngb.toast.close-aria"\n\t\t\t\t\t(click)="hide()"\n\t\t\t\t>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</ng-template>\n\t\t<div class="toast-body">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t',styles:["ngb-toast{display:block}ngb-toast .toast-header .close{margin-left:auto;margin-bottom:.25rem}\n"]}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Attribute,args:["aria-live"]}]},{type:Ya},{type:y.NgZone},{type:y.ElementRef}]},propDecorators:{animation:[{type:y.Input}],delay:[{type:y.Input}],autohide:[{type:y.Input}],header:[{type:y.Input}],contentHeaderTpl:[{type:y.ContentChild,args:[Ja,{read:y.TemplateRef,static:!0}]}],shown:[{type:y.Output}],hidden:[{type:y.Output}]}});class Xa{}Xa.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Xa,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Xa.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:Xa,imports:[Qa,Ja],exports:[Qa,Ja]}),Xa.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Xa,imports:[Qa]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Xa,decorators:[{type:y.NgModule,args:[{imports:[Qa,Ja],exports:[Qa,Ja]}]}]});class ts{constructor(t){this._ngbConfig=t,this.autoClose=!0,this.placement="auto",this.popperOptions=t=>t,this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}ts.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ts,deps:[{token:Xt}],target:y["ɵɵFactoryTarget"].Injectable}),ts.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ts,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ts,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Xt}]}});let es=0;class ns{}ns.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ns,deps:[],target:y["ɵɵFactoryTarget"].Component}),ns.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ns,isStandalone:!0,selector:"ngb-tooltip-window",inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass"},host:{attributes:{role:"tooltip"},properties:{class:'"tooltip" + (tooltipClass ? " " + tooltipClass : "")',"class.fade":"animation",id:"id"},styleAttribute:"position: absolute;"},ngImport:w,template:'<div class="tooltip-arrow" data-popper-arrow></div\n\t\t><div class="tooltip-inner"><ng-content></ng-content></div>',isInline:!0,changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ns,decorators:[{type:y.Component,args:[{selector:"ngb-tooltip-window",standalone:!0,changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,host:{"[class]":'"tooltip" + (tooltipClass ? " " + tooltipClass : "")',"[class.fade]":"animation",role:"tooltip","[id]":"id",style:"position: absolute;"},template:'<div class="tooltip-arrow" data-popper-arrow></div\n\t\t><div class="tooltip-inner"><ng-content></ng-content></div>'}]}],propDecorators:{animation:[{type:y.Input}],id:[{type:y.Input}],tooltipClass:[{type:y.Input}]}});class is{constructor(t,e,n,i,a,s,o,r,l){this._elementRef=t,this._renderer=e,this._ngZone=s,this._document=o,this._changeDetector=r,this.shown=new y.EventEmitter,this.hidden=new y.EventEmitter,this._ngbTooltipWindowId="ngb-tooltip-"+es++,this._windowRef=null,this.animation=a.animation,this.autoClose=a.autoClose,this.placement=a.placement,this.popperOptions=a.popperOptions,this.triggers=a.triggers,this.container=a.container,this.disableTooltip=a.disableTooltip,this.tooltipClass=a.tooltipClass,this.openDelay=a.openDelay,this.closeDelay=a.closeDelay,this._popupService=new Fi(ns,n,i,e,this._ngZone,l),this._positioning=Mn()}set ngbTooltip(t){this._ngbTooltip=t,!t&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(t){if(!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){const{windowRef:e,transition$:n}=this._popupService.open(this._ngbTooltip,t,this.animation);this._windowRef=e,this._windowRef.setInput("animation",this.animation),this._windowRef.setInput("tooltipClass",this.tooltipClass),this._windowRef.setInput("id",this._ngbTooltipWindowId),this._renderer.setAttribute(this._getPositionTargetElement(),"aria-describedby",this._ngbTooltipWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,baseClass:"bs-tooltip",updatePopperOptions:t=>this.popperOptions(t)}),Promise.resolve().then(()=>{this._positioning.update(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update())})}),gn(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),n.subscribe(()=>this.shown.emit())}}close(t=this.animation){null!=this._windowRef&&(this._renderer.removeAttribute(this._getPositionTargetElement(),"aria-describedby"),this._popupService.close(t).subscribe(()=>{var t;this._windowRef=null,this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=Da(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({tooltipClass:t}){t&&this.isOpen()&&(this._windowRef.instance.tooltipClass=t.currentValue)}ngOnDestroy(){var t;this.close(!1),null===(t=this._unregisterListenersFn)||void 0===t||t.call(this)}_getPositionTargetElement(){return(At(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._elementRef.nativeElement}}is.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:is,deps:[{token:y.ElementRef},{token:y.Renderer2},{token:y.Injector},{token:y.ViewContainerRef},{token:ts},{token:y.NgZone},{token:x.DOCUMENT},{token:y.ChangeDetectorRef},{token:y.ApplicationRef}],target:y["ɵɵFactoryTarget"].Directive}),is.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:is,isStandalone:!0,selector:"[ngbTooltip]",inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",popperOptions:"popperOptions",triggers:"triggers",positionTarget:"positionTarget",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],usesOnChanges:!0,ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:is,decorators:[{type:y.Directive,args:[{selector:"[ngbTooltip]",standalone:!0,exportAs:"ngbTooltip"}]}],ctorParameters:function(){return[{type:y.ElementRef},{type:y.Renderer2},{type:y.Injector},{type:y.ViewContainerRef},{type:ts},{type:y.NgZone},{type:void 0,decorators:[{type:y.Inject,args:[x.DOCUMENT]}]},{type:y.ChangeDetectorRef},{type:y.ApplicationRef}]},propDecorators:{animation:[{type:y.Input}],autoClose:[{type:y.Input}],placement:[{type:y.Input}],popperOptions:[{type:y.Input}],triggers:[{type:y.Input}],positionTarget:[{type:y.Input}],container:[{type:y.Input}],disableTooltip:[{type:y.Input}],tooltipClass:[{type:y.Input}],openDelay:[{type:y.Input}],closeDelay:[{type:y.Input}],shown:[{type:y.Output}],hidden:[{type:y.Output}],ngbTooltip:[{type:y.Input}]}});class as{}as.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:as,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),as.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:as,imports:[is],exports:[is]}),as.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:as}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:as,decorators:[{type:y.NgModule,args:[{imports:[is],exports:[is]}]}]});class ss{constructor(){this.highlightClass="ngb-highlight",this.accentSensitive=!0}ngOnChanges(t){this.accentSensitive||String.prototype.normalize||(console.warn("The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser that does not implement the `String.normalize` function. You will have to include a polyfill in your application to use this feature in the current browser."),this.accentSensitive=!0);const e=Ft(this.result),n=Array.isArray(this.term)?this.term:[this.term],i=t=>this.accentSensitive?t:Wt(t),a=n.map(t=>i(Ft(t)).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")).filter(t=>t),s=this.accentSensitive?e:Wt(e),o=a.length?s.split(new RegExp(`(${a.join("|")})`,"gmi")):[e];if(this.accentSensitive)this.parts=o;else{let t=0;this.parts=o.map(n=>e.substring(t,t+=n.length))}}}ss.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ss,deps:[],target:y["ɵɵFactoryTarget"].Component}),ss.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ss,isStandalone:!0,selector:"ngb-highlight",inputs:{highlightClass:"highlightClass",result:"result",term:"term",accentSensitive:"accentSensitive"},usesOnChanges:!0,ngImport:w,template:'<ng-template ngFor [ngForOf]="parts" let-part let-isOdd="odd"><span *ngIf="isOdd; else even" [class]="highlightClass">{{part}}</span><ng-template #even>{{part}}</ng-template></ng-template>',isInline:!0,styles:[".ngb-highlight{font-weight:700}\n"],dependencies:[{kind:"directive",type:x.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:x.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]}],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ss,decorators:[{type:y.Component,args:[{selector:"ngb-highlight",standalone:!0,imports:[x.NgIf,x.NgFor],changeDetection:y.ChangeDetectionStrategy.OnPush,encapsulation:y.ViewEncapsulation.None,template:'<ng-template ngFor [ngForOf]="parts" let-part let-isOdd="odd"><span *ngIf="isOdd; else even" [class]="highlightClass">{{part}}</span><ng-template #even>{{part}}</ng-template></ng-template>',styles:[".ngb-highlight{font-weight:700}\n"]}]}],propDecorators:{highlightClass:[{type:y.Input}],result:[{type:y.Input}],term:[{type:y.Input}],accentSensitive:[{type:y.Input}]}});class os{constructor(){this.activeIdx=0,this.focusFirst=!0,this.formatter=Ft,this.selectEvent=new y.EventEmitter,this.activeChangeEvent=new y.EventEmitter}hasActive(){return this.activeIdx>-1&&this.activeIdx<this.results.length}getActive(){return this.results[this.activeIdx]}markActive(t){this.activeIdx=t,this._activeChanged()}next(){this.activeIdx===this.results.length-1?this.activeIdx=this.focusFirst?(this.activeIdx+1)%this.results.length:-1:this.activeIdx++,this._activeChanged()}prev(){this.activeIdx<0?this.activeIdx=this.results.length-1:0===this.activeIdx?this.activeIdx=this.focusFirst?this.results.length-1:-1:this.activeIdx--,this._activeChanged()}resetActive(){this.activeIdx=this.focusFirst?0:-1,this._activeChanged()}select(t){this.selectEvent.emit(t)}ngOnInit(){this.resetActive()}_activeChanged(){this.activeChangeEvent.emit(this.activeIdx>=0?this.id+"-"+this.activeIdx:void 0)}}os.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:os,deps:[],target:y["ɵɵFactoryTarget"].Component}),os.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:os,isStandalone:!0,selector:"ngb-typeahead-window",inputs:{id:"id",focusFirst:"focusFirst",results:"results",term:"term",formatter:"formatter",resultTemplate:"resultTemplate",popupClass:"popupClass"},outputs:{selectEvent:"select",activeChangeEvent:"activeChange"},host:{attributes:{role:"listbox"},listeners:{mousedown:"$event.preventDefault()"},properties:{class:'"dropdown-menu show" + (popupClass ? " " + popupClass : "")',id:"id"}},exportAs:["ngbTypeaheadWindow"],ngImport:w,template:'\n\t\t<ng-template #rt let-result="result" let-term="term" let-formatter="formatter">\n\t\t\t<ngb-highlight [result]="formatter(result)" [term]="term"></ngb-highlight>\n\t\t</ng-template>\n\t\t<ng-template ngFor [ngForOf]="results" let-result let-idx="index">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="dropdown-item"\n\t\t\t\trole="option"\n\t\t\t\t[id]="id + \'-\' + idx"\n\t\t\t\t[class.active]="idx === activeIdx"\n\t\t\t\t(mouseenter)="markActive(idx)"\n\t\t\t\t(click)="select(result)"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="resultTemplate || rt"\n\t\t\t\t\t[ngTemplateOutletContext]="{ result: result, term: term, formatter: formatter }"\n\t\t\t\t></ng-template>\n\t\t\t</button>\n\t\t</ng-template>\n\t',isInline:!0,dependencies:[{kind:"component",type:ss,selector:"ngb-highlight",inputs:["highlightClass","result","term","accentSensitive"]},{kind:"directive",type:x.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:x.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:os,decorators:[{type:y.Component,args:[{selector:"ngb-typeahead-window",exportAs:"ngbTypeaheadWindow",standalone:!0,imports:[ss,x.NgFor,x.NgTemplateOutlet],encapsulation:y.ViewEncapsulation.None,host:{"(mousedown)":"$event.preventDefault()","[class]":'"dropdown-menu show" + (popupClass ? " " + popupClass : "")',role:"listbox","[id]":"id"},template:'\n\t\t<ng-template #rt let-result="result" let-term="term" let-formatter="formatter">\n\t\t\t<ngb-highlight [result]="formatter(result)" [term]="term"></ngb-highlight>\n\t\t</ng-template>\n\t\t<ng-template ngFor [ngForOf]="results" let-result let-idx="index">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="dropdown-item"\n\t\t\t\trole="option"\n\t\t\t\t[id]="id + \'-\' + idx"\n\t\t\t\t[class.active]="idx === activeIdx"\n\t\t\t\t(mouseenter)="markActive(idx)"\n\t\t\t\t(click)="select(result)"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="resultTemplate || rt"\n\t\t\t\t\t[ngTemplateOutletContext]="{ result: result, term: term, formatter: formatter }"\n\t\t\t\t></ng-template>\n\t\t\t</button>\n\t\t</ng-template>\n\t'}]}],propDecorators:{id:[{type:y.Input}],focusFirst:[{type:y.Input}],results:[{type:y.Input}],term:[{type:y.Input}],formatter:[{type:y.Input}],resultTemplate:[{type:y.Input}],popupClass:[{type:y.Input}],selectEvent:[{type:y.Output,args:["select"]}],activeChangeEvent:[{type:y.Output,args:["activeChange"]}]}});class rs{constructor(){this.editable=!0,this.focusFirst=!0,this.selectOnExact=!1,this.showHint=!1,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=t=>t}}rs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:rs,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),rs.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:rs,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:rs,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}]});const ls=new y.InjectionToken("live announcer delay",{providedIn:"root",factory:function(){return 100}});function cs(t,e=!1){let n=t.body.querySelector("#ngb-live");return null==n&&e&&(n=t.createElement("div"),n.setAttribute("id","ngb-live"),n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),n.classList.add("visually-hidden"),t.body.appendChild(n)),n}class ds{constructor(t,e){this._document=t,this._delay=e}ngOnDestroy(){const t=cs(this._document);t&&t.parentElement.removeChild(t)}say(t){const e=cs(this._document,!0),n=this._delay;if(null!=e){e.textContent="";const i=()=>e.textContent=t;null===n?i():setTimeout(i,n)}}}ds.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ds,deps:[{token:x.DOCUMENT},{token:ls}],target:y["ɵɵFactoryTarget"].Injectable}),ds.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ds,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ds,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Inject,args:[x.DOCUMENT]}]},{type:void 0,decorators:[{type:y.Inject,args:[ls]}]}]}});let ps=0;class us{constructor(t,e,n,i,a,s,o,r,l,c,d){this._elementRef=t,this._renderer=n,this._live=o,this._document=r,this._ngZone=l,this._changeDetector=c,this._subscription=null,this._closed$=new _.Subject,this._inputValueBackup=null,this._inputValueForSelectOnExact=null,this._windowRef=null,this.autocomplete="off",this.placement="bottom-start",this.selectItem=new y.EventEmitter,this.activeDescendant=null,this.popupId="ngb-typeahead-"+ps++,this._onTouched=()=>{},this._onChange=t=>{},this.container=a.container,this.editable=a.editable,this.focusFirst=a.focusFirst,this.selectOnExact=a.selectOnExact,this.showHint=a.showHint,this.placement=a.placement,this.popperOptions=a.popperOptions,this._valueChanges=(0,_.fromEvent)(t.nativeElement,"input").pipe((0,I.map)(t=>t.target.value)),this._resubscribeTypeahead=new _.BehaviorSubject(null),this._popupService=new Fi(os,i,e,n,this._ngZone,d),this._positioning=Mn()}ngOnInit(){this._subscribeToUserInput()}ngOnChanges({ngbTypeahead:t}){t&&!t.firstChange&&(this._unsubscribeFromUserInput(),this._subscribeToUserInput())}ngOnDestroy(){this._closePopup(),this._unsubscribeFromUserInput()}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}writeValue(t){this._writeInputValue(this._formatItemForInput(t)),this.showHint&&(this._inputValueBackup=t)}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}dismissPopup(){this.isPopupOpen()&&(this._resubscribeTypeahead.next(null),this._closePopup(),this.showHint&&null!==this._inputValueBackup&&this._writeInputValue(this._inputValueBackup),this._changeDetector.markForCheck())}isPopupOpen(){return null!=this._windowRef}handleBlur(){this._resubscribeTypeahead.next(null),this._onTouched()}handleKeyDown(t){if(this.isPopupOpen())switch(t.which){case Pe.ArrowDown:t.preventDefault(),this._windowRef.instance.next(),this._showHint();break;case Pe.ArrowUp:t.preventDefault(),this._windowRef.instance.prev(),this._showHint();break;case Pe.Enter:case Pe.Tab:{const e=this._windowRef.instance.getActive();Lt(e)&&(t.preventDefault(),t.stopPropagation(),this._selectResult(e)),this._closePopup();break}}}_openPopup(){if(!this.isPopupOpen()){this._inputValueBackup=this._elementRef.nativeElement.value;const{windowRef:t}=this._popupService.open();this._windowRef=t,this._windowRef.setInput("id",this.popupId),this._windowRef.setInput("popupClass",this.popupClass),this._windowRef.instance.selectEvent.subscribe(t=>this._selectResultClosePopup(t)),this._windowRef.instance.activeChangeEvent.subscribe(t=>this.activeDescendant=t),"body"===this.container&&(this._renderer.setStyle(this._windowRef.location.nativeElement,"z-index","1055"),this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement)),this._changeDetector.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._windowRef&&(this._positioning.createPopper({hostElement:this._elementRef.nativeElement,targetElement:this._windowRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,updatePopperOptions:t=>this.popperOptions(En([0,2])(t))}),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update()))}),gn(this._ngZone,this._document,"outside",()=>this.dismissPopup(),this._closed$,[this._elementRef.nativeElement,this._windowRef.location.nativeElement])}}_closePopup(){this._popupService.close().subscribe(()=>{var t;this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this._closed$.next(),this._windowRef=null,this.activeDescendant=null})}_selectResult(t){let e=!1;this.selectItem.emit({item:t,preventDefault:()=>{e=!0}}),this._resubscribeTypeahead.next(null),e||(this.writeValue(t),this._onChange(t))}_selectResultClosePopup(t){this._selectResult(t),this._closePopup()}_showHint(){var t;if(this.showHint&&(null===(t=this._windowRef)||void 0===t?void 0:t.instance.hasActive())&&null!=this._inputValueBackup){const t=this._inputValueBackup.toLowerCase(),e=this._formatItemForInput(this._windowRef.instance.getActive());t===e.substring(0,this._inputValueBackup.length).toLowerCase()?(this._writeInputValue(this._inputValueBackup+e.substring(this._inputValueBackup.length)),this._elementRef.nativeElement.setSelectionRange.apply(this._elementRef.nativeElement,[this._inputValueBackup.length,e.length])):this._writeInputValue(e)}}_formatItemForInput(t){return null!=t&&this.inputFormatter?this.inputFormatter(t):Ft(t)}_writeInputValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",Ft(t))}_subscribeToUserInput(){const t=this._valueChanges.pipe((0,I.tap)(t=>{this._inputValueBackup=this.showHint?t:null,this._inputValueForSelectOnExact=this.selectOnExact?t:null,this._onChange(this.editable?t:void 0)}),this.ngbTypeahead?this.ngbTypeahead:()=>(0,_.of)([]));this._subscription=this._resubscribeTypeahead.pipe((0,I.switchMap)(()=>t)).subscribe(t=>{t&&0!==t.length?this.selectOnExact&&1===t.length&&this._formatItemForInput(t[0])===this._inputValueForSelectOnExact?(this._selectResult(t[0]),this._closePopup()):(this._openPopup(),this._windowRef.instance.focusFirst=this.focusFirst,this._windowRef.instance.results=t,this._windowRef.instance.term=this._elementRef.nativeElement.value,this.resultFormatter&&(this._windowRef.instance.formatter=this.resultFormatter),this.resultTemplate&&(this._windowRef.instance.resultTemplate=this.resultTemplate),this._windowRef.instance.resetActive(),this._windowRef.changeDetectorRef.detectChanges(),this._showHint()):this._closePopup();const e=t?t.length:0;this._live.say(0===e?"No results available":`${e} result${1===e?"":"s"} available`)})}_unsubscribeFromUserInput(){this._subscription&&this._subscription.unsubscribe(),this._subscription=null}}us.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:us,deps:[{token:y.ElementRef},{token:y.ViewContainerRef},{token:y.Renderer2},{token:y.Injector},{token:rs},{token:y.NgZone},{token:ds},{token:x.DOCUMENT},{token:y.NgZone},{token:y.ChangeDetectorRef},{token:y.ApplicationRef}],target:y["ɵɵFactoryTarget"].Directive}),us.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:us,isStandalone:!0,selector:"input[ngbTypeahead]",inputs:{autocomplete:"autocomplete",container:"container",editable:"editable",focusFirst:"focusFirst",inputFormatter:"inputFormatter",ngbTypeahead:"ngbTypeahead",resultFormatter:"resultFormatter",resultTemplate:"resultTemplate",selectOnExact:"selectOnExact",showHint:"showHint",placement:"placement",popperOptions:"popperOptions",popupClass:"popupClass"},outputs:{selectItem:"selectItem"},host:{attributes:{autocapitalize:"off",autocorrect:"off",role:"combobox"},listeners:{blur:"handleBlur()",keydown:"handleKeyDown($event)"},properties:{"class.open":"isPopupOpen()",autocomplete:"autocomplete","attr.aria-autocomplete":'showHint ? "both" : "list"',"attr.aria-activedescendant":"activeDescendant","attr.aria-owns":"isPopupOpen() ? popupId : null","attr.aria-expanded":"isPopupOpen()"}},providers:[{provide:k.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>us),multi:!0}],exportAs:["ngbTypeahead"],usesOnChanges:!0,ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:us,decorators:[{type:y.Directive,args:[{selector:"input[ngbTypeahead]",exportAs:"ngbTypeahead",standalone:!0,host:{"(blur)":"handleBlur()","[class.open]":"isPopupOpen()","(keydown)":"handleKeyDown($event)","[autocomplete]":"autocomplete",autocapitalize:"off",autocorrect:"off",role:"combobox","[attr.aria-autocomplete]":'showHint ? "both" : "list"',"[attr.aria-activedescendant]":"activeDescendant","[attr.aria-owns]":"isPopupOpen() ? popupId : null","[attr.aria-expanded]":"isPopupOpen()"},providers:[{provide:k.NG_VALUE_ACCESSOR,useExisting:(0,y.forwardRef)(()=>us),multi:!0}]}]}],ctorParameters:function(){return[{type:y.ElementRef},{type:y.ViewContainerRef},{type:y.Renderer2},{type:y.Injector},{type:rs},{type:y.NgZone},{type:ds},{type:void 0,decorators:[{type:y.Inject,args:[x.DOCUMENT]}]},{type:y.NgZone},{type:y.ChangeDetectorRef},{type:y.ApplicationRef}]},propDecorators:{autocomplete:[{type:y.Input}],container:[{type:y.Input}],editable:[{type:y.Input}],focusFirst:[{type:y.Input}],inputFormatter:[{type:y.Input}],ngbTypeahead:[{type:y.Input}],resultFormatter:[{type:y.Input}],resultTemplate:[{type:y.Input}],selectOnExact:[{type:y.Input}],showHint:[{type:y.Input}],placement:[{type:y.Input}],popperOptions:[{type:y.Input}],popupClass:[{type:y.Input}],selectItem:[{type:y.Output}]}});class ms{}ms.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ms,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),ms.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:ms,imports:[ss,us],exports:[ss,us]}),ms.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ms,imports:[ss]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ms,decorators:[{type:y.NgModule,args:[{imports:[ss,us],exports:[ss,us]}]}]});class hs{close(t){}dismiss(t){}}class gs{constructor(t,e,n,i){this._panelCmptRef=t,this._contentRef=e,this._backdropCmptRef=n,this._beforeDismiss=i,this._closed=new _.Subject,this._dismissed=new _.Subject,this._hidden=new _.Subject,t.instance.dismissEvent.subscribe(t=>{this.dismiss(t)}),n&&n.instance.dismissEvent.subscribe(t=>{this.dismiss(t)}),this.result=new Promise((t,e)=>{this._resolve=t,this._reject=e}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe((0,I.takeUntil)(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe((0,I.takeUntil)(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._panelCmptRef.instance.shown.asObservable()}close(t){this._panelCmptRef&&(this._closed.next(t),this._resolve(t),this._removeOffcanvasElements())}_dismiss(t){this._dismissed.next(t),this._reject(t),this._removeOffcanvasElements()}dismiss(t){if(this._panelCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();Gt(e)?e.then(e=>{!1!==e&&this._dismiss(t)},()=>{}):!1!==e&&this._dismiss(t)}else this._dismiss(t)}_removeOffcanvasElements(){const t=this._panelCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():(0,_.of)(void 0);t.subscribe(()=>{const{nativeElement:t}=this._panelCmptRef.location;t.parentNode.removeChild(t),this._panelCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._panelCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:t}=this._backdropCmptRef.location;t.parentNode.removeChild(t),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),(0,_.zip)(t,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var fs;!function(t){t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC"}(fs||(fs={}));class bs{constructor(t,e){this._el=t,this._zone=e,this.dismissEvent=new y.EventEmitter}ngOnInit(){this._zone.onStable.asObservable().pipe((0,I.take)(1)).subscribe(()=>{Jt(this._zone,this._el.nativeElement,(t,e)=>{e&&Ut(t),t.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Jt(this._zone,this._el.nativeElement,({classList:t})=>t.remove("show"),{animation:this.animation,runningTransition:"stop"})}dismiss(){this.static||this.dismissEvent.emit(fs.BACKDROP_CLICK)}}bs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:bs,deps:[{token:y.ElementRef},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Component}),bs.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:bs,isStandalone:!0,selector:"ngb-offcanvas-backdrop",inputs:{animation:"animation",backdropClass:"backdropClass",static:"static"},outputs:{dismissEvent:"dismiss"},host:{listeners:{mousedown:"dismiss()"},properties:{class:'"offcanvas-backdrop" + (backdropClass ? " " + backdropClass : "")',"class.show":"!animation","class.fade":"animation"}},ngImport:w,template:"",isInline:!0,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:bs,decorators:[{type:y.Component,args:[{selector:"ngb-offcanvas-backdrop",standalone:!0,encapsulation:y.ViewEncapsulation.None,template:"",host:{"[class]":'"offcanvas-backdrop" + (backdropClass ? " " + backdropClass : "")',"[class.show]":"!animation","[class.fade]":"animation","(mousedown)":"dismiss()"}}]}],ctorParameters:function(){return[{type:y.ElementRef},{type:y.NgZone}]},propDecorators:{animation:[{type:y.Input}],backdropClass:[{type:y.Input}],static:[{type:y.Input}],dismissEvent:[{type:y.Output,args:["dismiss"]}]}});class vs{constructor(t,e,n){this._document=t,this._elRef=e,this._zone=n,this._closed$=new _.Subject,this._elWithFocus=null,this.keyboard=!0,this.position="start",this.dismissEvent=new y.EventEmitter,this.shown=new _.Subject,this.hidden=new _.Subject}dismiss(t){this.dismissEvent.emit(t)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe((0,I.take)(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:t}=this._elRef,e={animation:this.animation,runningTransition:"stop"},n=Jt(this._zone,this._elRef.nativeElement,e=>(t.classList.remove("showing"),t.classList.add("hiding"),()=>t.classList.remove("show","hiding")),e);return n.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),n}_show(){const t={animation:this.animation,runningTransition:"continue"};Jt(this._zone,this._elRef.nativeElement,(t,e)=>(e&&Ut(t),t.classList.add("show","showing"),()=>t.classList.remove("showing")),t).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:t}=this._elRef;this._zone.runOutsideAngular(()=>{(0,_.fromEvent)(t,"keydown").pipe((0,I.takeUntil)(this._closed$),(0,I.filter)(t=>t.which===Pe.Escape)).subscribe(t=>{this.keyboard&&requestAnimationFrame(()=>{t.defaultPrevented||this._zone.run(()=>this.dismiss(fs.ESC))})})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:t}=this._elRef;if(!t.contains(document.activeElement)){const e=t.querySelector("[ngbAutofocus]"),n=bn(t)[0];(e||n||t).focus()}}_restoreFocus(){const t=this._document.body,e=this._elWithFocus;let n;n=e&&e.focus&&t.contains(e)?e:t,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null})}}vs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:vs,deps:[{token:x.DOCUMENT},{token:y.ElementRef},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Component}),vs.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:vs,isStandalone:!0,selector:"ngb-offcanvas-panel",inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",keyboard:"keyboard",panelClass:"panelClass",position:"position"},outputs:{dismissEvent:"dismiss"},host:{attributes:{role:"dialog",tabindex:"-1"},properties:{class:'"offcanvas offcanvas-" + position + (panelClass ? " " + panelClass : "")',"attr.aria-modal":"true","attr.aria-labelledby":"ariaLabelledBy","attr.aria-describedby":"ariaDescribedBy"}},ngImport:w,template:"<ng-content></ng-content>",isInline:!0,encapsulation:y.ViewEncapsulation.None}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:vs,decorators:[{type:y.Component,args:[{selector:"ngb-offcanvas-panel",standalone:!0,template:"<ng-content></ng-content>",encapsulation:y.ViewEncapsulation.None,host:{"[class]":'"offcanvas offcanvas-" + position + (panelClass ? " " + panelClass : "")',role:"dialog",tabindex:"-1","[attr.aria-modal]":"true","[attr.aria-labelledby]":"ariaLabelledBy","[attr.aria-describedby]":"ariaDescribedBy"}}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:y.Inject,args:[x.DOCUMENT]}]},{type:y.ElementRef},{type:y.NgZone}]},propDecorators:{animation:[{type:y.Input}],ariaLabelledBy:[{type:y.Input}],ariaDescribedBy:[{type:y.Input}],keyboard:[{type:y.Input}],panelClass:[{type:y.Input}],position:[{type:y.Input}],dismissEvent:[{type:y.Output,args:["dismiss"]}]}});class ys{constructor(t,e,n,i,a){this._applicationRef=t,this._injector=e,this._document=n,this._scrollBar=i,this._ngZone=a,this._activePanelCmptHasChanged=new _.Subject,this._scrollBarRestoreFn=null,this._backdropAttributes=["animation","backdropClass"],this._panelAttributes=["animation","ariaDescribedBy","ariaLabelledBy","keyboard","panelClass","position"],this._activeInstance=new y.EventEmitter,this._activePanelCmptHasChanged.subscribe(()=>{this._panelCmpt&&vn(this._ngZone,this._panelCmpt.location.nativeElement,this._activePanelCmptHasChanged)})}_restoreScrollBar(){const t=this._scrollBarRestoreFn;t&&(this._scrollBarRestoreFn=null,t())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(t,e,n){const i=n.container instanceof HTMLElement?n.container:Lt(n.container)?this._document.querySelector(n.container):this._document.body;if(!i)throw new Error(`The specified offcanvas container "${n.container||"body"}" was not found in the DOM.`);n.scroll||this._hideScrollBar();const a=new hs,s=this._getContentRef(n.injector||t,e,a);let o=!1!==n.backdrop?this._attachBackdrop(i):void 0,r=this._attachWindowComponent(i,s.nodes),l=new gs(r,s,o,n.beforeDismiss);return this._registerOffcanvasRef(l),this._registerPanelCmpt(r),l.hidden.pipe((0,I.finalize)(()=>this._restoreScrollBar())).subscribe(),a.close=t=>{l.close(t)},a.dismiss=t=>{l.dismiss(t)},this._applyPanelOptions(r.instance,n),o&&o.instance&&(this._applyBackdropOptions(o.instance,n),o.changeDetectorRef.detectChanges()),r.changeDetectorRef.detectChanges(),l}get activeInstance(){return this._activeInstance}dismiss(t){var e;null===(e=this._offcanvasRef)||void 0===e||e.dismiss(t)}hasOpenOffcanvas(){return!!this._offcanvasRef}_attachBackdrop(t){let e=(0,y.createComponent)(bs,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(e.hostView),t.appendChild(e.location.nativeElement),e}_attachWindowComponent(t,e){let n=(0,y.createComponent)(vs,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:e});return this._applicationRef.attachView(n.hostView),t.appendChild(n.location.nativeElement),n}_applyPanelOptions(t,e){this._panelAttributes.forEach(n=>{Lt(e[n])&&(t[n]=e[n])})}_applyBackdropOptions(t,e){this._backdropAttributes.forEach(n=>{Lt(e[n])&&(t[n]=e[n])}),t.static="static"===e.backdrop}_getContentRef(t,e,n){return e?e instanceof y.TemplateRef?this._createFromTemplateRef(e,n):At(e)?this._createFromString(e):this._createFromComponent(t,e,n):new Vi([])}_createFromTemplateRef(t,e){const n={$implicit:e,close(t){e.close(t)},dismiss(t){e.dismiss(t)}},i=t.createEmbeddedView(n);return this._applicationRef.attachView(i),new Vi([i.rootNodes],i)}_createFromString(t){const e=this._document.createTextNode(`${t}`);return new Vi([[e]])}_createFromComponent(t,e,n){const i=y.Injector.create({providers:[{provide:hs,useValue:n}],parent:t}),a=(0,y.createComponent)(e,{environmentInjector:this._applicationRef.injector,elementInjector:i}),s=a.location.nativeElement;return this._applicationRef.attachView(a.hostView),new Vi([[s]],a.hostView,a)}_registerOffcanvasRef(t){const e=()=>{this._offcanvasRef=void 0,this._activeInstance.emit(this._offcanvasRef)};this._offcanvasRef=t,this._activeInstance.emit(this._offcanvasRef),t.result.then(e,e)}_registerPanelCmpt(t){this._panelCmpt=t,this._activePanelCmptHasChanged.next(),t.onDestroy(()=>{this._panelCmpt=void 0,this._activePanelCmptHasChanged.next()})}}ys.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ys,deps:[{token:y.ApplicationRef},{token:y.Injector},{token:x.DOCUMENT},{token:zi},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Injectable}),ys.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ys,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ys,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:y.ApplicationRef},{type:y.Injector},{type:void 0,decorators:[{type:y.Inject,args:[x.DOCUMENT]}]},{type:zi},{type:y.NgZone}]}});class ws{constructor(t){this._ngbConfig=t,this.backdrop=!0,this.keyboard=!0,this.position="start",this.scroll=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}ws.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ws,deps:[{token:Xt}],target:y["ɵɵFactoryTarget"].Injectable}),ws.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ws,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ws,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Xt}]}});class xs{constructor(t,e,n){this._injector=t,this._offcanvasStack=e,this._config=n}open(t,e={}){const n=Object.assign(Object.assign(Object.assign({},this._config),{animation:this._config.animation}),e);return this._offcanvasStack.open(this._injector,t,n)}get activeInstance(){return this._offcanvasStack.activeInstance}dismiss(t){this._offcanvasStack.dismiss(t)}hasOpenOffcanvas(){return this._offcanvasStack.hasOpenOffcanvas()}}xs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:xs,deps:[{token:y.Injector},{token:ys},{token:ws}],target:y["ɵɵFactoryTarget"].Injectable}),xs.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:xs,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:xs,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:y.Injector},{type:ys},{type:ws}]}});class ks{}ks.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ks,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),ks.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:ks}),ks.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ks}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ks,decorators:[{type:y.NgModule,args:[{}]}]});const _s=[we,Ie,Ae,He,Di,Ri,Zi,da,ks,xa,Ta,Oa,Fa,qa,Xa,as,ms];class Is{}Is.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Is,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Is.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:Is,imports:[we,Ie,Ae,He,Di,Ri,Zi,da,ks,xa,Ta,Oa,Fa,qa,Xa,as,ms],exports:[we,Ie,Ae,He,Di,Ri,Zi,da,ks,xa,Ta,Oa,Fa,qa,Xa,as,ms]}),Is.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Is,imports:[_s,we,Ie,Ae,He,Di,Ri,Zi,da,ks,xa,Ta,Oa,Fa,qa,Xa,as,ms]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Is,decorators:[{type:y.NgModule,args:[{imports:_s,exports:_s}]}]});var Ds=g(650),$s=g.n(Ds),Cs=g(700),Ss=g(947),Ms=g(234),Ts=g(911);const Es={green:"#00ff00",orange:"#ffa500",red:"#ff0000"},Ns=Object.assign(Object.assign({},{"stats-system-disk":"M5 2H19V11H14V13H21V22H3V13H10V11H5Z M7 4V9H17V4Z M5 15V20H19V15Z M7 17H11V19H7Z M15 17H17V19H15Z","stats-data-disk":"M3 3H10L12 5H21V12H3Z M5 5V10H19V7H11L9 5Z M3 14H21V22H3Z M5 16V20H19V16Z M7 17H11V19H7Z M15 17H17V19H15Z","stats-disk-space":"M3 2H21V22H3Z M5 4V20H19V4Z M7 6H17V9H7Z M7 11H17V14H7Z M7 16H12V18H7Z","stats-disk-read":"M12 1L18 7H14V13H10V7H6Z M3 15H21V22H3Z M5 17V20H19V17Z M15 18H17V19H15Z","stats-disk-write":"M10 1H14V7H18L12 13L6 7H10Z M3 15H21V22H3Z M5 17V20H19V17Z M15 18H17V19H15Z","stats-disk-io":"M7 1L12 6H9V12H5V6H2Z M15 1H19V7H22L17 12L12 7H15Z M3 15H21V22H3Z M5 17V20H19V17Z M15 18H17V19H15Z","stats-gpu":"M1 3H4V5H22V18H4V21H1V19H2V5H1Z M4 7V16H20V7Z M6 9H10V13H6Z M14 8L18 12L14 15L11 12Z M6 19H17V22H6Z M18 19H20V22H18Z","stats-vram":"M2 4H22V18H19V21H5V18H2Z M4 6V16H20V6Z M6 8H10V14H6Z M14 8H18V14H14Z M7 18V20H9V18Z M11 18V20H13V18Z M15 18V20H17V18Z","stats-cpu":"M6 2H8V5H11V2H13V5H16V2H18V5H19V6H22V8H19V11H22V13H19V16H22V18H19V19H18V22H16V19H13V22H11V19H8V22H6V19H5V18H2V16H5V13H2V11H5V8H2V6H5V5H6Z M7 7V17H17V7Z M9 9H15V15H9Z","stats-cpu-load":"M2 14A10 10 0 0 1 22 14V20H2Z M4 14V18H20V14A8 8 0 0 0 4 14Z M12 11L18 6L15 14A3 3 0 1 1 12 11Z M6 10L8 11L7 13L5 12Z M10 5H12V8H10Z","stats-io-wait":"M2 14H11V16H4V20H16V19H18V22H2Z M13 1A9 9 0 1 1 13 19A9 9 0 1 1 13 1Z M13 3A7 7 0 1 0 13 17A7 7 0 1 0 13 3Z M12 5H14V10H18V12H12Z M6 17H9V19H6Z","stats-memory":"M2 5H22V18H20V21H17V18H14V21H11V18H8V21H5V18H2Z M4 7V16H20V7Z M5 9H8V14H5Z M10 9H14V14H10Z M16 9H19V14H16Z","stats-swap":"M2 3H17V1L22 6L17 11V8H2Z M22 16H7V13L2 18L7 23V21H22Z","stats-network":"M9 2H15V8H13V11H21V15H23V22H15V15H19V13H5V15H9V22H1V15H3V11H11V8H9Z M11 4V6H13V4Z M3 17V20H7V17Z M17 17V20H21V17Z","stats-network-upload":"M12 1L19 8H14V17H10V8H5Z M2 16H5V20H19V16H22V23H2Z","stats-network-download":"M10 1H14V10H19L12 17L5 10H10Z M2 16H5V20H19V16H22V23H2Z","stats-latency":"M3 2H17V0L22 5L17 10V7H3Z M21 22H7V24L2 19L7 14V17H21Z M12 8A4 4 0 1 1 12 16A4 4 0 1 1 12 8Z M11 9V13H14V11H13V9Z","stats-temperature":"M8 4A4 4 0 0 1 16 4V13A6 6 0 1 1 8 13Z M10 4V14L9 15A4 4 0 1 0 15 15L14 14V4A2 2 0 0 0 10 4Z M11 7H13V15A3 3 0 1 1 11 15Z M18 4H22V6H18Z M18 9H21V11H18Z","stats-fan":"M12 10C7 10 4 7 6 4C9 0 14 1 15 6L14 10Z M14 12C14 7 17 4 20 6C24 9 23 14 18 15L14 14Z M12 14C17 14 20 17 18 20C15 24 10 23 9 18L10 14Z M10 12C10 17 7 20 4 18C0 15 1 10 6 9L10 10Z M12 10A2 2 0 1 1 12 14A2 2 0 1 1 12 10Z","stats-power":"M13 1L4 14H10L9 23L21 9H14L16 1Z","stats-process":"M2 2H22V22H2Z M4 4V20H20V4Z M6 6H9V9H6Z M11 6H18V9H11Z M6 11H9V14H6Z M11 11H16V14H11Z M6 16H9V18H6Z M11 16H18V18H11Z","stats-service":"M3 2H21V10H3Z M5 4V8H19V4Z M6 5H8V7H6Z M3 12H12V14H5V18H10V20H3Z M18 11L23 14V20L18 23L13 20V14Z M17 14V20L21 17Z","stats-health":"M12 1L21 5V12C21 17 17 21 12 23C7 21 3 17 3 12V5Z M12 3L5 6V12C5 16 8 19 12 21C16 19 19 16 19 12V6Z M7 11H10L12 7L15 14L16 11H18V13H17L15 18L12 12L11 13H7Z","stats-database":"M3 5C3 0 21 0 21 5V19C21 24 3 24 3 19Z M5 5C5 7 19 7 19 5C19 3 5 3 5 5Z M5 8V11C8 13 16 13 19 11V8C15 10 9 10 5 8Z M5 14V18C8 20 16 20 19 18V14C15 16 9 16 5 14Z","stats-container":"M3 3H21V21H3Z M5 5V19H19V5Z M7 7H10V17H7Z M12 7H15V17H12Z M17 7H18V17H17Z M1 1H6V3H3V6H1Z M18 1H23V6H21V3H18Z M1 18H3V21H6V23H1Z M21 18H23V23H18V21H21Z","stats-uptime":"M11 0H14V10H11Z M6 3L8 6A8 8 0 1 0 17 6L19 3A11 11 0 1 1 6 3Z M11 13H13V17H16V19H11Z"}),{postgresql:"M23.5594 14.7228a.5269.5269 0 0 0-.0563-.1191c-.139-.2632-.4768-.3418-1.0074-.2321-1.6533.3411-2.2935.1312-2.5256-.0191 1.342-2.0482 2.445-4.522 3.0411-6.8297.2714-1.0507.7982-3.5237.1222-4.7316a1.5641 1.5641 0 0 0-.1509-.235C21.6931.9086 19.8007.0248 17.5099.0005c-1.4947-.0158-2.7705.3461-3.1161.4794a9.449 9.449 0 0 0-.5159-.0816 8.044 8.044 0 0 0-1.3114-.1278c-1.1822-.0184-2.2038.2642-3.0498.8406-.8573-.3211-4.7888-1.645-7.2219.0788C.9359 2.1526.3086 3.8733.4302 6.3043c.0409.818.5069 3.334 1.2423 5.7436.4598 1.5065.9387 2.7019 1.4334 3.582.553.9942 1.1259 1.5933 1.7143 1.7895.4474.1491 1.1327.1441 1.8581-.7279.8012-.9635 1.5903-1.8258 1.9446-2.2069.4351.2355.9064.3625 1.39.3772a.0569.0569 0 0 0 .0004.0041 11.0312 11.0312 0 0 0-.2472.3054c-.3389.4302-.4094.5197-1.5002.7443-.3102.064-1.1344.2339-1.1464.8115-.0025.1224.0329.2309.0919.3268.2269.4231.9216.6097 1.015.6331 1.3345.3335 2.5044.092 3.3714-.6787-.017 2.231.0775 4.4174.3454 5.0874.2212.5529.7618 1.9045 2.4692 1.9043.2505 0 .5263-.0291.8296-.0941 1.7819-.3821 2.5557-1.1696 2.855-2.9059.1503-.8707.4016-2.8753.5388-4.1012.0169-.0703.0357-.1207.057-.1362.0007-.0005.0697-.0471.4272.0307a.3673.3673 0 0 0 .0443.0068l.2539.0223.0149.001c.8468.0384 1.9114-.1426 2.5312-.4308.6438-.2988 1.8057-1.0323 1.5951-1.6698z",redis:"M22.71 13.145c-1.66 2.092-3.452 4.483-7.038 4.483-3.203 0-4.397-2.825-4.48-5.12.701 1.484 2.073 2.685 4.214 2.63 4.117-.133 6.94-3.852 6.94-7.239 0-4.05-3.022-6.972-8.268-6.972-3.752 0-8.4 1.428-11.455 3.685C2.59 6.937 3.885 9.958 4.35 9.626c2.648-1.904 4.748-3.13 6.784-3.744C8.12 9.244.886 17.05 0 18.425c.1 1.261 1.66 4.648 2.424 4.648.232 0 .431-.133.664-.365a100.49 100.49 0 0 0 5.54-6.765c.222 3.104 1.748 6.898 6.014 6.898 3.819 0 7.604-2.756 9.33-8.965.2-.764-.73-1.361-1.261-.73zm-4.349-5.013c0 1.959-1.926 2.922-3.685 2.922-.941 0-1.664-.247-2.235-.568 1.051-1.592 2.092-3.225 3.21-4.973 1.972.334 2.71 1.43 2.71 2.619z",mongodb:"M17.193 9.555c-1.264-5.58-4.252-7.414-4.573-8.115-.28-.394-.53-.954-.735-1.44-.036.495-.055.685-.523 1.184-.723.566-4.438 3.682-4.74 10.02-.282 5.912 4.27 9.435 4.888 9.884l.07.05A73.49 73.49 0 0111.91 24h.481c.114-1.032.284-2.056.51-3.07.417-.296.604-.463.85-.693a11.342 11.342 0 003.639-8.464c.01-.814-.103-1.662-.197-2.218zm-5.336 8.195s0-8.291.275-8.29c.213 0 .49 10.695.49 10.695-.381-.045-.765-1.76-.765-2.405z",rabbitmq:"M23.035 9.601h-7.677a.956.956 0 01-.962-.962V.962a.956.956 0 00-.962-.956H10.56a.956.956 0 00-.962.956V8.64a.956.956 0 01-.962.962H5.762a.956.956 0 01-.961-.962V.962A.956.956 0 003.839 0H.959a.956.956 0 00-.956.962v22.076A.956.956 0 00.965 24h22.07a.956.956 0 00.962-.962V10.58a.956.956 0 00-.962-.98zm-3.86 8.152a1.437 1.437 0 01-1.437 1.443h-1.924a1.437 1.437 0 01-1.436-1.443v-1.917a1.437 1.437 0 011.436-1.443h1.924a1.437 1.437 0 011.437 1.443z",nginx:"M12 0L1.605 6v12L12 24l10.395-6V6L12 0zm6 16.59c0 .705-.646 1.29-1.529 1.29-.631 0-1.351-.255-1.801-.81l-6-7.141v6.66c0 .721-.57 1.29-1.274 1.29H7.32c-.721 0-1.29-.6-1.29-1.29V7.41c0-.705.63-1.29 1.5-1.29.646 0 1.38.255 1.83.81l5.97 7.141V7.41c0-.721.6-1.29 1.29-1.29h.075c.72 0 1.29.6 1.29 1.29v9.18H18z",mysql:"M16.405 5.501c-.115 0-.193.014-.274.033v.013h.014c.054.104.146.18.214.273.054.107.1.214.154.32l.014-.015c.094-.066.14-.172.14-.333-.04-.047-.046-.094-.08-.14-.04-.067-.126-.1-.18-.153zM5.77 18.695h-.927a50.854 50.854 0 00-.27-4.41h-.008l-1.41 4.41H2.45l-1.4-4.41h-.01a72.892 72.892 0 00-.195 4.41H0c.055-1.966.192-3.81.41-5.53h1.15l1.335 4.064h.008l1.347-4.064h1.095c.242 2.015.384 3.86.428 5.53zm4.017-4.08c-.378 2.045-.876 3.533-1.492 4.46-.482.716-1.01 1.073-1.583 1.073-.153 0-.34-.046-.566-.138v-.494c.11.017.24.026.386.026.268 0 .483-.075.647-.222.197-.18.295-.382.295-.605 0-.155-.077-.47-.23-.944L6.23 14.615h.91l.727 2.36c.164.536.233.91.205 1.123.4-1.064.678-2.227.835-3.483zm12.325 4.08h-2.63v-5.53h.885v4.85h1.745zm-3.32.135l-1.016-.5c.09-.076.177-.158.255-.25.433-.506.648-1.258.648-2.253 0-1.83-.718-2.746-2.155-2.746-.704 0-1.254.232-1.65.697-.43.508-.646 1.256-.646 2.245 0 .972.19 1.686.574 2.14.35.41.877.615 1.583.615.264 0 .506-.033.725-.098l1.325.772.36-.622zM15.5 17.588c-.225-.36-.337-.94-.337-1.736 0-1.393.424-2.09 1.27-2.09.443 0 .77.167.977.5.224.362.336.936.336 1.723 0 1.404-.424 2.108-1.27 2.108-.445 0-.77-.167-.978-.5zm-1.658-.425c0 .47-.172.856-.516 1.156-.344.3-.803.45-1.384.45-.543 0-1.064-.172-1.573-.515l.237-.476c.438.22.833.328 1.19.328.332 0 .593-.073.783-.22a.754.754 0 00.3-.615c0-.33-.23-.61-.648-.845-.388-.213-1.163-.657-1.163-.657-.422-.307-.632-.636-.632-1.177 0-.45.157-.81.47-1.085.315-.278.72-.415 1.22-.415.512 0 .98.136 1.4.41l-.213.476a2.726 2.726 0 00-1.064-.23c-.283 0-.502.068-.654.206a.685.685 0 00-.248.524c0 .328.234.61.666.85.393.215 1.187.67 1.187.67.433.305.648.63.648 1.168zm9.382-5.852c-.535-.014-.95.04-1.297.188-.1.04-.26.04-.274.167.055.053.063.14.11.214.08.134.218.313.346.407.14.11.28.216.427.31.26.16.555.255.81.416.145.094.293.213.44.313.073.05.12.14.214.172v-.02c-.046-.06-.06-.147-.105-.214-.067-.067-.134-.127-.2-.193a3.223 3.223 0 00-.695-.675c-.214-.146-.682-.35-.77-.595l-.013-.014c.146-.013.32-.066.46-.106.227-.06.435-.047.67-.106.106-.027.213-.06.32-.094v-.06c-.12-.12-.21-.283-.334-.395a8.867 8.867 0 00-1.104-.823c-.21-.134-.476-.22-.697-.334-.08-.04-.214-.06-.26-.127-.12-.146-.19-.34-.275-.514a17.69 17.69 0 01-.547-1.163c-.12-.262-.193-.523-.34-.763-.69-1.137-1.437-1.826-2.586-2.5-.247-.14-.543-.2-.856-.274-.167-.008-.334-.02-.5-.027-.11-.047-.216-.174-.31-.235-.38-.24-1.364-.76-1.644-.072-.18.434.267.862.422 1.082.115.153.26.328.34.5.047.116.06.235.107.356.106.294.207.622.347.897.073.14.153.287.247.413.054.073.146.107.167.227-.094.136-.1.334-.154.5-.24.757-.146 1.693.194 2.25.107.166.362.534.703.393.3-.12.234-.5.32-.835.02-.08.007-.133.048-.187v.015c.094.188.188.367.274.555.206.328.566.668.867.895.16.12.287.328.487.402v-.02h-.015c-.043-.058-.1-.086-.154-.133a3.445 3.445 0 01-.35-.4 8.76 8.76 0 01-.747-1.218c-.11-.21-.202-.436-.29-.643-.04-.08-.04-.2-.107-.24-.1.146-.247.273-.32.453-.127.288-.14.642-.188 1.01-.027.007-.014 0-.027.014-.214-.052-.287-.274-.367-.46-.2-.475-.233-1.238-.06-1.785.047-.14.247-.582.167-.716-.042-.127-.174-.2-.247-.303a2.478 2.478 0 01-.24-.427c-.16-.374-.24-.788-.414-1.162-.08-.173-.22-.354-.334-.513-.127-.18-.267-.307-.368-.52-.033-.073-.08-.194-.027-.274.014-.054.042-.075.094-.09.088-.072.335.022.422.062.247.1.455.194.662.334.094.066.195.193.315.226h.14c.214.047.455.014.655.073.355.114.675.28.962.46a5.953 5.953 0 012.085 2.286c.08.154.115.295.188.455.14.33.313.663.455.982.14.315.275.636.476.897.1.14.502.213.682.286.133.06.34.115.46.188.23.14.454.3.67.454.11.076.443.243.463.378z",docker:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288Z",kubernetes:"M10.204 14.35l.007.01-.999 2.413a5.171 5.171 0 0 1-2.075-2.597l2.578-.437.004.005a.44.44 0 0 1 .484.606zm-.833-2.129a.44.44 0 0 0 .173-.756l.002-.011L7.585 9.7a5.143 5.143 0 0 0-.73 3.255l2.514-.725.002-.009zm1.145-1.98a.44.44 0 0 0 .699-.337l.01-.005.15-2.62a5.144 5.144 0 0 0-3.01 1.442l2.147 1.523.004-.002zm.76 2.75l.723.349.722-.347.18-.78-.5-.623h-.804l-.5.623.179.779zm1.5-3.095a.44.44 0 0 0 .7.336l.008.003 2.134-1.513a5.188 5.188 0 0 0-2.992-1.442l.148 2.615.002.001zm10.876 5.97l-5.773 7.181a1.6 1.6 0 0 1-1.248.594l-9.261.003a1.6 1.6 0 0 1-1.247-.596l-5.776-7.18a1.583 1.583 0 0 1-.307-1.34L2.1 5.573c.108-.47.425-.864.863-1.073L11.305.513a1.606 1.606 0 0 1 1.385 0l8.345 3.985c.438.209.755.604.863 1.073l2.062 8.955c.108.47-.005.963-.308 1.34zm-3.289-2.057c-.042-.01-.103-.026-.145-.034-.174-.033-.315-.025-.479-.038-.35-.037-.638-.067-.895-.148-.105-.04-.18-.165-.216-.216l-.201-.059a6.45 6.45 0 0 0-.105-2.332 6.465 6.465 0 0 0-.936-2.163c.052-.047.15-.133.177-.159.008-.09.001-.183.094-.282.197-.185.444-.338.743-.522.142-.084.273-.137.415-.242.032-.024.076-.062.11-.089.24-.191.295-.52.123-.736-.172-.216-.506-.236-.745-.045-.034.027-.08.062-.111.088-.134.116-.217.23-.33.35-.246.25-.45.458-.673.609-.097.056-.239.037-.303.033l-.19.135a6.545 6.545 0 0 0-4.146-2.003l-.012-.223c-.065-.062-.143-.115-.163-.25-.022-.268.015-.557.057-.905.023-.163.061-.298.068-.475.001-.04-.001-.099-.001-.142 0-.306-.224-.555-.5-.555-.275 0-.499.249-.499.555l.001.014c0 .041-.002.092 0 .128.006.177.044.312.067.475.042.348.078.637.056.906a.545.545 0 0 1-.162.258l-.012.211a6.424 6.424 0 0 0-4.166 2.003 8.373 8.373 0 0 1-.18-.128c-.09.012-.18.04-.297-.029-.223-.15-.427-.358-.673-.608-.113-.12-.195-.234-.329-.349-.03-.026-.077-.062-.111-.088a.594.594 0 0 0-.348-.132.481.481 0 0 0-.398.176c-.172.216-.117.546.123.737l.007.005.104.083c.142.105.272.159.414.242.299.185.546.338.743.522.076.082.09.226.1.288l.16.143a6.462 6.462 0 0 0-1.02 4.506l-.208.06c-.055.072-.133.184-.215.217-.257.081-.546.11-.895.147-.164.014-.305.006-.48.039-.037.007-.09.02-.133.03l-.004.002-.007.002c-.295.071-.484.342-.423.608.061.267.349.429.645.365l.007-.001.01-.003.129-.029c.17-.046.294-.113.448-.172.33-.118.604-.217.87-.256.112-.009.23.069.288.101l.217-.037a6.5 6.5 0 0 0 2.88 3.596l-.09.218c.033.084.069.199.044.282-.097.252-.263.517-.452.813-.091.136-.185.242-.268.399-.02.037-.045.095-.064.134-.128.275-.034.591.213.71.248.12.556-.007.69-.282v-.002c.02-.039.046-.09.062-.127.07-.162.094-.301.144-.458.132-.332.205-.68.387-.897.05-.06.13-.082.215-.105l.113-.205a6.453 6.453 0 0 0 4.609.012l.106.192c.086.028.18.042.256.155.136.232.229.507.342.84.05.156.074.295.145.457.016.037.043.09.062.129.133.276.442.402.69.282.247-.118.341-.435.213-.71-.02-.039-.045-.096-.065-.134-.083-.156-.177-.261-.268-.398-.19-.296-.346-.541-.443-.793-.04-.13.007-.21.038-.294-.018-.022-.059-.144-.083-.202a6.499 6.499 0 0 0 2.88-3.622c.064.01.176.03.213.038.075-.05.144-.114.28-.104.266.039.54.138.87.256.154.06.277.128.448.173.036.01.088.019.13.028l.009.003.007.001c.297.064.584-.098.645-.365.06-.266-.128-.537-.423-.608z",elasticsearch:"M13.394 0C8.683 0 4.609 2.716 2.644 6.667h15.641a4.77 4.77 0 0 0 3.073-1.11c.446-.375.864-.785 1.247-1.243l.001-.002A11.974 11.974 0 0 0 13.394 0zM1.804 8.889a12.009 12.009 0 0 0 0 6.222h14.7a3.111 3.111 0 1 0 0-6.222zm.84 8.444C4.61 21.283 8.684 24 13.395 24c3.701 0 7.011-1.677 9.212-4.312l-.001-.002a9.958 9.958 0 0 0-1.247-1.243 4.77 4.77 0 0 0-3.073-1.11z",apachekafka:"M9.71 2.136a1.43 1.43 0 0 0-2.047 0h-.007a1.48 1.48 0 0 0-.421 1.042c0 .41.161.777.422 1.039l.007.007c.257.264.616.426 1.019.426.404 0 .766-.162 1.027-.426l.003-.007c.261-.262.421-.629.421-1.039 0-.408-.159-.777-.421-1.042H9.71zM8.683 22.295c.404 0 .766-.167 1.027-.429l.003-.008c.261-.261.421-.631.421-1.036 0-.41-.159-.778-.421-1.044H9.71a1.42 1.42 0 0 0-1.027-.432 1.4 1.4 0 0 0-1.02.432h-.007c-.26.266-.422.634-.422 1.044 0 .406.161.775.422 1.036l.007.008c.258.262.617.429 1.02.429zm7.89-4.462c.359-.096.683-.33.882-.684l.027-.052a1.47 1.47 0 0 0 .114-1.067 1.454 1.454 0 0 0-.675-.896l-.021-.014a1.425 1.425 0 0 0-1.078-.132c-.36.091-.684.335-.881.686-.2.349-.241.75-.146 1.119.099.363.33.691.675.896h.002c.346.203.737.239 1.101.144zm-6.405-7.342a2.083 2.083 0 0 0-1.485-.627c-.58 0-1.103.242-1.482.627-.378.385-.612.916-.612 1.507s.233 1.124.612 1.514a2.08 2.08 0 0 0 2.967 0c.379-.39.612-.923.612-1.514s-.233-1.122-.612-1.507z",prometheus:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12s12-5.373 12-12c0-6.628-5.373-12-12-12zm0 22.46c-1.885 0-3.414-1.26-3.414-2.814h6.828c0 1.553-1.528 2.813-3.414 2.813zm5.64-3.745H6.36v-2.046h11.28v2.046zm-.04-3.098H6.391c-.037-.043-.075-.086-.111-.13-1.155-1.401-1.427-2.133-1.69-2.879-.005-.025 1.4.287 2.395.511 0 0 .513.119 1.262.255-.72-.843-1.147-1.915-1.147-3.01 0-2.406 1.845-4.508 1.18-6.207.648.053 1.34 1.367 1.387 3.422.689-.951.977-2.69.977-3.755 0-1.103.727-2.385 1.454-2.429-.648 1.069.168 1.984.894 4.256.272.854.237 2.29.447 3.201.07-1.892.395-4.652 1.595-5.605-.529 1.2.079 2.702.494 3.424.671 1.164 1.078 2.047 1.078 3.716a4.642 4.642 0 01-1.11 2.996c.792-.149 1.34-.283 1.34-.283l2.573-.502s-.374 1.538-1.81 3.019z",grafana:"M23.02 10.59a8.578 8.578 0 0 0-.862-3.034 8.911 8.911 0 0 0-1.789-2.445c.337-1.342-.413-2.505-.413-2.505-1.292-.08-2.113.4-2.416.62-.052-.02-.102-.044-.154-.064-.22-.089-.446-.172-.677-.247-.231-.073-.47-.14-.711-.197a9.867 9.867 0 0 0-.875-.161C14.557.753 12.94 0 12.94 0c-1.804 1.145-2.147 2.744-2.147 2.744l-.018.093c-.098.029-.2.057-.298.088-.138.042-.275.094-.413.143-.138.055-.275.107-.41.166a8.869 8.869 0 0 0-1.557.87l-.063-.029c-2.497-.955-4.716.195-4.716.195-.203 2.658.996 4.33 1.235 4.636a11.608 11.608 0 0 0-.607 2.635C1.636 12.677.953 15.014.953 15.014c1.926 2.214 4.171 2.351 4.171 2.351.003-.002.006-.002.006-.005.285.509.615.994.986 1.446.156.19.32.371.488.548-.704 2.009.099 3.68.099 3.68 2.144.08 3.553-.937 3.849-1.173a9.784 9.784 0 0 0 3.164.501h.08l.055-.003.107-.002.103-.005.003.002c1.01 1.44 2.788 1.646 2.788 1.646 1.264-1.332 1.337-2.653 1.337-2.94v-.058c0-.02-.003-.039-.003-.06.265-.187.52-.387.758-.6a7.875 7.875 0 0 0 1.415-1.7c1.43.083 2.437-.885 2.437-.885-.236-1.49-1.085-2.216-1.264-2.354l-.018-.013-.016-.013a.217.217 0 0 1-.031-.02c.008-.092.016-.18.02-.27.011-.162.016-.323.016-.48v-.253l-.005-.098-.008-.135a1.891 1.891 0 0 0-.01-.13c-.003-.042-.008-.083-.013-.125l-.016-.124-.018-.122a6.215 6.215 0 0 0-2.032-3.73 6.015 6.015 0 0 0-3.222-1.46 6.292 6.292 0 0 0-.85-.048l-.107.002h-.063l-.044.003-.104.008a4.777 4.777 0 0 0-3.335 1.695c-.332.4-.592.84-.768 1.297a4.594 4.594 0 0 0-.312 1.817l.003.091c.005.055.007.11.013.164a3.615 3.615 0 0 0 .698 1.82 3.53 3.53 0 0 0 1.827 1.282c.33.098.66.14.971.137.039 0 .078 0 .114-.002l.063-.003c.02 0 .041-.003.062-.003.034-.002.065-.007.099-.01.007 0 .018-.003.028-.003l.031-.005.06-.008a1.18 1.18 0 0 0 .112-.02c.036-.008.072-.013.109-.024a2.634 2.634 0 0 0 .914-.415c.028-.02.056-.041.085-.065a.248.248 0 0 0 .039-.35.244.244 0 0 0-.309-.06l-.078.042c-.09.044-.184.083-.283.116a2.476 2.476 0 0 1-.475.096c-.028.003-.054.006-.083.006l-.083.002c-.026 0-.054 0-.08-.002l-.102-.006h-.012l-.024.006c-.016-.003-.031-.003-.044-.006-.031-.002-.06-.007-.091-.01a2.59 2.59 0 0 1-.724-.213 2.557 2.557 0 0 1-.667-.438 2.52 2.52 0 0 1-.805-1.475 2.306 2.306 0 0 1-.029-.444l.006-.122v-.023l.002-.031c.003-.021.003-.04.005-.06a3.163 3.163 0 0 1 1.352-2.29 3.12 3.12 0 0 1 .937-.43 2.946 2.946 0 0 1 .776-.101h.06l.07.002.045.003h.026l.07.005a4.041 4.041 0 0 1 1.635.49 3.94 3.94 0 0 1 1.602 1.662 3.77 3.77 0 0 1 .397 1.414l.005.076.003.075c.002.026.002.05.002.075 0 .024.003.052 0 .07v.065l-.002.073-.008.174a6.195 6.195 0 0 1-.08.639 5.1 5.1 0 0 1-.267.927 5.31 5.31 0 0 1-.624 1.13 5.052 5.052 0 0 1-3.237 2.014 4.82 4.82 0 0 1-.649.066l-.039.003h-.287a6.607 6.607 0 0 1-1.716-.265 6.776 6.776 0 0 1-3.4-2.274 6.75 6.75 0 0 1-.746-1.15 6.616 6.616 0 0 1-.714-2.596l-.005-.083-.002-.02v-.056l-.003-.073v-.096l-.003-.104v-.07l.003-.163c.008-.22.026-.45.054-.678a8.707 8.707 0 0 1 .28-1.355c.128-.444.286-.872.473-1.277a7.04 7.04 0 0 1 1.456-2.1 5.925 5.925 0 0 1 .953-.763c.169-.111.343-.213.524-.306.089-.05.182-.091.273-.135.047-.02.093-.042.138-.062a7.177 7.177 0 0 1 .714-.267l.145-.045c.049-.015.098-.026.148-.041.098-.029.197-.052.296-.076.049-.013.1-.02.15-.033l.15-.032.151-.028.076-.013.075-.01.153-.024c.057-.01.114-.013.171-.023l.169-.021c.036-.003.073-.008.106-.01l.073-.008.036-.003.042-.002c.057-.003.114-.008.171-.01l.086-.006h.023l.037-.003.145-.007a7.999 7.999 0 0 1 1.708.125 7.917 7.917 0 0 1 2.048.68 8.253 8.253 0 0 1 1.672 1.09l.09.077.089.078c.06.052.114.107.171.159.057.052.112.106.166.16.052.055.107.107.159.164a8.671 8.671 0 0 1 1.41 1.978c.012.026.028.052.04.078l.04.078.075.156c.023.051.05.1.07.153l.065.15a8.848 8.848 0 0 1 .45 1.34.19.19 0 0 0 .201.142.186.186 0 0 0 .172-.184c.01-.246.002-.532-.024-.856z",sqlite:"M21.678.521c-1.032-.92-2.28-.55-3.513.544a8.71 8.71 0 0 0-.547.535c-2.109 2.237-4.066 6.38-4.674 9.544.237.48.422 1.093.544 1.561a13.044 13.044 0 0 1 .164.703s-.019-.071-.096-.296l-.05-.146a1.689 1.689 0 0 0-.033-.08c-.138-.32-.518-.995-.686-1.289-.143.423-.27.818-.376 1.176.484.884.778 2.4.778 2.4s-.025-.099-.147-.442c-.107-.303-.644-1.244-.772-1.464-.217.804-.304 1.346-.226 1.478.152.256.296.698.422 1.186.286 1.1.485 2.44.485 2.44l.017.224a22.41 22.41 0 0 0 .056 2.748c.095 1.146.273 2.13.5 2.657l.155-.084c-.334-1.038-.47-2.399-.41-3.967.09-2.398.642-5.29 1.661-8.304 1.723-4.55 4.113-8.201 6.3-9.945-1.993 1.8-4.692 7.63-5.5 9.788-.904 2.416-1.545 4.684-1.931 6.857.666-2.037 2.821-2.912 2.821-2.912s1.057-1.304 2.292-3.166c-.74.169-1.955.458-2.362.629-.6.251-.762.337-.762.337s1.945-1.184 3.613-1.72C21.695 7.9 24.195 2.767 21.678.521m-18.573.543A1.842 1.842 0 0 0 1.27 2.9v16.608a1.84 1.84 0 0 0 1.835 1.834h9.418a22.953 22.953 0 0 1-.052-2.707c-.006-.062-.011-.141-.016-.2a27.01 27.01 0 0 0-.473-2.378c-.121-.47-.275-.898-.369-1.057-.116-.197-.098-.31-.097-.432 0-.12.015-.245.037-.386a9.98 9.98 0 0 1 .234-1.045l.217-.028c-.017-.035-.014-.065-.031-.097l-.041-.381a32.8 32.8 0 0 1 .382-1.194l.2-.019c-.008-.016-.01-.038-.018-.053l-.043-.316c.63-3.28 2.587-7.443 4.8-9.791.066-.069.133-.128.198-.194Z",mariadb:"M23.157 4.412c-.676.284-.79.31-1.673.372-.65.045-.757.057-1.212.209-.75.246-1.395.75-2.02 1.59-.296.398-1.249 1.913-1.249 1.988 0 .057-.65.998-.915 1.32-.574.713-1.08 1.079-2.14 1.59-.77.36-1.224.524-4.102 1.477-1.073.353-2.133.738-2.367.864-.852.449-1.515 1.036-2.203 1.938-1.003 1.32-.972 1.313-3.042.947a12.264 12.264 0 00-.675-.063c-.644-.05-1.023.044-1.332.334L0 17.193l.177.088c.094.05.353.234.561.398.215.17.461.347.55.391.088.044.17.088.183.101.012.013-.089.17-.228.353-.435.581-.593.871-.574 1.048.019.164.032.17.43.17.517-.006.826-.056 1.261-.208.65-.233 2.058-.94 2.784-1.4.776-.5 1.717-.998 1.956-1.042.082-.02.354-.07.594-.114.58-.107 1.464-.095 2.587.05.108.013.373.045.6.064.227.025.43.057.454.076.026.012.474.037.998.056.934.026 1.104.007 1.3-.189.126-.133.385-.631.498-.985.209-.643.417-.921.366-.492-.113.966-.322 1.692-.713 2.411-.259.499-.663 1.092-.934 1.395-.322.347-.315.36.088.315.619-.063 1.471-.397 2.096-.82.827-.562 1.647-1.691 2.19-3.03.107-.27.22-.22.183.083-.013.094-.038.315-.057.498l-.031.328.353-.202c.833-.48 1.414-1.262 2.127-2.884.227-.518.877-2.922 1.073-3.976a9.64 9.64 0 01.271-1.042c.127-.429.196-.555.48-.858.183-.19.625-.555.978-.808.72-.505.953-.75 1.187-1.205.208-.417.284-1.13.132-1.357-.132-.202-.284-.196-.763.006Z",linux:"M12.504 0c-.155 0-.315.008-.48.021-4.226.333-3.105 4.807-3.17 6.298-.076 1.092-.3 1.953-1.05 3.02-.885 1.051-2.127 2.75-2.716 4.521-.278.832-.41 1.684-.287 2.489a.424.424 0 00-.11.135c-.26.268-.45.6-.663.839-.199.199-.485.267-.797.4-.313.136-.658.269-.864.68-.09.189-.136.394-.132.602 0 .199.027.4.055.536.058.399.116.728.04.97-.249.68-.28 1.145-.106 1.484.174.334.535.47.94.601.81.2 1.91.135 2.774.6.926.466 1.866.67 2.616.47.526-.116.97-.464 1.208-.946.587-.003 1.23-.269 2.26-.334.699-.058 1.574.267 2.577.2.025.134.063.198.114.333l.003.003c.391.778 1.113 1.132 1.884 1.071.771-.06 1.592-.536 2.257-1.306.631-.765 1.683-1.084 2.378-1.503.348-.199.629-.469.649-.853.023-.4-.2-.811-.714-1.376v-.097l-.003-.003c-.17-.2-.25-.535-.338-.926-.085-.401-.182-.786-.492-1.046h-.003c-.059-.054-.123-.067-.188-.135a.357.357 0 00-.19-.064c.431-1.278.264-2.55-.173-3.694-.533-1.41-1.465-2.638-2.175-3.483-.796-1.005-1.576-1.957-1.56-3.368.026-2.152.236-6.133-3.544-6.139zm.529 3.405h.013c.213 0 .396.062.584.198.19.135.33.332.438.533.105.259.158.459.166.724 0-.02.006-.04.006-.06v.105a.086.086 0 01-.004-.021l-.004-.024a1.807 1.807 0 01-.15.706.953.953 0 01-.213.335.71.71 0 00-.088-.042c-.104-.045-.198-.064-.284-.133a1.312 1.312 0 00-.22-.066c.05-.06.146-.133.183-.198.053-.128.082-.264.088-.402v-.02a1.21 1.21 0 00-.061-.4c-.045-.134-.101-.2-.183-.333-.084-.066-.167-.132-.267-.132h-.016c-.093 0-.176.03-.262.132a.8.8 0 00-.205.334 1.18 1.18 0 00-.09.4v.019c.002.089.008.179.02.267-.193-.067-.438-.135-.607-.202a1.635 1.635 0 01-.018-.2v-.02a1.772 1.772 0 01.15-.768c.082-.22.232-.406.43-.533a.985.985 0 01.594-.2zm-2.962.059h.036c.142 0 .27.048.399.135.146.129.264.288.344.465.09.199.14.4.153.667v.004c.007.134.006.2-.002.266v.08c-.03.007-.056.018-.083.024-.152.055-.274.135-.393.2.012-.09.013-.18.003-.267v-.015c-.012-.133-.04-.2-.082-.333a.613.613 0 00-.166-.267.248.248 0 00-.183-.064h-.021c-.071.006-.13.04-.186.132a.552.552 0 00-.12.27.944.944 0 00-.023.33v.015c.012.135.037.2.08.334.046.134.098.2.166.268.01.009.02.018.034.024-.07.057-.117.07-.176.136a.304.304 0 01-.131.068 2.62 2.62 0 01-.275-.402 1.772 1.772 0 01-.155-.667 1.759 1.759 0 01.08-.668 1.43 1.43 0 01.283-.535c.128-.133.26-.2.418-.2zm1.37 1.706c.332 0 .733.065 1.216.399.293.2.523.269 1.052.468h.003c.255.136.405.266.478.399v-.131a.571.571 0 01.016.47c-.123.31-.516.643-1.063.842v.002c-.268.135-.501.333-.775.465-.276.135-.588.292-1.012.267a1.139 1.139 0 01-.448-.067 3.566 3.566 0 01-.322-.198c-.195-.135-.363-.332-.612-.465v-.005h-.005c-.4-.246-.616-.512-.686-.71-.07-.268-.005-.47.193-.6.224-.135.38-.271.483-.336.104-.074.143-.102.176-.131h.002v-.003c.169-.202.436-.47.839-.601.139-.036.294-.065.466-.065zm2.8 2.142c.358 1.417 1.196 3.475 1.735 4.473.286.534.855 1.659 1.102 3.024.156-.005.33.018.513.064.646-1.671-.546-3.467-1.089-3.966-.22-.2-.232-.335-.123-.335.59.534 1.365 1.572 1.646 2.757.13.535.16 1.104.021 1.67.067.028.135.06.205.067 1.032.534 1.413.938 1.23 1.537v-.043c-.06-.003-.12 0-.18 0h-.016c.151-.467-.182-.825-1.065-1.224-.915-.4-1.646-.336-1.77.465-.008.043-.013.066-.018.135-.068.023-.139.053-.209.064-.43.268-.662.669-.793 1.187-.13.533-.17 1.156-.205 1.869v.003c-.02.334-.17.838-.319 1.35-1.5 1.072-3.58 1.538-5.348.334a2.645 2.645 0 00-.402-.533 1.45 1.45 0 00-.275-.333c.182 0 .338-.03.465-.067a.615.615 0 00.314-.334c.108-.267 0-.697-.345-1.163-.345-.467-.931-.995-1.788-1.521-.63-.4-.986-.87-1.15-1.396-.165-.534-.143-1.085-.015-1.645.245-1.07.873-2.11 1.274-2.763.107-.065.037.135-.408.974-.396.751-1.14 2.497-.122 3.854a8.123 8.123 0 01.647-2.876c.564-1.278 1.743-3.504 1.836-5.268.048.036.217.135.289.202.218.133.38.333.59.465.21.201.477.335.876.335.039.003.075.006.11.006.412 0 .73-.134.997-.268.29-.134.52-.334.74-.4h.005c.467-.135.835-.402 1.044-.7zm2.185 8.958c.037.6.343 1.245.882 1.377.588.134 1.434-.333 1.791-.765l.211-.01c.315-.007.577.01.847.268l.003.003c.208.199.305.53.391.876.085.4.154.78.409 1.066.486.527.645.906.636 1.14l.003-.007v.018l-.003-.012c-.015.262-.185.396-.498.595-.63.401-1.746.712-2.457 1.57-.618.737-1.37 1.14-2.036 1.191-.664.053-1.237-.2-1.574-.898l-.005-.003c-.21-.4-.12-1.025.056-1.69.176-.668.428-1.344.463-1.897.037-.714.076-1.335.195-1.814.12-.465.308-.797.641-.984l.045-.022zm-10.814.049h.01c.053 0 .105.005.157.014.376.055.706.333 1.023.752l.91 1.664.003.003c.243.533.754 1.064 1.189 1.637.434.598.77 1.131.729 1.57v.006c-.057.744-.48 1.148-1.125 1.294-.645.135-1.52.002-2.395-.464-.968-.536-2.118-.469-2.857-.602-.369-.066-.61-.2-.723-.4-.11-.2-.113-.602.123-1.23v-.004l.002-.003c.117-.334.03-.752-.027-1.118-.055-.401-.083-.71.043-.94.16-.334.396-.4.69-.533.294-.135.64-.202.915-.47h.002v-.002c.256-.268.445-.601.668-.838.19-.201.38-.336.663-.336zm7.159-9.074c-.435.201-.945.535-1.488.535-.542 0-.97-.267-1.28-.466-.154-.134-.28-.268-.373-.335-.164-.134-.144-.333-.074-.333.109.016.129.134.199.2.096.066.215.2.36.333.292.2.68.467 1.167.467.485 0 1.053-.267 1.398-.466.195-.135.445-.334.648-.467.156-.136.149-.267.279-.267.128.016.034.134-.147.332a8.097 8.097 0 01-.69.468zm-1.082-1.583V5.64c-.006-.02.013-.042.029-.05.074-.043.18-.027.26.004.063 0 .16.067.15.135-.006.049-.085.066-.135.066-.055 0-.092-.043-.141-.068-.052-.018-.146-.008-.163-.065zm-.551 0c-.02.058-.113.049-.166.066-.047.025-.086.068-.14.068-.05 0-.13-.02-.136-.068-.01-.066.088-.133.15-.133.08-.031.184-.047.259-.005.019.009.036.03.03.05v.02h.003z"}),Os={postgres:"postgresql",postgresql:"postgresql",psql:"postgresql",redis:"redis",mongo:"mongodb",mongodb:"mongodb",rabbitmq:"rabbitmq",rabbit:"rabbitmq",nginx:"nginx",mysql:"mysql",mariadb:"mariadb",sqlite:"sqlite",docker:"docker",k8s:"kubernetes",kubernetes:"kubernetes",elastic:"elasticsearch",elasticsearch:"elasticsearch",kafka:"apachekafka",apachekafka:"apachekafka",prometheus:"prometheus",grafana:"grafana",linux:"linux",tux:"linux"};function Rs(t){if(!t)return null;const e=t.trim().toLowerCase().replace(/^fa[srbld]?\s+fa-/,"").replace(/^fa-/,"");return Ns[Os[e]||e]||null}function Vs(t){return null!==Rs(t)}function Fs(t){if(!t)return!1;const e=t.trim().toLowerCase();return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("data:image/")||e.startsWith("data:image/svg+xml")}function Ps(t){return!!t&&!Vs(t)&&!Fs(t)}function As(t){if(!t)return"";const e=t.trim();return e?Vs(e)||Fs(e)?"":e.startsWith("fa-")?`fas ${e}`:e.startsWith("fas ")||e.startsWith("far ")||e.startsWith("fab ")||e.startsWith("fal ")||e.startsWith("fad ")?e:`fas fa-${e}`:""}const Hs=[{name:"stats-system-disk",label:"系统盘",category:"Storage",keywords:["system disk","root","根目录","启动盘"]},{name:"stats-data-disk",label:"数据盘",category:"Storage",keywords:["data disk","mount","挂载","文件","data2"]},{name:"stats-disk-space",label:"磁盘容量",category:"Storage",keywords:["disk space","capacity","容量","已用","可用","剩余"]},{name:"stats-disk-read",label:"磁盘读取",category:"Storage",keywords:["disk read","读取","读速","吞吐"]},{name:"stats-disk-write",label:"磁盘写入",category:"Storage",keywords:["disk write","写入","写速","吞吐"]},{name:"stats-disk-io",label:"磁盘读写",category:"Storage",keywords:["disk io","iops","读写","输入输出"]},{name:"stats-gpu",label:"GPU 显卡",category:"Compute",keywords:["gpu","graphics","显卡","图形","计算卡","nvidia"]},{name:"stats-vram",label:"GPU 显存",category:"Compute",keywords:["gpu memory","vram","显存","gddr","cuda"]},{name:"stats-cpu",label:"CPU 处理器",category:"Compute",keywords:["cpu","processor","处理器","核心"]},{name:"stats-cpu-load",label:"CPU 负载",category:"Compute",keywords:["cpu load","负载","1min","5min","15min","loadavg"]},{name:"stats-io-wait",label:"I/O 等待",category:"Compute",keywords:["io wait","iowait","cpu","等待","阻塞"]},{name:"stats-memory",label:"内存",category:"Compute",keywords:["ram","memory","内存","物理内存"]},{name:"stats-swap",label:"交换空间",category:"Compute",keywords:["swap","交换","虚拟内存"]},{name:"stats-network",label:"网络接口",category:"Network",keywords:["network","ethernet","网络","网卡","连接"]},{name:"stats-network-upload",label:"网络发送",category:"Network",keywords:["network upload","tx","发送","上传","出站"]},{name:"stats-network-download",label:"网络接收",category:"Network",keywords:["network download","rx","接收","下载","入站"]},{name:"stats-latency",label:"网络延迟",category:"Network",keywords:["latency","ping","rtt","延迟","往返"]},{name:"stats-temperature",label:"温度",category:"System",keywords:["temperature","thermal","温度","散热","传感器"]},{name:"stats-fan",label:"风扇转速",category:"System",keywords:["fan","rpm","风扇","转速","散热"]},{name:"stats-power",label:"功耗",category:"System",keywords:["power","watt","功耗","电力","瓦"]},{name:"stats-process",label:"进程",category:"System",keywords:["process","pid","task","进程","任务","线程"]},{name:"stats-uptime",label:"运行时间",category:"System",keywords:["uptime","运行时间","开机","在线时长"]},{name:"stats-service",label:"服务状态",category:"Services",keywords:["service","systemd","服务","运行状态","守护进程"]},{name:"stats-health",label:"健康检查",category:"Services",keywords:["health","check","健康","检查","心跳"]},{name:"stats-database",label:"数据库",category:"Services",keywords:["database","db","数据库","连接数"]},{name:"stats-container",label:"容器",category:"Services",keywords:["container","docker","容器","pod","kubernetes"]},{name:"postgresql",label:"PostgreSQL"},{name:"redis",label:"Redis"},{name:"mongodb",label:"MongoDB"},{name:"mysql",label:"MySQL"},{name:"mariadb",label:"MariaDB"},{name:"sqlite",label:"SQLite"},{name:"rabbitmq",label:"RabbitMQ"},{name:"nginx",label:"Nginx"},{name:"docker",label:"Docker"},{name:"kubernetes",label:"Kubernetes"},{name:"elasticsearch",label:"Elasticsearch"},{name:"apachekafka",label:"Kafka"},{name:"prometheus",label:"Prometheus"},{name:"grafana",label:"Grafana"},{name:"linux",label:"Linux"},{name:"microchip",label:"CPU"},{name:"memory",label:"Memory"},{name:"hdd",label:"Disk"},{name:"network-wired",label:"Network"},{name:"wifi",label:"Wi‑Fi"},{name:"server",label:"Server"},{name:"database",label:"Database"},{name:"terminal",label:"Terminal"},{name:"clock",label:"Clock"},{name:"thermometer-half",label:"Temperature"},{name:"chart-line",label:"Chart Line"},{name:"chart-bar",label:"Chart Bar"},{name:"chart-pie",label:"Chart Pie"},{name:"tachometer-alt",label:"Gauge"},{name:"users",label:"Users"},{name:"user",label:"User"},{name:"bolt",label:"Bolt"},{name:"fire",label:"Fire"},{name:"heartbeat",label:"Heartbeat"},{name:"desktop",label:"Desktop"},{name:"laptop",label:"Laptop"},{name:"cloud",label:"Cloud"},{name:"globe",label:"Globe"},{name:"plug",label:"Plug"},{name:"cog",label:"Settings"},{name:"cogs",label:"Cogs"},{name:"sync",label:"Sync"},{name:"download",label:"Download"},{name:"upload",label:"Upload"},{name:"exchange-alt",label:"Transfer"},{name:"shield-alt",label:"Shield"},{name:"lock",label:"Lock"},{name:"key",label:"Key"},{name:"exclamation-triangle",label:"Warning"},{name:"check-circle",label:"OK"},{name:"times-circle",label:"Error"},{name:"info-circle",label:"Info"},{name:"power-off",label:"Power"},{name:"play",label:"Play"},{name:"pause",label:"Pause"},{name:"stop",label:"Stop"},{name:"envelope",label:"Mail"},{name:"folder",label:"Folder"},{name:"file",label:"File"},{name:"code",label:"Code"},{name:"layer-group",label:"Layers"},{name:"boxes",label:"Boxes"},{name:"cube",label:"Cube"},{name:"sitemap",label:"Sitemap"},{name:"project-diagram",label:"Diagram"},{name:"stream",label:"Stream"},{name:"broadcast-tower",label:"Broadcast"},{name:"satellite-dish",label:"Satellite"},{name:"ethernet",label:"Ethernet"},{name:"sd-card",label:"SD Card"},{name:"battery-full",label:"Battery"},{name:"fan",label:"Fan"},{name:"thermometer",label:"Thermometer"},{name:"stopwatch",label:"Stopwatch"},{name:"hourglass-half",label:"Hourglass"},{name:"history",label:"History"},{name:"list",label:"List"},{name:"tasks",label:"Tasks"},{name:"clipboard-list",label:"Clipboard"},{name:"bug",label:"Bug"},{name:"rocket",label:"Rocket"},{name:"star",label:"Star"},{name:"heart",label:"Heart"},{name:"eye",label:"Eye"},{name:"search",label:"Search"},{name:"filter",label:"Filter"},{name:"sliders-h",label:"Sliders"},{name:"tools",label:"Tools"},{name:"wrench",label:"Wrench"}];let js=class extends Ds.ConfigProvider{constructor(){super(...arguments),this.defaults={plugin:{serverStats:{enabled:!0,displayMode:"bottomBar",paneVisibility:{__nonStructural:!0},defaultInterval:3,debugLogging:!1,location:{x:null,y:null},style:{background:"rgba(20, 20, 20, 0.90)",size:100,layout:"vertical"},defaultMetrics:{cpu:!0,ram:!0,disk:!0,net:!0},defaultMetricOverrides:{},showDefaultIcons:!0,customMetrics:[],metricGroups:[]}}}}};js=b([(0,y.Injectable)()],js);const Ls={"zh-CN":{"Server Stats":"服务器状态",Appearance:"外观","Display Mode":"显示模式","Floating Panel":"浮动面板","Bottom Bar":"底部栏","Layout Direction":"排列方向",Vertical:"纵向",Horizontal:"横向","Background Color":"背景颜色",Opacity:"不透明度","Chart Size":"图表大小","Panel Position":"面板位置","Reset Position":"重置位置","Show Server Stats":"显示服务器状态",CPU:"CPU",RAM:"内存",DISK:"磁盘",NET:"网络","Reset Panel Position":"重置面板位置",Reset:"重置","Vertical or Horizontal layout":"纵向或横向排列","Background color and opacity":"背景颜色与不透明度","Unit: px":"单位:像素","Reset to default position":"重置回默认位置",Layout:"布局","Choose between floating panel or bottom bar":"选择浮动面板或底部栏","Custom Metrics":"单标签","Define custom shell commands to fetch data. The command must output a single value (number or text).":"定义自定义 Shell 命令来获取数据。命令必须输出单个值(数字或文本)。","Add New Metric":"添加单标签","Edit Metric":"编辑单标签",Label:"标签",Type:"类型","Progress Bar":"进度条","Text Value":"文本值",Color:"颜色","Default Color":"默认颜色","Max Value":"最大值",Suffix:"后缀","Command (Shell)":"功能命令(Shell)","Command executed on the server. The output (number or text) will be displayed.":"在服务器上执行的命令。输出(数字或文本)将显示在界面中。",Add:"添加",Save:"保存",Cancel:"取消","No custom metrics defined.":"尚未创建单标签。","Preset Library":"预设库","Fetch from GitHub":"从 GitHub 拉取","Load Presets":"加载预设","Loading...":"加载中...","Add to my metrics":"添加到我的指标","Preset added":"预设已添加","Failed to load presets":"加载预设失败","No presets found":"未找到预设","Import commonly used metrics from the community":"从社区导入常用指标配置","I want to submit my own preset":"我想提交我的预设","Default Metrics":"默认指标","Select which default indicators to display":"选择要显示的默认指标","CPU Usage":"CPU 使用率","RAM Usage":"内存使用率","Disk Usage":"磁盘使用率","Network Speed":"网络网速","Show icons for default metrics":"显示默认指标图标","Choose preset icon":"选择预设图标","Preset Icons":"预设图标","Default Update Interval":"默认更新频率","Base interval (in seconds) for collecting metrics":"收集指标的基础频率(秒)","Interval (sec)":"频率(秒)","Execution Interval":"执行频率",Default:"默认","Conditional Color Rules":"条件颜色规则","Color rules are checked from top to bottom. The first matching rule determines the color.":"颜色规则自上而下匹配。首个满足条件的规则决定颜色。","No conditional rules defined. Default color will always be used.":"未定义条件规则。将始终使用默认颜色。","Add Rule":"添加规则",If:"若","Greater or equal":"大于等于","Greater than":"大于","Less or equal":"小于等于","Less than":"小于",Equal:"等于","Not equal":"不等于",Contains:"包含","Does not contain":"不包含","Starts with":"开头为",Regex:"正则表达式","Value, e.g. 80, OK, DOWN":"匹配值,如 80, OK, DOWN","Rule color":"规则颜色","Remove rule":"删除规则",seconds:"秒",rule:"条规则",rules:"条规则","Timeout (sec)":"超时时间(秒)",Timeout:"超时","Icon (FontAwesome)":"图标 (FontAwesome)","Icon (Preset, FontAwesome or URL)":"图标 (预设/FontAwesome/URL)","Icon (FontAwesome or SVG)":"图标 (FontAwesome 或 SVG)","Icon (FontAwesome or custom SVG)":"图标 (FontAwesome 或自定义 SVG)","Use FontAwesome (ex: database, server, memory) or upload a custom .svg file":"使用 FontAwesome(如 database, server, memory)或上传自定义 .svg 文件","Upload Custom SVG":"上传自定义 SVG","Upload SVG":"上传 SVG",SVG:"SVG","Clear icon":"清除图标","Remove Icon":"删除图标",Icon:"图标","Upload custom SVG":"上传自定义 SVG","e.g. GPU (optional if icon set)":"例如 GPU(设置图标后可选)","e.g. PostgreSQL (optional if icon set)":"例如 PostgreSQL(设置图标后可选)","e.g. GB (or % if empty)":"例如 GB(留空则默认为 %)","e.g. °C, ms":"例如 °C, ms","fa-database, server, redis...":"fa-database, server, redis...","Debug Logging":"调试日志","Write detailed execution logs to file for troubleshooting":"将详细执行日志写入临时文件以便排查问题"},"pt-BR":{"Server Stats":"Status do Servidor",Appearance:"Aparência","Display Mode":"Modo de Exibição","Floating Panel":"Painel Flutuante","Bottom Bar":"Barra Inferior","Layout Direction":"Direção do Layout",Vertical:"Vertical",Horizontal:"Horizontal","Background Color":"Cor de Fundo",Opacity:"Opacidade","Chart Size":"Tamanho dos Gráficos","Panel Position":"Posição do Painel","Reset Position":"Redefinir Posição","Show Server Stats":"Exibir Status do Servidor",CPU:"CPU",RAM:"RAM",DISK:"DISCO",NET:"REDE","Reset Panel Position":"Redefinir Posição do Painel",Reset:"Redefinir","Vertical or Horizontal layout":"Disposição vertical ou horizontal","Background color and opacity":"Cor de fundo e opacidade","Unit: px":"Unidade: px","Reset to default position":"Redefinir para a posição padrão",Layout:"Layout","Choose between floating panel or bottom bar":"Escolha entre painel flutuante ou barra inferior","Custom Metrics":"Métricas Personalizadas","Define custom shell commands to fetch data. The command must output a single value (number or text).":"Defina comandos shell personalizados para coletar dados. O comando deve retornar um único valor (número ou texto).","Add New Metric":"Adicionar Nova Métrica","Edit Metric":"Editar Métrica",Label:"Rótulo",Type:"Tipo","Progress Bar":"Barra de Progresso","Text Value":"Valor de Texto",Color:"Cor","Default Color":"Cor Padrão","Max Value":"Valor Máximo",Suffix:"Sufixo","Command (Shell)":"Comando (Shell)","Command executed on the server. The output (number or text) will be displayed.":"Comando executado no servidor. O resultado (número ou texto) será exibido na interface.",Add:"Adicionar",Save:"Salvar",Cancel:"Cancelar","No custom metrics defined.":"Nenhuma métrica personalizada definida.","Preset Library":"Biblioteca de Predefinições","Fetch from GitHub":"Buscar do GitHub","Load Presets":"Carregar Predefinições","Loading...":"Carregando...","Add to my metrics":"Adicionar às minhas métricas","Preset added":"Predefinição adicionada","Failed to load presets":"Falha ao carregar predefinições","No presets found":"Nenhuma predefinição encontrada","Import commonly used metrics from the community":"Importe métricas de uso comum da comunidade","I want to submit my own preset":"Quero enviar minha própria predefinição","Default Metrics":"Métricas Padrão","Select which default indicators to display":"Selecione quais indicadores padrão exibir","CPU Usage":"Uso de CPU","RAM Usage":"Uso de RAM","Disk Usage":"Uso de Disco","Network Speed":"Velocidade de Rede","Show icons for default metrics":"Mostrar ícones nas métricas padrão","Choose preset icon":"Escolher ícone predefinido","Preset Icons":"Ícones Predefinidos","Default Update Interval":"Intervalo de Atualização Padrão","Base interval (in seconds) for collecting metrics":"Intervalo base (em segundos) para coleta de métricas","Interval (sec)":"Intervalo (seg)","Execution Interval":"Intervalo de Execução",Default:"Padrão","Conditional Color Rules":"Regras de Cores Condicionais","Color rules are checked from top to bottom. The first matching rule determines the color.":"As regras são verificadas de cima para baixo. A primeira correspondência define a cor.","No conditional rules defined. Default color will always be used.":"Nenhuma regra condicional definida. A cor padrão será sempre utilizada.","Add Rule":"Adicionar Regra",If:"Se","Greater or equal":"Maior ou igual","Greater than":"Maior que","Less or equal":"Menor ou igual","Less than":"Menor que",Equal:"Igual a","Not equal":"Diferente de",Contains:"Contém","Does not contain":"Não contém","Starts with":"Começa com",Regex:"Expressão regular (Regex)","Value, e.g. 80, OK, DOWN":"Valor, ex: 80, OK, DOWN","Rule color":"Cor da regra","Remove rule":"Remover regra",seconds:"segundos",rule:"regra",rules:"regras","Timeout (sec)":"Timeout (seg)",Timeout:"Timeout","Icon (FontAwesome)":"Ícone (FontAwesome)","Icon (Preset, FontAwesome or URL)":"Ícone (Preset, FontAwesome ou URL)","Icon (FontAwesome or SVG)":"Ícone (FontAwesome ou SVG)","Icon (FontAwesome or custom SVG)":"Ícone (FontAwesome ou SVG customizado)","Use FontAwesome (ex: database, server, memory) or upload a custom .svg file":"Use FontAwesome (ex: database, server, memory) ou carregue um arquivo .svg customizado","Upload Custom SVG":"Carregar SVG Customizado","Upload SVG":"Carregar SVG",SVG:"SVG","Clear icon":"Remover ícone","Remove Icon":"Remover Ícone",Icon:"Ícone","Upload custom SVG":"Carregar SVG personalizado","e.g. GPU (optional if icon set)":"ex: GPU (opcional se houver ícone)","e.g. PostgreSQL (optional if icon set)":"ex: PostgreSQL (opcional se houver ícone)","e.g. GB (or % if empty)":"ex: GB (ou % se vazio)","e.g. °C, ms":"ex: °C, ms","fa-database, server, redis...":"fa-database, server, redis...","Debug Logging":"Logs de Depuração","Write detailed execution logs to file for troubleshooting":"Gravar logs detalhados de execução em arquivo para diagnóstico"}},Gs=[["Author's lab only","作者实验室自用","Somente para o laboratório do autor"],["Received total","累计接收","Total recebido"],["Sent total","累计发送","Total enviado"],["Combined total","累计收发","Total combinado"],["Since interface creation or counter reset","自网卡建立或计数器重置起","Desde a criação da interface ou reinício do contador"],["Download and upload are current rates. Hover shows separate received and sent totals since interface creation or counter reset, not since SSH login. Default-route interfaces are preferred; without a route, eligible non-loopback interfaces are used.","下载、上传是当前速率;悬停分别显示累计接收、累计发送量。累计从网卡建立或计数器重置起计算,与 SSH 登录时间无关。优先统计默认路由网卡;没有默认路由时使用可用的非回环网卡。","Download e upload mostram as taxas atuais. Os detalhes mostram os totais recebidos e enviados desde a criação da interface ou reinício do contador, não desde o login SSH. Preferem-se interfaces de rota padrão; sem rota, usam-se interfaces elegíveis não loopback."],["Import from GitHub","从 GitHub 导入","Importar do GitHub"],["GitHub source","GitHub 来源","Fonte do GitHub"],["Only GitHub JSON file URLs are supported.","请使用 GitHub 上 JSON 文件的链接。","Use um link de arquivo JSON no GitHub."],["GitHub returned an HTTP error.","GitHub 下载失败,请检查仓库文件是否存在后重试。","Falha no GitHub. Verifique se o arquivo existe e tente novamente."],["GitHub preset download timed out.","下载超时,请检查网络后重试。现有预设仍然保留。","Tempo esgotado. Verifique a rede e tente novamente. As predefinições existentes foram mantidas."],["GitHub preset file is too large.","预设文件超过 2 MiB,无法导入。","O arquivo de predefinições excede 2 MiB."],["GitHub preset file is not valid JSON.","GitHub 文件不是有效的 JSON,现有预设仍然保留。","O arquivo do GitHub não é JSON válido. As predefinições existentes foram mantidas."],["GitHub preset file has an unsupported format.","GitHub 文件格式不受支持,请使用标签预设库 JSON。","Formato não suportado. Use um JSON de biblioteca de predefinições."],["Unable to download presets from GitHub.","无法连接 GitHub,请检查网络后重试。现有预设仍然保留。","Não foi possível acessar o GitHub. Verifique a rede e tente novamente."],["GitHub preset download was canceled.","GitHub 下载已取消,现有预设仍然保留。","Download cancelado. As predefinições existentes foram mantidas."],["Move items up or down to set their order in the bottom bar and floating panel.","使用上移、下移调整显示顺序,底部状态栏和浮动面板同步生效。","Mova para cima ou para baixo para ajustar a ordem na barra inferior e no painel flutuante."],["Equals (==)","等于 (==)","Igual (==)"],["Not Equals (!=)","不等于 (!=)","Diferente (!=)"],["Greater than (>)","大于 (>)","Maior que (>)"],["Greater or Equal (>=)","大于等于 (>=)","Maior ou igual (>=)"],["Less than (<)","小于 (<)","Menor que (<)"],["Less or Equal (<=)","小于等于 (<=)","Menor ou igual (<=)"],["Contains","包含","Contém"],["Not Contains","不包含","Não contém"],["Starts With","开头为","Começa com"],["Regex Match","正则匹配","Correspondência de expressão regular"],["Threshold / Value","阈值 / 匹配值","Limite / Valor"],["Metric group","标签组","Grupo de Métricas"],["Enabled","已启用","Ativado"],["Disabled","已禁用","Desativado"],["Enable metric","启用标签","Ativar Métrica"],["Disable metric","禁用标签","Desativar Métrica"],["Show this label when its check fails","前置校验失败时显示此标签","Exibir esta métrica quando a verificação falhar"],["Enabled by default. Turning this off hides the label in every display mode and also removes it from the carousel.","默认开启。关闭后,此标签在所有显示模式中隐藏,并且不会参与轮播。","Ativado por padrão. Desativar oculta a métrica em todos os modos e a remove do carrossel."],["When the failed label remains visible, this option controls whether it participates in the carousel. Static and hover views retain it.","标签在校验失败时仍显示的前提下,此选项控制是否参与轮播;静态显示和悬停详情仍保留该标签。","Quando a métrica com falha permanece visível, esta opção controla sua participação no carrossel."],["Edit built-in commands and appearance, or restore an item to its defaults.","可以编辑内置标签的命令和外观,也可以单独恢复默认设置。","Edite comandos e aparência das métricas integradas ou restaure os padrões de um item."],["Edit Built-in Metric","编辑内置标签","Editar Métrica Integrada"],["Customized","已自定义","Personalizado"],["Restore defaults","恢复默认","Restaurar Padrões"],["Memory","内存","Memória"],["Disk","磁盘","Disco"],["Delete this group and all of its metrics?","确定删除此标签组及其中的全部标签吗?","Excluir este grupo e todas as suas métricas?"],["Delete this child metric?","确定删除此子标签吗?","Excluir esta métrica filha?"],["Delete Group","删除标签组","Excluir Grupo"],["Delete Metric","删除单标签","Excluir Métrica"],["Are you sure you want to delete this metric?","确定删除此标签吗?","Deseja excluir esta métrica?"],["Upload","上传","Envio"],["Download","下载","Recebimento"],["Import JSON","导入 JSON","Importar JSON"],["Export my labels","导出我的标签","Exportar Minhas Métricas"],["Bundled presets work offline. Importing a library only previews it; commands run after you add a label or group.","内置预设库可离线使用。导入文件只加载预览,添加为单标签或标签组后才会执行命令。","Predefinições incluídas funcionam offline. Importar apenas visualiza; os comandos executam após adicionar um item."],["Search presets","搜索预设","Buscar Predefinições"],["No presets match this search.","没有匹配的预设。","Nenhuma predefinição corresponde à busca."],["Suggested connections","建议绑定连接","Conexões Sugeridas"],["Source","来源","Fonte"],["Library loaded. Review an item and click Add to enable it.","预设库已加载。检查内容后点击“添加”即可启用。","Biblioteca carregada. Revise e clique em Adicionar para ativar."],["Unable to read this preset library. Choose a valid JSON library.","无法读取预设库,请选择有效的 JSON 预设文件。","Não foi possível ler a biblioteca. Escolha um arquivo JSON válido."],["Label library exported.","标签预设库已导出。","Biblioteca exportada."],["Added with a restricted scope. Choose the missing connections before use.","已添加并保留指定范围。请在使用前选择缺失的连接。","Adicionado com escopo restrito. Selecione as conexões ausentes antes de usar."],["Preset added.","预设已添加。","Predefinição adicionada."],["Single Labels","单标签","Rótulos Individuais"],["Add Single Label","添加单标签","Adicionar Rótulo Individual"],["Search icons by name or purpose","搜索图标名称或用途","Buscar ícone por nome ou finalidade"],["Icon category","图标分类","Categoria do Ícone"],["All icon categories","全部分类","Todas as Categorias"],["No icons match this search.","没有匹配的图标。","Nenhum ícone corresponde à busca."],["Other","其他","Outros"],["Storage","存储","Armazenamento"],["Compute","计算","Computação"],["Network","网络","Rede"],["System","系统","Sistema"],["Services","服务","Serviços"],["No detail received","未收到扩展信息","Nenhum detalhe recebido"],["Detail command timed out","扩展命令超时","Tempo limite do comando de detalhes"],["Unable to fetch details","扩展信息获取失败","Não foi possível obter detalhes"],["Detail command failed","扩展命令失败","Falha no comando de detalhes"],["Detail check timed out","扩展校验超时","Tempo limite da verificação de detalhes"],["Detail unavailable","扩展信息不可用","Detalhes indisponíveis"],["Detail returned no data","扩展信息未返回数据","Detalhes sem dados retornados"],["Incomplete detail response","扩展信息接收不完整","Resposta de detalhes incompleta"],["Remote detail command failed","远程扩展命令失败","Falha no comando remoto de detalhes"],["Display Scope","显示范围","Escopo de Exibição"],["All terminal panes (default)","所有终端窗格(默认)","Todos os painéis de terminal (padrão)"],["Selected connections or layouts","指定连接或已保存布局(可多选)","Conexões ou layouts selecionados"],["The entire group shares this scope, including its main metric and children.","此范围属于整个标签组,主标签和所有子标签共同使用。","Todo o grupo usa este escopo, incluindo a métrica principal e as filhas."],["Show in every supported terminal pane, including new connections and split panes.","在所有支持的终端窗格中显示,包括新连接和分屏窗格。","Exibe em todos os painéis compatíveis, incluindo novas conexões e divisões."],["A connection matches each pane using that saved connection. A layout matches every pane opened within that saved layout. Multiple selections are combined.","选择连接:匹配每个使用该连接配置的窗格。选择布局:匹配该已保存布局中的全部窗格。多选时合并显示范围。","Uma conexão corresponde a cada painel que usa essa configuração. Um layout corresponde a todos os painéis desse layout salvo. As seleções são combinadas."],["For a mixed P1 / P2 / P1 layout, select P1 for metrics that belong only to its two P1 panes. Select the layout only for metrics shared by all panes.","例如 P1 / P2 / P1 混合布局:P1 专用指标选择 P1,只在两个 P1 窗格中显示;所有窗格共用的指标才选择整个布局。","Em um layout P1 / P2 / P1, selecione P1 para métricas exclusivas dos dois painéis P1. Selecione o layout para métricas comuns a todos."],["Find a saved connection or layout","查找已保存的连接或布局","Buscar conexão ou layout salvo"],["Search by name","按名称搜索","Buscar por nome"],["Saved connections and layouts","已保存的连接与布局","Conexões e layouts salvos"],["Saved Layout","已保存的布局","Layout Salvo"],["Saved Connection","连接配置","Conexão Salva"],["No matching saved connections or layouts.","没有匹配的已保存连接或布局。","Nenhuma conexão ou layout salvo corresponde à busca."],["Deleted or unavailable","已删除或不可用","Excluído ou indisponível"],["Remove scope selection","移除此范围选择","Remover seleção de escopo"],["No targets selected: this item will not appear in any pane. Choose targets or switch explicitly to all panes.","尚未选择目标:此项不会在任何窗格显示。请选择目标,或明确切换为“所有终端窗格”。","Nenhum destino selecionado: este item não aparecerá em nenhum painel. Selecione destinos ou altere para todos os painéis."],["Missing targets remain selected but cannot match a pane. Remove or replace them; deletion never changes this item to all panes.","失效目标会保留在选择中,但不再匹配窗格。可以移除或重新选择;删除目标不会自动变成全局显示。","Destinos ausentes permanecem selecionados, mas não correspondem a painéis. Remova ou substitua; a exclusão nunca altera o escopo para todos os painéis."],["Metric Groups","多标签组","Grupos de Métricas"],["Metric Group","标签组","Grupo de Métricas"],["Add Group","添加标签组","Adicionar Grupo"],["Edit Group","编辑标签组","Editar Grupo"],["Save Group","保存整个标签组","Salvar Grupo Inteiro"],["Group Name","组名称","Nome do Grupo"],["Group Display Mode","组显示模式","Modo de Exibição do Grupo"],["Group a main metric and child metrics. Each metric keeps its own commands and refresh interval.","将主标签和多个子标签整理成一组,每个标签独立设置命令和刷新频率。","Agrupe uma métrica principal e métricas filhas, cada uma com seus comandos e intervalo de atualização."],["No metric groups defined.","尚未创建标签组。","Nenhum grupo definido."],["Main Metric","主标签","Métrica Principal"],["Child Metric","子标签","Métrica Filha"],["Child Metrics","个子标签","Métricas Filhas"],["Unnamed Metric","未命名标签","Métrica sem Nome"],["Add Child","添加子标签","Adicionar Métrica Filha"],["Remove Child","删除子标签","Remover Métrica Filha"],["Edits to all members are saved together with the group.","切换主标签或子标签会保留当前编辑,点击“保存整个标签组”后一起生效。","As alterações de todos os membros são salvas juntas com o grupo."],["Overview","概览","Visão Geral"],["Carousel","轮播显示","Carrossel"],["Static","静态显示","Estático"],["Carousel Interval (sec)","轮播间隔(秒)","Intervalo do Carrossel (seg)"],["Controls display switching, independently of command refresh intervals.","只控制显示切换,与各命令的数据刷新频率独立。","Controla a troca de exibição, independentemente dos intervalos de coleta."],["Empty Carousel Text","轮播没有可显示项时的提示","Texto para Carrossel Vazio"],["No available metrics","无可显示标签","Nenhuma métrica disponível"],["No available items","无可显示标签","Nenhum item disponível"],["Show the main metric. Hover to show the main metric and all children with details.","平时显示主标签;悬停后竖排展示主标签、全部子标签及各自的扩展信息。","Mostra a métrica principal. Ao passar o mouse, mostra todos os membros e seus detalhes."],["Rotate child metrics. Hover to pause and show the main metric and all children with details.","轮播子标签;悬停时暂停轮播,并竖排展示主标签、全部子标签及扩展信息。","Alterna as métricas filhas. Ao passar o mouse, pausa e mostra todos os membros e detalhes."],["Show the main metric and all children. Horizontal hover expands one member; vertical hover expands all members.","同时显示主标签和全部子标签;横排悬停只扩展对应标签,竖排悬停扩展整组。","Mostra todos os membros. Na horizontal, expande um membro; na vertical, expande todos."],["Object Check Command (optional)","对象校验命令(可选)","Comando de Verificação (opcional)"],["Leave empty to run the metric directly. A failed check prevents both metric and detail commands from running.","留空则直接执行功能命令。校验不通过时,不执行功能命令和扩展信息命令。","Deixe vazio para executar diretamente. Uma falha na verificação impede os comandos da métrica e dos detalhes."],["Compare","比较对象","Comparar"],["Exit Code","退出码","Código de Saída"],["Output Text","输出文本","Texto de Saída"],["Expected Value","期望值","Valor Esperado"],["Check Failure Text","校验失败显示内容","Texto de Falha na Verificação"],["Unavailable","不可用","Indisponível"],["Output text is compared exactly after trimming surrounding whitespace. Exit code 0 usually means success.","输出文本去除首尾空白后精确比较,区分大小写;退出码 0 通常表示成功。","O texto é comparado exatamente após remover espaços nas extremidades. O código 0 geralmente indica sucesso."],["Hover Detail Command (optional)","悬停扩展信息命令(可选)","Comando de Detalhes ao Passar o Mouse (opcional)"],["Append this command output on hover. Leave empty for no extra information.","鼠标移入时将输出追加到功能命令结果后,移出收起;留空则不显示扩展信息。","Acrescenta a saída ao passar o mouse e oculta ao sair. Deixe vazio para não exibir detalhes."],["Keep in carousel when its check fails","前置校验失败时仍参与轮播","Manter no carrossel quando a verificação falhar"],["Enabled by default. Disable to skip this child immediately in the carousel. Static views and hover details still show its failure text.","默认开启并显示失败提示。关闭后,轮播立即跳过此子标签;静态显示和悬停详情仍保留失败提示。","Ativado por padrão. Desative para pular esta filha imediatamente no carrossel. Exibições estáticas e detalhes ainda mostram a falha."],["Every member needs a label or icon and a metric command. Intervals and timeouts must be positive; exit codes must be whole numbers from 0 to 255.","每个标签都需要名称或图标,以及功能命令。频率、超时须不小于 1;退出码须为 0~255 的整数。","Cada membro precisa de nome ou ícone e comando. Intervalos e tempos limite devem ser positivos; códigos de saída devem ser inteiros de 0 a 255."],["Move up","上移","Mover para Cima"],["Move down","下移","Mover para Baixo"],["Already added","已添加","Já adicionado"],["Bottom Status Bar","底部状态栏","Barra de Estado Inferior"],["Show bottom status bar","显示底部状态栏","Mostrar barra de estado inferior"],["Hide this pane status bar","隐藏此分屏状态栏","Ocultar barra deste painel"],["Show this pane status bar","显示此分屏状态栏","Mostrar barra deste painel"],["Move items up or down to set their order in the bottom status bar.","使用上移、下移调整底部状态栏中的显示顺序。","Mova os itens para cima ou para baixo para definir sua ordem na barra inferior."],["Expand a layout to select its individual panes, even if their original saved connection was deleted.","展开布局可直接选择其中的各个分屏,即使原始连接配置已删除也可选择。","Expanda um layout para selecionar seus painéis, mesmo se a conexão original tiver sido excluída."],["Checking a connection selects every entry with the same connection ID. Unchecking removes only that entry. A layout checkbox selects or clears its own panes.","勾选连接时,同一连接 ID 的所有对应项会一起选中;取消时只取消当前项。布局复选框用于全选或取消该布局内的分屏。","Marcar uma conexão seleciona todas as entradas com o mesmo ID. Desmarcar afeta apenas essa entrada. A caixa do layout seleciona ou limpa seus painéis."],["Layout Pane","布局分屏","Painel do Layout"],["Expand layout","展开布局","Expandir layout"],["Collapse layout","收起布局","Recolher layout"],["This preset is already added. Edit or enable the existing item.","此预设已添加,请编辑或启用已有项目。","Esta predefinição já foi adicionada. Edite ou ative o item existente."],["Edit","编辑","Editar"],["Remove","删除","Remover"]];Ls.en=Ls.en||{};for(const[t,e,n]of Gs)Ls.en[t]=t,Ls["zh-CN"][t]=e,Ls["pt-BR"][t]=n;Ls.pt=Ls["pt-BR"];for(const[t,e]of[["系统盘","System disk"],["数据盘","Data disk"],["磁盘容量","Disk capacity"],["磁盘读取","Disk read"],["磁盘写入","Disk write"],["磁盘读写","Disk I/O"],["GPU 显卡","GPU"],["GPU 显存","GPU memory"],["CPU 处理器","CPU processor"],["CPU 负载","CPU load"],["CPU负载","CPU load"],["线程数","Threads"],["I/O 等待","I/O wait"],["内存","Memory"],["交换空间","Swap"],["网络接口","Network interface"],["网络发送","Network upload"],["网络接收","Network download"],["网络延迟","Network latency"],["温度","Temperature"],["风扇转速","Fan speed"],["功耗","Power usage"],["进程","Processes"],["运行时间","Uptime"],["服务状态","Service status"],["健康检查","Health check"],["数据库","Database"],["容器","Containers"],["无GPU","No GPU"],["未挂载","Not mounted"]])Ls.en[t]=e,Ls.en[e]=e,Ls["zh-CN"][t]=t,Ls["zh-CN"][e]=t;function Bs(t){const e=[...t.customMetrics||[]];for(const n of t.metricGroups||[])!1!==n.enabled&&(n.main&&e.push(n.main),e.push(...n.children||[]));const n=new Set;return e.filter(t=>!(!t||!1===t.enabled||"string"!=typeof t.id||n.has(t.id)||(n.add(t.id),0)))}function zs(t){return Number.isFinite(t.timeout)&&t.timeout>0?Math.max(1,t.timeout):30}function Us(t){return"'"+t.replace(/'/g,"'\"'\"'")+"'"}function Ws(t,e,n="value"){var i,a,s;if(!/^[a-zA-Z0-9_]+$/.test(e))throw new Error("Invalid metric protocol token");const o=zs(t),r=t=>`if command -v timeout >/dev/null 2>&1; then\n timeout --kill-after=2s ${o}s /bin/sh -c ${Us(t)}\nelif command -v gtimeout >/dev/null 2>&1; then\n gtimeout --kill-after=2s ${o}s /bin/sh -c ${Us(t)}\nelse\n # Kill the whole process group, including children of a timed-out script.\n setsid /bin/sh -c ${Us(t)} &\n _child=$!\n (sleep ${o}; kill -TERM "-$_child" 2>/dev/null; sleep 2; kill -KILL "-$_child" 2>/dev/null) >/dev/null 2>&1 &\n _watchdog=$!\n wait "$_child"\n _result=$?\n kill -KILL "-$_child" 2>/dev/null\n kill "$_watchdog" 2>/dev/null\n wait "$_watchdog" 2>/dev/null\n if [ "$_result" -eq 143 ] || [ "$_result" -eq 137 ]; then exit 124; fi\n exit "$_result"\nfi`;return`(\nif ! command -v timeout >/dev/null 2>&1 && ! command -v gtimeout >/dev/null 2>&1 && ! command -v setsid >/dev/null 2>&1; then\n printf 'TABBY-METRIC-RESULT:${e}:error:Err: Install timeout or setsid\\n'\n exit 0\nfi\n${(null===(i=t.checkCommand)||void 0===i?void 0:i.trim())?`\n_check_out=$(\n${r(t.checkCommand)}\n)\n_check_code=$?\nif [ "$_check_code" -eq 124 ] || [ "$_check_code" -eq 137 ]; then\n printf 'TABBY-METRIC-RESULT:${e}:error:Err: Check timeout\\n'\n exit 0\nfi\n${"output"===t.checkMode?`_check_value=$(printf '%s' "$_check_out" | awk 'BEGIN { value="" } { if (NR>1) value=value "\\n"; value=value $0 } END { sub(/^[[:space:]]+/, "", value); sub(/[[:space:]]+$/, "", value); printf "%s", value }')\nif [ "$_check_code" -ne 0 ] || [ "$_check_value" != ${Us((null!==(a=t.checkExpected)&&void 0!==a?a:"").trim())} ]; then`:`if [ "$_check_code" != ${Us((null!==(s=t.checkExpected)&&void 0!==s?s:"0").trim())} ]; then`}\n printf 'TABBY-METRIC-RESULT:${e}:unavailable:\\n'\n exit 0\nfi\n`:""}\n_out=$(\n${r("detail"===n?t.detailCommand||"":t.command)}\n)\n_code=$?\nif [ "$_code" -eq 124 ] || [ "$_code" -eq 137 ]; then\n _status=error\n _val='Err: Timeout'\nelif [ "$_code" -eq 0 ]; then\n _status=ok\n ${"detail"===n?"_val=$(printf '%s' \"$_out\" | tr '\\r\\n' ' ' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')":"_val=$(printf '%s\\n' \"$_out\" | awk 'NF{p=$0} END{print p}' | tr '\\r\\n' ' ' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')\n [ -z \"$_val\" ] && _val=0"}\nelse\n _status=error\n _val="Err: Exit $_code"\nfi\n# Stay below PIPE_BUF, so parallel results cannot interleave.\n_val=$(printf '%s' "$_val" | cut -c 1-2000)\nprintf 'TABBY-METRIC-RESULT:${e}:%s:%s\\n' "$_status" "$_val"\n) &`}function qs(t){const e=[],n=/^TABBY-METRIC-RESULT:([a-zA-Z0-9_]+):(ok|unavailable|error):([^\r\n]*)\r?\n/gm;let i;for(;i=n.exec(t);)e.push({token:i[1],status:i[2],value:i[3].replace(/\x1B\[[0-9;]*[a-zA-Z]/g,"").trim()});return e}const Zs="__tabbyGroupServerStatsPaneId";function Ks(t){return`${t.layoutName} / ${t.path.map(t=>t+1).join(".")} / ${t.name}`}function Ys(t,e,n){return`layout-pane:${encodeURIComponent(t)}:${e.join(".")}:${encodeURIComponent(n)}`}function Js(t){const e=[],n=new Set,i=(t,a)=>{t&&"object"==typeof t&&!n.has(t)&&(n.add(t),"app:split-tab"===t.type&&Array.isArray(t.children)?t.children.forEach((t,e)=>i(t,[...a,e])):a.length&&e.push({token:t,path:a}))};return i(t,[]),e}function Qs(t,e=!0){var n;const i=[],a=new Set;for(const s of Array.isArray(t)?t:[])if("split-layout"===(null==s?void 0:s.type)&&"string"==typeof s.id&&s.id)for(const o of Js(null===(n=s.options)||void 0===n?void 0:n.recoveryToken)){const n=o.token.profile;if("ssh"!==(null==n?void 0:n.type)||"string"!=typeof n.id||!n.id)continue;const r=Ys(s.id,o.path,n.id);a.has(r)||(a.add(r),i.push({id:r,layoutId:s.id,layoutName:"string"==typeof s.name&&s.name?s.name:s.id,profileId:n.id,name:"string"==typeof n.name&&n.name?n.name:n.id,path:o.path,type:"layout-pane",connectionIds:e?to(n,t):[n.id]}))}return i}function Xs(t){if("ssh"!==(null==t?void 0:t.type))return null;const e=t.options;if(!e||"string"!=typeof e.host||!e.host.trim()||"string"!=typeof e.user||!e.user.trim())return null;const n=(t,e)=>{if(null==t||""===t)return null!=e?e:null;if("number"!=typeof t&&("string"!=typeof t||!/^\d+$/.test(t)))return null;const n=Number(t);return Number.isInteger(n)&&n>0&&n<=65535?n:null},i=n(e.port,22);if(null===i)return null;const a=t=>null==t?"":"string"==typeof t?t.trim():null,s=a(e.jumpHost),o=a(e.proxyCommand),r=a(e.socksProxyHost),l=a(e.httpProxyHost);if([s,o,r,l].includes(null))return null;const c=r?n(e.socksProxyPort):0,d=l?n(e.httpProxyPort):0;return null===c||null===d?null:JSON.stringify([e.host.trim().toLowerCase(),i,e.user,s,o,r.toLowerCase(),c,l.toLowerCase(),d])}function to(t,e,n=t=>t){const i="string"==typeof(null==t?void 0:t.id)&&t.id?t.id:void 0,a=i?[i]:[],s=e||[];if(!i||s.some(t=>(null==t?void 0:t.id)===i))return a;const o=Xs(t);if(!o)return a;const r=s.filter(t=>{if("ssh"!==(null==t?void 0:t.type)||"string"!=typeof t.id||!t.id)return!1;try{return Xs(n(t))===o}catch(t){return!1}});return 1===r.length?[...a,r[0].id]:a}function eo(t,e){if(!e)return null;const n=new Set,i=t=>{if(!t||n.has(t))return null;if(n.add(t),t.session===e)return t;const a="function"==typeof t.getAllTabs?t.getAllTabs():[];for(const t of Array.isArray(a)?a:[]){const e=i(t);if(e)return e}return null};for(const e of t||[]){const t=i(e);if(t)return t}return null}const no=require("crypto"),io="__tabbyGroupServerStatsLayoutProfileId",ao="__tabbyGroupServerStatsVisibilityId";let so=class{constructor(t,e,n){this.config=t,this.app=e,this.profiles=n,this.subscriptions=[],this.tokenPatches=new Map,this.paneTargets=new WeakMap,this.legacyPanesObserved=new WeakSet,this.visibilityInstances=new WeakMap,this.visibilityTokenPatches=new Map,this.destroyed=!1,this.installProfileHook();for(const t of[this.app.tabOpened$,this.app.tabsChanged$,this.config.ready$])(null==t?void 0:t.subscribe)&&this.subscriptions.push(t.subscribe(()=>this.observeTabs()));this.observeTabs()}installProfileHook(){const t=this.profiles;if("function"!=typeof(null==t?void 0:t.newTabParametersForProfile))return;const e=t.newTabParametersForProfile,n=this,i=async function(t,...i){var a;const s=await e.call(this,t,...i);if(n.destroyed||"split-layout"!==(null==t?void 0:t.type)||"string"!=typeof t.id||!t.id)return s;const o=null===(a=null==s?void 0:s.inputs)||void 0===a?void 0:a._recoveredState;if(!o||"app:split-tab"!==o.type)return s;const r=JSON.parse(JSON.stringify(o));r[io]=t.id;for(const e of Js(r)){const n=e.token.profile;"ssh"===(null==n?void 0:n.type)&&"string"==typeof n.id&&n.id&&(n[Zs]=Ys(t.id,e.path,n.id))}return Object.assign(Object.assign({},s),{inputs:Object.assign(Object.assign({},s.inputs),{_recoveredState:r})})};this.originalParameters=e,this.wrappedParameters=i,t.newTabParametersForProfile=i}marker(t){const e=null==t?void 0:t._recoveredState;if("app:split-tab"!==(null==e?void 0:e.type))return;const n=e[io];return"string"==typeof n&&n?n:void 0}observeTabs(){if(this.destroyed)return;const t=new Set,e=n=>{if(!n||t.has(n))return;t.add(n),this.preserveRecoveryMarker(n);const i=this.marker(n);i&&this.rememberLegacyPanes(n,i),this.preserveVisibilityMarker(n);const a="function"==typeof n.getAllTabs?n.getAllTabs():[];for(const t of Array.isArray(a)?a:[])e(t)};for(const t of this.app.tabs||[])e(t)}preserveRecoveryMarker(t){var e;if(!this.marker(t)||"function"!=typeof t.getRecoveryToken||this.tokenPatches.has(t))return;const n=t.getRecoveryToken,i=this,a=async function(...t){const e=await n.apply(this,t),a=i.marker(this);return!i.destroyed&&a&&"app:split-tab"===(null==e?void 0:e.type)?i.preservePaneRecoveryMarkers(this,Object.assign(Object.assign({},e),{[io]:a}),a):e},s={original:n,wrapped:a,hadOwnMethod:Object.prototype.hasOwnProperty.call(t,"getRecoveryToken")};this.tokenPatches.set(t,s),t.getRecoveryToken=a,(null===(e=t.destroyed$)||void 0===e?void 0:e.subscribe)&&(s.destroyed=t.destroyed$.subscribe(()=>this.releaseTab(t)))}releaseTab(t){var e;const n=this.tokenPatches.get(t);n&&(t.getRecoveryToken===n.wrapped&&(n.hadOwnMethod?t.getRecoveryToken=n.original:delete t.getRecoveryToken),null===(e=n.destroyed)||void 0===e||e.unsubscribe(),this.tokenPatches.delete(t))}rememberPane(t,e,n){let i=this.paneTargets.get(t);i||(i=new Map,this.paneTargets.set(t,i)),i.set(e,n)}paneMarker(t){return this.privateProfileMarker(t,Zs)}privateProfileMarker(t,e){try{const n=null==t?void 0:t[e];if("string"==typeof n&&n)return n;const i="function"==typeof(null==t?void 0:t.__getValue)?t.__getValue(e):void 0;return"string"==typeof i&&i?i:void 0}catch(t){return}}visibilityInstance(t){const e=this.visibilityInstances.get(t);if(e)return e;const n=this.privateProfileMarker(null==t?void 0:t.profile,ao);return n&&/^pane-instance:[a-f0-9]{32}$/.test(n)?n:void 0}preserveVisibilityMarker(t){var e;if(!t||!this.visibilityInstance(t)&&!this.paneMarker(t.profile)&&!this.paneTargets.has(t)||"function"!=typeof t.getRecoveryToken||this.visibilityTokenPatches.has(t))return;const n=t.getRecoveryToken,i=this,a=async function(...t){var e;const a=await n.apply(this,t),s=i.visibilityInstance(this);if(!i.destroyed&&(null==a?void 0:a.profile)){const n=Object.assign({},a.profile);if(!0===(null===(e=t[0])||void 0===e?void 0:e.includeState)){s&&(n[ao]=s);const t=i.paneMarker(this.profile);t&&(n[Zs]=t)}else delete n[ao],delete n[Zs],delete n.__getValue,n[ao]=`pane-instance:${(0,no.randomBytes)(16).toString("hex")}`;return Object.assign(Object.assign({},a),{profile:n})}return a},s={original:n,wrapped:a,hadOwnMethod:Object.prototype.hasOwnProperty.call(t,"getRecoveryToken")};this.visibilityTokenPatches.set(t,s),t.getRecoveryToken=a,(null===(e=t.destroyed$)||void 0===e?void 0:e.subscribe)&&(s.destroyed=t.destroyed$.subscribe(()=>this.releaseVisibilityTab(t)))}releaseVisibilityTab(t){var e;const n=this.visibilityTokenPatches.get(t);n&&(t.getRecoveryToken===n.wrapped&&(n.hadOwnMethod?t.getRecoveryToken=n.original:delete t.getRecoveryToken),null===(e=n.destroyed)||void 0===e||e.unsubscribe(),this.visibilityTokenPatches.delete(t))}visibilityKey(t){var e;if(this.destroyed||!t||!1===t.open)return;const n=this.contextForSession(t),i=new Set(Qs((null===(e=this.config.store)||void 0===e?void 0:e.profiles)||[],!1).map(t=>t.id)),a=n.profileIds.find(t=>i.has(t));if(a)return a;const s=eo(this.app.tabs||[],t);return this.visibilityInstance(s||t)}isPaneVisible(t){var e,n,i,a;const s=this.visibilityKey(t);return!s||!1!==(null===(a=null===(i=null===(n=null===(e=this.config.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.paneVisibility)||void 0===a?void 0:a[s])}setPaneVisible(t,e){var n,i;if(this.destroyed||!t||!1===t.open)return;let a=this.visibilityKey(t);if(!a){const e=eo(this.app.tabs||[],t);a=`pane-instance:${(0,no.randomBytes)(16).toString("hex")}`,this.visibilityInstances.set(e||t,a),this.preserveVisibilityMarker(e)}this.config.store.plugin||(this.config.store.plugin={}),this.config.store.plugin.serverStats||(this.config.store.plugin.serverStats={});const s=this.config.store.plugin.serverStats,o=s.paneVisibility;s.paneVisibility=Object.assign(Object.assign({},o&&"object"==typeof o&&!Array.isArray(o)?o:{}),{[a]:Boolean(e)}),null===(i=(n=this.config).save)||void 0===i||i.call(n)}rememberLegacyPanes(t,e){if(this.legacyPanesObserved.has(t))return;const n="function"==typeof t.getAllTabs?t.getAllTabs():[],i=Js(t._recoveredState);Array.isArray(n)&&n.length&&n.length===i.length&&n.every((t,e)=>{var n;const a=i[e].token.profile;return"string"==typeof(null==a?void 0:a.id)&&a.id&&a.id===(null===(n=null==t?void 0:t.profile)||void 0===n?void 0:n.id)&&a.type===t.profile.type})&&(this.legacyPanesObserved.add(t),n.forEach((t,n)=>{var a;if("ssh"!==t.profile.type||(null===(a=this.paneTargets.get(t))||void 0===a?void 0:a.has(e)))return;const s=this.paneMarker(t.profile);if(!s&&this.visibilityInstance(t))return;const o=s||this.paneMarker(i[n].token.profile);this.rememberPane(t,e,o||Ys(e,i[n].path,t.profile.id))}))}paneTargetFor(t,e,n,i){var a,s,o;if(!t)return;const r=this.paneMarker(t.profile);if(!r&&this.visibilityInstance(t))return;r||(null===(a=this.paneTargets.get(t))||void 0===a?void 0:a.has(n))||this.rememberLegacyPanes(e,n);const l=r||(null===(s=this.paneTargets.get(t))||void 0===s?void 0:s.get(n));return null===(o=i.find(e=>{var i;return e.id===l&&e.layoutId===n&&e.profileId===(null===(i=t.profile)||void 0===i?void 0:i.id)}))||void 0===o?void 0:o.id}preservePaneRecoveryMarkers(t,e,n){var i,a,s;const o="function"==typeof t.getAllTabs?t.getAllTabs():[],r=Js(e);if(!Array.isArray(o)||o.length!==r.length)return e;const l=Qs((null===(i=this.config.store)||void 0===i?void 0:i.profiles)||[],!1),c=new Map;for(let i=0;i<r.length;i++){const d=r[i].token,p=o[i];if((null===(a=d.profile)||void 0===a?void 0:a.id)!==(null===(s=null==p?void 0:p.profile)||void 0===s?void 0:s.id))return e;const u=this.paneTargetFor(p,t,n,l);u&&c.set(d,Object.assign(Object.assign({},d),{profile:Object.assign(Object.assign({},d.profile),{[Zs]:u})}))}const d=t=>c.get(t)||("app:split-tab"===(null==t?void 0:t.type)&&Array.isArray(t.children)?Object.assign(Object.assign({},t),{children:t.children.map(d)}):t);return d(e)}contextForSession(t){var e,n,i;if(this.destroyed||!t||!1===t.open)return{profileIds:[]};this.observeTabs();const a=eo(this.app.tabs||[],t),s="string"==typeof(null===(e=null==a?void 0:a.profile)||void 0===e?void 0:e.id)&&a.profile.id?a.profile:t.profile,o=new Set(to(s,(null===(n=this.config.store)||void 0===n?void 0:n.profiles)||[],t=>{var e,n;return(null===(n=(e=this.profiles).getConfigProxyForProfile)||void 0===n?void 0:n.call(e,t))||t})),r=Qs((null===(i=this.config.store)||void 0===i?void 0:i.profiles)||[],!1),l=new Set;let c=null==a?void 0:a.parent;for(;c&&!l.has(c);){l.add(c),this.preserveRecoveryMarker(c);const t=this.marker(c);if(t){o.add(t);const e=this.paneTargetFor(a,c,t,r);e&&o.add(e)}c=c.parent}return{profileIds:[...o]}}ngOnDestroy(){this.destroyed=!0,this.subscriptions.forEach(t=>t.unsubscribe()),this.subscriptions=[];const t=this.profiles;this.wrappedParameters&&(null==t?void 0:t.newTabParametersForProfile)===this.wrappedParameters&&(t.newTabParametersForProfile=this.originalParameters);for(const t of[...this.tokenPatches.keys()])this.releaseTab(t);for(const t of[...this.visibilityTokenPatches.keys()])this.releaseVisibilityTab(t)}};so=b([(0,y.Injectable)({providedIn:"root"}),v("design:paramtypes",[Ds.ConfigService,Ds.AppService,Ds.ProfilesService])],so);const oo=["cpu","ram","disk","net"];function ro(t){const e=Array.isArray(t)?t:[];return[...new Set([...e.filter(t=>oo.includes(t)),...oo])]}const lo=t=>JSON.parse(JSON.stringify(t)),co=[{operator:">=",value:"90",color:Es.red},{operator:">=",value:"75",color:Es.orange}],po=t=>`total=$(sysctl -n hw.memsize 2>/dev/null) || exit 1; data=$(vm_stat 2>/dev/null) || exit 1; printf '%s\\n' "$data" | awk -v total="$total" '/page size of/ {for(i=1;i<NF;i++) if($i=="of") size=$(i+1)} /^Pages free:/ {free=$3+0} /^Pages inactive:/ {inactive=$3+0} /^Pages speculative:/ {speculative=$3+0} END {if(total<=0 || size<=0) exit 1; available=(free+inactive+speculative)*size; if(available>total) available=total; ${t?'printf "%.1f/%.1f GB available\\n",available/1073741824,total/1073741824':'printf "%.1f\\n",(total-available)*100/total'}}'`,uo=(t,e)=>`if [ "$(uname -s)" = Darwin ]; then ${e}; else ${t}; fi`;function mo(t="busy"){const e=`awk '/^cpu / { t=0; for(i=2;i<=9;i++) t+=$i; print t,${"busy"===t?"$5+$6":"iowait"===t?"$6":"$9"}; found=1; exit } END { if(!found) exit 1 }' /proc/stat`;return`a=$(${e}) || exit 1; sleep 1; b=$(${e}) || exit 1; printf '%s\\n%s\\n' "$a" "$b" | awk 'NR==1 { t1=$1; v1=$2 } NR==2 { dt=$1-t1; v=$2; result=dt>0?(${"busy"===t?"dt-(v-v1)":"v-v1"})*100/dt:0; if(result<0) result=0; if(result>100) result=100; printf "%.1f\\n",result }'`}const ho='net_os=$(uname -s) || exit 1;\ntabby_net_rows() { if [ "$net_os" = Darwin ]; then net_data=$(netstat -ibn 2>/dev/null) || return 1; printf \'%s\\n\' "$net_data" | awk \'$1=="Name" {columns=NF; for(i=1;i<=NF;i++) {if($i=="Ibytes") ri=i; if($i=="Obytes") ti=i} next} $3 ~ /^<Link#[0-9]+>/ && $1 !~ /\\*$/ && $1!="lo0" && $1 ~ /^[[:alnum:]_.:-]+$/ {r=NF-columns+ri; t=NF-columns+ti; if(ri && ti && r>3 && t>3 && $r ~ /^[0-9]+$/ && $t ~ /^[0-9]+$/ && !seen[$1]++) {print $1,$r,$t; count++}} END {if(!count) exit 1}\'; else awk \'NR>2 { sub(/^[[:space:]]+/, ""); split($0,a,/[[:space:]:]+/); if(a[1]!="lo" && a[1] ~ /^[[:alnum:]_.:-]+$/ && a[2] ~ /^[0-9]+$/ && a[10] ~ /^[0-9]+$/) { print a[1],a[2],a[10]; count++ } } END {if(!count) exit 1}\' /proc/net/dev; fi; };\ntabby_net_interfaces() {\n if [ "$net_os" = Darwin ]; then\n net_candidates=$({ route -n get default 2>/dev/null; route -n get -inet6 default 2>/dev/null; } | awk \'$1=="interface:" {print $2}\');\n else\n net_candidates=$({ awk \'NR>1 && $2=="00000000" && $8=="00000000" && $4 ~ /[13579bBdDfF]$/ {print $1}\' /proc/net/route 2>/dev/null; awk \'$1=="00000000000000000000000000000000" && $2=="00" && $9 ~ /[13579bBdDfF]$/ {print $10}\' /proc/net/ipv6_route 2>/dev/null; });\n fi;\n net_candidates=$(printf \'%s\\n\' "$net_candidates" | awk -v rows="$1" \'BEGIN {n=split(rows,a,"\\n"); for(i=1;i<=n;i++) {split(a[i],b," "); available[b[1]]=1}} available[$1] && !seen[$1]++ {printf "%s%s",sep,$1; sep=" "}\');\n if [ -n "$net_candidates" ]; then printf \'%s\\n\' "$net_candidates"; return 0; fi;\n printf \'%s\\n\' "$1" | while read -r net_iface net_rx net_tx; do\n if [ "$net_os" != Darwin ]; then\n [ -e "/sys/class/net/$net_iface/master" ] && continue;\n if [ -r "/sys/class/net/$net_iface/operstate" ]; then read -r net_state < "/sys/class/net/$net_iface/operstate"; case "$net_state" in up|unknown) ;; *) continue;; esac; fi;\n fi;\n printf \'%s\\n\' "$net_iface";\n done | awk \'!seen[$1]++ {printf "%s%s",sep,$1; sep=" "}\';\n};\ntabby_net_snapshot() {\n net_rows=$(tabby_net_rows) || return 1;\n printf \'%s\\n\' "$net_rows" | awk -v interfaces="$net_interfaces" \'BEGIN {n=split(interfaces,a," "); for(i=1;i<=n;i++) selected[a[i]]=1} $1 in selected {print; seen[$1]=1} END {for(name in selected) if(!seen[name]) exit 1}\';\n};\nnet_rows=$(tabby_net_rows) || exit 1;\nnet_interfaces=$(tabby_net_interfaces "$net_rows") || exit 1;\n[ -n "$net_interfaces" ] || exit 1;';function go(t){return`${ho}\ntabby_net_clock() { if [ "$net_os" = Darwin ]; then if command -v perl >/dev/null 2>&1; then perl -MTime::HiRes=time -e 'printf "%.6f\\n", time' 2>/dev/null || date +%s; else date +%s; fi; else awk 'NR==1 {print $1; found=1; exit} END {if(!found) exit 1}' /proc/uptime; fi; };\na=$(tabby_net_snapshot) || exit 1; ta=$(tabby_net_clock) || exit 1; sleep 1;\nb=$(tabby_net_snapshot) || exit 1; tb=$(tabby_net_clock) || exit 1;\nprintf '%s\\n--TABBY-NET-NEXT--\\n%s\\n' "$a" "$b" | awk -v start="$ta" -v finish="$tb" 'BEGIN {if(start !~ /^[0-9]+([.][0-9]+)?$/ || finish !~ /^[0-9]+([.][0-9]+)?$/ || finish<=start) {bad=1; exit 1}} $0=="--TABBY-NET-NEXT--" {second=1; next} !second {rx[$1]=$2; tx[$1]=$3; next} {if(!($1 in rx)) {bad=1; next} dr=$2-rx[$1]; dt=$3-tx[$1]; if(dr<0) dr=0; if(dt<0) dt=0; bytes+=${"rx"===t?"dr":"tx"===t?"dt":"dr+dt"}; count++} END {if(bad || !count) exit 1; rate=bytes/1024/(finish-start); if(rate>=1) printf "%.2f\\n",rate; else if(rate>0) printf "%.6f\\n",rate; else print "0"}'`}function fo(t){return`${ho}\ndata=$(tabby_net_snapshot) || exit 1; printf '%s\\n' "$data" | awk -v interfaces="$net_interfaces" '{bytes+=${"rx"===t?"$2":"tx"===t?"$3":"$2+$3"}; count++} END {if(!count) exit 1; gsub(/ /,",",interfaces); printf "${"rx"===t?"Received":"tx"===t?"Sent":"Combined"} total: %.3f GB (since interface reset; %s)\\n",bytes/1073741824,interfaces}'`}function bo(t,e={}){var n,i;const a=function(){const t={type:"progress",maxValue:100,suffix:"%",color:Es.green,colorRules:co,checkMode:"exitCode",checkExpected:"0",unavailableText:"Unavailable"},e=(t,e,n,i)=>({id:t,label:e,type:"text",icon:i,color:Es.green,suffix:" KiB/s",command:go(n),checkCommand:uo("test -r /proc/net/dev && test -r /proc/uptime","command -v netstat >/dev/null && command -v route >/dev/null && command -v date >/dev/null"),checkMode:"exitCode",checkExpected:"0",unavailableText:"Unavailable",detailCommand:fo(n)}),n={cpu:Object.assign(Object.assign({},t),{id:"builtin-cpu",label:"CPU",icon:"stats-cpu",command:uo(mo(),'cores=$(sysctl -n hw.logicalcpu 2>/dev/null) || exit 1; data=$(ps -A -o %cpu= 2>/dev/null) || exit 1; printf \'%s\\n\' "$data" | awk -v cores="$cores" \'{sum+=$1} END {if(cores<=0) exit 1; usage=sum/cores; if(usage>100) usage=100; printf "%.1f\\n",usage}\''),checkCommand:uo("test -r /proc/stat","command -v ps >/dev/null && command -v sysctl >/dev/null"),detailCommand:uo("awk '{printf \"load %.2f / %.2f / %.2f\\n\",$1,$2,$3}' /proc/loadavg","sysctl -n vm.loadavg")}),ram:Object.assign(Object.assign({},t),{id:"builtin-ram",label:"Memory",icon:"stats-memory",colorRules:[{operator:">",value:String(80),color:Es.red},{operator:">",value:String(60),color:Es.orange}],checkCommand:uo("test -r /proc/meminfo","command -v vm_stat >/dev/null && command -v sysctl >/dev/null"),command:uo("awk '/^MemTotal:/ {t=$2} /^MemAvailable:/ {a=$2; found=1} /^MemFree:/ {f=$2} /^Buffers:/ {b=$2} /^Cached:/ {c=$2} END {if(t<=0) exit 1; if(!found) a=f+b+c; printf \"%.1f\\n\",(t-a)*100/t}' /proc/meminfo",po(!1)),detailCommand:uo("awk '/^MemTotal:/ {t=$2} /^MemAvailable:/ {a=$2; found=1} /^MemFree:/ {f=$2} /^Buffers:/ {b=$2} /^Cached:/ {c=$2} END {if(t<=0) exit 1; if(!found) a=f+b+c; printf \"%.1f/%.1f GB available\\n\",a/1048576,t/1048576}' /proc/meminfo",po(!0))}),disk:Object.assign(Object.assign({},t),{id:"builtin-disk",label:"Disk",icon:"stats-system-disk",checkCommand:"df -Pk / >/dev/null 2>&1",command:"data=$(df -Pk / 2>/dev/null) || exit 1; printf '%s\\n' \"$data\" | awk 'NR==2 {gsub(/%/,\"\",$5); print $5; found=1} END {if(!found) exit 1}'",detailCommand:"data=$(df -Pk / 2>/dev/null) || exit 1; printf '%s\\n' \"$data\" | awk 'NR==2 {printf \"%.1f/%.1f GB available\\n\",$4/1048576,$2/1048576; found=1} END {if(!found) exit 1}'"}),net:{id:"builtin-net",label:"Network",mode:"static",layout:"vertical",main:Object.assign(Object.assign({},e("builtin-net-main","Network","total","stats-network")),{enabled:!1}),children:[e("builtin-net-rx","Download","rx","stats-network-download"),e("builtin-net-tx","Upload","tx","stats-network-upload")]}};return lo(n)}(),s=null===(n=e.defaultMetricOverrides)||void 0===n?void 0:n[t];if("net"===t){const t=s,e=a.net;return lo(Object.assign(Object.assign(Object.assign({},e),t),{id:e.id,main:Object.assign(Object.assign(Object.assign({},e.main),null==t?void 0:t.main),{id:e.main.id}),children:null!==(i=null==t?void 0:t.children)&&void 0!==i?i:e.children}))}return lo(Object.assign(Object.assign(Object.assign({},a[t]),s),{id:a[t].id}))}const vo=require("child_process");var yo;const wo=Ts.join(Ms.tmpdir(),"tabby-server-stats.log");let xo=0;function ko(t){if(!_o.isDebugEnabled)return;const e=`[${(new Date).toISOString()}] ${t}\n`;try{if(xo++,xo%100==0)try{Ss.statSync(wo).size>2097152&&Ss.writeFileSync(wo,`[${(new Date).toISOString()}] [log rotated]\n`)}catch(t){}Ss.appendFileSync(wo,e)}catch(t){}console.log(`[ServerStats] ${t}`)}let _o=yo=class{constructor(t,e=null){this.config=t,this.scopes=e,this.serverCaches=new Map,this.fetchTasks=new Map,this.detailTasks=new Map,this.sessionKeys=new WeakMap,this.nextSessionId=0,this.revision=0,this.statsUpdated$=new _.Subject,this.updateDebugState(),this.config.changed$.subscribe(()=>{this.updateDebugState(),this.revision++,this.serverCaches.clear(),this.fetchTasks.clear(),this.detailTasks.clear()}),this.config.ready$.subscribe(()=>this.updateDebugState())}updateDebugState(){var t,e,n,i;yo.isDebugEnabled=Boolean(null===(i=null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.debugLogging)}getServerKey(t){if(!t||"object"!=typeof t)return"default";let e=this.sessionKeys.get(t);return e||(e="session:"+ ++this.nextSessionId,this.sessionKeys.set(t,e)),e}scopeContext(t){var e,n;return(null===(e=this.scopes)||void 0===e?void 0:e.contextForSession(t))||{profileIds:(null===(n=null==t?void 0:t.profile)||void 0===n?void 0:n.id)?[t.profile.id]:[]}}isPaneVisible(t){var e,n,i;return null===(i=null===(n=null===(e=this.scopes)||void 0===e?void 0:e.isPaneVisible)||void 0===n?void 0:n.call(e,t))||void 0===i||i}setPaneVisible(t,e){var n,i;null===(i=null===(n=this.scopes)||void 0===n?void 0:n.setPaneVisible)||void 0===i||i.call(n,t,e)}getVisibleConfig(t){var e,n,i,a,s;const o=(null===(i=null===(n=null===(e=this.config)||void 0===e?void 0:e.store)||void 0===n?void 0:n.plugin)||void 0===i?void 0:i.serverStats)||{},r=function(t={}){const e=t.defaultMetrics||{cpu:!0,ram:!0,disk:!0,net:!0},n=ro(t.builtinOrder).filter(t=>"net"!==t&&!!e[t]).map(e=>bo(e,t)),i=e.net?[bo("net",t)]:[];return!1===t.showDefaultIcons&&(n.forEach(t=>{t.icon=""}),i.forEach(t=>{t.main.icon="",t.children.forEach(t=>{t.icon=""})})),{customMetrics:n,metricGroups:i}}(o);return function(t,e,n){const{available:i,panes:a}=function(t){const e=new Set(Qs(t,!1).map(t=>t.id));return{panes:e,available:new Set([...(t||[]).map(t=>null==t?void 0:t.id).filter(Boolean),...e])}}(n),s=new Set(e.profileIds),o=t=>function(t,e,n,i){return!t||"all"===t.mode||!("selected"!==t.mode||!Array.isArray(t.profileIds))&&!(t.excludedProfileIds||[]).some(t=>i.has(t)&&e.has(t))&&t.profileIds.some(t=>n.has(t)&&e.has(t))}(t,s,i,a);return{customMetrics:(t.customMetrics||[]).filter(t=>!1!==t.enabled&&o(t.displayScope)),metricGroups:(t.metricGroups||[]).filter(t=>!1!==t.enabled&&o(t.displayScope))}}({customMetrics:[...r.customMetrics,...o.customMetrics||[]],metricGroups:[...r.metricGroups,...o.metricGroups||[]]},this.scopeContext(t),(null===(s=null===(a=this.config)||void 0===a?void 0:a.store)||void 0===s?void 0:s.profiles)||[])}scopeSignature(t){const e=this.scopeContext(t),n=this.getVisibleConfig(t);return JSON.stringify([[...new Set(e.profileIds)].sort(),Bs(n).map(t=>t.id).sort()])}discardSessionCache(t){this.serverCaches.delete(t),this.fetchTasks.delete(t);for(const e of this.detailTasks.keys())e.startsWith(`${t}:`)&&this.detailTasks.delete(e)}getSessionCache(t){const e=this.getServerKey(t),n=this.scopeSignature(t);let i=this.serverCaches.get(e);return i&&i.scopeSignature!==n&&(this.discardSessionCache(e),i=void 0),i||(i={scopeSignature:n,metricStates:new Map},this.serverCaches.set(e,i)),i}snapshot(t,e){const n=Bs(this.getVisibleConfig(e)),i=new Set(n.map(t=>t.id)),a=e=>{const n=i.has(e)?t.metricStates.get(e):void 0,a="ok"===(null==n?void 0:n.status)?Number.parseFloat(n.value):0;return Number.isFinite(a)?a:0};return{cpu:a("builtin-cpu"),mem:a("builtin-ram"),disk:a("builtin-disk"),netRx:1024*a("builtin-net-rx"),netTx:1024*a("builtin-net-tx"),custom:n.map(e=>{var n,i;const a=t.metricStates.get(e.id);return{id:e.id,value:null!==(n=null==a?void 0:a.value)&&void 0!==n?n:"-",status:null!==(i=null==a?void 0:a.status)&&void 0!==i?i:"pending"}})}}getCachedStats(t){if(!t||!1===t.open)return null;const e=this.getServerKey(t),n=this.serverCaches.get(e);return n&&n.scopeSignature!==this.scopeSignature(t)?(this.discardSessionCache(e),null):n?this.snapshot(n,t):null}getState(t,e){let n=t.metricStates.get(e.id);return n||(n={lastAttempt:0,lastSuccess:0,value:"-",status:"pending",isFetching:!1,detail:"",detailAt:0},t.metricStates.set(e.id,n)),n}isCurrent(t,e,n){return!1!==t.open&&this.revision===n&&this.serverCaches.get(this.getServerKey(t))===e&&e.scopeSignature===this.scopeSignature(t)}publish(t,e,n){this.isCurrent(t,e,n)&&this.statsUpdated$.next({serverKey:this.getServerKey(t),stats:this.snapshot(e,t)})}isPlatformSupport(t){var e;if(!t||!1===t.open)return!1;const n=null===(e=t.ssh)||void 0===e?void 0:e.ssh;return Boolean(n&&"function"==typeof n.openSessionChannel)||"linux"===process.platform||"darwin"===process.platform||Boolean(this.getLocalShell())}getLocalShell(){return"win32"!==process.platform?null:[process.env.MSYS2_SH,...(process.env.PATH||"").split(Ts.delimiter).map(t=>Ts.join(t,"sh.exe")),"C:\\msys64\\usr\\bin\\sh.exe","C:\\msys32\\usr\\bin\\sh.exe"].find(t=>Boolean(t&&Ss.existsSync(t)))||null}async execute(t,e,n,i){var a;if(!this.isPlatformSupport(t))throw new Error("Session unavailable");ko(`[execute] ${this.getServerKey(t)}, timeout=${n}ms, length=${e.length}`);const s=null===(a=t.ssh)||void 0===a?void 0:a.ssh;return s&&"function"==typeof s.openSessionChannel?this.exec(s,e,n,i):this.execLocal(e,n,this.getLocalShell())}async fetchStats(t){if(!this.isPlatformSupport(t))return null;this.getSessionCache(t);const e=this.getServerKey(t),n=this.fetchTasks.get(e);if(n)return n;const i=this.collectStats(t);this.fetchTasks.set(e,i);try{return await i}finally{this.fetchTasks.get(e)===i&&this.fetchTasks.delete(e)}}async collectStats(t){var e,n,i;const a=this.getSessionCache(t),s=this.revision,o=Date.now(),r=(null===(i=null===(n=null===(e=this.config)||void 0===e?void 0:e.store)||void 0===n?void 0:n.plugin)||void 0===i?void 0:i.serverStats)||{},l=Number.isFinite(r.defaultInterval)&&r.defaultInterval>0?r.defaultInterval:3,c=Bs(this.getVisibleConfig(t)).filter(e=>{const n=this.getState(a,e),i=Number.isFinite(e.interval)&&e.interval>0?e.interval:l;return!n.isFetching&&!this.detailTasks.has(`${this.getServerKey(t)}:${e.id}`)&&(0===n.lastAttempt||o-n.lastAttempt>=1e3*Math.max(1,i))});if(!c.length)return this.snapshot(a,t);ko(`[collect] ${this.getServerKey(t)}, metrics=${c.length}`);const d=new Map(c.map((t,e)=>[`m_${e}`,t])),p=new Set;c.forEach(t=>{const e=this.getState(a,t);e.isFetching=!0,e.lastAttempt=o});const u=e=>{var n;if(!this.isCurrent(t,a,s))return;let i=!1;for(const t of qs(e)){const e=d.get(t.token);if(!e||p.has(t.token))continue;p.add(t.token);const s=this.getState(a,e);s.isFetching=!1,s.status=t.status,s.value="unavailable"===t.status?null!==(n=e.unavailableText)&&void 0!==n?n:"Unavailable":t.value,ko(`[metric] ${e.id}: ${t.status}`),"ok"===t.status?s.lastSuccess=Date.now():(s.detail="",s.detailAt=0),i=!0}i&&this.publish(t,a,s)},m=['export LC_ALL=C PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH"'];d.forEach((t,e)=>m.push(Ws(t,e))),m.push("wait","echo TABBY-STATS-END");try{const e=1e3*Math.max(15,...c.map(t=>2*zs(t)+5));u(await this.execute(t,m.join("\n")+"\n",e,u)),this.isCurrent(t,a,s)&&d.forEach((t,e)=>{if(!p.has(e)){const e=this.getState(a,t);e.status="error",e.value="Err: No result",e.detail="",e.detailAt=0}})}catch(e){ko(`[collect:error] ${(null==e?void 0:e.message)||e}`),this.isCurrent(t,a,s)&&d.forEach((t,n)=>{if(!p.has(n)){const n=this.getState(a,t);n.status="error",n.value=this.executionErrorValue(e),n.detail="",n.detailAt=0}})}finally{c.forEach(t=>{this.getState(a,t).isFetching=!1}),this.publish(t,a,s)}return this.isCurrent(t,a,s)?this.snapshot(a,t):null}async fetchDetails(t,e){if(!this.isPlatformSupport(t))return{};const n=this.getServerKey(t),i=this.revision,a=this.getSessionCache(t),s=this.fetchTasks.get(n),o=new Map(Bs(this.getVisibleConfig(t)).map(t=>[t.id,t])),r=e.some(t=>{var e;const n=o.get(t.id);if(!(null===(e=null==n?void 0:n.detailCommand)||void 0===e?void 0:e.trim()))return!1;const i=a.metricStates.get(n.id);return!i||i.isFetching||"pending"===i.status});if(s&&r&&await s,!this.isCurrent(t,a,i))return{};const l={};return await Promise.all(e.map(async e=>{var s,r,c,d,p;const u=o.get(e.id);if(!(null===(s=null==u?void 0:u.detailCommand)||void 0===s?void 0:s.trim()))return;const m=this.getState(a,u);if("unavailable"===m.status||"error"===m.status)return void(l[u.id]="");const h=null===(p=null===(d=null===(c=null===(r=this.config)||void 0===r?void 0:r.store)||void 0===c?void 0:c.plugin)||void 0===d?void 0:d.serverStats)||void 0===p?void 0:p.defaultInterval,g=Number.isFinite(h)&&h>0?h:3,f=Number.isFinite(u.interval)&&u.interval>0?u.interval:g;if(m.detailAt&&Date.now()-m.detailAt<1e3*Math.max(1,f))return void(l[u.id]=m.detail);const b=`${n}:${u.id}`;let v=this.detailTasks.get(b);v||(v=this.collectDetail(t,u,a,i),this.detailTasks.set(b,v));try{l[u.id]=await v}finally{this.detailTasks.get(b)===v&&this.detailTasks.delete(b)}})),this.isCurrent(t,a,i)?l:{}}async collectDetail(t,e,n,i){var a,s;const o=this.getState(n,e);try{const r=['export LC_ALL=C PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH"',Ws(e,"detail","detail"),"wait","echo TABBY-STATS-END",""].join("\n"),l=await this.execute(t,r,1e3*(2*zs(e)+5));if(!this.isCurrent(t,n,i))return"";const c=qs(l).find(t=>"detail"===t.token);return"unavailable"===(null==c?void 0:c.status)?(o.status="unavailable",o.value=null!==(a=e.unavailableText)&&void 0!==a?a:"Unavailable",o.detail="",o.detailAt=0,this.publish(t,n,i),""):(o.detail=null!==(s=null==c?void 0:c.value)&&void 0!==s?s:"Err: No result",c&&"error"!==c.status||ko(`[detail:error] ${e.id}: ${o.detail}; stdout=${l.length} bytes`),o.detailAt=Date.now(),o.detail)}catch(a){return this.isCurrent(t,n,i)?(o.detail=this.executionErrorValue(a),o.detailAt=Date.now(),ko(`[detail:error] ${e.id}: ${o.detail}`),o.detail):""}}executionErrorValue(t){const e=String((null==t?void 0:t.message)||t);if(e.includes("Timeout"))return"Err: Timeout";const n=e.match(/^Stats: (No output|Incomplete output|No result|Remote error(?:: [\s\S]*)?)$/);return n?`Err: ${n[1]}`:"Err: Connection"}execLocal(t,e=45e3,n){return new Promise((i,a)=>{(0,vo.exec)(t,Object.assign({timeout:e},n?{shell:n}:{}),(t,e)=>{t?a(new Error(t.killed?"Stats: Timeout":t.message)):i(e)})})}exec(t,e,n=45e3,i){const a=e.includes("TABBY-STATS-END"),s=`\n# TABBY-STATS-ACK-WAIT\nif command -v timeout >/dev/null 2>&1 && timeout -k 1 1 /bin/sh -c ':' >/dev/null 2>&1; then\n timeout -k 1 5 /bin/sh -c 'IFS= read -r _tabby_ack' || :\nelif command -v gtimeout >/dev/null 2>&1 && gtimeout -k 1 1 /bin/sh -c ':' >/dev/null 2>&1; then\n gtimeout -k 1 5 /bin/sh -c 'IFS= read -r _tabby_ack' || :\nelse\n /bin/sh -c ${Us('\n_tabby_reader=$$\n(\n trap \'kill "$_tabby_sleep" 2>/dev/null; exit 0\' TERM\n sleep 5 & _tabby_sleep=$!\n wait "$_tabby_sleep"\n kill -TERM "$_tabby_reader" 2>/dev/null\n) </dev/null >/dev/null 2>&1 &\n_tabby_watchdog=$!\ntrap \'kill "$_tabby_watchdog" 2>/dev/null; exit 0\' TERM\nIFS= read -r _tabby_ack\nkill "$_tabby_watchdog" 2>/dev/null\nwait "$_tabby_watchdog" 2>/dev/null\nexit 0\n')}\nfi\n`,o="/bin/sh -s",r=Buffer.from(`{\n${e}\n${a?s:""}\nexit\n}\n`,"utf8");return new Promise((s,l)=>{let c,d,p=null,u=!1,m="",h="",g=!1,f=!1,b=!1,v=!1;const y=[],w=new TextDecoder("utf-8"),x=new TextDecoder("utf-8"),k=t=>{if(u)return;u=!0,clearTimeout(_),clearTimeout(c),clearTimeout(d),m+=w.decode(),h+=x.decode();const n=e.includes("TABBY-METRIC-RESULT:")||e.includes("TABBY-STATS-START"),i=qs(m).length>0||/(?:^|\n)TABBY-STATS-START[^\r\n]*\r?\n/.test(m);if(!t&&n&&!i){const e=h.replace(/[\x00-\x1f\x7f]+/g," ").trim().slice(0,500),n=e?`Remote error: ${e}`:m.trim()?m.includes("TABBY-METRIC-RESULT:")?"Incomplete output":"No result":"No output";t=new Error(`Stats: ${n}`)}for(const t of y)try{t.unsubscribe()}catch(t){}try{Promise.resolve(null==p?void 0:p.close()).catch(()=>{})}catch(t){}t?l(t):s(m)},_=setTimeout(()=>k(new Error("Stats: Timeout")),n),I=()=>{if(!u&&!f)if(a){if(v||(v=!0,clearTimeout(_),clearTimeout(c),d=setTimeout(()=>k(),1e3)),b){f=!0;try{const t=p.write(Buffer.from("TABBY-STATS-ACK\n"));Promise.resolve(t).then(()=>k(),()=>k())}catch(t){k()}}}else k()},D=()=>{g=!0,clearTimeout(c),c=setTimeout(()=>k(),100)},$=(t,e)=>{const n=t.subscribe(e);u?n.unsubscribe():y.push(n)};(async()=>{const e=await t.openSessionChannel();if(u)try{null==e||e.close()}catch(t){}else if(p=await t.activateChannel(e),u)try{null==p||p.close()}catch(t){}else{if(!p.data$)throw new Error("Channel has no data observable");if($(p.data$,{next:t=>{u||("string"==typeof t?m+=t:Buffer.isBuffer(t)||t instanceof ArrayBuffer||ArrayBuffer.isView(t)?m+=w.decode(t,{stream:!0}):m+=String(t),null==i||i(m),/(?:^|\n)TABBY-STATS-END\r?\n/.test(m)?I():g&&D())},error:t=>k(t),complete:D}),!u&&(p.closed$&&$(p.closed$,D),p.extendedData$&&$(p.extendedData$,{next:t=>{const e=Array.isArray(t)?t[1]:t;"string"==typeof e?h+=e:(Buffer.isBuffer(e)||e instanceof ArrayBuffer||ArrayBuffer.isView(e))&&(h+=x.decode(e,{stream:!0})),h=h.slice(-2048),g&&D()},error:t=>k(t)}),!u)){if("function"!=typeof p.write)throw new Error("SSH channel does not support stdin upload");if("function"==typeof p.requestExec)await p.requestExec(o);else{if("function"!=typeof p.exec)throw new Error("Channel has no exec method");await p.exec(o)}for(let t=0;t<r.length;t+=8192){if(u||g)return;await p.write(r.subarray(t,t+8192))}u||(b=!0,v?I():a||"function"!=typeof p.eof||await p.eof())}}})().catch(t=>k(t))})}};_o.isDebugEnabled=!1,_o=yo=b([(0,y.Injectable)({providedIn:"root"}),v("design:paramtypes",[Ds.ConfigService,so])],_o);var Io=g(165);const Do=/^[+-]?(?:(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?|\.\d+)(?:[eE][+-]?\d+)?$/,$o=new Intl.NumberFormat("en-US",{minimumFractionDigits:3,maximumFractionDigits:3,useGrouping:!0});function Co(t){return Do.test(t.trim())&&Number.isFinite(Number(t.replace(/,/g,"")))}function So(t){return t.replace(/(^|[\d\s])GiB\b/g,"$1GB")}function Mo(t){return(null==t?void 0:t.status)||(t&&"-"!==t.value?t.value.startsWith("Err:")?"error":"ok":"pending")}function To(t,e){return!!t&&!1!==t.enabled&&(!1!==t.visibleWhenUnavailable||"unavailable"!==Mo(e.find(e=>e.id===t.id)))}function Eo(t,e){return!1===t.enabled?[]:(t.children||[]).filter(t=>To(t,e)&&(!1!==t.showWhenUnavailable||"unavailable"!==Mo(e.find(e=>e.id===t.id))))}function No(t,e,n){const i=new Set(Eo(t,e).map(t=>t.id)),a=t.children||[],s=a.findIndex(t=>t.id===n);for(let t=1;t<=a.length;t++){const e=a[(s+t)%a.length];if(i.has(e.id))return e.id}}let Oo=class{constructor(t,e,n,i){this.service=t,this.cdr=e,this.zone=n,this.sanitizer=i,this.colors=Es,this.metrics=[],this.groups=[],this.builtinOrder=[],this.stats={custom:[]},this.session=null,this.autoDetailMetric=null,this.portal=null,this.carouselWidths=new Map,this.details={},this.hoveredMetric=null,this.hoveredGroup=null,this.popup={left:8,top:8,width:480,maxHeight:300},this.selections=new Map,this.anchor=null,this.generation=0,this.destroyed=!1,this.detailRequest=!1,this.lastDetailsAt=0,this.configSignature="",this.svgPath=Rs,this.isUrl=Fs,this.isFa=Ps,this.iconClass=As}ngAfterViewChecked(){var t;this.measureCarousels();const e=(null===(t=this.groupPopup)||void 0===t?void 0:t.nativeElement)||null;if(this.portal&&this.portal!==e&&this.portal.remove(),e&&e.parentElement!==document.body&&document.body.appendChild(e),this.portal=e,e&&this.anchor){const t=this.anchor.getBoundingClientRect(),n=e.getBoundingClientRect(),i=t.top>=Math.min(n.height,140),a=i?t.top-14:window.innerHeight-t.bottom-14;e.style.maxHeight=`${Math.max(60,Math.min(380,a))}px`;const s=e.getBoundingClientRect();e.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-s.width-8))}px`,e.style.top=`${i?Math.max(8,t.top-s.height-6):t.bottom+6}px`}}ngOnInit(){this.refreshDetails(),this.zone.runOutsideAngular(()=>{this.timer=setInterval(()=>this.zone.run(()=>{this.destroyed||(this.session&&!1!==this.session.open?(this.updateCarousel(Date.now(),!0),Date.now()-this.lastDetailsAt>=1e3&&this.refreshDetails(),this.cdr.markForCheck()):this.closeHover())}),250)})}ngOnChanges(){const t=JSON.stringify([this.metrics,this.groups,this.builtinOrder]);this.previousSession===this.session&&t===this.configSignature||(this.generation++,this.details={},this.closeHover(),this.selections.clear(),this.carouselWidths.clear(),this.previousSession=this.session,this.configSignature=t),this.updateCarousel(Date.now(),!1)}get results(){var t;return(null===(t=this.stats)||void 0===t?void 0:t.custom)||[]}get visibleMetrics(){return this.metrics.filter(t=>To(t,this.results))}get visibleGroups(){return this.groups.filter(t=>this.allMetrics(t).length>0)}get visibleItems(){return function(t,e,n){const i=new Map(ro(n).map((t,e)=>[`builtin-${t}`,e]));return[...t.map(t=>({id:t.id,metric:t})),...e.map(t=>({id:t.id,group:t}))].sort((t,e)=>{var n,a;return(null!==(n=i.get(t.id))&&void 0!==n?n:oo.length)-(null!==(a=i.get(e.id))&&void 0!==a?a:oo.length)})}(this.visibleMetrics,this.visibleGroups,this.builtinOrder)}trackId(t,e){return e.id}allMetrics(t){return function(t,e){return!1===t.enabled?[]:[t.main,...t.children||[]].filter(t=>To(t,e))}(t,this.results)}carouselCandidates(t){return Eo(t,this.results)}measureCarousels(){var t;for(const e of(null===(t=this.carouselSlots)||void 0===t?void 0:t.toArray())||[]){const t=e.nativeElement,n=t.getAttribute("data-carousel-group");if(!n)continue;const i=this.groups.find(t=>t.id===n);if(!i)continue;let a=this.carouselWidths.get(n);if(!(null==a?void 0:a.settled)){const e=Array.from(t.querySelectorAll(".carousel-measure")).map(t=>t.getBoundingClientRect().width),s=Math.ceil(Math.max(0,...e));if(!s)continue;a={width:Math.max((null==a?void 0:a.width)||0,s),settled:i.children.filter(t=>!1!==t.enabled).every(t=>"pending"!==this.status(t))},this.carouselWidths.set(n,a)}t.style.setProperty("--carousel-width",`${a.width}px`)}}result(t){return this.results.find(e=>e.id===t.id)||{id:t.id,value:"-",status:"pending"}}status(t){return Mo(this.result(t))}color(t){const e=this.status(t);return"pending"===e?"#8a929e":"error"===e?Es.red:function(t,e,n=Es.green){if(!e||0===e.length)return n;const i=null!=t?String(t).trim():"",a=i.match(/-?\d+(?:\.\d+)?/),s=a?parseFloat(a[0]):NaN,o=!isNaN(s)&&isFinite(s);for(const t of e){if(!t||!t.color)continue;const e=void 0!==t.value&&null!==t.value?String(t.value).trim():"",n=e.match(/-?\d+(?:\.\d+)?/),a=n?parseFloat(n[0]):NaN,r=!isNaN(a)&&isFinite(a);let l=!1;switch(t.operator){case">=":o&&r&&(l=s>=a);break;case">":o&&r&&(l=s>a);break;case"<=":o&&r&&(l=s<=a);break;case"<":o&&r&&(l=s<a);break;case"==":l=o&&r&&i===String(s)&&e===String(a)?s===a:i.toLowerCase()===e.toLowerCase();break;case"!=":l=o&&r&&i===String(s)&&e===String(a)?s!==a:i.toLowerCase()!==e.toLowerCase();break;case"contains":l=i.toLowerCase().includes(e.toLowerCase());break;case"not_contains":l=!i.toLowerCase().includes(e.toLowerCase());break;case"starts_with":l=i.toLowerCase().startsWith(e.toLowerCase());break;case"regex":try{l=new RegExp(e,"i").test(i)}catch(t){l=!1}}if(l)return t.color}return n}(this.result(t).value,t.colorRules,"unavailable"===e?Es.orange:t.color||Es.green)}progress(t){const e=parseFloat(this.result(t).value);return Number.isFinite(e)?Math.min(100,Math.max(0,e/(t.maxValue||100)*100)):0}isNetworkRate(t){var e;return"KiB/s"===(null===(e=t.suffix)||void 0===e?void 0:e.trim())&&"ok"===this.status(t)&&Co(this.result(t).value)}displayValue(t){const e=this.result(t).value;return this.isNetworkRate(t)?function(t){if(!Co(t))return t;const e=.001024*Number(t.replace(/,/g,""));return Number.isFinite(e)?$o.format(Math.abs(e)<5e-4?0:e):t}(e):"ok"===this.status(t)?So(e):e}suffix(t){var e;const n=this.isNetworkRate(t)?"MB/s":So((null===(e=t.suffix)||void 0===e?void 0:e.trim())||("progress"===t.type?"%":""));return n&&!n.startsWith("%")?" "+n:n}detailRatio(t){return this.detailError(t)?null:function(t){const e=/^\s*([^/\r\n]+?)\s*\/\s*([^/\s]+?)\s*([KMGTPE]?i?B|%)?\s*$/i.exec(t||"");if(!e)return null;const n=e[1].trim(),i=e[2].trim();return[n,i].every(Co)?{numerator:n,denominator:i,suffix:So(e[3]||"")}:null}(this.details[t.id]||"")}ratioColumnWidth(t,e){return`${Math.max(1,...this.allMetrics(t).map(t=>{var n;return(null===(n=this.detailRatio(t))||void 0===n?void 0:n[e].length)||0}))}ch`}ratioUnitWidth(t){return`${Math.max(0,...this.allMetrics(t).map(t=>{var e;const n=null===(e=this.detailRatio(t))||void 0===e?void 0:e.suffix;return n?n.length+1:0}))}ch`}networkAmountWidth(t){return`${Math.max(1,...this.allMetrics(t).map(t=>{var e;return(null===(e=this.networkDetail(t))||void 0===e?void 0:e.amount.length)||0}))}ch`}detailError(t){return(this.details[t.id]||"").startsWith("Err:")}networkDetail(t){return/^builtin-net-(main|rx|tx)$/.test(t.id)?function(t){const e=/^(Received|Sent|Combined) total: ([0-9]+(?:\.[0-9]+)?) G(?:i)?B \(since interface reset; ([^)\r\n]+)\)$/.exec(t||"");return e?{label:`${e[1]} total`,amount:e[2],interfaces:e[3]}:null}(this.details[t.id]):null}detailText(t){const e=this.details[t.id]||"";return this.detailError(t)?"Err: No result"===e?"No detail received":"Err: No output"===e?"Detail returned no data":"Err: Incomplete output"===e?"Incomplete detail response":e.startsWith("Err: Remote error")?"Remote detail command failed":"Err: Timeout"===e?"Detail command timed out":"Err: Check timeout"===e?"Detail check timed out":"Err: Connection"===e?"Unable to fetch details":"Detail command failed":So(e)}detailExitCode(t){const e=/^Err: Exit (\d+)$/.exec(this.details[t.id]||"");return e?` (${e[1]})`:""}iconUrl(t){return(null==t?void 0:t.startsWith("data:image/"))?this.sanitizer.bypassSecurityTrustUrl(t):t}collapsedMetric(t){if(!1!==t.enabled)return"overview"===t.mode?To(t.main,this.results)?t.main:void 0:Eo(t,this.results).find(e=>{var n;return e.id===(null===(n=this.selections.get(t.id))||void 0===n?void 0:n.id)})}updateCarousel(t,e){for(const n of this.visibleGroups){if("carousel"!==n.mode)continue;let i=this.selections.get(n.id);i||(i={since:t},this.selections.set(n.id,i)),Eo(n,this.results).some(t=>t.id===i.id)?this.hoveredGroup===n.id?i.since=t:e&&t-i.since>=1e3*Math.max(1,n.interval||3)&&(i.id=No(n,this.results,i.id),i.since=t):(i.id=No(n,this.results,i.id),i.since=t)}}expanded(t,e){return"vertical"===t.layout?this.hoveredGroup===t.id:this.hoveredMetric===e.id}enterMetric(t){this.hoveredMetric=t.id,this.refreshDetails()}leaveMetric(t){this.hoveredMetric===t.id&&(this.hoveredMetric=null)}enterChild(t,e){"vertical"!==t.layout&&this.enterMetric(e)}enterGroup(t,e){clearTimeout(this.closeTimer),this.hoveredGroup=t.id,this.anchor=e.currentTarget,this.positionPopup(),this.refreshDetails()}keepGroup(t){clearTimeout(this.closeTimer),this.hoveredGroup=t.id}leaveGroup(t){this.closeTimer=setTimeout(()=>{this.hoveredGroup===t.id&&(this.hoveredGroup=null,this.hoveredMetric=null,this.cdr.markForCheck())},"static"===t.mode?0:100)}blurGroup(t,e){e.currentTarget.contains(e.relatedTarget)||this.leaveGroup(t)}closeHover(){clearTimeout(this.closeTimer),this.hoveredMetric=null,this.hoveredGroup=null}positionPopup(){if(!this.anchor)return;const t=this.anchor.getBoundingClientRect(),e=Math.max(120,Math.min(560,window.innerWidth-16)),n=this.groups.find(t=>t.id===this.hoveredGroup),i=Math.min(380,54+38*this.allMetrics(n||{children:[]}).length),a=t.top>=Math.min(i,140),s=Math.max(70,a?t.top-12:window.innerHeight-t.bottom-12);this.popup={left:Math.max(8,Math.min(t.left,window.innerWidth-e-8)),top:a?Math.max(8,t.top-Math.min(i,s)):t.bottom,width:e,maxHeight:Math.min(i,s)}}async refreshDetails(){if(this.detailRequest||!this.session||!1===this.session.open)return;const t=this.visibleGroups.find(t=>t.id===this.hoveredGroup),e=[...this.visibleMetrics,...this.visibleGroups.reduce((t,e)=>t.concat(this.allMetrics(e)),[])],n=(!t||"static"===t.mode&&"vertical"!==t.layout?e.filter(t=>t.id===(this.hoveredMetric||this.autoDetailMetric)):this.allMetrics(t)).filter(t=>{var e;return null===(e=t.detailCommand)||void 0===e?void 0:e.trim()});if(!n.length)return;this.detailRequest=!0,this.lastDetailsAt=Date.now();const i=this.generation;try{const t=await this.service.fetchDetails(this.session,n);this.destroyed||i!==this.generation||(this.details=Object.assign(Object.assign({},this.details),t),this.cdr.markForCheck())}catch(t){}finally{this.detailRequest=!1}}ngOnDestroy(){var t;this.destroyed=!0,this.generation++,clearInterval(this.timer),clearTimeout(this.closeTimer),null===(t=this.portal)||void 0===t||t.remove()}};b([(0,y.Input)(),v("design:type",Array)],Oo.prototype,"metrics",void 0),b([(0,y.Input)(),v("design:type",Array)],Oo.prototype,"groups",void 0),b([(0,y.Input)(),v("design:type",Array)],Oo.prototype,"builtinOrder",void 0),b([(0,y.Input)(),v("design:type",Object)],Oo.prototype,"stats",void 0),b([(0,y.Input)(),v("design:type",Object)],Oo.prototype,"session",void 0),b([(0,y.Input)(),v("design:type",String)],Oo.prototype,"autoDetailMetric",void 0),b([(0,y.ViewChild)("groupPopup"),v("design:type",y.ElementRef)],Oo.prototype,"groupPopup",void 0),b([(0,y.ViewChildren)("carouselSlot"),v("design:type",y.QueryList)],Oo.prototype,"carouselSlots",void 0),b([(0,y.HostListener)("keydown.escape"),v("design:type",Function),v("design:paramtypes",[]),v("design:returntype",void 0)],Oo.prototype,"closeHover",null),b([(0,y.HostListener)("window:resize"),v("design:type",Function),v("design:paramtypes",[]),v("design:returntype",void 0)],Oo.prototype,"positionPopup",null),Oo=b([(0,y.Component)({selector:"server-stats-metric-strip",template:'\n <ng-template #value let-metric let-expanded="expanded">\n <span class="metric-label" [attr.title]="metric.label | translate">\n <svg *ngIf="svgPath(metric.icon)" viewBox="0 0 24 24" aria-hidden="true"><path [attr.d]="svgPath(metric.icon)"></path></svg>\n <img *ngIf="isUrl(metric.icon)" [src]="iconUrl(metric.icon)" alt="">\n <i *ngIf="isFa(metric.icon)" [class]="iconClass(metric.icon)" aria-hidden="true"></i>\n <span>{{metric.label | translate}}</span>\n </span>\n <span class="metric-reading">\n <span class="meter" *ngIf="metric.type === \'progress\' && status(metric) === \'ok\'">\n <span [style.width.%]="progress(metric)" [style.background]="color(metric)"></span>\n </span>\n <span class="metric-value" [style.color]="color(metric)">{{status(metric) === \'unavailable\' ? (result(metric).value | translate) : displayValue(metric)}}<span *ngIf="status(metric) === \'ok\'">{{suffix(metric)}}</span></span>\n </span>\n <span class="metric-detail" *ngIf="expanded && metric.detailCommand && status(metric) === \'ok\'"\n [class.detail-error]="detailError(metric)" [style.color]="detailError(metric) ? colors.red : color(metric)"\n [attr.title]="detailError(metric) ? details[metric.id] : networkDetail(metric) ? ((\'Since interface creation or counter reset\' | translate) + \' · \' + networkDetail(metric).interfaces) : null">\n <span class="network-detail" *ngIf="networkDetail(metric) as network; else ordinaryDetail"><span>{{network.label | translate}} </span><span class="network-amount">{{network.amount}}</span><span class="network-unit"> GB</span></span>\n <ng-template #ordinaryDetail>\n <span class="numeric-ratio" *ngIf="detailRatio(metric) as ratio; else plainDetail"><span class="ratio-numerator">{{ratio.numerator}}</span><span class="ratio-slash">/</span><span class="ratio-denominator">{{ratio.denominator}}</span><span class="ratio-unit">{{ratio.suffix ? \' \' + ratio.suffix : \'\'}}</span></span>\n <ng-template #plainDetail>{{detailText(metric) | translate}}{{detailExitCode(metric)}}</ng-template>\n </ng-template>\n </span>\n </ng-template>\n\n <ng-container *ngFor="let item of visibleItems; trackBy: trackId">\n <div *ngIf="item.metric as metric" class="single metric-row" tabindex="0"\n (mouseenter)="enterMetric(metric)" (mouseleave)="leaveMetric(metric)"\n (focusin)="enterMetric(metric)" (focusout)="leaveMetric(metric)"\n [attr.aria-label]="(metric.label || metric.id) | translate">\n <ng-container *ngTemplateOutlet="value; context: { $implicit: metric, expanded: hoveredMetric === metric.id || autoDetailMetric === metric.id }"></ng-container>\n </div>\n\n <div *ngIf="item.group as group" class="metric-group" tabindex="0"\n [style.--ratio-left-width]="ratioColumnWidth(group, \'numerator\')" [style.--ratio-right-width]="ratioColumnWidth(group, \'denominator\')"\n [style.--ratio-unit-width]="ratioUnitWidth(group)"\n [style.--detail-amount-width]="networkAmountWidth(group)"\n [class.vertical]="group.mode === \'static\' && group.layout === \'vertical\'"\n (mouseenter)="enterGroup(group, $event)" (mouseleave)="leaveGroup(group)"\n (focusin)="enterGroup(group, $event)" (focusout)="blurGroup(group, $event)"\n [attr.aria-label]="(group.label || \'Metric group\') | translate"\n [attr.aria-expanded]="group.mode !== \'static\' ? hoveredGroup === group.id : null">\n <ng-container *ngIf="group.mode === \'static\'">\n <div *ngFor="let metric of allMetrics(group); trackBy: trackId" class="metric-row" tabindex="0" [class.child-row]="metric.id !== group.main?.id"\n (mouseenter)="enterChild(group, metric)" (mouseleave)="leaveMetric(metric)"\n (focusin)="enterChild(group, metric)" (focusout)="leaveMetric(metric)">\n <ng-container *ngTemplateOutlet="value; context: { $implicit: metric, expanded: expanded(group, metric) }"></ng-container>\n </div>\n </ng-container>\n <ng-container *ngIf="group.mode !== \'static\'">\n <div #carouselSlot class="collapsed-slot" [class.carousel-slot]="group.mode === \'carousel\'" [attr.data-carousel-group]="group.mode === \'carousel\' ? group.id : null">\n <div class="carousel-measures" *ngIf="group.mode === \'carousel\'" aria-hidden="true">\n <div class="carousel-measure metric-row" aria-hidden="true" *ngFor="let candidate of carouselCandidates(group); trackBy: trackId">\n <ng-container *ngTemplateOutlet="value; context: { $implicit: candidate, expanded: false }"></ng-container>\n </div>\n </div>\n <div class="metric-row collapsed-row" [class.carousel-active]="group.mode === \'carousel\'" *ngIf="collapsedMetric(group) as metric; else empty">\n <ng-container *ngTemplateOutlet="value; context: { $implicit: metric, expanded: false }"></ng-container>\n </div>\n <ng-template #empty><span class="empty">{{group.emptyText || (\'No available items\' | translate)}}</span></ng-template>\n </div>\n <span class="expand-hint" aria-hidden="true">▴</span>\n <div *ngIf="hoveredGroup === group.id" #groupPopup class="group-details" role="region"\n [style.--ratio-left-width]="ratioColumnWidth(group, \'numerator\')" [style.--ratio-right-width]="ratioColumnWidth(group, \'denominator\')"\n [style.--ratio-unit-width]="ratioUnitWidth(group)"\n [style.--detail-amount-width]="networkAmountWidth(group)"\n [style.left.px]="popup.left" [style.top.px]="popup.top" [style.max-height.px]="popup.maxHeight"\n [style.max-width.px]="popup.width" (mouseenter)="keepGroup(group)" (mouseleave)="leaveGroup(group)">\n <div class="details-title">{{(group.label || \'Metric group\') | translate}}</div>\n <div class="detail-grid">\n <div *ngFor="let metric of allMetrics(group); trackBy: trackId" class="metric-row detail-row" [class.child-row]="metric.id !== group.main?.id">\n <ng-container *ngTemplateOutlet="value; context: { $implicit: metric, expanded: true }"></ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n ',styles:["\n :host { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; min-width: 0; font-size: 11px; color: #ddd; }\n .single, .metric-group { border-right: 1px solid #ffffff40; padding-right: 6px; }\n .metric-row { display: inline-flex; align-items: center; gap: 6px; min-height: 18px; max-width: 100%; }\n .metric-row:focus-visible, .metric-group:focus-visible { outline: 1px solid #5baaff; outline-offset: 3px; }\n .metric-label { display: inline-flex; gap: 4px; align-items: center; color: #bfc5cd; white-space: nowrap; }\n .metric-label svg, .metric-label img { width: 12px; height: 12px; object-fit: contain; fill: currentColor; }\n .metric-value { font: 600 11px monospace; font-variant-numeric: tabular-nums; text-align: right; white-space: pre-wrap; overflow-wrap: anywhere; }\n .metric-detail { font: 11px monospace; font-variant-numeric: tabular-nums; text-align: right; color: #d1d7e0; white-space: pre-wrap; overflow-wrap: anywhere; }\n .numeric-ratio { display: inline-grid; grid-template-columns: var(--ratio-left-width, max-content) 1ch var(--ratio-right-width, max-content) var(--ratio-unit-width, max-content); align-items: baseline; white-space: pre; }\n .ratio-unit { text-align: left; }\n .ratio-numerator, .ratio-denominator, .network-amount { text-align: right; }\n .ratio-slash { text-align: center; }\n .network-detail { display: inline-grid; grid-template-columns: max-content var(--detail-amount-width, max-content) max-content; align-items: baseline; white-space: pre; }\n .metric-detail:not(:empty) { border-left: 1px solid #ffffff40; padding-left: 6px; }\n .metric-reading { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }\n .meter { display: inline-block; height: 7px; width: 50px; flex: 0 0 50px; overflow: hidden; background: #ffffff26; border-radius: 4px; }\n .meter > span { display: block; height: 100%; transition: width .3s; }\n .metric-group { display: inline-flex; gap: 6px; align-items: center; position: relative; cursor: default; min-width: 0; max-width: 100%; box-sizing: border-box; }\n .metric-group:not(.vertical) > .metric-row + .metric-row { border-left: 1px solid #ffffff40; padding-left: 6px; }\n .collapsed-slot { min-width: 0; }\n .carousel-slot { flex: 0 1 auto; width: var(--carousel-width, max-content); max-width: calc(100vw - 48px); }\n .carousel-measures { position: absolute; left: 0; top: 0; width: 0; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; }\n .carousel-measure { position: absolute; visibility: hidden; pointer-events: none; width: max-content; max-width: none; }\n .carousel-measure .metric-value { white-space: pre; }\n .carousel-active { display: flex; flex-wrap: wrap; width: 100%; }\n .carousel-active .metric-label { white-space: normal; overflow-wrap: anywhere; min-width: 0; }\n .carousel-active .metric-reading { min-width: 0; max-width: 100%; }\n .carousel-active .metric-value { min-width: 0; }\n .metric-group.vertical { display: grid; grid-template-columns: max-content max-content minmax(0, max-content); align-items: center; gap: 0 6px; }\n .metric-group.vertical > .metric-row { display: contents; }\n .metric-group.vertical > .metric-row + .metric-row::before { content: ''; grid-column: 1 / -1; height: 1px; background: #ffffff40; }\n .metric-group.vertical .metric-label, .metric-group.vertical .metric-reading, .metric-group.vertical .metric-value, .metric-group.vertical .metric-detail { line-height: 12px; }\n .metric-group.vertical .metric-label { grid-column: 1; }\n .metric-group.vertical .metric-reading { grid-column: 2; }\n .metric-group.vertical .metric-detail { grid-column: 3; }\n .metric-group.vertical .child-row .metric-label { padding-left: 12px; }\n .expand-hint { color: #8493a5; font-size: 9px; }\n .group-details { position: fixed; z-index: 100000; box-sizing: border-box; width: max-content; background: #181c23; border: 1px solid #ffffff32; border-radius: 8px; padding: 10px 12px; box-shadow: 0 5px 24px #0009; overflow: auto; color: #ddd; }\n .details-title { font-size: 15px; font-weight: 600; padding-bottom: 7px; border-bottom: 1px solid #ffffff40; margin-bottom: 7px; }\n .detail-grid { display: grid; grid-template-columns: minmax(0, max-content) max-content minmax(0, max-content); align-items: center; gap: 4px 6px; }\n .detail-row { display: contents; }\n .detail-row .metric-label { grid-column: 1; min-width: 0; font-size: 14px; white-space: normal; overflow-wrap: anywhere; }\n .detail-row.child-row .metric-label { padding-left: 16px; }\n .detail-row .metric-label svg, .detail-row .metric-label img { width: 15px; height: 15px; flex: 0 0 15px; }\n .detail-row .metric-reading { grid-column: 2; }\n .detail-row .metric-value, .detail-row .metric-detail { font-size: 13px; }\n .detail-row .metric-detail { grid-column: 3; min-width: 0; }\n .detail-error { font-weight: 500; }\n .empty { color: #c7a66c; }\n "]}),v("design:paramtypes",[_o,y.ChangeDetectorRef,y.NgZone,Io.DomSanitizer])],Oo);let Ro=class{constructor(t,e,n,i,a,s){this.statsService=t,this.config=e,this.app=n,this.cdr=i,this.zone=a,this.sanitizer=s,this.visible=!1,this.paneVisible=!0,this.loading=!0,this.currentStats={cpu:0,mem:0,disk:0,netRx:0,netTx:0,custom:[]},this.customMetrics=[],this.metricGroups=[],this.builtinOrder=[],this.styleConfig={background:"rgba(20, 20, 20, 0.85)"},this.timerId=null,this.tabSubscription=null,this.configSubscriptions=[],this.boundSession=null,this.displaySession=null,this.destroyed=!1,this.viewRevision=0,this.useExternalController=!1,this.externalSessionResolver=null}bindToSession(t){this.destroyed||(this.boundSession=t,this.synchronizeSession(t),this.visible=this.canDisplay(t),this.cdr.detectChanges())}synchronizeSession(t){var e,n;const i=!t||!1!==(null===(n=(e=this.statsService).isPaneVisible)||void 0===n?void 0:n.call(e,t));if(this.paneVisible!==i&&(this.viewRevision++,this.paneVisible=i),this.applyMetricScope(t),this.displaySession===t)return;this.viewRevision++,this.displaySession=t;const a=!1!==(null==t?void 0:t.open)&&t?this.statsService.getCachedStats(t):null;this.currentStats=a||{cpu:0,mem:0,disk:0,netRx:0,netTx:0,custom:[]},this.loading=!a}applyMetricScope(t){var e,n,i,a,s;const o=(null===(i=null===(n=null===(e=this.config)||void 0===e?void 0:e.store)||void 0===n?void 0:n.plugin)||void 0===i?void 0:i.serverStats)||{},r=(null===(s=(a=this.statsService).getVisibleConfig)||void 0===s?void 0:s.call(a,t))||o;this.builtinOrder=o.builtinOrder||[],this.customMetrics=r.customMetrics||[],this.metricGroups=r.metricGroups||[]}canDisplay(t){var e,n,i;const a=null===(i=null===(n=null===(e=this.config)||void 0===e?void 0:e.store)||void 0===n?void 0:n.plugin)||void 0===i?void 0:i.serverStats;return!this.destroyed&&!!(null==a?void 0:a.enabled)&&!!t&&!1!==t.open&&this.resolveSession()===t}isCurrentRequest(t,e){var n,i;return this.viewRevision===e&&this.displaySession===t&&this.canDisplay(t)&&this.paneVisible&&!1!==(null===(i=(n=this.statsService).isPaneVisible)||void 0===i?void 0:i.call(n,t))}togglePaneVisibility(){const t=this.resolveSession();this.canDisplay(t)&&(this.statsService.setPaneVisible(t,!1===this.statsService.isPaneVisible(t)),this.viewRevision++,this.synchronizeSession(t),this.visible=!0,this.paneVisible||(this.loading=!1),this.cdr.detectChanges(),this.paneVisible&&this.forceUpdate())}renderExternalStats(t){if(this.canDisplay(this.boundSession)){if(this.synchronizeSession(this.boundSession),this.visible=!0,!this.paneVisible)return this.loading=!1,void this.cdr.detectChanges();t?(this.visible=!0,this.loading=!1,this.updateStats(t),this.currentStats=t):this.loading=!1,this.cdr.detectChanges()}}setExternalLoading(t){this.canDisplay(this.boundSession)&&(this.synchronizeSession(this.boundSession),this.visible=!0,this.loading=this.paneVisible&&t,this.cdr.detectChanges())}hideExternal(){this.destroyed||(this.viewRevision++,this.synchronizeSession(null),this.visible=!1,this.loading=!0,this.cdr.detectChanges())}resolveSession(){if(this.useExternalController&&this.externalSessionResolver)return this.externalSessionResolver();if(this.useExternalController||this.boundSession)return this.boundSession;let t=this.app.activeTab;return t?(t.focusedTab&&(t=t.focusedTab),t.session||null):null}ngOnInit(){this.loadConfig(),this.configSubscriptions.push(this.config.ready$.subscribe(()=>{this.loadConfig(),setTimeout(()=>this.checkAndFetch(),100)})),this.configSubscriptions.push(this.config.changed$.subscribe(()=>this.loadConfig())),this.configSubscriptions.push(this.statsService.statsUpdated$.subscribe(t=>{if(this.destroyed)return;const e=this.resolveSession();if(this.synchronizeSession(e),this.canDisplay(e))return this.paneVisible?void(this.canDisplay(e)&&this.statsService.getServerKey(e)===t.serverKey?(this.visible=!0,this.loading=!1,this.updateStats(t.stats),this.currentStats=t.stats,this.cdr.detectChanges()):this.cdr.detectChanges()):(this.loading=!1,void this.cdr.detectChanges());this.hideExternal()})),this.useExternalController||(!this.boundSession&&this.app.activeTabChange&&(this.tabSubscription=this.app.activeTabChange.subscribe(()=>{this.checkAndFetch()})),setTimeout(()=>this.checkAndFetch(),100),this.zone.runOutsideAngular(()=>{this.timerId=window.setInterval(()=>{this.zone.run(()=>{this.checkAndFetch()})},1e3)}))}loadConfig(){var t,e,n;if(this.destroyed)return;this.viewRevision++;const i=(null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||{};i.style&&(this.styleConfig=Object.assign(Object.assign({},this.styleConfig),i.style));const a=this.resolveSession();this.synchronizeSession(a),this.visible=this.canDisplay(a),this.visible||(this.visible=!1,this.synchronizeSession(null)),this.cdr.detectChanges()}forceUpdate(){this.checkAndFetch()}async checkAndFetch(){var t,e,n,i;if(this.destroyed||this.useExternalController)return;const a=null===(i=null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.enabled,s=this.resolveSession();if(this.synchronizeSession(s),a&&s&&!1!==s.open)if(s&&this.statsService.isPlatformSupport(s)){if(!this.paneVisible)return this.visible=!0,this.loading=!1,void this.cdr.detectChanges();this.visible||(this.visible=!0,this.loading=!0,this.cdr.detectChanges()),this.cdr.detectChanges();const t=this.viewRevision;try{const e=await this.statsService.fetchStats(s);if(!this.isCurrentRequest(s,t))return;this.loading=!1,e&&(this.updateStats(e),this.currentStats=e),this.cdr.detectChanges()}catch(e){if(!this.isCurrentRequest(s,t))return;this.loading=!1,this.cdr.detectChanges()}}else this.visible&&(this.visible=!1,this.loading=!0,this.cdr.detectChanges());else this.visible&&(this.visible=!1,this.loading=!0,this.cdr.detectChanges())}updateStats(t){this.currentStats=t}ngOnDestroy(){this.destroyed=!0,this.viewRevision++,this.visible=!1,this.displaySession=null,this.timerId&&clearInterval(this.timerId),this.tabSubscription&&this.tabSubscription.unsubscribe(),this.configSubscriptions.forEach(t=>t.unsubscribe())}};function Vo(t){return"string"!=typeof t?"":t.trim().replace(/\/+$/,"").replace(/\.git$/i,"").replace(/^https?:\/\//i,"https://")}function Fo(t){return"string"==typeof t?t.replace(/\r\n?/g,"\n").trim():""}function Po(t){return Fo(t).replace(/(\bprintf\s+["']%\.1f\/%\.1f )GiB(?=(?: available)?\\n["'])/g,"$1GB").replace(/(\bprintf\s+["'](?:Received|Sent|Combined) total: %\.3f )GiB(?= \(since interface reset; %s\)\\n["'])/g,"$1GB")}function Ao(t){var e,n;const i=Fo(t.checkCommand),a="output"===t.checkMode?"output":"exitCode",s=(null===(e=t.suffix)||void 0===e?void 0:e.trim())||("progress"===t.type?"%":"");return[Po(t.command),Po(t.detailCommand),i,i?a:"",i?(null!==(n=t.checkExpected)&&void 0!==n?n:"output"===a?"":"0").trim():"","GiB"===s?"GB":s]}function Ho(t,e){if("metric"===e)return Ao(t);const n=t;return[Ao(n.main),n.children.map(t=>JSON.stringify(Ao(t))).sort()]}function jo(t,e){var n,i,a;const s="selected"===(null===(n=t.displayScope)||void 0===n?void 0:n.mode)?["selected",[...new Set(t.displayScope.profileIds||[])].sort()]:["all"];return"selected"===(null===(i=t.displayScope)||void 0===i?void 0:i.mode)&&(null===(a=t.displayScope.excludedProfileIds)||void 0===a?void 0:a.length)&&s.push([...new Set(t.displayScope.excludedProfileIds)].sort()),JSON.stringify([e,Ho(t,e),s])}function Lo(t,e=!1){if("selected"!==(null==t?void 0:t.mode))return;const n=e?t.excludedProfileIds||[]:t.profileIds||[];return[...new Set(n.map(e=>{var n;return null===(n=t.profileNames)||void 0===n?void 0:n[e]}).filter(t=>"string"==typeof t&&Boolean(t.trim())))]}function Go(t){var e,n,i,a;const s="group"===t.kind?t.group:t.metric,o=s.presetOrigin;if((null==o?void 0:o.kind)===t.kind&&"string"==typeof o.id&&o.id&&"string"==typeof o.source)return{id:o.id,kind:t.kind,source:Vo(o.source)};const r=Vo(null===(e=t.source)||void 0===e?void 0:e.url),l=/^(?:legacy|preset)-\d+$/.test(t.id),c=null!==(n=t.profileNames)&&void 0!==n?n:Lo(s.displayScope),d=null!==(a=null!==(i=t.excludedProfileNames)&&void 0!==i?i:Lo(s.displayScope,!0))&&void 0!==a?a:[],p=void 0===c?["all"]:["selected",[...new Set(c)].sort()];return d.length&&p.push([...new Set(d)].sort()),{id:l||!r?function(t){let e=2166136261,n=5381;for(let i=0;i<t.length;i++){const a=t.charCodeAt(i);e=Math.imul(e^a,16777619),n=Math.imul(n,33)^a}return`content-${(e>>>0).toString(16)}-${(n>>>0).toString(16)}`}(JSON.stringify([t.kind,Ho(s,t.kind),p])):t.id,source:r,kind:t.kind}}Ro=b([(0,y.Component)({selector:"server-stats-bottom-bar",template:'\n <ng-container *ngIf="visible">\n <button type="button" class="pane-status-toggle" [class.is-collapsed]="!paneVisible"\n data-testid="pane-status-toggle" (click)="togglePaneVisibility()"\n [attr.aria-expanded]="paneVisible"\n [attr.aria-label]="(paneVisible ? \'Hide this pane status bar\' : \'Show this pane status bar\') | translate"\n [title]="(paneVisible ? \'Hide this pane status bar\' : \'Show this pane status bar\') | translate">\n <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M2 12h5l3-8 4 16 3-8h5"></path></svg>\n </button>\n <div class="stats-container" \n *ngIf="paneVisible"\n [style.background]="styleConfig.background">\n <div class="stat-section" *ngIf="loading">\n <div class="loading-text">Loading...</div>\n </div>\n \n <server-stats-metric-strip *ngIf="!loading" [metrics]="customMetrics" [groups]="metricGroups"\n [builtinOrder]="builtinOrder"\n [stats]="currentStats" [session]="displaySession"></server-stats-metric-strip>\n </div>\n </ng-container>\n ',styles:["\n :host { display: block; width: 100%; position: relative; box-sizing: border-box; }\n .stats-container {\n position: relative;\n width: 100%;\n box-sizing: border-box;\n backdrop-filter: blur(8px);\n padding: 1px 12px 1px 29px;\n display: flex;\n flex-wrap: wrap;\n gap: 4px 10px;\n justify-content: flex-start;\n align-items: center;\n border-top: 1px solid rgba(255,255,255,0.15);\n color: rgba(255,255,255,0.9);\n user-select: none;\n font-size: 11px;\n min-height: 22px;\n }\n .stat-section { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; height: 20px; }\n .loading-text { color: rgba(255,255,255,0.6); font-size: 10px; font-style: italic; }\n .pane-status-toggle {\n position: absolute; left: 4px; bottom: 1px; z-index: 5;\n display: inline-flex; align-items: center; justify-content: center;\n width: 20px; height: 20px; padding: 2px; margin: 0;\n border: 1px solid rgba(130,170,210,0.6); border-radius: 3px;\n color: #8fcaff; background: rgba(20,24,30,0.92); cursor: pointer;\n }\n .pane-status-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }\n .pane-status-toggle.is-collapsed { color: #b8c4d0; bottom: 2px; }\n .pane-status-toggle:hover { color: #fff; border-color: #8fcaff; }\n .pane-status-toggle:focus-visible { outline: 2px solid #8fcaff; outline-offset: 1px; }\n "]}),v("design:paramtypes",[_o,Ds.ConfigService,Ds.AppService,y.ChangeDetectorRef,y.NgZone,Io.DomSanitizer])],Ro);const Bo=t=>JSON.parse(JSON.stringify(t));function zo(t){return Boolean(t&&"object"==typeof t&&"string"==typeof t.command&&(void 0===t.type||"text"===t.type||"progress"===t.type))}function Uo(t,e){if(!zo(t))throw new Error("Invalid preset metric");return Object.assign(Object.assign({},Bo(t)),{id:"string"==typeof t.id?t.id:e,type:t.type||"text"})}function Wo(t){const e=Array.isArray(t)?t:null==t?void 0:t.presets;if(!Array.isArray(e)||e.length>1e3)throw new Error("Invalid preset library");return e.map((t,e)=>{if(!t||"object"!=typeof t)throw new Error("Invalid preset entry");if(!t.kind&&zo(t))return{id:`legacy-${e}`,kind:"metric",label:t.label||`Metric ${e+1}`,metric:Uo(t,`legacy-${e}`)};const n=Object.assign(Object.assign({},Bo(t)),{id:"string"==typeof t.id?t.id:`preset-${e}`,label:t.label||`Preset ${e+1}`});if("metric"===n.kind)n.metric=Uo(t.metric,`${n.id}-metric`);else{if("group"!==n.kind||!t.group||!Array.isArray(t.group.children))throw new Error("Invalid preset kind");n.group=Object.assign(Object.assign({},Bo(t.group)),{id:t.group.id||n.id,mode:["overview","carousel","static"].includes(t.group.mode)?t.group.mode:"overview",layout:"horizontal"===t.group.layout?"horizontal":"vertical",main:Uo(t.group.main,`${n.id}-main`),children:t.group.children.map((t,e)=>Uo(t,`${n.id}-${e}`))})}for(const t of["profileNames","excludedProfileNames"]){const e=n[t];if(void 0!==e){if(!Array.isArray(e)||e.some(t=>"string"!=typeof t))throw new Error("Invalid preset profile names");n[t]=[...new Set(e.map(t=>t.trim()).filter(Boolean))]}}return n})}let qo=0;function Zo(t,e,n=()=>`preset-${Date.now()}-${++qo}`){var i,a,s,o,r;const l=Wo([t])[0],c=[];let d={mode:"all",profileIds:[]};const p="group"===l.kind?null===(i=l.group)||void 0===i?void 0:i.displayScope:null===(a=l.metric)||void 0===a?void 0:a.displayScope,u=null!==(s=l.profileNames)&&void 0!==s?s:Lo(p),m=null!==(r=null!==(o=l.excludedProfileNames)&&void 0!==o?o:Lo(p,!0))&&void 0!==r?r:[],h=void 0===l.excludedProfileNames&&"selected"===(null==p?void 0:p.mode)&&(p.excludedProfileIds||[]).some(t=>{var e,n;return!(null===(n=null===(e=p.profileNames)||void 0===e?void 0:e[t])||void 0===n?void 0:n.trim())});if(void 0!==u||m.length){d={mode:"selected",profileIds:[],profileNames:{}};const t=[...e,...Qs(e).map(t=>({id:t.id,name:Ks(t)}))];for(const e of[...new Set(u||[])]){const n=t.filter(t=>{var n;return t.id&&(null===(n=t.name)||void 0===n?void 0:n.trim())===e.trim()});1===n.length?(d.profileIds.push(n[0].id),d.profileNames[n[0].id]=n[0].name):c.push(e)}let n=h;h&&c.push("Unnamed excluded pane / 未命名排除分屏"),m.length&&(d.excludedProfileIds=[]);for(const e of[...new Set(m)]){const i=t.filter(t=>{var n;return t.id&&(null===(n=t.name)||void 0===n?void 0:n.trim())===e.trim()});1===i.length?(d.excludedProfileIds.push(i[0].id),d.profileNames[i[0].id]=i[0].name):(c.push(e),n=!0)}n&&(d.profileIds=[])}const g=t=>{const e=Object.assign(Object.assign({},Bo(t)),{id:n(),displayScope:void 0});return delete e.presetOrigin,e},f=Go(l);if("metric"===l.kind)return{customMetrics:[Object.assign(Object.assign({},g(l.metric)),{displayScope:d,presetOrigin:f})],metricGroups:[],missingProfileNames:c};const b=l.group;return{customMetrics:[],metricGroups:[Object.assign(Object.assign({},Bo(b)),{id:n(),displayScope:d,presetOrigin:f,main:g(b.main),children:b.children.map(g)})],missingProfileNames:c}}mo("iowait"),mo("steal");const Ko="https://raw.githubusercontent.com/lishuainan0209/tabby-group-server-stats/main/presets.json",Yo=2097152,Jo={"invalid-url":"Only GitHub JSON file URLs are supported.",http:"GitHub returned an HTTP error.",timeout:"GitHub preset download timed out.","too-large":"GitHub preset file is too large.","invalid-json":"GitHub preset file is not valid JSON.","invalid-library":"GitHub preset file has an unsupported format.",network:"Unable to download presets from GitHub.",aborted:"GitHub preset download was canceled."};class Qo extends Error{constructor(t,e){super(Jo[t]),this.code=t,this.status=e,this.name="PresetGitHubError"}}var Xo;let tr=class{get builtinKeys(){return ro(this.config.store.plugin.serverStats.builtinOrder)}moveBuiltin(t,e){const n=this.builtinKeys,i=n.indexOf(t),a=i+e;i<0||a<0||a>=n.length||([n[i],n[a]]=[n[a],n[i]],this.config.store.plugin.serverStats.builtinOrder=n,this.save())}constructor(t,e,n){this.platform=t,this.config=e,this.sanitizer=n,this.defaultMetric={type:"text",color:"#00ff00",maxValue:100,suffix:"",icon:"",interval:void 0,timeout:void 0,colorRules:[],checkCommand:"",checkMode:"output",checkExpected:"",unavailableText:"",detailCommand:"",enabled:!0,visibleWhenUnavailable:!0,showWhenUnavailable:!0},this.currentMetric=Object.assign(Object.assign({},this.defaultMetric),{colorRules:[]}),this.editingIndex=-1,this.newSingleOpen=!1,this.editingBuiltinKey=null,this.currentGroup=null,this.editingGroupId=null,this.editingChildIndex=-1,this.expandedMemberId=null,this.draggedIndex=null,this.isDragging=!1,this.iconPickerOpen=!1,this.iconPresets=Hs,this.iconSearch="",this.iconCategory="all",this.scopeSearch="",this.collapsedScopeLayouts=new Set,this.presets=Wo(g(977)),this.loadingPresets=!1,this.fetchError=!1,this.presetSearch="",this.presetMessage="",this.presetMissingNames=[]}get scopeOwner(){return this.currentGroup||this.currentMetric}get scopeMode(){var t;return"selected"===(null===(t=this.scopeOwner.displayScope)||void 0===t?void 0:t.mode)?"selected":"all"}setScopeMode(t){const e=this.scopeOwner.displayScope;this.scopeOwner.displayScope={mode:t,profileIds:[...(null==e?void 0:e.profileIds)||[]],profileNames:Object.assign({},(null==e?void 0:e.profileNames)||{}),excludedProfileIds:[...(null==e?void 0:e.excludedProfileIds)||[]]}}get savedScopeProfiles(){const t=this.config.store.profiles;if(!Array.isArray(t))return[];const e=this.config.store.groups,n=new Map((Array.isArray(e)?e:[]).filter(t=>t&&"string"==typeof t.id&&"string"==typeof t.name).map(t=>[t.id,t.name])),i=new Set,a=t.filter(t=>!(!t||"string"!=typeof t.id||!t.id||i.has(t.id)||(i.add(t.id),0))).map(t=>({id:t.id,name:"string"==typeof t.name&&t.name?t.name:t.id,type:"string"==typeof t.type?t.type:"",group:n.get(t.group)||("string"==typeof t.group?t.group:"")}));for(const t of a)a.some(e=>e.id!==t.id&&e.name===t.name&&e.group===t.group)&&(t.disambiguator=t.id.slice(-8));a.sort((t,e)=>t.group.localeCompare(e.group)||t.name.localeCompare(e.name)||t.id.localeCompare(e.id));const s=Qs(t);return a.flatMap(t=>[t,...s.filter(e=>e.layoutId===t.id).map(e=>Object.assign(Object.assign({},e),{group:t.group,storedName:Ks(e)}))])}get scopeChoices(){const t=this.scopeSearch.trim().toLocaleLowerCase(),e=this.savedScopeProfiles,n=e=>`${e.group} ${e.name} ${e.layoutName||""}`.toLocaleLowerCase().includes(t);return e.filter(i=>t?n(i)||"split-layout"===i.type&&e.some(t=>t.layoutId===i.id&&n(t)):!i.layoutId||!this.collapsedScopeLayouts.has(i.layoutId))}paneNumber(t){return(t.path||[]).map(t=>t+1).join(".")}toggleScopeLayout(t){this.collapsedScopeLayouts.has(t)?this.collapsedScopeLayouts.delete(t):this.collapsedScopeLayouts.add(t)}get scopeSelectedProfiles(){const t=this.scopeOwner.displayScope,e=new Map(this.savedScopeProfiles.map(t=>[t.id,t]));return[...new Set((null==t?void 0:t.profileIds)||[])].map(n=>{var i;const a=e.get(n);return a?Object.assign(Object.assign({},a),{name:a.storedName||a.name,missing:!1}):{id:n,name:(null===(i=null==t?void 0:t.profileNames)||void 0===i?void 0:i[n])||n,type:"",group:"",missing:!0}})}get hasMissingScopeProfiles(){return this.scopeSelectedProfiles.some(t=>t.missing)}trackScopeChoice(t,e){return e.id}scopeChoiceSelected(t){var e;const n=this.scopeOwner.displayScope;if(null===(e=null==n?void 0:n.excludedProfileIds)||void 0===e?void 0:e.includes(t.id))return!1;const i=(null==n?void 0:n.profileIds)||[];return i.includes(t.id)||Boolean(t.layoutId&&(i.includes(t.layoutId)||(t.connectionIds||[t.profileId]).some(t=>!!t&&i.includes(t)&&(this.config.store.profiles||[]).some(e=>e.id===t))))}isScopeSelected(t){const e=this.savedScopeProfiles,n=e.find(e=>e.id===t);if(!n)return!1;const i="split-layout"===n.type?e.filter(e=>e.layoutId===t):[];return i.length?i.every(t=>this.scopeChoiceSelected(t)):this.scopeChoiceSelected(n)}isScopeIndeterminate(t){const e=this.savedScopeProfiles.filter(e=>e.layoutId===t);return e.some(t=>this.scopeChoiceSelected(t))&&!e.every(t=>this.scopeChoiceSelected(t))}toggleScopeProfile(t,e){const n=this.scopeOwner.displayScope,i=new Set((null==n?void 0:n.profileIds)||[]),a=new Set((null==n?void 0:n.excludedProfileIds)||[]),s=Object.assign({},(null==n?void 0:n.profileNames)||{}),o=this.savedScopeProfiles,r=o.find(e=>e.id===t);if("split-layout"===(null==r?void 0:r.type)){const n=o.filter(e=>e.layoutId===t);if(e)i.add(t),s[t]=r.name,n.forEach(t=>a.delete(t.id));else{i.delete(t);for(const t of n)i.delete(t.id),a.add(t.id),s[t.id]=t.storedName||t.name}}else if(e){if(!r)return;const t=r.profileId||r.id;for(const e of o.filter(e=>"split-layout"!==e.type&&(e.profileId||e.id)===t))i.add(e.id),a.delete(e.id),s[e.id]=e.storedName||e.name}else{if(r&&!r.layoutId)for(const e of o.filter(e=>e.layoutId&&(e.connectionIds||[e.profileId]).includes(t)&&this.scopeChoiceSelected(e)))i.add(e.id),s[e.id]=e.storedName||e.name;i.delete(t),(null==r?void 0:r.layoutId)?(a.add(t),s[t]=r.storedName||r.name):(a.delete(t),delete s[t])}for(const t of Object.keys(s))i.has(t)||a.has(t)||delete s[t];this.scopeOwner.displayScope={mode:"selected",profileIds:[...i],excludedProfileIds:[...a],profileNames:s}}removeScopeProfile(t){this.toggleScopeProfile(t,!1)}serializeScope(t){var e;if(!t)return;const n=[...new Set((t.profileIds||[]).filter(t=>"string"==typeof t&&Boolean(t)))],i=[...new Set((t.excludedProfileIds||[]).filter(t=>"string"==typeof t&&Boolean(t)))],a=new Map(this.savedScopeProfiles.map(t=>[t.id,t.storedName||t.name])),s={};for(const o of[...n,...i])s[o]=a.get(o)||(null===(e=t.profileNames)||void 0===e?void 0:e[o])||o;return{mode:"selected"===t.mode?"selected":"all",profileIds:n,excludedProfileIds:i,profileNames:s}}onDocumentClick(){this.iconPickerOpen&&(this.iconPickerOpen=!1)}toggleIconPicker(t){t.stopPropagation(),this.iconPickerOpen=!this.iconPickerOpen}get iconCategories(){return[...new Set(this.iconPresets.map(t=>t.category||"Other"))]}get filteredIconPresets(){const t=this.iconSearch.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);return this.iconPresets.filter(e=>{const n=e.category||"Other";if("all"!==this.iconCategory&&n!==this.iconCategory)return!1;const i=Array.isArray(e.keywords)?e.keywords.join(" "):e.keywords||"",a=`${e.name} ${e.label} ${n} ${i}`.toLocaleLowerCase();return t.every(t=>a.includes(t))})}trackIconPreset(t,e){return e.name}selectPresetIcon(t){this.currentMetric.icon=t,this.iconPickerOpen=!1}getIconClass(t){return As(t)}getSvgPath(t){return Rs(t)}isUrl(t){return Fs(t)}isFa(t){return Ps(t)}getSafeIconUrl(t){return t?t.startsWith("data:image/")?this.sanitizer.bypassSecurityTrustUrl(t):t:""}clearIcon(){this.currentMetric.icon="",this.iconPickerOpen=!1}onSvgFileSelected(t){var e,n;const i=null===(n=null===(e=t.target)||void 0===e?void 0:e.files)||void 0===n?void 0:n[0];if(!i)return;const a=new FileReader;a.onload=t=>{var e;const n=null===(e=t.target)||void 0===e?void 0:e.result;n&&(this.currentMetric.icon=n,this.iconPickerOpen=!1)},a.readAsDataURL(i),t.target.value=""}get defaultInterval(){var t,e,n,i;return(null===(i=null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.defaultInterval)||3}set defaultInterval(t){var e,n,i;if(!(null===(i=null===(n=null===(e=this.config)||void 0===e?void 0:e.store)||void 0===n?void 0:n.plugin)||void 0===i?void 0:i.serverStats))return;const a=Number(t);this.config.store.plugin.serverStats.defaultInterval=isNaN(a)||a<1?3:a}get debugLogging(){var t,e,n,i;return Boolean(null===(i=null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.debugLogging)}set debugLogging(t){var e;(null===(e=this.config)||void 0===e?void 0:e.store)&&(this.config.store.plugin||(this.config.store.plugin={}),this.config.store.plugin.serverStats||(this.config.store.plugin.serverStats={}),this.config.store.plugin.serverStats.debugLogging=Boolean(t))}get showDefaultIcons(){var t,e,n,i;return!1!==(null===(i=null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.showDefaultIcons)}set showDefaultIcons(t){var e;(null===(e=this.config)||void 0===e?void 0:e.store)&&(this.config.store.plugin||(this.config.store.plugin={}),this.config.store.plugin.serverStats||(this.config.store.plugin.serverStats={}),this.config.store.plugin.serverStats.showDefaultIcons=Boolean(t))}addColorRule(){this.currentMetric.colorRules||(this.currentMetric.colorRules=[]),this.currentMetric.colorRules.push({operator:"==",value:"",color:Es.red})}removeColorRule(t){this.currentMetric.colorRules&&this.currentMetric.colorRules.splice(t,1)}get customMetrics(){return this.config.store.plugin.serverStats.customMetrics||[]}get metricGroups(){return this.config.store.plugin.serverStats.metricGroups||[]}get metricEditorTitle(){return this.editingBuiltinKey&&!this.currentGroup?"Edit Built-in Metric":this.currentGroup?this.editingChildIndex<0?"Main Metric":"Child Metric":this.editingIndex<0?"Add New Metric":"Edit Metric"}uiText(t){var e,n;const i=this.config.store.language,a=String(i&&"auto"!==i?i:"undefined"!=typeof navigator?navigator.language:"en");return(null===(e=Ls[a])||void 0===e?void 0:e[t])||(null===(n=Ls[a.toLowerCase().startsWith("zh")?"zh-CN":"en"])||void 0===n?void 0:n[t])||t}groupModeLabel(t){return"carousel"===t?"Carousel":"static"===t?"Static":"Overview"}groupModeHelp(t){return"carousel"===t?"Rotate child metrics. Hover to pause and show the main metric and all children with details.":"static"===t?"Show the main metric and all children. Horizontal hover expands one member; vertical hover expands all members.":"Show the main metric. Hover to show the main metric and all children with details."}newId(t){return`${t}_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,12)}`}draftMetric(t){var e;return Object.assign(Object.assign(Object.assign(Object.assign({},this.defaultMetric),{id:this.newId("metric"),label:"",command:"",type:"text"}),JSON.parse(JSON.stringify(t||{}))),{checkMode:t?t.checkMode||"exitCode":"output",checkExpected:t?String(null!==(e=t.checkExpected)&&void 0!==e?e:"0"):"",enabled:!1!==(null==t?void 0:t.enabled),visibleWhenUnavailable:!1!==(null==t?void 0:t.visibleWhenUnavailable),showWhenUnavailable:!1!==(null==t?void 0:t.visibleWhenUnavailable)&&!1!==(null==t?void 0:t.showWhenUnavailable),colorRules:JSON.parse(JSON.stringify((null==t?void 0:t.colorRules)||[]))})}newSingle(){this.cancelEdit(),this.newSingleOpen=!0}newGroup(){this.cancelEdit(),this.currentGroup={id:this.newId("group"),label:"",mode:"overview",layout:"vertical",enabled:!0,interval:3,emptyText:"",main:this.draftMetric(),children:[]},this.selectGroupMetric(-1)}editGroup(t){const e=this.metricGroups[t];if(e){if(this.editingGroupId===e.id&&this.currentGroup)return this.expandedMemberId=null,void(this.iconPickerOpen=!1);this.cancelEdit(),this.editingGroupId=e.id,this.currentGroup=Object.assign(Object.assign({},JSON.parse(JSON.stringify(e))),{main:this.draftMetric(e.main),children:(e.children||[]).map(t=>this.draftMetric(t))}),this.selectGroupMetric(-1),this.expandedMemberId=null}}editGroupMember(t,e=-1){const n=this.metricGroups[t];!n||e<-1||e>=n.children.length||(this.editGroup(t),this.selectGroupMetric(e))}toggleGroupMetric(t){if(!this.currentGroup)return;const e=t<0?this.currentGroup.main:this.currentGroup.children[t];e&&(this.expandedMemberId===e.id?(this.expandedMemberId=null,this.iconPickerOpen=!1):this.selectGroupMetric(t))}toggleMetricEnabled(t){const e=this.customMetrics[t];e&&(e.enabled=!1===e.enabled,this.currentGroup||this.currentMetric.id!==e.id||(this.currentMetric.enabled=e.enabled),this.save())}toggleGroupEnabled(t){var e;const n=this.metricGroups[t];n&&(n.enabled=!1===n.enabled,(null===(e=this.currentGroup)||void 0===e?void 0:e.id)===n.id&&(this.currentGroup.enabled=n.enabled),this.save())}toggleMemberEnabled(t){t.enabled=!1===t.enabled}setUnavailableVisibility(t){this.currentMetric.visibleWhenUnavailable=t,t||(this.currentMetric.showWhenUnavailable=!1)}selectGroupMetric(t){if(!this.currentGroup)return;const e=t<0?this.currentGroup.main:this.currentGroup.children[t];e&&(this.editingChildIndex=t,this.currentMetric=e,this.expandedMemberId=e.id,this.iconPickerOpen=!1)}addChild(){this.currentGroup&&(this.currentGroup.children.push(this.draftMetric()),this.selectGroupMetric(this.currentGroup.children.length-1))}removeChild(t){var e;const n=null===(e=this.currentGroup)||void 0===e?void 0:e.children[t];if(!n||!confirm(this.uiText("Delete this child metric?")+"\n\n"+(n.label||n.icon||this.uiText("Unnamed Metric"))))return;const i=this.currentMetric.id,a=null===this.expandedMemberId;this.currentGroup.children.splice(t,1),this.selectGroupMetric(this.currentGroup.children.findIndex(t=>t.id===i)),a&&(this.expandedMemberId=null)}moveChild(t,e){if(!this.currentGroup)return;const n=this.currentGroup.children,i=t+e;if(i<0||i>=n.length)return;const a=this.currentMetric.id,s=null===this.expandedMemberId,o=n.splice(t,1)[0];n.splice(i,0,o),this.selectGroupMetric(n.findIndex(t=>t.id===a)),s&&(this.expandedMemberId=null)}moveGroup(t,e){const n=[...this.metricGroups],i=t+e;if(i<0||i>=n.length)return;const a=n.splice(t,1)[0];n.splice(i,0,a),this.config.store.plugin.serverStats.metricGroups=n,this.save()}removeGroup(t){const e=this.metricGroups[t];e&&confirm(this.uiText("Delete this group and all of its metrics?")+"\n\n"+(e.label||e.main.label||this.uiText("Metric Group")))&&(this.config.store.plugin.serverStats.metricGroups=this.metricGroups.filter(t=>t.id!==e.id),this.editingGroupId===e.id&&this.cancelEdit(),this.save())}positiveOrAbsent(t){return null==t||""===t||Number.isFinite(Number(t))&&Number(t)>=1}isMetricValid(t){var e,n,i,a,s;if(!(null===(e=t.label)||void 0===e?void 0:e.trim())&&!(null===(n=t.icon)||void 0===n?void 0:n.trim())||!(null===(i=t.command)||void 0===i?void 0:i.trim()))return!1;if(!this.positiveOrAbsent(t.interval)||!this.positiveOrAbsent(t.timeout))return!1;if("progress"===t.type&&!this.positiveOrAbsent(t.maxValue))return!1;if((null===(a=t.checkCommand)||void 0===a?void 0:a.trim())&&"output"!==t.checkMode){const e=String(null!==(s=t.checkExpected)&&void 0!==s?s:"0").trim();if(!/^\d+$/.test(e)||Number(e)>255)return!1}return!0}isGroupValid(){return Boolean(this.currentGroup&&this.positiveOrAbsent(this.currentGroup.interval)&&[this.currentGroup.main,...this.currentGroup.children].every(t=>this.isMetricValid(t)))}serializeMetric(t,e=!1){var n,i,a,s;const o=t=>null==t||""===t?void 0:Number(t);return Object.assign(Object.assign({},JSON.parse(JSON.stringify(t))),{id:t.id||this.newId("metric"),label:(null===(n=t.label)||void 0===n?void 0:n.trim())||"",command:t.command,type:t.type||"text",icon:(null===(i=t.icon)||void 0===i?void 0:i.trim())||void 0,color:t.color||"#00ff00",maxValue:o(t.maxValue),interval:o(t.interval),timeout:o(t.timeout),checkCommand:t.checkCommand||"",checkMode:t.checkMode||"exitCode",checkExpected:String(null!==(a=t.checkExpected)&&void 0!==a?a:"0"),unavailableText:(null===(s=t.unavailableText)||void 0===s?void 0:s.trim())||"Unavailable",detailCommand:t.detailCommand||"",enabled:!1!==t.enabled,visibleWhenUnavailable:!1!==t.visibleWhenUnavailable,showWhenUnavailable:!1!==t.visibleWhenUnavailable&&!1!==t.showWhenUnavailable,displayScope:e?void 0:this.serializeScope(t.displayScope),colorRules:JSON.parse(JSON.stringify(t.colorRules||[]))})}saveGroup(){var t;if(this.editingBuiltinKey)return void this.saveBuiltin();if(!this.currentGroup||!this.isGroupValid())return;const e=Object.assign(Object.assign({},this.currentGroup),{label:(null===(t=this.currentGroup.label)||void 0===t?void 0:t.trim())||"",interval:Number(this.currentGroup.interval)||3,displayScope:this.serializeScope(this.currentGroup.displayScope),main:this.serializeMetric(this.currentGroup.main,!0),children:this.currentGroup.children.map(t=>this.serializeMetric(t,!0))}),n=[...this.metricGroups],i=this.editingGroupId?n.findIndex(t=>t.id===this.editingGroupId):-1;i<0?n.push(e):n[i]=e,this.config.store.plugin.serverStats.metricGroups=n,this.save(),this.cancelEdit()}get defaultMetricsConfig(){return this.config.store.plugin.serverStats.defaultMetrics||(this.config.store.plugin.serverStats.defaultMetrics={cpu:!0,ram:!0,disk:!0,net:!0}),this.config.store.plugin.serverStats.defaultMetrics}builtinMain(t){const e=bo(t,this.config.store.plugin.serverStats);return"net"===t?e.main:e}builtinTitle(t){return bo(t,this.config.store.plugin.serverStats).label||t}hasBuiltinOverride(t){var e;return Boolean(null===(e=this.config.store.plugin.serverStats.defaultMetricOverrides)||void 0===e?void 0:e[t])}toggleBuiltinEnabled(t){this.defaultMetricsConfig[t]=!1===this.defaultMetricsConfig[t],this.save()}editBuiltin(t){if(this.editingBuiltinKey===t)return void(this.currentGroup&&(this.expandedMemberId=null,this.iconPickerOpen=!1));this.cancelEdit(),this.editingBuiltinKey=t;const e=bo(t,this.config.store.plugin.serverStats);if("net"===t){const t=JSON.parse(JSON.stringify(e));this.currentGroup=Object.assign(Object.assign({},t),{main:this.draftMetric(t.main),children:t.children.map(t=>this.draftMetric(t))}),this.selectGroupMetric(-1),this.expandedMemberId=null}else this.currentMetric=this.draftMetric(e)}restoreBuiltin(t){const e=this.config.store.plugin.serverStats.defaultMetricOverrides;e&&delete e[t],this.editingBuiltinKey===t&&this.cancelEdit(),this.save()}saveBuiltin(){var t;const e=this.editingBuiltinKey;if(!e||("net"===e?!this.isGroupValid():!this.isMetricValid(this.currentMetric)))return;const n=this.config.store.plugin.serverStats;n.defaultMetricOverrides=n.defaultMetricOverrides||{},n.defaultMetricOverrides[e]="net"===e?Object.assign(Object.assign({},this.currentGroup),{label:(null===(t=this.currentGroup.label)||void 0===t?void 0:t.trim())||"",interval:Number(this.currentGroup.interval)||3,displayScope:this.serializeScope(this.currentGroup.displayScope),main:this.serializeMetric(this.currentGroup.main,!0),children:this.currentGroup.children.map(t=>this.serializeMetric(t,!0))}):this.serializeMetric(this.currentMetric),this.save(),this.cancelEdit()}presetText(t,e){const n=this.config.store.language,i=n&&"auto"!==n?n:"undefined"!=typeof navigator?navigator.language:"en",a=String(i).toLowerCase().startsWith("zh")?"zh":"en",s="label"===e?t.labels:t.descriptions;return(null==s?void 0:s[a])||t[e]||""}presetMain(t){return"group"===t.kind?t.group.main:t.metric}trackPreset(t,e){return e.id}get filteredPresets(){const t=this.presetSearch.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);return this.presets.filter(e=>{const n=[e.label,e.description,...Object.values(e.labels||{}),...Object.values(e.descriptions||{}),...e.profileNames||[]].join(" ").toLocaleLowerCase();return t.every(t=>n.includes(t))})}loadPresetLibrary(t){const e=Wo(t),n=new Set(e.map(t=>t.id));this.presets=[...e,...this.presets.filter(t=>!n.has(t.id))],this.presetSearch="",this.presetMissingNames=[],this.fetchError=!1,this.presetMessage="Library loaded. Review an item and click Add to enable it."}openPresetSource(){this.platform.openExternal(Ko)}async fetchPresets(){if(!this.loadingPresets){this.loadingPresets=!0,this.fetchError=!1,this.presetMessage="",this.presetMissingNames=[];try{const t=await async function(t=Ko,e={}){var n,i,a;const s=function(t=Ko){if("string"!=typeof t)throw new Qo("invalid-url");let e;try{e=new URL(t.trim()||Ko)}catch(t){throw new Qo("invalid-url")}if("https:"!==e.protocol||e.username||e.password||e.port)throw new Qo("invalid-url");if("github.com"===e.hostname){if(!/^\/[^/]+\/[^/]+\/blob\/[^/]+\/.+\.json$/i.test(e.pathname))throw new Qo("invalid-url");e.hostname="raw.githubusercontent.com",e.pathname=e.pathname.replace(/^(\/[^/]+\/[^/]+)\/blob\//,"$1/")}else if("raw.githubusercontent.com"!==e.hostname||!/^\/[^/]+\/[^/]+\/[^/]+\/.+\.json$/i.test(e.pathname))throw new Qo("invalid-url");try{if(e.pathname.split("/").some(t=>/[\x00-\x1f\x7f\\]/.test(decodeURIComponent(t))))throw new Error("Invalid path")}catch(t){throw new Qo("invalid-url")}return e.search="",e.hash="",e.href}(t);if(null===(n=e.signal)||void 0===n?void 0:n.aborted)throw new Qo("aborted");const o=Number.isFinite(e.timeoutMs)&&e.timeoutMs>0?Math.min(e.timeoutMs,12e4):15e3,r=Number.isFinite(e.maxBytes)&&e.maxBytes>0?Math.min(e.maxBytes,Yo):Yo,l=new AbortController;let c,d,p=()=>{};const u=new Promise((t,e)=>{p=e}),m=t=>{d||(d=t,l.abort(),c&&c.cancel().catch(()=>{}),p(t))},h=()=>m(new Qo("aborted"));null===(i=e.signal)||void 0===i||i.addEventListener("abort",h,{once:!0});const g=setTimeout(()=>m(new Qo("timeout")),o),f=async()=>{const t=e.fetch||fetch,n=await t(s,{method:"GET",credentials:"omit",redirect:"error",cache:"no-store",referrerPolicy:"no-referrer",headers:{Accept:"application/json, text/plain;q=0.9"},signal:l.signal});if(d)throw d;if(!n.ok)throw new Qo("http",n.status);const i=n.headers.get("content-length");if(i&&/^\d+$/.test(i)&&Number(i)>r)throw n.body&&n.body.cancel().catch(()=>{}),new Qo("too-large");if(!n.body||"function"!=typeof n.body.getReader)throw new Qo("invalid-json");c=n.body.getReader();const a=new TextDecoder("utf-8",{fatal:!0});let o,p=0,u="";for(;;){const{value:t,done:e}=await c.read();if(d)throw d;if(e)break;if(p+=t.byteLength,p>r)throw new Qo("too-large");try{u+=a.decode(t,{stream:!0})}catch(t){throw new Qo("invalid-json")}}try{u+=a.decode(),o=JSON.parse(u)}catch(t){throw new Qo("invalid-json")}try{return Wo(o)}catch(t){throw new Qo("invalid-library")}};try{return await Promise.race([f(),u])}catch(t){if(l.abort(),c&&c.cancel().catch(()=>{}),d)throw d;if(t instanceof Qo)throw t;throw new Qo("network")}finally{clearTimeout(g),null===(a=e.signal)||void 0===a||a.removeEventListener("abort",h)}}();this.loadPresetLibrary(t)}catch(t){this.fetchError=!0,this.presetMessage=t instanceof Qo?t.message:"Unable to download presets from GitHub."}finally{this.loadingPresets=!1}}}importPresetFile(t){var e,n;const i=null===(n=null===(e=t.target)||void 0===e?void 0:e.files)||void 0===n?void 0:n[0];if(!i)return;this.fetchError=!1;const a=new FileReader;a.onload=()=>{try{this.loadPresetLibrary(JSON.parse(String(a.result||"")))}catch(t){this.presetMessage="Unable to read this preset library. Choose a valid JSON library.",this.presetMissingNames=[]}},a.onerror=()=>{this.presetMessage="Unable to read this preset library. Choose a valid JSON library."},a.readAsText(i),t.target.value=""}currentPresetLibrary(){const t=new Map(this.savedScopeProfiles.map(t=>[t.id,t.storedName||t.name])),e=e=>{var n;return((null===(n=e.displayScope)||void 0===n?void 0:n.profileIds)||[]).map(n=>{var i,a;const s=t.get(n)||(null===(a=null===(i=e.displayScope)||void 0===i?void 0:i.profileNames)||void 0===a?void 0:a[n]);return"string"==typeof s?s.trim():""}).filter(Boolean)},n=(t,n)=>{var i;const a=JSON.parse(JSON.stringify(t)),s=a.presetMetadata;return delete a.presetMetadata,Object.assign(Object.assign({id:t.id,kind:n,label:t.label||("metric"===n?t.icon||"Metric":t.main.label||"Group"),labels:(null==s?void 0:s.importedLabel)===t.label?s.labels:void 0,description:null==s?void 0:s.description,descriptions:null==s?void 0:s.descriptions,source:null==s?void 0:s.source,audience:null==s?void 0:s.audience},"metric"===n?{metric:a}:{group:a}),{profileNames:"selected"===(null===(i=t.displayScope)||void 0===i?void 0:i.mode)?e(t):void 0})};return function(t){const e=Wo(t).map(t=>{var e,n,i;const a="group"===t.kind?t.group:t.metric;if("selected"===(null===(e=a.displayScope)||void 0===e?void 0:e.mode)&&(t.profileNames=null!==(n=t.profileNames)&&void 0!==n?n:Lo(a.displayScope),t.excludedProfileNames=null!==(i=t.excludedProfileNames)&&void 0!==i?i:Lo(a.displayScope,!0),(a.displayScope.excludedProfileIds||[]).some(t=>{var e,n,i;return!(null===(i=null===(n=null===(e=a.displayScope)||void 0===e?void 0:e.profileNames)||void 0===n?void 0:n[t])||void 0===i?void 0:i.trim())})&&(t.profileNames=[])),a.displayScope={mode:void 0===t.profileNames?"all":"selected",profileIds:[]},t.group)for(const e of[t.group.main,...t.group.children])delete e.displayScope;return t});return JSON.stringify(e,null,2)+"\n"}([...this.customMetrics.map(t=>n(t,"metric")),...this.metricGroups.map(t=>n(t,"group"))])}exportCurrentPresets(){const t=URL.createObjectURL(new Blob([this.currentPresetLibrary()],{type:"application/json;charset=utf-8"})),e=document.createElement("a");e.href=t,e.download="tabby-metric-presets.json",e.click(),setTimeout(()=>URL.revokeObjectURL(t),1e3),this.presetMessage="Label library exported.",this.presetMissingNames=[]}isPresetAdded(t){return!!function(t,e,n=[]){var i;const a=Wo([t])[0],s=Go(a),o="metric"===a.kind?e.customMetrics||[]:e.metricGroups||[],r=o.find(t=>{var e;return(null===(e=t.presetOrigin)||void 0===e?void 0:e.kind)===s.kind&&t.presetOrigin.id===s.id&&Vo(t.presetOrigin.source)===s.source});if(r)return{kind:a.kind,id:r.id};const l=Zo(a,n,()=>"comparison-only"),c="metric"===a.kind?l.customMetrics[0]:l.metricGroups[0],d=jo(c,a.kind);if("selected"===(null===(i=c.displayScope)||void 0===i?void 0:i.mode)&&!c.displayScope.profileIds.length)return null;const p=o.find(t=>{var e,n;if(t.presetOrigin)return!1;const i=Vo(null===(n=null===(e=t.presetMetadata)||void 0===e?void 0:e.source)||void 0===n?void 0:n.url);return!(i&&s.source&&i!==s.source||jo(t,a.kind)!==d)});return p?{kind:a.kind,id:p.id}:null}(t,this.config.store.plugin.serverStats,this.config.store.profiles||[])}addPreset(t){const e="kind"in t?t:Wo([t])[0];if(!e)return;if(this.isPresetAdded(e))return void(this.presetMessage="This preset is already added. Edit or enable the existing item.");const n=Zo(e,this.config.store.profiles||[],()=>this.newId("metric"));e.labels&&(n.customMetrics.forEach(t=>{t.label=this.presetText(e,"label")}),n.metricGroups.forEach(t=>{t.label=this.presetText(e,"label")}));for(const t of[...n.customMetrics,...n.metricGroups])t.presetMetadata={importedLabel:t.label||"",labels:e.labels,description:e.description,descriptions:e.descriptions,source:e.source,audience:e.audience};const i=this.config.store.plugin.serverStats;i.customMetrics=[...i.customMetrics||[],...n.customMetrics],i.metricGroups=[...i.metricGroups||[],...n.metricGroups],this.presetMissingNames=n.missingProfileNames,this.presetMessage=n.missingProfileNames.length?"Added with a restricted scope. Choose the missing connections before use.":"Preset added.",this.save()}editMetric(t){this.cancelEdit(),this.editingIndex=t,this.iconPickerOpen=!1,this.currentMetric=this.draftMetric(this.customMetrics[t])}cancelEdit(){this.editingBuiltinKey=null,this.scopeSearch="",this.iconSearch="",this.iconCategory="all",this.currentGroup=null,this.editingGroupId=null,this.newSingleOpen=!1,this.editingChildIndex=-1,this.expandedMemberId=null,this.editingIndex=-1,this.iconPickerOpen=!1,this.currentMetric=Object.assign(Object.assign({},this.defaultMetric),{colorRules:[]})}saveMetric(){if(this.editingBuiltinKey)return void this.saveBuiltin();if(this.currentGroup)return void this.saveGroup();if(!this.isMetricValid(this.currentMetric))return;this.config.store.plugin.serverStats.customMetrics||(this.config.store.plugin.serverStats.customMetrics=[]);const t=this.serializeMetric(this.currentMetric);if(-1===this.editingIndex)this.config.store.plugin.serverStats.customMetrics.push(t);else{const e=this.customMetrics.findIndex(e=>e.id===t.id);if(e<0)return;this.config.store.plugin.serverStats.customMetrics[e]=t,this.editingIndex=-1}this.save(),this.cancelEdit()}removeMetric(t){const e=this.customMetrics[t];if(e&&confirm(this.uiText("Are you sure you want to delete this metric?")+"\n\n"+(e.label||e.icon||this.uiText("Unnamed Metric")))){const n=e.id;this.config.store.plugin.serverStats.customMetrics.splice(t,1),this.save(),this.currentGroup||this.currentMetric.id!==n||this.cancelEdit()}}onDragStart(t){this.draggedIndex=t}onDragOver(t,e){t.preventDefault()}onDrop(t){if(this.isDragging=!1,null===this.draggedIndex||this.draggedIndex===t)return;const e=this.customMetrics,n=e[this.draggedIndex];e.splice(this.draggedIndex,1),e.splice(t,0,n),this.config.store.plugin.serverStats.customMetrics=[...e],this.save(),this.draggedIndex=null}get hexColor(){const t=this.config.store.plugin.serverStats.style.background;if(!t)return"#141414";if(t.startsWith("rgba")){const e=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(e)return`#${parseInt(e[1]).toString(16).padStart(2,"0")}${parseInt(e[2]).toString(16).padStart(2,"0")}${parseInt(e[3]).toString(16).padStart(2,"0")}`}return t.startsWith("#")?t.substring(0,7):"#141414"}get opacity(){const t=this.config.store.plugin.serverStats.style.background;if(!t)return.9;if(t.startsWith("rgba")){const e=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(e&&e[4])return parseFloat(e[4])}return 1}setHexColor(t){const e=this.opacity;this.updateColor(t,e)}setOpacity(t){const e=this.hexColor;this.updateColor(e,t)}openGitHubLink(){this.platform.openExternal("https://github.com/lishuainan0209/tabby-group-server-stats")}updateColor(t,e){const n=parseInt(t.slice(1,3),16),i=parseInt(t.slice(3,5),16),a=parseInt(t.slice(5,7),16);this.config.store.plugin.serverStats.style.background=`rgba(${n}, ${i}, ${a}, ${e})`,this.save()}save(){this.config.save()}};b([(0,y.HostListener)("document:click"),v("design:type",Function),v("design:paramtypes",[]),v("design:returntype",void 0)],tr.prototype,"onDocumentClick",null),tr=b([(0,y.Component)({selector:"server-stats-settings",template:'\n <h3 translate>Bottom Status Bar</h3>\n <div class="form-line">\n <div class="header"><div class="title" translate>Show bottom status bar</div></div>\n <div class="form-check form-switch">\n <input class="form-check-input" type="checkbox" id="statusBarEnabled" [(ngModel)]="config.store.plugin.serverStats.enabled" (ngModelChange)="save()" [attr.aria-label]="\'Show bottom status bar\' | translate">\n </div>\n </div>\n\n \x3c!-- 样式配置 --\x3e\n <div class="form-line">\n <div class="header">\n <div class="title" translate>Background Color</div>\n <div class="description" translate>Background color and opacity</div>\n </div>\n <div class="d-flex align-items-center">\n <input type="color" class="form-control form-control-color me-3" \n style="width: 60px;"\n [ngModel]="hexColor" \n (ngModelChange)="setHexColor($event)">\n <span class="text-muted me-2" translate>Opacity</span>\n <input type="range" class="form-range me-2" style="width: 100px" min="0" max="1" step="0.01"\n [ngModel]="opacity" \n (ngModelChange)="setOpacity($event)">\n </div>\n </div>\n\n \x3c!-- 默认更新周期配置 --\x3e\n <div class="form-line">\n <div class="header">\n <div class="title" translate>Default Update Interval</div>\n <div class="description" translate>Base interval (in seconds) for collecting metrics</div>\n </div>\n <div class="d-flex align-items-center">\n <input type="number" class="form-control form-control-sm" style="width: 90px;" min="1" max="3600"\n [(ngModel)]="defaultInterval"\n (ngModelChange)="save()">\n <span class="text-muted ms-2" translate>seconds</span>\n </div>\n </div>\n\n \x3c!-- 调试日志配置 --\x3e\n <div class="form-line">\n <div class="header">\n <div class="title" translate>Debug Logging</div>\n <div class="description" translate>Write detailed execution logs to file for troubleshooting</div>\n </div>\n <div class="form-check form-switch">\n <input class="form-check-input" type="checkbox" id="debugLogging"\n [(ngModel)]="debugLogging"\n (ngModelChange)="save()">\n </div>\n </div>\n\n <section class="settings-section builtin-metrics mt-4 mb-3">\n <h4 translate>Default Metrics</h4>\n <p class="text-muted" translate>Edit built-in commands and appearance, or restore an item to its defaults.</p>\n <p class="text-muted builtin-order-help" translate>Move items up or down to set their order in the bottom status bar.</p>\n <div class="list-group-item custom-metric-item builtin-card p-3 mb-2" *ngFor="let key of builtinKeys; let b = index" [attr.data-builtin]="key" [class.metric-disabled]="defaultMetricsConfig[key] === false">\n <div class="builtin-header">\n <div class="group-summary">\n <span class="group-card-icon"><ng-container *ngTemplateOutlet="metricIcon; context: { $implicit: builtinMain(key) }"></ng-container></span>\n <strong>{{ builtinTitle(key) | translate }}</strong>\n <span class="badge bg-secondary" *ngIf="key === \'net\'" translate>Metric Group</span>\n <span class="badge bg-info" *ngIf="hasBuiltinOverride(key)" translate>Customized</span>\n </div>\n <div class="btn-group btn-group-sm builtin-actions">\n <button type="button" class="btn btn-outline-secondary builtin-move-up" [disabled]="b === 0" (click)="moveBuiltin(key, -1)" [title]="\'Move up\' | translate" [attr.aria-label]="\'Move up\' | translate">↑</button>\n <button type="button" class="btn btn-outline-secondary builtin-move-down" [disabled]="b === builtinKeys.length - 1" (click)="moveBuiltin(key, 1)" [title]="\'Move down\' | translate" [attr.aria-label]="\'Move down\' | translate">↓</button>\n <button type="button" class="btn btn-outline-secondary builtin-enabled" (click)="toggleBuiltinEnabled(key)" [attr.aria-pressed]="defaultMetricsConfig[key] !== false">{{ (defaultMetricsConfig[key] === false ? \'Disabled\' : \'Enabled\') | translate }}</button>\n <button type="button" class="btn btn-outline-secondary builtin-edit" (click)="editBuiltin(key)" [title]="\'Edit\' | translate" [attr.aria-label]="\'Edit\' | translate"><i class="fas fa-pen" aria-hidden="true"></i></button>\n <button type="button" class="btn btn-outline-secondary builtin-reset" (click)="restoreBuiltin(key)" [disabled]="!hasBuiltinOverride(key)" translate>Restore defaults</button>\n </div>\n </div>\n <p class="text-muted builtin-network-help mt-2 mb-0" *ngIf="key === \'net\'" translate>Download and upload are current rates. Hover shows separate received and sent totals since interface creation or counter reset, not since SSH login. Default-route interfaces are preferred; without a route, eligible non-loopback interfaces are used.</p>\n <div class="inline-item-editor" *ngIf="editingBuiltinKey === key"><ng-container *ngTemplateOutlet="itemEditor"></ng-container></div>\n </div>\n <div class="form-check form-switch mt-2">\n <input class="form-check-input" type="checkbox" id="showDefaultIcons" [(ngModel)]="showDefaultIcons" (ngModelChange)="save()">\n <label class="form-check-label" for="showDefaultIcons" translate>Show icons for default metrics</label>\n </div>\n </section>\n\n <div class="separator"></div>\n\n <section class="settings-section preset-library mt-4 mb-3">\n <div class="preset-library-header">\n <h4 class="mb-0" translate>Preset Library</h4>\n <div class="d-flex gap-2 flex-wrap">\n <button type="button" class="btn btn-outline-primary btn-sm preset-github" (click)="fetchPresets()" [disabled]="loadingPresets" [attr.aria-busy]="loadingPresets">\n <i class="fas fa-cloud-download-alt me-1" aria-hidden="true"></i>{{ (loadingPresets ? \'Loading...\' : \'Import from GitHub\') | translate }}\n </button>\n <input type="file" #presetFile accept=".json,application/json" (change)="importPresetFile($event)" hidden>\n <button type="button" class="btn btn-outline-secondary btn-sm preset-import" (click)="presetFile.click()" [disabled]="loadingPresets" translate>Import JSON</button>\n <button type="button" class="btn btn-outline-secondary btn-sm preset-export" (click)="exportCurrentPresets()" translate>Export my labels</button>\n </div>\n </div>\n <p class="text-muted mt-2" translate>Bundled presets work offline. Importing a library only previews it; commands run after you add a label or group.</p>\n <p class="preset-github-source"><span translate>GitHub source</span>: <button type="button" class="preset-source-link" (click)="openPresetSource()">lishuainan0209/tabby-group-server-stats · main</button></p>\n <input class="form-control form-control-sm preset-search" [(ngModel)]="presetSearch" [placeholder]="\'Search presets\' | translate" [attr.aria-label]="\'Search presets\' | translate">\n <div class="preset-message mt-2" role="status" [class.preset-error]="fetchError" *ngIf="presetMessage">{{ presetMessage | translate }}<span *ngIf="presetMissingNames.length">: {{ presetMissingNames.join(\', \') }}</span></div>\n <div class="list-group mt-3 preset-list">\n <div class="list-group-item custom-metric-item preset-card p-3 mb-2" *ngFor="let p of filteredPresets; trackBy: trackPreset" [class.preset-lab-only]="p.audience === \'author-lab\'">\n <div class="preset-card-header">\n <span class="group-card-icon"><ng-container *ngTemplateOutlet="metricIcon; context: { $implicit: presetMain(p) }"></ng-container></span>\n <strong>{{ presetText(p, \'label\') }}</strong>\n <span class="badge bg-secondary">{{ (p.kind === \'group\' ? \'Metric Group\' : \'Single Labels\') | translate }}</span>\n <span class="badge preset-lab-badge" *ngIf="p.audience === \'author-lab\'" translate>Author\'s lab only</span>\n <button type="button" class="btn btn-outline-primary btn-sm preset-add" [disabled]="isPresetAdded(p)" (click)="addPreset(p)">{{(isPresetAdded(p) ? \'Already added\' : \'Add\') | translate}}</button>\n </div>\n <p class="preset-description mb-2" *ngIf="presetText(p, \'description\')">{{ presetText(p, \'description\') }}</p>\n <div class="command-box group-command" [title]="presetMain(p)?.command">{{ presetMain(p)?.command }}</div>\n <div class="preset-targets mt-2" *ngIf="p.profileNames?.length"><span translate>Suggested connections</span>: {{ p.profileNames.join(\', \') }}</div>\n <div class="preset-source mt-2" *ngIf="p.source"><span translate>Source</span>: {{ p.source.name }}<span *ngIf="p.source.license"> · {{ p.source.license }}</span></div>\n </div>\n <div class="text-muted p-3" *ngIf="filteredPresets.length === 0" translate>No presets match this search.</div>\n </div>\n </section>\n\n <div class="separator"></div>\n\n \x3c!-- 自定义指标管理区域 --\x3e\n <section class="settings-section single-labels-section mt-4 mb-3">\n <div class="mb-3">\n <div class="d-flex justify-content-between align-items-center gap-2">\n <h4 class="mb-0" translate>Single Labels</h4>\n <button type="button" class="btn btn-outline-primary btn-sm add-single-btn" (click)="newSingle()" translate>Add Single Label</button>\n </div>\n <div class="text-muted mt-2 mb-2" style="font-size: 13px;" translate>\n Define custom shell commands to fetch data. The command must output a single value (number or text).\n </div>\n </div>\n\n <div class="list-group mb-3">\n <div class="list-group-item user-select-none custom-metric-item p-3 mb-2" \n *ngFor="let metric of customMetrics; let i = index"\n [class.metric-disabled]="metric.enabled === false"\n [draggable]="currentMetric.id !== metric.id || editingIndex === -1"\n (dragstart)="onDragStart(i)"\n (dragover)="onDragOver($event, i)"\n (drop)="onDrop(i)"\n [class.opacity-50]="draggedIndex === i && !isDragging"\n style="cursor: grab; overflow: hidden;">\n \n <div class="d-flex align-items-start justify-content-between gap-3 w-100">\n \x3c!-- Drag handle --\x3e\n <div class="pt-1 flex-shrink-0">\n <i class="fas fa-grip-vertical text-muted" style="cursor: grab; font-size: 14px;" title="{{ \'Drag to reorder\' | translate }}"></i>\n </div>\n\n \x3c!-- Content Area (with min-width: 0 to prevent overflow) --\x3e\n <div class="flex-grow-1" style="min-width: 0; overflow: hidden;">\n \x3c!-- Header row: Icon, Label, and Badges --\x3e\n <div class="d-flex align-items-center flex-wrap gap-2 mb-2">\n <span class="d-inline-flex align-items-center justify-content-center text-primary flex-shrink-0" *ngIf="metric.icon" style="width: 20px; height: 20px;">\n <svg *ngIf="getSvgPath(metric.icon)" viewBox="0 0 24 24" width="16" height="16" fill="currentColor">\n <path [attr.d]="getSvgPath(metric.icon)"></path>\n </svg>\n <img *ngIf="isUrl(metric.icon)" [src]="getSafeIconUrl(metric.icon)" width="16" height="16" style="object-fit: contain;" />\n <i *ngIf="isFa(metric.icon)" [class]="getIconClass(metric.icon)" style="font-size: 15px;"></i>\n </span>\n\n <strong class="fs-6 text-truncate" style="max-width: 280px;" [title]="metric.label || metric.icon">\n {{ metric.label || metric.icon }}\n </strong>\n\n <span class="badge" [style.background-color]="metric.color || \'#666\'">\n {{ (metric.type === \'progress\' ? \'Progress Bar\' : \'Text Value\') | translate }}\n </span>\n\n <span class="badge bg-secondary" *ngIf="metric.interval" title="{{ \'Execution Interval\' | translate }}">\n <i class="fas fa-clock me-1"></i>{{ metric.interval }}s\n </span>\n\n <span class="badge bg-warning text-dark" *ngIf="metric.timeout" title="{{ \'Timeout\' | translate }}">\n <i class="fas fa-stopwatch me-1"></i>{{ metric.timeout }}s\n </span>\n\n <span class="badge bg-info text-dark" *ngIf="metric.colorRules && metric.colorRules.length > 0" title="{{ \'Conditional Color Rules\' | translate }}">\n <i class="fas fa-palette me-1"></i>{{ metric.colorRules.length }} {{ (metric.colorRules.length === 1 ? \'rule\' : \'rules\') | translate }}\n </span>\n </div>\n\n \x3c!-- Command display: elegant monospace code snippet with line-clamp, text-break, and copy tooltip --\x3e\n <div class="command-box font-monospace text-muted p-2 rounded" \n style="font-size: 11px; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.08); word-break: break-all; max-height: 48px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4;"\n [title]="metric.command">\n {{ metric.command }}\n </div>\n </div>\n\n \x3c!-- Action buttons: always pinned right, never pushed away --\x3e\n <div class="btn-group btn-group-sm flex-shrink-0 pt-1">\n <button type="button" class="btn btn-outline-secondary metric-enabled" (click)="toggleMetricEnabled(i)" [attr.aria-pressed]="metric.enabled !== false" [title]="(metric.enabled === false ? \'Enable metric\' : \'Disable metric\') | translate">{{ (metric.enabled === false ? \'Disabled\' : \'Enabled\') | translate }}</button>\n <button class="btn btn-outline-secondary" (click)="editMetric(i)" [title]="\'Edit\' | translate">\n <i class="fas fa-pen"></i>\n </button>\n </div>\n </div>\n <div class="inline-item-editor" *ngIf="!currentGroup && editingIndex !== -1 && currentMetric.id === metric.id">\n <ng-container *ngTemplateOutlet="itemEditor"></ng-container>\n </div>\n <div class="card-delete-actions">\n <button type="button" class="btn btn-outline-danger btn-sm metric-delete" (click)="removeMetric(i)"><i class="fas fa-trash" aria-hidden="true"></i> <span translate>Delete Metric</span></button>\n </div>\n </div>\n \n <div class="list-group-item text-center text-muted p-4" *ngIf="customMetrics.length === 0" translate>\n No custom metrics defined.\n </div>\n </div>\n\n <div class="list-group new-item-editor" *ngIf="!editingBuiltinKey && editingIndex === -1 && !editingGroupId && newSingleOpen && !currentGroup">\n <div class="list-group-item custom-metric-item p-3"><ng-container *ngTemplateOutlet="itemEditor"></ng-container></div>\n </div>\n </section>\n\n <section class="settings-section metric-groups-section mt-4 mb-3">\n <div class="d-flex justify-content-between align-items-center gap-2">\n <h4 class="mb-0" translate>Metric Groups</h4>\n <button class="btn btn-outline-primary btn-sm" (click)="newGroup()" translate>Add Group</button>\n </div>\n <p class="text-muted mt-2" translate>Group a main metric and child metrics. Each metric keeps its own commands and refresh interval.</p>\n <div class="list-group metric-group-list">\n <div class="list-group-item custom-metric-item group-card p-3 mb-2" *ngFor="let group of metricGroups; let g = index" [class.metric-disabled]="group.enabled === false">\n <div class="group-card-header">\n <div class="group-card-heading">\n <span class="group-card-icon" [style.color]="group.main.color || \'#00ff00\'">\n <ng-container *ngTemplateOutlet="metricIcon; context: { $implicit: group.main }"></ng-container>\n <i *ngIf="!group.main.icon" class="fas fa-layer-group" aria-hidden="true"></i>\n </span>\n <span class="group-summary">\n <strong>{{ group.label || group.main.label || (\'Metric Group\' | translate) }}</strong>\n <span class="badge bg-primary">{{ groupModeLabel(group.mode) | translate }}</span>\n <span class="badge group-count">{{ group.children.length }} {{ \'Child Metrics\' | translate }}</span>\n </span>\n </div>\n <div class="btn-group btn-group-sm group-card-actions">\n <button type="button" class="btn btn-outline-secondary group-enabled" (click)="toggleGroupEnabled(g)" [attr.aria-pressed]="group.enabled !== false" [title]="(group.enabled === false ? \'Enable metric\' : \'Disable metric\') | translate">{{ (group.enabled === false ? \'Disabled\' : \'Enabled\') | translate }}</button>\n <button class="btn btn-outline-secondary" [disabled]="g === 0" (click)="moveGroup(g, -1)" [title]="\'Move up\' | translate" [attr.aria-label]="\'Move up\' | translate">↑</button>\n <button class="btn btn-outline-secondary" [disabled]="g === metricGroups.length - 1" (click)="moveGroup(g, 1)" [title]="\'Move down\' | translate" [attr.aria-label]="\'Move down\' | translate">↓</button>\n <button type="button" class="btn btn-outline-secondary group-edit" (click)="editGroup(g)" [title]="\'Edit\' | translate" [attr.aria-label]="\'Edit\' | translate" [attr.aria-controls]="\'group-editor-\' + group.id"><i class="fas fa-pen" aria-hidden="true"></i></button>\n </div>\n </div>\n <div class="group-card-preview" *ngIf="editingGroupId !== group.id">\n <div class="group-main-summary">\n <span class="member-kind" translate>Main Metric</span>\n <button type="button" class="member-summary-chip main-summary-chip" (click)="editGroupMember(g, -1)" [title]="\'Edit\' | translate">\n <span [style.color]="group.main.color || \'#00ff00\'"><ng-container *ngTemplateOutlet="metricIcon; context: { $implicit: group.main }"></ng-container></span>\n {{ group.main.label || group.main.icon || (\'Unnamed Metric\' | translate) }}\n </button>\n </div>\n <div class="group-child-summary" *ngIf="group.children.length">\n <span class="member-kind" translate>Child Metric</span>\n <div class="summary-chips">\n <button type="button" *ngFor="let child of group.children; let c = index" class="member-summary-chip child-summary-chip" (click)="editGroupMember(g, c)" [title]="\'Edit\' | translate">\n <span [style.color]="child.color || \'#00ff00\'"><ng-container *ngTemplateOutlet="metricIcon; context: { $implicit: child }"></ng-container></span>\n {{ child.label || child.icon || (\'Unnamed Metric\' | translate) }}\n </button>\n </div>\n </div>\n <div class="command-box group-command" [title]="group.main.command">{{ group.main.command }}</div>\n </div>\n <div class="inline-item-editor" *ngIf="editingGroupId === group.id" [id]="\'group-editor-\' + group.id">\n <ng-container *ngTemplateOutlet="itemEditor"></ng-container>\n </div>\n <div class="card-delete-actions">\n <button type="button" class="btn btn-outline-danger btn-sm group-delete" (click)="removeGroup(g)"><i class="fas fa-trash" aria-hidden="true"></i> <span translate>Delete Group</span></button>\n </div>\n </div>\n <div class="list-group-item text-muted p-3" *ngIf="metricGroups.length === 0" translate>No metric groups defined.</div>\n </div>\n <div class="list-group new-item-editor" *ngIf="!editingBuiltinKey && !editingGroupId && currentGroup">\n <div class="list-group-item custom-metric-item p-3"><ng-container *ngTemplateOutlet="itemEditor"></ng-container></div>\n </div>\n </section>\n\n <ng-template #metricIcon let-metric>\n <svg *ngIf="getSvgPath(metric.icon)" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true"><path [attr.d]="getSvgPath(metric.icon)"></path></svg>\n <img *ngIf="isUrl(metric.icon)" [src]="getSafeIconUrl(metric.icon)" width="18" height="18" alt="" />\n <i *ngIf="isFa(metric.icon)" [class]="getIconClass(metric.icon)" aria-hidden="true"></i>\n </ng-template>\n <ng-template #itemEditor>\n <div class="scope-editor border rounded p-3 mb-3">\n <label class="form-label fw-bold" for="stats-scope-mode" translate>Display Scope</label>\n <select id="stats-scope-mode" class="form-select form-select-sm" [ngModel]="scopeMode" (ngModelChange)="setScopeMode($event)">\n <option value="all" translate>All terminal panes (default)</option>\n <option value="selected" translate>Selected connections or layouts</option>\n </select>\n <div class="form-text" *ngIf="currentGroup" translate>The entire group shares this scope, including its main metric and children.</div>\n <div class="form-text" *ngIf="scopeMode === \'all\'" translate>Show in every supported terminal pane, including new connections and split panes.</div>\n <ng-container *ngIf="scopeMode === \'selected\'">\n <div class="scope-help mt-2" translate>Expand a layout to select its individual panes, even if their original saved connection was deleted.</div>\n <div class="form-text mb-2" translate>Checking a connection selects every entry with the same connection ID. Unchecking removes only that entry. A layout checkbox selects or clears its own panes.</div>\n <label class="form-label mt-2" for="stats-scope-search" translate>Find a saved connection or layout</label>\n <input id="stats-scope-search" class="form-control form-control-sm mb-2" [(ngModel)]="scopeSearch" [placeholder]="\'Search by name\' | translate">\n <div class="scope-options" role="group" [attr.aria-label]="\'Saved connections and layouts\' | translate">\n <div class="scope-option" *ngFor="let profile of scopeChoices; trackBy: trackScopeChoice" [attr.title]="profile.id" [class.scope-pane]="profile.layoutId" [class.scope-layout]="profile.type === \'split-layout\'">\n <button type="button" class="scope-expand" *ngIf="profile.type === \'split-layout\'" (click)="toggleScopeLayout(profile.id)" [attr.aria-expanded]="!collapsedScopeLayouts.has(profile.id)" [attr.aria-label]="(collapsedScopeLayouts.has(profile.id) ? \'Expand layout\' : \'Collapse layout\') | translate"><i class="fas" [class.fa-chevron-right]="collapsedScopeLayouts.has(profile.id)" [class.fa-chevron-down]="!collapsedScopeLayouts.has(profile.id)" aria-hidden="true"></i></button>\n <label class="scope-target">\n <input type="checkbox" class="form-check-input" [checked]="isScopeSelected(profile.id)" [indeterminate]="isScopeIndeterminate(profile.id)" (change)="toggleScopeProfile(profile.id, $any($event.target).checked)">\n <span class="scope-name"><small class="text-muted" *ngIf="profile.group && !profile.layoutId">{{profile.group}} / </small><small class="scope-pane-number" *ngIf="profile.path">{{paneNumber(profile)}}</small>{{profile.name}}<small class="text-muted ms-2" *ngIf="profile.disambiguator">#{{profile.disambiguator}}</small></span>\n <span class="badge bg-secondary">{{(profile.layoutId ? \'Layout Pane\' : profile.type === \'split-layout\' ? \'Saved Layout\' : \'Saved Connection\') | translate}}</span>\n </label>\n </div>\n <div class="text-muted p-2" *ngIf="scopeChoices.length === 0" translate>No matching saved connections or layouts.</div>\n </div>\n <div class="scope-selected mt-2" *ngIf="scopeSelectedProfiles.length">\n <div class="scope-selection" *ngFor="let profile of scopeSelectedProfiles; trackBy: trackScopeChoice" [class.scope-missing]="profile.missing">\n <span><small class="text-muted" *ngIf="profile.group">{{profile.group}} / </small>{{profile.name}}</span>\n <span class="badge bg-warning text-dark" *ngIf="profile.missing" translate>Deleted or unavailable</span>\n <button type="button" class="btn btn-outline-secondary btn-sm" (click)="removeScopeProfile(profile.id)" [attr.aria-label]="(\'Remove scope selection\' | translate) + \': \' + profile.name">×</button>\n </div>\n </div>\n <div class="text-warning mt-2" *ngIf="scopeSelectedProfiles.length === 0" translate>No targets selected: this item will not appear in any pane. Choose targets or switch explicitly to all panes.</div>\n <div class="text-warning mt-2" *ngIf="hasMissingScopeProfiles" translate>Missing targets remain selected but cannot match a pane. Remove or replace them; deletion never changes this item to all panes.</div>\n </ng-container>\n </div>\n <ng-container *ngIf="currentGroup">\n <h5 class="mb-3">{{ (editingGroupId || editingBuiltinKey ? \'Edit Group\' : \'Add Group\') | translate }}</h5>\n <div class="row g-3 mb-3">\n <div class="col-md-6">\n <label class="form-label" translate>Group Name</label>\n <input class="form-control form-control-sm" [(ngModel)]="currentGroup.label">\n </div>\n <div class="col-md-6">\n <label class="form-label" translate>Group Display Mode</label>\n <select class="form-select form-select-sm" [(ngModel)]="currentGroup.mode">\n <option value="overview" translate>Overview</option>\n <option value="carousel" translate>Carousel</option>\n <option value="static" translate>Static</option>\n </select>\n </div>\n <div class="col-md-6" *ngIf="currentGroup.mode === \'static\'">\n <label class="form-label" translate>Layout Direction</label>\n <select class="form-select form-select-sm" [(ngModel)]="currentGroup.layout">\n <option value="horizontal" translate>Horizontal</option>\n <option value="vertical" translate>Vertical</option>\n </select>\n </div>\n <div class="col-md-6" *ngIf="currentGroup.mode === \'carousel\'">\n <label class="form-label" translate>Carousel Interval (sec)</label>\n <input type="number" min="1" class="form-control form-control-sm" [(ngModel)]="currentGroup.interval">\n <div class="form-text" translate>Controls display switching, independently of command refresh intervals.</div>\n </div>\n <div class="col-md-6" *ngIf="currentGroup.mode === \'carousel\'">\n <label class="form-label" translate>Empty Carousel Text</label>\n <input class="form-control form-control-sm" [(ngModel)]="currentGroup.emptyText" [placeholder]="\'No available metrics\' | translate">\n </div>\n </div>\n <div class="group-mode-help text-muted mb-3">{{ groupModeHelp(currentGroup.mode) | translate }}</div>\n <div class="group-members mb-3">\n <section class="group-member group-member-main" [class.member-open]="expandedMemberId === currentGroup.main.id" [class.metric-disabled]="currentGroup.main.enabled === false">\n <div class="member-header">\n <button type="button" class="member-toggle" (click)="toggleGroupMetric(-1)" [attr.aria-expanded]="expandedMemberId === currentGroup.main.id" [attr.aria-controls]="\'member-editor-\' + currentGroup.main.id">\n <span class="member-icon" [style.color]="currentGroup.main.color || \'#00ff00\'"><ng-container *ngTemplateOutlet="metricIcon; context: { $implicit: currentGroup.main }"></ng-container></span>\n <span class="member-kind" translate>Main Metric</span>\n <strong>{{ currentGroup.main.label || currentGroup.main.icon || (\'Unnamed Metric\' | translate) }}</strong>\n <i class="fas member-chevron" [class.fa-chevron-down]="expandedMemberId !== currentGroup.main.id" [class.fa-chevron-up]="expandedMemberId === currentGroup.main.id" aria-hidden="true"></i>\n </button>\n <button type="button" class="btn btn-outline-secondary btn-sm member-enabled" (click)="toggleMemberEnabled(currentGroup.main)" [attr.aria-pressed]="currentGroup.main.enabled !== false">{{ (currentGroup.main.enabled === false ? \'Disabled\' : \'Enabled\') | translate }}</button>\n </div>\n <div class="member-editor" *ngIf="expandedMemberId === currentGroup.main.id" [id]="\'member-editor-\' + currentGroup.main.id">\n <ng-container *ngTemplateOutlet="metricFields"></ng-container>\n </div>\n </section>\n <section class="group-member group-member-child" *ngFor="let child of currentGroup.children; let c = index" [class.member-open]="expandedMemberId === child.id" [class.metric-disabled]="child.enabled === false">\n <div class="member-header">\n <button type="button" class="member-toggle" (click)="toggleGroupMetric(c)" [attr.aria-expanded]="expandedMemberId === child.id" [attr.aria-controls]="\'member-editor-\' + child.id">\n <span class="member-icon" [style.color]="child.color || \'#00ff00\'"><ng-container *ngTemplateOutlet="metricIcon; context: { $implicit: child }"></ng-container></span>\n <span class="member-kind">{{ \'Child Metric\' | translate }} {{ c + 1 }}</span>\n <strong>{{ child.label || child.icon || (\'Unnamed Metric\' | translate) }}</strong>\n <i class="fas member-chevron" [class.fa-chevron-down]="expandedMemberId !== child.id" [class.fa-chevron-up]="expandedMemberId === child.id" aria-hidden="true"></i>\n </button>\n <div class="btn-group btn-group-sm member-actions">\n <button type="button" class="btn btn-outline-secondary member-enabled" (click)="toggleMemberEnabled(child)" [attr.aria-pressed]="child.enabled !== false">{{ (child.enabled === false ? \'Disabled\' : \'Enabled\') | translate }}</button>\n <button class="btn btn-outline-secondary" [disabled]="c === 0" (click)="moveChild(c, -1)" [title]="\'Move up\' | translate" [attr.aria-label]="\'Move up\' | translate">↑</button>\n <button class="btn btn-outline-secondary" [disabled]="c === currentGroup.children.length - 1" (click)="moveChild(c, 1)" [title]="\'Move down\' | translate" [attr.aria-label]="\'Move down\' | translate">↓</button>\n </div>\n </div>\n <div class="member-editor" *ngIf="expandedMemberId === child.id" [id]="\'member-editor-\' + child.id">\n <ng-container *ngTemplateOutlet="metricFields"></ng-container>\n </div>\n <div class="card-delete-actions member-delete-actions">\n <button type="button" class="btn btn-outline-danger btn-sm child-delete" (click)="removeChild(c)"><i class="fas fa-trash" aria-hidden="true"></i> <span translate>Remove Child</span></button>\n </div>\n </section>\n <button class="btn btn-outline-primary add-child-btn" (click)="addChild()"><i class="fas fa-plus" aria-hidden="true"></i> <span translate>Add Child</span></button>\n <div class="form-text mt-2" translate>Edits to all members are saved together with the group.</div>\n </div>\n </ng-container>\n <ng-container *ngIf="!currentGroup">\n <h5 class="mb-3">{{ metricEditorTitle | translate }}</h5>\n <ng-container *ngTemplateOutlet="metricFields"></ng-container>\n </ng-container>\n <div class="editor-actions text-end">\n <div class="text-warning text-start mb-2" *ngIf="currentGroup && !isGroupValid()" translate>Every member needs a label or icon and a metric command. Intervals and timeouts must be positive; exit codes must be whole numbers from 0 to 255.</div>\n <button class="btn btn-secondary me-2" (click)="cancelEdit()" translate>Cancel</button>\n <button class="btn btn-primary text-white" (click)="saveMetric()" [disabled]="currentGroup ? !isGroupValid() : !isMetricValid(currentMetric)">\n <i class="fas" [class.fa-plus]="editingIndex === -1 && !currentGroup && !editingBuiltinKey" [class.fa-save]="editingIndex !== -1 || currentGroup || editingBuiltinKey"></i>\n {{ (currentGroup ? \'Save Group\' : (editingBuiltinKey || editingIndex !== -1 ? \'Save\' : \'Add\')) | translate }}\n </button>\n </div>\n </ng-template>\n <ng-template #metricFields>\n <div class="row g-3 metric-fields">\n <div class="col-md-4">\n <label class="form-label" translate>Label</label>\n <input type="text" class="form-control form-control-sm" [(ngModel)]="currentMetric.label" placeholder="{{ \'e.g. PostgreSQL (optional if icon set)\' | translate }}">\n </div>\n <div class="col-md-8">\n <label class="form-label" translate>Icon (FontAwesome or custom SVG)</label>\n <div class="icon-input-wrap position-relative">\n <div class="input-group input-group-sm">\n <span class="input-group-text" *ngIf="currentMetric.icon" style="padding: 0 8px; width: 34px; justify-content: center;">\n <svg *ngIf="getSvgPath(currentMetric.icon)" viewBox="0 0 24 24" width="16" height="16" fill="currentColor">\n <path [attr.d]="getSvgPath(currentMetric.icon)"></path>\n </svg>\n <img *ngIf="isUrl(currentMetric.icon)" [src]="getSafeIconUrl(currentMetric.icon)" width="16" height="16" style="object-fit: contain;" />\n <i *ngIf="isFa(currentMetric.icon)" [class]="getIconClass(currentMetric.icon)"></i>\n </span>\n <input type="text" \n class="form-control" \n [(ngModel)]="currentMetric.icon" \n placeholder="{{ \'fa-database, server, redis...\' | translate }}">\n <button type="button" \n class="btn btn-outline-secondary icon-picker-toggle"\n (click)="toggleIconPicker($event)"\n title="{{ \'Choose preset icon\' | translate }}">\n <i class="fas fa-ellipsis-v"></i>\n </button>\n <input type="file" \n #svgFileInput \n accept=".svg,image/svg+xml" \n (change)="onSvgFileSelected($event)" \n style="display: none;">\n <button type="button" \n class="btn btn-outline-secondary" \n (click)="svgFileInput.click()" \n title="{{ \'Upload Custom SVG\' | translate }}">\n <i class="fas fa-file-upload me-1"></i> <span translate>SVG</span>\n </button>\n <button type="button" \n class="btn btn-outline-danger" \n *ngIf="currentMetric.icon" \n (click)="clearIcon()" \n title="{{ \'Remove Icon\' | translate }}">\n <i class="fas fa-times"></i>\n </button>\n </div>\n <div class="icon-picker-panel" *ngIf="iconPickerOpen" (click)="$event.stopPropagation()">\n <div class="icon-picker-title" translate>Preset Icons</div>\n <div class="icon-picker-filters">\n <input type="search" class="form-control form-control-sm icon-search" [(ngModel)]="iconSearch" [placeholder]="\'Search icons by name or purpose\' | translate" [attr.aria-label]="\'Search icons by name or purpose\' | translate">\n <select class="form-select form-select-sm icon-category" [(ngModel)]="iconCategory" [attr.aria-label]="\'Icon category\' | translate">\n <option value="all" translate>All icon categories</option>\n <option *ngFor="let category of iconCategories" [value]="category">{{ category | translate }}</option>\n </select>\n </div>\n <div class="icon-picker-grid">\n <button type="button"\n class="icon-picker-item"\n *ngFor="let preset of filteredIconPresets; trackBy: trackIconPreset"\n [class.active]="currentMetric.icon === preset.name"\n [title]="(preset.label | translate) + \' (\' + preset.name + \')\'"\n [attr.aria-label]="preset.label | translate"\n [attr.aria-pressed]="currentMetric.icon === preset.name"\n (click)="selectPresetIcon(preset.name)">\n <svg *ngIf="getSvgPath(preset.name)" viewBox="0 0 24 24" width="22" height="22" fill="currentColor" aria-hidden="true">\n <path [attr.d]="getSvgPath(preset.name)"></path>\n </svg>\n <i *ngIf="isFa(preset.name)" [class]="getIconClass(preset.name)" aria-hidden="true"></i>\n <span class="icon-preset-label">{{ preset.label | translate }}</span>\n </button>\n </div>\n <div class="icon-empty" *ngIf="filteredIconPresets.length === 0" translate>No icons match this search.</div>\n </div>\n </div>\n <div class="form-text text-muted" style="font-size: 11px;">\n <span translate>Use FontAwesome (ex: database, server, memory) or upload a custom .svg file</span>\n </div>\n </div>\n\n <div class="col-md-3">\n <label class="form-label" translate>Type</label>\n <select class="form-select form-select-sm" [(ngModel)]="currentMetric.type">\n <option value="text" translate>Text Value</option>\n <option value="progress" translate>Progress Bar</option>\n </select>\n </div>\n <div class="col-md-3">\n <label class="form-label" translate>Default Color</label>\n <input type="color" class="form-control form-control-color form-control-sm w-100" [(ngModel)]="currentMetric.color">\n </div>\n <div class="col-md-3" *ngIf="currentMetric.type === \'progress\'">\n <label class="form-label" translate>Max Value</label>\n <input type="number" class="form-control form-control-sm" [(ngModel)]="currentMetric.maxValue" placeholder="100">\n </div>\n <div class="col-md-3">\n <label class="form-label" translate>Suffix</label>\n <input type="text" class="form-control form-control-sm" [(ngModel)]="currentMetric.suffix" [placeholder]="currentMetric.type === \'progress\' ? (\'e.g. GB (or % if empty)\' | translate) : (\'e.g. °C, ms\' | translate)">\n </div>\n <div class="col-md-3">\n <label class="form-label" translate>Interval (sec)</label>\n <input type="number" min="1" class="form-control form-control-sm" [(ngModel)]="currentMetric.interval" placeholder="{{ defaultInterval }}s">\n </div>\n <div class="col-md-3">\n <label class="form-label" translate>Timeout (sec)</label>\n <input type="number" min="1" class="form-control form-control-sm" [(ngModel)]="currentMetric.timeout" placeholder="15s">\n </div>\n <div class="col-12 check-command">\n <label class="form-label" translate>Object Check Command (optional)</label>\n <textarea class="form-control form-control-sm font-monospace" rows="2" [(ngModel)]="currentMetric.checkCommand" [placeholder]="currentMetric.checkMode === \'output\' ? \'mountpoint -q /data2 && echo exists\' : \'mountpoint -q /data2\'"></textarea>\n <div class="form-text" translate>Leave empty to run the metric directly. A failed check prevents both metric and detail commands from running.</div>\n </div>\n <ng-container *ngIf="currentMetric.checkCommand && currentMetric.checkCommand.trim()">\n <div class="col-md-4">\n <label class="form-label" translate>Compare</label>\n <select class="form-select form-select-sm" [(ngModel)]="currentMetric.checkMode">\n <option value="output" translate>Output Text</option>\n <option value="exitCode" translate>Exit Code</option>\n </select>\n </div>\n <div class="col-md-4">\n <label class="form-label" translate>Expected Value</label>\n <input class="form-control form-control-sm" [(ngModel)]="currentMetric.checkExpected" [placeholder]="currentMetric.checkMode === \'output\' ? \'exists\' : \'0\'">\n </div>\n <div class="col-md-4">\n <label class="form-label" translate>Check Failure Text</label>\n <input class="form-control form-control-sm" [(ngModel)]="currentMetric.unavailableText" [placeholder]="\'Unavailable\' | translate">\n </div>\n <div class="col-12 form-text" translate>Output text is compared exactly after trimming surrounding whitespace. Exit code 0 usually means success.</div>\n </ng-container>\n <div class="col-12 metric-command">\n <label class="form-label" translate>Command (Shell)</label>\n <div class="input-group input-group-sm">\n <textarea class="form-control font-monospace" \n rows="2" \n [(ngModel)]="currentMetric.command" \n placeholder="e.g. mongosh ... or redis-cli info | grep used_memory_human"></textarea>\n </div>\n <div class="form-text text-muted" style="font-size: 11px;" translate>\n Command executed on the server. The output (number or text) will be displayed.\n </div>\n </div>\n\n <div class="col-12 detail-command">\n <label class="form-label" translate>Hover Detail Command (optional)</label>\n <textarea class="form-control form-control-sm font-monospace" rows="2" [(ngModel)]="currentMetric.detailCommand"></textarea>\n <div class="form-text" translate>Append this command output on hover. Leave empty for no extra information.</div>\n </div>\n <div class="col-12 unavailable-visibility">\n <label class="form-check">\n <input class="form-check-input visible-unavailable" type="checkbox" [ngModel]="currentMetric.visibleWhenUnavailable !== false" (ngModelChange)="setUnavailableVisibility($event)">\n <span class="form-check-label" translate>Show this label when its check fails</span>\n </label>\n <div class="form-text" translate>Enabled by default. Turning this off hides the label in every display mode and also removes it from the carousel.</div>\n </div>\n <div class="col-12" *ngIf="currentGroup && editingChildIndex >= 0">\n <label class="form-check">\n <input class="form-check-input carousel-unavailable" type="checkbox" [(ngModel)]="currentMetric.showWhenUnavailable" [disabled]="currentMetric.visibleWhenUnavailable === false">\n <span class="form-check-label" translate>Keep in carousel when its check fails</span>\n </label>\n <div class="form-text" translate>When the failed label remains visible, this option controls whether it participates in the carousel. Static and hover views retain it.</div>\n </div>\n\n \x3c!-- 条件颜色规则区域 --\x3e\n <div class="col-md-12 mt-3">\n <div class="d-flex justify-content-between align-items-center mb-2">\n <label class="form-label mb-0 fw-bold" translate>Conditional Color Rules</label>\n <button type="button" class="btn btn-outline-primary btn-sm" (click)="addColorRule()">\n <i class="fas fa-plus me-1"></i> <span translate>Add Rule</span>\n </button>\n </div>\n <div class="text-muted mb-2" style="font-size: 12px;" translate>\n Color rules are checked from top to bottom. The first matching rule determines the color.\n </div>\n\n <div *ngIf="!currentMetric.colorRules || currentMetric.colorRules.length === 0" class="text-muted fst-italic p-2 border rounded text-center" style="font-size: 12px;">\n <span translate>No conditional rules defined. Default color will always be used.</span>\n </div>\n\n <div class="border rounded p-2 mb-2 bg-light bg-opacity-10" *ngFor="let rule of currentMetric.colorRules; let rIndex = index">\n <div class="row g-2 align-items-center">\n <div class="col-md-4">\n <select class="form-select form-select-sm" [(ngModel)]="rule.operator">\n <option value="==" translate>Equals (==)</option>\n <option value="!=" translate>Not Equals (!=)</option>\n <option value=">" translate>Greater than (>)</option>\n <option value=">=" translate>Greater or Equal (>=)</option>\n <option value="<" translate>Less than (<)</option>\n <option value="<=" translate>Less or Equal (<=)</option>\n <option value="contains" translate>Contains</option>\n <option value="not_contains" translate>Not Contains</option>\n <option value="starts_with" translate>Starts With</option>\n <option value="regex" translate>Regex Match</option>\n </select>\n </div>\n <div class="col-md-4">\n <input type="text" class="form-control form-control-sm" [(ngModel)]="rule.value" placeholder="{{ \'Threshold / Value\' | translate }}">\n </div>\n <div class="col-md-3">\n <input type="color" class="form-control form-control-color form-control-sm w-100" [(ngModel)]="rule.color">\n </div>\n <div class="col-md-1 text-end">\n <button type="button" class="btn btn-outline-danger btn-sm" (click)="removeColorRule(rIndex)">\n <i class="fas fa-times"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n </ng-template>\n ',styles:['\n :host {\n --stats-field-bg: #242e3c;\n --stats-field-border: #596a82;\n --stats-field-hover: #8194ad;\n --stats-field-fg: var(--theme-fg, var(--bs-body-color, #e5ecf5));\n --stats-field-muted: #b4c0d0;\n --stats-field-placeholder: #9caec2;\n --stats-focus: #579eff;\n --stats-card-border: #7389a5;\n --stats-section-accent: #7389a5;\n --stats-section-bg: #1d222b;\n --stats-card-bg: #191d24;\n }\n @supports (color: color-mix(in srgb, white, black)) {\n :host {\n --stats-field-bg: color-mix(in srgb, var(--theme-bg, var(--bs-body-bg, #181c23)) 82%, #7897bf 18%);\n --stats-field-border: color-mix(in srgb, var(--stats-field-fg) 40%, var(--theme-bg, var(--bs-body-bg, #181c23)) 60%);\n --stats-field-hover: color-mix(in srgb, var(--stats-field-fg) 58%, var(--theme-bg, var(--bs-body-bg, #181c23)) 42%);\n --stats-field-muted: color-mix(in srgb, var(--stats-field-fg) 78%, var(--theme-bg, var(--bs-body-bg, #181c23)) 22%);\n --stats-field-placeholder: color-mix(in srgb, var(--stats-field-fg) 65%, var(--theme-bg, var(--bs-body-bg, #181c23)) 35%);\n --stats-card-border: color-mix(in srgb, var(--stats-field-fg) 52%, var(--theme-bg, var(--bs-body-bg, #181c23)) 48%);\n --stats-section-bg: color-mix(in srgb, var(--theme-bg, var(--bs-body-bg, #181c23)) 95%, var(--stats-section-accent) 5%);\n --stats-card-bg: color-mix(in srgb, var(--theme-bg, var(--bs-body-bg, #181c23)) 90%, var(--stats-section-accent) 10%);\n }\n }\n .form-control, .form-select, .input-group-text {\n color: var(--stats-field-fg);\n background-color: var(--stats-field-bg);\n border: 1px solid var(--stats-field-border);\n border-radius: 6px;\n min-height: 36px;\n box-shadow: inset 0 1px 2px #00000012;\n transition: border-color .15s, box-shadow .15s;\n }\n .form-control:hover, .form-select:hover { border-color: var(--stats-field-hover); }\n .form-control:focus, .form-select:focus {\n color: var(--stats-field-fg);\n background-color: var(--stats-field-bg);\n border-color: var(--stats-focus);\n outline: 2px solid #579eff55;\n outline-offset: 1px;\n box-shadow: 0 0 0 3px #579eff1a;\n }\n .form-control::placeholder { color: var(--stats-field-placeholder); opacity: 1; }\n .form-select option { color: var(--stats-field-fg); background-color: var(--stats-field-bg); }\n .form-label, .form-check-label { color: var(--stats-field-fg); }\n .metric-fields .form-text, .scope-editor .form-text, .scope-help, .group-mode-help,\n .scope-option .text-muted, .scope-selection .text-muted, .member-kind {\n color: var(--stats-field-muted) !important;\n opacity: 1;\n }\n .metric-fields .text-muted { color: var(--stats-field-muted) !important; opacity: 1; }\n .form-check-input {\n border: 1px solid var(--stats-field-border);\n background-color: var(--stats-field-bg);\n accent-color: var(--stats-focus);\n }\n .form-check-input:checked { border-color: #3d8beb; background-color: #2877d6; }\n .form-check-input:focus-visible { outline: 2px solid var(--stats-focus); outline-offset: 2px; }\n .form-control:disabled, .form-select:disabled { opacity: .6; }\n .check-command textarea { border-left: 3px solid #aa9660; }\n .metric-command textarea { border-left: 3px solid #709bd6; }\n .detail-command textarea { border-left: 3px solid #679e99; }\n .check-command textarea:focus, .metric-command textarea:focus, .detail-command textarea:focus { border-color: var(--stats-focus); }\n .scope-editor { background-color: #7897bf0b; border-color: var(--stats-field-border) !important; }\n .scope-options { background-color: var(--stats-field-bg); border-color: var(--stats-field-border) !important; }\n .scope-option { border-color: var(--stats-field-border); }\n .scope-option:hover { background-color: #7897bf20; }\n .param-input { width: 80px; text-align: right; }\n .user-select-none { user-select: none; }\n .opacity-50 { opacity: 0.5; }\n .separator { height: 1px; background: rgba(0,0,0,0.1); margin: 20px 0; }\n .white-space-nowrap { white-space: nowrap; }\n .add-preset-btn { width: 12%; justify-content: center; }\n .submit-own-preset-btn { color: #00ffc8ff; text-decoration: none; }\n .submit-own-preset-btn:hover { color: #00daaaff; text-decoration: underline; }\n .settings-section { border: 2px solid var(--stats-section-accent); border-left-width: 5px; border-radius: 12px; padding: 20px; background: var(--stats-section-bg); }\n .single-labels-section { --stats-section-accent: #5f95d6; }\n .metric-groups-section { --stats-section-accent: #4e9a90; }\n .preset-library { --stats-section-accent: #9985c8; }\n .settings-section > h4, .settings-section > .preset-library-header, .settings-section > .d-flex:first-child { margin-bottom: 12px; }\n .custom-metric-item, .settings-section .custom-metric-item { border: 2px solid var(--stats-card-border); border-radius: 9px; transition: border-color 0.2s ease; }\n .custom-metric-item:hover, .custom-metric-item:focus-within { border-color: var(--stats-section-accent); }\n .metric-disabled { border-style: dashed !important; }\n .metric-enabled[aria-pressed="true"], .group-enabled[aria-pressed="true"], .member-enabled[aria-pressed="true"] { color: #70c7a0; border-color: #598c75; }\n .member-enabled { flex-shrink: 0; }\n .builtin-header, .preset-library-header, .preset-card-header { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }\n .builtin-actions { margin-left: auto; }\n .preset-library-header { justify-content: space-between; }\n .preset-list { max-height: 420px; overflow-y: auto; padding: 2px; }\n .preset-add { margin-left: auto; }\n .preset-description { margin-top: 10px; font-size: 13px; color: var(--stats-field-muted); }\n .preset-lab-badge { color: var(--stats-field-fg); background: #ffa50020; border: 1px solid #ffa500; }\n .preset-lab-only .preset-description { color: var(--stats-field-fg); border-left: 3px solid #ffa500; padding-left: 10px; }\n .preset-targets, .preset-source { font-size: 12px; color: var(--stats-field-muted); }\n .preset-message { font-size: 13px; color: var(--stats-field-muted); }\n .preset-message.preset-error { color: #ef8f95; border-left: 3px solid #ef8f95; padding: 8px 10px; }\n .preset-github-source { font-size: 12px; color: var(--stats-field-muted); margin-bottom: 12px; overflow-wrap: anywhere; }\n .preset-source-link { border: 0; background: transparent; color: var(--stats-field-fg); text-decoration: underline; padding: 0; text-align: left; }\n .preset-source-link:focus-visible { outline: 2px solid var(--stats-focus); outline-offset: 3px; }\n .builtin-enabled[aria-pressed="true"] { color: #70c7a0; border-color: #598c75; }\n .custom-metric-item { background: var(--stats-card-bg); padding: 18px !important; margin-bottom: 12px !important; }\n .custom-metric-item strong { font-size: 16px !important; }\n .custom-metric-item .badge { font-size: 12px; padding: 5px 8px; border-radius: 7px; }\n .command-box { font-size: 13px !important; line-height: 1.5 !important; }\n h4 { font-size: 22px; font-weight: 650; }\n h5 { font-size: 18px; }\n .group-card-header { display: flex; align-items: center; gap: 14px; }\n .group-card-heading { min-width: 0; flex: 1; display: flex; gap: 12px; align-items: center; color: inherit; text-align: left; }\n .member-toggle:focus-visible { outline: 2px solid #5299ff; outline-offset: 3px; border-radius: 5px; }\n .group-card-icon, .member-icon { display: inline-flex; justify-content: center; align-items: center; width: 20px; flex: 0 0 20px; font-size: 18px; }\n .group-summary { display: flex; flex: 1; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; overflow-wrap: anywhere; }\n .group-count { background: rgba(128,128,128,.16); color: inherit; font-weight: 500; }\n .group-card-actions { flex: 0 0 auto; }\n .group-card-preview { margin: 14px 0 0 32px; }\n .group-main-summary { display: flex; align-items: center; gap: 10px; }\n .member-kind { font-size: 13px; color: #929ba7; font-weight: 500; white-space: nowrap; }\n .group-command { padding: 10px 12px; background: rgba(0,0,0,.3); border: 1px solid rgba(128,128,128,.12); border-radius: 6px; font-family: monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 62px; overflow: hidden; color: #929ba7; }\n .group-child-summary { display: flex; align-items: flex-start; gap: 10px; margin-top: 8px; padding-left: 16px; border-left: 2px solid rgba(128,128,128,.35); }\n .group-child-summary > .member-kind { padding-top: 7px; }\n .summary-chips { display: flex; flex: 1; flex-wrap: wrap; gap: 7px; min-width: 0; }\n .member-summary-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 10px; background: rgba(128,128,128,.1); color: inherit; border: 2px solid var(--stats-card-border); border-radius: 5px; font-size: 14px; text-align: left; overflow-wrap: anywhere; cursor: pointer; }\n .member-summary-chip > span { display: inline-flex; flex-shrink: 0; }\n .member-summary-chip:hover { border-color: var(--stats-focus); background: rgba(49,118,216,.14); }\n .member-summary-chip:focus-visible { outline: 2px solid var(--stats-focus); outline-offset: 3px; }\n .group-card-preview > .group-command { margin-top: 12px; }\n .card-delete-actions { display: flex; justify-content: flex-end; border-top: 1px solid rgba(128,128,128,.25); margin-top: 14px; padding-top: 10px; }\n .card-delete-actions .btn { display: inline-flex; align-items: center; gap: 6px; }\n .member-delete-actions { margin: 0 12px; padding: 8px 0; }\n .inline-item-editor { border-top: 1px solid rgba(128,128,128,.2); margin-top: 18px; padding-top: 18px; cursor: default; user-select: text; }\n .group-members { display: flex; flex-direction: column; gap: 10px; }\n .group-member { border: 2px solid var(--stats-card-border); border-radius: 8px; background: var(--stats-card-bg); }\n .group-member-child { margin-left: 26px; width: calc(100% - 26px); }\n .group-member.member-open { border-color: var(--stats-focus); }\n .member-header { display: flex; align-items: center; gap: 8px; padding-right: 10px; }\n .member-toggle { min-width: 0; flex: 1; display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 8px; padding: 14px; background: transparent; color: inherit; text-align: left; cursor: pointer; }\n .member-toggle strong { min-width: 0; overflow-wrap: anywhere; }\n .member-open > .member-toggle, .member-open > .member-header { background: rgba(49,118,216,.12); }\n .member-chevron { margin-left: auto; flex-shrink: 0; font-size: 12px; color: #929ba7; }\n .member-actions { flex-shrink: 0; }\n .member-editor { border-top: 1px solid rgba(128,128,128,.2); padding: 18px; }\n .add-child-btn { align-self: flex-start; margin-left: 26px; }\n .editor-actions { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(128,128,128,.2); }\n .metric-fields .form-control, .metric-fields .form-select { font-size: 14px; }\n .metric-fields textarea { min-height: 72px; line-height: 1.5; }\n .metric-fields .form-text { font-size: 13px !important; line-height: 1.5; }\n .group-mode-help { font-size: 14px; line-height: 1.5; }\n @media (max-width: 600px) {\n .settings-section { padding: 12px; }\n .group-card-header { flex-wrap: wrap; }\n .group-card-preview { margin-left: 0; }\n .group-member-child { margin-left: 16px; width: calc(100% - 16px); }\n .member-toggle { flex-wrap: wrap; gap: 6px; padding: 10px; }\n .member-editor { padding: 12px; }\n }\n .form-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; margin-bottom: 4px; font-size: 14px; font-weight: 500; }\n .icon-input-wrap { position: relative; }\n .icon-picker-panel {\n margin-top: 10px;\n padding: 12px;\n border-radius: 8px;\n border: 1px solid var(--stats-field-border);\n background: var(--theme-bg, var(--bs-body-bg, #1e1e1e));\n }\n .icon-picker-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--stats-field-fg);\n margin-bottom: 10px;\n }\n .icon-picker-filters { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 8px; margin-bottom: 10px; }\n .icon-picker-filters .form-control, .icon-picker-filters .form-select { min-width: 0; font-size: 13px; }\n .icon-picker-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));\n gap: 8px;\n max-height: 282px;\n overflow-y: auto;\n padding: 3px;\n }\n .icon-picker-item {\n min-width: 0;\n min-height: 70px;\n border-radius: 6px;\n border: 1px solid var(--stats-field-border);\n background: var(--stats-field-bg);\n color: var(--stats-field-fg);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 7px;\n cursor: pointer;\n padding: 10px 6px;\n }\n .icon-picker-item svg, .icon-picker-item i { flex-shrink: 0; font-size: 22px; }\n .icon-preset-label { font-size: 12px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; text-align: center; }\n .icon-picker-item:hover { border-color: var(--stats-field-hover); }\n .icon-picker-item.active { border-color: var(--stats-focus); box-shadow: inset 0 0 0 1px var(--stats-focus); background: #3d8beb26; }\n .icon-picker-item:focus-visible { outline: 2px solid var(--stats-focus); outline-offset: 1px; }\n .icon-empty { padding: 18px 8px; text-align: center; color: var(--stats-field-muted); font-size: 13px; }\n @media (max-width: 600px) { .icon-picker-filters { grid-template-columns: minmax(0, 1fr); } }\n .scope-help { font-size: 13px; }\n .scope-options { max-height: 360px; overflow-y: auto; border: 1px solid rgba(128,128,128,.3); border-radius: 4px; }\n .scope-option { display: flex; align-items: center; gap: 9px; padding: 8px 10px; cursor: pointer; border-bottom: 1px solid rgba(128,128,128,.15); }\n .scope-option:last-child { border-bottom: 0; }\n .scope-option:hover { background: rgba(128,128,128,.08); }\n .scope-option .form-check-input { flex: 0 0 auto; margin: 0; }\n .scope-target { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; margin: 0; cursor: pointer; }\n .scope-option.scope-pane { padding-left: 42px; border-left: 2px solid #719bc9; }\n .scope-layout { background: #7897bf15; font-weight: 600; }\n .scope-expand { border: 0; background: transparent; color: inherit; padding: 2px; width: 18px; flex: 0 0 18px; }\n .scope-expand:focus-visible { outline: 2px solid #71b7ff; }\n .scope-pane-number { display: inline-block; min-width: 28px; margin-right: 6px; opacity: .75; font-variant-numeric: tabular-nums; }\n .scope-name { flex: 1 1 auto; overflow-wrap: anywhere; }\n .scope-selected { display: flex; flex-wrap: wrap; gap: 6px; }\n .scope-selection { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(128,128,128,.3); border-radius: 4px; padding: 3px 4px 3px 8px; }\n .scope-selection .btn { padding: 0 5px; }\n .scope-missing { border-color: #bf974a; }\n :host-context(.theme-dark) .separator { background: rgba(255,255,255,0.1); }\n ']}),v("design:paramtypes",[Ds.PlatformService,Ds.ConfigService,Io.DomSanitizer])],tr);let er=class extends Cs.SettingsTabProvider{constructor(t){super(),this.translate=t,this.id="server-stats",this.icon="fas fa-server",this.title=this.translate.instant("Bottom Status Bar"),setTimeout(()=>this.setTitle(this.translate.instant("Bottom Status Bar")),10)}setTitle(t){this.title=t}getComponentType(){return tr}};var nr;er=b([(0,y.Injectable)(),v("design:paramtypes",["function"==typeof(Xo=void 0!==Ds.TranslateService&&Ds.TranslateService)?Xo:Object])],er);const ir=Ts.join(Ms.tmpdir(),"tabby-server-stats.log");let ar=0;const sr=t=>{if(_o.isDebugEnabled)try{if(ar++,ar%100==0)try{Ss.statSync(ir).size>2097152&&Ss.writeFileSync(ir,`[${(new Date).toISOString()}] [log rotated]\n`)}catch(t){}Ss.appendFileSync(ir,`${(new Date).toISOString()} ${t}\n`)}catch(t){}};let or=class{constructor(t,e,n,i,a,s,o){var r,l,c,d;this.app=t,this.config=e,this.componentFactoryResolver=n,this.appRef=i,this.injector=a,this.statsService=s,this.activeDisplayMode=null,this.tabInstances=new WeakMap,this.attachedTabs=new Set,this.tabElementMap=new Map,this.observer=null,this.disposables=[],this.styleNode=null,this.observerRetry=null,this.failed=!1,this.mutationScheduled=!1,this.pendingAdded=new Set,this.pendingRemoved=new Set,this.mutationBurst=0,this.mutationBurstTimer=null,this.scanTimer=null,_o.isDebugEnabled=Boolean(null===(d=null===(c=null===(l=null===(r=this.config)||void 0===r?void 0:r.store)||void 0===l?void 0:l.plugin)||void 0===c?void 0:c.serverStats)||void 0===d?void 0:d.debugLogging),this.config.changed$.subscribe(()=>{var t,e,n,i;_o.isDebugEnabled=Boolean(null===(i=null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.debugLogging)}),sr("[init] constructor start"),this.config.ready$.subscribe(()=>{var t,e,n,i;_o.isDebugEnabled=Boolean(null===(i=null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.debugLogging),setTimeout(()=>{this.safeRun("translations",()=>{for(const[t,e]of Object.entries(Ls))o.setTranslation(t,e,!0)})},1e3)}),this.config.ready$.subscribe(()=>{setTimeout(()=>{sr("[event] config.ready"),this.safeRun("applyDisplayMode:ready",()=>this.applyDisplayMode(this.getDisplayMode()))},500)}),this.config.changed$.subscribe(()=>{sr("[event] config.changed"),this.safeRun("applyDisplayMode:changed",()=>this.applyDisplayMode(this.getDisplayMode()))}),sr("[init] constructor end")}getDisplayMode(){return"bottomBar"}safeRun(t,e){if(!this.failed)try{e()}catch(e){this.failed=!0,sr(`[error] ${t}: ${e instanceof Error?e.stack||e.message:String(e)}`)}}applyDisplayMode(t){sr(`[state] applyDisplayMode ${t}`);const e=this.activeDisplayMode;this.activeDisplayMode=t,e!==t?(this.teardownAllTabs(),this.safeRun("ensureGlobalStyle",()=>this.ensureGlobalStyle()),this.safeRun("initializePerTabBars",()=>this.initializePerTabBars())):"bottomBar"===t&&0===this.attachedTabs.size&&this.initializePerTabBars()}initializePerTabBars(){sr("[state] initializePerTabBars"),this.safeRun("rebuildTabElementMap",()=>this.rebuildTabElementMap()),this.safeRun("attachExistingTabs",()=>this.attachExistingTabs()),this.safeRun("observeTabLifecycle",()=>this.observeTabLifecycle()),this.safeRun("startMutationObserver",()=>this.startMutationObserver()),this.safeRun("startScanTimer",()=>this.startScanTimer())}ensureGlobalStyle(){if(this.styleNode)return;if(!document.head)return void this.scheduleObserverRetry();sr("[state] ensureGlobalStyle");const t=document.createElement("style");t.setAttribute("data-server-stats-style","1"),t.textContent="\n ssh-tab.server-stats-tab {\n display: flex;\n flex-direction: column;\n }\n ssh-tab.server-stats-tab > .server-stats-bottom-host {\n flex: 0 0 auto;\n width: 100%;\n }\n ssh-tab.server-stats-tab > *:not(.server-stats-bottom-host) {\n flex: 1 1 auto;\n min-height: 0;\n }\n .server-stats-bottom-host {\n width: 100%;\n }\n ",document.head.appendChild(t),this.styleNode=t}attachExistingTabs(){const t=this.getObserverTarget();if(!t)return void this.scheduleObserverRetry();const e=t.querySelectorAll("ssh-tab"),n=[];e.forEach(t=>{const e=t;this.tabInstances.has(e)||"1"===e.getAttribute("data-ss-attached")||n.push(e)}),n.length>0&&(sr(`[state] attachExistingTabs found ${n.length} unattached tabs`),this.rebuildTabElementMap(),n.forEach(t=>this.attachToSshTab(t)))}startMutationObserver(){const t=this.getObserverTarget();if(!t)return sr("[state] startMutationObserver: no target"),void this.scheduleObserverRetry();sr("[state] startMutationObserver: ok"),this.observer&&this.observer.disconnect(),this.observer=new MutationObserver(t=>{let e=0;t.forEach(t=>{const n=t.target;n&&"function"==typeof n.closest&&n.closest("ssh-tab")||(t.addedNodes.forEach(t=>this.queueMutationNode(t,!0)),t.removedNodes.forEach(t=>this.queueMutationNode(t,!1)),e++)}),e>0&&(this.trackMutationBurst(e),this.flushMutationQueue())}),this.observer.observe(t,{childList:!0,subtree:!0})}queueMutationNode(t,e){t instanceof HTMLElement&&(e?this.pendingAdded.add(t):this.pendingRemoved.add(t))}flushMutationQueue(){this.mutationScheduled||(this.mutationScheduled=!0,window.setTimeout(()=>{this.mutationScheduled=!1,this.pendingAdded.forEach(t=>this.scanNodeForTabs(t)),this.pendingRemoved.forEach(t=>this.handleRemovedNode(t)),this.pendingAdded.clear(),this.pendingRemoved.clear()},0))}getObserverTarget(){return document.querySelector("app-root > div > .content")||null}trackMutationBurst(t){this.mutationBurst+=t,this.mutationBurstTimer||(this.mutationBurstTimer=window.setTimeout(()=>{this.mutationBurst=0,this.mutationBurstTimer=null},1e3)),this.mutationBurst>2e3&&this.observer&&(sr("[state] mutation burst detected, disabling observer"),this.observer.disconnect(),this.observer=null)}scheduleObserverRetry(){this.observerRetry||(sr("[state] scheduleObserverRetry"),this.observerRetry=window.setTimeout(()=>{this.observerRetry=null,"bottomBar"===this.activeDisplayMode&&(sr("[state] observerRetry tick"),this.safeRun("ensureGlobalStyle:retry",()=>this.ensureGlobalStyle()),this.safeRun("attachExistingTabs:retry",()=>this.attachExistingTabs()),this.safeRun("startMutationObserver:retry",()=>this.startMutationObserver()))},250))}scanNodeForTabs(t){t instanceof HTMLElement&&(t.tagName&&"ssh-tab"===t.tagName.toLowerCase()?this.attachToSshTab(t):t.querySelectorAll("ssh-tab").forEach(t=>this.attachToSshTab(t)))}handleRemovedNode(t){t instanceof HTMLElement&&(t.tagName&&"ssh-tab"===t.tagName.toLowerCase()?this.tabInstances.has(t)&&this.detachFromTab(t):t.querySelectorAll("ssh-tab").forEach(t=>this.detachFromTab(t)))}startScanTimer(){this.scanTimer||(this.scanTimer=window.setInterval(()=>{"bottomBar"===this.activeDisplayMode&&this.attachExistingTabs()},1500))}attachToSshTab(t){var e,n;if("bottomBar"!==this.activeDisplayMode)return;if(!t||this.tabInstances.has(t)||"1"===t.getAttribute("data-ss-attached"))return;sr("[state] attachToSshTab"),this.rebuildTabElementMap(),t.setAttribute("data-ss-attached","1"),t.classList.add("server-stats-tab");const i=document.createElement("div");i.classList.add("server-stats-bottom-host"),i.setAttribute("data-ss-host","1"),t.appendChild(i);const a=this.componentFactoryResolver.resolveComponentFactory(Ro).create(this.injector),s=this.resolveSessionForElement(t);void 0!==a.instance.useExternalController&&(a.instance.useExternalController=!0),a.instance.externalSessionResolver=()=>this.resolveSessionForElement(t),a.instance.bindToSession&&a.instance.bindToSession(s),this.appRef.attachView(a.hostView);const o=a.hostView.rootNodes[0];i.appendChild(o),a.changeDetectorRef.detectChanges();const r=()=>{try{window.dispatchEvent(new Event("resize"))}catch(t){}const e=this.resolveTabForElement(t);if(e&&e.frontend)try{"function"==typeof e.frontend.resizeHandler?e.frontend.resizeHandler():e.frontend.fitAddon&&"function"==typeof e.frontend.fitAddon.fit&&e.frontend.fitAddon.fit()}catch(t){}};setTimeout(r,50),setTimeout(r,250);let l=null;"undefined"!=typeof ResizeObserver&&(l=new ResizeObserver(()=>{r()}),l.observe(i));const c=this.resolveTabForElement(t);if(c&&"function"==typeof c.writeRaw&&!c.__ss_patched){c.__ss_patched=!0;const t=c.writeRaw.bind(c);c.writeRaw=async function(e){if(!this.frontend&&this.frontendReady$)try{await new Promise(t=>{const e=this.frontendReady$.subscribe(()=>{e&&e.unsubscribe(),t()});setTimeout(t,2e3)})}catch(t){}try{return await t(e)}catch(t){if(t&&t.message&&t.message.includes("Frontend not ready"))return;throw t}}}let d=null;c&&c.frontendReady$&&(d=c.frontendReady$.subscribe(()=>{setTimeout(()=>{r(),f()},200)}));const p={last:null};let u=s,m=!0,h=0;const g=async()=>{var e,n,i,s;if(!m)return null;const o=this.resolveTabForElement(t);if(o&&(!1===o.frontendIsReady||!o.frontend))return{data:null,session:null,supported:!1};const r=this.resolveSessionForElement(t);if(r!==u&&(u=r,p.last=null),a.instance.bindToSession&&a.instance.bindToSession(u),!u||!1===u.open)return{data:null,session:u,supported:!1};const l=u;if(!this.statsService.isPlatformSupport(l))return{data:null,session:u,supported:!1};if(!1===(null===(n=(e=this.statsService).isPaneVisible)||void 0===n?void 0:n.call(e,l)))return{data:null,session:l,supported:!0};const c=await this.statsService.fetchStats(l);if(!m||!1===l.open||u!==l||this.resolveSessionForElement(t)!==l)return null;if(!1===(null===(s=(i=this.statsService).isPaneVisible)||void 0===s?void 0:s.call(i,l)))return{data:null,session:l,supported:!0};const d=this.resolveTabForElement(t);return!d||!1!==d.frontendIsReady&&d.frontend?{data:c,session:l,supported:!0}:null},f=async()=>{var e,n,i,s,o,r,l,c,d,u,f,b;if(!m)return;const v=h,y=null===(s=null===(i=null===(n=null===(e=this.config)||void 0===e?void 0:e.store)||void 0===n?void 0:n.plugin)||void 0===i?void 0:i.serverStats)||void 0===s?void 0:s.enabled,w=this.getDisplayMode();if(!y||"bottomBar"!==w)return void(a.instance.hideExternal&&a.instance.hideExternal());let x;try{x=await g()}catch(t){return void(m&&v===h&&(null===(r=(o=a.instance).hideExternal)||void 0===r||r.call(o)))}m&&v===h&&((null===(u=null===(d=null===(c=null===(l=this.config)||void 0===l?void 0:l.store)||void 0===c?void 0:c.plugin)||void 0===d?void 0:d.serverStats)||void 0===u?void 0:u.enabled)&&"bottomBar"===this.getDisplayMode()?x&&(!x.session||!1!==x.session.open&&this.resolveSessionForElement(t)===x.session)&&(x.session&&x.supported?x.data?(p.last=x.data,a.instance.renderExternalStats&&a.instance.renderExternalStats(x.data)):a.instance.setExternalLoading&&a.instance.setExternalLoading(!1):a.instance.hideExternal&&a.instance.hideExternal()):null===(b=(f=a.instance).hideExternal)||void 0===b||b.call(f))},b=()=>{var t,e,n,i;if(!m)return;h++;const s=null===(i=null===(n=null===(e=null===(t=this.config)||void 0===t?void 0:t.store)||void 0===e?void 0:e.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.enabled,o=this.getDisplayMode();s&&"bottomBar"===o?(a.instance.setExternalLoading&&a.instance.setExternalLoading(null===p.last),setTimeout(()=>f(),300)):a.instance.hideExternal&&a.instance.hideExternal()};b();const v=window.setInterval(f,1e3),y=null===(e=this.config.changed$)||void 0===e?void 0:e.subscribe(()=>{b()}),w=null===(n=this.app.tabsChanged$)||void 0===n?void 0:n.subscribe(()=>{f()});this.tabInstances.set(t,{teardown:()=>{if(m){if(m=!1,h++,null==w||w.unsubscribe(),l){try{l.disconnect()}catch(t){}l=null}v&&clearInterval(v),y&&"function"==typeof y.unsubscribe&&y.unsubscribe(),d&&"function"==typeof d.unsubscribe&&d.unsubscribe();try{a.destroy()}catch(t){}try{this.appRef.detachView(a.hostView)}catch(t){}i.parentNode===t&&i.parentNode.removeChild(i),t.removeAttribute("data-ss-attached"),t.classList.remove("server-stats-tab"),setTimeout(r,50)}},timerId:v,collector:g,state:p,configSub:y}),this.attachedTabs.add(t)}detachFromTab(t){const e=this.tabInstances.get(t);e&&(sr("[state] detachFromTab"),e.teardown(),this.tabInstances.delete(t)),this.attachedTabs.delete(t),this.tabElementMap.delete(t)}rebuildTabElementMap(){this.tabElementMap.clear(),this.getAllLeafTabs().forEach(t=>{const e=this.getTabElement(t);e&&this.tabElementMap.set(e,t)})}getAllLeafTabs(){const t=[],e=n=>{if(n){if("function"==typeof n.getAllTabs){const t=n.getAllTabs();if(Array.isArray(t))return void t.forEach(t=>e(t))}t.push(n)}};return Array.isArray(this.app.tabs)&&this.app.tabs.forEach(t=>e(t)),t}getTabElement(t){if(!t)return null;const e=t.element&&t.element.nativeElement;if(e instanceof HTMLElement)return e;const n=t.hostView&&t.hostView.rootNodes;if(n&&n[0]instanceof HTMLElement)return n[0];const i=t.viewContainerEmbeddedRef&&t.viewContainerEmbeddedRef.rootNodes;return i&&i[0]instanceof HTMLElement?i[0]:null}resolveTabForElement(t){const e=this.tabElementMap.get(t);if(e)return e;for(const[e,n]of this.tabElementMap.entries())if(e&&e.contains&&e.contains(t))return n;return null}resolveSessionForElement(t){const e=this.tabElementMap.get(t);if(e)return this.resolveSessionFromTab(e);for(const[e,n]of this.tabElementMap.entries())if(e&&e.contains&&e.contains(t))return this.resolveSessionFromTab(n);return null}resolveSessionFromTab(t){return t?t.session?t.session:t.focusedTab?this.resolveSessionFromTab(t.focusedTab):null:null}observeTabLifecycle(){var t,e,n,i;this.disposables.forEach(t=>t()),this.disposables=[],[null===(t=this.app.tabRemoved$)||void 0===t?void 0:t.subscribe(t=>{const e=this.getTabElement(t);e&&this.detachFromTab(e),this.rebuildTabElementMap()}),null===(e=this.app.tabClosed$)||void 0===e?void 0:e.subscribe(t=>{const e=this.getTabElement(t);e&&this.detachFromTab(e),this.rebuildTabElementMap()}),null===(n=this.app.tabOpened$)||void 0===n?void 0:n.subscribe(()=>{this.rebuildTabElementMap(),this.attachExistingTabs()}),null===(i=this.app.tabsChanged$)||void 0===i?void 0:i.subscribe(()=>{this.rebuildTabElementMap(),this.attachExistingTabs()})].forEach(t=>{t&&"function"==typeof t.unsubscribe&&this.disposables.push(()=>t.unsubscribe())})}teardownAllTabs(){this.observer&&(this.observer.disconnect(),this.observer=null),this.scanTimer&&(clearInterval(this.scanTimer),this.scanTimer=null),this.disposables.forEach(t=>t()),this.disposables=[],this.attachedTabs.forEach(t=>{const e=this.tabInstances.get(t);e&&e.teardown()}),this.attachedTabs.clear(),this.tabInstances=new WeakMap,this.tabElementMap.clear()}};or=b([(0,y.NgModule)({imports:[x.CommonModule,k.FormsModule,$s(),Is],declarations:[Oo,Ro,tr],entryComponents:[Ro,tr],providers:[{provide:Ds.ConfigProvider,useClass:js,multi:!0},{provide:Cs.SettingsTabProvider,useClass:er,multi:!0},_o]}),v("design:paramtypes",[Ds.AppService,Ds.ConfigService,y.ComponentFactoryResolver,y.ApplicationRef,y.Injector,_o,"function"==typeof(nr=void 0!==Ds.TranslateService&&Ds.TranslateService)?nr:Object])],or);const rr=or;return f})());
|
|
3
2
|
//# sourceMappingURL=index.js.map
|