From 8965233e8c079a74f42758884852351addd734b4 Mon Sep 17 00:00:00 2001 From: Niranjan Date: Tue, 7 Apr 2026 10:03:25 +0530 Subject: [PATCH] new changes --- YakPanel-server/backend/app/api/site.py | 32 ++ .../backend/app/services/site_service.py | 20 +- ...ert-DW1IRWce.js => AdminAlert-Bt3L8_zJ.js} | 2 +- ...on-Bd2cLTu3.js => AdminButton-BKglG8kI.js} | 2 +- ...Card-DNA70pGd.js => AdminCard-BYkisaPa.js} | 2 +- ...ble-BLiLxfnS.js => AdminTable-BQ5Lf7EC.js} | 2 +- ...gzFMegr.js => BackupPlansPage-Dau-fuqK.js} | 2 +- .../dist/assets/ConfigPage-eLTvRUp2.js | 1 - .../dist/assets/ConfigPage-t5KRejpn.js | 1 + ...ge-BfaMKQc8.js => CrontabPage-DgbkO6Z_.js} | 2 +- ...-CukNUmp0.js => DashboardPage-WBszSOQ2.js} | 2 +- ...e-sZfqfvMQ.js => DatabasePage-B_-EguhK.js} | 2 +- .../dist/assets/DockerPage-D1AIK8Rv.js | 1 - .../dist/assets/DockerPage-DyZ77ivO.js | 1 + ...ge-DVTACiDJ.js => DomainsPage-BQsg8Ui3.js} | 2 +- ...ate-C61VdEFl.js => EmptyState-D6lCh4WN.js} | 2 +- .../dist/assets/FilesPage-DLgTKzsa.js | 1 - .../dist/assets/FilesPage-oDxR4Lhi.js | 1 + ...e-Bu-mOiN9.js => FirewallPage-Cczmj9CC.js} | 2 +- ...tpPage-DG8coQcY.js => FtpPage-CjINqUGM.js} | 2 +- ...sPage-B1uIfI5z.js => LogsPage-z5Orin3I.js} | 2 +- .../{Modal-B7V4w_St.js => Modal-CCihVZTY.js} | 2 +- ...ge-CgJf2F74.js => MonitorPage-BRoY6HLt.js} | 2 +- .../frontend/dist/assets/NodePage-BQzvbSat.js | 1 - .../frontend/dist/assets/NodePage-DOIEhdrc.js | 1 + .../dist/assets/PageHeader-BcjNf7GG.js | 1 - .../dist/assets/PageHeader-D6k34vvM.js | 1 + .../dist/assets/PluginsPage-C4H8wPuq.js | 1 - .../dist/assets/PluginsPage-D1KZQdzk.js | 1 + .../dist/assets/RemoteInstallPage-19-_F3Xw.js | 2 + .../dist/assets/RemoteInstallPage-C4gVyakl.js | 2 - ...e-DNZuAdmh.js => ServicesPage-C2SHTH7X.js} | 2 +- .../frontend/dist/assets/SitePage-CeCv6Zaa.js | 1 - .../frontend/dist/assets/SitePage-D5AOBBFP.js | 1 + ...tPage-B7PtFv7I.js => SoftPage-BLM9zKf0.js} | 2 +- ...e-CXXB09nH.js => TerminalPage-CgU22s_8.js} | 2 +- ...Page-DqvygXkC.js => UsersPage-Skle3SPM.js} | 2 +- .../{index-CRR9sQ49.js => index-Cvh4tLHo.js} | 28 +- YakPanel-server/frontend/dist/index.html | 2 +- YakPanel-server/frontend/src/api/client.ts | 33 ++ .../frontend/src/pages/FilesPage.tsx | 15 +- .../frontend/src/pages/SitePage.tsx | 399 ++++++++++++++---- 42 files changed, 465 insertions(+), 120 deletions(-) rename YakPanel-server/frontend/dist/assets/{AdminAlert-DW1IRWce.js => AdminAlert-Bt3L8_zJ.js} (82%) rename YakPanel-server/frontend/dist/assets/{AdminButton-Bd2cLTu3.js => AdminButton-BKglG8kI.js} (76%) rename YakPanel-server/frontend/dist/assets/{AdminCard-DNA70pGd.js => AdminCard-BYkisaPa.js} (88%) rename YakPanel-server/frontend/dist/assets/{AdminTable-BLiLxfnS.js => AdminTable-BQ5Lf7EC.js} (75%) rename YakPanel-server/frontend/dist/assets/{BackupPlansPage-CgzFMegr.js => BackupPlansPage-Dau-fuqK.js} (95%) delete mode 100644 YakPanel-server/frontend/dist/assets/ConfigPage-eLTvRUp2.js create mode 100644 YakPanel-server/frontend/dist/assets/ConfigPage-t5KRejpn.js rename YakPanel-server/frontend/dist/assets/{CrontabPage-BfaMKQc8.js => CrontabPage-DgbkO6Z_.js} (87%) rename YakPanel-server/frontend/dist/assets/{DashboardPage-CukNUmp0.js => DashboardPage-WBszSOQ2.js} (91%) rename YakPanel-server/frontend/dist/assets/{DatabasePage-sZfqfvMQ.js => DatabasePage-B_-EguhK.js} (80%) delete mode 100644 YakPanel-server/frontend/dist/assets/DockerPage-D1AIK8Rv.js create mode 100644 YakPanel-server/frontend/dist/assets/DockerPage-DyZ77ivO.js rename YakPanel-server/frontend/dist/assets/{DomainsPage-DVTACiDJ.js => DomainsPage-BQsg8Ui3.js} (94%) rename YakPanel-server/frontend/dist/assets/{EmptyState-C61VdEFl.js => EmptyState-D6lCh4WN.js} (82%) delete mode 100644 YakPanel-server/frontend/dist/assets/FilesPage-DLgTKzsa.js create mode 100644 YakPanel-server/frontend/dist/assets/FilesPage-oDxR4Lhi.js rename YakPanel-server/frontend/dist/assets/{FirewallPage-Bu-mOiN9.js => FirewallPage-Cczmj9CC.js} (91%) rename YakPanel-server/frontend/dist/assets/{FtpPage-DG8coQcY.js => FtpPage-CjINqUGM.js} (94%) rename YakPanel-server/frontend/dist/assets/{LogsPage-B1uIfI5z.js => LogsPage-z5Orin3I.js} (93%) rename YakPanel-server/frontend/dist/assets/{Modal-B7V4w_St.js => Modal-CCihVZTY.js} (98%) rename YakPanel-server/frontend/dist/assets/{MonitorPage-CgJf2F74.js => MonitorPage-BRoY6HLt.js} (94%) delete mode 100644 YakPanel-server/frontend/dist/assets/NodePage-BQzvbSat.js create mode 100644 YakPanel-server/frontend/dist/assets/NodePage-DOIEhdrc.js delete mode 100644 YakPanel-server/frontend/dist/assets/PageHeader-BcjNf7GG.js create mode 100644 YakPanel-server/frontend/dist/assets/PageHeader-D6k34vvM.js delete mode 100644 YakPanel-server/frontend/dist/assets/PluginsPage-C4H8wPuq.js create mode 100644 YakPanel-server/frontend/dist/assets/PluginsPage-D1KZQdzk.js create mode 100644 YakPanel-server/frontend/dist/assets/RemoteInstallPage-19-_F3Xw.js delete mode 100644 YakPanel-server/frontend/dist/assets/RemoteInstallPage-C4gVyakl.js rename YakPanel-server/frontend/dist/assets/{ServicesPage-DNZuAdmh.js => ServicesPage-C2SHTH7X.js} (91%) delete mode 100644 YakPanel-server/frontend/dist/assets/SitePage-CeCv6Zaa.js create mode 100644 YakPanel-server/frontend/dist/assets/SitePage-D5AOBBFP.js rename YakPanel-server/frontend/dist/assets/{SoftPage-B7PtFv7I.js => SoftPage-BLM9zKf0.js} (93%) rename YakPanel-server/frontend/dist/assets/{TerminalPage-CXXB09nH.js => TerminalPage-CgU22s_8.js} (99%) rename YakPanel-server/frontend/dist/assets/{UsersPage-DqvygXkC.js => UsersPage-Skle3SPM.js} (91%) rename YakPanel-server/frontend/dist/assets/{index-CRR9sQ49.js => index-Cvh4tLHo.js} (54%) diff --git a/YakPanel-server/backend/app/api/site.py b/YakPanel-server/backend/app/api/site.py index 83e2c93c..e0c1a63a 100644 --- a/YakPanel-server/backend/app/api/site.py +++ b/YakPanel-server/backend/app/api/site.py @@ -72,6 +72,38 @@ async def site_create( return result +class SiteBatchRequest(BaseModel): + action: str + ids: list[int] + + +@router.post("/batch") +async def site_batch( + body: SiteBatchRequest, + current_user: User = Depends(get_current_user), + db: AsyncSession = Depends(get_db), +): + """Bulk enable, disable, or delete sites by id.""" + if body.action not in ("enable", "disable", "delete"): + raise HTTPException(status_code=400, detail="action must be enable, disable, or delete") + if not body.ids: + raise HTTPException(status_code=400, detail="ids required") + results: list[dict] = [] + for sid in body.ids: + if body.action == "delete": + r = await delete_site(db, sid) + elif body.action == "enable": + r = await set_site_status(db, sid, 1) + else: + r = await set_site_status(db, sid, 0) + results.append({ + "id": sid, + "ok": bool(r.get("status")), + "msg": r.get("msg", ""), + }) + return {"results": results} + + @router.get("/{site_id}") async def site_get( site_id: int, diff --git a/YakPanel-server/backend/app/services/site_service.py b/YakPanel-server/backend/app/services/site_service.py index b41d33a5..3013d613 100644 --- a/YakPanel-server/backend/app/services/site_service.py +++ b/YakPanel-server/backend/app/services/site_service.py @@ -1,6 +1,7 @@ """YakPanel - Site service""" import os import re +from datetime import datetime, timezone from sqlalchemy.ext.asyncio import AsyncSession from sqlalchemy import select @@ -126,13 +127,19 @@ async def create_site( async def list_sites(db: AsyncSession) -> list[dict]: - """List all sites with domain count.""" + """List all sites with domain count, primary domain, backup count, SSL summary.""" + cfg = get_runtime_config() + backup_dir = cfg.get("backup_path") or "" result = await db.execute(select(Site).order_by(Site.id)) sites = result.scalars().all() out = [] for s in sites: - domain_result = await db.execute(select(Domain).where(Domain.pid == s.id)) - domains = domain_result.scalars().all() + domain_result = await db.execute(select(Domain).where(Domain.pid == s.id).order_by(Domain.id)) + domain_rows = domain_result.scalars().all() + domain_list = [f"{d.name}:{d.port}" if d.port != "80" else d.name for d in domain_rows] + hostnames = [d.name for d in domain_rows] + primary = hostnames[0] if hostnames else "" + php_ver = getattr(s, "php_version", None) or "74" out.append({ "id": s.id, "name": s.name, @@ -140,8 +147,13 @@ async def list_sites(db: AsyncSession) -> list[dict]: "status": s.status, "ps": s.ps, "project_type": s.project_type, - "domain_count": len(domains), + "domain_count": len(domain_rows), "addtime": s.addtime.isoformat() if s.addtime else None, + "php_version": php_ver, + "primary_domain": primary, + "domains": domain_list, + "backup_count": _backup_count(s.name, backup_dir), + "ssl": _best_ssl_for_hostnames(hostnames), }) return out diff --git a/YakPanel-server/frontend/dist/assets/AdminAlert-DW1IRWce.js b/YakPanel-server/frontend/dist/assets/AdminAlert-Bt3L8_zJ.js similarity index 82% rename from YakPanel-server/frontend/dist/assets/AdminAlert-DW1IRWce.js rename to YakPanel-server/frontend/dist/assets/AdminAlert-Bt3L8_zJ.js index 6eb50cc2..02d0311b 100644 --- a/YakPanel-server/frontend/dist/assets/AdminAlert-DW1IRWce.js +++ b/YakPanel-server/frontend/dist/assets/AdminAlert-Bt3L8_zJ.js @@ -1 +1 @@ -import{j as t}from"./index-CRR9sQ49.js";function o({variant:l="danger",children:r,className:a="",dismissible:e,onDismiss:s}){return t.jsxs("div",{className:`alert alert-${l} ${e?"alert-dismissible fade show":""} ${a}`.trim(),role:"alert",children:[r,e?t.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:s}):null]})}export{o as A}; +import{j as t}from"./index-Cvh4tLHo.js";function o({variant:l="danger",children:r,className:a="",dismissible:e,onDismiss:s}){return t.jsxs("div",{className:`alert alert-${l} ${e?"alert-dismissible fade show":""} ${a}`.trim(),role:"alert",children:[r,e?t.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:s}):null]})}export{o as A}; diff --git a/YakPanel-server/frontend/dist/assets/AdminButton-Bd2cLTu3.js b/YakPanel-server/frontend/dist/assets/AdminButton-BKglG8kI.js similarity index 76% rename from YakPanel-server/frontend/dist/assets/AdminButton-Bd2cLTu3.js rename to YakPanel-server/frontend/dist/assets/AdminButton-BKglG8kI.js index 58835a97..fd9ddfb3 100644 --- a/YakPanel-server/frontend/dist/assets/AdminButton-Bd2cLTu3.js +++ b/YakPanel-server/frontend/dist/assets/AdminButton-BKglG8kI.js @@ -1 +1 @@ -import{j as a}from"./index-CRR9sQ49.js";function i({children:n,variant:r="primary",size:t,type:o="button",disabled:m,className:s="",...u}){return a.jsx("button",{type:o,disabled:m,className:`btn btn-${r}${t?` btn-${t}`:""} ${s}`.trim(),...u,children:n})}export{i as A}; +import{j as a}from"./index-Cvh4tLHo.js";function i({children:n,variant:r="primary",size:t,type:o="button",disabled:m,className:s="",...u}){return a.jsx("button",{type:o,disabled:m,className:`btn btn-${r}${t?` btn-${t}`:""} ${s}`.trim(),...u,children:n})}export{i as A}; diff --git a/YakPanel-server/frontend/dist/assets/AdminCard-DNA70pGd.js b/YakPanel-server/frontend/dist/assets/AdminCard-BYkisaPa.js similarity index 88% rename from YakPanel-server/frontend/dist/assets/AdminCard-DNA70pGd.js rename to YakPanel-server/frontend/dist/assets/AdminCard-BYkisaPa.js index 0625b251..400dc5e1 100644 --- a/YakPanel-server/frontend/dist/assets/AdminCard-DNA70pGd.js +++ b/YakPanel-server/frontend/dist/assets/AdminCard-BYkisaPa.js @@ -1 +1 @@ -import{j as e}from"./index-CRR9sQ49.js";function c({title:s,iconClass:a,children:i,headerExtra:r,className:d="",bodyClassName:l=""}){return e.jsxs("div",{className:`card flex-fill ${d}`.trim(),children:[(s||r)&&e.jsxs("div",{className:"card-header border-0 pb-0 d-flex align-items-center justify-content-between flex-wrap gap-2",children:[e.jsxs("h4",{className:"mb-0 d-flex align-items-center gap-2",children:[a?e.jsx("i",{className:a,"aria-hidden":!0}):null,s]}),r]}),e.jsx("div",{className:`card-body ${l}`.trim(),children:i})]})}export{c as A}; +import{j as e}from"./index-Cvh4tLHo.js";function c({title:s,iconClass:a,children:i,headerExtra:r,className:d="",bodyClassName:l=""}){return e.jsxs("div",{className:`card flex-fill ${d}`.trim(),children:[(s||r)&&e.jsxs("div",{className:"card-header border-0 pb-0 d-flex align-items-center justify-content-between flex-wrap gap-2",children:[e.jsxs("h4",{className:"mb-0 d-flex align-items-center gap-2",children:[a?e.jsx("i",{className:a,"aria-hidden":!0}):null,s]}),r]}),e.jsx("div",{className:`card-body ${l}`.trim(),children:i})]})}export{c as A}; diff --git a/YakPanel-server/frontend/dist/assets/AdminTable-BLiLxfnS.js b/YakPanel-server/frontend/dist/assets/AdminTable-BQ5Lf7EC.js similarity index 75% rename from YakPanel-server/frontend/dist/assets/AdminTable-BLiLxfnS.js rename to YakPanel-server/frontend/dist/assets/AdminTable-BQ5Lf7EC.js index 714a2287..55701ea2 100644 --- a/YakPanel-server/frontend/dist/assets/AdminTable-BLiLxfnS.js +++ b/YakPanel-server/frontend/dist/assets/AdminTable-BQ5Lf7EC.js @@ -1 +1 @@ -import{j as t}from"./index-CRR9sQ49.js";function l({children:r,className:s="",responsive:a=!0}){const e=t.jsx("table",{className:`table table-hover ${s}`.trim(),children:r});return a?t.jsx("div",{className:"table-responsive",children:e}):e}export{l as A}; +import{j as t}from"./index-Cvh4tLHo.js";function l({children:r,className:s="",responsive:a=!0}){const e=t.jsx("table",{className:`table table-hover ${s}`.trim(),children:r});return a?t.jsx("div",{className:"table-responsive",children:e}):e}export{l as A}; diff --git a/YakPanel-server/frontend/dist/assets/BackupPlansPage-CgzFMegr.js b/YakPanel-server/frontend/dist/assets/BackupPlansPage-Dau-fuqK.js similarity index 95% rename from YakPanel-server/frontend/dist/assets/BackupPlansPage-CgzFMegr.js rename to YakPanel-server/frontend/dist/assets/BackupPlansPage-Dau-fuqK.js index 05ab3914..6a5b782a 100644 --- a/YakPanel-server/frontend/dist/assets/BackupPlansPage-CgzFMegr.js +++ b/YakPanel-server/frontend/dist/assets/BackupPlansPage-Dau-fuqK.js @@ -1 +1 @@ -import{r as l,a1 as I,a as R,j as e,a2 as G,a3 as J,a4 as K,a5 as W}from"./index-CRR9sQ49.js";import{M as n}from"./Modal-B7V4w_St.js";import{A as X}from"./AdminAlert-DW1IRWce.js";import{A as m}from"./AdminButton-Bd2cLTu3.js";import{A as Z}from"./AdminTable-BLiLxfnS.js";import{E as ee}from"./EmptyState-C61VdEFl.js";import{P as q}from"./PageHeader-BcjNf7GG.js";function de(){var A,D;const[g,v]=l.useState([]),[u,L]=l.useState([]),[h,$]=l.useState([]),[w,k]=l.useState(!0),[_,d]=l.useState(""),[F,x]=l.useState(!1),[S,P]=l.useState(!1),[r,p]=l.useState(null),[c,C]=l.useState("site"),[b,T]=l.useState(!1),[f,B]=l.useState(null),[E,H]=l.useState("site"),N=()=>{I().then(v).catch(a=>d(a.message))};l.useEffect(()=>{k(!0),Promise.all([I(),R("/site/list"),R("/database/list")]).then(([a,s,t])=>{v(a),L(s),$(t.filter(i=>["MySQL","PostgreSQL","MongoDB"].includes(i.db_type)))}).catch(a=>d(a.message)).finally(()=>k(!1))},[]);const M=a=>{a.preventDefault();const s=a.currentTarget,t=s.elements.namedItem("name").value.trim(),i=s.elements.namedItem("plan_type").value,o=Number(s.elements.namedItem("target_id").value),j=s.elements.namedItem("schedule").value.trim(),y=s.elements.namedItem("enabled").checked;if(!t||!j||!o){d("Name, target and schedule are required");return}P(!0),W({name:t,plan_type:i,target_id:o,schedule:j,enabled:y}).then(()=>{x(!1),s.reset(),N()}).catch(z=>d(z.message)).finally(()=>P(!1))},V=(a,s)=>{confirm(`Delete backup plan "${s}"?`)&&J(a).then(N).catch(t=>d(t.message))},Q=a=>{p(a),C(a.plan_type)},U=a=>{if(a.preventDefault(),!r)return;const s=a.currentTarget,t=s.elements.namedItem("edit_name").value.trim(),i=Number(s.elements.namedItem("edit_target_id").value),o=s.elements.namedItem("edit_schedule").value.trim(),j=s.elements.namedItem("edit_enabled").checked;!t||!o||!i||K(r.id,{name:t,plan_type:c,target_id:i,schedule:o,enabled:j}).then(()=>{p(null),N()}).catch(y=>d(y.message))},O=()=>{T(!0),B(null),G().then(a=>B(a.results)).catch(a=>d(a.message)).finally(()=>T(!1))},Y=a=>{if(a.plan_type==="site"){const t=u.find(i=>i.id===a.target_id);return t?t.name:`#${a.target_id}`}const s=h.find(t=>t.id===a.target_id);return s?s.name:`#${a.target_id}`};return w?e.jsxs(e.Fragment,{children:[e.jsx(q,{title:"Backup Plans"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(q,{title:"Backup Plans",actions:e.jsxs("div",{className:"d-flex flex-wrap gap-2",children:[e.jsxs(m,{variant:"primary",disabled:b,onClick:O,children:[b?e.jsx("span",{className:"spinner-border spinner-border-sm me-1",role:"status"}):e.jsx("i",{className:"ti ti-player-play me-1","aria-hidden":!0}),b?"Running…":"Run Scheduled"]}),e.jsxs(m,{variant:"primary",onClick:()=>x(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add Plan"]})]})}),_?e.jsx(X,{className:"mb-3",children:_}):null,f&&f.length>0?e.jsx("div",{className:"card mb-3",children:e.jsxs("div",{className:"card-body py-3",children:[e.jsx("h6",{className:"mb-2",children:"Last run results"}),e.jsx("ul",{className:"mb-0 small list-unstyled",children:f.map((a,s)=>e.jsxs("li",{children:[a.plan,": ",a.status==="ok"?"✓":a.status==="skipped"?"⊘":"✗"," ",a.msg||""]},s))})]})}):null,e.jsxs("p",{className:"small text-secondary mb-3",children:["Schedule automated backups. Add a cron entry (e.g. ",e.jsx("code",{children:"0 * * * *"})," hourly) to call"," ",e.jsx("code",{children:"POST /api/v1/backup/run-scheduled"})," with your auth token."]}),e.jsx("div",{className:"card",children:e.jsxs(Z,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Type"}),e.jsx("th",{children:"Target"}),e.jsx("th",{children:"Schedule"}),e.jsx("th",{children:"Enabled"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:g.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"p-0",children:e.jsx(ee,{title:"No backup plans",description:'Click "Add Plan" to create one.'})})}):g.map(a=>e.jsxs("tr",{children:[e.jsx("td",{children:a.name}),e.jsx("td",{children:a.plan_type}),e.jsx("td",{children:Y(a)}),e.jsx("td",{children:e.jsx("code",{className:"small",children:a.schedule})}),e.jsx("td",{children:a.enabled?"Yes":"No"}),e.jsxs("td",{className:"text-end",children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-primary p-1",title:"Edit",onClick:()=>Q(a),children:e.jsx("i",{className:"ti ti-pencil","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Delete",onClick:()=>V(a.id,a.name),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]})]},a.id))})]})}),e.jsxs(n,{show:!!r,onHide:()=>p(null),centered:!0,children:[e.jsx(n.Header,{closeButton:!0,children:e.jsx(n.Title,{children:"Edit Backup Plan"})}),r?e.jsxs("form",{onSubmit:U,children:[e.jsxs(n.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Name"}),e.jsx("input",{name:"edit_name",type:"text",defaultValue:r.name,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Type"}),e.jsxs("select",{value:c,onChange:a=>C(a.target.value),className:"form-select",children:[e.jsx("option",{value:"site",children:"Site"}),e.jsx("option",{value:"database",children:"Database"})]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Target"}),e.jsx("select",{name:"edit_target_id",defaultValue:c===r.plan_type?r.target_id:c==="site"?(A=u[0])==null?void 0:A.id:(D=h[0])==null?void 0:D.id,className:"form-select",required:!0,children:c==="site"?u.map(a=>e.jsx("option",{value:a.id,children:a.name},`s-${a.id}`)):h.map(a=>e.jsxs("option",{value:a.id,children:[a.name," (",a.db_type,")"]},`d-${a.id}`))},c)]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Schedule (cron)"}),e.jsx("input",{name:"edit_schedule",type:"text",defaultValue:r.schedule,className:"form-control",required:!0})]}),e.jsxs("div",{className:"form-check",children:[e.jsx("input",{name:"edit_enabled",type:"checkbox",defaultChecked:r.enabled,className:"form-check-input",id:"edit_enabled"}),e.jsx("label",{className:"form-check-label",htmlFor:"edit_enabled",children:"Enabled"})]})]}),e.jsxs(n.Footer,{children:[e.jsx(m,{type:"button",variant:"secondary",onClick:()=>p(null),children:"Cancel"}),e.jsx(m,{type:"submit",variant:"primary",children:"Update"})]})]}):null]}),e.jsxs(n,{show:F,onHide:()=>x(!1),centered:!0,children:[e.jsx(n.Header,{closeButton:!0,children:e.jsx(n.Title,{children:"Add Backup Plan"})}),e.jsxs("form",{onSubmit:M,children:[e.jsxs(n.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Name"}),e.jsx("input",{name:"name",type:"text",placeholder:"Daily site backup",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Type"}),e.jsxs("select",{name:"plan_type",value:E,onChange:a=>H(a.target.value),className:"form-select",children:[e.jsx("option",{value:"site",children:"Site"}),e.jsx("option",{value:"database",children:"Database"})]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Target"}),e.jsxs("select",{name:"target_id",className:"form-select",required:!0,children:[e.jsx("option",{value:"",children:"Select…"}),E==="site"?u.map(a=>e.jsx("option",{value:a.id,children:a.name},`s-${a.id}`)):h.map(a=>e.jsxs("option",{value:a.id,children:[a.name," (",a.db_type,")"]},`d-${a.id}`))]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Schedule (cron)"}),e.jsx("input",{name:"schedule",type:"text",placeholder:"0 2 * * *",className:"form-control",required:!0}),e.jsx("div",{className:"form-text",children:"e.g. 0 2 * * * = daily at 2am, 0 */6 * * * = every 6 hours"})]}),e.jsxs("div",{className:"form-check",children:[e.jsx("input",{name:"enabled",type:"checkbox",defaultChecked:!0,className:"form-check-input",id:"plan_enabled"}),e.jsx("label",{className:"form-check-label",htmlFor:"plan_enabled",children:"Enabled"})]})]}),e.jsxs(n.Footer,{children:[e.jsx(m,{type:"button",variant:"secondary",onClick:()=>x(!1),children:"Cancel"}),e.jsx(m,{type:"submit",variant:"primary",disabled:S,children:S?"Creating…":"Create"})]})]})]})]})}export{de as BackupPlansPage}; +import{r as l,a6 as I,M as R,j as e,a7 as G,a8 as J,a9 as K,aa as W}from"./index-Cvh4tLHo.js";import{M as n}from"./Modal-CCihVZTY.js";import{A as X}from"./AdminAlert-Bt3L8_zJ.js";import{A as m}from"./AdminButton-BKglG8kI.js";import{A as Z}from"./AdminTable-BQ5Lf7EC.js";import{E as ee}from"./EmptyState-D6lCh4WN.js";import{P as q}from"./PageHeader-D6k34vvM.js";function de(){var A,D;const[g,v]=l.useState([]),[u,L]=l.useState([]),[h,$]=l.useState([]),[w,k]=l.useState(!0),[_,d]=l.useState(""),[F,x]=l.useState(!1),[S,P]=l.useState(!1),[r,p]=l.useState(null),[c,C]=l.useState("site"),[b,T]=l.useState(!1),[f,B]=l.useState(null),[E,H]=l.useState("site"),N=()=>{I().then(v).catch(a=>d(a.message))};l.useEffect(()=>{k(!0),Promise.all([I(),R("/site/list"),R("/database/list")]).then(([a,s,t])=>{v(a),L(s),$(t.filter(i=>["MySQL","PostgreSQL","MongoDB"].includes(i.db_type)))}).catch(a=>d(a.message)).finally(()=>k(!1))},[]);const M=a=>{a.preventDefault();const s=a.currentTarget,t=s.elements.namedItem("name").value.trim(),i=s.elements.namedItem("plan_type").value,o=Number(s.elements.namedItem("target_id").value),j=s.elements.namedItem("schedule").value.trim(),y=s.elements.namedItem("enabled").checked;if(!t||!j||!o){d("Name, target and schedule are required");return}P(!0),W({name:t,plan_type:i,target_id:o,schedule:j,enabled:y}).then(()=>{x(!1),s.reset(),N()}).catch(z=>d(z.message)).finally(()=>P(!1))},V=(a,s)=>{confirm(`Delete backup plan "${s}"?`)&&J(a).then(N).catch(t=>d(t.message))},Q=a=>{p(a),C(a.plan_type)},U=a=>{if(a.preventDefault(),!r)return;const s=a.currentTarget,t=s.elements.namedItem("edit_name").value.trim(),i=Number(s.elements.namedItem("edit_target_id").value),o=s.elements.namedItem("edit_schedule").value.trim(),j=s.elements.namedItem("edit_enabled").checked;!t||!o||!i||K(r.id,{name:t,plan_type:c,target_id:i,schedule:o,enabled:j}).then(()=>{p(null),N()}).catch(y=>d(y.message))},O=()=>{T(!0),B(null),G().then(a=>B(a.results)).catch(a=>d(a.message)).finally(()=>T(!1))},Y=a=>{if(a.plan_type==="site"){const t=u.find(i=>i.id===a.target_id);return t?t.name:`#${a.target_id}`}const s=h.find(t=>t.id===a.target_id);return s?s.name:`#${a.target_id}`};return w?e.jsxs(e.Fragment,{children:[e.jsx(q,{title:"Backup Plans"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(q,{title:"Backup Plans",actions:e.jsxs("div",{className:"d-flex flex-wrap gap-2",children:[e.jsxs(m,{variant:"primary",disabled:b,onClick:O,children:[b?e.jsx("span",{className:"spinner-border spinner-border-sm me-1",role:"status"}):e.jsx("i",{className:"ti ti-player-play me-1","aria-hidden":!0}),b?"Running…":"Run Scheduled"]}),e.jsxs(m,{variant:"primary",onClick:()=>x(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add Plan"]})]})}),_?e.jsx(X,{className:"mb-3",children:_}):null,f&&f.length>0?e.jsx("div",{className:"card mb-3",children:e.jsxs("div",{className:"card-body py-3",children:[e.jsx("h6",{className:"mb-2",children:"Last run results"}),e.jsx("ul",{className:"mb-0 small list-unstyled",children:f.map((a,s)=>e.jsxs("li",{children:[a.plan,": ",a.status==="ok"?"✓":a.status==="skipped"?"⊘":"✗"," ",a.msg||""]},s))})]})}):null,e.jsxs("p",{className:"small text-secondary mb-3",children:["Schedule automated backups. Add a cron entry (e.g. ",e.jsx("code",{children:"0 * * * *"})," hourly) to call"," ",e.jsx("code",{children:"POST /api/v1/backup/run-scheduled"})," with your auth token."]}),e.jsx("div",{className:"card",children:e.jsxs(Z,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Type"}),e.jsx("th",{children:"Target"}),e.jsx("th",{children:"Schedule"}),e.jsx("th",{children:"Enabled"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:g.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"p-0",children:e.jsx(ee,{title:"No backup plans",description:'Click "Add Plan" to create one.'})})}):g.map(a=>e.jsxs("tr",{children:[e.jsx("td",{children:a.name}),e.jsx("td",{children:a.plan_type}),e.jsx("td",{children:Y(a)}),e.jsx("td",{children:e.jsx("code",{className:"small",children:a.schedule})}),e.jsx("td",{children:a.enabled?"Yes":"No"}),e.jsxs("td",{className:"text-end",children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-primary p-1",title:"Edit",onClick:()=>Q(a),children:e.jsx("i",{className:"ti ti-pencil","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Delete",onClick:()=>V(a.id,a.name),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]})]},a.id))})]})}),e.jsxs(n,{show:!!r,onHide:()=>p(null),centered:!0,children:[e.jsx(n.Header,{closeButton:!0,children:e.jsx(n.Title,{children:"Edit Backup Plan"})}),r?e.jsxs("form",{onSubmit:U,children:[e.jsxs(n.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Name"}),e.jsx("input",{name:"edit_name",type:"text",defaultValue:r.name,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Type"}),e.jsxs("select",{value:c,onChange:a=>C(a.target.value),className:"form-select",children:[e.jsx("option",{value:"site",children:"Site"}),e.jsx("option",{value:"database",children:"Database"})]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Target"}),e.jsx("select",{name:"edit_target_id",defaultValue:c===r.plan_type?r.target_id:c==="site"?(A=u[0])==null?void 0:A.id:(D=h[0])==null?void 0:D.id,className:"form-select",required:!0,children:c==="site"?u.map(a=>e.jsx("option",{value:a.id,children:a.name},`s-${a.id}`)):h.map(a=>e.jsxs("option",{value:a.id,children:[a.name," (",a.db_type,")"]},`d-${a.id}`))},c)]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Schedule (cron)"}),e.jsx("input",{name:"edit_schedule",type:"text",defaultValue:r.schedule,className:"form-control",required:!0})]}),e.jsxs("div",{className:"form-check",children:[e.jsx("input",{name:"edit_enabled",type:"checkbox",defaultChecked:r.enabled,className:"form-check-input",id:"edit_enabled"}),e.jsx("label",{className:"form-check-label",htmlFor:"edit_enabled",children:"Enabled"})]})]}),e.jsxs(n.Footer,{children:[e.jsx(m,{type:"button",variant:"secondary",onClick:()=>p(null),children:"Cancel"}),e.jsx(m,{type:"submit",variant:"primary",children:"Update"})]})]}):null]}),e.jsxs(n,{show:F,onHide:()=>x(!1),centered:!0,children:[e.jsx(n.Header,{closeButton:!0,children:e.jsx(n.Title,{children:"Add Backup Plan"})}),e.jsxs("form",{onSubmit:M,children:[e.jsxs(n.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Name"}),e.jsx("input",{name:"name",type:"text",placeholder:"Daily site backup",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Type"}),e.jsxs("select",{name:"plan_type",value:E,onChange:a=>H(a.target.value),className:"form-select",children:[e.jsx("option",{value:"site",children:"Site"}),e.jsx("option",{value:"database",children:"Database"})]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Target"}),e.jsxs("select",{name:"target_id",className:"form-select",required:!0,children:[e.jsx("option",{value:"",children:"Select…"}),E==="site"?u.map(a=>e.jsx("option",{value:a.id,children:a.name},`s-${a.id}`)):h.map(a=>e.jsxs("option",{value:a.id,children:[a.name," (",a.db_type,")"]},`d-${a.id}`))]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Schedule (cron)"}),e.jsx("input",{name:"schedule",type:"text",placeholder:"0 2 * * *",className:"form-control",required:!0}),e.jsx("div",{className:"form-text",children:"e.g. 0 2 * * * = daily at 2am, 0 */6 * * * = every 6 hours"})]}),e.jsxs("div",{className:"form-check",children:[e.jsx("input",{name:"enabled",type:"checkbox",defaultChecked:!0,className:"form-check-input",id:"plan_enabled"}),e.jsx("label",{className:"form-check-label",htmlFor:"plan_enabled",children:"Enabled"})]})]}),e.jsxs(n.Footer,{children:[e.jsx(m,{type:"button",variant:"secondary",onClick:()=>x(!1),children:"Cancel"}),e.jsx(m,{type:"submit",variant:"primary",disabled:S,children:S?"Creating…":"Create"})]})]})]})]})}export{de as BackupPlansPage}; diff --git a/YakPanel-server/frontend/dist/assets/ConfigPage-eLTvRUp2.js b/YakPanel-server/frontend/dist/assets/ConfigPage-eLTvRUp2.js deleted file mode 100644 index f96351de..00000000 --- a/YakPanel-server/frontend/dist/assets/ConfigPage-eLTvRUp2.js +++ /dev/null @@ -1 +0,0 @@ -import{r as l,a,j as e,R as K,S as Q}from"./index-CRR9sQ49.js";import{A as j}from"./AdminAlert-DW1IRWce.js";import{A as b}from"./AdminButton-Bd2cLTu3.js";import{A as p}from"./AdminCard-DNA70pGd.js";import{P as N}from"./PageHeader-BcjNf7GG.js";function Y(){const[r,E]=l.useState(null),[m,I]=l.useState({}),[q,A]=l.useState(!0),[i,v]=l.useState(""),[J,y]=l.useState(!1),[R,w]=l.useState(!1),[g,o]=l.useState(""),[u,h]=l.useState(null);l.useEffect(()=>{Promise.all([a("/config/panel"),a("/config/keys")]).then(([t,s])=>{E(t),I(s||{})}).catch(t=>v(t.message)).finally(()=>A(!1))},[]);const L=t=>{t.preventDefault(),w(!1),o("");const s=t.currentTarget,c=s.elements.namedItem("old_password").value,n=s.elements.namedItem("new_password").value,x=s.elements.namedItem("confirm_password").value;if(!c||!n){o("All fields required");return}if(n!==x){o("New passwords do not match");return}if(n.length<6){o("Password must be at least 6 characters");return}Q(c,n).then(()=>{w(!0),s.reset()}).catch(f=>o(f.message))},V=()=>{h(null),K().then(()=>h("Test email sent!")).catch(t=>h(`Failed: ${t.message}`))},M=t=>{var P,k,O,T,C;t.preventDefault(),y(!1);const s=t.currentTarget,c=s.elements.namedItem("panel_port").value,n=s.elements.namedItem("www_root").value,x=s.elements.namedItem("setup_path").value,f=s.elements.namedItem("webserver_type").value,S=s.elements.namedItem("mysql_root").value,F=((P=s.elements.namedItem("email_to"))==null?void 0:P.value)||"",W=((k=s.elements.namedItem("smtp_server"))==null?void 0:k.value)||"",U=((O=s.elements.namedItem("smtp_port"))==null?void 0:O.value)||"587",D=((T=s.elements.namedItem("smtp_user"))==null?void 0:T.value)||"",_=((C=s.elements.namedItem("smtp_password"))==null?void 0:C.value)||"",d=[a("/config/set",{method:"POST",body:JSON.stringify({key:"panel_port",value:c})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"www_root",value:n})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"setup_path",value:x})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"webserver_type",value:f})})];S&&d.push(a("/config/set",{method:"POST",body:JSON.stringify({key:"mysql_root",value:S})})),d.push(a("/config/set",{method:"POST",body:JSON.stringify({key:"email_to",value:F})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"smtp_server",value:W})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"smtp_port",value:U})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"smtp_user",value:D})})),_&&d.push(a("/config/set",{method:"POST",body:JSON.stringify({key:"smtp_password",value:_})})),Promise.all(d).then(()=>y(!0)).catch(B=>v(B.message))};return q?e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Settings"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):r?e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Settings"}),i?e.jsx(j,{className:"mb-3",children:i}):null,e.jsxs("form",{onSubmit:M,className:"row g-3",children:[e.jsx("div",{className:"col-12 col-xl-6",children:e.jsxs(p,{title:"Panel",iconClass:"ti ti-adjustments-horizontal",children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Panel Port"}),e.jsx("input",{name:"panel_port",type:"number",defaultValue:r.panel_port,className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"WWW Root"}),e.jsx("input",{name:"www_root",type:"text",defaultValue:r.www_root,className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Setup Path"}),e.jsx("input",{name:"setup_path",type:"text",defaultValue:r.setup_path,className:"form-control"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Webserver"}),e.jsxs("select",{name:"webserver_type",defaultValue:r.webserver_type,className:"form-select",children:[e.jsx("option",{value:"nginx",children:"Nginx"}),e.jsx("option",{value:"apache",children:"Apache"}),e.jsx("option",{value:"openlitespeed",children:"OpenLiteSpeed"})]})]})]})}),e.jsx("div",{className:"col-12 col-xl-6",children:e.jsxs(p,{title:"Notifications (Email)",iconClass:"ti ti-mail",children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Email To"}),e.jsx("input",{name:"email_to",type:"email",defaultValue:m.email_to,placeholder:"admin@example.com",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SMTP Server"}),e.jsx("input",{name:"smtp_server",type:"text",defaultValue:m.smtp_server,placeholder:"smtp.gmail.com",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SMTP Port"}),e.jsx("input",{name:"smtp_port",type:"number",defaultValue:m.smtp_port||"587",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SMTP User"}),e.jsx("input",{name:"smtp_user",type:"text",defaultValue:m.smtp_user,className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SMTP Password"}),e.jsx("input",{name:"smtp_password",type:"password",placeholder:m.smtp_password?"•••••••• (leave blank to keep)":"Optional",className:"form-control"})]}),e.jsx("p",{className:"small text-secondary",children:"Used for panel alerts (e.g. backup completion, security warnings)."}),e.jsxs(b,{type:"button",variant:"warning",className:"mt-2",onClick:V,children:[e.jsx("i",{className:"ti ti-mail me-1","aria-hidden":!0}),"Send Test Email"]}),u?e.jsx("p",{className:`small mt-2 mb-0 ${u.startsWith("Failed")?"text-danger":"text-success"}`,children:u}):null]})}),e.jsx("div",{className:"col-12 col-xl-6",children:e.jsx(p,{title:"MySQL",iconClass:"ti ti-database",children:e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Root Password"}),e.jsx("input",{name:"mysql_root",type:"password",placeholder:r.mysql_root_set?"•••••••• (leave blank to keep)":"Required for real DB creation",className:"form-control"}),e.jsx("p",{className:"small text-secondary mt-2 mb-0",children:"Used to create/drop MySQL databases. Leave blank to keep current."})]})})}),e.jsxs("div",{className:"col-12",children:[e.jsxs(b,{type:"submit",variant:"primary",children:[e.jsx("i",{className:"ti ti-device-floppy me-1","aria-hidden":!0}),"Save"]}),J?e.jsx("span",{className:"text-success ms-3 small",children:"Saved"}):null]})]}),e.jsx("div",{className:"col-12 col-xl-6 mt-3 px-0",children:e.jsx(p,{title:"Change Password",iconClass:"ti ti-key",children:e.jsxs("form",{onSubmit:L,children:[g?e.jsx(j,{className:"mb-3",children:g}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Current Password"}),e.jsx("input",{name:"old_password",type:"password",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"New Password"}),e.jsx("input",{name:"new_password",type:"password",minLength:6,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Confirm New Password"}),e.jsx("input",{name:"confirm_password",type:"password",minLength:6,className:"form-control",required:!0})]}),e.jsxs(b,{type:"submit",variant:"warning",children:[e.jsx("i",{className:"ti ti-key me-1","aria-hidden":!0}),"Change Password"]}),R?e.jsx("span",{className:"text-success ms-3 small",children:"Password changed"}):null]})})}),e.jsxs("div",{className:"alert alert-secondary mt-4 mb-0",children:[e.jsxs("p",{className:"mb-1",children:[e.jsx("strong",{children:"App:"})," ",r.app_name," v",r.app_version]}),e.jsx("p",{className:"mb-0 small",children:"Note: Some settings require a panel restart to take effect."})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Settings"}),i?e.jsx(j,{children:i}):null]})}export{Y as ConfigPage}; diff --git a/YakPanel-server/frontend/dist/assets/ConfigPage-t5KRejpn.js b/YakPanel-server/frontend/dist/assets/ConfigPage-t5KRejpn.js new file mode 100644 index 00000000..2ffc577b --- /dev/null +++ b/YakPanel-server/frontend/dist/assets/ConfigPage-t5KRejpn.js @@ -0,0 +1 @@ +import{r as l,M as a,j as e,W as K,X as Q}from"./index-Cvh4tLHo.js";import{A as j}from"./AdminAlert-Bt3L8_zJ.js";import{A as b}from"./AdminButton-BKglG8kI.js";import{A as p}from"./AdminCard-BYkisaPa.js";import{P as N}from"./PageHeader-D6k34vvM.js";function Y(){const[r,E]=l.useState(null),[m,I]=l.useState({}),[q,A]=l.useState(!0),[i,v]=l.useState(""),[J,y]=l.useState(!1),[R,w]=l.useState(!1),[g,o]=l.useState(""),[u,h]=l.useState(null);l.useEffect(()=>{Promise.all([a("/config/panel"),a("/config/keys")]).then(([t,s])=>{E(t),I(s||{})}).catch(t=>v(t.message)).finally(()=>A(!1))},[]);const L=t=>{t.preventDefault(),w(!1),o("");const s=t.currentTarget,c=s.elements.namedItem("old_password").value,n=s.elements.namedItem("new_password").value,x=s.elements.namedItem("confirm_password").value;if(!c||!n){o("All fields required");return}if(n!==x){o("New passwords do not match");return}if(n.length<6){o("Password must be at least 6 characters");return}Q(c,n).then(()=>{w(!0),s.reset()}).catch(f=>o(f.message))},V=()=>{h(null),K().then(()=>h("Test email sent!")).catch(t=>h(`Failed: ${t.message}`))},M=t=>{var P,k,O,T,C;t.preventDefault(),y(!1);const s=t.currentTarget,c=s.elements.namedItem("panel_port").value,n=s.elements.namedItem("www_root").value,x=s.elements.namedItem("setup_path").value,f=s.elements.namedItem("webserver_type").value,S=s.elements.namedItem("mysql_root").value,W=((P=s.elements.namedItem("email_to"))==null?void 0:P.value)||"",F=((k=s.elements.namedItem("smtp_server"))==null?void 0:k.value)||"",U=((O=s.elements.namedItem("smtp_port"))==null?void 0:O.value)||"587",D=((T=s.elements.namedItem("smtp_user"))==null?void 0:T.value)||"",_=((C=s.elements.namedItem("smtp_password"))==null?void 0:C.value)||"",d=[a("/config/set",{method:"POST",body:JSON.stringify({key:"panel_port",value:c})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"www_root",value:n})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"setup_path",value:x})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"webserver_type",value:f})})];S&&d.push(a("/config/set",{method:"POST",body:JSON.stringify({key:"mysql_root",value:S})})),d.push(a("/config/set",{method:"POST",body:JSON.stringify({key:"email_to",value:W})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"smtp_server",value:F})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"smtp_port",value:U})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"smtp_user",value:D})})),_&&d.push(a("/config/set",{method:"POST",body:JSON.stringify({key:"smtp_password",value:_})})),Promise.all(d).then(()=>y(!0)).catch(B=>v(B.message))};return q?e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Settings"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):r?e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Settings"}),i?e.jsx(j,{className:"mb-3",children:i}):null,e.jsxs("form",{onSubmit:M,className:"row g-3",children:[e.jsx("div",{className:"col-12 col-xl-6",children:e.jsxs(p,{title:"Panel",iconClass:"ti ti-adjustments-horizontal",children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Panel Port"}),e.jsx("input",{name:"panel_port",type:"number",defaultValue:r.panel_port,className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"WWW Root"}),e.jsx("input",{name:"www_root",type:"text",defaultValue:r.www_root,className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Setup Path"}),e.jsx("input",{name:"setup_path",type:"text",defaultValue:r.setup_path,className:"form-control"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Webserver"}),e.jsxs("select",{name:"webserver_type",defaultValue:r.webserver_type,className:"form-select",children:[e.jsx("option",{value:"nginx",children:"Nginx"}),e.jsx("option",{value:"apache",children:"Apache"}),e.jsx("option",{value:"openlitespeed",children:"OpenLiteSpeed"})]})]})]})}),e.jsx("div",{className:"col-12 col-xl-6",children:e.jsxs(p,{title:"Notifications (Email)",iconClass:"ti ti-mail",children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Email To"}),e.jsx("input",{name:"email_to",type:"email",defaultValue:m.email_to,placeholder:"admin@example.com",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SMTP Server"}),e.jsx("input",{name:"smtp_server",type:"text",defaultValue:m.smtp_server,placeholder:"smtp.gmail.com",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SMTP Port"}),e.jsx("input",{name:"smtp_port",type:"number",defaultValue:m.smtp_port||"587",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SMTP User"}),e.jsx("input",{name:"smtp_user",type:"text",defaultValue:m.smtp_user,className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SMTP Password"}),e.jsx("input",{name:"smtp_password",type:"password",placeholder:m.smtp_password?"•••••••• (leave blank to keep)":"Optional",className:"form-control"})]}),e.jsx("p",{className:"small text-secondary",children:"Used for panel alerts (e.g. backup completion, security warnings)."}),e.jsxs(b,{type:"button",variant:"warning",className:"mt-2",onClick:V,children:[e.jsx("i",{className:"ti ti-mail me-1","aria-hidden":!0}),"Send Test Email"]}),u?e.jsx("p",{className:`small mt-2 mb-0 ${u.startsWith("Failed")?"text-danger":"text-success"}`,children:u}):null]})}),e.jsx("div",{className:"col-12 col-xl-6",children:e.jsx(p,{title:"MySQL",iconClass:"ti ti-database",children:e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Root Password"}),e.jsx("input",{name:"mysql_root",type:"password",placeholder:r.mysql_root_set?"•••••••• (leave blank to keep)":"Required for real DB creation",className:"form-control"}),e.jsx("p",{className:"small text-secondary mt-2 mb-0",children:"Used to create/drop MySQL databases. Leave blank to keep current."})]})})}),e.jsxs("div",{className:"col-12",children:[e.jsxs(b,{type:"submit",variant:"primary",children:[e.jsx("i",{className:"ti ti-device-floppy me-1","aria-hidden":!0}),"Save"]}),J?e.jsx("span",{className:"text-success ms-3 small",children:"Saved"}):null]})]}),e.jsx("div",{className:"col-12 col-xl-6 mt-3 px-0",children:e.jsx(p,{title:"Change Password",iconClass:"ti ti-key",children:e.jsxs("form",{onSubmit:L,children:[g?e.jsx(j,{className:"mb-3",children:g}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Current Password"}),e.jsx("input",{name:"old_password",type:"password",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"New Password"}),e.jsx("input",{name:"new_password",type:"password",minLength:6,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Confirm New Password"}),e.jsx("input",{name:"confirm_password",type:"password",minLength:6,className:"form-control",required:!0})]}),e.jsxs(b,{type:"submit",variant:"warning",children:[e.jsx("i",{className:"ti ti-key me-1","aria-hidden":!0}),"Change Password"]}),R?e.jsx("span",{className:"text-success ms-3 small",children:"Password changed"}):null]})})}),e.jsxs("div",{className:"alert alert-secondary mt-4 mb-0",children:[e.jsxs("p",{className:"mb-1",children:[e.jsx("strong",{children:"App:"})," ",r.app_name," v",r.app_version]}),e.jsx("p",{className:"mb-0 small",children:"Note: Some settings require a panel restart to take effect."})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Settings"}),i?e.jsx(j,{children:i}):null]})}export{Y as ConfigPage}; diff --git a/YakPanel-server/frontend/dist/assets/CrontabPage-BfaMKQc8.js b/YakPanel-server/frontend/dist/assets/CrontabPage-DgbkO6Z_.js similarity index 87% rename from YakPanel-server/frontend/dist/assets/CrontabPage-BfaMKQc8.js rename to YakPanel-server/frontend/dist/assets/CrontabPage-DgbkO6Z_.js index abbff36b..7ebfffbc 100644 --- a/YakPanel-server/frontend/dist/assets/CrontabPage-BfaMKQc8.js +++ b/YakPanel-server/frontend/dist/assets/CrontabPage-DgbkO6Z_.js @@ -1 +1 @@ -import{r as s,j as e,a as m,Q as L}from"./index-CRR9sQ49.js";import{M as i}from"./Modal-B7V4w_St.js";import{A}from"./AdminAlert-DW1IRWce.js";import{A as h}from"./AdminButton-Bd2cLTu3.js";import{A as J}from"./AdminTable-BLiLxfnS.js";import{E as M}from"./EmptyState-C61VdEFl.js";import{P as w}from"./PageHeader-BcjNf7GG.js";const O=[{label:"Every minute",value:"* * * * *"},{label:"Every 5 min",value:"*/5 * * * *"},{label:"Every hour",value:"0 * * * *"},{label:"Daily",value:"0 0 * * *"},{label:"Weekly",value:"0 0 * * 0"}];function G(){const[u,k]=s.useState([]),[D,j]=s.useState(!0),[f,x]=s.useState(""),[T,n]=s.useState(!1),[r,c]=s.useState(null),[l,o]=s.useState(null),[y,v]=s.useState(!1),[N,p]=s.useState(""),[b,g]=s.useState(!1),d=()=>{j(!0),m("/crontab/list").then(k).catch(t=>x(t.message)).finally(()=>j(!1))};s.useEffect(()=>{d()},[]);const F=t=>{t.preventDefault();const a=t.currentTarget,B=a.elements.namedItem("name").value.trim(),S=a.elements.namedItem("schedule").value.trim(),E=a.elements.namedItem("execstr").value.trim();if(!S||!E){p("Schedule and command are required");return}v(!0),p("");const C={name:B,type:"shell",schedule:S,execstr:E};(r?m(`/crontab/${r}`,{method:"PUT",body:JSON.stringify(C)}):m("/crontab/create",{method:"POST",body:JSON.stringify(C)})).then(()=>{n(!1),c(null),a.reset(),d()}).catch(H=>p(H.message)).finally(()=>v(!1))},I=t=>{c(t.id),o(t),n(!0)},P=t=>{confirm("Delete this cron job?")&&m(`/crontab/${t}`,{method:"DELETE"}).then(d).catch(a=>x(a.message))},q=()=>{g(!0),L().then(d).catch(t=>x(t.message)).finally(()=>g(!1))};return D?e.jsxs(e.Fragment,{children:[e.jsx(w,{title:"Cron"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(w,{title:"Cron",actions:e.jsxs("div",{className:"d-flex flex-wrap gap-2",children:[e.jsxs(h,{variant:"success",disabled:b||u.length===0,onClick:q,children:[b?e.jsx("span",{className:"spinner-border spinner-border-sm me-1",role:"status"}):e.jsx("i",{className:"ti ti-bolt me-1","aria-hidden":!0}),b?"Applying…":"Apply to System"]}),e.jsxs(h,{variant:"primary",onClick:()=>{c(null),o(null),n(!0)},children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add Cron"]})]})}),f?e.jsx(A,{className:"mb-3",children:f}):null,e.jsxs(i,{show:T,onHide:()=>{n(!1),c(null),o(null)},centered:!0,size:"lg",children:[e.jsx(i.Header,{closeButton:!0,children:e.jsx(i.Title,{children:r?"Edit Cron Job":"Create Cron Job"})}),e.jsxs("form",{onSubmit:F,children:[e.jsxs(i.Body,{children:[N?e.jsx(A,{className:"mb-3",children:N}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Name (optional)"}),e.jsx("input",{id:"cron-name",name:"name",type:"text",placeholder:"My task",defaultValue:l==null?void 0:l.name,className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Schedule (cron)"}),e.jsxs("select",{className:"form-select mb-2",onChange:t=>{const a=t.target.value;a&&(document.getElementById("cron-schedule").value=a)},children:[e.jsx("option",{value:"",children:"Select preset…"}),O.map(t=>e.jsxs("option",{value:t.value,children:[t.label," (",t.value,")"]},t.value))]}),e.jsx("input",{id:"cron-schedule",name:"schedule",type:"text",placeholder:"* * * * *",defaultValue:l==null?void 0:l.schedule,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Command"}),e.jsx("textarea",{id:"cron-execstr",name:"execstr",rows:3,placeholder:"/usr/bin/php /www/wwwroot/script.php",defaultValue:l==null?void 0:l.execstr,className:"form-control",required:!0})]})]}),e.jsxs(i.Footer,{children:[e.jsx(h,{type:"button",variant:"secondary",onClick:()=>{n(!1),c(null),o(null)},children:"Cancel"}),e.jsx(h,{type:"submit",variant:"primary",disabled:y,children:y?"Saving…":r?"Update":"Create"})]})]},r??"new")]}),e.jsx("div",{className:"alert alert-warning small mb-3",children:'Jobs are stored in the panel. Click "Apply to System" to sync them to the system crontab (root).'}),e.jsx("div",{className:"card",children:e.jsxs(J,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Schedule"}),e.jsx("th",{children:"Command"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:u.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"p-0",children:e.jsx(M,{title:"No cron jobs",description:'Click "Add Cron" to create one.'})})}):u.map(t=>e.jsxs("tr",{children:[e.jsx("td",{children:t.name||"—"}),e.jsx("td",{children:e.jsx("code",{className:"small",children:t.schedule})}),e.jsx("td",{className:"small font-monospace text-truncate",style:{maxWidth:280},title:t.execstr,children:t.execstr}),e.jsxs("td",{className:"text-end",children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-primary p-1",title:"Edit",onClick:()=>I(t),children:e.jsx("i",{className:"ti ti-edit","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Delete",onClick:()=>P(t.id),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]})]},t.id))})]})})]})}export{G as CrontabPage}; +import{r as s,j as e,M as m,V as L}from"./index-Cvh4tLHo.js";import{M as i}from"./Modal-CCihVZTY.js";import{A}from"./AdminAlert-Bt3L8_zJ.js";import{A as h}from"./AdminButton-BKglG8kI.js";import{A as M}from"./AdminTable-BQ5Lf7EC.js";import{E as V}from"./EmptyState-D6lCh4WN.js";import{P as w}from"./PageHeader-D6k34vvM.js";const J=[{label:"Every minute",value:"* * * * *"},{label:"Every 5 min",value:"*/5 * * * *"},{label:"Every hour",value:"0 * * * *"},{label:"Daily",value:"0 0 * * *"},{label:"Weekly",value:"0 0 * * 0"}];function K(){const[u,k]=s.useState([]),[D,j]=s.useState(!0),[f,x]=s.useState(""),[T,n]=s.useState(!1),[r,c]=s.useState(null),[l,o]=s.useState(null),[y,v]=s.useState(!1),[N,p]=s.useState(""),[b,g]=s.useState(!1),d=()=>{j(!0),m("/crontab/list").then(k).catch(t=>x(t.message)).finally(()=>j(!1))};s.useEffect(()=>{d()},[]);const F=t=>{t.preventDefault();const a=t.currentTarget,B=a.elements.namedItem("name").value.trim(),S=a.elements.namedItem("schedule").value.trim(),E=a.elements.namedItem("execstr").value.trim();if(!S||!E){p("Schedule and command are required");return}v(!0),p("");const C={name:B,type:"shell",schedule:S,execstr:E};(r?m(`/crontab/${r}`,{method:"PUT",body:JSON.stringify(C)}):m("/crontab/create",{method:"POST",body:JSON.stringify(C)})).then(()=>{n(!1),c(null),a.reset(),d()}).catch(H=>p(H.message)).finally(()=>v(!1))},I=t=>{c(t.id),o(t),n(!0)},P=t=>{confirm("Delete this cron job?")&&m(`/crontab/${t}`,{method:"DELETE"}).then(d).catch(a=>x(a.message))},q=()=>{g(!0),L().then(d).catch(t=>x(t.message)).finally(()=>g(!1))};return D?e.jsxs(e.Fragment,{children:[e.jsx(w,{title:"Cron"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(w,{title:"Cron",actions:e.jsxs("div",{className:"d-flex flex-wrap gap-2",children:[e.jsxs(h,{variant:"success",disabled:b||u.length===0,onClick:q,children:[b?e.jsx("span",{className:"spinner-border spinner-border-sm me-1",role:"status"}):e.jsx("i",{className:"ti ti-bolt me-1","aria-hidden":!0}),b?"Applying…":"Apply to System"]}),e.jsxs(h,{variant:"primary",onClick:()=>{c(null),o(null),n(!0)},children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add Cron"]})]})}),f?e.jsx(A,{className:"mb-3",children:f}):null,e.jsxs(i,{show:T,onHide:()=>{n(!1),c(null),o(null)},centered:!0,size:"lg",children:[e.jsx(i.Header,{closeButton:!0,children:e.jsx(i.Title,{children:r?"Edit Cron Job":"Create Cron Job"})}),e.jsxs("form",{onSubmit:F,children:[e.jsxs(i.Body,{children:[N?e.jsx(A,{className:"mb-3",children:N}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Name (optional)"}),e.jsx("input",{id:"cron-name",name:"name",type:"text",placeholder:"My task",defaultValue:l==null?void 0:l.name,className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Schedule (cron)"}),e.jsxs("select",{className:"form-select mb-2",onChange:t=>{const a=t.target.value;a&&(document.getElementById("cron-schedule").value=a)},children:[e.jsx("option",{value:"",children:"Select preset…"}),J.map(t=>e.jsxs("option",{value:t.value,children:[t.label," (",t.value,")"]},t.value))]}),e.jsx("input",{id:"cron-schedule",name:"schedule",type:"text",placeholder:"* * * * *",defaultValue:l==null?void 0:l.schedule,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Command"}),e.jsx("textarea",{id:"cron-execstr",name:"execstr",rows:3,placeholder:"/usr/bin/php /www/wwwroot/script.php",defaultValue:l==null?void 0:l.execstr,className:"form-control",required:!0})]})]}),e.jsxs(i.Footer,{children:[e.jsx(h,{type:"button",variant:"secondary",onClick:()=>{n(!1),c(null),o(null)},children:"Cancel"}),e.jsx(h,{type:"submit",variant:"primary",disabled:y,children:y?"Saving…":r?"Update":"Create"})]})]},r??"new")]}),e.jsx("div",{className:"alert alert-warning small mb-3",children:'Jobs are stored in the panel. Click "Apply to System" to sync them to the system crontab (root).'}),e.jsx("div",{className:"card",children:e.jsxs(M,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Schedule"}),e.jsx("th",{children:"Command"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:u.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"p-0",children:e.jsx(V,{title:"No cron jobs",description:'Click "Add Cron" to create one.'})})}):u.map(t=>e.jsxs("tr",{children:[e.jsx("td",{children:t.name||"—"}),e.jsx("td",{children:e.jsx("code",{className:"small",children:t.schedule})}),e.jsx("td",{className:"small font-monospace text-truncate",style:{maxWidth:280},title:t.execstr,children:t.execstr}),e.jsxs("td",{className:"text-end",children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-primary p-1",title:"Edit",onClick:()=>I(t),children:e.jsx("i",{className:"ti ti-edit","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Delete",onClick:()=>P(t.id),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]})]},t.id))})]})})]})}export{K as CrontabPage}; diff --git a/YakPanel-server/frontend/dist/assets/DashboardPage-CukNUmp0.js b/YakPanel-server/frontend/dist/assets/DashboardPage-WBszSOQ2.js similarity index 91% rename from YakPanel-server/frontend/dist/assets/DashboardPage-CukNUmp0.js rename to YakPanel-server/frontend/dist/assets/DashboardPage-WBszSOQ2.js index ce98b0a7..7798c67e 100644 --- a/YakPanel-server/frontend/dist/assets/DashboardPage-CukNUmp0.js +++ b/YakPanel-server/frontend/dist/assets/DashboardPage-WBszSOQ2.js @@ -1 +1 @@ -import{r as i,g as m,j as s}from"./index-CRR9sQ49.js";import{A as n}from"./AdminAlert-DW1IRWce.js";import{A as o}from"./AdminCard-DNA70pGd.js";import{P as d}from"./PageHeader-BcjNf7GG.js";function p(){const[e,r]=i.useState(null),[a,l]=i.useState("");return i.useEffect(()=>{m().then(r).catch(c=>l(c.message))},[]),a?s.jsxs(s.Fragment,{children:[s.jsx(d,{}),s.jsx(n,{variant:"danger",children:a})]}):e?s.jsxs(s.Fragment,{children:[s.jsx(d,{}),s.jsxs("div",{className:"row g-3 mb-4",children:[s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-world",title:"Websites",value:e.site_count})}),s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-folder-share",title:"FTP Accounts",value:e.ftp_count})}),s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-database",title:"Databases",value:e.database_count})})]}),s.jsxs("div",{className:"row g-3",children:[s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-cpu",title:"CPU",value:`${e.system.cpu_percent}%`})}),s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-device-desktop",title:"Memory",value:`${e.system.memory_percent}%`,subtitle:`${e.system.memory_used_mb} / ${e.system.memory_total_mb} MB`})}),s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-database-export",title:"Disk",value:`${e.system.disk_percent}%`,subtitle:`${e.system.disk_used_gb} / ${e.system.disk_total_gb} GB`})})]})]}):s.jsxs(s.Fragment,{children:[s.jsx(d,{}),s.jsx("div",{className:"placeholder-glow",children:s.jsx("span",{className:"placeholder col-12 rounded",style:{height:"8rem"}})})]})}function t({iconClass:e,title:r,value:a,subtitle:l}){return s.jsxs(o,{className:"border-0 shadow-sm",bodyClassName:"d-flex align-items-center gap-3",children:[s.jsx("span",{className:"avatar avatar-md bg-primary-transparent text-primary rounded-circle d-flex align-items-center justify-content-center flex-shrink-0",children:s.jsx("i",{className:`${e} fs-4`,"aria-hidden":!0})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-muted mb-0 small",children:r}),s.jsx("p",{className:"fs-4 fw-semibold mb-0",children:a}),l?s.jsx("p",{className:"text-muted small mb-0",children:l}):null]})]})}export{p as DashboardPage}; +import{r as i,g as m,j as s}from"./index-Cvh4tLHo.js";import{A as n}from"./AdminAlert-Bt3L8_zJ.js";import{A as o}from"./AdminCard-BYkisaPa.js";import{P as d}from"./PageHeader-D6k34vvM.js";function p(){const[e,r]=i.useState(null),[a,l]=i.useState("");return i.useEffect(()=>{m().then(r).catch(c=>l(c.message))},[]),a?s.jsxs(s.Fragment,{children:[s.jsx(d,{}),s.jsx(n,{variant:"danger",children:a})]}):e?s.jsxs(s.Fragment,{children:[s.jsx(d,{}),s.jsxs("div",{className:"row g-3 mb-4",children:[s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-world",title:"Websites",value:e.site_count})}),s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-folder-share",title:"FTP Accounts",value:e.ftp_count})}),s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-database",title:"Databases",value:e.database_count})})]}),s.jsxs("div",{className:"row g-3",children:[s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-cpu",title:"CPU",value:`${e.system.cpu_percent}%`})}),s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-device-desktop",title:"Memory",value:`${e.system.memory_percent}%`,subtitle:`${e.system.memory_used_mb} / ${e.system.memory_total_mb} MB`})}),s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-database-export",title:"Disk",value:`${e.system.disk_percent}%`,subtitle:`${e.system.disk_used_gb} / ${e.system.disk_total_gb} GB`})})]})]}):s.jsxs(s.Fragment,{children:[s.jsx(d,{}),s.jsx("div",{className:"placeholder-glow",children:s.jsx("span",{className:"placeholder col-12 rounded",style:{height:"8rem"}})})]})}function t({iconClass:e,title:r,value:a,subtitle:l}){return s.jsxs(o,{className:"border-0 shadow-sm",bodyClassName:"d-flex align-items-center gap-3",children:[s.jsx("span",{className:"avatar avatar-md bg-primary-transparent text-primary rounded-circle d-flex align-items-center justify-content-center flex-shrink-0",children:s.jsx("i",{className:`${e} fs-4`,"aria-hidden":!0})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-muted mb-0 small",children:r}),s.jsx("p",{className:"fs-4 fw-semibold mb-0",children:a}),l?s.jsx("p",{className:"text-muted small mb-0",children:l}):null]})]})}export{p as DashboardPage}; diff --git a/YakPanel-server/frontend/dist/assets/DatabasePage-sZfqfvMQ.js b/YakPanel-server/frontend/dist/assets/DatabasePage-B_-EguhK.js similarity index 80% rename from YakPanel-server/frontend/dist/assets/DatabasePage-sZfqfvMQ.js rename to YakPanel-server/frontend/dist/assets/DatabasePage-B_-EguhK.js index 92376e84..e6ec94d7 100644 --- a/YakPanel-server/frontend/dist/assets/DatabasePage-sZfqfvMQ.js +++ b/YakPanel-server/frontend/dist/assets/DatabasePage-B_-EguhK.js @@ -1 +1 @@ -import{r as n,j as e,a as v,J as E,K as O,L as G,M as V,N as W}from"./index-CRR9sQ49.js";import{M as a}from"./Modal-B7V4w_St.js";import{A as b}from"./AdminAlert-DW1IRWce.js";import{A as _}from"./AdminButton-Bd2cLTu3.js";import{A as X}from"./AdminTable-BLiLxfnS.js";import{E as Y}from"./EmptyState-C61VdEFl.js";import{P as D}from"./PageHeader-BcjNf7GG.js";function re(){const[j,T]=n.useState([]),[A,C]=n.useState(!0),[o,c]=n.useState(""),[I,d]=n.useState(!1),[S,B]=n.useState(!1),[P,f]=n.useState(""),[l,m]=n.useState(null),[L,g]=n.useState([]),[N,u]=n.useState(!1),[y,h]=n.useState(null),[M,p]=n.useState(""),w=()=>{C(!0),v("/database/list").then(T).catch(s=>c(s.message)).finally(()=>C(!1))};n.useEffect(()=>{w()},[]);const Q=s=>{s.preventDefault();const t=s.currentTarget,r=t.elements.namedItem("name").value.trim(),i=t.elements.namedItem("username").value.trim(),x=t.elements.namedItem("password").value,k=t.elements.namedItem("db_type").value,J=t.elements.namedItem("ps").value.trim();if(!r||!i||!x){f("Name, username and password are required");return}B(!0),f(""),v("/database/create",{method:"POST",body:JSON.stringify({name:r,username:i,password:x,db_type:k,ps:J})}).then(()=>{d(!1),t.reset(),w()}).catch(K=>f(K.message)).finally(()=>B(!1))},F=(s,t)=>{confirm(`Delete database "${t}"?`)&&v(`/database/${s}`,{method:"DELETE"}).then(w).catch(r=>c(r.message))},q=s=>{m(s),g([]),E(s).then(t=>g(t.backups||[])).catch(t=>c(t.message))},H=()=>{l&&(u(!0),O(l).then(()=>E(l).then(s=>g(s.backups||[]))).catch(s=>c(s.message)).finally(()=>u(!1)))},R=s=>{!l||!confirm(`Restore from ${s}? This will overwrite the database.`)||(u(!0),V(l,s).then(()=>m(null)).catch(t=>c(t.message)).finally(()=>u(!1)))},z=s=>{l&&G(l,s).catch(t=>c(t.message))},U=(s,t)=>{s.preventDefault();const r=s.currentTarget,i=r.elements.namedItem("new_password").value,x=r.elements.namedItem("confirm_password").value;if(!i||i.length<6){p("Password must be at least 6 characters");return}if(i!==x){p("Passwords do not match");return}p(""),W(t,i).then(()=>h(null)).catch(k=>p(k.message))},$=s=>s<1024?s+" B":s<1024*1024?(s/1024).toFixed(1)+" KB":(s/1024/1024).toFixed(1)+" MB";return A?e.jsxs(e.Fragment,{children:[e.jsx(D,{title:"Databases"}),e.jsx("div",{className:"text-center py-5 text-muted",children:"Loading…"})]}):o&&!j.length?e.jsxs(e.Fragment,{children:[e.jsx(D,{title:"Databases"}),e.jsx(b,{variant:"danger",children:o})]}):e.jsxs(e.Fragment,{children:[e.jsx(D,{title:"Databases",actions:e.jsxs(_,{onClick:()=>d(!0),children:[e.jsx("i",{className:"ti ti-plus me-1"}),"Add Database"]})}),o?e.jsx(b,{variant:"warning",children:o}):null,e.jsxs(a,{show:I,onHide:()=>d(!1),centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Create Database"})}),e.jsxs("form",{onSubmit:Q,children:[e.jsxs(a.Body,{children:[P?e.jsx(b,{variant:"danger",children:P}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Database Name"}),e.jsx("input",{name:"name",type:"text",placeholder:"mydb",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Username"}),e.jsx("input",{name:"username",type:"text",placeholder:"dbuser",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Password"}),e.jsx("input",{name:"password",type:"password",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Type"}),e.jsxs("select",{name:"db_type",className:"form-select",children:[e.jsx("option",{value:"MySQL",children:"MySQL (full support)"}),e.jsx("option",{value:"PostgreSQL",children:"PostgreSQL (full support)"}),e.jsx("option",{value:"MongoDB",children:"MongoDB (full support)"}),e.jsx("option",{value:"Redis",children:"Redis (panel record only)"})]}),e.jsx("div",{className:"form-text",children:"MySQL, PostgreSQL, MongoDB: create, delete, backup/restore. Password change supported for those types."})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{name:"ps",type:"text",placeholder:"My database",className:"form-control"})]})]}),e.jsxs(a.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>d(!1),children:"Cancel"}),e.jsx("button",{type:"submit",disabled:S,className:"btn btn-primary",children:S?"Creating…":"Create"})]})]})]}),e.jsx("div",{className:"card shadow-sm border-0",children:e.jsx("div",{className:"card-body p-0",children:e.jsxs(X,{children:[e.jsx("thead",{className:"table-light",children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Username"}),e.jsx("th",{children:"Type"}),e.jsx("th",{children:"Note"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:j.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-0",children:e.jsx(Y,{title:"No databases",description:'Click "Add Database" to create one.'})})}):j.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",children:s.name}),e.jsx("td",{className:"align-middle",children:s.username}),e.jsx("td",{className:"align-middle",children:s.db_type}),e.jsx("td",{className:"align-middle text-muted",children:s.ps||"—"}),e.jsxs("td",{className:"align-middle text-end",children:[(s.db_type==="MySQL"||s.db_type==="PostgreSQL"||s.db_type==="MongoDB")&&e.jsx("button",{type:"button",onClick:()=>q(s.id),className:"btn btn-sm btn-outline-primary me-1",title:"Backup",children:e.jsx("i",{className:"ti ti-archive"})}),(s.db_type==="MySQL"||s.db_type==="PostgreSQL"||s.db_type==="MongoDB")&&e.jsx("button",{type:"button",onClick:()=>h(s.id),className:"btn btn-sm btn-outline-warning me-1",title:"Change password",children:e.jsx("i",{className:"ti ti-key"})}),e.jsx("button",{type:"button",onClick:()=>F(s.id,s.name),className:"btn btn-sm btn-outline-danger",title:"Delete",children:e.jsx("i",{className:"ti ti-trash"})})]})]},s.id))})]})})}),e.jsxs(a,{show:l!=null,onHide:()=>m(null),centered:!0,size:"lg",children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Database Backup"})}),e.jsxs(a.Body,{children:[e.jsx("div",{className:"mb-3",children:e.jsxs(_,{onClick:H,disabled:N,children:[e.jsx("i",{className:"ti ti-archive me-1"}),N?"Creating…":"Create Backup"]})}),e.jsx("h6",{className:"text-muted small text-uppercase",children:"Existing backups"}),L.length===0?e.jsx("p",{className:"text-muted small mb-0",children:"No backups yet"}):e.jsx("ul",{className:"list-group list-group-flush",children:L.map(s=>e.jsxs("li",{className:"list-group-item d-flex align-items-center justify-content-between gap-2",children:[e.jsx("code",{className:"small flex-grow-1 text-truncate",children:s.filename}),e.jsx("span",{className:"text-muted small flex-shrink-0",children:$(s.size)}),e.jsxs("span",{className:"flex-shrink-0",children:[e.jsx("button",{type:"button",className:"btn btn-sm btn-link p-1",onClick:()=>z(s.filename),title:"Download",children:e.jsx("i",{className:"ti ti-download"})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-link p-1 text-warning",onClick:()=>R(s.filename),disabled:N,title:"Restore",children:e.jsx("i",{className:"ti ti-restore"})})]})]},s.filename))})]}),e.jsx(a.Footer,{children:e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>m(null),children:"Close"})})]}),e.jsxs(a,{show:y!=null,onHide:()=>h(null),centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Change Database Password"})}),y!=null?e.jsxs("form",{onSubmit:s=>U(s,y),children:[e.jsxs(a.Body,{children:[M?e.jsx(b,{variant:"danger",children:M}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"New Password"}),e.jsx("input",{name:"new_password",type:"password",minLength:6,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Confirm Password"}),e.jsx("input",{name:"confirm_password",type:"password",minLength:6,className:"form-control",required:!0})]})]}),e.jsxs(a.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>h(null),children:"Cancel"}),e.jsx("button",{type:"submit",className:"btn btn-primary",children:"Update"})]})]}):null]})]})}export{re as DatabasePage}; +import{r as n,j as e,M as v,O as E,P as K,Q as G,R as V,S as W}from"./index-Cvh4tLHo.js";import{M as a}from"./Modal-CCihVZTY.js";import{A as b}from"./AdminAlert-Bt3L8_zJ.js";import{A as _}from"./AdminButton-BKglG8kI.js";import{A as X}from"./AdminTable-BQ5Lf7EC.js";import{E as Y}from"./EmptyState-D6lCh4WN.js";import{P as D}from"./PageHeader-D6k34vvM.js";function re(){const[j,Q]=n.useState([]),[T,C]=n.useState(!0),[o,c]=n.useState(""),[A,d]=n.useState(!1),[S,B]=n.useState(!1),[P,f]=n.useState(""),[l,m]=n.useState(null),[L,g]=n.useState([]),[N,u]=n.useState(!1),[y,h]=n.useState(null),[M,p]=n.useState(""),w=()=>{C(!0),v("/database/list").then(Q).catch(s=>c(s.message)).finally(()=>C(!1))};n.useEffect(()=>{w()},[]);const I=s=>{s.preventDefault();const t=s.currentTarget,r=t.elements.namedItem("name").value.trim(),i=t.elements.namedItem("username").value.trim(),x=t.elements.namedItem("password").value,k=t.elements.namedItem("db_type").value,$=t.elements.namedItem("ps").value.trim();if(!r||!i||!x){f("Name, username and password are required");return}B(!0),f(""),v("/database/create",{method:"POST",body:JSON.stringify({name:r,username:i,password:x,db_type:k,ps:$})}).then(()=>{d(!1),t.reset(),w()}).catch(J=>f(J.message)).finally(()=>B(!1))},F=(s,t)=>{confirm(`Delete database "${t}"?`)&&v(`/database/${s}`,{method:"DELETE"}).then(w).catch(r=>c(r.message))},R=s=>{m(s),g([]),E(s).then(t=>g(t.backups||[])).catch(t=>c(t.message))},q=()=>{l&&(u(!0),K(l).then(()=>E(l).then(s=>g(s.backups||[]))).catch(s=>c(s.message)).finally(()=>u(!1)))},H=s=>{!l||!confirm(`Restore from ${s}? This will overwrite the database.`)||(u(!0),V(l,s).then(()=>m(null)).catch(t=>c(t.message)).finally(()=>u(!1)))},z=s=>{l&&G(l,s).catch(t=>c(t.message))},O=(s,t)=>{s.preventDefault();const r=s.currentTarget,i=r.elements.namedItem("new_password").value,x=r.elements.namedItem("confirm_password").value;if(!i||i.length<6){p("Password must be at least 6 characters");return}if(i!==x){p("Passwords do not match");return}p(""),W(t,i).then(()=>h(null)).catch(k=>p(k.message))},U=s=>s<1024?s+" B":s<1024*1024?(s/1024).toFixed(1)+" KB":(s/1024/1024).toFixed(1)+" MB";return T?e.jsxs(e.Fragment,{children:[e.jsx(D,{title:"Databases"}),e.jsx("div",{className:"text-center py-5 text-muted",children:"Loading…"})]}):o&&!j.length?e.jsxs(e.Fragment,{children:[e.jsx(D,{title:"Databases"}),e.jsx(b,{variant:"danger",children:o})]}):e.jsxs(e.Fragment,{children:[e.jsx(D,{title:"Databases",actions:e.jsxs(_,{onClick:()=>d(!0),children:[e.jsx("i",{className:"ti ti-plus me-1"}),"Add Database"]})}),o?e.jsx(b,{variant:"warning",children:o}):null,e.jsxs(a,{show:A,onHide:()=>d(!1),centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Create Database"})}),e.jsxs("form",{onSubmit:I,children:[e.jsxs(a.Body,{children:[P?e.jsx(b,{variant:"danger",children:P}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Database Name"}),e.jsx("input",{name:"name",type:"text",placeholder:"mydb",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Username"}),e.jsx("input",{name:"username",type:"text",placeholder:"dbuser",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Password"}),e.jsx("input",{name:"password",type:"password",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Type"}),e.jsxs("select",{name:"db_type",className:"form-select",children:[e.jsx("option",{value:"MySQL",children:"MySQL (full support)"}),e.jsx("option",{value:"PostgreSQL",children:"PostgreSQL (full support)"}),e.jsx("option",{value:"MongoDB",children:"MongoDB (full support)"}),e.jsx("option",{value:"Redis",children:"Redis (panel record only)"})]}),e.jsx("div",{className:"form-text",children:"MySQL, PostgreSQL, MongoDB: create, delete, backup/restore. Password change supported for those types."})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{name:"ps",type:"text",placeholder:"My database",className:"form-control"})]})]}),e.jsxs(a.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>d(!1),children:"Cancel"}),e.jsx("button",{type:"submit",disabled:S,className:"btn btn-primary",children:S?"Creating…":"Create"})]})]})]}),e.jsx("div",{className:"card shadow-sm border-0",children:e.jsx("div",{className:"card-body p-0",children:e.jsxs(X,{children:[e.jsx("thead",{className:"table-light",children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Username"}),e.jsx("th",{children:"Type"}),e.jsx("th",{children:"Note"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:j.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-0",children:e.jsx(Y,{title:"No databases",description:'Click "Add Database" to create one.'})})}):j.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",children:s.name}),e.jsx("td",{className:"align-middle",children:s.username}),e.jsx("td",{className:"align-middle",children:s.db_type}),e.jsx("td",{className:"align-middle text-muted",children:s.ps||"—"}),e.jsxs("td",{className:"align-middle text-end",children:[(s.db_type==="MySQL"||s.db_type==="PostgreSQL"||s.db_type==="MongoDB")&&e.jsx("button",{type:"button",onClick:()=>R(s.id),className:"btn btn-sm btn-outline-primary me-1",title:"Backup",children:e.jsx("i",{className:"ti ti-archive"})}),(s.db_type==="MySQL"||s.db_type==="PostgreSQL"||s.db_type==="MongoDB")&&e.jsx("button",{type:"button",onClick:()=>h(s.id),className:"btn btn-sm btn-outline-warning me-1",title:"Change password",children:e.jsx("i",{className:"ti ti-key"})}),e.jsx("button",{type:"button",onClick:()=>F(s.id,s.name),className:"btn btn-sm btn-outline-danger",title:"Delete",children:e.jsx("i",{className:"ti ti-trash"})})]})]},s.id))})]})})}),e.jsxs(a,{show:l!=null,onHide:()=>m(null),centered:!0,size:"lg",children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Database Backup"})}),e.jsxs(a.Body,{children:[e.jsx("div",{className:"mb-3",children:e.jsxs(_,{onClick:q,disabled:N,children:[e.jsx("i",{className:"ti ti-archive me-1"}),N?"Creating…":"Create Backup"]})}),e.jsx("h6",{className:"text-muted small text-uppercase",children:"Existing backups"}),L.length===0?e.jsx("p",{className:"text-muted small mb-0",children:"No backups yet"}):e.jsx("ul",{className:"list-group list-group-flush",children:L.map(s=>e.jsxs("li",{className:"list-group-item d-flex align-items-center justify-content-between gap-2",children:[e.jsx("code",{className:"small flex-grow-1 text-truncate",children:s.filename}),e.jsx("span",{className:"text-muted small flex-shrink-0",children:U(s.size)}),e.jsxs("span",{className:"flex-shrink-0",children:[e.jsx("button",{type:"button",className:"btn btn-sm btn-link p-1",onClick:()=>z(s.filename),title:"Download",children:e.jsx("i",{className:"ti ti-download"})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-link p-1 text-warning",onClick:()=>H(s.filename),disabled:N,title:"Restore",children:e.jsx("i",{className:"ti ti-restore"})})]})]},s.filename))})]}),e.jsx(a.Footer,{children:e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>m(null),children:"Close"})})]}),e.jsxs(a,{show:y!=null,onHide:()=>h(null),centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Change Database Password"})}),y!=null?e.jsxs("form",{onSubmit:s=>O(s,y),children:[e.jsxs(a.Body,{children:[M?e.jsx(b,{variant:"danger",children:M}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"New Password"}),e.jsx("input",{name:"new_password",type:"password",minLength:6,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Confirm Password"}),e.jsx("input",{name:"confirm_password",type:"password",minLength:6,className:"form-control",required:!0})]})]}),e.jsxs(a.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>h(null),children:"Cancel"}),e.jsx("button",{type:"submit",className:"btn btn-primary",children:"Update"})]})]}):null]})]})}export{re as DatabasePage}; diff --git a/YakPanel-server/frontend/dist/assets/DockerPage-D1AIK8Rv.js b/YakPanel-server/frontend/dist/assets/DockerPage-D1AIK8Rv.js deleted file mode 100644 index 8c2a67a1..00000000 --- a/YakPanel-server/frontend/dist/assets/DockerPage-D1AIK8Rv.js +++ /dev/null @@ -1 +0,0 @@ -import{r as t,j as e,W as H,X as O,Y as W,Z as M,a as j}from"./index-CRR9sQ49.js";import{M as o}from"./Modal-B7V4w_St.js";import{A as X}from"./AdminAlert-DW1IRWce.js";import{A as d}from"./AdminButton-Bd2cLTu3.js";import{A}from"./AdminTable-BLiLxfnS.js";import{E as Y}from"./EmptyState-C61VdEFl.js";import{P as _}from"./PageHeader-BcjNf7GG.js";function p({show:m}){return m?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null}function ee(){const[m,E]=t.useState([]),[f,T]=t.useState([]),[z,g]=t.useState(!0),[b,a]=t.useState(""),[i,r]=t.useState(null),[D,c]=t.useState(!1),[u,x]=t.useState(""),[N,y]=t.useState(""),[S,v]=t.useState(""),[k,C]=t.useState(!1),[h,R]=t.useState(""),[P,w]=t.useState(!1),l=()=>{g(!0),Promise.all([H(),O()]).then(([s,n])=>{E(s.containers||[]),T(n.images||[]),a(s.error||n.error||"")}).catch(s=>a(s.message)).finally(()=>g(!1))};t.useEffect(()=>{l()},[]);const $=s=>{r(s),j(`/docker/${s}/start`,{method:"POST"}).then(l).catch(n=>a(n.message)).finally(()=>r(null))},F=s=>{r(s),j(`/docker/${s}/stop`,{method:"POST"}).then(l).catch(n=>a(n.message)).finally(()=>r(null))},L=s=>{r(s),j(`/docker/${s}/restart`,{method:"POST"}).then(l).catch(n=>a(n.message)).finally(()=>r(null))},I=s=>s.toLowerCase().startsWith("up")||s.toLowerCase().includes("running"),q=s=>{s.preventDefault(),u.trim()&&(C(!0),M(u.trim(),N.trim()||void 0,S.trim()||void 0).then(()=>{c(!1),x(""),y(""),v(""),l()}).catch(n=>a(n.message)).finally(()=>C(!1)))},B=()=>{h.trim()&&(w(!0),W(h.trim()).then(()=>{R(""),l()}).catch(s=>a(s.message)).finally(()=>w(!1)))};return z?e.jsxs(e.Fragment,{children:[e.jsx(_,{title:"Docker"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(_,{title:"Docker",actions:e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2",children:[e.jsxs("div",{className:"d-flex gap-1 align-items-center",children:[e.jsx("input",{value:h,onChange:s=>R(s.target.value),placeholder:"nginx:latest",className:"form-control form-control-sm",style:{width:"10rem"}}),e.jsxs(d,{variant:"warning",size:"sm",onClick:B,disabled:P||!h.trim(),children:[P?e.jsx(p,{show:!0}):e.jsx("i",{className:"ti ti-download me-1","aria-hidden":!0}),"Pull"]})]}),e.jsxs(d,{variant:"primary",size:"sm",onClick:()=>c(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Run Container"]}),e.jsxs(d,{variant:"secondary",size:"sm",onClick:l,children:[e.jsx("i",{className:"ti ti-rotate-clockwise me-1","aria-hidden":!0}),"Refresh"]})]})}),e.jsxs(o,{show:D,onHide:()=>c(!1),centered:!0,children:[e.jsx(o.Header,{closeButton:!0,children:e.jsx(o.Title,{children:"Run Container"})}),e.jsxs("form",{onSubmit:q,children:[e.jsxs(o.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Image"}),e.jsx("input",{value:u,onChange:s=>x(s.target.value),placeholder:"nginx:latest",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Name (optional)"}),e.jsx("input",{value:N,onChange:s=>y(s.target.value),placeholder:"my-nginx",className:"form-control"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Ports (optional, e.g. 80:80 or 8080:80)"}),e.jsx("input",{value:S,onChange:s=>v(s.target.value),placeholder:"80:80",className:"form-control"})]})]}),e.jsxs(o.Footer,{children:[e.jsx(d,{type:"button",variant:"secondary",onClick:()=>c(!1),children:"Cancel"}),e.jsx(d,{type:"submit",variant:"primary",disabled:k,children:k?"Starting…":"Run"})]})]})]}),b?e.jsx(X,{variant:"warning",className:"mb-3",children:b}):null,e.jsx("div",{className:"card",children:e.jsxs(A,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Container"}),e.jsx("th",{children:"Image"}),e.jsx("th",{children:"Status"}),e.jsx("th",{children:"Ports"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:m.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-0",children:e.jsx(Y,{title:"No containers",description:"Install Docker and run some containers."})})}):m.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"font-monospace small",children:s.names||s.id}),e.jsx("td",{children:s.image}),e.jsx("td",{children:e.jsx("span",{className:I(s.status)?"text-success":"text-secondary",children:s.status})}),e.jsx("td",{className:"small text-truncate",style:{maxWidth:200},children:s.ports||"—"}),e.jsx("td",{className:"text-end",children:e.jsx("span",{className:"d-inline-flex gap-1 justify-content-end",children:I(s.status)?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-warning p-1",title:"Restart",disabled:i===s.id_full,onClick:()=>L(s.id_full),children:i===s.id_full?e.jsx(p,{show:!0}):e.jsx("i",{className:"ti ti-rotate-clockwise","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Stop",disabled:i===s.id_full,onClick:()=>F(s.id_full),children:e.jsx("i",{className:"ti ti-square","aria-hidden":!0})})]}):e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-success p-1",title:"Start",disabled:i===s.id_full,onClick:()=>$(s.id_full),children:i===s.id_full?e.jsx(p,{show:!0}):e.jsx("i",{className:"ti ti-player-play","aria-hidden":!0})})})})]},s.id))})]})}),e.jsx("h2",{className:"h5 mt-4 mb-3",children:"Images"}),e.jsx("div",{className:"card",children:f.length===0?e.jsx("div",{className:"card-body",children:e.jsx("p",{className:"text-secondary text-center mb-0",children:"No images. Pull one above."})}):e.jsxs(A,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Repository"}),e.jsx("th",{children:"Tag"}),e.jsx("th",{children:"Size"}),e.jsx("th",{className:"text-end",children:"Action"})]})}),e.jsx("tbody",{children:f.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"font-monospace",children:s.repository}),e.jsx("td",{children:s.tag}),e.jsx("td",{children:s.size}),e.jsx("td",{className:"text-end",children:e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-primary p-1",title:"Run",onClick:()=>{x(`${s.repository}:${s.tag}`),c(!0)},children:e.jsx("i",{className:"ti ti-player-play","aria-hidden":!0})})})]},s.id))})]})})]})}export{ee as DockerPage}; diff --git a/YakPanel-server/frontend/dist/assets/DockerPage-DyZ77ivO.js b/YakPanel-server/frontend/dist/assets/DockerPage-DyZ77ivO.js new file mode 100644 index 00000000..5a23c62f --- /dev/null +++ b/YakPanel-server/frontend/dist/assets/DockerPage-DyZ77ivO.js @@ -0,0 +1 @@ +import{r as t,j as e,$ as H,a0 as M,a1 as O,a2 as W,M as j}from"./index-Cvh4tLHo.js";import{M as o}from"./Modal-CCihVZTY.js";import{A as G}from"./AdminAlert-Bt3L8_zJ.js";import{A as d}from"./AdminButton-BKglG8kI.js";import{A}from"./AdminTable-BQ5Lf7EC.js";import{E as J}from"./EmptyState-D6lCh4WN.js";import{P as _}from"./PageHeader-D6k34vvM.js";function p({show:m}){return m?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null}function ee(){const[m,E]=t.useState([]),[f,T]=t.useState([]),[$,g]=t.useState(!0),[b,n]=t.useState(""),[i,r]=t.useState(null),[z,c]=t.useState(!1),[u,x]=t.useState(""),[N,y]=t.useState(""),[S,v]=t.useState(""),[k,C]=t.useState(!1),[h,R]=t.useState(""),[P,w]=t.useState(!1),l=()=>{g(!0),Promise.all([H(),M()]).then(([s,a])=>{E(s.containers||[]),T(a.images||[]),n(s.error||a.error||"")}).catch(s=>n(s.message)).finally(()=>g(!1))};t.useEffect(()=>{l()},[]);const D=s=>{r(s),j(`/docker/${s}/start`,{method:"POST"}).then(l).catch(a=>n(a.message)).finally(()=>r(null))},F=s=>{r(s),j(`/docker/${s}/stop`,{method:"POST"}).then(l).catch(a=>n(a.message)).finally(()=>r(null))},L=s=>{r(s),j(`/docker/${s}/restart`,{method:"POST"}).then(l).catch(a=>n(a.message)).finally(()=>r(null))},I=s=>s.toLowerCase().startsWith("up")||s.toLowerCase().includes("running"),q=s=>{s.preventDefault(),u.trim()&&(C(!0),W(u.trim(),N.trim()||void 0,S.trim()||void 0).then(()=>{c(!1),x(""),y(""),v(""),l()}).catch(a=>n(a.message)).finally(()=>C(!1)))},B=()=>{h.trim()&&(w(!0),O(h.trim()).then(()=>{R(""),l()}).catch(s=>n(s.message)).finally(()=>w(!1)))};return $?e.jsxs(e.Fragment,{children:[e.jsx(_,{title:"Docker"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(_,{title:"Docker",actions:e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2",children:[e.jsxs("div",{className:"d-flex gap-1 align-items-center",children:[e.jsx("input",{value:h,onChange:s=>R(s.target.value),placeholder:"nginx:latest",className:"form-control form-control-sm",style:{width:"10rem"}}),e.jsxs(d,{variant:"warning",size:"sm",onClick:B,disabled:P||!h.trim(),children:[P?e.jsx(p,{show:!0}):e.jsx("i",{className:"ti ti-download me-1","aria-hidden":!0}),"Pull"]})]}),e.jsxs(d,{variant:"primary",size:"sm",onClick:()=>c(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Run Container"]}),e.jsxs(d,{variant:"secondary",size:"sm",onClick:l,children:[e.jsx("i",{className:"ti ti-rotate-clockwise me-1","aria-hidden":!0}),"Refresh"]})]})}),e.jsxs(o,{show:z,onHide:()=>c(!1),centered:!0,children:[e.jsx(o.Header,{closeButton:!0,children:e.jsx(o.Title,{children:"Run Container"})}),e.jsxs("form",{onSubmit:q,children:[e.jsxs(o.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Image"}),e.jsx("input",{value:u,onChange:s=>x(s.target.value),placeholder:"nginx:latest",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Name (optional)"}),e.jsx("input",{value:N,onChange:s=>y(s.target.value),placeholder:"my-nginx",className:"form-control"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Ports (optional, e.g. 80:80 or 8080:80)"}),e.jsx("input",{value:S,onChange:s=>v(s.target.value),placeholder:"80:80",className:"form-control"})]})]}),e.jsxs(o.Footer,{children:[e.jsx(d,{type:"button",variant:"secondary",onClick:()=>c(!1),children:"Cancel"}),e.jsx(d,{type:"submit",variant:"primary",disabled:k,children:k?"Starting…":"Run"})]})]})]}),b?e.jsx(G,{variant:"warning",className:"mb-3",children:b}):null,e.jsx("div",{className:"card",children:e.jsxs(A,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Container"}),e.jsx("th",{children:"Image"}),e.jsx("th",{children:"Status"}),e.jsx("th",{children:"Ports"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:m.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-0",children:e.jsx(J,{title:"No containers",description:"Install Docker and run some containers."})})}):m.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"font-monospace small",children:s.names||s.id}),e.jsx("td",{children:s.image}),e.jsx("td",{children:e.jsx("span",{className:I(s.status)?"text-success":"text-secondary",children:s.status})}),e.jsx("td",{className:"small text-truncate",style:{maxWidth:200},children:s.ports||"—"}),e.jsx("td",{className:"text-end",children:e.jsx("span",{className:"d-inline-flex gap-1 justify-content-end",children:I(s.status)?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-warning p-1",title:"Restart",disabled:i===s.id_full,onClick:()=>L(s.id_full),children:i===s.id_full?e.jsx(p,{show:!0}):e.jsx("i",{className:"ti ti-rotate-clockwise","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Stop",disabled:i===s.id_full,onClick:()=>F(s.id_full),children:e.jsx("i",{className:"ti ti-square","aria-hidden":!0})})]}):e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-success p-1",title:"Start",disabled:i===s.id_full,onClick:()=>D(s.id_full),children:i===s.id_full?e.jsx(p,{show:!0}):e.jsx("i",{className:"ti ti-player-play","aria-hidden":!0})})})})]},s.id))})]})}),e.jsx("h2",{className:"h5 mt-4 mb-3",children:"Images"}),e.jsx("div",{className:"card",children:f.length===0?e.jsx("div",{className:"card-body",children:e.jsx("p",{className:"text-secondary text-center mb-0",children:"No images. Pull one above."})}):e.jsxs(A,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Repository"}),e.jsx("th",{children:"Tag"}),e.jsx("th",{children:"Size"}),e.jsx("th",{className:"text-end",children:"Action"})]})}),e.jsx("tbody",{children:f.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"font-monospace",children:s.repository}),e.jsx("td",{children:s.tag}),e.jsx("td",{children:s.size}),e.jsx("td",{className:"text-end",children:e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-primary p-1",title:"Run",onClick:()=>{x(`${s.repository}:${s.tag}`),c(!0)},children:e.jsx("i",{className:"ti ti-player-play","aria-hidden":!0})})})]},s.id))})]})})]})}export{ee as DockerPage}; diff --git a/YakPanel-server/frontend/dist/assets/DomainsPage-DVTACiDJ.js b/YakPanel-server/frontend/dist/assets/DomainsPage-BQsg8Ui3.js similarity index 94% rename from YakPanel-server/frontend/dist/assets/DomainsPage-DVTACiDJ.js rename to YakPanel-server/frontend/dist/assets/DomainsPage-BQsg8Ui3.js index 8f13ee11..aa7764df 100644 --- a/YakPanel-server/frontend/dist/assets/DomainsPage-DVTACiDJ.js +++ b/YakPanel-server/frontend/dist/assets/DomainsPage-BQsg8Ui3.js @@ -1 +1 @@ -import{r as t,j as e,a as o}from"./index-CRR9sQ49.js";import{M as l}from"./Modal-B7V4w_St.js";import{A as R}from"./AdminAlert-DW1IRWce.js";import{A as m}from"./AdminButton-Bd2cLTu3.js";import{P as N}from"./PageHeader-BcjNf7GG.js";function k(){const[d,y]=t.useState([]),[c,b]=t.useState([]),[v,u]=t.useState(!0),[x,h]=t.useState(""),[i,p]=t.useState(null),[a,n]=t.useState(null),[j,f]=t.useState(""),g=()=>{u(!0),Promise.all([o("/ssl/domains"),o("/ssl/certificates")]).then(([s,r])=>{y(s),b(r.certificates||[])}).catch(s=>h(s.message)).finally(()=>u(!1))};t.useEffect(()=>{g()},[]);const S=s=>{s.preventDefault(),a&&(p(a.name),o("/ssl/request",{method:"POST",body:JSON.stringify({domain:a.name,webroot:a.site_path,email:j})}).then(()=>{n(null),g()}).catch(r=>h(r.message)).finally(()=>p(null)))},q=s=>c.some(r=>r.name===s||r.name.startsWith(s+" "));return v?e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Domains & SSL"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Domains & SSL"}),x?e.jsx(R,{className:"mb-3",children:x}):null,e.jsx("div",{className:"alert alert-warning small mb-4",children:"Request Let's Encrypt certificates for your site domains. Requires certbot and nginx configured for the domain."}),e.jsxs("div",{className:"row g-4",children:[e.jsx("div",{className:"col-lg-6",children:e.jsxs("div",{className:"card h-100",children:[e.jsx("div",{className:"card-header",children:"Domains (from sites)"}),e.jsx("div",{className:"list-group list-group-flush overflow-auto",style:{maxHeight:"20rem"},children:d.length===0?e.jsx("div",{className:"list-group-item text-secondary text-center py-4",children:"No domains. Add a site first."}):d.map(s=>e.jsxs("div",{className:"list-group-item d-flex align-items-center justify-content-between gap-2 flex-wrap",children:[e.jsxs("div",{className:"small",children:[e.jsx("span",{className:"font-monospace",children:s.name}),s.port!=="80"?e.jsxs("span",{className:"text-secondary ms-1",children:[":",s.port]}):null,e.jsxs("span",{className:"text-secondary ms-2",children:["(",s.site_name,")"]})]}),e.jsx("div",{children:q(s.name)?e.jsxs("span",{className:"text-success small",children:[e.jsx("i",{className:"ti ti-shield-check me-1","aria-hidden":!0}),"Cert"]}):e.jsx(m,{variant:"outline-primary",size:"sm",disabled:!!i,onClick:()=>{n(s),f("")},children:i===s.name?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):"Request SSL"})})]},s.id))})]})}),e.jsx("div",{className:"col-lg-6",children:e.jsxs("div",{className:"card h-100",children:[e.jsx("div",{className:"card-header",children:"Certificates"}),e.jsx("div",{className:"list-group list-group-flush overflow-auto",style:{maxHeight:"20rem"},children:c.length===0?e.jsx("div",{className:"list-group-item text-secondary text-center py-4",children:"No certificates yet"}):c.map(s=>e.jsxs("div",{className:"list-group-item d-flex align-items-center gap-2",children:[e.jsx("i",{className:"ti ti-shield-check text-success flex-shrink-0","aria-hidden":!0}),e.jsx("span",{className:"font-monospace small text-break",children:s.name})]},s.name))})]})})]}),e.jsxs(l,{show:!!a,onHide:()=>n(null),centered:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsxs(l.Title,{children:["Request SSL for ",a==null?void 0:a.name]})}),a?e.jsxs("form",{onSubmit:S,children:[e.jsxs(l.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Domain"}),e.jsx("input",{type:"text",value:a.name,readOnly:!0,className:"form-control-plaintext border rounded px-3 py-2 bg-body-secondary"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Webroot (site path)"}),e.jsx("input",{type:"text",value:a.site_path,readOnly:!0,className:"form-control-plaintext border rounded px-3 py-2 bg-body-secondary"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Email (for Let's Encrypt)"}),e.jsx("input",{type:"email",value:j,onChange:s=>f(s.target.value),placeholder:"admin@example.com",className:"form-control",required:!0})]})]}),e.jsxs(l.Footer,{children:[e.jsx(m,{type:"button",variant:"secondary",onClick:()=>n(null),children:"Cancel"}),e.jsx(m,{type:"submit",variant:"primary",disabled:!!i,children:i?"Requesting…":"Request"})]})]}):null]})]})}export{k as DomainsPage}; +import{r as t,j as e,M as o}from"./index-Cvh4tLHo.js";import{M as l}from"./Modal-CCihVZTY.js";import{A as R}from"./AdminAlert-Bt3L8_zJ.js";import{A as m}from"./AdminButton-BKglG8kI.js";import{P as N}from"./PageHeader-D6k34vvM.js";function k(){const[d,y]=t.useState([]),[c,b]=t.useState([]),[v,u]=t.useState(!0),[x,h]=t.useState(""),[i,p]=t.useState(null),[a,n]=t.useState(null),[j,f]=t.useState(""),g=()=>{u(!0),Promise.all([o("/ssl/domains"),o("/ssl/certificates")]).then(([s,r])=>{y(s),b(r.certificates||[])}).catch(s=>h(s.message)).finally(()=>u(!1))};t.useEffect(()=>{g()},[]);const S=s=>{s.preventDefault(),a&&(p(a.name),o("/ssl/request",{method:"POST",body:JSON.stringify({domain:a.name,webroot:a.site_path,email:j})}).then(()=>{n(null),g()}).catch(r=>h(r.message)).finally(()=>p(null)))},q=s=>c.some(r=>r.name===s||r.name.startsWith(s+" "));return v?e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Domains & SSL"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Domains & SSL"}),x?e.jsx(R,{className:"mb-3",children:x}):null,e.jsx("div",{className:"alert alert-warning small mb-4",children:"Request Let's Encrypt certificates for your site domains. Requires certbot and nginx configured for the domain."}),e.jsxs("div",{className:"row g-4",children:[e.jsx("div",{className:"col-lg-6",children:e.jsxs("div",{className:"card h-100",children:[e.jsx("div",{className:"card-header",children:"Domains (from sites)"}),e.jsx("div",{className:"list-group list-group-flush overflow-auto",style:{maxHeight:"20rem"},children:d.length===0?e.jsx("div",{className:"list-group-item text-secondary text-center py-4",children:"No domains. Add a site first."}):d.map(s=>e.jsxs("div",{className:"list-group-item d-flex align-items-center justify-content-between gap-2 flex-wrap",children:[e.jsxs("div",{className:"small",children:[e.jsx("span",{className:"font-monospace",children:s.name}),s.port!=="80"?e.jsxs("span",{className:"text-secondary ms-1",children:[":",s.port]}):null,e.jsxs("span",{className:"text-secondary ms-2",children:["(",s.site_name,")"]})]}),e.jsx("div",{children:q(s.name)?e.jsxs("span",{className:"text-success small",children:[e.jsx("i",{className:"ti ti-shield-check me-1","aria-hidden":!0}),"Cert"]}):e.jsx(m,{variant:"outline-primary",size:"sm",disabled:!!i,onClick:()=>{n(s),f("")},children:i===s.name?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):"Request SSL"})})]},s.id))})]})}),e.jsx("div",{className:"col-lg-6",children:e.jsxs("div",{className:"card h-100",children:[e.jsx("div",{className:"card-header",children:"Certificates"}),e.jsx("div",{className:"list-group list-group-flush overflow-auto",style:{maxHeight:"20rem"},children:c.length===0?e.jsx("div",{className:"list-group-item text-secondary text-center py-4",children:"No certificates yet"}):c.map(s=>e.jsxs("div",{className:"list-group-item d-flex align-items-center gap-2",children:[e.jsx("i",{className:"ti ti-shield-check text-success flex-shrink-0","aria-hidden":!0}),e.jsx("span",{className:"font-monospace small text-break",children:s.name})]},s.name))})]})})]}),e.jsxs(l,{show:!!a,onHide:()=>n(null),centered:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsxs(l.Title,{children:["Request SSL for ",a==null?void 0:a.name]})}),a?e.jsxs("form",{onSubmit:S,children:[e.jsxs(l.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Domain"}),e.jsx("input",{type:"text",value:a.name,readOnly:!0,className:"form-control-plaintext border rounded px-3 py-2 bg-body-secondary"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Webroot (site path)"}),e.jsx("input",{type:"text",value:a.site_path,readOnly:!0,className:"form-control-plaintext border rounded px-3 py-2 bg-body-secondary"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Email (for Let's Encrypt)"}),e.jsx("input",{type:"email",value:j,onChange:s=>f(s.target.value),placeholder:"admin@example.com",className:"form-control",required:!0})]})]}),e.jsxs(l.Footer,{children:[e.jsx(m,{type:"button",variant:"secondary",onClick:()=>n(null),children:"Cancel"}),e.jsx(m,{type:"submit",variant:"primary",disabled:!!i,children:i?"Requesting…":"Request"})]})]}):null]})]})}export{k as DomainsPage}; diff --git a/YakPanel-server/frontend/dist/assets/EmptyState-C61VdEFl.js b/YakPanel-server/frontend/dist/assets/EmptyState-D6lCh4WN.js similarity index 82% rename from YakPanel-server/frontend/dist/assets/EmptyState-C61VdEFl.js rename to YakPanel-server/frontend/dist/assets/EmptyState-D6lCh4WN.js index a081f7de..2a05e7c7 100644 --- a/YakPanel-server/frontend/dist/assets/EmptyState-C61VdEFl.js +++ b/YakPanel-server/frontend/dist/assets/EmptyState-D6lCh4WN.js @@ -1 +1 @@ -import{j as t}from"./index-CRR9sQ49.js";function m({iconClass:s="ti ti-inbox",title:a,description:e,action:i}){return t.jsxs("div",{className:"text-center py-5 text-muted",children:[t.jsx("i",{className:`${s} display-4 d-block mb-3`,"aria-hidden":!0}),t.jsx("h5",{className:"text-body",children:a}),e?t.jsx("p",{className:"mb-3",children:e}):null,i]})}export{m as E}; +import{j as t}from"./index-Cvh4tLHo.js";function m({iconClass:s="ti ti-inbox",title:a,description:e,action:i}){return t.jsxs("div",{className:"text-center py-5 text-muted",children:[t.jsx("i",{className:`${s} display-4 d-block mb-3`,"aria-hidden":!0}),t.jsx("h5",{className:"text-body",children:a}),e?t.jsx("p",{className:"mb-3",children:e}):null,i]})}export{m as E}; diff --git a/YakPanel-server/frontend/dist/assets/FilesPage-DLgTKzsa.js b/YakPanel-server/frontend/dist/assets/FilesPage-DLgTKzsa.js deleted file mode 100644 index 2f3bd80c..00000000 --- a/YakPanel-server/frontend/dist/assets/FilesPage-DLgTKzsa.js +++ /dev/null @@ -1 +0,0 @@ -import{r as a,p as Ze,j as e,D as d,q as Je,t as Ye,v as es,w as ss,x as ge,y as ts,z as ns,A as as,B as ls,C as is,E as rs,F as cs,G as os,H as ds}from"./index-CRR9sQ49.js";import{M as l}from"./Modal-B7V4w_St.js";import{A as ms}from"./AdminAlert-DW1IRWce.js";import{A as r}from"./AdminButton-Bd2cLTu3.js";import{A as hs}from"./AdminTable-BLiLxfnS.js";import{E as us}from"./EmptyState-C61VdEFl.js";import{P as ps}from"./PageHeader-BcjNf7GG.js";function f(n,p){return n==="/"?`/${p}`:`${n.replace(/\/$/,"")}/${p}`}function Ne(n){const p=n.replace(/\/$/,"").split("/").filter(Boolean);return p.pop(),p.length===0?"/":`/${p.join("/")}`}function be(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:n<1024*1024*1024?`${(n/1024/1024).toFixed(1)} MB`:`${(n/1024/1024/1024).toFixed(2)} GB`}const xs=[".txt",".html",".htm",".css",".js",".json",".xml",".md",".py",".php",".sh",".conf",".env",".ini",".log",".yml",".yaml"];function vs(){const[n,p]=a.useState("/"),[W,G]=a.useState("/"),[k,Ce]=a.useState([]),[M,K]=a.useState(!0),[O,m]=a.useState(""),[H,ye]=a.useState(""),[g,N]=a.useState(()=>new Set),[h,b]=a.useState(null),[U,q]=a.useState({}),[ve,Q]=a.useState(null),[V,X]=a.useState(!1),[S,w]=a.useState(null),[Z,J]=a.useState(""),[Y,ee]=a.useState(!1),[ke,F]=a.useState(!1),[se,z]=a.useState(""),[Se,$]=a.useState(!1),[te,D]=a.useState(""),[x,B]=a.useState(null),[T,_]=a.useState(""),[we,P]=a.useState(!1),[j,E]=a.useState(null),[ne,ae]=a.useState("0644"),[le,ie]=a.useState(!1),[Fe,C]=a.useState(!1),[R,A]=a.useState("archive.zip"),[ze,L]=a.useState(!1),[I,$e]=a.useState(""),[re,ce]=a.useState(!1),[oe,de]=a.useState([]),me=a.useRef(null),c=a.useCallback(s=>{K(!0),m(""),N(new Set),Ze(s).then(t=>{p(t.path),G(t.path),Ce(t.items.sort((i,v)=>i.is_dir===v.is_dir?0:i.is_dir?-1:1)),q({})}).catch(t=>m(t.message)).finally(()=>K(!1))},[]);a.useEffect(()=>{c(n)},[]);const u=a.useMemo(()=>{const s=H.trim().toLowerCase();return s?k.filter(t=>t.name.toLowerCase().includes(s)):k},[k,H]),y=n.replace(/\/$/,"").split("/").filter(Boolean),he=y.length>0,De=s=>{N(t=>{const i=new Set(t);return i.has(s)?i.delete(s):i.add(s),i})},Be=()=>{g.size===u.length?N(new Set):N(new Set(u.map(s=>s.name)))},o=a.useMemo(()=>u.filter(s=>g.has(s.name)),[u,g]),ue=s=>{s.is_dir&&c(f(n,s.name))},_e=()=>{he&&c(Ne(n))},pe=()=>{const s=W.trim()||"/";c(s.startsWith("/")?s:`/${s}`)},xe=s=>{if(s.is_dir)return;const t=f(n,s.name);Q(s.name),Ye(t).catch(i=>m(i.message)).finally(()=>Q(null))},Pe=s=>{var i;const t=(i=s.target.files)==null?void 0:i[0];t&&(X(!0),m(""),Je(n,t).then(()=>c(n)).catch(v=>m(v.message)).finally(()=>{X(!1),s.target.value=""}))},Ee=s=>{const t=f(n,s.name);ds(t).then(i=>{w(t),J(typeof i.content=="string"?i.content:String(i.content))}).catch(i=>m(i.message))},Ie=()=>{S&&(ee(!0),rs(S,Z).then(()=>{w(null),c(n)}).catch(s=>m(s.message)).finally(()=>ee(!1)))},Me=s=>xs.some(t=>s.toLowerCase().endsWith(t)),He=s=>{s.preventDefault();const t=se.trim();t&&ns(n,t).then(()=>{F(!1),z(""),c(n)}).catch(i=>m(i.message))},Te=s=>{s.preventDefault();const t=te.trim();t&&as(n,t).then(()=>{$(!1),D(""),c(n)}).catch(i=>m(i.message))},je=()=>{if(!x||!T.trim())return;const s=T.trim();if(s===x.name){B(null);return}os(n,x.name,s).then(()=>{B(null),_(""),c(n)}).catch(t=>m(t.message))},Re=s=>{confirm(`Delete ${s.is_dir?"folder":"file"} "${s.name}"?`)&&ge(n,s.name,s.is_dir).then(()=>c(n)).catch(t=>m(t.message))},Ae=()=>{o.length!==0&&confirm(`Delete ${o.length} item(s)?`)&&Promise.all(o.map(s=>ge(n,s.name,s.is_dir))).then(()=>c(n)).catch(s=>m(s.message))},Le=()=>{o.length!==0&&b({op:"copy",entries:o.map(s=>({parent:n,name:s.name}))})},We=()=>{o.length!==0&&b({op:"cut",entries:o.map(s=>({parent:n,name:s.name}))})},Ge=()=>{if(!h||h.entries.length===0)return;const s=h.entries.map(t=>h.op==="copy"?es(t.parent,t.name,n):ss(t.parent,t.name,n));Promise.all(s).then(()=>{(h==null?void 0:h.op)==="cut"&&b(null),c(n)}).catch(t=>m(t.message))},Ke=s=>{E(s),ae(s.mode?s.mode.padStart(3,"0"):"0644"),ie(s.is_dir),P(!0)},Oe=()=>{if(!j)return;const s=f(n,j.name);ls(s,ne,le&&j.is_dir).then(()=>{P(!1),E(null),c(n)}).catch(t=>m(t.message))},Ue=()=>{(o.length>0?o.map(t=>t.name):[]).length!==0&&(A(`archive-${Date.now()}.zip`),C(!0))},qe=()=>{const s=o.length>0?o.map(t=>t.name):[];!R.trim()||s.length===0||is(n,s,R.trim()).then(()=>{C(!1),c(n)}).catch(t=>m(t.message))},Qe=s=>{if(!s.is_dir)return;const t=f(n,s.name);cs(t).then(i=>q(v=>({...v,[s.name]:i.size}))).catch(i=>m(i.message))},fe=()=>{const s=I.trim();s&&(ce(!0),de([]),ts(s,n,300).then(t=>{de(t.results),L(!0)}).catch(t=>m(t.message)).finally(()=>ce(!1)))},Ve=s=>{L(!1),s.is_dir?c(s.path):c(Ne(s.path))},Xe=s=>{if(s<0){c("/");return}const t=y.slice(0,s+1);c(`/${t.join("/")}`)};return e.jsxs(e.Fragment,{children:[e.jsx(ps,{title:"Files"}),e.jsx("div",{className:"card mb-3",children:e.jsxs("div",{className:"card-body py-2",children:[e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2 mb-2",children:[e.jsxs(r,{variant:"secondary",size:"sm",onClick:_e,disabled:!he,children:[e.jsx("i",{className:"ti ti-arrow-left me-1","aria-hidden":!0}),"Back"]}),e.jsxs(r,{variant:"outline-secondary",size:"sm",onClick:()=>c(n),disabled:M,children:[e.jsx("i",{className:"ti ti-refresh me-1","aria-hidden":!0}),"Refresh"]}),e.jsxs(d,{as:"span",children:[e.jsxs(d.Toggle,{variant:"success",size:"sm",id:"files-new-dropdown",children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"New"]}),e.jsxs(d.Menu,{children:[e.jsxs(d.Item,{onClick:()=>F(!0),children:[e.jsx("i",{className:"ti ti-folder-plus me-2"}),"Folder"]}),e.jsxs(d.Item,{onClick:()=>$(!0),children:[e.jsx("i",{className:"ti ti-file-plus me-2"}),"File"]})]})]}),e.jsx("input",{ref:me,type:"file",className:"d-none",onChange:Pe}),e.jsxs(r,{variant:"primary",size:"sm",onClick:()=>{var s;return(s=me.current)==null?void 0:s.click()},disabled:V,children:[V?e.jsx("span",{className:"spinner-border spinner-border-sm me-1",role:"status"}):e.jsx("i",{className:"ti ti-upload me-1","aria-hidden":!0}),"Upload"]}),o.length===1&&!o[0].is_dir?e.jsxs(r,{variant:"outline-primary",size:"sm",onClick:()=>xe(o[0]),children:[e.jsx("i",{className:"ti ti-download me-1","aria-hidden":!0}),"Download"]}):null,e.jsxs(r,{variant:"outline-secondary",size:"sm",onClick:Le,disabled:o.length===0,children:[e.jsx("i",{className:"ti ti-copy me-1","aria-hidden":!0}),"Copy"]}),e.jsxs(r,{variant:"outline-secondary",size:"sm",onClick:We,disabled:o.length===0,children:[e.jsx("i",{className:"ti ti-cut me-1","aria-hidden":!0}),"Cut"]}),e.jsxs(r,{variant:"outline-primary",size:"sm",onClick:Ge,disabled:!h||h.entries.length===0,children:[e.jsx("i",{className:"ti ti-clipboard me-1","aria-hidden":!0}),"Paste"]}),e.jsxs(r,{variant:"warning",size:"sm",onClick:Ue,disabled:o.length===0,children:[e.jsx("i",{className:"ti ti-file-zip me-1","aria-hidden":!0}),"Compress"]}),e.jsxs(r,{variant:"outline-danger",size:"sm",onClick:Ae,disabled:o.length===0,children:[e.jsx("i",{className:"ti ti-trash me-1","aria-hidden":!0}),"Delete"]})]}),e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2",children:[e.jsxs("div",{className:"input-group input-group-sm",style:{minWidth:240,maxWidth:480},children:[e.jsx("span",{className:"input-group-text",children:"Path"}),e.jsx("input",{className:"form-control font-monospace small",value:W,onChange:s=>G(s.target.value),onKeyDown:s=>s.key==="Enter"&&pe()}),e.jsx(r,{variant:"primary",size:"sm",className:"rounded-0 rounded-end",type:"button",onClick:pe,children:"Go"})]}),e.jsxs("div",{className:"input-group input-group-sm flex-grow-1",style:{minWidth:200},children:[e.jsx("span",{className:"input-group-text",children:e.jsx("i",{className:"ti ti-search","aria-hidden":!0})}),e.jsx("input",{className:"form-control",placeholder:"Filter current folder…",value:H,onChange:s=>ye(s.target.value)})]}),e.jsxs("div",{className:"input-group input-group-sm",style:{minWidth:200},children:[e.jsx("input",{className:"form-control",placeholder:"Search subfolders…",value:I,onChange:s=>$e(s.target.value),onKeyDown:s=>s.key==="Enter"&&fe()}),e.jsx(r,{variant:"outline-secondary",size:"sm",type:"button",onClick:fe,disabled:re,children:re?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):"Search"})]})]}),e.jsx("nav",{"aria-label":"breadcrumb",className:"mt-2 mb-0",children:e.jsxs("ol",{className:"breadcrumb mb-0 small py-1",children:[e.jsx("li",{className:"breadcrumb-item",children:e.jsx("button",{type:"button",className:"btn btn-link btn-sm p-0 text-decoration-none",onClick:()=>c("/"),children:"/"})}),y.map((s,t)=>e.jsx("li",{className:`breadcrumb-item${t===y.length-1?" active":""}`,children:t===y.length-1?s:e.jsx("button",{type:"button",className:"btn btn-link btn-sm p-0 text-decoration-none",onClick:()=>Xe(t),children:s})},`${s}-${t}`))]})})]})}),e.jsxs(l,{show:ke,onHide:()=>{F(!1),z("")},centered:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsx(l.Title,{children:"New folder"})}),e.jsxs("form",{onSubmit:He,children:[e.jsx(l.Body,{children:e.jsx("input",{value:se,onChange:s=>z(s.target.value),placeholder:"Folder name",className:"form-control",autoFocus:!0})}),e.jsxs(l.Footer,{children:[e.jsx(r,{type:"button",variant:"secondary",onClick:()=>{F(!1),z("")},children:"Cancel"}),e.jsx(r,{type:"submit",variant:"success",children:"Create"})]})]})]}),e.jsxs(l,{show:Se,onHide:()=>{$(!1),D("")},centered:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsx(l.Title,{children:"New file"})}),e.jsxs("form",{onSubmit:Te,children:[e.jsx(l.Body,{children:e.jsx("input",{value:te,onChange:s=>D(s.target.value),placeholder:"filename.txt",className:"form-control",autoFocus:!0})}),e.jsxs(l.Footer,{children:[e.jsx(r,{type:"button",variant:"secondary",onClick:()=>{$(!1),D("")},children:"Cancel"}),e.jsx(r,{type:"submit",variant:"primary",children:"Create"})]})]})]}),e.jsxs(l,{show:we,onHide:()=>{P(!1),E(null)},centered:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsx(l.Title,{children:"Permissions"})}),e.jsx(l.Body,{children:j?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"small font-monospace text-break mb-2",children:f(n,j.name)}),e.jsx("label",{className:"form-label small",children:"Mode (octal)"}),e.jsx("input",{className:"form-control mb-2 font-monospace",value:ne,onChange:s=>ae(s.target.value),placeholder:"0644"}),j.is_dir?e.jsxs("div",{className:"form-check",children:[e.jsx("input",{className:"form-check-input",type:"checkbox",id:"chmod-rec",checked:le,onChange:s=>ie(s.target.checked)}),e.jsx("label",{className:"form-check-label small",htmlFor:"chmod-rec",children:"Recursive (chmod entire tree)"})]}):null]}):null}),e.jsxs(l.Footer,{children:[e.jsx(r,{variant:"secondary",onClick:()=>{P(!1),E(null)},children:"Cancel"}),e.jsx(r,{variant:"primary",onClick:Oe,children:"Apply"})]})]}),e.jsxs(l,{show:Fe,onHide:()=>C(!1),centered:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsx(l.Title,{children:"Compress to ZIP"})}),e.jsxs(l.Body,{children:[e.jsxs("p",{className:"small text-secondary mb-2",children:[o.length," item(s) selected"]}),e.jsx("label",{className:"form-label small",children:"Archive name"}),e.jsx("input",{className:"form-control font-monospace",value:R,onChange:s=>A(s.target.value)})]}),e.jsxs(l.Footer,{children:[e.jsx(r,{variant:"secondary",onClick:()=>C(!1),children:"Cancel"}),e.jsx(r,{variant:"primary",onClick:qe,children:"Create ZIP"})]})]}),e.jsxs(l,{show:ze,onHide:()=>L(!1),size:"lg",scrollable:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsxs(l.Title,{children:["Search results",I?`: “${I}”`:""]})}),e.jsx(l.Body,{children:oe.length===0?e.jsx("p",{className:"text-secondary small mb-0",children:"No matches."}):e.jsx("ul",{className:"list-group list-group-flush",children:oe.map(s=>e.jsxs("li",{className:"list-group-item d-flex justify-content-between align-items-center",children:[e.jsx("span",{className:"small font-monospace text-break me-2",children:s.path}),e.jsx(r,{size:"sm",variant:"outline-primary",onClick:()=>Ve(s),children:"Open"})]},s.path))})})]}),e.jsxs(l,{show:!!S,onHide:()=>w(null),fullscreen:"lg-down",size:"lg",children:[e.jsx(l.Header,{closeButton:!0,children:e.jsx(l.Title,{className:"text-break small font-monospace",children:S})}),e.jsx(l.Body,{className:"d-flex flex-column p-0",style:{minHeight:400},children:e.jsx("textarea",{value:Z,onChange:s=>J(s.target.value),className:"form-control font-monospace small flex-grow-1 rounded-0 border-0",style:{minHeight:400},spellCheck:!1})}),e.jsxs(l.Footer,{children:[e.jsx(r,{variant:"secondary",onClick:()=>w(null),children:"Cancel"}),e.jsx(r,{variant:"primary",onClick:Ie,disabled:Y,children:Y?"Saving…":"Save"})]})]}),O?e.jsx(ms,{className:"mb-3",children:O}):null,e.jsx("div",{className:"card",children:M?e.jsx("div",{className:"card-body text-center py-5",children:e.jsx("span",{className:"spinner-border text-secondary",role:"status"})}):e.jsxs(e.Fragment,{children:[e.jsxs(hs,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{width:40},children:e.jsx("input",{type:"checkbox",className:"form-check-input",checked:u.length>0&&g.size===u.length,onChange:Be,"aria-label":"Select all"})}),e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Size"}),e.jsx("th",{className:"d-none d-lg-table-cell",children:"Modified"}),e.jsx("th",{className:"d-none d-md-table-cell",children:"Permission"}),e.jsx("th",{className:"d-none d-xl-table-cell",children:"Owner"}),e.jsx("th",{className:"text-end",style:{minWidth:120},children:"Operation"})]})}),e.jsx("tbody",{children:u.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:"p-0",children:e.jsx(us,{title:"Empty directory",description:"Upload files, create a folder, or adjust the path filter."})})}):u.map(s=>e.jsxs("tr",{children:[e.jsx("td",{onClick:t=>t.stopPropagation(),children:e.jsx("input",{type:"checkbox",className:"form-check-input",checked:g.has(s.name),onChange:()=>De(s.name),"aria-label":`Select ${s.name}`})}),e.jsx("td",{children:s.is_dir?e.jsxs("button",{type:"button",onClick:()=>ue(s),className:"btn btn-link text-start text-decoration-none p-0 d-inline-flex align-items-center gap-2",children:[e.jsx("i",{className:"ti ti-folder text-warning","aria-hidden":!0}),e.jsx("span",{children:s.name})]}):e.jsxs("span",{className:"d-inline-flex align-items-center gap-2",children:[e.jsx("i",{className:"ti ti-file text-secondary","aria-hidden":!0}),s.name]})}),e.jsx("td",{className:"text-secondary small",children:s.is_dir?U[s.name]!==void 0?be(U[s.name]):e.jsx("button",{type:"button",className:"btn btn-link btn-sm p-0",onClick:()=>Qe(s),children:"Calculate"}):be(s.size)}),e.jsx("td",{className:"small text-secondary d-none d-lg-table-cell",children:s.mtime??"—"}),e.jsx("td",{className:"small font-monospace d-none d-md-table-cell",children:s.mode_symbolic?e.jsx(e.Fragment,{children:e.jsx("span",{title:`${s.mode_symbolic} (${s.mode})`,children:s.mode_symbolic})}):s.mode??"—"}),e.jsx("td",{className:"small d-none d-xl-table-cell",children:s.owner?`${s.owner}:${s.group??""}`:"—"}),e.jsx("td",{className:"text-end",children:(x==null?void 0:x.name)===s.name?e.jsxs("span",{className:"d-inline-flex gap-1 align-items-center flex-wrap justify-content-end",children:[e.jsx("input",{value:T,onChange:t=>_(t.target.value),onKeyDown:t=>t.key==="Enter"&&je(),className:"form-control form-control-sm",style:{width:"7rem"},autoFocus:!0}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-success p-1",title:"Save",onClick:je,children:e.jsx("i",{className:"ti ti-check","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm p-1",onClick:()=>{B(null),_("")},children:"Cancel"})]}):e.jsxs(d,{align:"end",onClick:t=>t.stopPropagation(),children:[e.jsx(d.Toggle,{variant:"light",size:"sm",className:"py-0 border",children:"More"}),e.jsxs(d.Menu,{children:[s.is_dir?e.jsxs(d.Item,{onClick:()=>ue(s),children:[e.jsx("i",{className:"ti ti-folder-open me-2"}),"Open"]}):e.jsxs(e.Fragment,{children:[e.jsxs(d.Item,{onClick:()=>xe(s),disabled:ve===s.name,children:[e.jsx("i",{className:"ti ti-download me-2"}),"Download"]}),Me(s.name)?e.jsxs(d.Item,{onClick:()=>Ee(s),children:[e.jsx("i",{className:"ti ti-edit me-2"}),"Edit"]}):null]}),e.jsx(d.Divider,{}),e.jsxs(d.Item,{onClick:()=>{b({op:"copy",entries:[{parent:n,name:s.name}]})},children:[e.jsx("i",{className:"ti ti-copy me-2"}),"Copy"]}),e.jsxs(d.Item,{onClick:()=>{b({op:"cut",entries:[{parent:n,name:s.name}]})},children:[e.jsx("i",{className:"ti ti-cut me-2"}),"Cut"]}),e.jsxs(d.Item,{onClick:()=>{B(s),_(s.name)},children:[e.jsx("i",{className:"ti ti-pencil me-2"}),"Rename"]}),e.jsxs(d.Item,{onClick:()=>Ke(s),children:[e.jsx("i",{className:"ti ti-lock me-2"}),"Permission"]}),e.jsxs(d.Item,{onClick:()=>{N(new Set([s.name])),A(`${s.name.replace(/\.[^/.]+$/,"")||"archive"}.zip`),C(!0)},children:[e.jsx("i",{className:"ti ti-file-zip me-2"}),"Compress"]}),e.jsx(d.Divider,{}),e.jsxs(d.Item,{className:"text-danger",onClick:()=>Re(s),children:[e.jsx("i",{className:"ti ti-trash me-2"}),"Delete"]})]})]})})]},s.name))})]}),!M&&u.length>0?e.jsxs("div",{className:"card-footer py-2 small text-secondary d-flex flex-wrap gap-3",children:[e.jsxs("span",{children:["Directories:"," ",e.jsx("strong",{children:u.filter(s=>s.is_dir).length})]}),e.jsxs("span",{children:["Files:"," ",e.jsx("strong",{children:u.filter(s=>!s.is_dir).length})]}),e.jsxs("span",{children:["Showing ",e.jsx("strong",{children:u.length})," of ",e.jsx("strong",{children:k.length})," in folder"]})]}):null]})}),h&&h.entries.length>0?e.jsxs("div",{className:"alert alert-light border mt-3 mb-0 small py-2",children:[e.jsx("i",{className:"ti ti-clipboard me-1","aria-hidden":!0}),"Clipboard: ",e.jsx("strong",{children:h.op})," (",h.entries.length," item) — use ",e.jsx("strong",{children:"Paste"})," in the target folder."]}):null]})}export{vs as FilesPage}; diff --git a/YakPanel-server/frontend/dist/assets/FilesPage-oDxR4Lhi.js b/YakPanel-server/frontend/dist/assets/FilesPage-oDxR4Lhi.js new file mode 100644 index 00000000..0a1e54b3 --- /dev/null +++ b/YakPanel-server/frontend/dist/assets/FilesPage-oDxR4Lhi.js @@ -0,0 +1 @@ +import{t as Je,r as a,v as Ye,j as e,D as d,w as es,x as ss,y as ts,z as ns,A as ge,B as as,C as ls,E as is,F as rs,G as cs,H as os,I as ds,J as ms,K as hs}from"./index-Cvh4tLHo.js";import{M as l}from"./Modal-CCihVZTY.js";import{A as us}from"./AdminAlert-Bt3L8_zJ.js";import{A as r}from"./AdminButton-BKglG8kI.js";import{A as ps}from"./AdminTable-BQ5Lf7EC.js";import{E as xs}from"./EmptyState-D6lCh4WN.js";import{P as js}from"./PageHeader-D6k34vvM.js";function f(h,n){return h==="/"?`/${n}`:`${h.replace(/\/$/,"")}/${n}`}function Ne(h){const n=h.replace(/\/$/,"").split("/").filter(Boolean);return n.pop(),n.length===0?"/":`/${n.join("/")}`}function be(h){return h<1024?`${h} B`:h<1024*1024?`${(h/1024).toFixed(1)} KB`:h<1024*1024*1024?`${(h/1024/1024).toFixed(1)} MB`:`${(h/1024/1024/1024).toFixed(2)} GB`}const fs=[".txt",".html",".htm",".css",".js",".json",".xml",".md",".py",".php",".sh",".conf",".env",".ini",".log",".yml",".yaml"];function Ss(){const[h]=Je(),[n,Ce]=a.useState("/"),[W,K]=a.useState("/"),[k,ye]=a.useState([]),[M,U]=a.useState(!0),[G,m]=a.useState(""),[H,ve]=a.useState(""),[g,N]=a.useState(()=>new Set),[u,b]=a.useState(null),[O,q]=a.useState({}),[ke,Q]=a.useState(null),[V,X]=a.useState(!1),[S,w]=a.useState(null),[Z,J]=a.useState(""),[Y,ee]=a.useState(!1),[Se,F]=a.useState(!1),[se,z]=a.useState(""),[we,$]=a.useState(!1),[te,D]=a.useState(""),[x,P]=a.useState(null),[T,B]=a.useState(""),[Fe,I]=a.useState(!1),[j,_]=a.useState(null),[ne,ae]=a.useState("0644"),[le,ie]=a.useState(!1),[ze,C]=a.useState(!1),[R,A]=a.useState("archive.zip"),[$e,L]=a.useState(!1),[E,De]=a.useState(""),[re,ce]=a.useState(!1),[oe,de]=a.useState([]),me=a.useRef(null),c=a.useCallback(s=>{U(!0),m(""),N(new Set),Ye(s).then(t=>{Ce(t.path),K(t.path),ye(t.items.sort((i,v)=>i.is_dir===v.is_dir?0:i.is_dir?-1:1)),q({})}).catch(t=>m(t.message)).finally(()=>U(!1))},[]);a.useEffect(()=>{const s=h.get("path");let t="/";if(s&&s.trim())try{t=decodeURIComponent(s.trim())}catch{t=s.trim()}c(t)},[h,c]);const p=a.useMemo(()=>{const s=H.trim().toLowerCase();return s?k.filter(t=>t.name.toLowerCase().includes(s)):k},[k,H]),y=n.replace(/\/$/,"").split("/").filter(Boolean),he=y.length>0,Pe=s=>{N(t=>{const i=new Set(t);return i.has(s)?i.delete(s):i.add(s),i})},Be=()=>{g.size===p.length?N(new Set):N(new Set(p.map(s=>s.name)))},o=a.useMemo(()=>p.filter(s=>g.has(s.name)),[p,g]),ue=s=>{s.is_dir&&c(f(n,s.name))},Ie=()=>{he&&c(Ne(n))},pe=()=>{const s=W.trim()||"/";c(s.startsWith("/")?s:`/${s}`)},xe=s=>{if(s.is_dir)return;const t=f(n,s.name);Q(s.name),ss(t).catch(i=>m(i.message)).finally(()=>Q(null))},_e=s=>{var i;const t=(i=s.target.files)==null?void 0:i[0];t&&(X(!0),m(""),es(n,t).then(()=>c(n)).catch(v=>m(v.message)).finally(()=>{X(!1),s.target.value=""}))},Ee=s=>{const t=f(n,s.name);hs(t).then(i=>{w(t),J(typeof i.content=="string"?i.content:String(i.content))}).catch(i=>m(i.message))},Me=()=>{S&&(ee(!0),os(S,Z).then(()=>{w(null),c(n)}).catch(s=>m(s.message)).finally(()=>ee(!1)))},He=s=>fs.some(t=>s.toLowerCase().endsWith(t)),Te=s=>{s.preventDefault();const t=se.trim();t&&ls(n,t).then(()=>{F(!1),z(""),c(n)}).catch(i=>m(i.message))},Re=s=>{s.preventDefault();const t=te.trim();t&&is(n,t).then(()=>{$(!1),D(""),c(n)}).catch(i=>m(i.message))},je=()=>{if(!x||!T.trim())return;const s=T.trim();if(s===x.name){P(null);return}ms(n,x.name,s).then(()=>{P(null),B(""),c(n)}).catch(t=>m(t.message))},Ae=s=>{confirm(`Delete ${s.is_dir?"folder":"file"} "${s.name}"?`)&&ge(n,s.name,s.is_dir).then(()=>c(n)).catch(t=>m(t.message))},Le=()=>{o.length!==0&&confirm(`Delete ${o.length} item(s)?`)&&Promise.all(o.map(s=>ge(n,s.name,s.is_dir))).then(()=>c(n)).catch(s=>m(s.message))},We=()=>{o.length!==0&&b({op:"copy",entries:o.map(s=>({parent:n,name:s.name}))})},Ke=()=>{o.length!==0&&b({op:"cut",entries:o.map(s=>({parent:n,name:s.name}))})},Ue=()=>{if(!u||u.entries.length===0)return;const s=u.entries.map(t=>u.op==="copy"?ts(t.parent,t.name,n):ns(t.parent,t.name,n));Promise.all(s).then(()=>{(u==null?void 0:u.op)==="cut"&&b(null),c(n)}).catch(t=>m(t.message))},Ge=s=>{_(s),ae(s.mode?s.mode.padStart(3,"0"):"0644"),ie(s.is_dir),I(!0)},Oe=()=>{if(!j)return;const s=f(n,j.name);rs(s,ne,le&&j.is_dir).then(()=>{I(!1),_(null),c(n)}).catch(t=>m(t.message))},qe=()=>{(o.length>0?o.map(t=>t.name):[]).length!==0&&(A(`archive-${Date.now()}.zip`),C(!0))},Qe=()=>{const s=o.length>0?o.map(t=>t.name):[];!R.trim()||s.length===0||cs(n,s,R.trim()).then(()=>{C(!1),c(n)}).catch(t=>m(t.message))},Ve=s=>{if(!s.is_dir)return;const t=f(n,s.name);ds(t).then(i=>q(v=>({...v,[s.name]:i.size}))).catch(i=>m(i.message))},fe=()=>{const s=E.trim();s&&(ce(!0),de([]),as(s,n,300).then(t=>{de(t.results),L(!0)}).catch(t=>m(t.message)).finally(()=>ce(!1)))},Xe=s=>{L(!1),s.is_dir?c(s.path):c(Ne(s.path))},Ze=s=>{if(s<0){c("/");return}const t=y.slice(0,s+1);c(`/${t.join("/")}`)};return e.jsxs(e.Fragment,{children:[e.jsx(js,{title:"Files"}),e.jsx("div",{className:"card mb-3",children:e.jsxs("div",{className:"card-body py-2",children:[e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2 mb-2",children:[e.jsxs(r,{variant:"secondary",size:"sm",onClick:Ie,disabled:!he,children:[e.jsx("i",{className:"ti ti-arrow-left me-1","aria-hidden":!0}),"Back"]}),e.jsxs(r,{variant:"outline-secondary",size:"sm",onClick:()=>c(n),disabled:M,children:[e.jsx("i",{className:"ti ti-refresh me-1","aria-hidden":!0}),"Refresh"]}),e.jsxs(d,{as:"span",children:[e.jsxs(d.Toggle,{variant:"success",size:"sm",id:"files-new-dropdown",children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"New"]}),e.jsxs(d.Menu,{children:[e.jsxs(d.Item,{onClick:()=>F(!0),children:[e.jsx("i",{className:"ti ti-folder-plus me-2"}),"Folder"]}),e.jsxs(d.Item,{onClick:()=>$(!0),children:[e.jsx("i",{className:"ti ti-file-plus me-2"}),"File"]})]})]}),e.jsx("input",{ref:me,type:"file",className:"d-none",onChange:_e}),e.jsxs(r,{variant:"primary",size:"sm",onClick:()=>{var s;return(s=me.current)==null?void 0:s.click()},disabled:V,children:[V?e.jsx("span",{className:"spinner-border spinner-border-sm me-1",role:"status"}):e.jsx("i",{className:"ti ti-upload me-1","aria-hidden":!0}),"Upload"]}),o.length===1&&!o[0].is_dir?e.jsxs(r,{variant:"outline-primary",size:"sm",onClick:()=>xe(o[0]),children:[e.jsx("i",{className:"ti ti-download me-1","aria-hidden":!0}),"Download"]}):null,e.jsxs(r,{variant:"outline-secondary",size:"sm",onClick:We,disabled:o.length===0,children:[e.jsx("i",{className:"ti ti-copy me-1","aria-hidden":!0}),"Copy"]}),e.jsxs(r,{variant:"outline-secondary",size:"sm",onClick:Ke,disabled:o.length===0,children:[e.jsx("i",{className:"ti ti-cut me-1","aria-hidden":!0}),"Cut"]}),e.jsxs(r,{variant:"outline-primary",size:"sm",onClick:Ue,disabled:!u||u.entries.length===0,children:[e.jsx("i",{className:"ti ti-clipboard me-1","aria-hidden":!0}),"Paste"]}),e.jsxs(r,{variant:"warning",size:"sm",onClick:qe,disabled:o.length===0,children:[e.jsx("i",{className:"ti ti-file-zip me-1","aria-hidden":!0}),"Compress"]}),e.jsxs(r,{variant:"outline-danger",size:"sm",onClick:Le,disabled:o.length===0,children:[e.jsx("i",{className:"ti ti-trash me-1","aria-hidden":!0}),"Delete"]})]}),e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2",children:[e.jsxs("div",{className:"input-group input-group-sm",style:{minWidth:240,maxWidth:480},children:[e.jsx("span",{className:"input-group-text",children:"Path"}),e.jsx("input",{className:"form-control font-monospace small",value:W,onChange:s=>K(s.target.value),onKeyDown:s=>s.key==="Enter"&&pe()}),e.jsx(r,{variant:"primary",size:"sm",className:"rounded-0 rounded-end",type:"button",onClick:pe,children:"Go"})]}),e.jsxs("div",{className:"input-group input-group-sm flex-grow-1",style:{minWidth:200},children:[e.jsx("span",{className:"input-group-text",children:e.jsx("i",{className:"ti ti-search","aria-hidden":!0})}),e.jsx("input",{className:"form-control",placeholder:"Filter current folder…",value:H,onChange:s=>ve(s.target.value)})]}),e.jsxs("div",{className:"input-group input-group-sm",style:{minWidth:200},children:[e.jsx("input",{className:"form-control",placeholder:"Search subfolders…",value:E,onChange:s=>De(s.target.value),onKeyDown:s=>s.key==="Enter"&&fe()}),e.jsx(r,{variant:"outline-secondary",size:"sm",type:"button",onClick:fe,disabled:re,children:re?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):"Search"})]})]}),e.jsx("nav",{"aria-label":"breadcrumb",className:"mt-2 mb-0",children:e.jsxs("ol",{className:"breadcrumb mb-0 small py-1",children:[e.jsx("li",{className:"breadcrumb-item",children:e.jsx("button",{type:"button",className:"btn btn-link btn-sm p-0 text-decoration-none",onClick:()=>c("/"),children:"/"})}),y.map((s,t)=>e.jsx("li",{className:`breadcrumb-item${t===y.length-1?" active":""}`,children:t===y.length-1?s:e.jsx("button",{type:"button",className:"btn btn-link btn-sm p-0 text-decoration-none",onClick:()=>Ze(t),children:s})},`${s}-${t}`))]})})]})}),e.jsxs(l,{show:Se,onHide:()=>{F(!1),z("")},centered:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsx(l.Title,{children:"New folder"})}),e.jsxs("form",{onSubmit:Te,children:[e.jsx(l.Body,{children:e.jsx("input",{value:se,onChange:s=>z(s.target.value),placeholder:"Folder name",className:"form-control",autoFocus:!0})}),e.jsxs(l.Footer,{children:[e.jsx(r,{type:"button",variant:"secondary",onClick:()=>{F(!1),z("")},children:"Cancel"}),e.jsx(r,{type:"submit",variant:"success",children:"Create"})]})]})]}),e.jsxs(l,{show:we,onHide:()=>{$(!1),D("")},centered:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsx(l.Title,{children:"New file"})}),e.jsxs("form",{onSubmit:Re,children:[e.jsx(l.Body,{children:e.jsx("input",{value:te,onChange:s=>D(s.target.value),placeholder:"filename.txt",className:"form-control",autoFocus:!0})}),e.jsxs(l.Footer,{children:[e.jsx(r,{type:"button",variant:"secondary",onClick:()=>{$(!1),D("")},children:"Cancel"}),e.jsx(r,{type:"submit",variant:"primary",children:"Create"})]})]})]}),e.jsxs(l,{show:Fe,onHide:()=>{I(!1),_(null)},centered:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsx(l.Title,{children:"Permissions"})}),e.jsx(l.Body,{children:j?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"small font-monospace text-break mb-2",children:f(n,j.name)}),e.jsx("label",{className:"form-label small",children:"Mode (octal)"}),e.jsx("input",{className:"form-control mb-2 font-monospace",value:ne,onChange:s=>ae(s.target.value),placeholder:"0644"}),j.is_dir?e.jsxs("div",{className:"form-check",children:[e.jsx("input",{className:"form-check-input",type:"checkbox",id:"chmod-rec",checked:le,onChange:s=>ie(s.target.checked)}),e.jsx("label",{className:"form-check-label small",htmlFor:"chmod-rec",children:"Recursive (chmod entire tree)"})]}):null]}):null}),e.jsxs(l.Footer,{children:[e.jsx(r,{variant:"secondary",onClick:()=>{I(!1),_(null)},children:"Cancel"}),e.jsx(r,{variant:"primary",onClick:Oe,children:"Apply"})]})]}),e.jsxs(l,{show:ze,onHide:()=>C(!1),centered:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsx(l.Title,{children:"Compress to ZIP"})}),e.jsxs(l.Body,{children:[e.jsxs("p",{className:"small text-secondary mb-2",children:[o.length," item(s) selected"]}),e.jsx("label",{className:"form-label small",children:"Archive name"}),e.jsx("input",{className:"form-control font-monospace",value:R,onChange:s=>A(s.target.value)})]}),e.jsxs(l.Footer,{children:[e.jsx(r,{variant:"secondary",onClick:()=>C(!1),children:"Cancel"}),e.jsx(r,{variant:"primary",onClick:Qe,children:"Create ZIP"})]})]}),e.jsxs(l,{show:$e,onHide:()=>L(!1),size:"lg",scrollable:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsxs(l.Title,{children:["Search results",E?`: “${E}”`:""]})}),e.jsx(l.Body,{children:oe.length===0?e.jsx("p",{className:"text-secondary small mb-0",children:"No matches."}):e.jsx("ul",{className:"list-group list-group-flush",children:oe.map(s=>e.jsxs("li",{className:"list-group-item d-flex justify-content-between align-items-center",children:[e.jsx("span",{className:"small font-monospace text-break me-2",children:s.path}),e.jsx(r,{size:"sm",variant:"outline-primary",onClick:()=>Xe(s),children:"Open"})]},s.path))})})]}),e.jsxs(l,{show:!!S,onHide:()=>w(null),fullscreen:"lg-down",size:"lg",children:[e.jsx(l.Header,{closeButton:!0,children:e.jsx(l.Title,{className:"text-break small font-monospace",children:S})}),e.jsx(l.Body,{className:"d-flex flex-column p-0",style:{minHeight:400},children:e.jsx("textarea",{value:Z,onChange:s=>J(s.target.value),className:"form-control font-monospace small flex-grow-1 rounded-0 border-0",style:{minHeight:400},spellCheck:!1})}),e.jsxs(l.Footer,{children:[e.jsx(r,{variant:"secondary",onClick:()=>w(null),children:"Cancel"}),e.jsx(r,{variant:"primary",onClick:Me,disabled:Y,children:Y?"Saving…":"Save"})]})]}),G?e.jsx(us,{className:"mb-3",children:G}):null,e.jsx("div",{className:"card",children:M?e.jsx("div",{className:"card-body text-center py-5",children:e.jsx("span",{className:"spinner-border text-secondary",role:"status"})}):e.jsxs(e.Fragment,{children:[e.jsxs(ps,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{width:40},children:e.jsx("input",{type:"checkbox",className:"form-check-input",checked:p.length>0&&g.size===p.length,onChange:Be,"aria-label":"Select all"})}),e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Size"}),e.jsx("th",{className:"d-none d-lg-table-cell",children:"Modified"}),e.jsx("th",{className:"d-none d-md-table-cell",children:"Permission"}),e.jsx("th",{className:"d-none d-xl-table-cell",children:"Owner"}),e.jsx("th",{className:"text-end",style:{minWidth:120},children:"Operation"})]})}),e.jsx("tbody",{children:p.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:"p-0",children:e.jsx(xs,{title:"Empty directory",description:"Upload files, create a folder, or adjust the path filter."})})}):p.map(s=>e.jsxs("tr",{children:[e.jsx("td",{onClick:t=>t.stopPropagation(),children:e.jsx("input",{type:"checkbox",className:"form-check-input",checked:g.has(s.name),onChange:()=>Pe(s.name),"aria-label":`Select ${s.name}`})}),e.jsx("td",{children:s.is_dir?e.jsxs("button",{type:"button",onClick:()=>ue(s),className:"btn btn-link text-start text-decoration-none p-0 d-inline-flex align-items-center gap-2",children:[e.jsx("i",{className:"ti ti-folder text-warning","aria-hidden":!0}),e.jsx("span",{children:s.name})]}):e.jsxs("span",{className:"d-inline-flex align-items-center gap-2",children:[e.jsx("i",{className:"ti ti-file text-secondary","aria-hidden":!0}),s.name]})}),e.jsx("td",{className:"text-secondary small",children:s.is_dir?O[s.name]!==void 0?be(O[s.name]):e.jsx("button",{type:"button",className:"btn btn-link btn-sm p-0",onClick:()=>Ve(s),children:"Calculate"}):be(s.size)}),e.jsx("td",{className:"small text-secondary d-none d-lg-table-cell",children:s.mtime??"—"}),e.jsx("td",{className:"small font-monospace d-none d-md-table-cell",children:s.mode_symbolic?e.jsx(e.Fragment,{children:e.jsx("span",{title:`${s.mode_symbolic} (${s.mode})`,children:s.mode_symbolic})}):s.mode??"—"}),e.jsx("td",{className:"small d-none d-xl-table-cell",children:s.owner?`${s.owner}:${s.group??""}`:"—"}),e.jsx("td",{className:"text-end",children:(x==null?void 0:x.name)===s.name?e.jsxs("span",{className:"d-inline-flex gap-1 align-items-center flex-wrap justify-content-end",children:[e.jsx("input",{value:T,onChange:t=>B(t.target.value),onKeyDown:t=>t.key==="Enter"&&je(),className:"form-control form-control-sm",style:{width:"7rem"},autoFocus:!0}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-success p-1",title:"Save",onClick:je,children:e.jsx("i",{className:"ti ti-check","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm p-1",onClick:()=>{P(null),B("")},children:"Cancel"})]}):e.jsxs(d,{align:"end",onClick:t=>t.stopPropagation(),children:[e.jsx(d.Toggle,{variant:"light",size:"sm",className:"py-0 border",children:"More"}),e.jsxs(d.Menu,{children:[s.is_dir?e.jsxs(d.Item,{onClick:()=>ue(s),children:[e.jsx("i",{className:"ti ti-folder-open me-2"}),"Open"]}):e.jsxs(e.Fragment,{children:[e.jsxs(d.Item,{onClick:()=>xe(s),disabled:ke===s.name,children:[e.jsx("i",{className:"ti ti-download me-2"}),"Download"]}),He(s.name)?e.jsxs(d.Item,{onClick:()=>Ee(s),children:[e.jsx("i",{className:"ti ti-edit me-2"}),"Edit"]}):null]}),e.jsx(d.Divider,{}),e.jsxs(d.Item,{onClick:()=>{b({op:"copy",entries:[{parent:n,name:s.name}]})},children:[e.jsx("i",{className:"ti ti-copy me-2"}),"Copy"]}),e.jsxs(d.Item,{onClick:()=>{b({op:"cut",entries:[{parent:n,name:s.name}]})},children:[e.jsx("i",{className:"ti ti-cut me-2"}),"Cut"]}),e.jsxs(d.Item,{onClick:()=>{P(s),B(s.name)},children:[e.jsx("i",{className:"ti ti-pencil me-2"}),"Rename"]}),e.jsxs(d.Item,{onClick:()=>Ge(s),children:[e.jsx("i",{className:"ti ti-lock me-2"}),"Permission"]}),e.jsxs(d.Item,{onClick:()=>{N(new Set([s.name])),A(`${s.name.replace(/\.[^/.]+$/,"")||"archive"}.zip`),C(!0)},children:[e.jsx("i",{className:"ti ti-file-zip me-2"}),"Compress"]}),e.jsx(d.Divider,{}),e.jsxs(d.Item,{className:"text-danger",onClick:()=>Ae(s),children:[e.jsx("i",{className:"ti ti-trash me-2"}),"Delete"]})]})]})})]},s.name))})]}),!M&&p.length>0?e.jsxs("div",{className:"card-footer py-2 small text-secondary d-flex flex-wrap gap-3",children:[e.jsxs("span",{children:["Directories:"," ",e.jsx("strong",{children:p.filter(s=>s.is_dir).length})]}),e.jsxs("span",{children:["Files:"," ",e.jsx("strong",{children:p.filter(s=>!s.is_dir).length})]}),e.jsxs("span",{children:["Showing ",e.jsx("strong",{children:p.length})," of ",e.jsx("strong",{children:k.length})," in folder"]})]}):null]})}),u&&u.entries.length>0?e.jsxs("div",{className:"alert alert-light border mt-3 mb-0 small py-2",children:[e.jsx("i",{className:"ti ti-clipboard me-1","aria-hidden":!0}),"Clipboard: ",e.jsx("strong",{children:u.op})," (",u.entries.length," item) — use ",e.jsx("strong",{children:"Paste"})," in the target folder."]}):null]})}export{Ss as FilesPage}; diff --git a/YakPanel-server/frontend/dist/assets/FirewallPage-Bu-mOiN9.js b/YakPanel-server/frontend/dist/assets/FirewallPage-Cczmj9CC.js similarity index 91% rename from YakPanel-server/frontend/dist/assets/FirewallPage-Bu-mOiN9.js rename to YakPanel-server/frontend/dist/assets/FirewallPage-Cczmj9CC.js index 0fc30b9f..4b6c0ef9 100644 --- a/YakPanel-server/frontend/dist/assets/FirewallPage-Bu-mOiN9.js +++ b/YakPanel-server/frontend/dist/assets/FirewallPage-Cczmj9CC.js @@ -1 +1 @@ -import{r as t,j as e,a as p,V as k}from"./index-CRR9sQ49.js";import{M as r}from"./Modal-B7V4w_St.js";import{A as y}from"./AdminAlert-DW1IRWce.js";import{A as c}from"./AdminButton-Bd2cLTu3.js";import{A as D}from"./AdminTable-BLiLxfnS.js";import{E as H}from"./EmptyState-C61VdEFl.js";import{P as g}from"./PageHeader-BcjNf7GG.js";function W(){const[o,v]=t.useState([]),[A,x]=t.useState(!0),[u,d]=t.useState(""),[w,a]=t.useState(!1),[j,f]=t.useState(!1),[N,m]=t.useState(""),[h,b]=t.useState(!1),n=()=>{x(!0),p("/firewall/list").then(v).catch(s=>d(s.message)).finally(()=>x(!1))};t.useEffect(()=>{n()},[]);const S=s=>{s.preventDefault();const l=s.currentTarget,i=l.elements.namedItem("port").value.trim(),E=l.elements.namedItem("protocol").value,F=l.elements.namedItem("action").value,R=l.elements.namedItem("ps").value.trim();if(!i){m("Port is required");return}f(!0),m(""),p("/firewall/create",{method:"POST",body:JSON.stringify({port:i,protocol:E,action:F,ps:R})}).then(()=>{a(!1),l.reset(),n()}).catch(T=>m(T.message)).finally(()=>f(!1))},C=(s,l)=>{confirm(`Delete rule for port ${l}?`)&&p(`/firewall/${s}`,{method:"DELETE"}).then(n).catch(i=>d(i.message))},P=()=>{b(!0),k().then(()=>n()).catch(s=>d(s.message)).finally(()=>b(!1))};return A?e.jsxs(e.Fragment,{children:[e.jsx(g,{title:"Security / Firewall"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(g,{title:"Security / Firewall",actions:e.jsxs("div",{className:"d-flex flex-wrap gap-2",children:[e.jsxs(c,{variant:"success",disabled:h||o.length===0,onClick:P,children:[h?e.jsx("span",{className:"spinner-border spinner-border-sm me-1",role:"status"}):e.jsx("i",{className:"ti ti-bolt me-1","aria-hidden":!0}),h?"Applying…":"Apply to UFW"]}),e.jsxs(c,{variant:"primary",onClick:()=>a(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add Rule"]})]})}),u?e.jsx(y,{className:"mb-3",children:u}):null,e.jsxs("div",{className:"alert alert-warning small mb-3",children:['Rules are stored in the panel. Click "Apply to UFW" to run ',e.jsx("code",{className:"font-monospace",children:"ufw allow/deny"})," for each rule."]}),e.jsxs(r,{show:w,onHide:()=>a(!1),centered:!0,children:[e.jsx(r.Header,{closeButton:!0,children:e.jsx(r.Title,{children:"Add Firewall Rule"})}),e.jsxs("form",{onSubmit:S,children:[e.jsxs(r.Body,{children:[N?e.jsx(y,{className:"mb-3",children:N}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Port"}),e.jsx("input",{name:"port",type:"text",placeholder:"80 or 80-90 or 80,443",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Protocol"}),e.jsxs("select",{name:"protocol",className:"form-select",children:[e.jsx("option",{value:"tcp",children:"TCP"}),e.jsx("option",{value:"udp",children:"UDP"})]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Action"}),e.jsxs("select",{name:"action",className:"form-select",children:[e.jsx("option",{value:"accept",children:"Accept"}),e.jsx("option",{value:"drop",children:"Drop"}),e.jsx("option",{value:"reject",children:"Reject"})]})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{name:"ps",type:"text",placeholder:"HTTP",className:"form-control"})]})]}),e.jsxs(r.Footer,{children:[e.jsx(c,{type:"button",variant:"secondary",onClick:()=>a(!1),children:"Cancel"}),e.jsx(c,{type:"submit",variant:"primary",disabled:j,children:j?"Adding…":"Add"})]})]})]}),e.jsx("div",{className:"card",children:e.jsxs(D,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Port"}),e.jsx("th",{children:"Protocol"}),e.jsx("th",{children:"Action"}),e.jsx("th",{children:"Note"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:o.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-0",children:e.jsx(H,{title:"No rules",description:'Click "Add Rule" to create one.'})})}):o.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"font-monospace",children:s.port}),e.jsx("td",{children:s.protocol}),e.jsx("td",{children:s.action}),e.jsx("td",{children:s.ps||"—"}),e.jsx("td",{className:"text-end",children:e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Delete",onClick:()=>C(s.id,s.port),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})})]},s.id))})]})})]})}export{W as FirewallPage}; +import{r as t,j as e,M as p,_ as k}from"./index-Cvh4tLHo.js";import{M as r}from"./Modal-CCihVZTY.js";import{A as y}from"./AdminAlert-Bt3L8_zJ.js";import{A as c}from"./AdminButton-BKglG8kI.js";import{A as D}from"./AdminTable-BQ5Lf7EC.js";import{E as H}from"./EmptyState-D6lCh4WN.js";import{P as g}from"./PageHeader-D6k34vvM.js";function W(){const[o,v]=t.useState([]),[A,x]=t.useState(!0),[u,d]=t.useState(""),[w,a]=t.useState(!1),[j,f]=t.useState(!1),[N,m]=t.useState(""),[h,b]=t.useState(!1),n=()=>{x(!0),p("/firewall/list").then(v).catch(s=>d(s.message)).finally(()=>x(!1))};t.useEffect(()=>{n()},[]);const S=s=>{s.preventDefault();const l=s.currentTarget,i=l.elements.namedItem("port").value.trim(),E=l.elements.namedItem("protocol").value,F=l.elements.namedItem("action").value,R=l.elements.namedItem("ps").value.trim();if(!i){m("Port is required");return}f(!0),m(""),p("/firewall/create",{method:"POST",body:JSON.stringify({port:i,protocol:E,action:F,ps:R})}).then(()=>{a(!1),l.reset(),n()}).catch(T=>m(T.message)).finally(()=>f(!1))},C=(s,l)=>{confirm(`Delete rule for port ${l}?`)&&p(`/firewall/${s}`,{method:"DELETE"}).then(n).catch(i=>d(i.message))},P=()=>{b(!0),k().then(()=>n()).catch(s=>d(s.message)).finally(()=>b(!1))};return A?e.jsxs(e.Fragment,{children:[e.jsx(g,{title:"Security / Firewall"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(g,{title:"Security / Firewall",actions:e.jsxs("div",{className:"d-flex flex-wrap gap-2",children:[e.jsxs(c,{variant:"success",disabled:h||o.length===0,onClick:P,children:[h?e.jsx("span",{className:"spinner-border spinner-border-sm me-1",role:"status"}):e.jsx("i",{className:"ti ti-bolt me-1","aria-hidden":!0}),h?"Applying…":"Apply to UFW"]}),e.jsxs(c,{variant:"primary",onClick:()=>a(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add Rule"]})]})}),u?e.jsx(y,{className:"mb-3",children:u}):null,e.jsxs("div",{className:"alert alert-warning small mb-3",children:['Rules are stored in the panel. Click "Apply to UFW" to run ',e.jsx("code",{className:"font-monospace",children:"ufw allow/deny"})," for each rule."]}),e.jsxs(r,{show:w,onHide:()=>a(!1),centered:!0,children:[e.jsx(r.Header,{closeButton:!0,children:e.jsx(r.Title,{children:"Add Firewall Rule"})}),e.jsxs("form",{onSubmit:S,children:[e.jsxs(r.Body,{children:[N?e.jsx(y,{className:"mb-3",children:N}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Port"}),e.jsx("input",{name:"port",type:"text",placeholder:"80 or 80-90 or 80,443",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Protocol"}),e.jsxs("select",{name:"protocol",className:"form-select",children:[e.jsx("option",{value:"tcp",children:"TCP"}),e.jsx("option",{value:"udp",children:"UDP"})]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Action"}),e.jsxs("select",{name:"action",className:"form-select",children:[e.jsx("option",{value:"accept",children:"Accept"}),e.jsx("option",{value:"drop",children:"Drop"}),e.jsx("option",{value:"reject",children:"Reject"})]})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{name:"ps",type:"text",placeholder:"HTTP",className:"form-control"})]})]}),e.jsxs(r.Footer,{children:[e.jsx(c,{type:"button",variant:"secondary",onClick:()=>a(!1),children:"Cancel"}),e.jsx(c,{type:"submit",variant:"primary",disabled:j,children:j?"Adding…":"Add"})]})]})]}),e.jsx("div",{className:"card",children:e.jsxs(D,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Port"}),e.jsx("th",{children:"Protocol"}),e.jsx("th",{children:"Action"}),e.jsx("th",{children:"Note"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:o.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-0",children:e.jsx(H,{title:"No rules",description:'Click "Add Rule" to create one.'})})}):o.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"font-monospace",children:s.port}),e.jsx("td",{children:s.protocol}),e.jsx("td",{children:s.action}),e.jsx("td",{children:s.ps||"—"}),e.jsx("td",{className:"text-end",children:e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Delete",onClick:()=>C(s.id,s.port),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})})]},s.id))})]})})]})}export{W as FirewallPage}; diff --git a/YakPanel-server/frontend/dist/assets/FtpPage-DG8coQcY.js b/YakPanel-server/frontend/dist/assets/FtpPage-CjINqUGM.js similarity index 94% rename from YakPanel-server/frontend/dist/assets/FtpPage-DG8coQcY.js rename to YakPanel-server/frontend/dist/assets/FtpPage-CjINqUGM.js index 557ddf91..a7c7974d 100644 --- a/YakPanel-server/frontend/dist/assets/FtpPage-DG8coQcY.js +++ b/YakPanel-server/frontend/dist/assets/FtpPage-CjINqUGM.js @@ -1 +1 @@ -import{r,j as e,a as x,I as q}from"./index-CRR9sQ49.js";import{M as t}from"./Modal-B7V4w_St.js";import{A as j}from"./AdminAlert-DW1IRWce.js";import{A as D}from"./AdminButton-Bd2cLTu3.js";import{A as B}from"./AdminTable-BLiLxfnS.js";import{E as H}from"./EmptyState-C61VdEFl.js";import{P as b}from"./PageHeader-BcjNf7GG.js";function J(){const[f,F]=r.useState([]),[T,N]=r.useState(!0),[w,g]=r.useState(""),[S,c]=r.useState(!1),[P,y]=r.useState(!1),[v,m]=r.useState(""),[h,i]=r.useState(null),[C,o]=r.useState(""),u=()=>{N(!0),x("/ftp/list").then(F).catch(s=>g(s.message)).finally(()=>N(!1))};r.useEffect(()=>{u()},[]);const A=s=>{s.preventDefault();const a=s.currentTarget,n=a.elements.namedItem("name").value.trim(),l=a.elements.namedItem("password").value,d=a.elements.namedItem("path").value.trim(),p=a.elements.namedItem("ps").value.trim();if(!n||!l||!d){m("Name, password and path are required");return}y(!0),m(""),x("/ftp/create",{method:"POST",body:JSON.stringify({name:n,password:l,path:d,ps:p})}).then(()=>{c(!1),a.reset(),u()}).catch(k=>m(k.message)).finally(()=>y(!1))},E=(s,a)=>{s.preventDefault();const n=s.currentTarget,l=n.elements.namedItem("new_password").value,d=n.elements.namedItem("confirm_password").value;if(!l||l.length<6){o("Password must be at least 6 characters");return}if(l!==d){o("Passwords do not match");return}o(""),q(a,l).then(()=>i(null)).catch(p=>o(p.message))},I=(s,a)=>{confirm(`Delete FTP account "${a}"?`)&&x(`/ftp/${s}`,{method:"DELETE"}).then(u).catch(n=>g(n.message))};return T?e.jsxs(e.Fragment,{children:[e.jsx(b,{title:"FTP"}),e.jsx("div",{className:"text-center py-5 text-muted",children:"Loading…"})]}):w?e.jsxs(e.Fragment,{children:[e.jsx(b,{title:"FTP"}),e.jsx(j,{variant:"danger",children:w})]}):e.jsxs(e.Fragment,{children:[e.jsx(b,{title:"FTP",actions:e.jsxs(D,{onClick:()=>c(!0),children:[e.jsx("i",{className:"ti ti-plus me-1"}),"Add FTP"]})}),e.jsxs("div",{className:"alert alert-secondary",role:"note",children:["FTP accounts use Pure-FTPd (pure-pw). Path must be under www root. Install:"," ",e.jsx("code",{children:"apt install pure-ftpd pure-ftpd-common"})]}),e.jsxs(t,{show:S,onHide:()=>c(!1),centered:!0,children:[e.jsx(t.Header,{closeButton:!0,children:e.jsx(t.Title,{children:"Create FTP Account"})}),e.jsxs("form",{onSubmit:A,children:[e.jsxs(t.Body,{children:[v?e.jsx(j,{variant:"danger",children:v}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Username"}),e.jsx("input",{name:"name",type:"text",placeholder:"ftpuser",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Password"}),e.jsx("input",{name:"password",type:"password",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Path"}),e.jsx("input",{name:"path",type:"text",placeholder:"/www/wwwroot",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{name:"ps",type:"text",placeholder:"My FTP",className:"form-control"})]})]}),e.jsxs(t.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>c(!1),children:"Cancel"}),e.jsx("button",{type:"submit",disabled:P,className:"btn btn-primary",children:P?"Creating…":"Create"})]})]})]}),e.jsx("div",{className:"card shadow-sm border-0",children:e.jsx("div",{className:"card-body p-0",children:e.jsxs(B,{children:[e.jsx("thead",{className:"table-light",children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Path"}),e.jsx("th",{children:"Note"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:f.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"p-0",children:e.jsx(H,{title:"No FTP accounts",description:'Click "Add FTP" to create one.'})})}):f.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",children:s.name}),e.jsx("td",{className:"align-middle",children:s.path}),e.jsx("td",{className:"align-middle text-muted",children:s.ps||"—"}),e.jsxs("td",{className:"align-middle text-end",children:[e.jsx("button",{type:"button",onClick:()=>i(s.id),className:"btn btn-sm btn-outline-warning me-1",title:"Change password",children:e.jsx("i",{className:"ti ti-key"})}),e.jsx("button",{type:"button",onClick:()=>I(s.id,s.name),className:"btn btn-sm btn-outline-danger",title:"Delete",children:e.jsx("i",{className:"ti ti-trash"})})]})]},s.id))})]})})}),e.jsxs(t,{show:h!=null,onHide:()=>i(null),centered:!0,children:[e.jsx(t.Header,{closeButton:!0,children:e.jsx(t.Title,{children:"Change FTP Password"})}),h!=null?e.jsxs("form",{onSubmit:s=>E(s,h),children:[e.jsxs(t.Body,{children:[C?e.jsx(j,{variant:"danger",children:C}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"New Password"}),e.jsx("input",{name:"new_password",type:"password",minLength:6,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Confirm Password"}),e.jsx("input",{name:"confirm_password",type:"password",minLength:6,className:"form-control",required:!0})]})]}),e.jsxs(t.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>i(null),children:"Cancel"}),e.jsx("button",{type:"submit",className:"btn btn-primary",children:"Update"})]})]}):null]})]})}export{J as FtpPage}; +import{r,j as e,M as x,N as q}from"./index-Cvh4tLHo.js";import{M as t}from"./Modal-CCihVZTY.js";import{A as j}from"./AdminAlert-Bt3L8_zJ.js";import{A as D}from"./AdminButton-BKglG8kI.js";import{A as B}from"./AdminTable-BQ5Lf7EC.js";import{E as H}from"./EmptyState-D6lCh4WN.js";import{P as b}from"./PageHeader-D6k34vvM.js";function J(){const[f,F]=r.useState([]),[T,N]=r.useState(!0),[w,g]=r.useState(""),[S,c]=r.useState(!1),[P,y]=r.useState(!1),[v,m]=r.useState(""),[h,i]=r.useState(null),[C,o]=r.useState(""),u=()=>{N(!0),x("/ftp/list").then(F).catch(s=>g(s.message)).finally(()=>N(!1))};r.useEffect(()=>{u()},[]);const A=s=>{s.preventDefault();const a=s.currentTarget,n=a.elements.namedItem("name").value.trim(),l=a.elements.namedItem("password").value,d=a.elements.namedItem("path").value.trim(),p=a.elements.namedItem("ps").value.trim();if(!n||!l||!d){m("Name, password and path are required");return}y(!0),m(""),x("/ftp/create",{method:"POST",body:JSON.stringify({name:n,password:l,path:d,ps:p})}).then(()=>{c(!1),a.reset(),u()}).catch(k=>m(k.message)).finally(()=>y(!1))},E=(s,a)=>{s.preventDefault();const n=s.currentTarget,l=n.elements.namedItem("new_password").value,d=n.elements.namedItem("confirm_password").value;if(!l||l.length<6){o("Password must be at least 6 characters");return}if(l!==d){o("Passwords do not match");return}o(""),q(a,l).then(()=>i(null)).catch(p=>o(p.message))},I=(s,a)=>{confirm(`Delete FTP account "${a}"?`)&&x(`/ftp/${s}`,{method:"DELETE"}).then(u).catch(n=>g(n.message))};return T?e.jsxs(e.Fragment,{children:[e.jsx(b,{title:"FTP"}),e.jsx("div",{className:"text-center py-5 text-muted",children:"Loading…"})]}):w?e.jsxs(e.Fragment,{children:[e.jsx(b,{title:"FTP"}),e.jsx(j,{variant:"danger",children:w})]}):e.jsxs(e.Fragment,{children:[e.jsx(b,{title:"FTP",actions:e.jsxs(D,{onClick:()=>c(!0),children:[e.jsx("i",{className:"ti ti-plus me-1"}),"Add FTP"]})}),e.jsxs("div",{className:"alert alert-secondary",role:"note",children:["FTP accounts use Pure-FTPd (pure-pw). Path must be under www root. Install:"," ",e.jsx("code",{children:"apt install pure-ftpd pure-ftpd-common"})]}),e.jsxs(t,{show:S,onHide:()=>c(!1),centered:!0,children:[e.jsx(t.Header,{closeButton:!0,children:e.jsx(t.Title,{children:"Create FTP Account"})}),e.jsxs("form",{onSubmit:A,children:[e.jsxs(t.Body,{children:[v?e.jsx(j,{variant:"danger",children:v}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Username"}),e.jsx("input",{name:"name",type:"text",placeholder:"ftpuser",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Password"}),e.jsx("input",{name:"password",type:"password",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Path"}),e.jsx("input",{name:"path",type:"text",placeholder:"/www/wwwroot",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{name:"ps",type:"text",placeholder:"My FTP",className:"form-control"})]})]}),e.jsxs(t.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>c(!1),children:"Cancel"}),e.jsx("button",{type:"submit",disabled:P,className:"btn btn-primary",children:P?"Creating…":"Create"})]})]})]}),e.jsx("div",{className:"card shadow-sm border-0",children:e.jsx("div",{className:"card-body p-0",children:e.jsxs(B,{children:[e.jsx("thead",{className:"table-light",children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Path"}),e.jsx("th",{children:"Note"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:f.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"p-0",children:e.jsx(H,{title:"No FTP accounts",description:'Click "Add FTP" to create one.'})})}):f.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",children:s.name}),e.jsx("td",{className:"align-middle",children:s.path}),e.jsx("td",{className:"align-middle text-muted",children:s.ps||"—"}),e.jsxs("td",{className:"align-middle text-end",children:[e.jsx("button",{type:"button",onClick:()=>i(s.id),className:"btn btn-sm btn-outline-warning me-1",title:"Change password",children:e.jsx("i",{className:"ti ti-key"})}),e.jsx("button",{type:"button",onClick:()=>I(s.id,s.name),className:"btn btn-sm btn-outline-danger",title:"Delete",children:e.jsx("i",{className:"ti ti-trash"})})]})]},s.id))})]})})}),e.jsxs(t,{show:h!=null,onHide:()=>i(null),centered:!0,children:[e.jsx(t.Header,{closeButton:!0,children:e.jsx(t.Title,{children:"Change FTP Password"})}),h!=null?e.jsxs("form",{onSubmit:s=>E(s,h),children:[e.jsxs(t.Body,{children:[C?e.jsx(j,{variant:"danger",children:C}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"New Password"}),e.jsx("input",{name:"new_password",type:"password",minLength:6,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Confirm Password"}),e.jsx("input",{name:"confirm_password",type:"password",minLength:6,className:"form-control",required:!0})]})]}),e.jsxs(t.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>i(null),children:"Cancel"}),e.jsx("button",{type:"submit",className:"btn btn-primary",children:"Update"})]})]}):null]})]})}export{J as FtpPage}; diff --git a/YakPanel-server/frontend/dist/assets/LogsPage-B1uIfI5z.js b/YakPanel-server/frontend/dist/assets/LogsPage-z5Orin3I.js similarity index 93% rename from YakPanel-server/frontend/dist/assets/LogsPage-B1uIfI5z.js rename to YakPanel-server/frontend/dist/assets/LogsPage-z5Orin3I.js index 1b8da449..0020ece8 100644 --- a/YakPanel-server/frontend/dist/assets/LogsPage-B1uIfI5z.js +++ b/YakPanel-server/frontend/dist/assets/LogsPage-z5Orin3I.js @@ -1 +1 @@ -import{r as t,T as p,j as e,U as C}from"./index-CRR9sQ49.js";import{A as P}from"./AdminAlert-DW1IRWce.js";import{A as g}from"./AdminButton-Bd2cLTu3.js";import{P as E}from"./PageHeader-BcjNf7GG.js";function _(a){return a<1024?a+" B":a<1024*1024?(a/1024).toFixed(1)+" KB":(a/1024/1024).toFixed(1)+" MB"}function $(){const[a,j]=t.useState("/"),[m,N]=t.useState([]),[v,x]=t.useState(!0),[h,i]=t.useState(""),[l,y]=t.useState(null),[b,u]=t.useState(""),[o,r]=t.useState(!1),[c,w]=t.useState(500),d=s=>{x(!0),i(""),C(s).then(n=>{j(n.path),N(n.items.sort((f,F)=>f.is_dir===F.is_dir?0:f.is_dir?-1:1))}).catch(n=>i(n.message)).finally(()=>x(!1))};t.useEffect(()=>{d(a)},[]),t.useEffect(()=>{l&&(r(!0),p(l,c).then(s=>u(s.content)).catch(s=>i(s.message)).finally(()=>r(!1)))},[l,c]);const k=s=>{if(s.is_dir){const n=a==="/"?"/"+s.name:a+"/"+s.name;d(n)}else y(a==="/"?s.name:a+"/"+s.name)},L=()=>{const s=a.replace(/\/$/,"").split("/").filter(Boolean);if(s.length<=1)return;s.pop();const n=s.length===0?"/":"/"+s.join("/");d(n)},S=()=>{l&&(r(!0),p(l,c).then(s=>u(s.content)).catch(s=>i(s.message)).finally(()=>r(!1)))},B=a.split("/").filter(Boolean).length>0;return e.jsxs(e.Fragment,{children:[e.jsx(E,{title:"Logs"}),e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2 mb-3",children:[e.jsxs(g,{variant:"secondary",size:"sm",onClick:L,disabled:!B,children:[e.jsx("i",{className:"ti ti-arrow-left me-1","aria-hidden":!0}),"Back"]}),e.jsxs("code",{className:"small bg-body-secondary px-2 py-1 rounded text-break",children:["Path: ",a||"/"]})]}),h?e.jsx(P,{className:"mb-3",children:h}):null,e.jsxs("div",{className:"row g-3",children:[e.jsx("div",{className:"col-lg-6",children:e.jsxs("div",{className:"card h-100",children:[e.jsx("div",{className:"card-header small fw-medium",children:"Log files"}),v?e.jsx("div",{className:"card-body text-center py-5",children:e.jsx("span",{className:"spinner-border text-secondary",role:"status"})}):e.jsx("div",{className:"list-group list-group-flush overflow-auto",style:{maxHeight:500},children:m.length===0?e.jsx("div",{className:"list-group-item text-secondary text-center py-4",children:"Empty directory"}):m.map(s=>e.jsxs("button",{type:"button",className:"list-group-item list-group-item-action d-flex gap-2 align-items-center",onClick:()=>k(s),children:[e.jsx("i",{className:`ti flex-shrink-0 ${s.is_dir?"ti-folder text-warning":"ti-file text-secondary"}`,"aria-hidden":!0}),e.jsx("span",{className:"text-truncate",children:s.name}),s.is_dir?null:e.jsx("span",{className:"small text-secondary ms-auto flex-shrink-0",children:_(s.size)})]},s.name))})]})}),e.jsx("div",{className:"col-lg-6",children:e.jsxs("div",{className:"card h-100 d-flex flex-column",style:{minHeight:400},children:[e.jsxs("div",{className:"card-header d-flex align-items-center justify-content-between gap-2 flex-wrap",children:[e.jsx("span",{className:"small fw-medium text-truncate",children:l||"Select a log file"}),l?e.jsxs("div",{className:"d-flex align-items-center gap-2 flex-shrink-0",children:[e.jsx("label",{className:"small text-secondary mb-0",children:"Lines:"}),e.jsxs("select",{value:c,onChange:s=>w(Number(s.target.value)),className:"form-select form-select-sm",style:{width:"auto"},children:[e.jsx("option",{value:100,children:"100"}),e.jsx("option",{value:500,children:"500"}),e.jsx("option",{value:1e3,children:"1000"}),e.jsx("option",{value:5e3,children:"5000"}),e.jsx("option",{value:1e4,children:"10000"})]}),e.jsx(g,{variant:"light",size:"sm",onClick:S,disabled:o,title:"Refresh",children:o?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):e.jsx("i",{className:"ti ti-refresh","aria-hidden":!0})})]}):null]}),e.jsx("div",{className:"card-body flex-grow-1 overflow-auto",children:l?o?e.jsx("div",{className:"text-center py-5",children:e.jsx("span",{className:"spinner-border text-secondary",role:"status"})}):e.jsx("pre",{className:"font-monospace small mb-0 text-break",style:{whiteSpace:"pre-wrap"},children:b||"(empty)"}):e.jsx("p",{className:"text-secondary small mb-0",children:"Click a log file to view"})})]})})]})]})}export{$ as LogsPage}; +import{r as t,Y as p,j as e,Z as C}from"./index-Cvh4tLHo.js";import{A as P}from"./AdminAlert-Bt3L8_zJ.js";import{A as g}from"./AdminButton-BKglG8kI.js";import{P as E}from"./PageHeader-D6k34vvM.js";function _(a){return a<1024?a+" B":a<1024*1024?(a/1024).toFixed(1)+" KB":(a/1024/1024).toFixed(1)+" MB"}function D(){const[a,j]=t.useState("/"),[m,N]=t.useState([]),[v,x]=t.useState(!0),[h,i]=t.useState(""),[l,y]=t.useState(null),[b,u]=t.useState(""),[o,r]=t.useState(!1),[c,w]=t.useState(500),d=s=>{x(!0),i(""),C(s).then(n=>{j(n.path),N(n.items.sort((f,F)=>f.is_dir===F.is_dir?0:f.is_dir?-1:1))}).catch(n=>i(n.message)).finally(()=>x(!1))};t.useEffect(()=>{d(a)},[]),t.useEffect(()=>{l&&(r(!0),p(l,c).then(s=>u(s.content)).catch(s=>i(s.message)).finally(()=>r(!1)))},[l,c]);const k=s=>{if(s.is_dir){const n=a==="/"?"/"+s.name:a+"/"+s.name;d(n)}else y(a==="/"?s.name:a+"/"+s.name)},L=()=>{const s=a.replace(/\/$/,"").split("/").filter(Boolean);if(s.length<=1)return;s.pop();const n=s.length===0?"/":"/"+s.join("/");d(n)},S=()=>{l&&(r(!0),p(l,c).then(s=>u(s.content)).catch(s=>i(s.message)).finally(()=>r(!1)))},B=a.split("/").filter(Boolean).length>0;return e.jsxs(e.Fragment,{children:[e.jsx(E,{title:"Logs"}),e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2 mb-3",children:[e.jsxs(g,{variant:"secondary",size:"sm",onClick:L,disabled:!B,children:[e.jsx("i",{className:"ti ti-arrow-left me-1","aria-hidden":!0}),"Back"]}),e.jsxs("code",{className:"small bg-body-secondary px-2 py-1 rounded text-break",children:["Path: ",a||"/"]})]}),h?e.jsx(P,{className:"mb-3",children:h}):null,e.jsxs("div",{className:"row g-3",children:[e.jsx("div",{className:"col-lg-6",children:e.jsxs("div",{className:"card h-100",children:[e.jsx("div",{className:"card-header small fw-medium",children:"Log files"}),v?e.jsx("div",{className:"card-body text-center py-5",children:e.jsx("span",{className:"spinner-border text-secondary",role:"status"})}):e.jsx("div",{className:"list-group list-group-flush overflow-auto",style:{maxHeight:500},children:m.length===0?e.jsx("div",{className:"list-group-item text-secondary text-center py-4",children:"Empty directory"}):m.map(s=>e.jsxs("button",{type:"button",className:"list-group-item list-group-item-action d-flex gap-2 align-items-center",onClick:()=>k(s),children:[e.jsx("i",{className:`ti flex-shrink-0 ${s.is_dir?"ti-folder text-warning":"ti-file text-secondary"}`,"aria-hidden":!0}),e.jsx("span",{className:"text-truncate",children:s.name}),s.is_dir?null:e.jsx("span",{className:"small text-secondary ms-auto flex-shrink-0",children:_(s.size)})]},s.name))})]})}),e.jsx("div",{className:"col-lg-6",children:e.jsxs("div",{className:"card h-100 d-flex flex-column",style:{minHeight:400},children:[e.jsxs("div",{className:"card-header d-flex align-items-center justify-content-between gap-2 flex-wrap",children:[e.jsx("span",{className:"small fw-medium text-truncate",children:l||"Select a log file"}),l?e.jsxs("div",{className:"d-flex align-items-center gap-2 flex-shrink-0",children:[e.jsx("label",{className:"small text-secondary mb-0",children:"Lines:"}),e.jsxs("select",{value:c,onChange:s=>w(Number(s.target.value)),className:"form-select form-select-sm",style:{width:"auto"},children:[e.jsx("option",{value:100,children:"100"}),e.jsx("option",{value:500,children:"500"}),e.jsx("option",{value:1e3,children:"1000"}),e.jsx("option",{value:5e3,children:"5000"}),e.jsx("option",{value:1e4,children:"10000"})]}),e.jsx(g,{variant:"light",size:"sm",onClick:S,disabled:o,title:"Refresh",children:o?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):e.jsx("i",{className:"ti ti-refresh","aria-hidden":!0})})]}):null]}),e.jsx("div",{className:"card-body flex-grow-1 overflow-auto",children:l?o?e.jsx("div",{className:"text-center py-5",children:e.jsx("span",{className:"spinner-border text-secondary",role:"status"})}):e.jsx("pre",{className:"font-monospace small mb-0 text-break",style:{whiteSpace:"pre-wrap"},children:b||"(empty)"}):e.jsx("p",{className:"text-secondary small mb-0",children:"Click a log file to view"})})]})})]})]})}export{D as LogsPage}; diff --git a/YakPanel-server/frontend/dist/assets/Modal-B7V4w_St.js b/YakPanel-server/frontend/dist/assets/Modal-CCihVZTY.js similarity index 98% rename from YakPanel-server/frontend/dist/assets/Modal-B7V4w_St.js rename to YakPanel-server/frontend/dist/assets/Modal-CCihVZTY.js index 107481be..c7c051f8 100644 --- a/YakPanel-server/frontend/dist/assets/Modal-B7V4w_St.js +++ b/YakPanel-server/frontend/dist/assets/Modal-CCihVZTY.js @@ -1 +1 @@ -import{r as a,aa as vt,ab as Ee,ac as W,ad as q,ae as xt,af as me,ag as qe,j as f,ah as y,ai as ge,aj as yt,ak as De,al as I,am as Rt,an as Tt,ao as $e,ap as X,aq as Z,ar as ke,as as bt,at as Ue,au as Ct}from"./index-CRR9sQ49.js";function Me(e,t){return Me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Me(e,t)}function Nt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Me(e,t)}const Ot=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",wt=typeof document<"u",Pe=wt||Ot?a.useLayoutEffect:a.useEffect;var Ze={exports:{}},St="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",kt=St,Mt=kt;function Je(){}function Qe(){}Qe.resetWarningCache=Je;var jt=function(){function e(r,o,s,i,l,c){if(c!==Mt){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Qe,resetWarningCache:Je};return n.PropTypes=n,n};Ze.exports=jt();var Dt=Ze.exports;const Ce=vt(Dt);function Lt(e){var t=Ee(e);return t&&t.defaultView||window}function At(e,t){return Lt(e).getComputedStyle(e,t)}var Bt=/([A-Z])/g;function Ft(e){return e.replace(Bt,"-$1").toLowerCase()}var It=/^ms-/;function pe(e){return Ft(e).replace(It,"-ms-")}var _t=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function Wt(e){return!!(e&&_t.test(e))}function $(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(pe(t))||At(e).getPropertyValue(pe(t));Object.keys(t).forEach(function(o){var s=t[o];!s&&s!==0?e.style.removeProperty(pe(o)):Wt(o)?r+=o+"("+s+") ":n+=pe(o)+": "+s+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}const He={disabled:!1},et=W.createContext(null);var $t=function(t){return t.scrollTop},oe="unmounted",F="exited",D="entering",_="entered",je="exiting",O=function(e){Nt(t,e);function t(r,o){var s;s=e.call(this,r,o)||this;var i=o,l=i&&!i.isMounting?r.enter:r.appear,c;return s.appearStatus=null,r.in?l?(c=F,s.appearStatus=D):c=_:r.unmountOnExit||r.mountOnEnter?c=oe:c=F,s.state={status:c},s.nextCallback=null,s}t.getDerivedStateFromProps=function(o,s){var i=o.in;return i&&s.status===oe?{status:F}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var s=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==D&&i!==_&&(s=D):(i===D||i===_)&&(s=je)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,s,i,l;return s=i=l=o,o!=null&&typeof o!="number"&&(s=o.exit,i=o.enter,l=o.appear!==void 0?o.appear:i),{exit:s,enter:i,appear:l}},n.updateStatus=function(o,s){if(o===void 0&&(o=!1),s!==null)if(this.cancelNextCallback(),s===D){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:q.findDOMNode(this);i&&$t(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===F&&this.setState({status:oe})},n.performEnter=function(o){var s=this,i=this.props.enter,l=this.context?this.context.isMounting:o,c=this.props.nodeRef?[l]:[q.findDOMNode(this),l],u=c[0],h=c[1],E=this.getTimeouts(),m=l?E.appear:E.enter;if(!o&&!i||He.disabled){this.safeSetState({status:_},function(){s.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:D},function(){s.props.onEntering(u,h),s.onTransitionEnd(m,function(){s.safeSetState({status:_},function(){s.props.onEntered(u,h)})})})},n.performExit=function(){var o=this,s=this.props.exit,i=this.getTimeouts(),l=this.props.nodeRef?void 0:q.findDOMNode(this);if(!s||He.disabled){this.safeSetState({status:F},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:je},function(){o.props.onExiting(l),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:F},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,s){s=this.setNextCallback(s),this.setState(o,s)},n.setNextCallback=function(o){var s=this,i=!0;return this.nextCallback=function(l){i&&(i=!1,s.nextCallback=null,o(l))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(o,s){this.setNextCallback(s);var i=this.props.nodeRef?this.props.nodeRef.current:q.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!i||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],u=c[0],h=c[1];this.props.addEndListener(u,h)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===oe)return null;var s=this.props,i=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var l=xt(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return W.createElement(et.Provider,{value:null},typeof i=="function"?i(o,l):W.cloneElement(W.Children.only(i),l))},t}(W.Component);O.contextType=et;O.propTypes={};function z(){}O.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:z,onEntering:z,onEntered:z,onExit:z,onExiting:z,onExited:z};O.UNMOUNTED=oe;O.EXITED=F;O.ENTERING=D;O.ENTERED=_;O.EXITING=je;function Ut(e){return e.code==="Escape"||e.keyCode===27}function Pt(){const e=a.version.split(".");return{major:+e[0],minor:+e[1],patch:+e[2]}}function ve(e){if(!e||typeof e=="function")return null;const{major:t}=Pt();return t>=19?e.props.ref:e.ref}function Ht(e,t,n,r){if(r===void 0&&(r=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent(t,n,r),e.dispatchEvent(o)}}function Gt(e){var t=$(e,"transitionDuration")||"",n=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*n}function Vt(e,t,n){n===void 0&&(n=5);var r=!1,o=setTimeout(function(){r||Ht(e,"transitionend",!0)},t+n),s=me(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),s()}}function tt(e,t,n,r){n==null&&(n=Gt(e)||0);var o=Vt(e,n,r),s=me(e,"transitionend",t);return function(){o(),s()}}function Ge(e,t){const n=$(e,t)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function Kt(e,t){const n=Ge(e,"transitionDuration"),r=Ge(e,"transitionDelay"),o=tt(e,s=>{s.target===e&&(o(),t(s))},n+r)}function Xt(e){e.offsetHeight}function zt(e){return e&&"setState"in e?q.findDOMNode(e):e??null}const nt=W.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:o,onExited:s,addEndListener:i,children:l,childRef:c,...u},h)=>{const E=a.useRef(null),m=qe(E,c),x=b=>{m(zt(b))},v=b=>k=>{b&&E.current&&b(E.current,k)},w=a.useCallback(v(e),[e]),L=a.useCallback(v(t),[t]),R=a.useCallback(v(n),[n]),A=a.useCallback(v(r),[r]),S=a.useCallback(v(o),[o]),T=a.useCallback(v(s),[s]),N=a.useCallback(v(i),[i]);return f.jsx(O,{ref:h,...u,onEnter:w,onEntered:R,onEntering:L,onExit:A,onExited:T,onExiting:S,addEndListener:N,nodeRef:E,children:typeof l=="function"?(b,k)=>l(b,{...k,ref:x}):W.cloneElement(l,{ref:x})})});nt.displayName="TransitionWrapper";const Yt=e=>a.forwardRef((t,n)=>f.jsx("div",{...t,ref:n,className:y(t.className,e)})),qt={[D]:"show",[_]:"show"},Le=a.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...o},s)=>{const i={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...o},l=a.useCallback((c,u)=>{Xt(c),r==null||r(c,u)},[r]);return f.jsx(nt,{ref:s,addEndListener:Kt,...i,onEnter:l,childRef:ve(t),children:(c,u)=>a.cloneElement(t,{...u,className:y("fade",e,t.props.className,qt[c],n[c])})})});Le.displayName="Fade";const Zt={"aria-label":Ce.string,onClick:Ce.func,variant:Ce.oneOf(["white"])},Ae=a.forwardRef(({className:e,variant:t,"aria-label":n="Close",...r},o)=>f.jsx("button",{ref:o,type:"button",className:y("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r}));Ae.displayName="CloseButton";Ae.propTypes=Zt;function Jt(e){const t=a.useRef(e);return t.current=e,t}function Qt(e){const t=Jt(e);a.useEffect(()=>()=>t.current(),[])}const Ve=e=>!e||typeof e=="function"?e:t=>{e.current=t};function en(e,t){const n=Ve(e),r=Ve(t);return o=>{n&&n(o),r&&r(o)}}function Be(e,t){return a.useMemo(()=>en(e,t),[e,t])}var he;function Ke(e){if((!he&&he!==0||e)&&ge){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),he=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return he}function tn(){return a.useState(null)}function Ne(e){e===void 0&&(e=Ee());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function nn(e){const t=a.useRef(e);return t.current=e,t}function rn(e){const t=nn(e);a.useEffect(()=>()=>t.current(),[])}function on(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const Xe=yt("modal-open");class Fe{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return on(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",o=this.getElement();t.style={overflow:o.style.overflow,[r]:o.style[r]},t.scrollBarWidth&&(n[r]=`${parseInt($(o,r)||"0",10)+t.scrollBarWidth}px`),o.setAttribute(Xe,""),$(o,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(Xe),Object.assign(n.style,t.style)}add(t){let n=this.modals.indexOf(t);return n!==-1||(n=this.modals.length,this.modals.push(t),this.setModalAttributes(t),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(t){const n=this.modals.indexOf(t);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(t))}isTopModal(t){return!!this.modals.length&&this.modals[this.modals.length-1]===t}}const Oe=(e,t)=>ge?e==null?(t||Ee()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function sn(e,t){const n=De(),[r,o]=a.useState(()=>Oe(e,n==null?void 0:n.document));if(!r){const s=Oe(e);s&&o(s)}return a.useEffect(()=>{},[t,r]),a.useEffect(()=>{const s=Oe(e);s!==r&&o(s)},[e,r]),r}function an({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:o}){const s=a.useRef(null),i=a.useRef(t),l=I(n);a.useEffect(()=>{t?i.current=!0:l(s.current)},[t,l]);const c=Be(s,ve(e)),u=a.cloneElement(e,{ref:c});return t?u:o||!i.current&&r?null:u}const ln=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function cn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function un(e){let{onEnter:t,onEntering:n,onEntered:r,onExit:o,onExiting:s,onExited:i,addEndListener:l,children:c}=e,u=cn(e,ln);const h=a.useRef(null),E=Be(h,ve(c)),m=T=>N=>{T&&h.current&&T(h.current,N)},x=a.useCallback(m(t),[t]),v=a.useCallback(m(n),[n]),w=a.useCallback(m(r),[r]),L=a.useCallback(m(o),[o]),R=a.useCallback(m(s),[s]),A=a.useCallback(m(i),[i]),S=a.useCallback(m(l),[l]);return Object.assign({},u,{nodeRef:h},t&&{onEnter:x},n&&{onEntering:v},r&&{onEntered:w},o&&{onExit:L},s&&{onExiting:R},i&&{onExited:A},l&&{addEndListener:S},{children:typeof c=="function"?(T,N)=>c(T,Object.assign({},N,{ref:E})):a.cloneElement(c,{ref:E})})}const dn=["component"];function fn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const pn=a.forwardRef((e,t)=>{let{component:n}=e,r=fn(e,dn);const o=un(r);return f.jsx(n,Object.assign({ref:t},o))});function hn({in:e,onTransition:t}){const n=a.useRef(null),r=a.useRef(!0),o=I(t);return Pe(()=>{if(!n.current)return;let s=!1;return o({in:e,element:n.current,initial:r.current,isStale:()=>s}),()=>{s=!0}},[e,o]),Pe(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function mn({children:e,in:t,onExited:n,onEntered:r,transition:o}){const[s,i]=a.useState(!t);t&&s&&i(!1);const l=hn({in:!!t,onTransition:u=>{const h=()=>{u.isStale()||(u.in?r==null||r(u.element,u.initial):(i(!0),n==null||n(u.element)))};Promise.resolve(o(u)).then(h,E=>{throw u.in||i(!0),E})}}),c=Be(l,ve(e));return s&&!t?null:a.cloneElement(e,{ref:c})}function ze(e,t,n){return e?f.jsx(pn,Object.assign({},n,{component:e})):t?f.jsx(mn,Object.assign({},n,{transition:t})):f.jsx(an,Object.assign({},n))}const En=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function gn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}let we;function vn(e){return we||(we=new Fe({ownerDocument:e==null?void 0:e.document})),we}function xn(e){const t=De(),n=e||vn(t),r=a.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:a.useCallback(o=>{r.current.dialog=o},[]),setBackdropRef:a.useCallback(o=>{r.current.backdrop=o},[])})}const rt=a.forwardRef((e,t)=>{let{show:n=!1,role:r="dialog",className:o,style:s,children:i,backdrop:l=!0,keyboard:c=!0,onBackdropClick:u,onEscapeKeyDown:h,transition:E,runTransition:m,backdropTransition:x,runBackdropTransition:v,autoFocus:w=!0,enforceFocus:L=!0,restoreFocus:R=!0,restoreFocusOptions:A,renderDialog:S,renderBackdrop:T=p=>f.jsx("div",Object.assign({},p)),manager:N,container:b,onShow:k,onHide:J=()=>{},onExit:xe,onExited:Q,onExiting:se,onEnter:ae,onEntering:ie,onEntered:le}=e,ye=gn(e,En);const M=De(),U=sn(b),g=xn(N),Re=Rt(),ce=Tt(n),[B,P]=a.useState(!n),C=a.useRef(null);a.useImperativeHandle(t,()=>g,[g]),ge&&!ce&&n&&(C.current=Ne(M==null?void 0:M.document)),n&&B&&P(!1);const j=I(()=>{if(g.add(),H.current=me(document,"keydown",be),te.current=me(document,"focus",()=>setTimeout(Te),!0),k&&k(),w){var p,fe;const re=Ne((p=(fe=g.dialog)==null?void 0:fe.ownerDocument)!=null?p:M==null?void 0:M.document);g.dialog&&re&&!$e(g.dialog,re)&&(C.current=re,g.dialog.focus())}}),ee=I(()=>{if(g.remove(),H.current==null||H.current(),te.current==null||te.current(),R){var p;(p=C.current)==null||p.focus==null||p.focus(A),C.current=null}});a.useEffect(()=>{!n||!U||j()},[n,U,j]),a.useEffect(()=>{B&&ee()},[B,ee]),rn(()=>{ee()});const Te=I(()=>{if(!L||!Re()||!g.isTopModal())return;const p=Ne(M==null?void 0:M.document);g.dialog&&p&&!$e(g.dialog,p)&&g.dialog.focus()}),ue=I(p=>{p.target===p.currentTarget&&(u==null||u(p),l===!0&&J())}),be=I(p=>{c&&Ut(p)&&g.isTopModal()&&(h==null||h(p),p.defaultPrevented||J())}),te=a.useRef(),H=a.useRef(),de=(...p)=>{P(!0),Q==null||Q(...p)};if(!U)return null;const G=Object.assign({role:r,ref:g.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},ye,{style:s,className:o,tabIndex:-1});let ne=S?S(G):f.jsx("div",Object.assign({},G,{children:a.cloneElement(i,{role:"document"})}));ne=ze(E,m,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:xe,onExiting:se,onExited:de,onEnter:ae,onEntering:ie,onEntered:le,children:ne});let V=null;return l&&(V=T({ref:g.setBackdropRef,onClick:ue}),V=ze(x,v,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:V})),f.jsx(f.Fragment,{children:q.createPortal(f.jsxs(f.Fragment,{children:[V,ne]}),U)})});rt.displayName="Modal";const yn=Object.assign(rt,{Manager:Fe});function Rn(e,t){return e.classList?e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Tn(e,t){e.classList?e.classList.add(t):Rn(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Ye(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function bn(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Ye(e.className,t):e.setAttribute("class",Ye(e.className&&e.className.baseVal||"",t))}const Y={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class Cn extends Fe{adjustAndStore(t,n,r){const o=n.style[t];n.dataset[t]=o,$(n,{[t]:`${parseFloat($(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],$(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(Tn(n,"modal-open"),!t.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";X(n,Y.FIXED_CONTENT).forEach(s=>this.adjustAndStore(r,s,t.scrollBarWidth)),X(n,Y.STICKY_CONTENT).forEach(s=>this.adjustAndStore(o,s,-t.scrollBarWidth)),X(n,Y.NAVBAR_TOGGLER).forEach(s=>this.adjustAndStore(o,s,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const n=this.getElement();bn(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";X(n,Y.FIXED_CONTENT).forEach(s=>this.restore(r,s)),X(n,Y.STICKY_CONTENT).forEach(s=>this.restore(o,s)),X(n,Y.NAVBAR_TOGGLER).forEach(s=>this.restore(o,s))}}let Se;function Nn(e){return Se||(Se=new Cn(e)),Se}const ot=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=Z(t,"modal-body"),f.jsx(n,{ref:o,className:y(e,t),...r})));ot.displayName="ModalBody";const st=a.createContext({onHide(){}}),Ie=a.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:o,fullscreen:s,children:i,scrollable:l,...c},u)=>{e=Z(e,"modal");const h=`${e}-dialog`,E=typeof s=="string"?`${e}-fullscreen-${s}`:`${e}-fullscreen`;return f.jsx("div",{...c,ref:u,className:y(h,t,o&&`${e}-${o}`,r&&`${h}-centered`,l&&`${h}-scrollable`,s&&E),children:f.jsx("div",{className:y(`${e}-content`,n),children:i})})});Ie.displayName="ModalDialog";const at=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=Z(t,"modal-footer"),f.jsx(n,{ref:o,className:y(e,t),...r})));at.displayName="ModalFooter";const it=a.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:o,...s},i)=>{const l=a.useContext(st),c=ke(()=>{l==null||l.onHide(),r==null||r()});return f.jsxs("div",{ref:i,...s,children:[o,n&&f.jsx(Ae,{"aria-label":e,variant:t,onClick:c})]})});it.displayName="AbstractModalHeader";const lt=a.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...o},s)=>(e=Z(e,"modal-header"),f.jsx(it,{ref:s,...o,className:y(t,e),closeLabel:n,closeButton:r})));lt.displayName="ModalHeader";const On=Yt("h4"),ct=a.forwardRef(({className:e,bsPrefix:t,as:n=On,...r},o)=>(t=Z(t,"modal-title"),f.jsx(n,{ref:o,className:y(e,t),...r})));ct.displayName="ModalTitle";function wn(e){return f.jsx(Le,{...e,timeout:null})}function Sn(e){return f.jsx(Le,{...e,timeout:null})}const ut=a.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:o,children:s,dialogAs:i=Ie,"data-bs-theme":l,"aria-labelledby":c,"aria-describedby":u,"aria-label":h,show:E=!1,animation:m=!0,backdrop:x=!0,keyboard:v=!0,onEscapeKeyDown:w,onShow:L,onHide:R,container:A,autoFocus:S=!0,enforceFocus:T=!0,restoreFocus:N=!0,restoreFocusOptions:b,onEntered:k,onExit:J,onExiting:xe,onEnter:Q,onEntering:se,onExited:ae,backdropClassName:ie,manager:le,...ye},M)=>{const[U,g]=a.useState({}),[Re,ce]=a.useState(!1),B=a.useRef(!1),P=a.useRef(!1),C=a.useRef(null),[j,ee]=tn(),Te=qe(M,ee),ue=ke(R),be=bt();e=Z(e,"modal");const te=a.useMemo(()=>({onHide:ue}),[ue]);function H(){return le||Nn({isRTL:be})}function de(d){if(!ge)return;const K=H().getScrollbarWidth()>0,We=d.scrollHeight>Ee(d).documentElement.clientHeight;g({paddingRight:K&&!We?Ke():void 0,paddingLeft:!K&&We?Ke():void 0})}const G=ke(()=>{j&&de(j.dialog)});Qt(()=>{Ue(window,"resize",G),C.current==null||C.current()});const ne=()=>{B.current=!0},V=d=>{B.current&&j&&d.target===j.dialog&&(P.current=!0),B.current=!1},p=()=>{ce(!0),C.current=tt(j.dialog,()=>{ce(!1)})},fe=d=>{d.target===d.currentTarget&&p()},re=d=>{if(x==="static"){fe(d);return}if(P.current||d.target!==d.currentTarget){P.current=!1;return}R==null||R()},dt=d=>{v?w==null||w(d):(d.preventDefault(),x==="static"&&p())},ft=(d,K)=>{d&&de(d),Q==null||Q(d,K)},pt=d=>{C.current==null||C.current(),J==null||J(d)},ht=(d,K)=>{se==null||se(d,K),Ct(window,"resize",G)},mt=d=>{d&&(d.style.display=""),ae==null||ae(d),Ue(window,"resize",G)},Et=a.useCallback(d=>f.jsx("div",{...d,className:y(`${e}-backdrop`,ie,!m&&"show")}),[m,ie,e]),_e={...n,...U};_e.display="block";const gt=d=>f.jsx("div",{role:"dialog",...d,style:_e,className:y(t,e,Re&&`${e}-static`,!m&&"show"),onClick:x?re:void 0,onMouseUp:V,"data-bs-theme":l,"aria-label":h,"aria-labelledby":c,"aria-describedby":u,children:f.jsx(i,{...ye,onMouseDown:ne,className:r,contentClassName:o,children:s})});return f.jsx(st.Provider,{value:te,children:f.jsx(yn,{show:E,ref:Te,backdrop:x,container:A,keyboard:!0,autoFocus:S,enforceFocus:T,restoreFocus:N,restoreFocusOptions:b,onEscapeKeyDown:dt,onShow:L,onHide:R,onEnter:ft,onEntering:ht,onEntered:k,onExit:pt,onExiting:xe,onExited:mt,manager:H(),transition:m?wn:void 0,backdropTransition:m?Sn:void 0,renderBackdrop:Et,renderDialog:gt})})});ut.displayName="Modal";const Mn=Object.assign(ut,{Body:ot,Header:lt,Title:ct,Footer:at,Dialog:Ie,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150});export{Mn as M}; +import{r as a,af as vt,ag as Ee,ah as W,ai as q,aj as xt,ak as me,al as qe,j as f,am as y,an as ge,ao as yt,ap as De,aq as I,ar as Rt,as as Tt,at as $e,au as X,av as Z,aw as ke,ax as bt,ay as Ue,az as Ct}from"./index-Cvh4tLHo.js";function Me(e,t){return Me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Me(e,t)}function Nt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Me(e,t)}const Ot=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",wt=typeof document<"u",Pe=wt||Ot?a.useLayoutEffect:a.useEffect;var Ze={exports:{}},St="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",kt=St,Mt=kt;function Je(){}function Qe(){}Qe.resetWarningCache=Je;var jt=function(){function e(r,o,s,i,l,c){if(c!==Mt){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Qe,resetWarningCache:Je};return n.PropTypes=n,n};Ze.exports=jt();var Dt=Ze.exports;const Ce=vt(Dt);function Lt(e){var t=Ee(e);return t&&t.defaultView||window}function At(e,t){return Lt(e).getComputedStyle(e,t)}var Bt=/([A-Z])/g;function Ft(e){return e.replace(Bt,"-$1").toLowerCase()}var It=/^ms-/;function pe(e){return Ft(e).replace(It,"-ms-")}var _t=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function Wt(e){return!!(e&&_t.test(e))}function $(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(pe(t))||At(e).getPropertyValue(pe(t));Object.keys(t).forEach(function(o){var s=t[o];!s&&s!==0?e.style.removeProperty(pe(o)):Wt(o)?r+=o+"("+s+") ":n+=pe(o)+": "+s+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}const He={disabled:!1},et=W.createContext(null);var $t=function(t){return t.scrollTop},oe="unmounted",F="exited",D="entering",_="entered",je="exiting",O=function(e){Nt(t,e);function t(r,o){var s;s=e.call(this,r,o)||this;var i=o,l=i&&!i.isMounting?r.enter:r.appear,c;return s.appearStatus=null,r.in?l?(c=F,s.appearStatus=D):c=_:r.unmountOnExit||r.mountOnEnter?c=oe:c=F,s.state={status:c},s.nextCallback=null,s}t.getDerivedStateFromProps=function(o,s){var i=o.in;return i&&s.status===oe?{status:F}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var s=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==D&&i!==_&&(s=D):(i===D||i===_)&&(s=je)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,s,i,l;return s=i=l=o,o!=null&&typeof o!="number"&&(s=o.exit,i=o.enter,l=o.appear!==void 0?o.appear:i),{exit:s,enter:i,appear:l}},n.updateStatus=function(o,s){if(o===void 0&&(o=!1),s!==null)if(this.cancelNextCallback(),s===D){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:q.findDOMNode(this);i&&$t(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===F&&this.setState({status:oe})},n.performEnter=function(o){var s=this,i=this.props.enter,l=this.context?this.context.isMounting:o,c=this.props.nodeRef?[l]:[q.findDOMNode(this),l],u=c[0],h=c[1],E=this.getTimeouts(),m=l?E.appear:E.enter;if(!o&&!i||He.disabled){this.safeSetState({status:_},function(){s.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:D},function(){s.props.onEntering(u,h),s.onTransitionEnd(m,function(){s.safeSetState({status:_},function(){s.props.onEntered(u,h)})})})},n.performExit=function(){var o=this,s=this.props.exit,i=this.getTimeouts(),l=this.props.nodeRef?void 0:q.findDOMNode(this);if(!s||He.disabled){this.safeSetState({status:F},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:je},function(){o.props.onExiting(l),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:F},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,s){s=this.setNextCallback(s),this.setState(o,s)},n.setNextCallback=function(o){var s=this,i=!0;return this.nextCallback=function(l){i&&(i=!1,s.nextCallback=null,o(l))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(o,s){this.setNextCallback(s);var i=this.props.nodeRef?this.props.nodeRef.current:q.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!i||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],u=c[0],h=c[1];this.props.addEndListener(u,h)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===oe)return null;var s=this.props,i=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var l=xt(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return W.createElement(et.Provider,{value:null},typeof i=="function"?i(o,l):W.cloneElement(W.Children.only(i),l))},t}(W.Component);O.contextType=et;O.propTypes={};function z(){}O.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:z,onEntering:z,onEntered:z,onExit:z,onExiting:z,onExited:z};O.UNMOUNTED=oe;O.EXITED=F;O.ENTERING=D;O.ENTERED=_;O.EXITING=je;function Ut(e){return e.code==="Escape"||e.keyCode===27}function Pt(){const e=a.version.split(".");return{major:+e[0],minor:+e[1],patch:+e[2]}}function ve(e){if(!e||typeof e=="function")return null;const{major:t}=Pt();return t>=19?e.props.ref:e.ref}function Ht(e,t,n,r){if(r===void 0&&(r=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent(t,n,r),e.dispatchEvent(o)}}function Gt(e){var t=$(e,"transitionDuration")||"",n=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*n}function Vt(e,t,n){n===void 0&&(n=5);var r=!1,o=setTimeout(function(){r||Ht(e,"transitionend",!0)},t+n),s=me(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),s()}}function tt(e,t,n,r){n==null&&(n=Gt(e)||0);var o=Vt(e,n,r),s=me(e,"transitionend",t);return function(){o(),s()}}function Ge(e,t){const n=$(e,t)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function Kt(e,t){const n=Ge(e,"transitionDuration"),r=Ge(e,"transitionDelay"),o=tt(e,s=>{s.target===e&&(o(),t(s))},n+r)}function Xt(e){e.offsetHeight}function zt(e){return e&&"setState"in e?q.findDOMNode(e):e??null}const nt=W.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:o,onExited:s,addEndListener:i,children:l,childRef:c,...u},h)=>{const E=a.useRef(null),m=qe(E,c),x=b=>{m(zt(b))},v=b=>k=>{b&&E.current&&b(E.current,k)},w=a.useCallback(v(e),[e]),L=a.useCallback(v(t),[t]),R=a.useCallback(v(n),[n]),A=a.useCallback(v(r),[r]),S=a.useCallback(v(o),[o]),T=a.useCallback(v(s),[s]),N=a.useCallback(v(i),[i]);return f.jsx(O,{ref:h,...u,onEnter:w,onEntered:R,onEntering:L,onExit:A,onExited:T,onExiting:S,addEndListener:N,nodeRef:E,children:typeof l=="function"?(b,k)=>l(b,{...k,ref:x}):W.cloneElement(l,{ref:x})})});nt.displayName="TransitionWrapper";const Yt=e=>a.forwardRef((t,n)=>f.jsx("div",{...t,ref:n,className:y(t.className,e)})),qt={[D]:"show",[_]:"show"},Le=a.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...o},s)=>{const i={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...o},l=a.useCallback((c,u)=>{Xt(c),r==null||r(c,u)},[r]);return f.jsx(nt,{ref:s,addEndListener:Kt,...i,onEnter:l,childRef:ve(t),children:(c,u)=>a.cloneElement(t,{...u,className:y("fade",e,t.props.className,qt[c],n[c])})})});Le.displayName="Fade";const Zt={"aria-label":Ce.string,onClick:Ce.func,variant:Ce.oneOf(["white"])},Ae=a.forwardRef(({className:e,variant:t,"aria-label":n="Close",...r},o)=>f.jsx("button",{ref:o,type:"button",className:y("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r}));Ae.displayName="CloseButton";Ae.propTypes=Zt;function Jt(e){const t=a.useRef(e);return t.current=e,t}function Qt(e){const t=Jt(e);a.useEffect(()=>()=>t.current(),[])}const Ve=e=>!e||typeof e=="function"?e:t=>{e.current=t};function en(e,t){const n=Ve(e),r=Ve(t);return o=>{n&&n(o),r&&r(o)}}function Be(e,t){return a.useMemo(()=>en(e,t),[e,t])}var he;function Ke(e){if((!he&&he!==0||e)&&ge){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),he=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return he}function tn(){return a.useState(null)}function Ne(e){e===void 0&&(e=Ee());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function nn(e){const t=a.useRef(e);return t.current=e,t}function rn(e){const t=nn(e);a.useEffect(()=>()=>t.current(),[])}function on(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const Xe=yt("modal-open");class Fe{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return on(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",o=this.getElement();t.style={overflow:o.style.overflow,[r]:o.style[r]},t.scrollBarWidth&&(n[r]=`${parseInt($(o,r)||"0",10)+t.scrollBarWidth}px`),o.setAttribute(Xe,""),$(o,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(Xe),Object.assign(n.style,t.style)}add(t){let n=this.modals.indexOf(t);return n!==-1||(n=this.modals.length,this.modals.push(t),this.setModalAttributes(t),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(t){const n=this.modals.indexOf(t);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(t))}isTopModal(t){return!!this.modals.length&&this.modals[this.modals.length-1]===t}}const Oe=(e,t)=>ge?e==null?(t||Ee()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function sn(e,t){const n=De(),[r,o]=a.useState(()=>Oe(e,n==null?void 0:n.document));if(!r){const s=Oe(e);s&&o(s)}return a.useEffect(()=>{},[t,r]),a.useEffect(()=>{const s=Oe(e);s!==r&&o(s)},[e,r]),r}function an({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:o}){const s=a.useRef(null),i=a.useRef(t),l=I(n);a.useEffect(()=>{t?i.current=!0:l(s.current)},[t,l]);const c=Be(s,ve(e)),u=a.cloneElement(e,{ref:c});return t?u:o||!i.current&&r?null:u}const ln=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function cn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function un(e){let{onEnter:t,onEntering:n,onEntered:r,onExit:o,onExiting:s,onExited:i,addEndListener:l,children:c}=e,u=cn(e,ln);const h=a.useRef(null),E=Be(h,ve(c)),m=T=>N=>{T&&h.current&&T(h.current,N)},x=a.useCallback(m(t),[t]),v=a.useCallback(m(n),[n]),w=a.useCallback(m(r),[r]),L=a.useCallback(m(o),[o]),R=a.useCallback(m(s),[s]),A=a.useCallback(m(i),[i]),S=a.useCallback(m(l),[l]);return Object.assign({},u,{nodeRef:h},t&&{onEnter:x},n&&{onEntering:v},r&&{onEntered:w},o&&{onExit:L},s&&{onExiting:R},i&&{onExited:A},l&&{addEndListener:S},{children:typeof c=="function"?(T,N)=>c(T,Object.assign({},N,{ref:E})):a.cloneElement(c,{ref:E})})}const dn=["component"];function fn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const pn=a.forwardRef((e,t)=>{let{component:n}=e,r=fn(e,dn);const o=un(r);return f.jsx(n,Object.assign({ref:t},o))});function hn({in:e,onTransition:t}){const n=a.useRef(null),r=a.useRef(!0),o=I(t);return Pe(()=>{if(!n.current)return;let s=!1;return o({in:e,element:n.current,initial:r.current,isStale:()=>s}),()=>{s=!0}},[e,o]),Pe(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function mn({children:e,in:t,onExited:n,onEntered:r,transition:o}){const[s,i]=a.useState(!t);t&&s&&i(!1);const l=hn({in:!!t,onTransition:u=>{const h=()=>{u.isStale()||(u.in?r==null||r(u.element,u.initial):(i(!0),n==null||n(u.element)))};Promise.resolve(o(u)).then(h,E=>{throw u.in||i(!0),E})}}),c=Be(l,ve(e));return s&&!t?null:a.cloneElement(e,{ref:c})}function ze(e,t,n){return e?f.jsx(pn,Object.assign({},n,{component:e})):t?f.jsx(mn,Object.assign({},n,{transition:t})):f.jsx(an,Object.assign({},n))}const En=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function gn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}let we;function vn(e){return we||(we=new Fe({ownerDocument:e==null?void 0:e.document})),we}function xn(e){const t=De(),n=e||vn(t),r=a.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:a.useCallback(o=>{r.current.dialog=o},[]),setBackdropRef:a.useCallback(o=>{r.current.backdrop=o},[])})}const rt=a.forwardRef((e,t)=>{let{show:n=!1,role:r="dialog",className:o,style:s,children:i,backdrop:l=!0,keyboard:c=!0,onBackdropClick:u,onEscapeKeyDown:h,transition:E,runTransition:m,backdropTransition:x,runBackdropTransition:v,autoFocus:w=!0,enforceFocus:L=!0,restoreFocus:R=!0,restoreFocusOptions:A,renderDialog:S,renderBackdrop:T=p=>f.jsx("div",Object.assign({},p)),manager:N,container:b,onShow:k,onHide:J=()=>{},onExit:xe,onExited:Q,onExiting:se,onEnter:ae,onEntering:ie,onEntered:le}=e,ye=gn(e,En);const M=De(),U=sn(b),g=xn(N),Re=Rt(),ce=Tt(n),[B,P]=a.useState(!n),C=a.useRef(null);a.useImperativeHandle(t,()=>g,[g]),ge&&!ce&&n&&(C.current=Ne(M==null?void 0:M.document)),n&&B&&P(!1);const j=I(()=>{if(g.add(),H.current=me(document,"keydown",be),te.current=me(document,"focus",()=>setTimeout(Te),!0),k&&k(),w){var p,fe;const re=Ne((p=(fe=g.dialog)==null?void 0:fe.ownerDocument)!=null?p:M==null?void 0:M.document);g.dialog&&re&&!$e(g.dialog,re)&&(C.current=re,g.dialog.focus())}}),ee=I(()=>{if(g.remove(),H.current==null||H.current(),te.current==null||te.current(),R){var p;(p=C.current)==null||p.focus==null||p.focus(A),C.current=null}});a.useEffect(()=>{!n||!U||j()},[n,U,j]),a.useEffect(()=>{B&&ee()},[B,ee]),rn(()=>{ee()});const Te=I(()=>{if(!L||!Re()||!g.isTopModal())return;const p=Ne(M==null?void 0:M.document);g.dialog&&p&&!$e(g.dialog,p)&&g.dialog.focus()}),ue=I(p=>{p.target===p.currentTarget&&(u==null||u(p),l===!0&&J())}),be=I(p=>{c&&Ut(p)&&g.isTopModal()&&(h==null||h(p),p.defaultPrevented||J())}),te=a.useRef(),H=a.useRef(),de=(...p)=>{P(!0),Q==null||Q(...p)};if(!U)return null;const G=Object.assign({role:r,ref:g.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},ye,{style:s,className:o,tabIndex:-1});let ne=S?S(G):f.jsx("div",Object.assign({},G,{children:a.cloneElement(i,{role:"document"})}));ne=ze(E,m,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:xe,onExiting:se,onExited:de,onEnter:ae,onEntering:ie,onEntered:le,children:ne});let V=null;return l&&(V=T({ref:g.setBackdropRef,onClick:ue}),V=ze(x,v,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:V})),f.jsx(f.Fragment,{children:q.createPortal(f.jsxs(f.Fragment,{children:[V,ne]}),U)})});rt.displayName="Modal";const yn=Object.assign(rt,{Manager:Fe});function Rn(e,t){return e.classList?e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Tn(e,t){e.classList?e.classList.add(t):Rn(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Ye(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function bn(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Ye(e.className,t):e.setAttribute("class",Ye(e.className&&e.className.baseVal||"",t))}const Y={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class Cn extends Fe{adjustAndStore(t,n,r){const o=n.style[t];n.dataset[t]=o,$(n,{[t]:`${parseFloat($(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],$(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(Tn(n,"modal-open"),!t.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";X(n,Y.FIXED_CONTENT).forEach(s=>this.adjustAndStore(r,s,t.scrollBarWidth)),X(n,Y.STICKY_CONTENT).forEach(s=>this.adjustAndStore(o,s,-t.scrollBarWidth)),X(n,Y.NAVBAR_TOGGLER).forEach(s=>this.adjustAndStore(o,s,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const n=this.getElement();bn(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";X(n,Y.FIXED_CONTENT).forEach(s=>this.restore(r,s)),X(n,Y.STICKY_CONTENT).forEach(s=>this.restore(o,s)),X(n,Y.NAVBAR_TOGGLER).forEach(s=>this.restore(o,s))}}let Se;function Nn(e){return Se||(Se=new Cn(e)),Se}const ot=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=Z(t,"modal-body"),f.jsx(n,{ref:o,className:y(e,t),...r})));ot.displayName="ModalBody";const st=a.createContext({onHide(){}}),Ie=a.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:o,fullscreen:s,children:i,scrollable:l,...c},u)=>{e=Z(e,"modal");const h=`${e}-dialog`,E=typeof s=="string"?`${e}-fullscreen-${s}`:`${e}-fullscreen`;return f.jsx("div",{...c,ref:u,className:y(h,t,o&&`${e}-${o}`,r&&`${h}-centered`,l&&`${h}-scrollable`,s&&E),children:f.jsx("div",{className:y(`${e}-content`,n),children:i})})});Ie.displayName="ModalDialog";const at=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=Z(t,"modal-footer"),f.jsx(n,{ref:o,className:y(e,t),...r})));at.displayName="ModalFooter";const it=a.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:o,...s},i)=>{const l=a.useContext(st),c=ke(()=>{l==null||l.onHide(),r==null||r()});return f.jsxs("div",{ref:i,...s,children:[o,n&&f.jsx(Ae,{"aria-label":e,variant:t,onClick:c})]})});it.displayName="AbstractModalHeader";const lt=a.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...o},s)=>(e=Z(e,"modal-header"),f.jsx(it,{ref:s,...o,className:y(t,e),closeLabel:n,closeButton:r})));lt.displayName="ModalHeader";const On=Yt("h4"),ct=a.forwardRef(({className:e,bsPrefix:t,as:n=On,...r},o)=>(t=Z(t,"modal-title"),f.jsx(n,{ref:o,className:y(e,t),...r})));ct.displayName="ModalTitle";function wn(e){return f.jsx(Le,{...e,timeout:null})}function Sn(e){return f.jsx(Le,{...e,timeout:null})}const ut=a.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:o,children:s,dialogAs:i=Ie,"data-bs-theme":l,"aria-labelledby":c,"aria-describedby":u,"aria-label":h,show:E=!1,animation:m=!0,backdrop:x=!0,keyboard:v=!0,onEscapeKeyDown:w,onShow:L,onHide:R,container:A,autoFocus:S=!0,enforceFocus:T=!0,restoreFocus:N=!0,restoreFocusOptions:b,onEntered:k,onExit:J,onExiting:xe,onEnter:Q,onEntering:se,onExited:ae,backdropClassName:ie,manager:le,...ye},M)=>{const[U,g]=a.useState({}),[Re,ce]=a.useState(!1),B=a.useRef(!1),P=a.useRef(!1),C=a.useRef(null),[j,ee]=tn(),Te=qe(M,ee),ue=ke(R),be=bt();e=Z(e,"modal");const te=a.useMemo(()=>({onHide:ue}),[ue]);function H(){return le||Nn({isRTL:be})}function de(d){if(!ge)return;const K=H().getScrollbarWidth()>0,We=d.scrollHeight>Ee(d).documentElement.clientHeight;g({paddingRight:K&&!We?Ke():void 0,paddingLeft:!K&&We?Ke():void 0})}const G=ke(()=>{j&&de(j.dialog)});Qt(()=>{Ue(window,"resize",G),C.current==null||C.current()});const ne=()=>{B.current=!0},V=d=>{B.current&&j&&d.target===j.dialog&&(P.current=!0),B.current=!1},p=()=>{ce(!0),C.current=tt(j.dialog,()=>{ce(!1)})},fe=d=>{d.target===d.currentTarget&&p()},re=d=>{if(x==="static"){fe(d);return}if(P.current||d.target!==d.currentTarget){P.current=!1;return}R==null||R()},dt=d=>{v?w==null||w(d):(d.preventDefault(),x==="static"&&p())},ft=(d,K)=>{d&&de(d),Q==null||Q(d,K)},pt=d=>{C.current==null||C.current(),J==null||J(d)},ht=(d,K)=>{se==null||se(d,K),Ct(window,"resize",G)},mt=d=>{d&&(d.style.display=""),ae==null||ae(d),Ue(window,"resize",G)},Et=a.useCallback(d=>f.jsx("div",{...d,className:y(`${e}-backdrop`,ie,!m&&"show")}),[m,ie,e]),_e={...n,...U};_e.display="block";const gt=d=>f.jsx("div",{role:"dialog",...d,style:_e,className:y(t,e,Re&&`${e}-static`,!m&&"show"),onClick:x?re:void 0,onMouseUp:V,"data-bs-theme":l,"aria-label":h,"aria-labelledby":c,"aria-describedby":u,children:f.jsx(i,{...ye,onMouseDown:ne,className:r,contentClassName:o,children:s})});return f.jsx(st.Provider,{value:te,children:f.jsx(yn,{show:E,ref:Te,backdrop:x,container:A,keyboard:!0,autoFocus:S,enforceFocus:T,restoreFocus:N,restoreFocusOptions:b,onEscapeKeyDown:dt,onShow:L,onHide:R,onEnter:ft,onEntering:ht,onEntered:k,onExit:pt,onExiting:xe,onExited:mt,manager:H(),transition:m?wn:void 0,backdropTransition:m?Sn:void 0,renderBackdrop:Et,renderDialog:gt})})});ut.displayName="Modal";const Mn=Object.assign(ut,{Body:ot,Header:lt,Title:ct,Footer:at,Dialog:Ie,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150});export{Mn as M}; diff --git a/YakPanel-server/frontend/dist/assets/MonitorPage-CgJf2F74.js b/YakPanel-server/frontend/dist/assets/MonitorPage-BRoY6HLt.js similarity index 94% rename from YakPanel-server/frontend/dist/assets/MonitorPage-CgJf2F74.js rename to YakPanel-server/frontend/dist/assets/MonitorPage-BRoY6HLt.js index 3f62cb55..676f6e1c 100644 --- a/YakPanel-server/frontend/dist/assets/MonitorPage-CgJf2F74.js +++ b/YakPanel-server/frontend/dist/assets/MonitorPage-BRoY6HLt.js @@ -1 +1 @@ -import{r,j as s,a as b,O as g,P as v}from"./index-CRR9sQ49.js";import{A as N}from"./AdminAlert-DW1IRWce.js";import{A as y}from"./AdminTable-BLiLxfnS.js";import{P as o}from"./PageHeader-BcjNf7GG.js";function M(){const[e,d]=r.useState(null),[c,l]=r.useState([]),[t,n]=r.useState(null),[i,p]=r.useState("");return r.useEffect(()=>{const a=()=>{b("/monitor/system").then(d).catch(m=>p(m.message))},h=()=>{g(50).then(m=>l(m.processes)).catch(()=>l([]))},j=()=>{v().then(n).catch(()=>n(null))};a(),h(),j();const u=setInterval(()=>{a(),h(),j()},3e3);return()=>clearInterval(u)},[]),i&&!e?s.jsxs(s.Fragment,{children:[s.jsx(o,{title:"Monitor"}),s.jsx(N,{children:i})]}):e?s.jsxs(s.Fragment,{children:[s.jsx(o,{title:"Monitor"}),i?s.jsx(N,{className:"mb-3",children:i}):null,s.jsx("p",{className:"small text-secondary mb-3",children:"Refreshes every 3 seconds"}),s.jsxs("div",{className:"row g-3 mb-3",children:[s.jsx("div",{className:"col-md-4",children:s.jsx(x,{iconClass:"ti ti-cpu",title:"CPU",value:`${e.cpu_percent}%`,subtitle:"Usage",percent:e.cpu_percent})}),s.jsx("div",{className:"col-md-4",children:s.jsx(x,{iconClass:"ti ti-device-sd-card",title:"Memory",value:`${e.memory_used_mb} / ${e.memory_total_mb} MB`,subtitle:`${e.memory_percent}% used`,percent:e.memory_percent})}),s.jsx("div",{className:"col-md-4",children:s.jsx(x,{iconClass:"ti ti-database",title:"Disk",value:`${e.disk_used_gb} / ${e.disk_total_gb} GB`,subtitle:`${e.disk_percent}% used`,percent:e.disk_percent})})]}),t?s.jsx("div",{className:"card mb-3",children:s.jsxs("div",{className:"card-body",children:[s.jsxs("div",{className:"d-flex align-items-center gap-2 mb-3",children:[s.jsx("i",{className:"ti ti-network fs-5","aria-hidden":!0}),s.jsx("span",{className:"fw-medium",children:"Network I/O"})]}),s.jsxs("div",{className:"row g-3 small",children:[s.jsxs("div",{className:"col-6",children:[s.jsx("span",{className:"text-secondary d-block",children:"Sent"}),s.jsxs("span",{className:"font-monospace fw-medium",children:[t.bytes_sent_mb," MB"]})]}),s.jsxs("div",{className:"col-6",children:[s.jsx("span",{className:"text-secondary d-block",children:"Received"}),s.jsxs("span",{className:"font-monospace fw-medium",children:[t.bytes_recv_mb," MB"]})]})]})]})}):null,s.jsxs("div",{className:"card",children:[s.jsxs("div",{className:"card-header d-flex align-items-center gap-2",children:[s.jsx("i",{className:"ti ti-cpu","aria-hidden":!0}),s.jsx("span",{className:"fw-medium",children:"Top Processes (by CPU)"})]}),s.jsx("div",{className:"table-responsive",style:{maxHeight:"20rem"},children:s.jsxs(y,{responsive:!1,children:[s.jsx("thead",{className:"sticky-top bg-body-secondary",children:s.jsxs("tr",{children:[s.jsx("th",{className:"small",children:"PID"}),s.jsx("th",{className:"small",children:"Name"}),s.jsx("th",{className:"small",children:"User"}),s.jsx("th",{className:"small text-end",children:"CPU %"}),s.jsx("th",{className:"small text-end",children:"Mem %"}),s.jsx("th",{className:"small",children:"Status"})]})}),s.jsx("tbody",{children:c.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:6,className:"text-center text-secondary small py-3",children:"No process data"})}):c.map(a=>s.jsxs("tr",{className:"small",children:[s.jsx("td",{className:"font-monospace",children:a.pid}),s.jsx("td",{className:"text-truncate",style:{maxWidth:120},title:a.name,children:a.name}),s.jsx("td",{children:a.username}),s.jsxs("td",{className:"text-end font-monospace",children:[a.cpu_percent,"%"]}),s.jsxs("td",{className:"text-end font-monospace",children:[a.memory_percent,"%"]}),s.jsx("td",{className:"text-secondary",children:a.status})]},a.pid))})]})})]}),s.jsxs("div",{className:"alert alert-warning small mt-3 mb-0",children:[s.jsxs("div",{className:"d-flex align-items-center gap-2 fw-medium mb-1",children:[s.jsx("i",{className:"ti ti-activity","aria-hidden":!0}),"Live monitoring"]}),"System metrics, processes, and network stats are polled every 3 seconds."]})]}):s.jsxs(s.Fragment,{children:[s.jsx(o,{title:"Monitor"}),s.jsx("p",{className:"text-secondary",children:"Loading…"})]})}function x({iconClass:e,title:d,value:c,subtitle:l,percent:t}){const n=t>90?"bg-danger":t>70?"bg-warning":"bg-primary";return s.jsx("div",{className:"card h-100",children:s.jsxs("div",{className:"card-body",children:[s.jsxs("div",{className:"d-flex align-items-center gap-3 mb-3",children:[s.jsx("div",{className:"p-3 rounded bg-primary-subtle text-primary",children:s.jsx("i",{className:`${e} fs-2`,"aria-hidden":!0})}),s.jsxs("div",{children:[s.jsx("p",{className:"small text-secondary mb-0",children:d}),s.jsx("p",{className:"h5 mb-0",children:c}),s.jsx("p",{className:"small text-secondary mb-0",children:l})]})]}),s.jsx("div",{className:"progress",style:{height:6},children:s.jsx("div",{className:`progress-bar ${n}`,role:"progressbar",style:{width:`${Math.min(t,100)}%`}})})]})})}export{M as MonitorPage}; +import{r,j as s,M as b,T as g,U as v}from"./index-Cvh4tLHo.js";import{A as N}from"./AdminAlert-Bt3L8_zJ.js";import{A as y}from"./AdminTable-BQ5Lf7EC.js";import{P as o}from"./PageHeader-D6k34vvM.js";function M(){const[e,d]=r.useState(null),[c,l]=r.useState([]),[t,n]=r.useState(null),[i,p]=r.useState("");return r.useEffect(()=>{const a=()=>{b("/monitor/system").then(d).catch(m=>p(m.message))},h=()=>{g(50).then(m=>l(m.processes)).catch(()=>l([]))},j=()=>{v().then(n).catch(()=>n(null))};a(),h(),j();const u=setInterval(()=>{a(),h(),j()},3e3);return()=>clearInterval(u)},[]),i&&!e?s.jsxs(s.Fragment,{children:[s.jsx(o,{title:"Monitor"}),s.jsx(N,{children:i})]}):e?s.jsxs(s.Fragment,{children:[s.jsx(o,{title:"Monitor"}),i?s.jsx(N,{className:"mb-3",children:i}):null,s.jsx("p",{className:"small text-secondary mb-3",children:"Refreshes every 3 seconds"}),s.jsxs("div",{className:"row g-3 mb-3",children:[s.jsx("div",{className:"col-md-4",children:s.jsx(x,{iconClass:"ti ti-cpu",title:"CPU",value:`${e.cpu_percent}%`,subtitle:"Usage",percent:e.cpu_percent})}),s.jsx("div",{className:"col-md-4",children:s.jsx(x,{iconClass:"ti ti-device-sd-card",title:"Memory",value:`${e.memory_used_mb} / ${e.memory_total_mb} MB`,subtitle:`${e.memory_percent}% used`,percent:e.memory_percent})}),s.jsx("div",{className:"col-md-4",children:s.jsx(x,{iconClass:"ti ti-database",title:"Disk",value:`${e.disk_used_gb} / ${e.disk_total_gb} GB`,subtitle:`${e.disk_percent}% used`,percent:e.disk_percent})})]}),t?s.jsx("div",{className:"card mb-3",children:s.jsxs("div",{className:"card-body",children:[s.jsxs("div",{className:"d-flex align-items-center gap-2 mb-3",children:[s.jsx("i",{className:"ti ti-network fs-5","aria-hidden":!0}),s.jsx("span",{className:"fw-medium",children:"Network I/O"})]}),s.jsxs("div",{className:"row g-3 small",children:[s.jsxs("div",{className:"col-6",children:[s.jsx("span",{className:"text-secondary d-block",children:"Sent"}),s.jsxs("span",{className:"font-monospace fw-medium",children:[t.bytes_sent_mb," MB"]})]}),s.jsxs("div",{className:"col-6",children:[s.jsx("span",{className:"text-secondary d-block",children:"Received"}),s.jsxs("span",{className:"font-monospace fw-medium",children:[t.bytes_recv_mb," MB"]})]})]})]})}):null,s.jsxs("div",{className:"card",children:[s.jsxs("div",{className:"card-header d-flex align-items-center gap-2",children:[s.jsx("i",{className:"ti ti-cpu","aria-hidden":!0}),s.jsx("span",{className:"fw-medium",children:"Top Processes (by CPU)"})]}),s.jsx("div",{className:"table-responsive",style:{maxHeight:"20rem"},children:s.jsxs(y,{responsive:!1,children:[s.jsx("thead",{className:"sticky-top bg-body-secondary",children:s.jsxs("tr",{children:[s.jsx("th",{className:"small",children:"PID"}),s.jsx("th",{className:"small",children:"Name"}),s.jsx("th",{className:"small",children:"User"}),s.jsx("th",{className:"small text-end",children:"CPU %"}),s.jsx("th",{className:"small text-end",children:"Mem %"}),s.jsx("th",{className:"small",children:"Status"})]})}),s.jsx("tbody",{children:c.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:6,className:"text-center text-secondary small py-3",children:"No process data"})}):c.map(a=>s.jsxs("tr",{className:"small",children:[s.jsx("td",{className:"font-monospace",children:a.pid}),s.jsx("td",{className:"text-truncate",style:{maxWidth:120},title:a.name,children:a.name}),s.jsx("td",{children:a.username}),s.jsxs("td",{className:"text-end font-monospace",children:[a.cpu_percent,"%"]}),s.jsxs("td",{className:"text-end font-monospace",children:[a.memory_percent,"%"]}),s.jsx("td",{className:"text-secondary",children:a.status})]},a.pid))})]})})]}),s.jsxs("div",{className:"alert alert-warning small mt-3 mb-0",children:[s.jsxs("div",{className:"d-flex align-items-center gap-2 fw-medium mb-1",children:[s.jsx("i",{className:"ti ti-activity","aria-hidden":!0}),"Live monitoring"]}),"System metrics, processes, and network stats are polled every 3 seconds."]})]}):s.jsxs(s.Fragment,{children:[s.jsx(o,{title:"Monitor"}),s.jsx("p",{className:"text-secondary",children:"Loading…"})]})}function x({iconClass:e,title:d,value:c,subtitle:l,percent:t}){const n=t>90?"bg-danger":t>70?"bg-warning":"bg-primary";return s.jsx("div",{className:"card h-100",children:s.jsxs("div",{className:"card-body",children:[s.jsxs("div",{className:"d-flex align-items-center gap-3 mb-3",children:[s.jsx("div",{className:"p-3 rounded bg-primary-subtle text-primary",children:s.jsx("i",{className:`${e} fs-2`,"aria-hidden":!0})}),s.jsxs("div",{children:[s.jsx("p",{className:"small text-secondary mb-0",children:d}),s.jsx("p",{className:"h5 mb-0",children:c}),s.jsx("p",{className:"small text-secondary mb-0",children:l})]})]}),s.jsx("div",{className:"progress",style:{height:6},children:s.jsx("div",{className:`progress-bar ${n}`,role:"progressbar",style:{width:`${Math.min(t,100)}%`}})})]})})}export{M as MonitorPage}; diff --git a/YakPanel-server/frontend/dist/assets/NodePage-BQzvbSat.js b/YakPanel-server/frontend/dist/assets/NodePage-BQzvbSat.js deleted file mode 100644 index 52ca2ecd..00000000 --- a/YakPanel-server/frontend/dist/assets/NodePage-BQzvbSat.js +++ /dev/null @@ -1 +0,0 @@ -import{r,j as e,a as c,_ as R}from"./index-CRR9sQ49.js";import{M as h}from"./Modal-B7V4w_St.js";import{A as B}from"./AdminAlert-DW1IRWce.js";import{A as u}from"./AdminButton-Bd2cLTu3.js";import{A as D}from"./AdminTable-BLiLxfnS.js";import{E as I}from"./EmptyState-C61VdEFl.js";import{P as v}from"./PageHeader-BcjNf7GG.js";function O(n){if(!n||n<0)return"—";const m=Math.floor(n/1e3);if(m<60)return`${m}s`;const o=Math.floor(m/60);return o<60?`${o}m`:`${Math.floor(o/60)}h`}function q(n){return n?(n/1024/1024).toFixed(1)+" MB":"—"}function P({show:n}){return n?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null}function K(){const[n,m]=r.useState([]),[o,p]=r.useState(null),[k,f]=r.useState(!0),[N,i]=r.useState(""),[d,a]=r.useState(null),[C,x]=r.useState(!1),[j,b]=r.useState(""),[g,y]=r.useState(""),[S,A]=r.useState(!1),l=()=>{f(!0),Promise.all([c("/node/processes"),c("/node/version")]).then(([s,t])=>{m(s.processes||[]),p(t.version||null),i(s.error||t.error||"")}).catch(s=>i(s.message)).finally(()=>f(!1))};r.useEffect(()=>{l()},[]);const M=s=>{a(s),c(`/node/${s}/start`,{method:"POST"}).then(l).catch(t=>i(t.message)).finally(()=>a(null))},E=s=>{a(s),c(`/node/${s}/stop`,{method:"POST"}).then(l).catch(t=>i(t.message)).finally(()=>a(null))},$=s=>{a(s),c(`/node/${s}/restart`,{method:"POST"}).then(l).catch(t=>i(t.message)).finally(()=>a(null))},T=s=>{s.preventDefault(),j.trim()&&(A(!0),R(j.trim(),g.trim()||void 0).then(()=>{x(!1),b(""),y(""),l()}).catch(t=>i(t.message)).finally(()=>A(!1)))},F=(s,t)=>{confirm(`Delete PM2 process "${t}"?`)&&(a(s),c(`/node/${s}`,{method:"DELETE"}).then(l).catch(L=>i(L.message)).finally(()=>a(null)))},w=s=>(s==null?void 0:s.toLowerCase())==="online"||(s==null?void 0:s.toLowerCase())==="launching";return k?e.jsxs(e.Fragment,{children:[e.jsx(v,{title:"Node.js"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(v,{title:"Node.js",actions:e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2",children:[o?e.jsxs("span",{className:"small text-secondary me-2",children:["Node: ",o]}):null,e.jsxs(u,{variant:"primary",size:"sm",onClick:()=>x(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add Process"]}),e.jsxs(u,{variant:"secondary",size:"sm",onClick:l,children:[e.jsx("i",{className:"ti ti-rotate-clockwise me-1","aria-hidden":!0}),"Refresh"]})]})}),e.jsxs(h,{show:C,onHide:()=>x(!1),centered:!0,children:[e.jsx(h.Header,{closeButton:!0,children:e.jsx(h.Title,{children:"Add PM2 Process"})}),e.jsxs("form",{onSubmit:T,children:[e.jsxs(h.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Script path"}),e.jsx("input",{value:j,onChange:s=>b(s.target.value),placeholder:"/www/wwwroot/app.js",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Name (optional)"}),e.jsx("input",{value:g,onChange:s=>y(s.target.value),placeholder:"myapp",className:"form-control"})]})]}),e.jsxs(h.Footer,{children:[e.jsx(u,{type:"button",variant:"secondary",onClick:()=>x(!1),children:"Cancel"}),e.jsx(u,{type:"submit",variant:"primary",disabled:S,children:S?"Starting…":"Start"})]})]})]}),N?e.jsx(B,{variant:"warning",className:"mb-3",children:N}):null,e.jsxs("div",{className:"alert alert-secondary small mb-3",children:["PM2 process manager. Install with: ",e.jsx("code",{className:"font-monospace",children:"npm install -g pm2"})]}),e.jsx("div",{className:"card",children:e.jsxs(D,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Status"}),e.jsx("th",{children:"PID"}),e.jsx("th",{children:"Uptime"}),e.jsx("th",{children:"Memory"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:n.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"p-0",children:e.jsx(I,{title:"No PM2 processes",description:'Click "Add Process" or run pm2 start app.js on the server.'})})}):n.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"font-monospace",children:s.name}),e.jsx("td",{children:e.jsx("span",{className:w(s.status)?"text-success":"text-secondary",children:s.status})}),e.jsx("td",{children:s.pid||"—"}),e.jsx("td",{children:O(s.uptime)}),e.jsx("td",{children:q(s.memory)}),e.jsx("td",{className:"text-end",children:e.jsxs("span",{className:"d-inline-flex gap-1 justify-content-end",children:[w(s.status)?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-warning p-1",title:"Restart",disabled:d===s.id,onClick:()=>$(s.id),children:d===s.id?e.jsx(P,{show:!0}):e.jsx("i",{className:"ti ti-rotate-clockwise","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Stop",disabled:d===s.id,onClick:()=>E(s.id),children:e.jsx("i",{className:"ti ti-square","aria-hidden":!0})})]}):e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-success p-1",title:"Start",disabled:d===s.id,onClick:()=>M(s.id),children:d===s.id?e.jsx(P,{show:!0}):e.jsx("i",{className:"ti ti-player-play","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-secondary p-1",title:"Delete",disabled:d===s.id,onClick:()=>F(s.id,s.name),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]})})]},s.id))})]})})]})}export{K as NodePage}; diff --git a/YakPanel-server/frontend/dist/assets/NodePage-DOIEhdrc.js b/YakPanel-server/frontend/dist/assets/NodePage-DOIEhdrc.js new file mode 100644 index 00000000..c5ee6fa1 --- /dev/null +++ b/YakPanel-server/frontend/dist/assets/NodePage-DOIEhdrc.js @@ -0,0 +1 @@ +import{r,j as e,M as c,a3 as R}from"./index-Cvh4tLHo.js";import{M as h}from"./Modal-CCihVZTY.js";import{A as B}from"./AdminAlert-Bt3L8_zJ.js";import{A as u}from"./AdminButton-BKglG8kI.js";import{A as D}from"./AdminTable-BQ5Lf7EC.js";import{E as I}from"./EmptyState-D6lCh4WN.js";import{P as v}from"./PageHeader-D6k34vvM.js";function O(n){if(!n||n<0)return"—";const m=Math.floor(n/1e3);if(m<60)return`${m}s`;const o=Math.floor(m/60);return o<60?`${o}m`:`${Math.floor(o/60)}h`}function q(n){return n?(n/1024/1024).toFixed(1)+" MB":"—"}function P({show:n}){return n?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null}function Q(){const[n,m]=r.useState([]),[o,p]=r.useState(null),[k,f]=r.useState(!0),[N,i]=r.useState(""),[d,a]=r.useState(null),[C,x]=r.useState(!1),[j,b]=r.useState(""),[g,y]=r.useState(""),[S,A]=r.useState(!1),l=()=>{f(!0),Promise.all([c("/node/processes"),c("/node/version")]).then(([s,t])=>{m(s.processes||[]),p(t.version||null),i(s.error||t.error||"")}).catch(s=>i(s.message)).finally(()=>f(!1))};r.useEffect(()=>{l()},[]);const M=s=>{a(s),c(`/node/${s}/start`,{method:"POST"}).then(l).catch(t=>i(t.message)).finally(()=>a(null))},E=s=>{a(s),c(`/node/${s}/stop`,{method:"POST"}).then(l).catch(t=>i(t.message)).finally(()=>a(null))},$=s=>{a(s),c(`/node/${s}/restart`,{method:"POST"}).then(l).catch(t=>i(t.message)).finally(()=>a(null))},T=s=>{s.preventDefault(),j.trim()&&(A(!0),R(j.trim(),g.trim()||void 0).then(()=>{x(!1),b(""),y(""),l()}).catch(t=>i(t.message)).finally(()=>A(!1)))},F=(s,t)=>{confirm(`Delete PM2 process "${t}"?`)&&(a(s),c(`/node/${s}`,{method:"DELETE"}).then(l).catch(L=>i(L.message)).finally(()=>a(null)))},w=s=>(s==null?void 0:s.toLowerCase())==="online"||(s==null?void 0:s.toLowerCase())==="launching";return k?e.jsxs(e.Fragment,{children:[e.jsx(v,{title:"Node.js"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(v,{title:"Node.js",actions:e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2",children:[o?e.jsxs("span",{className:"small text-secondary me-2",children:["Node: ",o]}):null,e.jsxs(u,{variant:"primary",size:"sm",onClick:()=>x(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add Process"]}),e.jsxs(u,{variant:"secondary",size:"sm",onClick:l,children:[e.jsx("i",{className:"ti ti-rotate-clockwise me-1","aria-hidden":!0}),"Refresh"]})]})}),e.jsxs(h,{show:C,onHide:()=>x(!1),centered:!0,children:[e.jsx(h.Header,{closeButton:!0,children:e.jsx(h.Title,{children:"Add PM2 Process"})}),e.jsxs("form",{onSubmit:T,children:[e.jsxs(h.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Script path"}),e.jsx("input",{value:j,onChange:s=>b(s.target.value),placeholder:"/www/wwwroot/app.js",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Name (optional)"}),e.jsx("input",{value:g,onChange:s=>y(s.target.value),placeholder:"myapp",className:"form-control"})]})]}),e.jsxs(h.Footer,{children:[e.jsx(u,{type:"button",variant:"secondary",onClick:()=>x(!1),children:"Cancel"}),e.jsx(u,{type:"submit",variant:"primary",disabled:S,children:S?"Starting…":"Start"})]})]})]}),N?e.jsx(B,{variant:"warning",className:"mb-3",children:N}):null,e.jsxs("div",{className:"alert alert-secondary small mb-3",children:["PM2 process manager. Install with: ",e.jsx("code",{className:"font-monospace",children:"npm install -g pm2"})]}),e.jsx("div",{className:"card",children:e.jsxs(D,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Status"}),e.jsx("th",{children:"PID"}),e.jsx("th",{children:"Uptime"}),e.jsx("th",{children:"Memory"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:n.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"p-0",children:e.jsx(I,{title:"No PM2 processes",description:'Click "Add Process" or run pm2 start app.js on the server.'})})}):n.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"font-monospace",children:s.name}),e.jsx("td",{children:e.jsx("span",{className:w(s.status)?"text-success":"text-secondary",children:s.status})}),e.jsx("td",{children:s.pid||"—"}),e.jsx("td",{children:O(s.uptime)}),e.jsx("td",{children:q(s.memory)}),e.jsx("td",{className:"text-end",children:e.jsxs("span",{className:"d-inline-flex gap-1 justify-content-end",children:[w(s.status)?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-warning p-1",title:"Restart",disabled:d===s.id,onClick:()=>$(s.id),children:d===s.id?e.jsx(P,{show:!0}):e.jsx("i",{className:"ti ti-rotate-clockwise","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Stop",disabled:d===s.id,onClick:()=>E(s.id),children:e.jsx("i",{className:"ti ti-square","aria-hidden":!0})})]}):e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-success p-1",title:"Start",disabled:d===s.id,onClick:()=>M(s.id),children:d===s.id?e.jsx(P,{show:!0}):e.jsx("i",{className:"ti ti-player-play","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-secondary p-1",title:"Delete",disabled:d===s.id,onClick:()=>F(s.id,s.name),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]})})]},s.id))})]})})]})}export{Q as NodePage}; diff --git a/YakPanel-server/frontend/dist/assets/PageHeader-BcjNf7GG.js b/YakPanel-server/frontend/dist/assets/PageHeader-BcjNf7GG.js deleted file mode 100644 index 3f84f9df..00000000 --- a/YakPanel-server/frontend/dist/assets/PageHeader-BcjNf7GG.js +++ /dev/null @@ -1 +0,0 @@ -import{av as c,j as e,aw as m}from"./index-CRR9sQ49.js";const d={"/":"Dashboard","/site":"Website","/ftp":"FTP","/database":"Databases","/docker":"Docker","/control":"Monitor","/firewall":"Security","/files":"Files","/node":"Node","/logs":"Logs","/ssl_domain":"Domains","/xterm":"Terminal","/crontab":"Cron","/soft":"App Store","/config":"Settings","/services":"Services","/plugins":"Plugins","/backup-plans":"Backup Plans","/users":"Users","/login":"Login","/install":"Remote install"};function b(t){return d[t]||"YakPanel"}function p({title:t,breadcrumbs:i,actions:n}){const{pathname:o}=c(),r=t??b(o),s=i??[{label:"Home",path:"/"},{label:r}];return e.jsx("div",{className:"page-header mb-4",children:e.jsxs("div",{className:"row align-items-center",children:[e.jsxs("div",{className:"col-md-6",children:[e.jsx("h3",{className:"page-title",children:r}),e.jsx("nav",{"aria-label":"breadcrumb",children:e.jsx("ol",{className:"breadcrumb mb-0",children:s.map((a,l)=>e.jsx("li",{className:`breadcrumb-item${l===s.length-1?" active":""}`,...l===s.length-1?{"aria-current":"page"}:{},children:a.path&&le.jsx("li",{className:`breadcrumb-item${l===s.length-1?" active":""}`,...l===s.length-1?{"aria-current":"page"}:{},children:a.path&&lR("/plugin/list").then(s=>N(s.plugins||[])).catch(s=>m(s.message));a.useEffect(()=>{c(!0),d().finally(()=>c(!1))},[]);const A=s=>{s.preventDefault();const n=u.trim();n&&(j(!0),i(""),U(n).then(()=>{l(!1),h(""),d()}).catch(S=>i(S.message)).finally(()=>j(!1)))},P=s=>{confirm("Remove this plugin?")&&w(s).then(d).catch(n=>m(n.message))};return v?e.jsxs(e.Fragment,{children:[e.jsx(p,{title:"Plugins",actions:e.jsxs(r,{variant:"primary",disabled:!0,children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add from URL"]})}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(p,{title:"Plugins",actions:e.jsxs(r,{variant:"primary",onClick:()=>l(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add from URL"]})}),o?e.jsx(f,{className:"mb-3",children:o}):null,e.jsxs("div",{className:"alert alert-secondary small mb-4",children:["Built-in extensions and third-party plugins. Add plugins from a JSON manifest URL (must include ",e.jsx("code",{children:"id"}),","," ",e.jsx("code",{children:"name"}),", and optionally ",e.jsx("code",{children:"version"}),", ",e.jsx("code",{children:"desc"}),")."]}),e.jsxs(t,{show:y,onHide:()=>{l(!1),i("")},centered:!0,children:[e.jsx(t.Header,{closeButton:!0,children:e.jsx(t.Title,{children:"Add Plugin from URL"})}),e.jsxs("form",{onSubmit:A,children:[e.jsxs(t.Body,{children:[g?e.jsx(f,{className:"mb-3",children:g}):null,e.jsx("label",{className:"form-label",children:"Manifest URL"}),e.jsx("input",{value:u,onChange:s=>h(s.target.value),placeholder:"https://example.com/plugin.json",className:"form-control",required:!0})]}),e.jsxs(t.Footer,{children:[e.jsx(r,{type:"button",variant:"secondary",onClick:()=>{l(!1),i("")},children:"Cancel"}),e.jsx(r,{type:"submit",variant:"primary",disabled:x,children:x?"Adding…":"Add"})]})]})]}),e.jsx("div",{className:"row g-3",children:b.map(s=>e.jsx("div",{className:"col-md-6 col-xl-4",children:e.jsx("div",{className:"card h-100",children:e.jsxs("div",{className:"card-body d-flex gap-3",children:[e.jsx("i",{className:"ti ti-puzzle text-primary fs-2 flex-shrink-0","aria-hidden":!0}),e.jsxs("div",{className:"min-w-0 flex-grow-1",children:[e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2 mb-1",children:[e.jsx("h3",{className:"h6 mb-0",children:s.name}),s.enabled?e.jsxs("span",{className:"badge bg-success-subtle text-success small",children:[e.jsx("i",{className:"ti ti-check me-1","aria-hidden":!0}),"Enabled"]}):null,s.builtin?null:e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-0 ms-auto",title:"Remove",onClick:()=>P(s.id),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]}),e.jsx("p",{className:"small text-secondary mb-1",children:s.desc}),e.jsxs("p",{className:"small text-muted mb-0",children:["v",s.version,s.builtin?" (built-in)":""]})]})]})})},s.id))})]})}export{F as PluginsPage}; diff --git a/YakPanel-server/frontend/dist/assets/PluginsPage-D1KZQdzk.js b/YakPanel-server/frontend/dist/assets/PluginsPage-D1KZQdzk.js new file mode 100644 index 00000000..f9628bfe --- /dev/null +++ b/YakPanel-server/frontend/dist/assets/PluginsPage-D1KZQdzk.js @@ -0,0 +1 @@ +import{r as a,j as e,M as R,a4 as U,a5 as w}from"./index-Cvh4tLHo.js";import{M as t}from"./Modal-CCihVZTY.js";import{A as f}from"./AdminAlert-Bt3L8_zJ.js";import{A as r}from"./AdminButton-BKglG8kI.js";import{P as p}from"./PageHeader-D6k34vvM.js";function F(){const[b,N]=a.useState([]),[v,c]=a.useState(!0),[o,m]=a.useState(""),[y,l]=a.useState(!1),[u,h]=a.useState(""),[x,j]=a.useState(!1),[g,i]=a.useState(""),d=()=>R("/plugin/list").then(s=>N(s.plugins||[])).catch(s=>m(s.message));a.useEffect(()=>{c(!0),d().finally(()=>c(!1))},[]);const A=s=>{s.preventDefault();const n=u.trim();n&&(j(!0),i(""),U(n).then(()=>{l(!1),h(""),d()}).catch(S=>i(S.message)).finally(()=>j(!1)))},P=s=>{confirm("Remove this plugin?")&&w(s).then(d).catch(n=>m(n.message))};return v?e.jsxs(e.Fragment,{children:[e.jsx(p,{title:"Plugins",actions:e.jsxs(r,{variant:"primary",disabled:!0,children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add from URL"]})}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(p,{title:"Plugins",actions:e.jsxs(r,{variant:"primary",onClick:()=>l(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add from URL"]})}),o?e.jsx(f,{className:"mb-3",children:o}):null,e.jsxs("div",{className:"alert alert-secondary small mb-4",children:["Built-in extensions and third-party plugins. Add plugins from a JSON manifest URL (must include ",e.jsx("code",{children:"id"}),","," ",e.jsx("code",{children:"name"}),", and optionally ",e.jsx("code",{children:"version"}),", ",e.jsx("code",{children:"desc"}),")."]}),e.jsxs(t,{show:y,onHide:()=>{l(!1),i("")},centered:!0,children:[e.jsx(t.Header,{closeButton:!0,children:e.jsx(t.Title,{children:"Add Plugin from URL"})}),e.jsxs("form",{onSubmit:A,children:[e.jsxs(t.Body,{children:[g?e.jsx(f,{className:"mb-3",children:g}):null,e.jsx("label",{className:"form-label",children:"Manifest URL"}),e.jsx("input",{value:u,onChange:s=>h(s.target.value),placeholder:"https://example.com/plugin.json",className:"form-control",required:!0})]}),e.jsxs(t.Footer,{children:[e.jsx(r,{type:"button",variant:"secondary",onClick:()=>{l(!1),i("")},children:"Cancel"}),e.jsx(r,{type:"submit",variant:"primary",disabled:x,children:x?"Adding…":"Add"})]})]})]}),e.jsx("div",{className:"row g-3",children:b.map(s=>e.jsx("div",{className:"col-md-6 col-xl-4",children:e.jsx("div",{className:"card h-100",children:e.jsxs("div",{className:"card-body d-flex gap-3",children:[e.jsx("i",{className:"ti ti-puzzle text-primary fs-2 flex-shrink-0","aria-hidden":!0}),e.jsxs("div",{className:"min-w-0 flex-grow-1",children:[e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2 mb-1",children:[e.jsx("h3",{className:"h6 mb-0",children:s.name}),s.enabled?e.jsxs("span",{className:"badge bg-success-subtle text-success small",children:[e.jsx("i",{className:"ti ti-check me-1","aria-hidden":!0}),"Enabled"]}):null,s.builtin?null:e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-0 ms-auto",title:"Remove",onClick:()=>P(s.id),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]}),e.jsx("p",{className:"small text-secondary mb-1",children:s.desc}),e.jsxs("p",{className:"small text-muted mb-0",children:["v",s.version,s.builtin?" (built-in)":""]})]})]})})},s.id))})]})}export{F as PluginsPage}; diff --git a/YakPanel-server/frontend/dist/assets/RemoteInstallPage-19-_F3Xw.js b/YakPanel-server/frontend/dist/assets/RemoteInstallPage-19-_F3Xw.js new file mode 100644 index 00000000..41ae4b5c --- /dev/null +++ b/YakPanel-server/frontend/dist/assets/RemoteInstallPage-19-_F3Xw.js @@ -0,0 +1,2 @@ +import{r as a,j as e,L as A}from"./index-Cvh4tLHo.js";import{A as b}from"./AdminAlert-Bt3L8_zJ.js";import{A as M}from"./AdminButton-BKglG8kI.js";function Y(){const[t,T]=a.useState(null),[d,L]=a.useState(""),[j,I]=a.useState(""),[m,F]=a.useState("22"),[f,O]=a.useState("root"),[n,y]=a.useState("key"),[N,q]=a.useState(""),[g,U]=a.useState(""),[v,S]=a.useState(""),[w,k]=a.useState(""),[h,E]=a.useState([]),[P,u]=a.useState(!1),[H,C]=a.useState(null),[R,_]=a.useState(""),o=a.useRef(null);a.useEffect(()=>{fetch("/api/v1/public-install/config").then(s=>s.ok?s.json():Promise.reject(new Error(`HTTP ${s.status}`))).then(s=>{T(s),k(s.default_install_url||"")}).catch(()=>L("Could not load installer configuration"))},[]),a.useEffect(()=>{o.current&&(o.current.scrollTop=o.current.scrollHeight)},[h]);const p=a.useCallback(s=>{E(c=>[...c.slice(-2e3),s])},[]);async function $(s){if(s.preventDefault(),_(""),E([]),C(null),!(t!=null&&t.enabled))return;const c=w.trim()||t.default_install_url,K=n==="key"?{type:"key",private_key:N,passphrase:g||null}:{type:"password",password:v},B={host:j.trim(),port:parseInt(m,10)||22,username:f.trim(),auth:K,install_url:c===t.default_install_url?null:c};u(!0);try{const l=await fetch("/api/v1/public-install/jobs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(B)});if(!l.ok){const i=await l.json().catch(()=>({}));throw new Error(i.detail||`HTTP ${l.status}`)}const{job_id:W}=await l.json(),J=window.location.protocol==="https:"?"wss:":"ws:",x=new WebSocket(`${J}//${window.location.host}/api/v1/public-install/ws/${W}`);x.onmessage=i=>{try{const r=JSON.parse(i.data);r.type==="line"&&typeof r.text=="string"&&p(r.text),r.type==="done"&&C(typeof r.exit_code=="number"?r.exit_code:-1)}catch{p(String(i.data))}},x.onerror=()=>p("[websocket error]"),x.onclose=()=>u(!1)}catch(l){_(l instanceof Error?l.message:"Request failed"),u(!1)}finally{n==="password"&&S("")}}return!t&&!d?e.jsx("div",{className:"min-vh-100 d-flex align-items-center justify-content-center bg-body-secondary",children:e.jsx("p",{className:"text-secondary mb-0",children:"Loading…"})}):d?e.jsx("div",{className:"min-vh-100 d-flex align-items-center justify-content-center bg-body-secondary p-3",children:e.jsx(b,{children:d})}):t&&!t.enabled?e.jsx("div",{className:"min-vh-100 d-flex align-items-center justify-content-center bg-body-secondary p-3",children:e.jsx("div",{className:"card shadow-sm w-100",style:{maxWidth:520},children:e.jsxs("div",{className:"card-body p-4",children:[e.jsx("h1",{className:"h4 mb-3",children:"Remote SSH installer disabled"}),e.jsxs("p",{className:"small text-secondary mb-3",children:["Enable it on the API server with environment variable"," ",e.jsx("code",{children:"ENABLE_REMOTE_INSTALLER=true"})," and restart the backend. Prefer SSH keys; exposing this endpoint increases risk."]}),e.jsx("p",{className:"small text-secondary mb-3",children:"One-liner on the target server (as root):"}),e.jsxs("pre",{className:"bg-dark text-success small p-3 rounded mb-3 mb-0 overflow-auto",children:["curl -fsSL ",t.default_install_url," | bash"]}),e.jsx(A,{to:"/login",className:"btn btn-link btn-sm px-0 mt-3",children:"Panel login"})]})})}):e.jsx("div",{className:"min-vh-100 bg-body-secondary py-4 px-3",children:e.jsxs("div",{className:"container",style:{maxWidth:900},children:[e.jsxs(b,{variant:"warning",className:"mb-3",children:[e.jsx("strong",{children:"Security warning:"})," SSH credentials are sent to this panel API and used only for this session (not stored). Prefer ",e.jsx("strong",{children:"SSH private keys"}),". Root password SSH is often disabled on Ubuntu. Non-root users need ",e.jsx("strong",{children:"passwordless sudo"})," (",e.jsx("code",{children:"sudo -n"}),") to run the installer. Allow SSH from this server to the target on port ",m,"."]}),e.jsx("div",{className:"card shadow-sm",children:e.jsxs("div",{className:"card-body p-4",children:[e.jsx("h1",{className:"h4 mb-2",children:"Remote install (SSH)"}),e.jsxs("p",{className:"small text-secondary mb-4 mb-0",children:["Runs the published ",e.jsx("code",{children:"install.sh"})," on the target via SSH (same as shell one-liner)."]}),e.jsx("hr",{}),e.jsxs("form",{onSubmit:$,className:"mt-3",children:[R?e.jsx(b,{className:"mb-3",children:R}):null,e.jsxs("div",{className:"row g-3 mb-3",children:[e.jsxs("div",{className:"col-md-8",children:[e.jsx("label",{className:"form-label",children:"Host"}),e.jsx("input",{type:"text",value:j,onChange:s=>I(s.target.value),className:"form-control",placeholder:"203.0.113.50",required:!0})]}),e.jsxs("div",{className:"col-md-4",children:[e.jsx("label",{className:"form-label",children:"SSH port"}),e.jsx("input",{type:"number",value:m,onChange:s=>F(s.target.value),className:"form-control",min:1,max:65535})]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SSH username"}),e.jsx("input",{type:"text",value:f,onChange:s=>O(s.target.value),className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("span",{className:"form-label d-block",children:"Authentication"}),e.jsxs("div",{className:"d-flex gap-4",children:[e.jsxs("div",{className:"form-check",children:[e.jsx("input",{className:"form-check-input",type:"radio",name:"auth",id:"auth-key",checked:n==="key",onChange:()=>y("key")}),e.jsx("label",{className:"form-check-label",htmlFor:"auth-key",children:"Private key"})]}),e.jsxs("div",{className:"form-check",children:[e.jsx("input",{className:"form-check-input",type:"radio",name:"auth",id:"auth-pw",checked:n==="password",onChange:()=>y("password")}),e.jsx("label",{className:"form-check-label",htmlFor:"auth-pw",children:"Password"})]})]})]}),n==="key"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Private key (PEM)"}),e.jsx("textarea",{value:N,onChange:s=>q(s.target.value),rows:6,className:"form-control font-monospace small",placeholder:"-----BEGIN OPENSSH PRIVATE KEY-----",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Key passphrase (optional)"}),e.jsx("input",{type:"password",value:g,onChange:s=>U(s.target.value),className:"form-control"})]})]}):e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SSH password"}),e.jsx("input",{type:"password",value:v,onChange:s=>S(s.target.value),className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Install script URL (https only)"}),e.jsx("input",{type:"url",value:w,onChange:s=>k(s.target.value),className:"form-control small"})]}),e.jsx(M,{type:"submit",variant:"primary",className:"w-100",disabled:P||!(t!=null&&t.enabled)||!t,children:P?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"spinner-border spinner-border-sm me-2",role:"status"}),"Running…"]}):"Start remote install"})]})]})}),h.length>0?e.jsx("div",{className:"card bg-dark text-light mt-3",children:e.jsxs("div",{className:"card-body p-3",children:[e.jsx("pre",{ref:o,className:"small font-monospace mb-0 overflow-auto text-wrap",style:{maxHeight:"24rem"},children:h.join(` +`)}),H!==null?e.jsxs("p",{className:"small border-secondary border-top pt-2 mt-2 mb-0",children:["Exit code: ",e.jsx("strong",{children:H})]}):null]})}):null,e.jsx("p",{className:"text-center small text-secondary mt-3 mb-0",children:e.jsx(A,{to:"/login",children:"Panel login"})})]})})}export{Y as RemoteInstallPage}; diff --git a/YakPanel-server/frontend/dist/assets/RemoteInstallPage-C4gVyakl.js b/YakPanel-server/frontend/dist/assets/RemoteInstallPage-C4gVyakl.js deleted file mode 100644 index 6604479f..00000000 --- a/YakPanel-server/frontend/dist/assets/RemoteInstallPage-C4gVyakl.js +++ /dev/null @@ -1,2 +0,0 @@ -import{r as a,j as e,aw as A}from"./index-CRR9sQ49.js";import{A as b}from"./AdminAlert-DW1IRWce.js";import{A as M}from"./AdminButton-Bd2cLTu3.js";function Y(){const[t,T]=a.useState(null),[d,I]=a.useState(""),[j,L]=a.useState(""),[m,F]=a.useState("22"),[f,O]=a.useState("root"),[n,y]=a.useState("key"),[N,q]=a.useState(""),[g,U]=a.useState(""),[v,S]=a.useState(""),[w,k]=a.useState(""),[h,E]=a.useState([]),[P,u]=a.useState(!1),[H,C]=a.useState(null),[R,_]=a.useState(""),o=a.useRef(null);a.useEffect(()=>{fetch("/api/v1/public-install/config").then(s=>s.ok?s.json():Promise.reject(new Error(`HTTP ${s.status}`))).then(s=>{T(s),k(s.default_install_url||"")}).catch(()=>I("Could not load installer configuration"))},[]),a.useEffect(()=>{o.current&&(o.current.scrollTop=o.current.scrollHeight)},[h]);const p=a.useCallback(s=>{E(c=>[...c.slice(-2e3),s])},[]);async function $(s){if(s.preventDefault(),_(""),E([]),C(null),!(t!=null&&t.enabled))return;const c=w.trim()||t.default_install_url,K=n==="key"?{type:"key",private_key:N,passphrase:g||null}:{type:"password",password:v},B={host:j.trim(),port:parseInt(m,10)||22,username:f.trim(),auth:K,install_url:c===t.default_install_url?null:c};u(!0);try{const l=await fetch("/api/v1/public-install/jobs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(B)});if(!l.ok){const i=await l.json().catch(()=>({}));throw new Error(i.detail||`HTTP ${l.status}`)}const{job_id:W}=await l.json(),J=window.location.protocol==="https:"?"wss:":"ws:",x=new WebSocket(`${J}//${window.location.host}/api/v1/public-install/ws/${W}`);x.onmessage=i=>{try{const r=JSON.parse(i.data);r.type==="line"&&typeof r.text=="string"&&p(r.text),r.type==="done"&&C(typeof r.exit_code=="number"?r.exit_code:-1)}catch{p(String(i.data))}},x.onerror=()=>p("[websocket error]"),x.onclose=()=>u(!1)}catch(l){_(l instanceof Error?l.message:"Request failed"),u(!1)}finally{n==="password"&&S("")}}return!t&&!d?e.jsx("div",{className:"min-vh-100 d-flex align-items-center justify-content-center bg-body-secondary",children:e.jsx("p",{className:"text-secondary mb-0",children:"Loading…"})}):d?e.jsx("div",{className:"min-vh-100 d-flex align-items-center justify-content-center bg-body-secondary p-3",children:e.jsx(b,{children:d})}):t&&!t.enabled?e.jsx("div",{className:"min-vh-100 d-flex align-items-center justify-content-center bg-body-secondary p-3",children:e.jsx("div",{className:"card shadow-sm w-100",style:{maxWidth:520},children:e.jsxs("div",{className:"card-body p-4",children:[e.jsx("h1",{className:"h4 mb-3",children:"Remote SSH installer disabled"}),e.jsxs("p",{className:"small text-secondary mb-3",children:["Enable it on the API server with environment variable"," ",e.jsx("code",{children:"ENABLE_REMOTE_INSTALLER=true"})," and restart the backend. Prefer SSH keys; exposing this endpoint increases risk."]}),e.jsx("p",{className:"small text-secondary mb-3",children:"One-liner on the target server (as root):"}),e.jsxs("pre",{className:"bg-dark text-success small p-3 rounded mb-3 mb-0 overflow-auto",children:["curl -fsSL ",t.default_install_url," | bash"]}),e.jsx(A,{to:"/login",className:"btn btn-link btn-sm px-0 mt-3",children:"Panel login"})]})})}):e.jsx("div",{className:"min-vh-100 bg-body-secondary py-4 px-3",children:e.jsxs("div",{className:"container",style:{maxWidth:900},children:[e.jsxs(b,{variant:"warning",className:"mb-3",children:[e.jsx("strong",{children:"Security warning:"})," SSH credentials are sent to this panel API and used only for this session (not stored). Prefer ",e.jsx("strong",{children:"SSH private keys"}),". Root password SSH is often disabled on Ubuntu. Non-root users need ",e.jsx("strong",{children:"passwordless sudo"})," (",e.jsx("code",{children:"sudo -n"}),") to run the installer. Allow SSH from this server to the target on port ",m,"."]}),e.jsx("div",{className:"card shadow-sm",children:e.jsxs("div",{className:"card-body p-4",children:[e.jsx("h1",{className:"h4 mb-2",children:"Remote install (SSH)"}),e.jsxs("p",{className:"small text-secondary mb-4 mb-0",children:["Runs the published ",e.jsx("code",{children:"install.sh"})," on the target via SSH (same as shell one-liner)."]}),e.jsx("hr",{}),e.jsxs("form",{onSubmit:$,className:"mt-3",children:[R?e.jsx(b,{className:"mb-3",children:R}):null,e.jsxs("div",{className:"row g-3 mb-3",children:[e.jsxs("div",{className:"col-md-8",children:[e.jsx("label",{className:"form-label",children:"Host"}),e.jsx("input",{type:"text",value:j,onChange:s=>L(s.target.value),className:"form-control",placeholder:"203.0.113.50",required:!0})]}),e.jsxs("div",{className:"col-md-4",children:[e.jsx("label",{className:"form-label",children:"SSH port"}),e.jsx("input",{type:"number",value:m,onChange:s=>F(s.target.value),className:"form-control",min:1,max:65535})]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SSH username"}),e.jsx("input",{type:"text",value:f,onChange:s=>O(s.target.value),className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("span",{className:"form-label d-block",children:"Authentication"}),e.jsxs("div",{className:"d-flex gap-4",children:[e.jsxs("div",{className:"form-check",children:[e.jsx("input",{className:"form-check-input",type:"radio",name:"auth",id:"auth-key",checked:n==="key",onChange:()=>y("key")}),e.jsx("label",{className:"form-check-label",htmlFor:"auth-key",children:"Private key"})]}),e.jsxs("div",{className:"form-check",children:[e.jsx("input",{className:"form-check-input",type:"radio",name:"auth",id:"auth-pw",checked:n==="password",onChange:()=>y("password")}),e.jsx("label",{className:"form-check-label",htmlFor:"auth-pw",children:"Password"})]})]})]}),n==="key"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Private key (PEM)"}),e.jsx("textarea",{value:N,onChange:s=>q(s.target.value),rows:6,className:"form-control font-monospace small",placeholder:"-----BEGIN OPENSSH PRIVATE KEY-----",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Key passphrase (optional)"}),e.jsx("input",{type:"password",value:g,onChange:s=>U(s.target.value),className:"form-control"})]})]}):e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SSH password"}),e.jsx("input",{type:"password",value:v,onChange:s=>S(s.target.value),className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Install script URL (https only)"}),e.jsx("input",{type:"url",value:w,onChange:s=>k(s.target.value),className:"form-control small"})]}),e.jsx(M,{type:"submit",variant:"primary",className:"w-100",disabled:P||!(t!=null&&t.enabled)||!t,children:P?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"spinner-border spinner-border-sm me-2",role:"status"}),"Running…"]}):"Start remote install"})]})]})}),h.length>0?e.jsx("div",{className:"card bg-dark text-light mt-3",children:e.jsxs("div",{className:"card-body p-3",children:[e.jsx("pre",{ref:o,className:"small font-monospace mb-0 overflow-auto text-wrap",style:{maxHeight:"24rem"},children:h.join(` -`)}),H!==null?e.jsxs("p",{className:"small border-secondary border-top pt-2 mt-2 mb-0",children:["Exit code: ",e.jsx("strong",{children:H})]}):null]})}):null,e.jsx("p",{className:"text-center small text-secondary mt-3 mb-0",children:e.jsx(A,{to:"/login",children:"Panel login"})})]})})}export{Y as RemoteInstallPage}; diff --git a/YakPanel-server/frontend/dist/assets/ServicesPage-DNZuAdmh.js b/YakPanel-server/frontend/dist/assets/ServicesPage-C2SHTH7X.js similarity index 91% rename from YakPanel-server/frontend/dist/assets/ServicesPage-DNZuAdmh.js rename to YakPanel-server/frontend/dist/assets/ServicesPage-C2SHTH7X.js index dd2cee77..fc548d85 100644 --- a/YakPanel-server/frontend/dist/assets/ServicesPage-DNZuAdmh.js +++ b/YakPanel-server/frontend/dist/assets/ServicesPage-C2SHTH7X.js @@ -1 +1 @@ -import{r,j as e,a as l}from"./index-CRR9sQ49.js";import{A as S}from"./AdminAlert-DW1IRWce.js";import{A as g}from"./AdminButton-Bd2cLTu3.js";import{A as y}from"./AdminTable-BLiLxfnS.js";import{P as x}from"./PageHeader-BcjNf7GG.js";function u({show:d}){return d?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null}function R(){const[d,j]=r.useState([]),[p,o]=r.useState(!0),[m,c]=r.useState(""),[n,s]=r.useState(null),i=()=>{o(!0),l("/service/list").then(t=>j(t.services||[])).catch(t=>c(t.message)).finally(()=>o(!1))};r.useEffect(()=>{i()},[]);const b=t=>{s(t),l(`/service/${t}/start`,{method:"POST"}).then(i).catch(a=>c(a.message)).finally(()=>s(null))},f=t=>{s(t),l(`/service/${t}/stop`,{method:"POST"}).then(i).catch(a=>c(a.message)).finally(()=>s(null))},v=t=>{s(t),l(`/service/${t}/restart`,{method:"POST"}).then(i).catch(a=>c(a.message)).finally(()=>s(null))},h=t=>t==="active"||t==="activating";return p?e.jsxs(e.Fragment,{children:[e.jsx(x,{title:"Services"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(x,{title:"Services",actions:e.jsxs(g,{variant:"secondary",size:"sm",onClick:i,children:[e.jsx("i",{className:"ti ti-rotate-clockwise me-1","aria-hidden":!0}),"Refresh"]})}),m?e.jsx(S,{className:"mb-3",children:m}):null,e.jsx("div",{className:"alert alert-secondary small mb-3",children:"Control system services via systemctl. Requires panel to run with sufficient privileges."}),e.jsx("div",{className:"card",children:e.jsxs(y,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Service"}),e.jsx("th",{children:"Unit"}),e.jsx("th",{children:"Status"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:d.map(t=>e.jsxs("tr",{children:[e.jsx("td",{children:t.name}),e.jsx("td",{className:"font-monospace small",children:t.unit}),e.jsx("td",{children:e.jsx("span",{className:h(t.status)?"text-success":"text-secondary",children:t.status})}),e.jsx("td",{className:"text-end",children:e.jsx("span",{className:"d-inline-flex gap-1 justify-content-end",children:h(t.status)?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-warning p-1",title:"Restart",disabled:!!n,onClick:()=>v(t.id),children:n===t.id?e.jsx(u,{show:!0}):e.jsx("i",{className:"ti ti-rotate-clockwise","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Stop",disabled:!!n,onClick:()=>f(t.id),children:e.jsx("i",{className:"ti ti-square","aria-hidden":!0})})]}):e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-success p-1",title:"Start",disabled:!!n,onClick:()=>b(t.id),children:n===t.id?e.jsx(u,{show:!0}):e.jsx("i",{className:"ti ti-player-play","aria-hidden":!0})})})})]},t.id))})]})})]})}export{R as ServicesPage}; +import{r,j as e,M as l}from"./index-Cvh4tLHo.js";import{A as S}from"./AdminAlert-Bt3L8_zJ.js";import{A as g}from"./AdminButton-BKglG8kI.js";import{A as y}from"./AdminTable-BQ5Lf7EC.js";import{P as x}from"./PageHeader-D6k34vvM.js";function u({show:d}){return d?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null}function R(){const[d,j]=r.useState([]),[p,o]=r.useState(!0),[m,c]=r.useState(""),[n,s]=r.useState(null),i=()=>{o(!0),l("/service/list").then(t=>j(t.services||[])).catch(t=>c(t.message)).finally(()=>o(!1))};r.useEffect(()=>{i()},[]);const b=t=>{s(t),l(`/service/${t}/start`,{method:"POST"}).then(i).catch(a=>c(a.message)).finally(()=>s(null))},f=t=>{s(t),l(`/service/${t}/stop`,{method:"POST"}).then(i).catch(a=>c(a.message)).finally(()=>s(null))},v=t=>{s(t),l(`/service/${t}/restart`,{method:"POST"}).then(i).catch(a=>c(a.message)).finally(()=>s(null))},h=t=>t==="active"||t==="activating";return p?e.jsxs(e.Fragment,{children:[e.jsx(x,{title:"Services"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(x,{title:"Services",actions:e.jsxs(g,{variant:"secondary",size:"sm",onClick:i,children:[e.jsx("i",{className:"ti ti-rotate-clockwise me-1","aria-hidden":!0}),"Refresh"]})}),m?e.jsx(S,{className:"mb-3",children:m}):null,e.jsx("div",{className:"alert alert-secondary small mb-3",children:"Control system services via systemctl. Requires panel to run with sufficient privileges."}),e.jsx("div",{className:"card",children:e.jsxs(y,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Service"}),e.jsx("th",{children:"Unit"}),e.jsx("th",{children:"Status"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:d.map(t=>e.jsxs("tr",{children:[e.jsx("td",{children:t.name}),e.jsx("td",{className:"font-monospace small",children:t.unit}),e.jsx("td",{children:e.jsx("span",{className:h(t.status)?"text-success":"text-secondary",children:t.status})}),e.jsx("td",{className:"text-end",children:e.jsx("span",{className:"d-inline-flex gap-1 justify-content-end",children:h(t.status)?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-warning p-1",title:"Restart",disabled:!!n,onClick:()=>v(t.id),children:n===t.id?e.jsx(u,{show:!0}):e.jsx("i",{className:"ti ti-rotate-clockwise","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Stop",disabled:!!n,onClick:()=>f(t.id),children:e.jsx("i",{className:"ti ti-square","aria-hidden":!0})})]}):e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-success p-1",title:"Start",disabled:!!n,onClick:()=>b(t.id),children:n===t.id?e.jsx(u,{show:!0}):e.jsx("i",{className:"ti ti-player-play","aria-hidden":!0})})})})]},t.id))})]})})]})}export{R as ServicesPage}; diff --git a/YakPanel-server/frontend/dist/assets/SitePage-CeCv6Zaa.js b/YakPanel-server/frontend/dist/assets/SitePage-CeCv6Zaa.js deleted file mode 100644 index d1cf9baa..00000000 --- a/YakPanel-server/frontend/dist/assets/SitePage-CeCv6Zaa.js +++ /dev/null @@ -1 +0,0 @@ -import{r as l,j as e,a as Ee,c as Ae,s as He,l as G,b as De,d as ie,e as Fe,f as Ge,h as Le,i as Ie,k as qe,u as Me,m as ze,n as $e,o as Ue}from"./index-CRR9sQ49.js";import{M as a}from"./Modal-B7V4w_St.js";import{A as k}from"./AdminAlert-DW1IRWce.js";import{A as ce}from"./AdminButton-Bd2cLTu3.js";import{A as We}from"./AdminTable-BLiLxfnS.js";import{E as Ve}from"./EmptyState-C61VdEFl.js";import{P as L}from"./PageHeader-BcjNf7GG.js";function et(){const[C,re]=l.useState([]),[oe,I]=l.useState(!0),[b,i]=l.useState(""),[de,j]=l.useState(!1),[q,M]=l.useState(!1),[z,w]=l.useState(""),[r,f]=l.useState(null),[$,B]=l.useState([]),[_,g]=l.useState(!1),[T,N]=l.useState(null),[n,c]=l.useState(null),[U,W]=l.useState(!1),[V,p]=l.useState(""),[K,J]=l.useState(null),[m,P]=l.useState(null),[O,R]=l.useState([]),[E,A]=l.useState(""),[H,D]=l.useState(""),[Q,X]=l.useState(301),[me,Y]=l.useState(!1),[x,h]=l.useState(null),[F,Z]=l.useState(""),[ee,te]=l.useState("main"),[v,o]=l.useState(null),[S,y]=l.useState(!1),u=()=>{I(!0),Ee("/site/list").then(re).catch(t=>i(t.message)).finally(()=>I(!1))};l.useEffect(()=>{u()},[]);const ue=t=>{var ae,ne;t.preventDefault();const s=t.currentTarget,d=s.elements.namedItem("name").value.trim(),le=s.elements.namedItem("domains").value.trim(),we=s.elements.namedItem("path").value.trim(),Be=s.elements.namedItem("ps").value.trim();if(!d||!le){w("Name and domain(s) are required");return}const _e=le.split(/[\s,]+/).filter(Boolean),Te=((ae=s.elements.namedItem("php_version"))==null?void 0:ae.value)||"74",Pe=((ne=s.elements.namedItem("force_https"))==null?void 0:ne.checked)||!1;M(!0),w(""),Ae({name:d,domains:_e,path:we||void 0,ps:Be||void 0,php_version:Te,force_https:Pe}).then(()=>{j(!1),s.reset(),u()}).catch(Re=>w(Re.message)).finally(()=>M(!1))},he=(t,s)=>{confirm(`Delete site "${s}"? This cannot be undone.`)&&Fe(t).then(u).catch(d=>i(d.message))},pe=t=>{f(t),B([]),ie(t).then(s=>B(s.backups)).catch(s=>i(s.message))},xe=()=>{r&&(g(!0),ze(r).then(()=>ie(r).then(t=>B(t.backups))).catch(t=>i(t.message)).finally(()=>g(!1)))},be=t=>{!r||!confirm(`Restore from ${t}? This will overwrite existing files.`)||(g(!0),Ue(r,t).then(()=>f(null)).catch(s=>i(s.message)).finally(()=>g(!1)))},je=t=>{r&&$e(r,t).catch(s=>i(s.message))},fe=t=>{N(t),p(""),De(t).then(s=>c({domains:(s.domains||[]).join(", "),path:s.path||"",ps:s.ps||"",php_version:s.php_version||"74",force_https:!!(s.force_https&&s.force_https!==0)})).catch(s=>p(s.message))},ge=t=>{if(t.preventDefault(),!T||!n)return;const s=n.domains.split(/[\s,]+/).filter(Boolean);if(s.length===0){p("At least one domain is required");return}W(!0),p(""),Me(T,{domains:s,path:n.path||void 0,ps:n.ps||void 0,php_version:n.php_version,force_https:n.force_https}).then(()=>{N(null),c(null),u()}).catch(d=>p(d.message)).finally(()=>W(!1))},se=(t,s)=>{J(t),He(t,s).then(u).catch(d=>i(d.message)).finally(()=>J(null))},Ne=t=>{P(t),A(""),D(""),X(301),G(t).then(R).catch(s=>i(s.message))},ve=t=>{t.preventDefault(),!(!m||!E.trim()||!H.trim())&&(Y(!0),Ie(m,E.trim(),H.trim(),Q).then(()=>G(m).then(R)).then(()=>{A(""),D("")}).catch(s=>i(s.message)).finally(()=>Y(!1)))},Se=t=>{m&&qe(m,t).then(()=>G(m).then(R)).catch(s=>i(s.message))},ye=t=>{t.preventDefault(),!(!x||!F.trim())&&(y(!0),Ge(x,F.trim(),ee.trim()||"main").then(()=>{h(null),o(null),u()}).catch(s=>i(s.message)).finally(()=>y(!1)))},ke=()=>{x&&(y(!0),Le(x).then(()=>{h(null),o(null),u()}).catch(t=>i(t.message)).finally(()=>y(!1)))},Ce=t=>t<1024?t+" B":t<1024*1024?(t/1024).toFixed(1)+" KB":(t/1024/1024).toFixed(1)+" MB";return oe?e.jsxs(e.Fragment,{children:[e.jsx(L,{title:"Website"}),e.jsx("div",{className:"text-center py-5 text-muted",children:"Loading…"})]}):b&&!C.length?e.jsxs(e.Fragment,{children:[e.jsx(L,{title:"Website"}),e.jsx(k,{variant:"danger",children:b})]}):e.jsxs(e.Fragment,{children:[e.jsx(L,{title:"Website",actions:e.jsxs(ce,{onClick:()=>j(!0),children:[e.jsx("i",{className:"ti ti-plus me-1"}),"Add Site"]})}),b?e.jsx(k,{variant:"warning",children:b}):null,e.jsxs(a,{show:de,onHide:()=>j(!1),centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Create Site"})}),e.jsxs("form",{onSubmit:ue,children:[e.jsxs(a.Body,{children:[z?e.jsx(k,{variant:"danger",children:z}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Site Name"}),e.jsx("input",{name:"name",type:"text",placeholder:"example.com",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Domain(s) (comma or space separated)"}),e.jsx("input",{name:"domains",type:"text",placeholder:"example.com www.example.com",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Path (optional)"}),e.jsx("input",{name:"path",type:"text",placeholder:"/www/wwwroot/example.com",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"PHP Version"}),e.jsxs("select",{name:"php_version",className:"form-select",children:[e.jsx("option",{value:"74",children:"7.4"}),e.jsx("option",{value:"80",children:"8.0"}),e.jsx("option",{value:"81",children:"8.1"}),e.jsx("option",{value:"82",children:"8.2"})]})]}),e.jsxs("div",{className:"form-check mb-3",children:[e.jsx("input",{name:"force_https",type:"checkbox",id:"create_force_https",className:"form-check-input"}),e.jsx("label",{htmlFor:"create_force_https",className:"form-check-label",children:"Force HTTPS (redirect HTTP to HTTPS)"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{name:"ps",type:"text",placeholder:"My website",className:"form-control"})]})]}),e.jsxs(a.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>j(!1),children:"Cancel"}),e.jsx("button",{type:"submit",disabled:q,className:"btn btn-primary",children:q?"Creating…":"Create"})]})]})]}),e.jsx("div",{className:"card shadow-sm border-0",children:e.jsx("div",{className:"card-body p-0",children:e.jsxs(We,{children:[e.jsx("thead",{className:"table-light",children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Path"}),e.jsx("th",{children:"Domains"}),e.jsx("th",{children:"Type"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:C.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-0",children:e.jsx(Ve,{title:"No sites yet",description:'Click "Add Site" to create one.'})})}):C.map(t=>e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",children:t.name}),e.jsx("td",{className:"align-middle text-muted",children:t.path}),e.jsx("td",{className:"align-middle",children:t.domain_count}),e.jsx("td",{className:"align-middle",children:t.project_type}),e.jsxs("td",{className:"align-middle text-end text-nowrap",children:[t.status===1?e.jsx("button",{type:"button",onClick:()=>se(t.id,!1),disabled:K===t.id,className:"btn btn-sm btn-outline-warning me-1",title:"Stop",children:e.jsx("i",{className:"ti ti-player-stop"})}):e.jsx("button",{type:"button",onClick:()=>se(t.id,!0),disabled:K===t.id,className:"btn btn-sm btn-outline-success me-1",title:"Start",children:e.jsx("i",{className:"ti ti-player-play"})}),e.jsx("button",{type:"button",onClick:()=>{h(t.id),o("clone"),Z(""),te("main")},className:"btn btn-sm btn-outline-success me-1",title:"Git Deploy",children:e.jsx("i",{className:"ti ti-git-branch"})}),e.jsx("button",{type:"button",onClick:()=>Ne(t.id),className:"btn btn-sm btn-outline-secondary me-1",title:"Redirects",children:e.jsx("i",{className:"ti ti-arrows-right-left"})}),e.jsx("button",{type:"button",onClick:()=>fe(t.id),className:"btn btn-sm btn-outline-primary me-1",title:"Edit",children:e.jsx("i",{className:"ti ti-pencil"})}),e.jsx("button",{type:"button",onClick:()=>pe(t.id),className:"btn btn-sm btn-outline-primary me-1",title:"Backup",children:e.jsx("i",{className:"ti ti-archive"})}),e.jsx("button",{type:"button",onClick:()=>he(t.id,t.name),className:"btn btn-sm btn-outline-danger",title:"Delete",children:e.jsx("i",{className:"ti ti-trash"})})]})]},t.id))})]})})}),e.jsxs(a,{show:!!x&&!!v,onHide:()=>{h(null),o(null)},centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Git Deploy"})}),e.jsxs(a.Body,{children:[e.jsxs("div",{className:"btn-group mb-3",role:"group",children:[e.jsx("button",{type:"button",className:`btn btn-sm ${v==="clone"?"btn-success":"btn-outline-secondary"}`,onClick:()=>o("clone"),children:"Clone"}),e.jsx("button",{type:"button",className:`btn btn-sm ${v==="pull"?"btn-success":"btn-outline-secondary"}`,onClick:()=>o("pull"),children:"Pull"})]}),v==="clone"?e.jsxs("form",{onSubmit:ye,children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Repository URL"}),e.jsx("input",{value:F,onChange:t=>Z(t.target.value),placeholder:"https://github.com/user/repo.git",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Branch"}),e.jsx("input",{value:ee,onChange:t=>te(t.target.value),placeholder:"main",className:"form-control"})]}),e.jsx("p",{className:"small text-muted",children:"Site path must be empty for clone."}),e.jsxs("div",{className:"d-flex justify-content-end gap-2",children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>{h(null),o(null)},children:"Cancel"}),e.jsx("button",{type:"submit",disabled:S,className:"btn btn-success",children:S?"Cloning…":"Clone"})]})]}):e.jsxs("div",{children:[e.jsx("p",{className:"text-muted small",children:"Pull latest changes from the remote repository."}),e.jsxs("div",{className:"d-flex justify-content-end gap-2",children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>{h(null),o(null)},children:"Cancel"}),e.jsx("button",{type:"button",onClick:ke,disabled:S,className:"btn btn-success",children:S?"Pulling…":"Pull"})]})]})]})]}),e.jsxs(a,{show:m!=null,onHide:()=>P(null),size:"lg",centered:!0,scrollable:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Redirects"})}),e.jsxs(a.Body,{children:[e.jsxs("form",{onSubmit:ve,className:"row g-2 align-items-end mb-3",children:[e.jsxs("div",{className:"col-md-3",children:[e.jsx("label",{className:"form-label small",children:"Source"}),e.jsx("input",{value:E,onChange:t=>A(t.target.value),placeholder:"/old-path",className:"form-control form-control-sm"})]}),e.jsxs("div",{className:"col-md-3",children:[e.jsx("label",{className:"form-label small",children:"Target"}),e.jsx("input",{value:H,onChange:t=>D(t.target.value),placeholder:"/new-path",className:"form-control form-control-sm"})]}),e.jsxs("div",{className:"col-md-2",children:[e.jsx("label",{className:"form-label small",children:"Code"}),e.jsxs("select",{value:Q,onChange:t=>X(Number(t.target.value)),className:"form-select form-select-sm",children:[e.jsx("option",{value:301,children:"301"}),e.jsx("option",{value:302,children:"302"})]})]}),e.jsx("div",{className:"col-md-2",children:e.jsx("button",{type:"submit",disabled:me,className:"btn btn-primary btn-sm w-100",children:"Add"})})]}),O.length===0?e.jsx("p",{className:"text-muted small mb-0",children:"No redirects"}):e.jsx("ul",{className:"list-group list-group-flush",children:O.map(t=>e.jsxs("li",{className:"list-group-item d-flex align-items-center gap-2 small",children:[e.jsx("code",{className:"text-truncate",children:t.source}),e.jsx("span",{className:"text-muted",children:"→"}),e.jsx("code",{className:"text-truncate flex-grow-1",children:t.target}),e.jsx("span",{className:"badge bg-secondary",children:t.code}),e.jsx("button",{type:"button",className:"btn btn-sm btn-link text-danger p-0",onClick:()=>Se(t.id),children:e.jsx("i",{className:"ti ti-trash"})})]},t.id))})]}),e.jsx(a.Footer,{children:e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>P(null),children:"Close"})})]}),e.jsxs(a,{show:T!=null&&n!=null,onHide:()=>{N(null),c(null)},centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Edit Site"})}),n?e.jsxs("form",{onSubmit:ge,children:[e.jsxs(a.Body,{children:[V?e.jsx(k,{variant:"danger",children:V}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Domain(s)"}),e.jsx("input",{value:n.domains,onChange:t=>c({...n,domains:t.target.value}),type:"text",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Path (optional)"}),e.jsx("input",{value:n.path,onChange:t=>c({...n,path:t.target.value}),type:"text",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"PHP Version"}),e.jsxs("select",{value:n.php_version,onChange:t=>c({...n,php_version:t.target.value}),className:"form-select",children:[e.jsx("option",{value:"74",children:"7.4"}),e.jsx("option",{value:"80",children:"8.0"}),e.jsx("option",{value:"81",children:"8.1"}),e.jsx("option",{value:"82",children:"8.2"})]})]}),e.jsxs("div",{className:"form-check mb-3",children:[e.jsx("input",{type:"checkbox",id:"edit_force_https",className:"form-check-input",checked:n.force_https,onChange:t=>c({...n,force_https:t.target.checked})}),e.jsx("label",{htmlFor:"edit_force_https",className:"form-check-label",children:"Force HTTPS"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{value:n.ps,onChange:t=>c({...n,ps:t.target.value}),type:"text",className:"form-control"})]})]}),e.jsxs(a.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>{N(null),c(null)},children:"Cancel"}),e.jsx("button",{type:"submit",disabled:U,className:"btn btn-primary",children:U?"Saving…":"Save"})]})]}):null]}),e.jsxs(a,{show:r!=null,onHide:()=>f(null),size:"lg",centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Site Backup"})}),e.jsxs(a.Body,{children:[e.jsx("div",{className:"mb-3",children:e.jsxs(ce,{onClick:xe,disabled:_,children:[e.jsx("i",{className:"ti ti-archive me-1"}),_?"Creating…":"Create Backup"]})}),e.jsx("h6",{className:"text-muted small",children:"Existing backups"}),$.length===0?e.jsx("p",{className:"text-muted small",children:"No backups yet"}):e.jsx("ul",{className:"list-group list-group-flush",children:$.map(t=>e.jsxs("li",{className:"list-group-item d-flex align-items-center justify-content-between gap-2",children:[e.jsx("code",{className:"small text-truncate flex-grow-1",children:t.filename}),e.jsx("span",{className:"text-muted small",children:Ce(t.size)}),e.jsx("button",{type:"button",className:"btn btn-sm btn-link",onClick:()=>je(t.filename),title:"Download",children:e.jsx("i",{className:"ti ti-download"})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-link text-warning",onClick:()=>be(t.filename),disabled:_,children:e.jsx("i",{className:"ti ti-restore"})})]},t.filename))})]}),e.jsx(a.Footer,{children:e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>f(null),children:"Close"})})]})]})}export{et as SitePage}; diff --git a/YakPanel-server/frontend/dist/assets/SitePage-D5AOBBFP.js b/YakPanel-server/frontend/dist/assets/SitePage-D5AOBBFP.js new file mode 100644 index 00000000..e976e02c --- /dev/null +++ b/YakPanel-server/frontend/dist/assets/SitePage-D5AOBBFP.js @@ -0,0 +1 @@ +import{r as l,l as lt,j as e,L as ee,D as o,a as at,c as nt,s as it,b as ct,d as Pe,e as rt,f as te,h as Ee,i as ot,k as dt,m as mt,n as ht,o as ut,u as xt,p as pt,q as jt}from"./index-Cvh4tLHo.js";import{M as n}from"./Modal-CCihVZTY.js";import{A as F}from"./AdminAlert-Bt3L8_zJ.js";import{A as _}from"./AdminButton-BKglG8kI.js";import{A as bt}from"./AdminTable-BQ5Lf7EC.js";import{E as Te}from"./EmptyState-D6lCh4WN.js";import{P as se}from"./PageHeader-D6k34vvM.js";function gt(d){return{74:"7.4",80:"8.0",81:"8.1",82:"8.2"}[d]||d}function wt(){const[d,le]=l.useState([]),[Re,ae]=l.useState(!0),[P,c]=l.useState(""),[De,E]=l.useState(!1),[ne,ie]=l.useState(!1),[ce,M]=l.useState(""),[j,T]=l.useState(null),[re,$]=l.useState([]),[G,R]=l.useState(!1),[q,D]=l.useState(null),[i,m]=l.useState(null),[oe,de]=l.useState(!1),[me,C]=l.useState(""),[he,ue]=l.useState(null),[g,W]=l.useState(null),[xe,U]=l.useState([]),[O,V]=l.useState(""),[Q,K]=l.useState(""),[pe,je]=l.useState(301),[Ie,be]=l.useState(!1),[w,v]=l.useState(null),[J,ge]=l.useState(""),[fe,Ne]=l.useState("main"),[I,b]=l.useState(null),[L,H]=l.useState(!1),[B,Le]=l.useState(""),[h,A]=l.useState(()=>new Set),[f,z]=l.useState(1),[S,He]=l.useState(25),[ve,Se]=l.useState(null),[X,ye]=l.useState(!1),[ke,Ce]=l.useState(null),u=()=>{ae(!0),at().then(le).catch(t=>c(t.message)).finally(()=>ae(!1))};l.useEffect(()=>{u()},[]),l.useEffect(()=>{lt().then(t=>{const s=t.services.find(a=>a.id==="nginx");Se((s==null?void 0:s.status)??null)}).catch(()=>Se(null))},[]);const y=l.useMemo(()=>{const t=B.trim().toLowerCase();return t?d.filter(s=>[s.name,s.path,s.ps,s.primary_domain,...s.domains||[]].join(" ").toLowerCase().includes(t)):d},[d,B]);l.useEffect(()=>z(1),[B,S]);const k=Math.max(1,Math.ceil(y.length/S)),N=l.useMemo(()=>{const t=(f-1)*S;return y.slice(t,t+S)},[y,f,S]);l.useEffect(()=>{f>k&&z(k)},[f,k]);const Ae=t=>{A(s=>{const a=new Set(s);return a.has(t)?a.delete(t):a.add(t),a})},ze=()=>{const t=new Set(N.map(a=>a.id)),s=N.length>0&&N.every(a=>h.has(a.id));A(s?a=>{const r=new Set(a);return N.forEach(x=>r.delete(x.id)),r}:a=>new Set([...a,...t]))},Y=async t=>{const s=[...h];if(s.length===0)return;const a=t==="delete"?`Delete ${s.length} site(s)? This cannot be undone.`:`${t==="enable"?"Enable":"Disable"} ${s.length} site(s)?`;if(confirm(a)){ye(!0);try{const x=(await it(t,s)).results.filter(p=>!p.ok);x.length?c(x.map(p=>`${p.id}: ${p.msg}`).join("; ")):c(""),A(new Set),u()}catch(r){c(r instanceof Error?r.message:"Batch failed")}finally{ye(!1)}}},Fe=t=>{Ce(t),Pe(t).then(()=>u()).catch(s=>c(s.message)).finally(()=>Ce(null))},Me=t=>{var Be,_e;t.preventDefault();const s=t.currentTarget,a=s.elements.namedItem("name").value.trim(),r=s.elements.namedItem("domains").value.trim(),x=s.elements.namedItem("path").value.trim(),p=s.elements.namedItem("ps").value.trim();if(!a||!r){M("Name and domain(s) are required");return}const Z=r.split(/[\s,]+/).filter(Boolean),et=((Be=s.elements.namedItem("php_version"))==null?void 0:Be.value)||"74",tt=((_e=s.elements.namedItem("force_https"))==null?void 0:_e.checked)||!1;ie(!0),M(""),nt({name:a,domains:Z,path:x||void 0,ps:p||void 0,php_version:et,force_https:tt}).then(()=>{E(!1),s.reset(),u()}).catch(st=>M(st.message)).finally(()=>ie(!1))},$e=(t,s)=>{confirm(`Delete site "${s}"? This cannot be undone.`)&&ot(t).then(u).catch(a=>c(a.message))},Ge=t=>{T(t),$([]),Ee(t).then(s=>$(s.backups)).catch(s=>c(s.message))},qe=()=>{j&&(R(!0),Pe(j).then(()=>Ee(j).then(t=>$(t.backups))).catch(t=>c(t.message)).finally(()=>R(!1)))},We=t=>{!j||!confirm(`Restore from ${t}? This will overwrite existing files.`)||(R(!0),jt(j,t).then(()=>T(null)).catch(s=>c(s.message)).finally(()=>R(!1)))},Ue=t=>{j&&pt(j,t).catch(s=>c(s.message))},Oe=t=>{D(t),C(""),rt(t).then(s=>m({domains:(s.domains||[]).join(", "),path:s.path||"",ps:s.ps||"",php_version:s.php_version||"74",force_https:!!(s.force_https&&s.force_https!==0)})).catch(s=>C(s.message))},Ve=t=>{if(t.preventDefault(),!q||!i)return;const s=i.domains.split(/[\s,]+/).filter(Boolean);if(s.length===0){C("At least one domain is required");return}de(!0),C(""),xt(q,{domains:s,path:i.path||void 0,ps:i.ps||void 0,php_version:i.php_version,force_https:i.force_https}).then(()=>{D(null),m(null),u()}).catch(a=>C(a.message)).finally(()=>de(!1))},we=(t,s)=>{ue(t),ct(t,s).then(u).catch(a=>c(a.message)).finally(()=>ue(null))},Qe=t=>{W(t),V(""),K(""),je(301),te(t).then(U).catch(s=>c(s.message))},Ke=t=>{t.preventDefault(),!(!g||!O.trim()||!Q.trim())&&(be(!0),ht(g,O.trim(),Q.trim(),pe).then(()=>te(g).then(U)).then(()=>{V(""),K("")}).catch(s=>c(s.message)).finally(()=>be(!1)))},Je=t=>{g&&ut(g,t).then(()=>te(g).then(U)).catch(s=>c(s.message))},Xe=t=>{t.preventDefault(),!(!w||!J.trim())&&(H(!0),dt(w,J.trim(),fe.trim()||"main").then(()=>{v(null),b(null),u()}).catch(s=>c(s.message)).finally(()=>H(!1)))},Ye=()=>{w&&(H(!0),mt(w).then(()=>{v(null),b(null),u()}).catch(t=>c(t.message)).finally(()=>H(!1)))},Ze=t=>t<1024?t+" B":t<1024*1024?(t/1024).toFixed(1)+" KB":(t/1024/1024).toFixed(1)+" MB";return Re?e.jsxs(e.Fragment,{children:[e.jsx(se,{title:"Website"}),e.jsx("div",{className:"text-center py-5 text-muted",children:"Loading…"})]}):P&&!d.length?e.jsxs(e.Fragment,{children:[e.jsx(se,{title:"Website"}),e.jsx(F,{variant:"danger",children:P})]}):e.jsxs(e.Fragment,{children:[e.jsx(se,{title:"Website",actions:e.jsxs(_,{onClick:()=>E(!0),children:[e.jsx("i",{className:"ti ti-plus me-1"}),"Add Site"]})}),P?e.jsx(F,{variant:"warning",children:P}):null,e.jsxs(n,{show:De,onHide:()=>E(!1),centered:!0,children:[e.jsx(n.Header,{closeButton:!0,children:e.jsx(n.Title,{children:"Create Site"})}),e.jsxs("form",{onSubmit:Me,children:[e.jsxs(n.Body,{children:[ce?e.jsx(F,{variant:"danger",children:ce}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Site Name"}),e.jsx("input",{name:"name",type:"text",placeholder:"example.com",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Domain(s) (comma or space separated)"}),e.jsx("input",{name:"domains",type:"text",placeholder:"example.com www.example.com",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Path (optional)"}),e.jsx("input",{name:"path",type:"text",placeholder:"/www/wwwroot/example.com",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"PHP Version"}),e.jsxs("select",{name:"php_version",className:"form-select",children:[e.jsx("option",{value:"74",children:"7.4"}),e.jsx("option",{value:"80",children:"8.0"}),e.jsx("option",{value:"81",children:"8.1"}),e.jsx("option",{value:"82",children:"8.2"})]})]}),e.jsxs("div",{className:"form-check mb-3",children:[e.jsx("input",{name:"force_https",type:"checkbox",id:"create_force_https",className:"form-check-input"}),e.jsx("label",{htmlFor:"create_force_https",className:"form-check-label",children:"Force HTTPS (redirect HTTP to HTTPS)"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{name:"ps",type:"text",placeholder:"My website",className:"form-control"})]})]}),e.jsxs(n.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>E(!1),children:"Cancel"}),e.jsx("button",{type:"submit",disabled:ne,className:"btn btn-primary",children:ne?"Creating…":"Create"})]})]})]}),e.jsx("div",{className:"card shadow-sm border-0 mb-3",children:e.jsx("div",{className:"card-body py-3",children:e.jsxs("div",{className:"row g-2 align-items-center",children:[e.jsx("div",{className:"col-md-4",children:e.jsxs("div",{className:"input-group input-group-sm",children:[e.jsx("span",{className:"input-group-text",children:e.jsx("i",{className:"ti ti-search","aria-hidden":!0})}),e.jsx("input",{type:"search",className:"form-control",placeholder:"Site name, domain, path, or note…",value:B,onChange:t=>Le(t.target.value),"aria-label":"Search sites"})]})}),e.jsx("div",{className:"col-md-5",children:e.jsxs("div",{className:"d-flex flex-wrap gap-2 align-items-center",children:[e.jsx(_,{variant:"secondary",size:"sm",onClick:()=>Y("enable"),disabled:X||h.size===0,children:"Enable"}),e.jsx(_,{variant:"secondary",size:"sm",onClick:()=>Y("disable"),disabled:X||h.size===0,children:"Disable"}),e.jsx(_,{variant:"danger",size:"sm",onClick:()=>Y("delete"),disabled:X||h.size===0,children:"Delete"}),e.jsx("span",{className:"text-secondary small ms-md-2",children:h.size>0?`${h.size} selected`:""})]})}),e.jsxs("div",{className:"col-md-3 text-md-end",children:[e.jsxs("span",{className:`badge ${ve==="active"?"bg-success":"bg-secondary"} me-2`,title:"Nginx (systemd)",children:["Nginx ",ve??"—"]}),e.jsxs("select",{className:"form-select form-select-sm d-inline-block w-auto",value:S,onChange:t=>He(Number(t.target.value)),"aria-label":"Rows per page",children:[e.jsx("option",{value:10,children:"10 / page"}),e.jsx("option",{value:25,children:"25 / page"}),e.jsx("option",{value:50,children:"50 / page"})]})]})]})})}),e.jsxs("div",{className:"card shadow-sm border-0",children:[e.jsx("div",{className:"card-body p-0",children:e.jsxs(bt,{children:[e.jsx("thead",{className:"table-light",children:e.jsxs("tr",{children:[e.jsx("th",{style:{width:40},children:e.jsx("input",{type:"checkbox",className:"form-check-input",checked:N.length>0&&N.every(t=>h.has(t.id)),onChange:ze,"aria-label":"Select all on page"})}),e.jsx("th",{children:"Site"}),e.jsx("th",{className:"text-center",children:"Status"}),e.jsx("th",{children:"Backup"}),e.jsx("th",{className:"text-center",children:"Quick"}),e.jsx("th",{className:"text-center",children:"PHP"}),e.jsx("th",{children:"SSL"}),e.jsx("th",{className:"d-none d-xl-table-cell",children:"Note"}),e.jsx("th",{className:"text-end",children:"Operate"})]})}),e.jsx("tbody",{children:d.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:9,className:"p-0",children:e.jsx(Te,{title:"No sites yet",description:'Click "Add Site" to create one.'})})}):y.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:9,className:"p-0",children:e.jsx(Te,{title:"No matches",description:"Try a different search."})})}):N.map(t=>{var s,a,r,x,p;return e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",onClick:Z=>Z.stopPropagation(),children:e.jsx("input",{type:"checkbox",className:"form-check-input",checked:h.has(t.id),onChange:()=>Ae(t.id),"aria-label":`Select ${t.name}`})}),e.jsx("td",{className:"align-middle",children:e.jsxs("div",{className:"d-flex align-items-start gap-2",children:[t.primary_domain?e.jsx("a",{href:`https://${t.primary_domain.split(":")[0]}`,target:"_blank",rel:"noreferrer",className:"text-decoration-none",title:"Open site",children:e.jsx("i",{className:"ti ti-external-link text-muted","aria-hidden":!0})}):null,e.jsxs("div",{className:"small",children:[e.jsx("div",{className:"fw-medium",children:t.primary_domain||t.name}),e.jsxs("div",{className:"text-muted text-truncate",style:{maxWidth:220},title:t.path,children:[t.project_type," · ",t.path]})]})]})}),e.jsx("td",{className:"align-middle text-center",children:t.status===1?e.jsx("button",{type:"button",onClick:()=>we(t.id,!1),disabled:he===t.id,className:"btn btn-sm btn-link text-success p-0",title:"Running — click to stop",children:e.jsx("i",{className:"ti ti-player-play"})}):e.jsx("button",{type:"button",onClick:()=>we(t.id,!0),disabled:he===t.id,className:"btn btn-sm btn-link text-secondary p-0",title:"Stopped — click to start",children:e.jsx("i",{className:"ti ti-player-stop"})})}),e.jsxs("td",{className:"align-middle small",children:[e.jsx("span",{className:"me-2",children:t.backup_count}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-0 text-decoration-none",onClick:()=>Fe(t.id),disabled:ke===t.id,children:ke===t.id?"…":"Backup now"})]}),e.jsx("td",{className:"align-middle text-center text-nowrap",children:e.jsx(ee,{to:`/files?path=${encodeURIComponent(t.path)}`,className:"btn btn-sm btn-light border",title:"Site directory",children:e.jsx("i",{className:"ti ti-folder"})})}),e.jsx("td",{className:"align-middle text-center small",children:e.jsx("span",{className:"badge bg-light text-dark border",children:gt(t.php_version||"74")})}),e.jsx("td",{className:"align-middle small",children:(((s=t.ssl)==null?void 0:s.status)??"none")==="none"?e.jsx("span",{className:"text-warning",children:"Not set"}):((a=t.ssl)==null?void 0:a.status)==="expired"?e.jsx("span",{className:"text-danger",children:"Expired"}):((r=t.ssl)==null?void 0:r.status)==="expiring"?e.jsxs("span",{className:"text-warning",children:[((x=t.ssl)==null?void 0:x.days_left)??0,"d left"]}):e.jsxs("span",{className:"text-success",children:[((p=t.ssl)==null?void 0:p.days_left)??0," days"]})}),e.jsx("td",{className:"align-middle small text-muted d-none d-xl-table-cell text-truncate",style:{maxWidth:140},title:t.ps,children:t.ps||"—"}),e.jsx("td",{className:"align-middle text-end",children:e.jsxs(o,{align:"end",children:[e.jsx(o.Toggle,{variant:"light",size:"sm",className:"py-0 border",children:"More"}),e.jsxs(o.Menu,{children:[e.jsxs(o.Item,{onClick:()=>Oe(t.id),children:[e.jsx("i",{className:"ti ti-settings me-2"}),"Config"]}),e.jsxs(o.Item,{as:ee,to:"/logs",children:[e.jsx("i",{className:"ti ti-file-text me-2"}),"Logs"]}),e.jsxs(o.Item,{as:ee,to:"/ssl_domain",children:[e.jsx("i",{className:"ti ti-shield-lock me-2"}),"SSL / Domains"]}),e.jsx(o.Divider,{}),e.jsxs(o.Item,{onClick:()=>{v(t.id),b("clone"),ge(""),Ne("main")},children:[e.jsx("i",{className:"ti ti-git-branch me-2"}),"Git"]}),e.jsxs(o.Item,{onClick:()=>Qe(t.id),children:[e.jsx("i",{className:"ti ti-arrows-right-left me-2"}),"Redirects"]}),e.jsxs(o.Item,{onClick:()=>Ge(t.id),children:[e.jsx("i",{className:"ti ti-archive me-2"}),"Backups"]}),e.jsx(o.Divider,{}),e.jsxs(o.Item,{className:"text-danger",onClick:()=>$e(t.id,t.name),children:[e.jsx("i",{className:"ti ti-trash me-2"}),"Delete"]})]})]})})]},t.id)})})]})}),d.length>0&&y.length>0?e.jsxs("div",{className:"card-footer py-2 d-flex flex-wrap align-items-center justify-content-between gap-2 small text-secondary",children:[e.jsxs("span",{children:["Total ",e.jsx("strong",{children:y.length})," site(s)",B.trim()?` (filtered from ${d.length})`:""]}),e.jsxs("div",{className:"d-flex align-items-center gap-2",children:[e.jsx("button",{type:"button",className:"btn btn-sm btn-outline-secondary",disabled:f<=1,onClick:()=>z(t=>Math.max(1,t-1)),children:"Prev"}),e.jsxs("span",{children:["Page ",f," / ",k]}),e.jsx("button",{type:"button",className:"btn btn-sm btn-outline-secondary",disabled:f>=k,onClick:()=>z(t=>Math.min(k,t+1)),children:"Next"})]})]}):null]}),e.jsxs(n,{show:!!w&&!!I,onHide:()=>{v(null),b(null)},centered:!0,children:[e.jsx(n.Header,{closeButton:!0,children:e.jsx(n.Title,{children:"Git Deploy"})}),e.jsxs(n.Body,{children:[e.jsxs("div",{className:"btn-group mb-3",role:"group",children:[e.jsx("button",{type:"button",className:`btn btn-sm ${I==="clone"?"btn-success":"btn-outline-secondary"}`,onClick:()=>b("clone"),children:"Clone"}),e.jsx("button",{type:"button",className:`btn btn-sm ${I==="pull"?"btn-success":"btn-outline-secondary"}`,onClick:()=>b("pull"),children:"Pull"})]}),I==="clone"?e.jsxs("form",{onSubmit:Xe,children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Repository URL"}),e.jsx("input",{value:J,onChange:t=>ge(t.target.value),placeholder:"https://github.com/user/repo.git",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Branch"}),e.jsx("input",{value:fe,onChange:t=>Ne(t.target.value),placeholder:"main",className:"form-control"})]}),e.jsx("p",{className:"small text-muted",children:"Site path must be empty for clone."}),e.jsxs("div",{className:"d-flex justify-content-end gap-2",children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>{v(null),b(null)},children:"Cancel"}),e.jsx("button",{type:"submit",disabled:L,className:"btn btn-success",children:L?"Cloning…":"Clone"})]})]}):e.jsxs("div",{children:[e.jsx("p",{className:"text-muted small",children:"Pull latest changes from the remote repository."}),e.jsxs("div",{className:"d-flex justify-content-end gap-2",children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>{v(null),b(null)},children:"Cancel"}),e.jsx("button",{type:"button",onClick:Ye,disabled:L,className:"btn btn-success",children:L?"Pulling…":"Pull"})]})]})]})]}),e.jsxs(n,{show:g!=null,onHide:()=>W(null),size:"lg",centered:!0,scrollable:!0,children:[e.jsx(n.Header,{closeButton:!0,children:e.jsx(n.Title,{children:"Redirects"})}),e.jsxs(n.Body,{children:[e.jsxs("form",{onSubmit:Ke,className:"row g-2 align-items-end mb-3",children:[e.jsxs("div",{className:"col-md-3",children:[e.jsx("label",{className:"form-label small",children:"Source"}),e.jsx("input",{value:O,onChange:t=>V(t.target.value),placeholder:"/old-path",className:"form-control form-control-sm"})]}),e.jsxs("div",{className:"col-md-3",children:[e.jsx("label",{className:"form-label small",children:"Target"}),e.jsx("input",{value:Q,onChange:t=>K(t.target.value),placeholder:"/new-path",className:"form-control form-control-sm"})]}),e.jsxs("div",{className:"col-md-2",children:[e.jsx("label",{className:"form-label small",children:"Code"}),e.jsxs("select",{value:pe,onChange:t=>je(Number(t.target.value)),className:"form-select form-select-sm",children:[e.jsx("option",{value:301,children:"301"}),e.jsx("option",{value:302,children:"302"})]})]}),e.jsx("div",{className:"col-md-2",children:e.jsx("button",{type:"submit",disabled:Ie,className:"btn btn-primary btn-sm w-100",children:"Add"})})]}),xe.length===0?e.jsx("p",{className:"text-muted small mb-0",children:"No redirects"}):e.jsx("ul",{className:"list-group list-group-flush",children:xe.map(t=>e.jsxs("li",{className:"list-group-item d-flex align-items-center gap-2 small",children:[e.jsx("code",{className:"text-truncate",children:t.source}),e.jsx("span",{className:"text-muted",children:"→"}),e.jsx("code",{className:"text-truncate flex-grow-1",children:t.target}),e.jsx("span",{className:"badge bg-secondary",children:t.code}),e.jsx("button",{type:"button",className:"btn btn-sm btn-link text-danger p-0",onClick:()=>Je(t.id),children:e.jsx("i",{className:"ti ti-trash"})})]},t.id))})]}),e.jsx(n.Footer,{children:e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>W(null),children:"Close"})})]}),e.jsxs(n,{show:q!=null&&i!=null,onHide:()=>{D(null),m(null)},centered:!0,children:[e.jsx(n.Header,{closeButton:!0,children:e.jsx(n.Title,{children:"Edit Site"})}),i?e.jsxs("form",{onSubmit:Ve,children:[e.jsxs(n.Body,{children:[me?e.jsx(F,{variant:"danger",children:me}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Domain(s)"}),e.jsx("input",{value:i.domains,onChange:t=>m({...i,domains:t.target.value}),type:"text",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Path (optional)"}),e.jsx("input",{value:i.path,onChange:t=>m({...i,path:t.target.value}),type:"text",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"PHP Version"}),e.jsxs("select",{value:i.php_version,onChange:t=>m({...i,php_version:t.target.value}),className:"form-select",children:[e.jsx("option",{value:"74",children:"7.4"}),e.jsx("option",{value:"80",children:"8.0"}),e.jsx("option",{value:"81",children:"8.1"}),e.jsx("option",{value:"82",children:"8.2"})]})]}),e.jsxs("div",{className:"form-check mb-3",children:[e.jsx("input",{type:"checkbox",id:"edit_force_https",className:"form-check-input",checked:i.force_https,onChange:t=>m({...i,force_https:t.target.checked})}),e.jsx("label",{htmlFor:"edit_force_https",className:"form-check-label",children:"Force HTTPS"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{value:i.ps,onChange:t=>m({...i,ps:t.target.value}),type:"text",className:"form-control"})]})]}),e.jsxs(n.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>{D(null),m(null)},children:"Cancel"}),e.jsx("button",{type:"submit",disabled:oe,className:"btn btn-primary",children:oe?"Saving…":"Save"})]})]}):null]}),e.jsxs(n,{show:j!=null,onHide:()=>T(null),size:"lg",centered:!0,children:[e.jsx(n.Header,{closeButton:!0,children:e.jsx(n.Title,{children:"Site Backup"})}),e.jsxs(n.Body,{children:[e.jsx("div",{className:"mb-3",children:e.jsxs(_,{onClick:qe,disabled:G,children:[e.jsx("i",{className:"ti ti-archive me-1"}),G?"Creating…":"Create Backup"]})}),e.jsx("h6",{className:"text-muted small",children:"Existing backups"}),re.length===0?e.jsx("p",{className:"text-muted small",children:"No backups yet"}):e.jsx("ul",{className:"list-group list-group-flush",children:re.map(t=>e.jsxs("li",{className:"list-group-item d-flex align-items-center justify-content-between gap-2",children:[e.jsx("code",{className:"small text-truncate flex-grow-1",children:t.filename}),e.jsx("span",{className:"text-muted small",children:Ze(t.size)}),e.jsx("button",{type:"button",className:"btn btn-sm btn-link",onClick:()=>Ue(t.filename),title:"Download",children:e.jsx("i",{className:"ti ti-download"})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-link text-warning",onClick:()=>We(t.filename),disabled:G,children:e.jsx("i",{className:"ti ti-restore"})})]},t.filename))})]}),e.jsx(n.Footer,{children:e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>T(null),children:"Close"})})]})]})}export{wt as SitePage}; diff --git a/YakPanel-server/frontend/dist/assets/SoftPage-B7PtFv7I.js b/YakPanel-server/frontend/dist/assets/SoftPage-BLM9zKf0.js similarity index 93% rename from YakPanel-server/frontend/dist/assets/SoftPage-B7PtFv7I.js rename to YakPanel-server/frontend/dist/assets/SoftPage-BLM9zKf0.js index 937a6a51..27d9bc8f 100644 --- a/YakPanel-server/frontend/dist/assets/SoftPage-B7PtFv7I.js +++ b/YakPanel-server/frontend/dist/assets/SoftPage-BLM9zKf0.js @@ -1 +1 @@ -import{r as t,j as e,a as c}from"./index-CRR9sQ49.js";import{A as b}from"./AdminAlert-DW1IRWce.js";import{A as v}from"./AdminButton-Bd2cLTu3.js";import{P as m}from"./PageHeader-BcjNf7GG.js";function A(){const[x,u]=t.useState([]),[p,d]=t.useState(!0),[o,a]=t.useState(""),[n,l]=t.useState(null),[f,h]=t.useState(""),r=()=>{d(!0),c("/soft/list").then(s=>{u(s.software||[]),h(s.package_manager||"")}).catch(s=>a(s.message)).finally(()=>d(!1))};t.useEffect(()=>{r()},[]);const j=s=>{l(s),a(""),c(`/soft/install/${s}`,{method:"POST"}).then(()=>r()).catch(i=>a(i.message)).finally(()=>l(null))},g=(s,i)=>{confirm(`Uninstall ${i}?`)&&(l(s),a(""),c(`/soft/uninstall/${s}`,{method:"POST"}).then(()=>r()).catch(N=>a(N.message)).finally(()=>l(null)))};return p?e.jsxs(e.Fragment,{children:[e.jsx(m,{title:"App Store"}),e.jsx("div",{className:"d-flex justify-content-center py-5",children:e.jsx("div",{className:"spinner-border text-primary",role:"status",children:e.jsx("span",{className:"visually-hidden",children:"Loading…"})})})]}):e.jsxs(e.Fragment,{children:[e.jsx(m,{title:"App Store",actions:e.jsxs(v,{variant:"secondary",onClick:r,children:[e.jsx("i",{className:"ti ti-refresh me-1"}),"Refresh"]})}),o?e.jsx(b,{variant:"danger",children:o}):null,e.jsxs("div",{className:"alert alert-warning",role:"note",children:["Installs use your server package manager (",f||"unknown","). Panel must run as root (or equivalent). Supported: apt, dnf/yum/microdnf, apk."]}),e.jsx("div",{className:"row g-3",children:x.map(s=>e.jsx("div",{className:"col-md-6 col-xl-4 d-flex",children:e.jsx("div",{className:"card flex-fill shadow-sm",children:e.jsxs("div",{className:"card-body d-flex flex-column",children:[e.jsxs("div",{className:"d-flex align-items-start justify-content-between gap-2 mb-2",children:[e.jsxs("div",{className:"d-flex align-items-start gap-2",children:[e.jsx("span",{className:"avatar avatar-md bg-primary-transparent text-primary rounded flex-shrink-0",children:e.jsx("i",{className:"ti ti-package fs-5","aria-hidden":!0})}),e.jsxs("div",{children:[e.jsx("h5",{className:"card-title mb-1",children:s.name}),e.jsx("p",{className:"text-muted small mb-0",children:s.desc})]})]}),s.installed?e.jsxs("span",{className:"text-success small text-nowrap",children:[e.jsx("i",{className:"ti ti-circle-check me-1"}),s.version||"Installed"]}):e.jsxs("span",{className:"text-muted small text-nowrap",children:[e.jsx("i",{className:"ti ti-x me-1"}),"Not installed"]})]}),e.jsx("div",{className:"mt-auto pt-3",children:s.installed?e.jsxs("button",{type:"button",onClick:()=>g(s.id,s.name),disabled:n===s.id,className:"btn btn-outline-danger btn-sm w-100 d-inline-flex align-items-center justify-content-center gap-2",children:[n===s.id?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null,"Uninstall"]}):e.jsxs("button",{type:"button",onClick:()=>j(s.id),disabled:n===s.id,className:"btn btn-primary btn-sm w-100 d-inline-flex align-items-center justify-content-center gap-2",children:[n===s.id?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null,"Install"]})})]})})},s.id))})]})}export{A as SoftPage}; +import{r as t,j as e,M as c}from"./index-Cvh4tLHo.js";import{A as b}from"./AdminAlert-Bt3L8_zJ.js";import{A as v}from"./AdminButton-BKglG8kI.js";import{P as m}from"./PageHeader-D6k34vvM.js";function A(){const[x,u]=t.useState([]),[p,d]=t.useState(!0),[o,a]=t.useState(""),[n,l]=t.useState(null),[f,h]=t.useState(""),r=()=>{d(!0),c("/soft/list").then(s=>{u(s.software||[]),h(s.package_manager||"")}).catch(s=>a(s.message)).finally(()=>d(!1))};t.useEffect(()=>{r()},[]);const j=s=>{l(s),a(""),c(`/soft/install/${s}`,{method:"POST"}).then(()=>r()).catch(i=>a(i.message)).finally(()=>l(null))},g=(s,i)=>{confirm(`Uninstall ${i}?`)&&(l(s),a(""),c(`/soft/uninstall/${s}`,{method:"POST"}).then(()=>r()).catch(N=>a(N.message)).finally(()=>l(null)))};return p?e.jsxs(e.Fragment,{children:[e.jsx(m,{title:"App Store"}),e.jsx("div",{className:"d-flex justify-content-center py-5",children:e.jsx("div",{className:"spinner-border text-primary",role:"status",children:e.jsx("span",{className:"visually-hidden",children:"Loading…"})})})]}):e.jsxs(e.Fragment,{children:[e.jsx(m,{title:"App Store",actions:e.jsxs(v,{variant:"secondary",onClick:r,children:[e.jsx("i",{className:"ti ti-refresh me-1"}),"Refresh"]})}),o?e.jsx(b,{variant:"danger",children:o}):null,e.jsxs("div",{className:"alert alert-warning",role:"note",children:["Installs use your server package manager (",f||"unknown","). Panel must run as root (or equivalent). Supported: apt, dnf/yum/microdnf, apk."]}),e.jsx("div",{className:"row g-3",children:x.map(s=>e.jsx("div",{className:"col-md-6 col-xl-4 d-flex",children:e.jsx("div",{className:"card flex-fill shadow-sm",children:e.jsxs("div",{className:"card-body d-flex flex-column",children:[e.jsxs("div",{className:"d-flex align-items-start justify-content-between gap-2 mb-2",children:[e.jsxs("div",{className:"d-flex align-items-start gap-2",children:[e.jsx("span",{className:"avatar avatar-md bg-primary-transparent text-primary rounded flex-shrink-0",children:e.jsx("i",{className:"ti ti-package fs-5","aria-hidden":!0})}),e.jsxs("div",{children:[e.jsx("h5",{className:"card-title mb-1",children:s.name}),e.jsx("p",{className:"text-muted small mb-0",children:s.desc})]})]}),s.installed?e.jsxs("span",{className:"text-success small text-nowrap",children:[e.jsx("i",{className:"ti ti-circle-check me-1"}),s.version||"Installed"]}):e.jsxs("span",{className:"text-muted small text-nowrap",children:[e.jsx("i",{className:"ti ti-x me-1"}),"Not installed"]})]}),e.jsx("div",{className:"mt-auto pt-3",children:s.installed?e.jsxs("button",{type:"button",onClick:()=>g(s.id,s.name),disabled:n===s.id,className:"btn btn-outline-danger btn-sm w-100 d-inline-flex align-items-center justify-content-center gap-2",children:[n===s.id?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null,"Uninstall"]}):e.jsxs("button",{type:"button",onClick:()=>j(s.id),disabled:n===s.id,className:"btn btn-primary btn-sm w-100 d-inline-flex align-items-center justify-content-center gap-2",children:[n===s.id?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null,"Install"]})})]})})},s.id))})]})}export{A as SoftPage}; diff --git a/YakPanel-server/frontend/dist/assets/TerminalPage-CXXB09nH.js b/YakPanel-server/frontend/dist/assets/TerminalPage-CgU22s_8.js similarity index 99% rename from YakPanel-server/frontend/dist/assets/TerminalPage-CXXB09nH.js rename to YakPanel-server/frontend/dist/assets/TerminalPage-CgU22s_8.js index 5a280b0b..a4fc8879 100644 --- a/YakPanel-server/frontend/dist/assets/TerminalPage-CXXB09nH.js +++ b/YakPanel-server/frontend/dist/assets/TerminalPage-CgU22s_8.js @@ -1,4 +1,4 @@ -import{r as pe,j as he}from"./index-CRR9sQ49.js";import{P as be}from"./PageHeader-BcjNf7GG.js";var ge={exports:{}};(function(ie,le){(function(Q,X){ie.exports=X()})(self,()=>(()=>{var Q={4567:function(M,r,o){var c=this&&this.__decorate||function(i,a,l,v){var m,h=arguments.length,p=h<3?a:v===null?v=Object.getOwnPropertyDescriptor(a,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,a,l,v);else for(var b=i.length-1;b>=0;b--)(m=i[b])&&(p=(h<3?m(p):h>3?m(a,l,p):m(a,l))||p);return h>3&&p&&Object.defineProperty(a,l,p),p},_=this&&this.__param||function(i,a){return function(l,v){a(l,v,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=o(9042),d=o(6114),f=o(9924),g=o(844),u=o(5596),e=o(4725),s=o(3656);let t=r.AccessibilityManager=class extends g.Disposable{constructor(i,a){super(),this._terminal=i,this._renderService=a,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let l=0;lthis._handleBoundaryFocus(l,0),this._bottomBoundaryFocusListener=l=>this._handleBoundaryFocus(l,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new f.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(l=>this._handleResize(l.rows))),this.register(this._terminal.onRender(l=>this._refreshRows(l.start,l.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(l=>this._handleChar(l))),this.register(this._terminal.onLineFeed(()=>this._handleChar(` +import{r as pe,j as he}from"./index-Cvh4tLHo.js";import{P as be}from"./PageHeader-D6k34vvM.js";var ge={exports:{}};(function(ie,le){(function(Q,X){ie.exports=X()})(self,()=>(()=>{var Q={4567:function(M,r,o){var c=this&&this.__decorate||function(i,a,l,v){var m,h=arguments.length,p=h<3?a:v===null?v=Object.getOwnPropertyDescriptor(a,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,a,l,v);else for(var b=i.length-1;b>=0;b--)(m=i[b])&&(p=(h<3?m(p):h>3?m(a,l,p):m(a,l))||p);return h>3&&p&&Object.defineProperty(a,l,p),p},_=this&&this.__param||function(i,a){return function(l,v){a(l,v,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=o(9042),d=o(6114),f=o(9924),g=o(844),u=o(5596),e=o(4725),s=o(3656);let t=r.AccessibilityManager=class extends g.Disposable{constructor(i,a){super(),this._terminal=i,this._renderService=a,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let l=0;lthis._handleBoundaryFocus(l,0),this._bottomBoundaryFocusListener=l=>this._handleBoundaryFocus(l,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new f.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(l=>this._handleResize(l.rows))),this.register(this._terminal.onRender(l=>this._refreshRows(l.start,l.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(l=>this._handleChar(l))),this.register(this._terminal.onLineFeed(()=>this._handleChar(` `))),this.register(this._terminal.onA11yTab(l=>this._handleTab(l))),this.register(this._terminal.onKey(l=>this._handleKey(l.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new u.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,s.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,g.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(i){for(let a=0;a0?this._charsToConsume.shift()!==i&&(this._charsToAnnounce+=i):this._charsToAnnounce+=i,i===` `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)),d.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityContainer.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,d.isMac&&this._liveRegion.remove()}_handleKey(i){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(i)||this._charsToConsume.push(i)}_refreshRows(i,a){this._liveRegionDebouncer.refresh(i,a,this._terminal.rows)}_renderRows(i,a){const l=this._terminal.buffer,v=l.lines.length.toString();for(let m=i;m<=a;m++){const h=l.translateBufferLineToString(l.ydisp+m,!0),p=(l.ydisp+m+1).toString(),b=this._rowElements[m];b&&(h.length===0?b.innerText=" ":b.textContent=h,b.setAttribute("aria-posinset",p),b.setAttribute("aria-setsize",v))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(i,a){const l=i.target,v=this._rowElements[a===0?1:this._rowElements.length-2];if(l.getAttribute("aria-posinset")===(a===0?"1":`${this._terminal.buffer.lines.length}`)||i.relatedTarget!==v)return;let m,h;if(a===0?(m=l,h=this._rowElements.pop(),this._rowContainer.removeChild(h)):(m=this._rowElements.shift(),h=l,this._rowContainer.removeChild(m)),m.removeEventListener("focus",this._topBoundaryFocusListener),h.removeEventListener("focus",this._bottomBoundaryFocusListener),a===0){const p=this._createAccessibilityTreeNode();this._rowElements.unshift(p),this._rowContainer.insertAdjacentElement("afterbegin",p)}else{const p=this._createAccessibilityTreeNode();this._rowElements.push(p),this._rowContainer.appendChild(p)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(a===0?-1:1),this._rowElements[a===0?1:this._rowElements.length-2].focus(),i.preventDefault(),i.stopImmediatePropagation()}_handleResize(i){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let a=this._rowContainer.children.length;ai;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const i=document.createElement("div");return i.setAttribute("role","listitem"),i.tabIndex=-1,this._refreshRowDimensions(i),i}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let i=0;i{function o(d){return d.replace(/\r?\n/g,"\r")}function c(d,f){return f?"\x1B[200~"+d+"\x1B[201~":d}function _(d,f,g,u){d=c(d=o(d),g.decPrivateModes.bracketedPasteMode&&u.rawOptions.ignoreBracketedPasteMode!==!0),g.triggerDataEvent(d,!0),f.value=""}function n(d,f,g){const u=g.getBoundingClientRect(),e=d.clientX-u.left-10,s=d.clientY-u.top-10;f.style.width="20px",f.style.height="20px",f.style.left=`${e}px`,f.style.top=`${s}px`,f.style.zIndex="1000",f.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=o,r.bracketTextForPaste=c,r.copyHandler=function(d,f){d.clipboardData&&d.clipboardData.setData("text/plain",f.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,f,g,u){d.stopPropagation(),d.clipboardData&&_(d.clipboardData.getData("text/plain"),f,g,u)},r.paste=_,r.moveTextAreaUnderMouseCursor=n,r.rightClickHandler=function(d,f,g,u,e){n(d,f,g),e&&u.rightClickSelect(d),f.value=u.selectionText,f.select()}},7239:(M,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const c=o(1505);r.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(_,n,d){this._css.set(_,n,d)}getCss(_,n){return this._css.get(_,n)}setColor(_,n,d){this._color.set(_,n,d)}getColor(_,n){return this._color.get(_,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(M,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(o,c,_,n){o.addEventListener(c,_,n);let d=!1;return{dispose:()=>{d||(d=!0,o.removeEventListener(c,_,n))}}}},6465:function(M,r,o){var c=this&&this.__decorate||function(e,s,t,i){var a,l=arguments.length,v=l<3?s:i===null?i=Object.getOwnPropertyDescriptor(s,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,t,i);else for(var m=e.length-1;m>=0;m--)(a=e[m])&&(v=(l<3?a(v):l>3?a(s,t,v):a(s,t))||v);return l>3&&v&&Object.defineProperty(s,t,v),v},_=this&&this.__param||function(e,s){return function(t,i){s(t,i,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier2=void 0;const n=o(3656),d=o(8460),f=o(844),g=o(2585);let u=r.Linkifier2=class extends f.Disposable{get currentLink(){return this._currentLink}constructor(e){super(),this._bufferService=e,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new d.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new d.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,f.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,f.toDisposable)(()=>{this._lastMouseEvent=void 0})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0}))}registerLinkProvider(e){return this._linkProviders.push(e),{dispose:()=>{const s=this._linkProviders.indexOf(e);s!==-1&&this._linkProviders.splice(s,1)}}}attachToDom(e,s,t){this._element=e,this._mouseService=s,this._renderService=t,this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(e){if(this._lastMouseEvent=e,!this._element||!this._mouseService)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;const t=e.composedPath();for(let i=0;i{l==null||l.forEach(v=>{v.link.dispose&&v.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let a=!1;for(const[l,v]of this._linkProviders.entries())s?!((i=this._activeProviderReplies)===null||i===void 0)&&i.get(l)&&(a=this._checkLinkProviderResult(l,e,a)):v.provideLinks(e.y,m=>{var h,p;if(this._isMouseOut)return;const b=m==null?void 0:m.map(L=>({link:L}));(h=this._activeProviderReplies)===null||h===void 0||h.set(l,b),a=this._checkLinkProviderResult(l,e,a),((p=this._activeProviderReplies)===null||p===void 0?void 0:p.size)===this._linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,s){const t=new Set;for(let i=0;ie?this._bufferService.cols:v.link.range.end.x;for(let p=m;p<=h;p++){if(t.has(p)){a.splice(l--,1);break}t.add(p)}}}}_checkLinkProviderResult(e,s,t){var i;if(!this._activeProviderReplies)return t;const a=this._activeProviderReplies.get(e);let l=!1;for(let v=0;vthis._linkAtPosition(m.link,s));v&&(t=!0,this._handleNewLink(v))}if(this._activeProviderReplies.size===this._linkProviders.length&&!t)for(let v=0;vthis._linkAtPosition(h.link,s));if(m){t=!0,this._handleNewLink(m);break}}return t}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._element||!this._mouseService||!this._currentLink)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);s&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,s){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!s||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=s)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,f.disposeArray)(this._linkCacheDisposables))}_handleNewLink(e){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(e.link,s)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.pointerCursor},set:t=>{var i,a;!((i=this._currentLink)===null||i===void 0)&&i.state&&this._currentLink.state.decorations.pointerCursor!==t&&(this._currentLink.state.decorations.pointerCursor=t,this._currentLink.state.isHovered&&((a=this._element)===null||a===void 0||a.classList.toggle("xterm-cursor-pointer",t)))}},underline:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.underline},set:t=>{var i,a,l;!((i=this._currentLink)===null||i===void 0)&&i.state&&((l=(a=this._currentLink)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.decorations.underline)!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(t=>{if(!this._currentLink)return;const i=t.start===0?0:t.start+1+this._bufferService.buffer.ydisp,a=this._bufferService.buffer.ydisp+1+t.end;if(this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=a&&(this._clearCurrentLink(i,a),this._lastMouseEvent&&this._element)){const l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._askForLink(l,!1)}})))}_linkHover(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(t,s.text)}_fireUnderlineEvent(e,s){const t=e.range,i=this._bufferService.buffer.ydisp,a=this._createLinkUnderlineEvent(t.start.x-1,t.start.y-i-1,t.end.x,t.end.y-i-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(a)}_linkLeave(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(t,s.text)}_linkAtPosition(e,s){const t=e.range.start.y*this._bufferService.cols+e.range.start.x,i=e.range.end.y*this._bufferService.cols+e.range.end.x,a=s.y*this._bufferService.cols+s.x;return t<=a&&a<=i}_positionFromMouseEvent(e,s,t){const i=t.getCoords(e,s,this._bufferService.cols,this._bufferService.rows);if(i)return{x:i[0],y:i[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,s,t,i,a){return{x1:e,y1:s,x2:t,y2:i,cols:this._bufferService.cols,fg:a}}};r.Linkifier2=u=c([_(0,g.IBufferService)],u)},9042:(M,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(M,r,o){var c=this&&this.__decorate||function(u,e,s,t){var i,a=arguments.length,l=a<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,s):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(u,e,s,t);else for(var v=u.length-1;v>=0;v--)(i=u[v])&&(l=(a<3?i(l):a>3?i(e,s,l):i(e,s))||l);return a>3&&l&&Object.defineProperty(e,s,l),l},_=this&&this.__param||function(u,e){return function(s,t){e(s,t,u)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;const n=o(511),d=o(2585);let f=r.OscLinkProvider=class{constructor(u,e,s){this._bufferService=u,this._optionsService=e,this._oscLinkService=s}provideLinks(u,e){var s;const t=this._bufferService.buffer.lines.get(u-1);if(!t)return void e(void 0);const i=[],a=this._optionsService.rawOptions.linkHandler,l=new n.CellData,v=t.getTrimmedLength();let m=-1,h=-1,p=!1;for(let b=0;ba?a.activate(x,T,y):g(0,T),hover:(x,T)=>{var P;return(P=a==null?void 0:a.hover)===null||P===void 0?void 0:P.call(a,x,T,y)},leave:(x,T)=>{var P;return(P=a==null?void 0:a.leave)===null||P===void 0?void 0:P.call(a,x,T,y)}})}p=!1,l.hasExtendedAttrs()&&l.extended.urlId?(h=b,m=l.extended.urlId):(h=-1,m=-1)}}e(i)}};function g(u,e){if(confirm(`Do you want to navigate to ${e}? diff --git a/YakPanel-server/frontend/dist/assets/UsersPage-DqvygXkC.js b/YakPanel-server/frontend/dist/assets/UsersPage-Skle3SPM.js similarity index 91% rename from YakPanel-server/frontend/dist/assets/UsersPage-DqvygXkC.js rename to YakPanel-server/frontend/dist/assets/UsersPage-Skle3SPM.js index 30918cf9..315450c6 100644 --- a/YakPanel-server/frontend/dist/assets/UsersPage-DqvygXkC.js +++ b/YakPanel-server/frontend/dist/assets/UsersPage-Skle3SPM.js @@ -1 +1 @@ -import{r as a,j as e,a6 as I,a as _,a7 as D,a8 as P,a9 as L}from"./index-CRR9sQ49.js";import{M as n}from"./Modal-B7V4w_St.js";import{A as b}from"./AdminAlert-DW1IRWce.js";import{A as o}from"./AdminButton-Bd2cLTu3.js";import{A as T}from"./AdminTable-BLiLxfnS.js";import{P as g}from"./PageHeader-BcjNf7GG.js";function $(){const[h,v]=a.useState([]),[N,x]=a.useState(!0),[u,d]=a.useState(""),[y,l]=a.useState(!1),[j,p]=a.useState(!1),[f,i]=a.useState(""),[U,A]=a.useState(null),c=()=>{x(!0),I().then(s=>{v(s),_("/auth/me").then(t=>A(t.id))}).catch(s=>d(s.message)).finally(()=>x(!1))};a.useEffect(()=>{c()},[]);const C=s=>{s.preventDefault();const t=s.currentTarget,r=t.elements.namedItem("username").value.trim(),m=t.elements.namedItem("password").value,E=t.elements.namedItem("email").value.trim();if(!r||r.length<2){i("Username must be at least 2 characters");return}if(!m||m.length<6){i("Password must be at least 6 characters");return}p(!0),i(""),L({username:r,password:m,email:E}).then(()=>{l(!1),t.reset(),c()}).catch(k=>i(k.message)).finally(()=>p(!1))},w=(s,t)=>{confirm(`Delete user "${t}"?`)&&P(s).then(c).catch(r=>d(r.message))},S=s=>{D(s).then(c).catch(t=>d(t.message))};return N&&h.length===0?e.jsxs(e.Fragment,{children:[e.jsx(g,{title:"Users"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(g,{title:"Users",actions:e.jsxs(o,{variant:"primary",onClick:()=>l(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add User"]})}),u?e.jsx(b,{className:"mb-3",children:u}):null,e.jsx("div",{className:"card",children:e.jsxs(T,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Username"}),e.jsx("th",{children:"Email"}),e.jsx("th",{children:"Status"}),e.jsx("th",{children:"Role"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:h.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:s.username}),e.jsx("td",{children:s.email||"—"}),e.jsx("td",{children:e.jsx("span",{className:s.is_active?"text-success":"text-secondary",children:s.is_active?"Active":"Inactive"})}),e.jsx("td",{children:s.is_superuser?"Admin":"User"}),e.jsx("td",{className:"text-end",children:s.id!==U?e.jsxs("span",{className:"d-inline-flex gap-1 justify-content-end",children:[e.jsx("button",{type:"button",className:`btn btn-link btn-sm p-1 ${s.is_active?"text-warning":"text-success"}`,title:s.is_active?"Deactivate":"Activate",onClick:()=>S(s.id),children:e.jsx("i",{className:s.is_active?"ti ti-user-x":"ti ti-user-check","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Delete",onClick:()=>w(s.id,s.username),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]}):null})]},s.id))})]})}),e.jsxs(n,{show:y,onHide:()=>l(!1),centered:!0,children:[e.jsx(n.Header,{closeButton:!0,children:e.jsx(n.Title,{children:"Add User"})}),e.jsxs("form",{onSubmit:C,children:[e.jsxs(n.Body,{children:[f?e.jsx(b,{className:"mb-3",children:f}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Username"}),e.jsx("input",{name:"username",type:"text",placeholder:"newuser",className:"form-control",required:!0,minLength:2})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Password"}),e.jsx("input",{name:"password",type:"password",placeholder:"••••••••",className:"form-control",required:!0,minLength:6})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Email (optional)"}),e.jsx("input",{name:"email",type:"email",placeholder:"user@example.com",className:"form-control"})]})]}),e.jsxs(n.Footer,{children:[e.jsx(o,{type:"button",variant:"secondary",onClick:()=>l(!1),children:"Cancel"}),e.jsx(o,{type:"submit",variant:"primary",disabled:j,children:j?"Creating…":"Create"})]})]})]})]})}export{$ as UsersPage}; +import{r as a,j as e,ab as I,M as _,ac as D,ad as P,ae as L}from"./index-Cvh4tLHo.js";import{M as n}from"./Modal-CCihVZTY.js";import{A as b}from"./AdminAlert-Bt3L8_zJ.js";import{A as o}from"./AdminButton-BKglG8kI.js";import{A as T}from"./AdminTable-BQ5Lf7EC.js";import{P as g}from"./PageHeader-D6k34vvM.js";function $(){const[h,v]=a.useState([]),[N,x]=a.useState(!0),[u,d]=a.useState(""),[y,l]=a.useState(!1),[j,p]=a.useState(!1),[f,i]=a.useState(""),[U,A]=a.useState(null),c=()=>{x(!0),I().then(s=>{v(s),_("/auth/me").then(t=>A(t.id))}).catch(s=>d(s.message)).finally(()=>x(!1))};a.useEffect(()=>{c()},[]);const C=s=>{s.preventDefault();const t=s.currentTarget,r=t.elements.namedItem("username").value.trim(),m=t.elements.namedItem("password").value,E=t.elements.namedItem("email").value.trim();if(!r||r.length<2){i("Username must be at least 2 characters");return}if(!m||m.length<6){i("Password must be at least 6 characters");return}p(!0),i(""),L({username:r,password:m,email:E}).then(()=>{l(!1),t.reset(),c()}).catch(k=>i(k.message)).finally(()=>p(!1))},w=(s,t)=>{confirm(`Delete user "${t}"?`)&&P(s).then(c).catch(r=>d(r.message))},S=s=>{D(s).then(c).catch(t=>d(t.message))};return N&&h.length===0?e.jsxs(e.Fragment,{children:[e.jsx(g,{title:"Users"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(g,{title:"Users",actions:e.jsxs(o,{variant:"primary",onClick:()=>l(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add User"]})}),u?e.jsx(b,{className:"mb-3",children:u}):null,e.jsx("div",{className:"card",children:e.jsxs(T,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Username"}),e.jsx("th",{children:"Email"}),e.jsx("th",{children:"Status"}),e.jsx("th",{children:"Role"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:h.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:s.username}),e.jsx("td",{children:s.email||"—"}),e.jsx("td",{children:e.jsx("span",{className:s.is_active?"text-success":"text-secondary",children:s.is_active?"Active":"Inactive"})}),e.jsx("td",{children:s.is_superuser?"Admin":"User"}),e.jsx("td",{className:"text-end",children:s.id!==U?e.jsxs("span",{className:"d-inline-flex gap-1 justify-content-end",children:[e.jsx("button",{type:"button",className:`btn btn-link btn-sm p-1 ${s.is_active?"text-warning":"text-success"}`,title:s.is_active?"Deactivate":"Activate",onClick:()=>S(s.id),children:e.jsx("i",{className:s.is_active?"ti ti-user-x":"ti ti-user-check","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Delete",onClick:()=>w(s.id,s.username),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]}):null})]},s.id))})]})}),e.jsxs(n,{show:y,onHide:()=>l(!1),centered:!0,children:[e.jsx(n.Header,{closeButton:!0,children:e.jsx(n.Title,{children:"Add User"})}),e.jsxs("form",{onSubmit:C,children:[e.jsxs(n.Body,{children:[f?e.jsx(b,{className:"mb-3",children:f}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Username"}),e.jsx("input",{name:"username",type:"text",placeholder:"newuser",className:"form-control",required:!0,minLength:2})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Password"}),e.jsx("input",{name:"password",type:"password",placeholder:"••••••••",className:"form-control",required:!0,minLength:6})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Email (optional)"}),e.jsx("input",{name:"email",type:"email",placeholder:"user@example.com",className:"form-control"})]})]}),e.jsxs(n.Footer,{children:[e.jsx(o,{type:"button",variant:"secondary",onClick:()=>l(!1),children:"Cancel"}),e.jsx(o,{type:"submit",variant:"primary",disabled:j,children:j?"Creating…":"Create"})]})]})]})]})}export{$ as UsersPage}; diff --git a/YakPanel-server/frontend/dist/assets/index-CRR9sQ49.js b/YakPanel-server/frontend/dist/assets/index-Cvh4tLHo.js similarity index 54% rename from YakPanel-server/frontend/dist/assets/index-CRR9sQ49.js rename to YakPanel-server/frontend/dist/assets/index-Cvh4tLHo.js index b17d707f..cf5010df 100644 --- a/YakPanel-server/frontend/dist/assets/index-CRR9sQ49.js +++ b/YakPanel-server/frontend/dist/assets/index-Cvh4tLHo.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-CukNUmp0.js","assets/AdminAlert-DW1IRWce.js","assets/AdminCard-DNA70pGd.js","assets/PageHeader-BcjNf7GG.js","assets/SitePage-CeCv6Zaa.js","assets/Modal-B7V4w_St.js","assets/AdminButton-Bd2cLTu3.js","assets/AdminTable-BLiLxfnS.js","assets/EmptyState-C61VdEFl.js","assets/FilesPage-DLgTKzsa.js","assets/FtpPage-DG8coQcY.js","assets/DatabasePage-sZfqfvMQ.js","assets/TerminalPage-CXXB09nH.js","assets/TerminalPage-LcAfv9l9.css","assets/MonitorPage-CgJf2F74.js","assets/CrontabPage-BfaMKQc8.js","assets/ConfigPage-eLTvRUp2.js","assets/LogsPage-B1uIfI5z.js","assets/FirewallPage-Bu-mOiN9.js","assets/DomainsPage-DVTACiDJ.js","assets/DockerPage-D1AIK8Rv.js","assets/NodePage-BQzvbSat.js","assets/SoftPage-B7PtFv7I.js","assets/ServicesPage-DNZuAdmh.js","assets/PluginsPage-C4H8wPuq.js","assets/BackupPlansPage-CgzFMegr.js","assets/UsersPage-DqvygXkC.js","assets/RemoteInstallPage-C4gVyakl.js"])))=>i.map(i=>d[i]); -function s0(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var l0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rh={exports:{}},El={},Ih={exports:{}},oe={};/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-WBszSOQ2.js","assets/AdminAlert-Bt3L8_zJ.js","assets/AdminCard-BYkisaPa.js","assets/PageHeader-D6k34vvM.js","assets/SitePage-D5AOBBFP.js","assets/Modal-CCihVZTY.js","assets/AdminButton-BKglG8kI.js","assets/AdminTable-BQ5Lf7EC.js","assets/EmptyState-D6lCh4WN.js","assets/FilesPage-oDxR4Lhi.js","assets/FtpPage-CjINqUGM.js","assets/DatabasePage-B_-EguhK.js","assets/TerminalPage-CgU22s_8.js","assets/TerminalPage-LcAfv9l9.css","assets/MonitorPage-BRoY6HLt.js","assets/CrontabPage-DgbkO6Z_.js","assets/ConfigPage-t5KRejpn.js","assets/LogsPage-z5Orin3I.js","assets/FirewallPage-Cczmj9CC.js","assets/DomainsPage-BQsg8Ui3.js","assets/DockerPage-DyZ77ivO.js","assets/NodePage-DOIEhdrc.js","assets/SoftPage-BLM9zKf0.js","assets/ServicesPage-C2SHTH7X.js","assets/PluginsPage-D1KZQdzk.js","assets/BackupPlansPage-Dau-fuqK.js","assets/UsersPage-Skle3SPM.js","assets/RemoteInstallPage-19-_F3Xw.js"])))=>i.map(i=>d[i]); +function l0(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var a0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function El(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ih={exports:{}},Cl={},Mh={exports:{}},oe={};/** * @license React * react.production.min.js * @@ -7,7 +7,7 @@ function s0(e,t){for(var n=0;n>>1,de=M[T];if(0>>1;Ti(Oe,V))zei(Ne,Oe)?(M[T]=Ne,M[ze]=V,T=ze):(M[T]=Oe,M[Ue]=V,T=Ue);else if(zei(Ne,V))M[T]=Ne,M[ze]=V,T=ze;else break e}}return X}function i(M,X){var V=M.sortIndex-X.sortIndex;return V!==0?V:M.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var c=[],d=[],h=1,g=null,_=3,S=!1,C=!1,O=!1,P=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(M){for(var X=n(d);X!==null;){if(X.callback===null)r(d);else if(X.startTime<=M)r(d),X.sortIndex=X.expirationTime,t(c,X);else break;X=n(d)}}function b(M){if(O=!1,w(M),!C)if(n(c)!==null)C=!0,ke(N);else{var X=n(d);X!==null&&$e(b,X.startTime-M)}}function N(M,X){C=!1,O&&(O=!1,y($),$=-1),S=!0;var V=_;try{for(w(X),g=n(c);g!==null&&(!(g.expirationTime>X)||M&&!Y());){var T=g.callback;if(typeof T=="function"){g.callback=null,_=g.priorityLevel;var de=T(g.expirationTime<=X);X=e.unstable_now(),typeof de=="function"?g.callback=de:g===n(c)&&r(c),w(X)}else r(c);g=n(c)}if(g!==null)var Ct=!0;else{var Ue=n(d);Ue!==null&&$e(b,Ue.startTime-X),Ct=!1}return Ct}finally{g=null,_=V,S=!1}}var A=!1,D=null,$=-1,H=5,F=-1;function Y(){return!(e.unstable_now()-FM||125T?(M.sortIndex=V,t(d,M),n(c)===null&&M===n(d)&&(O?(y($),$=-1):O=!0,$e(b,V-T))):(M.sortIndex=de,t(c,M),C||S||(C=!0,ke(N))),M},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(M){var X=_;return function(){var V=_;_=X;try{return M.apply(this,arguments)}finally{_=V}}}})(Xh);Yh.exports=Xh;var T0=Yh.exports;/** + */(function(e){function t(M,X){var H=M.length;M.push(X);e:for(;0>>1,de=M[T];if(0>>1;Ti(Oe,H))zei(Ne,Oe)?(M[T]=Ne,M[ze]=H,T=ze):(M[T]=Oe,M[Ue]=H,T=Ue);else if(zei(Ne,H))M[T]=Ne,M[ze]=H,T=ze;else break e}}return X}function i(M,X){var H=M.sortIndex-X.sortIndex;return H!==0?H:M.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var c=[],d=[],h=1,g=null,_=3,S=!1,C=!1,O=!1,P=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(M){for(var X=n(d);X!==null;){if(X.callback===null)r(d);else if(X.startTime<=M)r(d),X.sortIndex=X.expirationTime,t(c,X);else break;X=n(d)}}function b(M){if(O=!1,w(M),!C)if(n(c)!==null)C=!0,ke(N);else{var X=n(d);X!==null&&Re(b,X.startTime-M)}}function N(M,X){C=!1,O&&(O=!1,y(R),R=-1),S=!0;var H=_;try{for(w(X),g=n(c);g!==null&&(!(g.expirationTime>X)||M&&!Y());){var T=g.callback;if(typeof T=="function"){g.callback=null,_=g.priorityLevel;var de=T(g.expirationTime<=X);X=e.unstable_now(),typeof de=="function"?g.callback=de:g===n(c)&&r(c),w(X)}else r(c);g=n(c)}if(g!==null)var Ct=!0;else{var Ue=n(d);Ue!==null&&Re(b,Ue.startTime-X),Ct=!1}return Ct}finally{g=null,_=H,S=!1}}var A=!1,D=null,R=-1,K=5,F=-1;function Y(){return!(e.unstable_now()-FM||125T?(M.sortIndex=H,t(d,M),n(c)===null&&M===n(d)&&(O?(y(R),R=-1):O=!0,Re(b,H-T))):(M.sortIndex=de,t(c,M),C||S||(C=!0,ke(N))),M},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(M){var X=_;return function(){var H=_;_=X;try{return M.apply(this,arguments)}finally{_=H}}}})(Jh);Xh.exports=Jh;var N0=Xh.exports;/** * @license React * react-dom.production.min.js * @@ -31,14 +31,14 @@ function s0(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uu=Object.prototype.hasOwnProperty,L0=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,qd={},Zd={};function A0(e){return uu.call(Zd,e)?!0:uu.call(qd,e)?!1:L0.test(e)?Zd[e]=!0:(qd[e]=!0,!1)}function D0(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function $0(e,t,n,r){if(t===null||typeof t>"u"||D0(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function st(e,t,n,r,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var Ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ye[e]=new st(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ye[t]=new st(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ye[e]=new st(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ye[e]=new st(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ye[e]=new st(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ye[e]=new st(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ye[e]=new st(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ye[e]=new st(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ye[e]=new st(e,5,!1,e.toLowerCase(),null,!1,!1)});var mc=/[\-:]([a-z])/g;function gc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(mc,gc);Ye[t]=new st(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(mc,gc);Ye[t]=new st(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(mc,gc);Ye[t]=new st(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ye[e]=new st(e,1,!1,e.toLowerCase(),null,!1,!1)});Ye.xlinkHref=new st("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ye[e]=new st(e,1,!1,e.toLowerCase(),null,!0,!0)});function vc(e,t,n,r){var i=Ye.hasOwnProperty(t)?Ye[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uu=Object.prototype.hasOwnProperty,A0=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Zd={},ep={};function D0(e){return uu.call(ep,e)?!0:uu.call(Zd,e)?!1:A0.test(e)?ep[e]=!0:(Zd[e]=!0,!1)}function R0(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function $0(e,t,n,r){if(t===null||typeof t>"u"||R0(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function st(e,t,n,r,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var Ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ye[e]=new st(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ye[t]=new st(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ye[e]=new st(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ye[e]=new st(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ye[e]=new st(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ye[e]=new st(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ye[e]=new st(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ye[e]=new st(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ye[e]=new st(e,5,!1,e.toLowerCase(),null,!1,!1)});var gc=/[\-:]([a-z])/g;function vc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(gc,vc);Ye[t]=new st(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(gc,vc);Ye[t]=new st(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(gc,vc);Ye[t]=new st(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ye[e]=new st(e,1,!1,e.toLowerCase(),null,!1,!1)});Ye.xlinkHref=new st("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ye[e]=new st(e,1,!1,e.toLowerCase(),null,!0,!0)});function yc(e,t,n,r){var i=Ye.hasOwnProperty(t)?Ye[t]:null;(i!==null?i.type!==0:r||!(2u||i[l]!==o[u]){var c=` -`+i[l].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=l&&0<=u);break}}}finally{Na=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?eo(e):""}function R0(e){switch(e.tag){case 5:return eo(e.type);case 16:return eo("Lazy");case 13:return eo("Suspense");case 19:return eo("SuspenseList");case 0:case 2:case 15:return e=La(e.type,!1),e;case 11:return e=La(e.type.render,!1),e;case 1:return e=La(e.type,!0),e;default:return""}}function pu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ei:return"Fragment";case Zr:return"Portal";case cu:return"Profiler";case yc:return"StrictMode";case fu:return"Suspense";case du:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qh:return(e.displayName||"Context")+".Consumer";case Gh:return(e._context.displayName||"Context")+".Provider";case wc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _c:return t=e.displayName||null,t!==null?t:pu(e.type)||"Memo";case An:t=e._payload,e=e._init;try{return pu(e(t))}catch{}}return null}function I0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pu(t);case 8:return t===yc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Jn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function em(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function M0(e){var t=em(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ys(e){e._valueTracker||(e._valueTracker=M0(e))}function tm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=em(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Js(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function hu(e,t){var n=t.checked;return Pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function tp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Jn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function nm(e,t){t=t.checked,t!=null&&vc(e,"checked",t,!1)}function mu(e,t){nm(e,t);var n=Jn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?gu(e,t.type,n):t.hasOwnProperty("defaultValue")&&gu(e,t.type,Jn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function np(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function gu(e,t,n){(t!=="number"||Js(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var to=Array.isArray;function fi(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ws.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function yo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var io={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},z0=["Webkit","ms","Moz","O"];Object.keys(io).forEach(function(e){z0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),io[t]=io[e]})});function sm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||io.hasOwnProperty(e)&&io[e]?(""+t).trim():t+"px"}function lm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=sm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var F0=Pe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wu(e,t){if(t){if(F0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function _u(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xu=null;function xc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Su=null,di=null,pi=null;function op(e){if(e=Bo(e)){if(typeof Su!="function")throw Error(R(280));var t=e.stateNode;t&&(t=jl(t),Su(e.stateNode,e.type,t))}}function am(e){di?pi?pi.push(e):pi=[e]:di=e}function um(){if(di){var e=di,t=pi;if(pi=di=null,op(e),t)for(e=0;e>>=0,e===0?32:31-(G0(e)/q0|0)|0}var _s=64,xs=4194304;function no(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function el(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var u=l&~i;u!==0?r=no(u):(o&=l,o!==0&&(r=no(o)))}else l=n&~i,l!==0?r=no(l):o!==0&&(r=no(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function zo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Yt(t),e[t]=n}function n_(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=so),hp=" ",mp=!1;function jm(e,t){switch(e){case"keyup":return T_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ti=!1;function L_(e,t){switch(e){case"compositionend":return Tm(t);case"keypress":return t.which!==32?null:(mp=!0,hp);case"textInput":return e=t.data,e===hp&&mp?null:e;default:return null}}function A_(e,t){if(ti)return e==="compositionend"||!jc&&jm(e,t)?(e=Pm(),Fs=bc=In=null,ti=!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}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=wp(n)}}function Dm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $m(){for(var e=window,t=Js();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Js(e.document)}return t}function Tc(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")}function U_(e){var t=$m(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Dm(n.ownerDocument.documentElement,n)){if(r!==null&&Tc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=_p(n,o);var l=_p(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ni=null,Ou=null,ao=null,ju=!1;function xp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ju||ni==null||ni!==Js(r)||(r=ni,"selectionStart"in r&&Tc(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}),ao&&Eo(ao,r)||(ao=r,r=rl(Ou,"onSelect"),0oi||(e.current=$u[oi],$u[oi]=null,oi--)}function ve(e,t){oi++,$u[oi]=e.current,e.current=t}var Gn={},qe=er(Gn),ut=er(!1),br=Gn;function yi(e,t){var n=e.type.contextTypes;if(!n)return Gn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ct(e){return e=e.childContextTypes,e!=null}function ol(){_e(ut),_e(qe)}function Op(e,t,n){if(qe.current!==Gn)throw Error(R(168));ve(qe,t),ve(ut,n)}function Vm(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(R(108,I0(e)||"Unknown",i));return Pe({},n,r)}function sl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gn,br=qe.current,ve(qe,e),ve(ut,ut.current),!0}function jp(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=Vm(e,t,br),r.__reactInternalMemoizedMergedChildContext=e,_e(ut),_e(qe),ve(qe,e)):_e(ut),ve(ut,n)}var mn=null,Tl=!1,Ka=!1;function Hm(e){mn===null?mn=[e]:mn.push(e)}function ex(e){Tl=!0,Hm(e)}function tr(){if(!Ka&&mn!==null){Ka=!0;var e=0,t=fe;try{var n=mn;for(fe=1;e>=l,i-=l,gn=1<<32-Yt(t)+i|n<$?(H=D,D=null):H=D.sibling;var F=_(y,D,w[$],b);if(F===null){D===null&&(D=H);break}e&&D&&F.alternate===null&&t(y,D),v=o(F,v,$),A===null?N=F:A.sibling=F,A=F,D=H}if($===w.length)return n(y,D),Se&&yr(y,$),N;if(D===null){for(;$$?(H=D,D=null):H=D.sibling;var Y=_(y,D,F.value,b);if(Y===null){D===null&&(D=H);break}e&&D&&Y.alternate===null&&t(y,D),v=o(Y,v,$),A===null?N=Y:A.sibling=Y,A=Y,D=H}if(F.done)return n(y,D),Se&&yr(y,$),N;if(D===null){for(;!F.done;$++,F=w.next())F=g(y,F.value,b),F!==null&&(v=o(F,v,$),A===null?N=F:A.sibling=F,A=F);return Se&&yr(y,$),N}for(D=r(y,D);!F.done;$++,F=w.next())F=S(D,y,$,F.value,b),F!==null&&(e&&F.alternate!==null&&D.delete(F.key===null?$:F.key),v=o(F,v,$),A===null?N=F:A.sibling=F,A=F);return e&&D.forEach(function(ee){return t(y,ee)}),Se&&yr(y,$),N}function P(y,v,w,b){if(typeof w=="object"&&w!==null&&w.type===ei&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case vs:e:{for(var N=w.key,A=v;A!==null;){if(A.key===N){if(N=w.type,N===ei){if(A.tag===7){n(y,A.sibling),v=i(A,w.props.children),v.return=y,y=v;break e}}else if(A.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===An&&Lp(N)===A.type){n(y,A.sibling),v=i(A,w.props),v.ref=Ji(y,A,w),v.return=y,y=v;break e}n(y,A);break}else t(y,A);A=A.sibling}w.type===ei?(v=Er(w.props.children,y.mode,b,w.key),v.return=y,y=v):(b=Ys(w.type,w.key,w.props,null,y.mode,b),b.ref=Ji(y,v,w),b.return=y,y=b)}return l(y);case Zr:e:{for(A=w.key;v!==null;){if(v.key===A)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(y,v.sibling),v=i(v,w.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=eu(w,y.mode,b),v.return=y,y=v}return l(y);case An:return A=w._init,P(y,v,A(w._payload),b)}if(to(w))return C(y,v,w,b);if(Hi(w))return O(y,v,w,b);Os(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(y,v.sibling),v=i(v,w),v.return=y,y=v):(n(y,v),v=Za(w,y.mode,b),v.return=y,y=v),l(y)):n(y,v)}return P}var _i=Xm(!0),Jm=Xm(!1),ul=er(null),cl=null,ai=null,Dc=null;function $c(){Dc=ai=cl=null}function Rc(e){var t=ul.current;_e(ul),e._currentValue=t}function Mu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function mi(e,t){cl=e,Dc=ai=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(at=!0),e.firstContext=null)}function Rt(e){var t=e._currentValue;if(Dc!==e)if(e={context:e,memoizedValue:t,next:null},ai===null){if(cl===null)throw Error(R(308));ai=e,cl.dependencies={lanes:0,firstContext:e}}else ai=ai.next=e;return t}var xr=null;function Ic(e){xr===null?xr=[e]:xr.push(e)}function Gm(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Ic(t)):(n.next=i.next,i.next=n),t.interleaved=n,Sn(e,r)}function Sn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Dn=!1;function Mc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qm(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Vn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,le&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Sn(e,n)}return i=r.interleaved,i===null?(t.next=t,Ic(r)):(t.next=i.next,i.next=t),r.interleaved=t,Sn(e,n)}function Us(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,kc(e,n)}}function Ap(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=l:o=o.next=l,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function fl(e,t,n,r){var i=e.updateQueue;Dn=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,u=i.shared.pending;if(u!==null){i.shared.pending=null;var c=u,d=c.next;c.next=null,l===null?o=d:l.next=d,l=c;var h=e.alternate;h!==null&&(h=h.updateQueue,u=h.lastBaseUpdate,u!==l&&(u===null?h.firstBaseUpdate=d:u.next=d,h.lastBaseUpdate=c))}if(o!==null){var g=i.baseState;l=0,h=d=c=null,u=o;do{var _=u.lane,S=u.eventTime;if((r&_)===_){h!==null&&(h=h.next={eventTime:S,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var C=e,O=u;switch(_=t,S=n,O.tag){case 1:if(C=O.payload,typeof C=="function"){g=C.call(S,g,_);break e}g=C;break e;case 3:C.flags=C.flags&-65537|128;case 0:if(C=O.payload,_=typeof C=="function"?C.call(S,g,_):C,_==null)break e;g=Pe({},g,_);break e;case 2:Dn=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,_=i.effects,_===null?i.effects=[u]:_.push(u))}else S={eventTime:S,lane:_,tag:u.tag,payload:u.payload,callback:u.callback,next:null},h===null?(d=h=S,c=g):h=h.next=S,l|=_;if(u=u.next,u===null){if(u=i.shared.pending,u===null)break;_=u,u=_.next,_.next=null,i.lastBaseUpdate=_,i.shared.pending=null}}while(!0);if(h===null&&(c=g),i.baseState=c,i.firstBaseUpdate=d,i.lastBaseUpdate=h,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);jr|=l,e.lanes=l,e.memoizedState=g}}function Dp(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ya.transition;Ya.transition={};try{e(!1),t()}finally{fe=n,Ya.transition=r}}function mg(){return It().memoizedState}function ix(e,t,n){var r=Kn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gg(e))vg(t,n);else if(n=Gm(e,t,n,r),n!==null){var i=it();Xt(n,e,r,i),yg(n,t,r)}}function ox(e,t,n){var r=Kn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gg(e))vg(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,u=o(l,n);if(i.hasEagerState=!0,i.eagerState=u,Jt(u,l)){var c=t.interleaved;c===null?(i.next=i,Ic(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=Gm(e,t,i,r),n!==null&&(i=it(),Xt(n,e,r,i),yg(n,t,r))}}function gg(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function vg(e,t){uo=pl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,kc(e,n)}}var hl={readContext:Rt,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useInsertionEffect:Xe,useLayoutEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useMutableSource:Xe,useSyncExternalStore:Xe,useId:Xe,unstable_isNewReconciler:!1},sx={readContext:Rt,useCallback:function(e,t){return nn().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:Rp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Vs(4194308,4,cg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Vs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Vs(4,2,e,t)},useMemo:function(e,t){var n=nn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=nn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ix.bind(null,Ce,e),[r.memoizedState,e]},useRef:function(e){var t=nn();return e={current:e},t.memoizedState=e},useState:$p,useDebugValue:Kc,useDeferredValue:function(e){return nn().memoizedState=e},useTransition:function(){var e=$p(!1),t=e[0];return e=rx.bind(null,e[1]),nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ce,i=nn();if(Se){if(n===void 0)throw Error(R(407));n=n()}else{if(n=t(),He===null)throw Error(R(349));Or&30||ng(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Rp(ig.bind(null,r,o,e),[e]),r.flags|=2048,Lo(9,rg.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=nn(),t=He.identifierPrefix;if(Se){var n=vn,r=gn;n=(r&~(1<<32-Yt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=To++,0")&&(c=c.replace("",e.displayName)),c}while(1<=l&&0<=u);break}}}finally{Na=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?eo(e):""}function I0(e){switch(e.tag){case 5:return eo(e.type);case 16:return eo("Lazy");case 13:return eo("Suspense");case 19:return eo("SuspenseList");case 0:case 2:case 15:return e=La(e.type,!1),e;case 11:return e=La(e.type.render,!1),e;case 1:return e=La(e.type,!0),e;default:return""}}function pu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ti:return"Fragment";case ei:return"Portal";case cu:return"Profiler";case wc:return"StrictMode";case fu:return"Suspense";case du:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Zh:return(e.displayName||"Context")+".Consumer";case qh:return(e._context.displayName||"Context")+".Provider";case _c:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case xc:return t=e.displayName||null,t!==null?t:pu(e.type)||"Memo";case An:t=e._payload,e=e._init;try{return pu(e(t))}catch{}}return null}function M0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pu(t);case 8:return t===wc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Jn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function tm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function z0(e){var t=tm(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ws(e){e._valueTracker||(e._valueTracker=z0(e))}function nm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=tm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Gs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function hu(e,t){var n=t.checked;return Pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function np(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Jn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function rm(e,t){t=t.checked,t!=null&&yc(e,"checked",t,!1)}function mu(e,t){rm(e,t);var n=Jn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?gu(e,t.type,n):t.hasOwnProperty("defaultValue")&&gu(e,t.type,Jn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function rp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function gu(e,t,n){(t!=="number"||Gs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var to=Array.isArray;function di(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=_s.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function yo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var io={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},F0=["Webkit","ms","Moz","O"];Object.keys(io).forEach(function(e){F0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),io[t]=io[e]})});function lm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||io.hasOwnProperty(e)&&io[e]?(""+t).trim():t+"px"}function am(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=lm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var B0=Pe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wu(e,t){if(t){if(B0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function _u(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xu=null;function Sc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Su=null,pi=null,hi=null;function sp(e){if(e=Bo(e)){if(typeof Su!="function")throw Error($(280));var t=e.stateNode;t&&(t=Tl(t),Su(e.stateNode,e.type,t))}}function um(e){pi?hi?hi.push(e):hi=[e]:pi=e}function cm(){if(pi){var e=pi,t=hi;if(hi=pi=null,sp(e),t)for(e=0;e>>=0,e===0?32:31-(q0(e)/Z0|0)|0}var xs=64,Ss=4194304;function no(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function tl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var u=l&~i;u!==0?r=no(u):(o&=l,o!==0&&(r=no(o)))}else l=n&~i,l!==0?r=no(l):o!==0&&(r=no(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function zo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Yt(t),e[t]=n}function r_(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=so),mp=" ",gp=!1;function Tm(e,t){switch(e){case"keyup":return N_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ni=!1;function A_(e,t){switch(e){case"compositionend":return Nm(t);case"keypress":return t.which!==32?null:(gp=!0,mp);case"textInput":return e=t.data,e===mp&&gp?null:e;default:return null}}function D_(e,t){if(ni)return e==="compositionend"||!Tc&&Tm(e,t)?(e=Om(),Bs=Pc=In=null,ni=!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}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=_p(n)}}function Rm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $m(){for(var e=window,t=Gs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Gs(e.document)}return t}function Nc(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")}function W_(e){var t=$m(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Rm(n.ownerDocument.documentElement,n)){if(r!==null&&Nc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=xp(n,o);var l=xp(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ri=null,Ou=null,ao=null,ju=!1;function Sp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ju||ri==null||ri!==Gs(r)||(r=ri,"selectionStart"in r&&Nc(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}),ao&&Eo(ao,r)||(ao=r,r=il(Ou,"onSelect"),0si||(e.current=Ru[si],Ru[si]=null,si--)}function ve(e,t){si++,Ru[si]=e.current,e.current=t}var Gn={},qe=er(Gn),ut=er(!1),br=Gn;function wi(e,t){var n=e.type.contextTypes;if(!n)return Gn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ct(e){return e=e.childContextTypes,e!=null}function sl(){_e(ut),_e(qe)}function jp(e,t,n){if(qe.current!==Gn)throw Error($(168));ve(qe,t),ve(ut,n)}function Hm(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error($(108,M0(e)||"Unknown",i));return Pe({},n,r)}function ll(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gn,br=qe.current,ve(qe,e),ve(ut,ut.current),!0}function Tp(e,t,n){var r=e.stateNode;if(!r)throw Error($(169));n?(e=Hm(e,t,br),r.__reactInternalMemoizedMergedChildContext=e,_e(ut),_e(qe),ve(qe,e)):_e(ut),ve(ut,n)}var mn=null,Nl=!1,Ka=!1;function Km(e){mn===null?mn=[e]:mn.push(e)}function tx(e){Nl=!0,Km(e)}function tr(){if(!Ka&&mn!==null){Ka=!0;var e=0,t=fe;try{var n=mn;for(fe=1;e>=l,i-=l,gn=1<<32-Yt(t)+i|n<R?(K=D,D=null):K=D.sibling;var F=_(y,D,w[R],b);if(F===null){D===null&&(D=K);break}e&&D&&F.alternate===null&&t(y,D),v=o(F,v,R),A===null?N=F:A.sibling=F,A=F,D=K}if(R===w.length)return n(y,D),Se&&yr(y,R),N;if(D===null){for(;RR?(K=D,D=null):K=D.sibling;var Y=_(y,D,F.value,b);if(Y===null){D===null&&(D=K);break}e&&D&&Y.alternate===null&&t(y,D),v=o(Y,v,R),A===null?N=Y:A.sibling=Y,A=Y,D=K}if(F.done)return n(y,D),Se&&yr(y,R),N;if(D===null){for(;!F.done;R++,F=w.next())F=g(y,F.value,b),F!==null&&(v=o(F,v,R),A===null?N=F:A.sibling=F,A=F);return Se&&yr(y,R),N}for(D=r(y,D);!F.done;R++,F=w.next())F=S(D,y,R,F.value,b),F!==null&&(e&&F.alternate!==null&&D.delete(F.key===null?R:F.key),v=o(F,v,R),A===null?N=F:A.sibling=F,A=F);return e&&D.forEach(function(ee){return t(y,ee)}),Se&&yr(y,R),N}function P(y,v,w,b){if(typeof w=="object"&&w!==null&&w.type===ti&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case ys:e:{for(var N=w.key,A=v;A!==null;){if(A.key===N){if(N=w.type,N===ti){if(A.tag===7){n(y,A.sibling),v=i(A,w.props.children),v.return=y,y=v;break e}}else if(A.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===An&&Ap(N)===A.type){n(y,A.sibling),v=i(A,w.props),v.ref=Ji(y,A,w),v.return=y,y=v;break e}n(y,A);break}else t(y,A);A=A.sibling}w.type===ti?(v=Er(w.props.children,y.mode,b,w.key),v.return=y,y=v):(b=Xs(w.type,w.key,w.props,null,y.mode,b),b.ref=Ji(y,v,w),b.return=y,y=b)}return l(y);case ei:e:{for(A=w.key;v!==null;){if(v.key===A)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(y,v.sibling),v=i(v,w.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=eu(w,y.mode,b),v.return=y,y=v}return l(y);case An:return A=w._init,P(y,v,A(w._payload),b)}if(to(w))return C(y,v,w,b);if(Hi(w))return O(y,v,w,b);js(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(y,v.sibling),v=i(v,w),v.return=y,y=v):(n(y,v),v=Za(w,y.mode,b),v.return=y,y=v),l(y)):n(y,v)}return P}var xi=Jm(!0),Gm=Jm(!1),cl=er(null),fl=null,ui=null,Rc=null;function $c(){Rc=ui=fl=null}function Ic(e){var t=cl.current;_e(cl),e._currentValue=t}function Mu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function gi(e,t){fl=e,Rc=ui=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(at=!0),e.firstContext=null)}function $t(e){var t=e._currentValue;if(Rc!==e)if(e={context:e,memoizedValue:t,next:null},ui===null){if(fl===null)throw Error($(308));ui=e,fl.dependencies={lanes:0,firstContext:e}}else ui=ui.next=e;return t}var xr=null;function Mc(e){xr===null?xr=[e]:xr.push(e)}function qm(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Mc(t)):(n.next=i.next,i.next=n),t.interleaved=n,Sn(e,r)}function Sn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Dn=!1;function zc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zm(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Vn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,le&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Sn(e,n)}return i=r.interleaved,i===null?(t.next=t,Mc(r)):(t.next=i.next,i.next=t),r.interleaved=t,Sn(e,n)}function Ws(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ec(e,n)}}function Dp(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=l:o=o.next=l,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function dl(e,t,n,r){var i=e.updateQueue;Dn=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,u=i.shared.pending;if(u!==null){i.shared.pending=null;var c=u,d=c.next;c.next=null,l===null?o=d:l.next=d,l=c;var h=e.alternate;h!==null&&(h=h.updateQueue,u=h.lastBaseUpdate,u!==l&&(u===null?h.firstBaseUpdate=d:u.next=d,h.lastBaseUpdate=c))}if(o!==null){var g=i.baseState;l=0,h=d=c=null,u=o;do{var _=u.lane,S=u.eventTime;if((r&_)===_){h!==null&&(h=h.next={eventTime:S,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var C=e,O=u;switch(_=t,S=n,O.tag){case 1:if(C=O.payload,typeof C=="function"){g=C.call(S,g,_);break e}g=C;break e;case 3:C.flags=C.flags&-65537|128;case 0:if(C=O.payload,_=typeof C=="function"?C.call(S,g,_):C,_==null)break e;g=Pe({},g,_);break e;case 2:Dn=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,_=i.effects,_===null?i.effects=[u]:_.push(u))}else S={eventTime:S,lane:_,tag:u.tag,payload:u.payload,callback:u.callback,next:null},h===null?(d=h=S,c=g):h=h.next=S,l|=_;if(u=u.next,u===null){if(u=i.shared.pending,u===null)break;_=u,u=_.next,_.next=null,i.lastBaseUpdate=_,i.shared.pending=null}}while(!0);if(h===null&&(c=g),i.baseState=c,i.firstBaseUpdate=d,i.lastBaseUpdate=h,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);jr|=l,e.lanes=l,e.memoizedState=g}}function Rp(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ya.transition;Ya.transition={};try{e(!1),t()}finally{fe=n,Ya.transition=r}}function gg(){return It().memoizedState}function ox(e,t,n){var r=Kn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},vg(e))yg(t,n);else if(n=qm(e,t,n,r),n!==null){var i=it();Xt(n,e,r,i),wg(n,t,r)}}function sx(e,t,n){var r=Kn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(vg(e))yg(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,u=o(l,n);if(i.hasEagerState=!0,i.eagerState=u,Jt(u,l)){var c=t.interleaved;c===null?(i.next=i,Mc(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=qm(e,t,i,r),n!==null&&(i=it(),Xt(n,e,r,i),wg(n,t,r))}}function vg(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function yg(e,t){uo=hl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function wg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ec(e,n)}}var ml={readContext:$t,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useInsertionEffect:Xe,useLayoutEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useMutableSource:Xe,useSyncExternalStore:Xe,useId:Xe,unstable_isNewReconciler:!1},lx={readContext:$t,useCallback:function(e,t){return nn().memoizedState=[e,t===void 0?null:t],e},useContext:$t,useEffect:Ip,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Hs(4194308,4,fg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hs(4,2,e,t)},useMemo:function(e,t){var n=nn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=nn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ox.bind(null,Ce,e),[r.memoizedState,e]},useRef:function(e){var t=nn();return e={current:e},t.memoizedState=e},useState:$p,useDebugValue:Qc,useDeferredValue:function(e){return nn().memoizedState=e},useTransition:function(){var e=$p(!1),t=e[0];return e=ix.bind(null,e[1]),nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ce,i=nn();if(Se){if(n===void 0)throw Error($(407));n=n()}else{if(n=t(),He===null)throw Error($(349));Or&30||rg(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Ip(og.bind(null,r,o,e),[e]),r.flags|=2048,Lo(9,ig.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=nn(),t=He.identifierPrefix;if(Se){var n=vn,r=gn;n=(r&~(1<<32-Yt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=To++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[rn]=t,e[Po]=r,Og(e,t,!1,!1),t.stateNode=e;e:{switch(l=_u(n,r),n){case"dialog":ye("cancel",e),ye("close",e),i=r;break;case"iframe":case"object":case"embed":ye("load",e),i=r;break;case"video":case"audio":for(i=0;iki&&(t.flags|=128,r=!0,Gi(o,!1),t.lanes=4194304)}else{if(!r)if(e=dl(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Gi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!Se)return Je(t),null}else 2*Ae()-o.renderingStartTime>ki&&n!==1073741824&&(t.flags|=128,r=!0,Gi(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ae(),t.sibling=null,n=Ee.current,ve(Ee,r?n&1|2:n&1),t):(Je(t),null);case 22:case 23:return qc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?yt&1073741824&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function hx(e,t){switch(Lc(t),t.tag){case 1:return ct(t.type)&&ol(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xi(),_e(ut),_e(qe),Bc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Fc(t),null;case 13:if(_e(Ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _e(Ee),null;case 4:return xi(),null;case 10:return Rc(t.type._context),null;case 22:case 23:return qc(),null;case 24:return null;default:return null}}var Ts=!1,Ge=!1,mx=typeof WeakSet=="function"?WeakSet:Set,U=null;function ui(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Te(e,t,r)}else n.current=null}function Qu(e,t,n){try{n()}catch(r){Te(e,t,r)}}var Qp=!1;function gx(e,t){if(Tu=tl,e=$m(),Tc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var l=0,u=-1,c=-1,d=0,h=0,g=e,_=null;t:for(;;){for(var S;g!==n||i!==0&&g.nodeType!==3||(u=l+i),g!==o||r!==0&&g.nodeType!==3||(c=l+r),g.nodeType===3&&(l+=g.nodeValue.length),(S=g.firstChild)!==null;)_=g,g=S;for(;;){if(g===e)break t;if(_===n&&++d===i&&(u=l),_===o&&++h===r&&(c=l),(S=g.nextSibling)!==null)break;g=_,_=g.parentNode}g=S}n=u===-1||c===-1?null:{start:u,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Nu={focusedElem:e,selectionRange:n},tl=!1,U=t;U!==null;)if(t=U,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;try{var C=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(C!==null){var O=C.memoizedProps,P=C.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?O:Ht(t.type,O),P);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(b){Te(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return C=Qp,Qp=!1,C}function co(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Qu(t,n,o)}i=i.next}while(i!==r)}}function Al(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Yu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ng(e){var t=e.alternate;t!==null&&(e.alternate=null,Ng(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rn],delete t[Po],delete t[Du],delete t[q_],delete t[Z_])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Lg(e){return e.tag===5||e.tag===3||e.tag===4}function Yp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lg(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=il));else if(r!==4&&(e=e.child,e!==null))for(Xu(e,t,n),e=e.sibling;e!==null;)Xu(e,t,n),e=e.sibling}function Ju(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&&(e=e.child,e!==null))for(Ju(e,t,n),e=e.sibling;e!==null;)Ju(e,t,n),e=e.sibling}var Ke=null,Kt=!1;function Ln(e,t,n){for(n=n.child;n!==null;)Ag(e,t,n),n=n.sibling}function Ag(e,t,n){if(on&&typeof on.onCommitFiberUnmount=="function")try{on.onCommitFiberUnmount(Cl,n)}catch{}switch(n.tag){case 5:Ge||ui(n,t);case 6:var r=Ke,i=Kt;Ke=null,Ln(e,t,n),Ke=r,Kt=i,Ke!==null&&(Kt?(e=Ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ke.removeChild(n.stateNode));break;case 18:Ke!==null&&(Kt?(e=Ke,n=n.stateNode,e.nodeType===8?Ha(e.parentNode,n):e.nodeType===1&&Ha(e,n),So(e)):Ha(Ke,n.stateNode));break;case 4:r=Ke,i=Kt,Ke=n.stateNode.containerInfo,Kt=!0,Ln(e,t,n),Ke=r,Kt=i;break;case 0:case 11:case 14:case 15:if(!Ge&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&Qu(n,t,l),i=i.next}while(i!==r)}Ln(e,t,n);break;case 1:if(!Ge&&(ui(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Te(n,t,u)}Ln(e,t,n);break;case 21:Ln(e,t,n);break;case 22:n.mode&1?(Ge=(r=Ge)||n.memoizedState!==null,Ln(e,t,n),Ge=r):Ln(e,t,n);break;default:Ln(e,t,n)}}function Xp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new mx),t.forEach(function(r){var i=Cx.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Vt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=l),r&=~o}if(r=i,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yx(r/1960))-r,10e?16:e,Mn===null)var r=!1;else{if(e=Mn,Mn=null,vl=0,le&6)throw Error(R(331));var i=le;for(le|=4,U=e.current;U!==null;){var o=U,l=o.child;if(U.flags&16){var u=o.deletions;if(u!==null){for(var c=0;cAe()-Jc?kr(e,0):Xc|=n),ft(e,t)}function Bg(e,t){t===0&&(e.mode&1?(t=xs,xs<<=1,!(xs&130023424)&&(xs=4194304)):t=1);var n=it();e=Sn(e,t),e!==null&&(zo(e,t,n),ft(e,n))}function Ex(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bg(e,n)}function Cx(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(R(314))}r!==null&&r.delete(t),Bg(e,n)}var Ug;Ug=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ut.current)at=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return at=!1,dx(e,t,n);at=!!(e.flags&131072)}else at=!1,Se&&t.flags&1048576&&Km(t,al,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hs(e,t),e=t.pendingProps;var i=yi(t,qe.current);mi(t,n),i=Wc(null,t,r,e,i,n);var o=Vc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ct(r)?(o=!0,sl(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Mc(t),i.updater=Ll,t.stateNode=i,i._reactInternals=t,Fu(t,r,e,n),t=Wu(null,t,r,!0,o,n)):(t.tag=0,Se&&o&&Nc(t),rt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hs(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Px(r),e=Ht(r,e),i){case 0:t=Uu(null,t,r,e,n);break e;case 1:t=Vp(null,t,r,e,n);break e;case 11:t=Up(null,t,r,e,n);break e;case 14:t=Wp(null,t,r,Ht(r.type,e),n);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ht(r,i),Uu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ht(r,i),Vp(e,t,r,i,n);case 3:e:{if(Cg(t),e===null)throw Error(R(387));r=t.pendingProps,o=t.memoizedState,i=o.element,qm(e,t),fl(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Si(Error(R(423)),t),t=Hp(e,t,r,n,i);break e}else if(r!==i){i=Si(Error(R(424)),t),t=Hp(e,t,r,n,i);break e}else for(wt=Wn(t.stateNode.containerInfo.firstChild),_t=t,Se=!0,Qt=null,n=Jm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(wi(),r===i){t=kn(e,t,n);break e}rt(e,t,r,n)}t=t.child}return t;case 5:return Zm(t),e===null&&Iu(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Lu(r,i)?l=null:o!==null&&Lu(r,o)&&(t.flags|=32),Eg(e,t),rt(e,t,l,n),t.child;case 6:return e===null&&Iu(t),null;case 13:return bg(e,t,n);case 4:return zc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=_i(t,null,r,n):rt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ht(r,i),Up(e,t,r,i,n);case 7:return rt(e,t,t.pendingProps,n),t.child;case 8:return rt(e,t,t.pendingProps.children,n),t.child;case 12:return rt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,ve(ul,r._currentValue),r._currentValue=l,o!==null)if(Jt(o.value,l)){if(o.children===i.children&&!ut.current){t=kn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){l=o.child;for(var c=u.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=yn(-1,n&-n),c.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var h=d.pending;h===null?c.next=c:(c.next=h.next,h.next=c),d.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Mu(o.return,n,t),u.lanes|=n;break}c=c.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(R(341));l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),Mu(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}rt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,mi(t,n),i=Rt(i),r=r(i),t.flags|=1,rt(e,t,r,n),t.child;case 14:return r=t.type,i=Ht(r,t.pendingProps),i=Ht(r.type,i),Wp(e,t,r,i,n);case 15:return Sg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ht(r,i),Hs(e,t),t.tag=1,ct(r)?(e=!0,sl(t)):e=!1,mi(t,n),wg(t,r,i),Fu(t,r,i,n),Wu(null,t,r,!0,e,n);case 19:return Pg(e,t,n);case 22:return kg(e,t,n)}throw Error(R(156,t.tag))};function Wg(e,t){return gm(e,t)}function bx(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dt(e,t,n,r){return new bx(e,t,n,r)}function ef(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Px(e){if(typeof e=="function")return ef(e)?1:0;if(e!=null){if(e=e.$$typeof,e===wc)return 11;if(e===_c)return 14}return 2}function Qn(e,t){var n=e.alternate;return n===null?(n=Dt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ys(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")ef(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case ei:return Er(n.children,i,o,t);case yc:l=8,i|=8;break;case cu:return e=Dt(12,n,t,i|2),e.elementType=cu,e.lanes=o,e;case fu:return e=Dt(13,n,t,i),e.elementType=fu,e.lanes=o,e;case du:return e=Dt(19,n,t,i),e.elementType=du,e.lanes=o,e;case Zh:return $l(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Gh:l=10;break e;case qh:l=9;break e;case wc:l=11;break e;case _c:l=14;break e;case An:l=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=Dt(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Er(e,t,n,r){return e=Dt(7,e,r,t),e.lanes=n,e}function $l(e,t,n,r){return e=Dt(22,e,r,t),e.elementType=Zh,e.lanes=n,e.stateNode={isHidden:!1},e}function Za(e,t,n){return e=Dt(6,e,null,t),e.lanes=n,e}function eu(e,t,n){return t=Dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ox(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Da(0),this.expirationTimes=Da(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Da(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function tf(e,t,n,r,i,o,l,u,c){return e=new Ox(e,t,n,u,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Dt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mc(o),e}function jx(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Qg)}catch(e){console.error(e)}}Qg(),Qh.exports=kt;var Yg=Qh.exports;const AE=kl(Yg);var rh=Yg;au.createRoot=rh.createRoot,au.hydrateRoot=rh.hydrateRoot;/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Ga(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Bu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var cx=typeof WeakMap=="function"?WeakMap:Map;function xg(e,t,n){n=yn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){vl||(vl=!0,Gu=r),Bu(e,t)},n}function Sg(e,t,n){n=yn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Bu(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Bu(e,t),typeof r!="function"&&(Hn===null?Hn=new Set([this]):Hn.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function Fp(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new cx;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)||(i.add(n),e=Ex.bind(null,e,t,n),t.then(e,e))}function Bp(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Up(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=yn(-1,1),t.tag=2,Vn(n,t,1))),n.lanes|=1),e)}var fx=Cn.ReactCurrentOwner,at=!1;function rt(e,t,n,r){t.child=e===null?Gm(t,null,n,r):xi(t,e.child,n,r)}function Wp(e,t,n,r,i){n=n.render;var o=t.ref;return gi(t,i),r=Vc(e,t,n,r,o,i),n=Hc(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,kn(e,t,i)):(Se&&n&&Lc(t),t.flags|=1,rt(e,t,r,i),t.child)}function Vp(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!tf(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,kg(e,t,o,r,i)):(e=Xs(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var l=o.memoizedProps;if(n=n.compare,n=n!==null?n:Eo,n(l,r)&&e.ref===t.ref)return kn(e,t,i)}return t.flags|=1,e=Qn(o,r),e.ref=t.ref,e.return=t,t.child=e}function kg(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Eo(o,r)&&e.ref===t.ref)if(at=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(at=!0);else return t.lanes=e.lanes,kn(e,t,i)}return Uu(e,t,n,r,i)}function Eg(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ve(fi,yt),yt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ve(fi,yt),yt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,ve(fi,yt),yt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,ve(fi,yt),yt|=r;return rt(e,t,i,n),t.child}function Cg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Uu(e,t,n,r,i){var o=ct(n)?br:qe.current;return o=wi(t,o),gi(t,i),n=Vc(e,t,n,r,o,i),r=Hc(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,kn(e,t,i)):(Se&&r&&Lc(t),t.flags|=1,rt(e,t,n,i),t.child)}function Hp(e,t,n,r,i){if(ct(n)){var o=!0;ll(t)}else o=!1;if(gi(t,i),t.stateNode===null)Ks(e,t),_g(t,n,r),Fu(t,n,r,i),r=!0;else if(e===null){var l=t.stateNode,u=t.memoizedProps;l.props=u;var c=l.context,d=n.contextType;typeof d=="object"&&d!==null?d=$t(d):(d=ct(n)?br:qe.current,d=wi(t,d));var h=n.getDerivedStateFromProps,g=typeof h=="function"||typeof l.getSnapshotBeforeUpdate=="function";g||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(u!==r||c!==d)&&zp(t,l,r,d),Dn=!1;var _=t.memoizedState;l.state=_,dl(t,r,l,i),c=t.memoizedState,u!==r||_!==c||ut.current||Dn?(typeof h=="function"&&(zu(t,n,h,r),c=t.memoizedState),(u=Dn||Mp(t,n,u,r,_,c,d))?(g||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),l.props=r,l.state=c,l.context=d,r=u):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,Zm(e,t),u=t.memoizedProps,d=t.type===t.elementType?u:Ht(t.type,u),l.props=d,g=t.pendingProps,_=l.context,c=n.contextType,typeof c=="object"&&c!==null?c=$t(c):(c=ct(n)?br:qe.current,c=wi(t,c));var S=n.getDerivedStateFromProps;(h=typeof S=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(u!==g||_!==c)&&zp(t,l,r,c),Dn=!1,_=t.memoizedState,l.state=_,dl(t,r,l,i);var C=t.memoizedState;u!==g||_!==C||ut.current||Dn?(typeof S=="function"&&(zu(t,n,S,r),C=t.memoizedState),(d=Dn||Mp(t,n,d,r,_,C,c)||!1)?(h||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,C,c),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,C,c)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||u===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=C),l.props=r,l.state=C,l.context=c,r=d):(typeof l.componentDidUpdate!="function"||u===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),r=!1)}return Wu(e,t,n,r,o,i)}function Wu(e,t,n,r,i,o){Cg(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return i&&Tp(t,n,!1),kn(e,t,o);r=t.stateNode,fx.current=t;var u=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=xi(t,e.child,null,o),t.child=xi(t,null,u,o)):rt(e,t,u,o),t.memoizedState=r.state,i&&Tp(t,n,!0),t.child}function bg(e){var t=e.stateNode;t.pendingContext?jp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&jp(e,t.context,!1),Fc(e,t.containerInfo)}function Kp(e,t,n,r,i){return _i(),Dc(i),t.flags|=256,rt(e,t,n,r),t.child}var Vu={dehydrated:null,treeContext:null,retryLane:0};function Hu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Pg(e,t,n){var r=t.pendingProps,i=Ee.current,o=!1,l=(t.flags&128)!==0,u;if((u=l)||(u=e!==null&&e.memoizedState===null?!1:(i&2)!==0),u?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ve(Ee,i&1),e===null)return Iu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,o?(r=t.mode,o=t.child,l={mode:"hidden",children:l},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=l):o=$l(l,r,0,null),e=Er(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Hu(n),t.memoizedState=Vu,e):Yc(t,l));if(i=e.memoizedState,i!==null&&(u=i.dehydrated,u!==null))return dx(e,t,l,r,u,i,n);if(o){o=r.fallback,l=t.mode,i=e.child,u=i.sibling;var c={mode:"hidden",children:r.children};return!(l&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Qn(i,c),r.subtreeFlags=i.subtreeFlags&14680064),u!==null?o=Qn(u,o):(o=Er(o,l,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,l=e.child.memoizedState,l=l===null?Hu(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~n,t.memoizedState=Vu,r}return o=e.child,e=o.sibling,r=Qn(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Yc(e,t){return t=$l({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ts(e,t,n,r){return r!==null&&Dc(r),xi(t,e.child,null,n),e=Yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function dx(e,t,n,r,i,o,l){if(n)return t.flags&256?(t.flags&=-257,r=Ga(Error($(422))),Ts(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=$l({mode:"visible",children:r.children},i,0,null),o=Er(o,i,l,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&xi(t,e.child,null,l),t.child.memoizedState=Hu(l),t.memoizedState=Vu,o);if(!(t.mode&1))return Ts(e,t,l,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var u=r.dgst;return r=u,o=Error($(419)),r=Ga(o,r,void 0),Ts(e,t,l,r)}if(u=(l&e.childLanes)!==0,at||u){if(r=He,r!==null){switch(l&-l){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|l)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Sn(e,i),Xt(r,e,i,-1))}return ef(),r=Ga(Error($(421))),Ts(e,t,l,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Cx.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,wt=Wn(i.nextSibling),_t=t,Se=!0,Qt=null,e!==null&&(Lt[At++]=gn,Lt[At++]=vn,Lt[At++]=Pr,gn=e.id,vn=e.overflow,Pr=t),t=Yc(t,r.children),t.flags|=4096,t)}function Qp(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Mu(e.return,t,n)}function qa(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Og(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(rt(e,t,r.children,n),r=Ee.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qp(e,n,t);else if(e.tag===19)Qp(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ve(Ee,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&pl(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),qa(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&pl(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}qa(t,!0,n,null,o);break;case"together":qa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ks(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function kn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),jr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error($(153));if(t.child!==null){for(e=t.child,n=Qn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function px(e,t,n){switch(t.tag){case 3:bg(t),_i();break;case 5:eg(t);break;case 1:ct(t.type)&&ll(t);break;case 4:Fc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ve(cl,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ve(Ee,Ee.current&1),t.flags|=128,null):n&t.child.childLanes?Pg(e,t,n):(ve(Ee,Ee.current&1),e=kn(e,t,n),e!==null?e.sibling:null);ve(Ee,Ee.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Og(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ve(Ee,Ee.current),r)break;return null;case 22:case 23:return t.lanes=0,Eg(e,t,n)}return kn(e,t,n)}var jg,Ku,Tg,Ng;jg=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ku=function(){};Tg=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Sr(sn.current);var o=null;switch(n){case"input":i=hu(e,i),r=hu(e,r),o=[];break;case"select":i=Pe({},i,{value:void 0}),r=Pe({},r,{value:void 0}),o=[];break;case"textarea":i=vu(e,i),r=vu(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ol)}wu(n,r);var l;n=null;for(d in i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&i[d]!=null)if(d==="style"){var u=i[d];for(l in u)u.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(vo.hasOwnProperty(d)?o||(o=[]):(o=o||[]).push(d,null));for(d in r){var c=r[d];if(u=i!=null?i[d]:void 0,r.hasOwnProperty(d)&&c!==u&&(c!=null||u!=null))if(d==="style")if(u){for(l in u)!u.hasOwnProperty(l)||c&&c.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in c)c.hasOwnProperty(l)&&u[l]!==c[l]&&(n||(n={}),n[l]=c[l])}else n||(o||(o=[]),o.push(d,n)),n=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,u=u?u.__html:void 0,c!=null&&u!==c&&(o=o||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(vo.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&ye("scroll",e),o||u===c||(o=[])):(o=o||[]).push(d,c))}n&&(o=o||[]).push("style",n);var d=o;(t.updateQueue=d)&&(t.flags|=4)}};Ng=function(e,t,n,r){n!==r&&(t.flags|=4)};function Gi(e,t){if(!Se)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function hx(e,t,n){var r=t.pendingProps;switch(Ac(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return ct(t.type)&&sl(),Je(t),null;case 3:return r=t.stateNode,Si(),_e(ut),_e(qe),Uc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Os(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Qt!==null&&(ec(Qt),Qt=null))),Ku(e,t),Je(t),null;case 5:Bc(t);var i=Sr(jo.current);if(n=t.type,e!==null&&t.stateNode!=null)Tg(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error($(166));return Je(t),null}if(e=Sr(sn.current),Os(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[rn]=t,r[Po]=o,e=(t.mode&1)!==0,n){case"dialog":ye("cancel",r),ye("close",r);break;case"iframe":case"object":case"embed":ye("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[rn]=t,e[Po]=r,jg(e,t,!1,!1),t.stateNode=e;e:{switch(l=_u(n,r),n){case"dialog":ye("cancel",e),ye("close",e),i=r;break;case"iframe":case"object":case"embed":ye("load",e),i=r;break;case"video":case"audio":for(i=0;iEi&&(t.flags|=128,r=!0,Gi(o,!1),t.lanes=4194304)}else{if(!r)if(e=pl(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Gi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!Se)return Je(t),null}else 2*Ae()-o.renderingStartTime>Ei&&n!==1073741824&&(t.flags|=128,r=!0,Gi(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ae(),t.sibling=null,n=Ee.current,ve(Ee,r?n&1|2:n&1),t):(Je(t),null);case 22:case 23:return Zc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?yt&1073741824&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function mx(e,t){switch(Ac(t),t.tag){case 1:return ct(t.type)&&sl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Si(),_e(ut),_e(qe),Uc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Bc(t),null;case 13:if(_e(Ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));_i()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _e(Ee),null;case 4:return Si(),null;case 10:return Ic(t.type._context),null;case 22:case 23:return Zc(),null;case 24:return null;default:return null}}var Ns=!1,Ge=!1,gx=typeof WeakSet=="function"?WeakSet:Set,U=null;function ci(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Te(e,t,r)}else n.current=null}function Qu(e,t,n){try{n()}catch(r){Te(e,t,r)}}var Yp=!1;function vx(e,t){if(Tu=nl,e=$m(),Nc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var l=0,u=-1,c=-1,d=0,h=0,g=e,_=null;t:for(;;){for(var S;g!==n||i!==0&&g.nodeType!==3||(u=l+i),g!==o||r!==0&&g.nodeType!==3||(c=l+r),g.nodeType===3&&(l+=g.nodeValue.length),(S=g.firstChild)!==null;)_=g,g=S;for(;;){if(g===e)break t;if(_===n&&++d===i&&(u=l),_===o&&++h===r&&(c=l),(S=g.nextSibling)!==null)break;g=_,_=g.parentNode}g=S}n=u===-1||c===-1?null:{start:u,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Nu={focusedElem:e,selectionRange:n},nl=!1,U=t;U!==null;)if(t=U,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;try{var C=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(C!==null){var O=C.memoizedProps,P=C.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?O:Ht(t.type,O),P);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(b){Te(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return C=Yp,Yp=!1,C}function co(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Qu(t,n,o)}i=i.next}while(i!==r)}}function Dl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Yu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Lg(e){var t=e.alternate;t!==null&&(e.alternate=null,Lg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rn],delete t[Po],delete t[Du],delete t[Z_],delete t[ex])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ag(e){return e.tag===5||e.tag===3||e.tag===4}function Xp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ag(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ol));else if(r!==4&&(e=e.child,e!==null))for(Xu(e,t,n),e=e.sibling;e!==null;)Xu(e,t,n),e=e.sibling}function Ju(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&&(e=e.child,e!==null))for(Ju(e,t,n),e=e.sibling;e!==null;)Ju(e,t,n),e=e.sibling}var Ke=null,Kt=!1;function Ln(e,t,n){for(n=n.child;n!==null;)Dg(e,t,n),n=n.sibling}function Dg(e,t,n){if(on&&typeof on.onCommitFiberUnmount=="function")try{on.onCommitFiberUnmount(bl,n)}catch{}switch(n.tag){case 5:Ge||ci(n,t);case 6:var r=Ke,i=Kt;Ke=null,Ln(e,t,n),Ke=r,Kt=i,Ke!==null&&(Kt?(e=Ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ke.removeChild(n.stateNode));break;case 18:Ke!==null&&(Kt?(e=Ke,n=n.stateNode,e.nodeType===8?Ha(e.parentNode,n):e.nodeType===1&&Ha(e,n),So(e)):Ha(Ke,n.stateNode));break;case 4:r=Ke,i=Kt,Ke=n.stateNode.containerInfo,Kt=!0,Ln(e,t,n),Ke=r,Kt=i;break;case 0:case 11:case 14:case 15:if(!Ge&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&Qu(n,t,l),i=i.next}while(i!==r)}Ln(e,t,n);break;case 1:if(!Ge&&(ci(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Te(n,t,u)}Ln(e,t,n);break;case 21:Ln(e,t,n);break;case 22:n.mode&1?(Ge=(r=Ge)||n.memoizedState!==null,Ln(e,t,n),Ge=r):Ln(e,t,n);break;default:Ln(e,t,n)}}function Jp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new gx),t.forEach(function(r){var i=bx.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Vt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=l),r&=~o}if(r=i,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*wx(r/1960))-r,10e?16:e,Mn===null)var r=!1;else{if(e=Mn,Mn=null,yl=0,le&6)throw Error($(331));var i=le;for(le|=4,U=e.current;U!==null;){var o=U,l=o.child;if(U.flags&16){var u=o.deletions;if(u!==null){for(var c=0;cAe()-Gc?kr(e,0):Jc|=n),ft(e,t)}function Ug(e,t){t===0&&(e.mode&1?(t=Ss,Ss<<=1,!(Ss&130023424)&&(Ss=4194304)):t=1);var n=it();e=Sn(e,t),e!==null&&(zo(e,t,n),ft(e,n))}function Cx(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ug(e,n)}function bx(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error($(314))}r!==null&&r.delete(t),Ug(e,n)}var Wg;Wg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ut.current)at=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return at=!1,px(e,t,n);at=!!(e.flags&131072)}else at=!1,Se&&t.flags&1048576&&Qm(t,ul,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ks(e,t),e=t.pendingProps;var i=wi(t,qe.current);gi(t,n),i=Vc(null,t,r,e,i,n);var o=Hc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ct(r)?(o=!0,ll(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,zc(t),i.updater=Al,t.stateNode=i,i._reactInternals=t,Fu(t,r,e,n),t=Wu(null,t,r,!0,o,n)):(t.tag=0,Se&&o&&Lc(t),rt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ks(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Ox(r),e=Ht(r,e),i){case 0:t=Uu(null,t,r,e,n);break e;case 1:t=Hp(null,t,r,e,n);break e;case 11:t=Wp(null,t,r,e,n);break e;case 14:t=Vp(null,t,r,Ht(r.type,e),n);break e}throw Error($(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ht(r,i),Uu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ht(r,i),Hp(e,t,r,i,n);case 3:e:{if(bg(t),e===null)throw Error($(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Zm(e,t),dl(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=ki(Error($(423)),t),t=Kp(e,t,r,n,i);break e}else if(r!==i){i=ki(Error($(424)),t),t=Kp(e,t,r,n,i);break e}else for(wt=Wn(t.stateNode.containerInfo.firstChild),_t=t,Se=!0,Qt=null,n=Gm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(_i(),r===i){t=kn(e,t,n);break e}rt(e,t,r,n)}t=t.child}return t;case 5:return eg(t),e===null&&Iu(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Lu(r,i)?l=null:o!==null&&Lu(r,o)&&(t.flags|=32),Cg(e,t),rt(e,t,l,n),t.child;case 6:return e===null&&Iu(t),null;case 13:return Pg(e,t,n);case 4:return Fc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=xi(t,null,r,n):rt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ht(r,i),Wp(e,t,r,i,n);case 7:return rt(e,t,t.pendingProps,n),t.child;case 8:return rt(e,t,t.pendingProps.children,n),t.child;case 12:return rt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,ve(cl,r._currentValue),r._currentValue=l,o!==null)if(Jt(o.value,l)){if(o.children===i.children&&!ut.current){t=kn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){l=o.child;for(var c=u.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=yn(-1,n&-n),c.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var h=d.pending;h===null?c.next=c:(c.next=h.next,h.next=c),d.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Mu(o.return,n,t),u.lanes|=n;break}c=c.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error($(341));l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),Mu(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}rt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,gi(t,n),i=$t(i),r=r(i),t.flags|=1,rt(e,t,r,n),t.child;case 14:return r=t.type,i=Ht(r,t.pendingProps),i=Ht(r.type,i),Vp(e,t,r,i,n);case 15:return kg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ht(r,i),Ks(e,t),t.tag=1,ct(r)?(e=!0,ll(t)):e=!1,gi(t,n),_g(t,r,i),Fu(t,r,i,n),Wu(null,t,r,!0,e,n);case 19:return Og(e,t,n);case 22:return Eg(e,t,n)}throw Error($(156,t.tag))};function Vg(e,t){return vm(e,t)}function Px(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dt(e,t,n,r){return new Px(e,t,n,r)}function tf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ox(e){if(typeof e=="function")return tf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===_c)return 11;if(e===xc)return 14}return 2}function Qn(e,t){var n=e.alternate;return n===null?(n=Dt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Xs(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")tf(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case ti:return Er(n.children,i,o,t);case wc:l=8,i|=8;break;case cu:return e=Dt(12,n,t,i|2),e.elementType=cu,e.lanes=o,e;case fu:return e=Dt(13,n,t,i),e.elementType=fu,e.lanes=o,e;case du:return e=Dt(19,n,t,i),e.elementType=du,e.lanes=o,e;case em:return $l(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qh:l=10;break e;case Zh:l=9;break e;case _c:l=11;break e;case xc:l=14;break e;case An:l=16,r=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=Dt(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Er(e,t,n,r){return e=Dt(7,e,r,t),e.lanes=n,e}function $l(e,t,n,r){return e=Dt(22,e,r,t),e.elementType=em,e.lanes=n,e.stateNode={isHidden:!1},e}function Za(e,t,n){return e=Dt(6,e,null,t),e.lanes=n,e}function eu(e,t,n){return t=Dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jx(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Da(0),this.expirationTimes=Da(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Da(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function nf(e,t,n,r,i,o,l,u,c){return e=new jx(e,t,n,u,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Dt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},zc(o),e}function Tx(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Yg)}catch(e){console.error(e)}}Yg(),Yh.exports=kt;var Xg=Yh.exports;const RE=El(Xg);var ih=Xg;au.createRoot=ih.createRoot,au.hydrateRoot=ih.hydrateRoot;/** * @remix-run/router v1.23.2 * * Copyright (c) Remix Software Inc. @@ -47,7 +47,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Do(){return Do=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function sf(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function $x(){return Math.random().toString(36).substr(2,8)}function oh(e,t){return{usr:e.state,key:e.key,idx:t}}function tc(e,t,n,r){return n===void 0&&(n=null),Do({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Li(t):t,{state:n,key:t&&t.key||r||$x()})}function _l(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Li(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Rx(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,u=zn.Pop,c=null,d=h();d==null&&(d=0,l.replaceState(Do({},l.state,{idx:d}),""));function h(){return(l.state||{idx:null}).idx}function g(){u=zn.Pop;let P=h(),y=P==null?null:P-d;d=P,c&&c({action:u,location:O.location,delta:y})}function _(P,y){u=zn.Push;let v=tc(O.location,P,y);d=h()+1;let w=oh(v,d),b=O.createHref(v);try{l.pushState(w,"",b)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;i.location.assign(b)}o&&c&&c({action:u,location:O.location,delta:1})}function S(P,y){u=zn.Replace;let v=tc(O.location,P,y);d=h();let w=oh(v,d),b=O.createHref(v);l.replaceState(w,"",b),o&&c&&c({action:u,location:O.location,delta:0})}function C(P){let y=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof P=="string"?P:_l(P);return v=v.replace(/ $/,"%20"),be(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let O={get action(){return u},get location(){return e(i,l)},listen(P){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(ih,g),c=P,()=>{i.removeEventListener(ih,g),c=null}},createHref(P){return t(i,P)},createURL:C,encodeLocation(P){let y=C(P);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:_,replace:S,go(P){return l.go(P)}};return O}var sh;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(sh||(sh={}));function Ix(e,t,n){return n===void 0&&(n="/"),Mx(e,t,n)}function Mx(e,t,n,r){let i=typeof t=="string"?Li(t):t,o=Ei(i.pathname||"/",n);if(o==null)return null;let l=Xg(e);zx(l);let u=null;for(let c=0;u==null&&c{let c={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};c.relativePath.startsWith("/")&&(be(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let d=Yn([r,c.relativePath]),h=n.concat(c);o.children&&o.children.length>0&&(be(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),Xg(o.children,t,h,d)),!(o.path==null&&!o.index)&&t.push({path:d,score:Kx(d,o.index),routesMeta:h})};return e.forEach((o,l)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))i(o,l);else for(let c of Jg(o.path))i(o,l,c)}),t}function Jg(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let l=Jg(r.join("/")),u=[];return u.push(...l.map(c=>c===""?o:[o,c].join("/"))),i&&u.push(...l),u.map(c=>e.startsWith("/")&&c===""?"/":c)}function zx(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Qx(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Fx=/^:[\w-]+$/,Bx=3,Ux=2,Wx=1,Vx=10,Hx=-2,lh=e=>e==="*";function Kx(e,t){let n=e.split("/"),r=n.length;return n.some(lh)&&(r+=Hx),t&&(r+=Ux),n.filter(i=>!lh(i)).reduce((i,o)=>i+(Fx.test(o)?Bx:o===""?Wx:Vx),r)}function Qx(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Yx(e,t,n){let{routesMeta:r}=e,i={},o="/",l=[];for(let u=0;u{let{paramName:_,isOptional:S}=h;if(_==="*"){let O=u[g]||"";l=o.slice(0,o.length-O.length).replace(/(.)\/+$/,"$1")}const C=u[g];return S&&!C?d[_]=void 0:d[_]=(C||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:l,pattern:e}}function Xx(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),sf(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,c)=>(r.push({paramName:u,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Jx(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return sf(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ei(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Gx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,qx=e=>Gx.test(e);function Zx(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Li(e):e,o;if(n)if(qx(n))o=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),sf(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+n))}n.startsWith("/")?o=ah(n.substring(1),"/"):o=ah(n,t)}else o=t;return{pathname:o,search:nS(r),hash:rS(i)}}function ah(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function tu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function eS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function lf(e,t){let n=eS(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function af(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Li(e):(i=Do({},e),be(!i.pathname||!i.pathname.includes("?"),tu("?","pathname","search",i)),be(!i.pathname||!i.pathname.includes("#"),tu("#","pathname","hash",i)),be(!i.search||!i.search.includes("#"),tu("#","search","hash",i)));let o=e===""||i.pathname==="",l=o?"/":i.pathname,u;if(l==null)u=n;else{let g=t.length-1;if(!r&&l.startsWith("..")){let _=l.split("/");for(;_[0]==="..";)_.shift(),g-=1;i.pathname=_.join("/")}u=g>=0?t[g]:"/"}let c=Zx(i,u),d=l&&l!=="/"&&l.endsWith("/"),h=(o||l===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||h)&&(c.pathname+="/"),c}const Yn=e=>e.join("/").replace(/\/\/+/g,"/"),tS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),nS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,rS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function iS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Gg=["post","put","patch","delete"];new Set(Gg);const oS=["get",...Gg];new Set(oS);/** + */function Do(){return Do=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function lf(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function $x(){return Math.random().toString(36).substr(2,8)}function sh(e,t){return{usr:e.state,key:e.key,idx:t}}function tc(e,t,n,r){return n===void 0&&(n=null),Do({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ai(t):t,{state:n,key:t&&t.key||r||$x()})}function xl(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ai(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Ix(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,u=zn.Pop,c=null,d=h();d==null&&(d=0,l.replaceState(Do({},l.state,{idx:d}),""));function h(){return(l.state||{idx:null}).idx}function g(){u=zn.Pop;let P=h(),y=P==null?null:P-d;d=P,c&&c({action:u,location:O.location,delta:y})}function _(P,y){u=zn.Push;let v=tc(O.location,P,y);d=h()+1;let w=sh(v,d),b=O.createHref(v);try{l.pushState(w,"",b)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;i.location.assign(b)}o&&c&&c({action:u,location:O.location,delta:1})}function S(P,y){u=zn.Replace;let v=tc(O.location,P,y);d=h();let w=sh(v,d),b=O.createHref(v);l.replaceState(w,"",b),o&&c&&c({action:u,location:O.location,delta:0})}function C(P){let y=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof P=="string"?P:xl(P);return v=v.replace(/ $/,"%20"),be(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let O={get action(){return u},get location(){return e(i,l)},listen(P){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(oh,g),c=P,()=>{i.removeEventListener(oh,g),c=null}},createHref(P){return t(i,P)},createURL:C,encodeLocation(P){let y=C(P);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:_,replace:S,go(P){return l.go(P)}};return O}var lh;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(lh||(lh={}));function Mx(e,t,n){return n===void 0&&(n="/"),zx(e,t,n)}function zx(e,t,n,r){let i=typeof t=="string"?Ai(t):t,o=Ci(i.pathname||"/",n);if(o==null)return null;let l=Jg(e);Fx(l);let u=null;for(let c=0;u==null&&c{let c={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};c.relativePath.startsWith("/")&&(be(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let d=Yn([r,c.relativePath]),h=n.concat(c);o.children&&o.children.length>0&&(be(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),Jg(o.children,t,h,d)),!(o.path==null&&!o.index)&&t.push({path:d,score:Qx(d,o.index),routesMeta:h})};return e.forEach((o,l)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))i(o,l);else for(let c of Gg(o.path))i(o,l,c)}),t}function Gg(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let l=Gg(r.join("/")),u=[];return u.push(...l.map(c=>c===""?o:[o,c].join("/"))),i&&u.push(...l),u.map(c=>e.startsWith("/")&&c===""?"/":c)}function Fx(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Yx(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Bx=/^:[\w-]+$/,Ux=3,Wx=2,Vx=1,Hx=10,Kx=-2,ah=e=>e==="*";function Qx(e,t){let n=e.split("/"),r=n.length;return n.some(ah)&&(r+=Kx),t&&(r+=Wx),n.filter(i=>!ah(i)).reduce((i,o)=>i+(Bx.test(o)?Ux:o===""?Vx:Hx),r)}function Yx(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Xx(e,t,n){let{routesMeta:r}=e,i={},o="/",l=[];for(let u=0;u{let{paramName:_,isOptional:S}=h;if(_==="*"){let O=u[g]||"";l=o.slice(0,o.length-O.length).replace(/(.)\/+$/,"$1")}const C=u[g];return S&&!C?d[_]=void 0:d[_]=(C||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:l,pattern:e}}function Jx(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),lf(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,c)=>(r.push({paramName:u,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Gx(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return lf(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ci(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const qx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Zx=e=>qx.test(e);function eS(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Ai(e):e,o;if(n)if(Zx(n))o=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),lf(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+n))}n.startsWith("/")?o=uh(n.substring(1),"/"):o=uh(n,t)}else o=t;return{pathname:o,search:rS(r),hash:iS(i)}}function uh(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function tu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function tS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function af(e,t){let n=tS(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function uf(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Ai(e):(i=Do({},e),be(!i.pathname||!i.pathname.includes("?"),tu("?","pathname","search",i)),be(!i.pathname||!i.pathname.includes("#"),tu("#","pathname","hash",i)),be(!i.search||!i.search.includes("#"),tu("#","search","hash",i)));let o=e===""||i.pathname==="",l=o?"/":i.pathname,u;if(l==null)u=n;else{let g=t.length-1;if(!r&&l.startsWith("..")){let _=l.split("/");for(;_[0]==="..";)_.shift(),g-=1;i.pathname=_.join("/")}u=g>=0?t[g]:"/"}let c=eS(i,u),d=l&&l!=="/"&&l.endsWith("/"),h=(o||l===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||h)&&(c.pathname+="/"),c}const Yn=e=>e.join("/").replace(/\/\/+/g,"/"),nS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),rS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,iS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function oS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const qg=["post","put","patch","delete"];new Set(qg);const sS=["get",...qg];new Set(sS);/** * React Router v6.30.3 * * Copyright (c) Remix Software Inc. @@ -56,7 +56,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function $o(){return $o=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current=!0}),x.useCallback(function(d,h){if(h===void 0&&(h={}),!u.current)return;if(typeof d=="number"){r.go(d);return}let g=af(d,JSON.parse(l),o,h.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Yn([t,g.pathname])),(h.replace?r.replace:r.push)(g,h.state,h)},[t,r,l,o,e])}const aS=x.createContext(null);function uS(e){let t=x.useContext(Pn).outlet;return t&&x.createElement(aS.Provider,{value:e},t)}function Wl(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(bn),{matches:i}=x.useContext(Pn),{pathname:o}=Di(),l=JSON.stringify(lf(i,r.v7_relativeSplatPath));return x.useMemo(()=>af(e,JSON.parse(l),o,n==="path"),[e,l,o,n])}function cS(e,t){return fS(e,t)}function fS(e,t,n,r){Ai()||be(!1);let{navigator:i}=x.useContext(bn),{matches:o}=x.useContext(Pn),l=o[o.length-1],u=l?l.params:{};l&&l.pathname;let c=l?l.pathnameBase:"/";l&&l.route;let d=Di(),h;if(t){var g;let P=typeof t=="string"?Li(t):t;c==="/"||(g=P.pathname)!=null&&g.startsWith(c)||be(!1),h=P}else h=d;let _=h.pathname||"/",S=_;if(c!=="/"){let P=c.replace(/^\//,"").split("/");S="/"+_.replace(/^\//,"").split("/").slice(P.length).join("/")}let C=Ix(e,{pathname:S}),O=gS(C&&C.map(P=>Object.assign({},P,{params:Object.assign({},u,P.params),pathname:Yn([c,i.encodeLocation?i.encodeLocation(P.pathname).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?c:Yn([c,i.encodeLocation?i.encodeLocation(P.pathnameBase).pathname:P.pathnameBase])})),o,n,r);return t&&O?x.createElement(Bl.Provider,{value:{location:$o({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:zn.Pop}},O):O}function dS(){let e=_S(),t=iS(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:i},n):null,null)}const pS=x.createElement(dS,null);class hS extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?x.createElement(Pn.Provider,{value:this.props.routeContext},x.createElement(Zg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function mS(e){let{routeContext:t,match:n,children:r}=e,i=x.useContext(Fl);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(Pn.Provider,{value:t},r)}function gS(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,u=(i=n)==null?void 0:i.errors;if(u!=null){let h=l.findIndex(g=>g.route.id&&(u==null?void 0:u[g.route.id])!==void 0);h>=0||be(!1),l=l.slice(0,Math.min(l.length,h+1))}let c=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h=0?l=l.slice(0,d+1):l=[l[0]];break}}}return l.reduceRight((h,g,_)=>{let S,C=!1,O=null,P=null;n&&(S=u&&g.route.id?u[g.route.id]:void 0,O=g.route.errorElement||pS,c&&(d<0&&_===0?(SS("route-fallback"),C=!0,P=null):d===_&&(C=!0,P=g.route.hydrateFallbackElement||null)));let y=t.concat(l.slice(0,_+1)),v=()=>{let w;return S?w=O:C?w=P:g.route.Component?w=x.createElement(g.route.Component,null):g.route.element?w=g.route.element:w=h,x.createElement(mS,{match:g,routeContext:{outlet:h,matches:y,isDataRoute:n!=null},children:w})};return n&&(g.route.ErrorBoundary||g.route.errorElement||_===0)?x.createElement(hS,{location:n.location,revalidation:n.revalidation,component:O,error:S,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}var tv=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(tv||{}),nv=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(nv||{});function vS(e){let t=x.useContext(Fl);return t||be(!1),t}function yS(e){let t=x.useContext(qg);return t||be(!1),t}function wS(e){let t=x.useContext(Pn);return t||be(!1),t}function rv(e){let t=wS(),n=t.matches[t.matches.length-1];return n.route.id||be(!1),n.route.id}function _S(){var e;let t=x.useContext(Zg),n=yS(),r=rv();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function xS(){let{router:e}=vS(tv.UseNavigateStable),t=rv(nv.UseNavigateStable),n=x.useRef(!1);return ev(()=>{n.current=!0}),x.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,$o({fromRouteId:t},o)))},[e,t])}const uh={};function SS(e,t,n){uh[e]||(uh[e]=!0)}function kS(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function iv(e){let{to:t,replace:n,state:r,relative:i}=e;Ai()||be(!1);let{future:o,static:l}=x.useContext(bn),{matches:u}=x.useContext(Pn),{pathname:c}=Di(),d=Ul(),h=af(t,lf(u,o.v7_relativeSplatPath),c,i==="path"),g=JSON.stringify(h);return x.useEffect(()=>d(JSON.parse(g),{replace:n,state:r,relative:i}),[d,g,i,n,r]),null}function ES(e){return uS(e.context)}function we(e){be(!1)}function CS(e){let{basename:t="/",children:n=null,location:r,navigationType:i=zn.Pop,navigator:o,static:l=!1,future:u}=e;Ai()&&be(!1);let c=t.replace(/^\/*/,"/"),d=x.useMemo(()=>({basename:c,navigator:o,static:l,future:$o({v7_relativeSplatPath:!1},u)}),[c,u,o,l]);typeof r=="string"&&(r=Li(r));let{pathname:h="/",search:g="",hash:_="",state:S=null,key:C="default"}=r,O=x.useMemo(()=>{let P=Ei(h,c);return P==null?null:{location:{pathname:P,search:g,hash:_,state:S,key:C},navigationType:i}},[c,h,g,_,S,C,i]);return O==null?null:x.createElement(bn.Provider,{value:d},x.createElement(Bl.Provider,{children:n,value:O}))}function bS(e){let{children:t,location:n}=e;return cS(rc(t),n)}new Promise(()=>{});function rc(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,i)=>{if(!x.isValidElement(r))return;let o=[...t,i];if(r.type===x.Fragment){n.push.apply(n,rc(r.props.children,o));return}r.type!==we&&be(!1),!r.props.index||!r.props.children||be(!1);let l={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=rc(r.props.children,o)),n.push(l)}),n}/** + */function Ro(){return Ro=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current=!0}),x.useCallback(function(d,h){if(h===void 0&&(h={}),!u.current)return;if(typeof d=="number"){r.go(d);return}let g=uf(d,JSON.parse(l),o,h.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Yn([t,g.pathname])),(h.replace?r.replace:r.push)(g,h.state,h)},[t,r,l,o,e])}const uS=x.createContext(null);function cS(e){let t=x.useContext(Pn).outlet;return t&&x.createElement(uS.Provider,{value:e},t)}function Wl(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(bn),{matches:i}=x.useContext(Pn),{pathname:o}=Dr(),l=JSON.stringify(af(i,r.v7_relativeSplatPath));return x.useMemo(()=>uf(e,JSON.parse(l),o,n==="path"),[e,l,o,n])}function fS(e,t){return dS(e,t)}function dS(e,t,n,r){Di()||be(!1);let{navigator:i}=x.useContext(bn),{matches:o}=x.useContext(Pn),l=o[o.length-1],u=l?l.params:{};l&&l.pathname;let c=l?l.pathnameBase:"/";l&&l.route;let d=Dr(),h;if(t){var g;let P=typeof t=="string"?Ai(t):t;c==="/"||(g=P.pathname)!=null&&g.startsWith(c)||be(!1),h=P}else h=d;let _=h.pathname||"/",S=_;if(c!=="/"){let P=c.replace(/^\//,"").split("/");S="/"+_.replace(/^\//,"").split("/").slice(P.length).join("/")}let C=Mx(e,{pathname:S}),O=vS(C&&C.map(P=>Object.assign({},P,{params:Object.assign({},u,P.params),pathname:Yn([c,i.encodeLocation?i.encodeLocation(P.pathname).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?c:Yn([c,i.encodeLocation?i.encodeLocation(P.pathnameBase).pathname:P.pathnameBase])})),o,n,r);return t&&O?x.createElement(Ul.Provider,{value:{location:Ro({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:zn.Pop}},O):O}function pS(){let e=xS(),t=oS(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:i},n):null,null)}const hS=x.createElement(pS,null);class mS extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?x.createElement(Pn.Provider,{value:this.props.routeContext},x.createElement(ev.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function gS(e){let{routeContext:t,match:n,children:r}=e,i=x.useContext(Bl);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(Pn.Provider,{value:t},r)}function vS(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,u=(i=n)==null?void 0:i.errors;if(u!=null){let h=l.findIndex(g=>g.route.id&&(u==null?void 0:u[g.route.id])!==void 0);h>=0||be(!1),l=l.slice(0,Math.min(l.length,h+1))}let c=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h=0?l=l.slice(0,d+1):l=[l[0]];break}}}return l.reduceRight((h,g,_)=>{let S,C=!1,O=null,P=null;n&&(S=u&&g.route.id?u[g.route.id]:void 0,O=g.route.errorElement||hS,c&&(d<0&&_===0?(kS("route-fallback"),C=!0,P=null):d===_&&(C=!0,P=g.route.hydrateFallbackElement||null)));let y=t.concat(l.slice(0,_+1)),v=()=>{let w;return S?w=O:C?w=P:g.route.Component?w=x.createElement(g.route.Component,null):g.route.element?w=g.route.element:w=h,x.createElement(gS,{match:g,routeContext:{outlet:h,matches:y,isDataRoute:n!=null},children:w})};return n&&(g.route.ErrorBoundary||g.route.errorElement||_===0)?x.createElement(mS,{location:n.location,revalidation:n.revalidation,component:O,error:S,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}var nv=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(nv||{}),rv=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(rv||{});function yS(e){let t=x.useContext(Bl);return t||be(!1),t}function wS(e){let t=x.useContext(Zg);return t||be(!1),t}function _S(e){let t=x.useContext(Pn);return t||be(!1),t}function iv(e){let t=_S(),n=t.matches[t.matches.length-1];return n.route.id||be(!1),n.route.id}function xS(){var e;let t=x.useContext(ev),n=wS(),r=iv();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function SS(){let{router:e}=yS(nv.UseNavigateStable),t=iv(rv.UseNavigateStable),n=x.useRef(!1);return tv(()=>{n.current=!0}),x.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Ro({fromRouteId:t},o)))},[e,t])}const ch={};function kS(e,t,n){ch[e]||(ch[e]=!0)}function ES(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function ov(e){let{to:t,replace:n,state:r,relative:i}=e;Di()||be(!1);let{future:o,static:l}=x.useContext(bn),{matches:u}=x.useContext(Pn),{pathname:c}=Dr(),d=Wo(),h=uf(t,af(u,o.v7_relativeSplatPath),c,i==="path"),g=JSON.stringify(h);return x.useEffect(()=>d(JSON.parse(g),{replace:n,state:r,relative:i}),[d,g,i,n,r]),null}function CS(e){return cS(e.context)}function we(e){be(!1)}function bS(e){let{basename:t="/",children:n=null,location:r,navigationType:i=zn.Pop,navigator:o,static:l=!1,future:u}=e;Di()&&be(!1);let c=t.replace(/^\/*/,"/"),d=x.useMemo(()=>({basename:c,navigator:o,static:l,future:Ro({v7_relativeSplatPath:!1},u)}),[c,u,o,l]);typeof r=="string"&&(r=Ai(r));let{pathname:h="/",search:g="",hash:_="",state:S=null,key:C="default"}=r,O=x.useMemo(()=>{let P=Ci(h,c);return P==null?null:{location:{pathname:P,search:g,hash:_,state:S,key:C},navigationType:i}},[c,h,g,_,S,C,i]);return O==null?null:x.createElement(bn.Provider,{value:d},x.createElement(Ul.Provider,{children:n,value:O}))}function PS(e){let{children:t,location:n}=e;return fS(rc(t),n)}new Promise(()=>{});function rc(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,i)=>{if(!x.isValidElement(r))return;let o=[...t,i];if(r.type===x.Fragment){n.push.apply(n,rc(r.props.children,o));return}r.type!==we&&be(!1),!r.props.index||!r.props.children||be(!1);let l={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=rc(r.props.children,o)),n.push(l)}),n}/** * React Router DOM v6.30.3 * * Copyright (c) Remix Software Inc. @@ -65,12 +65,12 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function xl(){return xl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function PS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function OS(e,t){return e.button===0&&(!t||t==="_self")&&!PS(e)}const jS=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],TS=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],NS="6";try{window.__reactRouterVersion=NS}catch{}const LS=x.createContext({isTransitioning:!1}),AS="startTransition",ch=k0[AS];function DS(e){let{basename:t,children:n,future:r,window:i}=e,o=x.useRef();o.current==null&&(o.current=Dx({window:i,v5Compat:!0}));let l=o.current,[u,c]=x.useState({action:l.action,location:l.location}),{v7_startTransition:d}=r||{},h=x.useCallback(g=>{d&&ch?ch(()=>c(g)):c(g)},[c,d]);return x.useLayoutEffect(()=>l.listen(h),[l,h]),x.useEffect(()=>kS(r),[r]),x.createElement(CS,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:l,future:r})}const $S=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",RS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sv=x.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:l,state:u,target:c,to:d,preventScrollReset:h,viewTransition:g}=t,_=ov(t,jS),{basename:S}=x.useContext(bn),C,O=!1;if(typeof d=="string"&&RS.test(d)&&(C=d,$S))try{let w=new URL(window.location.href),b=d.startsWith("//")?new URL(w.protocol+d):new URL(d),N=Ei(b.pathname,S);b.origin===w.origin&&N!=null?d=N+b.search+b.hash:O=!0}catch{}let P=sS(d,{relative:i}),y=MS(d,{replace:l,state:u,target:c,preventScrollReset:h,relative:i,viewTransition:g});function v(w){r&&r(w),w.defaultPrevented||y(w)}return x.createElement("a",xl({},_,{href:C||P,onClick:O||o?r:v,ref:n,target:c}))}),As=x.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:l=!1,style:u,to:c,viewTransition:d,children:h}=t,g=ov(t,TS),_=Wl(c,{relative:g.relative}),S=Di(),C=x.useContext(qg),{navigator:O,basename:P}=x.useContext(bn),y=C!=null&&zS(_)&&d===!0,v=O.encodeLocation?O.encodeLocation(_).pathname:_.pathname,w=S.pathname,b=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;i||(w=w.toLowerCase(),b=b?b.toLowerCase():null,v=v.toLowerCase()),b&&P&&(b=Ei(b,P)||b);const N=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let A=w===v||!l&&w.startsWith(v)&&w.charAt(N)==="/",D=b!=null&&(b===v||!l&&b.startsWith(v)&&b.charAt(v.length)==="/"),$={isActive:A,isPending:D,isTransitioning:y},H=A?r:void 0,F;typeof o=="function"?F=o($):F=[o,A?"active":null,D?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let Y=typeof u=="function"?u($):u;return x.createElement(sv,xl({},g,{"aria-current":H,className:F,ref:n,style:Y,to:c,viewTransition:d}),typeof h=="function"?h($):h)});var ic;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ic||(ic={}));var fh;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(fh||(fh={}));function IS(e){let t=x.useContext(Fl);return t||be(!1),t}function MS(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:l,viewTransition:u}=t===void 0?{}:t,c=Ul(),d=Di(),h=Wl(e,{relative:l});return x.useCallback(g=>{if(OS(g,n)){g.preventDefault();let _=r!==void 0?r:_l(d)===_l(h);c(e,{replace:_,state:i,preventScrollReset:o,relative:l,viewTransition:u})}},[d,c,h,r,i,n,e,o,l,u])}function zS(e,t){t===void 0&&(t={});let n=x.useContext(LS);n==null&&be(!1);let{basename:r}=IS(ic.useViewTransitionState),i=Wl(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Ei(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Ei(n.nextLocation.pathname,r)||n.nextLocation.pathname;return nc(i.pathname,l)!=null||nc(i.pathname,o)!=null}var FS={exports:{}};/*! + */function Sl(){return Sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function OS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function jS(e,t){return e.button===0&&(!t||t==="_self")&&!OS(e)}function ic(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function TS(e,t){let n=ic(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const NS=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],LS=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],AS="6";try{window.__reactRouterVersion=AS}catch{}const DS=x.createContext({isTransitioning:!1}),RS="startTransition",fh=E0[RS];function $S(e){let{basename:t,children:n,future:r,window:i}=e,o=x.useRef();o.current==null&&(o.current=Rx({window:i,v5Compat:!0}));let l=o.current,[u,c]=x.useState({action:l.action,location:l.location}),{v7_startTransition:d}=r||{},h=x.useCallback(g=>{d&&fh?fh(()=>c(g)):c(g)},[c,d]);return x.useLayoutEffect(()=>l.listen(h),[l,h]),x.useEffect(()=>ES(r),[r]),x.createElement(bS,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:l,future:r})}const IS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",MS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,lv=x.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:l,state:u,target:c,to:d,preventScrollReset:h,viewTransition:g}=t,_=sv(t,NS),{basename:S}=x.useContext(bn),C,O=!1;if(typeof d=="string"&&MS.test(d)&&(C=d,IS))try{let w=new URL(window.location.href),b=d.startsWith("//")?new URL(w.protocol+d):new URL(d),N=Ci(b.pathname,S);b.origin===w.origin&&N!=null?d=N+b.search+b.hash:O=!0}catch{}let P=lS(d,{relative:i}),y=FS(d,{replace:l,state:u,target:c,preventScrollReset:h,relative:i,viewTransition:g});function v(w){r&&r(w),w.defaultPrevented||y(w)}return x.createElement("a",Sl({},_,{href:C||P,onClick:O||o?r:v,ref:n,target:c}))}),Ds=x.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:l=!1,style:u,to:c,viewTransition:d,children:h}=t,g=sv(t,LS),_=Wl(c,{relative:g.relative}),S=Dr(),C=x.useContext(Zg),{navigator:O,basename:P}=x.useContext(bn),y=C!=null&&BS(_)&&d===!0,v=O.encodeLocation?O.encodeLocation(_).pathname:_.pathname,w=S.pathname,b=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;i||(w=w.toLowerCase(),b=b?b.toLowerCase():null,v=v.toLowerCase()),b&&P&&(b=Ci(b,P)||b);const N=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let A=w===v||!l&&w.startsWith(v)&&w.charAt(N)==="/",D=b!=null&&(b===v||!l&&b.startsWith(v)&&b.charAt(v.length)==="/"),R={isActive:A,isPending:D,isTransitioning:y},K=A?r:void 0,F;typeof o=="function"?F=o(R):F=[o,A?"active":null,D?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let Y=typeof u=="function"?u(R):u;return x.createElement(lv,Sl({},g,{"aria-current":K,className:F,ref:n,style:Y,to:c,viewTransition:d}),typeof h=="function"?h(R):h)});var oc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(oc||(oc={}));var dh;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(dh||(dh={}));function zS(e){let t=x.useContext(Bl);return t||be(!1),t}function FS(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:l,viewTransition:u}=t===void 0?{}:t,c=Wo(),d=Dr(),h=Wl(e,{relative:l});return x.useCallback(g=>{if(jS(g,n)){g.preventDefault();let _=r!==void 0?r:xl(d)===xl(h);c(e,{replace:_,state:i,preventScrollReset:o,relative:l,viewTransition:u})}},[d,c,h,r,i,n,e,o,l,u])}function $E(e){let t=x.useRef(ic(e)),n=x.useRef(!1),r=Dr(),i=x.useMemo(()=>TS(r.search,n.current?null:t.current),[r.search]),o=Wo(),l=x.useCallback((u,c)=>{const d=ic(typeof u=="function"?u(i):u);n.current=!0,o("?"+d,c)},[o,i]);return[i,l]}function BS(e,t){t===void 0&&(t={});let n=x.useContext(DS);n==null&&be(!1);let{basename:r}=zS(oc.useViewTransitionState),i=Wl(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Ci(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Ci(n.nextLocation.pathname,r)||n.nextLocation.pathname;return nc(i.pathname,l)!=null||nc(i.pathname,o)!=null}var US={exports:{}};/*! * Bootstrap v5.3.8 (https://getbootstrap.com/) * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - */(function(e,t){(function(n,r){e.exports=r()})(l0,function(){const n=new Map,r={set(f,s,a){n.has(f)||n.set(f,new Map);const p=n.get(f);p.has(s)||p.size===0?p.set(s,a):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(p.keys())[0]}.`)},get:(f,s)=>n.has(f)&&n.get(f).get(s)||null,remove(f,s){if(!n.has(f))return;const a=n.get(f);a.delete(s),a.size===0&&n.delete(f)}},i="transitionend",o=f=>(f&&window.CSS&&window.CSS.escape&&(f=f.replace(/#([^\s"#']+)/g,(s,a)=>`#${CSS.escape(a)}`)),f),l=f=>f==null?`${f}`:Object.prototype.toString.call(f).match(/\s([a-z]+)/i)[1].toLowerCase(),u=f=>{f.dispatchEvent(new Event(i))},c=f=>!(!f||typeof f!="object")&&(f.jquery!==void 0&&(f=f[0]),f.nodeType!==void 0),d=f=>c(f)?f.jquery?f[0]:f:typeof f=="string"&&f.length>0?document.querySelector(o(f)):null,h=f=>{if(!c(f)||f.getClientRects().length===0)return!1;const s=getComputedStyle(f).getPropertyValue("visibility")==="visible",a=f.closest("details:not([open])");if(!a)return s;if(a!==f){const p=f.closest("summary");if(p&&p.parentNode!==a||p===null)return!1}return s},g=f=>!f||f.nodeType!==Node.ELEMENT_NODE||!!f.classList.contains("disabled")||(f.disabled!==void 0?f.disabled:f.hasAttribute("disabled")&&f.getAttribute("disabled")!=="false"),_=f=>{if(!document.documentElement.attachShadow)return null;if(typeof f.getRootNode=="function"){const s=f.getRootNode();return s instanceof ShadowRoot?s:null}return f instanceof ShadowRoot?f:f.parentNode?_(f.parentNode):null},S=()=>{},C=f=>{f.offsetHeight},O=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,P=[],y=()=>document.documentElement.dir==="rtl",v=f=>{var s;s=()=>{const a=O();if(a){const p=f.NAME,k=a.fn[p];a.fn[p]=f.jQueryInterface,a.fn[p].Constructor=f,a.fn[p].noConflict=()=>(a.fn[p]=k,f.jQueryInterface)}},document.readyState==="loading"?(P.length||document.addEventListener("DOMContentLoaded",()=>{for(const a of P)a()}),P.push(s)):s()},w=(f,s=[],a=f)=>typeof f=="function"?f.call(...s):a,b=(f,s,a=!0)=>{if(!a)return void w(f);const p=(j=>{if(!j)return 0;let{transitionDuration:L,transitionDelay:I}=window.getComputedStyle(j);const B=Number.parseFloat(L),W=Number.parseFloat(I);return B||W?(L=L.split(",")[0],I=I.split(",")[0],1e3*(Number.parseFloat(L)+Number.parseFloat(I))):0})(s)+5;let k=!1;const E=({target:j})=>{j===s&&(k=!0,s.removeEventListener(i,E),w(f))};s.addEventListener(i,E),setTimeout(()=>{k||u(s)},p)},N=(f,s,a,p)=>{const k=f.length;let E=f.indexOf(s);return E===-1?!a&&p?f[k-1]:f[0]:(E+=a?1:-1,p&&(E=(E+k)%k),f[Math.max(0,Math.min(E,k-1))])},A=/[^.]*(?=\..*)\.|.*/,D=/\..*/,$=/::\d+$/,H={};let F=1;const Y={mouseenter:"mouseover",mouseleave:"mouseout"},ee=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function ne(f,s){return s&&`${s}::${F++}`||f.uidEvent||F++}function xe(f){const s=ne(f);return f.uidEvent=s,H[s]=H[s]||{},H[s]}function De(f,s,a=null){return Object.values(f).find(p=>p.callable===s&&p.delegationSelector===a)}function ke(f,s,a){const p=typeof s=="string",k=p?a:s||a;let E=V(f);return ee.has(E)||(E=f),[p,k,E]}function $e(f,s,a,p,k){if(typeof s!="string"||!f)return;let[E,j,L]=ke(s,a,p);s in Y&&(j=(q=>function(G){if(!G.relatedTarget||G.relatedTarget!==G.delegateTarget&&!G.delegateTarget.contains(G.relatedTarget))return q.call(this,G)})(j));const I=xe(f),B=I[L]||(I[L]={}),W=De(B,j,E?a:null);if(W)return void(W.oneOff=W.oneOff&&k);const z=ne(j,s.replace(A,"")),te=E?function(J,q,G){return function Z(pe){const ge=J.querySelectorAll(q);for(let{target:ie}=pe;ie&&ie!==this;ie=ie.parentNode)for(const ae of ge)if(ae===ie)return de(pe,{delegateTarget:ie}),Z.oneOff&&T.off(J,pe.type,q,G),G.apply(ie,[pe])}}(f,a,j):function(J,q){return function G(Z){return de(Z,{delegateTarget:J}),G.oneOff&&T.off(J,Z.type,q),q.apply(J,[Z])}}(f,j);te.delegationSelector=E?a:null,te.callable=j,te.oneOff=k,te.uidEvent=z,B[z]=te,f.addEventListener(L,te,E)}function M(f,s,a,p,k){const E=De(s[a],p,k);E&&(f.removeEventListener(a,E,!!k),delete s[a][E.uidEvent])}function X(f,s,a,p){const k=s[a]||{};for(const[E,j]of Object.entries(k))E.includes(p)&&M(f,s,a,j.callable,j.delegationSelector)}function V(f){return f=f.replace(D,""),Y[f]||f}const T={on(f,s,a,p){$e(f,s,a,p,!1)},one(f,s,a,p){$e(f,s,a,p,!0)},off(f,s,a,p){if(typeof s!="string"||!f)return;const[k,E,j]=ke(s,a,p),L=j!==s,I=xe(f),B=I[j]||{},W=s.startsWith(".");if(E===void 0){if(W)for(const z of Object.keys(I))X(f,I,z,s.slice(1));for(const[z,te]of Object.entries(B)){const J=z.replace($,"");L&&!s.includes(J)||M(f,I,j,te.callable,te.delegationSelector)}}else{if(!Object.keys(B).length)return;M(f,I,j,E,k?a:null)}},trigger(f,s,a){if(typeof s!="string"||!f)return null;const p=O();let k=null,E=!0,j=!0,L=!1;s!==V(s)&&p&&(k=p.Event(s,a),p(f).trigger(k),E=!k.isPropagationStopped(),j=!k.isImmediatePropagationStopped(),L=k.isDefaultPrevented());const I=de(new Event(s,{bubbles:E,cancelable:!0}),a);return L&&I.preventDefault(),j&&f.dispatchEvent(I),I.defaultPrevented&&k&&k.preventDefault(),I}};function de(f,s={}){for(const[a,p]of Object.entries(s))try{f[a]=p}catch{Object.defineProperty(f,a,{configurable:!0,get:()=>p})}return f}function Ct(f){if(f==="true")return!0;if(f==="false")return!1;if(f===Number(f).toString())return Number(f);if(f===""||f==="null")return null;if(typeof f!="string")return f;try{return JSON.parse(decodeURIComponent(f))}catch{return f}}function Ue(f){return f.replace(/[A-Z]/g,s=>`-${s.toLowerCase()}`)}const Oe={setDataAttribute(f,s,a){f.setAttribute(`data-bs-${Ue(s)}`,a)},removeDataAttribute(f,s){f.removeAttribute(`data-bs-${Ue(s)}`)},getDataAttributes(f){if(!f)return{};const s={},a=Object.keys(f.dataset).filter(p=>p.startsWith("bs")&&!p.startsWith("bsConfig"));for(const p of a){let k=p.replace(/^bs/,"");k=k.charAt(0).toLowerCase()+k.slice(1),s[k]=Ct(f.dataset[p])}return s},getDataAttribute:(f,s)=>Ct(f.getAttribute(`data-bs-${Ue(s)}`))};class ze{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(s){return s=this._mergeConfigObj(s),s=this._configAfterMerge(s),this._typeCheckConfig(s),s}_configAfterMerge(s){return s}_mergeConfigObj(s,a){const p=c(a)?Oe.getDataAttribute(a,"config"):{};return{...this.constructor.Default,...typeof p=="object"?p:{},...c(a)?Oe.getDataAttributes(a):{},...typeof s=="object"?s:{}}}_typeCheckConfig(s,a=this.constructor.DefaultType){for(const[p,k]of Object.entries(a)){const E=s[p],j=c(E)?"element":l(E);if(!new RegExp(k).test(j))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${p}" provided type "${j}" but expected type "${k}".`)}}}class Ne extends ze{constructor(s,a){super(),(s=d(s))&&(this._element=s,this._config=this._getConfig(a),r.set(this._element,this.constructor.DATA_KEY,this))}dispose(){r.remove(this._element,this.constructor.DATA_KEY),T.off(this._element,this.constructor.EVENT_KEY);for(const s of Object.getOwnPropertyNames(this))this[s]=null}_queueCallback(s,a,p=!0){b(s,a,p)}_getConfig(s){return s=this._mergeConfigObj(s,this._element),s=this._configAfterMerge(s),this._typeCheckConfig(s),s}static getInstance(s){return r.get(d(s),this.DATA_KEY)}static getOrCreateInstance(s,a={}){return this.getInstance(s)||new this(s,typeof a=="object"?a:null)}static get VERSION(){return"5.3.8"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(s){return`${s}${this.EVENT_KEY}`}}const Ft=f=>{let s=f.getAttribute("data-bs-target");if(!s||s==="#"){let a=f.getAttribute("href");if(!a||!a.includes("#")&&!a.startsWith("."))return null;a.includes("#")&&!a.startsWith("#")&&(a=`#${a.split("#")[1]}`),s=a&&a!=="#"?a.trim():null}return s?s.split(",").map(a=>o(a)).join(","):null},K={find:(f,s=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(s,f)),findOne:(f,s=document.documentElement)=>Element.prototype.querySelector.call(s,f),children:(f,s)=>[].concat(...f.children).filter(a=>a.matches(s)),parents(f,s){const a=[];let p=f.parentNode.closest(s);for(;p;)a.push(p),p=p.parentNode.closest(s);return a},prev(f,s){let a=f.previousElementSibling;for(;a;){if(a.matches(s))return[a];a=a.previousElementSibling}return[]},next(f,s){let a=f.nextElementSibling;for(;a;){if(a.matches(s))return[a];a=a.nextElementSibling}return[]},focusableChildren(f){const s=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(a=>`${a}:not([tabindex^="-"])`).join(",");return this.find(s,f).filter(a=>!g(a)&&h(a))},getSelectorFromElement(f){const s=Ft(f);return s&&K.findOne(s)?s:null},getElementFromSelector(f){const s=Ft(f);return s?K.findOne(s):null},getMultipleElementsFromSelector(f){const s=Ft(f);return s?K.find(s):[]}},Dr=(f,s="hide")=>{const a=`click.dismiss${f.EVENT_KEY}`,p=f.NAME;T.on(document,a,`[data-bs-dismiss="${p}"]`,function(k){if(["A","AREA"].includes(this.tagName)&&k.preventDefault(),g(this))return;const E=K.getElementFromSelector(this)||this.closest(`.${p}`);f.getOrCreateInstance(E)[s]()})},$r=".bs.alert",Kl=`close${$r}`,Ko=`closed${$r}`;class or extends Ne{static get NAME(){return"alert"}close(){if(T.trigger(this._element,Kl).defaultPrevented)return;this._element.classList.remove("show");const s=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,s)}_destroyElement(){this._element.remove(),T.trigger(this._element,Ko),this.dispose()}static jQueryInterface(s){return this.each(function(){const a=or.getOrCreateInstance(this);if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s](this)}})}}Dr(or,"close"),v(or);const Qo='[data-bs-toggle="button"]';class On extends Ne{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(s){return this.each(function(){const a=On.getOrCreateInstance(this);s==="toggle"&&a[s]()})}}T.on(document,"click.bs.button.data-api",Qo,f=>{f.preventDefault();const s=f.target.closest(Qo);On.getOrCreateInstance(s).toggle()}),v(On);const un=".bs.swipe",Ql=`touchstart${un}`,Yl=`touchmove${un}`,cn=`touchend${un}`,Rr=`pointerdown${un}`,Yo=`pointerup${un}`,Xo={endCallback:null,leftCallback:null,rightCallback:null},$i={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class sr extends ze{constructor(s,a){super(),this._element=s,s&&sr.isSupported()&&(this._config=this._getConfig(a),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return Xo}static get DefaultType(){return $i}static get NAME(){return"swipe"}dispose(){T.off(this._element,un)}_start(s){this._supportPointerEvents?this._eventIsPointerPenTouch(s)&&(this._deltaX=s.clientX):this._deltaX=s.touches[0].clientX}_end(s){this._eventIsPointerPenTouch(s)&&(this._deltaX=s.clientX-this._deltaX),this._handleSwipe(),w(this._config.endCallback)}_move(s){this._deltaX=s.touches&&s.touches.length>1?0:s.touches[0].clientX-this._deltaX}_handleSwipe(){const s=Math.abs(this._deltaX);if(s<=40)return;const a=s/this._deltaX;this._deltaX=0,a&&w(a>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(T.on(this._element,Rr,s=>this._start(s)),T.on(this._element,Yo,s=>this._end(s)),this._element.classList.add("pointer-event")):(T.on(this._element,Ql,s=>this._start(s)),T.on(this._element,Yl,s=>this._move(s)),T.on(this._element,cn,s=>this._end(s)))}_eventIsPointerPenTouch(s){return this._supportPointerEvents&&(s.pointerType==="pen"||s.pointerType==="touch")}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Bt=".bs.carousel",Ri=".data-api",Jo="ArrowLeft",Jv="ArrowRight",Ii="next",Ir="prev",Mr="left",Go="right",Gv=`slide${Bt}`,Xl=`slid${Bt}`,qv=`keydown${Bt}`,Zv=`mouseenter${Bt}`,ey=`mouseleave${Bt}`,ty=`dragstart${Bt}`,ny=`load${Bt}${Ri}`,ry=`click${Bt}${Ri}`,_f="carousel",qo="active",xf=".active",Sf=".carousel-item",iy=xf+Sf,oy={[Jo]:Go,[Jv]:Mr},sy={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},ly={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class zr extends Ne{constructor(s,a){super(s,a),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=K.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===_f&&this.cycle()}static get Default(){return sy}static get DefaultType(){return ly}static get NAME(){return"carousel"}next(){this._slide(Ii)}nextWhenVisible(){!document.hidden&&h(this._element)&&this.next()}prev(){this._slide(Ir)}pause(){this._isSliding&&u(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?T.one(this._element,Xl,()=>this.cycle()):this.cycle())}to(s){const a=this._getItems();if(s>a.length-1||s<0)return;if(this._isSliding)return void T.one(this._element,Xl,()=>this.to(s));const p=this._getItemIndex(this._getActive());if(p===s)return;const k=s>p?Ii:Ir;this._slide(k,a[s])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(s){return s.defaultInterval=s.interval,s}_addEventListeners(){this._config.keyboard&&T.on(this._element,qv,s=>this._keydown(s)),this._config.pause==="hover"&&(T.on(this._element,Zv,()=>this.pause()),T.on(this._element,ey,()=>this._maybeEnableCycle())),this._config.touch&&sr.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const a of K.find(".carousel-item img",this._element))T.on(a,ty,p=>p.preventDefault());const s={leftCallback:()=>this._slide(this._directionToOrder(Mr)),rightCallback:()=>this._slide(this._directionToOrder(Go)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new sr(this._element,s)}_keydown(s){if(/input|textarea/i.test(s.target.tagName))return;const a=oy[s.key];a&&(s.preventDefault(),this._slide(this._directionToOrder(a)))}_getItemIndex(s){return this._getItems().indexOf(s)}_setActiveIndicatorElement(s){if(!this._indicatorsElement)return;const a=K.findOne(xf,this._indicatorsElement);a.classList.remove(qo),a.removeAttribute("aria-current");const p=K.findOne(`[data-bs-slide-to="${s}"]`,this._indicatorsElement);p&&(p.classList.add(qo),p.setAttribute("aria-current","true"))}_updateInterval(){const s=this._activeElement||this._getActive();if(!s)return;const a=Number.parseInt(s.getAttribute("data-bs-interval"),10);this._config.interval=a||this._config.defaultInterval}_slide(s,a=null){if(this._isSliding)return;const p=this._getActive(),k=s===Ii,E=a||N(this._getItems(),p,k,this._config.wrap);if(E===p)return;const j=this._getItemIndex(E),L=z=>T.trigger(this._element,z,{relatedTarget:E,direction:this._orderToDirection(s),from:this._getItemIndex(p),to:j});if(L(Gv).defaultPrevented||!p||!E)return;const I=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(j),this._activeElement=E;const B=k?"carousel-item-start":"carousel-item-end",W=k?"carousel-item-next":"carousel-item-prev";E.classList.add(W),C(E),p.classList.add(B),E.classList.add(B),this._queueCallback(()=>{E.classList.remove(B,W),E.classList.add(qo),p.classList.remove(qo,W,B),this._isSliding=!1,L(Xl)},p,this._isAnimated()),I&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return K.findOne(iy,this._element)}_getItems(){return K.find(Sf,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(s){return y()?s===Mr?Ir:Ii:s===Mr?Ii:Ir}_orderToDirection(s){return y()?s===Ir?Mr:Go:s===Ir?Go:Mr}static jQueryInterface(s){return this.each(function(){const a=zr.getOrCreateInstance(this,s);if(typeof s!="number"){if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s]()}}else a.to(s)})}}T.on(document,ry,"[data-bs-slide], [data-bs-slide-to]",function(f){const s=K.getElementFromSelector(this);if(!s||!s.classList.contains(_f))return;f.preventDefault();const a=zr.getOrCreateInstance(s),p=this.getAttribute("data-bs-slide-to");return p?(a.to(p),void a._maybeEnableCycle()):Oe.getDataAttribute(this,"slide")==="next"?(a.next(),void a._maybeEnableCycle()):(a.prev(),void a._maybeEnableCycle())}),T.on(window,ny,()=>{const f=K.find('[data-bs-ride="carousel"]');for(const s of f)zr.getOrCreateInstance(s)}),v(zr);const Mi=".bs.collapse",ay=`show${Mi}`,uy=`shown${Mi}`,cy=`hide${Mi}`,fy=`hidden${Mi}`,dy=`click${Mi}.data-api`,Jl="show",Fr="collapse",Zo="collapsing",py=`:scope .${Fr} .${Fr}`,Gl='[data-bs-toggle="collapse"]',hy={parent:null,toggle:!0},my={parent:"(null|element)",toggle:"boolean"};class Br extends Ne{constructor(s,a){super(s,a),this._isTransitioning=!1,this._triggerArray=[];const p=K.find(Gl);for(const k of p){const E=K.getSelectorFromElement(k),j=K.find(E).filter(L=>L===this._element);E!==null&&j.length&&this._triggerArray.push(k)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return hy}static get DefaultType(){return my}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let s=[];if(this._config.parent&&(s=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(k=>k!==this._element).map(k=>Br.getOrCreateInstance(k,{toggle:!1}))),s.length&&s[0]._isTransitioning||T.trigger(this._element,ay).defaultPrevented)return;for(const k of s)k.hide();const a=this._getDimension();this._element.classList.remove(Fr),this._element.classList.add(Zo),this._element.style[a]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const p=`scroll${a[0].toUpperCase()+a.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Zo),this._element.classList.add(Fr,Jl),this._element.style[a]="",T.trigger(this._element,uy)},this._element,!0),this._element.style[a]=`${this._element[p]}px`}hide(){if(this._isTransitioning||!this._isShown()||T.trigger(this._element,cy).defaultPrevented)return;const s=this._getDimension();this._element.style[s]=`${this._element.getBoundingClientRect()[s]}px`,C(this._element),this._element.classList.add(Zo),this._element.classList.remove(Fr,Jl);for(const a of this._triggerArray){const p=K.getElementFromSelector(a);p&&!this._isShown(p)&&this._addAriaAndCollapsedClass([a],!1)}this._isTransitioning=!0,this._element.style[s]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Zo),this._element.classList.add(Fr),T.trigger(this._element,fy)},this._element,!0)}_isShown(s=this._element){return s.classList.contains(Jl)}_configAfterMerge(s){return s.toggle=!!s.toggle,s.parent=d(s.parent),s}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const s=this._getFirstLevelChildren(Gl);for(const a of s){const p=K.getElementFromSelector(a);p&&this._addAriaAndCollapsedClass([a],this._isShown(p))}}_getFirstLevelChildren(s){const a=K.find(py,this._config.parent);return K.find(s,this._config.parent).filter(p=>!a.includes(p))}_addAriaAndCollapsedClass(s,a){if(s.length)for(const p of s)p.classList.toggle("collapsed",!a),p.setAttribute("aria-expanded",a)}static jQueryInterface(s){const a={};return typeof s=="string"&&/show|hide/.test(s)&&(a.toggle=!1),this.each(function(){const p=Br.getOrCreateInstance(this,a);if(typeof s=="string"){if(p[s]===void 0)throw new TypeError(`No method named "${s}"`);p[s]()}})}}T.on(document,dy,Gl,function(f){(f.target.tagName==="A"||f.delegateTarget&&f.delegateTarget.tagName==="A")&&f.preventDefault();for(const s of K.getMultipleElementsFromSelector(this))Br.getOrCreateInstance(s,{toggle:!1}).toggle()}),v(Br);var Ze="top",ht="bottom",mt="right",et="left",es="auto",Ur=[Ze,ht,mt,et],lr="start",Wr="end",kf="clippingParents",ql="viewport",Vr="popper",Ef="reference",Zl=Ur.reduce(function(f,s){return f.concat([s+"-"+lr,s+"-"+Wr])},[]),ea=[].concat(Ur,[es]).reduce(function(f,s){return f.concat([s,s+"-"+lr,s+"-"+Wr])},[]),Cf="beforeRead",bf="read",Pf="afterRead",Of="beforeMain",jf="main",Tf="afterMain",Nf="beforeWrite",Lf="write",Af="afterWrite",Df=[Cf,bf,Pf,Of,jf,Tf,Nf,Lf,Af];function Gt(f){return f?(f.nodeName||"").toLowerCase():null}function gt(f){if(f==null)return window;if(f.toString()!=="[object Window]"){var s=f.ownerDocument;return s&&s.defaultView||window}return f}function ar(f){return f instanceof gt(f).Element||f instanceof Element}function bt(f){return f instanceof gt(f).HTMLElement||f instanceof HTMLElement}function ta(f){return typeof ShadowRoot<"u"&&(f instanceof gt(f).ShadowRoot||f instanceof ShadowRoot)}const na={name:"applyStyles",enabled:!0,phase:"write",fn:function(f){var s=f.state;Object.keys(s.elements).forEach(function(a){var p=s.styles[a]||{},k=s.attributes[a]||{},E=s.elements[a];bt(E)&&Gt(E)&&(Object.assign(E.style,p),Object.keys(k).forEach(function(j){var L=k[j];L===!1?E.removeAttribute(j):E.setAttribute(j,L===!0?"":L)}))})},effect:function(f){var s=f.state,a={popper:{position:s.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(s.elements.popper.style,a.popper),s.styles=a,s.elements.arrow&&Object.assign(s.elements.arrow.style,a.arrow),function(){Object.keys(s.elements).forEach(function(p){var k=s.elements[p],E=s.attributes[p]||{},j=Object.keys(s.styles.hasOwnProperty(p)?s.styles[p]:a[p]).reduce(function(L,I){return L[I]="",L},{});bt(k)&&Gt(k)&&(Object.assign(k.style,j),Object.keys(E).forEach(function(L){k.removeAttribute(L)}))})}},requires:["computeStyles"]};function qt(f){return f.split("-")[0]}var ur=Math.max,ts=Math.min,Hr=Math.round;function ra(){var f=navigator.userAgentData;return f!=null&&f.brands&&Array.isArray(f.brands)?f.brands.map(function(s){return s.brand+"/"+s.version}).join(" "):navigator.userAgent}function $f(){return!/^((?!chrome|android).)*safari/i.test(ra())}function Kr(f,s,a){s===void 0&&(s=!1),a===void 0&&(a=!1);var p=f.getBoundingClientRect(),k=1,E=1;s&&bt(f)&&(k=f.offsetWidth>0&&Hr(p.width)/f.offsetWidth||1,E=f.offsetHeight>0&&Hr(p.height)/f.offsetHeight||1);var j=(ar(f)?gt(f):window).visualViewport,L=!$f()&&a,I=(p.left+(L&&j?j.offsetLeft:0))/k,B=(p.top+(L&&j?j.offsetTop:0))/E,W=p.width/k,z=p.height/E;return{width:W,height:z,top:B,right:I+W,bottom:B+z,left:I,x:I,y:B}}function ia(f){var s=Kr(f),a=f.offsetWidth,p=f.offsetHeight;return Math.abs(s.width-a)<=1&&(a=s.width),Math.abs(s.height-p)<=1&&(p=s.height),{x:f.offsetLeft,y:f.offsetTop,width:a,height:p}}function Rf(f,s){var a=s.getRootNode&&s.getRootNode();if(f.contains(s))return!0;if(a&&ta(a)){var p=s;do{if(p&&f.isSameNode(p))return!0;p=p.parentNode||p.host}while(p)}return!1}function fn(f){return gt(f).getComputedStyle(f)}function gy(f){return["table","td","th"].indexOf(Gt(f))>=0}function jn(f){return((ar(f)?f.ownerDocument:f.document)||window.document).documentElement}function ns(f){return Gt(f)==="html"?f:f.assignedSlot||f.parentNode||(ta(f)?f.host:null)||jn(f)}function If(f){return bt(f)&&fn(f).position!=="fixed"?f.offsetParent:null}function zi(f){for(var s=gt(f),a=If(f);a&&gy(a)&&fn(a).position==="static";)a=If(a);return a&&(Gt(a)==="html"||Gt(a)==="body"&&fn(a).position==="static")?s:a||function(p){var k=/firefox/i.test(ra());if(/Trident/i.test(ra())&&bt(p)&&fn(p).position==="fixed")return null;var E=ns(p);for(ta(E)&&(E=E.host);bt(E)&&["html","body"].indexOf(Gt(E))<0;){var j=fn(E);if(j.transform!=="none"||j.perspective!=="none"||j.contain==="paint"||["transform","perspective"].indexOf(j.willChange)!==-1||k&&j.willChange==="filter"||k&&j.filter&&j.filter!=="none")return E;E=E.parentNode}return null}(f)||s}function oa(f){return["top","bottom"].indexOf(f)>=0?"x":"y"}function Fi(f,s,a){return ur(f,ts(s,a))}function Mf(f){return Object.assign({},{top:0,right:0,bottom:0,left:0},f)}function zf(f,s){return s.reduce(function(a,p){return a[p]=f,a},{})}const Ff={name:"arrow",enabled:!0,phase:"main",fn:function(f){var s,a=f.state,p=f.name,k=f.options,E=a.elements.arrow,j=a.modifiersData.popperOffsets,L=qt(a.placement),I=oa(L),B=[et,mt].indexOf(L)>=0?"height":"width";if(E&&j){var W=function(he,ce){return Mf(typeof(he=typeof he=="function"?he(Object.assign({},ce.rects,{placement:ce.placement})):he)!="number"?he:zf(he,Ur))}(k.padding,a),z=ia(E),te=I==="y"?Ze:et,J=I==="y"?ht:mt,q=a.rects.reference[B]+a.rects.reference[I]-j[I]-a.rects.popper[B],G=j[I]-a.rects.reference[I],Z=zi(E),pe=Z?I==="y"?Z.clientHeight||0:Z.clientWidth||0:0,ge=q/2-G/2,ie=W[te],ae=pe-z[B]-W[J],re=pe/2-z[B]/2+ge,se=Fi(ie,re,ae),ue=I;a.modifiersData[p]=((s={})[ue]=se,s.centerOffset=se-re,s)}},effect:function(f){var s=f.state,a=f.options.element,p=a===void 0?"[data-popper-arrow]":a;p!=null&&(typeof p!="string"||(p=s.elements.popper.querySelector(p)))&&Rf(s.elements.popper,p)&&(s.elements.arrow=p)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Qr(f){return f.split("-")[1]}var vy={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Bf(f){var s,a=f.popper,p=f.popperRect,k=f.placement,E=f.variation,j=f.offsets,L=f.position,I=f.gpuAcceleration,B=f.adaptive,W=f.roundOffsets,z=f.isFixed,te=j.x,J=te===void 0?0:te,q=j.y,G=q===void 0?0:q,Z=typeof W=="function"?W({x:J,y:G}):{x:J,y:G};J=Z.x,G=Z.y;var pe=j.hasOwnProperty("x"),ge=j.hasOwnProperty("y"),ie=et,ae=Ze,re=window;if(B){var se=zi(a),ue="clientHeight",he="clientWidth";se===gt(a)&&fn(se=jn(a)).position!=="static"&&L==="absolute"&&(ue="scrollHeight",he="scrollWidth"),(k===Ze||(k===et||k===mt)&&E===Wr)&&(ae=ht,G-=(z&&se===re&&re.visualViewport?re.visualViewport.height:se[ue])-p.height,G*=I?1:-1),k!==et&&(k!==Ze&&k!==ht||E!==Wr)||(ie=mt,J-=(z&&se===re&&re.visualViewport?re.visualViewport.width:se[he])-p.width,J*=I?1:-1)}var ce,Le=Object.assign({position:L},B&&vy),vt=W===!0?function(Wt,tt){var Ot=Wt.x,jt=Wt.y,je=tt.devicePixelRatio||1;return{x:Hr(Ot*je)/je||0,y:Hr(jt*je)/je||0}}({x:J,y:G},gt(a)):{x:J,y:G};return J=vt.x,G=vt.y,I?Object.assign({},Le,((ce={})[ae]=ge?"0":"",ce[ie]=pe?"0":"",ce.transform=(re.devicePixelRatio||1)<=1?"translate("+J+"px, "+G+"px)":"translate3d("+J+"px, "+G+"px, 0)",ce)):Object.assign({},Le,((s={})[ae]=ge?G+"px":"",s[ie]=pe?J+"px":"",s.transform="",s))}const sa={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(f){var s=f.state,a=f.options,p=a.gpuAcceleration,k=p===void 0||p,E=a.adaptive,j=E===void 0||E,L=a.roundOffsets,I=L===void 0||L,B={placement:qt(s.placement),variation:Qr(s.placement),popper:s.elements.popper,popperRect:s.rects.popper,gpuAcceleration:k,isFixed:s.options.strategy==="fixed"};s.modifiersData.popperOffsets!=null&&(s.styles.popper=Object.assign({},s.styles.popper,Bf(Object.assign({},B,{offsets:s.modifiersData.popperOffsets,position:s.options.strategy,adaptive:j,roundOffsets:I})))),s.modifiersData.arrow!=null&&(s.styles.arrow=Object.assign({},s.styles.arrow,Bf(Object.assign({},B,{offsets:s.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:I})))),s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-placement":s.placement})},data:{}};var rs={passive:!0};const la={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(f){var s=f.state,a=f.instance,p=f.options,k=p.scroll,E=k===void 0||k,j=p.resize,L=j===void 0||j,I=gt(s.elements.popper),B=[].concat(s.scrollParents.reference,s.scrollParents.popper);return E&&B.forEach(function(W){W.addEventListener("scroll",a.update,rs)}),L&&I.addEventListener("resize",a.update,rs),function(){E&&B.forEach(function(W){W.removeEventListener("scroll",a.update,rs)}),L&&I.removeEventListener("resize",a.update,rs)}},data:{}};var yy={left:"right",right:"left",bottom:"top",top:"bottom"};function is(f){return f.replace(/left|right|bottom|top/g,function(s){return yy[s]})}var wy={start:"end",end:"start"};function Uf(f){return f.replace(/start|end/g,function(s){return wy[s]})}function aa(f){var s=gt(f);return{scrollLeft:s.pageXOffset,scrollTop:s.pageYOffset}}function ua(f){return Kr(jn(f)).left+aa(f).scrollLeft}function ca(f){var s=fn(f),a=s.overflow,p=s.overflowX,k=s.overflowY;return/auto|scroll|overlay|hidden/.test(a+k+p)}function Wf(f){return["html","body","#document"].indexOf(Gt(f))>=0?f.ownerDocument.body:bt(f)&&ca(f)?f:Wf(ns(f))}function Bi(f,s){var a;s===void 0&&(s=[]);var p=Wf(f),k=p===((a=f.ownerDocument)==null?void 0:a.body),E=gt(p),j=k?[E].concat(E.visualViewport||[],ca(p)?p:[]):p,L=s.concat(j);return k?L:L.concat(Bi(ns(j)))}function fa(f){return Object.assign({},f,{left:f.x,top:f.y,right:f.x+f.width,bottom:f.y+f.height})}function Vf(f,s,a){return s===ql?fa(function(p,k){var E=gt(p),j=jn(p),L=E.visualViewport,I=j.clientWidth,B=j.clientHeight,W=0,z=0;if(L){I=L.width,B=L.height;var te=$f();(te||!te&&k==="fixed")&&(W=L.offsetLeft,z=L.offsetTop)}return{width:I,height:B,x:W+ua(p),y:z}}(f,a)):ar(s)?function(p,k){var E=Kr(p,!1,k==="fixed");return E.top=E.top+p.clientTop,E.left=E.left+p.clientLeft,E.bottom=E.top+p.clientHeight,E.right=E.left+p.clientWidth,E.width=p.clientWidth,E.height=p.clientHeight,E.x=E.left,E.y=E.top,E}(s,a):fa(function(p){var k,E=jn(p),j=aa(p),L=(k=p.ownerDocument)==null?void 0:k.body,I=ur(E.scrollWidth,E.clientWidth,L?L.scrollWidth:0,L?L.clientWidth:0),B=ur(E.scrollHeight,E.clientHeight,L?L.scrollHeight:0,L?L.clientHeight:0),W=-j.scrollLeft+ua(p),z=-j.scrollTop;return fn(L||E).direction==="rtl"&&(W+=ur(E.clientWidth,L?L.clientWidth:0)-I),{width:I,height:B,x:W,y:z}}(jn(f)))}function Hf(f){var s,a=f.reference,p=f.element,k=f.placement,E=k?qt(k):null,j=k?Qr(k):null,L=a.x+a.width/2-p.width/2,I=a.y+a.height/2-p.height/2;switch(E){case Ze:s={x:L,y:a.y-p.height};break;case ht:s={x:L,y:a.y+a.height};break;case mt:s={x:a.x+a.width,y:I};break;case et:s={x:a.x-p.width,y:I};break;default:s={x:a.x,y:a.y}}var B=E?oa(E):null;if(B!=null){var W=B==="y"?"height":"width";switch(j){case lr:s[B]=s[B]-(a[W]/2-p[W]/2);break;case Wr:s[B]=s[B]+(a[W]/2-p[W]/2)}}return s}function Yr(f,s){s===void 0&&(s={});var a=s,p=a.placement,k=p===void 0?f.placement:p,E=a.strategy,j=E===void 0?f.strategy:E,L=a.boundary,I=L===void 0?kf:L,B=a.rootBoundary,W=B===void 0?ql:B,z=a.elementContext,te=z===void 0?Vr:z,J=a.altBoundary,q=J!==void 0&&J,G=a.padding,Z=G===void 0?0:G,pe=Mf(typeof Z!="number"?Z:zf(Z,Ur)),ge=te===Vr?Ef:Vr,ie=f.rects.popper,ae=f.elements[q?ge:te],re=function(tt,Ot,jt,je){var Zt=Ot==="clippingParents"?function(me){var nt=Bi(ns(me)),Tt=["absolute","fixed"].indexOf(fn(me).position)>=0&&bt(me)?zi(me):me;return ar(Tt)?nt.filter(function(Nn){return ar(Nn)&&Rf(Nn,Tt)&&Gt(Nn)!=="body"}):[]}(tt):[].concat(Ot),en=[].concat(Zt,[jt]),Gr=en[0],We=en.reduce(function(me,nt){var Tt=Vf(tt,nt,je);return me.top=ur(Tt.top,me.top),me.right=ts(Tt.right,me.right),me.bottom=ts(Tt.bottom,me.bottom),me.left=ur(Tt.left,me.left),me},Vf(tt,Gr,je));return We.width=We.right-We.left,We.height=We.bottom-We.top,We.x=We.left,We.y=We.top,We}(ar(ae)?ae:ae.contextElement||jn(f.elements.popper),I,W,j),se=Kr(f.elements.reference),ue=Hf({reference:se,element:ie,placement:k}),he=fa(Object.assign({},ie,ue)),ce=te===Vr?he:se,Le={top:re.top-ce.top+pe.top,bottom:ce.bottom-re.bottom+pe.bottom,left:re.left-ce.left+pe.left,right:ce.right-re.right+pe.right},vt=f.modifiersData.offset;if(te===Vr&&vt){var Wt=vt[k];Object.keys(Le).forEach(function(tt){var Ot=[mt,ht].indexOf(tt)>=0?1:-1,jt=[Ze,ht].indexOf(tt)>=0?"y":"x";Le[tt]+=Wt[jt]*Ot})}return Le}function _y(f,s){s===void 0&&(s={});var a=s,p=a.placement,k=a.boundary,E=a.rootBoundary,j=a.padding,L=a.flipVariations,I=a.allowedAutoPlacements,B=I===void 0?ea:I,W=Qr(p),z=W?L?Zl:Zl.filter(function(q){return Qr(q)===W}):Ur,te=z.filter(function(q){return B.indexOf(q)>=0});te.length===0&&(te=z);var J=te.reduce(function(q,G){return q[G]=Yr(f,{placement:G,boundary:k,rootBoundary:E,padding:j})[qt(G)],q},{});return Object.keys(J).sort(function(q,G){return J[q]-J[G]})}const Kf={name:"flip",enabled:!0,phase:"main",fn:function(f){var s=f.state,a=f.options,p=f.name;if(!s.modifiersData[p]._skip){for(var k=a.mainAxis,E=k===void 0||k,j=a.altAxis,L=j===void 0||j,I=a.fallbackPlacements,B=a.padding,W=a.boundary,z=a.rootBoundary,te=a.altBoundary,J=a.flipVariations,q=J===void 0||J,G=a.allowedAutoPlacements,Z=s.options.placement,pe=qt(Z),ge=I||(pe!==Z&&q?function(me){if(qt(me)===es)return[];var nt=is(me);return[Uf(me),nt,Uf(nt)]}(Z):[is(Z)]),ie=[Z].concat(ge).reduce(function(me,nt){return me.concat(qt(nt)===es?_y(s,{placement:nt,boundary:W,rootBoundary:z,padding:B,flipVariations:q,allowedAutoPlacements:G}):nt)},[]),ae=s.rects.reference,re=s.rects.popper,se=new Map,ue=!0,he=ie[0],ce=0;ce=0,Ot=tt?"width":"height",jt=Yr(s,{placement:Le,boundary:W,rootBoundary:z,altBoundary:te,padding:B}),je=tt?Wt?mt:et:Wt?ht:Ze;ae[Ot]>re[Ot]&&(je=is(je));var Zt=is(je),en=[];if(E&&en.push(jt[vt]<=0),L&&en.push(jt[je]<=0,jt[Zt]<=0),en.every(function(me){return me})){he=Le,ue=!1;break}se.set(Le,en)}if(ue)for(var Gr=function(me){var nt=ie.find(function(Tt){var Nn=se.get(Tt);if(Nn)return Nn.slice(0,me).every(function(ps){return ps})});if(nt)return he=nt,"break"},We=q?3:1;We>0&&Gr(We)!=="break";We--);s.placement!==he&&(s.modifiersData[p]._skip=!0,s.placement=he,s.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Qf(f,s,a){return a===void 0&&(a={x:0,y:0}),{top:f.top-s.height-a.y,right:f.right-s.width+a.x,bottom:f.bottom-s.height+a.y,left:f.left-s.width-a.x}}function Yf(f){return[Ze,mt,ht,et].some(function(s){return f[s]>=0})}const Xf={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(f){var s=f.state,a=f.name,p=s.rects.reference,k=s.rects.popper,E=s.modifiersData.preventOverflow,j=Yr(s,{elementContext:"reference"}),L=Yr(s,{altBoundary:!0}),I=Qf(j,p),B=Qf(L,k,E),W=Yf(I),z=Yf(B);s.modifiersData[a]={referenceClippingOffsets:I,popperEscapeOffsets:B,isReferenceHidden:W,hasPopperEscaped:z},s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-reference-hidden":W,"data-popper-escaped":z})}},Jf={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(f){var s=f.state,a=f.options,p=f.name,k=a.offset,E=k===void 0?[0,0]:k,j=ea.reduce(function(W,z){return W[z]=function(te,J,q){var G=qt(te),Z=[et,Ze].indexOf(G)>=0?-1:1,pe=typeof q=="function"?q(Object.assign({},J,{placement:te})):q,ge=pe[0],ie=pe[1];return ge=ge||0,ie=(ie||0)*Z,[et,mt].indexOf(G)>=0?{x:ie,y:ge}:{x:ge,y:ie}}(z,s.rects,E),W},{}),L=j[s.placement],I=L.x,B=L.y;s.modifiersData.popperOffsets!=null&&(s.modifiersData.popperOffsets.x+=I,s.modifiersData.popperOffsets.y+=B),s.modifiersData[p]=j}},da={name:"popperOffsets",enabled:!0,phase:"read",fn:function(f){var s=f.state,a=f.name;s.modifiersData[a]=Hf({reference:s.rects.reference,element:s.rects.popper,placement:s.placement})},data:{}},Gf={name:"preventOverflow",enabled:!0,phase:"main",fn:function(f){var s=f.state,a=f.options,p=f.name,k=a.mainAxis,E=k===void 0||k,j=a.altAxis,L=j!==void 0&&j,I=a.boundary,B=a.rootBoundary,W=a.altBoundary,z=a.padding,te=a.tether,J=te===void 0||te,q=a.tetherOffset,G=q===void 0?0:q,Z=Yr(s,{boundary:I,rootBoundary:B,padding:z,altBoundary:W}),pe=qt(s.placement),ge=Qr(s.placement),ie=!ge,ae=oa(pe),re=ae==="x"?"y":"x",se=s.modifiersData.popperOffsets,ue=s.rects.reference,he=s.rects.popper,ce=typeof G=="function"?G(Object.assign({},s.rects,{placement:s.placement})):G,Le=typeof ce=="number"?{mainAxis:ce,altAxis:ce}:Object.assign({mainAxis:0,altAxis:0},ce),vt=s.modifiersData.offset?s.modifiersData.offset[s.placement]:null,Wt={x:0,y:0};if(se){if(E){var tt,Ot=ae==="y"?Ze:et,jt=ae==="y"?ht:mt,je=ae==="y"?"height":"width",Zt=se[ae],en=Zt+Z[Ot],Gr=Zt-Z[jt],We=J?-he[je]/2:0,me=ge===lr?ue[je]:he[je],nt=ge===lr?-he[je]:-ue[je],Tt=s.elements.arrow,Nn=J&&Tt?ia(Tt):{width:0,height:0},ps=s.modifiersData["arrow#persistent"]?s.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Id=ps[Ot],Md=ps[jt],hs=Fi(0,ue[je],Nn[je]),qw=ie?ue[je]/2-We-hs-Id-Le.mainAxis:me-hs-Id-Le.mainAxis,Zw=ie?-ue[je]/2+We+hs+Md+Le.mainAxis:nt+hs+Md+Le.mainAxis,ba=s.elements.arrow&&zi(s.elements.arrow),e0=ba?ae==="y"?ba.clientTop||0:ba.clientLeft||0:0,zd=(tt=vt==null?void 0:vt[ae])!=null?tt:0,t0=Zt+Zw-zd,Fd=Fi(J?ts(en,Zt+qw-zd-e0):en,Zt,J?ur(Gr,t0):Gr);se[ae]=Fd,Wt[ae]=Fd-Zt}if(L){var Bd,n0=ae==="x"?Ze:et,r0=ae==="x"?ht:mt,vr=se[re],ms=re==="y"?"height":"width",Ud=vr+Z[n0],Wd=vr-Z[r0],Pa=[Ze,et].indexOf(pe)!==-1,Vd=(Bd=vt==null?void 0:vt[re])!=null?Bd:0,Hd=Pa?Ud:vr-ue[ms]-he[ms]-Vd+Le.altAxis,Kd=Pa?vr+ue[ms]+he[ms]-Vd-Le.altAxis:Wd,Qd=J&&Pa?function(i0,o0,Oa){var Yd=Fi(i0,o0,Oa);return Yd>Oa?Oa:Yd}(Hd,vr,Kd):Fi(J?Hd:Ud,vr,J?Kd:Wd);se[re]=Qd,Wt[re]=Qd-vr}s.modifiersData[p]=Wt}},requiresIfExists:["offset"]};function xy(f,s,a){a===void 0&&(a=!1);var p,k,E=bt(s),j=bt(s)&&function(z){var te=z.getBoundingClientRect(),J=Hr(te.width)/z.offsetWidth||1,q=Hr(te.height)/z.offsetHeight||1;return J!==1||q!==1}(s),L=jn(s),I=Kr(f,j,a),B={scrollLeft:0,scrollTop:0},W={x:0,y:0};return(E||!E&&!a)&&((Gt(s)!=="body"||ca(L))&&(B=(p=s)!==gt(p)&&bt(p)?{scrollLeft:(k=p).scrollLeft,scrollTop:k.scrollTop}:aa(p)),bt(s)?((W=Kr(s,!0)).x+=s.clientLeft,W.y+=s.clientTop):L&&(W.x=ua(L))),{x:I.left+B.scrollLeft-W.x,y:I.top+B.scrollTop-W.y,width:I.width,height:I.height}}function Sy(f){var s=new Map,a=new Set,p=[];function k(E){a.add(E.name),[].concat(E.requires||[],E.requiresIfExists||[]).forEach(function(j){if(!a.has(j)){var L=s.get(j);L&&k(L)}}),p.push(E)}return f.forEach(function(E){s.set(E.name,E)}),f.forEach(function(E){a.has(E.name)||k(E)}),p}var qf={placement:"bottom",modifiers:[],strategy:"absolute"};function Zf(){for(var f=arguments.length,s=new Array(f),a=0;aNumber.parseInt(a,10)):typeof s=="function"?a=>s(a,this._element):s}_getPopperConfig(){const s={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(Oe.setDataAttribute(this._menu,"popper","static"),s.modifiers=[{name:"applyStyles",enabled:!1}]),{...s,...w(this._config.popperConfig,[void 0,s])}}_selectMenuItem({key:s,target:a}){const p=K.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(k=>h(k));p.length&&N(p,a,s===nd,!p.includes(a)).focus()}static jQueryInterface(s){return this.each(function(){const a=Ut.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0)throw new TypeError(`No method named "${s}"`);a[s]()}})}static clearMenus(s){if(s.button===2||s.type==="keyup"&&s.key!=="Tab")return;const a=K.find(Ny);for(const p of a){const k=Ut.getInstance(p);if(!k||k._config.autoClose===!1)continue;const E=s.composedPath(),j=E.includes(k._menu);if(E.includes(k._element)||k._config.autoClose==="inside"&&!j||k._config.autoClose==="outside"&&j||k._menu.contains(s.target)&&(s.type==="keyup"&&s.key==="Tab"||/input|select|option|textarea|form/i.test(s.target.tagName)))continue;const L={relatedTarget:k._element};s.type==="click"&&(L.clickEvent=s),k._completeHide(L)}}static dataApiKeydownHandler(s){const a=/input|textarea/i.test(s.target.tagName),p=s.key==="Escape",k=[Cy,nd].includes(s.key);if(!k&&!p||a&&!p)return;s.preventDefault();const E=this.matches(fr)?this:K.prev(this,fr)[0]||K.next(this,fr)[0]||K.findOne(fr,s.delegateTarget.parentNode),j=Ut.getOrCreateInstance(E);if(k)return s.stopPropagation(),j.show(),void j._selectMenuItem(s);j._isShown()&&(s.stopPropagation(),j.hide(),E.focus())}}T.on(document,id,fr,Ut.dataApiKeydownHandler),T.on(document,id,ss,Ut.dataApiKeydownHandler),T.on(document,rd,Ut.clearMenus),T.on(document,Ty,Ut.clearMenus),T.on(document,rd,fr,function(f){f.preventDefault(),Ut.getOrCreateInstance(this).toggle()}),v(Ut);const od="backdrop",sd="show",ld=`mousedown.bs.${od}`,Fy={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},By={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class ad extends ze{constructor(s){super(),this._config=this._getConfig(s),this._isAppended=!1,this._element=null}static get Default(){return Fy}static get DefaultType(){return By}static get NAME(){return od}show(s){if(!this._config.isVisible)return void w(s);this._append();const a=this._getElement();this._config.isAnimated&&C(a),a.classList.add(sd),this._emulateAnimation(()=>{w(s)})}hide(s){this._config.isVisible?(this._getElement().classList.remove(sd),this._emulateAnimation(()=>{this.dispose(),w(s)})):w(s)}dispose(){this._isAppended&&(T.off(this._element,ld),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const s=document.createElement("div");s.className=this._config.className,this._config.isAnimated&&s.classList.add("fade"),this._element=s}return this._element}_configAfterMerge(s){return s.rootElement=d(s.rootElement),s}_append(){if(this._isAppended)return;const s=this._getElement();this._config.rootElement.append(s),T.on(s,ld,()=>{w(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(s){b(s,this._getElement(),this._config.isAnimated)}}const ls=".bs.focustrap",Uy=`focusin${ls}`,Wy=`keydown.tab${ls}`,ud="backward",Vy={autofocus:!0,trapElement:null},Hy={autofocus:"boolean",trapElement:"element"};class cd extends ze{constructor(s){super(),this._config=this._getConfig(s),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Vy}static get DefaultType(){return Hy}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),T.off(document,ls),T.on(document,Uy,s=>this._handleFocusin(s)),T.on(document,Wy,s=>this._handleKeydown(s)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,T.off(document,ls))}_handleFocusin(s){const{trapElement:a}=this._config;if(s.target===document||s.target===a||a.contains(s.target))return;const p=K.focusableChildren(a);p.length===0?a.focus():this._lastTabNavDirection===ud?p[p.length-1].focus():p[0].focus()}_handleKeydown(s){s.key==="Tab"&&(this._lastTabNavDirection=s.shiftKey?ud:"forward")}}const fd=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",dd=".sticky-top",as="padding-right",pd="margin-right";class ma{constructor(){this._element=document.body}getWidth(){const s=document.documentElement.clientWidth;return Math.abs(window.innerWidth-s)}hide(){const s=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,as,a=>a+s),this._setElementAttributes(fd,as,a=>a+s),this._setElementAttributes(dd,pd,a=>a-s)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,as),this._resetElementAttributes(fd,as),this._resetElementAttributes(dd,pd)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(s,a,p){const k=this.getWidth();this._applyManipulationCallback(s,E=>{if(E!==this._element&&window.innerWidth>E.clientWidth+k)return;this._saveInitialAttribute(E,a);const j=window.getComputedStyle(E).getPropertyValue(a);E.style.setProperty(a,`${p(Number.parseFloat(j))}px`)})}_saveInitialAttribute(s,a){const p=s.style.getPropertyValue(a);p&&Oe.setDataAttribute(s,a,p)}_resetElementAttributes(s,a){this._applyManipulationCallback(s,p=>{const k=Oe.getDataAttribute(p,a);k!==null?(Oe.removeDataAttribute(p,a),p.style.setProperty(a,k)):p.style.removeProperty(a)})}_applyManipulationCallback(s,a){if(c(s))a(s);else for(const p of K.find(s,this._element))a(p)}}const Pt=".bs.modal",Ky=`hide${Pt}`,Qy=`hidePrevented${Pt}`,hd=`hidden${Pt}`,md=`show${Pt}`,Yy=`shown${Pt}`,Xy=`resize${Pt}`,Jy=`click.dismiss${Pt}`,Gy=`mousedown.dismiss${Pt}`,qy=`keydown.dismiss${Pt}`,Zy=`click${Pt}.data-api`,gd="modal-open",vd="show",ga="modal-static",ew={backdrop:!0,focus:!0,keyboard:!0},tw={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class dr extends Ne{constructor(s,a){super(s,a),this._dialog=K.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new ma,this._addEventListeners()}static get Default(){return ew}static get DefaultType(){return tw}static get NAME(){return"modal"}toggle(s){return this._isShown?this.hide():this.show(s)}show(s){this._isShown||this._isTransitioning||T.trigger(this._element,md,{relatedTarget:s}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(gd),this._adjustDialog(),this._backdrop.show(()=>this._showElement(s)))}hide(){this._isShown&&!this._isTransitioning&&(T.trigger(this._element,Ky).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(vd),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){T.off(window,Pt),T.off(this._dialog,Pt),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new ad({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new cd({trapElement:this._element})}_showElement(s){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const a=K.findOne(".modal-body",this._dialog);a&&(a.scrollTop=0),C(this._element),this._element.classList.add(vd),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,T.trigger(this._element,Yy,{relatedTarget:s})},this._dialog,this._isAnimated())}_addEventListeners(){T.on(this._element,qy,s=>{s.key==="Escape"&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),T.on(window,Xy,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),T.on(this._element,Gy,s=>{T.one(this._element,Jy,a=>{this._element===s.target&&this._element===a.target&&(this._config.backdrop!=="static"?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(gd),this._resetAdjustments(),this._scrollBar.reset(),T.trigger(this._element,hd)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(T.trigger(this._element,Qy).defaultPrevented)return;const s=this._element.scrollHeight>document.documentElement.clientHeight,a=this._element.style.overflowY;a==="hidden"||this._element.classList.contains(ga)||(s||(this._element.style.overflowY="hidden"),this._element.classList.add(ga),this._queueCallback(()=>{this._element.classList.remove(ga),this._queueCallback(()=>{this._element.style.overflowY=a},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const s=this._element.scrollHeight>document.documentElement.clientHeight,a=this._scrollBar.getWidth(),p=a>0;if(p&&!s){const k=y()?"paddingLeft":"paddingRight";this._element.style[k]=`${a}px`}if(!p&&s){const k=y()?"paddingRight":"paddingLeft";this._element.style[k]=`${a}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(s,a){return this.each(function(){const p=dr.getOrCreateInstance(this,s);if(typeof s=="string"){if(p[s]===void 0)throw new TypeError(`No method named "${s}"`);p[s](a)}})}}T.on(document,Zy,'[data-bs-toggle="modal"]',function(f){const s=K.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&f.preventDefault(),T.one(s,md,p=>{p.defaultPrevented||T.one(s,hd,()=>{h(this)&&this.focus()})});const a=K.findOne(".modal.show");a&&dr.getInstance(a).hide(),dr.getOrCreateInstance(s).toggle(this)}),Dr(dr),v(dr);const dn=".bs.offcanvas",yd=".data-api",nw=`load${dn}${yd}`,wd="show",_d="showing",xd="hiding",Sd=".offcanvas.show",rw=`show${dn}`,iw=`shown${dn}`,ow=`hide${dn}`,kd=`hidePrevented${dn}`,Ed=`hidden${dn}`,sw=`resize${dn}`,lw=`click${dn}${yd}`,aw=`keydown.dismiss${dn}`,uw={backdrop:!0,keyboard:!0,scroll:!1},cw={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class pn extends Ne{constructor(s,a){super(s,a),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return uw}static get DefaultType(){return cw}static get NAME(){return"offcanvas"}toggle(s){return this._isShown?this.hide():this.show(s)}show(s){this._isShown||T.trigger(this._element,rw,{relatedTarget:s}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||new ma().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(_d),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(wd),this._element.classList.remove(_d),T.trigger(this._element,iw,{relatedTarget:s})},this._element,!0))}hide(){this._isShown&&(T.trigger(this._element,ow).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(xd),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(wd,xd),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new ma().reset(),T.trigger(this._element,Ed)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const s=!!this._config.backdrop;return new ad({className:"offcanvas-backdrop",isVisible:s,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:s?()=>{this._config.backdrop!=="static"?this.hide():T.trigger(this._element,kd)}:null})}_initializeFocusTrap(){return new cd({trapElement:this._element})}_addEventListeners(){T.on(this._element,aw,s=>{s.key==="Escape"&&(this._config.keyboard?this.hide():T.trigger(this._element,kd))})}static jQueryInterface(s){return this.each(function(){const a=pn.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s](this)}})}}T.on(document,lw,'[data-bs-toggle="offcanvas"]',function(f){const s=K.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&f.preventDefault(),g(this))return;T.one(s,Ed,()=>{h(this)&&this.focus()});const a=K.findOne(Sd);a&&a!==s&&pn.getInstance(a).hide(),pn.getOrCreateInstance(s).toggle(this)}),T.on(window,nw,()=>{for(const f of K.find(Sd))pn.getOrCreateInstance(f).show()}),T.on(window,sw,()=>{for(const f of K.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(f).position!=="fixed"&&pn.getOrCreateInstance(f).hide()}),Dr(pn),v(pn);const Cd={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},fw=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),dw=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,pw=(f,s)=>{const a=f.nodeName.toLowerCase();return s.includes(a)?!fw.has(a)||!!dw.test(f.nodeValue):s.filter(p=>p instanceof RegExp).some(p=>p.test(a))},hw={allowList:Cd,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},mw={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},gw={entry:"(string|element|function|null)",selector:"(string|element)"};class vw extends ze{constructor(s){super(),this._config=this._getConfig(s)}static get Default(){return hw}static get DefaultType(){return mw}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(s=>this._resolvePossibleFunction(s)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(s){return this._checkContent(s),this._config.content={...this._config.content,...s},this}toHtml(){const s=document.createElement("div");s.innerHTML=this._maybeSanitize(this._config.template);for(const[k,E]of Object.entries(this._config.content))this._setContent(s,E,k);const a=s.children[0],p=this._resolvePossibleFunction(this._config.extraClass);return p&&a.classList.add(...p.split(" ")),a}_typeCheckConfig(s){super._typeCheckConfig(s),this._checkContent(s.content)}_checkContent(s){for(const[a,p]of Object.entries(s))super._typeCheckConfig({selector:a,entry:p},gw)}_setContent(s,a,p){const k=K.findOne(p,s);k&&((a=this._resolvePossibleFunction(a))?c(a)?this._putElementInTemplate(d(a),k):this._config.html?k.innerHTML=this._maybeSanitize(a):k.textContent=a:k.remove())}_maybeSanitize(s){return this._config.sanitize?function(a,p,k){if(!a.length)return a;if(k&&typeof k=="function")return k(a);const E=new window.DOMParser().parseFromString(a,"text/html"),j=[].concat(...E.body.querySelectorAll("*"));for(const L of j){const I=L.nodeName.toLowerCase();if(!Object.keys(p).includes(I)){L.remove();continue}const B=[].concat(...L.attributes),W=[].concat(p["*"]||[],p[I]||[]);for(const z of B)pw(z,W)||L.removeAttribute(z.nodeName)}return E.body.innerHTML}(s,this._config.allowList,this._config.sanitizeFn):s}_resolvePossibleFunction(s){return w(s,[void 0,this])}_putElementInTemplate(s,a){if(this._config.html)return a.innerHTML="",void a.append(s);a.textContent=s.textContent}}const yw=new Set(["sanitize","allowList","sanitizeFn"]),va="fade",us="show",ww=".tooltip-inner",bd=".modal",Pd="hide.bs.modal",Ui="hover",ya="focus",wa="click",_w={AUTO:"auto",TOP:"top",RIGHT:y()?"left":"right",BOTTOM:"bottom",LEFT:y()?"right":"left"},xw={allowList:Cd,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Sw={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class pr extends Ne{constructor(s,a){if(ed===void 0)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(s,a),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return xw}static get DefaultType(){return Sw}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),T.off(this._element.closest(bd),Pd,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const s=T.trigger(this._element,this.constructor.eventName("show")),a=(_(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(s.defaultPrevented||!a)return;this._disposePopper();const p=this._getTipElement();this._element.setAttribute("aria-describedby",p.getAttribute("id"));const{container:k}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(k.append(p),T.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(p),p.classList.add(us),"ontouchstart"in document.documentElement)for(const E of[].concat(...document.body.children))T.on(E,"mouseover",S);this._queueCallback(()=>{T.trigger(this._element,this.constructor.eventName("shown")),this._isHovered===!1&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!T.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(us),"ontouchstart"in document.documentElement)for(const s of[].concat(...document.body.children))T.off(s,"mouseover",S);this._activeTrigger[wa]=!1,this._activeTrigger[ya]=!1,this._activeTrigger[Ui]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),T.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(s){const a=this._getTemplateFactory(s).toHtml();if(!a)return null;a.classList.remove(va,us),a.classList.add(`bs-${this.constructor.NAME}-auto`);const p=(k=>{do k+=Math.floor(1e6*Math.random());while(document.getElementById(k));return k})(this.constructor.NAME).toString();return a.setAttribute("id",p),this._isAnimated()&&a.classList.add(va),a}setContent(s){this._newContent=s,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(s){return this._templateFactory?this._templateFactory.changeContent(s):this._templateFactory=new vw({...this._config,content:s,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[ww]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(s){return this.constructor.getOrCreateInstance(s.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(va)}_isShown(){return this.tip&&this.tip.classList.contains(us)}_createPopper(s){const a=w(this._config.placement,[this,s,this._element]),p=_w[a.toUpperCase()];return pa(this._element,s,this._getPopperConfig(p))}_getOffset(){const{offset:s}=this._config;return typeof s=="string"?s.split(",").map(a=>Number.parseInt(a,10)):typeof s=="function"?a=>s(a,this._element):s}_resolvePossibleFunction(s){return w(s,[this._element,this._element])}_getPopperConfig(s){const a={placement:s,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:p=>{this._getTipElement().setAttribute("data-popper-placement",p.state.placement)}}]};return{...a,...w(this._config.popperConfig,[void 0,a])}}_setListeners(){const s=this._config.trigger.split(" ");for(const a of s)if(a==="click")T.on(this._element,this.constructor.eventName("click"),this._config.selector,p=>{const k=this._initializeOnDelegatedTarget(p);k._activeTrigger[wa]=!(k._isShown()&&k._activeTrigger[wa]),k.toggle()});else if(a!=="manual"){const p=a===Ui?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),k=a===Ui?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");T.on(this._element,p,this._config.selector,E=>{const j=this._initializeOnDelegatedTarget(E);j._activeTrigger[E.type==="focusin"?ya:Ui]=!0,j._enter()}),T.on(this._element,k,this._config.selector,E=>{const j=this._initializeOnDelegatedTarget(E);j._activeTrigger[E.type==="focusout"?ya:Ui]=j._element.contains(E.relatedTarget),j._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},T.on(this._element.closest(bd),Pd,this._hideModalHandler)}_fixTitle(){const s=this._element.getAttribute("title");s&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",s),this._element.setAttribute("data-bs-original-title",s),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(s,a){clearTimeout(this._timeout),this._timeout=setTimeout(s,a)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(s){const a=Oe.getDataAttributes(this._element);for(const p of Object.keys(a))yw.has(p)&&delete a[p];return s={...a,...typeof s=="object"&&s?s:{}},s=this._mergeConfigObj(s),s=this._configAfterMerge(s),this._typeCheckConfig(s),s}_configAfterMerge(s){return s.container=s.container===!1?document.body:d(s.container),typeof s.delay=="number"&&(s.delay={show:s.delay,hide:s.delay}),typeof s.title=="number"&&(s.title=s.title.toString()),typeof s.content=="number"&&(s.content=s.content.toString()),s}_getDelegateConfig(){const s={};for(const[a,p]of Object.entries(this._config))this.constructor.Default[a]!==p&&(s[a]=p);return s.selector=!1,s.trigger="manual",s}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(s){return this.each(function(){const a=pr.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0)throw new TypeError(`No method named "${s}"`);a[s]()}})}}v(pr);const kw=".popover-header",Ew=".popover-body",Cw={...pr.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},bw={...pr.DefaultType,content:"(null|string|element|function)"};class cs extends pr{static get Default(){return Cw}static get DefaultType(){return bw}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[kw]:this._getTitle(),[Ew]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(s){return this.each(function(){const a=cs.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0)throw new TypeError(`No method named "${s}"`);a[s]()}})}}v(cs);const _a=".bs.scrollspy",Pw=`activate${_a}`,Od=`click${_a}`,Ow=`load${_a}.data-api`,Jr="active",xa="[href]",jd=".nav-link",jw=`${jd}, .nav-item > ${jd}, .list-group-item`,Tw={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Nw={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Wi extends Ne{constructor(s,a){super(s,a),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Tw}static get DefaultType(){return Nw}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const s of this._observableSections.values())this._observer.observe(s)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(s){return s.target=d(s.target)||document.body,s.rootMargin=s.offset?`${s.offset}px 0px -30%`:s.rootMargin,typeof s.threshold=="string"&&(s.threshold=s.threshold.split(",").map(a=>Number.parseFloat(a))),s}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(T.off(this._config.target,Od),T.on(this._config.target,Od,xa,s=>{const a=this._observableSections.get(s.target.hash);if(a){s.preventDefault();const p=this._rootElement||window,k=a.offsetTop-this._element.offsetTop;if(p.scrollTo)return void p.scrollTo({top:k,behavior:"smooth"});p.scrollTop=k}}))}_getNewObserver(){const s={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(a=>this._observerCallback(a),s)}_observerCallback(s){const a=j=>this._targetLinks.get(`#${j.target.id}`),p=j=>{this._previousScrollData.visibleEntryTop=j.target.offsetTop,this._process(a(j))},k=(this._rootElement||document.documentElement).scrollTop,E=k>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=k;for(const j of s){if(!j.isIntersecting){this._activeTarget=null,this._clearActiveClass(a(j));continue}const L=j.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(E&&L){if(p(j),!k)return}else E||L||p(j)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const s=K.find(xa,this._config.target);for(const a of s){if(!a.hash||g(a))continue;const p=K.findOne(decodeURI(a.hash),this._element);h(p)&&(this._targetLinks.set(decodeURI(a.hash),a),this._observableSections.set(a.hash,p))}}_process(s){this._activeTarget!==s&&(this._clearActiveClass(this._config.target),this._activeTarget=s,s.classList.add(Jr),this._activateParents(s),T.trigger(this._element,Pw,{relatedTarget:s}))}_activateParents(s){if(s.classList.contains("dropdown-item"))K.findOne(".dropdown-toggle",s.closest(".dropdown")).classList.add(Jr);else for(const a of K.parents(s,".nav, .list-group"))for(const p of K.prev(a,jw))p.classList.add(Jr)}_clearActiveClass(s){s.classList.remove(Jr);const a=K.find(`${xa}.${Jr}`,s);for(const p of a)p.classList.remove(Jr)}static jQueryInterface(s){return this.each(function(){const a=Wi.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s]()}})}}T.on(window,Ow,()=>{for(const f of K.find('[data-bs-spy="scroll"]'))Wi.getOrCreateInstance(f)}),v(Wi);const hr=".bs.tab",Lw=`hide${hr}`,Aw=`hidden${hr}`,Dw=`show${hr}`,$w=`shown${hr}`,Rw=`click${hr}`,Iw=`keydown${hr}`,Mw=`load${hr}`,zw="ArrowLeft",Td="ArrowRight",Fw="ArrowUp",Nd="ArrowDown",Sa="Home",Ld="End",mr="active",Ad="fade",ka="show",Dd=".dropdown-toggle",Ea=`:not(${Dd})`,$d='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Ca=`.nav-link${Ea}, .list-group-item${Ea}, [role="tab"]${Ea}, ${$d}`,Bw=`.${mr}[data-bs-toggle="tab"], .${mr}[data-bs-toggle="pill"], .${mr}[data-bs-toggle="list"]`;class gr extends Ne{constructor(s){super(s),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),T.on(this._element,Iw,a=>this._keydown(a)))}static get NAME(){return"tab"}show(){const s=this._element;if(this._elemIsActive(s))return;const a=this._getActiveElem(),p=a?T.trigger(a,Lw,{relatedTarget:s}):null;T.trigger(s,Dw,{relatedTarget:a}).defaultPrevented||p&&p.defaultPrevented||(this._deactivate(a,s),this._activate(s,a))}_activate(s,a){s&&(s.classList.add(mr),this._activate(K.getElementFromSelector(s)),this._queueCallback(()=>{s.getAttribute("role")==="tab"?(s.removeAttribute("tabindex"),s.setAttribute("aria-selected",!0),this._toggleDropDown(s,!0),T.trigger(s,$w,{relatedTarget:a})):s.classList.add(ka)},s,s.classList.contains(Ad)))}_deactivate(s,a){s&&(s.classList.remove(mr),s.blur(),this._deactivate(K.getElementFromSelector(s)),this._queueCallback(()=>{s.getAttribute("role")==="tab"?(s.setAttribute("aria-selected",!1),s.setAttribute("tabindex","-1"),this._toggleDropDown(s,!1),T.trigger(s,Aw,{relatedTarget:a})):s.classList.remove(ka)},s,s.classList.contains(Ad)))}_keydown(s){if(![zw,Td,Fw,Nd,Sa,Ld].includes(s.key))return;s.stopPropagation(),s.preventDefault();const a=this._getChildren().filter(k=>!g(k));let p;if([Sa,Ld].includes(s.key))p=a[s.key===Sa?0:a.length-1];else{const k=[Td,Nd].includes(s.key);p=N(a,s.target,k,!0)}p&&(p.focus({preventScroll:!0}),gr.getOrCreateInstance(p).show())}_getChildren(){return K.find(Ca,this._parent)}_getActiveElem(){return this._getChildren().find(s=>this._elemIsActive(s))||null}_setInitialAttributes(s,a){this._setAttributeIfNotExists(s,"role","tablist");for(const p of a)this._setInitialAttributesOnChild(p)}_setInitialAttributesOnChild(s){s=this._getInnerElement(s);const a=this._elemIsActive(s),p=this._getOuterElement(s);s.setAttribute("aria-selected",a),p!==s&&this._setAttributeIfNotExists(p,"role","presentation"),a||s.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(s,"role","tab"),this._setInitialAttributesOnTargetPanel(s)}_setInitialAttributesOnTargetPanel(s){const a=K.getElementFromSelector(s);a&&(this._setAttributeIfNotExists(a,"role","tabpanel"),s.id&&this._setAttributeIfNotExists(a,"aria-labelledby",`${s.id}`))}_toggleDropDown(s,a){const p=this._getOuterElement(s);if(!p.classList.contains("dropdown"))return;const k=(E,j)=>{const L=K.findOne(E,p);L&&L.classList.toggle(j,a)};k(Dd,mr),k(".dropdown-menu",ka),p.setAttribute("aria-expanded",a)}_setAttributeIfNotExists(s,a,p){s.hasAttribute(a)||s.setAttribute(a,p)}_elemIsActive(s){return s.classList.contains(mr)}_getInnerElement(s){return s.matches(Ca)?s:K.findOne(Ca,s)}_getOuterElement(s){return s.closest(".nav-item, .list-group-item")||s}static jQueryInterface(s){return this.each(function(){const a=gr.getOrCreateInstance(this);if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s]()}})}}T.on(document,Rw,$d,function(f){["A","AREA"].includes(this.tagName)&&f.preventDefault(),g(this)||gr.getOrCreateInstance(this).show()}),T.on(window,Mw,()=>{for(const f of K.find(Bw))gr.getOrCreateInstance(f)}),v(gr);const Tn=".bs.toast",Uw=`mouseover${Tn}`,Ww=`mouseout${Tn}`,Vw=`focusin${Tn}`,Hw=`focusout${Tn}`,Kw=`hide${Tn}`,Qw=`hidden${Tn}`,Yw=`show${Tn}`,Xw=`shown${Tn}`,Rd="hide",fs="show",ds="showing",Jw={animation:"boolean",autohide:"boolean",delay:"number"},Gw={animation:!0,autohide:!0,delay:5e3};class Vi extends Ne{constructor(s,a){super(s,a),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Gw}static get DefaultType(){return Jw}static get NAME(){return"toast"}show(){T.trigger(this._element,Yw).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(Rd),C(this._element),this._element.classList.add(fs,ds),this._queueCallback(()=>{this._element.classList.remove(ds),T.trigger(this._element,Xw),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(T.trigger(this._element,Kw).defaultPrevented||(this._element.classList.add(ds),this._queueCallback(()=>{this._element.classList.add(Rd),this._element.classList.remove(ds,fs),T.trigger(this._element,Qw)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(fs),super.dispose()}isShown(){return this._element.classList.contains(fs)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(s,a){switch(s.type){case"mouseover":case"mouseout":this._hasMouseInteraction=a;break;case"focusin":case"focusout":this._hasKeyboardInteraction=a}if(a)return void this._clearTimeout();const p=s.relatedTarget;this._element===p||this._element.contains(p)||this._maybeScheduleHide()}_setListeners(){T.on(this._element,Uw,s=>this._onInteraction(s,!0)),T.on(this._element,Ww,s=>this._onInteraction(s,!1)),T.on(this._element,Vw,s=>this._onInteraction(s,!0)),T.on(this._element,Hw,s=>this._onInteraction(s,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(s){return this.each(function(){const a=Vi.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0)throw new TypeError(`No method named "${s}"`);a[s](this)}})}}return Dr(Vi),v(Vi),{Alert:or,Button:On,Carousel:zr,Collapse:Br,Dropdown:Ut,Modal:dr,Offcanvas:pn,Popover:cs,ScrollSpy:Wi,Tab:gr,Toast:Vi,Tooltip:pr}})})(FS);const BS="modulepreload",US=function(e){return"/"+e},dh={},Me=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),u=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=Promise.allSettled(n.map(c=>{if(c=US(c),c in dh)return;dh[c]=!0;const d=c.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${h}`))return;const g=document.createElement("link");if(g.rel=d?"stylesheet":BS,d||(g.as="script"),g.crossOrigin="",g.href=c,u&&g.setAttribute("nonce",u),document.head.appendChild(g),d)return new Promise((_,S)=>{g.addEventListener("load",_),g.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return i.then(l=>{for(const u of l||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})},lv=x.createContext(null),ph="theme",hh="color",av="sidebarTheme",uv="sidebarBg";function WS(){const e=localStorage.getItem(av);return e==="light"||e==="dark"||e==="blue"||e==="green"?e:"light"}function VS(){const e=localStorage.getItem(uv);return e==="sidebarbgnone"||e==="sidebarbg1"||e==="sidebarbg2"||e==="sidebarbg3"||e==="sidebarbg4"?e:"sidebarbgnone"}function HS(e,t,n,r){const i=document.documentElement;i.setAttribute("data-theme",e),i.setAttribute("data-sidebar",n),i.setAttribute("data-color",t),i.setAttribute("data-sidebar-bg",r)}function KS({children:e}){const[t,n]=x.useState(()=>{const P=localStorage.getItem(ph);return P==="dark"||P==="light"?P:localStorage.getItem("darkMode")==="enabled"?"dark":"light"}),[r,i]=x.useState(()=>{const P=localStorage.getItem(hh);return P==="red"||P==="yellow"||P==="blue"||P==="green"?P:"red"}),[o,l]=x.useState(WS),[u,c]=x.useState(VS);x.useEffect(()=>{HS(t,r,o,u),localStorage.setItem(ph,t),localStorage.setItem(hh,r),localStorage.setItem(av,o),localStorage.setItem(uv,u),t==="dark"?localStorage.setItem("darkMode","enabled"):localStorage.removeItem("darkMode")},[t,r,o,u]);const d=x.useCallback(P=>n(P),[]),h=x.useCallback(P=>i(P),[]),g=x.useCallback(P=>l(P),[]),_=x.useCallback(P=>c(P),[]),S=x.useCallback(()=>{n(P=>P==="light"?"dark":"light")},[]),C=x.useCallback(()=>{n("light"),i("red"),l("light"),c("sidebarbgnone"),localStorage.removeItem("darkMode")},[]),O=x.useMemo(()=>({theme:t,accent:r,sidebarTheme:o,sidebarBg:u,setAccent:h,setSidebarTheme:g,setSidebarBg:_,toggleTheme:S,setTheme:d,resetTheme:C}),[t,r,o,u,h,g,_,S,d,C]);return m.jsx(lv.Provider,{value:O,children:e})}function cv(){const e=x.useContext(lv);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}var fv={exports:{}};/*! + */(function(e,t){(function(n,r){e.exports=r()})(a0,function(){const n=new Map,r={set(f,s,a){n.has(f)||n.set(f,new Map);const p=n.get(f);p.has(s)||p.size===0?p.set(s,a):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(p.keys())[0]}.`)},get:(f,s)=>n.has(f)&&n.get(f).get(s)||null,remove(f,s){if(!n.has(f))return;const a=n.get(f);a.delete(s),a.size===0&&n.delete(f)}},i="transitionend",o=f=>(f&&window.CSS&&window.CSS.escape&&(f=f.replace(/#([^\s"#']+)/g,(s,a)=>`#${CSS.escape(a)}`)),f),l=f=>f==null?`${f}`:Object.prototype.toString.call(f).match(/\s([a-z]+)/i)[1].toLowerCase(),u=f=>{f.dispatchEvent(new Event(i))},c=f=>!(!f||typeof f!="object")&&(f.jquery!==void 0&&(f=f[0]),f.nodeType!==void 0),d=f=>c(f)?f.jquery?f[0]:f:typeof f=="string"&&f.length>0?document.querySelector(o(f)):null,h=f=>{if(!c(f)||f.getClientRects().length===0)return!1;const s=getComputedStyle(f).getPropertyValue("visibility")==="visible",a=f.closest("details:not([open])");if(!a)return s;if(a!==f){const p=f.closest("summary");if(p&&p.parentNode!==a||p===null)return!1}return s},g=f=>!f||f.nodeType!==Node.ELEMENT_NODE||!!f.classList.contains("disabled")||(f.disabled!==void 0?f.disabled:f.hasAttribute("disabled")&&f.getAttribute("disabled")!=="false"),_=f=>{if(!document.documentElement.attachShadow)return null;if(typeof f.getRootNode=="function"){const s=f.getRootNode();return s instanceof ShadowRoot?s:null}return f instanceof ShadowRoot?f:f.parentNode?_(f.parentNode):null},S=()=>{},C=f=>{f.offsetHeight},O=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,P=[],y=()=>document.documentElement.dir==="rtl",v=f=>{var s;s=()=>{const a=O();if(a){const p=f.NAME,k=a.fn[p];a.fn[p]=f.jQueryInterface,a.fn[p].Constructor=f,a.fn[p].noConflict=()=>(a.fn[p]=k,f.jQueryInterface)}},document.readyState==="loading"?(P.length||document.addEventListener("DOMContentLoaded",()=>{for(const a of P)a()}),P.push(s)):s()},w=(f,s=[],a=f)=>typeof f=="function"?f.call(...s):a,b=(f,s,a=!0)=>{if(!a)return void w(f);const p=(j=>{if(!j)return 0;let{transitionDuration:L,transitionDelay:I}=window.getComputedStyle(j);const B=Number.parseFloat(L),W=Number.parseFloat(I);return B||W?(L=L.split(",")[0],I=I.split(",")[0],1e3*(Number.parseFloat(L)+Number.parseFloat(I))):0})(s)+5;let k=!1;const E=({target:j})=>{j===s&&(k=!0,s.removeEventListener(i,E),w(f))};s.addEventListener(i,E),setTimeout(()=>{k||u(s)},p)},N=(f,s,a,p)=>{const k=f.length;let E=f.indexOf(s);return E===-1?!a&&p?f[k-1]:f[0]:(E+=a?1:-1,p&&(E=(E+k)%k),f[Math.max(0,Math.min(E,k-1))])},A=/[^.]*(?=\..*)\.|.*/,D=/\..*/,R=/::\d+$/,K={};let F=1;const Y={mouseenter:"mouseover",mouseleave:"mouseout"},ee=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function ne(f,s){return s&&`${s}::${F++}`||f.uidEvent||F++}function xe(f){const s=ne(f);return f.uidEvent=s,K[s]=K[s]||{},K[s]}function De(f,s,a=null){return Object.values(f).find(p=>p.callable===s&&p.delegationSelector===a)}function ke(f,s,a){const p=typeof s=="string",k=p?a:s||a;let E=H(f);return ee.has(E)||(E=f),[p,k,E]}function Re(f,s,a,p,k){if(typeof s!="string"||!f)return;let[E,j,L]=ke(s,a,p);s in Y&&(j=(q=>function(G){if(!G.relatedTarget||G.relatedTarget!==G.delegateTarget&&!G.delegateTarget.contains(G.relatedTarget))return q.call(this,G)})(j));const I=xe(f),B=I[L]||(I[L]={}),W=De(B,j,E?a:null);if(W)return void(W.oneOff=W.oneOff&&k);const z=ne(j,s.replace(A,"")),te=E?function(J,q,G){return function Z(pe){const ge=J.querySelectorAll(q);for(let{target:ie}=pe;ie&&ie!==this;ie=ie.parentNode)for(const ae of ge)if(ae===ie)return de(pe,{delegateTarget:ie}),Z.oneOff&&T.off(J,pe.type,q,G),G.apply(ie,[pe])}}(f,a,j):function(J,q){return function G(Z){return de(Z,{delegateTarget:J}),G.oneOff&&T.off(J,Z.type,q),q.apply(J,[Z])}}(f,j);te.delegationSelector=E?a:null,te.callable=j,te.oneOff=k,te.uidEvent=z,B[z]=te,f.addEventListener(L,te,E)}function M(f,s,a,p,k){const E=De(s[a],p,k);E&&(f.removeEventListener(a,E,!!k),delete s[a][E.uidEvent])}function X(f,s,a,p){const k=s[a]||{};for(const[E,j]of Object.entries(k))E.includes(p)&&M(f,s,a,j.callable,j.delegationSelector)}function H(f){return f=f.replace(D,""),Y[f]||f}const T={on(f,s,a,p){Re(f,s,a,p,!1)},one(f,s,a,p){Re(f,s,a,p,!0)},off(f,s,a,p){if(typeof s!="string"||!f)return;const[k,E,j]=ke(s,a,p),L=j!==s,I=xe(f),B=I[j]||{},W=s.startsWith(".");if(E===void 0){if(W)for(const z of Object.keys(I))X(f,I,z,s.slice(1));for(const[z,te]of Object.entries(B)){const J=z.replace(R,"");L&&!s.includes(J)||M(f,I,j,te.callable,te.delegationSelector)}}else{if(!Object.keys(B).length)return;M(f,I,j,E,k?a:null)}},trigger(f,s,a){if(typeof s!="string"||!f)return null;const p=O();let k=null,E=!0,j=!0,L=!1;s!==H(s)&&p&&(k=p.Event(s,a),p(f).trigger(k),E=!k.isPropagationStopped(),j=!k.isImmediatePropagationStopped(),L=k.isDefaultPrevented());const I=de(new Event(s,{bubbles:E,cancelable:!0}),a);return L&&I.preventDefault(),j&&f.dispatchEvent(I),I.defaultPrevented&&k&&k.preventDefault(),I}};function de(f,s={}){for(const[a,p]of Object.entries(s))try{f[a]=p}catch{Object.defineProperty(f,a,{configurable:!0,get:()=>p})}return f}function Ct(f){if(f==="true")return!0;if(f==="false")return!1;if(f===Number(f).toString())return Number(f);if(f===""||f==="null")return null;if(typeof f!="string")return f;try{return JSON.parse(decodeURIComponent(f))}catch{return f}}function Ue(f){return f.replace(/[A-Z]/g,s=>`-${s.toLowerCase()}`)}const Oe={setDataAttribute(f,s,a){f.setAttribute(`data-bs-${Ue(s)}`,a)},removeDataAttribute(f,s){f.removeAttribute(`data-bs-${Ue(s)}`)},getDataAttributes(f){if(!f)return{};const s={},a=Object.keys(f.dataset).filter(p=>p.startsWith("bs")&&!p.startsWith("bsConfig"));for(const p of a){let k=p.replace(/^bs/,"");k=k.charAt(0).toLowerCase()+k.slice(1),s[k]=Ct(f.dataset[p])}return s},getDataAttribute:(f,s)=>Ct(f.getAttribute(`data-bs-${Ue(s)}`))};class ze{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(s){return s=this._mergeConfigObj(s),s=this._configAfterMerge(s),this._typeCheckConfig(s),s}_configAfterMerge(s){return s}_mergeConfigObj(s,a){const p=c(a)?Oe.getDataAttribute(a,"config"):{};return{...this.constructor.Default,...typeof p=="object"?p:{},...c(a)?Oe.getDataAttributes(a):{},...typeof s=="object"?s:{}}}_typeCheckConfig(s,a=this.constructor.DefaultType){for(const[p,k]of Object.entries(a)){const E=s[p],j=c(E)?"element":l(E);if(!new RegExp(k).test(j))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${p}" provided type "${j}" but expected type "${k}".`)}}}class Ne extends ze{constructor(s,a){super(),(s=d(s))&&(this._element=s,this._config=this._getConfig(a),r.set(this._element,this.constructor.DATA_KEY,this))}dispose(){r.remove(this._element,this.constructor.DATA_KEY),T.off(this._element,this.constructor.EVENT_KEY);for(const s of Object.getOwnPropertyNames(this))this[s]=null}_queueCallback(s,a,p=!0){b(s,a,p)}_getConfig(s){return s=this._mergeConfigObj(s,this._element),s=this._configAfterMerge(s),this._typeCheckConfig(s),s}static getInstance(s){return r.get(d(s),this.DATA_KEY)}static getOrCreateInstance(s,a={}){return this.getInstance(s)||new this(s,typeof a=="object"?a:null)}static get VERSION(){return"5.3.8"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(s){return`${s}${this.EVENT_KEY}`}}const Ft=f=>{let s=f.getAttribute("data-bs-target");if(!s||s==="#"){let a=f.getAttribute("href");if(!a||!a.includes("#")&&!a.startsWith("."))return null;a.includes("#")&&!a.startsWith("#")&&(a=`#${a.split("#")[1]}`),s=a&&a!=="#"?a.trim():null}return s?s.split(",").map(a=>o(a)).join(","):null},Q={find:(f,s=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(s,f)),findOne:(f,s=document.documentElement)=>Element.prototype.querySelector.call(s,f),children:(f,s)=>[].concat(...f.children).filter(a=>a.matches(s)),parents(f,s){const a=[];let p=f.parentNode.closest(s);for(;p;)a.push(p),p=p.parentNode.closest(s);return a},prev(f,s){let a=f.previousElementSibling;for(;a;){if(a.matches(s))return[a];a=a.previousElementSibling}return[]},next(f,s){let a=f.nextElementSibling;for(;a;){if(a.matches(s))return[a];a=a.nextElementSibling}return[]},focusableChildren(f){const s=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(a=>`${a}:not([tabindex^="-"])`).join(",");return this.find(s,f).filter(a=>!g(a)&&h(a))},getSelectorFromElement(f){const s=Ft(f);return s&&Q.findOne(s)?s:null},getElementFromSelector(f){const s=Ft(f);return s?Q.findOne(s):null},getMultipleElementsFromSelector(f){const s=Ft(f);return s?Q.find(s):[]}},Rr=(f,s="hide")=>{const a=`click.dismiss${f.EVENT_KEY}`,p=f.NAME;T.on(document,a,`[data-bs-dismiss="${p}"]`,function(k){if(["A","AREA"].includes(this.tagName)&&k.preventDefault(),g(this))return;const E=Q.getElementFromSelector(this)||this.closest(`.${p}`);f.getOrCreateInstance(E)[s]()})},$r=".bs.alert",Kl=`close${$r}`,Qo=`closed${$r}`;class or extends Ne{static get NAME(){return"alert"}close(){if(T.trigger(this._element,Kl).defaultPrevented)return;this._element.classList.remove("show");const s=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,s)}_destroyElement(){this._element.remove(),T.trigger(this._element,Qo),this.dispose()}static jQueryInterface(s){return this.each(function(){const a=or.getOrCreateInstance(this);if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s](this)}})}}Rr(or,"close"),v(or);const Yo='[data-bs-toggle="button"]';class On extends Ne{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(s){return this.each(function(){const a=On.getOrCreateInstance(this);s==="toggle"&&a[s]()})}}T.on(document,"click.bs.button.data-api",Yo,f=>{f.preventDefault();const s=f.target.closest(Yo);On.getOrCreateInstance(s).toggle()}),v(On);const un=".bs.swipe",Ql=`touchstart${un}`,Yl=`touchmove${un}`,cn=`touchend${un}`,Ir=`pointerdown${un}`,Xo=`pointerup${un}`,Jo={endCallback:null,leftCallback:null,rightCallback:null},Ri={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class sr extends ze{constructor(s,a){super(),this._element=s,s&&sr.isSupported()&&(this._config=this._getConfig(a),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return Jo}static get DefaultType(){return Ri}static get NAME(){return"swipe"}dispose(){T.off(this._element,un)}_start(s){this._supportPointerEvents?this._eventIsPointerPenTouch(s)&&(this._deltaX=s.clientX):this._deltaX=s.touches[0].clientX}_end(s){this._eventIsPointerPenTouch(s)&&(this._deltaX=s.clientX-this._deltaX),this._handleSwipe(),w(this._config.endCallback)}_move(s){this._deltaX=s.touches&&s.touches.length>1?0:s.touches[0].clientX-this._deltaX}_handleSwipe(){const s=Math.abs(this._deltaX);if(s<=40)return;const a=s/this._deltaX;this._deltaX=0,a&&w(a>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(T.on(this._element,Ir,s=>this._start(s)),T.on(this._element,Xo,s=>this._end(s)),this._element.classList.add("pointer-event")):(T.on(this._element,Ql,s=>this._start(s)),T.on(this._element,Yl,s=>this._move(s)),T.on(this._element,cn,s=>this._end(s)))}_eventIsPointerPenTouch(s){return this._supportPointerEvents&&(s.pointerType==="pen"||s.pointerType==="touch")}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Bt=".bs.carousel",$i=".data-api",Go="ArrowLeft",Gv="ArrowRight",Ii="next",Mr="prev",zr="left",qo="right",qv=`slide${Bt}`,Xl=`slid${Bt}`,Zv=`keydown${Bt}`,ey=`mouseenter${Bt}`,ty=`mouseleave${Bt}`,ny=`dragstart${Bt}`,ry=`load${Bt}${$i}`,iy=`click${Bt}${$i}`,xf="carousel",Zo="active",Sf=".active",kf=".carousel-item",oy=Sf+kf,sy={[Go]:qo,[Gv]:zr},ly={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},ay={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Fr extends Ne{constructor(s,a){super(s,a),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Q.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===xf&&this.cycle()}static get Default(){return ly}static get DefaultType(){return ay}static get NAME(){return"carousel"}next(){this._slide(Ii)}nextWhenVisible(){!document.hidden&&h(this._element)&&this.next()}prev(){this._slide(Mr)}pause(){this._isSliding&&u(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?T.one(this._element,Xl,()=>this.cycle()):this.cycle())}to(s){const a=this._getItems();if(s>a.length-1||s<0)return;if(this._isSliding)return void T.one(this._element,Xl,()=>this.to(s));const p=this._getItemIndex(this._getActive());if(p===s)return;const k=s>p?Ii:Mr;this._slide(k,a[s])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(s){return s.defaultInterval=s.interval,s}_addEventListeners(){this._config.keyboard&&T.on(this._element,Zv,s=>this._keydown(s)),this._config.pause==="hover"&&(T.on(this._element,ey,()=>this.pause()),T.on(this._element,ty,()=>this._maybeEnableCycle())),this._config.touch&&sr.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const a of Q.find(".carousel-item img",this._element))T.on(a,ny,p=>p.preventDefault());const s={leftCallback:()=>this._slide(this._directionToOrder(zr)),rightCallback:()=>this._slide(this._directionToOrder(qo)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new sr(this._element,s)}_keydown(s){if(/input|textarea/i.test(s.target.tagName))return;const a=sy[s.key];a&&(s.preventDefault(),this._slide(this._directionToOrder(a)))}_getItemIndex(s){return this._getItems().indexOf(s)}_setActiveIndicatorElement(s){if(!this._indicatorsElement)return;const a=Q.findOne(Sf,this._indicatorsElement);a.classList.remove(Zo),a.removeAttribute("aria-current");const p=Q.findOne(`[data-bs-slide-to="${s}"]`,this._indicatorsElement);p&&(p.classList.add(Zo),p.setAttribute("aria-current","true"))}_updateInterval(){const s=this._activeElement||this._getActive();if(!s)return;const a=Number.parseInt(s.getAttribute("data-bs-interval"),10);this._config.interval=a||this._config.defaultInterval}_slide(s,a=null){if(this._isSliding)return;const p=this._getActive(),k=s===Ii,E=a||N(this._getItems(),p,k,this._config.wrap);if(E===p)return;const j=this._getItemIndex(E),L=z=>T.trigger(this._element,z,{relatedTarget:E,direction:this._orderToDirection(s),from:this._getItemIndex(p),to:j});if(L(qv).defaultPrevented||!p||!E)return;const I=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(j),this._activeElement=E;const B=k?"carousel-item-start":"carousel-item-end",W=k?"carousel-item-next":"carousel-item-prev";E.classList.add(W),C(E),p.classList.add(B),E.classList.add(B),this._queueCallback(()=>{E.classList.remove(B,W),E.classList.add(Zo),p.classList.remove(Zo,W,B),this._isSliding=!1,L(Xl)},p,this._isAnimated()),I&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Q.findOne(oy,this._element)}_getItems(){return Q.find(kf,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(s){return y()?s===zr?Mr:Ii:s===zr?Ii:Mr}_orderToDirection(s){return y()?s===Mr?zr:qo:s===Mr?qo:zr}static jQueryInterface(s){return this.each(function(){const a=Fr.getOrCreateInstance(this,s);if(typeof s!="number"){if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s]()}}else a.to(s)})}}T.on(document,iy,"[data-bs-slide], [data-bs-slide-to]",function(f){const s=Q.getElementFromSelector(this);if(!s||!s.classList.contains(xf))return;f.preventDefault();const a=Fr.getOrCreateInstance(s),p=this.getAttribute("data-bs-slide-to");return p?(a.to(p),void a._maybeEnableCycle()):Oe.getDataAttribute(this,"slide")==="next"?(a.next(),void a._maybeEnableCycle()):(a.prev(),void a._maybeEnableCycle())}),T.on(window,ry,()=>{const f=Q.find('[data-bs-ride="carousel"]');for(const s of f)Fr.getOrCreateInstance(s)}),v(Fr);const Mi=".bs.collapse",uy=`show${Mi}`,cy=`shown${Mi}`,fy=`hide${Mi}`,dy=`hidden${Mi}`,py=`click${Mi}.data-api`,Jl="show",Br="collapse",es="collapsing",hy=`:scope .${Br} .${Br}`,Gl='[data-bs-toggle="collapse"]',my={parent:null,toggle:!0},gy={parent:"(null|element)",toggle:"boolean"};class Ur extends Ne{constructor(s,a){super(s,a),this._isTransitioning=!1,this._triggerArray=[];const p=Q.find(Gl);for(const k of p){const E=Q.getSelectorFromElement(k),j=Q.find(E).filter(L=>L===this._element);E!==null&&j.length&&this._triggerArray.push(k)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return my}static get DefaultType(){return gy}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let s=[];if(this._config.parent&&(s=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(k=>k!==this._element).map(k=>Ur.getOrCreateInstance(k,{toggle:!1}))),s.length&&s[0]._isTransitioning||T.trigger(this._element,uy).defaultPrevented)return;for(const k of s)k.hide();const a=this._getDimension();this._element.classList.remove(Br),this._element.classList.add(es),this._element.style[a]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const p=`scroll${a[0].toUpperCase()+a.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(es),this._element.classList.add(Br,Jl),this._element.style[a]="",T.trigger(this._element,cy)},this._element,!0),this._element.style[a]=`${this._element[p]}px`}hide(){if(this._isTransitioning||!this._isShown()||T.trigger(this._element,fy).defaultPrevented)return;const s=this._getDimension();this._element.style[s]=`${this._element.getBoundingClientRect()[s]}px`,C(this._element),this._element.classList.add(es),this._element.classList.remove(Br,Jl);for(const a of this._triggerArray){const p=Q.getElementFromSelector(a);p&&!this._isShown(p)&&this._addAriaAndCollapsedClass([a],!1)}this._isTransitioning=!0,this._element.style[s]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(es),this._element.classList.add(Br),T.trigger(this._element,dy)},this._element,!0)}_isShown(s=this._element){return s.classList.contains(Jl)}_configAfterMerge(s){return s.toggle=!!s.toggle,s.parent=d(s.parent),s}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const s=this._getFirstLevelChildren(Gl);for(const a of s){const p=Q.getElementFromSelector(a);p&&this._addAriaAndCollapsedClass([a],this._isShown(p))}}_getFirstLevelChildren(s){const a=Q.find(hy,this._config.parent);return Q.find(s,this._config.parent).filter(p=>!a.includes(p))}_addAriaAndCollapsedClass(s,a){if(s.length)for(const p of s)p.classList.toggle("collapsed",!a),p.setAttribute("aria-expanded",a)}static jQueryInterface(s){const a={};return typeof s=="string"&&/show|hide/.test(s)&&(a.toggle=!1),this.each(function(){const p=Ur.getOrCreateInstance(this,a);if(typeof s=="string"){if(p[s]===void 0)throw new TypeError(`No method named "${s}"`);p[s]()}})}}T.on(document,py,Gl,function(f){(f.target.tagName==="A"||f.delegateTarget&&f.delegateTarget.tagName==="A")&&f.preventDefault();for(const s of Q.getMultipleElementsFromSelector(this))Ur.getOrCreateInstance(s,{toggle:!1}).toggle()}),v(Ur);var Ze="top",ht="bottom",mt="right",et="left",ts="auto",Wr=[Ze,ht,mt,et],lr="start",Vr="end",Ef="clippingParents",ql="viewport",Hr="popper",Cf="reference",Zl=Wr.reduce(function(f,s){return f.concat([s+"-"+lr,s+"-"+Vr])},[]),ea=[].concat(Wr,[ts]).reduce(function(f,s){return f.concat([s,s+"-"+lr,s+"-"+Vr])},[]),bf="beforeRead",Pf="read",Of="afterRead",jf="beforeMain",Tf="main",Nf="afterMain",Lf="beforeWrite",Af="write",Df="afterWrite",Rf=[bf,Pf,Of,jf,Tf,Nf,Lf,Af,Df];function Gt(f){return f?(f.nodeName||"").toLowerCase():null}function gt(f){if(f==null)return window;if(f.toString()!=="[object Window]"){var s=f.ownerDocument;return s&&s.defaultView||window}return f}function ar(f){return f instanceof gt(f).Element||f instanceof Element}function bt(f){return f instanceof gt(f).HTMLElement||f instanceof HTMLElement}function ta(f){return typeof ShadowRoot<"u"&&(f instanceof gt(f).ShadowRoot||f instanceof ShadowRoot)}const na={name:"applyStyles",enabled:!0,phase:"write",fn:function(f){var s=f.state;Object.keys(s.elements).forEach(function(a){var p=s.styles[a]||{},k=s.attributes[a]||{},E=s.elements[a];bt(E)&&Gt(E)&&(Object.assign(E.style,p),Object.keys(k).forEach(function(j){var L=k[j];L===!1?E.removeAttribute(j):E.setAttribute(j,L===!0?"":L)}))})},effect:function(f){var s=f.state,a={popper:{position:s.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(s.elements.popper.style,a.popper),s.styles=a,s.elements.arrow&&Object.assign(s.elements.arrow.style,a.arrow),function(){Object.keys(s.elements).forEach(function(p){var k=s.elements[p],E=s.attributes[p]||{},j=Object.keys(s.styles.hasOwnProperty(p)?s.styles[p]:a[p]).reduce(function(L,I){return L[I]="",L},{});bt(k)&&Gt(k)&&(Object.assign(k.style,j),Object.keys(E).forEach(function(L){k.removeAttribute(L)}))})}},requires:["computeStyles"]};function qt(f){return f.split("-")[0]}var ur=Math.max,ns=Math.min,Kr=Math.round;function ra(){var f=navigator.userAgentData;return f!=null&&f.brands&&Array.isArray(f.brands)?f.brands.map(function(s){return s.brand+"/"+s.version}).join(" "):navigator.userAgent}function $f(){return!/^((?!chrome|android).)*safari/i.test(ra())}function Qr(f,s,a){s===void 0&&(s=!1),a===void 0&&(a=!1);var p=f.getBoundingClientRect(),k=1,E=1;s&&bt(f)&&(k=f.offsetWidth>0&&Kr(p.width)/f.offsetWidth||1,E=f.offsetHeight>0&&Kr(p.height)/f.offsetHeight||1);var j=(ar(f)?gt(f):window).visualViewport,L=!$f()&&a,I=(p.left+(L&&j?j.offsetLeft:0))/k,B=(p.top+(L&&j?j.offsetTop:0))/E,W=p.width/k,z=p.height/E;return{width:W,height:z,top:B,right:I+W,bottom:B+z,left:I,x:I,y:B}}function ia(f){var s=Qr(f),a=f.offsetWidth,p=f.offsetHeight;return Math.abs(s.width-a)<=1&&(a=s.width),Math.abs(s.height-p)<=1&&(p=s.height),{x:f.offsetLeft,y:f.offsetTop,width:a,height:p}}function If(f,s){var a=s.getRootNode&&s.getRootNode();if(f.contains(s))return!0;if(a&&ta(a)){var p=s;do{if(p&&f.isSameNode(p))return!0;p=p.parentNode||p.host}while(p)}return!1}function fn(f){return gt(f).getComputedStyle(f)}function vy(f){return["table","td","th"].indexOf(Gt(f))>=0}function jn(f){return((ar(f)?f.ownerDocument:f.document)||window.document).documentElement}function rs(f){return Gt(f)==="html"?f:f.assignedSlot||f.parentNode||(ta(f)?f.host:null)||jn(f)}function Mf(f){return bt(f)&&fn(f).position!=="fixed"?f.offsetParent:null}function zi(f){for(var s=gt(f),a=Mf(f);a&&vy(a)&&fn(a).position==="static";)a=Mf(a);return a&&(Gt(a)==="html"||Gt(a)==="body"&&fn(a).position==="static")?s:a||function(p){var k=/firefox/i.test(ra());if(/Trident/i.test(ra())&&bt(p)&&fn(p).position==="fixed")return null;var E=rs(p);for(ta(E)&&(E=E.host);bt(E)&&["html","body"].indexOf(Gt(E))<0;){var j=fn(E);if(j.transform!=="none"||j.perspective!=="none"||j.contain==="paint"||["transform","perspective"].indexOf(j.willChange)!==-1||k&&j.willChange==="filter"||k&&j.filter&&j.filter!=="none")return E;E=E.parentNode}return null}(f)||s}function oa(f){return["top","bottom"].indexOf(f)>=0?"x":"y"}function Fi(f,s,a){return ur(f,ns(s,a))}function zf(f){return Object.assign({},{top:0,right:0,bottom:0,left:0},f)}function Ff(f,s){return s.reduce(function(a,p){return a[p]=f,a},{})}const Bf={name:"arrow",enabled:!0,phase:"main",fn:function(f){var s,a=f.state,p=f.name,k=f.options,E=a.elements.arrow,j=a.modifiersData.popperOffsets,L=qt(a.placement),I=oa(L),B=[et,mt].indexOf(L)>=0?"height":"width";if(E&&j){var W=function(he,ce){return zf(typeof(he=typeof he=="function"?he(Object.assign({},ce.rects,{placement:ce.placement})):he)!="number"?he:Ff(he,Wr))}(k.padding,a),z=ia(E),te=I==="y"?Ze:et,J=I==="y"?ht:mt,q=a.rects.reference[B]+a.rects.reference[I]-j[I]-a.rects.popper[B],G=j[I]-a.rects.reference[I],Z=zi(E),pe=Z?I==="y"?Z.clientHeight||0:Z.clientWidth||0:0,ge=q/2-G/2,ie=W[te],ae=pe-z[B]-W[J],re=pe/2-z[B]/2+ge,se=Fi(ie,re,ae),ue=I;a.modifiersData[p]=((s={})[ue]=se,s.centerOffset=se-re,s)}},effect:function(f){var s=f.state,a=f.options.element,p=a===void 0?"[data-popper-arrow]":a;p!=null&&(typeof p!="string"||(p=s.elements.popper.querySelector(p)))&&If(s.elements.popper,p)&&(s.elements.arrow=p)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Yr(f){return f.split("-")[1]}var yy={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Uf(f){var s,a=f.popper,p=f.popperRect,k=f.placement,E=f.variation,j=f.offsets,L=f.position,I=f.gpuAcceleration,B=f.adaptive,W=f.roundOffsets,z=f.isFixed,te=j.x,J=te===void 0?0:te,q=j.y,G=q===void 0?0:q,Z=typeof W=="function"?W({x:J,y:G}):{x:J,y:G};J=Z.x,G=Z.y;var pe=j.hasOwnProperty("x"),ge=j.hasOwnProperty("y"),ie=et,ae=Ze,re=window;if(B){var se=zi(a),ue="clientHeight",he="clientWidth";se===gt(a)&&fn(se=jn(a)).position!=="static"&&L==="absolute"&&(ue="scrollHeight",he="scrollWidth"),(k===Ze||(k===et||k===mt)&&E===Vr)&&(ae=ht,G-=(z&&se===re&&re.visualViewport?re.visualViewport.height:se[ue])-p.height,G*=I?1:-1),k!==et&&(k!==Ze&&k!==ht||E!==Vr)||(ie=mt,J-=(z&&se===re&&re.visualViewport?re.visualViewport.width:se[he])-p.width,J*=I?1:-1)}var ce,Le=Object.assign({position:L},B&&yy),vt=W===!0?function(Wt,tt){var Ot=Wt.x,jt=Wt.y,je=tt.devicePixelRatio||1;return{x:Kr(Ot*je)/je||0,y:Kr(jt*je)/je||0}}({x:J,y:G},gt(a)):{x:J,y:G};return J=vt.x,G=vt.y,I?Object.assign({},Le,((ce={})[ae]=ge?"0":"",ce[ie]=pe?"0":"",ce.transform=(re.devicePixelRatio||1)<=1?"translate("+J+"px, "+G+"px)":"translate3d("+J+"px, "+G+"px, 0)",ce)):Object.assign({},Le,((s={})[ae]=ge?G+"px":"",s[ie]=pe?J+"px":"",s.transform="",s))}const sa={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(f){var s=f.state,a=f.options,p=a.gpuAcceleration,k=p===void 0||p,E=a.adaptive,j=E===void 0||E,L=a.roundOffsets,I=L===void 0||L,B={placement:qt(s.placement),variation:Yr(s.placement),popper:s.elements.popper,popperRect:s.rects.popper,gpuAcceleration:k,isFixed:s.options.strategy==="fixed"};s.modifiersData.popperOffsets!=null&&(s.styles.popper=Object.assign({},s.styles.popper,Uf(Object.assign({},B,{offsets:s.modifiersData.popperOffsets,position:s.options.strategy,adaptive:j,roundOffsets:I})))),s.modifiersData.arrow!=null&&(s.styles.arrow=Object.assign({},s.styles.arrow,Uf(Object.assign({},B,{offsets:s.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:I})))),s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-placement":s.placement})},data:{}};var is={passive:!0};const la={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(f){var s=f.state,a=f.instance,p=f.options,k=p.scroll,E=k===void 0||k,j=p.resize,L=j===void 0||j,I=gt(s.elements.popper),B=[].concat(s.scrollParents.reference,s.scrollParents.popper);return E&&B.forEach(function(W){W.addEventListener("scroll",a.update,is)}),L&&I.addEventListener("resize",a.update,is),function(){E&&B.forEach(function(W){W.removeEventListener("scroll",a.update,is)}),L&&I.removeEventListener("resize",a.update,is)}},data:{}};var wy={left:"right",right:"left",bottom:"top",top:"bottom"};function os(f){return f.replace(/left|right|bottom|top/g,function(s){return wy[s]})}var _y={start:"end",end:"start"};function Wf(f){return f.replace(/start|end/g,function(s){return _y[s]})}function aa(f){var s=gt(f);return{scrollLeft:s.pageXOffset,scrollTop:s.pageYOffset}}function ua(f){return Qr(jn(f)).left+aa(f).scrollLeft}function ca(f){var s=fn(f),a=s.overflow,p=s.overflowX,k=s.overflowY;return/auto|scroll|overlay|hidden/.test(a+k+p)}function Vf(f){return["html","body","#document"].indexOf(Gt(f))>=0?f.ownerDocument.body:bt(f)&&ca(f)?f:Vf(rs(f))}function Bi(f,s){var a;s===void 0&&(s=[]);var p=Vf(f),k=p===((a=f.ownerDocument)==null?void 0:a.body),E=gt(p),j=k?[E].concat(E.visualViewport||[],ca(p)?p:[]):p,L=s.concat(j);return k?L:L.concat(Bi(rs(j)))}function fa(f){return Object.assign({},f,{left:f.x,top:f.y,right:f.x+f.width,bottom:f.y+f.height})}function Hf(f,s,a){return s===ql?fa(function(p,k){var E=gt(p),j=jn(p),L=E.visualViewport,I=j.clientWidth,B=j.clientHeight,W=0,z=0;if(L){I=L.width,B=L.height;var te=$f();(te||!te&&k==="fixed")&&(W=L.offsetLeft,z=L.offsetTop)}return{width:I,height:B,x:W+ua(p),y:z}}(f,a)):ar(s)?function(p,k){var E=Qr(p,!1,k==="fixed");return E.top=E.top+p.clientTop,E.left=E.left+p.clientLeft,E.bottom=E.top+p.clientHeight,E.right=E.left+p.clientWidth,E.width=p.clientWidth,E.height=p.clientHeight,E.x=E.left,E.y=E.top,E}(s,a):fa(function(p){var k,E=jn(p),j=aa(p),L=(k=p.ownerDocument)==null?void 0:k.body,I=ur(E.scrollWidth,E.clientWidth,L?L.scrollWidth:0,L?L.clientWidth:0),B=ur(E.scrollHeight,E.clientHeight,L?L.scrollHeight:0,L?L.clientHeight:0),W=-j.scrollLeft+ua(p),z=-j.scrollTop;return fn(L||E).direction==="rtl"&&(W+=ur(E.clientWidth,L?L.clientWidth:0)-I),{width:I,height:B,x:W,y:z}}(jn(f)))}function Kf(f){var s,a=f.reference,p=f.element,k=f.placement,E=k?qt(k):null,j=k?Yr(k):null,L=a.x+a.width/2-p.width/2,I=a.y+a.height/2-p.height/2;switch(E){case Ze:s={x:L,y:a.y-p.height};break;case ht:s={x:L,y:a.y+a.height};break;case mt:s={x:a.x+a.width,y:I};break;case et:s={x:a.x-p.width,y:I};break;default:s={x:a.x,y:a.y}}var B=E?oa(E):null;if(B!=null){var W=B==="y"?"height":"width";switch(j){case lr:s[B]=s[B]-(a[W]/2-p[W]/2);break;case Vr:s[B]=s[B]+(a[W]/2-p[W]/2)}}return s}function Xr(f,s){s===void 0&&(s={});var a=s,p=a.placement,k=p===void 0?f.placement:p,E=a.strategy,j=E===void 0?f.strategy:E,L=a.boundary,I=L===void 0?Ef:L,B=a.rootBoundary,W=B===void 0?ql:B,z=a.elementContext,te=z===void 0?Hr:z,J=a.altBoundary,q=J!==void 0&&J,G=a.padding,Z=G===void 0?0:G,pe=zf(typeof Z!="number"?Z:Ff(Z,Wr)),ge=te===Hr?Cf:Hr,ie=f.rects.popper,ae=f.elements[q?ge:te],re=function(tt,Ot,jt,je){var Zt=Ot==="clippingParents"?function(me){var nt=Bi(rs(me)),Tt=["absolute","fixed"].indexOf(fn(me).position)>=0&&bt(me)?zi(me):me;return ar(Tt)?nt.filter(function(Nn){return ar(Nn)&&If(Nn,Tt)&&Gt(Nn)!=="body"}):[]}(tt):[].concat(Ot),en=[].concat(Zt,[jt]),qr=en[0],We=en.reduce(function(me,nt){var Tt=Hf(tt,nt,je);return me.top=ur(Tt.top,me.top),me.right=ns(Tt.right,me.right),me.bottom=ns(Tt.bottom,me.bottom),me.left=ur(Tt.left,me.left),me},Hf(tt,qr,je));return We.width=We.right-We.left,We.height=We.bottom-We.top,We.x=We.left,We.y=We.top,We}(ar(ae)?ae:ae.contextElement||jn(f.elements.popper),I,W,j),se=Qr(f.elements.reference),ue=Kf({reference:se,element:ie,placement:k}),he=fa(Object.assign({},ie,ue)),ce=te===Hr?he:se,Le={top:re.top-ce.top+pe.top,bottom:ce.bottom-re.bottom+pe.bottom,left:re.left-ce.left+pe.left,right:ce.right-re.right+pe.right},vt=f.modifiersData.offset;if(te===Hr&&vt){var Wt=vt[k];Object.keys(Le).forEach(function(tt){var Ot=[mt,ht].indexOf(tt)>=0?1:-1,jt=[Ze,ht].indexOf(tt)>=0?"y":"x";Le[tt]+=Wt[jt]*Ot})}return Le}function xy(f,s){s===void 0&&(s={});var a=s,p=a.placement,k=a.boundary,E=a.rootBoundary,j=a.padding,L=a.flipVariations,I=a.allowedAutoPlacements,B=I===void 0?ea:I,W=Yr(p),z=W?L?Zl:Zl.filter(function(q){return Yr(q)===W}):Wr,te=z.filter(function(q){return B.indexOf(q)>=0});te.length===0&&(te=z);var J=te.reduce(function(q,G){return q[G]=Xr(f,{placement:G,boundary:k,rootBoundary:E,padding:j})[qt(G)],q},{});return Object.keys(J).sort(function(q,G){return J[q]-J[G]})}const Qf={name:"flip",enabled:!0,phase:"main",fn:function(f){var s=f.state,a=f.options,p=f.name;if(!s.modifiersData[p]._skip){for(var k=a.mainAxis,E=k===void 0||k,j=a.altAxis,L=j===void 0||j,I=a.fallbackPlacements,B=a.padding,W=a.boundary,z=a.rootBoundary,te=a.altBoundary,J=a.flipVariations,q=J===void 0||J,G=a.allowedAutoPlacements,Z=s.options.placement,pe=qt(Z),ge=I||(pe!==Z&&q?function(me){if(qt(me)===ts)return[];var nt=os(me);return[Wf(me),nt,Wf(nt)]}(Z):[os(Z)]),ie=[Z].concat(ge).reduce(function(me,nt){return me.concat(qt(nt)===ts?xy(s,{placement:nt,boundary:W,rootBoundary:z,padding:B,flipVariations:q,allowedAutoPlacements:G}):nt)},[]),ae=s.rects.reference,re=s.rects.popper,se=new Map,ue=!0,he=ie[0],ce=0;ce=0,Ot=tt?"width":"height",jt=Xr(s,{placement:Le,boundary:W,rootBoundary:z,altBoundary:te,padding:B}),je=tt?Wt?mt:et:Wt?ht:Ze;ae[Ot]>re[Ot]&&(je=os(je));var Zt=os(je),en=[];if(E&&en.push(jt[vt]<=0),L&&en.push(jt[je]<=0,jt[Zt]<=0),en.every(function(me){return me})){he=Le,ue=!1;break}se.set(Le,en)}if(ue)for(var qr=function(me){var nt=ie.find(function(Tt){var Nn=se.get(Tt);if(Nn)return Nn.slice(0,me).every(function(hs){return hs})});if(nt)return he=nt,"break"},We=q?3:1;We>0&&qr(We)!=="break";We--);s.placement!==he&&(s.modifiersData[p]._skip=!0,s.placement=he,s.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Yf(f,s,a){return a===void 0&&(a={x:0,y:0}),{top:f.top-s.height-a.y,right:f.right-s.width+a.x,bottom:f.bottom-s.height+a.y,left:f.left-s.width-a.x}}function Xf(f){return[Ze,mt,ht,et].some(function(s){return f[s]>=0})}const Jf={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(f){var s=f.state,a=f.name,p=s.rects.reference,k=s.rects.popper,E=s.modifiersData.preventOverflow,j=Xr(s,{elementContext:"reference"}),L=Xr(s,{altBoundary:!0}),I=Yf(j,p),B=Yf(L,k,E),W=Xf(I),z=Xf(B);s.modifiersData[a]={referenceClippingOffsets:I,popperEscapeOffsets:B,isReferenceHidden:W,hasPopperEscaped:z},s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-reference-hidden":W,"data-popper-escaped":z})}},Gf={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(f){var s=f.state,a=f.options,p=f.name,k=a.offset,E=k===void 0?[0,0]:k,j=ea.reduce(function(W,z){return W[z]=function(te,J,q){var G=qt(te),Z=[et,Ze].indexOf(G)>=0?-1:1,pe=typeof q=="function"?q(Object.assign({},J,{placement:te})):q,ge=pe[0],ie=pe[1];return ge=ge||0,ie=(ie||0)*Z,[et,mt].indexOf(G)>=0?{x:ie,y:ge}:{x:ge,y:ie}}(z,s.rects,E),W},{}),L=j[s.placement],I=L.x,B=L.y;s.modifiersData.popperOffsets!=null&&(s.modifiersData.popperOffsets.x+=I,s.modifiersData.popperOffsets.y+=B),s.modifiersData[p]=j}},da={name:"popperOffsets",enabled:!0,phase:"read",fn:function(f){var s=f.state,a=f.name;s.modifiersData[a]=Kf({reference:s.rects.reference,element:s.rects.popper,placement:s.placement})},data:{}},qf={name:"preventOverflow",enabled:!0,phase:"main",fn:function(f){var s=f.state,a=f.options,p=f.name,k=a.mainAxis,E=k===void 0||k,j=a.altAxis,L=j!==void 0&&j,I=a.boundary,B=a.rootBoundary,W=a.altBoundary,z=a.padding,te=a.tether,J=te===void 0||te,q=a.tetherOffset,G=q===void 0?0:q,Z=Xr(s,{boundary:I,rootBoundary:B,padding:z,altBoundary:W}),pe=qt(s.placement),ge=Yr(s.placement),ie=!ge,ae=oa(pe),re=ae==="x"?"y":"x",se=s.modifiersData.popperOffsets,ue=s.rects.reference,he=s.rects.popper,ce=typeof G=="function"?G(Object.assign({},s.rects,{placement:s.placement})):G,Le=typeof ce=="number"?{mainAxis:ce,altAxis:ce}:Object.assign({mainAxis:0,altAxis:0},ce),vt=s.modifiersData.offset?s.modifiersData.offset[s.placement]:null,Wt={x:0,y:0};if(se){if(E){var tt,Ot=ae==="y"?Ze:et,jt=ae==="y"?ht:mt,je=ae==="y"?"height":"width",Zt=se[ae],en=Zt+Z[Ot],qr=Zt-Z[jt],We=J?-he[je]/2:0,me=ge===lr?ue[je]:he[je],nt=ge===lr?-he[je]:-ue[je],Tt=s.elements.arrow,Nn=J&&Tt?ia(Tt):{width:0,height:0},hs=s.modifiersData["arrow#persistent"]?s.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Md=hs[Ot],zd=hs[jt],ms=Fi(0,ue[je],Nn[je]),Zw=ie?ue[je]/2-We-ms-Md-Le.mainAxis:me-ms-Md-Le.mainAxis,e0=ie?-ue[je]/2+We+ms+zd+Le.mainAxis:nt+ms+zd+Le.mainAxis,ba=s.elements.arrow&&zi(s.elements.arrow),t0=ba?ae==="y"?ba.clientTop||0:ba.clientLeft||0:0,Fd=(tt=vt==null?void 0:vt[ae])!=null?tt:0,n0=Zt+e0-Fd,Bd=Fi(J?ns(en,Zt+Zw-Fd-t0):en,Zt,J?ur(qr,n0):qr);se[ae]=Bd,Wt[ae]=Bd-Zt}if(L){var Ud,r0=ae==="x"?Ze:et,i0=ae==="x"?ht:mt,vr=se[re],gs=re==="y"?"height":"width",Wd=vr+Z[r0],Vd=vr-Z[i0],Pa=[Ze,et].indexOf(pe)!==-1,Hd=(Ud=vt==null?void 0:vt[re])!=null?Ud:0,Kd=Pa?Wd:vr-ue[gs]-he[gs]-Hd+Le.altAxis,Qd=Pa?vr+ue[gs]+he[gs]-Hd-Le.altAxis:Vd,Yd=J&&Pa?function(o0,s0,Oa){var Xd=Fi(o0,s0,Oa);return Xd>Oa?Oa:Xd}(Kd,vr,Qd):Fi(J?Kd:Wd,vr,J?Qd:Vd);se[re]=Yd,Wt[re]=Yd-vr}s.modifiersData[p]=Wt}},requiresIfExists:["offset"]};function Sy(f,s,a){a===void 0&&(a=!1);var p,k,E=bt(s),j=bt(s)&&function(z){var te=z.getBoundingClientRect(),J=Kr(te.width)/z.offsetWidth||1,q=Kr(te.height)/z.offsetHeight||1;return J!==1||q!==1}(s),L=jn(s),I=Qr(f,j,a),B={scrollLeft:0,scrollTop:0},W={x:0,y:0};return(E||!E&&!a)&&((Gt(s)!=="body"||ca(L))&&(B=(p=s)!==gt(p)&&bt(p)?{scrollLeft:(k=p).scrollLeft,scrollTop:k.scrollTop}:aa(p)),bt(s)?((W=Qr(s,!0)).x+=s.clientLeft,W.y+=s.clientTop):L&&(W.x=ua(L))),{x:I.left+B.scrollLeft-W.x,y:I.top+B.scrollTop-W.y,width:I.width,height:I.height}}function ky(f){var s=new Map,a=new Set,p=[];function k(E){a.add(E.name),[].concat(E.requires||[],E.requiresIfExists||[]).forEach(function(j){if(!a.has(j)){var L=s.get(j);L&&k(L)}}),p.push(E)}return f.forEach(function(E){s.set(E.name,E)}),f.forEach(function(E){a.has(E.name)||k(E)}),p}var Zf={placement:"bottom",modifiers:[],strategy:"absolute"};function ed(){for(var f=arguments.length,s=new Array(f),a=0;aNumber.parseInt(a,10)):typeof s=="function"?a=>s(a,this._element):s}_getPopperConfig(){const s={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(Oe.setDataAttribute(this._menu,"popper","static"),s.modifiers=[{name:"applyStyles",enabled:!1}]),{...s,...w(this._config.popperConfig,[void 0,s])}}_selectMenuItem({key:s,target:a}){const p=Q.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(k=>h(k));p.length&&N(p,a,s===rd,!p.includes(a)).focus()}static jQueryInterface(s){return this.each(function(){const a=Ut.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0)throw new TypeError(`No method named "${s}"`);a[s]()}})}static clearMenus(s){if(s.button===2||s.type==="keyup"&&s.key!=="Tab")return;const a=Q.find(Ly);for(const p of a){const k=Ut.getInstance(p);if(!k||k._config.autoClose===!1)continue;const E=s.composedPath(),j=E.includes(k._menu);if(E.includes(k._element)||k._config.autoClose==="inside"&&!j||k._config.autoClose==="outside"&&j||k._menu.contains(s.target)&&(s.type==="keyup"&&s.key==="Tab"||/input|select|option|textarea|form/i.test(s.target.tagName)))continue;const L={relatedTarget:k._element};s.type==="click"&&(L.clickEvent=s),k._completeHide(L)}}static dataApiKeydownHandler(s){const a=/input|textarea/i.test(s.target.tagName),p=s.key==="Escape",k=[by,rd].includes(s.key);if(!k&&!p||a&&!p)return;s.preventDefault();const E=this.matches(fr)?this:Q.prev(this,fr)[0]||Q.next(this,fr)[0]||Q.findOne(fr,s.delegateTarget.parentNode),j=Ut.getOrCreateInstance(E);if(k)return s.stopPropagation(),j.show(),void j._selectMenuItem(s);j._isShown()&&(s.stopPropagation(),j.hide(),E.focus())}}T.on(document,od,fr,Ut.dataApiKeydownHandler),T.on(document,od,ls,Ut.dataApiKeydownHandler),T.on(document,id,Ut.clearMenus),T.on(document,Ny,Ut.clearMenus),T.on(document,id,fr,function(f){f.preventDefault(),Ut.getOrCreateInstance(this).toggle()}),v(Ut);const sd="backdrop",ld="show",ad=`mousedown.bs.${sd}`,By={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Uy={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class ud extends ze{constructor(s){super(),this._config=this._getConfig(s),this._isAppended=!1,this._element=null}static get Default(){return By}static get DefaultType(){return Uy}static get NAME(){return sd}show(s){if(!this._config.isVisible)return void w(s);this._append();const a=this._getElement();this._config.isAnimated&&C(a),a.classList.add(ld),this._emulateAnimation(()=>{w(s)})}hide(s){this._config.isVisible?(this._getElement().classList.remove(ld),this._emulateAnimation(()=>{this.dispose(),w(s)})):w(s)}dispose(){this._isAppended&&(T.off(this._element,ad),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const s=document.createElement("div");s.className=this._config.className,this._config.isAnimated&&s.classList.add("fade"),this._element=s}return this._element}_configAfterMerge(s){return s.rootElement=d(s.rootElement),s}_append(){if(this._isAppended)return;const s=this._getElement();this._config.rootElement.append(s),T.on(s,ad,()=>{w(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(s){b(s,this._getElement(),this._config.isAnimated)}}const as=".bs.focustrap",Wy=`focusin${as}`,Vy=`keydown.tab${as}`,cd="backward",Hy={autofocus:!0,trapElement:null},Ky={autofocus:"boolean",trapElement:"element"};class fd extends ze{constructor(s){super(),this._config=this._getConfig(s),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Hy}static get DefaultType(){return Ky}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),T.off(document,as),T.on(document,Wy,s=>this._handleFocusin(s)),T.on(document,Vy,s=>this._handleKeydown(s)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,T.off(document,as))}_handleFocusin(s){const{trapElement:a}=this._config;if(s.target===document||s.target===a||a.contains(s.target))return;const p=Q.focusableChildren(a);p.length===0?a.focus():this._lastTabNavDirection===cd?p[p.length-1].focus():p[0].focus()}_handleKeydown(s){s.key==="Tab"&&(this._lastTabNavDirection=s.shiftKey?cd:"forward")}}const dd=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",pd=".sticky-top",us="padding-right",hd="margin-right";class ma{constructor(){this._element=document.body}getWidth(){const s=document.documentElement.clientWidth;return Math.abs(window.innerWidth-s)}hide(){const s=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,us,a=>a+s),this._setElementAttributes(dd,us,a=>a+s),this._setElementAttributes(pd,hd,a=>a-s)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,us),this._resetElementAttributes(dd,us),this._resetElementAttributes(pd,hd)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(s,a,p){const k=this.getWidth();this._applyManipulationCallback(s,E=>{if(E!==this._element&&window.innerWidth>E.clientWidth+k)return;this._saveInitialAttribute(E,a);const j=window.getComputedStyle(E).getPropertyValue(a);E.style.setProperty(a,`${p(Number.parseFloat(j))}px`)})}_saveInitialAttribute(s,a){const p=s.style.getPropertyValue(a);p&&Oe.setDataAttribute(s,a,p)}_resetElementAttributes(s,a){this._applyManipulationCallback(s,p=>{const k=Oe.getDataAttribute(p,a);k!==null?(Oe.removeDataAttribute(p,a),p.style.setProperty(a,k)):p.style.removeProperty(a)})}_applyManipulationCallback(s,a){if(c(s))a(s);else for(const p of Q.find(s,this._element))a(p)}}const Pt=".bs.modal",Qy=`hide${Pt}`,Yy=`hidePrevented${Pt}`,md=`hidden${Pt}`,gd=`show${Pt}`,Xy=`shown${Pt}`,Jy=`resize${Pt}`,Gy=`click.dismiss${Pt}`,qy=`mousedown.dismiss${Pt}`,Zy=`keydown.dismiss${Pt}`,ew=`click${Pt}.data-api`,vd="modal-open",yd="show",ga="modal-static",tw={backdrop:!0,focus:!0,keyboard:!0},nw={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class dr extends Ne{constructor(s,a){super(s,a),this._dialog=Q.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new ma,this._addEventListeners()}static get Default(){return tw}static get DefaultType(){return nw}static get NAME(){return"modal"}toggle(s){return this._isShown?this.hide():this.show(s)}show(s){this._isShown||this._isTransitioning||T.trigger(this._element,gd,{relatedTarget:s}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(vd),this._adjustDialog(),this._backdrop.show(()=>this._showElement(s)))}hide(){this._isShown&&!this._isTransitioning&&(T.trigger(this._element,Qy).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(yd),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){T.off(window,Pt),T.off(this._dialog,Pt),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new ud({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new fd({trapElement:this._element})}_showElement(s){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const a=Q.findOne(".modal-body",this._dialog);a&&(a.scrollTop=0),C(this._element),this._element.classList.add(yd),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,T.trigger(this._element,Xy,{relatedTarget:s})},this._dialog,this._isAnimated())}_addEventListeners(){T.on(this._element,Zy,s=>{s.key==="Escape"&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),T.on(window,Jy,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),T.on(this._element,qy,s=>{T.one(this._element,Gy,a=>{this._element===s.target&&this._element===a.target&&(this._config.backdrop!=="static"?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(vd),this._resetAdjustments(),this._scrollBar.reset(),T.trigger(this._element,md)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(T.trigger(this._element,Yy).defaultPrevented)return;const s=this._element.scrollHeight>document.documentElement.clientHeight,a=this._element.style.overflowY;a==="hidden"||this._element.classList.contains(ga)||(s||(this._element.style.overflowY="hidden"),this._element.classList.add(ga),this._queueCallback(()=>{this._element.classList.remove(ga),this._queueCallback(()=>{this._element.style.overflowY=a},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const s=this._element.scrollHeight>document.documentElement.clientHeight,a=this._scrollBar.getWidth(),p=a>0;if(p&&!s){const k=y()?"paddingLeft":"paddingRight";this._element.style[k]=`${a}px`}if(!p&&s){const k=y()?"paddingRight":"paddingLeft";this._element.style[k]=`${a}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(s,a){return this.each(function(){const p=dr.getOrCreateInstance(this,s);if(typeof s=="string"){if(p[s]===void 0)throw new TypeError(`No method named "${s}"`);p[s](a)}})}}T.on(document,ew,'[data-bs-toggle="modal"]',function(f){const s=Q.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&f.preventDefault(),T.one(s,gd,p=>{p.defaultPrevented||T.one(s,md,()=>{h(this)&&this.focus()})});const a=Q.findOne(".modal.show");a&&dr.getInstance(a).hide(),dr.getOrCreateInstance(s).toggle(this)}),Rr(dr),v(dr);const dn=".bs.offcanvas",wd=".data-api",rw=`load${dn}${wd}`,_d="show",xd="showing",Sd="hiding",kd=".offcanvas.show",iw=`show${dn}`,ow=`shown${dn}`,sw=`hide${dn}`,Ed=`hidePrevented${dn}`,Cd=`hidden${dn}`,lw=`resize${dn}`,aw=`click${dn}${wd}`,uw=`keydown.dismiss${dn}`,cw={backdrop:!0,keyboard:!0,scroll:!1},fw={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class pn extends Ne{constructor(s,a){super(s,a),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return cw}static get DefaultType(){return fw}static get NAME(){return"offcanvas"}toggle(s){return this._isShown?this.hide():this.show(s)}show(s){this._isShown||T.trigger(this._element,iw,{relatedTarget:s}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||new ma().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(xd),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(_d),this._element.classList.remove(xd),T.trigger(this._element,ow,{relatedTarget:s})},this._element,!0))}hide(){this._isShown&&(T.trigger(this._element,sw).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Sd),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(_d,Sd),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new ma().reset(),T.trigger(this._element,Cd)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const s=!!this._config.backdrop;return new ud({className:"offcanvas-backdrop",isVisible:s,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:s?()=>{this._config.backdrop!=="static"?this.hide():T.trigger(this._element,Ed)}:null})}_initializeFocusTrap(){return new fd({trapElement:this._element})}_addEventListeners(){T.on(this._element,uw,s=>{s.key==="Escape"&&(this._config.keyboard?this.hide():T.trigger(this._element,Ed))})}static jQueryInterface(s){return this.each(function(){const a=pn.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s](this)}})}}T.on(document,aw,'[data-bs-toggle="offcanvas"]',function(f){const s=Q.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&f.preventDefault(),g(this))return;T.one(s,Cd,()=>{h(this)&&this.focus()});const a=Q.findOne(kd);a&&a!==s&&pn.getInstance(a).hide(),pn.getOrCreateInstance(s).toggle(this)}),T.on(window,rw,()=>{for(const f of Q.find(kd))pn.getOrCreateInstance(f).show()}),T.on(window,lw,()=>{for(const f of Q.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(f).position!=="fixed"&&pn.getOrCreateInstance(f).hide()}),Rr(pn),v(pn);const bd={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},dw=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),pw=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,hw=(f,s)=>{const a=f.nodeName.toLowerCase();return s.includes(a)?!dw.has(a)||!!pw.test(f.nodeValue):s.filter(p=>p instanceof RegExp).some(p=>p.test(a))},mw={allowList:bd,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},gw={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},vw={entry:"(string|element|function|null)",selector:"(string|element)"};class yw extends ze{constructor(s){super(),this._config=this._getConfig(s)}static get Default(){return mw}static get DefaultType(){return gw}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(s=>this._resolvePossibleFunction(s)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(s){return this._checkContent(s),this._config.content={...this._config.content,...s},this}toHtml(){const s=document.createElement("div");s.innerHTML=this._maybeSanitize(this._config.template);for(const[k,E]of Object.entries(this._config.content))this._setContent(s,E,k);const a=s.children[0],p=this._resolvePossibleFunction(this._config.extraClass);return p&&a.classList.add(...p.split(" ")),a}_typeCheckConfig(s){super._typeCheckConfig(s),this._checkContent(s.content)}_checkContent(s){for(const[a,p]of Object.entries(s))super._typeCheckConfig({selector:a,entry:p},vw)}_setContent(s,a,p){const k=Q.findOne(p,s);k&&((a=this._resolvePossibleFunction(a))?c(a)?this._putElementInTemplate(d(a),k):this._config.html?k.innerHTML=this._maybeSanitize(a):k.textContent=a:k.remove())}_maybeSanitize(s){return this._config.sanitize?function(a,p,k){if(!a.length)return a;if(k&&typeof k=="function")return k(a);const E=new window.DOMParser().parseFromString(a,"text/html"),j=[].concat(...E.body.querySelectorAll("*"));for(const L of j){const I=L.nodeName.toLowerCase();if(!Object.keys(p).includes(I)){L.remove();continue}const B=[].concat(...L.attributes),W=[].concat(p["*"]||[],p[I]||[]);for(const z of B)hw(z,W)||L.removeAttribute(z.nodeName)}return E.body.innerHTML}(s,this._config.allowList,this._config.sanitizeFn):s}_resolvePossibleFunction(s){return w(s,[void 0,this])}_putElementInTemplate(s,a){if(this._config.html)return a.innerHTML="",void a.append(s);a.textContent=s.textContent}}const ww=new Set(["sanitize","allowList","sanitizeFn"]),va="fade",cs="show",_w=".tooltip-inner",Pd=".modal",Od="hide.bs.modal",Ui="hover",ya="focus",wa="click",xw={AUTO:"auto",TOP:"top",RIGHT:y()?"left":"right",BOTTOM:"bottom",LEFT:y()?"right":"left"},Sw={allowList:bd,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},kw={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class pr extends Ne{constructor(s,a){if(td===void 0)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(s,a),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Sw}static get DefaultType(){return kw}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),T.off(this._element.closest(Pd),Od,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const s=T.trigger(this._element,this.constructor.eventName("show")),a=(_(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(s.defaultPrevented||!a)return;this._disposePopper();const p=this._getTipElement();this._element.setAttribute("aria-describedby",p.getAttribute("id"));const{container:k}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(k.append(p),T.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(p),p.classList.add(cs),"ontouchstart"in document.documentElement)for(const E of[].concat(...document.body.children))T.on(E,"mouseover",S);this._queueCallback(()=>{T.trigger(this._element,this.constructor.eventName("shown")),this._isHovered===!1&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!T.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(cs),"ontouchstart"in document.documentElement)for(const s of[].concat(...document.body.children))T.off(s,"mouseover",S);this._activeTrigger[wa]=!1,this._activeTrigger[ya]=!1,this._activeTrigger[Ui]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),T.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(s){const a=this._getTemplateFactory(s).toHtml();if(!a)return null;a.classList.remove(va,cs),a.classList.add(`bs-${this.constructor.NAME}-auto`);const p=(k=>{do k+=Math.floor(1e6*Math.random());while(document.getElementById(k));return k})(this.constructor.NAME).toString();return a.setAttribute("id",p),this._isAnimated()&&a.classList.add(va),a}setContent(s){this._newContent=s,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(s){return this._templateFactory?this._templateFactory.changeContent(s):this._templateFactory=new yw({...this._config,content:s,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[_w]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(s){return this.constructor.getOrCreateInstance(s.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(va)}_isShown(){return this.tip&&this.tip.classList.contains(cs)}_createPopper(s){const a=w(this._config.placement,[this,s,this._element]),p=xw[a.toUpperCase()];return pa(this._element,s,this._getPopperConfig(p))}_getOffset(){const{offset:s}=this._config;return typeof s=="string"?s.split(",").map(a=>Number.parseInt(a,10)):typeof s=="function"?a=>s(a,this._element):s}_resolvePossibleFunction(s){return w(s,[this._element,this._element])}_getPopperConfig(s){const a={placement:s,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:p=>{this._getTipElement().setAttribute("data-popper-placement",p.state.placement)}}]};return{...a,...w(this._config.popperConfig,[void 0,a])}}_setListeners(){const s=this._config.trigger.split(" ");for(const a of s)if(a==="click")T.on(this._element,this.constructor.eventName("click"),this._config.selector,p=>{const k=this._initializeOnDelegatedTarget(p);k._activeTrigger[wa]=!(k._isShown()&&k._activeTrigger[wa]),k.toggle()});else if(a!=="manual"){const p=a===Ui?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),k=a===Ui?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");T.on(this._element,p,this._config.selector,E=>{const j=this._initializeOnDelegatedTarget(E);j._activeTrigger[E.type==="focusin"?ya:Ui]=!0,j._enter()}),T.on(this._element,k,this._config.selector,E=>{const j=this._initializeOnDelegatedTarget(E);j._activeTrigger[E.type==="focusout"?ya:Ui]=j._element.contains(E.relatedTarget),j._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},T.on(this._element.closest(Pd),Od,this._hideModalHandler)}_fixTitle(){const s=this._element.getAttribute("title");s&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",s),this._element.setAttribute("data-bs-original-title",s),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(s,a){clearTimeout(this._timeout),this._timeout=setTimeout(s,a)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(s){const a=Oe.getDataAttributes(this._element);for(const p of Object.keys(a))ww.has(p)&&delete a[p];return s={...a,...typeof s=="object"&&s?s:{}},s=this._mergeConfigObj(s),s=this._configAfterMerge(s),this._typeCheckConfig(s),s}_configAfterMerge(s){return s.container=s.container===!1?document.body:d(s.container),typeof s.delay=="number"&&(s.delay={show:s.delay,hide:s.delay}),typeof s.title=="number"&&(s.title=s.title.toString()),typeof s.content=="number"&&(s.content=s.content.toString()),s}_getDelegateConfig(){const s={};for(const[a,p]of Object.entries(this._config))this.constructor.Default[a]!==p&&(s[a]=p);return s.selector=!1,s.trigger="manual",s}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(s){return this.each(function(){const a=pr.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0)throw new TypeError(`No method named "${s}"`);a[s]()}})}}v(pr);const Ew=".popover-header",Cw=".popover-body",bw={...pr.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},Pw={...pr.DefaultType,content:"(null|string|element|function)"};class fs extends pr{static get Default(){return bw}static get DefaultType(){return Pw}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[Ew]:this._getTitle(),[Cw]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(s){return this.each(function(){const a=fs.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0)throw new TypeError(`No method named "${s}"`);a[s]()}})}}v(fs);const _a=".bs.scrollspy",Ow=`activate${_a}`,jd=`click${_a}`,jw=`load${_a}.data-api`,Gr="active",xa="[href]",Td=".nav-link",Tw=`${Td}, .nav-item > ${Td}, .list-group-item`,Nw={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Lw={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Wi extends Ne{constructor(s,a){super(s,a),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Nw}static get DefaultType(){return Lw}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const s of this._observableSections.values())this._observer.observe(s)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(s){return s.target=d(s.target)||document.body,s.rootMargin=s.offset?`${s.offset}px 0px -30%`:s.rootMargin,typeof s.threshold=="string"&&(s.threshold=s.threshold.split(",").map(a=>Number.parseFloat(a))),s}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(T.off(this._config.target,jd),T.on(this._config.target,jd,xa,s=>{const a=this._observableSections.get(s.target.hash);if(a){s.preventDefault();const p=this._rootElement||window,k=a.offsetTop-this._element.offsetTop;if(p.scrollTo)return void p.scrollTo({top:k,behavior:"smooth"});p.scrollTop=k}}))}_getNewObserver(){const s={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(a=>this._observerCallback(a),s)}_observerCallback(s){const a=j=>this._targetLinks.get(`#${j.target.id}`),p=j=>{this._previousScrollData.visibleEntryTop=j.target.offsetTop,this._process(a(j))},k=(this._rootElement||document.documentElement).scrollTop,E=k>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=k;for(const j of s){if(!j.isIntersecting){this._activeTarget=null,this._clearActiveClass(a(j));continue}const L=j.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(E&&L){if(p(j),!k)return}else E||L||p(j)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const s=Q.find(xa,this._config.target);for(const a of s){if(!a.hash||g(a))continue;const p=Q.findOne(decodeURI(a.hash),this._element);h(p)&&(this._targetLinks.set(decodeURI(a.hash),a),this._observableSections.set(a.hash,p))}}_process(s){this._activeTarget!==s&&(this._clearActiveClass(this._config.target),this._activeTarget=s,s.classList.add(Gr),this._activateParents(s),T.trigger(this._element,Ow,{relatedTarget:s}))}_activateParents(s){if(s.classList.contains("dropdown-item"))Q.findOne(".dropdown-toggle",s.closest(".dropdown")).classList.add(Gr);else for(const a of Q.parents(s,".nav, .list-group"))for(const p of Q.prev(a,Tw))p.classList.add(Gr)}_clearActiveClass(s){s.classList.remove(Gr);const a=Q.find(`${xa}.${Gr}`,s);for(const p of a)p.classList.remove(Gr)}static jQueryInterface(s){return this.each(function(){const a=Wi.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s]()}})}}T.on(window,jw,()=>{for(const f of Q.find('[data-bs-spy="scroll"]'))Wi.getOrCreateInstance(f)}),v(Wi);const hr=".bs.tab",Aw=`hide${hr}`,Dw=`hidden${hr}`,Rw=`show${hr}`,$w=`shown${hr}`,Iw=`click${hr}`,Mw=`keydown${hr}`,zw=`load${hr}`,Fw="ArrowLeft",Nd="ArrowRight",Bw="ArrowUp",Ld="ArrowDown",Sa="Home",Ad="End",mr="active",Dd="fade",ka="show",Rd=".dropdown-toggle",Ea=`:not(${Rd})`,$d='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Ca=`.nav-link${Ea}, .list-group-item${Ea}, [role="tab"]${Ea}, ${$d}`,Uw=`.${mr}[data-bs-toggle="tab"], .${mr}[data-bs-toggle="pill"], .${mr}[data-bs-toggle="list"]`;class gr extends Ne{constructor(s){super(s),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),T.on(this._element,Mw,a=>this._keydown(a)))}static get NAME(){return"tab"}show(){const s=this._element;if(this._elemIsActive(s))return;const a=this._getActiveElem(),p=a?T.trigger(a,Aw,{relatedTarget:s}):null;T.trigger(s,Rw,{relatedTarget:a}).defaultPrevented||p&&p.defaultPrevented||(this._deactivate(a,s),this._activate(s,a))}_activate(s,a){s&&(s.classList.add(mr),this._activate(Q.getElementFromSelector(s)),this._queueCallback(()=>{s.getAttribute("role")==="tab"?(s.removeAttribute("tabindex"),s.setAttribute("aria-selected",!0),this._toggleDropDown(s,!0),T.trigger(s,$w,{relatedTarget:a})):s.classList.add(ka)},s,s.classList.contains(Dd)))}_deactivate(s,a){s&&(s.classList.remove(mr),s.blur(),this._deactivate(Q.getElementFromSelector(s)),this._queueCallback(()=>{s.getAttribute("role")==="tab"?(s.setAttribute("aria-selected",!1),s.setAttribute("tabindex","-1"),this._toggleDropDown(s,!1),T.trigger(s,Dw,{relatedTarget:a})):s.classList.remove(ka)},s,s.classList.contains(Dd)))}_keydown(s){if(![Fw,Nd,Bw,Ld,Sa,Ad].includes(s.key))return;s.stopPropagation(),s.preventDefault();const a=this._getChildren().filter(k=>!g(k));let p;if([Sa,Ad].includes(s.key))p=a[s.key===Sa?0:a.length-1];else{const k=[Nd,Ld].includes(s.key);p=N(a,s.target,k,!0)}p&&(p.focus({preventScroll:!0}),gr.getOrCreateInstance(p).show())}_getChildren(){return Q.find(Ca,this._parent)}_getActiveElem(){return this._getChildren().find(s=>this._elemIsActive(s))||null}_setInitialAttributes(s,a){this._setAttributeIfNotExists(s,"role","tablist");for(const p of a)this._setInitialAttributesOnChild(p)}_setInitialAttributesOnChild(s){s=this._getInnerElement(s);const a=this._elemIsActive(s),p=this._getOuterElement(s);s.setAttribute("aria-selected",a),p!==s&&this._setAttributeIfNotExists(p,"role","presentation"),a||s.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(s,"role","tab"),this._setInitialAttributesOnTargetPanel(s)}_setInitialAttributesOnTargetPanel(s){const a=Q.getElementFromSelector(s);a&&(this._setAttributeIfNotExists(a,"role","tabpanel"),s.id&&this._setAttributeIfNotExists(a,"aria-labelledby",`${s.id}`))}_toggleDropDown(s,a){const p=this._getOuterElement(s);if(!p.classList.contains("dropdown"))return;const k=(E,j)=>{const L=Q.findOne(E,p);L&&L.classList.toggle(j,a)};k(Rd,mr),k(".dropdown-menu",ka),p.setAttribute("aria-expanded",a)}_setAttributeIfNotExists(s,a,p){s.hasAttribute(a)||s.setAttribute(a,p)}_elemIsActive(s){return s.classList.contains(mr)}_getInnerElement(s){return s.matches(Ca)?s:Q.findOne(Ca,s)}_getOuterElement(s){return s.closest(".nav-item, .list-group-item")||s}static jQueryInterface(s){return this.each(function(){const a=gr.getOrCreateInstance(this);if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s]()}})}}T.on(document,Iw,$d,function(f){["A","AREA"].includes(this.tagName)&&f.preventDefault(),g(this)||gr.getOrCreateInstance(this).show()}),T.on(window,zw,()=>{for(const f of Q.find(Uw))gr.getOrCreateInstance(f)}),v(gr);const Tn=".bs.toast",Ww=`mouseover${Tn}`,Vw=`mouseout${Tn}`,Hw=`focusin${Tn}`,Kw=`focusout${Tn}`,Qw=`hide${Tn}`,Yw=`hidden${Tn}`,Xw=`show${Tn}`,Jw=`shown${Tn}`,Id="hide",ds="show",ps="showing",Gw={animation:"boolean",autohide:"boolean",delay:"number"},qw={animation:!0,autohide:!0,delay:5e3};class Vi extends Ne{constructor(s,a){super(s,a),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return qw}static get DefaultType(){return Gw}static get NAME(){return"toast"}show(){T.trigger(this._element,Xw).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(Id),C(this._element),this._element.classList.add(ds,ps),this._queueCallback(()=>{this._element.classList.remove(ps),T.trigger(this._element,Jw),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(T.trigger(this._element,Qw).defaultPrevented||(this._element.classList.add(ps),this._queueCallback(()=>{this._element.classList.add(Id),this._element.classList.remove(ps,ds),T.trigger(this._element,Yw)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ds),super.dispose()}isShown(){return this._element.classList.contains(ds)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(s,a){switch(s.type){case"mouseover":case"mouseout":this._hasMouseInteraction=a;break;case"focusin":case"focusout":this._hasKeyboardInteraction=a}if(a)return void this._clearTimeout();const p=s.relatedTarget;this._element===p||this._element.contains(p)||this._maybeScheduleHide()}_setListeners(){T.on(this._element,Ww,s=>this._onInteraction(s,!0)),T.on(this._element,Vw,s=>this._onInteraction(s,!1)),T.on(this._element,Hw,s=>this._onInteraction(s,!0)),T.on(this._element,Kw,s=>this._onInteraction(s,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(s){return this.each(function(){const a=Vi.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0)throw new TypeError(`No method named "${s}"`);a[s](this)}})}}return Rr(Vi),v(Vi),{Alert:or,Button:On,Carousel:Fr,Collapse:Ur,Dropdown:Ut,Modal:dr,Offcanvas:pn,Popover:fs,ScrollSpy:Wi,Tab:gr,Toast:Vi,Tooltip:pr}})})(US);const WS="modulepreload",VS=function(e){return"/"+e},ph={},Me=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),u=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=Promise.allSettled(n.map(c=>{if(c=VS(c),c in ph)return;ph[c]=!0;const d=c.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${h}`))return;const g=document.createElement("link");if(g.rel=d?"stylesheet":WS,d||(g.as="script"),g.crossOrigin="",g.href=c,u&&g.setAttribute("nonce",u),document.head.appendChild(g),d)return new Promise((_,S)=>{g.addEventListener("load",_),g.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return i.then(l=>{for(const u of l||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})},av=x.createContext(null),hh="theme",mh="color",uv="sidebarTheme",cv="sidebarBg";function HS(){const e=localStorage.getItem(uv);return e==="light"||e==="dark"||e==="blue"||e==="green"?e:"light"}function KS(){const e=localStorage.getItem(cv);return e==="sidebarbgnone"||e==="sidebarbg1"||e==="sidebarbg2"||e==="sidebarbg3"||e==="sidebarbg4"?e:"sidebarbgnone"}function QS(e,t,n,r){const i=document.documentElement;i.setAttribute("data-theme",e),i.setAttribute("data-sidebar",n),i.setAttribute("data-color",t),i.setAttribute("data-sidebar-bg",r)}function YS({children:e}){const[t,n]=x.useState(()=>{const P=localStorage.getItem(hh);return P==="dark"||P==="light"?P:localStorage.getItem("darkMode")==="enabled"?"dark":"light"}),[r,i]=x.useState(()=>{const P=localStorage.getItem(mh);return P==="red"||P==="yellow"||P==="blue"||P==="green"?P:"red"}),[o,l]=x.useState(HS),[u,c]=x.useState(KS);x.useEffect(()=>{QS(t,r,o,u),localStorage.setItem(hh,t),localStorage.setItem(mh,r),localStorage.setItem(uv,o),localStorage.setItem(cv,u),t==="dark"?localStorage.setItem("darkMode","enabled"):localStorage.removeItem("darkMode")},[t,r,o,u]);const d=x.useCallback(P=>n(P),[]),h=x.useCallback(P=>i(P),[]),g=x.useCallback(P=>l(P),[]),_=x.useCallback(P=>c(P),[]),S=x.useCallback(()=>{n(P=>P==="light"?"dark":"light")},[]),C=x.useCallback(()=>{n("light"),i("red"),l("light"),c("sidebarbgnone"),localStorage.removeItem("darkMode")},[]),O=x.useMemo(()=>({theme:t,accent:r,sidebarTheme:o,sidebarBg:u,setAccent:h,setSidebarTheme:g,setSidebarBg:_,toggleTheme:S,setTheme:d,resetTheme:C}),[t,r,o,u,h,g,_,S,d,C]);return m.jsx(av.Provider,{value:O,children:e})}function fv(){const e=x.useContext(av);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}var dv={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",l=0;l{const[d,...h]=c;let g=n==null?void 0:n(d,...h);return o(d),g},[n])]}function JS(e){const t=x.useRef(null);return x.useEffect(()=>{t.current=e}),t.current}function GS(){const[,e]=x.useReducer(t=>t+1,0);return e}function qS(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e},[e]),t}function Xn(e){const t=qS(e);return x.useCallback(function(...n){return t.current&&t.current(...n)},[t])}function ZS(e,t,n,r=!1){const i=Xn(n);x.useEffect(()=>{const o=typeof e=="function"?e():e;return o.addEventListener(t,i,r),()=>o.removeEventListener(t,i,r)},[e])}const Vl=x.createContext(null);function e1(){return x.useState(null)}var gh=Object.prototype.hasOwnProperty;function vh(e,t,n){for(n of e.keys())if(ho(n,t))return n}function ho(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&ho(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i=="object"&&(i=vh(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i=="object"&&(i=vh(t,i),!i)||!ho(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(gh.call(e,n)&&++r&&!gh.call(t,n)||!(n in t)||!ho(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function t1(){const e=x.useRef(!0),t=x.useRef(()=>e.current);return x.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function n1(e){const t=t1();return[e[0],x.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var dt="top",Mt="bottom",zt="right",pt="left",uf="auto",Wo=[dt,Mt,zt,pt],Ci="start",Ro="end",r1="clippingParents",hv="viewport",Zi="popper",i1="reference",yh=Wo.reduce(function(e,t){return e.concat([t+"-"+Ci,t+"-"+Ro])},[]),mv=[].concat(Wo,[uf]).reduce(function(e,t){return e.concat([t,t+"-"+Ci,t+"-"+Ro])},[]),o1="beforeRead",s1="read",l1="afterRead",a1="beforeMain",u1="main",c1="afterMain",f1="beforeWrite",d1="write",p1="afterWrite",h1=[o1,s1,l1,a1,u1,c1,f1,d1,p1];function ln(e){return e.split("-")[0]}function St(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Nr(e){var t=St(e).Element;return e instanceof t||e instanceof Element}function an(e){var t=St(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function cf(e){if(typeof ShadowRoot>"u")return!1;var t=St(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Cr=Math.max,Sl=Math.min,bi=Math.round;function lc(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function gv(){return!/^((?!chrome|android).)*safari/i.test(lc())}function Pi(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&an(e)&&(i=e.offsetWidth>0&&bi(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&bi(r.height)/e.offsetHeight||1);var l=Nr(e)?St(e):window,u=l.visualViewport,c=!gv()&&n,d=(r.left+(c&&u?u.offsetLeft:0))/i,h=(r.top+(c&&u?u.offsetTop:0))/o,g=r.width/i,_=r.height/o;return{width:g,height:_,top:h,right:d+g,bottom:h+_,left:d,x:d,y:h}}function ff(e){var t=Pi(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function vv(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&cf(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function qn(e){return e?(e.nodeName||"").toLowerCase():null}function En(e){return St(e).getComputedStyle(e)}function m1(e){return["table","td","th"].indexOf(qn(e))>=0}function rr(e){return((Nr(e)?e.ownerDocument:e.document)||window.document).documentElement}function Hl(e){return qn(e)==="html"?e:e.assignedSlot||e.parentNode||(cf(e)?e.host:null)||rr(e)}function wh(e){return!an(e)||En(e).position==="fixed"?null:e.offsetParent}function g1(e){var t=/firefox/i.test(lc()),n=/Trident/i.test(lc());if(n&&an(e)){var r=En(e);if(r.position==="fixed")return null}var i=Hl(e);for(cf(i)&&(i=i.host);an(i)&&["html","body"].indexOf(qn(i))<0;){var o=En(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Vo(e){for(var t=St(e),n=wh(e);n&&m1(n)&&En(n).position==="static";)n=wh(n);return n&&(qn(n)==="html"||qn(n)==="body"&&En(n).position==="static")?t:n||g1(e)||t}function df(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function mo(e,t,n){return Cr(e,Sl(t,n))}function v1(e,t,n){var r=mo(e,t,n);return r>n?n:r}function yv(){return{top:0,right:0,bottom:0,left:0}}function wv(e){return Object.assign({},yv(),e)}function _v(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var y1=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,wv(typeof t!="number"?t:_v(t,Wo))};function w1(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,l=n.modifiersData.popperOffsets,u=ln(n.placement),c=df(u),d=[pt,zt].indexOf(u)>=0,h=d?"height":"width";if(!(!o||!l)){var g=y1(i.padding,n),_=ff(o),S=c==="y"?dt:pt,C=c==="y"?Mt:zt,O=n.rects.reference[h]+n.rects.reference[c]-l[c]-n.rects.popper[h],P=l[c]-n.rects.reference[c],y=Vo(o),v=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,w=O/2-P/2,b=g[S],N=v-_[h]-g[C],A=v/2-_[h]/2+w,D=mo(b,A,N),$=c;n.modifiersData[r]=(t={},t[$]=D,t.centerOffset=D-A,t)}}function _1(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||vv(t.elements.popper,i)&&(t.elements.arrow=i))}const x1={name:"arrow",enabled:!0,phase:"main",fn:w1,effect:_1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Oi(e){return e.split("-")[1]}var S1={top:"auto",right:"auto",bottom:"auto",left:"auto"};function k1(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:bi(n*i)/i||0,y:bi(r*i)/i||0}}function _h(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,l=e.offsets,u=e.position,c=e.gpuAcceleration,d=e.adaptive,h=e.roundOffsets,g=e.isFixed,_=l.x,S=_===void 0?0:_,C=l.y,O=C===void 0?0:C,P=typeof h=="function"?h({x:S,y:O}):{x:S,y:O};S=P.x,O=P.y;var y=l.hasOwnProperty("x"),v=l.hasOwnProperty("y"),w=pt,b=dt,N=window;if(d){var A=Vo(n),D="clientHeight",$="clientWidth";if(A===St(n)&&(A=rr(n),En(A).position!=="static"&&u==="absolute"&&(D="scrollHeight",$="scrollWidth")),A=A,i===dt||(i===pt||i===zt)&&o===Ro){b=Mt;var H=g&&A===N&&N.visualViewport?N.visualViewport.height:A[D];O-=H-r.height,O*=c?1:-1}if(i===pt||(i===dt||i===Mt)&&o===Ro){w=zt;var F=g&&A===N&&N.visualViewport?N.visualViewport.width:A[$];S-=F-r.width,S*=c?1:-1}}var Y=Object.assign({position:u},d&&S1),ee=h===!0?k1({x:S,y:O},St(n)):{x:S,y:O};if(S=ee.x,O=ee.y,c){var ne;return Object.assign({},Y,(ne={},ne[b]=v?"0":"",ne[w]=y?"0":"",ne.transform=(N.devicePixelRatio||1)<=1?"translate("+S+"px, "+O+"px)":"translate3d("+S+"px, "+O+"px, 0)",ne))}return Object.assign({},Y,(t={},t[b]=v?O+"px":"",t[w]=y?S+"px":"",t.transform="",t))}function E1(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,l=o===void 0?!0:o,u=n.roundOffsets,c=u===void 0?!0:u,d={placement:ln(t.placement),variation:Oi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,_h(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,_h(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const C1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:E1,data:{}};var Ds={passive:!0};function b1(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,l=r.resize,u=l===void 0?!0:l,c=St(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(h){h.addEventListener("scroll",n.update,Ds)}),u&&c.addEventListener("resize",n.update,Ds),function(){o&&d.forEach(function(h){h.removeEventListener("scroll",n.update,Ds)}),u&&c.removeEventListener("resize",n.update,Ds)}}const P1={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:b1,data:{}};var O1={left:"right",right:"left",bottom:"top",top:"bottom"};function Xs(e){return e.replace(/left|right|bottom|top/g,function(t){return O1[t]})}var j1={start:"end",end:"start"};function xh(e){return e.replace(/start|end/g,function(t){return j1[t]})}function pf(e){var t=St(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function hf(e){return Pi(rr(e)).left+pf(e).scrollLeft}function T1(e,t){var n=St(e),r=rr(e),i=n.visualViewport,o=r.clientWidth,l=r.clientHeight,u=0,c=0;if(i){o=i.width,l=i.height;var d=gv();(d||!d&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}return{width:o,height:l,x:u+hf(e),y:c}}function N1(e){var t,n=rr(e),r=pf(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Cr(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),l=Cr(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-r.scrollLeft+hf(e),c=-r.scrollTop;return En(i||n).direction==="rtl"&&(u+=Cr(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:l,x:u,y:c}}function mf(e){var t=En(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function xv(e){return["html","body","#document"].indexOf(qn(e))>=0?e.ownerDocument.body:an(e)&&mf(e)?e:xv(Hl(e))}function go(e,t){var n;t===void 0&&(t=[]);var r=xv(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=St(r),l=i?[o].concat(o.visualViewport||[],mf(r)?r:[]):r,u=t.concat(l);return i?u:u.concat(go(Hl(l)))}function ac(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function L1(e,t){var n=Pi(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Sh(e,t,n){return t===hv?ac(T1(e,n)):Nr(t)?L1(t,n):ac(N1(rr(e)))}function A1(e){var t=go(Hl(e)),n=["absolute","fixed"].indexOf(En(e).position)>=0,r=n&&an(e)?Vo(e):e;return Nr(r)?t.filter(function(i){return Nr(i)&&vv(i,r)&&qn(i)!=="body"}):[]}function D1(e,t,n,r){var i=t==="clippingParents"?A1(e):[].concat(t),o=[].concat(i,[n]),l=o[0],u=o.reduce(function(c,d){var h=Sh(e,d,r);return c.top=Cr(h.top,c.top),c.right=Sl(h.right,c.right),c.bottom=Sl(h.bottom,c.bottom),c.left=Cr(h.left,c.left),c},Sh(e,l,r));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function Sv(e){var t=e.reference,n=e.element,r=e.placement,i=r?ln(r):null,o=r?Oi(r):null,l=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,c;switch(i){case dt:c={x:l,y:t.y-n.height};break;case Mt:c={x:l,y:t.y+t.height};break;case zt:c={x:t.x+t.width,y:u};break;case pt:c={x:t.x-n.width,y:u};break;default:c={x:t.x,y:t.y}}var d=i?df(i):null;if(d!=null){var h=d==="y"?"height":"width";switch(o){case Ci:c[d]=c[d]-(t[h]/2-n[h]/2);break;case Ro:c[d]=c[d]+(t[h]/2-n[h]/2);break}}return c}function Io(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,l=o===void 0?e.strategy:o,u=n.boundary,c=u===void 0?r1:u,d=n.rootBoundary,h=d===void 0?hv:d,g=n.elementContext,_=g===void 0?Zi:g,S=n.altBoundary,C=S===void 0?!1:S,O=n.padding,P=O===void 0?0:O,y=wv(typeof P!="number"?P:_v(P,Wo)),v=_===Zi?i1:Zi,w=e.rects.popper,b=e.elements[C?v:_],N=D1(Nr(b)?b:b.contextElement||rr(e.elements.popper),c,h,l),A=Pi(e.elements.reference),D=Sv({reference:A,element:w,placement:i}),$=ac(Object.assign({},w,D)),H=_===Zi?$:A,F={top:N.top-H.top+y.top,bottom:H.bottom-N.bottom+y.bottom,left:N.left-H.left+y.left,right:H.right-N.right+y.right},Y=e.modifiersData.offset;if(_===Zi&&Y){var ee=Y[i];Object.keys(F).forEach(function(ne){var xe=[zt,Mt].indexOf(ne)>=0?1:-1,De=[dt,Mt].indexOf(ne)>=0?"y":"x";F[ne]+=ee[De]*xe})}return F}function $1(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,l=n.padding,u=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?mv:c,h=Oi(r),g=h?u?yh:yh.filter(function(C){return Oi(C)===h}):Wo,_=g.filter(function(C){return d.indexOf(C)>=0});_.length===0&&(_=g);var S=_.reduce(function(C,O){return C[O]=Io(e,{placement:O,boundary:i,rootBoundary:o,padding:l})[ln(O)],C},{});return Object.keys(S).sort(function(C,O){return S[C]-S[O]})}function R1(e){if(ln(e)===uf)return[];var t=Xs(e);return[xh(e),t,xh(t)]}function I1(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,l=n.altAxis,u=l===void 0?!0:l,c=n.fallbackPlacements,d=n.padding,h=n.boundary,g=n.rootBoundary,_=n.altBoundary,S=n.flipVariations,C=S===void 0?!0:S,O=n.allowedAutoPlacements,P=t.options.placement,y=ln(P),v=y===P,w=c||(v||!C?[Xs(P)]:R1(P)),b=[P].concat(w).reduce(function(Ue,Oe){return Ue.concat(ln(Oe)===uf?$1(t,{placement:Oe,boundary:h,rootBoundary:g,padding:d,flipVariations:C,allowedAutoPlacements:O}):Oe)},[]),N=t.rects.reference,A=t.rects.popper,D=new Map,$=!0,H=b[0],F=0;F=0,De=xe?"width":"height",ke=Io(t,{placement:Y,boundary:h,rootBoundary:g,altBoundary:_,padding:d}),$e=xe?ne?zt:pt:ne?Mt:dt;N[De]>A[De]&&($e=Xs($e));var M=Xs($e),X=[];if(o&&X.push(ke[ee]<=0),u&&X.push(ke[$e]<=0,ke[M]<=0),X.every(function(Ue){return Ue})){H=Y,$=!1;break}D.set(Y,X)}if($)for(var V=C?3:1,T=function(Oe){var ze=b.find(function(Ne){var Ft=D.get(Ne);if(Ft)return Ft.slice(0,Oe).every(function(K){return K})});if(ze)return H=ze,"break"},de=V;de>0;de--){var Ct=T(de);if(Ct==="break")break}t.placement!==H&&(t.modifiersData[r]._skip=!0,t.placement=H,t.reset=!0)}}const M1={name:"flip",enabled:!0,phase:"main",fn:I1,requiresIfExists:["offset"],data:{_skip:!1}};function kh(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Eh(e){return[dt,zt,Mt,pt].some(function(t){return e[t]>=0})}function z1(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,l=Io(t,{elementContext:"reference"}),u=Io(t,{altBoundary:!0}),c=kh(l,r),d=kh(u,i,o),h=Eh(c),g=Eh(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const F1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:z1};function B1(e,t,n){var r=ln(e),i=[pt,dt].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,l=o[0],u=o[1];return l=l||0,u=(u||0)*i,[pt,zt].indexOf(r)>=0?{x:u,y:l}:{x:l,y:u}}function U1(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,l=mv.reduce(function(h,g){return h[g]=B1(g,t.rects,o),h},{}),u=l[t.placement],c=u.x,d=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=l}const W1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:U1};function V1(e){var t=e.state,n=e.name;t.modifiersData[n]=Sv({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const H1={name:"popperOffsets",enabled:!0,phase:"read",fn:V1,data:{}};function K1(e){return e==="x"?"y":"x"}function Q1(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,l=n.altAxis,u=l===void 0?!1:l,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,g=n.padding,_=n.tether,S=_===void 0?!0:_,C=n.tetherOffset,O=C===void 0?0:C,P=Io(t,{boundary:c,rootBoundary:d,padding:g,altBoundary:h}),y=ln(t.placement),v=Oi(t.placement),w=!v,b=df(y),N=K1(b),A=t.modifiersData.popperOffsets,D=t.rects.reference,$=t.rects.popper,H=typeof O=="function"?O(Object.assign({},t.rects,{placement:t.placement})):O,F=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ee={x:0,y:0};if(A){if(o){var ne,xe=b==="y"?dt:pt,De=b==="y"?Mt:zt,ke=b==="y"?"height":"width",$e=A[b],M=$e+P[xe],X=$e-P[De],V=S?-$[ke]/2:0,T=v===Ci?D[ke]:$[ke],de=v===Ci?-$[ke]:-D[ke],Ct=t.elements.arrow,Ue=S&&Ct?ff(Ct):{width:0,height:0},Oe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:yv(),ze=Oe[xe],Ne=Oe[De],Ft=mo(0,D[ke],Ue[ke]),K=w?D[ke]/2-V-Ft-ze-F.mainAxis:T-Ft-ze-F.mainAxis,Dr=w?-D[ke]/2+V+Ft+Ne+F.mainAxis:de+Ft+Ne+F.mainAxis,$r=t.elements.arrow&&Vo(t.elements.arrow),Kl=$r?b==="y"?$r.clientTop||0:$r.clientLeft||0:0,Ko=(ne=Y==null?void 0:Y[b])!=null?ne:0,or=$e+K-Ko-Kl,Qo=$e+Dr-Ko,On=mo(S?Sl(M,or):M,$e,S?Cr(X,Qo):X);A[b]=On,ee[b]=On-$e}if(u){var un,Ql=b==="x"?dt:pt,Yl=b==="x"?Mt:zt,cn=A[N],Rr=N==="y"?"height":"width",Yo=cn+P[Ql],Xo=cn-P[Yl],$i=[dt,pt].indexOf(y)!==-1,sr=(un=Y==null?void 0:Y[N])!=null?un:0,Bt=$i?Yo:cn-D[Rr]-$[Rr]-sr+F.altAxis,Ri=$i?cn+D[Rr]+$[Rr]-sr-F.altAxis:Xo,Jo=S&&$i?v1(Bt,cn,Ri):mo(S?Bt:Yo,cn,S?Ri:Xo);A[N]=Jo,ee[N]=Jo-cn}t.modifiersData[r]=ee}}const Y1={name:"preventOverflow",enabled:!0,phase:"main",fn:Q1,requiresIfExists:["offset"]};function X1(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function J1(e){return e===St(e)||!an(e)?pf(e):X1(e)}function G1(e){var t=e.getBoundingClientRect(),n=bi(t.width)/e.offsetWidth||1,r=bi(t.height)/e.offsetHeight||1;return n!==1||r!==1}function q1(e,t,n){n===void 0&&(n=!1);var r=an(t),i=an(t)&&G1(t),o=rr(t),l=Pi(e,i,n),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((qn(t)!=="body"||mf(o))&&(u=J1(t)),an(t)?(c=Pi(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=hf(o))),{x:l.left+u.scrollLeft-c.x,y:l.top+u.scrollTop-c.y,width:l.width,height:l.height}}function Z1(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var l=[].concat(o.requires||[],o.requiresIfExists||[]);l.forEach(function(u){if(!n.has(u)){var c=t.get(u);c&&i(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function ek(e){var t=Z1(e);return h1.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function tk(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function nk(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Ch={placement:"bottom",modifiers:[],strategy:"absolute"};function bh(){for(var e=arguments.length,t=new Array(e),n=0;n=0)continue;n[r]=e[r]}return n}const lk={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},ak={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const r=(t.getAttribute("aria-describedby")||"").split(",").filter(i=>i.trim()!==n.id);r.length?t.setAttribute("aria-describedby",r.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,i=(t=n.getAttribute("role"))==null?void 0:t.toLowerCase();if(n.id&&i==="tooltip"&&"setAttribute"in r){const o=r.getAttribute("aria-describedby");if(o&&o.split(",").indexOf(n.id)!==-1)return;r.setAttribute("aria-describedby",o?`${o},${n.id}`:n.id)}}},uk=[];function ck(e,t,n={}){let{enabled:r=!0,placement:i="bottom",strategy:o="absolute",modifiers:l=uk}=n,u=sk(n,ok);const c=x.useRef(l),d=x.useRef(),h=x.useCallback(()=>{var P;(P=d.current)==null||P.update()},[]),g=x.useCallback(()=>{var P;(P=d.current)==null||P.forceUpdate()},[]),[_,S]=n1(x.useState({placement:i,update:h,forceUpdate:g,attributes:{},styles:{popper:{},arrow:{}}})),C=x.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:P})=>{const y={},v={};Object.keys(P.elements).forEach(w=>{y[w]=P.styles[w],v[w]=P.attributes[w]}),S({state:P,styles:y,attributes:v,update:h,forceUpdate:g,placement:P.placement})}}),[h,g,S]),O=x.useMemo(()=>(ho(c.current,l)||(c.current=l),c.current),[l]);return x.useEffect(()=>{!d.current||!r||d.current.setOptions({placement:i,strategy:o,modifiers:[...O,C,lk]})},[o,i,C,r,O]),x.useEffect(()=>{if(!(!r||e==null||t==null))return d.current=ik(e,t,Object.assign({},u,{placement:i,strategy:o,modifiers:[...O,ak,C]})),()=>{d.current!=null&&(d.current.destroy(),d.current=void 0,S(P=>Object.assign({},P,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),_}function Ph(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}function fk(e,t,n,r){var i=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)}function $s(e,t,n,r){return pv(e,t,n,r),function(){fk(e,t,n,r)}}function dk(e){return e&&e.ownerDocument||document}var pk=function(){},hk=pk;const mk=kl(hk),Oh=()=>{};function gk(e){return e.button===0}function vk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const ru=e=>e&&("current"in e?e.current:e),jh={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function yk(e,t=Oh,{disabled:n,clickTrigger:r="click"}={}){const i=x.useRef(!1),o=x.useRef(!1),l=x.useCallback(d=>{const h=ru(e);mk(!!h,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),i.current=!h||vk(d)||!gk(d)||!!Ph(h,d.target)||o.current,o.current=!1},[e]),u=Xn(d=>{const h=ru(e);h&&Ph(h,d.target)?o.current=!0:o.current=!1}),c=Xn(d=>{i.current||t(d)});x.useEffect(()=>{var d,h;if(n||e==null)return;const g=dk(ru(e)),_=g.defaultView||window;let S=(d=_.event)!=null?d:(h=_.parent)==null?void 0:h.event,C=null;jh[r]&&(C=$s(g,jh[r],u,!0));const O=$s(g,r,l,!0),P=$s(g,r,v=>{if(v===S){S=void 0;return}c(v)});let y=[];return"ontouchstart"in g.documentElement&&(y=[].slice.call(g.body.children).map(v=>$s(v,"mousemove",Oh))),()=>{C==null||C(),O(),P(),y.forEach(v=>v())}},[e,n,r,l,u,c])}function wk(e){const t={};return Array.isArray(e)?(e==null||e.forEach(n=>{t[n.name]=n}),t):e||t}function _k(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function xk({enabled:e,enableEvents:t,placement:n,flip:r,offset:i,fixed:o,containerPadding:l,arrowElement:u,popperConfig:c={}}){var d,h,g,_,S;const C=wk(c.modifiers);return Object.assign({},c,{placement:n,enabled:e,strategy:o?"fixed":c.strategy,modifiers:_k(Object.assign({},C,{eventListeners:{enabled:t,options:(d=C.eventListeners)==null?void 0:d.options},preventOverflow:Object.assign({},C.preventOverflow,{options:l?Object.assign({padding:l},(h=C.preventOverflow)==null?void 0:h.options):(g=C.preventOverflow)==null?void 0:g.options}),offset:{options:Object.assign({offset:i},(_=C.offset)==null?void 0:_.options)},arrow:Object.assign({},C.arrow,{enabled:!!u,options:Object.assign({},(S=C.arrow)==null?void 0:S.options,{element:u})}),flip:Object.assign({enabled:!!r},C.flip)}))})}const Sk=["children","usePopper"];function kk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const Ek=()=>{};function kv(e={}){const t=x.useContext(Vl),[n,r]=e1(),i=x.useRef(!1),{flip:o,offset:l,rootCloseEvent:u,fixed:c=!1,placement:d,popperConfig:h={},enableEventListeners:g=!0,usePopper:_=!!t}=e,S=(t==null?void 0:t.show)==null?!!e.show:t.show;S&&!i.current&&(i.current=!0);const C=A=>{t==null||t.toggle(!1,A)},{placement:O,setMenu:P,menuElement:y,toggleElement:v}=t||{},w=ck(v,y,xk({placement:d||O||"bottom-start",enabled:_,enableEvents:g??S,offset:l,flip:o,fixed:c,arrowElement:n,popperConfig:h})),b=Object.assign({ref:P||Ek,"aria-labelledby":v==null?void 0:v.id},w.attributes.popper,{style:w.styles.popper}),N={show:S,placement:O,hasShown:i.current,toggle:t==null?void 0:t.toggle,popper:_?w:null,arrowProps:_?Object.assign({ref:r},w.attributes.arrow,{style:w.styles.arrow}):{}};return yk(y,C,{clickTrigger:u,disabled:!S}),[b,N]}function Ev(e){let{children:t,usePopper:n=!0}=e,r=kk(e,Sk);const[i,o]=kv(Object.assign({},r,{usePopper:n}));return m.jsx(m.Fragment,{children:t(i,o)})}Ev.displayName="DropdownMenu";const Cv={prefix:String(Math.round(Math.random()*1e10)),current:0},bv=wn.createContext(Cv),Ck=wn.createContext(!1);let iu=new WeakMap;function bk(e=!1){let t=x.useContext(bv),n=x.useRef(null);if(n.current===null&&!e){var r,i;let o=(i=wn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let l=iu.get(o);l==null?iu.set(o,{id:t.current,state:o.memoizedState}):o.memoizedState!==l.state&&(t.current=l.id,iu.delete(o))}n.current=++t.current}return n.current}function Pk(e){let t=x.useContext(bv),n=bk(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function Ok(e){let t=wn.useId(),[n]=x.useState(Ak()),r=n?"react-aria":`react-aria${Cv.prefix}`;return e||`${r}-${t}`}const jk=typeof wn.useId=="function"?Ok:Pk;function Tk(){return!1}function Nk(){return!0}function Lk(e){return()=>{}}function Ak(){return typeof wn.useSyncExternalStore=="function"?wn.useSyncExternalStore(Lk,Tk,Nk):x.useContext(Ck)}const Pv=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},Th=()=>{};function Ov(){const e=jk(),{show:t=!1,toggle:n=Th,setToggle:r,menuElement:i}=x.useContext(Vl)||{},o=x.useCallback(u=>{n(!t,u)},[t,n]),l={id:e,ref:r||Th,onClick:o,"aria-expanded":!!t};return i&&Pv(i)&&(l["aria-haspopup"]=!0),[l,{show:t,toggle:n}]}function jv({children:e}){const[t,n]=Ov();return m.jsx(m.Fragment,{children:e(t,n)})}jv.displayName="DropdownToggle";const uc=x.createContext(null),Nh=(e,t=null)=>e!=null?String(e):t||null,Tv=x.createContext(null);Tv.displayName="NavContext";const Dk=["as","disabled"];function $k(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Rk(e){return!e||e.trim()==="#"}function gf({tagName:e,disabled:t,href:n,target:r,rel:i,role:o,onClick:l,tabIndex:u=0,type:c}){e||(n!=null||r!=null||i!=null?e="a":e="button");const d={tagName:e};if(e==="button")return[{type:c||"button",disabled:t},d];const h=_=>{if((t||e==="a"&&Rk(n))&&_.preventDefault(),t){_.stopPropagation();return}l==null||l(_)},g=_=>{_.key===" "&&(_.preventDefault(),h(_))};return e==="a"&&(n||(n="#"),t&&(n=void 0)),[{role:o??"button",disabled:void 0,tabIndex:t?void 0:u,href:n,target:e==="a"?r:void 0,"aria-disabled":t||void 0,rel:e==="a"?i:void 0,onClick:h,onKeyDown:g},d]}const Nv=x.forwardRef((e,t)=>{let{as:n,disabled:r}=e,i=$k(e,Dk);const[o,{tagName:l}]=gf(Object.assign({tagName:n,disabled:r},i));return m.jsx(l,Object.assign({},i,o,{ref:t}))});Nv.displayName="Button";const Ik="data-rr-ui-";function Lv(e){return`${Ik}${e}`}const Mk=["eventKey","disabled","onClick","active","as"];function zk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Av({key:e,href:t,active:n,disabled:r,onClick:i}){const o=x.useContext(uc),l=x.useContext(Tv),{activeKey:u}=l||{},c=Nh(e,t),d=n==null&&e!=null?Nh(u)===c:n;return[{onClick:Xn(g=>{r||(i==null||i(g),o&&!g.isPropagationStopped()&&o(c,g))}),"aria-disabled":r||void 0,"aria-selected":d,[Lv("dropdown-item")]:""},{isActive:d}]}const Dv=x.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:i,active:o,as:l=Nv}=e,u=zk(e,Mk);const[c]=Av({key:n,href:u.href,disabled:r,onClick:i,active:o});return m.jsx(l,Object.assign({},u,{ref:t},c))});Dv.displayName="DropdownItem";const $v=x.createContext(dv?window:void 0);$v.Provider;function Fk(){return x.useContext($v)}function Lh(){const e=GS(),t=x.useRef(null),n=x.useCallback(r=>{t.current=r,e()},[e]);return[t,n]}function Ho({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:i=`* [${Lv("dropdown-item")}]`,focusFirstItemOnShow:o,placement:l="bottom-start",children:u}){const c=Fk(),[d,h]=XS(t,e,r),[g,_]=Lh(),S=g.current,[C,O]=Lh(),P=C.current,y=JS(d),v=x.useRef(null),w=x.useRef(!1),b=x.useContext(uc),N=x.useCallback((Y,ee,ne=ee==null?void 0:ee.type)=>{h(Y,{originalEvent:ee,source:ne})},[h]),A=Xn((Y,ee)=>{n==null||n(Y,ee),N(!1,ee,"select"),ee.isPropagationStopped()||b==null||b(Y,ee)}),D=x.useMemo(()=>({toggle:N,placement:l,show:d,menuElement:S,toggleElement:P,setMenu:_,setToggle:O}),[N,l,d,S,P,_,O]);S&&y&&!d&&(w.current=S.contains(S.ownerDocument.activeElement));const $=Xn(()=>{P&&P.focus&&P.focus()}),H=Xn(()=>{const Y=v.current;let ee=o;if(ee==null&&(ee=g.current&&Pv(g.current)?"keyboard":!1),ee===!1||ee==="keyboard"&&!/^key.+$/.test(Y))return;const ne=mh(g.current,i)[0];ne&&ne.focus&&ne.focus()});x.useEffect(()=>{d?H():w.current&&(w.current=!1,$())},[d,w,$,H]),x.useEffect(()=>{v.current=null});const F=(Y,ee)=>{if(!g.current)return null;const ne=mh(g.current,i);let xe=ne.indexOf(Y)+ee;return xe=Math.max(0,Math.min(xe,ne.length)),ne[xe]};return ZS(x.useCallback(()=>c.document,[c]),"keydown",Y=>{var ee,ne;const{key:xe}=Y,De=Y.target,ke=(ee=g.current)==null?void 0:ee.contains(De),$e=(ne=C.current)==null?void 0:ne.contains(De);if(/input|textarea/i.test(De.tagName)&&(xe===" "||xe!=="Escape"&&ke||xe==="Escape"&&De.type==="search")||!ke&&!$e||xe==="Tab"&&(!g.current||!d))return;v.current=Y.type;const X={originalEvent:Y,source:Y.type};switch(xe){case"ArrowUp":{const V=F(De,-1);V&&V.focus&&V.focus(),Y.preventDefault();return}case"ArrowDown":if(Y.preventDefault(),!d)h(!0,X);else{const V=F(De,1);V&&V.focus&&V.focus()}return;case"Tab":pv(De.ownerDocument,"keyup",V=>{var T;(V.key==="Tab"&&!V.target||!((T=g.current)!=null&&T.contains(V.target)))&&h(!1,X)},{once:!0});break;case"Escape":xe==="Escape"&&(Y.preventDefault(),Y.stopPropagation()),h(!1,X);break}}),m.jsx(uc.Provider,{value:A,children:m.jsx(Vl.Provider,{value:D,children:u})})}Ho.displayName="Dropdown";Ho.Menu=Ev;Ho.Toggle=jv;Ho.Item=Dv;function cc(){return cc=Object.assign?Object.assign.bind():function(e){for(var t=1;t1?h-1:0),_=1;_{t.current=e},[e]),t}function Qk(e){const t=Kk(e);return x.useCallback(function(...n){return t.current&&t.current(...n)},[t])}const vf=x.createContext({});vf.displayName="DropdownContext";const Yk=["xxl","xl","lg","md","sm","xs"],Xk="xs",yf=x.createContext({prefixes:{},breakpoints:Yk,minBreakpoint:Xk}),{Consumer:DE,Provider:$E}=yf;function ir(e,t){const{prefixes:n}=x.useContext(yf);return e||n[t]||t}function Jk(){const{dir:e}=x.useContext(yf);return e==="rtl"}const Rv=x.forwardRef(({className:e,bsPrefix:t,as:n="hr",role:r="separator",...i},o)=>(t=ir(t,"dropdown-divider"),m.jsx(n,{ref:o,className:nr(e,t),role:r,...i})));Rv.displayName="DropdownDivider";const Iv=x.forwardRef(({className:e,bsPrefix:t,as:n="div",role:r="heading",...i},o)=>(t=ir(t,"dropdown-header"),m.jsx(n,{ref:o,className:nr(e,t),role:r,...i})));Iv.displayName="DropdownHeader";const Gk=["onKeyDown"];function qk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Zk(e){return!e||e.trim()==="#"}const Mv=x.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=qk(e,Gk);const[i]=gf(Object.assign({tagName:"a"},r)),o=Xn(l=>{i.onKeyDown(l),n==null||n(l)});return Zk(r.href)||r.role==="button"?m.jsx("a",Object.assign({ref:t},r,i,{onKeyDown:o})):m.jsx("a",Object.assign({ref:t},r,{onKeyDown:n}))});Mv.displayName="Anchor";const zv=x.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:i,active:o,as:l=Mv,...u},c)=>{const d=ir(e,"dropdown-item"),[h,g]=Av({key:n,href:u.href,disabled:r,onClick:i,active:o});return m.jsx(l,{...u,...h,ref:c,className:nr(t,d,g.isActive&&"active",r&&"disabled")})});zv.displayName="DropdownItem";const Fv=x.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},i)=>(t=ir(t,"dropdown-item-text"),m.jsx(n,{ref:i,className:nr(e,t),...r})));Fv.displayName="DropdownItemText";const eE=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",tE=typeof document<"u",nE=tE||eE?x.useLayoutEffect:x.useEffect,Dh=e=>!e||typeof e=="function"?e:t=>{e.current=t};function rE(e,t){const n=Dh(e),r=Dh(t);return i=>{n&&n(i),r&&r(i)}}function Bv(e,t){return x.useMemo(()=>rE(e,t),[e,t])}const wf=x.createContext(null);wf.displayName="InputGroupContext";const Uv=x.createContext(null);Uv.displayName="NavbarContext";function Wv(e,t){return e}function Vv(e,t,n){const r=n?"top-end":"top-start",i=n?"top-start":"top-end",o=n?"bottom-end":"bottom-start",l=n?"bottom-start":"bottom-end",u=n?"right-start":"left-start",c=n?"right-end":"left-end",d=n?"left-start":"right-start",h=n?"left-end":"right-end";let g=e?l:o;return t==="up"?g=e?i:r:t==="end"?g=e?h:d:t==="start"?g=e?c:u:t==="down-centered"?g="bottom":t==="up-centered"&&(g="top"),g}const Hv=x.forwardRef(({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:i=!0,show:o,renderOnMount:l,as:u="div",popperConfig:c,variant:d,...h},g)=>{let _=!1;const S=x.useContext(Uv),C=ir(e,"dropdown-menu"),{align:O,drop:P,isRTL:y}=x.useContext(vf);n=n||O;const v=x.useContext(wf),w=[];if(n)if(typeof n=="object"){const Y=Object.keys(n);if(Y.length){const ee=Y[0],ne=n[ee];_=ne==="start",w.push(`${C}-${ee}-${ne}`)}}else n==="end"&&(_=!0);const b=Vv(_,P,y),[N,{hasShown:A,popper:D,show:$,toggle:H}]=kv({flip:i,rootCloseEvent:r,show:o,usePopper:!S&&w.length===0,offset:[0,2],popperConfig:c,placement:b});if(N.ref=Bv(Wv(g),N.ref),nE(()=>{$&&(D==null||D.update())},[$]),!A&&!l&&!v)return null;typeof u!="string"&&(N.show=$,N.close=()=>H==null?void 0:H(!1),N.align=n);let F=h.style;return D!=null&&D.placement&&(F={...h.style,...N.style},h["x-placement"]=D.placement),m.jsx(u,{...h,...N,style:F,...(w.length||S)&&{"data-bs-popper":"static"},className:nr(t,C,$&&"show",_&&`${C}-end`,d&&`${C}-${d}`,...w)})});Hv.displayName="DropdownMenu";const Kv=x.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:i=!1,disabled:o=!1,className:l,...u},c)=>{const d=ir(t,"btn"),[h,{tagName:g}]=gf({tagName:e,disabled:o,...u}),_=g;return m.jsx(_,{...h,...u,ref:c,disabled:o,className:nr(l,d,i&&"active",n&&`${d}-${n}`,r&&`${d}-${r}`,u.href&&o&&"disabled")})});Kv.displayName="Button";const Qv=x.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:i=Kv,...o},l)=>{const u=ir(e,"dropdown-toggle"),c=x.useContext(Vl);r!==void 0&&(o.bsPrefix=r);const[d]=Ov();return d.ref=Bv(d.ref,Wv(l)),m.jsx(i,{className:nr(n,u,t&&`${u}-split`,(c==null?void 0:c.show)&&"show"),...d,...o})});Qv.displayName="DropdownToggle";const Yv=x.forwardRef((e,t)=>{const{bsPrefix:n,drop:r="down",show:i,className:o,align:l="start",onSelect:u,onToggle:c,focusFirstItemOnShow:d,as:h="div",navbar:g,autoClose:_=!0,...S}=Hk(e,{show:"onToggle"}),C=x.useContext(wf),O=ir(n,"dropdown"),P=Jk(),y=D=>_===!1?D==="click":_==="inside"?D!=="rootClose":_==="outside"?D!=="select":!0,v=Qk((D,$)=>{var H;!((H=$.originalEvent)==null||(H=H.target)==null)&&H.classList.contains("dropdown-toggle")&&$.source==="mousedown"||($.originalEvent.currentTarget===document&&($.source!=="keydown"||$.originalEvent.key==="Escape")&&($.source="rootClose"),y($.source)&&(c==null||c(D,$)))}),b=Vv(l==="end",r,P),N=x.useMemo(()=>({align:l,drop:r,isRTL:P}),[l,r,P]),A={down:O,"down-centered":`${O}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return m.jsx(vf.Provider,{value:N,children:m.jsx(Ho,{placement:b,show:i,onSelect:u,onToggle:v,focusFirstItemOnShow:d,itemSelector:`.${O}-item:not(.disabled):not(:disabled)`,children:C?S.children:m.jsx(h,{...S,ref:t,className:nr(o,i&&"show",A[r])})})})});Yv.displayName="Dropdown";const Nt=Object.assign(Yv,{Toggle:Qv,Menu:Hv,Item:zv,ItemText:Fv,Divider:Rv,Header:Iv}),iE=[{title:"Home",href:"/",id:"menuHome",sort:1,iconClass:"ti ti-layout-dashboard"},{title:"Website",href:"/site",id:"menuSite",sort:2,iconClass:"ti ti-world"},{title:"FTP",href:"/ftp",id:"menuFtp",sort:3,iconClass:"ti ti-folder-share"},{title:"Databases",href:"/database",id:"menuDatabase",sort:4,iconClass:"ti ti-database"},{title:"Docker",href:"/docker",id:"menuDocker",sort:5,iconClass:"ti ti-brand-docker"},{title:"Monitor",href:"/control",id:"menuControl",sort:6,iconClass:"ti ti-heart-rate-monitor"},{title:"Security",href:"/firewall",id:"menuFirewall",sort:7,iconClass:"ti ti-shield-lock"},{title:"Files",href:"/files",id:"menuFiles",sort:8,iconClass:"ti ti-folders"},{title:"Node",href:"/node",id:"menuNode",sort:9,iconClass:"ti ti-brand-nodejs"},{title:"Logs",href:"/logs",id:"menuLogs",sort:10,iconClass:"ti ti-file-text"},{title:"Domains",href:"/ssl_domain",id:"menuDomains",sort:11,iconClass:"ti ti-world-www"},{title:"Terminal",href:"/xterm",id:"menuXterm",sort:12,iconClass:"ti ti-terminal-2"},{title:"Cron",href:"/crontab",id:"menuCrontab",sort:13,iconClass:"ti ti-clock"},{title:"App Store",href:"/soft",id:"menuSoft",sort:14,iconClass:"ti ti-package"},{title:"Services",href:"/services",id:"menuServices",sort:15,iconClass:"ti ti-server"},{title:"Plugins",href:"/plugins",id:"menuPlugins",sort:16,iconClass:"ti ti-puzzle"},{title:"Backup Plans",href:"/backup-plans",id:"menuBackupPlans",sort:17,iconClass:"ti ti-archive"},{title:"Users",href:"/users",id:"menuUsers",sort:18,iconClass:"ti ti-users"},{title:"Settings",href:"/config",id:"menuConfig",sort:19,iconClass:"ti ti-settings"},{title:"Log out",href:"/logout",id:"menuLogout",sort:20,iconClass:"ti ti-logout"}],Rs=e=>`/theme/img/theme/theme-${e}.svg`;function oE(){const{theme:e,accent:t,sidebarTheme:n,sidebarBg:r,setTheme:i,setAccent:o,setSidebarTheme:l,setSidebarBg:u,resetTheme:c}=cv(),[d,h]=x.useState(!1),g=x.useId(),_=x.useCallback(()=>h(!1),[]);return x.useEffect(()=>{if(!d)return;const S=C=>{C.key==="Escape"&&_()};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[d,_]),m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"sidebar-contact",children:m.jsx("button",{type:"button",className:"toggle-theme border-0 bg-transparent p-0","aria-expanded":d,"aria-controls":"yakpanel-theme-panel","aria-label":d?"Close theme settings":"Open theme customizer",onClick:()=>h(S=>!S),children:m.jsx("i",{className:`fa fa-cog ${d?"fa-spin":""}`,"aria-hidden":!0})})}),m.jsxs("div",{id:"yakpanel-theme-panel",className:`sidebar-themesettings ${d?"open":""}`,role:"dialog","aria-modal":"true","aria-labelledby":g,children:[m.jsxs("div",{className:"themesettings-header",children:[m.jsx("h4",{id:g,children:"Theme Customizer"}),m.jsx("button",{type:"button",className:"btn btn-link p-0 text-body","aria-label":"Close",onClick:_,children:m.jsx("i",{className:"ti ti-x","aria-hidden":!0})})]}),m.jsxs("div",{className:"themesettings-inner",children:[m.jsxs("div",{className:"themesettings-content",children:[m.jsx("h6",{children:"Layout"}),m.jsxs("div",{className:"row g-2",children:[m.jsx("div",{className:"col-6",children:m.jsx(ou,{name:"yak-theme-layout",value:"light",checked:e==="light",onChange:()=>i("light"),id:"yak-lightTheme",label:"Light",imgSrc:Rs("01")})}),m.jsx("div",{className:"col-6",children:m.jsx(ou,{name:"yak-theme-layout",value:"dark",checked:e==="dark",onChange:()=>i("dark"),id:"yak-darkTheme",label:"Dark",imgSrc:Rs("02")})})]})]}),m.jsxs("div",{className:"themesettings-content",children:[m.jsx("h6",{children:"Colors"}),m.jsx("div",{className:"theme-colorsset",children:m.jsx("ul",{className:"mb-0",children:[{v:"red",id:"yak-redColor"},{v:"yellow",id:"yak-yellowColor"},{v:"blue",id:"yak-blueColor"},{v:"green",id:"yak-greenColor"}].map(({v:S,id:C})=>m.jsx("li",{children:m.jsxs("div",{className:"input-themeselects",children:[m.jsx("input",{type:"radio",name:"yak-accent",id:C,value:S,checked:t===S,onChange:()=>o(S)}),m.jsx("label",{htmlFor:C,className:`${S}-clr`,title:S,children:m.jsx("span",{className:"visually-hidden",children:S})})]})},S))})})]}),m.jsxs("div",{className:"themesettings-content",children:[m.jsx("h6",{children:"Sidebar"}),m.jsx("div",{className:"row g-2",children:[{v:"light",n:"03",label:"Light"},{v:"dark",n:"04",label:"Dark"},{v:"blue",n:"05",label:"Blue"},{v:"green",n:"06",label:"Green"}].map(({v:S,n:C,label:O})=>m.jsx("div",{className:"col-6",children:m.jsx(ou,{name:"yak-sidebar-style",value:S,checked:n===S,onChange:()=>l(S),id:`yak-sidebar-${S}`,label:O,imgSrc:Rs(C)})},S))})]}),m.jsxs("div",{className:"themesettings-content m-0 border-0",children:[m.jsx("h6",{children:"Sidebar background"}),m.jsxs("div",{className:"row g-2",children:[m.jsx("div",{className:"col-6",children:m.jsxs("div",{className:"input-themeselect",children:[m.jsx("input",{type:"radio",name:"yak-sidebarbg",id:"yak-sidebarBgNone",value:"sidebarbgnone",checked:r==="sidebarbgnone",onChange:()=>u("sidebarbgnone")}),m.jsx("label",{htmlFor:"yak-sidebarBgNone",className:"d-flex align-items-center justify-content-center bg-body-secondary rounded",style:{minHeight:72},children:m.jsx("span",{className:"small text-muted",children:"Default"})})]})}),[{v:"sidebarbg1",n:"07"},{v:"sidebarbg2",n:"08"},{v:"sidebarbg3",n:"09"},{v:"sidebarbg4",n:"10"}].map(({v:S,n:C})=>m.jsx("div",{className:"col-6",children:m.jsxs("div",{className:"input-themeselect",children:[m.jsx("input",{type:"radio",name:"yak-sidebarbg",id:`yak-${S}`,value:S,checked:r===S,onChange:()=>u(S)}),m.jsxs("label",{htmlFor:`yak-${S}`,children:[m.jsx("img",{src:Rs(C),alt:""}),m.jsxs("span",{className:"w-100",children:[m.jsxs("span",{children:["Bg ",C.slice(-1)]}),m.jsx("span",{className:"checkboxs-theme"})]})]})]})},S))]})]})]}),m.jsx("div",{className:"themesettings-footer",children:m.jsxs("ul",{className:"mb-0",children:[m.jsx("li",{children:m.jsx("button",{type:"button",className:"btn btn-cancel close-theme btn-light border w-100",onClick:_,children:"Cancel"})}),m.jsx("li",{children:m.jsx("button",{type:"button",className:"btn btn-reset btn-primary w-100",onClick:()=>{c()},children:"Reset"})})]})})]})]})}function ou({name:e,value:t,checked:n,onChange:r,id:i,label:o,imgSrc:l}){return m.jsxs("div",{className:"input-themeselect",children:[m.jsx("input",{type:"radio",name:e,id:i,value:t,checked:n,onChange:r}),m.jsxs("label",{htmlFor:i,children:[m.jsx("img",{src:l,alt:""}),m.jsxs("span",{className:"w-100",children:[m.jsx("span",{children:o}),m.jsx("span",{className:"checkboxs-theme"})]})]})]})}const $h="yakpanel_mini_sidebar";function sE(){const e=Ul(),{theme:t,toggleTheme:n}=cv(),[r,i]=x.useState(!1),[o,l]=x.useState(()=>localStorage.getItem($h)==="1");x.useEffect(()=>{localStorage.setItem($h,o?"1":"0")},[o]),x.useEffect(()=>{o?document.body.classList.add("mini-sidebar"):document.body.classList.remove("mini-sidebar")},[o]);const u=()=>i(!1);return m.jsxs("div",{className:`main-wrapper ${r?"slide-nav":""}`,children:[m.jsxs("div",{className:"header",children:[m.jsxs("div",{className:`header-left ${o?"":"active"}`,children:[m.jsxs(As,{to:"/",className:"logo logo-normal",onClick:u,children:[m.jsx("img",{src:"/theme/img/logo.png",alt:"YakPanel"}),m.jsx("img",{src:"/theme/img/white-logo.png",className:"white-logo",alt:""})]}),m.jsx(As,{to:"/",className:"logo logo-small",onClick:u,children:m.jsx("img",{src:"/theme/img/logo-small.png",alt:""})}),m.jsx("button",{type:"button",id:"toggle_btn",className:o?"":"active","aria-label":o?"Expand sidebar":"Collapse sidebar",onClick:()=>l(!o),children:m.jsx("i",{className:"ti ti-arrow-bar-to-left"})})]}),m.jsx("button",{type:"button",id:"mobile_btn",className:"mobile_btn d-md-none btn btn-link p-0 border-0","aria-label":"Open menu",onClick:()=>i(!r),children:m.jsxs("span",{className:"bar-icon",children:[m.jsx("span",{}),m.jsx("span",{}),m.jsx("span",{})]})}),m.jsx("div",{className:"header-user",children:m.jsxs("ul",{className:"nav user-menu",children:[m.jsx("li",{className:"nav-item nav-search-inputs me-auto d-none d-md-block",children:m.jsx("div",{className:"top-nav-search",children:m.jsx("form",{className:"dropdown",onSubmit:c=>c.preventDefault(),children:m.jsxs("div",{className:"searchinputs",children:[m.jsx("input",{type:"search",className:"form-control",placeholder:"Search","aria-label":"Search"}),m.jsx("div",{className:"search-addon",children:m.jsx("button",{type:"submit",className:"btn btn-link p-0","aria-label":"Submit search",children:m.jsx("i",{className:"ti ti-command"})})})]})})})}),m.jsx("li",{className:"nav-item",children:m.jsxs("button",{type:"button",className:"btn btn-link nav-link dark-mode-toggle p-0",id:"dark-mode-toggle","aria-label":"Toggle theme",onClick:n,children:[m.jsx("i",{className:`ti ti-sun light-mode ${t==="light"?"active":""}`}),m.jsx("i",{className:`ti ti-moon dark-mode ${t==="dark"?"active":""}`})]})}),m.jsx("li",{className:"nav-item dropdown has-arrow main-drop",children:m.jsxs(Nt,{align:"end",children:[m.jsxs(Nt.Toggle,{as:"a",className:"btn btn-link nav-link user-link p-0 d-flex align-items-center text-decoration-none",children:[m.jsx("span",{className:"user-img",children:m.jsx("img",{src:"/theme/img/profiles/avatar-14.jpg",alt:"",className:"rounded-circle",width:32,height:32})}),m.jsxs("span",{className:"user-content d-none d-md-inline text-start ms-2",children:[m.jsx("span",{className:"user-name d-block fw-medium",children:"Admin"}),m.jsx("span",{className:"user-role text-muted small",children:"Panel"})]})]}),m.jsxs(Nt.Menu,{className:"dropdown-menu-end",children:[m.jsxs(Nt.Item,{onClick:()=>e("/users"),children:[m.jsx("i",{className:"ti ti-users me-2"}),"Users"]}),m.jsxs(Nt.Item,{onClick:()=>e("/config"),children:[m.jsx("i",{className:"ti ti-settings me-2"}),"Settings"]}),m.jsx(Nt.Divider,{}),m.jsxs(Nt.Item,{onClick:()=>e("/logout"),children:[m.jsx("i",{className:"ti ti-logout me-2"}),"Log out"]})]})]})})]})}),m.jsx("div",{className:"dropdown mobile-user-menu d-md-none",children:m.jsxs(Nt,{children:[m.jsx(Nt.Toggle,{as:"a",className:"nav-link dropdown-toggle",children:m.jsx("i",{className:"ti ti-dots-vertical"})}),m.jsxs(Nt.Menu,{children:[m.jsxs(Nt.Item,{onClick:()=>{e("/"),u()},children:[m.jsx("i",{className:"ti ti-layout-dashboard me-2"}),"Dashboard"]}),m.jsxs(Nt.Item,{onClick:()=>e("/logout"),children:[m.jsx("i",{className:"ti ti-logout me-2"}),"Log out"]})]})]})})]}),m.jsx("div",{className:"sidebar",id:"sidebar",children:m.jsx("div",{className:"sidebar-inner slimscroll",children:m.jsxs("div",{id:"sidebar-menu",className:"sidebar-menu",children:[m.jsx("ul",{children:m.jsx("li",{className:"clinicdropdown",children:m.jsxs(As,{to:"/users",onClick:u,children:[m.jsx("img",{src:"/theme/img/profiles/avatar-14.jpg",className:"img-fluid rounded-circle",alt:"",width:40,height:40}),m.jsxs("div",{className:"user-names",children:[m.jsx("h5",{children:"Admin"}),m.jsx("h6",{children:"YakPanel"})]})]})})}),m.jsx("ul",{children:m.jsxs("li",{children:[m.jsx("h6",{className:"submenu-hdr",children:"Main"}),m.jsx("ul",{children:iE.filter(c=>c.id!=="menuLogout").map(c=>m.jsx("li",{children:m.jsxs(As,{to:c.href,onClick:u,className:({isActive:d})=>d?"active":void 0,children:[m.jsx("i",{className:c.iconClass}),m.jsx("span",{children:c.title})]})},c.id))})]})}),m.jsx("ul",{children:m.jsx("li",{children:m.jsxs("button",{type:"button",className:"btn btn-link text-start w-100 text-decoration-none text-body py-2 border-0",onClick:()=>e("/logout"),children:[m.jsx("i",{className:"ti ti-logout me-2"}),"Log out"]})})})]})})}),m.jsx("div",{className:"page-wrapper",children:m.jsx("div",{className:"content",children:m.jsx(ES,{})})}),r?m.jsx("button",{type:"button",className:"position-fixed top-0 start-0 w-100 h-100 bg-dark bg-opacity-25 border-0 p-0 d-md-none",style:{zIndex:1040},"aria-label":"Close menu",onClick:u}):null,m.jsx(oE,{})]})}const Xv="/api/v1";function lE(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>t&&typeof t=="object"&&"msg"in t?String(t.msg):JSON.stringify(t)).join("; ")}async function Q(e,t={}){const n=localStorage.getItem("token"),r={"Content-Type":"application/json",...t.headers};n&&(r.Authorization=`Bearer ${n}`);const i=await fetch(`${Xv}${e}`,{...t,headers:r});if(i.status===401)throw localStorage.removeItem("token"),window.location.href="/login",new Error("Unauthorized");if(!i.ok){const o=await i.json().catch(()=>({}));throw new Error(o.detail||o.message||`HTTP ${i.status}`)}return i.json()}async function aE(e,t){const n=new URLSearchParams;n.set("username",e),n.set("password",t);const r=await fetch(`${Xv}/auth/login`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n.toString()});if(!r.ok){const o=await r.json().catch(()=>null),u=(o?lE(o.detail):void 0)||(o&&typeof o.message=="string"?o.message:void 0)||`Login failed (${r.status})`;throw new Error(u)}const i=await r.json();return localStorage.setItem("token",i.access_token),i}async function RE(e){return Q("/site/create",{method:"POST",body:JSON.stringify(e)})}async function IE(e){return Q(`/site/${e}`)}async function ME(e,t){return Q(`/site/${e}`,{method:"PUT",body:JSON.stringify(t)})}async function zE(e){return Q(`/site/${e}/redirects`)}async function FE(e,t,n,r=301){return Q(`/site/${e}/redirects`,{method:"POST",body:JSON.stringify({source:t,target:n,code:r})})}async function BE(e,t,n="main"){return Q(`/site/${e}/git/clone`,{method:"POST",body:JSON.stringify({url:t,branch:n})})}async function UE(e){return Q(`/site/${e}/git/pull`,{method:"POST"})}async function WE(e,t){return Q(`/site/${e}/redirects/${t}`,{method:"DELETE"})}async function VE(e,t){return Q(`/site/${e}/status`,{method:"POST",body:JSON.stringify({status:t?1:0})})}async function HE(){return Q("/firewall/apply",{method:"POST"})}async function KE(e){return Q(`/site/${e}`,{method:"DELETE"})}async function QE(e){return Q(`/site/${e}/backup`,{method:"POST"})}async function YE(e){return Q(`/site/${e}/backups`)}async function XE(e,t){return Q(`/site/${e}/restore`,{method:"POST",body:JSON.stringify({filename:t})})}async function JE(e,t){const n=localStorage.getItem("token"),r=await fetch(`/api/v1/site/${e}/backups/download?file=${encodeURIComponent(t)}`,{headers:n?{Authorization:`Bearer ${n}`}:{}});if(!r.ok)throw new Error("Download failed");const i=await r.blob(),o=URL.createObjectURL(i),l=document.createElement("a");l.href=o,l.download=t,l.click(),URL.revokeObjectURL(o)}async function GE(e){return Q(`/files/list?path=${encodeURIComponent(e)}`)}async function qE(e){return Q(`/files/dir-size?path=${encodeURIComponent(e)}`)}async function ZE(e,t,n=200){return Q(`/files/search?q=${encodeURIComponent(e)}&path=${encodeURIComponent(t)}&max_results=${n}`)}async function eC(e,t,n=!1){return Q("/files/chmod",{method:"POST",body:JSON.stringify({file_path:e,mode:t,recursive:n})})}async function tC(e,t){return Q("/files/touch",{method:"POST",body:JSON.stringify({path:e,name:t})})}async function nC(e,t,n,r){return Q("/files/copy",{method:"POST",body:JSON.stringify({path:e,name:t,dest_path:n,dest_name:null})})}async function rC(e,t,n,r){return Q("/files/move",{method:"POST",body:JSON.stringify({path:e,name:t,dest_path:n,dest_name:null})})}async function iC(e,t,n){return Q("/files/compress",{method:"POST",body:JSON.stringify({path:e,names:t,archive_name:n})})}async function oC(e,t){const n=new FormData;n.append("path",e),n.append("file",t);const r=localStorage.getItem("token"),i=await fetch("/api/v1/files/upload",{method:"POST",headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!i.ok){const o=await i.json().catch(()=>({}));throw new Error(o.detail||"Upload failed")}return i.json()}async function sC(e){return Q(`/files/read?path=${encodeURIComponent(e)}`)}async function lC(e,t){return Q("/files/write",{method:"POST",body:JSON.stringify({path:e,content:t})})}async function aC(e,t){return Q("/files/mkdir",{method:"POST",body:JSON.stringify({path:e,name:t})})}async function uC(e,t,n){return Q("/files/rename",{method:"POST",body:JSON.stringify({path:e,old_name:t,new_name:n})})}async function cC(e,t,n){return Q("/files/delete",{method:"POST",body:JSON.stringify({path:e,name:t,is_dir:n})})}async function fC(e){const t=localStorage.getItem("token"),n=await fetch(`/api/v1/files/download?path=${encodeURIComponent(e)}`,{headers:t?{Authorization:`Bearer ${t}`}:{}});if(!n.ok)throw new Error("Download failed");const r=await n.blob(),i=URL.createObjectURL(r),o=document.createElement("a");o.href=i,o.download=e.split("/").pop()||"download",o.click(),URL.revokeObjectURL(i)}async function dC(e){return Q(`/logs/list?path=${encodeURIComponent(e)}`)}async function pC(e,t=1e3){return Q(`/logs/read?path=${encodeURIComponent(e)}&tail=${t}`)}async function hC(e,t){return Q("/node/add",{method:"POST",body:JSON.stringify({script:e,name:t||""})})}async function mC(){return Q("/docker/containers")}async function gC(){return Q("/docker/images")}async function vC(e){return Q(`/docker/pull?image=${encodeURIComponent(e)}`,{method:"POST"})}async function yC(e,t,n,r){return Q("/docker/run",{method:"POST",body:JSON.stringify({image:e,name:t||"",ports:n||"",cmd:""})})}async function wC(e){return Q(`/database/${e}/backup`,{method:"POST"})}async function _C(e){return Q(`/database/${e}/backups`)}async function xC(e,t){return Q(`/database/${e}/restore`,{method:"POST",body:JSON.stringify({filename:t})})}async function SC(e,t){const n=localStorage.getItem("token"),r=await fetch(`/api/v1/database/${e}/backups/download?file=${encodeURIComponent(t)}`,{headers:n?{Authorization:`Bearer ${n}`}:{}});if(!r.ok)throw new Error("Download failed");const i=await r.blob(),o=URL.createObjectURL(i),l=document.createElement("a");l.href=o,l.download=t,l.click(),URL.revokeObjectURL(o)}async function kC(){return Q("/config/test-email",{method:"POST"})}async function EC(){return Q("/user/list")}async function CC(e){return Q("/user/create",{method:"POST",body:JSON.stringify(e)})}async function bC(e){return Q(`/user/${e}`,{method:"DELETE"})}async function PC(e){return Q(`/user/${e}/toggle-active`,{method:"PUT"})}async function OC(e,t){return Q("/auth/change-password",{method:"POST",body:JSON.stringify({old_password:e,new_password:t})})}async function jC(e,t){return Q(`/ftp/${e}/password`,{method:"PUT",body:JSON.stringify({password:t})})}async function TC(e,t){return Q(`/database/${e}/password`,{method:"PUT",body:JSON.stringify({password:t})})}async function NC(){return Q("/dashboard/stats")}async function LC(){return Q("/crontab/apply",{method:"POST"})}async function AC(e=50){return Q(`/monitor/processes?limit=${e}`)}async function DC(e){return Q("/plugin/add-from-url",{method:"POST",body:JSON.stringify({url:e})})}async function $C(e){return Q(`/plugin/${encodeURIComponent(e)}`,{method:"DELETE"})}async function RC(){return Q("/monitor/network")}async function IC(){return Q("/backup/plans")}async function MC(e){return Q("/backup/plans",{method:"POST",body:JSON.stringify(e)})}async function zC(e,t){return Q(`/backup/plans/${e}`,{method:"PUT",body:JSON.stringify(t)})}async function FC(e){return Q(`/backup/plans/${e}`,{method:"DELETE"})}async function BC(){return Q("/backup/run-scheduled",{method:"POST"})}function uE(){const[e,t]=x.useState(""),[n,r]=x.useState(""),[i,o]=x.useState(""),[l,u]=x.useState(!1),c=Ul();async function d(h){h.preventDefault(),o(""),u(!0);try{await aE(e,n),c("/")}catch(g){o(g instanceof Error?g.message:"Login failed")}finally{u(!1)}}return m.jsx("div",{className:"account-content position-relative min-vh-100 d-flex align-items-center justify-content-center p-4",children:m.jsx("div",{className:"card shadow-lg border-0",style:{maxWidth:420,width:"100%"},children:m.jsxs("div",{className:"card-body p-4 p-md-5",children:[m.jsxs("div",{className:"text-center mb-4",children:[m.jsx("img",{src:"/theme/img/logo.png",alt:"YakPanel",className:"mb-3",height:40}),m.jsx("h4",{className:"fw-bold",children:"YakPanel"}),m.jsx("p",{className:"text-muted small mb-0",children:"Sign in to continue"})]}),m.jsxs("form",{onSubmit:d,children:[i?m.jsx("div",{className:"alert alert-danger",role:"alert",children:i}):null,m.jsxs("div",{className:"mb-3",children:[m.jsx("label",{className:"form-label",children:"Username"}),m.jsx("input",{type:"text",value:e,onChange:h=>t(h.target.value),className:"form-control",required:!0,autoComplete:"username"})]}),m.jsxs("div",{className:"mb-3",children:[m.jsx("label",{className:"form-label",children:"Password"}),m.jsx("input",{type:"password",value:n,onChange:h=>r(h.target.value),className:"form-control",required:!0,autoComplete:"current-password"})]}),m.jsx("button",{type:"submit",disabled:l,className:"btn btn-primary w-100 py-2",children:l?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"spinner-border spinner-border-sm me-2",role:"status","aria-hidden":!0}),"Signing in…"]}):"Login"})]}),m.jsx("p",{className:"text-center text-muted small mt-3 mb-0",children:"Default: admin / admin"}),m.jsx("p",{className:"text-center small mt-2 mb-0",children:m.jsx(sv,{to:"/install",children:"Remote SSH install (optional)"})})]})})})}function su({className:e=""}){return m.jsx("div",{className:`placeholder-glow ${e}`.trim(),children:m.jsx("span",{className:"placeholder col-12 rounded",style:{height:"1rem"}})})}function lu(){return m.jsx("div",{className:"card",children:m.jsxs("div",{className:"card-body",children:[m.jsx(su,{className:"mb-2"}),m.jsx(su,{className:"mb-2"}),m.jsx(su,{className:"w-75"})]})})}const cE=x.lazy(()=>Me(()=>import("./DashboardPage-CukNUmp0.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.DashboardPage}))),fE=x.lazy(()=>Me(()=>import("./SitePage-CeCv6Zaa.js"),__vite__mapDeps([4,5,1,6,7,8,3])).then(e=>({default:e.SitePage}))),dE=x.lazy(()=>Me(()=>import("./FilesPage-DLgTKzsa.js"),__vite__mapDeps([9,5,1,6,7,8,3])).then(e=>({default:e.FilesPage}))),pE=x.lazy(()=>Me(()=>import("./FtpPage-DG8coQcY.js"),__vite__mapDeps([10,5,1,6,7,8,3])).then(e=>({default:e.FtpPage}))),hE=x.lazy(()=>Me(()=>import("./DatabasePage-sZfqfvMQ.js"),__vite__mapDeps([11,5,1,6,7,8,3])).then(e=>({default:e.DatabasePage}))),mE=x.lazy(()=>Me(()=>import("./TerminalPage-CXXB09nH.js"),__vite__mapDeps([12,3,13])).then(e=>({default:e.TerminalPage}))),gE=x.lazy(()=>Me(()=>import("./MonitorPage-CgJf2F74.js"),__vite__mapDeps([14,1,7,3])).then(e=>({default:e.MonitorPage}))),vE=x.lazy(()=>Me(()=>import("./CrontabPage-BfaMKQc8.js"),__vite__mapDeps([15,5,1,6,7,8,3])).then(e=>({default:e.CrontabPage}))),yE=x.lazy(()=>Me(()=>import("./ConfigPage-eLTvRUp2.js"),__vite__mapDeps([16,1,6,2,3])).then(e=>({default:e.ConfigPage}))),wE=x.lazy(()=>Me(()=>import("./LogsPage-B1uIfI5z.js"),__vite__mapDeps([17,1,6,3])).then(e=>({default:e.LogsPage}))),_E=x.lazy(()=>Me(()=>import("./FirewallPage-Bu-mOiN9.js"),__vite__mapDeps([18,5,1,6,7,8,3])).then(e=>({default:e.FirewallPage}))),xE=x.lazy(()=>Me(()=>import("./DomainsPage-DVTACiDJ.js"),__vite__mapDeps([19,5,1,6,3])).then(e=>({default:e.DomainsPage}))),SE=x.lazy(()=>Me(()=>import("./DockerPage-D1AIK8Rv.js"),__vite__mapDeps([20,5,1,6,7,8,3])).then(e=>({default:e.DockerPage}))),kE=x.lazy(()=>Me(()=>import("./NodePage-BQzvbSat.js"),__vite__mapDeps([21,5,1,6,7,8,3])).then(e=>({default:e.NodePage}))),EE=x.lazy(()=>Me(()=>import("./SoftPage-B7PtFv7I.js"),__vite__mapDeps([22,1,6,3])).then(e=>({default:e.SoftPage}))),CE=x.lazy(()=>Me(()=>import("./ServicesPage-DNZuAdmh.js"),__vite__mapDeps([23,1,6,7,3])).then(e=>({default:e.ServicesPage}))),bE=x.lazy(()=>Me(()=>import("./PluginsPage-C4H8wPuq.js"),__vite__mapDeps([24,5,1,6,3])).then(e=>({default:e.PluginsPage}))),PE=x.lazy(()=>Me(()=>import("./BackupPlansPage-CgzFMegr.js"),__vite__mapDeps([25,5,1,6,7,8,3])).then(e=>({default:e.BackupPlansPage}))),OE=x.lazy(()=>Me(()=>import("./UsersPage-DqvygXkC.js"),__vite__mapDeps([26,5,1,6,7,3])).then(e=>({default:e.UsersPage}))),jE=x.lazy(()=>Me(()=>import("./RemoteInstallPage-C4gVyakl.js"),__vite__mapDeps([27,1,6])).then(e=>({default:e.RemoteInstallPage})));function Re(){return m.jsxs("div",{className:"row g-3",children:[m.jsx("div",{className:"col-md-4",children:m.jsx(lu,{})}),m.jsx("div",{className:"col-md-4",children:m.jsx(lu,{})}),m.jsx("div",{className:"col-md-4",children:m.jsx(lu,{})})]})}function TE({children:e}){return localStorage.getItem("token")?m.jsx(m.Fragment,{children:e}):m.jsx(iv,{to:"/login",replace:!0})}function NE(){return m.jsx(KS,{children:m.jsxs(bS,{children:[m.jsx(we,{path:"/login",element:m.jsx(uE,{})}),m.jsx(we,{path:"/install",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(jE,{})})}),m.jsxs(we,{path:"/",element:m.jsx(TE,{children:m.jsx(sE,{})}),children:[m.jsx(we,{index:!0,element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(cE,{})})}),m.jsx(we,{path:"site",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(fE,{})})}),m.jsx(we,{path:"ftp",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(pE,{})})}),m.jsx(we,{path:"database",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(hE,{})})}),m.jsx(we,{path:"docker",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(SE,{})})}),m.jsx(we,{path:"control",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(gE,{})})}),m.jsx(we,{path:"firewall",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(_E,{})})}),m.jsx(we,{path:"files",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(dE,{})})}),m.jsx(we,{path:"node",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(kE,{})})}),m.jsx(we,{path:"logs",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(wE,{})})}),m.jsx(we,{path:"ssl_domain",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(xE,{})})}),m.jsx(we,{path:"xterm",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(mE,{})})}),m.jsx(we,{path:"crontab",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(vE,{})})}),m.jsx(we,{path:"soft",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(EE,{})})}),m.jsx(we,{path:"config",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(yE,{})})}),m.jsx(we,{path:"services",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(CE,{})})}),m.jsx(we,{path:"plugins",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(bE,{})})}),m.jsx(we,{path:"backup-plans",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(PE,{})})}),m.jsx(we,{path:"users",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(OE,{})})})]}),m.jsx(we,{path:"/logout",element:m.jsx(LE,{})}),m.jsx(we,{path:"*",element:m.jsx(iv,{to:"/",replace:!0})})]})})}function LE(){return localStorage.removeItem("token"),window.location.href="/login",null}au.createRoot(document.getElementById("root")).render(m.jsx(wn.StrictMode,{children:m.jsx(DS,{children:m.jsx(NE,{})})}));export{DC as $,tC as A,eC as B,iC as C,Nt as D,lC as E,qE as F,uC as G,sC as H,jC as I,_C as J,wC as K,SC as L,xC as M,TC as N,AC as O,RC as P,LC as Q,kC as R,OC as S,pC as T,dC as U,HE as V,mC as W,gC as X,vC as Y,yC as Z,hC as _,Q as a,$C as a0,IC as a1,BC as a2,FC as a3,zC as a4,MC as a5,EC as a6,PC as a7,bC as a8,CC as a9,kl as aa,dk as ab,wn as ac,AE as ad,Bk as ae,$s as af,Bv as ag,nr as ah,dv as ai,Lv as aj,Fk as ak,Xn as al,t1 as am,JS as an,Ph as ao,mh as ap,ir as aq,Qk as ar,Jk as as,fk as at,pv as au,Di as av,sv as aw,IE as b,RE as c,YE as d,KE as e,BE as f,NC as g,UE as h,FE as i,m as j,WE as k,zE as l,QE as m,JE as n,XE as o,GE as p,oC as q,x as r,VE as s,fC as t,ME as u,nC as v,rC as w,cC as x,ZE as y,aC as z}; +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",l=0;l{const[d,...h]=c;let g=n==null?void 0:n(d,...h);return o(d),g},[n])]}function qS(e){const t=x.useRef(null);return x.useEffect(()=>{t.current=e}),t.current}function ZS(){const[,e]=x.useReducer(t=>t+1,0);return e}function e1(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e},[e]),t}function Xn(e){const t=e1(e);return x.useCallback(function(...n){return t.current&&t.current(...n)},[t])}function t1(e,t,n,r=!1){const i=Xn(n);x.useEffect(()=>{const o=typeof e=="function"?e():e;return o.addEventListener(t,i,r),()=>o.removeEventListener(t,i,r)},[e])}const Vl=x.createContext(null);function n1(){return x.useState(null)}var vh=Object.prototype.hasOwnProperty;function yh(e,t,n){for(n of e.keys())if(ho(n,t))return n}function ho(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&ho(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i=="object"&&(i=yh(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i=="object"&&(i=yh(t,i),!i)||!ho(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(vh.call(e,n)&&++r&&!vh.call(t,n)||!(n in t)||!ho(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function r1(){const e=x.useRef(!0),t=x.useRef(()=>e.current);return x.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function i1(e){const t=r1();return[e[0],x.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var dt="top",Mt="bottom",zt="right",pt="left",cf="auto",Vo=[dt,Mt,zt,pt],bi="start",$o="end",o1="clippingParents",mv="viewport",Zi="popper",s1="reference",wh=Vo.reduce(function(e,t){return e.concat([t+"-"+bi,t+"-"+$o])},[]),gv=[].concat(Vo,[cf]).reduce(function(e,t){return e.concat([t,t+"-"+bi,t+"-"+$o])},[]),l1="beforeRead",a1="read",u1="afterRead",c1="beforeMain",f1="main",d1="afterMain",p1="beforeWrite",h1="write",m1="afterWrite",g1=[l1,a1,u1,c1,f1,d1,p1,h1,m1];function ln(e){return e.split("-")[0]}function St(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Nr(e){var t=St(e).Element;return e instanceof t||e instanceof Element}function an(e){var t=St(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ff(e){if(typeof ShadowRoot>"u")return!1;var t=St(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Cr=Math.max,kl=Math.min,Pi=Math.round;function ac(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function vv(){return!/^((?!chrome|android).)*safari/i.test(ac())}function Oi(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&an(e)&&(i=e.offsetWidth>0&&Pi(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Pi(r.height)/e.offsetHeight||1);var l=Nr(e)?St(e):window,u=l.visualViewport,c=!vv()&&n,d=(r.left+(c&&u?u.offsetLeft:0))/i,h=(r.top+(c&&u?u.offsetTop:0))/o,g=r.width/i,_=r.height/o;return{width:g,height:_,top:h,right:d+g,bottom:h+_,left:d,x:d,y:h}}function df(e){var t=Oi(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function yv(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ff(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function qn(e){return e?(e.nodeName||"").toLowerCase():null}function En(e){return St(e).getComputedStyle(e)}function v1(e){return["table","td","th"].indexOf(qn(e))>=0}function rr(e){return((Nr(e)?e.ownerDocument:e.document)||window.document).documentElement}function Hl(e){return qn(e)==="html"?e:e.assignedSlot||e.parentNode||(ff(e)?e.host:null)||rr(e)}function _h(e){return!an(e)||En(e).position==="fixed"?null:e.offsetParent}function y1(e){var t=/firefox/i.test(ac()),n=/Trident/i.test(ac());if(n&&an(e)){var r=En(e);if(r.position==="fixed")return null}var i=Hl(e);for(ff(i)&&(i=i.host);an(i)&&["html","body"].indexOf(qn(i))<0;){var o=En(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Ho(e){for(var t=St(e),n=_h(e);n&&v1(n)&&En(n).position==="static";)n=_h(n);return n&&(qn(n)==="html"||qn(n)==="body"&&En(n).position==="static")?t:n||y1(e)||t}function pf(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function mo(e,t,n){return Cr(e,kl(t,n))}function w1(e,t,n){var r=mo(e,t,n);return r>n?n:r}function wv(){return{top:0,right:0,bottom:0,left:0}}function _v(e){return Object.assign({},wv(),e)}function xv(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var _1=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,_v(typeof t!="number"?t:xv(t,Vo))};function x1(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,l=n.modifiersData.popperOffsets,u=ln(n.placement),c=pf(u),d=[pt,zt].indexOf(u)>=0,h=d?"height":"width";if(!(!o||!l)){var g=_1(i.padding,n),_=df(o),S=c==="y"?dt:pt,C=c==="y"?Mt:zt,O=n.rects.reference[h]+n.rects.reference[c]-l[c]-n.rects.popper[h],P=l[c]-n.rects.reference[c],y=Ho(o),v=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,w=O/2-P/2,b=g[S],N=v-_[h]-g[C],A=v/2-_[h]/2+w,D=mo(b,A,N),R=c;n.modifiersData[r]=(t={},t[R]=D,t.centerOffset=D-A,t)}}function S1(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||yv(t.elements.popper,i)&&(t.elements.arrow=i))}const k1={name:"arrow",enabled:!0,phase:"main",fn:x1,effect:S1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ji(e){return e.split("-")[1]}var E1={top:"auto",right:"auto",bottom:"auto",left:"auto"};function C1(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Pi(n*i)/i||0,y:Pi(r*i)/i||0}}function xh(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,l=e.offsets,u=e.position,c=e.gpuAcceleration,d=e.adaptive,h=e.roundOffsets,g=e.isFixed,_=l.x,S=_===void 0?0:_,C=l.y,O=C===void 0?0:C,P=typeof h=="function"?h({x:S,y:O}):{x:S,y:O};S=P.x,O=P.y;var y=l.hasOwnProperty("x"),v=l.hasOwnProperty("y"),w=pt,b=dt,N=window;if(d){var A=Ho(n),D="clientHeight",R="clientWidth";if(A===St(n)&&(A=rr(n),En(A).position!=="static"&&u==="absolute"&&(D="scrollHeight",R="scrollWidth")),A=A,i===dt||(i===pt||i===zt)&&o===$o){b=Mt;var K=g&&A===N&&N.visualViewport?N.visualViewport.height:A[D];O-=K-r.height,O*=c?1:-1}if(i===pt||(i===dt||i===Mt)&&o===$o){w=zt;var F=g&&A===N&&N.visualViewport?N.visualViewport.width:A[R];S-=F-r.width,S*=c?1:-1}}var Y=Object.assign({position:u},d&&E1),ee=h===!0?C1({x:S,y:O},St(n)):{x:S,y:O};if(S=ee.x,O=ee.y,c){var ne;return Object.assign({},Y,(ne={},ne[b]=v?"0":"",ne[w]=y?"0":"",ne.transform=(N.devicePixelRatio||1)<=1?"translate("+S+"px, "+O+"px)":"translate3d("+S+"px, "+O+"px, 0)",ne))}return Object.assign({},Y,(t={},t[b]=v?O+"px":"",t[w]=y?S+"px":"",t.transform="",t))}function b1(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,l=o===void 0?!0:o,u=n.roundOffsets,c=u===void 0?!0:u,d={placement:ln(t.placement),variation:ji(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,xh(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,xh(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const P1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:b1,data:{}};var Rs={passive:!0};function O1(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,l=r.resize,u=l===void 0?!0:l,c=St(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(h){h.addEventListener("scroll",n.update,Rs)}),u&&c.addEventListener("resize",n.update,Rs),function(){o&&d.forEach(function(h){h.removeEventListener("scroll",n.update,Rs)}),u&&c.removeEventListener("resize",n.update,Rs)}}const j1={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:O1,data:{}};var T1={left:"right",right:"left",bottom:"top",top:"bottom"};function Js(e){return e.replace(/left|right|bottom|top/g,function(t){return T1[t]})}var N1={start:"end",end:"start"};function Sh(e){return e.replace(/start|end/g,function(t){return N1[t]})}function hf(e){var t=St(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function mf(e){return Oi(rr(e)).left+hf(e).scrollLeft}function L1(e,t){var n=St(e),r=rr(e),i=n.visualViewport,o=r.clientWidth,l=r.clientHeight,u=0,c=0;if(i){o=i.width,l=i.height;var d=vv();(d||!d&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}return{width:o,height:l,x:u+mf(e),y:c}}function A1(e){var t,n=rr(e),r=hf(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Cr(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),l=Cr(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-r.scrollLeft+mf(e),c=-r.scrollTop;return En(i||n).direction==="rtl"&&(u+=Cr(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:l,x:u,y:c}}function gf(e){var t=En(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Sv(e){return["html","body","#document"].indexOf(qn(e))>=0?e.ownerDocument.body:an(e)&&gf(e)?e:Sv(Hl(e))}function go(e,t){var n;t===void 0&&(t=[]);var r=Sv(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=St(r),l=i?[o].concat(o.visualViewport||[],gf(r)?r:[]):r,u=t.concat(l);return i?u:u.concat(go(Hl(l)))}function uc(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function D1(e,t){var n=Oi(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function kh(e,t,n){return t===mv?uc(L1(e,n)):Nr(t)?D1(t,n):uc(A1(rr(e)))}function R1(e){var t=go(Hl(e)),n=["absolute","fixed"].indexOf(En(e).position)>=0,r=n&&an(e)?Ho(e):e;return Nr(r)?t.filter(function(i){return Nr(i)&&yv(i,r)&&qn(i)!=="body"}):[]}function $1(e,t,n,r){var i=t==="clippingParents"?R1(e):[].concat(t),o=[].concat(i,[n]),l=o[0],u=o.reduce(function(c,d){var h=kh(e,d,r);return c.top=Cr(h.top,c.top),c.right=kl(h.right,c.right),c.bottom=kl(h.bottom,c.bottom),c.left=Cr(h.left,c.left),c},kh(e,l,r));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function kv(e){var t=e.reference,n=e.element,r=e.placement,i=r?ln(r):null,o=r?ji(r):null,l=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,c;switch(i){case dt:c={x:l,y:t.y-n.height};break;case Mt:c={x:l,y:t.y+t.height};break;case zt:c={x:t.x+t.width,y:u};break;case pt:c={x:t.x-n.width,y:u};break;default:c={x:t.x,y:t.y}}var d=i?pf(i):null;if(d!=null){var h=d==="y"?"height":"width";switch(o){case bi:c[d]=c[d]-(t[h]/2-n[h]/2);break;case $o:c[d]=c[d]+(t[h]/2-n[h]/2);break}}return c}function Io(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,l=o===void 0?e.strategy:o,u=n.boundary,c=u===void 0?o1:u,d=n.rootBoundary,h=d===void 0?mv:d,g=n.elementContext,_=g===void 0?Zi:g,S=n.altBoundary,C=S===void 0?!1:S,O=n.padding,P=O===void 0?0:O,y=_v(typeof P!="number"?P:xv(P,Vo)),v=_===Zi?s1:Zi,w=e.rects.popper,b=e.elements[C?v:_],N=$1(Nr(b)?b:b.contextElement||rr(e.elements.popper),c,h,l),A=Oi(e.elements.reference),D=kv({reference:A,element:w,placement:i}),R=uc(Object.assign({},w,D)),K=_===Zi?R:A,F={top:N.top-K.top+y.top,bottom:K.bottom-N.bottom+y.bottom,left:N.left-K.left+y.left,right:K.right-N.right+y.right},Y=e.modifiersData.offset;if(_===Zi&&Y){var ee=Y[i];Object.keys(F).forEach(function(ne){var xe=[zt,Mt].indexOf(ne)>=0?1:-1,De=[dt,Mt].indexOf(ne)>=0?"y":"x";F[ne]+=ee[De]*xe})}return F}function I1(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,l=n.padding,u=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?gv:c,h=ji(r),g=h?u?wh:wh.filter(function(C){return ji(C)===h}):Vo,_=g.filter(function(C){return d.indexOf(C)>=0});_.length===0&&(_=g);var S=_.reduce(function(C,O){return C[O]=Io(e,{placement:O,boundary:i,rootBoundary:o,padding:l})[ln(O)],C},{});return Object.keys(S).sort(function(C,O){return S[C]-S[O]})}function M1(e){if(ln(e)===cf)return[];var t=Js(e);return[Sh(e),t,Sh(t)]}function z1(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,l=n.altAxis,u=l===void 0?!0:l,c=n.fallbackPlacements,d=n.padding,h=n.boundary,g=n.rootBoundary,_=n.altBoundary,S=n.flipVariations,C=S===void 0?!0:S,O=n.allowedAutoPlacements,P=t.options.placement,y=ln(P),v=y===P,w=c||(v||!C?[Js(P)]:M1(P)),b=[P].concat(w).reduce(function(Ue,Oe){return Ue.concat(ln(Oe)===cf?I1(t,{placement:Oe,boundary:h,rootBoundary:g,padding:d,flipVariations:C,allowedAutoPlacements:O}):Oe)},[]),N=t.rects.reference,A=t.rects.popper,D=new Map,R=!0,K=b[0],F=0;F=0,De=xe?"width":"height",ke=Io(t,{placement:Y,boundary:h,rootBoundary:g,altBoundary:_,padding:d}),Re=xe?ne?zt:pt:ne?Mt:dt;N[De]>A[De]&&(Re=Js(Re));var M=Js(Re),X=[];if(o&&X.push(ke[ee]<=0),u&&X.push(ke[Re]<=0,ke[M]<=0),X.every(function(Ue){return Ue})){K=Y,R=!1;break}D.set(Y,X)}if(R)for(var H=C?3:1,T=function(Oe){var ze=b.find(function(Ne){var Ft=D.get(Ne);if(Ft)return Ft.slice(0,Oe).every(function(Q){return Q})});if(ze)return K=ze,"break"},de=H;de>0;de--){var Ct=T(de);if(Ct==="break")break}t.placement!==K&&(t.modifiersData[r]._skip=!0,t.placement=K,t.reset=!0)}}const F1={name:"flip",enabled:!0,phase:"main",fn:z1,requiresIfExists:["offset"],data:{_skip:!1}};function Eh(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ch(e){return[dt,zt,Mt,pt].some(function(t){return e[t]>=0})}function B1(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,l=Io(t,{elementContext:"reference"}),u=Io(t,{altBoundary:!0}),c=Eh(l,r),d=Eh(u,i,o),h=Ch(c),g=Ch(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const U1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:B1};function W1(e,t,n){var r=ln(e),i=[pt,dt].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,l=o[0],u=o[1];return l=l||0,u=(u||0)*i,[pt,zt].indexOf(r)>=0?{x:u,y:l}:{x:l,y:u}}function V1(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,l=gv.reduce(function(h,g){return h[g]=W1(g,t.rects,o),h},{}),u=l[t.placement],c=u.x,d=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=l}const H1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:V1};function K1(e){var t=e.state,n=e.name;t.modifiersData[n]=kv({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const Q1={name:"popperOffsets",enabled:!0,phase:"read",fn:K1,data:{}};function Y1(e){return e==="x"?"y":"x"}function X1(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,l=n.altAxis,u=l===void 0?!1:l,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,g=n.padding,_=n.tether,S=_===void 0?!0:_,C=n.tetherOffset,O=C===void 0?0:C,P=Io(t,{boundary:c,rootBoundary:d,padding:g,altBoundary:h}),y=ln(t.placement),v=ji(t.placement),w=!v,b=pf(y),N=Y1(b),A=t.modifiersData.popperOffsets,D=t.rects.reference,R=t.rects.popper,K=typeof O=="function"?O(Object.assign({},t.rects,{placement:t.placement})):O,F=typeof K=="number"?{mainAxis:K,altAxis:K}:Object.assign({mainAxis:0,altAxis:0},K),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ee={x:0,y:0};if(A){if(o){var ne,xe=b==="y"?dt:pt,De=b==="y"?Mt:zt,ke=b==="y"?"height":"width",Re=A[b],M=Re+P[xe],X=Re-P[De],H=S?-R[ke]/2:0,T=v===bi?D[ke]:R[ke],de=v===bi?-R[ke]:-D[ke],Ct=t.elements.arrow,Ue=S&&Ct?df(Ct):{width:0,height:0},Oe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:wv(),ze=Oe[xe],Ne=Oe[De],Ft=mo(0,D[ke],Ue[ke]),Q=w?D[ke]/2-H-Ft-ze-F.mainAxis:T-Ft-ze-F.mainAxis,Rr=w?-D[ke]/2+H+Ft+Ne+F.mainAxis:de+Ft+Ne+F.mainAxis,$r=t.elements.arrow&&Ho(t.elements.arrow),Kl=$r?b==="y"?$r.clientTop||0:$r.clientLeft||0:0,Qo=(ne=Y==null?void 0:Y[b])!=null?ne:0,or=Re+Q-Qo-Kl,Yo=Re+Rr-Qo,On=mo(S?kl(M,or):M,Re,S?Cr(X,Yo):X);A[b]=On,ee[b]=On-Re}if(u){var un,Ql=b==="x"?dt:pt,Yl=b==="x"?Mt:zt,cn=A[N],Ir=N==="y"?"height":"width",Xo=cn+P[Ql],Jo=cn-P[Yl],Ri=[dt,pt].indexOf(y)!==-1,sr=(un=Y==null?void 0:Y[N])!=null?un:0,Bt=Ri?Xo:cn-D[Ir]-R[Ir]-sr+F.altAxis,$i=Ri?cn+D[Ir]+R[Ir]-sr-F.altAxis:Jo,Go=S&&Ri?w1(Bt,cn,$i):mo(S?Bt:Xo,cn,S?$i:Jo);A[N]=Go,ee[N]=Go-cn}t.modifiersData[r]=ee}}const J1={name:"preventOverflow",enabled:!0,phase:"main",fn:X1,requiresIfExists:["offset"]};function G1(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function q1(e){return e===St(e)||!an(e)?hf(e):G1(e)}function Z1(e){var t=e.getBoundingClientRect(),n=Pi(t.width)/e.offsetWidth||1,r=Pi(t.height)/e.offsetHeight||1;return n!==1||r!==1}function ek(e,t,n){n===void 0&&(n=!1);var r=an(t),i=an(t)&&Z1(t),o=rr(t),l=Oi(e,i,n),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((qn(t)!=="body"||gf(o))&&(u=q1(t)),an(t)?(c=Oi(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=mf(o))),{x:l.left+u.scrollLeft-c.x,y:l.top+u.scrollTop-c.y,width:l.width,height:l.height}}function tk(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var l=[].concat(o.requires||[],o.requiresIfExists||[]);l.forEach(function(u){if(!n.has(u)){var c=t.get(u);c&&i(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function nk(e){var t=tk(e);return g1.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function rk(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function ik(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var bh={placement:"bottom",modifiers:[],strategy:"absolute"};function Ph(){for(var e=arguments.length,t=new Array(e),n=0;n=0)continue;n[r]=e[r]}return n}const uk={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},ck={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const r=(t.getAttribute("aria-describedby")||"").split(",").filter(i=>i.trim()!==n.id);r.length?t.setAttribute("aria-describedby",r.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,i=(t=n.getAttribute("role"))==null?void 0:t.toLowerCase();if(n.id&&i==="tooltip"&&"setAttribute"in r){const o=r.getAttribute("aria-describedby");if(o&&o.split(",").indexOf(n.id)!==-1)return;r.setAttribute("aria-describedby",o?`${o},${n.id}`:n.id)}}},fk=[];function dk(e,t,n={}){let{enabled:r=!0,placement:i="bottom",strategy:o="absolute",modifiers:l=fk}=n,u=ak(n,lk);const c=x.useRef(l),d=x.useRef(),h=x.useCallback(()=>{var P;(P=d.current)==null||P.update()},[]),g=x.useCallback(()=>{var P;(P=d.current)==null||P.forceUpdate()},[]),[_,S]=i1(x.useState({placement:i,update:h,forceUpdate:g,attributes:{},styles:{popper:{},arrow:{}}})),C=x.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:P})=>{const y={},v={};Object.keys(P.elements).forEach(w=>{y[w]=P.styles[w],v[w]=P.attributes[w]}),S({state:P,styles:y,attributes:v,update:h,forceUpdate:g,placement:P.placement})}}),[h,g,S]),O=x.useMemo(()=>(ho(c.current,l)||(c.current=l),c.current),[l]);return x.useEffect(()=>{!d.current||!r||d.current.setOptions({placement:i,strategy:o,modifiers:[...O,C,uk]})},[o,i,C,r,O]),x.useEffect(()=>{if(!(!r||e==null||t==null))return d.current=sk(e,t,Object.assign({},u,{placement:i,strategy:o,modifiers:[...O,ck,C]})),()=>{d.current!=null&&(d.current.destroy(),d.current=void 0,S(P=>Object.assign({},P,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),_}function Oh(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}function pk(e,t,n,r){var i=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)}function $s(e,t,n,r){return hv(e,t,n,r),function(){pk(e,t,n,r)}}function hk(e){return e&&e.ownerDocument||document}var mk=function(){},gk=mk;const vk=El(gk),jh=()=>{};function yk(e){return e.button===0}function wk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const ru=e=>e&&("current"in e?e.current:e),Th={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function _k(e,t=jh,{disabled:n,clickTrigger:r="click"}={}){const i=x.useRef(!1),o=x.useRef(!1),l=x.useCallback(d=>{const h=ru(e);vk(!!h,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),i.current=!h||wk(d)||!yk(d)||!!Oh(h,d.target)||o.current,o.current=!1},[e]),u=Xn(d=>{const h=ru(e);h&&Oh(h,d.target)?o.current=!0:o.current=!1}),c=Xn(d=>{i.current||t(d)});x.useEffect(()=>{var d,h;if(n||e==null)return;const g=hk(ru(e)),_=g.defaultView||window;let S=(d=_.event)!=null?d:(h=_.parent)==null?void 0:h.event,C=null;Th[r]&&(C=$s(g,Th[r],u,!0));const O=$s(g,r,l,!0),P=$s(g,r,v=>{if(v===S){S=void 0;return}c(v)});let y=[];return"ontouchstart"in g.documentElement&&(y=[].slice.call(g.body.children).map(v=>$s(v,"mousemove",jh))),()=>{C==null||C(),O(),P(),y.forEach(v=>v())}},[e,n,r,l,u,c])}function xk(e){const t={};return Array.isArray(e)?(e==null||e.forEach(n=>{t[n.name]=n}),t):e||t}function Sk(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function kk({enabled:e,enableEvents:t,placement:n,flip:r,offset:i,fixed:o,containerPadding:l,arrowElement:u,popperConfig:c={}}){var d,h,g,_,S;const C=xk(c.modifiers);return Object.assign({},c,{placement:n,enabled:e,strategy:o?"fixed":c.strategy,modifiers:Sk(Object.assign({},C,{eventListeners:{enabled:t,options:(d=C.eventListeners)==null?void 0:d.options},preventOverflow:Object.assign({},C.preventOverflow,{options:l?Object.assign({padding:l},(h=C.preventOverflow)==null?void 0:h.options):(g=C.preventOverflow)==null?void 0:g.options}),offset:{options:Object.assign({offset:i},(_=C.offset)==null?void 0:_.options)},arrow:Object.assign({},C.arrow,{enabled:!!u,options:Object.assign({},(S=C.arrow)==null?void 0:S.options,{element:u})}),flip:Object.assign({enabled:!!r},C.flip)}))})}const Ek=["children","usePopper"];function Ck(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const bk=()=>{};function Ev(e={}){const t=x.useContext(Vl),[n,r]=n1(),i=x.useRef(!1),{flip:o,offset:l,rootCloseEvent:u,fixed:c=!1,placement:d,popperConfig:h={},enableEventListeners:g=!0,usePopper:_=!!t}=e,S=(t==null?void 0:t.show)==null?!!e.show:t.show;S&&!i.current&&(i.current=!0);const C=A=>{t==null||t.toggle(!1,A)},{placement:O,setMenu:P,menuElement:y,toggleElement:v}=t||{},w=dk(v,y,kk({placement:d||O||"bottom-start",enabled:_,enableEvents:g??S,offset:l,flip:o,fixed:c,arrowElement:n,popperConfig:h})),b=Object.assign({ref:P||bk,"aria-labelledby":v==null?void 0:v.id},w.attributes.popper,{style:w.styles.popper}),N={show:S,placement:O,hasShown:i.current,toggle:t==null?void 0:t.toggle,popper:_?w:null,arrowProps:_?Object.assign({ref:r},w.attributes.arrow,{style:w.styles.arrow}):{}};return _k(y,C,{clickTrigger:u,disabled:!S}),[b,N]}function Cv(e){let{children:t,usePopper:n=!0}=e,r=Ck(e,Ek);const[i,o]=Ev(Object.assign({},r,{usePopper:n}));return m.jsx(m.Fragment,{children:t(i,o)})}Cv.displayName="DropdownMenu";const bv={prefix:String(Math.round(Math.random()*1e10)),current:0},Pv=wn.createContext(bv),Pk=wn.createContext(!1);let iu=new WeakMap;function Ok(e=!1){let t=x.useContext(Pv),n=x.useRef(null);if(n.current===null&&!e){var r,i;let o=(i=wn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let l=iu.get(o);l==null?iu.set(o,{id:t.current,state:o.memoizedState}):o.memoizedState!==l.state&&(t.current=l.id,iu.delete(o))}n.current=++t.current}return n.current}function jk(e){let t=x.useContext(Pv),n=Ok(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function Tk(e){let t=wn.useId(),[n]=x.useState(Rk()),r=n?"react-aria":`react-aria${bv.prefix}`;return e||`${r}-${t}`}const Nk=typeof wn.useId=="function"?Tk:jk;function Lk(){return!1}function Ak(){return!0}function Dk(e){return()=>{}}function Rk(){return typeof wn.useSyncExternalStore=="function"?wn.useSyncExternalStore(Dk,Lk,Ak):x.useContext(Pk)}const Ov=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},Nh=()=>{};function jv(){const e=Nk(),{show:t=!1,toggle:n=Nh,setToggle:r,menuElement:i}=x.useContext(Vl)||{},o=x.useCallback(u=>{n(!t,u)},[t,n]),l={id:e,ref:r||Nh,onClick:o,"aria-expanded":!!t};return i&&Ov(i)&&(l["aria-haspopup"]=!0),[l,{show:t,toggle:n}]}function Tv({children:e}){const[t,n]=jv();return m.jsx(m.Fragment,{children:e(t,n)})}Tv.displayName="DropdownToggle";const cc=x.createContext(null),Lh=(e,t=null)=>e!=null?String(e):t||null,Nv=x.createContext(null);Nv.displayName="NavContext";const $k=["as","disabled"];function Ik(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Mk(e){return!e||e.trim()==="#"}function vf({tagName:e,disabled:t,href:n,target:r,rel:i,role:o,onClick:l,tabIndex:u=0,type:c}){e||(n!=null||r!=null||i!=null?e="a":e="button");const d={tagName:e};if(e==="button")return[{type:c||"button",disabled:t},d];const h=_=>{if((t||e==="a"&&Mk(n))&&_.preventDefault(),t){_.stopPropagation();return}l==null||l(_)},g=_=>{_.key===" "&&(_.preventDefault(),h(_))};return e==="a"&&(n||(n="#"),t&&(n=void 0)),[{role:o??"button",disabled:void 0,tabIndex:t?void 0:u,href:n,target:e==="a"?r:void 0,"aria-disabled":t||void 0,rel:e==="a"?i:void 0,onClick:h,onKeyDown:g},d]}const Lv=x.forwardRef((e,t)=>{let{as:n,disabled:r}=e,i=Ik(e,$k);const[o,{tagName:l}]=vf(Object.assign({tagName:n,disabled:r},i));return m.jsx(l,Object.assign({},i,o,{ref:t}))});Lv.displayName="Button";const zk="data-rr-ui-";function Av(e){return`${zk}${e}`}const Fk=["eventKey","disabled","onClick","active","as"];function Bk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Dv({key:e,href:t,active:n,disabled:r,onClick:i}){const o=x.useContext(cc),l=x.useContext(Nv),{activeKey:u}=l||{},c=Lh(e,t),d=n==null&&e!=null?Lh(u)===c:n;return[{onClick:Xn(g=>{r||(i==null||i(g),o&&!g.isPropagationStopped()&&o(c,g))}),"aria-disabled":r||void 0,"aria-selected":d,[Av("dropdown-item")]:""},{isActive:d}]}const Rv=x.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:i,active:o,as:l=Lv}=e,u=Bk(e,Fk);const[c]=Dv({key:n,href:u.href,disabled:r,onClick:i,active:o});return m.jsx(l,Object.assign({},u,{ref:t},c))});Rv.displayName="DropdownItem";const $v=x.createContext(pv?window:void 0);$v.Provider;function Uk(){return x.useContext($v)}function Ah(){const e=ZS(),t=x.useRef(null),n=x.useCallback(r=>{t.current=r,e()},[e]);return[t,n]}function Ko({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:i=`* [${Av("dropdown-item")}]`,focusFirstItemOnShow:o,placement:l="bottom-start",children:u}){const c=Uk(),[d,h]=GS(t,e,r),[g,_]=Ah(),S=g.current,[C,O]=Ah(),P=C.current,y=qS(d),v=x.useRef(null),w=x.useRef(!1),b=x.useContext(cc),N=x.useCallback((Y,ee,ne=ee==null?void 0:ee.type)=>{h(Y,{originalEvent:ee,source:ne})},[h]),A=Xn((Y,ee)=>{n==null||n(Y,ee),N(!1,ee,"select"),ee.isPropagationStopped()||b==null||b(Y,ee)}),D=x.useMemo(()=>({toggle:N,placement:l,show:d,menuElement:S,toggleElement:P,setMenu:_,setToggle:O}),[N,l,d,S,P,_,O]);S&&y&&!d&&(w.current=S.contains(S.ownerDocument.activeElement));const R=Xn(()=>{P&&P.focus&&P.focus()}),K=Xn(()=>{const Y=v.current;let ee=o;if(ee==null&&(ee=g.current&&Ov(g.current)?"keyboard":!1),ee===!1||ee==="keyboard"&&!/^key.+$/.test(Y))return;const ne=gh(g.current,i)[0];ne&&ne.focus&&ne.focus()});x.useEffect(()=>{d?K():w.current&&(w.current=!1,R())},[d,w,R,K]),x.useEffect(()=>{v.current=null});const F=(Y,ee)=>{if(!g.current)return null;const ne=gh(g.current,i);let xe=ne.indexOf(Y)+ee;return xe=Math.max(0,Math.min(xe,ne.length)),ne[xe]};return t1(x.useCallback(()=>c.document,[c]),"keydown",Y=>{var ee,ne;const{key:xe}=Y,De=Y.target,ke=(ee=g.current)==null?void 0:ee.contains(De),Re=(ne=C.current)==null?void 0:ne.contains(De);if(/input|textarea/i.test(De.tagName)&&(xe===" "||xe!=="Escape"&&ke||xe==="Escape"&&De.type==="search")||!ke&&!Re||xe==="Tab"&&(!g.current||!d))return;v.current=Y.type;const X={originalEvent:Y,source:Y.type};switch(xe){case"ArrowUp":{const H=F(De,-1);H&&H.focus&&H.focus(),Y.preventDefault();return}case"ArrowDown":if(Y.preventDefault(),!d)h(!0,X);else{const H=F(De,1);H&&H.focus&&H.focus()}return;case"Tab":hv(De.ownerDocument,"keyup",H=>{var T;(H.key==="Tab"&&!H.target||!((T=g.current)!=null&&T.contains(H.target)))&&h(!1,X)},{once:!0});break;case"Escape":xe==="Escape"&&(Y.preventDefault(),Y.stopPropagation()),h(!1,X);break}}),m.jsx(cc.Provider,{value:A,children:m.jsx(Vl.Provider,{value:D,children:u})})}Ko.displayName="Dropdown";Ko.Menu=Cv;Ko.Toggle=Tv;Ko.Item=Rv;function fc(){return fc=Object.assign?Object.assign.bind():function(e){for(var t=1;t1?h-1:0),_=1;_{t.current=e},[e]),t}function Xk(e){const t=Yk(e);return x.useCallback(function(...n){return t.current&&t.current(...n)},[t])}const yf=x.createContext({});yf.displayName="DropdownContext";const Jk=["xxl","xl","lg","md","sm","xs"],Gk="xs",wf=x.createContext({prefixes:{},breakpoints:Jk,minBreakpoint:Gk}),{Consumer:IE,Provider:ME}=wf;function ir(e,t){const{prefixes:n}=x.useContext(wf);return e||n[t]||t}function qk(){const{dir:e}=x.useContext(wf);return e==="rtl"}const Iv=x.forwardRef(({className:e,bsPrefix:t,as:n="hr",role:r="separator",...i},o)=>(t=ir(t,"dropdown-divider"),m.jsx(n,{ref:o,className:nr(e,t),role:r,...i})));Iv.displayName="DropdownDivider";const Mv=x.forwardRef(({className:e,bsPrefix:t,as:n="div",role:r="heading",...i},o)=>(t=ir(t,"dropdown-header"),m.jsx(n,{ref:o,className:nr(e,t),role:r,...i})));Mv.displayName="DropdownHeader";const Zk=["onKeyDown"];function eE(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function tE(e){return!e||e.trim()==="#"}const zv=x.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=eE(e,Zk);const[i]=vf(Object.assign({tagName:"a"},r)),o=Xn(l=>{i.onKeyDown(l),n==null||n(l)});return tE(r.href)||r.role==="button"?m.jsx("a",Object.assign({ref:t},r,i,{onKeyDown:o})):m.jsx("a",Object.assign({ref:t},r,{onKeyDown:n}))});zv.displayName="Anchor";const Fv=x.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:i,active:o,as:l=zv,...u},c)=>{const d=ir(e,"dropdown-item"),[h,g]=Dv({key:n,href:u.href,disabled:r,onClick:i,active:o});return m.jsx(l,{...u,...h,ref:c,className:nr(t,d,g.isActive&&"active",r&&"disabled")})});Fv.displayName="DropdownItem";const Bv=x.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},i)=>(t=ir(t,"dropdown-item-text"),m.jsx(n,{ref:i,className:nr(e,t),...r})));Bv.displayName="DropdownItemText";const nE=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",rE=typeof document<"u",iE=rE||nE?x.useLayoutEffect:x.useEffect,Rh=e=>!e||typeof e=="function"?e:t=>{e.current=t};function oE(e,t){const n=Rh(e),r=Rh(t);return i=>{n&&n(i),r&&r(i)}}function Uv(e,t){return x.useMemo(()=>oE(e,t),[e,t])}const _f=x.createContext(null);_f.displayName="InputGroupContext";const Wv=x.createContext(null);Wv.displayName="NavbarContext";function Vv(e,t){return e}function Hv(e,t,n){const r=n?"top-end":"top-start",i=n?"top-start":"top-end",o=n?"bottom-end":"bottom-start",l=n?"bottom-start":"bottom-end",u=n?"right-start":"left-start",c=n?"right-end":"left-end",d=n?"left-start":"right-start",h=n?"left-end":"right-end";let g=e?l:o;return t==="up"?g=e?i:r:t==="end"?g=e?h:d:t==="start"?g=e?c:u:t==="down-centered"?g="bottom":t==="up-centered"&&(g="top"),g}const Kv=x.forwardRef(({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:i=!0,show:o,renderOnMount:l,as:u="div",popperConfig:c,variant:d,...h},g)=>{let _=!1;const S=x.useContext(Wv),C=ir(e,"dropdown-menu"),{align:O,drop:P,isRTL:y}=x.useContext(yf);n=n||O;const v=x.useContext(_f),w=[];if(n)if(typeof n=="object"){const Y=Object.keys(n);if(Y.length){const ee=Y[0],ne=n[ee];_=ne==="start",w.push(`${C}-${ee}-${ne}`)}}else n==="end"&&(_=!0);const b=Hv(_,P,y),[N,{hasShown:A,popper:D,show:R,toggle:K}]=Ev({flip:i,rootCloseEvent:r,show:o,usePopper:!S&&w.length===0,offset:[0,2],popperConfig:c,placement:b});if(N.ref=Uv(Vv(g),N.ref),iE(()=>{R&&(D==null||D.update())},[R]),!A&&!l&&!v)return null;typeof u!="string"&&(N.show=R,N.close=()=>K==null?void 0:K(!1),N.align=n);let F=h.style;return D!=null&&D.placement&&(F={...h.style,...N.style},h["x-placement"]=D.placement),m.jsx(u,{...h,...N,style:F,...(w.length||S)&&{"data-bs-popper":"static"},className:nr(t,C,R&&"show",_&&`${C}-end`,d&&`${C}-${d}`,...w)})});Kv.displayName="DropdownMenu";const Qv=x.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:i=!1,disabled:o=!1,className:l,...u},c)=>{const d=ir(t,"btn"),[h,{tagName:g}]=vf({tagName:e,disabled:o,...u}),_=g;return m.jsx(_,{...h,...u,ref:c,disabled:o,className:nr(l,d,i&&"active",n&&`${d}-${n}`,r&&`${d}-${r}`,u.href&&o&&"disabled")})});Qv.displayName="Button";const Yv=x.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:i=Qv,...o},l)=>{const u=ir(e,"dropdown-toggle"),c=x.useContext(Vl);r!==void 0&&(o.bsPrefix=r);const[d]=jv();return d.ref=Uv(d.ref,Vv(l)),m.jsx(i,{className:nr(n,u,t&&`${u}-split`,(c==null?void 0:c.show)&&"show"),...d,...o})});Yv.displayName="DropdownToggle";const Xv=x.forwardRef((e,t)=>{const{bsPrefix:n,drop:r="down",show:i,className:o,align:l="start",onSelect:u,onToggle:c,focusFirstItemOnShow:d,as:h="div",navbar:g,autoClose:_=!0,...S}=Qk(e,{show:"onToggle"}),C=x.useContext(_f),O=ir(n,"dropdown"),P=qk(),y=D=>_===!1?D==="click":_==="inside"?D!=="rootClose":_==="outside"?D!=="select":!0,v=Xk((D,R)=>{var K;!((K=R.originalEvent)==null||(K=K.target)==null)&&K.classList.contains("dropdown-toggle")&&R.source==="mousedown"||(R.originalEvent.currentTarget===document&&(R.source!=="keydown"||R.originalEvent.key==="Escape")&&(R.source="rootClose"),y(R.source)&&(c==null||c(D,R)))}),b=Hv(l==="end",r,P),N=x.useMemo(()=>({align:l,drop:r,isRTL:P}),[l,r,P]),A={down:O,"down-centered":`${O}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return m.jsx(yf.Provider,{value:N,children:m.jsx(Ko,{placement:b,show:i,onSelect:u,onToggle:v,focusFirstItemOnShow:d,itemSelector:`.${O}-item:not(.disabled):not(:disabled)`,children:C?S.children:m.jsx(h,{...S,ref:t,className:nr(o,i&&"show",A[r])})})})});Xv.displayName="Dropdown";const Nt=Object.assign(Xv,{Toggle:Yv,Menu:Kv,Item:Fv,ItemText:Bv,Divider:Iv,Header:Mv}),sE=[{title:"Home",href:"/",id:"menuHome",sort:1,iconClass:"ti ti-layout-dashboard"},{title:"Website",href:"/site",id:"menuSite",sort:2,iconClass:"ti ti-world"},{title:"FTP",href:"/ftp",id:"menuFtp",sort:3,iconClass:"ti ti-folder-share"},{title:"Databases",href:"/database",id:"menuDatabase",sort:4,iconClass:"ti ti-database"},{title:"Docker",href:"/docker",id:"menuDocker",sort:5,iconClass:"ti ti-brand-docker"},{title:"Monitor",href:"/control",id:"menuControl",sort:6,iconClass:"ti ti-heart-rate-monitor"},{title:"Security",href:"/firewall",id:"menuFirewall",sort:7,iconClass:"ti ti-shield-lock"},{title:"Files",href:"/files",id:"menuFiles",sort:8,iconClass:"ti ti-folders"},{title:"Node",href:"/node",id:"menuNode",sort:9,iconClass:"ti ti-brand-nodejs"},{title:"Logs",href:"/logs",id:"menuLogs",sort:10,iconClass:"ti ti-file-text"},{title:"Domains",href:"/ssl_domain",id:"menuDomains",sort:11,iconClass:"ti ti-world-www"},{title:"Terminal",href:"/xterm",id:"menuXterm",sort:12,iconClass:"ti ti-terminal-2"},{title:"Cron",href:"/crontab",id:"menuCrontab",sort:13,iconClass:"ti ti-clock"},{title:"App Store",href:"/soft",id:"menuSoft",sort:14,iconClass:"ti ti-package"},{title:"Services",href:"/services",id:"menuServices",sort:15,iconClass:"ti ti-server"},{title:"Plugins",href:"/plugins",id:"menuPlugins",sort:16,iconClass:"ti ti-puzzle"},{title:"Backup Plans",href:"/backup-plans",id:"menuBackupPlans",sort:17,iconClass:"ti ti-archive"},{title:"Users",href:"/users",id:"menuUsers",sort:18,iconClass:"ti ti-users"},{title:"Settings",href:"/config",id:"menuConfig",sort:19,iconClass:"ti ti-settings"},{title:"Log out",href:"/logout",id:"menuLogout",sort:20,iconClass:"ti ti-logout"}],Is=e=>`/theme/img/theme/theme-${e}.svg`;function lE(){const{theme:e,accent:t,sidebarTheme:n,sidebarBg:r,setTheme:i,setAccent:o,setSidebarTheme:l,setSidebarBg:u,resetTheme:c}=fv(),[d,h]=x.useState(!1),g=x.useId(),_=x.useCallback(()=>h(!1),[]);return x.useEffect(()=>{if(!d)return;const S=C=>{C.key==="Escape"&&_()};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[d,_]),m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"sidebar-contact",children:m.jsx("button",{type:"button",className:"toggle-theme border-0 bg-transparent p-0","aria-expanded":d,"aria-controls":"yakpanel-theme-panel","aria-label":d?"Close theme settings":"Open theme customizer",onClick:()=>h(S=>!S),children:m.jsx("i",{className:`fa fa-cog ${d?"fa-spin":""}`,"aria-hidden":!0})})}),m.jsxs("div",{id:"yakpanel-theme-panel",className:`sidebar-themesettings ${d?"open":""}`,role:"dialog","aria-modal":"true","aria-labelledby":g,children:[m.jsxs("div",{className:"themesettings-header",children:[m.jsx("h4",{id:g,children:"Theme Customizer"}),m.jsx("button",{type:"button",className:"btn btn-link p-0 text-body","aria-label":"Close",onClick:_,children:m.jsx("i",{className:"ti ti-x","aria-hidden":!0})})]}),m.jsxs("div",{className:"themesettings-inner",children:[m.jsxs("div",{className:"themesettings-content",children:[m.jsx("h6",{children:"Layout"}),m.jsxs("div",{className:"row g-2",children:[m.jsx("div",{className:"col-6",children:m.jsx(ou,{name:"yak-theme-layout",value:"light",checked:e==="light",onChange:()=>i("light"),id:"yak-lightTheme",label:"Light",imgSrc:Is("01")})}),m.jsx("div",{className:"col-6",children:m.jsx(ou,{name:"yak-theme-layout",value:"dark",checked:e==="dark",onChange:()=>i("dark"),id:"yak-darkTheme",label:"Dark",imgSrc:Is("02")})})]})]}),m.jsxs("div",{className:"themesettings-content",children:[m.jsx("h6",{children:"Colors"}),m.jsx("div",{className:"theme-colorsset",children:m.jsx("ul",{className:"mb-0",children:[{v:"red",id:"yak-redColor"},{v:"yellow",id:"yak-yellowColor"},{v:"blue",id:"yak-blueColor"},{v:"green",id:"yak-greenColor"}].map(({v:S,id:C})=>m.jsx("li",{children:m.jsxs("div",{className:"input-themeselects",children:[m.jsx("input",{type:"radio",name:"yak-accent",id:C,value:S,checked:t===S,onChange:()=>o(S)}),m.jsx("label",{htmlFor:C,className:`${S}-clr`,title:S,children:m.jsx("span",{className:"visually-hidden",children:S})})]})},S))})})]}),m.jsxs("div",{className:"themesettings-content",children:[m.jsx("h6",{children:"Sidebar"}),m.jsx("div",{className:"row g-2",children:[{v:"light",n:"03",label:"Light"},{v:"dark",n:"04",label:"Dark"},{v:"blue",n:"05",label:"Blue"},{v:"green",n:"06",label:"Green"}].map(({v:S,n:C,label:O})=>m.jsx("div",{className:"col-6",children:m.jsx(ou,{name:"yak-sidebar-style",value:S,checked:n===S,onChange:()=>l(S),id:`yak-sidebar-${S}`,label:O,imgSrc:Is(C)})},S))})]}),m.jsxs("div",{className:"themesettings-content m-0 border-0",children:[m.jsx("h6",{children:"Sidebar background"}),m.jsxs("div",{className:"row g-2",children:[m.jsx("div",{className:"col-6",children:m.jsxs("div",{className:"input-themeselect",children:[m.jsx("input",{type:"radio",name:"yak-sidebarbg",id:"yak-sidebarBgNone",value:"sidebarbgnone",checked:r==="sidebarbgnone",onChange:()=>u("sidebarbgnone")}),m.jsx("label",{htmlFor:"yak-sidebarBgNone",className:"d-flex align-items-center justify-content-center bg-body-secondary rounded",style:{minHeight:72},children:m.jsx("span",{className:"small text-muted",children:"Default"})})]})}),[{v:"sidebarbg1",n:"07"},{v:"sidebarbg2",n:"08"},{v:"sidebarbg3",n:"09"},{v:"sidebarbg4",n:"10"}].map(({v:S,n:C})=>m.jsx("div",{className:"col-6",children:m.jsxs("div",{className:"input-themeselect",children:[m.jsx("input",{type:"radio",name:"yak-sidebarbg",id:`yak-${S}`,value:S,checked:r===S,onChange:()=>u(S)}),m.jsxs("label",{htmlFor:`yak-${S}`,children:[m.jsx("img",{src:Is(C),alt:""}),m.jsxs("span",{className:"w-100",children:[m.jsxs("span",{children:["Bg ",C.slice(-1)]}),m.jsx("span",{className:"checkboxs-theme"})]})]})]})},S))]})]})]}),m.jsx("div",{className:"themesettings-footer",children:m.jsxs("ul",{className:"mb-0",children:[m.jsx("li",{children:m.jsx("button",{type:"button",className:"btn btn-cancel close-theme btn-light border w-100",onClick:_,children:"Cancel"})}),m.jsx("li",{children:m.jsx("button",{type:"button",className:"btn btn-reset btn-primary w-100",onClick:()=>{c()},children:"Reset"})})]})})]})]})}function ou({name:e,value:t,checked:n,onChange:r,id:i,label:o,imgSrc:l}){return m.jsxs("div",{className:"input-themeselect",children:[m.jsx("input",{type:"radio",name:e,id:i,value:t,checked:n,onChange:r}),m.jsxs("label",{htmlFor:i,children:[m.jsx("img",{src:l,alt:""}),m.jsxs("span",{className:"w-100",children:[m.jsx("span",{children:o}),m.jsx("span",{className:"checkboxs-theme"})]})]})]})}const $h="yakpanel_mini_sidebar";function aE(){const e=Wo(),{theme:t,toggleTheme:n}=fv(),[r,i]=x.useState(!1),[o,l]=x.useState(()=>localStorage.getItem($h)==="1");x.useEffect(()=>{localStorage.setItem($h,o?"1":"0")},[o]),x.useEffect(()=>{o?document.body.classList.add("mini-sidebar"):document.body.classList.remove("mini-sidebar")},[o]);const u=()=>i(!1);return m.jsxs("div",{className:`main-wrapper ${r?"slide-nav":""}`,children:[m.jsxs("div",{className:"header",children:[m.jsxs("div",{className:`header-left ${o?"":"active"}`,children:[m.jsxs(Ds,{to:"/",className:"logo logo-normal",onClick:u,children:[m.jsx("img",{src:"/theme/img/logo.png",alt:"YakPanel"}),m.jsx("img",{src:"/theme/img/white-logo.png",className:"white-logo",alt:""})]}),m.jsx(Ds,{to:"/",className:"logo logo-small",onClick:u,children:m.jsx("img",{src:"/theme/img/logo-small.png",alt:""})}),m.jsx("button",{type:"button",id:"toggle_btn",className:o?"":"active","aria-label":o?"Expand sidebar":"Collapse sidebar",onClick:()=>l(!o),children:m.jsx("i",{className:"ti ti-arrow-bar-to-left"})})]}),m.jsx("button",{type:"button",id:"mobile_btn",className:"mobile_btn d-md-none btn btn-link p-0 border-0","aria-label":"Open menu",onClick:()=>i(!r),children:m.jsxs("span",{className:"bar-icon",children:[m.jsx("span",{}),m.jsx("span",{}),m.jsx("span",{})]})}),m.jsx("div",{className:"header-user",children:m.jsxs("ul",{className:"nav user-menu",children:[m.jsx("li",{className:"nav-item nav-search-inputs me-auto d-none d-md-block",children:m.jsx("div",{className:"top-nav-search",children:m.jsx("form",{className:"dropdown",onSubmit:c=>c.preventDefault(),children:m.jsxs("div",{className:"searchinputs",children:[m.jsx("input",{type:"search",className:"form-control",placeholder:"Search","aria-label":"Search"}),m.jsx("div",{className:"search-addon",children:m.jsx("button",{type:"submit",className:"btn btn-link p-0","aria-label":"Submit search",children:m.jsx("i",{className:"ti ti-command"})})})]})})})}),m.jsx("li",{className:"nav-item",children:m.jsxs("button",{type:"button",className:"btn btn-link nav-link dark-mode-toggle p-0",id:"dark-mode-toggle","aria-label":"Toggle theme",onClick:n,children:[m.jsx("i",{className:`ti ti-sun light-mode ${t==="light"?"active":""}`}),m.jsx("i",{className:`ti ti-moon dark-mode ${t==="dark"?"active":""}`})]})}),m.jsx("li",{className:"nav-item dropdown has-arrow main-drop",children:m.jsxs(Nt,{align:"end",children:[m.jsxs(Nt.Toggle,{as:"a",className:"btn btn-link nav-link user-link p-0 d-flex align-items-center text-decoration-none",children:[m.jsx("span",{className:"user-img",children:m.jsx("img",{src:"/theme/img/profiles/avatar-14.jpg",alt:"",className:"rounded-circle",width:32,height:32})}),m.jsxs("span",{className:"user-content d-none d-md-inline text-start ms-2",children:[m.jsx("span",{className:"user-name d-block fw-medium",children:"Admin"}),m.jsx("span",{className:"user-role text-muted small",children:"Panel"})]})]}),m.jsxs(Nt.Menu,{className:"dropdown-menu-end",children:[m.jsxs(Nt.Item,{onClick:()=>e("/users"),children:[m.jsx("i",{className:"ti ti-users me-2"}),"Users"]}),m.jsxs(Nt.Item,{onClick:()=>e("/config"),children:[m.jsx("i",{className:"ti ti-settings me-2"}),"Settings"]}),m.jsx(Nt.Divider,{}),m.jsxs(Nt.Item,{onClick:()=>e("/logout"),children:[m.jsx("i",{className:"ti ti-logout me-2"}),"Log out"]})]})]})})]})}),m.jsx("div",{className:"dropdown mobile-user-menu d-md-none",children:m.jsxs(Nt,{children:[m.jsx(Nt.Toggle,{as:"a",className:"nav-link dropdown-toggle",children:m.jsx("i",{className:"ti ti-dots-vertical"})}),m.jsxs(Nt.Menu,{children:[m.jsxs(Nt.Item,{onClick:()=>{e("/"),u()},children:[m.jsx("i",{className:"ti ti-layout-dashboard me-2"}),"Dashboard"]}),m.jsxs(Nt.Item,{onClick:()=>e("/logout"),children:[m.jsx("i",{className:"ti ti-logout me-2"}),"Log out"]})]})]})})]}),m.jsx("div",{className:"sidebar",id:"sidebar",children:m.jsx("div",{className:"sidebar-inner slimscroll",children:m.jsxs("div",{id:"sidebar-menu",className:"sidebar-menu",children:[m.jsx("ul",{children:m.jsx("li",{className:"clinicdropdown",children:m.jsxs(Ds,{to:"/users",onClick:u,children:[m.jsx("img",{src:"/theme/img/profiles/avatar-14.jpg",className:"img-fluid rounded-circle",alt:"",width:40,height:40}),m.jsxs("div",{className:"user-names",children:[m.jsx("h5",{children:"Admin"}),m.jsx("h6",{children:"YakPanel"})]})]})})}),m.jsx("ul",{children:m.jsxs("li",{children:[m.jsx("h6",{className:"submenu-hdr",children:"Main"}),m.jsx("ul",{children:sE.filter(c=>c.id!=="menuLogout").map(c=>m.jsx("li",{children:m.jsxs(Ds,{to:c.href,onClick:u,className:({isActive:d})=>d?"active":void 0,children:[m.jsx("i",{className:c.iconClass}),m.jsx("span",{children:c.title})]})},c.id))})]})}),m.jsx("ul",{children:m.jsx("li",{children:m.jsxs("button",{type:"button",className:"btn btn-link text-start w-100 text-decoration-none text-body py-2 border-0",onClick:()=>e("/logout"),children:[m.jsx("i",{className:"ti ti-logout me-2"}),"Log out"]})})})]})})}),m.jsx("div",{className:"page-wrapper",children:m.jsx("div",{className:"content",children:m.jsx(CS,{})})}),r?m.jsx("button",{type:"button",className:"position-fixed top-0 start-0 w-100 h-100 bg-dark bg-opacity-25 border-0 p-0 d-md-none",style:{zIndex:1040},"aria-label":"Close menu",onClick:u}):null,m.jsx(lE,{})]})}const Jv="/api/v1";function uE(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>t&&typeof t=="object"&&"msg"in t?String(t.msg):JSON.stringify(t)).join("; ")}async function V(e,t={}){const n=localStorage.getItem("token"),r={"Content-Type":"application/json",...t.headers};n&&(r.Authorization=`Bearer ${n}`);const i=await fetch(`${Jv}${e}`,{...t,headers:r});if(i.status===401)throw localStorage.removeItem("token"),window.location.href="/login",new Error("Unauthorized");if(!i.ok){const o=await i.json().catch(()=>({}));throw new Error(o.detail||o.message||`HTTP ${i.status}`)}return i.json()}async function cE(e,t){const n=new URLSearchParams;n.set("username",e),n.set("password",t);const r=await fetch(`${Jv}/auth/login`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n.toString()});if(!r.ok){const o=await r.json().catch(()=>null),u=(o?uE(o.detail):void 0)||(o&&typeof o.message=="string"?o.message:void 0)||`Login failed (${r.status})`;throw new Error(u)}const i=await r.json();return localStorage.setItem("token",i.access_token),i}async function zE(e){return V("/site/create",{method:"POST",body:JSON.stringify(e)})}async function FE(){return V("/site/list")}async function BE(e,t){return V("/site/batch",{method:"POST",body:JSON.stringify({action:e,ids:t})})}async function UE(e){return V(`/site/${e}`)}async function WE(e,t){return V(`/site/${e}`,{method:"PUT",body:JSON.stringify(t)})}async function VE(e){return V(`/site/${e}/redirects`)}async function HE(e,t,n,r=301){return V(`/site/${e}/redirects`,{method:"POST",body:JSON.stringify({source:t,target:n,code:r})})}async function KE(e,t,n="main"){return V(`/site/${e}/git/clone`,{method:"POST",body:JSON.stringify({url:t,branch:n})})}async function QE(e){return V(`/site/${e}/git/pull`,{method:"POST"})}async function YE(e,t){return V(`/site/${e}/redirects/${t}`,{method:"DELETE"})}async function XE(e,t){return V(`/site/${e}/status`,{method:"POST",body:JSON.stringify({status:t?1:0})})}async function JE(){return V("/firewall/apply",{method:"POST"})}async function GE(e){return V(`/site/${e}`,{method:"DELETE"})}async function qE(e){return V(`/site/${e}/backup`,{method:"POST"})}async function ZE(e){return V(`/site/${e}/backups`)}async function eC(e,t){return V(`/site/${e}/restore`,{method:"POST",body:JSON.stringify({filename:t})})}async function tC(e,t){const n=localStorage.getItem("token"),r=await fetch(`/api/v1/site/${e}/backups/download?file=${encodeURIComponent(t)}`,{headers:n?{Authorization:`Bearer ${n}`}:{}});if(!r.ok)throw new Error("Download failed");const i=await r.blob(),o=URL.createObjectURL(i),l=document.createElement("a");l.href=o,l.download=t,l.click(),URL.revokeObjectURL(o)}async function nC(e){return V(`/files/list?path=${encodeURIComponent(e)}`)}async function rC(e){return V(`/files/dir-size?path=${encodeURIComponent(e)}`)}async function iC(e,t,n=200){return V(`/files/search?q=${encodeURIComponent(e)}&path=${encodeURIComponent(t)}&max_results=${n}`)}async function oC(e,t,n=!1){return V("/files/chmod",{method:"POST",body:JSON.stringify({file_path:e,mode:t,recursive:n})})}async function sC(e,t){return V("/files/touch",{method:"POST",body:JSON.stringify({path:e,name:t})})}async function lC(e,t,n,r){return V("/files/copy",{method:"POST",body:JSON.stringify({path:e,name:t,dest_path:n,dest_name:null})})}async function aC(e,t,n,r){return V("/files/move",{method:"POST",body:JSON.stringify({path:e,name:t,dest_path:n,dest_name:null})})}async function uC(e,t,n){return V("/files/compress",{method:"POST",body:JSON.stringify({path:e,names:t,archive_name:n})})}async function cC(e,t){const n=new FormData;n.append("path",e),n.append("file",t);const r=localStorage.getItem("token"),i=await fetch("/api/v1/files/upload",{method:"POST",headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!i.ok){const o=await i.json().catch(()=>({}));throw new Error(o.detail||"Upload failed")}return i.json()}async function fC(e){return V(`/files/read?path=${encodeURIComponent(e)}`)}async function dC(e,t){return V("/files/write",{method:"POST",body:JSON.stringify({path:e,content:t})})}async function pC(e,t){return V("/files/mkdir",{method:"POST",body:JSON.stringify({path:e,name:t})})}async function hC(e,t,n){return V("/files/rename",{method:"POST",body:JSON.stringify({path:e,old_name:t,new_name:n})})}async function mC(e,t,n){return V("/files/delete",{method:"POST",body:JSON.stringify({path:e,name:t,is_dir:n})})}async function gC(e){const t=localStorage.getItem("token"),n=await fetch(`/api/v1/files/download?path=${encodeURIComponent(e)}`,{headers:t?{Authorization:`Bearer ${t}`}:{}});if(!n.ok)throw new Error("Download failed");const r=await n.blob(),i=URL.createObjectURL(r),o=document.createElement("a");o.href=i,o.download=e.split("/").pop()||"download",o.click(),URL.revokeObjectURL(i)}async function vC(e){return V(`/logs/list?path=${encodeURIComponent(e)}`)}async function yC(e,t=1e3){return V(`/logs/read?path=${encodeURIComponent(e)}&tail=${t}`)}async function wC(e,t){return V("/node/add",{method:"POST",body:JSON.stringify({script:e,name:t||""})})}async function _C(){return V("/docker/containers")}async function xC(){return V("/docker/images")}async function SC(e){return V(`/docker/pull?image=${encodeURIComponent(e)}`,{method:"POST"})}async function kC(e,t,n,r){return V("/docker/run",{method:"POST",body:JSON.stringify({image:e,name:t||"",ports:n||"",cmd:""})})}async function EC(e){return V(`/database/${e}/backup`,{method:"POST"})}async function CC(e){return V(`/database/${e}/backups`)}async function bC(e,t){return V(`/database/${e}/restore`,{method:"POST",body:JSON.stringify({filename:t})})}async function PC(e,t){const n=localStorage.getItem("token"),r=await fetch(`/api/v1/database/${e}/backups/download?file=${encodeURIComponent(t)}`,{headers:n?{Authorization:`Bearer ${n}`}:{}});if(!r.ok)throw new Error("Download failed");const i=await r.blob(),o=URL.createObjectURL(i),l=document.createElement("a");l.href=o,l.download=t,l.click(),URL.revokeObjectURL(o)}async function OC(){return V("/config/test-email",{method:"POST"})}async function jC(){return V("/user/list")}async function TC(e){return V("/user/create",{method:"POST",body:JSON.stringify(e)})}async function NC(e){return V(`/user/${e}`,{method:"DELETE"})}async function LC(e){return V(`/user/${e}/toggle-active`,{method:"PUT"})}async function AC(e,t){return V("/auth/change-password",{method:"POST",body:JSON.stringify({old_password:e,new_password:t})})}async function DC(){return V("/service/list")}async function RC(e,t){return V(`/ftp/${e}/password`,{method:"PUT",body:JSON.stringify({password:t})})}async function $C(e,t){return V(`/database/${e}/password`,{method:"PUT",body:JSON.stringify({password:t})})}async function IC(){return V("/dashboard/stats")}async function MC(){return V("/crontab/apply",{method:"POST"})}async function zC(e=50){return V(`/monitor/processes?limit=${e}`)}async function FC(e){return V("/plugin/add-from-url",{method:"POST",body:JSON.stringify({url:e})})}async function BC(e){return V(`/plugin/${encodeURIComponent(e)}`,{method:"DELETE"})}async function UC(){return V("/monitor/network")}async function WC(){return V("/backup/plans")}async function VC(e){return V("/backup/plans",{method:"POST",body:JSON.stringify(e)})}async function HC(e,t){return V(`/backup/plans/${e}`,{method:"PUT",body:JSON.stringify(t)})}async function KC(e){return V(`/backup/plans/${e}`,{method:"DELETE"})}async function QC(){return V("/backup/run-scheduled",{method:"POST"})}function fE(){const[e,t]=x.useState(""),[n,r]=x.useState(""),[i,o]=x.useState(""),[l,u]=x.useState(!1),c=Wo();async function d(h){h.preventDefault(),o(""),u(!0);try{await cE(e,n),c("/")}catch(g){o(g instanceof Error?g.message:"Login failed")}finally{u(!1)}}return m.jsx("div",{className:"account-content position-relative min-vh-100 d-flex align-items-center justify-content-center p-4",children:m.jsx("div",{className:"card shadow-lg border-0",style:{maxWidth:420,width:"100%"},children:m.jsxs("div",{className:"card-body p-4 p-md-5",children:[m.jsxs("div",{className:"text-center mb-4",children:[m.jsx("img",{src:"/theme/img/logo.png",alt:"YakPanel",className:"mb-3",height:40}),m.jsx("h4",{className:"fw-bold",children:"YakPanel"}),m.jsx("p",{className:"text-muted small mb-0",children:"Sign in to continue"})]}),m.jsxs("form",{onSubmit:d,children:[i?m.jsx("div",{className:"alert alert-danger",role:"alert",children:i}):null,m.jsxs("div",{className:"mb-3",children:[m.jsx("label",{className:"form-label",children:"Username"}),m.jsx("input",{type:"text",value:e,onChange:h=>t(h.target.value),className:"form-control",required:!0,autoComplete:"username"})]}),m.jsxs("div",{className:"mb-3",children:[m.jsx("label",{className:"form-label",children:"Password"}),m.jsx("input",{type:"password",value:n,onChange:h=>r(h.target.value),className:"form-control",required:!0,autoComplete:"current-password"})]}),m.jsx("button",{type:"submit",disabled:l,className:"btn btn-primary w-100 py-2",children:l?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"spinner-border spinner-border-sm me-2",role:"status","aria-hidden":!0}),"Signing in…"]}):"Login"})]}),m.jsx("p",{className:"text-center text-muted small mt-3 mb-0",children:"Default: admin / admin"}),m.jsx("p",{className:"text-center small mt-2 mb-0",children:m.jsx(lv,{to:"/install",children:"Remote SSH install (optional)"})})]})})})}function su({className:e=""}){return m.jsx("div",{className:`placeholder-glow ${e}`.trim(),children:m.jsx("span",{className:"placeholder col-12 rounded",style:{height:"1rem"}})})}function lu(){return m.jsx("div",{className:"card",children:m.jsxs("div",{className:"card-body",children:[m.jsx(su,{className:"mb-2"}),m.jsx(su,{className:"mb-2"}),m.jsx(su,{className:"w-75"})]})})}const dE=x.lazy(()=>Me(()=>import("./DashboardPage-WBszSOQ2.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.DashboardPage}))),pE=x.lazy(()=>Me(()=>import("./SitePage-D5AOBBFP.js"),__vite__mapDeps([4,5,1,6,7,8,3])).then(e=>({default:e.SitePage}))),hE=x.lazy(()=>Me(()=>import("./FilesPage-oDxR4Lhi.js"),__vite__mapDeps([9,5,1,6,7,8,3])).then(e=>({default:e.FilesPage}))),mE=x.lazy(()=>Me(()=>import("./FtpPage-CjINqUGM.js"),__vite__mapDeps([10,5,1,6,7,8,3])).then(e=>({default:e.FtpPage}))),gE=x.lazy(()=>Me(()=>import("./DatabasePage-B_-EguhK.js"),__vite__mapDeps([11,5,1,6,7,8,3])).then(e=>({default:e.DatabasePage}))),vE=x.lazy(()=>Me(()=>import("./TerminalPage-CgU22s_8.js"),__vite__mapDeps([12,3,13])).then(e=>({default:e.TerminalPage}))),yE=x.lazy(()=>Me(()=>import("./MonitorPage-BRoY6HLt.js"),__vite__mapDeps([14,1,7,3])).then(e=>({default:e.MonitorPage}))),wE=x.lazy(()=>Me(()=>import("./CrontabPage-DgbkO6Z_.js"),__vite__mapDeps([15,5,1,6,7,8,3])).then(e=>({default:e.CrontabPage}))),_E=x.lazy(()=>Me(()=>import("./ConfigPage-t5KRejpn.js"),__vite__mapDeps([16,1,6,2,3])).then(e=>({default:e.ConfigPage}))),xE=x.lazy(()=>Me(()=>import("./LogsPage-z5Orin3I.js"),__vite__mapDeps([17,1,6,3])).then(e=>({default:e.LogsPage}))),SE=x.lazy(()=>Me(()=>import("./FirewallPage-Cczmj9CC.js"),__vite__mapDeps([18,5,1,6,7,8,3])).then(e=>({default:e.FirewallPage}))),kE=x.lazy(()=>Me(()=>import("./DomainsPage-BQsg8Ui3.js"),__vite__mapDeps([19,5,1,6,3])).then(e=>({default:e.DomainsPage}))),EE=x.lazy(()=>Me(()=>import("./DockerPage-DyZ77ivO.js"),__vite__mapDeps([20,5,1,6,7,8,3])).then(e=>({default:e.DockerPage}))),CE=x.lazy(()=>Me(()=>import("./NodePage-DOIEhdrc.js"),__vite__mapDeps([21,5,1,6,7,8,3])).then(e=>({default:e.NodePage}))),bE=x.lazy(()=>Me(()=>import("./SoftPage-BLM9zKf0.js"),__vite__mapDeps([22,1,6,3])).then(e=>({default:e.SoftPage}))),PE=x.lazy(()=>Me(()=>import("./ServicesPage-C2SHTH7X.js"),__vite__mapDeps([23,1,6,7,3])).then(e=>({default:e.ServicesPage}))),OE=x.lazy(()=>Me(()=>import("./PluginsPage-D1KZQdzk.js"),__vite__mapDeps([24,5,1,6,3])).then(e=>({default:e.PluginsPage}))),jE=x.lazy(()=>Me(()=>import("./BackupPlansPage-Dau-fuqK.js"),__vite__mapDeps([25,5,1,6,7,8,3])).then(e=>({default:e.BackupPlansPage}))),TE=x.lazy(()=>Me(()=>import("./UsersPage-Skle3SPM.js"),__vite__mapDeps([26,5,1,6,7,3])).then(e=>({default:e.UsersPage}))),NE=x.lazy(()=>Me(()=>import("./RemoteInstallPage-19-_F3Xw.js"),__vite__mapDeps([27,1,6])).then(e=>({default:e.RemoteInstallPage})));function $e(){return m.jsxs("div",{className:"row g-3",children:[m.jsx("div",{className:"col-md-4",children:m.jsx(lu,{})}),m.jsx("div",{className:"col-md-4",children:m.jsx(lu,{})}),m.jsx("div",{className:"col-md-4",children:m.jsx(lu,{})})]})}function LE({children:e}){return localStorage.getItem("token")?m.jsx(m.Fragment,{children:e}):m.jsx(ov,{to:"/login",replace:!0})}function AE(){return m.jsx(YS,{children:m.jsxs(PS,{children:[m.jsx(we,{path:"/login",element:m.jsx(fE,{})}),m.jsx(we,{path:"/install",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(NE,{})})}),m.jsxs(we,{path:"/",element:m.jsx(LE,{children:m.jsx(aE,{})}),children:[m.jsx(we,{index:!0,element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(dE,{})})}),m.jsx(we,{path:"site",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(pE,{})})}),m.jsx(we,{path:"ftp",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(mE,{})})}),m.jsx(we,{path:"database",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(gE,{})})}),m.jsx(we,{path:"docker",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(EE,{})})}),m.jsx(we,{path:"control",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(yE,{})})}),m.jsx(we,{path:"firewall",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(SE,{})})}),m.jsx(we,{path:"files",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(hE,{})})}),m.jsx(we,{path:"node",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(CE,{})})}),m.jsx(we,{path:"logs",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(xE,{})})}),m.jsx(we,{path:"ssl_domain",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(kE,{})})}),m.jsx(we,{path:"xterm",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(vE,{})})}),m.jsx(we,{path:"crontab",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(wE,{})})}),m.jsx(we,{path:"soft",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(bE,{})})}),m.jsx(we,{path:"config",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(_E,{})})}),m.jsx(we,{path:"services",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(PE,{})})}),m.jsx(we,{path:"plugins",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(OE,{})})}),m.jsx(we,{path:"backup-plans",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(jE,{})})}),m.jsx(we,{path:"users",element:m.jsx(x.Suspense,{fallback:m.jsx($e,{}),children:m.jsx(TE,{})})})]}),m.jsx(we,{path:"/logout",element:m.jsx(DE,{})}),m.jsx(we,{path:"*",element:m.jsx(ov,{to:"/",replace:!0})})]})})}function DE(){return localStorage.removeItem("token"),window.location.href="/login",null}au.createRoot(document.getElementById("root")).render(m.jsx(wn.StrictMode,{children:m.jsx($S,{children:m.jsx(AE,{})})}));export{_C as $,mC as A,iC as B,pC as C,Nt as D,sC as E,oC as F,uC as G,dC as H,rC as I,hC as J,fC as K,lv as L,V as M,RC as N,CC as O,EC as P,PC as Q,bC as R,$C as S,zC as T,UC as U,MC as V,OC as W,AC as X,yC as Y,vC as Z,JE as _,FE as a,xC as a0,SC as a1,kC as a2,wC as a3,FC as a4,BC as a5,WC as a6,QC as a7,KC as a8,HC as a9,Dr as aA,VC as aa,jC as ab,LC as ac,NC as ad,TC as ae,El as af,hk as ag,wn as ah,RE as ai,Wk as aj,$s as ak,Uv as al,nr as am,pv as an,Av as ao,Uk as ap,Xn as aq,r1 as ar,qS as as,Oh as at,gh as au,ir as av,Xk as aw,qk as ax,pk as ay,hv as az,XE as b,zE as c,qE as d,UE as e,VE as f,IC as g,ZE as h,GE as i,m as j,KE as k,DC as l,QE as m,HE as n,YE as o,tC as p,eC as q,x as r,BE as s,$E as t,WE as u,nC as v,cC as w,gC as x,lC as y,aC as z}; diff --git a/YakPanel-server/frontend/dist/index.html b/YakPanel-server/frontend/dist/index.html index 377fed2b..2a9e7fe5 100644 --- a/YakPanel-server/frontend/dist/index.html +++ b/YakPanel-server/frontend/dist/index.html @@ -5,7 +5,7 @@ YakPanel - + diff --git a/YakPanel-server/frontend/src/api/client.ts b/YakPanel-server/frontend/src/api/client.ts index 2fa034d6..0ad66547 100644 --- a/YakPanel-server/frontend/src/api/client.ts +++ b/YakPanel-server/frontend/src/api/client.ts @@ -74,6 +74,39 @@ export async function createSite(data: { name: string; domains: string[]; path?: }) } +export type SiteSslInfo = { + status: 'none' | 'active' | 'expiring' | 'expired' + days_left: number | null + cert_name: string | null +} + +export type SiteListItem = { + id: number + name: string + path: string + status: number + ps: string + project_type: string + domain_count: number + addtime: string | null + php_version: string + primary_domain: string + domains: string[] + backup_count: number + ssl: SiteSslInfo +} + +export async function listSites() { + return apiRequest('/site/list') +} + +export async function siteBatch(action: 'enable' | 'disable' | 'delete', ids: number[]) { + return apiRequest<{ results: { id: number; ok: boolean; msg: string }[] }>('/site/batch', { + method: 'POST', + body: JSON.stringify({ action, ids }), + }) +} + export async function getSite(siteId: number) { return apiRequest<{ id: number; name: string; path: string; status: number; ps: string; project_type: string; php_version: string; force_https: number; domains: string[] }>( `/site/${siteId}` diff --git a/YakPanel-server/frontend/src/pages/FilesPage.tsx b/YakPanel-server/frontend/src/pages/FilesPage.tsx index 38d03f12..7e115296 100644 --- a/YakPanel-server/frontend/src/pages/FilesPage.tsx +++ b/YakPanel-server/frontend/src/pages/FilesPage.tsx @@ -1,4 +1,5 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react' +import { useSearchParams } from 'react-router-dom' import Modal from 'react-bootstrap/Modal' import Dropdown from 'react-bootstrap/Dropdown' import { @@ -44,6 +45,7 @@ const TEXT_EXT = ['.txt', '.html', '.htm', '.css', '.js', '.json', '.xml', '.md' type Clip = { op: 'copy' | 'cut'; entries: { parent: string; name: string }[] } export function FilesPage() { + const [searchParams] = useSearchParams() const [path, setPath] = useState('/') const [pathInput, setPathInput] = useState('/') const [items, setItems] = useState([]) @@ -92,8 +94,17 @@ export function FilesPage() { }, []) useEffect(() => { - loadDir(path) - }, []) + const raw = searchParams.get('path') + let p = '/' + if (raw && raw.trim()) { + try { + p = decodeURIComponent(raw.trim()) + } catch { + p = raw.trim() + } + } + loadDir(p) + }, [searchParams, loadDir]) const filteredItems = useMemo(() => { const q = filter.trim().toLowerCase() diff --git a/YakPanel-server/frontend/src/pages/SitePage.tsx b/YakPanel-server/frontend/src/pages/SitePage.tsx index 51be24c8..3a4a3693 100644 --- a/YakPanel-server/frontend/src/pages/SitePage.tsx +++ b/YakPanel-server/frontend/src/pages/SitePage.tsx @@ -1,7 +1,10 @@ -import { useEffect, useState } from 'react' +import { useEffect, useMemo, useState } from 'react' +import { Link } from 'react-router-dom' import Modal from 'react-bootstrap/Modal' +import Dropdown from 'react-bootstrap/Dropdown' import { - apiRequest, + listSites, + siteBatch, createSite, getSite, updateSite, @@ -16,22 +19,18 @@ import { deleteSiteRedirect, siteGitClone, siteGitPull, + listServices, + type SiteListItem, } from '../api/client' import { PageHeader, AdminButton, AdminAlert, AdminTable, EmptyState } from '../components/admin' -interface Site { - id: number - name: string - path: string - status: number - ps: string - project_type: string - domain_count: number - addtime: string | null +function formatPhpVersion(code: string): string { + const m: Record = { '74': '7.4', '80': '8.0', '81': '8.1', '82': '8.2' } + return m[code] || code } export function SitePage() { - const [sites, setSites] = useState([]) + const [sites, setSites] = useState([]) const [loading, setLoading] = useState(true) const [error, setError] = useState('') const [showCreate, setShowCreate] = useState(false) @@ -62,10 +61,17 @@ export function SitePage() { const [gitBranch, setGitBranch] = useState('main') const [gitAction, setGitAction] = useState<'clone' | 'pull' | null>(null) const [gitLoading, setGitLoading] = useState(false) + const [search, setSearch] = useState('') + const [selectedIds, setSelectedIds] = useState>(() => new Set()) + const [page, setPage] = useState(1) + const [pageSize, setPageSize] = useState(25) + const [nginxStatus, setNginxStatus] = useState(null) + const [batchLoading, setBatchLoading] = useState(false) + const [rowBackupId, setRowBackupId] = useState(null) const loadSites = () => { setLoading(true) - apiRequest('/site/list') + listSites() .then(setSites) .catch((err) => setError(err.message)) .finally(() => setLoading(false)) @@ -75,6 +81,90 @@ export function SitePage() { loadSites() }, []) + useEffect(() => { + listServices() + .then((data) => { + const n = data.services.find((s) => s.id === 'nginx') + setNginxStatus(n?.status ?? null) + }) + .catch(() => setNginxStatus(null)) + }, []) + + const filteredSites = useMemo(() => { + const q = search.trim().toLowerCase() + if (!q) return sites + return sites.filter((s) => { + const blob = [s.name, s.path, s.ps, s.primary_domain, ...(s.domains || [])].join(' ').toLowerCase() + return blob.includes(q) + }) + }, [sites, search]) + + useEffect(() => setPage(1), [search, pageSize]) + + const totalPages = Math.max(1, Math.ceil(filteredSites.length / pageSize)) + const paginatedSites = useMemo(() => { + const start = (page - 1) * pageSize + return filteredSites.slice(start, start + pageSize) + }, [filteredSites, page, pageSize]) + + useEffect(() => { + if (page > totalPages) setPage(totalPages) + }, [page, totalPages]) + + const toggleSelect = (id: number) => { + setSelectedIds((prev) => { + const n = new Set(prev) + if (n.has(id)) n.delete(id) + else n.add(id) + return n + }) + } + + const selectAllOnPage = () => { + const onPage = new Set(paginatedSites.map((s) => s.id)) + const allSelected = paginatedSites.length > 0 && paginatedSites.every((s) => selectedIds.has(s.id)) + if (allSelected) { + setSelectedIds((prev) => { + const n = new Set(prev) + paginatedSites.forEach((s) => n.delete(s.id)) + return n + }) + } else { + setSelectedIds((prev) => new Set([...prev, ...onPage])) + } + } + + const runBatch = async (action: 'enable' | 'disable' | 'delete') => { + const ids = [...selectedIds] + if (ids.length === 0) return + const msg = + action === 'delete' + ? `Delete ${ids.length} site(s)? This cannot be undone.` + : `${action === 'enable' ? 'Enable' : 'Disable'} ${ids.length} site(s)?` + if (!confirm(msg)) return + setBatchLoading(true) + try { + const r = await siteBatch(action, ids) + const failed = r.results.filter((x) => !x.ok) + if (failed.length) setError(failed.map((f) => `${f.id}: ${f.msg}`).join('; ')) + else setError('') + setSelectedIds(new Set()) + loadSites() + } catch (e) { + setError(e instanceof Error ? e.message : 'Batch failed') + } finally { + setBatchLoading(false) + } + } + + const handleQuickBackup = (siteId: number) => { + setRowBackupId(siteId) + createSiteBackup(siteId) + .then(() => loadSites()) + .catch((err) => setError(err.message)) + .finally(() => setRowBackupId(null)) + } + const handleCreate = (e: React.FormEvent) => { e.preventDefault() const form = e.currentTarget @@ -341,99 +431,237 @@ export function SitePage() { +
+
+
+
+
+ + + + setSearch(e.target.value)} + aria-label="Search sites" + /> +
+
+
+
+ runBatch('enable')} disabled={batchLoading || selectedIds.size === 0}> + Enable + + runBatch('disable')} disabled={batchLoading || selectedIds.size === 0}> + Disable + + runBatch('delete')} disabled={batchLoading || selectedIds.size === 0}> + Delete + + + {selectedIds.size > 0 ? `${selectedIds.size} selected` : ''} + +
+
+
+ + Nginx {nginxStatus ?? '—'} + + +
+
+
+
+
- Name - Path - Domains - Type - Actions + + 0 && paginatedSites.every((s) => selectedIds.has(s.id))} + onChange={selectAllOnPage} + aria-label="Select all on page" + /> + + Site + Status + Backup + Quick + PHP + SSL + Note + Operate {sites.length === 0 ? ( - + + ) : filteredSites.length === 0 ? ( + + + + + ) : ( - sites.map((s) => ( + paginatedSites.map((s) => ( - {s.name} - {s.path} - {s.domain_count} - {s.project_type} - + e.stopPropagation()}> + toggleSelect(s.id)} + aria-label={`Select ${s.name}`} + /> + + +
+ {s.primary_domain ? ( + + + + ) : null} +
+
{s.primary_domain || s.name}
+
+ {s.project_type} · {s.path} +
+
+
+ + {s.status === 1 ? ( ) : ( )} + + + {s.backup_count} - - - - + + + + + {formatPhpVersion(s.php_version || '74')} + + + {(s.ssl?.status ?? 'none') === 'none' ? ( + Not set + ) : s.ssl?.status === 'expired' ? ( + Expired + ) : s.ssl?.status === 'expiring' ? ( + {s.ssl?.days_left ?? 0}d left + ) : ( + {s.ssl?.days_left ?? 0} days + )} + + + {s.ps || '—'} + + + + + More + + + openEditModal(s.id)}> + + Config + + + + Logs + + + + SSL / Domains + + + { + setGitSiteId(s.id) + setGitAction('clone') + setGitUrl('') + setGitBranch('main') + }} + > + + Git + + openRedirectModal(s.id)}> + + Redirects + + openBackupModal(s.id)}> + + Backups + + + handleDelete(s.id, s.name)}> + + Delete + + + )) @@ -441,6 +669,35 @@ export function SitePage() {
+ {sites.length > 0 && filteredSites.length > 0 ? ( +
+ + Total {filteredSites.length} site(s) + {search.trim() ? ` (filtered from ${sites.length})` : ''} + +
+ + + Page {page} / {totalPages} + + +
+
+ ) : null}
{ setGitSiteId(null); setGitAction(null) }} centered>