"; $loadStyle = \defined('XPROBER_IS_DEV') && XPROBER_IS_DEV ? '' : ""; $globalConfig = WindowConfigApi::getGlobalConfig(); echo << {$appName} {$version} {$globalConfig} {$loadScript} {$loadStyle}
Thinking...
HTML; } } namespace InnStudio\Prober\Components\Bootstrap; class BootstrapConstants { const ID = 'bootstrap'; } namespace InnStudio\Prober\Components\Bootstrap; use InnStudio\Prober\Components\Action\Action; use InnStudio\Prober\Components\Timezone\Timezone; final class Bootstrap { public static $dir; public function __construct($dir) { error_reporting(\E_ALL); self::$dir = $dir; new Timezone(); new Action(); new Render(); } } namespace InnStudio\Prober\Components\Style; use InnStudio\Prober\Components\Utils\UtilsApi; final class StyleAction { public function render($action) { if ('style' !== $action) { return; } $this->output(); } private function output() { UtilsApi::setFileCacheHeader(); header('Content-type: text/css'); echo <<<'CODE' :root{--x-max-width:1680px;--x-radius:.5rem;--x-fg:oklch(20% 0 0);--x-bg:oklch(95% 0 0);--x-text-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "PingFang TC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;--x-code-font-family:"SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", "PingFang SC", "Microsoft YaHei", monospace}:root[data-theme=dark]{--x-fg:oklch(95% 0 0);--x-bg:oklch(0% 0 0)}:root{--x-gutter:1rem;--x-gutter-sm:.5rem;--x-footer-fg:oklch(10% 0 0/.5)}[data-theme=dark]{--x-footer-fg:oklch(90% 0 0/.5)}._main_bc4zy_9{width:100%;color:var(--x-footer-fg);text-align:center;word-break:normal}._main_bc4zy_9 a,._main_bc4zy_9 a:hover{color:var(--x-footer-fg)}[data-theme=light]{--x-theme-switch-light-fg:oklch(20% 0 0/.85);--x-theme-switch-light-fg-hover:oklch(15% 0 0/.9);--x-theme-switch-light-fg-active:oklch(10% 0 0/.95);--x-theme-switch-light-bg:oklch(98% 0 0/.9);--x-theme-switch-light-bg-hover:oklch(100% 0 0/.9);--x-theme-switch-light-bg-active:oklch(93% 0 0/.9);--x-theme-switch-dark-fg:oklch(95% 0 0/.9);--x-theme-switch-dark-fg-hover:oklch(100% 0 0/.9);--x-theme-switch-dark-fg-active:oklch(90% 0 0/.9);--x-theme-switch-dark-bg:oklch(30% 0 0/.9);--x-theme-switch-dark-bg-hover:oklch(35% 0 0/.9);--x-theme-switch-dark-bg-active:oklch(25% 0 0/.9)}[data-theme=dark]{--x-theme-switch-light-fg:oklch(90% 0 0/.9);--x-theme-switch-light-fg-hover:oklch(95% 0 0/.9);--x-theme-switch-light-fg-active:oklch(85% 0 0/.9);--x-theme-switch-light-bg:oklch(38.5% 0 0/.9);--x-theme-switch-light-bg-hover:oklch(43% 0 0/.9);--x-theme-switch-light-bg-active:oklch(33% 0 0/.9);--x-theme-switch-dark-fg:oklch(90% 0 0/.9);--x-theme-switch-dark-fg-hover:oklch(95% 0 0/.9);--x-theme-switch-dark-fg-active:oklch(85% 0 0/.9);--x-theme-switch-dark-bg:oklch(30% 0 0/.9);--x-theme-switch-dark-bg-hover:oklch(35% 0 0/.9);--x-theme-switch-dark-bg-active:oklch(25% 0 0/.9)}._main_j7pyp_31{justify-content:center;display:flex}._button_j7pyp_36{all:unset;cursor:pointer;padding:calc(var(--x-gutter-sm) * .5) var(--x-gutter);color:var(--xthtmesw)}._button_j7pyp_36:first-child{border-top-left-radius:10rem;border-bottom-left-radius:10rem}._button_j7pyp_36:last-child{border-top-right-radius:10rem;border-bottom-right-radius:10rem}._button_j7pyp_36[data-active]{pointer-events:none;position:relative}._button_j7pyp_36[data-active]:after{content:"";border-radius:2px;width:30%;height:3px;position:absolute;bottom:0;left:50%;transform:translate(-50%)}._button_j7pyp_36[data-id=light]{background:var(--x-theme-switch-light-bg);color:var(--x-theme-switch-light-fg)}._button_j7pyp_36[data-id=light]:hover{background:var(--x-theme-switch-light-bg-hover);color:var(--x-theme-switch-light-fg-hover)}._button_j7pyp_36[data-id=light]:active{background:var(--x-theme-switch-light-bg-active);color:var(--x-theme-switch-light-fg-active)}._button_j7pyp_36[data-id=light][data-active]:after{background-color:var(--x-theme-switch-light-fg)}._button_j7pyp_36[data-id=dark]{background:var(--x-theme-switch-dark-bg);color:var(--x-theme-switch-dark-fg)}._button_j7pyp_36[data-id=dark]:hover{background:var(--x-theme-switch-dark-bg-hover);color:var(--x-theme-switch-dark-fg-hover)}._button_j7pyp_36[data-id=dark]:active{background:var(--x-theme-switch-dark-bg-active);color:var(--x-theme-switch-dark-fg-active)}._button_j7pyp_36[data-id=dark][data-active]:after{background-color:var(--x-theme-switch-dark-fg)}._main_mb04g_1{justify-content:center;gap:var(--x-gutter-sm);padding-top:var(--x-gutter);flex-wrap:wrap;display:flex}:root,[data-theme=dark]{--x-header-link-fg:oklch(90% 0 0);--x-header-link-fg-hover:oklch(100% 0 0);--x-header-link-fg-active:oklch(85% 0 0);--x-header-link-bg:oklch(30% 0 0/.9);--x-header-link-bg-hover:oklch(35% 0 0/.9);--x-header-link-bg-active:oklch(25% 0 0/.9)}._main_uzbg7_19{align-items:center;gap:var(--x-gutter-sm);cursor:pointer;background:var(--x-header-link-bg);padding:var(--x-gutter-sm) var(--x-gutter);color:var(--x-header-link-fg);border:none;border-radius:10rem;text-decoration:none;display:flex}._main_uzbg7_19:hover{background:var(--x-header-link-bg-hover);color:var(--x-header-link-fg-hover);text-decoration:none}._main_uzbg7_19:active{background:var(--x-header-link-bg-active);color:var(--x-header-link-fg-active);text-decoration:none}._main_1k8xz_1{font-size:1rem;font-weight:400}._name_1k8xz_6{font-weight:700}._version_1k8xz_10{opacity:.75;font-size:.8em;font-weight:400}:root{--x-toast-fg:oklch(100% 0 0/.9);--x-toast-bg:oklch(0% 0 0/.8)}:root[data-theme=dark]{--x-toast-fg:oklch(0% 0 0/.9);--x-toast-bg:oklch(100% 0 0/.8)}._main_setjm_10{all:unset;z-index:20;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);cursor:pointer;border-radius:var(--x-gutter);background:var(--x-toast-bg);padding:var(--x-gutter-sm) var(--x-gutter);max-width:80vw;color:var(--x-toast-fg);border:none;position:fixed;bottom:4rem;left:50%;transform:translate(-50%)}:root{--x-line-height:1.25;--x-column-min-width:280px;--x-text-fg:oklch(10% 0 0);--x-link-fg:oklch(5% 0 0);--x-link-fg-hover:oklch(1% 0 0);--x-link-fg-active:oklch(0% 0 0);--x-link-bg:oklch(0% 0 0/.1);--x-link-bg-hover:oklch(0% 0 0/.15);--x-link-bg-active:oklch(0% 0 0/.2);--x-body-fg:oklch(10% 0 0);--x-body-bg:oklch(90% 0 0)}:root[data-theme=dark]{--x-text-fg:oklch(90% 0 0);--x-link-fg:oklch(90% 0 0);--x-link-fg-hover:oklch(100% 0 0);--x-link-fg-active:oklch(85% 0 0);--x-link-bg:oklch(100% 0 0/.1);--x-link-bg-hover:oklch(100% 0 0/.15);--x-link-bg-active:oklch(100% 0 0/.05);--x-body-fg:oklch(90% 0 0);--x-body-bg:oklch(15% 0 0)}*{box-sizing:border-box;word-break:break-word;margin:0;padding:0}html{scroll-behavior:smooth;font-size:85%}body{place-content:safe center;gap:var(--x-gutter);background:var(--x-body-bg);color:var(--x-body-fg);line-height:var(--x-line-height);font-family:var(--x-code-font-family);margin:0;padding:0;display:grid}a{cursor:pointer;color:var(--x-text-fg);text-decoration:none}a:hover,a:active{color:var(--x-text-fg);text-decoration:underline}._container_30sck_1{gap:var(--x-gutter);max-width:1200px;display:grid}:root{--x-card-legend-arrow-fg:var(--x-card-legend-fg);--x-card-legend-arrow-bg-hover:oklch(0% 0 0/.1);--x-card-legend-arrow-bg-active:oklch(0% 0 0/.15)}[data-theme=dark]{--x-card-legend-arrow-fg:var(--x-card-legend-fg);--x-card-legend-arrow-bg-hover:oklch(0% 0 0/.1);--x-card-legend-arrow-bg-active:oklch(0% 0 0/.05)}._arrow_19b9q_13{cursor:pointer;border-radius:var(--x-radius);padding:var(--x-gutter-sm);color:var(--x-card-legend-arrow-fg);background:0 0;border:none;align-items:center;display:flex}._arrow_19b9q_13:hover{background:var(--x-card-legend-arrow-bg-hover);color:var(--x-card-legend-arrow-fg)}._arrow_19b9q_13:active{background:var(--x-card-legend-arrow-bg-active);color:var(--x-card-legend-arrow-fg)}._arrow_19b9q_13[data-disabled],._arrow_19b9q_13[data-disabled]:hover{opacity:.3;pointer-events:none}._arrow_19b9q_13 svg{width:1rem;height:1rem}:root{--x-module-header-bg:oklch(100% 0 0/.75);--x-module-header-fg:oklch(0% 0 0);--x-module-header-title-fg:oklch(0% 0 0/.7);--x-module-header-title-bg:oklch(0% 0 0/.1);--x-module-body-bg:var(--x-module-header-bg)}[data-theme=dark]{--x-module-header-bg:oklch(100% 0 0/.1);--x-module-header-fg:oklch(100% 0 0/.7);--x-module-header-title-fg:oklch(100% 0 0/.7);--x-module-header-title-bg:oklch(100% 0 0/.1);--x-module-body-bg:var(--x-module-header-bg)}._main_15ko2_17{flex-grow:1;scroll-margin-top:0;position:relative}._header_15ko2_23{border-radius:var(--x-radius) var(--x-radius) 0 0;background:var(--x-module-header-bg);width:fit-content;color:var(--x-module-header-fg);white-space:nowrap;align-items:center;padding:1px;font-size:1rem;display:flex}._title_15ko2_35{font-weight:400}._body_15ko2_39{gap:var(--x-gutter-sm);border-radius:0 var(--x-radius) var(--x-radius) var(--x-radius);background:var(--x-module-body-bg);padding:var(--x-gutter);display:grid}:root,[data-theme=dark]{--x-des-fg:var(--x-text-fg);--x-des-accent:oklch(70.344% .16156 249.935)}._main_11kiv_11{border-radius:var(--x-radius);color:var(--x-des-fg);font-family:var(--x-text-font-family);list-style-type:none;display:grid}._item_11kiv_19{align-items:center;gap:var(--x-gutter-sm);opacity:.65;display:flex}._item_11kiv_19 svg{width:1em;height:1em}:root{--x-placeholder-bg:linear-gradient(to right, oklch(0% 0 0/.1) 46%, oklch(0% 0 0/.15) 50%, oklch(0% 0 0/.1) 54%) 50% 50%}[data-theme=dark]{--x-placeholder-bg:linear-gradient(to right, oklch(100% 0 0/.1) 46%, oklch(100% 0 0/.15) 50%, oklch(100% 0 0/.1) 54%) 50% 50%}@keyframes _animation_u2qvm_1{0%{transform:translate(-30%)}to{transform:translate(30%)}}._main_u2qvm_19{border-radius:var(--x-radius);position:relative;overflow:hidden}._main_u2qvm_19:before{z-index:1;background:var(--x-placeholder-bg);pointer-events:none;content:" ";width:500%;margin-left:-250%;animation:1s linear infinite _animation_u2qvm_1;position:absolute;inset:0 0 0 50%}:root{--x-error-fg:oklch(53% .2 25);--x-error-bg:oklch(53% .2 25/.1);--x-error-icon-fg:oklch(53% .2 25)}[data-theme=dark]{--x-error-fg:oklch(70% .13 20);--x-error-bg:oklch(70% .13 20/.1);--x-error-icon-fg:oklch(70% .13 20)}._main_ndt5n_13{align-items:center;gap:var(--x-gutter-sm);border-radius:var(--x-radius);background:var(--x-error-bg);padding:var(--x-gutter-sm) var(--x-gutter);color:var(--x-error-fg);display:flex;position:relative}._main_ndt5n_13 svg{width:1em;height:1em;color:var(--x-error-icon-fg)}._main_ky93m_1{grid-template-columns:repeat(auto-fill, minmax(var(--x-column-min-width), 1fr));column-gap:var(--x-gutter-sm);row-gap:var(--x-gutter);display:grid}._link_ky93m_8{border-radius:var(--x-radius);padding:0 var(--x-gutter-sm);color:var(--x-link-fg)}._link_ky93m_8:hover{background:var(--x-link-bg-hover);color:var(--x-link-fg-hover)}._link_ky93m_8:active{background:var(--x-link-bg-active);color:var(--x-link-fg-active)}._link_ky93m_8 svg{width:1em;height:1em}._main_xx7cp_1 rt{opacity:.5;font-size:1rem;font-weight:400}._main_xx7cp_1[data-is-result]{font-weight:700}:root{--x-browser-benchmark-link-fg:oklch(0% 0 0/.9);--x-browser-benchmark-link-fg-hover:oklch(0% 0 0/.9);--x-browser-benchmark-link-fg-active:oklch(0% 0 0/.9);--x-browser-benchmark-link-bg:oklch(0% 0 0/.05);--x-browser-benchmark-link-bg-hover:oklch(0% 0 0/.1);--x-browser-benchmark-link-bg-active:oklch(0% 0 0/.15)}[data-theme=dark]{--x-browser-benchmark-link-fg:oklch(95% 0 0/.9);--x-browser-benchmark-link-fg-hover:oklch(100% 0 0/.9);--x-browser-benchmark-link-fg-active:oklch(90% 0 0/.9);--x-browser-benchmark-link-bg:oklch(100% 0 0/.05);--x-browser-benchmark-link-bg-hover:oklch(100% 0 0/.1);--x-browser-benchmark-link-bg-active:oklch(100% 0 0/.01)}._main_7f4z3_19{gap:calc(var(--x-gutter-sm) * .5);text-align:center;display:grid}._header_7f4z3_25{justify-content:center;align-items:center;display:flex}._marks_7f4z3_31{all:unset;justify-content:center;align-items:center;gap:calc(var(--x-gutter-sm) * .5);cursor:pointer;border-radius:var(--x-radius);background:var(--x-browser-benchmark-link-bg);color:var(--x-browser-benchmark-link-fg);flex-wrap:wrap;font-size:1.15rem;display:flex}._marks_7f4z3_31:hover{background:var(--x-browser-benchmark-link-bg-hover);color:var(--x-browser-benchmark-link-fg-hover)}._marks_7f4z3_31:active{background:var(--x-browser-benchmark-link-bg-active);color:var(--x-browser-benchmark-link-fg-active)}._marks_7f4z3_31 [data-is-detail]{opacity:.7}._sign_7f4z3_56{opacity:.5}:root{--x-meter-height:5px;--x-meter-bg:linear-gradient(to bottom, oklch(0% 0 0/.1), oklch(0% 0 0/.05));--x-meter-bar-bg:oklch(0% 0 0/.1);--x-meter-value-bg:oklch(79% .25 142);--x-meter-value-optimum-bg:oklch(63% .22 142);--x-meter-value-suboptimum-bg:oklch(76% .14 72);--x-meter-value-even-less-good-bg:oklch(49% .19 28);--x-meter-filter:none;--x-meter-percent-bg:oklch(0% 0 0/.1)}[data-theme=dark]{--x-meter-bg:linear-gradient(to bottom, oklch(100% 0 0/.15), oklch(100% 0 0/.1));--x-meter-bar-bg:oklch(100% 0 0/.1);--x-meter-value-optimum-bg:oklch(63% .22 142);--x-meter-value-suboptimum-bg:oklch(68% .14 70);--x-meter-value-even-less-good-bg:oklch(49% .19 28);--x-meter-filter:brightness(.5);--x-meter-percent-bg:oklch(100% 0 0/.1)}._main_yr5so_23{gap:var(--x-gutter-sm);grid-template-columns:1fr auto;grid-template-areas:"x-meter-name x-meter-percent""x-meter-name x-meter-overview""x-meter-core x-meter-core";display:grid}._percent_yr5so_30{text-align:right;grid-area:x-meter-percent}._percentText_yr5so_35{border-radius:var(--x-radius);background-color:var(--x-meter-percent-bg);padding:0 var(--x-gutter)}._name_yr5so_41{all:unset;color:var(--x-bg-fg);background:0 0;border:none;grid-area:x-meter-name;align-items:center;display:flex}._nameText_yr5so_51{line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;max-width:15rem;display:-webkit-box;overflow:hidden}._overview_yr5so_60{grid-area:x-meter-overview}._core_yr5so_64{appearance:none;border-radius:var(--x-meter-height);background:var(--x-meter-bg);width:100%;height:var(--x-meter-height);border:none;grid-area:x-meter-core}._core_yr5so_64::-webkit-meter-bar{border-radius:var(--x-meter-height);background:unset;height:var(--x-meter-height)}._core_yr5so_64::-webkit-meter-optimum-value{border-radius:var(--x-meter-height);background:var(--x-meter-value-optimum-bg)}._core_yr5so_64::-webkit-meter-suboptimum-value{border-radius:var(--x-meter-height);background:var(--x-meter-value-suboptimum-bg)}._core_yr5so_64::-webkit-meter-even-less-good-value{border-radius:var(--x-meter-height);background:var(--x-meter-value-even-less-good-bg)}:root{--x-button-fg:var(--x-text-fg);--x-button-fg-hover:var(--x-text-fg);--x-button-fg-active:var(--x-text-fg);--x-button-bg:oklch(0% 0 0/.1);--x-button-bg-hover:oklch(0% 0 0/.15);--x-button-bg-active:oklch(0% 0 0/.2)}[data-theme=dark]{--x-button-fg:var(--x-text-fg);--x-button-fg-hover:var(--x-text-fg-hover);--x-button-fg-active:var(--x-text-fg-active);--x-button-bg:oklch(100% 0 0/.15);--x-button-bg-hover:oklch(100% 0 0/.2);--x-button-bg-active:oklch(100% 0 0/.1)}@keyframes _spin_i7kkm_1{to{transform:rotate(360deg)}}._button_i7kkm_24{cursor:pointer;border-radius:var(--x-radius);background:var(--x-button-bg);padding:2px var(--x-gutter-sm);color:var(--x-button-fg);font-family:var(--x-text-font-family);border:none;align-items:center;gap:.25em;text-decoration:none;display:flex}._button_i7kkm_24:hover{background:var(--x-button-bg-hover);color:var(--x-button-fg-hover);text-decoration:none}._button_i7kkm_24:active{background:var(--x-button-bg-active);color:var(--x-button-fg-active);text-decoration:none}._icon_i7kkm_48{aspect-ratio:1;place-content:center;width:1rem;display:grid}._icon_i7kkm_48 svg{width:1rem;height:1rem}._icon_i7kkm_48[data-status=loading]{animation:1s linear infinite _spin_i7kkm_1}:root{--x-nav-fg:oklch(0% 0 0/.9);--x-nav-bg:oklch(100% 0 0/.9);--x-nav-bg-hover:oklch(0% 0 0/.05);--x-nav-bg-active:oklch(0% 0 0/.1);--x-nav-border-color:linear-gradient(to bottom, transparent, oklch(0% 0 0/.1), transparent);--x-nav-text-shadow:0 1px 2px oklch(100% 0 0/.3);--x-nav-box-shadow:0 0 3px oklch(0% 0 0/.1)}[data-theme=dark]{--x-nav-fg:oklch(100% 0 0/.9);--x-nav-bg:oklch(100% 0 0/.15);--x-nav-bg-hover:oklch(100% 0 0/.1);--x-nav-bg-active:oklch(100% 0 0/.15);--x-nav-border-color:linear-gradient(to bottom, transparent, oklch(100% 0 0/.1), transparent);--x-nav-text-shadow:0 1px 2px oklch(0% 0 0/.3)}._wrap_1hhzt_20{z-index:10;justify-content:center;padding:0;display:flex;position:sticky;bottom:0;left:0;right:0;overflow:hidden}@media (width>=768px){._wrap_1hhzt_20{bottom:var(--x-gutter-sm);padding:5px}}._main_1hhzt_38{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background:var(--x-nav-bg);align-items:center;display:flex;overflow-x:auto}@media (width>=768px){._main_1hhzt_38{box-shadow:var(--x-nav-box-shadow);padding:0 var(--x-gutter);border-radius:10rem}}._link_1hhzt_53{padding:var(--x-gutter);color:var(--x-nav-fg);text-shadow:var(--x-nav-text-shadow);white-space:nowrap;position:relative}._link_1hhzt_53:after{background:var(--x-nav-border-color);pointer-events:none;content:"";width:1px;height:80%;position:absolute;top:20%;right:0;transform:translateY(-20%)}._link_1hhzt_53:last-child:after{display:none}._link_1hhzt_53:hover{background:var(--x-nav-bg-hover);color:var(--x-nav-fg);text-decoration:none}._link_1hhzt_53:focus,._link_1hhzt_53:active,._link_1hhzt_53[data-active]{background:var(--x-nav-bg-active);color:var(--x-nav-fg);text-decoration:none}@media (width>=768px){._link_1hhzt_53{padding:var(--x-gutter-sm) var(--x-gutter)}}:root{--x-card-group-label-fg:var(--x-text-fg);--x-card-group-split-color:oklch(0% 0 0/.1);--x-card-group-bg-hover:oklch(0% 0 0/.05)}[data-theme=dark]{--x-card-group-label-fg:var(--x-text-fg);--x-card-group-split-color:oklch(100% 0 0/.1);--x-card-group-bg-hover:oklch(100% 0 0/.05)}._main_1kdvx_13{grid-template-columns:minmax(var(--min-width), var(--max-width)) 1fr;gap:var(--x-gutter-sm);border-radius:var(--x-radius);display:grid}._main_1kdvx_13:hover{background:var(--x-card-group-bg-hover)}._label_1kdvx_23{color:var(--x-card-group-label-fg);font-family:var(--x-text-font-family);text-align:right;word-break:normal}._label_1kdvx_23:after{content:":"}._content_1kdvx_33{align-items:flex-start;gap:var(--x-gutter-sm);flex-wrap:wrap;display:flex}._main_z8p86_1{grid-template-columns:repeat(auto-fill, minmax(var(--min-width), 1fr));gap:var(--x-gutter-sm);display:grid}:root{--x-status-ok-fg:oklch(100% 0 0/.95);--x-status-ok-bg:linear-gradient(oklch(60% .22 142), oklch(70% .24 142));--x-status-error-fg:oklch(100% 0 0/.95);--x-status-error-bg:linear-gradient(oklch(56% 0 0), oklch(77% 0 0));--x-status-text-shadow:0 1px 1px oklch(0% 0 0/.3)}[data-theme=dark]{--x-status-ok-fg:oklch(100% 0 0/.9);--x-status-ok-bg:linear-gradient(oklch(30% .22 142), oklch(35% .23 142));--x-status-error-fg:oklch(100% 0 0/.9);--x-status-error-bg:linear-gradient(oklch(30% 0 0), oklch(35% 0 0))}._main_17jwg_17{border-radius:var(--x-radius);min-width:2em;text-shadow:var(--x-status-text-shadow);white-space:nowrap;justify-content:center;align-items:center;padding:0 .5rem;font-family:Arial Black,sans-serif;font-weight:bolder;display:inline-flex}._main_17jwg_17[data-ok]{background:var(--x-status-ok-bg);color:var(--x-status-ok-fg)}._main_17jwg_17[data-error]{background:var(--x-status-error-bg);color:var(--x-status-error-fg)}._main_17jwg_17[data-ok][data-icon]:before{content:"✓"}._main_17jwg_17[data-error][data-icon]:before{content:"×"}._main_1n0a8_1{grid-template-columns:repeat(auto-fill, minmax(var(--x-column-min-width), 1fr));gap:var(--x-gutter);display:grid}._container_1bb8j_2{gap:var(--x-gutter-sm);grid-template-columns:repeat(auto-fill,minmax(280px,1fr));display:grid}._item_1bb8j_8{display:grid}._id_1bb8j_12{text-align:center;text-decoration:underline}._idRow_1bb8j_17{align-items:center;display:grid}._dataContainer_1bb8j_22{text-align:center;justify-content:center;align-items:center;display:flex}._data_1bb8j_22{flex:0 0 50%}._data_1bb8j_22[data-rx]{color:var(--x-network-stats-rx-fg)}._data_1bb8j_22[data-tx]{color:var(--x-network-stats-tx-fg)}._rate_1bb8j_39{font-family:"Arial Black", var(--x-code-font-family)}._rate_1bb8j_39:before{margin-right:.5rem}._rateRx_1bb8j_46:before{content:"▼"}._rateTx_1bb8j_50:before{content:"▲"}:root{--x-network-stats-tx-fg:oklch(58% .17 36);--x-network-stats-tx-bg:oklch(53% .21 44/.1);--x-network-stats-rx-fg:oklch(55% .18 142);--x-network-stats-rx-bg:oklch(44% .18 142/.1)}[data-theme=dark]{--x-network-stats-tx-fg:oklch(72% .15 51);--x-network-stats-tx-bg:oklch(70% .21 46/.15);--x-network-stats-rx-fg:oklch(70% .2 142);--x-network-stats-rx-bg:oklch(70% .2 142/.15)}._main_j131p_15{grid-template-areas:"network-stats-item-id network-stats-item-id""network-stats-item-rx network-stats-item-tx";gap:1px;display:grid}._id_j131p_21{text-align:center;grid-area:network-stats-item-id}._label_j131p_26{opacity:.95}._total_j131p_30{opacity:.95;font-weight:700}._rx_j131p_35,._tx_j131p_36{padding:var(--x-gutter-sm);font-family:"Tahoma", var(--x-code-font-family);text-align:center;display:grid;position:relative}._rx_j131p_35{border-radius:var(--x-radius) 0 0 var(--x-radius);background:var(--x-network-stats-rx-bg);color:var(--x-network-stats-rx-fg);grid-area:network-stats-item-rx}._tx_j131p_36{border-radius:0 var(--x-radius) var(--x-radius) 0;background:var(--x-network-stats-tx-bg);color:var(--x-network-stats-tx-fg);grid-area:network-stats-item-tx}._rateRx_j131p_58,._rateTx_j131p_59{font-size:1.5rem;font-weight:700}._main_6ky1o_1{grid-template-columns:repeat(auto-fill, minmax(var(--x-column-min-width), 1fr));column-gap:var(--x-gutter-sm);row-gap:var(--x-gutter);display:grid}:root{--x-sys-load-fg:var(--x-text-fg);--x-sys-load-bg:transparent;--x-sys-load-interval-bg:oklch(0% 0 0/.1)}[data-theme=dark]{--x-sys-load-fg:var(--x-text-fg);--x-sys-load-interval-bg:oklch(100% 0 0/.1)}._main_1pjeu_12{gap:var(--x-gutter-sm);grid-template-columns:1fr auto;grid-template-areas:"x-server-stats-system-load-label x-server-stats-system-load-usage""x-server-stats-system-load-label x-server-stats-system-load-group""x-server-stats-system-load-meter x-server-stats-system-load-meter";display:grid}._label_1pjeu_19{grid-area:x-server-stats-system-load-label;align-items:center;display:grid}._meter_1pjeu_25{grid-area:x-server-stats-system-load-meter;grid-template-areas:"x-meter-core";display:grid}._usage_1pjeu_31{text-align:right;grid-area:x-server-stats-system-load-usage}._group_1pjeu_36{align-items:center;gap:var(--x-gutter-sm);grid-area:x-server-stats-system-load-group;display:flex}._groupItem_1pjeu_43{border-radius:var(--x-radius);background:var(--x-sys-load-interval-bg);padding:0 var(--x-gutter);color:var(--x-sys-load-fg);font-family:var(--x-code-font-family)}._sysLoad_mqy5s_1{gap:var(--x-gutter-sm);display:flex}:root{--x-nodes-usage-percent-bg:oklch(0% 0 0/.1)}[data-theme=dark]{--x-nodes-usage-percent-bg:oklch(100% 0 0/.1)}._main_8nrrw_9{column-gap:var(--x-gutter-sm);row-gap:0;gap:var(--x-gutter-sm);grid-template-columns:1fr auto;grid-template-areas:"x-nodes-usage-label x-nodes-usage-label""x-nodes-usage-overview x-nodes-usage-percent""x-nodes-usage-meter x-nodes-usage-meter";display:grid}._meter_8nrrw_18{height:var(--x-meter-height);grid-area:x-nodes-usage-meter;display:flex}._label_8nrrw_24{align-items:center;gap:var(--x-gutter-sm);grid-area:x-nodes-usage-label;display:flex}._label_8nrrw_24 svg{width:1em;height:1em}._overview_8nrrw_35{gap:var(--x-gutter-sm);grid-area:x-nodes-usage-overview;display:flex}._chart_8nrrw_41{grid-area:x-nodes-usage-chart;display:none}._percent_8nrrw_46{border-radius:var(--x-radius);background:var(--x-nodes-usage-percent-bg);padding:0 var(--x-gutter);grid-area:x-nodes-usage-percent}._main_1pxno_1{gap:var(--x-gutter-sm);max-height:calc(100px + var(--x-gutter-sm));overscroll-behavior:contain;scroll-snap-type:y mandatory;scrollbar-color:oklch(50% 0 0/.5) transparent;display:grid;position:relative;overflow-y:scroll;container-type:inline-size}._item_1pxno_13{scroll-snap-align:start}._main_mc2kq_1,._main_18siw_1{gap:var(--x-gutter-sm);display:grid}._name_18siw_6{text-align:center}._loading_18siw_10{place-content:center;height:10rem;display:grid}:root{--x-search-fg:var(--x-link-fg);--x-search-fg-hover:var(--x-link-fg-hover);--x-search-fg-active:var(--x-link-fg-active);--x-search-bg:var(--x-link-bg);--x-search-bg-hover:var(--x-link-bg-hover);--x-search-bg-active:var(--x-link-bg-active)}._container_roz84_11{gap:var(--x-gutter-sm);opacity:.7;flex-wrap:wrap;line-height:1;display:flex}._container_roz84_11:empty:after{opacity:.5;content:"⊘";line-height:var(--x-line-height)}._button_roz84_24{all:unset;cursor:pointer;border-radius:var(--x-radius);background:var(--x-search-bg);padding:calc(var(--x-gutter-sm) * .5) var(--x-gutter-sm);color:var(--x-search-fg);font-family:var(--x-code-font-family)}._button_roz84_24:hover{background:var(--x-search-bg-hover);color:var(--x-search-fg-hover)}._button_roz84_24:active{background:var(--x-search-bg-active);color:var(--x-search-fg-active)}:root{--x-ping-result-scrollbar-bg:oklch(0% 0 0/.5);--x-ping-item-bg:oklch(0% 0 0/.1)}[data-theme=dark]{--x-ping-result-scrollbar-bg:oklch(100% 0 0/.5);--x-ping-item-bg:oklch(100% 0 0/.1)}._itemContainer_386ei_11{border-radius:var(--x-radius);background:var(--x-ping-item-bg);padding:var(--x-gutter-sm) var(--x-gutter);scrollbar-color:var(--x-ping-result-scrollbar-bg) transparent;flex-grow:1;grid-template-columns:repeat(auto-fill,minmax(5rem,1fr));grid-auto-flow:row;gap:.15em;height:7rem;list-style-type:none;display:grid;overflow-y:auto}._resultContainer_386ei_26{gap:var(--x-gutter-sm);flex-grow:1;display:grid}._result_386ei_26{flex-wrap:wrap;justify-content:space-between;align-items:center;display:flex}._main_fajqi_1{display:flex}:root{--x-server-benchmark-marks-fg:oklch(15% 0 0/.9);--x-server-benchmark-marks-fg-hover:oklch(10% 0 0/.9);--x-server-benchmark-marks-fg-active:oklch(20% 0 0/.9);--x-server-benchmark-marks-bg:oklch(0% 0 0/.05);--x-server-benchmark-marks-bg-hover:oklch(0% 0 0/.1);--x-server-benchmark-marks-bg-active:oklch(0% 0 0/.15)}[data-theme=dark]{--x-server-benchmark-marks-fg:oklch(95% 0 0/.9);--x-server-benchmark-marks-fg-hover:oklch(100% 0 0/.9);--x-server-benchmark-marks-fg-active:oklch(90% 0 0/.9);--x-server-benchmark-marks-bg:oklch(100% 0 0/.05);--x-server-benchmark-marks-bg-hover:oklch(100% 0 0/.1);--x-server-benchmark-marks-bg-active:oklch(100% 0 0/.01)}._main_110il_19{gap:calc(var(--x-gutter-sm) * .5);text-align:center;display:grid}._header_110il_25{justify-content:center;align-items:center;display:flex}._marks_110il_31{all:unset;justify-content:center;align-items:center;gap:calc(var(--x-gutter-sm) * .5);cursor:pointer;border-radius:var(--x-radius);background:var(--x-server-benchmark-marks-bg);color:var(--x-server-benchmark-marks-fg);flex-wrap:wrap;font-size:1.15rem;display:flex}._marks_110il_31:hover{background:var(--x-server-benchmark-marks-bg-hover);color:var(--x-server-benchmark-marks-fg-hover)}._marks_110il_31:active{background:var(--x-server-benchmark-marks-bg-active);color:var(--x-server-benchmark-marks-fg-active)}._marks_110il_31 [data-is-detail]{opacity:.7}._sign_110il_56{opacity:.5}._main_11z09_1{grid-template-columns:repeat(auto-fill, minmax(var(--x-column-min-width), 1fr));column-gap:var(--x-gutter-sm);row-gap:var(--x-gutter);display:grid}._title_11z09_8,._link_11z09_9{border-radius:var(--x-radius);padding:0 var(--x-gutter-sm);color:var(--x-link-fg)}._title_11z09_8:hover,._link_11z09_9:hover{background:var(--x-link-bg-hover);color:var(--x-link-fg-hover)}._title_11z09_8:active,._link_11z09_9:active{background:var(--x-link-bg-active);color:var(--x-link-fg-active)}._title_11z09_8 svg,._link_11z09_9 svg{width:1em;height:1em}._title_11z09_8{text-decoration:underline}._main_128cz_1{gap:var(--x-gutter-sm);display:grid}._modules_128cz_6{grid-template-columns:repeat(auto-fill, minmax(var(--x-column-min-width), 1fr));gap:var(--x-gutter);display:grid}@keyframes _spin_nuyl9_1{to{transform:rotate(360deg)}}._main_nuyl9_6{flex-wrap:wrap;justify-content:center;align-items:center;gap:.5em;height:100svh;display:flex}._main_nuyl9_6:before{box-sizing:border-box;border:1px solid var(--x-button-bg);border-top-color:var(--x-button-fg);content:"";border-radius:50%;width:16px;height:16px;animation:1s linear infinite _spin_nuyl9_1} /*$vite$:1*/ CODE; exit; } } namespace InnStudio\Prober\Components\ServerStatus; use InnStudio\Prober\Components\UserConfig\UserConfigApi; use InnStudio\Prober\Components\Utils\UtilsCpu; use InnStudio\Prober\Components\Utils\UtilsMemory; final class ServerStatusPoll { public function render() { $id = ServerStatusConstants::ID; if (UserConfigApi::isDisabled($id)) { return [ $id => null, ]; } return [ $id => [ 'sysLoad' => UtilsCpu::getLoadAvg(), 'cpuUsage' => UtilsCpu::getUsage(), 'memRealUsage' => [ 'value' => UtilsMemory::getMemoryUsage('MemRealUsage'), 'max' => UtilsMemory::getMemoryUsage('MemTotal'), ], 'memBuffers' => [ 'value' => UtilsMemory::getMemoryUsage('Buffers'), 'max' => UtilsMemory::getMemoryUsage('MemUsage'), ], 'memCached' => [ 'value' => UtilsMemory::getMemoryUsage('Cached'), 'max' => UtilsMemory::getMemoryUsage('MemUsage'), ], 'swapUsage' => [ 'value' => UtilsMemory::getMemoryUsage('SwapUsage'), 'max' => UtilsMemory::getMemoryUsage('SwapTotal'), ], 'swapCached' => [ 'value' => UtilsMemory::getMemoryUsage('SwapCached'), 'max' => UtilsMemory::getMemoryUsage('SwapUsage'), ], ], ]; } } namespace InnStudio\Prober\Components\ServerStatus; class ServerStatusConstants { const ID = 'serverStatus'; } namespace InnStudio\Prober\Components\DiskUsage; class DiskUsageConstants { const ID = 'diskUsage'; } namespace InnStudio\Prober\Components\DiskUsage; use InnStudio\Prober\Components\UserConfig\UserConfigApi; use InnStudio\Prober\Components\Utils\UtilsDisk; final class DiskUsagePoll { public function render() { $id = DiskUsageConstants::ID; if (UserConfigApi::isDisabled($id)) { return [ $id => null, ]; } return [ $id => [ 'items' => UtilsDisk::getItems(), ], ]; } } namespace InnStudio\Prober\Components\PhpInfoDetail; use InnStudio\Prober\Components\Rest\RestResponse; use InnStudio\Prober\Components\Rest\StatusCode; use InnStudio\Prober\Components\UserConfig\UserConfigApi; final class PhpInfoDetailAction { public function render($action) { $id = PhpInfoDetailConstants::ID; if ($action !== $id) { return; } if (UserConfigApi::isDisabled($id)) { (new RestResponse()) ->setStatus(StatusCode::FORBIDDEN) ->end(); } phpinfo(); exit; } } namespace InnStudio\Prober\Components\PhpInfoDetail; class PhpInfoDetailConstants { const ID = 'phpInfoDetail'; } namespace InnStudio\Prober\Components\Rest; final class RestResponse { private $data; private $headers = []; private $status = StatusCode::OK; public function __construct($data = null, $status = StatusCode::OK, array $headers = []) { $this->setData($data); $this->setStatus($status); $this->setHeaders($headers); } public function setHeader($key, $value, $replace = true) { if ($replace || !isset($this->headers[$key])) { $this->headers[$key] = $value; } else { $this->headers[$key] .= ", {$value}"; } } public function setHeaders(array $headers) { $this->headers = $headers; } public function getHeaders() { return $this->headers; } public function setStatus($status) { $this->status = $status; return $this; } public function getStatus() { return $this->status; } public function setData($data) { $this->data = $data; return $this; } public function getData() { return $this->data; } public function json() { // header('Content-Type: application/json'); // header('Expires: 0'); // header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // header('Cache-Control: no-store, no-cache, must-revalidate'); // header('Pragma: no-cache'); // echo $this->toJson(); return $this; } public function end() { $this->httpResponseCode($this->status); header('Content-Type: application/json'); header('Expires: 0'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: no-store, no-cache, must-revalidate'); header('Pragma: no-cache'); if (null !== $this->data) { echo $this->toJson(); } exit; } private function toJson() { $data = $this->getData(); if (null === $data) { return ''; } return json_encode($data, \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES); } private function httpResponseCode($code) { if (\function_exists('http_response_code')) { return http_response_code($code); } $statusCode = [ 100 => 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-Status', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 306 => '(Unused)', 307 => 'Temporary Redirect', 308 => 'Permanent Redirect', 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Timeout', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Long', 415 => 'Unsupported Media Type', 416 => 'Requested Range Not Satisfiable', 417 => 'Expectation Failed', 418 => "I'm a teapot", 419 => 'Authentication Timeout', 420 => 'Enhance Your Calm', 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 424 => 'Method Failure', 425 => 'Unordered Collection', 426 => 'Upgrade Required', 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large', 444 => 'No Response', 449 => 'Retry With', 450 => 'Blocked by Windows Parental Controls', 451 => 'Unavailable For Legal Reasons', 494 => 'Request Header Too Large', 495 => 'Cert Error', 496 => 'No Cert', 497 => 'HTTP to HTTPS', 499 => 'Client Closed Request', 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported', 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected', 509 => 'Bandwidth Limit Exceeded', 510 => 'Not Extended', 511 => 'Network Authentication Required', 598 => 'Network read timeout error', 599 => 'Network connect timeout error', ]; $msg = isset($statusCode[$code]) ? $statusCode[$code] : 'Unknow error'; $protocol = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0'); header("{$protocol} {$code} {$msg}"); } } namespace InnStudio\Prober\Components\Rest; final class StatusCode { const HTTP_CONTINUE = 100; const SWITCHING_PROTOCOLS = 101; const PROCESSING = 102; // WEBDAV;_RFC_2518 const OK = 200; const CREATED = 201; const ACCEPTED = 202; const NON_AUTHORITATIVE_INFORMATION = 203; // SINCE_HTTP/1.1 const NO_CONTENT = 204; const RESET_CONTENT = 205; const PARTIAL_CONTENT = 206; const MULTI_STATUS = 207; // WEBDAV;_RFC_4918 const ALREADY_REPORTED = 208; // WEBDAV;_RFC_5842 const IM_USED = 226; // RFC_3229 const MULTIPLE_CHOICES = 300; const MOVED_PERMANENTLY = 301; const FOUND = 302; const SEE_OTHER = 303; // SINCE_HTTP/1.1 const NOT_MODIFIED = 304; const USE_PROXY = 305; // SINCE_HTTP/1.1 const SWITCH_PROXY = 306; const TEMPORARY_REDIRECT = 307; // SINCE_HTTP/1.1 const PERMANENT_REDIRECT = 308; // APPROVED_AS_EXPERIMENTAL_RFC const BAD_REQUEST = 400; const UNAUTHORIZED = 401; const PAYMENT_REQUIRED = 402; const FORBIDDEN = 403; const NOT_FOUND = 404; const METHOD_NOT_ALLOWED = 405; const NOT_ACCEPTABLE = 406; const PROXY_AUTHENTICATION_REQUIRED = 407; const REQUEST_TIMEOUT = 408; const CONFLICT = 409; const GONE = 410; const LENGTH_REQUIRED = 411; const PRECONDITION_FAILED = 412; const REQUEST_ENTITY_TOO_LARGE = 413; const REQUEST_URI_TOO_LONG = 414; const UNSUPPORTED_MEDIA_TYPE = 415; const REQUESTED_RANGE_NOT_SATISFIABLE = 416; const EXPECTATION_FAILED = 417; const I_AM_A_TEAPOT = 418; const AUTHENTICATION_TIMEOUT = 419; // NOT_IN_RFC_2616 const ENHANCE_YOUR_CALM = 420; // TWITTER const METHOD_FAILURE = 420; // SPRING_FRAMEWORK const UNPROCESSABLE_ENTITY = 422; // WEBDAV;_RFC_4918 const LOCKED = 423; // WEBDAV;_RFC_4918 const FAILED_DEPENDENCY = 424; // WEBDAV const UNORDERED_COLLECTION = 425; // INTERNET_DRAFT const UPGRADE_REQUIRED = 426; // RFC_2817 const PRECONDITION_REQUIRED = 428; // RFC_6585 const TOO_MANY_REQUESTS = 429; // RFC_6585 const REQUEST_HEADER_FIELDS_TOO_LARGE = 431; // RFC_6585 const NO_RESPONSE = 444; // NGINX const RETRY_WITH = 449; // MICROSOFT const BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS = 450; // MICROSOFT const REDIRECT = 451; // MICROSOFT const UNAVAILABLE_FOR_LEGAL_REASONS = 451; // INTERNET_DRAFT const REQUEST_HEADER_TOO_LARGE = 494; // NGINX const CERT_ERROR = 495; // NGINX const NO_CERT = 496; // NGINX const HTTP_TO_HTTPS = 497; // NGINX const CLIENT_CLOSED_REQUEST = 499; // NGINX const INTERNAL_SERVER_ERROR = 500; const NOT_IMPLEMENTED = 501; const BAD_GATEWAY = 502; const SERVICE_UNAVAILABLE = 503; const GATEWAY_TIMEOUT = 504; const HTTP_VERSION_NOT_SUPPORTED = 505; const VARIANT_ALSO_NEGOTIATES = 506; // RFC_2295 const INSUFFICIENT_STORAGE = 507; // WEBDAV;_RFC_4918 const LOOP_DETECTED = 508; // WEBDAV;_RFC_5842 const BANDWIDTH_LIMIT_EXCEEDED = 509; // APACHE_BW/LIMITED_EXTENSION const NOT_EXTENDED = 510; // RFC_2774 const NETWORK_AUTHENTICATION_REQUIRED = 511; // RFC_6585 const NETWORK_READ_TIMEOUT_ERROR = 598; // UNKNOWN const NETWORK_CONNECT_TIMEOUT_ERROR = 599; // Unknown } namespace InnStudio\Prober\Components\Ping; class PingConstants { const ID = 'ping'; } namespace InnStudio\Prober\Components\Ping; use InnStudio\Prober\Components\UserConfig\UserConfigApi; final class PingPoll { public function render() { $id = PingConstants::ID; if (UserConfigApi::isDisabled($id)) { return [ $id => null, ]; } return [ $id => true, ]; } } namespace InnStudio\Prober\Components\Ping; use InnStudio\Prober\Components\Rest\RestResponse; use InnStudio\Prober\Components\Rest\StatusCode; use InnStudio\Prober\Components\UserConfig\UserConfigApi; final class PingAction { public function render($action) { $id = PingConstants::ID; if ($action !== $id) { return; } $response = new RestResponse(); if (UserConfigApi::isDisabled($id)) { $response ->setStatus(StatusCode::NOT_IMPLEMENTED) ->end(); } $response ->setData([ 'id' => (string) microtime(true), 'time' => \defined('XPROBER_TIMER') ? microtime(true) - XPROBER_TIMER : 0, ]) ->end(); } } namespace InnStudio\Prober\Components\BrowserBenchmark; use InnStudio\Prober\Components\Bootstrap\Bootstrap; use InnStudio\Prober\Components\Config\ConfigApi; use InnStudio\Prober\Components\Rest\RestResponse; use InnStudio\Prober\Components\Rest\StatusCode; final class BrowserBenchmarkBrowsersAction { public function render($action) { if ('browserBenchmarks' !== $action) { return; } $reponse = new RestResponse(); if (\defined('XPROBER_IS_DEV') && XPROBER_IS_DEV) { $reponse ->setData($this->getDevItems()) ->end(); } foreach (ConfigApi::$config['BROWSER_BENCHMARKS_URLS'] as $url) { $curl = curl_init($url); curl_setopt($curl, \CURLOPT_RETURNTRANSFER, true); $data = (string) curl_exec($curl); curl_close($curl); if ( !$data) { continue; } $json = json_decode($data, true); if ( !$json) { continue; } $reponse ->setData($json) ->end(); } $reponse ->setStatus(StatusCode::NO_CONTENT) ->end(); } private function getDevItems() { $path = Bootstrap::$dir . '/browser-benchmarks.json'; if ( !file_exists($path)) { return []; } $data = file_get_contents($path); if ( !$data) { return []; } $items = json_decode($data, true); if ( !$items) { return []; } return $items; } } namespace InnStudio\Prober\Components\BrowserBenchmark; use InnStudio\Prober\Components\UserConfig\UserConfigApi; final class BrowserBenchmarkPoll { public function render() { $id = BrowserBenchmarkConstants::ID; if (UserConfigApi::isDisabled($id)) { return [ $id => null, ]; } return [ $id => true, ]; } } namespace InnStudio\Prober\Components\BrowserBenchmark; class BrowserBenchmarkConstants { const ID = 'browserBenchmark'; } namespace InnStudio\Prober\Components\PhpInfo; use InnStudio\Prober\Components\UserConfig\UserConfigApi; final class PhpInfoPoll { public function render() { $id = PhpInfoConstants::ID; if (UserConfigApi::isDisabled($id)) { return [ $id => null, ]; } return [ $id => [ 'phpVersion' => \PHP_VERSION, 'sapi' => \PHP_SAPI, 'displayErrors' => (bool) \ini_get('display_errors'), 'errorReporting' => (int) \ini_get('error_reporting'), 'memoryLimit' => (string) \ini_get('memory_limit'), 'postMaxSize' => (string) \ini_get('post_max_size'), 'uploadMaxFilesize' => (string) \ini_get('upload_max_filesize'), 'maxInputVars' => (int) \ini_get('max_input_vars'), 'maxExecutionTime' => (int) \ini_get('max_execution_time'), 'defaultSocketTimeout' => (int) \ini_get('default_socket_timeout'), 'allowUrlFopen' => (bool) \ini_get('allow_url_fopen'), 'smtp' => (bool) \ini_get('SMTP'), 'disableFunctions' => UserConfigApi::isDisabled('phpDisabledFunctions') ? [] : array_filter(explode(',', (string) \ini_get('disable_functions'))), 'disableClasses' => UserConfigApi::isDisabled('phpDisabledClasses') ? [] : array_filter(explode(',', (string) \ini_get('disable_classes'))), ], ]; } } namespace InnStudio\Prober\Components\PhpInfo; class PhpInfoConstants { const ID = 'phpInfo'; } namespace InnStudio\Prober\Components\PhpInfo; use InnStudio\Prober\Components\Config\ConfigApi; use InnStudio\Prober\Components\Rest\RestResponse; use InnStudio\Prober\Components\Rest\StatusCode; use InnStudio\Prober\Components\UserConfig\UserConfigApi; final class PhpInfoLatestPhpVersionAction { public function render($action) { $id = PhpInfoConstants::ID; if ('latestPhpVersion' !== $action) { return; } $response = new RestResponse(); if (UserConfigApi::isDisabled($id)) { $response ->setStatus(StatusCode::FORBIDDEN) ->end(); } $content = file_get_contents('https://www.php.net/releases/?json'); if ( !$content) { $response ->setStatus(StatusCode::NO_CONTENT) ->end(); } $versions = json_decode($content, true); if ( !$versions) { $response ->setStatus(StatusCode::NO_CONTENT) ->end(); } $version = isset($versions[ConfigApi::$config['LATEST_PHP_STABLE_VERSION']]['version']) ? $versions[ConfigApi::$config['LATEST_PHP_STABLE_VERSION']]['version'] : ''; if ( !$version) { $response ->setStatus(StatusCode::NO_CONTENT) ->end(); } $response ->setData([ 'version' => $version, 'date' => $versions[ConfigApi::$config['LATEST_PHP_STABLE_VERSION']]['date'], ]) ->end(); } } namespace InnStudio\Prober\Components\Poll; use InnStudio\Prober\Components\Rest\RestResponse; final class PollAction extends PoolConstants { public function render($action) { if (PoolConstants::ID !== $action) { return; } $data = []; foreach ([ 'Config\\ConfigPoll', 'UserConfig\\UserConfigPoll', 'PhpInfo\\PhpInfoPoll', 'Database\\DatabasePoll', 'MyInfo\\MyInfoPoll', 'DiskUsage\\DiskUsagePoll', 'PhpExtensions\\PhpExtensionsPoll', 'NetworkStats\\NetworkStatsPoll', 'ServerStatus\\ServerStatusPoll', 'ServerInfo\\ServerInfoPoll', 'Nodes\\NodesPoll', 'TemperatureSensor\\TemperatureSensorPoll', 'ServerBenchmark\\ServerBenchmarkPoll', 'BrowserBenchmark\\BrowserBenchmarkPoll', 'Ping\\PingPoll', ] as $fn) { $class = "\\InnStudio\\Prober\\Components\\{$fn}"; $render = (new $class())->render(); if ( !$render || !$render[array_keys($render)[0]]) { continue; } $data = array_merge($data, $render); } (new RestResponse()) ->setData($data) ->end(); } } namespace InnStudio\Prober\Components\Poll; class PoolConstants { const ID = 'poll'; } namespace InnStudio\Prober\Components\Footer; use InnStudio\Prober\Components\Events\EventsApi; final class Footer { private $ID = 'footer'; public function __construct() { EventsApi::on('conf', function (array $conf) { $conf[$this->ID] = [ 'memUsage' => memory_get_usage(), 'time' => microtime(true) - (\defined('XPROBER_TIMER') ? XPROBER_TIMER : 0), ]; return $conf; }, \PHP_INT_MAX); } } namespace InnStudio\Prober\Components\ServerBenchmark; use InnStudio\Prober\Components\UserConfig\UserConfigApi; final class ServerBenchmarkPoll { public function render() { $id = ServerBenchmarkConstants::ID; if (UserConfigApi::isDisabled($id)) { return [ $id => null, ]; } return [ $id => true, ]; } } namespace InnStudio\Prober\Components\ServerBenchmark; use InnStudio\Prober\Components\UserConfig\UserConfigApi; class ServerBenchmarkApi { public static function getTmpRecorderPath() { return sys_get_temp_dir() . \DIRECTORY_SEPARATOR . 'xproberBenchmarkCool'; } public static function setRecorder(array $data) { return (bool) file_put_contents(self::getTmpRecorderPath(), json_encode(array_merge(self::getRecorder(), $data))); } public static function setExpired() { return (bool) self::setRecorder([ 'expired' => (int) $_SERVER['REQUEST_TIME'] + self::cooldown(), ]); } public static function setIsRunning($isRunning) { return (bool) self::setRecorder([ 'isRunning' => true === (bool) $isRunning ? 1 : 0, ]); } public static function isRunning() { $recorder = self::getRecorder(); return isset($recorder['isRunning']) ? 1 === (int) $recorder['isRunning'] : false; } public static function getRemainingSeconds() { $recorder = self::getRecorder(); $expired = isset($recorder['expired']) ? (int) $recorder['expired'] : 0; if ( !$expired) { return 0; } return $expired > (int) $_SERVER['REQUEST_TIME'] ? $expired - (int) $_SERVER['REQUEST_TIME'] : 0; } public static function getPointsByTime($time) { return pow(10, 3) - (int) ($time * pow(10, 3)); } public static function getCpuPoints() { $data = 'inn-studio.com'; $hash = ['md5', 'sha512', 'sha256', 'crc32']; $start = microtime(true); $i = 0; while (microtime(true) - $start < .5) { foreach ($hash as $v) { hash($v, $data); } ++$i; } return $i; } public static function getWritePoints() { $tmpDir = sys_get_temp_dir(); if ( !is_writable($tmpDir)) { return 0; } $i = 0; $start = microtime(true); while (microtime(true) - $start < .5) { $filePath = "{$tmpDir}/innStudioWriteBenchmark:{$i}"; clearstatcache(true, $filePath); file_put_contents($filePath, $filePath); unlink($filePath); ++$i; } return $i; } public static function getReadPoints() { $tmpDir = sys_get_temp_dir(); error_reporting(0); if ( !is_readable($tmpDir)) { error_reporting(\E_ALL); return 0; } $i = 0; $start = microtime(true); $filePath = "{$tmpDir}/innStudioIoBenchmark"; if ( !file_exists($filePath)) { file_put_contents($filePath, 'innStudioReadBenchmark'); } while (microtime(true) - $start < .5) { clearstatcache(true, $filePath); file_get_contents($filePath); ++$i; } return $i; } public static function getPoints() { return [ 'cpu' => self::getMedian([ self::getCpuPoints(), self::getCpuPoints(), self::getCpuPoints(), ]), 'write' => self::getMedian([ self::getWritePoints(), self::getWritePoints(), self::getWritePoints(), ]), 'read' => self::getMedian([ self::getReadPoints(), self::getReadPoints(), self::getReadPoints(), ]), ]; } private static function cooldown() { return (int) UserConfigApi::get('serverBenchmarkCd') ?: 60; } private static function getRecorder() { $path = self::getTmpRecorderPath(); $defaults = [ 'expired' => 0, 'running' => 0, ]; error_reporting(0); if ( !is_readable($path)) { error_reporting(\E_ALL); return $defaults; } $data = (string) file_get_contents($path); if ( !$data) { return $defaults; } $data = json_decode($data, true); if ( !$data) { return $defaults; } return array_merge($defaults, $data); } private static function getMedian(array $arr) { $count = \count($arr); sort($arr); $mid = floor(($count - 1) / 2); return ($arr[$mid] + $arr[$mid + 1 - $count % 2]) / 2; } } namespace InnStudio\Prober\Components\ServerBenchmark; use InnStudio\Prober\Components\Bootstrap\Bootstrap; use InnStudio\Prober\Components\Config\ConfigApi; use InnStudio\Prober\Components\Rest\RestResponse; use InnStudio\Prober\Components\Rest\StatusCode; final class ServerBenchmarkServersAction { public function render($action) { if ('benchmarkServers' !== $action) { return; } $reponse = new RestResponse(); if (\defined('XPROBER_IS_DEV') && XPROBER_IS_DEV) { $reponse ->setData($this->getDevItems()) ->end(); } foreach (ConfigApi::$config['BENCHMARKS_URLS'] as $url) { $curl = curl_init($url); curl_setopt($curl, \CURLOPT_RETURNTRANSFER, true); $data = (string) curl_exec($curl); curl_close($curl); if ( !$data) { continue; } $json = json_decode($data, true); if ( !$json) { continue; } $reponse ->setData($json) ->end(); } $reponse ->setStatus(StatusCode::NO_CONTENT) ->end(); } private function getDevItems() { $path = Bootstrap::$dir . '/benchmarks.json'; if ( !file_exists($path)) { return []; } $data = file_get_contents($path); if ( !$data) { return []; } $items = json_decode($data, true); if ( !$items) { return []; } return $items; } } namespace InnStudio\Prober\Components\ServerBenchmark; class ServerBenchmarkConstants { const ID = 'serverBenchmark'; } namespace InnStudio\Prober\Components\ServerBenchmark; use InnStudio\Prober\Components\Rest\RestResponse; use InnStudio\Prober\Components\Rest\StatusCode; use InnStudio\Prober\Components\UserConfig\UserConfigApi; final class ServerBenchmarkPerformanceAction { public function render($action) { if ('benchmarkPerformance' !== $action) { return; } if (UserConfigApi::isDisabled('myServerBenchmark')) { (new RestResponse()) ->setStatus(StatusCode::FORBIDDEN) ->end(); } $this->renderMarks(); } private function renderMarks() { set_time_limit(0); $remainingSeconds = ServerBenchmarkApi::getRemainingSeconds(); $response = new RestResponse(); if ($remainingSeconds) { $response ->setStatus(StatusCode::TOO_MANY_REQUESTS) ->setData([ 'seconds' => $remainingSeconds, ]) ->end(); } ServerBenchmarkApi::setExpired(); ServerBenchmarkApi::setIsRunning(true); // start benchmark $marks = ServerBenchmarkApi::getPoints(); // end benchmark ServerBenchmarkApi::setIsRunning(false); $response ->setData([ 'marks' => $marks, ]) ->end(); } } namespace InnStudio\Prober\Components\ServerBenchmark; final class ServerBenchmarkDelay { public function delay() { while (ServerBenchmarkApi::isRunning()) { sleep(2); } } } namespace InnStudio\Prober\Components\Updater; class UpdaterConstants { const ID = 'updater'; } namespace InnStudio\Prober\Components\Updater; use InnStudio\Prober\Components\Config\ConfigApi; use InnStudio\Prober\Components\Rest\RestResponse; use InnStudio\Prober\Components\Rest\StatusCode; final class UpdaterActionUpdate { public function render($action) { if ('update' !== $action) { return $action; } $response = new RestResponse(); // prevent update file on dev mode if (\defined('XPROBER_IS_DEV') && XPROBER_IS_DEV) { $response ->setStatus(StatusCode::FORBIDDEN) ->end(); } // check file writable if ( !is_writable(__FILE__)) { $response ->setStatus(StatusCode::INSUFFICIENT_STORAGE) ->end(); } $code = ''; foreach (ConfigApi::$config['UPDATE_PHP_URLS'] as $url) { $curl = curl_init($url); curl_setopt($curl, \CURLOPT_RETURNTRANSFER, true); $status = (int) curl_getinfo($curl, \CURLINFO_HTTP_CODE); $code = (string) curl_exec($curl); curl_close($curl); if (StatusCode::OK !== $status || '' !== trim($code)) { break; } } if ( !$code) { $response ->setStatus(StatusCode::NOT_FOUND) ->end(); } if ((bool) file_put_contents(__FILE__, $code)) { if (\function_exists('opcache_invalidate')) { opcache_invalidate(__FILE__, true) || opcache_reset(); } $response ->setStatus(StatusCode::CREATED) ->end(); } $response ->setStatus(StatusCode::INTERNAL_SERVER_ERROR) ->end(); } } namespace InnStudio\Prober\Components\Updater; use InnStudio\Prober\Components\Config\ConfigApi; use InnStudio\Prober\Components\Rest\RestResponse; use InnStudio\Prober\Components\Rest\StatusCode; final class UpdaterActionVersion { public function render($action) { if ('latestVersion' !== $action) { return; } $response = new RestResponse(); foreach (ConfigApi::$config['APP_CONFIG_URLS'] as $url) { $curl = curl_init(); curl_setopt($curl, \CURLOPT_URL, $url); curl_setopt($curl, \CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, \CURLOPT_TIMEOUT, 3); $data = curl_exec($curl); curl_close($curl); if ( !$data) { continue; } $data = json_decode($data, true); if ( !$data) { continue; } $response ->setData([ 'version' => $data['APP_VERSION'], ]) ->end(); } $response ->setStatus(StatusCode::NO_CONTENT) ->end(); } } namespace InnStudio\Prober\Components\Script; use InnStudio\Prober\Components\Utils\UtilsApi; final class ScriptAction { public function render($action) { if ('script' !== $action) { return; } $this->output(); } private function output() { UtilsApi::setFileCacheHeader(); header('Content-type: application/javascript'); echo <<<'CODE' (function(e){typeof define==`function`&&define.amd?define([],e):e()})(function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),l=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,ee||(ee=!0,ie());else{var t=n(l);t!==null&&oe(x,t.startTime-e)}}var ee=!1,te=-1,S=5,ne=-1;function C(){return g?!0:!(e.unstable_now()-net&&C());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&oe(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ie():ee=!1}}}var ie;if(typeof y==`function`)ie=function(){y(re)};else if(typeof MessageChannel<`u`){var w=new MessageChannel,ae=w.port2;w.port1.onmessage=re,ie=function(){ae.postMessage(null)}}else ie=function(){_(re,0)};function oe(t,n){te=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(te),te=-1):h=!0,oe(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,ie()))),r},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var ee=Array.isArray;function te(){}var S={H:null,A:null,T:null,S:null},ne=Object.prototype.hasOwnProperty;function C(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function re(e,t){return C(e.type,t,e.props)}function ie(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function w(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ae=/\/+/g;function oe(e,t){return typeof e==`object`&&e&&e.key!=null?w(``+e.key):t.toString(36)}function se(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(te,te):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ce(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ce(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+oe(e,0):a,ee(o)?(i=``,c!=null&&(i=c.replace(ae,`$&/`)+`/`),ce(o,r,i,``,function(e){return e})):o!=null&&(ie(o)&&(o=re(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ae,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ee(e))for(var u=0;u{t.exports=d()})),p=o((e=>{var t=f();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=u(),n=f(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1de||(e.current=ue[de],ue[de]=null,de--)}function A(e,t){de++,ue[de]=e.current,e.current=t}var pe=fe(null),me=fe(null),he=fe(null),ge=fe(null);function _e(e,t){switch(A(he,t),A(me,e),A(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}k(pe),A(pe,e)}function ve(){k(pe),k(me),k(he)}function ye(e){e.memoizedState!==null&&A(ge,e);var t=pe.current,n=Hd(t,e.type);t!==n&&(A(me,e),A(pe,n))}function be(e){me.current===e&&(k(pe),k(me)),ge.current===e&&(k(ge),Qf._currentValue=O)}var xe,Se;function Ce(e){if(xe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);xe=t&&t[1]||``,Se=-1)`:-1i||c[r]!==l[i]){var u=` `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{we=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ce(n):``}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return Ce(e.type);case 16:return Ce(`Lazy`);case 13:return e.child!==t&&t!==null?Ce(`Suspense Fallback`):Ce(`Suspense`);case 19:return Ce(`SuspenseList`);case 0:case 15:return Te(e.type,!1);case 11:return Te(e.type.render,!1);case 1:return Te(e.type,!0);case 31:return Ce(`Activity`);default:return``}}function De(e){try{var t=``,n=null;do t+=Ee(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` `+e.stack}}var Oe=Object.prototype.hasOwnProperty,ke=t.unstable_scheduleCallback,Ae=t.unstable_cancelCallback,je=t.unstable_shouldYield,Me=t.unstable_requestPaint,Ne=t.unstable_now,Pe=t.unstable_getCurrentPriorityLevel,Fe=t.unstable_ImmediatePriority,Ie=t.unstable_UserBlockingPriority,Le=t.unstable_NormalPriority,Re=t.unstable_LowPriority,ze=t.unstable_IdlePriority,Be=t.log,Ve=t.unstable_setDisableYieldValue,He=null,Ue=null;function We(e){if(typeof Be==`function`&&Ve(e),Ue&&typeof Ue.setStrictMode==`function`)try{Ue.setStrictMode(He,e)}catch{}}var Ge=Math.clz32?Math.clz32:Je,Ke=Math.log,qe=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(Ke(e)/qe|0)|0}var Ye=256,Xe=262144,Ze=4194304;function Qe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function $e(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Qe(n))):i=Qe(o):i=Qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Qe(n))):i=Qe(o)):i=Qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function et(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nt(){var e=Ze;return Ze<<=1,!(Ze&62914560)&&(Ze=4194304),e}function rt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function it(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function at(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),hn=!1;if(mn)try{var gn={};Object.defineProperty(gn,"passive",{get:function(){hn=!0}}),window.addEventListener(`test`,gn,gn),window.removeEventListener(`test`,gn,gn)}catch{hn=!1}var _n=null,vn=null,yn=null;function bn(){if(yn)return yn;var e,t=vn,n=t.length,r,i=`value`in _n?_n.value:_n.textContent,a=i.length;for(e=0;e=Qn),tr=` `,nr=!1;function rr(e,t){switch(e){case`keyup`:return Xn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ir(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ar=!1;function or(e,t){switch(e){case`compositionend`:return ir(t);case`keypress`:return t.which===32?(nr=!0,tr):null;case`textInput`:return e=t.data,e===tr&&nr?null:e;default:return null}}function sr(e,t){if(ar)return e===`compositionend`||!Zn&&rr(e,t)?(e=bn(),yn=vn=_n=null,ar=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=kr(n)}}function jr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ht(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ht(e.document)}return t}function Nr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Pr=mn&&`documentMode`in document&&11>=document.documentMode,Fr=null,Ir=null,Lr=null,Rr=!1;function zr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rr||Fr==null||Fr!==Ht(r)||(r=Fr,`selectionStart`in r&&Nr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Lr&&Or(Lr,r)||(Lr=r,r=Ed(Ir,`onSelect`),0>=o,i-=o,ji=1<<32-Ge(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),F&&Ni(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),F&&Ni(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return F&&Ni(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),F&&Ni(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ie&&Aa(l)===r.type){n(e,r.sibling),c=a(r,o.props),La(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=vi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=_i(o.type,o.key,o.props,null,e.mode,c),La(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=xi(o,e.mode,c),c.return=e,e=c}return s(e);case ie:return o=Aa(o),b(e,r,o,c)}if(T(o))return h(e,r,o,c);if(se(o)){if(l=se(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ia(o),c);if(o.$$typeof===te)return b(e,r,aa(e,o),c);Ra(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=yi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Fa=0;var i=b(e,t,n,r);return Pa=null,i}catch(t){if(t===wa||t===Ea)throw t;var a=pi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ba=za(!0),Va=za(!1),Ha=!1;function Ua(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ka(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ui(e),li(e,null,n),t}return oi(e,r,t,n),ui(e)}function qa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}function Ja(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ya=!1;function Xa(){if(Ya){var e=ha;if(e!==null)throw e}}function Za(e,t,n,r){Ya=!1;var i=e.updateQueue;Ha=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(J&f)===f:(r&f)===f){f!==0&&f===ma&&(Ya=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ha=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function $a(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=E.T,s={};E.T=s,Fs(e,!1,t,n);try{var c=i(),l=E.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,va(c,r),pu(e)):Ps(e,t,r,pu(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{D.p=a,o!==null&&s.types!==null&&(o.types=s.types),E.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Es(e).queue;Cs(e,a,t,O,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:O,baseState:O,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:O},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ps(e,t.next.queue,{},pu())}function Os(){return I(Qf)}function ks(){return H().memoizedState}function As(){return H().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ga(n);var r=Ka(t,e,n);r!==null&&(hu(r,t,n),qa(r,t,n)),t={cache:ua()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=si(e,t,n,r),n!==null&&(hu(n,e,r),Rs(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,pu())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Dr(s,o))return oi(e,t,i,0),K===null&&ai(),!1}catch{}if(n=si(e,t,i,r),n!==null)return hu(n,e,r),Rs(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(i(479))}else t=si(e,n,r,2),t!==null&&hu(t,e,2)}function Is(e){var t=e.alternate;return e===z||t!==null&&t===z}function Ls(e,t){_o=go=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}var zs={readContext:I,use:Po,useCallback:V,useContext:V,useEffect:V,useImperativeHandle:V,useLayoutEffect:V,useInsertionEffect:V,useMemo:V,useReducer:V,useRef:V,useState:V,useDebugValue:V,useDeferredValue:V,useTransition:V,useSyncExternalStore:V,useId:V,useHostTransitionStatus:V,useFormState:V,useActionState:V,useOptimistic:V,useMemoCache:V,useCacheRefresh:V};zs.useEffectEvent=V;var Bs={readContext:I,use:Po,useCallback:function(e,t){return jo().memoizedState=[e,t===void 0?null:t],e},useContext:I,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=jo();t=t===void 0?null:t;var r=e();if(vo){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=jo();if(n!==void 0){var i=n(t);if(vo){We(!0);try{n(t)}finally{We(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ms.bind(null,z,e),[r.memoizedState,e]},useRef:function(e){var t=jo();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,z,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(jo(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,z,e.queue,!0,!1),jo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=z,a=jo();if(F){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),K===null)throw Error(i(349));J&127||Vo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,us(Uo.bind(null,r,o,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,o,n,t),null),n},useId:function(){var e=jo(),t=K.identifierPrefix;if(F){var n=Mi,r=ji;n=(r&~(1<<32-Ge(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=yo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[j]=t,o[mt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Pc(t)}}return U(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=he.current,Gi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ri,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[j]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Hi(t,!0)}else e=Bd(e).createTextNode(r),e[j]=t,t.stateNode=e}return U(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Gi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[j]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),e=!1}else n=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(fo(t),t):(fo(t),null);if(t.flags&128)throw Error(i(558))}return U(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Gi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[j]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),a=!1}else a=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(fo(t),t):(fo(t),null)}return fo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Lc(t,t.updateQueue),U(t),null);case 4:return ve(),e===null&&Sd(t.stateNode.containerInfo),U(t),null;case 10:return $i(t.type),U(t),null;case 19:if(k(R),r=t.memoizedState,r===null)return U(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Rc(r,!1);else{if(X!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=po(e),o!==null){for(t.flags|=128,Rc(r,!1),e=o.updateQueue,t.updateQueue=e,Lc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)gi(n,e),n=n.sibling;return A(R,R.current&1|2),F&&Ni(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ne()>tu&&(t.flags|=128,a=!0,Rc(r,!1),t.lanes=4194304)}else{if(!a)if(e=po(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Lc(t,e),Rc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!F)return U(t),null}else 2*Ne()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,Rc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(U(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ne(),e.sibling=null,n=R.current,A(R,a?n&1|2:n&1),F&&Ni(t,r.treeForkCount),e);case 22:case 23:return fo(t),io(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(U(t),t.subtreeFlags&6&&(t.flags|=8192)):U(t),n=t.updateQueue,n!==null&&Lc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&k(ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),$i(L),U(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Bc(e,t){switch(Ii(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $i(L),ve(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return be(t),null;case 31:if(t.memoizedState!==null){if(fo(t),t.alternate===null)throw Error(i(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return k(R),null;case 4:return ve(),null;case 10:return $i(t.type),null;case 22:case 23:return fo(t),io(),e!==null&&k(ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return $i(L),null;case 25:return null;default:return null}}function Vc(e,t){switch(Ii(t),t.tag){case 3:$i(L),ve();break;case 26:case 27:case 5:be(t);break;case 4:ve();break;case 31:t.memoizedState!==null&&fo(t);break;case 13:fo(t);break;case 19:k(R);break;case 10:$i(t.type);break;case 22:case 23:fo(t),io(),e!==null&&k(ba);break;case 24:$i(L)}}function Hc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Uc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{$a(t,n)}catch(t){Z(e,e.return,t)}}}function Gc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[mt]=t}catch(t){Z(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=an));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[j]=e,t[mt]=n}catch(t){Z(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Rd=sp,e=Mr(e),Nr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Pd(o,r,n),o[j]=e,Tt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Ar(s,h),v=Ar(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,E.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,G&6)throw Error(i(331));var c=G;if(G|=4,Fl(o.current),Dl(o,o.current,s,n),G=c,id(0,!1),Ue&&typeof Ue.onPostCommitFiberRoot==`function`)try{Ue.onPostCommitFiberRoot(He,o)}catch{}return!0}finally{D.p=a,E.T=r,Vu(e,t)}}function Wu(e,t,n){t=Ci(n,t),t=$s(e.stateNode,t,2),e=Ka(e,t,2),e!==null&&(it(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=Ci(n,e),n=ec(2),r=Ka(t,n,2),r!==null&&(tc(n,r,t,e),it(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,K===e&&(J&n)===n&&(X===4||X===3&&(J&62914560)===J&&300>Ne()-$l?!(G&2)&&Su(e,0):ql|=n,Yl===J&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=nt()),e=ci(e,t),e!==null&&(it(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return ke(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ge(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=J,a=$e(r,r===K?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||et(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Ne(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=N(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+N(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+N(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+N(n.imageSizes)+`"]`)):i+=`[href="`+N(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+N(r)+`"][href="`+N(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),Tt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=M(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);Tt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=M(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Tt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=M(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Tt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=he.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=M(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=M(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=M(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+N(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),Tt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+N(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+N(n.href)+`"]`);if(r)return t.instance=r,Tt(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Tt(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,Tt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),Tt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,Tt(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Tt(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Tt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Tt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()}))(),_=c(f(),1),v={AUTHORIZATION:String(window?.GLOBAL_CONFIG?.AUTHORIZATION??``),IS_DEV:!!(window?.GLOBAL_CONFIG?.IS_DEV??!1),THEME:String(window?.GLOBAL_CONFIG?.THEME??`light`)},y=e=>`${window.location.pathname}?action=${e}`,b=async(e,t={})=>{let n={cache:`no-cache`,credentials:`omit`,headers:{"Content-Type":`application/json`,...v.AUTHORIZATION?{Authorization:v.AUTHORIZATION}:{}},method:`GET`,...t};if(t.signal?.aborted)throw new DOMException(`The user aborted a request.`,`AbortError`);let r=await fetch(y(e),n),i=null;if(r.ok)try{i=await r.json()}catch(e){if(e instanceof Error&&(e.name===`AbortError`||t.signal?.aborted))throw e;i=null}return{data:i,status:r.status}},x=e=>Symbol.iterator in e,ee=e=>`entries`in e,te=(e,t)=>{let n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(let[e,t]of n)if(!r.has(e)||!Object.is(t,r.get(e)))return!1;return!0},S=(e,t)=>{let n=e[Symbol.iterator](),r=t[Symbol.iterator](),i=n.next(),a=r.next();for(;!i.done&&!a.done;){if(!Object.is(i.value,a.value))return!1;i=n.next(),a=r.next()}return!!i.done&&!!a.done};function ne(e,t){return Object.is(e,t)?!0:typeof e!=`object`||!e||typeof t!=`object`||!t||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:x(e)&&x(t)?ee(e)&&ee(t)?te(e,t):S(e,t):te({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function C(e){let t=_.useRef(void 0);return n=>{let r=e(n);return ne(t.current,r)?t.current:t.current=r}}var re={"":{ja:`Project-Id-Version: X-Prober POT-Creation-Date: PO-Revision-Date: 2026-07-11 16:33+0800 Last-Translator: Km.Van Language-Team: Km.Van Language: ja MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=1; plural=0; X-Generator: Poedit 3.7 X-Poedit-Basepath: . X-Poedit-SourceCharset: UTF-8 X-Poedit-KeywordsList: gettext `,zh:`Project-Id-Version: X-Prober Report-Msgid-Bugs-To: POT-Creation-Date: PO-Revision-Date: 2026-07-11 16:33+0800 Last-Translator: Km.Van Language-Team: kmvan Language: zh_CN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=n != 1; X-Poedit-KeywordsList: gettext X-Poedit-Basepath: . X-Poedit-SourceCharset: UTF-8 X-Generator: Poedit 3.7 X-Poedit-Flags-xgettext: --add-comments `,zhcn:`Project-Id-Version: X-Prober Report-Msgid-Bugs-To: POT-Creation-Date: PO-Revision-Date: 2026-07-11 16:33+0800 Last-Translator: Km.Van Language-Team: kmvan Language: zh_CN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=n != 1; X-Poedit-KeywordsList: gettext X-Poedit-Basepath: . X-Poedit-SourceCharset: UTF-8 X-Generator: Poedit 3.7 X-Poedit-Flags-xgettext: --add-comments `,zhhk:`Project-Id-Version: X-Prober Report-Msgid-Bugs-To: POT-Creation-Date: PO-Revision-Date: 2025-09-04 22:53+0800 Last-Translator: Km.Van Language-Team: Km.Van Language: zh_HK MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=n != 1; X-Poedit-KeywordsList: gettext X-Poedit-Basepath: . X-Poedit-SourceCharset: UTF-8 X-Generator: Poedit 3.4.2 X-Poedit-Flags-xgettext: --add-comments `,zhtw:`Project-Id-Version: X-Prober Report-Msgid-Bugs-To: POT-Creation-Date: PO-Revision-Date: 2026-07-11 16:33+0800 Last-Translator: Km.Van Language-Team: Km.Van Language: zh_TW MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=n != 1; X-Poedit-KeywordsList: gettext X-Poedit-Basepath: . X-Poedit-SourceCharset: UTF-8 X-Generator: Poedit 3.7 X-ZhConverter: 繁化姬 dict-b76338ce-r665 @ 2019/11/20 14:24:08 | https://zhconvert.org X-Poedit-Flags-xgettext: --add-comments `},"{{days}}d {{hours}}h {{mins}}min {{secs}}s":{ja:`{{days}}日 {{hours}}時間 {{mins}}分 {{secs}}秒`,zh:`{{days}} 天 {{hours}} 时 {{mins}} 分 {{secs}} 秒`,zhcn:`{{days}} 天 {{hours}} 时 {{mins}} 分 {{secs}} 秒`,zhhk:`{{days}}天 {{hours}}小時 {{mins}}分鐘 {{secs}}秒`,zhtw:`{{days}}天 {{hours}}小時 {{mins}}分鐘 {{secs}}秒`},"{{minute}} minute average":{ja:`{{minute}}分平均負荷`,zh:`{{minute}} 分钟平均负载`,zhcn:`{{minute}} 分钟平均负载`,zhhk:`{{minute}} 分鐘平均`,zhtw:`{{minute}} 分鐘平均`},"{{oldVersion}} (Latest: {{latestPhpVersion}})":{ja:`{{oldVersion}} (最新: {{latestPhpVersion}})`,zh:`{{oldVersion}}(最新版:{{latestPhpVersion}})`,zhcn:`{{oldVersion}}(最新版:{{latestPhpVersion}})`,zhhk:`{{oldVersion}}(最新版:{{latestPhpVersion}})`,zhtw:`{{oldVersion}}(最新版:{{latestPhpVersion}})`},"{{sensor}} temperature":{ja:`{{sensor}} 温度`,zh:`{{sensor}} 温度`,zhcn:`{{sensor}} 温度`,zhhk:`{{sensor}} 溫度`,zhtw:`{{sensor}} 溫度`},"{{times}} times, min/avg/max/mdev = {{min}}/{{avg}}/{{max}}/{{mdev}} ms":{ja:`{{times}}回実行: 最小/平均/最大/偏差 = {{min}}/{{avg}}/{{max}}/{{mdev}} ms`,zh:`{{times}}次, 最小/平均/最大/偏差 = {{min}}/{{avg}}/{{max}}/{{mdev}} 毫秒`,zhcn:`{{times}}次, 最小/平均/最大/偏差 = {{min}}/{{avg}}/{{max}}/{{mdev}} 毫秒`,zhhk:`{{times}} 次,最小/平均/最大/偏差 = {{min}}/{{avg}}/{{max}}/{{mdev}} 毫秒`,zhtw:`{{times}} 次,最小/平均/最大/偏差 = {{min}}/{{avg}}/{{max}}/{{mdev}} 毫秒`},"{{usage}}% CPU usage":{ja:`CPU使用率: {{usage}}%`,zh:`{{usage}}% CPU 使用率`,zhcn:`{{usage}}% CPU 使用率`,zhhk:`CPU 使用率 {{usage}}%`,zhtw:`CPU 使用率 {{usage}}%`},"⏳ Updating, please wait a second...":{ja:`⏳ 更新中...`,zh:`⏳ 更新中,请稍等……`,zhcn:`⏳ 更新中,请稍等……`,zhhk:`⏳ 更新中,請稍候...`,zhtw:`⏳ 更新中,請稍候...`},"✨ Found new version: {{oldVersion}} ⇢ {{newVersion}}":{ja:`✨ 新版検出: {{oldVersion}} → {{newVersion}}`,zh:`✨ 发现新版本: {{oldVersion}} → {{newVersion}}`,zhcn:`✨ 发现新版本: {{oldVersion}} → {{newVersion}}`,zhhk:`✨ 發現新版本:{{oldVersion}} → {{newVersion}}`,zhtw:`✨ 發現新版本:{{oldVersion}} → {{newVersion}}`},"❌ Update error, click here to try again?":{ja:`❌ 更新エラー [再試行]`,zh:`❌ 更新错误,点击此处再试一次?`,zhcn:`❌ 更新错误,点击此处再试一次?`,zhhk:`❌ 更新錯誤,點此重試?`,zhtw:`❌ 更新錯誤,點此重試?`},"Benchmark my browser":{ja:`ブラウザのベンチマーク`,zh:`测试我的浏览器`,zhcn:`测试我的浏览器`,zhhk:`測試我的瀏覽器`,zhtw:`測試我的瀏覽器`},"Benchmark my server":{ja:`ベンチマーク実行`,zh:`测试我的服务器`,zhcn:`测试我的服务器`,zhhk:`測試我的伺服器`,zhtw:`測試我的伺服器`},"Browser bench":{ja:`ブラウザベンチ`,zh:`浏览器测试`,zhcn:`浏览器测试`,zhhk:`瀏覽器跑分`,zhtw:`瀏覽器跑分`},"Browser Benchmark":{ja:`ブラウザベンチマーク`,zh:`浏览器跑分`,zhcn:`浏览器跑分`,zhhk:`瀏覽器跑分測試`,zhtw:`客戶端跑分測試`},"Browser UA":{ja:`ブラウザユーザーエージェント`,zh:`浏览器 UA`,zhcn:`浏览器 UA`,zhhk:`瀏覽器 UA`,zhtw:`瀏覽器 UA`},"Buffers are in-memory block I/O buffers. They are relatively short-lived. Prior to Linux kernel version 2.4, Linux had separate page and buffer caches. Since 2.4, the page and buffer cache are unified and Buffers is raw disk blocks not represented in the page cache—i.e., not file data.":{ja:`バッファはメモリ内のブロックI/O用一時領域です。Linuxカーネル2.4以前ではページキャッシュとバッファキャッシュが分離されていましたが、2.4以降は統合され、バッファはページキャッシュに含まれない生ディスクブロック(非ファイルデータ)を指します。`,zh:`缓冲区是内存中的块 I/O 缓冲区,生命周期较短。Linux 内核 2.4 版本前,页面缓存和缓冲区缓存是分离的。2.4 版本后两者统一,缓冲区指不在页面缓存中的原始磁盘块(即非文件数据)。`,zhcn:`缓冲区是内存中的块 I/O 缓冲区,生命周期较短。Linux 内核 2.4 版本前,页面缓存和缓冲区缓存是分离的。2.4 版本后两者统一,缓冲区指不在页面缓存中的原始磁盘块(即非文件数据)。`,zhhk:`緩衝區是記憶體中的區塊 I/O 緩衝,生命週期較短。在 Linux 核心 2.4 版之前,頁面快取和緩衝區快取是分開的。自 2.4 版起,兩者已統一,緩衝區代表未存入頁面快取的原始磁碟區塊(即非檔案資料)。`,zhtw:`緩衝區是記憶體中的區塊 I/O 緩衝,生命週期較短。在 Linux 核心 2.4 版之前,頁面快取和緩衝區快取是分開的。自 2.4 版起,兩者已統一,緩衝區代表未存入頁面快取的原始磁碟區塊(即非檔案資料)。`},'Cached memory is memory that Linux uses for disk caching. However, this does not count as "used" memory, since it will be freed when applications require it. Hence you do not have to worry if a large amount is being used.':{ja:`キャッシュメモリはディスクキャッシュ用に確保された領域です。アプリケーションが必要時に解放されるため「使用中」メモリにはカウントされず、使用量が多くても問題ありません。`,zh:`缓存内存是 Linux 用于磁盘缓存的内存空间,不计入“已用”内存,因为应用程序需要时会自动释放。因此即使使用量较大也无需担心。`,zhcn:`缓存内存是 Linux 用于磁盘缓存的内存空间,不计入“已用”内存,因为应用程序需要时会自动释放。因此即使使用量较大也无需担心。`,zhhk:`快取記憶體是 Linux 用於磁碟快取的空間,不計入「已用」記憶體,因應用程式需要時會自動釋放。故即使使用量較大亦無需擔心。`,zhtw:`快取記憶體是 Linux 用於磁碟快取的空間,不計入「已用」記憶體,因應用程式需要時會自動釋放。故即使使用量較大亦無需擔心。`},"Can not fetch IP":{ja:`IP取得失敗`,zh:`无法获取 IP`,zhcn:`无法获取 IP`,zhhk:`無法取得 IP`,zhtw:`無法取得 IP`},"Can not fetch location.":{ja:`位置情報を取得できません。`,zh:`无法获取地理位置。`,zhcn:`无法获取地理位置。`,zhhk:`無法取得地理位置。`,zhtw:`無法取得地理位置。`},"Can not fetch marks data from GitHub.":{ja:`GitHubからスコアデータを取得できません。`,zh:`无法从 GitHub 中获取跑分数据。`,zhcn:`无法从 GitHub 中获取跑分数据。`,zhhk:`無法從 GitHub 取得跑分數據。`,zhtw:`無法從 GitHub 取得跑分資料。`},"Can not update file, please check the server permissions and space.":{ja:`ファイル更新失敗 サーバーの権限/空き容量を確認してください。`,zh:`无法更新文件,请检查服务器权限和空间。`,zhcn:`无法更新文件,请检查服务器权限和空间。`,zhhk:`無法更新檔案,請檢查伺服器權限及空間。`,zhtw:`無法更新檔案,請檢查伺服器權限及空間。`},"Click to close":{ja:`クリックで閉じる`,zh:`点击关闭`,zhcn:`点击关闭`,zhhk:`點擊關閉`,zhtw:`點擊關閉`},"Click to fetch":{ja:`クリックして取得`,zh:`点击获取`,zhcn:`点击获取`,zhhk:`點擊獲取`,zhtw:`點擊獲取`},"Click to update":{ja:`クリックで更新`,zh:`点击更新`,zhcn:`点击更新`,zhhk:`點擊更新`,zhtw:`點擊更新`},CPU:{ja:`CPU`,zh:`CPU`,zhcn:`CPU`,zhhk:`中央處理器`,zhtw:`中央處理器`},"CPU model":{ja:`CPUモデル`,zh:`CPU 型号`,zhcn:`CPU 型号`,zhhk:`CPU 型號`,zhtw:`CPU 型號`},"CPU usage":{ja:`CPU使用率`,zh:`CPU 占用`,zhcn:`CPU 占用`,zhhk:`CPU 使用率`,zhtw:`CPU 使用率`},Dark:{zhhk:`暗黑模式`},Database:{ja:`データベース`,zh:`数据库`,zhcn:`数据库`,zhhk:`資料庫`,zhtw:`資料庫`},DB:{ja:`データベース`,zh:`数据库`,zhcn:`数据库`,zhhk:`資料庫`,zhtw:`資料庫`},Default:{zhhk:`預設`},Detail:{ja:`詳細`,zh:`详细`,zhcn:`详细`,zhhk:`詳細資料`,zhtw:`詳細資料`},"Different versions cannot be compared, and different time clients have different loads, just for reference.":{ja:`異なるバージョンを比較することはできません。また、異なる時間のクライアントには異なる負荷がかかりますが、これはあくまで参考値です。`,zh:`不同版本的不能比较,不同的时间服务器存在不同的负载,仅作参考。`,zhcn:`不同版本的不能比较,不同的时间服务器存在不同的负载,仅作参考。`,zhhk:`不同版本無法直接比較,且不同時間瀏覽器負載各異,結果僅供參考。`,zhtw:`不同版本無法比較,不同時間客戶端負載不同,僅供參考。`},"Different versions cannot be compared, and different time servers have different loads, just for reference.":{ja:`異なるバージョン間の比較は不可。タイムサーバーの負荷状態により結果が変動します(参考値)`,zh:`不同版本的不能比较,不同的时间服务器存在不同的负载,仅作参考。`,zhcn:`不同版本的不能比较,不同的时间服务器存在不同的负载,仅作参考。`,zhhk:`不同版本無法直接比較,且不同時間伺服器負載各異,結果僅供參考。`,zhtw:`不同版本無法直接比較,且不同時間伺服器負載各異,結果僅供參考。`},"Disabled classes":{ja:`無効化クラス`,zh:`已禁用的类`,zhcn:`已禁用的类`,zhhk:`已停用類別`,zhtw:`已停用類別`},"Disabled functions":{ja:`無効化関数`,zh:`已禁用的函数`,zhcn:`已禁用的函数`,zhhk:`已停用函式`,zhtw:`已停用函式`},Disk:{ja:`ディスク`,zh:`磁盘`,zhcn:`磁盘`,zhhk:`磁碟`,zhtw:`磁碟`},"Disk Usage":{ja:`ディスク使用量`,zh:`磁盘用量`,zhcn:`磁盘用量`,zhhk:`磁碟用量`,zhtw:`磁碟使用量`},"Display errors":{ja:`エラー表示設定`,zh:`显示错误`,zhcn:`显示错误`,zhhk:`顯示錯誤`,zhtw:`顯示錯誤`},"Download speed test":{ja:`ダウンロード速度テスト`,zh:`下载速度测试`,zhcn:`下载速度测试`,zhhk:`下載速度測試`,zhtw:`下載速度測試`},"Error reporting":{ja:`エラーレポート設定`,zh:`错误报告`,zhcn:`错误报告`,zhhk:`錯誤報告`,zhtw:`錯誤報告`},"Error: {{error}}":{ja:`エラー: {{error}}`,zh:`错误:{{error}}`,zhcn:`错误:{{error}}`,zhhk:`錯誤: {{error}}`,zhtw:`錯誤: {{error}}`},"Failed to fetch data. Please try again later.":{ja:`データの取得に失敗しました。しばらくしてからもう一度お試しください。`,zh:`无法获取数据,请稍后再试。`,zhcn:`无法获取数据,请稍后再试。`,zhhk:`無法獲取數據,請稍後重試。`,zhtw:`無法獲取資料,請稍後重試。`},"Generate by {{appName}} and developed by {{authorName}}":{ja:`{{appName}} によって生成され、{{authorName}} によって開発されました`,zh:`由 {{appName}} 生成,由 {{authorName}} 开发`,zhcn:`由 {{appName}} 生成,由 {{authorName}} 开发`,zhhk:`由{{appName}}生成並由{{authorName}}開發`,zhtw:`由{{appName}}生成並由{{authorName}}開發`},"idle: {{idle}} \\nnice: {{nice}} \\nsys: {{sys}} \\nuser: {{user}}":{ja:`アイドル: {{idle}} \\n低優先: {{nice}} \\nシステム: {{sys}} \\nユーザー: {{user}}`,zh:`空闲: {{idle}} \\n低优先级: {{nice}} \\n系统: {{sys}} \\n用户: {{user}}`,zhcn:`空闲: {{idle}} \\n低优先级: {{nice}} \\n系统: {{sys}} \\n用户: {{user}}`,zhhk:`閒置: {{idle}} \\n優先: {{nice}} \\n系統: {{sys}} \\n用戶: {{user}}`,zhtw:`閒置: {{idle}} \\n優先: {{nice}} \\n系統: {{sys}} \\n使用者: {{user}}`},Info:{ja:`情報`,zh:`信息`,zhcn:`信息`,zhhk:`資訊`,zhtw:`資訊`},IPv4:{ja:`IPv4`,zh:`IPv4`,zhcn:`IPv4`,zhhk:`IPv4`,zhtw:`IPv4`},IPv6:{ja:`IPv6`,zh:`IPv6`,zhcn:`IPv6`,zhhk:`IPv6`,zhtw:`IPv6`},"JS Browser languages":{ja:`JS ブラウザ言語`,zh:`JS 浏览器语言`,zhcn:`JS 浏览器语言`,zhhk:`JS 瀏覽器語言`,zhtw:`JS瀏覽器語言`},LiangYe:{ja:`良夜`,zh:`良夜`,zhcn:`良夜`,zhtw:`良夜`},'Linux comes with many commands to check memory usage. The "free" command usually displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel. The "top" command provides a dynamic real-time view of a running system.':{ja:`Linuxにはメモリ使用量確認コマンドが複数存在します。「free」コマンドは物理メモリ/スワップの使用状況とカーネルバッファを表示し、「top」コマンドはシステムのリアルタイム状態を動的に表示します。`,zh:`Linux 提供多种内存检测命令:“free”命令显示系统物理内存和交换空间的总用量及内核缓冲区;“top”命令提供运行中系统的实时动态视图。`,zhcn:`Linux 提供多种内存检测命令:“free”命令显示系统物理内存和交换空间的总用量及内核缓冲区;“top”命令提供运行中系统的实时动态视图。`,zhhk:`Linux 提供多種記憶體檢測指令:「free」指令顯示系統實體記憶體及交換區的總用量與緩衝區使用情況;「top」指令則提供運行中系統的即時動態檢視。`,zhtw:`Linux 提供多種記憶體檢測指令:「free」指令顯示系統實體記憶體及交換區的總用量與緩衝區使用情況;「top」指令則提供運行中系統的即時動態檢視。`},"Loaded extensions":{ja:`ロード済み拡張機能`,zh:`已加载的扩展`,zhcn:`已加载的扩展`,zhhk:`已載入擴充功能`,zhtw:`已載入擴充功能`},"Loading...":{ja:`読込中...`,zh:`加载中……`,zhcn:`加载中……`,zhhk:`載入中...`,zhtw:`載入中...`},"Local IPv4":{ja:`ネイティブ IPv4`,zh:`本地 IPv4`,zhcn:`本地 IPv4`,zhhk:`本地 IPv4`,zhtw:`本地 IPv4`},"Local IPv6":{ja:`ネイティブ IPv6`,zh:`本地 IPv6`,zhcn:`本地 IPv6`,zhhk:`本地 IPv6`,zhtw:`本地 IPv6`},"Location (IPv4)":{ja:`位置情報 (IPv4)`,zh:`位置(IPv4)`,zhcn:`位置(IPv4)`,zhhk:`位置 (IPv4)`,zhtw:`位置 (IPv4)`},"Max execution time":{ja:`最大実行時間`,zh:`运行超时秒数`,zhcn:`运行超时秒数`,zhhk:`最長執行時間`,zhtw:`最長執行時間`},"Max input variables":{ja:`最大入力変数`,zh:`提交表单限制`,zhcn:`提交表单限制`,zhhk:`最大輸入變數`,zhtw:`最大輸入變數`},"Max memory limit":{ja:`最大メモリ制限`,zh:`运行内存限制`,zhcn:`运行内存限制`,zhhk:`最大記憶體限制`,zhtw:`最大記憶體限制`},"Max POST size":{ja:`最大POSTサイズ`,zh:`POST 提交限制`,zhcn:`POST 提交限制`,zhhk:`最大 POST 容量`,zhtw:`最大 POST 容量`},"Max upload size":{ja:`最大アップロードサイズ`,zh:`上传文件限制`,zhcn:`上传文件限制`,zhhk:`最大上載容量`,zhtw:`最大上傳容量`},"Memory buffers":{ja:`メモリバッファ`,zh:`内存缓冲`,zhcn:`内存缓冲`,zhhk:`記憶體緩衝區`,zhtw:`記憶體緩衝區`},"Memory cached":{ja:`キャッシュメモリ`,zh:`内存缓存`,zhcn:`内存缓存`,zhhk:`記憶體快取`,zhtw:`記憶體快取`},"Memory real usage":{ja:`実メモリ使用量`,zh:`真实内存占用`,zhcn:`真实内存占用`,zhhk:`實際記憶體用量`,zhtw:`實際記憶體用量`},Mine:{ja:`マイデータ`,zh:`我的`,zhcn:`我的`,zhhk:`我的`,zhtw:`我的`},"Move down":{ja:`下へ移動`,zh:`下移`,zhcn:`下移`,zhhk:`下移`,zhtw:`下移`},"Move up":{ja:`上へ移動`,zh:`上移`,zhcn:`上移`,zhhk:`上移`,zhtw:`上移`},"My Info":{ja:`マイ情報`,zh:`我的信息`,zhcn:`我的信息`,zhhk:`我的資訊`,zhtw:`我的資訊`},Name:{ja:`名称`,zh:`名称`,zhcn:`名称`,zhhk:`名稱`,zhtw:`名稱`},Network:{ja:`ネットワーク`,zh:`网络`,zhcn:`网络`,zhhk:`網絡`,zhtw:`網路`},"Network error, please try again later.":{ja:`ネットワークエラー。後ほど再試行してください。`,zh:`网络错误,请稍候重试。`,zhcn:`网络错误,请稍候重试。`,zhhk:`網絡錯誤,請稍後重試。`,zhtw:`網路錯誤,請稍後重試。`},"Network error. Please check your connection.":{ja:`ネットワークエラー。接続を確認してください。`,zh:`网络错误,请检查您的网络链接。`,zhcn:`网络错误,请检查您的网络链接。`,zhtw:`網路錯誤,請檢查您與服務器的網路。`},"Network Stats":{ja:`ネットワーク統計`,zh:`流量统计`,zhcn:`流量统计`,zhhk:`網絡統計`,zhtw:`網路統計`},Nodes:{ja:`ノード`,zh:`节点`,zhcn:`节点`,zhhk:`節點`,zhtw:`節點`},"Not support":{ja:`非対応`,zh:`不支持`,zhcn:`不支持`,zhhk:`不支援`,zhtw:`不支援`},"Opcache enabled":{ja:`Opcache 有効`,zh:`OPcache 已启用`,zhcn:`OPcache 已启用`,zhhk:`Opcache 已啟用`,zhtw:`Opcache 已啟用`},"Opcache JIT enabled":{ja:`Opcache JIT 有効`,zh:`OPcache JIT 已启用`,zhcn:`OPcache JIT 已启用`,zhhk:`Opcache JIT 已啟用`,zhtw:`Opcache JIT 已啟用`},OS:{ja:`OS`,zh:`操作系统`,zhcn:`操作系统`,zhhk:`作業系統`,zhtw:`作業系統`},"PHP Browser languages":{ja:`PHP ブラウザ言語`,zh:`PHP 浏览器语言`,zhcn:`PHP 浏览器语言`,zhhk:`PHP 瀏覽器語言`,zhtw:`PHP瀏覽器語言`},"PHP Ext":{ja:`PHP拡張`,zh:`PHP 扩展`,zhcn:`PHP 扩展`,zhhk:`PHP擴充`,zhtw:`PHP擴充`},"PHP Extensions":{ja:`PHP拡張機能`,zh:`PHP 扩展`,zhcn:`PHP 扩展`,zhhk:`PHP 擴充功能`,zhtw:`PHP 擴充功能`},"PHP Info":{ja:`PHP情報`,zh:`PHP 信息`,zhcn:`PHP 信息`,zhhk:`PHP資訊`,zhtw:`PHP資訊`},"PHP Information":{ja:`PHP情報`,zh:`PHP 信息`,zhcn:`PHP 信息`,zhhk:`PHP 資訊`,zhtw:`PHP 資訊`},Ping:{ja:`ネットワーク診断`,zh:`Ping`,zhcn:`Ping`,zhhk:`網絡檢測`,zhtw:`網路檢測`},"Please wait {{seconds}}s":{ja:`{{seconds}}秒お待ちください`,zh:`请等待 {{seconds}} 秒`,zhcn:`请等待 {{seconds}} 秒`,zhhk:`請等候 {{seconds}} 秒`,zhtw:`請等候 {{seconds}} 秒`},"Public IPv4":{ja:`パブリック IPv4`,zh:`公网 IPv4`,zhcn:`公网 IPv4`,zhhk:`公眾 IPv4`,zhtw:`公開 IPv4`},"Public IPv6":{ja:`パブリック IPv6`,zh:`公网 IPv6`,zhcn:`公网 IPv6`,zhhk:`公眾 IPv6`,zhtw:`公開 IPv6`},Ram:{ja:`RAM`,zh:`内存`,zhcn:`内存`,zhhk:`記憶體`,zhtw:`記憶體`},Read:{ja:`読取`,zh:`读`,zhcn:`读`,zhhk:`讀取`,zhtw:`讀取`},"Recived: {{total}}":{ja:`受信: {{total}}`,zh:`接收:{{total}}`,zhcn:`接收:{{total}}`,zhhk:`接收: {{total}}`,zhtw:`接收: {{total}}`},Results:{ja:`診断結果`,zh:`结果`,zhcn:`结果`,zhhk:`結果`,zhtw:`結果`},"Running the benchmark may freeze the browser interface for a few seconds. Do you want to continue?":{ja:`ベンチマークを実行すると、ブラウザインターフェースが数秒間フリーズする場合があります。続行しますか?`,zh:`执行性能测试可能会冻结浏览器界面数秒,是否继续?`,zhcn:`执行性能测试可能会冻结浏览器界面数秒,是否继续?`,zhhk:`執行基準測試可能會導致瀏覽器介面凍結幾秒鐘。是否繼續?`,zhtw:`執行基準測試可能會導致瀏覽器介面凍結幾秒鐘。是否繼續?`},"SAPI interface":{ja:`SAPIインターフェース`,zh:`SAPI 接口`,zhcn:`SAPI 接口`,zhhk:`SAPI 介面`,zhtw:`SAPI 介面`},"Script path":{ja:`スクリプトパス`,zh:`脚本路径`,zhcn:`脚本路径`,zhhk:`腳本路徑`,zhtw:`腳本路徑`},"Sent: {{total}}":{ja:`送信: {{total}}`,zh:`发送:{{total}}`,zhcn:`发送:{{total}}`,zhhk:`傳送: {{total}}`,zhtw:`傳送: {{total}}`},"Server ⇄ Browser":{ja:`サーバー ⇄ ブラウザー`,zh:`服务器 ⇄ 浏览器`,zhcn:`服务器 ⇄ 浏览器`,zhhk:`伺服器 ⇄ 瀏覽器`,zhtw:`伺服器 ⇄ 瀏覽器`},"Server bench":{ja:`サーバーベンチ`,zh:`服务器测试`,zhcn:`服务器测试`,zhhk:`伺服器跑分`,zhtw:`伺服器跑分`},"Server Benchmark":{ja:`サーバーベンチマーク`,zh:`服务器跑分`,zhcn:`服务器跑分`,zhhk:`伺服器跑分測試`,zhtw:`伺服器跑分測試`},"Server Info":{ja:`サーバー情報`,zh:`服务器信息`,zhcn:`服务器信息`,zhhk:`伺服器資訊`,zhtw:`伺服器資訊`},"Server Status":{ja:`サーバー状態`,zh:`服务器状态`,zhcn:`服务器状态`,zhhk:`伺服器狀態`,zhtw:`伺服器狀態`},"SMTP support":{ja:`SMTPサポート`,zh:`SMTP 支持`,zhcn:`SMTP 支持`,zhhk:`SMTP 支援`,zhtw:`SMTP 支援`},"Start ping":{ja:`Ping 開始`,zh:`开始 Ping`,zhcn:`开始 Ping`,zhhk:`開始 Ping`,zhtw:`開始 Ping`},"Stop ping":{ja:`Ping 停止`,zh:`停止 Ping`,zhcn:`停止 Ping`,zhhk:`停止 Ping`,zhtw:`停止 Ping`},Swap:{ja:`スワップ`,zh:`Swap`,zhcn:`Swap`,zhhk:`交換區`,zhtw:`交換區`},"Swap cached":{ja:`スワップキャッシュ`,zh:`SWAP 缓存`,zhcn:`SWAP 缓存`,zhhk:`交換區快取`,zhtw:`交換區快取`},"Swap usage":{ja:`スワップ使用量`,zh:`SWAP 占用`,zhcn:`SWAP 占用`,zhhk:`交換區用量`,zhtw:`交換區用量`},"System load":{ja:`システム負荷`,zh:`系统负载`,zhcn:`系统负载`,zhhk:`系統負載`,zhtw:`系統負載`},Temperature:{ja:`温度`,zh:`温度传感器`,zhcn:`温度传感器`,zhhk:`溫度`,zhtw:`溫度`},"Temperature sensor":{ja:`温度センサー`,zh:`温度传感器`,zhcn:`温度传感器`,zhhk:`溫度感測器`,zhtw:`溫度感測器`},"Testing, please wait...":{zhhk:`測試中,請稍候...`},Time:{ja:`時間`,zh:`时间`,zhcn:`时间`,zhhk:`時間`,zhtw:`時間`},"Timeout for socket":{ja:`ソケットタイムアウト`,zh:`Socket 超时秒数`,zhcn:`Socket 超时秒数`,zhhk:`Socket 逾時時間`,zhtw:`Socket 逾時時間`},"Touch to copy marks":{ja:`タップでスコアをコピー`,zh:`复制分数`,zhcn:`复制分数`,zhhk:`點擊複製跑分數據`,zhtw:`點擊複製跑分數據`},"Treatment URLs file":{ja:`リモートファイル処理`,zh:`文件远端打开`,zhcn:`文件远端打开`,zhhk:`檔案遠端開啟功能`,zhtw:`檔案遠端開啟功能`},Unavailable:{ja:`取得不可`,zh:`不可用`,zhcn:`不可用`,zhhk:`無法取得`,zhtw:`無法取得`},"Update is disabled in dev mode.":{ja:`開発モードでは更新不可。`,zh:`在开发模式中,更新被禁用。`,zhcn:`在开发模式中,更新被禁用。`,zhhk:`開發模式下停用更新功能。`,zhtw:`開發模式下停用更新功能。`},"Update success, refreshing...":{ja:`更新成功 再読込中...`,zh:`更新成功,正在刷新……`,zhcn:`更新成功,正在刷新……`,zhhk:`更新成功,重新整理中...`,zhtw:`更新成功,重新整理中...`},Uptime:{ja:`稼働時間`,zh:`运行时间`,zhcn:`运行时间`,zhhk:`運行時間`,zhtw:`運行時間`},Version:{ja:`バージョン`,zh:`版本`,zhcn:`版本`,zhhk:`版本`,zhtw:`版本`},"Visit PHP.net Official website":{ja:`PHP.net公式サイトへ`,zh:`访问 PHP.net 官网`,zhcn:`访问 PHP.net 官网`,zhhk:`瀏覽 PHP.net 官方網站`,zhtw:`瀏覽 PHP.net 官方網站`},"Visit probe page":{ja:`プローブページへ`,zh:`查看探针页面`,zhcn:`查看探针页面`,zhhk:`瀏覽檢測頁面`,zhtw:`瀏覽檢測頁面`},"Visit the official website":{ja:`公式サイトへ`,zh:`访问官网`,zhcn:`访问官网`,zhhk:`瀏覽官方網站`,zhtw:`瀏覽官方網站`},"Web server":{ja:`ウェブサーバー`,zh:`Web 服务器`,zhcn:`Web 服务器`,zhhk:`Web伺服器`,zhtw:`Web伺服器`},Write:{ja:`書込`,zh:`写`,zhcn:`写`,zhhk:`寫入`,zhtw:`寫入`},XiGuang:{ja:`曦光`,zh:`曦光`,zhcn:`曦光`,zhtw:`曦光`}},ie=navigator.language.replace(`-`,``).replace(`_`,``).toLowerCase(),w=(e,t=``)=>{let n=`${t?`${t}|`:``}${e}`;return re?.[n]?.[ie]??e},ae=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},oe=(e=>e?ae(e):ae),se=e=>e;function ce(e,t=se){let n=_.useSyncExternalStore(e.subscribe,_.useCallback(()=>t(e.getState()),[e,t]),_.useCallback(()=>t(e.getInitialState()),[e,t]));return _.useDebugValue(n),n}var le=e=>{let t=oe(e),n=e=>ce(t,e);return Object.assign(n,t),n},T=(e=>e?le(e):le),E=Symbol.for(`immer-nothing`),D=Symbol.for(`immer-draftable`),O=Symbol.for(`immer-state`);function ue(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var de=Object,fe=de.getPrototypeOf,k=`constructor`,A=`prototype`,pe=`configurable`,me=`enumerable`,he=`writable`,ge=`value`,_e=e=>!!e&&!!e[O];function ve(e){return e?xe(e)||Oe(e)||!!e[D]||!!e[k]?.[D]||ke(e)||Ae(e):!1}var ye=de[A][k].toString(),be=new WeakMap;function xe(e){if(!e||!je(e))return!1;let t=fe(e);if(t===null||t===de[A])return!0;let n=de.hasOwnProperty.call(t,k)&&t[k];if(n===Object)return!0;if(!Me(n))return!1;let r=be.get(n);return r===void 0&&(r=Function.toString.call(n),be.set(n,r)),r===ye}function Se(e,t,n=!0){Ce(e)===0?(n?Reflect.ownKeys(e):de.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ce(e){let t=e[O];return t?t.type_:Oe(e)?1:ke(e)?2:Ae(e)?3:0}var we=(e,t,n=Ce(e))=>n===2?e.has(t):de[A].hasOwnProperty.call(e,t),Te=(e,t,n=Ce(e))=>n===2?e.get(t):e[t],Ee=(e,t,n,r=Ce(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function De(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Oe=Array.isArray,ke=e=>e instanceof Map,Ae=e=>e instanceof Set,je=e=>typeof e==`object`,Me=e=>typeof e==`function`,Ne=e=>typeof e==`boolean`;function Pe(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Fe=e=>e.copy_||e.base_,Ie=e=>e.modified_?e.copy_:e.base_;function Le(e,t){if(ke(e))return new Map(e);if(Ae(e))return new Set(e);if(Oe(e))return Array[A].slice.call(e);let n=xe(e);if(t===!0||t===`class_only`&&!n){let t=de.getOwnPropertyDescriptors(e);delete t[O];let n=Reflect.ownKeys(t);for(let r=0;r1&&de.defineProperties(e,{set:Be,add:Be,clear:Be,delete:Be}),de.freeze(e),t&&Se(e,(e,t)=>{Re(t,!0)},!1),e)}function ze(){ue(2)}var Be={[ge]:ze};function Ve(e){return e===null||!je(e)?!0:de.isFrozen(e)}var He=`MapSet`,Ue=`Patches`,We=`ArrayMethods`,Ge={};function Ke(e){let t=Ge[e];return t||ue(0,e),t}var qe=e=>!!Ge[e],Je,Ye=()=>Je,Xe=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:qe(He)?Ke(He):void 0,arrayMethodsPlugin_:qe(We)?Ke(We):void 0});function Ze(e,t){t&&(e.patchPlugin_=Ke(Ue),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Qe(e){$e(e),e.drafts_.forEach(tt),e.drafts_=null}function $e(e){e===Je&&(Je=e.parent_)}var et=e=>Je=Xe(Je,e);function tt(e){let t=e[O];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function nt(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[O].modified_&&(Qe(t),ue(4)),ve(e)&&(e=rt(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[O].base_,e,t)}else e=rt(t,n);return it(t,e,!0),Qe(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===E?void 0:e}function rt(e,t){if(Ve(t))return t;let n=t[O];if(!n)return ft(t,e.handledSet_,e);if(!ot(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);ut(n,e)}return n.copy_}function it(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Re(t,n)}function at(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var ot=(e,t)=>e.scope_===t,st=[];function ct(e,t,n,r){let i=Fe(e),a=e.type_;if(r!==void 0&&Te(i,r,a)===t){Ee(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Se(i,(e,n)=>{if(_e(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??st;for(let e of o)Ee(i,e,n,a)}function lt(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!ot(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Ie(i);ct(e,i.draft_??i,a,n),ut(i,r)})}function ut(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}at(e)}}function dt(e,t,n){let{scope_:r}=e;if(_e(n)){let i=n[O];ot(i,r)&&i.callbacks_.push(function(){yt(e),ct(e,n,Ie(i),t)})}else ve(n)&&e.callbacks_.push(function(){let i=Fe(e);e.type_===3?i.has(n)&&ft(n,r.handledSet_,r):Te(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ft(Te(e.copy_,t,e.type_),r.handledSet_,r)})}function ft(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||_e(e)||t.has(e)||!ve(e)||Ve(e)?e:(t.add(e),Se(e,(r,i)=>{if(_e(i)){let t=i[O];ot(t,n)&&(Ee(e,r,Ie(t),e.type_),at(t))}else ve(i)&&ft(i,t,n)}),e)}function pt(e,t){let n=Oe(e),r={type_:+!!n,scope_:t?t.scope_:Ye(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=j;n&&(i=[r],a=mt);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var j={get(e,t){if(t===O)return e;if(t===`constructor`||t===`__proto__`){let n=Fe(e)[t];return new Proxy(n||{},{get:(e,t)=>t===`__proto__`||t===`prototype`?Object.freeze(Object.create(null)):Reflect.get(e,t),set:()=>!0,apply:(e,t,n)=>Reflect.apply(e,t,n)})}let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=Fe(e);if(!we(i,t,e.type_))return gt(e,i,t);let a=i[t];if(e.finalized_||!ve(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Pe(t))return a;if(a===ht(e.base_,t)){yt(e);let n=e.type_===1?+t:t,r=xt(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t===`constructor`||t===`__proto__`||t===`prototype`?!1:t in Fe(e)},ownKeys(e){return Reflect.ownKeys(Fe(e))},set(e,t,n){if(t===`constructor`||t===`__proto__`||t===`prototype`)return!0;let r=_t(Fe(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=ht(Fe(e),t),i=r?.[O];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(De(n,r)&&(n!==void 0||we(e.base_,t,e.type_)))return!0;yt(e),vt(e)}return e.copy_[t]===n&&(n!==void 0||we(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),dt(e,t,n),!0)},deleteProperty(e,t){return yt(e),ht(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),vt(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Fe(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[he]:!0,[pe]:e.type_!==1||t!==`length`,[me]:r[me],[ge]:n[t]}},defineProperty(){ue(11)},getPrototypeOf(e){return fe(e.base_)},setPrototypeOf(){ue(12)}},mt={};for(let e in j){let t=j[e];mt[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}mt.deleteProperty=function(e,t){return mt.set.call(this,e,t,void 0)},mt.set=function(e,t,n){return j.set.call(this,e[0],t,n,e[0])};function ht(e,t){let n=e[O];return(n?Fe(n):e)[t]}function gt(e,t,n){let r=_t(t,n);return r?ge in r?r[ge]:r.get?.call(e.draft_):void 0}function _t(e,t){if(!(t in e))return;let n=fe(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=fe(n)}}function vt(e){e.modified_||(e.modified_=!0,e.parent_&&vt(e.parent_))}function yt(e){e.copy_||=(e.assigned_=new Map,Le(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var bt=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Me(e)&&!Me(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Me(t)||ue(6),n!==void 0&&!Me(n)&&ue(7);let r;if(ve(e)){let i=et(this),a=xt(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Qe(i):$e(i)}return Ze(i,n),nt(r,i)}else if(!e||!je(e)){if(r=t(e),r===void 0&&(r=e),r===E&&(r=void 0),this.autoFreeze_&&Re(r,!0),n){let t=[],i=[];Ke(Ue).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}else ue(1,e)},this.produceWithPatches=(e,t)=>{if(Me(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},Ne(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Ne(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Ne(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ve(e)||ue(8),_e(e)&&(e=St(e));let t=et(this),n=xt(t,e,void 0);return n[O].isManual_=!0,$e(t),n}finishDraft(e,t){let n=e&&e[O];(!n||!n.isManual_)&&ue(9);let{scope_:r}=n;return Ze(r,t),nt(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=Ke(Ue).applyPatches_;return _e(e)?r(e,t):this.produce(e,e=>r(e,t))}};function xt(e,t,n,r){let[i,a]=ke(t)?Ke(He).proxyMap_(t,n):Ae(t)?Ke(He).proxySet_(t,n):pt(t,n);return(n?.scope_??Ye()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?lt(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function St(e){return _e(e)||ue(10,e),Ct(e)}function Ct(e){if(!ve(e)||Ve(e))return e;let t=e[O],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Le(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Le(e,!0);return Se(n,(e,t)=>{Ee(n,e,Ct(t))},r),t&&(t.finalized_=!1),n}var wt=new bt().produce,M=e=>(t,n,r)=>(r.setState=(e,n,...r)=>t(typeof e==`function`?wt(e):e,n,...r),e(r.setState,n,r));function Tt(e,t){return Et(e,t,new Map)}function Et(e,t,n){if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;let r=typeof e;if(r!==typeof t)return!1;if(e===null||t===null||r!==`object`)return e===t;if(n.has(e)&&n.get(e)===t)return!0;if(n.set(e,t),e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.toString()===t.toString();if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[r,i]of e)if(!t.has(r)||!Et(i,t.get(r),n))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let r of e){let e=!1;for(let i of t)if(Et(r,i,n)){e=!0;break}if(!e)return!1}return!0}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0;r({pollData:null,setPollData:t=>{e(e=>{Tt(t,e.pollData)||(e.pollData=t)})}}))),Ot=T()(M(e=>({pollData:null,setPollData:t=>e(e=>{e.pollData=t})}))),kt=T()(M(e=>({pollData:null,setPollData:t=>e(e=>{e.pollData=t})}))),At=T()(M(e=>({pollData:null,setPollData:t=>e(e=>{e.pollData=t})}))),jt=T()(M(e=>({pollData:null,setPollData:t=>e(e=>{e.pollData=t})}))),Mt=T()(M(e=>({items:[],pollData:null,setItem:({id:t,...n})=>{e(e=>{let r=e.items.find(e=>e.id===t);r&&Object.assign(r,n)})},setItems:t=>e({items:t}),setPollData:t=>{e(e=>{Tt(t,e.pollData)||(e.pollData=t)})}}))),Nt=T()(M(e=>({latestPhpVersion:``,pollData:null,setPollData:t=>e(e=>{e.pollData=t})}))),Pt=T()(M(e=>({latestPhpVersion:``,pollData:null,setLatestPhpVersion:t=>e(e=>{e.latestPhpVersion=t}),setPollData:t=>e(e=>{e.pollData=t})}))),Ft=T()(M(e=>({pollData:null,publicIpv4:``,publicIpv6:``,setPollData:t=>e(e=>{e.pollData=t}),setPublicIpv4:t=>e(e=>{e.publicIpv4=t}),setPublicIpv6:t=>e(e=>{e.publicIpv6=t})}))),It={cpuUsage:{idle:100,sys:0,usage:0,user:0},memBuffers:{max:0,value:0},memCached:{max:0,value:0},memRealUsage:{max:0,value:0},swapCached:{max:0,value:0},swapUsage:{max:0,value:0},sysLoad:[0,0,0]},Lt=T()(M(e=>({pollData:It,setPollData:t=>e(e=>{e.pollData=t})}))),Rt=T()(M(e=>({latestPhpVersion:``,pollData:null,setLatestPhpVersion:t=>e(e=>{e.latestPhpVersion=t}),setPollData:t=>e(e=>{Tt(t,e.pollData)||(e.pollData=t)})}))),zt=T()(M(e=>({pollData:null,setPollData:t=>e(e=>{e.pollData=t})}))),Bt=T()(M(e=>({pollData:null,setPollData:t=>{e(e=>{e.pollData=t}),Dt.getState().setPollData(t?.config??null),zt.getState().setPollData(t?.userConfig??null),Ot.getState().setPollData(t?.database??null),At.getState().setPollData(t?.myInfo??null),Pt.getState().setPollData(t?.phpInfo??null),kt.getState().setPollData(t?.diskUsage??null),Nt.getState().setPollData(t?.phpExtensions??null),jt.getState().setPollData(t?.networkStats??null),Lt.getState().setPollData(t?.serverStatus??null),Ft.getState().setPollData(t?.serverInfo??null),Mt.getState().setPollData(t?.nodes??null),Rt.getState().setPollData(t?.temperatureSensor??null)}})));function Vt(e,t){let n=e;for(let[e,r]of Object.entries(t)){let t=RegExp(`\\{\\{${e}\\}\\}`,`g`);n=n.replace(t,String(r))}return n}var Ht={main:`_main_bc4zy_9`},Ut=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),N=o(((e,t)=>{t.exports=Ut()}))(),Wt=()=>{let{hasConfig:e,APP_NAME:t,APP_URL:n,AUTHOR_NAME:r,AUTHOR_URL:i}=Bt(C(e=>({APP_NAME:e.pollData?.config?.APP_NAME,APP_URL:e.pollData?.config?.APP_URL,AUTHOR_NAME:e.pollData?.config?.AUTHOR_NAME,AUTHOR_URL:e.pollData?.config?.AUTHOR_URL,hasConfig:!!e.pollData?.config})));return e?(0,N.jsx)(`div`,{className:Ht.main,dangerouslySetInnerHTML:{__html:Vt(w(`Generate by {{appName}} and developed by {{authorName}}`),{appName:`${t}`,authorName:`${r}`})}}):null},Gt=[{id:`dark`,name:w(`LiangYe`)},{id:`light`,name:w(`XiGuang`)}],Kt={main:`_main_j7pyp_31`,button:`_button_j7pyp_36`},qt=e=>{document.documentElement.setAttribute(`data-theme`,e)},Jt=()=>window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`,Yt=()=>{let[e,t]=(0,_.useState)(v.THEME||`system`),[n,r]=(0,_.useState)(Jt);(0,_.useEffect)(()=>{let e=window.matchMedia(`(prefers-color-scheme: dark)`),t=e=>{r(e.matches?`dark`:`light`)};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]),(0,_.useEffect)(()=>{qt(e===`system`||!e?n:e)},[e,n]);let i=(0,_.useCallback)(e=>{let{id:n}=e.currentTarget.dataset;n&&(t(n),localStorage.setItem(`x-theme:v1`,n))},[]),a=e===`system`||!e?n:e;return(0,N.jsx)(`div`,{className:Kt.main,children:Gt.map(({id:t,name:n})=>{let r=t===e||e===`system`&&t===a;return(0,N.jsx)(`button`,{className:Kt.button,"data-active":r||void 0,"data-id":t,onClick:i,title:n,type:`button`,children:n},t)})})},Xt={main:`_main_mb04g_1`},Zt=T()(M(e=>({hasUpdateError:!1,isUpdating:!1,setHasUpdateError:t=>{e(e=>{e.hasUpdateError=t})},setIsUpdating:t=>{e(e=>{e.isUpdating=t})},setTargetVersion:t=>{e(e=>{e.targetVersion=t})},targetVersion:``}))),Qt={main:`_main_uzbg7_19`},$t=e=>(0,N.jsx)(`a`,{className:Qt.main,...e}),en=e=>(0,N.jsx)(`button`,{className:Qt.main,...e}),tn=T()(M((e,t)=>({close:(n=0)=>{let r=t().timerId;if(r&&clearTimeout(r),n===0){e(e=>{e.isOpen=!1,e.timerId=null});return}let i=setTimeout(()=>{e(e=>{e.isOpen=!1,e.timerId=null})},n*1e3);e(e=>{e.timerId=i})},isOpen:!1,msg:``,open:t=>e(e=>{e.timerId&&clearTimeout(e.timerId),e.isOpen=!0,e.msg=t??``,e.timerId=null}),setMsg:t=>e(e=>{e.msg=t}),timerId:null}))),nn=()=>{let{isUpdating:e,hasUpdateError:t,targetVersion:n}=Zt(C(e=>({hasUpdateError:e.hasUpdateError,isUpdating:e.isUpdating,targetVersion:e.targetVersion}))),r=Dt(e=>e?.pollData?.APP_VERSION??`-`);return e?w(`⏳ Updating, please wait a second...`):t?w(`❌ Update error, click here to try again?`):n?Vt(w(`✨ Found new version: {{oldVersion}} ⇢ {{newVersion}}`),{newVersion:n,oldVersion:r}):``},rn=()=>{let e=nn(),t=Zt(e=>e.isUpdating),n=Zt(e=>e.setIsUpdating),r=Zt(e=>e.setHasUpdateError),i=tn(e=>e.open);return(0,N.jsx)(en,{onClick:(0,_.useCallback)(async e=>{if(e.preventDefault(),e.stopPropagation(),t)return;n(!0);let{status:a}=await b(`update`);switch(a){case 201:i(w(`Update success, refreshing...`)),window.location.reload();return;case 403:i(w(`Update is disabled in dev mode.`)),n(!1),r(!0);return;case 507:case 500:i(w(`Can not update file, please check the server permissions and space.`)),n(!1),r(!0);return;default:}i(w(`Network error, please try again later.`)),n(!1),r(!0)},[t,n,r,i]),title:w(`Click to update`),children:e})},an=/^\d+$/,on={"#":-2,a:-5,alpha:-5,any:-7,b:-4,beta:-4,p:-6,patch:-6,pl:-1,pr:-6,rc:-3};function sn(e,t){let n=e=>{let t=e.indexOf(`+`);return t===-1?e:e.slice(0,t)},r=e=>n(e).trim().replace(/[-_]/g,`.`).replace(/([0-9]+)([a-zA-Z]+)/g,`$1.$2`).replace(/([a-zA-Z]+)([0-9]+)/g,`$1.$2`).split(`.`).filter(e=>e.length>0),i=r(e),a=r(t),o=e=>{if(e===void 0||e===``)return{isNum:!0,val:0,weight:0};if(an.test(e))return{isNum:!0,val:Number.parseInt(e,10),weight:0};let t=e.toLowerCase();return{isNum:!1,val:t,weight:t in on?on[t]:0}},s=Math.max(i.length,a.length);for(let e=0;en.val?1:-1}else if(t.isNum||n.isNum)return t.isNum?n.weight<0?1:-1:t.weight>0?1:-1;else{if(t.weight!==n.weight)return t.weight>n.weight?1:-1;if(t.val!==n.val)return t.val>n.val?1:-1}}return 0}var cn={main:`_main_1k8xz_1`,name:`_name_1k8xz_6`,version:`_version_1k8xz_10`},ln=()=>{let{hasPollData:e,APP_NAME:t,APP_URL:n,APP_VERSION:r}=Dt(C(e=>({APP_NAME:e.pollData?.APP_NAME,APP_URL:e.pollData?.APP_URL,APP_VERSION:e.pollData?.APP_VERSION,hasPollData:!!e.pollData}))),{setTargetVersion:i,targetVersion:a}=Zt(C(e=>({setTargetVersion:e.setTargetVersion,targetVersion:e.targetVersion})));return(0,_.useEffect)(()=>{e&&(async()=>{let{data:e,status:t}=await b(`latestVersion`);!e?.version||t!==200||i(e.version)})()},[e,i]),e?(0,N.jsx)(`h1`,{className:cn.main,children:a&&r&&sn(r,a)<0?(0,N.jsx)(rn,{}):(0,N.jsxs)($t,{href:n,rel:`noreferrer`,target:`_blank`,children:[(0,N.jsx)(`span`,{className:cn.name,children:t}),(0,N.jsx)(`span`,{className:cn.version,children:r})]})}):null},un=()=>(0,N.jsxs)(`div`,{className:Xt.main,children:[(0,N.jsx)(ln,{}),(0,N.jsx)(Yt,{})]}),dn=m(),fn=e=>{let t=(0,_.useRef)(document.createElement(`div`));return(0,_.useEffect)(()=>{if(e){let n=document.getElementById(e);if(!n)return;n.innerHTML=``,n.appendChild(t.current)}else document.body.appendChild(t.current);return()=>{t.current.remove()}},[e]),t.current},pn=({children:e})=>(0,dn.createPortal)(e,fn()),mn={main:`_main_setjm_10`},hn=()=>{let e=tn(e=>e.isOpen),t=tn(e=>e.msg),n=tn(e=>e.close),r=(0,_.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),n()},[n]);return e?(0,N.jsx)(pn,{children:(0,N.jsx)(`button`,{className:mn.main,onClick:r,title:w(`Click to close`),type:`button`,children:t})}):null},gn={container:`_container_30sck_1`},_n=`browserBenchmark`,vn=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),yn=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),bn=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),xn=e=>{let t=bn(e);return t.charAt(0).toUpperCase()+t.slice(1)},Sn={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Cn=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},wn=(0,_.createContext)({}),Tn=()=>(0,_.useContext)(wn),En=(0,_.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Tn()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,_.createElement)(`svg`,{ref:c,...Sn,width:t??l??Sn.width,height:t??l??Sn.height,stroke:e??f,strokeWidth:m,className:vn(`lucide`,p,i),...!a&&!Cn(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,_.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Dn=(e,t)=>{let n=(0,_.forwardRef)(({className:n,...r},i)=>(0,_.createElement)(En,{ref:i,iconNode:t,className:vn(`lucide-${yn(xn(e))}`,`lucide-${e}`,n),...r}));return n.displayName=xn(e),n},On=Dn(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),kn=Dn(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),An=Dn(`cloud-download`,[[`path`,{d:`M12 13v8l-4-4`,key:`1f5nwf`}],[`path`,{d:`m12 21 4-4`,key:`1lfcce`}],[`path`,{d:`M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284`,key:`ui1hmy`}]]),jn=Dn(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),Mn=Dn(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),Nn=Dn(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Pn=Dn(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),Fn=Dn(`loader-pinwheel`,[[`path`,{d:`M22 12a1 1 0 0 1-10 0 1 1 0 0 0-10 0`,key:`1lzz15`}],[`path`,{d:`M7 20.7a1 1 0 1 1 5-8.7 1 1 0 1 0 5-8.6`,key:`1gnrpi`}],[`path`,{d:`M7 3.3a1 1 0 1 1 5 8.6 1 1 0 1 0 5 8.6`,key:`u9yy5q`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),In=Dn(`memory-stick`,[[`path`,{d:`M12 12v-2`,key:`fwoke6`}],[`path`,{d:`M12 18v-2`,key:`qj6yno`}],[`path`,{d:`M16 12v-2`,key:`heuere`}],[`path`,{d:`M16 18v-2`,key:`s1ct0w`}],[`path`,{d:`M2 11h1.5`,key:`15p63e`}],[`path`,{d:`M20 18v-2`,key:`12ehxp`}],[`path`,{d:`M20.5 11H22`,key:`khsy7a`}],[`path`,{d:`M4 18v-2`,key:`1c3oqr`}],[`path`,{d:`M8 12v-2`,key:`1mwtfd`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`rect`,{x:`2`,y:`6`,width:`20`,height:`10`,rx:`2`,key:`1qcswk`}]]),Ln=Dn(`pointer`,[[`path`,{d:`M22 14a8 8 0 0 1-8 8`,key:`56vcr3`}],[`path`,{d:`M18 11v-1a2 2 0 0 0-2-2a2 2 0 0 0-2 2`,key:`1agjmk`}],[`path`,{d:`M14 10V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1`,key:`wdbh2u`}],[`path`,{d:`M10 9.5V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v10`,key:`1ibuk9`}],[`path`,{d:`M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15`,key:`g6ys72`}]]),Rn=Dn(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),zn=Dn(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Bn={arrow:`_arrow_19b9q_13`},Vn=`database`,Hn=`diskUsage`,Un=`myInfo`,Wn=`networkStats`,Gn=`nodes`,Kn=`phpExtensions`,qn=`phpInfo`,Jn=`ping`,Yn=`serverBenchmark`,Xn=`serverInfo`,Zn=`serverStatus`,Qn=`temperatureSensor`,$n=`x-module-priority:v1`,er=[Gn,Qn,Zn,Wn,Hn,Jn,Xn,qn,Kn,Vn,Yn,_n,Un],tr=()=>{let e=localStorage.getItem($n);if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}},nr=e=>{localStorage.setItem($n,JSON.stringify(e))},rr=T()(M(e=>{let t=tr();return{moveDown:t=>{e(e=>{let n=e.priorities.indexOf(t);n<0||n===e.priorities.length-1||([e.priorities[n],e.priorities[n+1]]=[e.priorities[n+1],e.priorities[n]],nr(e.priorities))})},moveUp:t=>{e(e=>{let n=e.priorities.indexOf(t);n<=0||([e.priorities[n],e.priorities[n-1]]=[e.priorities[n-1],e.priorities[n]],nr(e.priorities))})},priorities:er.toSorted((e,n)=>{let r=t.indexOf(e),i=t.indexOf(n);return(r<0?0:r)-(i<0?0:i)}),setPriorities:t=>e(e=>{e.priorities=t,nr(t)})}})),ir=({isDown:e,moduleId:t})=>{let n=wa(),{moveUp:r,moveDown:i}=rr(C(e=>({moveDown:e.moveDown,moveUp:e.moveUp}))),a=e?(e=>n.at(-1)?.id===e)(t):(e=>n.at(0)?.id===e)(t),o=(0,_.useCallback)(n=>{if(n.preventDefault(),n.stopPropagation(),e){i(t);return}r(t)},[e,i,r,t]);return(0,N.jsx)(`button`,{className:Bn.arrow,"data-disabled":a||void 0,disabled:a,onClick:o,title:w(e?`Move down`:`Move up`),type:`button`,children:e?(0,N.jsx)(On,{}):(0,N.jsx)(kn,{})})},ar={main:`_main_15ko2_17`,header:`_header_15ko2_23`,title:`_title_15ko2_35`,body:`_body_15ko2_39`},or=(0,_.memo)(({id:e,title:t})=>(0,N.jsxs)(`h2`,{className:ar.header,children:[(0,N.jsx)(ir,{isDown:!1,moduleId:e}),(0,N.jsx)(`span`,{className:ar.title,children:t}),(0,N.jsx)(ir,{isDown:!0,moduleId:e})]})),sr=({id:e,title:t,children:n,...r})=>(0,N.jsxs)(`div`,{className:ar.main,id:e,...r,children:[(0,N.jsx)(or,{id:e,title:t}),(0,N.jsx)(`div`,{className:ar.body,children:n})]}),cr={main:`_main_11kiv_11`,item:`_item_11kiv_19`},lr=({items:e})=>(0,N.jsx)(`ul`,{className:cr.main,children:e.map(({id:e,text:t})=>(0,N.jsxs)(`li`,{className:cr.item,children:[(0,N.jsx)(Nn,{}),t]},e))}),ur={main:`_main_u2qvm_19`,animation:`_animation_u2qvm_1`},dr=({height:e=5})=>(0,N.jsx)(`div`,{className:ur.main,style:{height:`${e}rem`}}),fr={main:`_main_ndt5n_13`},pr=({children:e})=>(0,N.jsxs)(`div`,{className:fr.main,role:`alert`,children:[(0,N.jsx)(zn,{}),e]}),mr={main:`_main_ky93m_1`,link:`_link_ky93m_8`},hr=Object.create,gr=Object.defineProperty,_r=Object.getOwnPropertyDescriptor,vr=Object.getOwnPropertyNames,yr=Object.getPrototypeOf,br=Object.prototype.hasOwnProperty,xr=(e,t)=>function(){return t||(0,e[vr(e)[0]])((t={exports:{}}).exports,t),t.exports},Sr=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of vr(t))!br.call(e,i)&&i!==n&&gr(e,i,{get:()=>t[i],enumerable:!(r=_r(t,i))||r.enumerable});return e},Cr=((e,t,n)=>(n=e==null?{}:hr(yr(e)),Sr(t||!e||!e.__esModule?gr(n,`default`,{value:e,enumerable:!0}):n,e)))(xr({"node_modules/toggle-selection/index.js"(e,t){"use strict";t.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r(0,N.jsxs)(`ruby`,{className:Nr.main,"data-is-result":n||void 0,...r,children:[e,(0,N.jsx)(`rp`,{children:`(`}),(0,N.jsx)(`rt`,{children:t}),(0,N.jsx)(`rp`,{children:`)`})]}),Fr={main:`_main_7f4z3_19`,header:`_header_7f4z3_25`,marks:`_marks_7f4z3_31`,sign:`_sign_7f4z3_56`},Ir=(e,t=2)=>{if(e===0)return`0`;let n=1024,r=[`B`,`K`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`],i=Math.floor(Math.log(e)/Math.log(n));i=i<0?0:i;let a=Number.parseFloat((e/n**i).toFixed(t));return a?`${a.toFixed(2)} ${r[i]}`:`0`},Lr={main:`_main_yr5so_23`,percent:`_percent_yr5so_30`,percentText:`_percentText_yr5so_35`,name:`_name_yr5so_41`,nameText:`_nameText_yr5so_51`,overview:`_overview_yr5so_60`,core:`_core_yr5so_64`},Rr=(0,_.memo)(({value:e,max:t=100,low:n=60,optimum:r,high:i=80})=>(0,N.jsx)(`meter`,{className:Lr.core,high:i,low:n,max:t,optimum:r,value:e})),zr=(0,_.memo)(({title:e,name:t=``,value:n,max:r,isCapacity:i,percentTag:a=`%`,percent:o,percentRender:s,progressPercent:c})=>{let l=tn(e=>e.open),u=(0,_.useCallback)(n=>{n.preventDefault(),n.stopPropagation(),l(e||t),!(e?.length??!1)&&navigator.clipboard.writeText(t)},[t,e,l]),d=r===0||n===0?0:n/r*100,f=i?`${Ir(n)} / ${Ir(r)}`:`${n.toFixed(1)}${a} / ${r}${a}`;return(0,N.jsxs)(`div`,{className:Lr.main,title:e,children:[(0,N.jsx)(`button`,{className:Lr.name,onClick:u,title:t,type:`button`,children:(0,N.jsx)(`div`,{className:Lr.nameText,children:t})}),(0,N.jsx)(`div`,{className:Lr.percent,children:(0,N.jsx)(`span`,{className:Lr.percentText,children:s??`${(o??d).toFixed(1)}%`})}),(0,N.jsx)(`div`,{className:Lr.overview,children:f}),(0,N.jsx)(Rr,{value:c??d})]})}),Br={main:`_main_fajqi_1`},Vr=({totalMarks:e,total:t})=>(0,N.jsx)(`div`,{className:Br.main,children:(0,N.jsx)(Rr,{high:e*.7,low:e*.5,max:e,optimum:e,value:t})}),Hr=({js:e,dom:t,canvas:n,date:r})=>{let i=e+t+n,a=e.toLocaleString(),o=t.toLocaleString(),s=n.toLocaleString(),c=i.toLocaleString(),l=Vt(`{{js}} (JS) + {{dom}} (DOM) + {{canvas}} (Canvas) = {{total}}`,{canvas:s,dom:o,js:a,total:c}),u=(0,N.jsx)(`span`,{className:Fr.sign,children:`+`});return(0,N.jsxs)(`button`,{className:Fr.marks,onClick:e=>{e.preventDefault(),e.stopPropagation(),Mr(l)},title:w(`Touch to copy marks`),type:`button`,children:[(0,N.jsx)(Pr,{"data-is-detail":!0,rt:`JS`,ruby:a}),u,(0,N.jsx)(Pr,{"data-is-detail":!0,rt:`DOM`,ruby:o}),u,(0,N.jsx)(Pr,{"data-is-detail":!0,rt:`Canvas`,ruby:s}),(0,N.jsx)(`span`,{className:Fr.sign,children:`=`}),(0,N.jsx)(Pr,{"data-total":!0,isResult:!0,rt:r||``,ruby:c})]})},Ur=({ua:e,header:t,marks:n,maxMarks:r,date:i})=>{let{js:a,dom:o,canvas:s}=n;return(0,N.jsxs)(`div`,{className:Fr.main,children:[(0,N.jsx)(`div`,{className:Fr.header,title:e,children:t}),(0,N.jsx)(Hr,{canvas:s,date:i,dom:o,js:a}),(0,N.jsx)(Vr,{total:a+o+s,totalMarks:r})]})},Wr={button:`_button_i7kkm_24`,icon:`_icon_i7kkm_48`,spin:`_spin_i7kkm_1`},Gr={Error:`error`,Loading:`loading`,Pointer:`pointer`,Warning:`warning`},Kr=({status:e})=>(0,N.jsx)(`span`,{className:Wr.icon,"data-status":e,children:{[Gr.Error]:(0,N.jsx)(zn,{}),[Gr.Loading]:(0,N.jsx)(Fn,{}),[Gr.Warning]:(0,N.jsx)(Rn,{}),[Gr.Pointer]:(0,N.jsx)(Ln,{})}[e]??null}),qr=({status:e=Gr.Pointer,children:t,...n})=>(0,N.jsxs)(`button`,{className:Wr.button,type:`button`,...n,children:[(0,N.jsx)(Kr,{status:e}),t]}),Jr=({status:e=Gr.Pointer,children:t,href:n,...r})=>(0,N.jsxs)(`a`,{className:Wr.button,"data-link":!0,href:n,...r,children:[(0,N.jsx)(Kr,{status:e}),t]}),Yr=T()(M(e=>({benchmarking:!1,browsers:[],maxMarks:0,setBenchmarking:t=>e(e=>{e.benchmarking=t}),setBrowser:(t,n)=>e(e=>{let r=e.browsers.findIndex(e=>e.id===t);r!==-1&&(e.browsers[r]=n)}),setBrowsers:t=>e(e=>{e.browsers=t}),setMaxMarks:t=>e(e=>{e.maxMarks=t})}))),Xr=class{getRndint=(e,t)=>Math.floor(Math.random()*(t-e+1))+e;runJs=()=>{let e=0,t=performance.now();for(;;){for(let e=0;e<1e4;e++)Math.sqrt(e)*Math.sin(e)/Math.tan(e+1);let n=Array(1e3).fill(0).map((e,t)=>t);if(n.sort(()=>Math.random()-.5),n.sort((e,t)=>e-t),e++,performance.now()-t>1e3)break}return e};runDom=()=>{let e=0,t=window.innerWidth,n=window.innerHeight,r=performance.now(),i=document.createElement(`div`);for(i.style.cssText=` position: fixed; top: 0; left: 0; width: 100%; height: 100%; `,document.body.appendChild(i);;){for(let e=0;e<100;e++){let e=document.createElement(`div`);e.className=`benchmark-dom`,e.style.position=`fixed`,e.style.left=`0px`,e.style.top=`0px`,e.style.width=`${this.getRndint(50,t)}px`,e.style.height=`${this.getRndint(50,n)}px`,e.style.border=`1px solid green`,i.appendChild(e)}let a=document.querySelectorAll(`.benchmark-dom`);for(let e of Array.from(a))e.style.borderColor=`red`;for(;i.firstChild;)i.removeChild(i.firstChild);if(e++,performance.now()-r>1e3)break}return document.body.removeChild(i),e};runCanvas=()=>{let e=0,t=document.createElement(`canvas`),n=window.innerWidth,r=window.innerHeight;t.width=n,t.height=r,t.style.position=`fixed`,t.style.top=`0px`,t.style.left=`0px`,document.body.appendChild(t);let i=t.getContext(`2d`),a=performance.now();for(;;){for(let e=0;e<100;e++){i.clearRect(0,0,t.width,t.height);let e=t.width/2,n=t.height/2,r=t.width/2;i.lineWidth=this.getRndint(1,5),i.strokeStyle=`red`,i.lineCap=`round`,i.beginPath(),i.moveTo(e-r,n-r),i.lineTo(e+r,n+r),i.rotate(this.getRndint(0,360)),i.stroke(),i.beginPath(),i.moveTo(e+r,n-r),i.lineTo(e-r,n+r),i.rotate(this.getRndint(0,360)),i.stroke()}if(e++,performance.now()-a>1e3)break}return i.clearRect(0,0,t.width,t.height),document.body.removeChild(t),e}},Zr=()=>{let[e,t]=(0,_.useState)(!1),{setMaxMarks:n,maxMarks:r}=Yr(C(e=>({maxMarks:e.maxMarks,setMaxMarks:e.setMaxMarks}))),[i,a]=(0,_.useState)({canvas:0,dom:0,js:0}),o=(0,_.useCallback)(i=>{if(i.preventDefault(),i.stopPropagation(),e||!window.confirm(w(`Running the benchmark may freeze the browser interface for a few seconds. Do you want to continue?`)))return;let o=new Xr;t(!0);let s={canvas:o.runCanvas(),dom:o.runDom(),js:o.runJs()};t(!1),a(s);let c=Object.values(s).reduce((e,t)=>e+t,0);c>r&&n(c)},[e,r,n]),s=new Date,c=(0,N.jsx)(qr,{disabled:e,onClick:o,status:e?Gr.Loading:Gr.Pointer,children:w(`Benchmark my browser`)});return(0,N.jsx)(Ur,{date:`${s.getFullYear()}-${s.getMonth()+1}-${s.getDate()}`,header:c,marks:i,maxMarks:r,ua:``})},Qr=()=>{let[e,t]=(0,_.useState)(`loading`),{browsers:n,setBrowsers:r,setMaxMarks:i,maxMarks:a}=Yr(C(e=>({browsers:e.browsers,maxMarks:e.maxMarks,setBrowsers:e.setBrowsers,setMaxMarks:e.setMaxMarks})));(0,_.useEffect)(()=>{(async()=>{t(`loading`);let{data:e,status:n}=await b(`browserBenchmarks`);if(!e?.length||n!==200){t(`error`);return}let a=e.map(e=>({...e,total:e.detail?Object.values(e.detail).reduce((e,t)=>e+t,0):0})).toSorted((e,t)=>t.total-e.total),o=a[0]?.total??0;r(a),i(o),t(`idle`)})()},[r,i]);let o=(0,_.useMemo)(()=>n.filter(e=>e.detail).map(({name:e,version:t,ua:n,detail:r,date:i})=>{let{js:o=0,dom:s=0,canvas:c=0}=r;return(0,N.jsx)(Ur,{date:i,header:`${e}/v${t}`,marks:{canvas:c,dom:s,js:o},maxMarks:a,ua:n},`${e}-${t}`)}),[n,a]);return(0,N.jsxs)(`div`,{className:mr.main,children:[(0,N.jsx)(Zr,{}),e===`loading`&&Array.from({length:5}).map((e,t)=>(0,N.jsx)(dr,{},`browser-placeholder-${String(t)}`)),e===`idle`&&o,e===`error`&&(0,N.jsx)(pr,{children:w(`Can not fetch marks data from GitHub.`)})]})},$r=(0,_.memo)(()=>(0,N.jsxs)(sr,{id:_n,title:w(`Browser Benchmark`),children:[(0,N.jsx)(lr,{items:[{id:`browserBenchmarkTos`,text:w(`Different versions cannot be compared, and different time clients have different loads, just for reference.`)}]}),(0,N.jsx)(Qr,{})]})),ei={wrap:`_wrap_1hhzt_20`,main:`_main_1hhzt_38`,link:`_link_1hhzt_53`},ti=({id:e,title:t})=>(0,N.jsx)(`a`,{className:ei.link,href:`#${e}`,children:t},e),ni={content:$r,id:_n,nav:()=>(0,N.jsx)(ti,{id:_n,title:w(`Browser bench`)})},ri={main:`_main_1kdvx_13`,label:`_label_1kdvx_23`,content:`_content_1kdvx_33`},ii=({label:e=``,title:t=``,minWidth:n=4,maxWidth:r=8,children:i})=>{let a={"--max-width":`${r}rem`,"--min-width":`${n}rem`};return(0,N.jsxs)(`div`,{className:ri.main,style:a,children:[!!e&&(0,N.jsx)(`div`,{className:ri.label,title:t,children:e}),(0,N.jsx)(`div`,{className:ri.content,children:i})]})},ai={main:`_main_z8p86_1`},oi=({minWidth:e=16,...t})=>{let n={"--min-width":`${e}rem`};return(0,N.jsx)(`div`,{className:ai.main,style:n,...t})},si={main:`_main_17jwg_17`},ci=({isEnable:e,text:t=``})=>(0,N.jsx)(`div`,{className:si.main,"data-error":!e||void 0,"data-icon":!t||void 0,"data-ok":e||void 0,children:t}),li={content:(0,_.memo)(()=>{let e=Ot(C(e=>e.pollData)),t=[[`SQLite3`,e?.sqlite3??!1],[`MySQLi client`,e?.mysqliClientVersion??!1],[`Mongo`,e?.mongo??!1],[`MongoDB`,e?.mongoDb??!1],[`PostgreSQL`,e?.postgreSql??!1],[`Paradox`,e?.paradox??!1],[`MS SQL`,e?.msSql??!1],[`PDO`,e?.pdo??!1]];return(0,N.jsx)(sr,{id:Vn,title:w(`Database`),children:(0,N.jsx)(oi,{minWidth:14,children:t.map(([e,t])=>(0,N.jsx)(ii,{label:e,maxWidth:7,minWidth:4,children:(0,N.jsx)(ci,{isEnable:!!t,text:t})},e))})})}),id:Vn,nav:()=>(0,N.jsx)(ti,{id:Vn,title:w(`DB`)})},ui={main:`_main_1n0a8_1`},di={content:()=>{let e=kt(C(e=>e.pollData?.items??[]));return e.length?(0,N.jsx)(sr,{id:Hn,title:w(`Disk Usage`),children:(0,N.jsx)(`div`,{className:ui.main,children:e.map(({id:e,free:t,total:n})=>(0,N.jsx)(zr,{isCapacity:!0,max:n,name:e,value:n-t},e))})}):null},id:Hn,nav:()=>kt(e=>!!e.pollData?.items.length)?(0,N.jsx)(ti,{id:Hn,title:w(`Disk`)}):null},fi=({ip:e})=>{let[t,n]=(0,_.useState)(!1),[r,i]=(0,_.useState)(null),a=tn(e=>e.open);return(0,N.jsx)(qr,{onClick:(0,_.useCallback)(async r=>{if(r.preventDefault(),r.stopPropagation(),t)return;n(!0);let{data:o,status:s}=await b(`locationIpv4&ip=${e}`);if(n(!1),o&&s===200){i(o);return}a(w(`Can not fetch location.`))},[e,t,a]),status:t?Gr.Loading:Gr.Pointer,children:r?Object.values(r).filter(Boolean).join(`, `):w(`Click to fetch`)})},pi=e=>{let[t,n]=(0,_.useState)({ip:``,isLoading:!0,msg:w(`Loading...`)});return(0,_.useEffect)(()=>{(async()=>{let t=await fetch(`https://ipv${e}.inn-studio.com/ip/?json`);await t.json().catch(()=>{n({ip:``,isLoading:!1,msg:w(`Not support`)})}).then(e=>{if(e?.ip&&t.status===200){n({ip:e.ip,isLoading:!1,msg:``});return}n({ip:``,isLoading:!1,msg:w(`Can not fetch IP`)})})})()},[e]),t},mi={main:`_main_mc2kq_1`},hi=e=>(0,N.jsx)(`div`,{className:mi.main,...e}),gi={content:()=>{let{hasPollData:e,pollDataIpv4:t,pollDataIpv6:n,phpLanguage:r}=At(C(e=>({hasPollData:!!e.pollData,phpLanguage:e.pollData?.phpLanguage??`-`,pollDataIpv4:e.pollData?.ipv4??``,pollDataIpv6:e.pollData?.ipv6??``}))),{ip:i,msg:a,isLoading:o}=pi(4),{ip:s,msg:c,isLoading:l}=pi(6),u=``,d=``;u=o?a:i||t||a,d=l?c:s||n||c;let f=[[w(`IPv4`),u],[w(`IPv6`),d],[w(`Location (IPv4)`),(0,N.jsx)(fi,{ip:u},`myLocalIpv4`)],[w(`Browser UA`),navigator.userAgent],[w(`JS Browser languages`),navigator.languages.join(`,`)],[w(`PHP Browser languages`),r]];return e?(0,N.jsx)(sr,{id:Un,title:w(`My Info`),children:(0,N.jsx)(hi,{children:f.map(([e,t])=>(0,N.jsx)(ii,{label:e,children:t},e))})}):null},id:Un,nav:()=>At(e=>!!e.pollData)?(0,N.jsx)(ti,{id:Un,title:w(`Mine`)}):null};function _i(e){let t=(0,_.useRef)(null);return(0,_.useEffect)(()=>{t.current=e},[e]),t.current}var vi={container:`_container_1bb8j_2`,item:`_item_1bb8j_8`,id:`_id_1bb8j_12`,idRow:`_idRow_1bb8j_17`,dataContainer:`_dataContainer_1bb8j_22`,data:`_data_1bb8j_22`,rate:`_rate_1bb8j_39`,rateRx:`_rateRx_1bb8j_46`,rateTx:`_rateTx_1bb8j_50`},yi={main:`_main_j131p_15`,id:`_id_j131p_21`,label:`_label_j131p_26`,total:`_total_j131p_30`,rx:`_rx_j131p_35`,tx:`_tx_j131p_36`,rateRx:`_rateRx_j131p_58`,rateTx:`_rateTx_j131p_59`},bi=(0,_.memo)(({id:e,totalRx:t=0,rateRx:n=0,totalTx:r=0,rateTx:i=0})=>e?(0,N.jsxs)(`div`,{className:yi.main,children:[(0,N.jsx)(`div`,{className:yi.id,children:e}),(0,N.jsxs)(`div`,{className:yi.rx,children:[(0,N.jsx)(`div`,{className:yi.label,children:w(`▼ Received`)}),(0,N.jsx)(`div`,{className:yi.total,children:Ir(t)}),(0,N.jsxs)(`div`,{className:yi.rateRx,children:[Ir(n),`/s`]})]}),(0,N.jsxs)(`div`,{className:yi.tx,children:[(0,N.jsx)(`div`,{className:yi.label,children:w(`▲ Sent`)}),(0,N.jsx)(`div`,{className:yi.total,children:Ir(r)}),(0,N.jsxs)(`div`,{className:yi.rateTx,children:[Ir(i),`/s`]})]})]}):null);bi.displayName=`NetworksStatsItem`;var xi={content:()=>{let{networks:e,networksCount:t,timestamp:n}=jt(C(e=>({networks:e.pollData?.networks??[],networksCount:e.pollData?.networks.length,timestamp:e.pollData?.timestamp??0}))),r=(0,_.useMemo)(()=>e.filter(({tx:e})=>!!e).toSorted((e,t)=>e.tx-t.tx),[e]),i=_i({items:r,timestamp:n}),a=(0,_.useMemo)(()=>{let e=new Map,t=i?.items||r;for(let n of t)e.set(n.id,n);return e},[i?.items,r]);if(!t)return null;let o=n-(i?.timestamp||n);return(0,N.jsx)(sr,{id:Wn,title:w(`Network Stats`),children:(0,N.jsx)(`div`,{className:vi.container,children:r.map(({id:e,rx:t,tx:n})=>{if(!(t||n))return null;let r=a.get(e),i=r?.rx||0,s=r?.tx||0;return(0,N.jsx)(bi,{id:e,rateRx:o>0?(t-i)/o:0,rateTx:o>0?(n-s)/o:0,totalRx:t,totalTx:n},e)})})})},id:Wn,nav:()=>jt(e=>!!e.pollData?.networks.length)?(0,N.jsx)(ti,{id:Wn,title:w(`Network`)}):null},Si={main:`_main_6ky1o_1`},Ci={main:`_main_1pjeu_12`,label:`_label_1pjeu_19`,meter:`_meter_1pjeu_25`,usage:`_usage_1pjeu_31`,group:`_group_1pjeu_36`,groupItem:`_groupItem_1pjeu_43`},wi=({load:e,title:t})=>(0,N.jsx)(`div`,{className:Ci.groupItem,title:t,children:e.toFixed(2)}),Ti=({sysLoad:e})=>{let t=[1,5,15],n=e.map((e,n)=>({id:`${t[n]}minAvg`,load:e,text:Vt(w(`{{minute}} minute average`),{minute:t[n]})}));return(0,N.jsx)(`div`,{className:Ci.group,children:n.map(({id:e,load:t,text:n})=>(0,N.jsx)(`div`,{className:Ci.groupItem,title:n,children:t.toFixed(2)},e))})},Ei=()=>{let{user:e,idle:t,sys:n,usage:r,sysLoad:i}=Lt(C(e=>({idle:e.pollData?.cpuUsage.idle??.01,sys:e.pollData?.cpuUsage.sys??.01,sysLoad:e.pollData?.sysLoad.join(`,`)??``,usage:e.pollData?.cpuUsage.usage??1,user:e.pollData?.cpuUsage.user??.1}))),a=e+t+n,o=` user: ${(e/a*100).toFixed(2)}% idle: ${(t/a*100).toFixed(2)}% sys: ${(n/a*100).toFixed(2)}% `,s=i.split(`,`).map(Number);return(0,N.jsxs)(`div`,{className:Ci.main,children:[(0,N.jsx)(`div`,{className:Ci.label,children:w(`System load`)}),(0,N.jsx)(`div`,{className:Ci.usage,title:o,children:Vt(w(`{{usage}}% CPU usage`),{usage:r})}),(0,N.jsx)(Ti,{sysLoad:s}),(0,N.jsx)(`div`,{className:Ci.meter,children:(0,N.jsx)(Rr,{value:r>100?100:r})})]})},Di={sysLoad:`_sysLoad_mqy5s_1`},Oi={main:`_main_8nrrw_9`,meter:`_meter_8nrrw_18`,label:`_label_8nrrw_24`,overview:`_overview_8nrrw_35`,chart:`_chart_8nrrw_41`,percent:`_percent_8nrrw_46`},ki=({children:e,percent:t})=>(0,N.jsxs)(`div`,{className:Oi.main,children:[e,(0,N.jsxs)(`div`,{className:Oi.percent,children:[t,`%`]}),(0,N.jsx)(`div`,{className:Oi.meter,children:(0,N.jsx)(Rr,{max:100,value:t})})]}),Ai=e=>(0,N.jsx)(`div`,{className:Oi.label,...e}),ji=e=>(0,N.jsx)(`div`,{className:Oi.overview,...e}),Mi=({items:e})=>(0,N.jsx)(`div`,{className:Di.sysLoad,children:e.map(e=>(0,N.jsx)(wi,{load:e},Math.random()))}),Ni=(0,_.memo)(({sysLoad:e,cpuUsage:t})=>{let{user:n,idle:r,sys:i,usage:a}=t,o=n+r+i,s=` user: ${(n/o*100).toFixed(2)}% idle: ${(r/o*100).toFixed(2)}% sys: ${(i/o*100).toFixed(2)}% `;return(0,N.jsxs)(ki,{percent:a,children:[(0,N.jsxs)(Ai,{children:[(0,N.jsx)(jn,{}),w(`CPU`)]}),(0,N.jsx)(ji,{title:s,children:(0,N.jsx)(Mi,{items:e})})]})}),Pi={main:`_main_1pxno_1`,item:`_item_1pxno_13`},Fi=(0,_.memo)(({id:e,free:t,total:n})=>(0,N.jsx)(`div`,{className:Pi.item,children:(0,N.jsxs)(ki,{percent:n?Math.round(t/n*100):0,children:[(0,N.jsxs)(Ai,{children:[(0,N.jsx)(Mn,{}),e]}),(0,N.jsx)(ji,{children:`${Ir(t)} / ${Ir(n)}`})]})},e)),Ii=({data:e})=>{let t=e?.items??[];return(0,N.jsx)(`div`,{className:Pi.main,children:t.map(({id:e,free:t,total:n})=>(0,N.jsx)(Fi,{free:t,id:e,total:n},e))})},Li={main:`_main_mc2kq_1`},Ri=({data:e})=>{let{networks:t,timestamp:n}=e,r=_i({items:t,timestamp:n}),i=n-(r?.timestamp||n);return(0,N.jsx)(`div`,{className:Li.main,children:t.map(({id:e,rx:n,tx:a})=>{if(!(n||a))return null;let o=(r?.items||t).find(t=>t.id===e),s=o?.rx||0,c=o?.tx||0;return(0,N.jsx)(bi,{id:e,rateRx:(n-s)/i,rateTx:(a-c)/i,totalRx:n,totalTx:a},e)})})},P={main:`_main_18siw_1`,name:`_name_18siw_6`,loading:`_loading_18siw_10`},F=(0,_.memo)(({data:e})=>{let{value:t,max:n}=e;return(0,N.jsxs)(ki,{percent:n?Math.round(t/n*100):0,children:[(0,N.jsxs)(Ai,{children:[(0,N.jsx)(In,{}),w(`Ram`)]}),(0,N.jsx)(ji,{children:`${Ir(t)} / ${Ir(n)}`})]})}),zi=(0,_.memo)(({data:e})=>{let{value:t,max:n}=e;return(0,N.jsxs)(ki,{percent:n?Math.round(t/n*100):0,children:[(0,N.jsxs)(Ai,{children:[(0,N.jsx)(In,{}),w(`Swap`)]}),(0,N.jsx)(ji,{children:`${Ir(t)} / ${Ir(n)}`})]})}),Bi=2e3,Vi=({id:e})=>{let[t,n]=(0,_.useState)(`loading`),[r,i]=(0,_.useState)(0),[a,o]=(0,_.useState)(null),s=Zt(e=>e.isUpdating);(0,_.useEffect)(()=>{if(s)return;let t=null,r=new AbortController,a=!1,c=async()=>{if(!a)try{let{data:t,status:a}=await b(`nodes&nodeId=${e}`,{signal:r.signal});!t||a!==200?(n(`error`),i(a)):(o(t),n(`idle`),i(-1))}catch(e){console.error(`Error fetching node data:`,e),n(`error`)}finally{a=!1,t=setTimeout(c,Bi)}};return c(),()=>{t&&clearTimeout(t),r.abort()}},[e,s]);let{serverStatus:c=null,diskUsage:l=null,networkStats:u=null}=a||{},{memRealUsage:d=null,swapUsage:f=null,sysLoad:p=[],cpuUsage:m=null}=c||{};return(0,N.jsxs)(`div`,{className:P.main,children:[(0,N.jsx)(`header`,{className:P.name,children:e}),t===`error`&&(0,N.jsx)(pr,{children:Vt(w(`Error: status {{error}}`),{error:r})}),t===`loading`&&(0,N.jsx)(dr,{height:10}),t===`idle`&&(0,N.jsxs)(N.Fragment,{children:[!m||(0,N.jsx)(Ni,{cpuUsage:m,sysLoad:p}),!d||(0,N.jsx)(F,{data:d}),!f||(0,N.jsx)(zi,{data:f}),!l||(0,N.jsx)(Ii,{data:l}),!u||(0,N.jsx)(Ri,{data:u})]})]})},Hi={content:(0,_.memo)(()=>{let e=Mt(C(e=>e.pollData?.nodesIds??[]));return e.length?(0,N.jsx)(sr,{id:Gn,title:w(`Nodes`),children:(0,N.jsx)(`div`,{className:Si.main,children:e.map(e=>(0,N.jsx)(Vi,{id:e},e))})}):null}),id:Gn,nav:()=>Mt(e=>!!e.pollData?.nodesIds.length)?(0,N.jsx)(ti,{id:Gn,title:w(`Nodes`)}):null},Ui={container:`_container_roz84_11`,button:`_button_roz84_24`},Wi=({onCopy:e,keyword:t})=>(0,N.jsx)(`button`,{className:Ui.button,onClick:e,title:w(`Click to copy text`),type:`button`,children:t}),Gi=({keywords:e})=>{let t=tn(C(e=>e.open)),n=(0,_.useCallback)(e=>{Mr(e.currentTarget.textContent),t(w(`Copied`))},[t]);return(0,N.jsx)(`div`,{className:Ui.container,children:e.map(e=>(0,N.jsx)(Wi,{keyword:e,onCopy:n},e))})},Ki=[{key:`curl`,name:`cURL`},{key:`exif`,name:`Exif`},{key:`fileinfo`,name:`Fileinfo`},{key:`gmagick`,name:`Graphics Magick`},{key:`imagick`,name:`Image Magick`},{key:`ionCube`,name:`ionCube`},{key:`ldap`,name:`LDAP`},{key:`mbstring`,name:`Multibyte String`},{key:`memcache`,name:`Memcache`},{key:`memcached`,name:`Memcached`},{key:`mysqli`,name:`MySQLi`},{key:`opcache`,name:`Opcache`},{key:`opcacheEnabled`,name:()=>w(`Opcache enabled`)},{key:`opcacheJitEnabled`,name:()=>w(`Opcache JIT enabled`)},{key:`phalcon`,name:`Phalcon`},{key:`redis`,name:`Redis`},{key:`simplexml`,name:`SimpleXML`},{key:`sockets`,name:`Sockets`},{key:`sourceGuardian`,name:`Source Guardian`},{key:`sqlite3`,name:`SQLite3`},{key:`swoole`,name:`Swoole`},{key:`xdebug`,name:`Xdebug`},{key:`zendOptimizer`,name:`Zend Optimizer`},{key:`zip`,name:`Zip`}].sort((e,t)=>{let n=typeof e.name==`function`?e.key:e.name,r=typeof t.name==`function`?t.key:t.name;return n.localeCompare(r)}),qi={content:(0,_.memo)(()=>{let e=Nt(C(e=>{if(!e.pollData)return null;let t={};for(let{key:n}of Ki)t[n]=!!e.pollData?.[n];return t})),t=Nt(e=>e.pollData?.loadedExtensions?.join(`,`)??``),n=(0,_.useMemo)(()=>e?Ki.map(({key:t,name:n})=>{let r=typeof n==`function`?n():n;return{enabled:e[t]??!1,name:r}}):[],[e]),r=(0,_.useMemo)(()=>t?t.split(`,`).sort((e,t)=>e.localeCompare(t)):[],[t]);return e?(0,N.jsxs)(sr,{id:Kn,title:w(`PHP Extensions`),children:[(0,N.jsx)(oi,{minWidth:14,children:n.map(({name:e,enabled:t})=>(0,N.jsx)(ii,{label:e,maxWidth:10,minWidth:4,children:(0,N.jsx)(ci,{isEnable:t})},e))}),(0,N.jsx)(hi,{children:(0,N.jsx)(ii,{label:w(`Loaded extensions`),maxWidth:6,minWidth:4,children:(0,N.jsx)(Gi,{keywords:r})})})]}):null}),id:Kn,nav:()=>Nt(e=>!!e.pollData)?(0,N.jsx)(ti,{id:Kn,title:w(`PHP Ext`)}):null},Ji=()=>{let{phpVersion:e,latestPhpVersion:t,setLatestPhpVersion:n}=Pt(C(e=>({latestPhpVersion:e.latestPhpVersion,phpVersion:e.pollData?.phpVersion??``,setLatestPhpVersion:e.setLatestPhpVersion})));(0,_.useEffect)(()=>{(async()=>{let{data:e,status:t}=await b(`latestPhpVersion`);e?.version&&t===200&&n(e.version)})()},[n]);let r=sn(e,t)<0;return(0,N.jsxs)(Jr,{href:`https://www.php.net/`,title:w(`Visit PHP.net Official website`),children:[r&&Vt(w(`{{oldVersion}} (Latest: {{latestPhpVersion}})`),{latestPhpVersion:t,oldVersion:e}),r||e]})},Yi={content:(0,_.memo)(()=>{let e=Pt(C(e=>e.pollData?{allowUrlFopen:e.pollData.allowUrlFopen,defaultSocketTimeout:e.pollData.defaultSocketTimeout,disableClasses:e.pollData.disableClasses.join(`,`),disableFunctions:e.pollData.disableFunctions.join(`,`),displayErrors:e.pollData.displayErrors,errorReporting:e.pollData.errorReporting,maxExecutionTime:e.pollData.maxExecutionTime,maxInputVars:e.pollData.maxInputVars,memoryLimit:e.pollData.memoryLimit,postMaxSize:e.pollData.postMaxSize,sapi:e.pollData.sapi,smtp:e.pollData.smtp,uploadMaxFilesize:e.pollData.uploadMaxFilesize}:null));if(!e)return null;let t=[[`PHP info`,(0,N.jsx)(Jr,{href:y(`phpInfoDetail`),target:`_blank`,children:w(`Detail`)},`phpInfoDetail`)],[w(`Version`),(0,N.jsx)(Ji,{},`phpVersion`)]],n=[[w(`SAPI interface`),e.sapi],[w(`Display errors`),(0,N.jsx)(ci,{isEnable:e.displayErrors},`displayErrors`)],[w(`Error reporting`),e.errorReporting],[w(`Max memory limit`),e.memoryLimit],[w(`Max POST size`),e.postMaxSize],[w(`Max upload size`),e.uploadMaxFilesize],[w(`Max input variables`),e.maxInputVars],[w(`Max execution time`),e.maxExecutionTime],[w(`Timeout for socket`),e.defaultSocketTimeout],[w(`Treatment URLs file`),(0,N.jsx)(ci,{isEnable:e.allowUrlFopen},`allowUrlFopen`)],[w(`SMTP support`),(0,N.jsx)(ci,{isEnable:e.smtp},`smtp`)]],r=e.disableFunctions.split(`,`).filter(Boolean).toSorted(),i=e.disableClasses.split(`,`).filter(Boolean).toSorted(),a=[[w(`Disabled functions`),(0,N.jsx)(Gi,{keywords:r},`sortedFunctions`)],[w(`Disabled classes`),(0,N.jsx)(Gi,{keywords:i},`sortedClasses`)]];return(0,N.jsxs)(sr,{id:qn,title:w(`PHP Information`),children:[(0,N.jsxs)(oi,{children:[t.map(([e,t])=>(0,N.jsx)(ii,{label:e,children:t},e)),n.map(([e,t])=>(0,N.jsx)(ii,{label:e,children:t},e))]}),(0,N.jsx)(hi,{children:a.map(([e,t])=>(0,N.jsx)(ii,{label:e,maxWidth:7,minWidth:4,children:t},e))})]})}),id:qn,nav:()=>Pt(e=>!!e.pollData)?(0,N.jsx)(ti,{id:qn,title:w(`PHP Info`)}):null},Xi=e=>{let t=e.reduce((e,t)=>e+t,0)/e.length,n=e.map(e=>{let n=e-t;return n*n}).reduce((e,t)=>e+t,0)/e.length;return Math.sqrt(n)},Zi=T()(M(e=>({addServerToBrowserPingItem:t=>e(e=>{e.serverToBrowserPingItems.push(t)}),addServerToServerPingItem:t=>e(e=>{e.serverToServerPingItems.push(t)}),isPingServerToBrowser:!1,isPingServerToServer:!1,serverToBrowserPingItems:[],serverToServerPingItems:[],setIsPingServerToBrowser:t=>e(e=>{e.isPingServerToBrowser=t}),setIsPingServerToServer:t=>e(e=>{e.isPingServerToServer=t}),setServerToBrowserPingItems:t=>e(e=>{e.serverToBrowserPingItems=t}),setServerToServerPingItems:t=>e(e=>{e.serverToServerPingItems=t})}))),Qi={itemContainer:`_itemContainer_386ei_11`,resultContainer:`_resultContainer_386ei_26`,result:`_result_386ei_26`},$i=()=>{let e=Zi(C(e=>e.serverToBrowserPingItems)),t=e.length,n=t?e[0].time:0,r=t?e[0].time:0,i=0;for(let a=0;ar&&(r=t)}let a=t?(i/t).toFixed(2):`0.00`,o=Xi(e.map(({time:e})=>e)).toFixed(2);return(0,N.jsx)(`div`,{className:Qi.result,children:Vt(w(`{{times}} times, min/avg/max/mdev = {{min}}/{{avg}}/{{max}}/{{mdev}} ms`),{avg:a,max:r,mdev:o,min:n,times:t})})},ea=({refContainer:e})=>{let t=Zi(C(e=>e.serverToBrowserPingItems)),n=!!t.length;return(0,_.useEffect)(()=>{e.current&&(e.current.scrollTop=e.current.scrollHeight)},[t.length,e]),(0,N.jsx)(ii,{label:w(`Results`),children:(0,N.jsxs)(`div`,{className:Qi.resultContainer,children:[!n&&`-`,n&&(0,N.jsx)(`ul`,{className:Qi.itemContainer,ref:e,children:t.map(({id:e,time:t})=>(0,N.jsx)(`li`,{children:`${t} ms`},e))}),n&&(0,N.jsx)($i,{})]})})},ta=()=>{let{isPing:e,isPingServerToBrowser:t,setIsPingServerToBrowser:n,addServerToBrowserPingItem:r}=Zi(C(e=>({addServerToBrowserPingItem:e.addServerToBrowserPingItem,isPing:e.isPingServerToBrowser||e.isPingServerToServer,isPingServerToBrowser:e.isPingServerToBrowser,setIsPingServerToBrowser:e.setIsPingServerToBrowser}))),i=(0,_.useRef)(null),a=(0,_.useRef)(null),o=(0,_.useCallback)(async()=>{let e=Date.now();try{let{data:t,status:n}=await b(`ping`);if(t?.time&&n===200){let{id:n,time:i}=t,a=Date.now(),o=i*1e3,s=Math.max(0,Math.floor(a-e-o));r({id:n,time:s})}}catch(e){console.error(`Ping failed:`,e)}},[r]);(0,_.useEffect)(()=>{if(!t){a.current&&=(clearTimeout(a.current),null);return}let e=async()=>{await o(),t&&(a.current=setTimeout(e,1e3))};return e(),()=>{a.current&&clearTimeout(a.current)}},[t,o]);let s=(0,_.useCallback)(()=>{if(e||t){n(!1);return}n(!0)},[e,t,n]);return(0,N.jsxs)(hi,{children:[(0,N.jsx)(ii,{label:w(`Server ⇄ Browser`),children:(0,N.jsx)(qr,{onClick:s,status:e?Gr.Loading:Gr.Pointer,children:w(e?`Stop ping`:`Start ping`)})}),(0,N.jsx)(ea,{refContainer:i})]})},na={content:(0,_.memo)(()=>(0,N.jsx)(sr,{id:Jn,title:w(`Ping`),children:(0,N.jsx)(ta,{})})),id:Jn,nav:()=>(0,N.jsx)(ti,{id:Jn,title:w(`Ping`)})},ra={main:`_main_fajqi_1`},ia=({totalMarks:e,total:t})=>(0,N.jsx)(`div`,{className:ra.main,children:(0,N.jsx)(Rr,{high:e*.7,low:e*.5,max:e,optimum:e,value:t})}),I={main:`_main_110il_19`,header:`_header_110il_25`,marks:`_marks_110il_31`,sign:`_sign_110il_56`},aa=({cpu:e,read:t,write:n,date:r})=>{let i=e+t+n,a=e.toLocaleString(),o=t.toLocaleString(),s=n.toLocaleString(),c=i.toLocaleString(),l=Vt(`{{cpu}} (CPU) + {{read}} (Read) + {{write}} (Write) = {{total}}`,{cpu:a,read:o,total:c,write:s}),u=(0,N.jsx)(`span`,{className:I.sign,children:`+`});return(0,N.jsxs)(`button`,{className:I.marks,onClick:e=>{e.preventDefault(),e.stopPropagation(),Mr(l)},title:w(`Touch to copy marks`),type:`button`,children:[(0,N.jsx)(Pr,{"data-is-detail":!0,rt:`CPU`,ruby:a}),u,(0,N.jsx)(Pr,{"data-is-detail":!0,rt:w(`Read`),ruby:o}),u,(0,N.jsx)(Pr,{"data-is-detail":!0,rt:w(`Write`),ruby:s}),(0,N.jsx)(`span`,{className:I.sign,children:`=`}),(0,N.jsx)(Pr,{"data-is-total":!0,isResult:!0,rt:r||``,ruby:c})]})},oa=({header:e,marks:t,maxMarks:n,date:r})=>{let{cpu:i,read:a,write:o}=t;return(0,N.jsxs)(`div`,{className:I.main,children:[(0,N.jsx)(`div`,{className:I.header,children:e}),(0,N.jsx)(aa,{cpu:i,date:r,read:a,write:o}),(0,N.jsx)(ia,{total:i+a+o,totalMarks:n})]})},sa=T()(M(e=>({benchmarking:!1,maxMarks:0,servers:[],setBenchmarking:t=>e(e=>{e.benchmarking=t}),setMaxMarks:t=>e(e=>{e.maxMarks=t}),setServer:(t,n)=>e(e=>{let r=e.servers.findIndex(e=>e.id===t);r!==-1&&(e.servers[r]=n)}),setServers:t=>e(e=>{e.servers=t})}))),ca=()=>{let[e,t]=(0,_.useState)(!1),n=tn(e=>e.open),{setMaxMarks:r,maxMarks:i}=sa(C(e=>({maxMarks:e.maxMarks,setMaxMarks:e.setMaxMarks}))),[a,o]=(0,_.useState)({cpu:0,read:0,write:0});return(0,N.jsx)(oa,{date:(0,_.useMemo)(()=>{let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`},[]),header:(0,N.jsx)(qr,{disabled:e,onClick:async a=>{if(a.preventDefault(),a.stopPropagation(),!e){t(!0);try{let{data:e,status:t}=await b(`benchmarkPerformance`);if(t===200&&e?.marks){o(e.marks);let t=Object.values(e.marks).reduce((e,t)=>e+t,0);t>i&&r(t);return}if(t===429&&e?.seconds){n(Vt(w(`Please wait {{seconds}}s`),{seconds:e.seconds}));return}n(w(`Network error, please try again later.`))}catch(e){n(w(`Network error, please try again later.`)),console.error(e)}finally{t(!1)}}},status:e?Gr.Loading:Gr.Pointer,children:w(`Benchmark my server`)}),marks:a,maxMarks:i})},la={main:`_main_11z09_1`,title:`_title_11z09_8`,link:`_link_11z09_9`},L=()=>{let[e,t]=(0,_.useState)(`loading`),{servers:n,setServers:r,setMaxMarks:i,maxMarks:a}=sa(C(e=>({maxMarks:e.maxMarks,servers:e.servers,setMaxMarks:e.setMaxMarks,setServers:e.setServers})));(0,_.useEffect)(()=>{(async()=>{t(`loading`);let{data:e,status:n}=await b(`benchmarkServers`);if(!e?.length||n!==200){t(`error`);return}let a=e.map(e=>({...e,total:e.detail?Object.values(e.detail).reduce((e,t)=>e+t,0):0}));a.sort((e,t)=>t.total-e.total);let o=a[0]?.total??0;r(a),i(o),t(`idle`)})()},[r,i]);let o=(0,_.useMemo)(()=>n.filter(e=>e.detail).map(({name:e,url:t,date:n,probeUrl:r,binUrl:i,detail:o})=>{let{cpu:s=0,read:c=0,write:l=0}=o,u=r?(0,N.jsx)(`a`,{className:la.link,href:r,rel:`noreferrer`,target:`_blank`,title:w(`Visit probe page`),children:(0,N.jsx)(Pn,{})}):null,d=i?(0,N.jsx)(`a`,{className:la.link,href:i,rel:`noreferrer`,target:`_blank`,title:w(`Download speed test`),children:(0,N.jsx)(An,{})}):null;return(0,N.jsx)(oa,{date:n,header:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`a`,{className:la.title,href:t,rel:`noreferrer`,target:`_blank`,title:w(`Visit the official website`),children:e}),u,d]}),marks:{cpu:s,read:c,write:l},maxMarks:a},e)}),[n,a]);return(0,N.jsxs)(`div`,{className:la.main,children:[(0,N.jsx)(ca,{}),e===`loading`&&Array.from({length:5}).map((e,t)=>(0,N.jsx)(dr,{},`server-benchmark-placeholder-${String(t)}`)),e===`idle`&&o,e===`error`&&(0,N.jsx)(pr,{children:w(`Can not fetch marks data from GitHub.`)})]})},ua={content:(0,_.memo)(()=>(0,N.jsxs)(sr,{id:Yn,title:w(`Server Benchmark`),children:[(0,N.jsx)(lr,{items:[{id:`serverBenchmarkTos`,text:w(`Different versions cannot be compared, and different time servers have different loads, just for reference.`)}]}),(0,N.jsx)(L,{})]})),id:Yn,nav:()=>(0,N.jsx)(ti,{id:Yn,title:w(`Server bench`)})},da={days:0,hours:0,mins:0,secs:0},fa=({serverUptime:e,serverTime:t})=>{let{days:n,hours:r,mins:i,secs:a}=e,o=Vt(w(`{{days}}d {{hours}}h {{mins}}min {{secs}}s`),{days:n,hours:r,mins:i,secs:a});return(0,N.jsx)(N.Fragment,{children:[[w(`Time`),t],[w(`Uptime`),o]].map(([e,t])=>(0,N.jsx)(ii,{label:e,maxWidth:6,children:t},e))})},pa=(0,_.memo)(({cpuModel:e,serverOs:t,scriptPath:n,publicIpv4:r})=>(0,N.jsx)(hi,{children:[[w(`Location (IPv4)`),(0,N.jsx)(fi,{ip:r},`serverLocalIpv4`)],[w(`CPU model`),e??w(`Unavailable`)],[w(`OS`),t??w(`Unavailable`)],[w(`Script path`),n??w(`Unavailable`)]].map(([e,t])=>(0,N.jsx)(ii,{label:e,maxWidth:7,children:t},e))})),ma=(0,_.memo)(({serverName:e,serverSoftware:t,publicIpv4:n,publicIpv6:r,localIpv4:i,localIpv6:a})=>(0,N.jsx)(N.Fragment,{children:[[w(`Name`),e??w(`Unavailable`)],[w(`Web server`),t??w(`Unavailable`)],[w(`Public IPv4`),n||`-`],[w(`Public IPv6`),r||`-`],[w(`Local IPv4`),i||`-`],[w(`Local IPv6`),a||`-`]].map(([e,t])=>(0,N.jsx)(ii,{label:e,maxWidth:6,children:t},e))})),ha=()=>{let{serverTime:e,serverUptime:t}=Ft(C(e=>({serverTime:e.pollData?.serverTime??`-`,serverUptime:e.pollData?.serverUptime??da})));return(0,N.jsx)(fa,{serverTime:e,serverUptime:t})},ga={content:()=>{let e=Ft(e=>e.setPublicIpv4),t=Ft(e=>e.setPublicIpv6),{hasPollData:n,publicIpv4:r,publicIpv6:i,localIpv4:a,localIpv6:o,serverName:s,serverSoftware:c,cpuModel:l,scriptPath:u,serverOs:d}=Ft(C(e=>({cpuModel:e.pollData?.cpuModel??`-`,hasPollData:!!e.pollData,localIpv4:e.pollData?.localIpv4??`-`,localIpv6:e.pollData?.localIpv6??`-`,publicIpv4:e.publicIpv4,publicIpv6:e.publicIpv6,scriptPath:e.pollData?.scriptPath??`-`,serverName:e.pollData?.serverName??`-`,serverOs:e.pollData?.serverOs??`-`,serverSoftware:e.pollData?.serverSoftware??`-`})));return(0,_.useEffect)(()=>{(async()=>{let{data:t,status:n}=await b(`serverPublicIpv4`);t?.ip&&n===200&&e(t.ip)})()},[e]),(0,_.useEffect)(()=>{(async()=>{let{data:e,status:n}=await b(`serverPublicIpv6`);e?.ip&&n===200&&t(e.ip)})()},[t]),n?(0,N.jsxs)(sr,{id:Xn,title:w(`Server Info`),children:[(0,N.jsxs)(oi,{minWidth:20,children:[(0,N.jsx)(ha,{}),(0,N.jsx)(ma,{localIpv4:a,localIpv6:o,publicIpv4:r,publicIpv6:i,serverName:s,serverSoftware:c})]}),(0,N.jsx)(pa,{cpuModel:l,publicIpv4:r,scriptPath:u,serverOs:d})]}):null},id:Xn,nav:()=>Ft(e=>!!e.pollData)?(0,N.jsx)(ti,{id:Xn,title:w(`Info`)}):null},_a={main:`_main_128cz_1`,modules:`_modules_128cz_6`},va=()=>{let{max:e,value:t}=Lt(C(e=>({max:e.pollData?.memBuffers.max??0,value:e.pollData?.memBuffers.value??0})));return(0,N.jsx)(zr,{isCapacity:!0,max:e,name:w(`Memory buffers`),title:w(`Buffers are in-memory block I/O buffers. They are relatively short-lived. Prior to Linux kernel version 2.4, Linux had separate page and buffer caches. Since 2.4, the page and buffer cache are unified and Buffers is raw disk blocks not represented in the page cache—i.e., not file data.`),value:t})},ya=()=>{let{max:e,value:t}=Lt(C(e=>({max:e.pollData.memCached.max,value:e.pollData.memCached.value})));return(0,N.jsx)(zr,{isCapacity:!0,max:e,name:w(`Memory cached`),title:w(`Cached memory is memory that Linux uses for disk caching. However, this does not count as "used" memory, since it will be freed when applications require it. Hence you do not have to worry if a large amount is being used.`),value:t})},ba=()=>{let{max:e,value:t}=Lt(C(e=>({max:e.pollData.memRealUsage.max,value:e.pollData.memRealUsage.value})));return(0,N.jsx)(zr,{isCapacity:!0,max:e,name:w(`Memory real usage`),title:w(`Linux comes with many commands to check memory usage. The "free" command usually displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel. The "top" command provides a dynamic real-time view of a running system.`),value:t})},xa=()=>{let{max:e,value:t}=Lt(C(e=>({max:e.pollData.swapCached.max,value:e.pollData.swapCached.value})));return e?(0,N.jsx)(zr,{isCapacity:!0,max:e,name:w(`Swap cached`),value:t}):null},Sa=()=>{let{max:e,value:t}=Lt(C(e=>({max:e.pollData.swapUsage.max,value:e.pollData.swapUsage.value})));return e?(0,N.jsx)(zr,{isCapacity:!0,max:e,name:w(`Swap usage`),value:t}):null},Ca=[Hi,{content:()=>{let e=Rt(C(e=>e.pollData?.items??[]));return e.length?(0,N.jsx)(sr,{id:Qn,title:w(`Temperature sensor`),children:(0,N.jsx)(hi,{children:e.map(({id:e,name:t,celsius:n})=>(0,N.jsx)(ii,{title:Vt(w(`{{sensor}} temperature`),{sensor:t}),children:(0,N.jsx)(zr,{isCapacity:!1,max:150,percentTag:`℃`,value:n})},e))})}):null},id:Qn,nav:()=>Rt(e=>!!e.pollData?.items.length)?(0,N.jsx)(ti,{id:Qn,title:w(`Temperature`)}):null},{content:()=>(0,N.jsx)(sr,{id:Zn,title:w(`Server Status`),children:(0,N.jsx)(`div`,{className:_a.main,children:(0,N.jsxs)(`div`,{className:_a.modules,children:[(0,N.jsx)(Ei,{}),(0,N.jsx)(ba,{}),(0,N.jsx)(ya,{}),(0,N.jsx)(va,{}),(0,N.jsx)(Sa,{}),(0,N.jsx)(xa,{})]})})}),id:Zn,nav:()=>Lt(e=>!!e.pollData)?(0,N.jsx)(ti,{id:Zn,title:w(`Info`)}):null},xi,di,na,ga,Yi,qi,li,ua,ni,gi],wa=()=>{let e=rr(C(e=>e.priorities)),t=Bt(C(e=>e.pollData?Object.keys(e.pollData).filter(t=>e.pollData?.[t]!==null):[]));return(0,_.useMemo)(()=>{if(t.length===0)return[];let n=new Map(Ca.map(e=>[e.id,e])),r=new Set(t);return e.map(e=>n.get(e)).filter(e=>!!e&&r.has(e.id))},[e,t])},Ta=()=>{let e=wa();return e.length?(0,N.jsx)(`div`,{className:gn.container,children:e.map(({id:e,content:t})=>(0,N.jsx)(t,{},e))}):null},Ea=(0,_.memo)(()=>{let e=wa().map(({id:e,nav:t})=>(0,N.jsx)(t,{},e));return(0,N.jsx)(`div`,{className:ei.wrap,children:(0,N.jsx)(`div`,{className:ei.main,children:e})})}),Da={main:`_main_nuyl9_6`,spin:`_spin_nuyl9_1`},Oa=()=>(0,N.jsx)(`div`,{className:Da.main,children:`Thinking...`}),ka=2e3,Aa=()=>{let[e,t]=(0,_.useState)(`loading`),n=tn(e=>e.open),r=Zt(e=>e.isUpdating);return(0,_.useEffect)(()=>{if(r)return;let e=null,i=new AbortController,a=!1,o=async()=>{if(!a)try{a=!0;let{data:e,status:r}=await b(`poll`,{signal:i.signal});r===200&&e?(Bt.getState().setPollData(e),t(`idle`)):(n(w(`Failed to fetch data. Please try again later.`)),t(`error`))}catch(e){if(e instanceof Error&&e.name===`AbortError`)return;console.error(`Error fetching poll data:`,e),n(w(`Network error. Please check your connection.`)),t(`error`)}finally{a=!1,e=setTimeout(o,ka)}};return o(),()=>{e&&clearTimeout(e),i.abort()}},[r,n]),e===`loading`?(0,N.jsx)(Oa,{}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(un,{}),(0,N.jsx)(Ta,{}),(0,N.jsx)(Wt,{}),(0,N.jsx)(Ea,{}),(0,N.jsx)(hn,{})]})};document.addEventListener(`DOMContentLoaded`,()=>{document.body.innerHTML=``,(0,g.createRoot)(document.body).render((0,N.jsx)(Aa,{}))})}); CODE; exit; } } namespace InnStudio\Prober\Components\Database; class DatabaseConstants { const ID = 'database'; } namespace InnStudio\Prober\Components\Database; use InnStudio\Prober\Components\UserConfig\UserConfigApi; use PDO; use SQLite3; final class DatabasePoll { public function render() { $id = DatabaseConstants::ID; if (UserConfigApi::isDisabled($id)) { return [ $id => null, ]; } $sqlite3Version = class_exists('SQLite3') ? SQLite3::version() : false; return [ $id => [ 'sqlite3' => $sqlite3Version ? $sqlite3Version['versionString'] : false, 'mysqliClientVersion' => \function_exists('mysqli_get_client_version') ? mysqli_get_client_version() : false, 'mongo' => class_exists('Mongo'), 'mongoDb' => class_exists('MongoDB'), 'postgreSql' => \function_exists('pg_connect'), 'paradox' => \function_exists('px_new'), 'msSql' => \function_exists('sqlsrv_server_info'), 'pdo' => class_exists('PDO') ? implode(',', PDO::getAvailableDrivers()) : false, ], ]; } } namespace InnStudio\Prober\Components\Utils; final class UtilsDisk { public static function getItems() { switch (\PHP_OS) { case 'Linux': return self::getLinuxItems(); default: return; } } private static function getLinuxItems() { if ( !\function_exists('shell_exec')) { return [ [ 'id' => __DIR__, 'free' => disk_free_space(__DIR__), 'total' => disk_total_space(__DIR__), ], ]; } $items = []; $dfLines = explode("\n", shell_exec('df -k')); if (\count($dfLines) <= 1) { return $items; } $dfLines = \array_slice($dfLines, 1); $fsExclude = ['tmpfs', 'run', 'dev']; foreach ($dfLines as $dfLine) { $dfObj = explode(' ', preg_replace('/\\s+/', ' ', $dfLine)); if (\count($dfObj) < 6) { continue; } $dfFs = $dfObj[0]; $dfTotal = (int) $dfObj[1]; $dfAvailable = (int) $dfObj[3]; $dfMountedOn = $dfObj[5]; if (\in_array($dfFs, $fsExclude, true)) { continue; } $free = $dfAvailable * 1024; $total = $dfTotal * 1024; $items[] = [ 'id' => "{$dfFs}:{$dfMountedOn}", 'free' => $free, 'total' => $total, ]; } if ( !$items) { return []; } // sort by total desc usort($items, function ($a, $b) { return $b['total'] - $a['total']; }); return $items; } } namespace InnStudio\Prober\Components\Utils; final class UtilsApi { public static function arrayFind(array $array, $callback) { foreach ($array as $value) { if (\call_user_func($callback, $value)) { return $value; } } } public static function jsonDecode($json, $depth = 512, $options = 0) { // search and remove comments like /* */ and // $json = preg_replace("#(/\\*([^*]|[\r\n]|(\\*+([^*/]|[\r\n])))*\\*+/)|([\\s\t]//.*)|(^//.*)#", '', $json); if (\PHP_VERSION_ID >= 50400) { return json_decode($json, true, $depth, $options); } if (\PHP_VERSION_ID >= 50300) { return json_decode($json, true, $depth); } return json_decode($json, true); } public static function setFileCacheHeader() { // 1 year expired $seconds = 3600 * 24 * 30 * 12; $ts = gmdate('D, d M Y H:i:s', (int) $_SERVER['REQUEST_TIME'] + $seconds) . ' GMT'; header("Expires: {$ts}"); header('Pragma: cache'); header("Cache-Control: public, max-age={$seconds}"); } public static function getErrNameByCode($code) { if (0 === (int) $code) { return ''; } $levels = [ \E_ALL => 'E_ALL', \E_USER_DEPRECATED => 'E_USER_DEPRECATED', \E_DEPRECATED => 'E_DEPRECATED', \E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', \E_USER_NOTICE => 'E_USER_NOTICE', \E_USER_WARNING => 'E_USER_WARNING', \E_USER_ERROR => 'E_USER_ERROR', \E_COMPILE_WARNING => 'E_COMPILE_WARNING', \E_COMPILE_ERROR => 'E_COMPILE_ERROR', \E_CORE_WARNING => 'E_CORE_WARNING', \E_CORE_ERROR => 'E_CORE_ERROR', \E_NOTICE => 'E_NOTICE', \E_PARSE => 'E_PARSE', \E_WARNING => 'E_WARNING', \E_ERROR => 'E_ERROR', ]; $result = ''; foreach ($levels as $number => $name) { if (($code & $number) === $number) { $result .= ('' !== $result ? ', ' : '') . $name; } } return $result; } public static function isWin() { return \PHP_OS === 'WINNT'; } } namespace InnStudio\Prober\Components\Utils; use COM; final class UtilsCpu { private static $HW_IMPLEMENTER = [ '0x41' => [[ '0x810' => 'ARM810', '0x920' => 'ARM920', '0x922' => 'ARM922', '0x926' => 'ARM926', '0x940' => 'ARM940', '0x946' => 'ARM946', '0x966' => 'ARM966', '0xa20' => 'ARM1020', '0xa22' => 'ARM1022', '0xa26' => 'ARM1026', '0xb02' => 'ARM11 MPCore', '0xb36' => 'ARM1136', '0xb56' => 'ARM1156', '0xb76' => 'ARM1176', '0xc05' => 'Cortex-A5', '0xc07' => 'Cortex-A7', '0xc08' => 'Cortex-A8', '0xc09' => 'Cortex-A9', '0xc0d' => 'Cortex-A17/A12', '0xc0f' => 'Cortex-A15', '0xc0e' => 'Cortex-A17', '0xc14' => 'Cortex-R4', '0xc15' => 'Cortex-R5', '0xc17' => 'Cortex-R7', '0xc18' => 'Cortex-R8', '0xc20' => 'Cortex-M0', '0xc21' => 'Cortex-M1', '0xc23' => 'Cortex-M3', '0xc24' => 'Cortex-M4', '0xc27' => 'Cortex-M7', '0xc60' => 'Cortex-M0+', '0xd01' => 'Cortex-A32', '0xd02' => 'Cortex-A34', '0xd03' => 'Cortex-A53', '0xd04' => 'Cortex-A35', '0xd05' => 'Cortex-A55', '0xd06' => 'Cortex-A65', '0xd07' => 'Cortex-A57', '0xd08' => 'Cortex-A72', '0xd09' => 'Cortex-A73', '0xd0a' => 'Cortex-A75', '0xd0b' => 'Cortex-A76', '0xd0c' => 'Neoverse-N1', '0xd0d' => 'Cortex-A77', '0xd0e' => 'Cortex-A76AE', '0xd13' => 'Cortex-R52', '0xd15' => 'Cortex-R82', '0xd16' => 'Cortex-R52+', '0xd20' => 'Cortex-M23', '0xd21' => 'Cortex-M33', '0xd22' => 'Cortex-M55', '0xd23' => 'Cortex-M85', '0xd40' => 'Neoverse-V1', '0xd41' => 'Cortex-A78', '0xd42' => 'Cortex-A78AE', '0xd43' => 'Cortex-A65AE', '0xd44' => 'Cortex-X1', '0xd46' => 'Cortex-A510', '0xd47' => 'Cortex-A710', '0xd48' => 'Cortex-X2', '0xd49' => 'Neoverse-N2', '0xd4a' => 'Neoverse-E1', '0xd4b' => 'Cortex-A78C', '0xd4c' => 'Cortex-X1C', '0xd4d' => 'Cortex-A715', '0xd4e' => 'Cortex-X3', '0xd4f' => 'Neoverse-V2', '0xd80' => 'Cortex-A520', '0xd81' => 'Cortex-A720', '0xd82' => 'Cortex-X4', ], 'ARM'], '0x42' => [[ '0x0f' => 'Brahma-B15', '0x100' => 'Brahma-B53', '0x516' => 'ThunderX2', ], 'Broadcom'], '0x43' => [[ '0x0a0' => 'ThunderX', '0x0a1' => 'ThunderX-88XX', '0x0a2' => 'ThunderX-81XX', '0x0a3' => 'ThunderX-83XX', '0x0af' => 'ThunderX2-99xx', '0x0b0' => 'OcteonTX2', '0x0b1' => 'OcteonTX2-98XX', '0x0b2' => 'OcteonTX2-96XX', '0x0b3' => 'OcteonTX2-95XX', '0x0b4' => 'OcteonTX2-95XXN', '0x0b5' => 'OcteonTX2-95XXMM', '0x0b6' => 'OcteonTX2-95XXO', '0x0b8' => 'ThunderX3-T110', ], 'Cavium'], '0x44' => [[ '0xa10' => 'SA110', '0xa11' => 'SA1100', ], 'DEC'], '0x46' => [[ '0x001' => 'A64FX', ], 'FUJITSU'], '0x48' => [[ '0xd01' => 'TaiShan-v110', // used in Kunpeng-920 SoC '0xd02' => 'TaiShan-v120', // used in Kirin 990A and 9000S SoCs '0xd40' => 'Cortex-A76', // HiSilicon uses this ID though advertises A76 '0xd41' => 'Cortex-A77', // HiSilicon uses this ID though advertises A77 ], 'HiSilicon'], '0x49' => [null, 'Infineon'], '0x4d' => [null, 'Motorola/Freescale'], '0x4e' => [[ '0x000' => 'Denver', '0x003' => 'Denver 2', '0x004' => 'Carmel', ], 'NVIDIA'], '0x50' => [[ '0x000' => 'X-Gene', ], 'APM'], '0x51' => [[ '0x00f' => 'Scorpion', '0x02d' => 'Scorpion', '0x04d' => 'Krait', '0x06f' => 'Krait', '0x201' => 'Kryo', '0x205' => 'Kryo', '0x211' => 'Kryo', '0x800' => 'Falkor-V1/Kryo', '0x801' => 'Kryo-V2', '0x802' => 'Kryo-3XX-Gold', '0x803' => 'Kryo-3XX-Silver', '0x804' => 'Kryo-4XX-Gold', '0x805' => 'Kryo-4XX-Silver', '0xc00' => 'Falkor', '0xc01' => 'Saphira', ], 'Qualcomm'], '0x53' => [[ '0x001' => 'exynos-m1', '0x002' => 'exynos-m3', '0x003' => 'exynos-m4', '0x004' => 'exynos-m5', ], 'Samsung'], '0x56' => [[ '0x131' => 'Feroceon-88FR131', '0x581' => 'PJ4/PJ4b', '0x584' => 'PJ4B-MP', ], 'Marvell'], '0x61' => [[ '0x000' => 'Swift', '0x001' => 'Cyclone', '0x002' => 'Typhoon', '0x003' => 'Typhoon/Capri', '0x004' => 'Twister', '0x005' => 'Twister/Elba/Malta', '0x006' => 'Hurricane', '0x007' => 'Hurricane/Myst', '0x008' => 'Monsoon', '0x009' => 'Mistral', '0x00b' => 'Vortex', '0x00c' => 'Tempest', '0x00f' => 'Tempest-M9', '0x010' => 'Vortex/Aruba', '0x011' => 'Tempest/Aruba', '0x012' => 'Lightning', '0x013' => 'Thunder', '0x020' => 'Icestorm-A14', '0x021' => 'Firestorm-A14', '0x022' => 'Icestorm-M1', '0x023' => 'Firestorm-M1', '0x024' => 'Icestorm-M1-Pro', '0x025' => 'Firestorm-M1-Pro', '0x026' => 'Thunder-M10', '0x028' => 'Icestorm-M1-Max', '0x029' => 'Firestorm-M1-Max', '0x030' => 'Blizzard-A15', '0x031' => 'Avalanche-A15', '0x032' => 'Blizzard-M2', '0x033' => 'Avalanche-M2', '0x034' => 'Blizzard-M2-Pro', '0x035' => 'Avalanche-M2-Pro', '0x036' => 'Sawtooth-A16', '0x037' => 'Everest-A16', '0x038' => 'Blizzard-M2-Max', '0x039' => 'Avalanche-M2-Max', ], 'Apple'], '0x66' => [[ '0x526' => 'FA526', '0x626' => 'FA626', ], 'Faraday'], '0x69' => [[ '0x200' => 'i80200', '0x210' => 'PXA250A', '0x212' => 'PXA210A', '0x242' => 'i80321-400', '0x243' => 'i80321-600', '0x290' => 'PXA250B/PXA26x', '0x292' => 'PXA210B', '0x2c2' => 'i80321-400-B0', '0x2c3' => 'i80321-600-B0', '0x2d0' => 'PXA250C/PXA255/PXA26x', '0x2d2' => 'PXA210C', '0x411' => 'PXA27x', '0x41c' => 'IPX425-533', '0x41d' => 'IPX425-400', '0x41f' => 'IPX425-266', '0x682' => 'PXA32x', '0x683' => 'PXA930/PXA935', '0x688' => 'PXA30x', '0x689' => 'PXA31x', '0xb11' => 'SA1110', '0xc12' => 'IPX1200', ], 'Intel'], '0x6d' => [[ '0xd49' => 'Azure-Cobalt-100', ], 'Microsoft'], '0x70' => [[ '0x303' => 'FTC310', '0x660' => 'FTC660', '0x661' => 'FTC661', '0x662' => 'FTC662', '0x663' => 'FTC663', '0x664' => 'FTC664', '0x862' => 'FTC862', ], 'Phytium'], '0xc0' => [[ '0xac3' => 'Ampere-1', '0xac4' => 'Ampere-1a', ], 'Ampere'], ]; public static function getLoadAvg() { if (UtilsApi::isWin()) { return [0, 0, 0]; } return array_map(function ($load) { return (float) \sprintf('%.2f', $load); }, sys_getloadavg()); } public static function isArm($content) { return false !== stripos($content, 'CPU architecture'); } public static function match($content, $search) { preg_match_all("/{$search}\\s*:\\s*(.+)/i", $content, $matches); return 2 === \count($matches) ? $matches[1] : []; } public static function getArmCpu($content) { $searchImplementer = self::match($content, 'CPU implementer'); $implementer = \count($searchImplementer) ? $searchImplementer[0] : ''; $implementer = isset(self::$HW_IMPLEMENTER[$implementer]) ? self::$HW_IMPLEMENTER[$implementer] : ''; if ( !$implementer) { return []; } $searchPart = self::match($content, 'CPU part'); $part = \count($searchPart) ? $searchPart[0] : ''; if ( !$part) { return [$implementer]; } $parts = $implementer[0]; $partName = isset($parts[$part]) ? " {$parts[$part]}" : ''; // features $searchFeatures = self::match($content, 'Features'); $features = \count($searchFeatures) ? " ({$searchFeatures[0]})" : ''; return ["{$implementer[1]}{$partName}{$features}"]; } public static function getCores() { $filePath = '/proc/cpuinfo'; error_reporting(0); if ( !is_readable($filePath)) { error_reporting(\E_ALL); return 0; } $content = file_get_contents($filePath); if ( !$content) { return 0; } if (self::isArm($content)) { $cores = substr_count($content, 'processor'); if ( !$cores) { return 0; } } return \count(self::match($content, 'cpu cores')) ?: substr_count($content, 'vendor_id'); } public static function getModel() { $filePath = '/proc/cpuinfo'; error_reporting(0); if ( !is_readable($filePath)) { error_reporting(\E_ALL); return ''; } $content = file_get_contents($filePath); if ( !$content) { return ''; } if (self::isArm($content)) { $cores = substr_count($content, 'processor'); if ( !$cores) { return ''; } return "{$cores} x " . implode(' / ', array_filter(self::getArmCpu($content))); } // cpu cores $cores = self::getCores(); if ( !$cores) { return ''; } // cpu model name $searchModelName = self::match($content, 'model name'); // cpu MHz $searchMHz = self::match($content, 'cpu MHz'); // cache size $searchCache = self::match($content, 'cache size'); return implode(' / ', array_filter([ \count($searchModelName) ? $searchModelName[0] : '', \count($searchMHz) ? "{$searchMHz[0]}MHz" : '', \count($searchCache) ? "{$searchCache[0]} cache" : '', "{$cores} core(s)", ])); } public static function getWinUsage() { static $prev = null; $usage = []; // com if (class_exists('COM')) { // need help $wmi = new COM('Winmgmts://'); $server = $wmi->execquery('SELECT LoadPercentage FROM Win32_Processor'); $total = 0; foreach ($server as $cpu) { $total += (int) $cpu->loadpercentage; } $total = (float) $total / \count($server); $usage['idle'] = 100 - $total; $usage['user'] = $total; // exec } else { if ( !\function_exists('exec')) { return; } $p = []; exec('wmic cpu get LoadPercentage', $p); if (isset($p[1])) { $percent = (int) $p[1]; $usage['idle'] = 100 - $percent; $usage['user'] = $percent; } } return $usage; } public static function getLinuxUsage() { static $prev = null; $statFile = '/proc/stat'; error_reporting(0); if ( !is_readable($statFile)) { error_reporting(\E_ALL); return [ 'usage' => 0, 'user' => 0, 'sys' => 0, 'idle' => 100, ]; } $stats1 = self::parseLinuxCpuStats($statFile); if (null === $stats1) { return [ 'usage' => 0, 'user' => 0, 'sys' => 0, 'idle' => 100, ]; } if (null === $prev) { $prev = $stats1; sleep(1); $stats1 = self::parseLinuxCpuStats($statFile); } $stats2 = self::parseLinuxCpuStats($statFile); $idle = $stats2['idle'] - $prev['idle']; $sys = $stats2['sys'] - $prev['sys']; $user = $stats2['user'] - $prev['user']; return [ 'usage' => round(100 * ($user + $sys) / ($user + $sys + $idle)), 'idle' => $idle, 'user' => $user, 'sys' => $sys, ]; } public static function getUsage() { return self::getLinuxUsage(); // static $cpu = null; // if (null !== $cpu) { // return $cpu; // } // if (UtilsApi::isWin()) { // $cpu = self::getWinUsage(); // return $cpu; // } } private static function parseLinuxCpuStats($statFile) { $lines = file($statFile, \FILE_IGNORE_NEW_LINES | \FILE_SKIP_EMPTY_LINES); if ( !$lines) { return; } $line = $lines[0]; if (0 !== strpos($line, 'cpu ')) { return; } $items = explode(' ', preg_replace('/\\s+/', ' ', $line)); array_shift($items); $items = array_map('intval', $items); $total = array_sum($items); return [ 'usage' => round(100 * ($total - $items[3]) / $total), 'user' => (int) $items[0], 'sys' => (int) $items[2], 'idle' => (int) $items[3], ]; } } namespace InnStudio\Prober\Components\Utils; final class UtilsClientIp { public static function getV4() { $keys = ['HTTP_X_FORWARDED_FOR', 'HTTP_CLIENT_IP', 'REMOTE_ADDR']; foreach ($keys as $key) { if ( !isset($_SERVER[$key])) { continue; } $ip = array_filter(explode(',', $_SERVER[$key])); $ip = filter_var(end($ip), \FILTER_VALIDATE_IP, [ 'flags' => \FILTER_FLAG_IPV4, ]); if ($ip) { return $ip; } } return ''; } public static function getV6() { $keys = ['HTTP_X_FORWARDED_FOR', 'HTTP_CLIENT_IP', 'REMOTE_ADDR']; foreach ($keys as $key) { if ( !isset($_SERVER[$key])) { continue; } $ip = array_filter(explode(',', $_SERVER[$key])); $ip = filter_var(end($ip), \FILTER_VALIDATE_IP, [ 'flags' => \FILTER_FLAG_IPV6, ]); if ($ip) { return $ip; } } return ''; } } namespace InnStudio\Prober\Components\Utils; final class UtilsTime { public static function getTime() { return date('Y-m-d H:i:s'); } public static function getUtcTime() { return gmdate('Y/m/d H:i:s'); } public static function getUptime() { $filePath = '/proc/uptime'; error_reporting(0); if ( !is_file($filePath)) { error_reporting(\E_ALL); return [ 'days' => 0, 'hours' => 0, 'mins' => 0, 'secs' => 0, ]; } $str = file_get_contents($filePath); $num = (float) $str; $secs = (int) fmod($num, 60); $num = (int) ($num / 60); $mins = (int) $num % 60; $num = (int) ($num / 60); $hours = (int) $num % 24; $num = (int) ($num / 24); $days = (int) $num; return [ 'days' => $days, 'hours' => $hours, 'mins' => $mins, 'secs' => $secs, ]; } } namespace InnStudio\Prober\Components\Utils; final class UtilsNetwork { public static function getAuthorization() { return isset($_SERVER['HTTP_AUTHORIZATION']) ? $_SERVER['HTTP_AUTHORIZATION'] : ''; } public static function getStats() { $filePath = '/proc/net/dev'; error_reporting(0); if ( !is_readable($filePath)) { error_reporting(\E_ALL); return; } static $eths = null; if (null !== $eths) { return $eths; } $lines = file($filePath); unset($lines[0], $lines[1]); $eths = []; foreach ($lines as $line) { $line = preg_replace('/\\s+/', ' ', trim($line)); $lineArr = explode(':', $line); $numberArr = explode(' ', trim($lineArr[1])); $rx = (float) $numberArr[0]; $tx = (float) $numberArr[8]; if ( !$rx && !$tx) { continue; } $eths[] = [ 'id' => $lineArr[0], 'rx' => $rx, 'tx' => $tx, ]; } return $eths; } } namespace InnStudio\Prober\Components\Utils; final class UtilsLocation { /** * Get IP location. * * @param string $ip * * @return array|null $args * $args['country'] string Country, e.g, China * $args['region'] string Region, e.g, Heilongjiang * $args['city'] string City, e.g, Mohe * $args['flag'] string Emoji string, e,g, 🇨🇳 */ public static function getLocation($ip) { $url = "https://api.inn-studio.com/ip-location/?ip={$ip}"; $content = ''; if (\function_exists('curl_init')) { $ch = curl_init(); curl_setopt_array($ch, [ \CURLOPT_URL => $url, \CURLOPT_RETURNTRANSFER => true, ]); $content = (string) curl_exec($ch); curl_close($ch); } else { $content = file_get_contents($url); } $item = json_decode($content, true) ?: null; if ( !$item) { return; } // get langcode from en-US,en;q=0.9,zh-CN;q=0.8,zh-TW;q=0.7,zh;q=0.6 $langcode = ''; if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { if (false!==strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], ',')) { $langcode = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], ',')); } } switch ($langcode) { case 'en-US': $langcode = 'en'; break; case 'zh-TW': case 'zh-HK': case 'zh': $langcode = 'zh-CN'; break; } if ( !\in_array($langcode, ['en', 'de', 'es', 'ru', 'pt-BR', 'fr', 'zh-CN'], true)) { $langcode = 'en'; } return [ 'continent' => isset($item['continent']['names'][$langcode]) ? $item['continent']['names'][$langcode] : '', 'country' => isset($item['country']['names'][$langcode]) ? $item['country']['names'][$langcode] : '', 'city' => isset($item['city']['names'][$langcode]) ? $item['city']['names'][$langcode] : '', ]; } } namespace InnStudio\Prober\Components\Utils; final class UtilsMemory { public static function getMemoryUsage($key) { $key = ucfirst($key); if (UtilsApi::isWin()) { return 0; } static $memInfo = null; if (null === $memInfo) { $memInfoFile = '/proc/meminfo'; error_reporting(0); if ( !is_readable($memInfoFile)) { error_reporting(\E_ALL); $memInfo = 0; return 0; } $memInfo = file_get_contents($memInfoFile); $memInfo = str_replace([ ' kB', ' ', ], '', $memInfo); $lines = []; foreach (explode("\n", $memInfo) as $line) { if ( !$line) { continue; } $line = explode(':', $line); $lines[$line[0]] = (float) $line[1] * 1024; } $memInfo = $lines; } if ( !isset($memInfo['MemTotal'])) { return 0; } switch ($key) { case 'MemRealUsage': if (isset($memInfo['MemAvailable'])) { return $memInfo['MemTotal'] - $memInfo['MemAvailable']; } if (isset($memInfo['MemFree'])) { if (isset($memInfo['Buffers'], $memInfo['Cached'])) { return $memInfo['MemTotal'] - $memInfo['MemFree'] - $memInfo['Buffers'] - $memInfo['Cached']; } return $memInfo['MemTotal'] - $memInfo['Buffers']; } return 0; case 'MemUsage': return isset($memInfo['MemFree']) ? $memInfo['MemTotal'] - $memInfo['MemFree'] : 0; case 'SwapUsage': if ( !isset($memInfo['SwapTotal']) || !isset($memInfo['SwapFree'])) { return 0; } return $memInfo['SwapTotal'] - $memInfo['SwapFree']; } return isset($memInfo[$key]) ? $memInfo[$key] : 0; } } namespace InnStudio\Prober\Components\Utils; final class UtilsServerIp { public static function getPublicIpV4() { return self::getV4ViaInnStudioCom() ?: self::getV4ViaIpv6TestCom() ?: ''; } public static function getPublicIpV6() { return self::getV6ViaInnStudioCom() ?: self::getV6ViaIpv6TestCom() ?: ''; } public static function getLocalIpV4() { $content = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : ''; return filter_var($content, \FILTER_VALIDATE_IP, [ 'flags' => \FILTER_FLAG_IPV4, ]) ?: ''; } public static function getLocalIpV6() { $content = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : ''; return filter_var($content, \FILTER_VALIDATE_IP, [ 'flags' => \FILTER_FLAG_IPV6, ]) ?: ''; } private static function getV4ViaInnStudioCom() { return self::getContent('https://ipv4.inn-studio.com/ip/', 4); } private static function getV6ViaInnStudioCom() { return self::getContent('https://ipv6.inn-studio.com/ip/', 6); } private static function getV4ViaIpv6TestCom() { return self::getContent('https://v4.ipv6-test.com/api/myip.php', 4); } private static function getV6ViaIpv6TestCom() { return self::getContent('https://v6.ipv6-test.com/api/myip.php', 6); } private static function getContent($url, $type) { $content = ''; if (\function_exists('curl_init')) { $ch = curl_init(); curl_setopt_array($ch, [ \CURLOPT_URL => $url, \CURLOPT_RETURNTRANSFER => true, ]); $content = curl_exec($ch); curl_close($ch); } else { $content = file_get_contents($url); } return (string) filter_var($content, \FILTER_VALIDATE_IP, [ 'flags' => 6 === $type ? \FILTER_FLAG_IPV6 : \FILTER_FLAG_IPV4, ]) ?: ''; } } namespace InnStudio\Prober\Components\Utils; final class UtilsTomlParser { public static function parse($toml_string) { $result = []; // 统一换行符,防止 Windows 环境出错 $toml_string = str_replace("\r\n", "\n", $toml_string); $lines = explode("\n", $toml_string); $current_group = &$result; $line_count = count($lines); for ($line_num = 0; $line_num < $line_count; $line_num++) { $line = trim($lines[$line_num]); if ('' === $line || '#' === $line[0]) { continue; } if ('[' === $line[0] && ']' === substr($line, -1)) { $group_name = substr($line, 1, -1); $groups = explode('.', $group_name); $current_group = &$result; foreach ($groups as $g) { if (!isset($current_group[$g])) { $current_group[$g] = []; } $current_group = &$current_group[$g]; } continue; } if (false !== strpos($line, '=')) { list($key, $value) = explode('=', $line, 2); $key = trim($key); $value = trim($value); // --- 新增:处理多行数组/多行值 --- // 如果值以 '[' 开头,但当前行没有以 ']' 结尾,说明它跨行了 if ('' !== $value && '[' === $value[0] && ']' !== substr($value, -1)) { while ($line_num + 1 < $line_count) { $line_num++; $next_line = trim($lines[$line_num]); // 忽略多行数组内部的注释和空行 if ('' === $next_line || '#' === $next_line[0]) { continue; } $value .= ' ' . $next_line; // 拼接内容 // 如果遇到了闭合的 ']',说明多行数组结束了 if (']' === substr($next_line, -1)) { break; } } } // --------------------------------- $parsed_value = self::parse_value($value); $current_group[$key] = $parsed_value; } } return $result; } public static function parse_value($value) { if (preg_match('/^"(.*)"$/', $value, $matches)) { return str_replace('\\"', '"', $matches[1]); } if (preg_match("/^'(.*)'$/", $value, $matches)) { return $matches[1]; } if ('true' === $value) { return true; } if ('false' === $value) { return false; } if (preg_match('/^-?\\d+$/', $value)) { return (int) $value; } if (preg_match('/^-?\\d+\\.\\d+$/', $value)) { return (float) $value; } if ('[' === $value[0] && ']' === substr($value, -1)) { $inner = trim(substr($value, 1, -1)); if ('' === $inner) { return []; } $items = []; $current = ''; $in_string = false; $string_char = ''; $depth = 0; // 新增:用来记录方括号嵌套深度 $i = 0; $len = \strlen($inner); while ($i < $len) { $char = $inner[$i]; if (!$in_string && ('"' === $char || "'" === $char)) { $in_string = true; $string_char = $char; $current .= $char; } elseif ($in_string && $char === $string_char && '\\' !== $inner[$i - 1]) { $in_string = false; $current .= $char; } elseif (!$in_string && '[' === $char) { $depth++; // 进入内层数组 $current .= $char; } elseif (!$in_string && ']' === $char) { $depth--; // 离开内层数组 $current .= $char; } elseif (!$in_string && ',' === $char) { // 只有当 depth 为 0 时,才说明这是外层数组的逗号 if (0 === $depth) { if ('' !== trim($current)) { $items[] = self::parse_value(trim($current)); } $current = ''; } else { $current .= $char; } } else { $current .= $char; } ++$i; } if ('' !== trim($current)) { $items[] = self::parse_value(trim($current)); } return $items; } return trim($value, '"\''); } } namespace InnStudio\Prober\Components\Config; final class ConfigPoll { public function render() { $config = ConfigApi::$config; return [ ConfigConstants::ID => [ 'APP_VERSION' => $config['APP_VERSION'], 'APP_NAME' => $config['APP_NAME'], 'APP_URL' => $config['APP_URL'], 'AUTHOR_URL' => $config['AUTHOR_URL'], 'UPDATE_PHP_URLS' => $config['UPDATE_PHP_URLS'], 'APP_CONFIG_URLS' => $config['APP_CONFIG_URLS'], 'APP_CONFIG_URL_DEV' => $config['APP_CONFIG_URL_DEV'], 'AUTHOR_NAME' => $config['AUTHOR_NAME'], 'LATEST_PHP_STABLE_VERSION' => $config['LATEST_PHP_STABLE_VERSION'], 'LATEST_NGINX_STABLE_VERSION' => $config['LATEST_NGINX_STABLE_VERSION'], ], ]; } } /** * 该文件是自动生成的。 * The file is automatically generated. */ namespace InnStudio\Prober\Components\Config; class ConfigApi { public static $config = array ( 'APP_VERSION' => '10.0.1', 'APP_NAME' => 'X Prober', 'APP_URL' => 'https://github.com/kmvan/x-prober', 'AUTHOR_URL' => 'https://inn-studio.com/prober', 'UPDATE_PHP_URLS' => array ( 0 => 'https://raw.githubusercontent.com/kmvan/x-prober/master/dist/prober.php', 1 => 'https://api.inn-studio.com/download/?id=xprober', ), 'APP_CONFIG_URLS' => array ( 0 => 'https://raw.githubusercontent.com/kmvan/x-prober/master/AppConfig.json', 1 => 'https://api.inn-studio.com/download/?id=xprober-config', ), 'BENCHMARKS_URLS' => array ( 0 => 'https://raw.githubusercontent.com/kmvan/x-prober/master/benchmarks.json', 1 => 'https://api.inn-studio.com/download/?id=xprober-benchmarks', ), 'BROWSER_BENCHMARKS_URLS' => array ( 0 => 'https://raw.githubusercontent.com/kmvan/x-prober/master/browser-benchmarks.json', 1 => 'https://api.inn-studio.com/download/?id=xprober-browser-benchmarks', ), 'APP_CONFIG_URL_DEV' => 'http://localhost:8000/AppConfig.json', 'AUTHOR_NAME' => 'INN STUDIO', 'LATEST_PHP_STABLE_VERSION' => '8', 'LATEST_NGINX_STABLE_VERSION' => '1.22.0', 'BENCHMARKS' => array ( 0 => array ( 'name' => 'RamNode / PHP82 JIT', 'url' => 'https://clientarea.ramnode.com/aff.php?aff=4143', 'date' => '2023-05-02', 'detail' => array ( 'cpu' => 203245, 'read' => 68706, 'write' => 11452, ), ), 1 => array ( 'name' => 'SpartanHost / HDD / PHP80 JIT', 'url' => 'https://billing.spartanhost.net/aff.php?aff=801', 'date' => '2021-07-17', 'proberUrl' => 'https://x-prober-server-benchmark-spartanhost-dalls.inn-studio.com', 'binUrl' => 'https://lg.dal.spartanhost.net/100MB.test', 'detail' => array ( 'cpu' => 280903, 'read' => 65551, 'write' => 16238, ), ), 2 => array ( 'name' => 'Vultr / Tokyo / PHP82 JIT', 'url' => 'https://www.vultr.com/?ref=7826363-4F', 'date' => '2023-05-02', 'proberUrl' => 'https://x-prober-server-benchmark-vultr-tokyo.inn-studio.com/', 'binUrl' => 'https://hnd-jp-ping.vultr.com/vultr.com.100MB.bin', 'detail' => array ( 'cpu' => 243748, 'read' => 46066, 'write' => 13824, ), ), 3 => array ( 'name' => 'BandwagonHOST / KVM / PHP80 JIT', 'url' => 'https://bandwagonhost.com/aff.php?aff=34116', 'proberUrl' => 'https://x-prober-server-benchmark-bwh-los-angeles.inn-studio.com/', 'binUrl' => 'https://x-prober-server-benchmark-bwh-los-angeles.inn-studio.com/512m.bin', 'date' => '2021-07-17', 'detail' => array ( 'cpu' => 185491, 'read' => 13616, 'write' => 4529, ), ), ), ); } namespace InnStudio\Prober\Components\Config; class ConfigConstants { const ID = 'config'; } namespace InnStudio\Prober\Components\WindowConfig; use InnStudio\Prober\Components\Utils\UtilsNetwork; class WindowConfigApi { public static function getConfig() { return [ 'IS_DEV' => false, 'AUTHORIZATION' => UtilsNetwork::getAuthorization(), 'THEME' => '', ]; } public static function getGlobalConfig() { $config = json_encode(self::getConfig(), \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE); return << window['GLOBAL_CONFIG'] = {$config}; try { const storedTheme = String(localStorage.getItem("x-theme:v1") ?? ""); let theme = storedTheme; if (storedTheme) { window.GLOBAL_CONFIG.THEME = storedTheme; } else { theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; } document.documentElement.setAttribute("data-theme", theme); } catch (e) { console.error(e); } HTML; } } namespace InnStudio\Prober\Components\MyInfo; class MyInfoConstants { const ID = 'myInfo'; } namespace InnStudio\Prober\Components\MyInfo; use InnStudio\Prober\Components\UserConfig\UserConfigApi; use InnStudio\Prober\Components\Utils\UtilsClientIp; final class MyInfoPoll { public function render() { $id = MyInfoConstants::ID; if (UserConfigApi::isDisabled($id)) { return [ $id => null, ]; } return [ $id => [ 'phpLanguage' => isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : '-', 'ipv4' => UtilsClientIp::getV4(), 'ipv6' => UtilsClientIp::getV6(), ], ]; } } namespace InnStudio\Prober\Components\NetworkStats; use InnStudio\Prober\Components\UserConfig\UserConfigApi; use InnStudio\Prober\Components\Utils\UtilsApi; use InnStudio\Prober\Components\Utils\UtilsNetwork; final class NetworkStatsPoll { public function render() { $id = NetworkStatsConstants::ID; if (UtilsApi::isWin() || UserConfigApi::isDisabled($id)) { return [ $id => null, ]; } return [ $id => [ 'networks' => UtilsNetwork::getStats(), 'timestamp' => time(), ], ]; } } namespace InnStudio\Prober\Components\NetworkStats; class NetworkStatsConstants { const ID = 'networkStats'; } namespace InnStudio\Prober\Components\UserConfig; class UserConfigConstants { const ID = 'userConfig'; } namespace InnStudio\Prober\Components\UserConfig; final class UserConfigPoll { public function render() { return [ UserConfigConstants::ID => UserConfigApi::get(), ]; } } namespace InnStudio\Prober\Components\UserConfig; use InnStudio\Prober\Components\Utils\UtilsTomlParser; final class UserConfigApi { private static $conf; private static $filename = 'xconfig.toml'; public static function isDisabled($id) { return \in_array($id, self::get('disabled') ?: [], true); } public static function get($id = null) { self::setConf(); if ($id) { return isset(self::$conf[$id]) ? self::$conf[$id] : null; } return self::$conf; } private static function getFilePath() { if ( !\defined('XPROBER_DIR')) { return ''; } $filename = self::$filename; if (\defined('XPROBER_IS_DEV') && XPROBER_IS_DEV) { $path = \dirname(XPROBER_DIR) . "/{$filename}"; if ( !file_exists($path) || !is_readable($path)) { return ''; } return $path; } $path = XPROBER_DIR . "/{$filename}"; if ( !file_exists($path) || !is_readable($path)) { return ''; } return $path; } private static function setConf() { if (null !== self::$conf) { return; } $path = self::getFilePath(); if ( !$path) { self::$conf = null; return; } $content = file_get_contents($path); if ( !$content) { self::$conf = null; return; } // toml $conf = UtilsTomlParser::parse($content); if ( !$conf) { self::$conf = null; return; } self::$conf = $conf; } } namespace InnStudio\Prober\Components\Timezone; final class Timezone { public function __construct() { if ( !\ini_get('date.timezone')) { date_default_timezone_set('GMT'); } } } namespace InnStudio\Prober\Components\Events; final class EventsApi { private static $events = []; private static $PRIORITY_ID = 'priority'; private static $CALLBACK_ID = 'callback'; public static function on($name, $callback, $priority = 10) { if ( !isset(self::$events[$name])) { self::$events[$name] = []; } self::$events[$name][] = [ self::$PRIORITY_ID => $priority, self::$CALLBACK_ID => $callback, ]; } public static function emit() { $args = \func_get_args(); $name = $args[0]; $return = isset($args[1]) ? $args[1] : null; unset($args[0], $args[1]); $events = isset(self::$events[$name]) ? self::$events[$name] : false; if ( !$events) { return $return; } $sortArr = []; foreach ($events as $k => $filter) { $sortArr[$k] = $filter[self::$PRIORITY_ID]; } array_multisort($sortArr, $events); foreach ($events as $filter) { $return = \call_user_func_array($filter[self::$CALLBACK_ID], [$return, $args]); } return $return; } } namespace InnStudio\Prober\Components\Location; class LocationConstants { const ID = 'locationIpv4'; const FEATURE_LOCATION = 'locationIpv4'; } namespace InnStudio\Prober\Components\Location; use InnStudio\Prober\Components\Rest\RestResponse; use InnStudio\Prober\Components\Rest\StatusCode; use InnStudio\Prober\Components\UserConfig\UserConfigApi; use InnStudio\Prober\Components\Utils\UtilsLocation; final class LocationIpv4Action { public function render($action) { if (LocationConstants::ID !== $action) { return; } $response = new RestResponse(); if (UserConfigApi::isDisabled(LocationConstants::FEATURE_LOCATION)) { $response ->setStatus(StatusCode::FORBIDDEN) ->end(); } $ip = filter_input(\INPUT_GET, 'ip', \FILTER_VALIDATE_IP, [ 'flags' => \FILTER_FLAG_IPV4, ]); if ( !$ip) { $response ->setStatus(StatusCode::BAD_REQUEST) ->end(); } $response ->setData(UtilsLocation::getLocation($ip)) ->end(); } } namespace InnStudio\Prober\Components\PhpExtensions; use InnStudio\Prober\Components\UserConfig\UserConfigApi; final class PhpExtensionsPoll { public function render() { $id = PhpExtensionsConstants::ID; if (UserConfigApi::isDisabled($id)) { return [ $id => null, ]; } $jitEnabled = false; if (\function_exists('opcache_get_status')) { $status = opcache_get_status(); if (isset($status['jit']['enabled']) && true === $status['jit']['enabled']) { $jitEnabled = true; } } return [ $id => [ 'redis' => \extension_loaded('redis') && class_exists('Redis'), 'sqlite3' => \extension_loaded('sqlite3') && class_exists('Sqlite3'), 'memcache' => \extension_loaded('memcache') && class_exists('Memcache'), 'memcached' => \extension_loaded('memcached') && class_exists('Memcached'), 'opcache' => \function_exists('opcache_get_status'), 'opcacheEnabled' => $this->isOpcEnabled(), 'opcacheJitEnabled' => $jitEnabled, 'swoole' => \extension_loaded('swoole') && \function_exists('swoole_version'), 'imagick' => \extension_loaded('imagick') && class_exists('Imagick'), 'gmagick' => \extension_loaded('gmagick'), 'exif' => \extension_loaded('exif') && \function_exists('exif_imagetype'), 'fileinfo' => \extension_loaded('fileinfo'), 'simplexml' => \extension_loaded('simplexml'), 'sockets' => \extension_loaded('sockets') && \function_exists('socket_accept'), 'mysqli' => \extension_loaded('mysqli') && class_exists('mysqli'), 'zip' => \extension_loaded('zip') && class_exists('ZipArchive'), 'mbstring' => \extension_loaded('mbstring') && \function_exists('mb_substr'), 'phalcon' => \extension_loaded('phalcon'), 'xdebug' => \extension_loaded('xdebug'), 'zendOptimizer' => \function_exists('zend_optimizer_version'), 'ionCube' => \extension_loaded('ioncube loader'), 'sourceGuardian' => \extension_loaded('sourceguardian'), 'ldap' => \function_exists('ldap_connect'), 'curl' => \function_exists('curl_init'), 'loadedExtensions' => UserConfigApi::isDisabled('phpExtensionsLoaded') ? [] : get_loaded_extensions(), ], ]; } private function isOpcEnabled() { $isOpcEnabled = \function_exists('opcache_get_configuration'); if ($isOpcEnabled) { $isOpcEnabled = opcache_get_configuration(); $isOpcEnabled = isset($isOpcEnabled['directives']['opcache.enable']) && true === $isOpcEnabled['directives']['opcache.enable']; } return $isOpcEnabled; } } namespace InnStudio\Prober\Components\PhpExtensions; class PhpExtensionsConstants { const ID = 'phpExtensions'; } namespace InnStudio\Prober\Components\Nodes; use InnStudio\Prober\Components\Rest\RestResponse; use InnStudio\Prober\Components\Rest\StatusCode; use InnStudio\Prober\Components\Utils\UtilsApi; final class NodesAction { public function render($action) { if (NodesConstants::ID !== $action) { return; } $nodeId = filter_input(\INPUT_GET, 'nodeId'); $response = new RestResponse(); if ( !$nodeId) { $response ->setStatus(StatusCode::BAD_REQUEST) ->end(); } $data = $this->getNodeData($nodeId); if ( !$data) { $response ->setStatus(StatusCode::NO_CONTENT) ->end(); } $response ->setData($data) ->end(); } private function getNodeData($nodeId) { $node = UtilsApi::arrayFind(NodesApi::getUserConfigNodes(), function ($item) use ($nodeId) { return isset($item['url']) && isset($item['id']) && $item['id'] === $nodeId; }); if ( !$node) { return; } $isDev = \defined('XPROBER_IS_DEV') && XPROBER_IS_DEV; $url = $node['url']; $isRemote = (false === strpos($url, 'localhost') && false === strpos($url, '127.0.0.1')); $params = 'action=poll'; $url = ($isDev && !$isRemote) ? "{$url}/api?{$params}" : "{$url}?{$params}"; return $this->getRemoteData($url); } private function getRemoteData($url) { if (\function_exists('curl_init')) { $ch = curl_init($url); curl_setopt_array($ch, [ \CURLOPT_RETURNTRANSFER => true, ]); $content = curl_exec($ch); curl_close($ch); return json_decode($content) ?: null; } return json_decode(file_get_contents($url)) ?: null; } } namespace InnStudio\Prober\Components\Nodes; class NodesConstants { const ID = 'nodes'; } namespace InnStudio\Prober\Components\Nodes; use InnStudio\Prober\Components\UserConfig\UserConfigApi; final class NodesPoll { public function render() { $id = NodesConstants::ID; if (UserConfigApi::isDisabled($id)) { return [ $id => null, ]; } $items = array_map(function ($item) { return $item['id']; }, NodesApi::getUserConfigNodes()); if ( !$items) { return [ $id => null, ]; } return [ $id => [ 'nodesIds' => $items, ], ]; } } namespace InnStudio\Prober\Components\Nodes; use InnStudio\Prober\Components\UserConfig\UserConfigApi; class NodesApi { public static function getUserConfigNodes() { $items = UserConfigApi::get(NodesConstants::ID); if ( !$items || !\is_array($items)) { return []; } return array_values( array_filter( array_map(function ($item) { if (2 !== \count($item)) { return; } return [ 'id' => $item[0], 'url' => $item[1], ]; }, $items) ) ); } } namespace InnStudio\Prober\Components\Action; use InnStudio\Prober\Components\Rest\RestResponse; use InnStudio\Prober\Components\Rest\StatusCode; use InnStudio\Prober\Components\ServerBenchmark\ServerBenchmarkDelay; final class Action { public function __construct() { // delay for server benchmark (new ServerBenchmarkDelay())->delay(); $action = (string) filter_input(\INPUT_GET, 'action'); if ( !$action) { return; } // for php54 foreach ([ 'Poll\\PollAction', 'Script\\ScriptAction', 'Style\\StyleAction', 'Ping\\PingAction', 'ServerInfo\\ServerInfoPublicIpv4Action', 'ServerInfo\\ServerInfoPublicIpv6Action', 'PhpInfo\\PhpInfoLatestPhpVersionAction', 'PhpInfoDetail\\PhpInfoDetailAction', 'Updater\\UpdaterActionVersion', 'Updater\\UpdaterActionUpdate', 'ServerBenchmark\\ServerBenchmarkPerformanceAction', 'ServerBenchmark\\ServerBenchmarkServersAction', 'Location\\LocationIpv4Action', 'Nodes\\NodesAction', 'BrowserBenchmark\\BrowserBenchmarkBrowsersAction', ] as $fn) { $class = "\\InnStudio\\Prober\\Components\\{$fn}"; (new $class())->render($action); } (new RestResponse()) ->setStatus(StatusCode::BAD_REQUEST) ->end(); } } namespace InnStudio\Prober\Components\TemperatureSensor; use Exception; use InnStudio\Prober\Components\UserConfig\UserConfigApi; final class TemperatureSensorPoll { public function render() { $id = TemperatureSensorConstants::ID; if (UserConfigApi::isDisabled($id)) { return [ $id => null, ]; } $items = $this->getItems(); $cpuTemp = $this->getCpuTemp(); if (false !== $cpuTemp) { $items[] = [ 'id' => 'cpu', 'name' => 'CPU', 'celsius' => round($cpuTemp / 1000, 2), ]; } return [ $id => $items ?: null, ]; } private function curl($url) { if ( !\function_exists('curl_init')) { return (string) file_get_contents($url); } $ch = curl_init(); curl_setopt_array($ch, [ \CURLOPT_URL => $url, \CURLOPT_RETURNTRANSFER => true, \CURLOPT_TIMEOUT => 2, ]); $res = curl_exec($ch); curl_close($ch); return (string) $res; } private function getItems() { $items = []; $urls = UserConfigApi::get('temperatureSensors') ?: []; if (!$urls) { return []; } foreach ($urls as $url) { $res = $this->curl($url); if (!$res) { continue; } $item = json_decode($res, true); if (!$item || !\is_array($item)) { continue; } $items[] = $item; } return $items; } private function getCpuTemp() { try { $path = '/sys/class/thermal/thermal_zone0/temp'; if (!is_readable($path)) { return false; } return (float) file_get_contents($path); } catch (Exception $e) { return false; } } } namespace InnStudio\Prober\Components\TemperatureSensor; class TemperatureSensorConstants { const ID = 'temperatureSensor'; } namespace InnStudio\Prober\Components\ServerInfo; use InnStudio\Prober\Components\Rest\RestResponse; use InnStudio\Prober\Components\Rest\StatusCode; use InnStudio\Prober\Components\UserConfig\UserConfigApi; use InnStudio\Prober\Components\Utils\UtilsServerIp; final class ServerInfoPublicIpv4Action { public function render($action) { if ('serverPublicIpv4' !== $action) { return; } if (UserConfigApi::isDisabled(ServerInfoConstants::ID) || UserConfigApi::isDisabled(ServerInfoConstants::FEATURE_SERVER_IP)) { (new RestResponse()) ->setStatus(StatusCode::FORBIDDEN) ->end(); } (new RestResponse()) ->setData([ 'ip' => UtilsServerIp::getPublicIpV4(), ]) ->end(); } } namespace InnStudio\Prober\Components\ServerInfo; class ServerInfoConstants { const ID = 'serverInfo'; const FEATURE_SERVER_IP = 'serverIp'; } namespace InnStudio\Prober\Components\ServerInfo; use InnStudio\Prober\Components\Rest\RestResponse; use InnStudio\Prober\Components\Rest\StatusCode; use InnStudio\Prober\Components\UserConfig\UserConfigApi; use InnStudio\Prober\Components\Utils\UtilsLocation; use InnStudio\Prober\Components\Utils\UtilsServerIp; final class ServerInfoLocationIpv4Action { public function render($action) { if ('serverLocationIpv4' !== $action) { return; } if (UserConfigApi::isDisabled(ServerInfoConstants::ID) || UserConfigApi::isDisabled(ServerInfoConstants::FEATURE_SERVER_IP)) { (new RestResponse()) ->setStatus(StatusCode::FORBIDDEN) ->end(); } $response = new RestResponse(); $ip = UtilsServerIp::getPublicIpV4(); if ( !$ip) { $response ->setStatus(StatusCode::INTERNAL_SERVER_ERROR) ->end(); } $response ->setData(UtilsLocation::getLocation($ip)) ->end(); } } namespace InnStudio\Prober\Components\ServerInfo; use InnStudio\Prober\Components\Rest\RestResponse; use InnStudio\Prober\Components\Rest\StatusCode; use InnStudio\Prober\Components\UserConfig\UserConfigApi; use InnStudio\Prober\Components\Utils\UtilsServerIp; final class ServerInfoPublicIpv6Action { public function render($action) { if ('serverPublicIpv6' !== $action) { return; } if (UserConfigApi::isDisabled(ServerInfoConstants::ID) || UserConfigApi::isDisabled(ServerInfoConstants::FEATURE_SERVER_IP)) { (new RestResponse()) ->setStatus(StatusCode::FORBIDDEN) ->end(); } (new RestResponse()) ->setData([ 'ip' => UtilsServerIp::getPublicIpV6(), ]) ->end(); } } namespace InnStudio\Prober\Components\ServerInfo; use InnStudio\Prober\Components\UserConfig\UserConfigApi; use InnStudio\Prober\Components\Utils\UtilsCpu; use InnStudio\Prober\Components\Utils\UtilsDisk; use InnStudio\Prober\Components\Utils\UtilsServerIp; use InnStudio\Prober\Components\Utils\UtilsTime; final class ServerInfoPoll { public function render() { $id = ServerInfoConstants::ID; if (UserConfigApi::isDisabled($id)) { return [ $id => null, ]; } return [ $id => [ 'serverName' => $this->getServerInfo('SERVER_NAME'), 'serverUtcTime' => UtilsTime::getUtcTime(), 'localIpv4' => UtilsServerIp::getLocalIpv4(), 'localIpv6' => UtilsServerIp::getLocalIpv6(), 'serverTime' => UtilsTime::getTime(), 'serverUptime' => UtilsTime::getUptime(), 'serverSoftware' => $this->getServerInfo('SERVER_SOFTWARE'), 'phpVersion' => \PHP_VERSION, 'cpuModel' => UtilsCpu::getModel(), 'serverOs' => php_uname(), 'scriptPath' => __FILE__, 'diskUsage' => UtilsDisk::getItems(), ], ]; } private function getServerInfo($key) { return isset($_SERVER[$key]) ? $_SERVER[$key] : ''; } } new \InnStudio\Prober\Components\Bootstrap\Bootstrap(__DIR__);