tabby-group-server-stats 1.7.4 → 1.7.5
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/PUBLISHING.zh-CN.md +7 -5
- package/README.en.md +36 -12
- package/README.md +36 -12
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/docs/tutorial.en.pdf +0 -0
- package/docs/tutorial.zh-CN.pdf +0 -0
- package/package.json +4 -2
- package/typings/builtin-metrics.d.ts +16 -5
- package/typings/components/bottom-bar.component.d.ts +20 -0
- package/typings/components/metric-strip.component.d.ts +4 -0
- package/typings/components/settings.component.d.ts +5 -0
- package/typings/config.d.ts +13 -5
- package/typings/metric-display.d.ts +3 -0
- package/typings/services/metric-scope.service.d.ts +5 -0
- package/typings/services/stats.service.d.ts +3 -1
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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})());
|
|
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 v(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 b(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}g.r(f),g.d(f,{default:()=>hr}),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],P="start",F="end",A="viewport",H="popper",j=V.reduce(function(t,e){return t.concat([e+"-"+P,e+"-"+F])},[]),L=[].concat(V,[R]).reduce(function(t,e){return t.concat([e,e+"-"+P,e+"-"+F])},[]),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,J=Math.round;function Y(){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(Y())}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&&J(i.width)/t.offsetWidth||1,s=t.offsetHeight>0&&J(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(Y());if(/Trident/i.test(Y())&&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 P:e[c]=e[c]-(n[d]/2-i[d]/2);break;case F:e[c]=e[c]+(n[d]/2-i[d]/2)}}return e}function vt(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function bt(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,v=vt("number"!=typeof f?f:bt(f,V)),b=u===H?"reference":H,y=t.rects.popper,w=t.elements[h?b: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+v.top,bottom:D.bottom-x.bottom+v.bottom,left:x.left-D.left+v.left,right:D.right-x.right+v.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,v=C(f),b=l||(v!==f&&h?function(t){if(C(t)===R)return[];var e=$(t);return[M(t),e,M(e)]}(f):[$(f)]),y=[f].concat(b).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],F=C(S),A=ht(S)===P,H=[T,E].indexOf(F)>=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[F]<=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}),v=C(e.placement),b=ht(e.placement),y=!b,w=gt(v),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,F="y"===w?E:N,A="y"===w?"height":"width",H=k[w],j=H+f[V],L=H-f[F],G=m?-I[A]/2:0,B=b===P?_[A]:I[A],z=b===P?-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},J=q[V],Y=q[F],Q=xt(0,_[A],W[A]),X=y?_[A]/2-G-Q-J-$.mainAxis:B-Q-J-$.mainAxis,tt=y?-_[A]/2+G+Q+Y+$.mainAxis:z+Q+Y+$.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(v),vt=null!=(ot=null==S?void 0:S[x])?ot:0,bt=ft?ut:ct-_[pt]-I[pt]-vt+$.altAxis,wt=ft?ct+_[pt]+I[pt]-vt-$.altAxis:mt,_t=m&&ft?function(t,e,n){var i=xt(t,e,n);return i>n?n:i}(bt,ct,wt):xt(m?bt: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 vt("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:bt(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),v=f?"y"===l?f.clientHeight||0:f.clientWidth||0:0,b=h/2-g/2,y=d[u],w=v-p[c]-d[m],x=v/2-p[c]/2+b,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=J(e.width)/t.offsetWidth||1,i=J(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 v=o.hasOwnProperty("x"),b=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===F)&&(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!==F)||(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:J(n*a)/a||0,y:J(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]=b?"0":"",D[y]=v?"0":"",D.transform=(x.devicePixelRatio||1)<=1?"translate("+m+"px, "+g+"px)":"translate3d("+m+"px, "+g+"px, 0)",D)):Object.assign({},$,((e={})[w]=b?g+"px":"",e[y]=v?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 Pt(t){return null!=t?`${t}`:""}function Ft(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,Jt=new Map,Yt=(t,e,n,i)=>{let a=i.context||{};const s=Jt.get(e);if(s)switch(i.runningTransition){case"continue":return _.EMPTY;case"stop":t.run(()=>s.transition$.complete()),a=Object.assign(s.context,a),Jt.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));Jt.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(()=>{Jt.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,Yt(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;Yt(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 Yt(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)(ve),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)(()=>ve)},{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:ve,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>ve)]}]},{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)(()=>ve)},{token:(0,y.forwardRef)(()=>be)}],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:ve,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>ve)]}]},{type:be,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>be)]}]}]}});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)(()=>ve)}],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:ve,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>ve)]}]}]}});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)(()=>ve)}],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:ve,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>ve)]}]}]}});class ve{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}}ve.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ve,deps:[{token:(0,y.forwardRef)(()=>be)},{token:y.ChangeDetectorRef}],target:y["ɵɵFactoryTarget"].Directive}),ve.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ve,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:ve,decorators:[{type:y.Directive,args:[{selector:"[ngbAccordionItem]",exportAs:"ngbAccordionItem",standalone:!0,host:{"[class.accordion-item]":"true","[id]":"id"}}]}],ctorParameters:function(){return[{type:be,decorators:[{type:y.Inject,args:[(0,y.forwardRef)(()=>be)]}]},{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 be{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)}}be.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:be,deps:[{token:te}],target:y["ɵɵFactoryTarget"].Directive}),be.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:be,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:ve}],exportAs:["ngbAccordion"],ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:be,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:[ve,{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,be,ve,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,be,ve,fe,he,ue,me],exports:[le,se,ie,ae,ne,re,ge,be,ve,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=Yt(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=Jt.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=Yt(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=Yt(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,Pe,Fe;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 Je(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 Ye{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""}}Ye.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ye,deps:[],target:y["ɵɵFactoryTarget"].Injectable}),Ye.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ye,providedIn:"root",useFactory:Je,deps:[{token:y.LOCALE_ID}]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ye,decorators:[{type:y.Injectable,args:[{providedIn:"root",useFactory:Je,deps:[y.LOCALE_ID]}]}]});class Qe extends Ye{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 v=!!(o&&d.before(o)||r&&d.after(r));!v&&c&&(v=c(d,{month:a.number,year:a.year}));let b=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:v,focused:!1,selected:!1,today:b}),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:Ye}],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:Ye}]}}),function(t){t[t.PREV=0]="PREV",t[t.NEXT=1]="NEXT"}(Pe||(Pe={}));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:Ye}],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:Ye}]},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:Ye},{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:Ye},{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=Pe,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:Ye}],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:Ye}]},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"}(Fe||(Fe={}));class an{processKey(t,e){const{state:n,calendar:i}=e;switch(t.which){case Fe.PageUp:e.focusDate(i.getPrev(n.focusedDate,t.shiftKey?"y":"m",1));break;case Fe.PageDown:e.focusDate(i.getNext(n.focusedDate,t.shiftKey?"y":"m",1));break;case Fe.End:e.focusDate(t.shiftKey?n.maxDate:n.lastDate);break;case Fe.Home:e.focusDate(t.shiftKey?n.minDate:n.firstDate);break;case Fe.ArrowLeft:e.focusDate(i.getPrev(n.focusedDate,"d",1));break;case Fe.ArrowUp:e.focusDate(i.getPrev(n.focusedDate,"d",i.getDaysPerWeek()));break;case Fe.ArrowRight:e.focusDate(i.getNext(n.focusedDate,"d",1));break;case Fe.ArrowDown:e.focusDate(i.getNext(n.focusedDate,"d",i.getDaysPerWeek()));break;case Fe.Enter:case Fe.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:Ye},{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:Ye},{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 Pe.PREV:this._service.open(this._calendar.getPrev(this.model.firstDate,"m",1));break;case Pe.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:Ye},{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:Ye},{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===Fe.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 vn(t){const e=Array.from(t.querySelectorAll(fn)).filter(t=>-1!==t.tabIndex);return[e[0],e[e.length-1]]}const bn=(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===Fe.Tab),(0,I.withLatestFrom)(t)).subscribe(([t,n])=>{const[i,a]=vn(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,bn(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 Pn 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 Fn(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)}Pn.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Pn,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),Pn.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Pn}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Pn,decorators:[{type:y.Injectable}]});const Hn=1721425.5,jn=1948439.5;class Ln extends Pn{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:Fn(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+(Fn(new Date(m,3,1))?-1:-2)+1)?0:Fn(new Date(m,3,1))?1:2,f=Math.floor((12*(h+g)+373)/367),v=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:Fn(new Date(m,f-1,1))?-1:-2)+1);return new Date(m,f-1,a-v+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=Yn(t);return Xn(i.gy,3,i.march)+31*(e-1)-Jn(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 Jn(t,e){return Math.trunc(t/e)}function Yn(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*Jn(a,33)+Jn(Kn(a,33),4),o=n}let r=t-o;s=s+8*Jn(r,33)+Jn(Kn(r,33)+3,4),4===Kn(a,33)&&a-r===4&&(s+=1);const l=20+s-(Jn(i,4)-Jn(3*(Jn(i,100)+1),4)-150);a-r<6&&(r=r-a+33*Jn(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*Jn(3*Jn(4*t+183187720,146097),4)-3908;const n=5*Jn(Kn(e,1461),4)+308,i=Jn(Kn(n,153),5)+1,a=Kn(Jn(n,153),12)+1,s=Jn(e,1461)-100100+Jn(8-a,6);return new Date(s,a-1,i)}function Xn(t,e,n){let i=Jn(1461*(t+Jn(e-8,6)+100100),4)+Jn(153*Kn(e+9,12)+2,5)+n-34840408;return i=i-Jn(3*Jn(t+100100+Jn(e-8,6),100),4)+752,i}function ti(t,e){return t<=6?31:t<=11||0===Yn(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=Yn(s);if(i=t-Xn(a,3,o.march),i>=0){if(i<=185)return n=1+Jn(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+Jn(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=["תשרי","חשון","כסלו","טבת","שבט","אדר","ניסן","אייר","סיון","תמוז","אב","אלול"],vi=["תשרי","חשון","כסלו","טבת","שבט","אדר א׳","אדר ב׳","ניסן","אייר","סיון","תמוז","אב","אלול"];class bi extends Ye{getMonthShortName(t,e){return this.getMonthFullName(t,e)}getMonthFullName(t,e){return li(e)?vi[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())}bi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:bi,deps:null,target:y["ɵɵFactoryTarget"].Injectable}),bi.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:bi}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:bi,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!==Fe.Space&&e!==Fe.Enter){if(e!==Fe.Tab){if(s||a){if(this.open(),n.length){switch(e){case Fe.ArrowDown:i=Math.min(i+1,n.length-1);break;case Fe.ArrowUp:if(this._isDropup()&&-1===i){i=n.length-1;break}i=Math.max(i-1,0);break;case Fe.Home:i=0;break;case Fe.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 Pi{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)(()=>Yt(this._ngZone,i,({classList:t})=>t.add("show"),{animation:n,runningTransition:"continue"})));return{windowRef:this._windowRef,transition$:a}}close(t=!1){return this._windowRef?Yt(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 Fi{constructor(t,e){this._el=t,this._zone=e}ngOnInit(){this._zone.onStable.asObservable().pipe((0,I.take)(1)).subscribe(()=>{Yt(this._zone,this._el.nativeElement,(t,e)=>{e&&Ut(t),t.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Yt(this._zone,this._el.nativeElement,({classList:t})=>t.remove("show"),{animation:this.animation,runningTransition:"stop"})}}Fi.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Fi,deps:[{token:y.ElementRef},{token:y.NgZone}],target:y["ɵɵFactoryTarget"].Component}),Fi.ɵcmp=y["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Fi,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:Fi,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=Yt(this._zone,t,()=>t.classList.remove("show"),e),i=Yt(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=Yt(this._zone,this._elRef.nativeElement,(t,e)=>{e&&Ut(t),t.classList.add("show")},t),n=Yt(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===Fe.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=vn(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&&Yt(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];bn(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)(Fi,{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 Ji=t=>Lt(t)&&""!==t;let Yi=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-"+Yi++)}get active(){return this._nav.activeId===this.id}get id(){return Ji(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 Fe.ArrowLeft:if("vertical"===this.orientation)return;a=(a-1+i)%i;break;case Fe.ArrowRight:if("vertical"===this.orientation)return;a=(a+1)%i;break;case Fe.ArrowDown:if("horizontal"===this.orientation)return;a=(a+1)%i;break;case Fe.ArrowUp:if("horizontal"===this.orientation)return;a=(a-1+i)%i;break;case Fe.Home:a=0;break;case Fe.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;Ji(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?Yt(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"),Yt(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 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[ngbPaginationPrevious]",ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:va,decorators:[{type:y.Directive,args:[{selector:"ng-template[ngbPaginationPrevious]",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[ngbPaginationPages]",ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:ba,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=Ft(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:va,descendants:!0},{propertyName:"tplPages",first:!0,predicate:ba,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:[va,{static:!1}]}],tplPages:[{type:y.ContentChild,args:[ba,{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,va,ba];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,va,ba],exports:[ya,ua,ma,ha,ga,fa,va,ba]}),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 Pi(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 Ft(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 Fe.ArrowDown:case Fe.ArrowLeft:this.update(this.rate-1);break;case Fe.ArrowUp:case Fe.ArrowRight:this.update(this.rate+1);break;case Fe.Home:this.update(0);break;case Fe.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=Ft(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*Ft(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 Pa{}Pa.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Pa,deps:[],target:y["ɵɵFactoryTarget"].NgModule}),Pa.ɵmod=y["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:w,type:Pa,imports:[Va],exports:[Va]}),Pa.ɵinj=y["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Pa,imports:[Va]}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Pa,decorators:[{type:y.NgModule,args:[{imports:[Va],exports:[Va]}]}]});class Fa{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 Fa(e.hour,e.minute,e.second):new Fa,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 Ja{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}}Ja.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ja,deps:[{token:Xt}],target:y["ɵɵFactoryTarget"].Injectable}),Ja.ɵprov=y["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ja,providedIn:"root"}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ja,decorators:[{type:y.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Xt}]}});class Ya{}Ya.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ya,deps:[],target:y["ɵɵFactoryTarget"].Directive}),Ya.ɵdir=y["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ya,isStandalone:!0,selector:"[ngbToastHeader]",ngImport:w}),y["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:Ya,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=Yt(this._zone,this._element.nativeElement,Ka,{animation:this.animation,runningTransition:"stop"});return t.subscribe(()=>{this.hidden.emit()}),t}show(){const t=Yt(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:Ja},{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:Ya,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:Ja},{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:[Ya,{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,Ya],exports:[Qa,Ya]}),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,Ya],exports:[Qa,Ya]}]}]});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 Pi(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=Pt(this.result),n=Array.isArray(this.term)?this.term:[this.term],i=t=>this.accentSensitive?t:Wt(t),a=n.map(t=>i(Pt(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=Pt,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 Pi(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 Fe.ArrowDown:t.preventDefault(),this._windowRef.instance.next(),this._showHint();break;case Fe.ArrowUp:t.preventDefault(),this._windowRef.instance.prev(),this._showHint();break;case Fe.Enter:case Fe.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):Pt(t)}_writeInputValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",Pt(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 vs{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(()=>{Yt(this._zone,this._el.nativeElement,(t,e)=>{e&&Ut(t),t.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Yt(this._zone,this._el.nativeElement,({classList:t})=>t.remove("show"),{animation:this.animation,runningTransition:"stop"})}dismiss(){this.static||this.dismissEvent.emit(fs.BACKDROP_CLICK)}}vs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:vs,deps:[{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-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:vs,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 bs{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=Yt(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"};Yt(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===Fe.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=vn(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})}}bs.ɵfac=y["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:w,type:bs,deps:[{token:x.DOCUMENT},{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-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:bs,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&&bn(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)(vs,{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)(bs,{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,Pa,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,Pa,qa,Xa,as,ms],exports:[we,Ie,Ae,He,Di,Ri,Zi,da,ks,xa,Ta,Oa,Pa,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,Pa,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"};function Ns(t,e){return[{operator:">",value:String(e),color:Es.red},{operator:">",value:String(t),color:Es.orange}]}const Os=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"}),Rs={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 Vs(t){if(!t)return null;const e=t.trim().toLowerCase().replace(/^fa[srbld]?\s+fa-/,"").replace(/^fa-/,"");return Os[Rs[e]||e]||null}function Ps(t){return null!==Vs(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 As(t){return!!t&&!Ps(t)&&!Fs(t)}function Hs(t){if(!t)return"";const e=t.trim();return e?Ps(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 js=[{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 Ls=class extends Ds.ConfigProvider{constructor(){super(...arguments),this.defaults={plugin:{serverStats:{enabled:!0,displayMode:"bottomBar",paneVisibility:{__nonStructural:!0},paneGroupModes:{__nonStructural:!0},defaultInterval:3,debugLogging:!1,location:{x:null,y:null},style:{background:"rgba(20, 20, 20, 0.90)",size:100,layout:"vertical"},defaultMetrics:{ram:!0,net:!0,load:!0,cpu:!1,disk:!1},builtinDefaultsVersion:0,builtinOrder:["ram","net","load"],defaultMetricOverrides:{__nonStructural:!0},showDefaultIcons:!0,customMetrics:[],metricGroups:[]}}}}};Ls=v([(0,y.Injectable)()],Ls);const Gs={"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"}},Bs=[["Pane status bar options","当前分屏状态栏选项","Opções da barra deste painel"],["Show","显示","Mostrar"],["Hide","隐藏","Ocultar"],["Tutorial (PDF)","使用教程(PDF)","Tutorial (PDF)"],["Duplicate Group","复制标签组","Duplicar grupo"],["Duplicate Child","复制子标签","Duplicar métrica filha"],["Copy","副本","Cópia"],["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)"],["Hover shows this command output. Single labels use a popup; groups follow their display mode. Leave empty for no extra information.","悬停时显示此命令的输出:单标签在上方弹窗中显示,标签组按其显示模式展开。移开收起;留空则不显示扩展信息。","Ao passar o mouse, mostra a saída: métricas individuais em popup e grupos conforme seu modo. 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"]];Gs.en=Gs.en||{};for(const[t,e,n]of Bs)Gs.en[t]=t,Gs["zh-CN"][t]=e,Gs["pt-BR"][t]=n;Gs.pt=Gs["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"]])Gs.en[t]=e,Gs.en[e]=e,Gs["zh-CN"][t]=t,Gs["zh-CN"][e]=t;function zs(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 Us(t){return Number.isFinite(t.timeout)&&t.timeout>0?Math.max(1,t.timeout):30}function Ws(t){return"'"+t.replace(/'/g,"'\"'\"'")+"'"}function qs(t,e,n="value"){var i,a,s;if(!/^[a-zA-Z0-9_]+$/.test(e))throw new Error("Invalid metric protocol token");const o=Us(t),r=t=>`if command -v timeout >/dev/null 2>&1; then\n timeout --kill-after=2s ${o}s /bin/sh -c ${Ws(t)}\nelif command -v gtimeout >/dev/null 2>&1; then\n gtimeout --kill-after=2s ${o}s /bin/sh -c ${Ws(t)}\nelse\n # Kill the whole process group, including children of a timed-out script.\n setsid /bin/sh -c ${Ws(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" != ${Ws((null!==(a=t.checkExpected)&&void 0!==a?a:"").trim())} ]; then`:`if [ "$_check_code" != ${Ws((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 Zs(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 Ks="__tabbyGroupServerStatsPaneId";function Js(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 Qs(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 Xs(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 Qs(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?eo(n,t):[n.id]}))}return i}function to(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 eo(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=to(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 to(n(t))===o}catch(t){return!1}});return 1===r.length?[...a,r[0].id]:a}function no(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 io=require("crypto"),ao="__tabbyGroupServerStatsLayoutProfileId",so="__tabbyGroupServerStatsVisibilityId";let oo=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[ao]=t.id;for(const e of Qs(r)){const n=e.token.profile;"ssh"===(null==n?void 0:n.type)&&"string"==typeof n.id&&n.id&&(n[Ks]=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[ao];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),{[ao]: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,Ks)}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,so);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[so]=s);const t=i.paneMarker(this.profile);t&&(n[Ks]=t)}else delete n[so],delete n[Ks],delete n.__getValue,n[so]=`pane-instance:${(0,io.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(Xs((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=no(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])}panePreferenceKey(t){if(this.destroyed||!t||!1===t.open)return;let e=this.visibilityKey(t);if(!e){const n=no(this.app.tabs||[],t);e=`pane-instance:${(0,io.randomBytes)(16).toString("hex")}`,this.visibilityInstances.set(n||t,e),this.preserveVisibilityMarker(n)}return e}savePanePreference(t,e,n){var i,a;const s=this.panePreferenceKey(t);if(!s)return;this.config.store.plugin||(this.config.store.plugin={}),this.config.store.plugin.serverStats||(this.config.store.plugin.serverStats={});const o=this.config.store.plugin.serverStats,r=o[e];o[e]=Object.assign(Object.assign({},r&&"object"==typeof r&&!Array.isArray(r)?r:{}),{[s]:n}),null===(a=(i=this.config).save)||void 0===a||a.call(i)}setPaneVisible(t,e){this.savePanePreference(t,"paneVisibility",Boolean(e))}getPaneGroupMode(t){var e,n,i,a;const s=this.visibilityKey(t),o=s&&(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.paneGroupModes)||void 0===a?void 0:a[s]);return"overview"===o||"carousel"===o||"static"===o?o:void 0}setPaneGroupMode(t,e){"overview"!==e&&"carousel"!==e&&"static"!==e||this.savePanePreference(t,"paneGroupModes",e)}rememberLegacyPanes(t,e){if(this.legacyPanesObserved.has(t))return;const n="function"==typeof t.getAllTabs?t.getAllTabs():[],i=Qs(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=Qs(e);if(!Array.isArray(o)||o.length!==r.length)return e;const l=Xs((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),{[Ks]: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=no(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(eo(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=Xs((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)}};oo=v([(0,y.Injectable)({providedIn:"root"}),b("design:paramtypes",[Ds.ConfigService,Ds.AppService,Ds.ProfilesService])],oo);const ro=["ram","net","load"];function lo(t){const e=Array.isArray(t)?t:[];return[...new Set([...e.filter(t=>ro.includes(t)),...ro])]}const co=t=>JSON.parse(JSON.stringify(t)),po=[{operator:">=",value:"90",color:Es.red},{operator:">=",value:"75",color:Es.orange}],uo=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'}}'`,mo=(t,e)=>`if [ "$(uname -s)" = Darwin ]; then ${e}; else ${t}; fi`;function ho(t,e=!1){const n=`awk -v cores="$cores" -v field=${1===t?1:2} 'BEGIN {if(cores !~ /^[0-9]+$/ || cores<=0) {bad=1; exit 1}} {gsub(/[{}]/, ""); load=$field; if(load !~ /^[0-9]+([.][0-9]+)?$/) {bad=1; exit 1} found=1; ${e?'printf "%.2f/%d\\n",load,cores':'printf "%d\\n",load*100/cores'}; exit} END {if(bad || !found) exit 1}'`;return mo(`cores=$(getconf _NPROCESSORS_ONLN 2>/dev/null) || cores=$(nproc 2>/dev/null) || exit 1; ${n} /proc/loadavg`,`cores=$(sysctl -n hw.logicalcpu 2>/dev/null) || exit 1; data=$(sysctl -n vm.loadavg 2>/dev/null) || exit 1; printf '%s\\n' "$data" | ${n}`)}function go(){const t={type:"text",color:Es.green,icon:"stats-cpu-load",checkMode:"exitCode",checkExpected:"0",unavailableText:"Unavailable"},e=e=>Object.assign(Object.assign({},t),{id:`builtin-load-${e}min`,type:"text",label:`${e}min`,suffix:"%",colorRules:Ns(100,150),checkCommand:mo("test -r /proc/loadavg","command -v sysctl >/dev/null"),command:ho(e),detailCommand:ho(e,!0)});return{id:"builtin-load",label:"CPU load",mode:"overview",layout:"vertical",main:Object.assign(Object.assign({},t),{id:"builtin-load-main",label:"Threads",type:"text",checkCommand:mo("test -r /proc/loadavg","command -v ps >/dev/null"),command:mo("awk '$4 ~ /^[0-9]+\\/[0-9]+$/ {print $4; found=1; exit} END {if(!found) exit 1}' /proc/loadavg","data=$(ps -A -M -o state= 2>/dev/null) || exit 1; printf '%s\\n' \"$data\" | awk 'NF {total++; if($1 ~ /^R/) running++} END {if(!total) exit 1; printf \"%d/%d\\n\",running,total}'")}),children:[e(1),e(5)]}}function fo(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 vo='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 bo(t){return`${vo}\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 yo(t){return`${vo}\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 wo(t,e={}){var n,i;const a=function(){const t={type:"progress",maxValue:100,suffix:"%",color:Es.green,colorRules:po,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:bo(n),checkCommand:mo("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:yo(n)}),n={cpu:Object.assign(Object.assign({},t),{id:"builtin-cpu",label:"CPU",icon:"stats-cpu",command:mo(fo(),'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:mo("test -r /proc/stat","command -v ps >/dev/null && command -v sysctl >/dev/null"),detailCommand:mo("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:Ns(60,80),checkCommand:mo("test -r /proc/meminfo","command -v vm_stat >/dev/null && command -v sysctl >/dev/null"),command:mo("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",uo(!1)),detailCommand:mo("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",uo(!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")]},load:go()};return co(n)}(),s=null===(n=e.defaultMetricOverrides)||void 0===n?void 0:n[t];if("net"===t||"load"===t){const e=s,n=a[t];return co(Object.assign(Object.assign(Object.assign({},n),e),{id:n.id,main:Object.assign(Object.assign(Object.assign({},n.main),null==e?void 0:e.main),{id:n.main.id}),children:null!==(i=null==e?void 0:e.children)&&void 0!==i?i:n.children}))}return co(Object.assign(Object.assign(Object.assign({},a[t]),s),{id:a[t].id}))}function xo(t){var e,n;const i=t.presetOrigin;if("group"===(null==i?void 0:i.kind)&&"cpu-load-group"===i.id&&/^https?:\/\/github\.com\/lishuainan0209\/tabby-group-server-stats(?:\.git)?\/?$/i.test(i.source||""))return!0;const a=t=>(null==t?void 0:t.replace(/\r\n?/g,"\n").trim())||"";if("awk '{print $4}' /proc/loadavg"!==a(null===(e=t.main)||void 0===e?void 0:e.command)||2!==(null===(n=t.children)||void 0===n?void 0:n.length))return!1;const s=t.children.map(t=>a(t.command)).sort();return[1,2].map(t=>`awk '{printf "%d\\n", ($${t}/'$(nproc)')*100}' /proc/loadavg`).sort().every((t,e)=>s[e]===t)}function ko(t){var e,n,i,a,s,o,r,l,c,d,p,u;if((t.builtinDefaultsVersion||0)>=1)return!1;const m={ram:null===(n=null===(e=t.defaultMetrics)||void 0===e?void 0:e.ram)||void 0===n||n,net:null===(a=null===(i=t.defaultMetrics)||void 0===i?void 0:i.net)||void 0===a||a,load:null===(o=null===(s=t.defaultMetrics)||void 0===s?void 0:s.load)||void 0===o||o,cpu:null!==(l=null===(r=t.defaultMetrics)||void 0===r?void 0:r.cpu)&&void 0!==l&&l,disk:null!==(d=null===(c=t.defaultMetrics)||void 0===c?void 0:c.disk)&&void 0!==d&&d},h=[...t.customMetrics||[]],g=new Set([...h.map(t=>t.id),...(t.metricGroups||[]).flatMap(t=>{var e;return[t.id,null===(e=t.main)||void 0===e?void 0:e.id,...(t.children||[]).map(t=>t.id)]})]);for(const e of["cpu","disk"]){if(!0===m[e]||(null===(p=t.defaultMetricOverrides)||void 0===p?void 0:p[e])){const n=wo(e,t),i=`legacy-builtin-${e}`;let a=i,s=2;for(;g.has(a);)a=`${i}-${s++}`;g.add(a),h.push(Object.assign(Object.assign({},n),{id:a,enabled:!0===m[e]&&!1!==n.enabled}))}m[e]=!1}return!(null===(u=t.defaultMetricOverrides)||void 0===u?void 0:u.load)&&(t.metricGroups||[]).some(xo)&&(m.load=!1),t.customMetrics=h,t.defaultMetrics||(t.defaultMetrics={}),Object.assign(t.defaultMetrics,m),t.builtinOrder=lo(t.builtinOrder),t.builtinDefaultsVersion=1,!0}const _o=require("child_process");var Io;const Do=Ts.join(Ms.tmpdir(),"tabby-server-stats.log");let $o=0;function Co(t){if(!So.isDebugEnabled)return;const e=`[${(new Date).toISOString()}] ${t}\n`;try{if($o++,$o%100==0)try{Ss.statSync(Do).size>2097152&&Ss.writeFileSync(Do,`[${(new Date).toISOString()}] [log rotated]\n`)}catch(t){}Ss.appendFileSync(Do,e)}catch(t){}console.log(`[ServerStats] ${t}`)}let So=Io=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(()=>{var t,e,n;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&&ko(i)&&this.config.save(),this.updateDebugState()})}updateDebugState(){var t,e,n,i;Io.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)}getPaneGroupMode(t){var e,n;return null===(n=null===(e=this.scopes)||void 0===e?void 0:e.getPaneGroupMode)||void 0===n?void 0:n.call(e,t)}setPaneGroupMode(t,e){var n,i;null===(i=null===(n=this.scopes)||void 0===n?void 0:n.setPaneGroupMode)||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||{ram:!0,net:!0,load:!0},n=lo(t.builtinOrder),i=e.ram?[wo("ram",t)]:[],a=n.filter(t=>"ram"!==t&&!!e[t]).map(e=>wo(e,t));return!1===t.showDefaultIcons&&(i.forEach(t=>{t.icon=""}),a.forEach(t=>{t.main.icon="",t.children.forEach(t=>{t.icon=""})})),{customMetrics:i,metricGroups:a}}(o);return function(t,e,n){const{available:i,panes:a}=function(t){const e=new Set(Xs(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(),zs(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=zs(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");Co(`[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=zs(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);Co(`[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 Zs(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,Co(`[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(qs(t,e))),m.push("wait","echo TABBY-STATS-END");try{const e=1e3*Math.max(15,...c.map(t=>2*Us(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){Co(`[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(zs(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 v=`${n}:${u.id}`;let b=this.detailTasks.get(v);b||(b=this.collectDetail(t,u,a,i),this.detailTasks.set(v,b));try{l[u.id]=await b}finally{this.detailTasks.get(v)===b&&this.detailTasks.delete(v)}})),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"',qs(e,"detail","detail"),"wait","echo TABBY-STATS-END",""].join("\n"),l=await this.execute(t,r,1e3*(2*Us(e)+5));if(!this.isCurrent(t,n,i))return"";const c=Zs(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||Co(`[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(),Co(`[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,_o.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 ${Ws('\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,v=!1,b=!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=Zs(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(b||(b=!0,clearTimeout(_),clearTimeout(c),d=setTimeout(()=>k(),1e3)),v){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||(v=!0,b?I():a||"function"!=typeof p.eof||await p.eof())}}})().catch(t=>k(t))})}};So.isDebugEnabled=!1,So=Io=v([(0,y.Injectable)({providedIn:"root"}),b("design:paramtypes",[Ds.ConfigService,oo])],So);var Mo=g(165);const To=/^[+-]?(?:(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?|\.\d+)(?:[eE][+-]?\d+)?$/,Eo=new Intl.NumberFormat("en-US",{minimumFractionDigits:3,maximumFractionDigits:3,useGrouping:!0});function No(t){return To.test(t.trim())&&Number.isFinite(Number(t.replace(/,/g,"")))}function Oo(t){return t.replace(/(^|[\d\s])GiB\b/g,"$1GB")}function Ro(t){if(!No(t)||/[eE]/.test(t))return t;const[e,n]=t.trim().replace(/,/g,"").split(".");return e.replace(/\B(?=(\d{3})+(?!\d))/g,",")+(void 0===n?"":`.${n}`)}function Vo(t){return/^[KMGTPE]?i?B$/i.test(t.trim())}function Po(t){return(null==t?void 0:t.status)||(t&&"-"!==t.value?t.value.startsWith("Err:")?"error":"ok":"pending")}function Fo(t,e){return!!t&&!1!==t.enabled&&(!1!==t.visibleWhenUnavailable||"unavailable"!==Po(e.find(e=>e.id===t.id)))}function Ao(t,e){return!1===t.enabled?[]:(t.children||[]).filter(t=>Fo(t,e)&&(!1!==t.showWhenUnavailable||"unavailable"!==Po(e.find(e=>e.id===t.id))))}function Ho(t,e,n){const i=new Set(Ao(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 jo=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=Vs,this.isUrl=Fs,this.isFa=As,this.iconClass=Hs}ngAfterViewChecked(){var t,e;this.measureCarousels();const n=(null===(t=this.groupPopup)||void 0===t?void 0:t.nativeElement)||(null===(e=this.singlePopup)||void 0===e?void 0:e.nativeElement)||null;if(this.portal&&this.portal!==n&&this.portal.remove(),n&&n.parentElement!==document.body&&document.body.appendChild(n),this.portal=n,n&&this.anchor){const t=this.anchor.getBoundingClientRect(),e=n.getBoundingClientRect(),i=t.top>=Math.min(e.height,140),a=i?t.top-14:window.innerHeight-t.bottom-14;n.style.maxHeight=`${Math.max(60,Math.min(380,a))}px`;const s=n.getBoundingClientRect();n.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-s.width-8))}px`,n.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=>Fo(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(lo(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:ro.length)-(null!==(a=i.get(e.id))&&void 0!==a?a:ro.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=>Fo(t,e))}(t,this.results)}carouselCandidates(t){return Ao(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 Po(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)&&No(this.result(t).value)}displayValue(t){const e=this.result(t).value;return this.isNetworkRate(t)?function(t){if(!No(t))return t;const e=.001024*Number(t.replace(/,/g,""));return Number.isFinite(e)?Eo.format(Math.abs(e)<5e-4?0:e):t}(e):"ok"===this.status(t)?Vo(t.suffix||"")?Ro(e):Oo(e):e}suffix(t){var e;const n=this.isNetworkRate(t)?"MB/s":Oo((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();if(![n,i].every(No))return null;const a=Oo(e[3]||"");return{numerator:Vo(a)?Ro(n):n,denominator:Vo(a)?Ro(i):i,suffix:a}}(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 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:Ro(e[2]),interfaces:e[3]}:null}(this.details[t.id])}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":Oo(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?Fo(t.main,this.results)?t.main:void 0:Ao(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)),Ao(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=Ho(n,this.results,i.id),i.since=t):(i.id=Ho(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()}enterSingle(t,e){clearTimeout(this.closeTimer),this.hoveredGroup=null,this.anchor=e.currentTarget,this.enterMetric(t),this.positionPopup()}keepSingle(t){clearTimeout(this.closeTimer),this.hoveredMetric=t.id}leaveSingle(t){this.closeTimer=setTimeout(()=>{var e;(null===(e=this.singlePopup)||void 0===e?void 0:e.nativeElement.matches(":hover, :focus-within"))||this.hoveredMetric!==t.id||this.hoveredGroup||(this.hoveredMetric=null,this.cdr.markForCheck())},100)}leaveMetric(t){this.hoveredMetric===t.id&&(this.hoveredMetric=null)}enterChild(t,e){"vertical"!==t.layout&&this.enterMetric(e)}enterGroup(t,e){clearTimeout(this.closeTimer),"static"===t.mode&&"vertical"!==t.layout||(this.hoveredMetric=null),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()}};v([(0,y.Input)(),b("design:type",Array)],jo.prototype,"metrics",void 0),v([(0,y.Input)(),b("design:type",Array)],jo.prototype,"groups",void 0),v([(0,y.Input)(),b("design:type",Array)],jo.prototype,"builtinOrder",void 0),v([(0,y.Input)(),b("design:type",Object)],jo.prototype,"stats",void 0),v([(0,y.Input)(),b("design:type",Object)],jo.prototype,"session",void 0),v([(0,y.Input)(),b("design:type",String)],jo.prototype,"autoDetailMetric",void 0),v([(0,y.ViewChild)("groupPopup"),b("design:type",y.ElementRef)],jo.prototype,"groupPopup",void 0),v([(0,y.ViewChild)("singlePopup"),b("design:type",y.ElementRef)],jo.prototype,"singlePopup",void 0),v([(0,y.ViewChildren)("carouselSlot"),b("design:type",y.QueryList)],jo.prototype,"carouselSlots",void 0),v([(0,y.HostListener)("document:keydown.escape"),b("design:type",Function),b("design:paramtypes",[]),b("design:returntype",void 0)],jo.prototype,"closeHover",null),v([(0,y.HostListener)("window:resize"),b("design:type",Function),b("design:paramtypes",[]),b("design:returntype",void 0)],jo.prototype,"positionPopup",null),jo=v([(0,y.Component)({selector:"server-stats-metric-strip",template:'\n <ng-template #value let-metric let-expanded="expanded">\n <span class="metric-label">\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)="enterSingle(metric, $event)" (mouseleave)="leaveSingle(metric)"\n (focusin)="enterSingle(metric, $event)" (focusout)="leaveSingle(metric)"\n [attr.aria-expanded]="metric.detailCommand ? hoveredMetric === metric.id : null"\n [attr.aria-label]="(metric.label || metric.id) | translate">\n <ng-container *ngTemplateOutlet="value; context: { $implicit: metric, expanded: false }"></ng-container>\n <div *ngIf="hoveredMetric === metric.id && !hoveredGroup && metric.detailCommand && status(metric) === \'ok\'"\n #singlePopup class="group-details single-details" role="region" [attr.aria-label]="metric.label | translate"\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)="keepSingle(metric)" (mouseleave)="leaveSingle(metric)">\n <div class="detail-grid"><div class="metric-row detail-row">\n <ng-container *ngTemplateOutlet="value; context: { $implicit: metric, expanded: true }"></ng-container>\n </div></div>\n </div>\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 "]}),b("design:paramtypes",[So,y.ChangeDetectorRef,y.NgZone,Mo.DomSanitizer])],jo);let Lo=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.menuOpen=!1,this.menuPosition={left:4,top:4},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.menuOpen=!1,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,o,r;const l=(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)||{},c=(null===(s=(a=this.statsService).getVisibleConfig)||void 0===s?void 0:s.call(a,t))||l;this.builtinOrder=l.builtinOrder||[],this.customMetrics=c.customMetrics||[],this.paneGroupMode=t?null===(r=(o=this.statsService).getPaneGroupMode)||void 0===r?void 0:r.call(o,t):void 0,this.metricGroups=this.paneGroupMode?(c.metricGroups||[]).map(t=>Object.assign(Object.assign({},t),{mode:this.paneGroupMode,layout:t.layout||"vertical"})):c.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.setPaneVisibility(!1===this.statsService.isPaneVisible(t))}setPaneVisibility(t){const e=this.resolveSession();this.canDisplay(e)&&(this.statsService.setPaneVisible(e,t),this.viewRevision++,this.synchronizeSession(e),this.visible=!0,this.paneVisible||(this.loading=!1),this.closePaneMenu(!0),this.cdr.detectChanges(),this.paneVisible&&this.forceUpdate())}setPaneGroupMode(t){const e=this.resolveSession();this.canDisplay(e)&&(this.statsService.setPaneGroupMode(e,t),!1===this.statsService.isPaneVisible(e)?this.setPaneVisibility(!0):(this.applyMetricScope(e),this.closePaneMenu(!0),this.cdr.detectChanges()))}togglePaneMenu(t){var e;null==t||t.stopPropagation(),this.canDisplay(this.resolveSession())&&(this.menuOpen=!this.menuOpen,this.cdr.detectChanges(),this.menuOpen&&(this.positionPaneMenu(),this.cdr.detectChanges(),null===(e=this.menuButtons()[0])||void 0===e||e.focus()))}positionPaneMenu(){var t,e,n,i,a,s;const o=null===(n=null===(t=this.paneToggle)||void 0===t?void 0:(e=t.nativeElement).getBoundingClientRect)||void 0===n?void 0:n.call(e),r=null===(s=null===(i=this.paneMenu)||void 0===i?void 0:(a=i.nativeElement).getBoundingClientRect)||void 0===s?void 0:s.call(a);o&&r&&(this.menuPosition={left:Math.max(8,Math.min(o.left,window.innerWidth-r.width-8)),top:Math.max(8,Math.min(o.top-r.height-4,window.innerHeight-r.height-8))})}menuButtons(){var t;return Array.from((null===(t=this.paneMenu)||void 0===t?void 0:t.nativeElement.querySelectorAll("button"))||[])}closePaneMenu(t=!1){var e;this.menuOpen&&(this.menuOpen=!1,t&&!this.destroyed&&(null===(e=this.paneToggle)||void 0===e||e.nativeElement.focus()))}onToggleKeydown(t){var e;if("ArrowDown"!==t.key&&"ArrowUp"!==t.key)return;t.preventDefault(),t.stopPropagation(),this.menuOpen||this.togglePaneMenu();const n=this.menuButtons();null===(e=n["ArrowUp"===t.key?n.length-1:0])||void 0===e||e.focus()}onMenuKeydown(t){var e;if(!this.menuOpen||this.destroyed)return;if("Tab"===t.key)return void this.closePaneMenu();const n=this.menuButtons(),i=n.indexOf(t.target);let a;if("ArrowDown"===t.key)a=(i+1)%n.length;else if("ArrowUp"===t.key)a=(i-1+n.length)%n.length;else if("Home"===t.key)a=0;else{if("End"!==t.key)return;a=n.length-1}t.preventDefault(),t.stopPropagation(),null===(e=n[a])||void 0===e||e.focus()}onDocumentKeydown(t){this.menuOpen&&!this.destroyed&&"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),this.closePaneMenu(!0),this.cdr.detectChanges())}onOutsideInteraction(t){var e,n;if(!this.menuOpen||this.destroyed)return;const i=t.target;(null===(e=this.paneMenu)||void 0===e?void 0:e.nativeElement.contains(i))||(null===(n=this.paneToggle)||void 0===n?void 0:n.nativeElement.contains(i))||(this.closePaneMenu(),this.cdr.detectChanges())}onViewportResize(){this.menuOpen&&!this.destroyed&&(this.positionPaneMenu(),this.cdr.detectChanges())}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.menuOpen=!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.menuOpen=!1,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 Go(t){return"string"!=typeof t?"":t.trim().replace(/\/+$/,"").replace(/\.git$/i,"").replace(/^https?:\/\//i,"https://")}function Bo(t){return"string"==typeof t?t.replace(/\r\n?/g,"\n").trim():""}function zo(t){return Bo(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 Uo(t){var e,n;const i=Bo(t.checkCommand),a="output"===t.checkMode?"output":"exitCode",s=(null===(e=t.suffix)||void 0===e?void 0:e.trim())||("progress"===t.type?"%":"");return[zo(t.command),zo(t.detailCommand),i,i?a:"",i?(null!==(n=t.checkExpected)&&void 0!==n?n:"output"===a?"":"0").trim():"","GiB"===s?"GB":s]}function Wo(t,e){if("metric"===e)return Uo(t);const n=t;return[Uo(n.main),n.children.map(t=>JSON.stringify(Uo(t))).sort()]}function qo(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,Wo(t,e),s])}function Zo(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 Ko(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:Go(o.source)};const r=Go(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:Zo(s.displayScope),d=null!==(a=null!==(i=t.excludedProfileNames)&&void 0!==i?i:Zo(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,Wo(s,t.kind),p])):t.id,source:r,kind:t.kind}}v([(0,y.ViewChild)("paneToggle"),b("design:type",y.ElementRef)],Lo.prototype,"paneToggle",void 0),v([(0,y.ViewChild)("paneMenu"),b("design:type",y.ElementRef)],Lo.prototype,"paneMenu",void 0),v([(0,y.HostListener)("document:keydown",["$event"]),b("design:type",Function),b("design:paramtypes",[KeyboardEvent]),b("design:returntype",void 0)],Lo.prototype,"onDocumentKeydown",null),v([(0,y.HostListener)("document:pointerdown",["$event"]),b("design:type",Function),b("design:paramtypes",[Event]),b("design:returntype",void 0)],Lo.prototype,"onOutsideInteraction",null),v([(0,y.HostListener)("window:resize"),b("design:type",Function),b("design:paramtypes",[]),b("design:returntype",void 0)],Lo.prototype,"onViewportResize",null),Lo=v([(0,y.Component)({selector:"server-stats-bottom-bar",template:'\n <ng-container *ngIf="visible">\n <button #paneToggle type="button" class="pane-status-toggle" [class.is-collapsed]="!paneVisible"\n data-testid="pane-status-toggle" (click)="togglePaneMenu($event)" (keydown)="onToggleKeydown($event)"\n (mousemove)="$event.stopPropagation()"\n [attr.aria-expanded]="menuOpen" aria-haspopup="menu"\n [attr.aria-label]="\'Pane status bar options\' | 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 #paneMenu *ngIf="menuOpen" class="pane-status-menu" role="menu"\n [style.left.px]="menuPosition.left" [style.top.px]="menuPosition.top"\n [attr.aria-label]="\'Pane status bar options\' | translate" (keydown)="onMenuKeydown($event)"\n (mousemove)="$event.stopPropagation()" (click)="$event.stopPropagation()">\n <div role="group">\n <button type="button" class="pane-menu-show" role="menuitemradio" [attr.aria-checked]="paneVisible"\n (click)="setPaneVisibility(true)"><span aria-hidden="true">{{paneVisible ? \'✓\' : \'\'}}</span>{{\'Show\' | translate}}</button>\n <button type="button" class="pane-menu-hide" role="menuitemradio" [attr.aria-checked]="!paneVisible"\n (click)="setPaneVisibility(false)"><span aria-hidden="true">{{!paneVisible ? \'✓\' : \'\'}}</span>{{\'Hide\' | translate}}</button>\n </div>\n <div class="pane-menu-separator" role="separator"></div>\n <div role="group">\n <button type="button" class="pane-menu-overview" role="menuitemradio" [attr.aria-checked]="paneGroupMode === \'overview\'"\n (click)="setPaneGroupMode(\'overview\')"><span aria-hidden="true">{{paneGroupMode === \'overview\' ? \'✓\' : \'\'}}</span>{{\'Overview\' | translate}}</button>\n <button type="button" class="pane-menu-carousel" role="menuitemradio" [attr.aria-checked]="paneGroupMode === \'carousel\'"\n (click)="setPaneGroupMode(\'carousel\')"><span aria-hidden="true">{{paneGroupMode === \'carousel\' ? \'✓\' : \'\'}}</span>{{\'Carousel\' | translate}}</button>\n <button type="button" class="pane-menu-static" role="menuitemradio" [attr.aria-checked]="paneGroupMode === \'static\'"\n (click)="setPaneGroupMode(\'static\')"><span aria-hidden="true">{{paneGroupMode === \'static\' ? \'✓\' : \'\'}}</span>{{\'Static\' | translate}}</button>\n </div>\n </div>\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 .pane-status-menu {\n position: fixed; z-index: 10000; max-height: calc(100vh - 16px); overflow-y: auto;\n min-width: 155px; padding: 5px; border: 1px solid #8199b2; border-radius: 6px;\n background: #202831; color: #f0f4f8; box-shadow: 0 4px 18px #0009; font-size: 13px;\n }\n .pane-status-menu button {\n display: flex; align-items: center; width: 100%; gap: 8px; padding: 6px 10px;\n border: none; border-radius: 3px; background: transparent; color: inherit; text-align: left; cursor: pointer;\n }\n .pane-status-menu button span { display: inline-block; width: 14px; color: #8fcaff; }\n .pane-status-menu button:hover, .pane-status-menu button:focus-visible { background: #36506b; outline: 1px solid #8fcaff; }\n .pane-menu-separator { border-top: 1px solid #65788d; margin: 4px 5px; }\n "]}),b("design:paramtypes",[So,Ds.ConfigService,Ds.AppService,y.ChangeDetectorRef,y.NgZone,Mo.DomSanitizer])],Lo);const Jo=t=>JSON.parse(JSON.stringify(t));function Yo(t){return Boolean(t&&"object"==typeof t&&"string"==typeof t.command&&(void 0===t.type||"text"===t.type||"progress"===t.type))}function Qo(t,e){if(!Yo(t))throw new Error("Invalid preset metric");return Object.assign(Object.assign({},Jo(t)),{id:"string"==typeof t.id?t.id:e,type:t.type||"text"})}function Xo(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&&Yo(t))return{id:`legacy-${e}`,kind:"metric",label:t.label||`Metric ${e+1}`,metric:Qo(t,`legacy-${e}`)};const n=Object.assign(Object.assign({},Jo(t)),{id:"string"==typeof t.id?t.id:`preset-${e}`,label:t.label||`Preset ${e+1}`});if("metric"===n.kind)n.metric=Qo(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({},Jo(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:Qo(t.group.main,`${n.id}-main`),children:t.group.children.map((t,e)=>Qo(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 tr=0;function er(t,e,n=()=>`preset-${Date.now()}-${++tr}`){var i,a,s,o,r;const l=Xo([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:Zo(p),m=null!==(r=null!==(o=l.excludedProfileNames)&&void 0!==o?o:Zo(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,...Xs(e).map(t=>({id:t.id,name:Js(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({},Jo(t)),{id:n(),displayScope:void 0});return delete e.presetOrigin,e},f=Ko(l);if("metric"===l.kind)return{customMetrics:[Object.assign(Object.assign({},g(l.metric)),{displayScope:d,presetOrigin:f})],metricGroups:[],missingProfileNames:c};const v=l.group;return{customMetrics:[],metricGroups:[Object.assign(Object.assign({},Jo(v)),{id:n(),displayScope:d,presetOrigin:f,main:g(v.main),children:v.children.map(g)})],missingProfileNames:c}}fo("iowait"),fo("steal");const nr="https://raw.githubusercontent.com/lishuainan0209/tabby-group-server-stats/main/presets.json",ir=2097152,ar={"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 sr extends Error{constructor(t,e){super(ar[t]),this.code=t,this.status=e,this.name="PresetGitHubError"}}var or;let rr=class{get builtinKeys(){return lo(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=js,this.iconSearch="",this.iconCategory="all",this.scopeSearch="",this.collapsedScopeLayouts=new Set,this.presets=Xo(g(977)),this.loadingPresets=!1,this.fetchError=!1,this.presetSearch="",this.presetMessage="",this.presetMissingNames=[],ko(this.config.store.plugin.serverStats)&&this.config.save()}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=Xs(t);return a.flatMap(t=>[t,...s.filter(e=>e.layoutId===t.id).map(e=>Object.assign(Object.assign({},e),{group:t.group,storedName:Js(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 Hs(t)}getSvgPath(t){return Vs(t)}isUrl(t){return Fs(t)}isFa(t){return As(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=Gs[a])||void 0===e?void 0:e[t])||(null===(n=Gs[a.toLowerCase().startsWith("zh")?"zh-CN":"en"])||void 0===n?void 0:n[t])||t}openTutorial(){const t=this.config.store.language,e=String(t&&"auto"!==t?t:"undefined"!=typeof navigator?navigator.language:"en");this.platform.openPath(`${__dirname}/../docs/tutorial.${e.toLowerCase().startsWith("zh")?"zh-CN":"en"}.pdf`)}copyLabel(t,e){const n=`${t||this.uiText("Unnamed Metric")} (${this.uiText("Copy")})`;let i=n,a=2;for(;e.includes(i);)i=`${n} ${a++}`;return i}independentCopy(t,e){const n=JSON.parse(JSON.stringify(t));return n.id=this.newId(e),delete n.presetOrigin,delete n.presetMetadata,n}copyGroup(t){const e=this.metricGroups[t];if(!e)return;const n=this.independentCopy(e,"group");n.label=this.copyLabel(e.label,this.metricGroups.map(t=>t.label)),n.main=this.independentCopy(e.main,"metric"),n.children=e.children.map(t=>this.independentCopy(t,"metric"));const i=[...this.metricGroups];i.splice(t+1,0,n),this.config.store.plugin.serverStats.metricGroups=i,this.save(),this.editGroup(t+1)}copyChild(t){var e;const n=null===(e=this.currentGroup)||void 0===e?void 0:e.children[t];if(!n)return;const i=this.independentCopy(n,"metric");i.label=this.copyLabel(n.label,[this.currentGroup.main,...this.currentGroup.children].map(t=>t.label)),this.currentGroup.children.splice(t+1,0,i),this.selectGroupMetric(t+1)}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={ram:!0,net:!0,load:!0}),this.config.store.plugin.serverStats.defaultMetrics}builtinMain(t){const e=wo(t,this.config.store.plugin.serverStats);return"net"===t||"load"===t?e.main:e}builtinTitle(t){return wo(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=wo(t,this.config.store.plugin.serverStats);if("net"===t||"load"===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||"load"===e?!this.isGroupValid():!this.isMetricValid(this.currentMetric)))return;const n=this.config.store.plugin.serverStats;n.defaultMetricOverrides=n.defaultMetricOverrides||{},n.defaultMetricOverrides[e]="net"===e||"load"===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=Xo(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(nr)}async fetchPresets(){if(!this.loadingPresets){this.loadingPresets=!0,this.fetchError=!1,this.presetMessage="",this.presetMissingNames=[];try{const t=await async function(t=nr,e={}){var n,i,a;const s=function(t=nr){if("string"!=typeof t)throw new sr("invalid-url");let e;try{e=new URL(t.trim()||nr)}catch(t){throw new sr("invalid-url")}if("https:"!==e.protocol||e.username||e.password||e.port)throw new sr("invalid-url");if("github.com"===e.hostname){if(!/^\/[^/]+\/[^/]+\/blob\/[^/]+\/.+\.json$/i.test(e.pathname))throw new sr("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 sr("invalid-url");try{if(e.pathname.split("/").some(t=>/[\x00-\x1f\x7f\\]/.test(decodeURIComponent(t))))throw new Error("Invalid path")}catch(t){throw new sr("invalid-url")}return e.search="",e.hash="",e.href}(t);if(null===(n=e.signal)||void 0===n?void 0:n.aborted)throw new sr("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,ir):ir,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 sr("aborted"));null===(i=e.signal)||void 0===i||i.addEventListener("abort",h,{once:!0});const g=setTimeout(()=>m(new sr("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 sr("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 sr("too-large");if(!n.body||"function"!=typeof n.body.getReader)throw new sr("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 sr("too-large");try{u+=a.decode(t,{stream:!0})}catch(t){throw new sr("invalid-json")}}try{u+=a.decode(),o=JSON.parse(u)}catch(t){throw new sr("invalid-json")}try{return Xo(o)}catch(t){throw new sr("invalid-library")}};try{return await Promise.race([f(),u])}catch(t){if(l.abort(),c&&c.cancel().catch(()=>{}),d)throw d;if(t instanceof sr)throw t;throw new sr("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 sr?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=Xo(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:Zo(a.displayScope),t.excludedProfileNames=null!==(i=t.excludedProfileNames)&&void 0!==i?i:Zo(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=Xo([t])[0],s=Ko(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&&Go(t.presetOrigin.source)===s.source});if(r)return{kind:a.kind,id:r.id};const l=er(a,n,()=>"comparison-only"),c="metric"===a.kind?l.customMetrics[0]:l.metricGroups[0],d=qo(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=Go(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||qo(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:Xo([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=er(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()}};v([(0,y.HostListener)("document:click"),b("design:type",Function),b("design:paramtypes",[]),b("design:returntype",void 0)],rr.prototype,"onDocumentClick",null),rr=v([(0,y.Component)({selector:"server-stats-settings",template:'\n <div class="settings-heading">\n <h3 translate>Bottom Status Bar</h3>\n <button type="button" class="btn tutorial-button" (click)="openTutorial()"><i class="fas fa-book-open" aria-hidden="true"></i> <span translate>Tutorial (PDF)</span></button>\n </div>\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\' || key === \'load\'" 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-copy" (click)="copyGroup(g)" [title]="\'Duplicate Group\' | translate" [attr.aria-label]="\'Duplicate Group\' | translate"><i class="fas fa-copy" aria-hidden="true"></i></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 child-copy" (click)="copyChild(c)" [title]="\'Duplicate Child\' | translate" [attr.aria-label]="\'Duplicate Child\' | translate"><i class="fas fa-copy" aria-hidden="true"></i></button>\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>Hover shows this command output. Single labels use a popup; groups follow their display mode. 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 .settings-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }\n .settings-heading h3 { margin: 0; }\n .tutorial-button { color: #fff; background: #175cb8; border: 2px solid #7abaff; font-weight: 700; padding: 9px 16px; box-shadow: 0 0 0 2px #175cb833; }\n .tutorial-button:hover, .tutorial-button:focus-visible { color: #fff; background: #216fd0; outline: 2px solid #b4d9ff; outline-offset: 2px; }\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 ']}),b("design:paramtypes",[Ds.PlatformService,Ds.ConfigService,Mo.DomSanitizer])],rr);let lr=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 rr}};var cr;lr=v([(0,y.Injectable)(),b("design:paramtypes",["function"==typeof(or=void 0!==Ds.TranslateService&&Ds.TranslateService)?or:Object])],lr);const dr=Ts.join(Ms.tmpdir(),"tabby-server-stats.log");let pr=0;const ur=t=>{if(So.isDebugEnabled)try{if(pr++,pr%100==0)try{Ss.statSync(dr).size>2097152&&Ss.writeFileSync(dr,`[${(new Date).toISOString()}] [log rotated]\n`)}catch(t){}Ss.appendFileSync(dr,`${(new Date).toISOString()} ${t}\n`)}catch(t){}};let mr=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,So.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;So.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)}),ur("[init] constructor start"),this.config.ready$.subscribe(()=>{var t,e,n,i;So.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(Gs))o.setTranslation(t,e,!0)})},1e3)}),this.config.ready$.subscribe(()=>{setTimeout(()=>{ur("[event] config.ready"),this.safeRun("applyDisplayMode:ready",()=>this.applyDisplayMode(this.getDisplayMode()))},500)}),this.config.changed$.subscribe(()=>{ur("[event] config.changed"),this.safeRun("applyDisplayMode:changed",()=>this.applyDisplayMode(this.getDisplayMode()))}),ur("[init] constructor end")}getDisplayMode(){return"bottomBar"}safeRun(t,e){if(!this.failed)try{e()}catch(e){this.failed=!0,ur(`[error] ${t}: ${e instanceof Error?e.stack||e.message:String(e)}`)}}applyDisplayMode(t){ur(`[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(){ur("[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();ur("[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&&(ur(`[state] attachExistingTabs found ${n.length} unattached tabs`),this.rebuildTabElementMap(),n.forEach(t=>this.attachToSshTab(t)))}startMutationObserver(){const t=this.getObserverTarget();if(!t)return ur("[state] startMutationObserver: no target"),void this.scheduleObserverRetry();ur("[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&&(ur("[state] mutation burst detected, disabling observer"),this.observer.disconnect(),this.observer=null)}scheduleObserverRetry(){this.observerRetry||(ur("[state] scheduleObserverRetry"),this.observerRetry=window.setTimeout(()=>{this.observerRetry=null,"bottomBar"===this.activeDisplayMode&&(ur("[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;ur("[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(Lo).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,v;if(!m)return;const b=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&&b===h&&(null===(r=(o=a.instance).hideExternal)||void 0===r||r.call(o)))}m&&b===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===(v=(f=a.instance).hideExternal)||void 0===v||v.call(f))},v=()=>{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()};v();const b=window.setInterval(f,1e3),y=null===(e=this.config.changed$)||void 0===e?void 0:e.subscribe(()=>{v()}),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}b&&clearInterval(b),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:b,collector:g,state:p,configSub:y}),this.attachedTabs.add(t)}detachFromTab(t){const e=this.tabInstances.get(t);e&&(ur("[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()}};mr=v([(0,y.NgModule)({imports:[x.CommonModule,k.FormsModule,$s(),Is],declarations:[jo,Lo,rr],entryComponents:[Lo,rr],providers:[{provide:Ds.ConfigProvider,useClass:Ls,multi:!0},{provide:Cs.SettingsTabProvider,useClass:lr,multi:!0},So]}),b("design:paramtypes",[Ds.AppService,Ds.ConfigService,y.ComponentFactoryResolver,y.ApplicationRef,y.Injector,So,"function"==typeof(cr=void 0!==Ds.TranslateService&&Ds.TranslateService)?cr:Object])],mr);const hr=mr;return f})());
|
|
2
2
|
//# sourceMappingURL=index.js.map
|