@undefineds.co/xpod 0.3.74 → 0.3.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/container/common.js +1 -7
- package/dist/runtime/css-process.js +0 -1
- package/package.json +1 -1
- package/static/auth-callback/assets/{AiConfigContext-DNfRNaZQ.js → AiConfigContext-BvBdu_A3.js} +1 -1
- package/static/auth-callback/assets/{AiConfigPage-BBiTOm3o.js → AiConfigPage-BpDw4jco.js} +1 -1
- package/static/auth-callback/assets/{DocumentProcessingPanel-BzpEwqKT.js → DocumentProcessingPanel-BmZ_jzRr.js} +1 -1
- package/static/auth-callback/assets/{IndexLifecyclePanel-CvXMwooQ.js → IndexLifecyclePanel-BfQBjN4z.js} +1 -1
- package/static/auth-callback/assets/{IndexSubjectPanel-CayA221L.js → IndexSubjectPanel-BlsnatPt.js} +1 -1
- package/static/auth-callback/assets/{ModelAssignmentsPanel-Iew2QgtR.js → ModelAssignmentsPanel-KA6Mdndz.js} +1 -1
- package/static/auth-callback/assets/{ModelsPage-CTJKAUA3.js → ModelsPage-C7jymyIY.js} +1 -1
- package/static/auth-callback/assets/{NetworkPage--8ZCjIHB.js → NetworkPage-k2ShktNm.js} +1 -1
- package/static/auth-callback/assets/{PaneListHeader-BT-OGKL7.js → PaneListHeader-mLMe_dvU.js} +1 -1
- package/static/auth-callback/assets/{SearchIndexingPanel-CFjjk1-C.js → SearchIndexingPanel-CqV9um_t.js} +1 -1
- package/static/auth-callback/assets/{StatusSubjectPanel-DAN5Ej9q.js → StatusSubjectPanel-BgMBTbr2.js} +1 -1
- package/static/auth-callback/assets/{StatusWorkspace-CEgmKJcX.js → StatusWorkspace-zbSyhdG2.js} +1 -1
- package/static/auth-callback/assets/{SystemSettingsPage-Bk0TB4RU.js → SystemSettingsPage-CtW79nW6.js} +1 -1
- package/static/auth-callback/assets/{SystemSettingsSubjectPanel-CKl8ukiz.js → SystemSettingsSubjectPanel-ZOPKYUtZ.js} +1 -1
- package/static/auth-callback/assets/{activity-BOtct9Ie.js → activity-BQ-CQE3O.js} +1 -1
- package/static/auth-callback/assets/{auth-callback-ai6OMe6C.js → auth-callback-Htr_CB_g.js} +3 -3
- package/static/auth-callback/assets/{badge-DGSg5wio.js → badge-D5SGTJeO.js} +1 -1
- package/static/auth-callback/assets/{download-4eVPmxQ_.js → download-DK183Ldo.js} +1 -1
- package/static/auth-callback/assets/{external-link-BlD92fAM.js → external-link-LDHy_4bn.js} +1 -1
- package/static/auth-callback/assets/{index-7ppych8q.js → index-2WmlePQ9.js} +1 -1
- package/static/auth-callback/assets/{index-FrugCRsJ.js → index-BWrvgHqK.js} +1 -1
- package/static/auth-callback/assets/{index-browser-dwpJ2mdT.js → index-browser-DUd4E4-x.js} +1 -1
- package/static/auth-callback/assets/{key-round-BFOQbNNp.js → key-round-ibX79Kr-.js} +1 -1
- package/static/auth-callback/assets/{rotate-ccw-BySVgaAP.js → rotate-ccw-B2_VMaiX.js} +1 -1
- package/static/auth-callback/assets/{skeleton-CgcxPTqc.js → skeleton-F4nrpycc.js} +1 -1
- package/static/auth-callback/assets/{waypoints-DM902DhB.js → waypoints-DImIq93f.js} +1 -1
- package/static/auth-callback/assets/{workspace-layout-DlZlN49Q.js → workspace-layout-IVCSYU21.js} +1 -1
- package/static/auth-callback/auth-callback.html +1 -1
- package/static/dashboard/assets/{AiConfigContext-VnWI7bOR.js → AiConfigContext-cjjfYTo9.js} +1 -1
- package/static/dashboard/assets/{AiConfigPage-Dn3oxXcA.js → AiConfigPage-CO0DSD_j.js} +1 -1
- package/static/dashboard/assets/{DocumentProcessingPanel-CAF1uLi3.js → DocumentProcessingPanel-DMGnH8Oj.js} +1 -1
- package/static/dashboard/assets/{IndexLifecyclePanel-D9zVZwu8.js → IndexLifecyclePanel-DSkIOCL5.js} +1 -1
- package/static/dashboard/assets/{IndexSubjectPanel-_JCGwJmO.js → IndexSubjectPanel-qWN_DbAp.js} +1 -1
- package/static/dashboard/assets/{ModelAssignmentsPanel-DtlxQxFa.js → ModelAssignmentsPanel-DCf83uM3.js} +1 -1
- package/static/dashboard/assets/{ModelsPage-CCNTpXM5.js → ModelsPage-CMnvSrl5.js} +1 -1
- package/static/dashboard/assets/{NetworkPage-BAKv9unq.js → NetworkPage-C8Gkwclb.js} +1 -1
- package/static/dashboard/assets/{PaneListHeader-Dr1jq2Ii.js → PaneListHeader-BtU_8cDK.js} +1 -1
- package/static/dashboard/assets/{SearchIndexingPanel-BW0pPrQB.js → SearchIndexingPanel-DEn12pNU.js} +1 -1
- package/static/dashboard/assets/{StatusSubjectPanel-c9iebk4M.js → StatusSubjectPanel-B1_ILg2d.js} +1 -1
- package/static/dashboard/assets/{StatusWorkspace-KZ7zrrmB.js → StatusWorkspace-BG6nMNCo.js} +1 -1
- package/static/dashboard/assets/{SystemSettingsPage-fVSfJMi9.js → SystemSettingsPage-BnWYIXaM.js} +1 -1
- package/static/dashboard/assets/{SystemSettingsSubjectPanel-DUSxcVT8.js → SystemSettingsSubjectPanel-C_mYVPWb.js} +1 -1
- package/static/dashboard/assets/{activity-Dg4XxJA8.js → activity-DYJ7PdRl.js} +1 -1
- package/static/dashboard/assets/{badge-OHMG7sYk.js → badge-BIaZco1P.js} +1 -1
- package/static/dashboard/assets/{dashboard-UuQZ5g0B.js → dashboard-Dl40_MEa.js} +2 -2
- package/static/dashboard/assets/{download-CkbQhuL2.js → download-By16k9VK.js} +1 -1
- package/static/dashboard/assets/{external-link-C15frgwD.js → external-link-B92xOG_d.js} +1 -1
- package/static/dashboard/assets/{index-BiU8tNWd.js → index-BajZpJ48.js} +1 -1
- package/static/dashboard/assets/{index-JUkJUI4K.js → index-wsVPom_x.js} +1 -1
- package/static/dashboard/assets/{key-round-BVREfX5D.js → key-round-Clo5FOwA.js} +1 -1
- package/static/dashboard/assets/{rotate-ccw-cPEquKE_.js → rotate-ccw-smWSfi1L.js} +1 -1
- package/static/dashboard/assets/{skeleton-BPM2LdA5.js → skeleton-BrTaGeJw.js} +1 -1
- package/static/dashboard/assets/{waypoints-Cd3kODMk.js → waypoints-DGPQInE7.js} +1 -1
- package/static/dashboard/assets/{workspace-layout-BP3gLLXb.js → workspace-layout-CPU4XRmb.js} +1 -1
- package/static/dashboard/dashboard.html +1 -1
- package/static/settings/assets/{AiConfigContext-B-D3riwG.js → AiConfigContext-CT29_OyW.js} +1 -1
- package/static/settings/assets/{AiConfigPage-CAYT-CgT.js → AiConfigPage-WIE95S28.js} +1 -1
- package/static/settings/assets/{DocumentProcessingPanel-D__vS86O.js → DocumentProcessingPanel-KG8Sq999.js} +1 -1
- package/static/settings/assets/{IndexLifecyclePanel-CuYEAG62.js → IndexLifecyclePanel-iKvtHDXY.js} +1 -1
- package/static/settings/assets/{IndexSubjectPanel-Do71gQQC.js → IndexSubjectPanel-BQdSCkk4.js} +1 -1
- package/static/settings/assets/{ModelAssignmentsPanel-Cn3kSze7.js → ModelAssignmentsPanel-P8QcVB0F.js} +1 -1
- package/static/settings/assets/{ModelsPage-BKO0ARYt.js → ModelsPage-UZkZGqor.js} +1 -1
- package/static/settings/assets/{NetworkPage-XPYrdyVd.js → NetworkPage-Dcpcvg15.js} +1 -1
- package/static/settings/assets/{PaneListHeader-BAiQcCss.js → PaneListHeader--gHtZws5.js} +1 -1
- package/static/settings/assets/{SearchIndexingPanel-Bx3Fco0x.js → SearchIndexingPanel-DdgJSJYQ.js} +1 -1
- package/static/settings/assets/{StatusSubjectPanel-BzKzXmSL.js → StatusSubjectPanel-UOxp_XVL.js} +1 -1
- package/static/settings/assets/{StatusWorkspace-NjLpo9xp.js → StatusWorkspace-CPNXuD12.js} +1 -1
- package/static/settings/assets/{SystemSettingsPage-CclI_Lpv.js → SystemSettingsPage-B6ySeVPw.js} +1 -1
- package/static/settings/assets/{SystemSettingsSubjectPanel-CMnSE-8N.js → SystemSettingsSubjectPanel-I7zWmpiI.js} +1 -1
- package/static/settings/assets/{activity-DYpNPFzG.js → activity-CFhmzahP.js} +1 -1
- package/static/settings/assets/{badge-C7Vhmg28.js → badge-BBdUc5B-.js} +1 -1
- package/static/settings/assets/{download-DdXcAiwj.js → download-WJE9-yxQ.js} +1 -1
- package/static/settings/assets/{external-link-D7thdQae.js → external-link-RKoYyCp_.js} +1 -1
- package/static/settings/assets/{index-CwBKvDQZ.js → index-Bq2o0Bif.js} +1 -1
- package/static/settings/assets/{index-BnYbrf5s.js → index-DvxneI5O.js} +1 -1
- package/static/settings/assets/{index-browser-DYzi1DO1.js → index-browser-Qmo6EsFT.js} +1 -1
- package/static/settings/assets/{key-round-BXErodZA.js → key-round-r-D9sQUK.js} +1 -1
- package/static/settings/assets/{rotate-ccw-DPyOBmDD.js → rotate-ccw-D3IIhbPH.js} +1 -1
- package/static/settings/assets/{settings-BGpEf8nx.js → settings-D8oDBXWg.js} +3 -3
- package/static/settings/assets/{skeleton-S9l3JIr9.js → skeleton-DrL4RQuw.js} +1 -1
- package/static/settings/assets/{waypoints-C5By7zWc.js → waypoints-C5sRhpJw.js} +1 -1
- package/static/settings/assets/{workspace-layout-Bb6RVAEx.js → workspace-layout-B4ALmWsM.js} +1 -1
- package/static/settings/settings.html +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var vt=t=>{throw TypeError(t)};var yt=(t,n,s)=>n.has(t)||vt("Cannot "+s);var xe=(t,n,s)=>(yt(t,n,"read from private field"),s?s.call(t):n.get(t)),jt=(t,n,s)=>n.has(t)?vt("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,s),et=(t,n,s,o)=>(yt(t,n,"write to private field"),o?o.call(t,s):n.set(t,s),s);import{r as a,c as Ce,j as e,y as ae,R as it,D as xn,G as gn,O as bn,n as Nt,L as vn,q as ye,x as dt,z as Ue,P as Ee,o as $e,s as ut,w as zt,A as yn}from"./settings-BGpEf8nx.js";import{g as jn,f as St,d as Nn,s as Sn,e as wn,a as Cn,h as En,i as _n,c as Tn,j as Ln,u as Rn,t as Pn}from"./admin-BU4m6Ko2.js";import{A as Dn}from"./activity-DYpNPFzG.js";import{E as kn}from"./external-link-D7thdQae.js";import{A as On,c as be,P as An,a as In,u as Xt,b as Gt,h as qn,d as Mn,R as Un,F as $n,D as Fn,C as Hn,V as Bn,e as wt,f as Vn}from"./index-BnYbrf5s.js";import{D as Kn}from"./download-DdXcAiwj.js";import{K as zn}from"./key-round-BXErodZA.js";var Xn=Object.defineProperty,Gn=(t,n)=>Xn(t,"name",{value:n,configurable:!0}),Wn=a.createContext(void 0);function Wt(t){const n=a.useContext(Wn);return t||n||"ltr"}Gn(Wt,"useDirection");var Qn=Object.defineProperty,Yn=(t,n)=>Qn(t,"name",{value:n,configurable:!0});function ot(t,[n,s]){return Math.min(s,Math.max(n,t))}Yn(ot,"clamp");const Jn=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],Zn=Ce("chart-column",Jn);const es=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ts=Ce("check",es);const ns=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ss=Ce("chevron-down",ns);const os=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]],cs=Ce("file-down",os);const rs=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],as=Ce("pause",rs);const ls=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],is=Ce("play",ls);const ds=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ct=Ce("search",ds);const us=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],ps=Ce("trash-2",us);const ms=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],pt=Ce("triangle-alert",ms);const fs=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],hs=Ce("x",fs);function pe(t){const{className:n,variant:s="default",size:o="default",children:c,...r}=t,u="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus:outline-none focus:ring-0 focus-visible:outline-none active:translate-y-px disabled:opacity-50 disabled:pointer-events-none",p={default:"bg-primary text-primary-foreground hover:bg-primary/90 focus-visible:bg-primary/80",secondary:"bg-muted text-foreground hover:bg-muted/80 focus-visible:bg-muted/60",ghost:"bg-transparent hover:bg-muted focus-visible:bg-muted text-foreground"},f={default:"h-10 px-4 py-2",sm:"h-8 px-3",icon:"h-9 w-9 p-0"};return e.jsx("button",{className:ae(u,p[s],f[o],n),...r,children:c})}function J(t){const{className:n,variant:s,children:o}=t;return e.jsx("div",{className:ae("rounded-xl bg-background",s==="bordered"&&"border border-border",n),children:o})}function ce(t){const{className:n,children:s}=t;return e.jsx("div",{className:ae("px-5 pt-5",n),children:s})}function re(t){const{className:n,children:s}=t;return e.jsx("div",{className:ae("text-base font-semibold",n),children:s})}function Z(t){const{className:n,children:s}=t;return e.jsx("div",{className:ae("px-5 pb-5 pt-4",n),children:s})}function Qe(t){const{className:n,...s}=t;return e.jsx("input",{className:ae("w-full h-10 rounded-md border border-input bg-background px-3 py-2 text-sm","placeholder:text-muted-foreground","focus:outline-none focus-visible:border-primary",n),...s})}function Pe(t){const{className:n,...s}=t;return e.jsx("label",{className:ae("text-sm font-medium text-foreground",n),...s})}const xs={"not-cloud":"非 Cloud 模式","missing-sparql-endpoint":"缺少 PostgreSQL 端点","unsupported-sparql-endpoint":"非 PostgreSQL 端点"};function gs(t){const n=t.trim();return n?{cacheScopeQuery:n,cacheScopeLimit:50}:{}}function vF(){const[t,n]=a.useState(null),[s,o]=a.useState(!0),[c,r]=a.useState(!1),[u,p]=a.useState(""),[f,h]=a.useState(""),[y,N]=a.useState(""),C=a.useRef(!1),_=a.useCallback(async(b=!1,S=y)=>{b?o(!0):r(!0),p("");try{const v=await jn(gs(S));v?n(v):p("RDF 统计不可用")}finally{o(!1),r(!1)}},[y]);a.useEffect(()=>{C.current||(C.current=!0,_(!0))},[_]),a.useEffect(()=>{const b=setInterval(()=>{_(!1)},1e4);return()=>clearInterval(b)},[_]);const L=b=>{b.preventDefault();const S=f.trim();N(S),_(!1,S)},T=()=>{h(""),N(""),_(!1,"")},g=t?Ye(t.generatedAt):"-";return s?e.jsx("div",{className:"p-8 text-foreground",children:"加载中..."}):e.jsxs("div",{className:"p-8",children:[e.jsxs("div",{className:"mb-6 flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"type-h1",children:"RDF 索引"}),e.jsxs("div",{className:"mt-1 text-sm text-muted-foreground",children:["更新时间 ",g]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("form",{className:"flex min-w-0 items-center gap-2",onSubmit:L,children:[e.jsxs("div",{className:"relative w-72 max-w-[70vw]",children:[e.jsx(Ct,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(Qe,{value:f,onChange:b=>h(b.target.value),className:"pl-9",placeholder:"principal / base / version"})]}),e.jsxs(pe,{type:"submit",variant:"secondary",size:"sm",className:"gap-2",children:[e.jsx(Ct,{className:"h-4 w-4"}),"搜索"]}),y&&e.jsx(pe,{type:"button",variant:"ghost",size:"sm",onClick:T,"aria-label":"清除 scope 搜索",children:e.jsx(hs,{className:"h-4 w-4"})})]}),e.jsxs(pe,{type:"button",variant:"secondary",size:"sm",onClick:()=>{_(!1)},disabled:c,className:"gap-2",children:[e.jsx(it,{className:ae("h-4 w-4",c&&"animate-spin")}),"刷新"]})]})]}),u&&e.jsx("div",{className:"mb-5 rounded-md border border-destructive/30 bg-destructive/5 px-4 py-3 text-sm text-destructive",children:u}),t?.available?e.jsx(bs,{snapshot:t,scopeQuery:y}):e.jsxs(e.Fragment,{children:[e.jsx(vs,{snapshot:t}),e.jsx("div",{className:"mt-8",children:e.jsx(Qt,{snapshot:t?.benchmarkReports})})]})]})}function bs(t){const{snapshot:n,scopeQuery:s}=t,o=n.stats,c=o.rdf3x,r=o.slowQueries?.entries??[],u=o.derivedCache,p=u?.scopeEntries??[],f=o.pgAcceleration,h=o.lifecycle,y=h?.coldStart,N=y?.phases.reduce((C,_)=>_.durationMs>C.durationMs?_:C,{name:"-",durationMs:0});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-8 grid grid-cols-1 gap-5 md:grid-cols-2 xl:grid-cols-5",children:[e.jsx(Me,{icon:xn,label:"引擎",value:n.engine,detail:f?.profile??"baseline",tone:f?.enabled?"good":"neutral"}),e.jsx(Me,{icon:Dn,label:"RDF-3X",value:c?.syncedWithFacts?"已同步":`${c?.refreshLag??0} 版本延迟`,detail:`facts ${c?.factsDataVersion??0} / rdf3x ${c?.rdf3xFactsDataVersion??0} / pending ${c?.pendingSources??0}`,tone:c?.syncedWithFacts?"good":"warn"}),e.jsx(Me,{icon:gn,label:"存储",value:ue(o.totalBytes),detail:`facts ${ue(o.factsBytes)} / derived ${ue(o.derivedBytes)}`,tone:"neutral"}),e.jsx(Me,{icon:it,label:"冷启动",value:we(y?.durationMs??h?.lastOpenDurationMs??0),detail:`${h?.status??"unknown"} / open ${h?.openCount??0}`,tone:h?.status==="failed"?"warn":"neutral"}),e.jsx(Me,{icon:pt,label:"慢查询",value:`${o.slowQueries?.entryCount??0}`,detail:`保留 ${o.slowQueries?.maxEntries??0} 条`,tone:(o.slowQueries?.entryCount??0)>0?"warn":"good"})]}),e.jsxs("div",{className:"mb-8 grid grid-cols-1 gap-5 xl:grid-cols-5",children:[e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"空间占用"})}),e.jsxs(Z,{className:"space-y-3",children:[e.jsx($,{label:"derived/facts",value:ct(o.derivedToFactsRatio)}),e.jsx($,{label:"total/facts",value:ct(o.totalToFactsRatio)}),e.jsx($,{label:"result cache",value:ue(o.queryResultCache?.totalBytes??0)}),e.jsx($,{label:"materialized",value:ue(o.materializedResultCache?.totalBytes??0)}),e.jsx($,{label:"template",value:ue(o.queryTemplateCache?.totalBytes??0)})]})]}),e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"Cache"})}),e.jsxs(Z,{className:"space-y-3",children:[e.jsx($,{label:"result entries",value:`${o.queryResultCache?.entryCount??0}`}),e.jsx($,{label:"result scopes",value:`${o.queryResultCache?.scopeCount??0}`}),e.jsx($,{label:"materialized entries",value:`${o.materializedResultCache?.entryCount??0}`}),e.jsx($,{label:"materialized scopes",value:`${o.materializedResultCache?.scopeCount??0}`}),e.jsx($,{label:"result hit rate",value:_t(o.queryResultCache)}),e.jsx($,{label:"materialized hit rate",value:_t(o.materializedResultCache)}),e.jsx($,{label:"template entries",value:`${o.queryTemplateCache?.entryCount??0}`}),e.jsx($,{label:"cache pressure",value:Fe(u?.cachePressure??0)})]})]}),e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"生命周期"})}),e.jsxs(Z,{className:"space-y-3",children:[e.jsx($,{label:"driver",value:h?.driver??"-"}),e.jsx($,{label:"ready at",value:h?.lastReadyAt?Ye(h.lastReadyAt):"-"}),e.jsx($,{label:"slowest phase",value:`${N?.name??"-"} ${we(N?.durationMs??0)}`}),e.jsx($,{label:"dirty sources",value:`${c?.pendingSources??0}`}),e.jsx($,{label:"custom index",value:y?y.customIndexDeferred?"deferred":"startup":"-"}),e.jsx($,{label:"maintenance",value:y?y.maintenanceEnabled?"enabled":"disabled":"-"})]})]}),e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"权限 Scope"})}),e.jsxs(Z,{className:"space-y-3",children:[e.jsx($,{label:"scope versions",value:`${u?.scopeVersionCount??0}`}),e.jsx($,{label:"max scope",value:ue(u?.maxScopeBytes??0)}),e.jsx($,{label:"largest scope",value:ue(u?.largestScopeBytes??0)}),e.jsx($,{label:"scope pressure",value:Fe(u?.largestScopePressure??0)}),e.jsx($,{label:"scope hash",value:He(u?.largestScopeHash??"-")}),e.jsx($,{label:"facts version",value:`${u?.largestScopeFactsDataVersion??"-"}`})]})]}),e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"PG 加速"})}),e.jsxs(Z,{className:"space-y-3",children:[e.jsx($,{label:"profile",value:f?.profile??"baseline"}),e.jsx($,{label:"provider",value:f?.provider??"-"}),e.jsx($,{label:"enabled",value:f?.enabled?"true":"false"}),e.jsx($,{label:"capabilities",value:`${f?.capabilities?.length??0}`}),e.jsx($,{label:"active operators",value:Be(f?.activeOperators)}),e.jsx($,{label:"missing caps",value:Be(f?.missingCapabilities)}),e.jsx($,{label:"fallback",value:f?.fallbackReason??"-"})]})]})]}),e.jsxs("div",{className:"mb-8 grid grid-cols-1 gap-5 xl:grid-cols-2",children:[e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"Cache 淘汰"})}),e.jsxs(Z,{className:"space-y-3",children:[e.jsx($,{label:"total",value:`${u?.evictionCount??0}`}),e.jsx(Ss,{evictions:u?.evictions})]})]}),e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"Cache 载荷"})}),e.jsxs(Z,{className:"space-y-3",children:[e.jsx($,{label:"result payload",value:ue(u?.queryResultPayloadBytes??0)}),e.jsx($,{label:"materialized payload",value:ue(u?.materializedResultPayloadBytes??0)}),e.jsx($,{label:"template bytes",value:ue(u?.queryTemplateBytes??0)}),e.jsx($,{label:"result table/index",value:`${ue(o.queryResultCache?.tableBytes??0)} / ${ue(o.queryResultCache?.indexBytes??0)}`}),e.jsx($,{label:"materialized table/index",value:`${ue(o.materializedResultCache?.tableBytes??0)} / ${ue(o.materializedResultCache?.indexBytes??0)}`})]})]})]}),e.jsx("div",{className:"mb-8",children:e.jsx(Ns,{entries:p,totalCount:u?.scopeVersionCount??0,query:s})}),e.jsx("div",{className:"mb-8",children:e.jsx(Qt,{snapshot:n.benchmarkReports})}),e.jsx(ys,{entries:r})]})}function vs(t){const{snapshot:n}=t,s=n?.available===!1?xs[n.reason]:"无数据";return e.jsx(J,{variant:"bordered",children:e.jsx(Z,{children:e.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[e.jsx(pt,{className:"h-5 w-5 text-yellow-600"}),e.jsx("span",{children:s})]})})})}function Me(t){const n=t.icon;return e.jsx(J,{variant:"bordered",children:e.jsxs(Z,{children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:t.label}),e.jsx(n,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx("div",{className:ae("text-xl font-semibold",t.tone==="good"&&"text-green-600",t.tone==="warn"&&"text-yellow-700"),children:t.value}),e.jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:t.detail})]})})}function $(t){return e.jsxs("div",{className:"flex items-center justify-between gap-4 text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:t.label}),e.jsx("span",{className:"min-w-0 truncate font-mono",children:t.value})]})}function ys(t){return e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"最近慢查询"})}),e.jsx(Z,{className:"p-0",children:t.entries.length===0?e.jsx("div",{className:"px-5 pb-5 pt-4 text-sm text-muted-foreground",children:"暂无慢查询"}):e.jsx("div",{className:"overflow-auto",children:e.jsxs("table",{className:"w-full min-w-[920px] border-collapse text-left text-sm",children:[e.jsx("thead",{className:"border-b border-border text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-5 py-3 font-medium",children:"时间"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"路径"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"耗时"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"扫描"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Cache"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"原因"})]})}),e.jsx("tbody",{children:t.entries.map(n=>e.jsxs("tr",{className:"border-b border-border/60 last:border-0",children:[e.jsx("td",{className:"whitespace-nowrap px-5 py-3 font-mono text-xs",children:Ye(n.generatedAt)}),e.jsxs("td",{className:"px-5 py-3",children:[e.jsx("div",{className:"font-medium",children:n.selectedPath}),e.jsx("div",{className:"mt-1 max-w-[240px] truncate font-mono text-xs text-muted-foreground",children:He(n.queryKey)})]}),e.jsx("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:we(n.runtime.durationMs)}),e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[le(n.runtime.scannedRows)," / ",le(n.runtime.returnedRows)]}),e.jsxs("td",{className:"px-5 py-3",children:[e.jsxs("div",{className:"font-mono text-xs",children:["tpl ",n.cache.templateStatus??"-"," / res ",n.cache.resultStatus??"-"," / mat ",n.cache.materializedStatus??"-"]}),e.jsx("div",{className:"mt-1 max-w-[220px] truncate font-mono text-xs text-muted-foreground",children:Es(n)}),e.jsx("div",{className:"mt-1 max-w-[220px] truncate text-xs text-muted-foreground",children:_s(n)}),e.jsx("div",{className:"mt-1 max-w-[220px] truncate text-xs text-muted-foreground",children:n.cache.scopeBasePath??n.cache.scopeHash}),n.cache.scopePrincipal&&e.jsx("div",{className:"mt-1 max-w-[220px] truncate text-xs text-muted-foreground",children:n.cache.scopePrincipal})]}),e.jsxs("td",{className:"px-5 py-3",children:[e.jsx(Cs,{reasons:n.slowQuery.reasons}),e.jsx(js,{entry:n})]})]},`${n.generatedAt}-${n.queryKey}`))})]})})})]})}function js(t){const n=Ts(t.entry),s=Ls(t.entry);return!n&&!s?null:e.jsxs("div",{className:"mt-2 max-w-[320px] space-y-1 text-xs text-muted-foreground",children:[n&&e.jsx("div",{className:"truncate",children:n}),s&&e.jsx("div",{className:"truncate",children:s})]})}function Ns(t){return e.jsxs(J,{variant:"bordered",children:[e.jsxs(ce,{className:"flex flex-row items-start justify-between gap-3",children:[e.jsx(re,{children:"权限 Scope 明细"}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:[le(t.entries.length)," / ",le(t.totalCount)]})]}),e.jsx(Z,{className:"p-0",children:t.entries.length===0?e.jsx("div",{className:"px-5 pb-5 pt-4 text-sm text-muted-foreground",children:t.query?"没有匹配的缓存 scope":"暂无缓存 scope"}):e.jsx("div",{className:"overflow-auto",children:e.jsxs("table",{className:"w-full min-w-[1020px] border-collapse text-left text-sm",children:[e.jsx("thead",{className:"border-b border-border text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-5 py-3 font-medium",children:"Scope"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Principal"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Base"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"权限"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"版本"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Payload"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Entries"})]})}),e.jsx("tbody",{children:t.entries.map(n=>e.jsxs("tr",{className:"border-b border-border/60 last:border-0",children:[e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono text-xs",children:[e.jsx("div",{children:He(n.scopeHash)}),e.jsxs("div",{className:"mt-1 text-muted-foreground",children:["facts ",n.factsDataVersion]})]}),e.jsx("td",{className:"px-5 py-3",children:e.jsx("div",{className:"max-w-[220px] truncate",children:n.principal??"-"})}),e.jsx("td",{className:"px-5 py-3",children:e.jsx("div",{className:"max-w-[260px] truncate",children:n.basePath??"-"})}),e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono text-xs",children:[n.authorizationModel??"-","/",n.mode??"-"]}),e.jsx("td",{className:"px-5 py-3",children:e.jsx("div",{className:"max-w-[180px] truncate font-mono text-xs",children:n.permissionVersion??"-"})}),e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[e.jsx("div",{children:ue(n.payloadBytes)}),e.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:["r ",ue(n.queryResultPayloadBytes)," / m ",ue(n.materializedResultPayloadBytes)]})]}),e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[le(n.queryResultEntries)," / ",le(n.materializedResultEntries)]})]},`${n.scopeHash}-${n.factsDataVersion}`))})]})})})]})}function Ss(t){const n=Object.entries(t.evictions??{}).filter(([,s])=>s>0);return n.length===0?e.jsx("div",{className:"text-sm text-muted-foreground",children:"暂无淘汰"}):e.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:n.map(([s,o])=>e.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md bg-muted px-3 py-2 text-sm",children:[e.jsx("span",{className:"min-w-0 truncate text-muted-foreground",children:s}),e.jsx("span",{className:"font-mono",children:le(o)})]},s))})}function Qt(t){const n=t.snapshot?.reports??[],s=t.snapshot?.errors??[];return e.jsxs(J,{variant:"bordered",children:[e.jsxs(ce,{className:"flex flex-row items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx(re,{children:"Benchmark 报告"}),e.jsx("div",{className:"mt-1 max-w-[720px] truncate text-sm text-muted-foreground",children:(t.snapshot?.roots??[]).join(", ")||"未配置目录"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(Zn,{className:"h-4 w-4"}),le(t.snapshot?.reportCount??n.length)]})]}),e.jsxs(Z,{className:"p-0",children:[s.length>0&&e.jsxs("div",{className:"border-b border-border px-5 py-3 text-sm text-yellow-700",children:[le(s.length)," 个报告读取失败,最近一个:",s[0].path," - ",s[0].message]}),n.length===0?e.jsx("div",{className:"px-5 pb-5 pt-4 text-sm text-muted-foreground",children:"暂无 benchmark report"}):e.jsx("div",{className:"overflow-auto",children:e.jsxs("table",{className:"w-full min-w-[1180px] border-collapse text-left text-sm",children:[e.jsx("thead",{className:"border-b border-border text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-5 py-3 font-medium",children:"时间"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Profile"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"规模"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Gate"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Ingest"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Refresh"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Cold / Warm"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Storage"})]})}),e.jsx("tbody",{children:n.map(o=>e.jsx(ws,{report:o},`${o.path}-${o.generatedAt}`))})]})})]})]})}function ws(t){const n=t.report,s=n.failedPlanCases.length,o=n.failedConcurrencyCases.length;return e.jsxs("tr",{className:"border-b border-border/60 last:border-0",children:[e.jsxs("td",{className:"whitespace-nowrap px-5 py-3",children:[e.jsx("div",{className:"font-mono text-xs",children:Ye(n.generatedAt)}),e.jsx("div",{className:"mt-1 max-w-[220px] truncate font-mono text-xs text-muted-foreground",children:n.path})]}),e.jsxs("td",{className:"px-5 py-3",children:[e.jsx("div",{className:"font-medium",children:n.rdfAccelerationProfile??n.engine}),e.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:[n.driver??n.engine," / ",n.caseProfile??"-"]}),e.jsx("div",{className:"mt-1 max-w-[220px] truncate text-xs text-muted-foreground",children:n.pgAccelerationFallbackReason??Be(n.pgActiveOperators)})]}),e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[e.jsxs("div",{children:[le(n.seedQuadCount??0)," / ",le(n.targetQuadCount??0)]}),e.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:[n.scale??"-"," / ",n.fullScale===!1?"partial":"full"]})]}),e.jsxs("td",{className:"px-5 py-3",children:[e.jsx(Et,{ok:n.planMatched!==!1&&s===0,label:`plan ${n.planMatched===!1?"fail":"ok"}`}),e.jsx("div",{className:"mt-1",children:e.jsx(Et,{ok:n.concurrencyMatched!==!1&&o===0,label:`conc ${n.concurrency??1}`})}),(s>0||o>0)&&e.jsxs("div",{className:"mt-1 text-xs text-yellow-700",children:["fail ",le(s+o)]})]}),e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[e.jsx("div",{children:we(n.ingestDurationMs??0)}),e.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:["COPY ",le(n.copyRows??0)," / fb ",le(n.copyFallbacks??0)]})]}),e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[e.jsx("div",{children:we(n.refreshDurationMs??0)}),e.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:["planner ",we(n.plannerStatsDurationMs??0)," / ",le(n.plannerStatsAnalyzedTables?.length??0)]})]}),e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[e.jsxs("div",{children:[we(n.coldStartDurationMs??0)," / ",we(n.firstQueryDurationMs??0)]}),e.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:["p50/p95 ",we(n.warmP50DurationMs??0)," / ",we(n.warmP95DurationMs??0)]})]}),e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[e.jsx("div",{children:ct(n.storageTotalToFactsRatio??0)}),e.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:ue(n.storageTotalBytes??0)})]})]})}function Et(t){return e.jsx("span",{className:ae("inline-flex rounded-md px-2 py-0.5 text-xs",t.ok?"bg-green-100 text-green-700":"bg-yellow-100 text-yellow-800"),children:t.label})}function Cs(t){return e.jsx("div",{className:"flex max-w-[320px] flex-wrap gap-1.5",children:t.reasons.map(n=>e.jsx("span",{className:"rounded-md bg-yellow-100 px-2 py-0.5 text-xs text-yellow-800",children:n},n))})}function ue(t){if(!Number.isFinite(t)||t<=0)return"0 B";const n=["B","KiB","MiB","GiB","TiB"];let s=t,o=0;for(;s>=1024&&o<n.length-1;)s/=1024,o+=1;return`${s>=10||o===0?s.toFixed(0):s.toFixed(1)} ${n[o]}`}function ct(t){return Number.isFinite(t)?`${t.toFixed(2)}x`:"0.00x"}function Fe(t){return Number.isFinite(t)?`${Math.round(t*100)}%`:"0%"}function _t(t){const n=t?.hitCount??0,s=t?.missCount??0,o=n+s;return o<=0?"-":`${Fe(n/o)} (${le(n)}/${le(o)})`}function Es(t){const n=t.cache.materialized?.key;if(n)return`mat ${He(n)}`;const s=t.cache.result?.key??t.queryKey;return`res ${He(s)}`}function _s(t){const n=t.derivedCache,s=Fe(n.cachePressure),o=Fe(n.largestScopePressure),c=n.evictionCount;return`pressure ${s} / scope ${o} / evict ${le(c)}`}function Ts(t){const n=t.histogramHints??[];if(n.length===0)return"";const s=n.map(o=>`${o.kind}:${le(o.quadCount)}`);return`hist ${le(n.length)} ${Be(s)}`}function Ls(t){const n=t.rejectedNativeOperators??[];if(n.length===0)return"";const s=n.map(o=>`${o.capability}:${o.reason}`);return`native rejected ${le(n.length)} ${Be(s)}`}function we(t){return Number.isFinite(t)?`${Math.round(t)} ms`:"0 ms"}function le(t){return Number.isFinite(t)?new Intl.NumberFormat().format(t):"0"}function Ye(t){const n=new Date(t);return Number.isNaN(n.getTime())?t:n.toLocaleString()}function He(t){return t.length<=16?t:`${t.slice(0,12)}...${t.slice(-4)}`}function Be(t){return t?.length?t.length<=2?t.join(", "):`${t.slice(0,2).join(", ")} +${t.length-2}`:"-"}function yF(){return e.jsx(bn,{})}const Rs={healthy:"border-green-200 bg-green-50 text-green-700 dark:border-green-900 dark:bg-green-950/40 dark:text-green-300",degraded:"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-300",failed:"border-destructive/30 bg-destructive/10 text-destructive",unknown:"border-border bg-muted text-muted-foreground"};function Ge(t){const{state:n,children:s,className:o}=t;return e.jsx("span",{className:ae("inline-flex items-center rounded-md border px-2 py-1 text-xs font-medium",Rs[n],o),children:s})}const Ps=a.createContext(null);function Yt(){return a.useContext(Ps)}function Ds(t,n,s){const o=ks(t.XPOD_TUNNEL_PROFILES,s);if(o)return o;switch(n){case"ngrok":return t.NGROK_URL||"未配置";case"cloudflare":return t.CLOUDFLARE_TUNNEL_URL||t.XPOD_TUNNEL_PUBLIC_URL||"未配置";case"sakura_frp":return t.SAKURA_TUNNEL_URL||t.XPOD_TUNNEL_PUBLIC_URL||"未配置";case"frp":return t.FRP_TUNNEL_URL||"未配置";default:return"未配置"}}function ks(t,n){if(!t||!n||n==="none")return"";try{const s=JSON.parse(t);if(!Array.isArray(s))return"";const o=s.find(r=>r&&typeof r=="object"&&!Array.isArray(r)&&r.id===n);return(typeof o?.publicUrl=="string"?o.publicUrl.trim():"")||""}catch{return""}}function We(t){switch(t){case"healthy":return"可用";case"degraded":return"降级";case"failed":return"失败";default:return"未知"}}function Tt(t){return t?t.status==="running"?"healthy":t.status==="starting"?"degraded":"failed":"unknown"}function Os(t,n){return t?n?"healthy":"failed":"unknown"}function Lt(t){if(!t)return"未知";const n=Math.floor(t/1e3),s=Math.floor(n/60),o=Math.floor(s/60);return o>0?`${o}h ${s%60}m`:s>0?`${s}m ${n%60}s`:`${n}s`}function As(t){return["Public","User tunnel","LAN","Loopback"].map(s=>t.find(o=>o.name===s&&o.state==="healthy")).find(s=>!!s)??t.find(s=>s.state==="degraded")??t.find(s=>s.state==="unknown")??null}function Is(t){try{const n=new URL(t).hostname;if(n==="localhost"||n==="::1"||n.startsWith("127.")||n.startsWith("10.")||n.startsWith("192.168."))return!0;const s=n.match(/^172\.(\d+)\./u);return s?Number(s[1])>=16&&Number(s[1])<=31:!1}catch{return!1}}function qs(t){return e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"访问路径"})}),e.jsx(Z,{children:e.jsx("div",{"data-testid":"runtime-access-path-list",className:"divide-y divide-border rounded-xl border border-border",children:t.routes.map(n=>e.jsxs("div",{"data-testid":"runtime-access-path-row","data-route-name":n.name,className:"flex min-w-0 flex-col gap-3 p-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-sm font-medium",children:n.label}),e.jsx("div",{className:"mt-1 min-w-0 break-all font-mono text-xs text-muted-foreground",title:n.target,children:n.target}),e.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:n.detail})]}),e.jsx("div",{className:"shrink-0 sm:self-start",children:e.jsx(Ge,{state:n.state,children:n.statusLabel??We(n.state)})})]},n.name))})})]})}function Ms(t){return e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"完整路径详情"})}),e.jsx(Z,{children:e.jsx("div",{className:"overflow-x-auto rounded-md border border-border",children:e.jsxs("table",{className:"w-full min-w-[720px] text-sm",children:[e.jsx("thead",{className:"bg-muted/60 text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"路径"}),e.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"目标"}),e.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"状态"}),e.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"证据"})]})}),e.jsx("tbody",{className:"divide-y divide-border",children:t.routes.map(n=>e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2 font-medium",children:n.label}),e.jsx("td",{className:"px-3 py-2 font-mono text-xs break-all",children:n.target}),e.jsx("td",{className:"px-3 py-2",children:e.jsx(Ge,{state:n.state,children:n.statusLabel??We(n.state)})}),e.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:n.detail})]},n.name))})]})})})]})}function Us(t){if(!t.servicesKnown||t.servicesHealthy&&!t.publicAccessProblem)return null;const n=!t.servicesHealthy,s=n?"服务异常":"外部访问异常",o=n?"Solid Server 或 API Server 未运行,当前无法正常使用 Xpod。请先查看日志。":"Xpod 在本机运行正常,但从外网暂时无法访问。请检查公网域名、端口映射或用户隧道。";return e.jsxs(J,{variant:"bordered",className:"border-amber-200 bg-amber-50/60 dark:border-amber-900 dark:bg-amber-950/20",children:[e.jsx(ce,{children:e.jsx(re,{children:s})}),e.jsxs(Z,{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-amber-800 dark:text-amber-200",children:o}),n?e.jsx(pe,{variant:"secondary",onClick:()=>window.location.assign("/status/logs"),children:"查看日志"}):e.jsx(pe,{variant:"secondary",onClick:()=>window.location.assign("/network"),children:"打开网络设置"})]})]})}function jF(){const t=Yt(),[n,s]=a.useState(null),[o,c]=a.useState(null),[r,u]=a.useState(null),[p,f]=a.useState(null),[h,y]=a.useState(null),[N,C]=a.useState(!0),[_,L]=a.useState(""),[T,g]=a.useState(""),[b,S]=a.useState(null),v=a.useCallback(R=>{s(R.servicesData),c(R.adminData),u(R.configData),f(R.ddnsData),y(R.publicCheck),S(R.checkedAt),g(""),C(!1)},[]),x=a.useCallback(async()=>{try{v(await St())}catch{g("状态加载失败,请查看日志或稍后刷新。"),C(!1)}},[v]),M=a.useCallback(async()=>{C(!0),await x()},[x]);a.useEffect(()=>{if(t)return;let R=!1;return St().then(me=>{R||v(me)}).catch(()=>{R||(g("状态加载失败,请查看日志或稍后刷新。"),C(!1))}),()=>{R=!0}},[v,t]);const P=t?.snapshot,k=P?.servicesData??n,U=P?.adminData??o,I=P?.configData??r,F=P?.ddnsData??p,te=P?.publicCheck??h,l=P?.checkedAt??b,i=t?t.loading&&!P:N,d=t?.error??T,j=k?.find(R=>R.name==="css"),E=k?.find(R=>R.name==="api"),w=k?"healthy":"unknown",A=Tt(j),X=Tt(E),O=A==="healthy"&&X==="healthy",H=I?.env??{},K=H.XPOD_TUNNEL_PROVIDER||F?.tunnelProvider||"none",ie=H.XPOD_TUNNEL_ACTIVE_PROFILE_ID||K,Q=Nn(H,F,window.location.origin),oe=Is(Q),ne=Ds(H,K,ie),he=a.useMemo(()=>{const R=te?.status==="pass"?"healthy":oe?"unknown":te?.status==="fail"?"failed":"unknown",me=K==="none"?"unknown":F?.mode==="tunnel"||ne!=="未配置"?"healthy":"degraded";return[{name:"Loopback",label:"本机",target:`http://127.0.0.1:${H.CSS_PORT||"3000"}`,state:Os(k,O),detail:k?O?"当前设备可以使用。":"核心服务未运行。":"正在检查本机服务。"},{name:"LAN",label:"局域网",target:F?.ipv4?`http://${F.ipv4}:${H.CSS_PORT||"3000"}`:"等待本机地址上报",state:F?.ipv4&&O?"healthy":"unknown",detail:F?.ipv4?"同一网络中的设备可以使用这个地址。":"尚未发现局域网地址。"},{name:"Public",label:"公网",target:Q,state:R,statusLabel:oe?"未配置":void 0,detail:oe?"尚未开放公网访问。目前可以在本机或局域网使用。":te?.detail||"尚未检查外网是否可以访问。"},{name:"User tunnel",label:"用户隧道",target:ne,state:me,statusLabel:K==="none"?"未启用":void 0,detail:K==="none"?"未启用远程访问隧道。":`已启用 ${K}。`},{name:"P2P backup",label:"P2P 备用",target:"信令协调的原生客户端",state:"unknown",statusLabel:"备用",detail:"备用连接方式,浏览器不会默认使用。"}]},[O,Q,F,H.CSS_PORT,oe,te,k,K,ne]),D=!oe&&he.some(R=>(R.name==="Public"||R.name==="User tunnel")&&R.state==="failed"),B=k?O?D?"degraded":"healthy":"failed":"unknown",se=As(he),z=[{name:"Gateway",state:w,detail:k?"当前控制台可访问":"等待网关状态上报",uptime:l?`检查于 ${l.toLocaleTimeString()}`:"等待检查"},{name:"Solid Server",state:A,detail:j?.pid?`PID ${j.pid}`:"CSS 请求处理与 Pod 数据服务",uptime:Lt(j?.uptime)},{name:"API Server",state:X,detail:E?.pid?`PID ${E.pid}`:"管理 API 与本机控制能力",uptime:Lt(E?.uptime)}],W=async()=>{const R={lastCheckedAt:l?.toISOString()??null,services:k,adminStatus:U,ddnsStatus:F,publicIpCheck:te,routes:he,stableDataUrl:Q,recommendedRoute:se,sanitizedConfig:I?{env:I.env,secrets:I.secrets??{}}:null};await navigator.clipboard.writeText(JSON.stringify(R,null,2)),L("状态 JSON 已复制")},V=async()=>{await navigator.clipboard.writeText(Q),L("稳定资料入口已复制")};return e.jsxs("div",{className:"p-4 sm:p-8 max-w-6xl space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"type-h1",children:"状态"}),e.jsx("p",{className:"mt-2 max-w-[65ch] text-sm text-muted-foreground",children:"查看 Xpod 是否正常运行,以及当前可以从哪里访问。"})]}),e.jsxs("div",{"data-testid":"status-page-actions",className:"flex items-center gap-1 self-end lg:shrink-0 lg:self-start",children:[e.jsx(pe,{type:"button",variant:"ghost",size:"icon","aria-label":"刷新状态",title:"刷新状态",onClick:()=>t?t.refresh():void M(),disabled:i||t?.refreshing,children:e.jsx(it,{className:`h-4 w-4 ${i||t?.refreshing?"animate-spin":""}`,"aria-hidden":"true"})}),e.jsx(pe,{type:"button",variant:"ghost",size:"icon","aria-label":"复制状态 JSON",title:"复制状态 JSON",onClick:()=>{W()},children:e.jsx(Nt,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),_?e.jsx("p",{className:"text-sm text-green-700 dark:text-green-300",children:_}):null,d?e.jsx("div",{className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:d}):null,e.jsx(J,{variant:"bordered",children:e.jsx(Z,{className:"pt-5",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Ge,{state:B,children:We(B)}),e.jsx("div",{className:"text-2xl font-semibold",children:"Xpod runtime"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:l?`最后检查: ${l.toLocaleString()}`:"等待第一次检查。"}),e.jsxs("div",{className:"pt-3",children:[e.jsx("div",{className:"text-sm font-medium",children:"稳定资料入口"}),e.jsxs("div",{"data-testid":"stable-entry-row",className:"mt-1 flex min-w-0 items-center gap-1 rounded-md border border-border bg-muted/30 p-1 pl-3",children:[e.jsx("div",{className:"min-w-0 flex-1 break-all font-mono text-sm",children:Q||"等待稳定入口"}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[e.jsx(pe,{type:"button",variant:"ghost",size:"icon","aria-label":"复制入口 URL",title:"复制入口 URL",onClick:()=>{V()},disabled:!Q,children:e.jsx(Nt,{className:"h-4 w-4","aria-hidden":"true"})}),e.jsx(pe,{type:"button",variant:"ghost",size:"icon","aria-label":"打开入口",title:"打开入口",onClick:()=>window.open(Q,"_blank"),disabled:!Q,children:e.jsx(kn,{className:"h-4 w-4","aria-hidden":"true"})})]})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium",children:"当前建议路径"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:se?`${se.label}: ${se.detail}`:"正在检查可用的访问方式。"})]})]}),e.jsxs("div",{className:"border-t border-border pt-5",children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("div",{className:"text-base font-semibold",children:"Services"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"核心运行服务,不包含访问路径或隧道。"})]}),e.jsx("div",{"data-testid":"runtime-services-list",className:"divide-y divide-border rounded-xl border border-border",children:z.map(R=>e.jsxs("div",{"data-testid":"runtime-service-row","data-service-name":R.name,className:"flex min-w-0 flex-col gap-2 p-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:R.name}),e.jsx(Ge,{state:R.state,children:We(R.state)})]}),e.jsx("div",{className:"mt-1 break-words text-xs text-muted-foreground",children:R.detail})]}),e.jsxs("div",{className:"shrink-0 text-xs text-muted-foreground sm:text-right",children:[e.jsx("span",{className:"text-muted-foreground",children:"uptime"}),e.jsx("span",{className:"ml-2 font-mono",children:R.uptime})]})]},R.name))})]})]})})}),e.jsx(Us,{servicesKnown:!!k,servicesHealthy:O,publicAccessProblem:D}),e.jsx("div",{"data-testid":"runtime-access-paths",children:e.jsx(qs,{routes:he})}),e.jsx(Ms,{routes:he}),e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"Cloud 协调"})}),e.jsxs(Z,{className:"space-y-2 text-sm",children:[e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"nodeId"}),e.jsx("span",{className:"font-mono break-all",children:H.XPOD_NODE_ID||"未上报"})]}),e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"spDomain"}),e.jsx("span",{className:"font-mono break-all",children:H.XPOD_SP_DOMAIN||F?.fqdn||"未分配"})]}),e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"DDNS"}),e.jsx("span",{children:F?.detail||"未上报"})]}),e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"heartbeat"}),e.jsx("span",{children:F?.enabled?"已启用":"未启用或未上报"})]}),e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"模式"}),e.jsx("span",{children:F?.mode||"unknown"})]}),e.jsx("p",{className:"pt-2 text-muted-foreground",children:"Cloud 负责稳定域名和 IDP,本地 SP 负责数据存储与实际接入。"})]})]}),e.jsxs(J,{variant:"bordered",className:"bg-muted/30",children:[e.jsx(ce,{children:e.jsx(re,{children:"配置摘要"})}),e.jsxs(Z,{className:"space-y-2 text-sm",children:[e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"edition"}),e.jsx("span",{children:U?.env.XPOD_EDITION||"local"})]}),e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"baseUrl"}),e.jsx("span",{className:"font-mono break-all",children:Q})]}),e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"storage"}),e.jsx("span",{className:"font-mono break-all",children:H.CSS_ROOT_FILE_PATH||"./data"})]}),e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"provider"}),e.jsx("span",{children:K})]}),e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"tunnelProfile"}),e.jsx("span",{children:ie})]}),e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"secrets"}),e.jsxs("span",{children:[Object.entries(I?.secrets??{}).filter(([,R])=>R.configured).length," 个已配置"]})]})]})]}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:["修改运行方式时,请进入 ",e.jsx(vn,{className:"text-primary underline-offset-4 hover:underline",to:"/services/configuration",children:"配置"}),"。"]})]})}var $s=Object.defineProperty,fe=(t,n)=>$s(t,"name",{value:n,configurable:!0});function Jt(t){const n=t+"CollectionProvider",[s,o]=dt(n),[c,r]=s(n,{collectionRef:{current:null},itemMap:new Map}),u=fe(T=>{const{scope:g,children:b}=T,S=a.useRef(null),v=a.useRef(new Map).current;return e.jsx(c,{scope:g,itemMap:v,collectionRef:S,children:b})},"CollectionProvider");u.displayName=n;const p=t+"CollectionSlot",f=Ue(p),h=a.forwardRef((T,g)=>{const{scope:b,children:S}=T,v=r(p,b),x=ye(g,v.collectionRef);return e.jsx(f,{ref:x,children:S})});h.displayName=p;const y=t+"CollectionItemSlot",N="data-radix-collection-item",C=Ue(y),_=a.forwardRef((T,g)=>{const{scope:b,children:S,...v}=T,x=a.useRef(null),M=ye(g,x),P=r(y,b);return a.useEffect(()=>(P.itemMap.set(x,{ref:x,...v}),()=>{P.itemMap.delete(x)})),e.jsx(C,{[N]:"",ref:M,children:S})});_.displayName=y;function L(T){const g=r(t+"CollectionConsumer",T);return a.useCallback(()=>{const S=g.collectionRef.current;if(!S)return[];const v=Array.from(S.querySelectorAll(`[${N}]`));return Array.from(g.itemMap.values()).sort((P,k)=>v.indexOf(P.ref.current)-v.indexOf(k.ref.current))},[g.collectionRef,g.itemMap])}return fe(L,"useCollection"),[{Provider:u,Slot:h,ItemSlot:_},L,o]}fe(Jt,"createCollection");var Rt=new WeakMap,de,ve,tt=(ve=class extends Map{constructor(s){super(s);jt(this,de);et(this,de,[...super.keys()]),Rt.set(this,!0)}set(s,o){return Rt.get(this)&&(this.has(s)?xe(this,de)[xe(this,de).indexOf(s)]=s:xe(this,de).push(s)),super.set(s,o),this}insert(s,o,c){const r=this.has(o),u=xe(this,de).length,p=mt(s);let f=p>=0?p:u+p;const h=f<0||f>=u?-1:f;if(h===this.size||r&&h===this.size-1||h===-1)return this.set(o,c),this;const y=this.size+(r?0:1);p<0&&f++;const N=[...xe(this,de)];let C,_=!1;for(let L=f;L<y;L++)if(f===L){let T=N[L];N[L]===o&&(T=N[L+1]),r&&this.delete(o),C=this.get(T),this.set(o,c)}else{!_&&N[L-1]===o&&(_=!0);const T=N[_?L:L-1],g=C;C=this.get(T),this.delete(T),this.set(T,g)}return this}with(s,o,c){const r=new ve(this);return r.insert(s,o,c),r}before(s){const o=xe(this,de).indexOf(s)-1;if(!(o<0))return this.entryAt(o)}setBefore(s,o,c){const r=xe(this,de).indexOf(s);return r===-1?this:this.insert(r,o,c)}after(s){let o=xe(this,de).indexOf(s);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(s,o,c){const r=xe(this,de).indexOf(s);return r===-1?this:this.insert(r+1,o,c)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return et(this,de,[]),super.clear()}delete(s){const o=super.delete(s);return o&&xe(this,de).splice(xe(this,de).indexOf(s),1),o}deleteAt(s){const o=this.keyAt(s);return o!==void 0?this.delete(o):!1}at(s){const o=Xe(xe(this,de),s);if(o!==void 0)return this.get(o)}entryAt(s){const o=Xe(xe(this,de),s);if(o!==void 0)return[o,this.get(o)]}indexOf(s){return xe(this,de).indexOf(s)}keyAt(s){return Xe(xe(this,de),s)}from(s,o){const c=this.indexOf(s);if(c===-1)return;let r=c+o;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(s,o){const c=this.indexOf(s);if(c===-1)return;let r=c+o;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(s,o){let c=0;for(const r of this){if(Reflect.apply(s,o,[r,c,this]))return r;c++}}findIndex(s,o){let c=0;for(const r of this){if(Reflect.apply(s,o,[r,c,this]))return c;c++}return-1}filter(s,o){const c=[];let r=0;for(const u of this)Reflect.apply(s,o,[u,r,this])&&c.push(u),r++;return new ve(c)}map(s,o){const c=[];let r=0;for(const u of this)c.push([u[0],Reflect.apply(s,o,[u,r,this])]),r++;return new ve(c)}reduce(...s){const[o,c]=s;let r=0,u=c??this.at(0);for(const p of this)r===0&&s.length===1?u=p:u=Reflect.apply(o,this,[u,p,r,this]),r++;return u}reduceRight(...s){const[o,c]=s;let r=c??this.at(-1);for(let u=this.size-1;u>=0;u--){const p=this.at(u);u===this.size-1&&s.length===1?r=p:r=Reflect.apply(o,this,[r,p,u,this])}return r}toSorted(s){const o=[...this.entries()].sort(s);return new ve(o)}toReversed(){const s=new ve;for(let o=this.size-1;o>=0;o--){const c=this.keyAt(o),r=this.get(c);s.set(c,r)}return s}toSpliced(...s){const o=[...this.entries()];return o.splice(...s),new ve(o)}slice(s,o){const c=new ve;let r=this.size-1;if(s===void 0)return c;s<0&&(s=s+this.size),o!==void 0&&o>0&&(r=o-1);for(let u=s;u<=r;u++){const p=this.keyAt(u),f=this.get(p);c.set(p,f)}return c}every(s,o){let c=0;for(const r of this){if(!Reflect.apply(s,o,[r,c,this]))return!1;c++}return!0}some(s,o){let c=0;for(const r of this){if(Reflect.apply(s,o,[r,c,this]))return!0;c++}return!1}},de=new WeakMap,fe(ve,"OrderedDict"),ve);function Xe(t,n){if("at"in Array.prototype)return Array.prototype.at.call(t,n);const s=Zt(t,n);return s===-1?void 0:t[s]}fe(Xe,"at");function Zt(t,n){const s=t.length,o=mt(n),c=o>=0?o:s+o;return c<0||c>=s?-1:c}fe(Zt,"toSafeIndex");function mt(t){return t!==t||t===0?0:Math.trunc(t)}fe(mt,"toSafeInteger");function Fs(t){const n=t+"CollectionProvider",[s,o]=dt(n),[c,r]=s(n,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new tt,setItemMap:fe(()=>{},"setItemMap")}),u=fe(({state:v,...x})=>v?e.jsx(f,{...x,state:v}):e.jsx(p,{...x}),"CollectionProvider");u.displayName=n;const p=fe(v=>{const x=g();return e.jsx(f,{...v,state:x})},"CollectionInit");p.displayName=n+"Init";const f=fe(v=>{const{scope:x,children:M,state:P}=v,k=a.useRef(null),[U,I]=a.useState(null),F=ye(k,I),[te,l]=P;return a.useEffect(()=>{if(!U)return;const i=nn(()=>{});return i.observe(U,{childList:!0,subtree:!0}),()=>{i.disconnect()}},[U]),e.jsx(c,{scope:x,itemMap:te,setItemMap:l,collectionRef:F,collectionRefObject:k,collectionElement:U,children:M})},"CollectionProviderImpl");f.displayName=n+"Impl";const h=t+"CollectionSlot",y=Ue(h),N=a.forwardRef((v,x)=>{const{scope:M,children:P}=v,k=r(h,M),U=ye(x,k.collectionRef);return e.jsx(y,{ref:U,children:P})});N.displayName=h;const C=t+"CollectionItemSlot",_="data-radix-collection-item",L=Ue(C),T=a.forwardRef((v,x)=>{const{scope:M,children:P,...k}=v,U=a.useRef(null),[I,F]=a.useState(null),te=ye(x,U,F),l=r(C,M),{setItemMap:i}=l,d=a.useRef(k);en(d.current,k)||(d.current=k);const j=d.current;return a.useEffect(()=>{const E=j;return i(w=>I?w.has(I)?w.set(I,{...E,element:I}).toSorted(rt):(w.set(I,{...E,element:I}),w.toSorted(rt)):w),()=>{i(w=>!I||!w.has(I)?w:(w.delete(I),new tt(w)))}},[I,j,i]),e.jsx(L,{[_]:"",ref:te,children:P})});T.displayName=C;function g(){return a.useState(new tt)}fe(g,"useInitCollection");function b(v){const{itemMap:x}=r(t+"CollectionConsumer",v);return x}return fe(b,"useCollection"),[{Provider:u,Slot:N,ItemSlot:T},{createCollectionScope:o,useCollection:b,useInitCollection:g}]}fe(Fs,"createCollection");function en(t,n){if(t===n)return!0;if(typeof t!="object"||typeof n!="object"||t==null||n==null)return!1;const s=Object.keys(t),o=Object.keys(n);if(s.length!==o.length)return!1;for(const c of s)if(!Object.prototype.hasOwnProperty.call(n,c)||t[c]!==n[c])return!1;return!0}fe(en,"shallowEqual");function tn(t,n){return!!(n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}fe(tn,"isElementPreceding");function rt(t,n){return!t[1].element||!n[1].element?0:tn(t[1].element,n[1].element)?-1:1}fe(rt,"sortByDocumentPosition");function nn(t){return new MutationObserver(s=>{for(const o of s)if(o.type==="childList"){t();return}})}fe(nn,"getChildListObserver");var Hs=Object.defineProperty,Bs=(t,n)=>Hs(t,"name",{value:n,configurable:!0});function sn(t){const n=a.useRef({value:t,previous:t});return a.useMemo(()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous),[t])}Bs(sn,"usePrevious");var Vs=Object.defineProperty,G=(t,n)=>Vs(t,"name",{value:n,configurable:!0}),Ks=[" ","Enter","ArrowUp","ArrowDown"],zs=[" ","Enter"],qe="Select",[Je,ft,Xs]=Jt(qe),[Ae,NF]=dt(qe,[Xs,Gt]),ht=Gt(),[Gs,Re]=Ae(qe),[Ws,Qs]=Ae(qe);function on(t){const{__scopeSelect:n,children:s,open:o,defaultOpen:c,onOpenChange:r,value:u,defaultValue:p,onValueChange:f,dir:h,name:y,autoComplete:N,disabled:C,required:_,form:L,internal_do_not_use_render:T}=t,g=ht(n),[b,S]=a.useState(null),[v,x]=a.useState(null),[M,P]=a.useState(!1),k=Wt(h),[U,I]=wt({prop:o,defaultProp:c??!1,onChange:r,caller:qe}),[F,te]=wt({prop:u,defaultProp:p,onChange:f,caller:qe}),l=a.useRef(null),i=a.useRef(F);a.useEffect(()=>{const K=L?b?.ownerDocument.getElementById(L):b?.form;if(K instanceof HTMLFormElement){const ie=G(()=>te(i.current),"reset");return K.addEventListener("reset",ie),()=>K.removeEventListener("reset",ie)}},[L,b,te]);const d=b?!!L||!!b.closest("form"):!0,[j,E]=a.useState(new Set),w=Xt(),A=Array.from(j).map(K=>K.props.value).join(";"),X=a.useCallback(K=>{E(ie=>new Set(ie).add(K))},[]),O=a.useCallback(K=>{E(ie=>{const Q=new Set(ie);return Q.delete(K),Q})},[]),H={required:_,trigger:b,onTriggerChange:S,valueNode:v,onValueNodeChange:x,valueNodeHasChildren:M,onValueNodeHasChildrenChange:P,contentId:w,value:F,onValueChange:te,open:U,onOpenChange:I,dir:k,triggerPointerDownPosRef:l,disabled:C,name:y,autoComplete:N,form:L,nativeOptions:j,nativeSelectKey:A,isFormControl:d};return e.jsx(Vn,{...g,children:e.jsx(Gs,{scope:n,...H,children:e.jsx(Je.Provider,{scope:n,children:e.jsx(Ws,{scope:n,onNativeOptionAdd:X,onNativeOptionRemove:O,children:pn(T)?T(H):s})})})})}G(on,"SelectProvider");var Ys=G(t=>{const{__scopeSelect:n,children:s,...o}=t;return e.jsx(on,{__scopeSelect:n,...o,internal_do_not_use_render:({isFormControl:c})=>e.jsxs(e.Fragment,{children:[s,c?e.jsx(No,{__scopeSelect:n}):null]})})},"Select"),Js="SelectTrigger",cn=a.forwardRef(G(function(n,s){const{__scopeSelect:o,disabled:c=!1,...r}=n,u=ht(o),p=Re(Js,o),f=p.disabled||c,h=ye(s,p.onTriggerChange),y=ft(o),N=a.useRef("touch"),[C,_,L]=xt(g=>{const b=y().filter(x=>!x.disabled),S=b.find(x=>x.value===p.value),v=gt(b,g,S);v!==void 0&&p.onValueChange(v.value)}),T=G(g=>{f||(p.onOpenChange(!0),L()),g&&(p.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})},"handleOpen");return e.jsx(On,{asChild:!0,...u,children:e.jsx(Ee.button,{type:"button",role:"combobox","aria-controls":p.open?p.contentId:void 0,"aria-expanded":p.open,"aria-required":p.required,"aria-autocomplete":"none",dir:p.dir,"data-state":p.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":Ve(p.value)?"":void 0,...r,ref:h,onClick:be(r.onClick,g=>{g.currentTarget.focus(),N.current!=="mouse"&&T(g)}),onPointerDown:be(r.onPointerDown,g=>{N.current=g.pointerType;const b=g.target;b.hasPointerCapture(g.pointerId)&&b.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(T(g),g.preventDefault())}),onKeyDown:be(r.onKeyDown,g=>{const b=C.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&_(g.key),!(b&&g.key===" ")&&Ks.includes(g.key)&&(T(),g.preventDefault())})})})},"SelectTrigger")),Zs="SelectValue",eo=a.forwardRef(G(function(n,s){const{__scopeSelect:o,className:c,style:r,children:u,placeholder:p="",...f}=n,h=Re(Zs,o),{onValueNodeHasChildrenChange:y}=h,N=u!==void 0,C=ye(s,h.onValueNodeChange);$e(()=>{y(N)},[y,N]);const _=Ve(h.value);return e.jsx(Ee.span,{...f,asChild:_?!1:f.asChild,ref:C,style:{pointerEvents:"none"},children:e.jsx(a.Fragment,{children:_?p:u},_?"placeholder":"value")})},"SelectValue")),to=a.forwardRef(G(function(n,s){const{__scopeSelect:o,children:c,...r}=n;return e.jsx(Ee.span,{"aria-hidden":!0,...r,ref:s,children:c||"▼"})},"SelectIcon")),no="SelectPortal",[so,oo]=Ae(no,{forceMount:void 0}),co=G(t=>{const{__scopeSelect:n,forceMount:s,...o}=t;return e.jsx(so,{scope:t.__scopeSelect,forceMount:s,children:e.jsx(An,{asChild:!0,...o})})},"SelectPortal"),Oe="SelectContent",rn=a.forwardRef(G(function(n,s){const o=oo(Oe,n.__scopeSelect),{forceMount:c=o.forceMount,...r}=n,u=Re(Oe,n.__scopeSelect),[p,f]=a.useState();return $e(()=>{f(new DocumentFragment)},[]),e.jsx(In,{present:c||u.open,children:({present:h})=>h?e.jsx(lo,{...r,ref:s}):e.jsx(ro,{...r,fragment:p})})},"SelectContent")),ro=a.forwardRef(G(function(n,s){const{__scopeSelect:o,children:c,fragment:r}=n;return r?zt.createPortal(e.jsx(an,{scope:o,children:e.jsx(Je.Slot,{scope:o,children:e.jsx("div",{ref:s,children:c})})}),r):null},"SelectContentFragment")),Ne=10,[an,Ze]=Ae(Oe),ao=Ue("SelectContent.RemoveScroll"),lo=a.forwardRef(G(function(n,s){const{__scopeSelect:o}=n,{position:c="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:u,onPointerDownOutside:p,side:f,sideOffset:h,align:y,alignOffset:N,arrowPadding:C,collisionBoundary:_,collisionPadding:L,sticky:T,hideWhenDetached:g,avoidCollisions:b,...S}=n,v=Re(Oe,o),[x,M]=a.useState(null),[P,k]=a.useState(null),U=ye(s,M),[I,F]=a.useState(null),[te,l]=a.useState(null),i=ft(o),[d,j]=a.useState(!1),E=a.useRef(!1);a.useEffect(()=>{if(x)return qn(x)},[x]),Mn();const w=a.useCallback(D=>{const[B,...se]=i().map(V=>V.ref.current),[z]=se.slice(-1),W=document.activeElement;for(const V of D)if(V===W||(V?.scrollIntoView({block:"nearest"}),V===B&&P&&(P.scrollTop=0),V===z&&P&&(P.scrollTop=P.scrollHeight),V?.focus(),document.activeElement!==W))return},[i,P]),A=a.useCallback(()=>w([I,x]),[w,I,x]);a.useEffect(()=>{d&&A()},[d,A]);const{onOpenChange:X,triggerPointerDownPosRef:O}=v;a.useEffect(()=>{if(x){let D={x:0,y:0};const B=G(z=>{D={x:Math.abs(Math.round(z.pageX)-(O.current?.x??0)),y:Math.abs(Math.round(z.pageY)-(O.current?.y??0))}},"handlePointerMove"),se=G(z=>{D.x<=10&&D.y<=10?z.preventDefault():z.composedPath().includes(x)||X(!1),document.removeEventListener("pointermove",B),O.current=null},"handlePointerUp");return O.current!==null&&(document.addEventListener("pointermove",B),document.addEventListener("pointerup",se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",B),document.removeEventListener("pointerup",se,{capture:!0})}}},[x,X,O]),a.useEffect(()=>{const D=G(()=>X(!1),"close");return window.addEventListener("blur",D),window.addEventListener("resize",D),()=>{window.removeEventListener("blur",D),window.removeEventListener("resize",D)}},[X]);const[H,K]=xt(D=>{const B=i().filter(W=>!W.disabled),se=B.find(W=>W.ref.current===document.activeElement),z=gt(B,D,se);z&&setTimeout(()=>z.ref.current?.focus())}),ie=a.useCallback((D,B,se)=>{const z=!E.current&&!se;(v.value!==void 0&&v.value===B||z)&&(F(D),z&&(E.current=!0))},[v.value]),Q=a.useCallback(()=>x?.focus(),[x]),oe=a.useCallback((D,B,se)=>{const z=!E.current&&!se;(v.value!==void 0&&v.value===B||z)&&l(D)},[v.value]),ne=c==="popper"?Pt:io,he=ne===Pt?{side:f,sideOffset:h,align:y,alignOffset:N,arrowPadding:C,collisionBoundary:_,collisionPadding:L,sticky:T,hideWhenDetached:g,avoidCollisions:b}:{};return e.jsx(an,{scope:o,content:x,viewport:P,onViewportChange:k,itemRefCallback:ie,selectedItem:I,onItemLeave:Q,itemTextRefCallback:oe,focusSelectedItem:A,selectedItemText:te,position:c,isPositioned:d,searchRef:H,children:e.jsx(Un,{as:ao,allowPinchZoom:!0,children:e.jsx($n,{asChild:!0,trapped:v.open,onMountAutoFocus:D=>{D.preventDefault()},onUnmountAutoFocus:be(r,D=>{v.trigger?.focus({preventScroll:!0}),D.preventDefault()}),children:e.jsx(Fn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:D=>D.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:e.jsx(ne,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:D=>D.preventDefault(),...S,...he,onPlaced:()=>j(!0),ref:U,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:be(S.onKeyDown,D=>{const B=D.ctrlKey||D.altKey||D.metaKey;if(D.key==="Tab"&&D.preventDefault(),!B&&D.key.length===1&&K(D.key),["ArrowUp","ArrowDown","Home","End"].includes(D.key)){let z=i().filter(W=>!W.disabled).map(W=>W.ref.current);if(["ArrowUp","End"].includes(D.key)&&(z=z.slice().reverse()),["ArrowUp","ArrowDown"].includes(D.key)){const W=D.target,V=z.indexOf(W);z=z.slice(V+1)}setTimeout(()=>w(z)),D.preventDefault()}})})})})})})},"SelectContentImpl")),io=a.forwardRef(G(function(n,s){const{__scopeSelect:o,onPlaced:c,...r}=n,u=Re(Oe,o),p=Ze(Oe,o),[f,h]=a.useState(null),[y,N]=a.useState(null),C=ye(s,N),_=ft(o),L=a.useRef(!1),T=a.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:S,focusSelectedItem:v}=p,x=a.useCallback(()=>{if(u.trigger&&u.valueNode&&f&&y&&g&&b&&S){const U=u.trigger.getBoundingClientRect(),I=y.getBoundingClientRect(),F=u.valueNode.getBoundingClientRect(),te=S.getBoundingClientRect();if(u.dir!=="rtl"){const W=te.left-I.left,V=F.left-W,R=U.left-V,me=U.width+R,m=Math.max(me,I.width),q=window.innerWidth-Ne,ee=ot(V,[Ne,Math.max(Ne,q-m)]);f.style.minWidth=me+"px",f.style.left=ee+"px"}else{const W=I.right-te.right,V=window.innerWidth-F.right-W,R=window.innerWidth-U.right-V,me=U.width+R,m=Math.max(me,I.width),q=window.innerWidth-Ne,ee=ot(V,[Ne,Math.max(Ne,q-m)]);f.style.minWidth=me+"px",f.style.right=ee+"px"}const l=_(),i=window.innerHeight-Ne*2,d=g.scrollHeight,j=window.getComputedStyle(y),E=parseInt(j.borderTopWidth,10),w=parseInt(j.paddingTop,10),A=parseInt(j.borderBottomWidth,10),X=parseInt(j.paddingBottom,10),O=E+w+d+X+A,H=Math.min(b.offsetHeight*5,O),K=window.getComputedStyle(g),ie=parseInt(K.paddingTop,10),Q=parseInt(K.paddingBottom,10),oe=U.top+U.height/2-Ne,ne=i-oe,he=b.offsetHeight/2,D=b.offsetTop+he,B=E+w+D,se=O-B;if(B<=oe){const W=l.length>0&&b===l[l.length-1].ref.current;f.style.bottom="0px";const V=y.clientHeight-g.offsetTop-g.offsetHeight,R=Math.max(ne,he+(W?Q:0)+V+A),me=B+R;f.style.height=me+"px"}else{const W=l.length>0&&b===l[0].ref.current;f.style.top="0px";const R=Math.max(oe,E+g.offsetTop+(W?ie:0)+he)+se;f.style.height=R+"px",g.scrollTop=B-oe+g.offsetTop}f.style.margin=`${Ne}px 0`,f.style.minHeight=H+"px",f.style.maxHeight=i+"px",c?.(),requestAnimationFrame(()=>L.current=!0)}},[_,u.trigger,u.valueNode,f,y,g,b,S,u.dir,c]);$e(()=>x(),[x]);const[M,P]=a.useState();$e(()=>{y&&P(window.getComputedStyle(y).zIndex)},[y]);const k=a.useCallback(U=>{U&&T.current===!0&&(x(),v?.(),T.current=!1)},[x,v]);return e.jsx(uo,{scope:o,contentWrapper:f,shouldExpandOnScrollRef:L,onScrollButtonChange:k,children:e.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:e.jsx(Ee.div,{...r,ref:C,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})},"SelectItemAlignedPosition")),Pt=a.forwardRef(G(function(n,s){const{__scopeSelect:o,align:c="start",collisionPadding:r=Ne,...u}=n,p=ht(o);return e.jsx(Hn,{...p,...u,ref:s,align:c,collisionPadding:r,style:{boxSizing:"border-box",...u.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[uo,po]=Ae(Oe,{}),Dt="SelectViewport",mo=a.forwardRef(G(function(n,s){const{__scopeSelect:o,nonce:c,...r}=n,u=Ze(Dt,o),p=po(Dt,o),f=ye(s,u.onViewportChange),h=a.useRef(0);return e.jsxs(e.Fragment,{children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:c}),e.jsx(Je.Slot,{scope:o,children:e.jsx(Ee.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:be(r.onScroll,y=>{const N=y.currentTarget,{contentWrapper:C,shouldExpandOnScrollRef:_}=p;if(_?.current&&C){const L=Math.abs(h.current-N.scrollTop);if(L>0){const T=window.innerHeight-Ne*2,g=parseFloat(C.style.minHeight),b=parseFloat(C.style.height),S=Math.max(g,b);if(S<T){const v=S+L,x=Math.min(T,v),M=v-x;C.style.height=x+"px",C.style.bottom==="0px"&&(N.scrollTop=M>0?M:0,C.style.justifyContent="flex-end")}}}h.current=N.scrollTop})})})]})},"SelectViewport")),fo="SelectGroup",[SF,ho]=Ae(fo),xo="SelectLabel",ln=a.forwardRef(G(function(n,s){const{__scopeSelect:o,...c}=n,r=ho(xo,o);return e.jsx(Ee.div,{id:r.id,...c,ref:s})},"SelectLabel")),at="SelectItem",[go,dn]=Ae(at),un=a.forwardRef(G(function(n,s){const{__scopeSelect:o,value:c,disabled:r=!1,textValue:u,...p}=n,f=Re(at,o),h=Ze(at,o),y=f.value===c,[N,C]=a.useState(u??""),[_,L]=a.useState(!1),T=ut(x=>h.itemRefCallback?.(x,c,r)),g=ye(s,T),b=Xt(),S=a.useRef("touch"),v=G(()=>{r||(f.onValueChange(c),f.onOpenChange(!1))},"handleSelect");return e.jsx(go,{scope:o,value:c,disabled:r,textId:b,isSelected:y,onItemTextChange:a.useCallback(x=>{C(M=>M||(x?.textContent??"").trim())},[]),children:e.jsx(Je.ItemSlot,{scope:o,value:c,disabled:r,textValue:N,children:e.jsx(Ee.div,{role:"option","aria-labelledby":b,"data-highlighted":_?"":void 0,"aria-selected":y&&_,"data-state":y?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...p,ref:g,onFocus:be(p.onFocus,()=>L(!0)),onBlur:be(p.onBlur,()=>L(!1)),onClick:be(p.onClick,()=>{S.current!=="mouse"&&v()}),onPointerUp:be(p.onPointerUp,()=>{S.current==="mouse"&&v()}),onPointerDown:be(p.onPointerDown,x=>{S.current=x.pointerType}),onPointerMove:be(p.onPointerMove,x=>{S.current=x.pointerType,r?h.onItemLeave?.():S.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(p.onPointerLeave,x=>{x.currentTarget===document.activeElement&&h.onItemLeave?.()}),onKeyDown:be(p.onKeyDown,x=>{r||x.target!==x.currentTarget||h.searchRef?.current!==""&&x.key===" "||(zs.includes(x.key)&&v(),x.key===" "&&x.preventDefault())})})})})},"SelectItem")),Ke="SelectItemText",bo=a.forwardRef(G(function(n,s){const{__scopeSelect:o,className:c,style:r,...u}=n,p=Re(Ke,o),f=Ze(Ke,o),h=dn(Ke,o),y=Qs(Ke,o),[N,C]=a.useState(null),_=ut(v=>f.itemTextRefCallback?.(v,h.value,h.disabled)),L=ye(s,C,h.onItemTextChange,_),T=N?.textContent,g=a.useMemo(()=>e.jsx("option",{value:h.value,disabled:h.disabled,children:T},h.value),[h.disabled,h.value,T]),{onNativeOptionAdd:b,onNativeOptionRemove:S}=y;return $e(()=>(b(g),()=>S(g)),[b,S,g]),e.jsxs(e.Fragment,{children:[e.jsx(Ee.span,{id:h.textId,...u,ref:L}),h.isSelected&&p.valueNode&&!p.valueNodeHasChildren&&!Ve(p.value)?zt.createPortal(u.children,p.valueNode):null]})},"SelectItemText")),vo="SelectItemIndicator",yo=a.forwardRef(G(function(n,s){const{__scopeSelect:o,...c}=n;return dn(vo,o).isSelected?e.jsx(Ee.span,{"aria-hidden":!0,...c,ref:s}):null},"SelectItemIndicator")),jo="SelectBubbleInput",No=a.forwardRef(G(function({__scopeSelect:n,...s},o){const c=Re(jo,n),{value:r,onValueChange:u,required:p,disabled:f,name:h,autoComplete:y,form:N}=c,{nativeOptions:C,nativeSelectKey:_}=c,L=a.useRef(null),T=ye(o,L),g=r??"",b=sn(g),S=Array.from(C).some(v=>(v.props.value??"")==="");return a.useEffect(()=>{const v=L.current;if(!v)return;const x=window.HTMLSelectElement.prototype,P=Object.getOwnPropertyDescriptor(x,"value").set;if(b!==g&&P){const k=new Event("change",{bubbles:!0});P.call(v,g),v.dispatchEvent(k)}},[b,g]),e.jsxs(Ee.select,{"aria-hidden":!0,required:p,tabIndex:-1,name:h,autoComplete:y,disabled:f,form:N,onChange:v=>u(v.target.value),...s,style:{...Bn,...s.style},ref:T,defaultValue:g,children:[Ve(r)&&!S?e.jsx("option",{value:""}):null,Array.from(C)]},_)},"SelectBubbleInput"));function pn(t){return typeof t=="function"}G(pn,"isFunction");function Ve(t){return t===""||t===void 0}G(Ve,"shouldShowPlaceholder");function xt(t){const n=ut(t),s=a.useRef(""),o=a.useRef(0),c=a.useCallback(u=>{const p=s.current+u;n(p),G((function f(h){s.current=h,window.clearTimeout(o.current),h!==""&&(o.current=window.setTimeout(()=>f(""),1e3))}),"updateSearch")(p)},[n]),r=a.useCallback(()=>{s.current="",window.clearTimeout(o.current)},[]);return a.useEffect(()=>()=>window.clearTimeout(o.current),[]),[s,c,r]}G(xt,"useTypeaheadSearch");function gt(t,n,s){const c=n.length>1&&Array.from(n).every(h=>h===n[0])?n[0]:n,r=s?t.indexOf(s):-1;let u=mn(t,Math.max(r,0));c.length===1&&(u=u.filter(h=>h!==s));const f=u.find(h=>h.textValue.toLowerCase().startsWith(c.toLowerCase()));return f!==s?f:void 0}G(gt,"findNextItem");function mn(t,n){return t.map((s,o)=>t[(n+o)%t.length])}G(mn,"wrapArray");const De=Ys,ke=eo,Te=a.forwardRef(({className:t,children:n,...s},o)=>e.jsxs(cn,{ref:o,className:ae("flex h-9 items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm","placeholder:text-muted-foreground focus:outline-none focus-visible:border-primary","disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:[n,e.jsx(to,{asChild:!0,children:e.jsx(ss,{className:"h-4 w-4 opacity-50"})})]}));Te.displayName=cn.displayName;const Le=a.forwardRef(({className:t,children:n,position:s="popper",...o},c)=>e.jsx(co,{children:e.jsx(rn,{ref:c,className:ae("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:s,...o,children:e.jsx(mo,{className:ae("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n})})}));Le.displayName=rn.displayName;const So=a.forwardRef(({className:t,...n},s)=>e.jsx(ln,{ref:s,className:ae("px-2 py-1.5 text-sm font-semibold",t),...n}));So.displayName=ln.displayName;const Y=a.forwardRef(({className:t,children:n,...s},o)=>e.jsxs(un,{ref:o,className:ae("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...s,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(yo,{children:e.jsx(ts,{className:"h-4 w-4"})})}),e.jsx(bo,{children:n})]}));Y.displayName=un.displayName;var nt={},je={};const wo="Á",Co="á",Eo="Ă",_o="ă",To="∾",Lo="∿",Ro="∾̳",Po="Â",Do="â",ko="´",Oo="А",Ao="а",Io="Æ",qo="æ",Mo="",Uo="𝔄",$o="𝔞",Fo="À",Ho="à",Bo="ℵ",Vo="ℵ",Ko="Α",zo="α",Xo="Ā",Go="ā",Wo="⨿",Qo="&",Yo="&",Jo="⩕",Zo="⩓",ec="∧",tc="⩜",nc="⩘",sc="⩚",oc="∠",cc="⦤",rc="∠",ac="⦨",lc="⦩",ic="⦪",dc="⦫",uc="⦬",pc="⦭",mc="⦮",fc="⦯",hc="∡",xc="∟",gc="⊾",bc="⦝",vc="∢",yc="Å",jc="⍼",Nc="Ą",Sc="ą",wc="𝔸",Cc="𝕒",Ec="⩯",_c="≈",Tc="⩰",Lc="≊",Rc="≋",Pc="'",Dc="",kc="≈",Oc="≊",Ac="Å",Ic="å",qc="𝒜",Mc="𝒶",Uc="≔",$c="*",Fc="≈",Hc="≍",Bc="Ã",Vc="ã",Kc="Ä",zc="ä",Xc="∳",Gc="⨑",Wc="≌",Qc="϶",Yc="‵",Jc="∽",Zc="⋍",er="∖",tr="⫧",nr="⊽",sr="⌅",or="⌆",cr="⌅",rr="⎵",ar="⎶",lr="≌",ir="Б",dr="б",ur="„",pr="∵",mr="∵",fr="∵",hr="⦰",xr="϶",gr="ℬ",br="ℬ",vr="Β",yr="β",jr="ℶ",Nr="≬",Sr="𝔅",wr="𝔟",Cr="⋂",Er="◯",_r="⋃",Tr="⨀",Lr="⨁",Rr="⨂",Pr="⨆",Dr="★",kr="▽",Or="△",Ar="⨄",Ir="⋁",qr="⋀",Mr="⤍",Ur="⧫",$r="▪",Fr="▴",Hr="▾",Br="◂",Vr="▸",Kr="␣",zr="▒",Xr="░",Gr="▓",Wr="█",Qr="=⃥",Yr="≡⃥",Jr="⫭",Zr="⌐",ea="𝔹",ta="𝕓",na="⊥",sa="⊥",oa="⋈",ca="⧉",ra="┐",aa="╕",la="╖",ia="╗",da="┌",ua="╒",pa="╓",ma="╔",fa="─",ha="═",xa="┬",ga="╤",ba="╥",va="╦",ya="┴",ja="╧",Na="╨",Sa="╩",wa="⊟",Ca="⊞",Ea="⊠",_a="┘",Ta="╛",La="╜",Ra="╝",Pa="└",Da="╘",ka="╙",Oa="╚",Aa="│",Ia="║",qa="┼",Ma="╪",Ua="╫",$a="╬",Fa="┤",Ha="╡",Ba="╢",Va="╣",Ka="├",za="╞",Xa="╟",Ga="╠",Wa="‵",Qa="˘",Ya="˘",Ja="¦",Za="𝒷",el="ℬ",tl="⁏",nl="∽",sl="⋍",ol="⧅",cl="\\",rl="⟈",al="•",ll="•",il="≎",dl="⪮",ul="≏",pl="≎",ml="≏",fl="Ć",hl="ć",xl="⩄",gl="⩉",bl="⩋",vl="∩",yl="⋒",jl="⩇",Nl="⩀",Sl="ⅅ",wl="∩︀",Cl="⁁",El="ˇ",_l="ℭ",Tl="⩍",Ll="Č",Rl="č",Pl="Ç",Dl="ç",kl="Ĉ",Ol="ĉ",Al="∰",Il="⩌",ql="⩐",Ml="Ċ",Ul="ċ",$l="¸",Fl="¸",Hl="⦲",Bl="¢",Vl="·",Kl="·",zl="𝔠",Xl="ℭ",Gl="Ч",Wl="ч",Ql="✓",Yl="✓",Jl="Χ",Zl="χ",ei="ˆ",ti="≗",ni="↺",si="↻",oi="⊛",ci="⊚",ri="⊝",ai="⊙",li="®",ii="Ⓢ",di="⊖",ui="⊕",pi="⊗",mi="○",fi="⧃",hi="≗",xi="⨐",gi="⫯",bi="⧂",vi="∲",yi="”",ji="’",Ni="♣",Si="♣",wi=":",Ci="∷",Ei="⩴",_i="≔",Ti="≔",Li=",",Ri="@",Pi="∁",Di="∘",ki="∁",Oi="ℂ",Ai="≅",Ii="⩭",qi="≡",Mi="∮",Ui="∯",$i="∮",Fi="𝕔",Hi="ℂ",Bi="∐",Vi="∐",Ki="©",zi="©",Xi="℗",Gi="∳",Wi="↵",Qi="✗",Yi="⨯",Ji="𝒞",Zi="𝒸",ed="⫏",td="⫑",nd="⫐",sd="⫒",od="⋯",cd="⤸",rd="⤵",ad="⋞",ld="⋟",id="↶",dd="⤽",ud="⩈",pd="⩆",md="≍",fd="∪",hd="⋓",xd="⩊",gd="⊍",bd="⩅",vd="∪︀",yd="↷",jd="⤼",Nd="⋞",Sd="⋟",wd="⋎",Cd="⋏",Ed="¤",_d="↶",Td="↷",Ld="⋎",Rd="⋏",Pd="∲",Dd="∱",kd="⌭",Od="†",Ad="‡",Id="ℸ",qd="↓",Md="↡",Ud="⇓",$d="‐",Fd="⫤",Hd="⊣",Bd="⤏",Vd="˝",Kd="Ď",zd="ď",Xd="Д",Gd="д",Wd="‡",Qd="⇊",Yd="ⅅ",Jd="ⅆ",Zd="⤑",eu="⩷",tu="°",nu="∇",su="Δ",ou="δ",cu="⦱",ru="⥿",au="𝔇",lu="𝔡",iu="⥥",du="⇃",uu="⇂",pu="´",mu="˙",fu="˝",hu="`",xu="˜",gu="⋄",bu="⋄",vu="⋄",yu="♦",ju="♦",Nu="¨",Su="ⅆ",wu="ϝ",Cu="⋲",Eu="÷",_u="÷",Tu="⋇",Lu="⋇",Ru="Ђ",Pu="ђ",Du="⌞",ku="⌍",Ou="$",Au="𝔻",Iu="𝕕",qu="¨",Mu="˙",Uu="⃜",$u="≐",Fu="≑",Hu="≐",Bu="∸",Vu="∔",Ku="⊡",zu="⌆",Xu="∯",Gu="¨",Wu="⇓",Qu="⇐",Yu="⇔",Ju="⫤",Zu="⟸",ep="⟺",tp="⟹",np="⇒",sp="⊨",op="⇑",cp="⇕",rp="∥",ap="⤓",lp="↓",ip="↓",dp="⇓",up="⇵",pp="̑",mp="⇊",fp="⇃",hp="⇂",xp="⥐",gp="⥞",bp="⥖",vp="↽",yp="⥟",jp="⥗",Np="⇁",Sp="↧",wp="⊤",Cp="⤐",Ep="⌟",_p="⌌",Tp="𝒟",Lp="𝒹",Rp="Ѕ",Pp="ѕ",Dp="⧶",kp="Đ",Op="đ",Ap="⋱",Ip="▿",qp="▾",Mp="⇵",Up="⥯",$p="⦦",Fp="Џ",Hp="џ",Bp="⟿",Vp="É",Kp="é",zp="⩮",Xp="Ě",Gp="ě",Wp="Ê",Qp="ê",Yp="≖",Jp="≕",Zp="Э",em="э",tm="⩷",nm="Ė",sm="ė",om="≑",cm="ⅇ",rm="≒",am="𝔈",lm="𝔢",im="⪚",dm="È",um="è",pm="⪖",mm="⪘",fm="⪙",hm="∈",xm="⏧",gm="ℓ",bm="⪕",vm="⪗",ym="Ē",jm="ē",Nm="∅",Sm="∅",wm="◻",Cm="∅",Em="▫",_m=" ",Tm=" ",Lm=" ",Rm="Ŋ",Pm="ŋ",Dm=" ",km="Ę",Om="ę",Am="𝔼",Im="𝕖",qm="⋕",Mm="⧣",Um="⩱",$m="ε",Fm="Ε",Hm="ε",Bm="ϵ",Vm="≖",Km="≕",zm="≂",Xm="⪖",Gm="⪕",Wm="⩵",Qm="=",Ym="≂",Jm="≟",Zm="⇌",ef="≡",tf="⩸",nf="⧥",sf="⥱",of="≓",cf="ℯ",rf="ℰ",af="≐",lf="⩳",df="≂",uf="Η",pf="η",mf="Ð",ff="ð",hf="Ë",xf="ë",gf="€",bf="!",vf="∃",yf="∃",jf="ℰ",Nf="ⅇ",Sf="ⅇ",wf="≒",Cf="Ф",Ef="ф",_f="♀",Tf="ffi",Lf="ff",Rf="ffl",Pf="𝔉",Df="𝔣",kf="fi",Of="◼",Af="▪",If="fj",qf="♭",Mf="fl",Uf="▱",$f="ƒ",Ff="𝔽",Hf="𝕗",Bf="∀",Vf="∀",Kf="⋔",zf="⫙",Xf="ℱ",Gf="⨍",Wf="½",Qf="⅓",Yf="¼",Jf="⅕",Zf="⅙",eh="⅛",th="⅔",nh="⅖",sh="¾",oh="⅗",ch="⅜",rh="⅘",ah="⅚",lh="⅝",ih="⅞",dh="⁄",uh="⌢",ph="𝒻",mh="ℱ",fh="ǵ",hh="Γ",xh="γ",gh="Ϝ",bh="ϝ",vh="⪆",yh="Ğ",jh="ğ",Nh="Ģ",Sh="Ĝ",wh="ĝ",Ch="Г",Eh="г",_h="Ġ",Th="ġ",Lh="≥",Rh="≧",Ph="⪌",Dh="⋛",kh="≥",Oh="≧",Ah="⩾",Ih="⪩",qh="⩾",Mh="⪀",Uh="⪂",$h="⪄",Fh="⋛︀",Hh="⪔",Bh="𝔊",Vh="𝔤",Kh="≫",zh="⋙",Xh="⋙",Gh="ℷ",Wh="Ѓ",Qh="ѓ",Yh="⪥",Jh="≷",Zh="⪒",ex="⪤",tx="⪊",nx="⪊",sx="⪈",ox="≩",cx="⪈",rx="≩",ax="⋧",lx="𝔾",ix="𝕘",dx="`",ux="≥",px="⋛",mx="≧",fx="⪢",hx="≷",xx="⩾",gx="≳",bx="𝒢",vx="ℊ",yx="≳",jx="⪎",Nx="⪐",Sx="⪧",wx="⩺",Cx=">",Ex=">",_x="≫",Tx="⋗",Lx="⦕",Rx="⩼",Px="⪆",Dx="⥸",kx="⋗",Ox="⋛",Ax="⪌",Ix="≷",qx="≳",Mx="≩︀",Ux="≩︀",$x="ˇ",Fx=" ",Hx="½",Bx="ℋ",Vx="Ъ",Kx="ъ",zx="⥈",Xx="↔",Gx="⇔",Wx="↭",Qx="^",Yx="ℏ",Jx="Ĥ",Zx="ĥ",eg="♥",tg="♥",ng="…",sg="⊹",og="𝔥",cg="ℌ",rg="ℋ",ag="⤥",lg="⤦",ig="⇿",dg="∻",ug="↩",pg="↪",mg="𝕙",fg="ℍ",hg="―",xg="─",gg="𝒽",bg="ℋ",vg="ℏ",yg="Ħ",jg="ħ",Ng="≎",Sg="≏",wg="⁃",Cg="‐",Eg="Í",_g="í",Tg="",Lg="Î",Rg="î",Pg="И",Dg="и",kg="İ",Og="Е",Ag="е",Ig="¡",qg="⇔",Mg="𝔦",Ug="ℑ",$g="Ì",Fg="ì",Hg="ⅈ",Bg="⨌",Vg="∭",Kg="⧜",zg="℩",Xg="IJ",Gg="ij",Wg="Ī",Qg="ī",Yg="ℑ",Jg="ⅈ",Zg="ℐ",eb="ℑ",tb="ı",nb="ℑ",sb="⊷",ob="Ƶ",cb="⇒",rb="℅",ab="∞",lb="⧝",ib="ı",db="⊺",ub="∫",pb="∬",mb="ℤ",fb="∫",hb="⊺",xb="⋂",gb="⨗",bb="⨼",vb="",yb="",jb="Ё",Nb="ё",Sb="Į",wb="į",Cb="𝕀",Eb="𝕚",_b="Ι",Tb="ι",Lb="⨼",Rb="¿",Pb="𝒾",Db="ℐ",kb="∈",Ob="⋵",Ab="⋹",Ib="⋴",qb="⋳",Mb="∈",Ub="",$b="Ĩ",Fb="ĩ",Hb="І",Bb="і",Vb="Ï",Kb="ï",zb="Ĵ",Xb="ĵ",Gb="Й",Wb="й",Qb="𝔍",Yb="𝔧",Jb="ȷ",Zb="𝕁",ev="𝕛",tv="𝒥",nv="𝒿",sv="Ј",ov="ј",cv="Є",rv="є",av="Κ",lv="κ",iv="ϰ",dv="Ķ",uv="ķ",pv="К",mv="к",fv="𝔎",hv="𝔨",xv="ĸ",gv="Х",bv="х",vv="Ќ",yv="ќ",jv="𝕂",Nv="𝕜",Sv="𝒦",wv="𝓀",Cv="⇚",Ev="Ĺ",_v="ĺ",Tv="⦴",Lv="ℒ",Rv="Λ",Pv="λ",Dv="⟨",kv="⟪",Ov="⦑",Av="⟨",Iv="⪅",qv="ℒ",Mv="«",Uv="⇤",$v="⤟",Fv="←",Hv="↞",Bv="⇐",Vv="⤝",Kv="↩",zv="↫",Xv="⤹",Gv="⥳",Wv="↢",Qv="⤙",Yv="⤛",Jv="⪫",Zv="⪭",ey="⪭︀",ty="⤌",ny="⤎",sy="❲",oy="{",cy="[",ry="⦋",ay="⦏",ly="⦍",iy="Ľ",dy="ľ",uy="Ļ",py="ļ",my="⌈",fy="{",hy="Л",xy="л",gy="⤶",by="“",vy="„",yy="⥧",jy="⥋",Ny="↲",Sy="≤",wy="≦",Cy="⟨",Ey="⇤",_y="←",Ty="←",Ly="⇐",Ry="⇆",Py="↢",Dy="⌈",ky="⟦",Oy="⥡",Ay="⥙",Iy="⇃",qy="⌊",My="↽",Uy="↼",$y="⇇",Fy="↔",Hy="↔",By="⇔",Vy="⇆",Ky="⇋",zy="↭",Xy="⥎",Gy="↤",Wy="⊣",Qy="⥚",Yy="⋋",Jy="⧏",Zy="⊲",ej="⊴",tj="⥑",nj="⥠",sj="⥘",oj="↿",cj="⥒",rj="↼",aj="⪋",lj="⋚",ij="≤",dj="≦",uj="⩽",pj="⪨",mj="⩽",fj="⩿",hj="⪁",xj="⪃",gj="⋚︀",bj="⪓",vj="⪅",yj="⋖",jj="⋚",Nj="⪋",Sj="⋚",wj="≦",Cj="≶",Ej="≶",_j="⪡",Tj="≲",Lj="⩽",Rj="≲",Pj="⥼",Dj="⌊",kj="𝔏",Oj="𝔩",Aj="≶",Ij="⪑",qj="⥢",Mj="↽",Uj="↼",$j="⥪",Fj="▄",Hj="Љ",Bj="љ",Vj="⇇",Kj="≪",zj="⋘",Xj="⌞",Gj="⇚",Wj="⥫",Qj="◺",Yj="Ŀ",Jj="ŀ",Zj="⎰",eN="⎰",tN="⪉",nN="⪉",sN="⪇",oN="≨",cN="⪇",rN="≨",aN="⋦",lN="⟬",iN="⇽",dN="⟦",uN="⟵",pN="⟵",mN="⟸",fN="⟷",hN="⟷",xN="⟺",gN="⟼",bN="⟶",vN="⟶",yN="⟹",jN="↫",NN="↬",SN="⦅",wN="𝕃",CN="𝕝",EN="⨭",_N="⨴",TN="∗",LN="_",RN="↙",PN="↘",DN="◊",kN="◊",ON="⧫",AN="(",IN="⦓",qN="⇆",MN="⌟",UN="⇋",$N="⥭",FN="",HN="⊿",BN="‹",VN="𝓁",KN="ℒ",zN="↰",XN="↰",GN="≲",WN="⪍",QN="⪏",YN="[",JN="‘",ZN="‚",eS="Ł",tS="ł",nS="⪦",sS="⩹",oS="<",cS="<",rS="≪",aS="⋖",lS="⋋",iS="⋉",dS="⥶",uS="⩻",pS="◃",mS="⊴",fS="◂",hS="⦖",xS="⥊",gS="⥦",bS="≨︀",vS="≨︀",yS="¯",jS="♂",NS="✠",SS="✠",wS="↦",CS="↦",ES="↧",_S="↤",TS="↥",LS="▮",RS="⨩",PS="М",DS="м",kS="—",OS="∺",AS="∡",IS=" ",qS="ℳ",MS="𝔐",US="𝔪",$S="℧",FS="µ",HS="*",BS="⫰",VS="∣",KS="·",zS="⊟",XS="−",GS="∸",WS="⨪",QS="∓",YS="⫛",JS="…",ZS="∓",ew="⊧",tw="𝕄",nw="𝕞",sw="∓",ow="𝓂",cw="ℳ",rw="∾",aw="Μ",lw="μ",iw="⊸",dw="⊸",uw="∇",pw="Ń",mw="ń",fw="∠⃒",hw="≉",xw="⩰̸",gw="≋̸",bw="ʼn",vw="≉",yw="♮",jw="ℕ",Nw="♮",Sw=" ",ww="≎̸",Cw="≏̸",Ew="⩃",_w="Ň",Tw="ň",Lw="Ņ",Rw="ņ",Pw="≇",Dw="⩭̸",kw="⩂",Ow="Н",Aw="н",Iw="–",qw="⤤",Mw="↗",Uw="⇗",$w="↗",Fw="≠",Hw="≐̸",Bw="",Vw="",Kw="",zw="",Xw="≢",Gw="⤨",Ww="≂̸",Qw="≫",Yw="≪",Jw=`
|
|
1
|
+
var vt=t=>{throw TypeError(t)};var yt=(t,n,s)=>n.has(t)||vt("Cannot "+s);var xe=(t,n,s)=>(yt(t,n,"read from private field"),s?s.call(t):n.get(t)),jt=(t,n,s)=>n.has(t)?vt("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,s),et=(t,n,s,o)=>(yt(t,n,"write to private field"),o?o.call(t,s):n.set(t,s),s);import{r as a,c as Ce,j as e,y as ae,R as it,D as xn,G as gn,O as bn,n as Nt,L as vn,q as ye,x as dt,z as Ue,P as Ee,o as $e,s as ut,w as zt,A as yn}from"./settings-D8oDBXWg.js";import{g as jn,f as St,d as Nn,s as Sn,e as wn,a as Cn,h as En,i as _n,c as Tn,j as Ln,u as Rn,t as Pn}from"./admin-BU4m6Ko2.js";import{A as Dn}from"./activity-CFhmzahP.js";import{E as kn}from"./external-link-RKoYyCp_.js";import{A as On,c as be,P as An,a as In,u as Xt,b as Gt,h as qn,d as Mn,R as Un,F as $n,D as Fn,C as Hn,V as Bn,e as wt,f as Vn}from"./index-DvxneI5O.js";import{D as Kn}from"./download-WJE9-yxQ.js";import{K as zn}from"./key-round-r-D9sQUK.js";var Xn=Object.defineProperty,Gn=(t,n)=>Xn(t,"name",{value:n,configurable:!0}),Wn=a.createContext(void 0);function Wt(t){const n=a.useContext(Wn);return t||n||"ltr"}Gn(Wt,"useDirection");var Qn=Object.defineProperty,Yn=(t,n)=>Qn(t,"name",{value:n,configurable:!0});function ot(t,[n,s]){return Math.min(s,Math.max(n,t))}Yn(ot,"clamp");const Jn=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],Zn=Ce("chart-column",Jn);const es=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ts=Ce("check",es);const ns=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ss=Ce("chevron-down",ns);const os=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]],cs=Ce("file-down",os);const rs=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],as=Ce("pause",rs);const ls=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],is=Ce("play",ls);const ds=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ct=Ce("search",ds);const us=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],ps=Ce("trash-2",us);const ms=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],pt=Ce("triangle-alert",ms);const fs=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],hs=Ce("x",fs);function pe(t){const{className:n,variant:s="default",size:o="default",children:c,...r}=t,u="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus:outline-none focus:ring-0 focus-visible:outline-none active:translate-y-px disabled:opacity-50 disabled:pointer-events-none",p={default:"bg-primary text-primary-foreground hover:bg-primary/90 focus-visible:bg-primary/80",secondary:"bg-muted text-foreground hover:bg-muted/80 focus-visible:bg-muted/60",ghost:"bg-transparent hover:bg-muted focus-visible:bg-muted text-foreground"},f={default:"h-10 px-4 py-2",sm:"h-8 px-3",icon:"h-9 w-9 p-0"};return e.jsx("button",{className:ae(u,p[s],f[o],n),...r,children:c})}function J(t){const{className:n,variant:s,children:o}=t;return e.jsx("div",{className:ae("rounded-xl bg-background",s==="bordered"&&"border border-border",n),children:o})}function ce(t){const{className:n,children:s}=t;return e.jsx("div",{className:ae("px-5 pt-5",n),children:s})}function re(t){const{className:n,children:s}=t;return e.jsx("div",{className:ae("text-base font-semibold",n),children:s})}function Z(t){const{className:n,children:s}=t;return e.jsx("div",{className:ae("px-5 pb-5 pt-4",n),children:s})}function Qe(t){const{className:n,...s}=t;return e.jsx("input",{className:ae("w-full h-10 rounded-md border border-input bg-background px-3 py-2 text-sm","placeholder:text-muted-foreground","focus:outline-none focus-visible:border-primary",n),...s})}function Pe(t){const{className:n,...s}=t;return e.jsx("label",{className:ae("text-sm font-medium text-foreground",n),...s})}const xs={"not-cloud":"非 Cloud 模式","missing-sparql-endpoint":"缺少 PostgreSQL 端点","unsupported-sparql-endpoint":"非 PostgreSQL 端点"};function gs(t){const n=t.trim();return n?{cacheScopeQuery:n,cacheScopeLimit:50}:{}}function vF(){const[t,n]=a.useState(null),[s,o]=a.useState(!0),[c,r]=a.useState(!1),[u,p]=a.useState(""),[f,h]=a.useState(""),[y,N]=a.useState(""),C=a.useRef(!1),_=a.useCallback(async(b=!1,S=y)=>{b?o(!0):r(!0),p("");try{const v=await jn(gs(S));v?n(v):p("RDF 统计不可用")}finally{o(!1),r(!1)}},[y]);a.useEffect(()=>{C.current||(C.current=!0,_(!0))},[_]),a.useEffect(()=>{const b=setInterval(()=>{_(!1)},1e4);return()=>clearInterval(b)},[_]);const L=b=>{b.preventDefault();const S=f.trim();N(S),_(!1,S)},T=()=>{h(""),N(""),_(!1,"")},g=t?Ye(t.generatedAt):"-";return s?e.jsx("div",{className:"p-8 text-foreground",children:"加载中..."}):e.jsxs("div",{className:"p-8",children:[e.jsxs("div",{className:"mb-6 flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"type-h1",children:"RDF 索引"}),e.jsxs("div",{className:"mt-1 text-sm text-muted-foreground",children:["更新时间 ",g]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("form",{className:"flex min-w-0 items-center gap-2",onSubmit:L,children:[e.jsxs("div",{className:"relative w-72 max-w-[70vw]",children:[e.jsx(Ct,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(Qe,{value:f,onChange:b=>h(b.target.value),className:"pl-9",placeholder:"principal / base / version"})]}),e.jsxs(pe,{type:"submit",variant:"secondary",size:"sm",className:"gap-2",children:[e.jsx(Ct,{className:"h-4 w-4"}),"搜索"]}),y&&e.jsx(pe,{type:"button",variant:"ghost",size:"sm",onClick:T,"aria-label":"清除 scope 搜索",children:e.jsx(hs,{className:"h-4 w-4"})})]}),e.jsxs(pe,{type:"button",variant:"secondary",size:"sm",onClick:()=>{_(!1)},disabled:c,className:"gap-2",children:[e.jsx(it,{className:ae("h-4 w-4",c&&"animate-spin")}),"刷新"]})]})]}),u&&e.jsx("div",{className:"mb-5 rounded-md border border-destructive/30 bg-destructive/5 px-4 py-3 text-sm text-destructive",children:u}),t?.available?e.jsx(bs,{snapshot:t,scopeQuery:y}):e.jsxs(e.Fragment,{children:[e.jsx(vs,{snapshot:t}),e.jsx("div",{className:"mt-8",children:e.jsx(Qt,{snapshot:t?.benchmarkReports})})]})]})}function bs(t){const{snapshot:n,scopeQuery:s}=t,o=n.stats,c=o.rdf3x,r=o.slowQueries?.entries??[],u=o.derivedCache,p=u?.scopeEntries??[],f=o.pgAcceleration,h=o.lifecycle,y=h?.coldStart,N=y?.phases.reduce((C,_)=>_.durationMs>C.durationMs?_:C,{name:"-",durationMs:0});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-8 grid grid-cols-1 gap-5 md:grid-cols-2 xl:grid-cols-5",children:[e.jsx(Me,{icon:xn,label:"引擎",value:n.engine,detail:f?.profile??"baseline",tone:f?.enabled?"good":"neutral"}),e.jsx(Me,{icon:Dn,label:"RDF-3X",value:c?.syncedWithFacts?"已同步":`${c?.refreshLag??0} 版本延迟`,detail:`facts ${c?.factsDataVersion??0} / rdf3x ${c?.rdf3xFactsDataVersion??0} / pending ${c?.pendingSources??0}`,tone:c?.syncedWithFacts?"good":"warn"}),e.jsx(Me,{icon:gn,label:"存储",value:ue(o.totalBytes),detail:`facts ${ue(o.factsBytes)} / derived ${ue(o.derivedBytes)}`,tone:"neutral"}),e.jsx(Me,{icon:it,label:"冷启动",value:we(y?.durationMs??h?.lastOpenDurationMs??0),detail:`${h?.status??"unknown"} / open ${h?.openCount??0}`,tone:h?.status==="failed"?"warn":"neutral"}),e.jsx(Me,{icon:pt,label:"慢查询",value:`${o.slowQueries?.entryCount??0}`,detail:`保留 ${o.slowQueries?.maxEntries??0} 条`,tone:(o.slowQueries?.entryCount??0)>0?"warn":"good"})]}),e.jsxs("div",{className:"mb-8 grid grid-cols-1 gap-5 xl:grid-cols-5",children:[e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"空间占用"})}),e.jsxs(Z,{className:"space-y-3",children:[e.jsx($,{label:"derived/facts",value:ct(o.derivedToFactsRatio)}),e.jsx($,{label:"total/facts",value:ct(o.totalToFactsRatio)}),e.jsx($,{label:"result cache",value:ue(o.queryResultCache?.totalBytes??0)}),e.jsx($,{label:"materialized",value:ue(o.materializedResultCache?.totalBytes??0)}),e.jsx($,{label:"template",value:ue(o.queryTemplateCache?.totalBytes??0)})]})]}),e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"Cache"})}),e.jsxs(Z,{className:"space-y-3",children:[e.jsx($,{label:"result entries",value:`${o.queryResultCache?.entryCount??0}`}),e.jsx($,{label:"result scopes",value:`${o.queryResultCache?.scopeCount??0}`}),e.jsx($,{label:"materialized entries",value:`${o.materializedResultCache?.entryCount??0}`}),e.jsx($,{label:"materialized scopes",value:`${o.materializedResultCache?.scopeCount??0}`}),e.jsx($,{label:"result hit rate",value:_t(o.queryResultCache)}),e.jsx($,{label:"materialized hit rate",value:_t(o.materializedResultCache)}),e.jsx($,{label:"template entries",value:`${o.queryTemplateCache?.entryCount??0}`}),e.jsx($,{label:"cache pressure",value:Fe(u?.cachePressure??0)})]})]}),e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"生命周期"})}),e.jsxs(Z,{className:"space-y-3",children:[e.jsx($,{label:"driver",value:h?.driver??"-"}),e.jsx($,{label:"ready at",value:h?.lastReadyAt?Ye(h.lastReadyAt):"-"}),e.jsx($,{label:"slowest phase",value:`${N?.name??"-"} ${we(N?.durationMs??0)}`}),e.jsx($,{label:"dirty sources",value:`${c?.pendingSources??0}`}),e.jsx($,{label:"custom index",value:y?y.customIndexDeferred?"deferred":"startup":"-"}),e.jsx($,{label:"maintenance",value:y?y.maintenanceEnabled?"enabled":"disabled":"-"})]})]}),e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"权限 Scope"})}),e.jsxs(Z,{className:"space-y-3",children:[e.jsx($,{label:"scope versions",value:`${u?.scopeVersionCount??0}`}),e.jsx($,{label:"max scope",value:ue(u?.maxScopeBytes??0)}),e.jsx($,{label:"largest scope",value:ue(u?.largestScopeBytes??0)}),e.jsx($,{label:"scope pressure",value:Fe(u?.largestScopePressure??0)}),e.jsx($,{label:"scope hash",value:He(u?.largestScopeHash??"-")}),e.jsx($,{label:"facts version",value:`${u?.largestScopeFactsDataVersion??"-"}`})]})]}),e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"PG 加速"})}),e.jsxs(Z,{className:"space-y-3",children:[e.jsx($,{label:"profile",value:f?.profile??"baseline"}),e.jsx($,{label:"provider",value:f?.provider??"-"}),e.jsx($,{label:"enabled",value:f?.enabled?"true":"false"}),e.jsx($,{label:"capabilities",value:`${f?.capabilities?.length??0}`}),e.jsx($,{label:"active operators",value:Be(f?.activeOperators)}),e.jsx($,{label:"missing caps",value:Be(f?.missingCapabilities)}),e.jsx($,{label:"fallback",value:f?.fallbackReason??"-"})]})]})]}),e.jsxs("div",{className:"mb-8 grid grid-cols-1 gap-5 xl:grid-cols-2",children:[e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"Cache 淘汰"})}),e.jsxs(Z,{className:"space-y-3",children:[e.jsx($,{label:"total",value:`${u?.evictionCount??0}`}),e.jsx(Ss,{evictions:u?.evictions})]})]}),e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"Cache 载荷"})}),e.jsxs(Z,{className:"space-y-3",children:[e.jsx($,{label:"result payload",value:ue(u?.queryResultPayloadBytes??0)}),e.jsx($,{label:"materialized payload",value:ue(u?.materializedResultPayloadBytes??0)}),e.jsx($,{label:"template bytes",value:ue(u?.queryTemplateBytes??0)}),e.jsx($,{label:"result table/index",value:`${ue(o.queryResultCache?.tableBytes??0)} / ${ue(o.queryResultCache?.indexBytes??0)}`}),e.jsx($,{label:"materialized table/index",value:`${ue(o.materializedResultCache?.tableBytes??0)} / ${ue(o.materializedResultCache?.indexBytes??0)}`})]})]})]}),e.jsx("div",{className:"mb-8",children:e.jsx(Ns,{entries:p,totalCount:u?.scopeVersionCount??0,query:s})}),e.jsx("div",{className:"mb-8",children:e.jsx(Qt,{snapshot:n.benchmarkReports})}),e.jsx(ys,{entries:r})]})}function vs(t){const{snapshot:n}=t,s=n?.available===!1?xs[n.reason]:"无数据";return e.jsx(J,{variant:"bordered",children:e.jsx(Z,{children:e.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[e.jsx(pt,{className:"h-5 w-5 text-yellow-600"}),e.jsx("span",{children:s})]})})})}function Me(t){const n=t.icon;return e.jsx(J,{variant:"bordered",children:e.jsxs(Z,{children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:t.label}),e.jsx(n,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx("div",{className:ae("text-xl font-semibold",t.tone==="good"&&"text-green-600",t.tone==="warn"&&"text-yellow-700"),children:t.value}),e.jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:t.detail})]})})}function $(t){return e.jsxs("div",{className:"flex items-center justify-between gap-4 text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:t.label}),e.jsx("span",{className:"min-w-0 truncate font-mono",children:t.value})]})}function ys(t){return e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"最近慢查询"})}),e.jsx(Z,{className:"p-0",children:t.entries.length===0?e.jsx("div",{className:"px-5 pb-5 pt-4 text-sm text-muted-foreground",children:"暂无慢查询"}):e.jsx("div",{className:"overflow-auto",children:e.jsxs("table",{className:"w-full min-w-[920px] border-collapse text-left text-sm",children:[e.jsx("thead",{className:"border-b border-border text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-5 py-3 font-medium",children:"时间"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"路径"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"耗时"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"扫描"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Cache"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"原因"})]})}),e.jsx("tbody",{children:t.entries.map(n=>e.jsxs("tr",{className:"border-b border-border/60 last:border-0",children:[e.jsx("td",{className:"whitespace-nowrap px-5 py-3 font-mono text-xs",children:Ye(n.generatedAt)}),e.jsxs("td",{className:"px-5 py-3",children:[e.jsx("div",{className:"font-medium",children:n.selectedPath}),e.jsx("div",{className:"mt-1 max-w-[240px] truncate font-mono text-xs text-muted-foreground",children:He(n.queryKey)})]}),e.jsx("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:we(n.runtime.durationMs)}),e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[le(n.runtime.scannedRows)," / ",le(n.runtime.returnedRows)]}),e.jsxs("td",{className:"px-5 py-3",children:[e.jsxs("div",{className:"font-mono text-xs",children:["tpl ",n.cache.templateStatus??"-"," / res ",n.cache.resultStatus??"-"," / mat ",n.cache.materializedStatus??"-"]}),e.jsx("div",{className:"mt-1 max-w-[220px] truncate font-mono text-xs text-muted-foreground",children:Es(n)}),e.jsx("div",{className:"mt-1 max-w-[220px] truncate text-xs text-muted-foreground",children:_s(n)}),e.jsx("div",{className:"mt-1 max-w-[220px] truncate text-xs text-muted-foreground",children:n.cache.scopeBasePath??n.cache.scopeHash}),n.cache.scopePrincipal&&e.jsx("div",{className:"mt-1 max-w-[220px] truncate text-xs text-muted-foreground",children:n.cache.scopePrincipal})]}),e.jsxs("td",{className:"px-5 py-3",children:[e.jsx(Cs,{reasons:n.slowQuery.reasons}),e.jsx(js,{entry:n})]})]},`${n.generatedAt}-${n.queryKey}`))})]})})})]})}function js(t){const n=Ts(t.entry),s=Ls(t.entry);return!n&&!s?null:e.jsxs("div",{className:"mt-2 max-w-[320px] space-y-1 text-xs text-muted-foreground",children:[n&&e.jsx("div",{className:"truncate",children:n}),s&&e.jsx("div",{className:"truncate",children:s})]})}function Ns(t){return e.jsxs(J,{variant:"bordered",children:[e.jsxs(ce,{className:"flex flex-row items-start justify-between gap-3",children:[e.jsx(re,{children:"权限 Scope 明细"}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:[le(t.entries.length)," / ",le(t.totalCount)]})]}),e.jsx(Z,{className:"p-0",children:t.entries.length===0?e.jsx("div",{className:"px-5 pb-5 pt-4 text-sm text-muted-foreground",children:t.query?"没有匹配的缓存 scope":"暂无缓存 scope"}):e.jsx("div",{className:"overflow-auto",children:e.jsxs("table",{className:"w-full min-w-[1020px] border-collapse text-left text-sm",children:[e.jsx("thead",{className:"border-b border-border text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-5 py-3 font-medium",children:"Scope"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Principal"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Base"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"权限"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"版本"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Payload"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Entries"})]})}),e.jsx("tbody",{children:t.entries.map(n=>e.jsxs("tr",{className:"border-b border-border/60 last:border-0",children:[e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono text-xs",children:[e.jsx("div",{children:He(n.scopeHash)}),e.jsxs("div",{className:"mt-1 text-muted-foreground",children:["facts ",n.factsDataVersion]})]}),e.jsx("td",{className:"px-5 py-3",children:e.jsx("div",{className:"max-w-[220px] truncate",children:n.principal??"-"})}),e.jsx("td",{className:"px-5 py-3",children:e.jsx("div",{className:"max-w-[260px] truncate",children:n.basePath??"-"})}),e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono text-xs",children:[n.authorizationModel??"-","/",n.mode??"-"]}),e.jsx("td",{className:"px-5 py-3",children:e.jsx("div",{className:"max-w-[180px] truncate font-mono text-xs",children:n.permissionVersion??"-"})}),e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[e.jsx("div",{children:ue(n.payloadBytes)}),e.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:["r ",ue(n.queryResultPayloadBytes)," / m ",ue(n.materializedResultPayloadBytes)]})]}),e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[le(n.queryResultEntries)," / ",le(n.materializedResultEntries)]})]},`${n.scopeHash}-${n.factsDataVersion}`))})]})})})]})}function Ss(t){const n=Object.entries(t.evictions??{}).filter(([,s])=>s>0);return n.length===0?e.jsx("div",{className:"text-sm text-muted-foreground",children:"暂无淘汰"}):e.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:n.map(([s,o])=>e.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md bg-muted px-3 py-2 text-sm",children:[e.jsx("span",{className:"min-w-0 truncate text-muted-foreground",children:s}),e.jsx("span",{className:"font-mono",children:le(o)})]},s))})}function Qt(t){const n=t.snapshot?.reports??[],s=t.snapshot?.errors??[];return e.jsxs(J,{variant:"bordered",children:[e.jsxs(ce,{className:"flex flex-row items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx(re,{children:"Benchmark 报告"}),e.jsx("div",{className:"mt-1 max-w-[720px] truncate text-sm text-muted-foreground",children:(t.snapshot?.roots??[]).join(", ")||"未配置目录"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(Zn,{className:"h-4 w-4"}),le(t.snapshot?.reportCount??n.length)]})]}),e.jsxs(Z,{className:"p-0",children:[s.length>0&&e.jsxs("div",{className:"border-b border-border px-5 py-3 text-sm text-yellow-700",children:[le(s.length)," 个报告读取失败,最近一个:",s[0].path," - ",s[0].message]}),n.length===0?e.jsx("div",{className:"px-5 pb-5 pt-4 text-sm text-muted-foreground",children:"暂无 benchmark report"}):e.jsx("div",{className:"overflow-auto",children:e.jsxs("table",{className:"w-full min-w-[1180px] border-collapse text-left text-sm",children:[e.jsx("thead",{className:"border-b border-border text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-5 py-3 font-medium",children:"时间"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Profile"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"规模"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Gate"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Ingest"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Refresh"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Cold / Warm"}),e.jsx("th",{className:"px-5 py-3 font-medium",children:"Storage"})]})}),e.jsx("tbody",{children:n.map(o=>e.jsx(ws,{report:o},`${o.path}-${o.generatedAt}`))})]})})]})]})}function ws(t){const n=t.report,s=n.failedPlanCases.length,o=n.failedConcurrencyCases.length;return e.jsxs("tr",{className:"border-b border-border/60 last:border-0",children:[e.jsxs("td",{className:"whitespace-nowrap px-5 py-3",children:[e.jsx("div",{className:"font-mono text-xs",children:Ye(n.generatedAt)}),e.jsx("div",{className:"mt-1 max-w-[220px] truncate font-mono text-xs text-muted-foreground",children:n.path})]}),e.jsxs("td",{className:"px-5 py-3",children:[e.jsx("div",{className:"font-medium",children:n.rdfAccelerationProfile??n.engine}),e.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:[n.driver??n.engine," / ",n.caseProfile??"-"]}),e.jsx("div",{className:"mt-1 max-w-[220px] truncate text-xs text-muted-foreground",children:n.pgAccelerationFallbackReason??Be(n.pgActiveOperators)})]}),e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[e.jsxs("div",{children:[le(n.seedQuadCount??0)," / ",le(n.targetQuadCount??0)]}),e.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:[n.scale??"-"," / ",n.fullScale===!1?"partial":"full"]})]}),e.jsxs("td",{className:"px-5 py-3",children:[e.jsx(Et,{ok:n.planMatched!==!1&&s===0,label:`plan ${n.planMatched===!1?"fail":"ok"}`}),e.jsx("div",{className:"mt-1",children:e.jsx(Et,{ok:n.concurrencyMatched!==!1&&o===0,label:`conc ${n.concurrency??1}`})}),(s>0||o>0)&&e.jsxs("div",{className:"mt-1 text-xs text-yellow-700",children:["fail ",le(s+o)]})]}),e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[e.jsx("div",{children:we(n.ingestDurationMs??0)}),e.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:["COPY ",le(n.copyRows??0)," / fb ",le(n.copyFallbacks??0)]})]}),e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[e.jsx("div",{children:we(n.refreshDurationMs??0)}),e.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:["planner ",we(n.plannerStatsDurationMs??0)," / ",le(n.plannerStatsAnalyzedTables?.length??0)]})]}),e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[e.jsxs("div",{children:[we(n.coldStartDurationMs??0)," / ",we(n.firstQueryDurationMs??0)]}),e.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:["p50/p95 ",we(n.warmP50DurationMs??0)," / ",we(n.warmP95DurationMs??0)]})]}),e.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[e.jsx("div",{children:ct(n.storageTotalToFactsRatio??0)}),e.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:ue(n.storageTotalBytes??0)})]})]})}function Et(t){return e.jsx("span",{className:ae("inline-flex rounded-md px-2 py-0.5 text-xs",t.ok?"bg-green-100 text-green-700":"bg-yellow-100 text-yellow-800"),children:t.label})}function Cs(t){return e.jsx("div",{className:"flex max-w-[320px] flex-wrap gap-1.5",children:t.reasons.map(n=>e.jsx("span",{className:"rounded-md bg-yellow-100 px-2 py-0.5 text-xs text-yellow-800",children:n},n))})}function ue(t){if(!Number.isFinite(t)||t<=0)return"0 B";const n=["B","KiB","MiB","GiB","TiB"];let s=t,o=0;for(;s>=1024&&o<n.length-1;)s/=1024,o+=1;return`${s>=10||o===0?s.toFixed(0):s.toFixed(1)} ${n[o]}`}function ct(t){return Number.isFinite(t)?`${t.toFixed(2)}x`:"0.00x"}function Fe(t){return Number.isFinite(t)?`${Math.round(t*100)}%`:"0%"}function _t(t){const n=t?.hitCount??0,s=t?.missCount??0,o=n+s;return o<=0?"-":`${Fe(n/o)} (${le(n)}/${le(o)})`}function Es(t){const n=t.cache.materialized?.key;if(n)return`mat ${He(n)}`;const s=t.cache.result?.key??t.queryKey;return`res ${He(s)}`}function _s(t){const n=t.derivedCache,s=Fe(n.cachePressure),o=Fe(n.largestScopePressure),c=n.evictionCount;return`pressure ${s} / scope ${o} / evict ${le(c)}`}function Ts(t){const n=t.histogramHints??[];if(n.length===0)return"";const s=n.map(o=>`${o.kind}:${le(o.quadCount)}`);return`hist ${le(n.length)} ${Be(s)}`}function Ls(t){const n=t.rejectedNativeOperators??[];if(n.length===0)return"";const s=n.map(o=>`${o.capability}:${o.reason}`);return`native rejected ${le(n.length)} ${Be(s)}`}function we(t){return Number.isFinite(t)?`${Math.round(t)} ms`:"0 ms"}function le(t){return Number.isFinite(t)?new Intl.NumberFormat().format(t):"0"}function Ye(t){const n=new Date(t);return Number.isNaN(n.getTime())?t:n.toLocaleString()}function He(t){return t.length<=16?t:`${t.slice(0,12)}...${t.slice(-4)}`}function Be(t){return t?.length?t.length<=2?t.join(", "):`${t.slice(0,2).join(", ")} +${t.length-2}`:"-"}function yF(){return e.jsx(bn,{})}const Rs={healthy:"border-green-200 bg-green-50 text-green-700 dark:border-green-900 dark:bg-green-950/40 dark:text-green-300",degraded:"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-300",failed:"border-destructive/30 bg-destructive/10 text-destructive",unknown:"border-border bg-muted text-muted-foreground"};function Ge(t){const{state:n,children:s,className:o}=t;return e.jsx("span",{className:ae("inline-flex items-center rounded-md border px-2 py-1 text-xs font-medium",Rs[n],o),children:s})}const Ps=a.createContext(null);function Yt(){return a.useContext(Ps)}function Ds(t,n,s){const o=ks(t.XPOD_TUNNEL_PROFILES,s);if(o)return o;switch(n){case"ngrok":return t.NGROK_URL||"未配置";case"cloudflare":return t.CLOUDFLARE_TUNNEL_URL||t.XPOD_TUNNEL_PUBLIC_URL||"未配置";case"sakura_frp":return t.SAKURA_TUNNEL_URL||t.XPOD_TUNNEL_PUBLIC_URL||"未配置";case"frp":return t.FRP_TUNNEL_URL||"未配置";default:return"未配置"}}function ks(t,n){if(!t||!n||n==="none")return"";try{const s=JSON.parse(t);if(!Array.isArray(s))return"";const o=s.find(r=>r&&typeof r=="object"&&!Array.isArray(r)&&r.id===n);return(typeof o?.publicUrl=="string"?o.publicUrl.trim():"")||""}catch{return""}}function We(t){switch(t){case"healthy":return"可用";case"degraded":return"降级";case"failed":return"失败";default:return"未知"}}function Tt(t){return t?t.status==="running"?"healthy":t.status==="starting"?"degraded":"failed":"unknown"}function Os(t,n){return t?n?"healthy":"failed":"unknown"}function Lt(t){if(!t)return"未知";const n=Math.floor(t/1e3),s=Math.floor(n/60),o=Math.floor(s/60);return o>0?`${o}h ${s%60}m`:s>0?`${s}m ${n%60}s`:`${n}s`}function As(t){return["Public","User tunnel","LAN","Loopback"].map(s=>t.find(o=>o.name===s&&o.state==="healthy")).find(s=>!!s)??t.find(s=>s.state==="degraded")??t.find(s=>s.state==="unknown")??null}function Is(t){try{const n=new URL(t).hostname;if(n==="localhost"||n==="::1"||n.startsWith("127.")||n.startsWith("10.")||n.startsWith("192.168."))return!0;const s=n.match(/^172\.(\d+)\./u);return s?Number(s[1])>=16&&Number(s[1])<=31:!1}catch{return!1}}function qs(t){return e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"访问路径"})}),e.jsx(Z,{children:e.jsx("div",{"data-testid":"runtime-access-path-list",className:"divide-y divide-border rounded-xl border border-border",children:t.routes.map(n=>e.jsxs("div",{"data-testid":"runtime-access-path-row","data-route-name":n.name,className:"flex min-w-0 flex-col gap-3 p-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-sm font-medium",children:n.label}),e.jsx("div",{className:"mt-1 min-w-0 break-all font-mono text-xs text-muted-foreground",title:n.target,children:n.target}),e.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:n.detail})]}),e.jsx("div",{className:"shrink-0 sm:self-start",children:e.jsx(Ge,{state:n.state,children:n.statusLabel??We(n.state)})})]},n.name))})})]})}function Ms(t){return e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"完整路径详情"})}),e.jsx(Z,{children:e.jsx("div",{className:"overflow-x-auto rounded-md border border-border",children:e.jsxs("table",{className:"w-full min-w-[720px] text-sm",children:[e.jsx("thead",{className:"bg-muted/60 text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"路径"}),e.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"目标"}),e.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"状态"}),e.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"证据"})]})}),e.jsx("tbody",{className:"divide-y divide-border",children:t.routes.map(n=>e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2 font-medium",children:n.label}),e.jsx("td",{className:"px-3 py-2 font-mono text-xs break-all",children:n.target}),e.jsx("td",{className:"px-3 py-2",children:e.jsx(Ge,{state:n.state,children:n.statusLabel??We(n.state)})}),e.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:n.detail})]},n.name))})]})})})]})}function Us(t){if(!t.servicesKnown||t.servicesHealthy&&!t.publicAccessProblem)return null;const n=!t.servicesHealthy,s=n?"服务异常":"外部访问异常",o=n?"Solid Server 或 API Server 未运行,当前无法正常使用 Xpod。请先查看日志。":"Xpod 在本机运行正常,但从外网暂时无法访问。请检查公网域名、端口映射或用户隧道。";return e.jsxs(J,{variant:"bordered",className:"border-amber-200 bg-amber-50/60 dark:border-amber-900 dark:bg-amber-950/20",children:[e.jsx(ce,{children:e.jsx(re,{children:s})}),e.jsxs(Z,{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-amber-800 dark:text-amber-200",children:o}),n?e.jsx(pe,{variant:"secondary",onClick:()=>window.location.assign("/status/logs"),children:"查看日志"}):e.jsx(pe,{variant:"secondary",onClick:()=>window.location.assign("/network"),children:"打开网络设置"})]})]})}function jF(){const t=Yt(),[n,s]=a.useState(null),[o,c]=a.useState(null),[r,u]=a.useState(null),[p,f]=a.useState(null),[h,y]=a.useState(null),[N,C]=a.useState(!0),[_,L]=a.useState(""),[T,g]=a.useState(""),[b,S]=a.useState(null),v=a.useCallback(R=>{s(R.servicesData),c(R.adminData),u(R.configData),f(R.ddnsData),y(R.publicCheck),S(R.checkedAt),g(""),C(!1)},[]),x=a.useCallback(async()=>{try{v(await St())}catch{g("状态加载失败,请查看日志或稍后刷新。"),C(!1)}},[v]),M=a.useCallback(async()=>{C(!0),await x()},[x]);a.useEffect(()=>{if(t)return;let R=!1;return St().then(me=>{R||v(me)}).catch(()=>{R||(g("状态加载失败,请查看日志或稍后刷新。"),C(!1))}),()=>{R=!0}},[v,t]);const P=t?.snapshot,k=P?.servicesData??n,U=P?.adminData??o,I=P?.configData??r,F=P?.ddnsData??p,te=P?.publicCheck??h,l=P?.checkedAt??b,i=t?t.loading&&!P:N,d=t?.error??T,j=k?.find(R=>R.name==="css"),E=k?.find(R=>R.name==="api"),w=k?"healthy":"unknown",A=Tt(j),X=Tt(E),O=A==="healthy"&&X==="healthy",H=I?.env??{},K=H.XPOD_TUNNEL_PROVIDER||F?.tunnelProvider||"none",ie=H.XPOD_TUNNEL_ACTIVE_PROFILE_ID||K,Q=Nn(H,F,window.location.origin),oe=Is(Q),ne=Ds(H,K,ie),he=a.useMemo(()=>{const R=te?.status==="pass"?"healthy":oe?"unknown":te?.status==="fail"?"failed":"unknown",me=K==="none"?"unknown":F?.mode==="tunnel"||ne!=="未配置"?"healthy":"degraded";return[{name:"Loopback",label:"本机",target:`http://127.0.0.1:${H.CSS_PORT||"3000"}`,state:Os(k,O),detail:k?O?"当前设备可以使用。":"核心服务未运行。":"正在检查本机服务。"},{name:"LAN",label:"局域网",target:F?.ipv4?`http://${F.ipv4}:${H.CSS_PORT||"3000"}`:"等待本机地址上报",state:F?.ipv4&&O?"healthy":"unknown",detail:F?.ipv4?"同一网络中的设备可以使用这个地址。":"尚未发现局域网地址。"},{name:"Public",label:"公网",target:Q,state:R,statusLabel:oe?"未配置":void 0,detail:oe?"尚未开放公网访问。目前可以在本机或局域网使用。":te?.detail||"尚未检查外网是否可以访问。"},{name:"User tunnel",label:"用户隧道",target:ne,state:me,statusLabel:K==="none"?"未启用":void 0,detail:K==="none"?"未启用远程访问隧道。":`已启用 ${K}。`},{name:"P2P backup",label:"P2P 备用",target:"信令协调的原生客户端",state:"unknown",statusLabel:"备用",detail:"备用连接方式,浏览器不会默认使用。"}]},[O,Q,F,H.CSS_PORT,oe,te,k,K,ne]),D=!oe&&he.some(R=>(R.name==="Public"||R.name==="User tunnel")&&R.state==="failed"),B=k?O?D?"degraded":"healthy":"failed":"unknown",se=As(he),z=[{name:"Gateway",state:w,detail:k?"当前控制台可访问":"等待网关状态上报",uptime:l?`检查于 ${l.toLocaleTimeString()}`:"等待检查"},{name:"Solid Server",state:A,detail:j?.pid?`PID ${j.pid}`:"CSS 请求处理与 Pod 数据服务",uptime:Lt(j?.uptime)},{name:"API Server",state:X,detail:E?.pid?`PID ${E.pid}`:"管理 API 与本机控制能力",uptime:Lt(E?.uptime)}],W=async()=>{const R={lastCheckedAt:l?.toISOString()??null,services:k,adminStatus:U,ddnsStatus:F,publicIpCheck:te,routes:he,stableDataUrl:Q,recommendedRoute:se,sanitizedConfig:I?{env:I.env,secrets:I.secrets??{}}:null};await navigator.clipboard.writeText(JSON.stringify(R,null,2)),L("状态 JSON 已复制")},V=async()=>{await navigator.clipboard.writeText(Q),L("稳定资料入口已复制")};return e.jsxs("div",{className:"p-4 sm:p-8 max-w-6xl space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"type-h1",children:"状态"}),e.jsx("p",{className:"mt-2 max-w-[65ch] text-sm text-muted-foreground",children:"查看 Xpod 是否正常运行,以及当前可以从哪里访问。"})]}),e.jsxs("div",{"data-testid":"status-page-actions",className:"flex items-center gap-1 self-end lg:shrink-0 lg:self-start",children:[e.jsx(pe,{type:"button",variant:"ghost",size:"icon","aria-label":"刷新状态",title:"刷新状态",onClick:()=>t?t.refresh():void M(),disabled:i||t?.refreshing,children:e.jsx(it,{className:`h-4 w-4 ${i||t?.refreshing?"animate-spin":""}`,"aria-hidden":"true"})}),e.jsx(pe,{type:"button",variant:"ghost",size:"icon","aria-label":"复制状态 JSON",title:"复制状态 JSON",onClick:()=>{W()},children:e.jsx(Nt,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),_?e.jsx("p",{className:"text-sm text-green-700 dark:text-green-300",children:_}):null,d?e.jsx("div",{className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:d}):null,e.jsx(J,{variant:"bordered",children:e.jsx(Z,{className:"pt-5",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Ge,{state:B,children:We(B)}),e.jsx("div",{className:"text-2xl font-semibold",children:"Xpod runtime"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:l?`最后检查: ${l.toLocaleString()}`:"等待第一次检查。"}),e.jsxs("div",{className:"pt-3",children:[e.jsx("div",{className:"text-sm font-medium",children:"稳定资料入口"}),e.jsxs("div",{"data-testid":"stable-entry-row",className:"mt-1 flex min-w-0 items-center gap-1 rounded-md border border-border bg-muted/30 p-1 pl-3",children:[e.jsx("div",{className:"min-w-0 flex-1 break-all font-mono text-sm",children:Q||"等待稳定入口"}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[e.jsx(pe,{type:"button",variant:"ghost",size:"icon","aria-label":"复制入口 URL",title:"复制入口 URL",onClick:()=>{V()},disabled:!Q,children:e.jsx(Nt,{className:"h-4 w-4","aria-hidden":"true"})}),e.jsx(pe,{type:"button",variant:"ghost",size:"icon","aria-label":"打开入口",title:"打开入口",onClick:()=>window.open(Q,"_blank"),disabled:!Q,children:e.jsx(kn,{className:"h-4 w-4","aria-hidden":"true"})})]})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium",children:"当前建议路径"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:se?`${se.label}: ${se.detail}`:"正在检查可用的访问方式。"})]})]}),e.jsxs("div",{className:"border-t border-border pt-5",children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("div",{className:"text-base font-semibold",children:"Services"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"核心运行服务,不包含访问路径或隧道。"})]}),e.jsx("div",{"data-testid":"runtime-services-list",className:"divide-y divide-border rounded-xl border border-border",children:z.map(R=>e.jsxs("div",{"data-testid":"runtime-service-row","data-service-name":R.name,className:"flex min-w-0 flex-col gap-2 p-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:R.name}),e.jsx(Ge,{state:R.state,children:We(R.state)})]}),e.jsx("div",{className:"mt-1 break-words text-xs text-muted-foreground",children:R.detail})]}),e.jsxs("div",{className:"shrink-0 text-xs text-muted-foreground sm:text-right",children:[e.jsx("span",{className:"text-muted-foreground",children:"uptime"}),e.jsx("span",{className:"ml-2 font-mono",children:R.uptime})]})]},R.name))})]})]})})}),e.jsx(Us,{servicesKnown:!!k,servicesHealthy:O,publicAccessProblem:D}),e.jsx("div",{"data-testid":"runtime-access-paths",children:e.jsx(qs,{routes:he})}),e.jsx(Ms,{routes:he}),e.jsxs(J,{variant:"bordered",children:[e.jsx(ce,{children:e.jsx(re,{children:"Cloud 协调"})}),e.jsxs(Z,{className:"space-y-2 text-sm",children:[e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"nodeId"}),e.jsx("span",{className:"font-mono break-all",children:H.XPOD_NODE_ID||"未上报"})]}),e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"spDomain"}),e.jsx("span",{className:"font-mono break-all",children:H.XPOD_SP_DOMAIN||F?.fqdn||"未分配"})]}),e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"DDNS"}),e.jsx("span",{children:F?.detail||"未上报"})]}),e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"heartbeat"}),e.jsx("span",{children:F?.enabled?"已启用":"未启用或未上报"})]}),e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"模式"}),e.jsx("span",{children:F?.mode||"unknown"})]}),e.jsx("p",{className:"pt-2 text-muted-foreground",children:"Cloud 负责稳定域名和 IDP,本地 SP 负责数据存储与实际接入。"})]})]}),e.jsxs(J,{variant:"bordered",className:"bg-muted/30",children:[e.jsx(ce,{children:e.jsx(re,{children:"配置摘要"})}),e.jsxs(Z,{className:"space-y-2 text-sm",children:[e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"edition"}),e.jsx("span",{children:U?.env.XPOD_EDITION||"local"})]}),e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"baseUrl"}),e.jsx("span",{className:"font-mono break-all",children:Q})]}),e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"storage"}),e.jsx("span",{className:"font-mono break-all",children:H.CSS_ROOT_FILE_PATH||"./data"})]}),e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"provider"}),e.jsx("span",{children:K})]}),e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"tunnelProfile"}),e.jsx("span",{children:ie})]}),e.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"secrets"}),e.jsxs("span",{children:[Object.entries(I?.secrets??{}).filter(([,R])=>R.configured).length," 个已配置"]})]})]})]}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:["修改运行方式时,请进入 ",e.jsx(vn,{className:"text-primary underline-offset-4 hover:underline",to:"/services/configuration",children:"配置"}),"。"]})]})}var $s=Object.defineProperty,fe=(t,n)=>$s(t,"name",{value:n,configurable:!0});function Jt(t){const n=t+"CollectionProvider",[s,o]=dt(n),[c,r]=s(n,{collectionRef:{current:null},itemMap:new Map}),u=fe(T=>{const{scope:g,children:b}=T,S=a.useRef(null),v=a.useRef(new Map).current;return e.jsx(c,{scope:g,itemMap:v,collectionRef:S,children:b})},"CollectionProvider");u.displayName=n;const p=t+"CollectionSlot",f=Ue(p),h=a.forwardRef((T,g)=>{const{scope:b,children:S}=T,v=r(p,b),x=ye(g,v.collectionRef);return e.jsx(f,{ref:x,children:S})});h.displayName=p;const y=t+"CollectionItemSlot",N="data-radix-collection-item",C=Ue(y),_=a.forwardRef((T,g)=>{const{scope:b,children:S,...v}=T,x=a.useRef(null),M=ye(g,x),P=r(y,b);return a.useEffect(()=>(P.itemMap.set(x,{ref:x,...v}),()=>{P.itemMap.delete(x)})),e.jsx(C,{[N]:"",ref:M,children:S})});_.displayName=y;function L(T){const g=r(t+"CollectionConsumer",T);return a.useCallback(()=>{const S=g.collectionRef.current;if(!S)return[];const v=Array.from(S.querySelectorAll(`[${N}]`));return Array.from(g.itemMap.values()).sort((P,k)=>v.indexOf(P.ref.current)-v.indexOf(k.ref.current))},[g.collectionRef,g.itemMap])}return fe(L,"useCollection"),[{Provider:u,Slot:h,ItemSlot:_},L,o]}fe(Jt,"createCollection");var Rt=new WeakMap,de,ve,tt=(ve=class extends Map{constructor(s){super(s);jt(this,de);et(this,de,[...super.keys()]),Rt.set(this,!0)}set(s,o){return Rt.get(this)&&(this.has(s)?xe(this,de)[xe(this,de).indexOf(s)]=s:xe(this,de).push(s)),super.set(s,o),this}insert(s,o,c){const r=this.has(o),u=xe(this,de).length,p=mt(s);let f=p>=0?p:u+p;const h=f<0||f>=u?-1:f;if(h===this.size||r&&h===this.size-1||h===-1)return this.set(o,c),this;const y=this.size+(r?0:1);p<0&&f++;const N=[...xe(this,de)];let C,_=!1;for(let L=f;L<y;L++)if(f===L){let T=N[L];N[L]===o&&(T=N[L+1]),r&&this.delete(o),C=this.get(T),this.set(o,c)}else{!_&&N[L-1]===o&&(_=!0);const T=N[_?L:L-1],g=C;C=this.get(T),this.delete(T),this.set(T,g)}return this}with(s,o,c){const r=new ve(this);return r.insert(s,o,c),r}before(s){const o=xe(this,de).indexOf(s)-1;if(!(o<0))return this.entryAt(o)}setBefore(s,o,c){const r=xe(this,de).indexOf(s);return r===-1?this:this.insert(r,o,c)}after(s){let o=xe(this,de).indexOf(s);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(s,o,c){const r=xe(this,de).indexOf(s);return r===-1?this:this.insert(r+1,o,c)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return et(this,de,[]),super.clear()}delete(s){const o=super.delete(s);return o&&xe(this,de).splice(xe(this,de).indexOf(s),1),o}deleteAt(s){const o=this.keyAt(s);return o!==void 0?this.delete(o):!1}at(s){const o=Xe(xe(this,de),s);if(o!==void 0)return this.get(o)}entryAt(s){const o=Xe(xe(this,de),s);if(o!==void 0)return[o,this.get(o)]}indexOf(s){return xe(this,de).indexOf(s)}keyAt(s){return Xe(xe(this,de),s)}from(s,o){const c=this.indexOf(s);if(c===-1)return;let r=c+o;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(s,o){const c=this.indexOf(s);if(c===-1)return;let r=c+o;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(s,o){let c=0;for(const r of this){if(Reflect.apply(s,o,[r,c,this]))return r;c++}}findIndex(s,o){let c=0;for(const r of this){if(Reflect.apply(s,o,[r,c,this]))return c;c++}return-1}filter(s,o){const c=[];let r=0;for(const u of this)Reflect.apply(s,o,[u,r,this])&&c.push(u),r++;return new ve(c)}map(s,o){const c=[];let r=0;for(const u of this)c.push([u[0],Reflect.apply(s,o,[u,r,this])]),r++;return new ve(c)}reduce(...s){const[o,c]=s;let r=0,u=c??this.at(0);for(const p of this)r===0&&s.length===1?u=p:u=Reflect.apply(o,this,[u,p,r,this]),r++;return u}reduceRight(...s){const[o,c]=s;let r=c??this.at(-1);for(let u=this.size-1;u>=0;u--){const p=this.at(u);u===this.size-1&&s.length===1?r=p:r=Reflect.apply(o,this,[r,p,u,this])}return r}toSorted(s){const o=[...this.entries()].sort(s);return new ve(o)}toReversed(){const s=new ve;for(let o=this.size-1;o>=0;o--){const c=this.keyAt(o),r=this.get(c);s.set(c,r)}return s}toSpliced(...s){const o=[...this.entries()];return o.splice(...s),new ve(o)}slice(s,o){const c=new ve;let r=this.size-1;if(s===void 0)return c;s<0&&(s=s+this.size),o!==void 0&&o>0&&(r=o-1);for(let u=s;u<=r;u++){const p=this.keyAt(u),f=this.get(p);c.set(p,f)}return c}every(s,o){let c=0;for(const r of this){if(!Reflect.apply(s,o,[r,c,this]))return!1;c++}return!0}some(s,o){let c=0;for(const r of this){if(Reflect.apply(s,o,[r,c,this]))return!0;c++}return!1}},de=new WeakMap,fe(ve,"OrderedDict"),ve);function Xe(t,n){if("at"in Array.prototype)return Array.prototype.at.call(t,n);const s=Zt(t,n);return s===-1?void 0:t[s]}fe(Xe,"at");function Zt(t,n){const s=t.length,o=mt(n),c=o>=0?o:s+o;return c<0||c>=s?-1:c}fe(Zt,"toSafeIndex");function mt(t){return t!==t||t===0?0:Math.trunc(t)}fe(mt,"toSafeInteger");function Fs(t){const n=t+"CollectionProvider",[s,o]=dt(n),[c,r]=s(n,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new tt,setItemMap:fe(()=>{},"setItemMap")}),u=fe(({state:v,...x})=>v?e.jsx(f,{...x,state:v}):e.jsx(p,{...x}),"CollectionProvider");u.displayName=n;const p=fe(v=>{const x=g();return e.jsx(f,{...v,state:x})},"CollectionInit");p.displayName=n+"Init";const f=fe(v=>{const{scope:x,children:M,state:P}=v,k=a.useRef(null),[U,I]=a.useState(null),F=ye(k,I),[te,l]=P;return a.useEffect(()=>{if(!U)return;const i=nn(()=>{});return i.observe(U,{childList:!0,subtree:!0}),()=>{i.disconnect()}},[U]),e.jsx(c,{scope:x,itemMap:te,setItemMap:l,collectionRef:F,collectionRefObject:k,collectionElement:U,children:M})},"CollectionProviderImpl");f.displayName=n+"Impl";const h=t+"CollectionSlot",y=Ue(h),N=a.forwardRef((v,x)=>{const{scope:M,children:P}=v,k=r(h,M),U=ye(x,k.collectionRef);return e.jsx(y,{ref:U,children:P})});N.displayName=h;const C=t+"CollectionItemSlot",_="data-radix-collection-item",L=Ue(C),T=a.forwardRef((v,x)=>{const{scope:M,children:P,...k}=v,U=a.useRef(null),[I,F]=a.useState(null),te=ye(x,U,F),l=r(C,M),{setItemMap:i}=l,d=a.useRef(k);en(d.current,k)||(d.current=k);const j=d.current;return a.useEffect(()=>{const E=j;return i(w=>I?w.has(I)?w.set(I,{...E,element:I}).toSorted(rt):(w.set(I,{...E,element:I}),w.toSorted(rt)):w),()=>{i(w=>!I||!w.has(I)?w:(w.delete(I),new tt(w)))}},[I,j,i]),e.jsx(L,{[_]:"",ref:te,children:P})});T.displayName=C;function g(){return a.useState(new tt)}fe(g,"useInitCollection");function b(v){const{itemMap:x}=r(t+"CollectionConsumer",v);return x}return fe(b,"useCollection"),[{Provider:u,Slot:N,ItemSlot:T},{createCollectionScope:o,useCollection:b,useInitCollection:g}]}fe(Fs,"createCollection");function en(t,n){if(t===n)return!0;if(typeof t!="object"||typeof n!="object"||t==null||n==null)return!1;const s=Object.keys(t),o=Object.keys(n);if(s.length!==o.length)return!1;for(const c of s)if(!Object.prototype.hasOwnProperty.call(n,c)||t[c]!==n[c])return!1;return!0}fe(en,"shallowEqual");function tn(t,n){return!!(n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}fe(tn,"isElementPreceding");function rt(t,n){return!t[1].element||!n[1].element?0:tn(t[1].element,n[1].element)?-1:1}fe(rt,"sortByDocumentPosition");function nn(t){return new MutationObserver(s=>{for(const o of s)if(o.type==="childList"){t();return}})}fe(nn,"getChildListObserver");var Hs=Object.defineProperty,Bs=(t,n)=>Hs(t,"name",{value:n,configurable:!0});function sn(t){const n=a.useRef({value:t,previous:t});return a.useMemo(()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous),[t])}Bs(sn,"usePrevious");var Vs=Object.defineProperty,G=(t,n)=>Vs(t,"name",{value:n,configurable:!0}),Ks=[" ","Enter","ArrowUp","ArrowDown"],zs=[" ","Enter"],qe="Select",[Je,ft,Xs]=Jt(qe),[Ae,NF]=dt(qe,[Xs,Gt]),ht=Gt(),[Gs,Re]=Ae(qe),[Ws,Qs]=Ae(qe);function on(t){const{__scopeSelect:n,children:s,open:o,defaultOpen:c,onOpenChange:r,value:u,defaultValue:p,onValueChange:f,dir:h,name:y,autoComplete:N,disabled:C,required:_,form:L,internal_do_not_use_render:T}=t,g=ht(n),[b,S]=a.useState(null),[v,x]=a.useState(null),[M,P]=a.useState(!1),k=Wt(h),[U,I]=wt({prop:o,defaultProp:c??!1,onChange:r,caller:qe}),[F,te]=wt({prop:u,defaultProp:p,onChange:f,caller:qe}),l=a.useRef(null),i=a.useRef(F);a.useEffect(()=>{const K=L?b?.ownerDocument.getElementById(L):b?.form;if(K instanceof HTMLFormElement){const ie=G(()=>te(i.current),"reset");return K.addEventListener("reset",ie),()=>K.removeEventListener("reset",ie)}},[L,b,te]);const d=b?!!L||!!b.closest("form"):!0,[j,E]=a.useState(new Set),w=Xt(),A=Array.from(j).map(K=>K.props.value).join(";"),X=a.useCallback(K=>{E(ie=>new Set(ie).add(K))},[]),O=a.useCallback(K=>{E(ie=>{const Q=new Set(ie);return Q.delete(K),Q})},[]),H={required:_,trigger:b,onTriggerChange:S,valueNode:v,onValueNodeChange:x,valueNodeHasChildren:M,onValueNodeHasChildrenChange:P,contentId:w,value:F,onValueChange:te,open:U,onOpenChange:I,dir:k,triggerPointerDownPosRef:l,disabled:C,name:y,autoComplete:N,form:L,nativeOptions:j,nativeSelectKey:A,isFormControl:d};return e.jsx(Vn,{...g,children:e.jsx(Gs,{scope:n,...H,children:e.jsx(Je.Provider,{scope:n,children:e.jsx(Ws,{scope:n,onNativeOptionAdd:X,onNativeOptionRemove:O,children:pn(T)?T(H):s})})})})}G(on,"SelectProvider");var Ys=G(t=>{const{__scopeSelect:n,children:s,...o}=t;return e.jsx(on,{__scopeSelect:n,...o,internal_do_not_use_render:({isFormControl:c})=>e.jsxs(e.Fragment,{children:[s,c?e.jsx(No,{__scopeSelect:n}):null]})})},"Select"),Js="SelectTrigger",cn=a.forwardRef(G(function(n,s){const{__scopeSelect:o,disabled:c=!1,...r}=n,u=ht(o),p=Re(Js,o),f=p.disabled||c,h=ye(s,p.onTriggerChange),y=ft(o),N=a.useRef("touch"),[C,_,L]=xt(g=>{const b=y().filter(x=>!x.disabled),S=b.find(x=>x.value===p.value),v=gt(b,g,S);v!==void 0&&p.onValueChange(v.value)}),T=G(g=>{f||(p.onOpenChange(!0),L()),g&&(p.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})},"handleOpen");return e.jsx(On,{asChild:!0,...u,children:e.jsx(Ee.button,{type:"button",role:"combobox","aria-controls":p.open?p.contentId:void 0,"aria-expanded":p.open,"aria-required":p.required,"aria-autocomplete":"none",dir:p.dir,"data-state":p.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":Ve(p.value)?"":void 0,...r,ref:h,onClick:be(r.onClick,g=>{g.currentTarget.focus(),N.current!=="mouse"&&T(g)}),onPointerDown:be(r.onPointerDown,g=>{N.current=g.pointerType;const b=g.target;b.hasPointerCapture(g.pointerId)&&b.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(T(g),g.preventDefault())}),onKeyDown:be(r.onKeyDown,g=>{const b=C.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&_(g.key),!(b&&g.key===" ")&&Ks.includes(g.key)&&(T(),g.preventDefault())})})})},"SelectTrigger")),Zs="SelectValue",eo=a.forwardRef(G(function(n,s){const{__scopeSelect:o,className:c,style:r,children:u,placeholder:p="",...f}=n,h=Re(Zs,o),{onValueNodeHasChildrenChange:y}=h,N=u!==void 0,C=ye(s,h.onValueNodeChange);$e(()=>{y(N)},[y,N]);const _=Ve(h.value);return e.jsx(Ee.span,{...f,asChild:_?!1:f.asChild,ref:C,style:{pointerEvents:"none"},children:e.jsx(a.Fragment,{children:_?p:u},_?"placeholder":"value")})},"SelectValue")),to=a.forwardRef(G(function(n,s){const{__scopeSelect:o,children:c,...r}=n;return e.jsx(Ee.span,{"aria-hidden":!0,...r,ref:s,children:c||"▼"})},"SelectIcon")),no="SelectPortal",[so,oo]=Ae(no,{forceMount:void 0}),co=G(t=>{const{__scopeSelect:n,forceMount:s,...o}=t;return e.jsx(so,{scope:t.__scopeSelect,forceMount:s,children:e.jsx(An,{asChild:!0,...o})})},"SelectPortal"),Oe="SelectContent",rn=a.forwardRef(G(function(n,s){const o=oo(Oe,n.__scopeSelect),{forceMount:c=o.forceMount,...r}=n,u=Re(Oe,n.__scopeSelect),[p,f]=a.useState();return $e(()=>{f(new DocumentFragment)},[]),e.jsx(In,{present:c||u.open,children:({present:h})=>h?e.jsx(lo,{...r,ref:s}):e.jsx(ro,{...r,fragment:p})})},"SelectContent")),ro=a.forwardRef(G(function(n,s){const{__scopeSelect:o,children:c,fragment:r}=n;return r?zt.createPortal(e.jsx(an,{scope:o,children:e.jsx(Je.Slot,{scope:o,children:e.jsx("div",{ref:s,children:c})})}),r):null},"SelectContentFragment")),Ne=10,[an,Ze]=Ae(Oe),ao=Ue("SelectContent.RemoveScroll"),lo=a.forwardRef(G(function(n,s){const{__scopeSelect:o}=n,{position:c="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:u,onPointerDownOutside:p,side:f,sideOffset:h,align:y,alignOffset:N,arrowPadding:C,collisionBoundary:_,collisionPadding:L,sticky:T,hideWhenDetached:g,avoidCollisions:b,...S}=n,v=Re(Oe,o),[x,M]=a.useState(null),[P,k]=a.useState(null),U=ye(s,M),[I,F]=a.useState(null),[te,l]=a.useState(null),i=ft(o),[d,j]=a.useState(!1),E=a.useRef(!1);a.useEffect(()=>{if(x)return qn(x)},[x]),Mn();const w=a.useCallback(D=>{const[B,...se]=i().map(V=>V.ref.current),[z]=se.slice(-1),W=document.activeElement;for(const V of D)if(V===W||(V?.scrollIntoView({block:"nearest"}),V===B&&P&&(P.scrollTop=0),V===z&&P&&(P.scrollTop=P.scrollHeight),V?.focus(),document.activeElement!==W))return},[i,P]),A=a.useCallback(()=>w([I,x]),[w,I,x]);a.useEffect(()=>{d&&A()},[d,A]);const{onOpenChange:X,triggerPointerDownPosRef:O}=v;a.useEffect(()=>{if(x){let D={x:0,y:0};const B=G(z=>{D={x:Math.abs(Math.round(z.pageX)-(O.current?.x??0)),y:Math.abs(Math.round(z.pageY)-(O.current?.y??0))}},"handlePointerMove"),se=G(z=>{D.x<=10&&D.y<=10?z.preventDefault():z.composedPath().includes(x)||X(!1),document.removeEventListener("pointermove",B),O.current=null},"handlePointerUp");return O.current!==null&&(document.addEventListener("pointermove",B),document.addEventListener("pointerup",se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",B),document.removeEventListener("pointerup",se,{capture:!0})}}},[x,X,O]),a.useEffect(()=>{const D=G(()=>X(!1),"close");return window.addEventListener("blur",D),window.addEventListener("resize",D),()=>{window.removeEventListener("blur",D),window.removeEventListener("resize",D)}},[X]);const[H,K]=xt(D=>{const B=i().filter(W=>!W.disabled),se=B.find(W=>W.ref.current===document.activeElement),z=gt(B,D,se);z&&setTimeout(()=>z.ref.current?.focus())}),ie=a.useCallback((D,B,se)=>{const z=!E.current&&!se;(v.value!==void 0&&v.value===B||z)&&(F(D),z&&(E.current=!0))},[v.value]),Q=a.useCallback(()=>x?.focus(),[x]),oe=a.useCallback((D,B,se)=>{const z=!E.current&&!se;(v.value!==void 0&&v.value===B||z)&&l(D)},[v.value]),ne=c==="popper"?Pt:io,he=ne===Pt?{side:f,sideOffset:h,align:y,alignOffset:N,arrowPadding:C,collisionBoundary:_,collisionPadding:L,sticky:T,hideWhenDetached:g,avoidCollisions:b}:{};return e.jsx(an,{scope:o,content:x,viewport:P,onViewportChange:k,itemRefCallback:ie,selectedItem:I,onItemLeave:Q,itemTextRefCallback:oe,focusSelectedItem:A,selectedItemText:te,position:c,isPositioned:d,searchRef:H,children:e.jsx(Un,{as:ao,allowPinchZoom:!0,children:e.jsx($n,{asChild:!0,trapped:v.open,onMountAutoFocus:D=>{D.preventDefault()},onUnmountAutoFocus:be(r,D=>{v.trigger?.focus({preventScroll:!0}),D.preventDefault()}),children:e.jsx(Fn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:D=>D.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:e.jsx(ne,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:D=>D.preventDefault(),...S,...he,onPlaced:()=>j(!0),ref:U,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:be(S.onKeyDown,D=>{const B=D.ctrlKey||D.altKey||D.metaKey;if(D.key==="Tab"&&D.preventDefault(),!B&&D.key.length===1&&K(D.key),["ArrowUp","ArrowDown","Home","End"].includes(D.key)){let z=i().filter(W=>!W.disabled).map(W=>W.ref.current);if(["ArrowUp","End"].includes(D.key)&&(z=z.slice().reverse()),["ArrowUp","ArrowDown"].includes(D.key)){const W=D.target,V=z.indexOf(W);z=z.slice(V+1)}setTimeout(()=>w(z)),D.preventDefault()}})})})})})})},"SelectContentImpl")),io=a.forwardRef(G(function(n,s){const{__scopeSelect:o,onPlaced:c,...r}=n,u=Re(Oe,o),p=Ze(Oe,o),[f,h]=a.useState(null),[y,N]=a.useState(null),C=ye(s,N),_=ft(o),L=a.useRef(!1),T=a.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:S,focusSelectedItem:v}=p,x=a.useCallback(()=>{if(u.trigger&&u.valueNode&&f&&y&&g&&b&&S){const U=u.trigger.getBoundingClientRect(),I=y.getBoundingClientRect(),F=u.valueNode.getBoundingClientRect(),te=S.getBoundingClientRect();if(u.dir!=="rtl"){const W=te.left-I.left,V=F.left-W,R=U.left-V,me=U.width+R,m=Math.max(me,I.width),q=window.innerWidth-Ne,ee=ot(V,[Ne,Math.max(Ne,q-m)]);f.style.minWidth=me+"px",f.style.left=ee+"px"}else{const W=I.right-te.right,V=window.innerWidth-F.right-W,R=window.innerWidth-U.right-V,me=U.width+R,m=Math.max(me,I.width),q=window.innerWidth-Ne,ee=ot(V,[Ne,Math.max(Ne,q-m)]);f.style.minWidth=me+"px",f.style.right=ee+"px"}const l=_(),i=window.innerHeight-Ne*2,d=g.scrollHeight,j=window.getComputedStyle(y),E=parseInt(j.borderTopWidth,10),w=parseInt(j.paddingTop,10),A=parseInt(j.borderBottomWidth,10),X=parseInt(j.paddingBottom,10),O=E+w+d+X+A,H=Math.min(b.offsetHeight*5,O),K=window.getComputedStyle(g),ie=parseInt(K.paddingTop,10),Q=parseInt(K.paddingBottom,10),oe=U.top+U.height/2-Ne,ne=i-oe,he=b.offsetHeight/2,D=b.offsetTop+he,B=E+w+D,se=O-B;if(B<=oe){const W=l.length>0&&b===l[l.length-1].ref.current;f.style.bottom="0px";const V=y.clientHeight-g.offsetTop-g.offsetHeight,R=Math.max(ne,he+(W?Q:0)+V+A),me=B+R;f.style.height=me+"px"}else{const W=l.length>0&&b===l[0].ref.current;f.style.top="0px";const R=Math.max(oe,E+g.offsetTop+(W?ie:0)+he)+se;f.style.height=R+"px",g.scrollTop=B-oe+g.offsetTop}f.style.margin=`${Ne}px 0`,f.style.minHeight=H+"px",f.style.maxHeight=i+"px",c?.(),requestAnimationFrame(()=>L.current=!0)}},[_,u.trigger,u.valueNode,f,y,g,b,S,u.dir,c]);$e(()=>x(),[x]);const[M,P]=a.useState();$e(()=>{y&&P(window.getComputedStyle(y).zIndex)},[y]);const k=a.useCallback(U=>{U&&T.current===!0&&(x(),v?.(),T.current=!1)},[x,v]);return e.jsx(uo,{scope:o,contentWrapper:f,shouldExpandOnScrollRef:L,onScrollButtonChange:k,children:e.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:e.jsx(Ee.div,{...r,ref:C,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})},"SelectItemAlignedPosition")),Pt=a.forwardRef(G(function(n,s){const{__scopeSelect:o,align:c="start",collisionPadding:r=Ne,...u}=n,p=ht(o);return e.jsx(Hn,{...p,...u,ref:s,align:c,collisionPadding:r,style:{boxSizing:"border-box",...u.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[uo,po]=Ae(Oe,{}),Dt="SelectViewport",mo=a.forwardRef(G(function(n,s){const{__scopeSelect:o,nonce:c,...r}=n,u=Ze(Dt,o),p=po(Dt,o),f=ye(s,u.onViewportChange),h=a.useRef(0);return e.jsxs(e.Fragment,{children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:c}),e.jsx(Je.Slot,{scope:o,children:e.jsx(Ee.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:be(r.onScroll,y=>{const N=y.currentTarget,{contentWrapper:C,shouldExpandOnScrollRef:_}=p;if(_?.current&&C){const L=Math.abs(h.current-N.scrollTop);if(L>0){const T=window.innerHeight-Ne*2,g=parseFloat(C.style.minHeight),b=parseFloat(C.style.height),S=Math.max(g,b);if(S<T){const v=S+L,x=Math.min(T,v),M=v-x;C.style.height=x+"px",C.style.bottom==="0px"&&(N.scrollTop=M>0?M:0,C.style.justifyContent="flex-end")}}}h.current=N.scrollTop})})})]})},"SelectViewport")),fo="SelectGroup",[SF,ho]=Ae(fo),xo="SelectLabel",ln=a.forwardRef(G(function(n,s){const{__scopeSelect:o,...c}=n,r=ho(xo,o);return e.jsx(Ee.div,{id:r.id,...c,ref:s})},"SelectLabel")),at="SelectItem",[go,dn]=Ae(at),un=a.forwardRef(G(function(n,s){const{__scopeSelect:o,value:c,disabled:r=!1,textValue:u,...p}=n,f=Re(at,o),h=Ze(at,o),y=f.value===c,[N,C]=a.useState(u??""),[_,L]=a.useState(!1),T=ut(x=>h.itemRefCallback?.(x,c,r)),g=ye(s,T),b=Xt(),S=a.useRef("touch"),v=G(()=>{r||(f.onValueChange(c),f.onOpenChange(!1))},"handleSelect");return e.jsx(go,{scope:o,value:c,disabled:r,textId:b,isSelected:y,onItemTextChange:a.useCallback(x=>{C(M=>M||(x?.textContent??"").trim())},[]),children:e.jsx(Je.ItemSlot,{scope:o,value:c,disabled:r,textValue:N,children:e.jsx(Ee.div,{role:"option","aria-labelledby":b,"data-highlighted":_?"":void 0,"aria-selected":y&&_,"data-state":y?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...p,ref:g,onFocus:be(p.onFocus,()=>L(!0)),onBlur:be(p.onBlur,()=>L(!1)),onClick:be(p.onClick,()=>{S.current!=="mouse"&&v()}),onPointerUp:be(p.onPointerUp,()=>{S.current==="mouse"&&v()}),onPointerDown:be(p.onPointerDown,x=>{S.current=x.pointerType}),onPointerMove:be(p.onPointerMove,x=>{S.current=x.pointerType,r?h.onItemLeave?.():S.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(p.onPointerLeave,x=>{x.currentTarget===document.activeElement&&h.onItemLeave?.()}),onKeyDown:be(p.onKeyDown,x=>{r||x.target!==x.currentTarget||h.searchRef?.current!==""&&x.key===" "||(zs.includes(x.key)&&v(),x.key===" "&&x.preventDefault())})})})})},"SelectItem")),Ke="SelectItemText",bo=a.forwardRef(G(function(n,s){const{__scopeSelect:o,className:c,style:r,...u}=n,p=Re(Ke,o),f=Ze(Ke,o),h=dn(Ke,o),y=Qs(Ke,o),[N,C]=a.useState(null),_=ut(v=>f.itemTextRefCallback?.(v,h.value,h.disabled)),L=ye(s,C,h.onItemTextChange,_),T=N?.textContent,g=a.useMemo(()=>e.jsx("option",{value:h.value,disabled:h.disabled,children:T},h.value),[h.disabled,h.value,T]),{onNativeOptionAdd:b,onNativeOptionRemove:S}=y;return $e(()=>(b(g),()=>S(g)),[b,S,g]),e.jsxs(e.Fragment,{children:[e.jsx(Ee.span,{id:h.textId,...u,ref:L}),h.isSelected&&p.valueNode&&!p.valueNodeHasChildren&&!Ve(p.value)?zt.createPortal(u.children,p.valueNode):null]})},"SelectItemText")),vo="SelectItemIndicator",yo=a.forwardRef(G(function(n,s){const{__scopeSelect:o,...c}=n;return dn(vo,o).isSelected?e.jsx(Ee.span,{"aria-hidden":!0,...c,ref:s}):null},"SelectItemIndicator")),jo="SelectBubbleInput",No=a.forwardRef(G(function({__scopeSelect:n,...s},o){const c=Re(jo,n),{value:r,onValueChange:u,required:p,disabled:f,name:h,autoComplete:y,form:N}=c,{nativeOptions:C,nativeSelectKey:_}=c,L=a.useRef(null),T=ye(o,L),g=r??"",b=sn(g),S=Array.from(C).some(v=>(v.props.value??"")==="");return a.useEffect(()=>{const v=L.current;if(!v)return;const x=window.HTMLSelectElement.prototype,P=Object.getOwnPropertyDescriptor(x,"value").set;if(b!==g&&P){const k=new Event("change",{bubbles:!0});P.call(v,g),v.dispatchEvent(k)}},[b,g]),e.jsxs(Ee.select,{"aria-hidden":!0,required:p,tabIndex:-1,name:h,autoComplete:y,disabled:f,form:N,onChange:v=>u(v.target.value),...s,style:{...Bn,...s.style},ref:T,defaultValue:g,children:[Ve(r)&&!S?e.jsx("option",{value:""}):null,Array.from(C)]},_)},"SelectBubbleInput"));function pn(t){return typeof t=="function"}G(pn,"isFunction");function Ve(t){return t===""||t===void 0}G(Ve,"shouldShowPlaceholder");function xt(t){const n=ut(t),s=a.useRef(""),o=a.useRef(0),c=a.useCallback(u=>{const p=s.current+u;n(p),G((function f(h){s.current=h,window.clearTimeout(o.current),h!==""&&(o.current=window.setTimeout(()=>f(""),1e3))}),"updateSearch")(p)},[n]),r=a.useCallback(()=>{s.current="",window.clearTimeout(o.current)},[]);return a.useEffect(()=>()=>window.clearTimeout(o.current),[]),[s,c,r]}G(xt,"useTypeaheadSearch");function gt(t,n,s){const c=n.length>1&&Array.from(n).every(h=>h===n[0])?n[0]:n,r=s?t.indexOf(s):-1;let u=mn(t,Math.max(r,0));c.length===1&&(u=u.filter(h=>h!==s));const f=u.find(h=>h.textValue.toLowerCase().startsWith(c.toLowerCase()));return f!==s?f:void 0}G(gt,"findNextItem");function mn(t,n){return t.map((s,o)=>t[(n+o)%t.length])}G(mn,"wrapArray");const De=Ys,ke=eo,Te=a.forwardRef(({className:t,children:n,...s},o)=>e.jsxs(cn,{ref:o,className:ae("flex h-9 items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm","placeholder:text-muted-foreground focus:outline-none focus-visible:border-primary","disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:[n,e.jsx(to,{asChild:!0,children:e.jsx(ss,{className:"h-4 w-4 opacity-50"})})]}));Te.displayName=cn.displayName;const Le=a.forwardRef(({className:t,children:n,position:s="popper",...o},c)=>e.jsx(co,{children:e.jsx(rn,{ref:c,className:ae("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:s,...o,children:e.jsx(mo,{className:ae("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n})})}));Le.displayName=rn.displayName;const So=a.forwardRef(({className:t,...n},s)=>e.jsx(ln,{ref:s,className:ae("px-2 py-1.5 text-sm font-semibold",t),...n}));So.displayName=ln.displayName;const Y=a.forwardRef(({className:t,children:n,...s},o)=>e.jsxs(un,{ref:o,className:ae("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...s,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(yo,{children:e.jsx(ts,{className:"h-4 w-4"})})}),e.jsx(bo,{children:n})]}));Y.displayName=un.displayName;var nt={},je={};const wo="Á",Co="á",Eo="Ă",_o="ă",To="∾",Lo="∿",Ro="∾̳",Po="Â",Do="â",ko="´",Oo="А",Ao="а",Io="Æ",qo="æ",Mo="",Uo="𝔄",$o="𝔞",Fo="À",Ho="à",Bo="ℵ",Vo="ℵ",Ko="Α",zo="α",Xo="Ā",Go="ā",Wo="⨿",Qo="&",Yo="&",Jo="⩕",Zo="⩓",ec="∧",tc="⩜",nc="⩘",sc="⩚",oc="∠",cc="⦤",rc="∠",ac="⦨",lc="⦩",ic="⦪",dc="⦫",uc="⦬",pc="⦭",mc="⦮",fc="⦯",hc="∡",xc="∟",gc="⊾",bc="⦝",vc="∢",yc="Å",jc="⍼",Nc="Ą",Sc="ą",wc="𝔸",Cc="𝕒",Ec="⩯",_c="≈",Tc="⩰",Lc="≊",Rc="≋",Pc="'",Dc="",kc="≈",Oc="≊",Ac="Å",Ic="å",qc="𝒜",Mc="𝒶",Uc="≔",$c="*",Fc="≈",Hc="≍",Bc="Ã",Vc="ã",Kc="Ä",zc="ä",Xc="∳",Gc="⨑",Wc="≌",Qc="϶",Yc="‵",Jc="∽",Zc="⋍",er="∖",tr="⫧",nr="⊽",sr="⌅",or="⌆",cr="⌅",rr="⎵",ar="⎶",lr="≌",ir="Б",dr="б",ur="„",pr="∵",mr="∵",fr="∵",hr="⦰",xr="϶",gr="ℬ",br="ℬ",vr="Β",yr="β",jr="ℶ",Nr="≬",Sr="𝔅",wr="𝔟",Cr="⋂",Er="◯",_r="⋃",Tr="⨀",Lr="⨁",Rr="⨂",Pr="⨆",Dr="★",kr="▽",Or="△",Ar="⨄",Ir="⋁",qr="⋀",Mr="⤍",Ur="⧫",$r="▪",Fr="▴",Hr="▾",Br="◂",Vr="▸",Kr="␣",zr="▒",Xr="░",Gr="▓",Wr="█",Qr="=⃥",Yr="≡⃥",Jr="⫭",Zr="⌐",ea="𝔹",ta="𝕓",na="⊥",sa="⊥",oa="⋈",ca="⧉",ra="┐",aa="╕",la="╖",ia="╗",da="┌",ua="╒",pa="╓",ma="╔",fa="─",ha="═",xa="┬",ga="╤",ba="╥",va="╦",ya="┴",ja="╧",Na="╨",Sa="╩",wa="⊟",Ca="⊞",Ea="⊠",_a="┘",Ta="╛",La="╜",Ra="╝",Pa="└",Da="╘",ka="╙",Oa="╚",Aa="│",Ia="║",qa="┼",Ma="╪",Ua="╫",$a="╬",Fa="┤",Ha="╡",Ba="╢",Va="╣",Ka="├",za="╞",Xa="╟",Ga="╠",Wa="‵",Qa="˘",Ya="˘",Ja="¦",Za="𝒷",el="ℬ",tl="⁏",nl="∽",sl="⋍",ol="⧅",cl="\\",rl="⟈",al="•",ll="•",il="≎",dl="⪮",ul="≏",pl="≎",ml="≏",fl="Ć",hl="ć",xl="⩄",gl="⩉",bl="⩋",vl="∩",yl="⋒",jl="⩇",Nl="⩀",Sl="ⅅ",wl="∩︀",Cl="⁁",El="ˇ",_l="ℭ",Tl="⩍",Ll="Č",Rl="č",Pl="Ç",Dl="ç",kl="Ĉ",Ol="ĉ",Al="∰",Il="⩌",ql="⩐",Ml="Ċ",Ul="ċ",$l="¸",Fl="¸",Hl="⦲",Bl="¢",Vl="·",Kl="·",zl="𝔠",Xl="ℭ",Gl="Ч",Wl="ч",Ql="✓",Yl="✓",Jl="Χ",Zl="χ",ei="ˆ",ti="≗",ni="↺",si="↻",oi="⊛",ci="⊚",ri="⊝",ai="⊙",li="®",ii="Ⓢ",di="⊖",ui="⊕",pi="⊗",mi="○",fi="⧃",hi="≗",xi="⨐",gi="⫯",bi="⧂",vi="∲",yi="”",ji="’",Ni="♣",Si="♣",wi=":",Ci="∷",Ei="⩴",_i="≔",Ti="≔",Li=",",Ri="@",Pi="∁",Di="∘",ki="∁",Oi="ℂ",Ai="≅",Ii="⩭",qi="≡",Mi="∮",Ui="∯",$i="∮",Fi="𝕔",Hi="ℂ",Bi="∐",Vi="∐",Ki="©",zi="©",Xi="℗",Gi="∳",Wi="↵",Qi="✗",Yi="⨯",Ji="𝒞",Zi="𝒸",ed="⫏",td="⫑",nd="⫐",sd="⫒",od="⋯",cd="⤸",rd="⤵",ad="⋞",ld="⋟",id="↶",dd="⤽",ud="⩈",pd="⩆",md="≍",fd="∪",hd="⋓",xd="⩊",gd="⊍",bd="⩅",vd="∪︀",yd="↷",jd="⤼",Nd="⋞",Sd="⋟",wd="⋎",Cd="⋏",Ed="¤",_d="↶",Td="↷",Ld="⋎",Rd="⋏",Pd="∲",Dd="∱",kd="⌭",Od="†",Ad="‡",Id="ℸ",qd="↓",Md="↡",Ud="⇓",$d="‐",Fd="⫤",Hd="⊣",Bd="⤏",Vd="˝",Kd="Ď",zd="ď",Xd="Д",Gd="д",Wd="‡",Qd="⇊",Yd="ⅅ",Jd="ⅆ",Zd="⤑",eu="⩷",tu="°",nu="∇",su="Δ",ou="δ",cu="⦱",ru="⥿",au="𝔇",lu="𝔡",iu="⥥",du="⇃",uu="⇂",pu="´",mu="˙",fu="˝",hu="`",xu="˜",gu="⋄",bu="⋄",vu="⋄",yu="♦",ju="♦",Nu="¨",Su="ⅆ",wu="ϝ",Cu="⋲",Eu="÷",_u="÷",Tu="⋇",Lu="⋇",Ru="Ђ",Pu="ђ",Du="⌞",ku="⌍",Ou="$",Au="𝔻",Iu="𝕕",qu="¨",Mu="˙",Uu="⃜",$u="≐",Fu="≑",Hu="≐",Bu="∸",Vu="∔",Ku="⊡",zu="⌆",Xu="∯",Gu="¨",Wu="⇓",Qu="⇐",Yu="⇔",Ju="⫤",Zu="⟸",ep="⟺",tp="⟹",np="⇒",sp="⊨",op="⇑",cp="⇕",rp="∥",ap="⤓",lp="↓",ip="↓",dp="⇓",up="⇵",pp="̑",mp="⇊",fp="⇃",hp="⇂",xp="⥐",gp="⥞",bp="⥖",vp="↽",yp="⥟",jp="⥗",Np="⇁",Sp="↧",wp="⊤",Cp="⤐",Ep="⌟",_p="⌌",Tp="𝒟",Lp="𝒹",Rp="Ѕ",Pp="ѕ",Dp="⧶",kp="Đ",Op="đ",Ap="⋱",Ip="▿",qp="▾",Mp="⇵",Up="⥯",$p="⦦",Fp="Џ",Hp="џ",Bp="⟿",Vp="É",Kp="é",zp="⩮",Xp="Ě",Gp="ě",Wp="Ê",Qp="ê",Yp="≖",Jp="≕",Zp="Э",em="э",tm="⩷",nm="Ė",sm="ė",om="≑",cm="ⅇ",rm="≒",am="𝔈",lm="𝔢",im="⪚",dm="È",um="è",pm="⪖",mm="⪘",fm="⪙",hm="∈",xm="⏧",gm="ℓ",bm="⪕",vm="⪗",ym="Ē",jm="ē",Nm="∅",Sm="∅",wm="◻",Cm="∅",Em="▫",_m=" ",Tm=" ",Lm=" ",Rm="Ŋ",Pm="ŋ",Dm=" ",km="Ę",Om="ę",Am="𝔼",Im="𝕖",qm="⋕",Mm="⧣",Um="⩱",$m="ε",Fm="Ε",Hm="ε",Bm="ϵ",Vm="≖",Km="≕",zm="≂",Xm="⪖",Gm="⪕",Wm="⩵",Qm="=",Ym="≂",Jm="≟",Zm="⇌",ef="≡",tf="⩸",nf="⧥",sf="⥱",of="≓",cf="ℯ",rf="ℰ",af="≐",lf="⩳",df="≂",uf="Η",pf="η",mf="Ð",ff="ð",hf="Ë",xf="ë",gf="€",bf="!",vf="∃",yf="∃",jf="ℰ",Nf="ⅇ",Sf="ⅇ",wf="≒",Cf="Ф",Ef="ф",_f="♀",Tf="ffi",Lf="ff",Rf="ffl",Pf="𝔉",Df="𝔣",kf="fi",Of="◼",Af="▪",If="fj",qf="♭",Mf="fl",Uf="▱",$f="ƒ",Ff="𝔽",Hf="𝕗",Bf="∀",Vf="∀",Kf="⋔",zf="⫙",Xf="ℱ",Gf="⨍",Wf="½",Qf="⅓",Yf="¼",Jf="⅕",Zf="⅙",eh="⅛",th="⅔",nh="⅖",sh="¾",oh="⅗",ch="⅜",rh="⅘",ah="⅚",lh="⅝",ih="⅞",dh="⁄",uh="⌢",ph="𝒻",mh="ℱ",fh="ǵ",hh="Γ",xh="γ",gh="Ϝ",bh="ϝ",vh="⪆",yh="Ğ",jh="ğ",Nh="Ģ",Sh="Ĝ",wh="ĝ",Ch="Г",Eh="г",_h="Ġ",Th="ġ",Lh="≥",Rh="≧",Ph="⪌",Dh="⋛",kh="≥",Oh="≧",Ah="⩾",Ih="⪩",qh="⩾",Mh="⪀",Uh="⪂",$h="⪄",Fh="⋛︀",Hh="⪔",Bh="𝔊",Vh="𝔤",Kh="≫",zh="⋙",Xh="⋙",Gh="ℷ",Wh="Ѓ",Qh="ѓ",Yh="⪥",Jh="≷",Zh="⪒",ex="⪤",tx="⪊",nx="⪊",sx="⪈",ox="≩",cx="⪈",rx="≩",ax="⋧",lx="𝔾",ix="𝕘",dx="`",ux="≥",px="⋛",mx="≧",fx="⪢",hx="≷",xx="⩾",gx="≳",bx="𝒢",vx="ℊ",yx="≳",jx="⪎",Nx="⪐",Sx="⪧",wx="⩺",Cx=">",Ex=">",_x="≫",Tx="⋗",Lx="⦕",Rx="⩼",Px="⪆",Dx="⥸",kx="⋗",Ox="⋛",Ax="⪌",Ix="≷",qx="≳",Mx="≩︀",Ux="≩︀",$x="ˇ",Fx=" ",Hx="½",Bx="ℋ",Vx="Ъ",Kx="ъ",zx="⥈",Xx="↔",Gx="⇔",Wx="↭",Qx="^",Yx="ℏ",Jx="Ĥ",Zx="ĥ",eg="♥",tg="♥",ng="…",sg="⊹",og="𝔥",cg="ℌ",rg="ℋ",ag="⤥",lg="⤦",ig="⇿",dg="∻",ug="↩",pg="↪",mg="𝕙",fg="ℍ",hg="―",xg="─",gg="𝒽",bg="ℋ",vg="ℏ",yg="Ħ",jg="ħ",Ng="≎",Sg="≏",wg="⁃",Cg="‐",Eg="Í",_g="í",Tg="",Lg="Î",Rg="î",Pg="И",Dg="и",kg="İ",Og="Е",Ag="е",Ig="¡",qg="⇔",Mg="𝔦",Ug="ℑ",$g="Ì",Fg="ì",Hg="ⅈ",Bg="⨌",Vg="∭",Kg="⧜",zg="℩",Xg="IJ",Gg="ij",Wg="Ī",Qg="ī",Yg="ℑ",Jg="ⅈ",Zg="ℐ",eb="ℑ",tb="ı",nb="ℑ",sb="⊷",ob="Ƶ",cb="⇒",rb="℅",ab="∞",lb="⧝",ib="ı",db="⊺",ub="∫",pb="∬",mb="ℤ",fb="∫",hb="⊺",xb="⋂",gb="⨗",bb="⨼",vb="",yb="",jb="Ё",Nb="ё",Sb="Į",wb="į",Cb="𝕀",Eb="𝕚",_b="Ι",Tb="ι",Lb="⨼",Rb="¿",Pb="𝒾",Db="ℐ",kb="∈",Ob="⋵",Ab="⋹",Ib="⋴",qb="⋳",Mb="∈",Ub="",$b="Ĩ",Fb="ĩ",Hb="І",Bb="і",Vb="Ï",Kb="ï",zb="Ĵ",Xb="ĵ",Gb="Й",Wb="й",Qb="𝔍",Yb="𝔧",Jb="ȷ",Zb="𝕁",ev="𝕛",tv="𝒥",nv="𝒿",sv="Ј",ov="ј",cv="Є",rv="є",av="Κ",lv="κ",iv="ϰ",dv="Ķ",uv="ķ",pv="К",mv="к",fv="𝔎",hv="𝔨",xv="ĸ",gv="Х",bv="х",vv="Ќ",yv="ќ",jv="𝕂",Nv="𝕜",Sv="𝒦",wv="𝓀",Cv="⇚",Ev="Ĺ",_v="ĺ",Tv="⦴",Lv="ℒ",Rv="Λ",Pv="λ",Dv="⟨",kv="⟪",Ov="⦑",Av="⟨",Iv="⪅",qv="ℒ",Mv="«",Uv="⇤",$v="⤟",Fv="←",Hv="↞",Bv="⇐",Vv="⤝",Kv="↩",zv="↫",Xv="⤹",Gv="⥳",Wv="↢",Qv="⤙",Yv="⤛",Jv="⪫",Zv="⪭",ey="⪭︀",ty="⤌",ny="⤎",sy="❲",oy="{",cy="[",ry="⦋",ay="⦏",ly="⦍",iy="Ľ",dy="ľ",uy="Ļ",py="ļ",my="⌈",fy="{",hy="Л",xy="л",gy="⤶",by="“",vy="„",yy="⥧",jy="⥋",Ny="↲",Sy="≤",wy="≦",Cy="⟨",Ey="⇤",_y="←",Ty="←",Ly="⇐",Ry="⇆",Py="↢",Dy="⌈",ky="⟦",Oy="⥡",Ay="⥙",Iy="⇃",qy="⌊",My="↽",Uy="↼",$y="⇇",Fy="↔",Hy="↔",By="⇔",Vy="⇆",Ky="⇋",zy="↭",Xy="⥎",Gy="↤",Wy="⊣",Qy="⥚",Yy="⋋",Jy="⧏",Zy="⊲",ej="⊴",tj="⥑",nj="⥠",sj="⥘",oj="↿",cj="⥒",rj="↼",aj="⪋",lj="⋚",ij="≤",dj="≦",uj="⩽",pj="⪨",mj="⩽",fj="⩿",hj="⪁",xj="⪃",gj="⋚︀",bj="⪓",vj="⪅",yj="⋖",jj="⋚",Nj="⪋",Sj="⋚",wj="≦",Cj="≶",Ej="≶",_j="⪡",Tj="≲",Lj="⩽",Rj="≲",Pj="⥼",Dj="⌊",kj="𝔏",Oj="𝔩",Aj="≶",Ij="⪑",qj="⥢",Mj="↽",Uj="↼",$j="⥪",Fj="▄",Hj="Љ",Bj="љ",Vj="⇇",Kj="≪",zj="⋘",Xj="⌞",Gj="⇚",Wj="⥫",Qj="◺",Yj="Ŀ",Jj="ŀ",Zj="⎰",eN="⎰",tN="⪉",nN="⪉",sN="⪇",oN="≨",cN="⪇",rN="≨",aN="⋦",lN="⟬",iN="⇽",dN="⟦",uN="⟵",pN="⟵",mN="⟸",fN="⟷",hN="⟷",xN="⟺",gN="⟼",bN="⟶",vN="⟶",yN="⟹",jN="↫",NN="↬",SN="⦅",wN="𝕃",CN="𝕝",EN="⨭",_N="⨴",TN="∗",LN="_",RN="↙",PN="↘",DN="◊",kN="◊",ON="⧫",AN="(",IN="⦓",qN="⇆",MN="⌟",UN="⇋",$N="⥭",FN="",HN="⊿",BN="‹",VN="𝓁",KN="ℒ",zN="↰",XN="↰",GN="≲",WN="⪍",QN="⪏",YN="[",JN="‘",ZN="‚",eS="Ł",tS="ł",nS="⪦",sS="⩹",oS="<",cS="<",rS="≪",aS="⋖",lS="⋋",iS="⋉",dS="⥶",uS="⩻",pS="◃",mS="⊴",fS="◂",hS="⦖",xS="⥊",gS="⥦",bS="≨︀",vS="≨︀",yS="¯",jS="♂",NS="✠",SS="✠",wS="↦",CS="↦",ES="↧",_S="↤",TS="↥",LS="▮",RS="⨩",PS="М",DS="м",kS="—",OS="∺",AS="∡",IS=" ",qS="ℳ",MS="𝔐",US="𝔪",$S="℧",FS="µ",HS="*",BS="⫰",VS="∣",KS="·",zS="⊟",XS="−",GS="∸",WS="⨪",QS="∓",YS="⫛",JS="…",ZS="∓",ew="⊧",tw="𝕄",nw="𝕞",sw="∓",ow="𝓂",cw="ℳ",rw="∾",aw="Μ",lw="μ",iw="⊸",dw="⊸",uw="∇",pw="Ń",mw="ń",fw="∠⃒",hw="≉",xw="⩰̸",gw="≋̸",bw="ʼn",vw="≉",yw="♮",jw="ℕ",Nw="♮",Sw=" ",ww="≎̸",Cw="≏̸",Ew="⩃",_w="Ň",Tw="ň",Lw="Ņ",Rw="ņ",Pw="≇",Dw="⩭̸",kw="⩂",Ow="Н",Aw="н",Iw="–",qw="⤤",Mw="↗",Uw="⇗",$w="↗",Fw="≠",Hw="≐̸",Bw="",Vw="",Kw="",zw="",Xw="≢",Gw="⤨",Ww="≂̸",Qw="≫",Yw="≪",Jw=`
|
|
2
2
|
`,Zw="∄",e0="∄",t0="𝔑",n0="𝔫",s0="≧̸",o0="≱",c0="≱",r0="≧̸",a0="⩾̸",l0="⩾̸",i0="⋙̸",d0="≵",u0="≫⃒",p0="≯",m0="≯",f0="≫̸",h0="↮",x0="⇎",g0="⫲",b0="∋",v0="⋼",y0="⋺",j0="∋",N0="Њ",S0="њ",w0="↚",C0="⇍",E0="‥",_0="≦̸",T0="≰",L0="↚",R0="⇍",P0="↮",D0="⇎",k0="≰",O0="≦̸",A0="⩽̸",I0="⩽̸",q0="≮",M0="⋘̸",U0="≴",$0="≪⃒",F0="≮",H0="⋪",B0="⋬",V0="≪̸",K0="∤",z0="",X0=" ",G0="𝕟",W0="ℕ",Q0="⫬",Y0="¬",J0="≢",Z0="≭",eC="∦",tC="∉",nC="≠",sC="≂̸",oC="∄",cC="≯",rC="≱",aC="≧̸",lC="≫̸",iC="≹",dC="⩾̸",uC="≵",pC="≎̸",mC="≏̸",fC="∉",hC="⋵̸",xC="⋹̸",gC="∉",bC="⋷",vC="⋶",yC="⧏̸",jC="⋪",NC="⋬",SC="≮",wC="≰",CC="≸",EC="≪̸",_C="⩽̸",TC="≴",LC="⪢̸",RC="⪡̸",PC="∌",DC="∌",kC="⋾",OC="⋽",AC="⊀",IC="⪯̸",qC="⋠",MC="∌",UC="⧐̸",$C="⋫",FC="⋭",HC="⊏̸",BC="⋢",VC="⊐̸",KC="⋣",zC="⊂⃒",XC="⊈",GC="⊁",WC="⪰̸",QC="⋡",YC="≿̸",JC="⊃⃒",ZC="⊉",e1="≁",t1="≄",n1="≇",s1="≉",o1="∤",c1="∦",r1="∦",a1="⫽⃥",l1="∂̸",i1="⨔",d1="⊀",u1="⋠",p1="⊀",m1="⪯̸",f1="⪯̸",h1="⤳̸",x1="↛",g1="⇏",b1="↝̸",v1="↛",y1="⇏",j1="⋫",N1="⋭",S1="⊁",w1="⋡",C1="⪰̸",E1="𝒩",_1="𝓃",T1="∤",L1="∦",R1="≁",P1="≄",D1="≄",k1="∤",O1="∦",A1="⋢",I1="⋣",q1="⊄",M1="⫅̸",U1="⊈",$1="⊂⃒",F1="⊈",H1="⫅̸",B1="⊁",V1="⪰̸",K1="⊅",z1="⫆̸",X1="⊉",G1="⊃⃒",W1="⊉",Q1="⫆̸",Y1="≹",J1="Ñ",Z1="ñ",eE="≸",tE="⋪",nE="⋬",sE="⋫",oE="⋭",cE="Ν",rE="ν",aE="#",lE="№",iE=" ",dE="≍⃒",uE="⊬",pE="⊭",mE="⊮",fE="⊯",hE="≥⃒",xE=">⃒",gE="⤄",bE="⧞",vE="⤂",yE="≤⃒",jE="<⃒",NE="⊴⃒",SE="⤃",wE="⊵⃒",CE="∼⃒",EE="⤣",_E="↖",TE="⇖",LE="↖",RE="⤧",PE="Ó",DE="ó",kE="⊛",OE="Ô",AE="ô",IE="⊚",qE="О",ME="о",UE="⊝",$E="Ő",FE="ő",HE="⨸",BE="⊙",VE="⦼",KE="Œ",zE="œ",XE="⦿",GE="𝔒",WE="𝔬",QE="˛",YE="Ò",JE="ò",ZE="⧁",e_="⦵",t_="Ω",n_="∮",s_="↺",o_="⦾",c_="⦻",r_="‾",a_="⧀",l_="Ō",i_="ō",d_="Ω",u_="ω",p_="Ο",m_="ο",f_="⦶",h_="⊖",x_="𝕆",g_="𝕠",b_="⦷",v_="“",y_="‘",j_="⦹",N_="⊕",S_="↻",w_="⩔",C_="∨",E_="⩝",__="ℴ",T_="ℴ",L_="ª",R_="º",P_="⊶",D_="⩖",k_="⩗",O_="⩛",A_="Ⓢ",I_="𝒪",q_="ℴ",M_="Ø",U_="ø",$_="⊘",F_="Õ",H_="õ",B_="⨶",V_="⨷",K_="⊗",z_="Ö",X_="ö",G_="⌽",W_="‾",Q_="⏞",Y_="⎴",J_="⏜",Z_="¶",eT="∥",tT="∥",nT="⫳",sT="⫽",oT="∂",cT="∂",rT="П",aT="п",lT="%",iT=".",dT="‰",uT="⊥",pT="‱",mT="𝔓",fT="𝔭",hT="Φ",xT="φ",gT="ϕ",bT="ℳ",vT="☎",yT="Π",jT="π",NT="⋔",ST="ϖ",wT="ℏ",CT="ℎ",ET="ℏ",_T="⨣",TT="⊞",LT="⨢",RT="+",PT="∔",DT="⨥",kT="⩲",OT="±",AT="±",IT="⨦",qT="⨧",MT="±",UT="ℌ",$T="⨕",FT="𝕡",HT="ℙ",BT="£",VT="⪷",KT="⪻",zT="≺",XT="≼",GT="⪷",WT="≺",QT="≼",YT="≺",JT="⪯",ZT="≼",eL="≾",tL="⪯",nL="⪹",sL="⪵",oL="⋨",cL="⪯",rL="⪳",aL="≾",lL="′",iL="″",dL="ℙ",uL="⪹",pL="⪵",mL="⋨",fL="∏",hL="∏",xL="⌮",gL="⌒",bL="⌓",vL="∝",yL="∝",jL="∷",NL="∝",SL="≾",wL="⊰",CL="𝒫",EL="𝓅",_L="Ψ",TL="ψ",LL=" ",RL="𝔔",PL="𝔮",DL="⨌",kL="𝕢",OL="ℚ",AL="⁗",IL="𝒬",qL="𝓆",ML="ℍ",UL="⨖",$L="?",FL="≟",HL='"',BL='"',VL="⇛",KL="∽̱",zL="Ŕ",XL="ŕ",GL="√",WL="⦳",QL="⟩",YL="⟫",JL="⦒",ZL="⦥",eR="⟩",tR="»",nR="⥵",sR="⇥",oR="⤠",cR="⤳",rR="→",aR="↠",lR="⇒",iR="⤞",dR="↪",uR="↬",pR="⥅",mR="⥴",fR="⤖",hR="↣",xR="↝",gR="⤚",bR="⤜",vR="∶",yR="ℚ",jR="⤍",NR="⤏",SR="⤐",wR="❳",CR="}",ER="]",_R="⦌",TR="⦎",LR="⦐",RR="Ř",PR="ř",DR="Ŗ",kR="ŗ",OR="⌉",AR="}",IR="Р",qR="р",MR="⤷",UR="⥩",$R="”",FR="”",HR="↳",BR="ℜ",VR="ℛ",KR="ℜ",zR="ℝ",XR="ℜ",GR="▭",WR="®",QR="®",YR="∋",JR="⇋",ZR="⥯",eP="⥽",tP="⌋",nP="𝔯",sP="ℜ",oP="⥤",cP="⇁",rP="⇀",aP="⥬",lP="Ρ",iP="ρ",dP="ϱ",uP="⟩",pP="⇥",mP="→",fP="→",hP="⇒",xP="⇄",gP="↣",bP="⌉",vP="⟧",yP="⥝",jP="⥕",NP="⇂",SP="⌋",wP="⇁",CP="⇀",EP="⇄",_P="⇌",TP="⇉",LP="↝",RP="↦",PP="⊢",DP="⥛",kP="⋌",OP="⧐",AP="⊳",IP="⊵",qP="⥏",MP="⥜",UP="⥔",$P="↾",FP="⥓",HP="⇀",BP="˚",VP="≓",KP="⇄",zP="⇌",XP="",GP="⎱",WP="⎱",QP="⫮",YP="⟭",JP="⇾",ZP="⟧",eD="⦆",tD="𝕣",nD="ℝ",sD="⨮",oD="⨵",cD="⥰",rD=")",aD="⦔",lD="⨒",iD="⇉",dD="⇛",uD="›",pD="𝓇",mD="ℛ",fD="↱",hD="↱",xD="]",gD="’",bD="’",vD="⋌",yD="⋊",jD="▹",ND="⊵",SD="▸",wD="⧎",CD="⧴",ED="⥨",_D="℞",TD="Ś",LD="ś",RD="‚",PD="⪸",DD="Š",kD="š",OD="⪼",AD="≻",ID="≽",qD="⪰",MD="⪴",UD="Ş",$D="ş",FD="Ŝ",HD="ŝ",BD="⪺",VD="⪶",KD="⋩",zD="⨓",XD="≿",GD="С",WD="с",QD="⊡",YD="⋅",JD="⩦",ZD="⤥",ek="↘",tk="⇘",nk="↘",sk="§",ok=";",ck="⤩",rk="∖",ak="∖",lk="✶",ik="𝔖",dk="𝔰",uk="⌢",pk="♯",mk="Щ",fk="щ",hk="Ш",xk="ш",gk="↓",bk="←",vk="∣",yk="∥",jk="→",Nk="↑",Sk="",wk="Σ",Ck="σ",Ek="ς",_k="ς",Tk="∼",Lk="⩪",Rk="≃",Pk="≃",Dk="⪞",kk="⪠",Ok="⪝",Ak="⪟",Ik="≆",qk="⨤",Mk="⥲",Uk="←",$k="∘",Fk="∖",Hk="⨳",Bk="⧤",Vk="∣",Kk="⌣",zk="⪪",Xk="⪬",Gk="⪬︀",Wk="Ь",Qk="ь",Yk="⌿",Jk="⧄",Zk="/",eO="𝕊",tO="𝕤",nO="♠",sO="♠",oO="∥",cO="⊓",rO="⊓︀",aO="⊔",lO="⊔︀",iO="√",dO="⊏",uO="⊑",pO="⊏",mO="⊑",fO="⊐",hO="⊒",xO="⊐",gO="⊒",bO="□",vO="□",yO="⊓",jO="⊏",NO="⊑",SO="⊐",wO="⊒",CO="⊔",EO="▪",_O="□",TO="▪",LO="→",RO="𝒮",PO="𝓈",DO="∖",kO="⌣",OO="⋆",AO="⋆",IO="☆",qO="★",MO="ϵ",UO="ϕ",$O="¯",FO="⊂",HO="⋐",BO="⪽",VO="⫅",KO="⊆",zO="⫃",XO="⫁",GO="⫋",WO="⊊",QO="⪿",YO="⥹",JO="⊂",ZO="⋐",eA="⊆",tA="⫅",nA="⊆",sA="⊊",oA="⫋",cA="⫇",rA="⫕",aA="⫓",lA="⪸",iA="≻",dA="≽",uA="≻",pA="⪰",mA="≽",fA="≿",hA="⪰",xA="⪺",gA="⪶",bA="⋩",vA="≿",yA="∋",jA="∑",NA="∑",SA="♪",wA="¹",CA="²",EA="³",_A="⊃",TA="⋑",LA="⪾",RA="⫘",PA="⫆",DA="⊇",kA="⫄",OA="⊃",AA="⊇",IA="⟉",qA="⫗",MA="⥻",UA="⫂",$A="⫌",FA="⊋",HA="⫀",BA="⊃",VA="⋑",KA="⊇",zA="⫆",XA="⊋",GA="⫌",WA="⫈",QA="⫔",YA="⫖",JA="⤦",ZA="↙",eI="⇙",tI="↙",nI="⤪",sI="ß",oI=" ",cI="⌖",rI="Τ",aI="τ",lI="⎴",iI="Ť",dI="ť",uI="Ţ",pI="ţ",mI="Т",fI="т",hI="⃛",xI="⌕",gI="𝔗",bI="𝔱",vI="∴",yI="∴",jI="∴",NI="Θ",SI="θ",wI="ϑ",CI="ϑ",EI="≈",_I="∼",TI=" ",LI=" ",RI=" ",PI="≈",DI="∼",kI="Þ",OI="þ",AI="˜",II="∼",qI="≃",MI="≅",UI="≈",$I="⨱",FI="⊠",HI="×",BI="⨰",VI="∭",KI="⤨",zI="⌶",XI="⫱",GI="⊤",WI="𝕋",QI="𝕥",YI="⫚",JI="⤩",ZI="‴",e2="™",t2="™",n2="▵",s2="▿",o2="◃",c2="⊴",r2="≜",a2="▹",l2="⊵",i2="◬",d2="≜",u2="⨺",p2="⃛",m2="⨹",f2="⧍",h2="⨻",x2="⏢",g2="𝒯",b2="𝓉",v2="Ц",y2="ц",j2="Ћ",N2="ћ",S2="Ŧ",w2="ŧ",C2="≬",E2="↞",_2="↠",T2="Ú",L2="ú",R2="↑",P2="↟",D2="⇑",k2="⥉",O2="Ў",A2="ў",I2="Ŭ",q2="ŭ",M2="Û",U2="û",$2="У",F2="у",H2="⇅",B2="Ű",V2="ű",K2="⥮",z2="⥾",X2="𝔘",G2="𝔲",W2="Ù",Q2="ù",Y2="⥣",J2="↿",Z2="↾",eq="▀",tq="⌜",nq="⌜",sq="⌏",oq="◸",cq="Ū",rq="ū",aq="¨",lq="_",iq="⏟",dq="⎵",uq="⏝",pq="⋃",mq="⊎",fq="Ų",hq="ų",xq="𝕌",gq="𝕦",bq="⤒",vq="↑",yq="↑",jq="⇑",Nq="⇅",Sq="↕",wq="↕",Cq="⇕",Eq="⥮",_q="↿",Tq="↾",Lq="⊎",Rq="↖",Pq="↗",Dq="υ",kq="ϒ",Oq="ϒ",Aq="Υ",Iq="υ",qq="↥",Mq="⊥",Uq="⇈",$q="⌝",Fq="⌝",Hq="⌎",Bq="Ů",Vq="ů",Kq="◹",zq="𝒰",Xq="𝓊",Gq="⋰",Wq="Ũ",Qq="ũ",Yq="▵",Jq="▴",Zq="⇈",eM="Ü",tM="ü",nM="⦧",sM="⦜",oM="ϵ",cM="ϰ",rM="∅",aM="ϕ",lM="ϖ",iM="∝",dM="↕",uM="⇕",pM="ϱ",mM="ς",fM="⊊︀",hM="⫋︀",xM="⊋︀",gM="⫌︀",bM="ϑ",vM="⊲",yM="⊳",jM="⫨",NM="⫫",SM="⫩",wM="В",CM="в",EM="⊢",_M="⊨",TM="⊩",LM="⊫",RM="⫦",PM="⊻",DM="∨",kM="⋁",OM="≚",AM="⋮",IM="|",qM="‖",MM="|",UM="‖",$M="∣",FM="|",HM="❘",BM="≀",VM=" ",KM="𝔙",zM="𝔳",XM="⊲",GM="⊂⃒",WM="⊃⃒",QM="𝕍",YM="𝕧",JM="∝",ZM="⊳",eU="𝒱",tU="𝓋",nU="⫋︀",sU="⊊︀",oU="⫌︀",cU="⊋︀",rU="⊪",aU="⦚",lU="Ŵ",iU="ŵ",dU="⩟",uU="∧",pU="⋀",mU="≙",fU="℘",hU="𝔚",xU="𝔴",gU="𝕎",bU="𝕨",vU="℘",yU="≀",jU="≀",NU="𝒲",SU="𝓌",wU="⋂",CU="◯",EU="⋃",_U="▽",TU="𝔛",LU="𝔵",RU="⟷",PU="⟺",DU="Ξ",kU="ξ",OU="⟵",AU="⟸",IU="⟼",qU="⋻",MU="⨀",UU="𝕏",$U="𝕩",FU="⨁",HU="⨂",BU="⟶",VU="⟹",KU="𝒳",zU="𝓍",XU="⨆",GU="⨄",WU="△",QU="⋁",YU="⋀",JU="Ý",ZU="ý",e$="Я",t$="я",n$="Ŷ",s$="ŷ",o$="Ы",c$="ы",r$="¥",a$="𝔜",l$="𝔶",i$="Ї",d$="ї",u$="𝕐",p$="𝕪",m$="𝒴",f$="𝓎",h$="Ю",x$="ю",g$="ÿ",b$="Ÿ",v$="Ź",y$="ź",j$="Ž",N$="ž",S$="З",w$="з",C$="Ż",E$="ż",_$="ℨ",T$="",L$="Ζ",R$="ζ",P$="𝔷",D$="ℨ",k$="Ж",O$="ж",A$="⇝",I$="𝕫",q$="ℤ",M$="𝒵",U$="𝓏",$$="",F$="",fn={Aacute:wo,aacute:Co,Abreve:Eo,abreve:_o,ac:To,acd:Lo,acE:Ro,Acirc:Po,acirc:Do,acute:ko,Acy:Oo,acy:Ao,AElig:Io,aelig:qo,af:Mo,Afr:Uo,afr:$o,Agrave:Fo,agrave:Ho,alefsym:Bo,aleph:Vo,Alpha:Ko,alpha:zo,Amacr:Xo,amacr:Go,amalg:Wo,amp:Qo,AMP:Yo,andand:Jo,And:Zo,and:ec,andd:tc,andslope:nc,andv:sc,ang:oc,ange:cc,angle:rc,angmsdaa:ac,angmsdab:lc,angmsdac:ic,angmsdad:dc,angmsdae:uc,angmsdaf:pc,angmsdag:mc,angmsdah:fc,angmsd:hc,angrt:xc,angrtvb:gc,angrtvbd:bc,angsph:vc,angst:yc,angzarr:jc,Aogon:Nc,aogon:Sc,Aopf:wc,aopf:Cc,apacir:Ec,ap:_c,apE:Tc,ape:Lc,apid:Rc,apos:Pc,ApplyFunction:Dc,approx:kc,approxeq:Oc,Aring:Ac,aring:Ic,Ascr:qc,ascr:Mc,Assign:Uc,ast:$c,asymp:Fc,asympeq:Hc,Atilde:Bc,atilde:Vc,Auml:Kc,auml:zc,awconint:Xc,awint:Gc,backcong:Wc,backepsilon:Qc,backprime:Yc,backsim:Jc,backsimeq:Zc,Backslash:er,Barv:tr,barvee:nr,barwed:sr,Barwed:or,barwedge:cr,bbrk:rr,bbrktbrk:ar,bcong:lr,Bcy:ir,bcy:dr,bdquo:ur,becaus:pr,because:mr,Because:fr,bemptyv:hr,bepsi:xr,bernou:gr,Bernoullis:br,Beta:vr,beta:yr,beth:jr,between:Nr,Bfr:Sr,bfr:wr,bigcap:Cr,bigcirc:Er,bigcup:_r,bigodot:Tr,bigoplus:Lr,bigotimes:Rr,bigsqcup:Pr,bigstar:Dr,bigtriangledown:kr,bigtriangleup:Or,biguplus:Ar,bigvee:Ir,bigwedge:qr,bkarow:Mr,blacklozenge:Ur,blacksquare:$r,blacktriangle:Fr,blacktriangledown:Hr,blacktriangleleft:Br,blacktriangleright:Vr,blank:Kr,blk12:zr,blk14:Xr,blk34:Gr,block:Wr,bne:Qr,bnequiv:Yr,bNot:Jr,bnot:Zr,Bopf:ea,bopf:ta,bot:na,bottom:sa,bowtie:oa,boxbox:ca,boxdl:ra,boxdL:aa,boxDl:la,boxDL:ia,boxdr:da,boxdR:ua,boxDr:pa,boxDR:ma,boxh:fa,boxH:ha,boxhd:xa,boxHd:ga,boxhD:ba,boxHD:va,boxhu:ya,boxHu:ja,boxhU:Na,boxHU:Sa,boxminus:wa,boxplus:Ca,boxtimes:Ea,boxul:_a,boxuL:Ta,boxUl:La,boxUL:Ra,boxur:Pa,boxuR:Da,boxUr:ka,boxUR:Oa,boxv:Aa,boxV:Ia,boxvh:qa,boxvH:Ma,boxVh:Ua,boxVH:$a,boxvl:Fa,boxvL:Ha,boxVl:Ba,boxVL:Va,boxvr:Ka,boxvR:za,boxVr:Xa,boxVR:Ga,bprime:Wa,breve:Qa,Breve:Ya,brvbar:Ja,bscr:Za,Bscr:el,bsemi:tl,bsim:nl,bsime:sl,bsolb:ol,bsol:cl,bsolhsub:rl,bull:al,bullet:ll,bump:il,bumpE:dl,bumpe:ul,Bumpeq:pl,bumpeq:ml,Cacute:fl,cacute:hl,capand:xl,capbrcup:gl,capcap:bl,cap:vl,Cap:yl,capcup:jl,capdot:Nl,CapitalDifferentialD:Sl,caps:wl,caret:Cl,caron:El,Cayleys:_l,ccaps:Tl,Ccaron:Ll,ccaron:Rl,Ccedil:Pl,ccedil:Dl,Ccirc:kl,ccirc:Ol,Cconint:Al,ccups:Il,ccupssm:ql,Cdot:Ml,cdot:Ul,cedil:$l,Cedilla:Fl,cemptyv:Hl,cent:Bl,centerdot:Vl,CenterDot:Kl,cfr:zl,Cfr:Xl,CHcy:Gl,chcy:Wl,check:Ql,checkmark:Yl,Chi:Jl,chi:Zl,circ:ei,circeq:ti,circlearrowleft:ni,circlearrowright:si,circledast:oi,circledcirc:ci,circleddash:ri,CircleDot:ai,circledR:li,circledS:ii,CircleMinus:di,CirclePlus:ui,CircleTimes:pi,cir:mi,cirE:fi,cire:hi,cirfnint:xi,cirmid:gi,cirscir:bi,ClockwiseContourIntegral:vi,CloseCurlyDoubleQuote:yi,CloseCurlyQuote:ji,clubs:Ni,clubsuit:Si,colon:wi,Colon:Ci,Colone:Ei,colone:_i,coloneq:Ti,comma:Li,commat:Ri,comp:Pi,compfn:Di,complement:ki,complexes:Oi,cong:Ai,congdot:Ii,Congruent:qi,conint:Mi,Conint:Ui,ContourIntegral:$i,copf:Fi,Copf:Hi,coprod:Bi,Coproduct:Vi,copy:Ki,COPY:zi,copysr:Xi,CounterClockwiseContourIntegral:Gi,crarr:Wi,cross:Qi,Cross:Yi,Cscr:Ji,cscr:Zi,csub:ed,csube:td,csup:nd,csupe:sd,ctdot:od,cudarrl:cd,cudarrr:rd,cuepr:ad,cuesc:ld,cularr:id,cularrp:dd,cupbrcap:ud,cupcap:pd,CupCap:md,cup:fd,Cup:hd,cupcup:xd,cupdot:gd,cupor:bd,cups:vd,curarr:yd,curarrm:jd,curlyeqprec:Nd,curlyeqsucc:Sd,curlyvee:wd,curlywedge:Cd,curren:Ed,curvearrowleft:_d,curvearrowright:Td,cuvee:Ld,cuwed:Rd,cwconint:Pd,cwint:Dd,cylcty:kd,dagger:Od,Dagger:Ad,daleth:Id,darr:qd,Darr:Md,dArr:Ud,dash:$d,Dashv:Fd,dashv:Hd,dbkarow:Bd,dblac:Vd,Dcaron:Kd,dcaron:zd,Dcy:Xd,dcy:Gd,ddagger:Wd,ddarr:Qd,DD:Yd,dd:Jd,DDotrahd:Zd,ddotseq:eu,deg:tu,Del:nu,Delta:su,delta:ou,demptyv:cu,dfisht:ru,Dfr:au,dfr:lu,dHar:iu,dharl:du,dharr:uu,DiacriticalAcute:pu,DiacriticalDot:mu,DiacriticalDoubleAcute:fu,DiacriticalGrave:hu,DiacriticalTilde:xu,diam:gu,diamond:bu,Diamond:vu,diamondsuit:yu,diams:ju,die:Nu,DifferentialD:Su,digamma:wu,disin:Cu,div:Eu,divide:_u,divideontimes:Tu,divonx:Lu,DJcy:Ru,djcy:Pu,dlcorn:Du,dlcrop:ku,dollar:Ou,Dopf:Au,dopf:Iu,Dot:qu,dot:Mu,DotDot:Uu,doteq:$u,doteqdot:Fu,DotEqual:Hu,dotminus:Bu,dotplus:Vu,dotsquare:Ku,doublebarwedge:zu,DoubleContourIntegral:Xu,DoubleDot:Gu,DoubleDownArrow:Wu,DoubleLeftArrow:Qu,DoubleLeftRightArrow:Yu,DoubleLeftTee:Ju,DoubleLongLeftArrow:Zu,DoubleLongLeftRightArrow:ep,DoubleLongRightArrow:tp,DoubleRightArrow:np,DoubleRightTee:sp,DoubleUpArrow:op,DoubleUpDownArrow:cp,DoubleVerticalBar:rp,DownArrowBar:ap,downarrow:lp,DownArrow:ip,Downarrow:dp,DownArrowUpArrow:up,DownBreve:pp,downdownarrows:mp,downharpoonleft:fp,downharpoonright:hp,DownLeftRightVector:xp,DownLeftTeeVector:gp,DownLeftVectorBar:bp,DownLeftVector:vp,DownRightTeeVector:yp,DownRightVectorBar:jp,DownRightVector:Np,DownTeeArrow:Sp,DownTee:wp,drbkarow:Cp,drcorn:Ep,drcrop:_p,Dscr:Tp,dscr:Lp,DScy:Rp,dscy:Pp,dsol:Dp,Dstrok:kp,dstrok:Op,dtdot:Ap,dtri:Ip,dtrif:qp,duarr:Mp,duhar:Up,dwangle:$p,DZcy:Fp,dzcy:Hp,dzigrarr:Bp,Eacute:Vp,eacute:Kp,easter:zp,Ecaron:Xp,ecaron:Gp,Ecirc:Wp,ecirc:Qp,ecir:Yp,ecolon:Jp,Ecy:Zp,ecy:em,eDDot:tm,Edot:nm,edot:sm,eDot:om,ee:cm,efDot:rm,Efr:am,efr:lm,eg:im,Egrave:dm,egrave:um,egs:pm,egsdot:mm,el:fm,Element:hm,elinters:xm,ell:gm,els:bm,elsdot:vm,Emacr:ym,emacr:jm,empty:Nm,emptyset:Sm,EmptySmallSquare:wm,emptyv:Cm,EmptyVerySmallSquare:Em,emsp13:_m,emsp14:Tm,emsp:Lm,ENG:Rm,eng:Pm,ensp:Dm,Eogon:km,eogon:Om,Eopf:Am,eopf:Im,epar:qm,eparsl:Mm,eplus:Um,epsi:$m,Epsilon:Fm,epsilon:Hm,epsiv:Bm,eqcirc:Vm,eqcolon:Km,eqsim:zm,eqslantgtr:Xm,eqslantless:Gm,Equal:Wm,equals:Qm,EqualTilde:Ym,equest:Jm,Equilibrium:Zm,equiv:ef,equivDD:tf,eqvparsl:nf,erarr:sf,erDot:of,escr:cf,Escr:rf,esdot:af,Esim:lf,esim:df,Eta:uf,eta:pf,ETH:mf,eth:ff,Euml:hf,euml:xf,euro:gf,excl:bf,exist:vf,Exists:yf,expectation:jf,exponentiale:Nf,ExponentialE:Sf,fallingdotseq:wf,Fcy:Cf,fcy:Ef,female:_f,ffilig:Tf,fflig:Lf,ffllig:Rf,Ffr:Pf,ffr:Df,filig:kf,FilledSmallSquare:Of,FilledVerySmallSquare:Af,fjlig:If,flat:qf,fllig:Mf,fltns:Uf,fnof:$f,Fopf:Ff,fopf:Hf,forall:Bf,ForAll:Vf,fork:Kf,forkv:zf,Fouriertrf:Xf,fpartint:Gf,frac12:Wf,frac13:Qf,frac14:Yf,frac15:Jf,frac16:Zf,frac18:eh,frac23:th,frac25:nh,frac34:sh,frac35:oh,frac38:ch,frac45:rh,frac56:ah,frac58:lh,frac78:ih,frasl:dh,frown:uh,fscr:ph,Fscr:mh,gacute:fh,Gamma:hh,gamma:xh,Gammad:gh,gammad:bh,gap:vh,Gbreve:yh,gbreve:jh,Gcedil:Nh,Gcirc:Sh,gcirc:wh,Gcy:Ch,gcy:Eh,Gdot:_h,gdot:Th,ge:Lh,gE:Rh,gEl:Ph,gel:Dh,geq:kh,geqq:Oh,geqslant:Ah,gescc:Ih,ges:qh,gesdot:Mh,gesdoto:Uh,gesdotol:$h,gesl:Fh,gesles:Hh,Gfr:Bh,gfr:Vh,gg:Kh,Gg:zh,ggg:Xh,gimel:Gh,GJcy:Wh,gjcy:Qh,gla:Yh,gl:Jh,glE:Zh,glj:ex,gnap:tx,gnapprox:nx,gne:sx,gnE:ox,gneq:cx,gneqq:rx,gnsim:ax,Gopf:lx,gopf:ix,grave:dx,GreaterEqual:ux,GreaterEqualLess:px,GreaterFullEqual:mx,GreaterGreater:fx,GreaterLess:hx,GreaterSlantEqual:xx,GreaterTilde:gx,Gscr:bx,gscr:vx,gsim:yx,gsime:jx,gsiml:Nx,gtcc:Sx,gtcir:wx,gt:Cx,GT:Ex,Gt:_x,gtdot:Tx,gtlPar:Lx,gtquest:Rx,gtrapprox:Px,gtrarr:Dx,gtrdot:kx,gtreqless:Ox,gtreqqless:Ax,gtrless:Ix,gtrsim:qx,gvertneqq:Mx,gvnE:Ux,Hacek:$x,hairsp:Fx,half:Hx,hamilt:Bx,HARDcy:Vx,hardcy:Kx,harrcir:zx,harr:Xx,hArr:Gx,harrw:Wx,Hat:Qx,hbar:Yx,Hcirc:Jx,hcirc:Zx,hearts:eg,heartsuit:tg,hellip:ng,hercon:sg,hfr:og,Hfr:cg,HilbertSpace:rg,hksearow:ag,hkswarow:lg,hoarr:ig,homtht:dg,hookleftarrow:ug,hookrightarrow:pg,hopf:mg,Hopf:fg,horbar:hg,HorizontalLine:xg,hscr:gg,Hscr:bg,hslash:vg,Hstrok:yg,hstrok:jg,HumpDownHump:Ng,HumpEqual:Sg,hybull:wg,hyphen:Cg,Iacute:Eg,iacute:_g,ic:Tg,Icirc:Lg,icirc:Rg,Icy:Pg,icy:Dg,Idot:kg,IEcy:Og,iecy:Ag,iexcl:Ig,iff:qg,ifr:Mg,Ifr:Ug,Igrave:$g,igrave:Fg,ii:Hg,iiiint:Bg,iiint:Vg,iinfin:Kg,iiota:zg,IJlig:Xg,ijlig:Gg,Imacr:Wg,imacr:Qg,image:Yg,ImaginaryI:Jg,imagline:Zg,imagpart:eb,imath:tb,Im:nb,imof:sb,imped:ob,Implies:cb,incare:rb,in:"∈",infin:ab,infintie:lb,inodot:ib,intcal:db,int:ub,Int:pb,integers:mb,Integral:fb,intercal:hb,Intersection:xb,intlarhk:gb,intprod:bb,InvisibleComma:vb,InvisibleTimes:yb,IOcy:jb,iocy:Nb,Iogon:Sb,iogon:wb,Iopf:Cb,iopf:Eb,Iota:_b,iota:Tb,iprod:Lb,iquest:Rb,iscr:Pb,Iscr:Db,isin:kb,isindot:Ob,isinE:Ab,isins:Ib,isinsv:qb,isinv:Mb,it:Ub,Itilde:$b,itilde:Fb,Iukcy:Hb,iukcy:Bb,Iuml:Vb,iuml:Kb,Jcirc:zb,jcirc:Xb,Jcy:Gb,jcy:Wb,Jfr:Qb,jfr:Yb,jmath:Jb,Jopf:Zb,jopf:ev,Jscr:tv,jscr:nv,Jsercy:sv,jsercy:ov,Jukcy:cv,jukcy:rv,Kappa:av,kappa:lv,kappav:iv,Kcedil:dv,kcedil:uv,Kcy:pv,kcy:mv,Kfr:fv,kfr:hv,kgreen:xv,KHcy:gv,khcy:bv,KJcy:vv,kjcy:yv,Kopf:jv,kopf:Nv,Kscr:Sv,kscr:wv,lAarr:Cv,Lacute:Ev,lacute:_v,laemptyv:Tv,lagran:Lv,Lambda:Rv,lambda:Pv,lang:Dv,Lang:kv,langd:Ov,langle:Av,lap:Iv,Laplacetrf:qv,laquo:Mv,larrb:Uv,larrbfs:$v,larr:Fv,Larr:Hv,lArr:Bv,larrfs:Vv,larrhk:Kv,larrlp:zv,larrpl:Xv,larrsim:Gv,larrtl:Wv,latail:Qv,lAtail:Yv,lat:Jv,late:Zv,lates:ey,lbarr:ty,lBarr:ny,lbbrk:sy,lbrace:oy,lbrack:cy,lbrke:ry,lbrksld:ay,lbrkslu:ly,Lcaron:iy,lcaron:dy,Lcedil:uy,lcedil:py,lceil:my,lcub:fy,Lcy:hy,lcy:xy,ldca:gy,ldquo:by,ldquor:vy,ldrdhar:yy,ldrushar:jy,ldsh:Ny,le:Sy,lE:wy,LeftAngleBracket:Cy,LeftArrowBar:Ey,leftarrow:_y,LeftArrow:Ty,Leftarrow:Ly,LeftArrowRightArrow:Ry,leftarrowtail:Py,LeftCeiling:Dy,LeftDoubleBracket:ky,LeftDownTeeVector:Oy,LeftDownVectorBar:Ay,LeftDownVector:Iy,LeftFloor:qy,leftharpoondown:My,leftharpoonup:Uy,leftleftarrows:$y,leftrightarrow:Fy,LeftRightArrow:Hy,Leftrightarrow:By,leftrightarrows:Vy,leftrightharpoons:Ky,leftrightsquigarrow:zy,LeftRightVector:Xy,LeftTeeArrow:Gy,LeftTee:Wy,LeftTeeVector:Qy,leftthreetimes:Yy,LeftTriangleBar:Jy,LeftTriangle:Zy,LeftTriangleEqual:ej,LeftUpDownVector:tj,LeftUpTeeVector:nj,LeftUpVectorBar:sj,LeftUpVector:oj,LeftVectorBar:cj,LeftVector:rj,lEg:aj,leg:lj,leq:ij,leqq:dj,leqslant:uj,lescc:pj,les:mj,lesdot:fj,lesdoto:hj,lesdotor:xj,lesg:gj,lesges:bj,lessapprox:vj,lessdot:yj,lesseqgtr:jj,lesseqqgtr:Nj,LessEqualGreater:Sj,LessFullEqual:wj,LessGreater:Cj,lessgtr:Ej,LessLess:_j,lesssim:Tj,LessSlantEqual:Lj,LessTilde:Rj,lfisht:Pj,lfloor:Dj,Lfr:kj,lfr:Oj,lg:Aj,lgE:Ij,lHar:qj,lhard:Mj,lharu:Uj,lharul:$j,lhblk:Fj,LJcy:Hj,ljcy:Bj,llarr:Vj,ll:Kj,Ll:zj,llcorner:Xj,Lleftarrow:Gj,llhard:Wj,lltri:Qj,Lmidot:Yj,lmidot:Jj,lmoustache:Zj,lmoust:eN,lnap:tN,lnapprox:nN,lne:sN,lnE:oN,lneq:cN,lneqq:rN,lnsim:aN,loang:lN,loarr:iN,lobrk:dN,longleftarrow:uN,LongLeftArrow:pN,Longleftarrow:mN,longleftrightarrow:fN,LongLeftRightArrow:hN,Longleftrightarrow:xN,longmapsto:gN,longrightarrow:bN,LongRightArrow:vN,Longrightarrow:yN,looparrowleft:jN,looparrowright:NN,lopar:SN,Lopf:wN,lopf:CN,loplus:EN,lotimes:_N,lowast:TN,lowbar:LN,LowerLeftArrow:RN,LowerRightArrow:PN,loz:DN,lozenge:kN,lozf:ON,lpar:AN,lparlt:IN,lrarr:qN,lrcorner:MN,lrhar:UN,lrhard:$N,lrm:FN,lrtri:HN,lsaquo:BN,lscr:VN,Lscr:KN,lsh:zN,Lsh:XN,lsim:GN,lsime:WN,lsimg:QN,lsqb:YN,lsquo:JN,lsquor:ZN,Lstrok:eS,lstrok:tS,ltcc:nS,ltcir:sS,lt:oS,LT:cS,Lt:rS,ltdot:aS,lthree:lS,ltimes:iS,ltlarr:dS,ltquest:uS,ltri:pS,ltrie:mS,ltrif:fS,ltrPar:hS,lurdshar:xS,luruhar:gS,lvertneqq:bS,lvnE:vS,macr:yS,male:jS,malt:NS,maltese:SS,Map:"⤅",map:wS,mapsto:CS,mapstodown:ES,mapstoleft:_S,mapstoup:TS,marker:LS,mcomma:RS,Mcy:PS,mcy:DS,mdash:kS,mDDot:OS,measuredangle:AS,MediumSpace:IS,Mellintrf:qS,Mfr:MS,mfr:US,mho:$S,micro:FS,midast:HS,midcir:BS,mid:VS,middot:KS,minusb:zS,minus:XS,minusd:GS,minusdu:WS,MinusPlus:QS,mlcp:YS,mldr:JS,mnplus:ZS,models:ew,Mopf:tw,mopf:nw,mp:sw,mscr:ow,Mscr:cw,mstpos:rw,Mu:aw,mu:lw,multimap:iw,mumap:dw,nabla:uw,Nacute:pw,nacute:mw,nang:fw,nap:hw,napE:xw,napid:gw,napos:bw,napprox:vw,natural:yw,naturals:jw,natur:Nw,nbsp:Sw,nbump:ww,nbumpe:Cw,ncap:Ew,Ncaron:_w,ncaron:Tw,Ncedil:Lw,ncedil:Rw,ncong:Pw,ncongdot:Dw,ncup:kw,Ncy:Ow,ncy:Aw,ndash:Iw,nearhk:qw,nearr:Mw,neArr:Uw,nearrow:$w,ne:Fw,nedot:Hw,NegativeMediumSpace:Bw,NegativeThickSpace:Vw,NegativeThinSpace:Kw,NegativeVeryThinSpace:zw,nequiv:Xw,nesear:Gw,nesim:Ww,NestedGreaterGreater:Qw,NestedLessLess:Yw,NewLine:Jw,nexist:Zw,nexists:e0,Nfr:t0,nfr:n0,ngE:s0,nge:o0,ngeq:c0,ngeqq:r0,ngeqslant:a0,nges:l0,nGg:i0,ngsim:d0,nGt:u0,ngt:p0,ngtr:m0,nGtv:f0,nharr:h0,nhArr:x0,nhpar:g0,ni:b0,nis:v0,nisd:y0,niv:j0,NJcy:N0,njcy:S0,nlarr:w0,nlArr:C0,nldr:E0,nlE:_0,nle:T0,nleftarrow:L0,nLeftarrow:R0,nleftrightarrow:P0,nLeftrightarrow:D0,nleq:k0,nleqq:O0,nleqslant:A0,nles:I0,nless:q0,nLl:M0,nlsim:U0,nLt:$0,nlt:F0,nltri:H0,nltrie:B0,nLtv:V0,nmid:K0,NoBreak:z0,NonBreakingSpace:X0,nopf:G0,Nopf:W0,Not:Q0,not:Y0,NotCongruent:J0,NotCupCap:Z0,NotDoubleVerticalBar:eC,NotElement:tC,NotEqual:nC,NotEqualTilde:sC,NotExists:oC,NotGreater:cC,NotGreaterEqual:rC,NotGreaterFullEqual:aC,NotGreaterGreater:lC,NotGreaterLess:iC,NotGreaterSlantEqual:dC,NotGreaterTilde:uC,NotHumpDownHump:pC,NotHumpEqual:mC,notin:fC,notindot:hC,notinE:xC,notinva:gC,notinvb:bC,notinvc:vC,NotLeftTriangleBar:yC,NotLeftTriangle:jC,NotLeftTriangleEqual:NC,NotLess:SC,NotLessEqual:wC,NotLessGreater:CC,NotLessLess:EC,NotLessSlantEqual:_C,NotLessTilde:TC,NotNestedGreaterGreater:LC,NotNestedLessLess:RC,notni:PC,notniva:DC,notnivb:kC,notnivc:OC,NotPrecedes:AC,NotPrecedesEqual:IC,NotPrecedesSlantEqual:qC,NotReverseElement:MC,NotRightTriangleBar:UC,NotRightTriangle:$C,NotRightTriangleEqual:FC,NotSquareSubset:HC,NotSquareSubsetEqual:BC,NotSquareSuperset:VC,NotSquareSupersetEqual:KC,NotSubset:zC,NotSubsetEqual:XC,NotSucceeds:GC,NotSucceedsEqual:WC,NotSucceedsSlantEqual:QC,NotSucceedsTilde:YC,NotSuperset:JC,NotSupersetEqual:ZC,NotTilde:e1,NotTildeEqual:t1,NotTildeFullEqual:n1,NotTildeTilde:s1,NotVerticalBar:o1,nparallel:c1,npar:r1,nparsl:a1,npart:l1,npolint:i1,npr:d1,nprcue:u1,nprec:p1,npreceq:m1,npre:f1,nrarrc:h1,nrarr:x1,nrArr:g1,nrarrw:b1,nrightarrow:v1,nRightarrow:y1,nrtri:j1,nrtrie:N1,nsc:S1,nsccue:w1,nsce:C1,Nscr:E1,nscr:_1,nshortmid:T1,nshortparallel:L1,nsim:R1,nsime:P1,nsimeq:D1,nsmid:k1,nspar:O1,nsqsube:A1,nsqsupe:I1,nsub:q1,nsubE:M1,nsube:U1,nsubset:$1,nsubseteq:F1,nsubseteqq:H1,nsucc:B1,nsucceq:V1,nsup:K1,nsupE:z1,nsupe:X1,nsupset:G1,nsupseteq:W1,nsupseteqq:Q1,ntgl:Y1,Ntilde:J1,ntilde:Z1,ntlg:eE,ntriangleleft:tE,ntrianglelefteq:nE,ntriangleright:sE,ntrianglerighteq:oE,Nu:cE,nu:rE,num:aE,numero:lE,numsp:iE,nvap:dE,nvdash:uE,nvDash:pE,nVdash:mE,nVDash:fE,nvge:hE,nvgt:xE,nvHarr:gE,nvinfin:bE,nvlArr:vE,nvle:yE,nvlt:jE,nvltrie:NE,nvrArr:SE,nvrtrie:wE,nvsim:CE,nwarhk:EE,nwarr:_E,nwArr:TE,nwarrow:LE,nwnear:RE,Oacute:PE,oacute:DE,oast:kE,Ocirc:OE,ocirc:AE,ocir:IE,Ocy:qE,ocy:ME,odash:UE,Odblac:$E,odblac:FE,odiv:HE,odot:BE,odsold:VE,OElig:KE,oelig:zE,ofcir:XE,Ofr:GE,ofr:WE,ogon:QE,Ograve:YE,ograve:JE,ogt:ZE,ohbar:e_,ohm:t_,oint:n_,olarr:s_,olcir:o_,olcross:c_,oline:r_,olt:a_,Omacr:l_,omacr:i_,Omega:d_,omega:u_,Omicron:p_,omicron:m_,omid:f_,ominus:h_,Oopf:x_,oopf:g_,opar:b_,OpenCurlyDoubleQuote:v_,OpenCurlyQuote:y_,operp:j_,oplus:N_,orarr:S_,Or:w_,or:C_,ord:E_,order:__,orderof:T_,ordf:L_,ordm:R_,origof:P_,oror:D_,orslope:k_,orv:O_,oS:A_,Oscr:I_,oscr:q_,Oslash:M_,oslash:U_,osol:$_,Otilde:F_,otilde:H_,otimesas:B_,Otimes:V_,otimes:K_,Ouml:z_,ouml:X_,ovbar:G_,OverBar:W_,OverBrace:Q_,OverBracket:Y_,OverParenthesis:J_,para:Z_,parallel:eT,par:tT,parsim:nT,parsl:sT,part:oT,PartialD:cT,Pcy:rT,pcy:aT,percnt:lT,period:iT,permil:dT,perp:uT,pertenk:pT,Pfr:mT,pfr:fT,Phi:hT,phi:xT,phiv:gT,phmmat:bT,phone:vT,Pi:yT,pi:jT,pitchfork:NT,piv:ST,planck:wT,planckh:CT,plankv:ET,plusacir:_T,plusb:TT,pluscir:LT,plus:RT,plusdo:PT,plusdu:DT,pluse:kT,PlusMinus:OT,plusmn:AT,plussim:IT,plustwo:qT,pm:MT,Poincareplane:UT,pointint:$T,popf:FT,Popf:HT,pound:BT,prap:VT,Pr:KT,pr:zT,prcue:XT,precapprox:GT,prec:WT,preccurlyeq:QT,Precedes:YT,PrecedesEqual:JT,PrecedesSlantEqual:ZT,PrecedesTilde:eL,preceq:tL,precnapprox:nL,precneqq:sL,precnsim:oL,pre:cL,prE:rL,precsim:aL,prime:lL,Prime:iL,primes:dL,prnap:uL,prnE:pL,prnsim:mL,prod:fL,Product:hL,profalar:xL,profline:gL,profsurf:bL,prop:vL,Proportional:yL,Proportion:jL,propto:NL,prsim:SL,prurel:wL,Pscr:CL,pscr:EL,Psi:_L,psi:TL,puncsp:LL,Qfr:RL,qfr:PL,qint:DL,qopf:kL,Qopf:OL,qprime:AL,Qscr:IL,qscr:qL,quaternions:ML,quatint:UL,quest:$L,questeq:FL,quot:HL,QUOT:BL,rAarr:VL,race:KL,Racute:zL,racute:XL,radic:GL,raemptyv:WL,rang:QL,Rang:YL,rangd:JL,range:ZL,rangle:eR,raquo:tR,rarrap:nR,rarrb:sR,rarrbfs:oR,rarrc:cR,rarr:rR,Rarr:aR,rArr:lR,rarrfs:iR,rarrhk:dR,rarrlp:uR,rarrpl:pR,rarrsim:mR,Rarrtl:fR,rarrtl:hR,rarrw:xR,ratail:gR,rAtail:bR,ratio:vR,rationals:yR,rbarr:jR,rBarr:NR,RBarr:SR,rbbrk:wR,rbrace:CR,rbrack:ER,rbrke:_R,rbrksld:TR,rbrkslu:LR,Rcaron:RR,rcaron:PR,Rcedil:DR,rcedil:kR,rceil:OR,rcub:AR,Rcy:IR,rcy:qR,rdca:MR,rdldhar:UR,rdquo:$R,rdquor:FR,rdsh:HR,real:BR,realine:VR,realpart:KR,reals:zR,Re:XR,rect:GR,reg:WR,REG:QR,ReverseElement:YR,ReverseEquilibrium:JR,ReverseUpEquilibrium:ZR,rfisht:eP,rfloor:tP,rfr:nP,Rfr:sP,rHar:oP,rhard:cP,rharu:rP,rharul:aP,Rho:lP,rho:iP,rhov:dP,RightAngleBracket:uP,RightArrowBar:pP,rightarrow:mP,RightArrow:fP,Rightarrow:hP,RightArrowLeftArrow:xP,rightarrowtail:gP,RightCeiling:bP,RightDoubleBracket:vP,RightDownTeeVector:yP,RightDownVectorBar:jP,RightDownVector:NP,RightFloor:SP,rightharpoondown:wP,rightharpoonup:CP,rightleftarrows:EP,rightleftharpoons:_P,rightrightarrows:TP,rightsquigarrow:LP,RightTeeArrow:RP,RightTee:PP,RightTeeVector:DP,rightthreetimes:kP,RightTriangleBar:OP,RightTriangle:AP,RightTriangleEqual:IP,RightUpDownVector:qP,RightUpTeeVector:MP,RightUpVectorBar:UP,RightUpVector:$P,RightVectorBar:FP,RightVector:HP,ring:BP,risingdotseq:VP,rlarr:KP,rlhar:zP,rlm:XP,rmoustache:GP,rmoust:WP,rnmid:QP,roang:YP,roarr:JP,robrk:ZP,ropar:eD,ropf:tD,Ropf:nD,roplus:sD,rotimes:oD,RoundImplies:cD,rpar:rD,rpargt:aD,rppolint:lD,rrarr:iD,Rrightarrow:dD,rsaquo:uD,rscr:pD,Rscr:mD,rsh:fD,Rsh:hD,rsqb:xD,rsquo:gD,rsquor:bD,rthree:vD,rtimes:yD,rtri:jD,rtrie:ND,rtrif:SD,rtriltri:wD,RuleDelayed:CD,ruluhar:ED,rx:_D,Sacute:TD,sacute:LD,sbquo:RD,scap:PD,Scaron:DD,scaron:kD,Sc:OD,sc:AD,sccue:ID,sce:qD,scE:MD,Scedil:UD,scedil:$D,Scirc:FD,scirc:HD,scnap:BD,scnE:VD,scnsim:KD,scpolint:zD,scsim:XD,Scy:GD,scy:WD,sdotb:QD,sdot:YD,sdote:JD,searhk:ZD,searr:ek,seArr:tk,searrow:nk,sect:sk,semi:ok,seswar:ck,setminus:rk,setmn:ak,sext:lk,Sfr:ik,sfr:dk,sfrown:uk,sharp:pk,SHCHcy:mk,shchcy:fk,SHcy:hk,shcy:xk,ShortDownArrow:gk,ShortLeftArrow:bk,shortmid:vk,shortparallel:yk,ShortRightArrow:jk,ShortUpArrow:Nk,shy:Sk,Sigma:wk,sigma:Ck,sigmaf:Ek,sigmav:_k,sim:Tk,simdot:Lk,sime:Rk,simeq:Pk,simg:Dk,simgE:kk,siml:Ok,simlE:Ak,simne:Ik,simplus:qk,simrarr:Mk,slarr:Uk,SmallCircle:$k,smallsetminus:Fk,smashp:Hk,smeparsl:Bk,smid:Vk,smile:Kk,smt:zk,smte:Xk,smtes:Gk,SOFTcy:Wk,softcy:Qk,solbar:Yk,solb:Jk,sol:Zk,Sopf:eO,sopf:tO,spades:nO,spadesuit:sO,spar:oO,sqcap:cO,sqcaps:rO,sqcup:aO,sqcups:lO,Sqrt:iO,sqsub:dO,sqsube:uO,sqsubset:pO,sqsubseteq:mO,sqsup:fO,sqsupe:hO,sqsupset:xO,sqsupseteq:gO,square:bO,Square:vO,SquareIntersection:yO,SquareSubset:jO,SquareSubsetEqual:NO,SquareSuperset:SO,SquareSupersetEqual:wO,SquareUnion:CO,squarf:EO,squ:_O,squf:TO,srarr:LO,Sscr:RO,sscr:PO,ssetmn:DO,ssmile:kO,sstarf:OO,Star:AO,star:IO,starf:qO,straightepsilon:MO,straightphi:UO,strns:$O,sub:FO,Sub:HO,subdot:BO,subE:VO,sube:KO,subedot:zO,submult:XO,subnE:GO,subne:WO,subplus:QO,subrarr:YO,subset:JO,Subset:ZO,subseteq:eA,subseteqq:tA,SubsetEqual:nA,subsetneq:sA,subsetneqq:oA,subsim:cA,subsub:rA,subsup:aA,succapprox:lA,succ:iA,succcurlyeq:dA,Succeeds:uA,SucceedsEqual:pA,SucceedsSlantEqual:mA,SucceedsTilde:fA,succeq:hA,succnapprox:xA,succneqq:gA,succnsim:bA,succsim:vA,SuchThat:yA,sum:jA,Sum:NA,sung:SA,sup1:wA,sup2:CA,sup3:EA,sup:_A,Sup:TA,supdot:LA,supdsub:RA,supE:PA,supe:DA,supedot:kA,Superset:OA,SupersetEqual:AA,suphsol:IA,suphsub:qA,suplarr:MA,supmult:UA,supnE:$A,supne:FA,supplus:HA,supset:BA,Supset:VA,supseteq:KA,supseteqq:zA,supsetneq:XA,supsetneqq:GA,supsim:WA,supsub:QA,supsup:YA,swarhk:JA,swarr:ZA,swArr:eI,swarrow:tI,swnwar:nI,szlig:sI,Tab:oI,target:cI,Tau:rI,tau:aI,tbrk:lI,Tcaron:iI,tcaron:dI,Tcedil:uI,tcedil:pI,Tcy:mI,tcy:fI,tdot:hI,telrec:xI,Tfr:gI,tfr:bI,there4:vI,therefore:yI,Therefore:jI,Theta:NI,theta:SI,thetasym:wI,thetav:CI,thickapprox:EI,thicksim:_I,ThickSpace:TI,ThinSpace:LI,thinsp:RI,thkap:PI,thksim:DI,THORN:kI,thorn:OI,tilde:AI,Tilde:II,TildeEqual:qI,TildeFullEqual:MI,TildeTilde:UI,timesbar:$I,timesb:FI,times:HI,timesd:BI,tint:VI,toea:KI,topbot:zI,topcir:XI,top:GI,Topf:WI,topf:QI,topfork:YI,tosa:JI,tprime:ZI,trade:e2,TRADE:t2,triangle:n2,triangledown:s2,triangleleft:o2,trianglelefteq:c2,triangleq:r2,triangleright:a2,trianglerighteq:l2,tridot:i2,trie:d2,triminus:u2,TripleDot:p2,triplus:m2,trisb:f2,tritime:h2,trpezium:x2,Tscr:g2,tscr:b2,TScy:v2,tscy:y2,TSHcy:j2,tshcy:N2,Tstrok:S2,tstrok:w2,twixt:C2,twoheadleftarrow:E2,twoheadrightarrow:_2,Uacute:T2,uacute:L2,uarr:R2,Uarr:P2,uArr:D2,Uarrocir:k2,Ubrcy:O2,ubrcy:A2,Ubreve:I2,ubreve:q2,Ucirc:M2,ucirc:U2,Ucy:$2,ucy:F2,udarr:H2,Udblac:B2,udblac:V2,udhar:K2,ufisht:z2,Ufr:X2,ufr:G2,Ugrave:W2,ugrave:Q2,uHar:Y2,uharl:J2,uharr:Z2,uhblk:eq,ulcorn:tq,ulcorner:nq,ulcrop:sq,ultri:oq,Umacr:cq,umacr:rq,uml:aq,UnderBar:lq,UnderBrace:iq,UnderBracket:dq,UnderParenthesis:uq,Union:pq,UnionPlus:mq,Uogon:fq,uogon:hq,Uopf:xq,uopf:gq,UpArrowBar:bq,uparrow:vq,UpArrow:yq,Uparrow:jq,UpArrowDownArrow:Nq,updownarrow:Sq,UpDownArrow:wq,Updownarrow:Cq,UpEquilibrium:Eq,upharpoonleft:_q,upharpoonright:Tq,uplus:Lq,UpperLeftArrow:Rq,UpperRightArrow:Pq,upsi:Dq,Upsi:kq,upsih:Oq,Upsilon:Aq,upsilon:Iq,UpTeeArrow:qq,UpTee:Mq,upuparrows:Uq,urcorn:$q,urcorner:Fq,urcrop:Hq,Uring:Bq,uring:Vq,urtri:Kq,Uscr:zq,uscr:Xq,utdot:Gq,Utilde:Wq,utilde:Qq,utri:Yq,utrif:Jq,uuarr:Zq,Uuml:eM,uuml:tM,uwangle:nM,vangrt:sM,varepsilon:oM,varkappa:cM,varnothing:rM,varphi:aM,varpi:lM,varpropto:iM,varr:dM,vArr:uM,varrho:pM,varsigma:mM,varsubsetneq:fM,varsubsetneqq:hM,varsupsetneq:xM,varsupsetneqq:gM,vartheta:bM,vartriangleleft:vM,vartriangleright:yM,vBar:jM,Vbar:NM,vBarv:SM,Vcy:wM,vcy:CM,vdash:EM,vDash:_M,Vdash:TM,VDash:LM,Vdashl:RM,veebar:PM,vee:DM,Vee:kM,veeeq:OM,vellip:AM,verbar:IM,Verbar:qM,vert:MM,Vert:UM,VerticalBar:$M,VerticalLine:FM,VerticalSeparator:HM,VerticalTilde:BM,VeryThinSpace:VM,Vfr:KM,vfr:zM,vltri:XM,vnsub:GM,vnsup:WM,Vopf:QM,vopf:YM,vprop:JM,vrtri:ZM,Vscr:eU,vscr:tU,vsubnE:nU,vsubne:sU,vsupnE:oU,vsupne:cU,Vvdash:rU,vzigzag:aU,Wcirc:lU,wcirc:iU,wedbar:dU,wedge:uU,Wedge:pU,wedgeq:mU,weierp:fU,Wfr:hU,wfr:xU,Wopf:gU,wopf:bU,wp:vU,wr:yU,wreath:jU,Wscr:NU,wscr:SU,xcap:wU,xcirc:CU,xcup:EU,xdtri:_U,Xfr:TU,xfr:LU,xharr:RU,xhArr:PU,Xi:DU,xi:kU,xlarr:OU,xlArr:AU,xmap:IU,xnis:qU,xodot:MU,Xopf:UU,xopf:$U,xoplus:FU,xotime:HU,xrarr:BU,xrArr:VU,Xscr:KU,xscr:zU,xsqcup:XU,xuplus:GU,xutri:WU,xvee:QU,xwedge:YU,Yacute:JU,yacute:ZU,YAcy:e$,yacy:t$,Ycirc:n$,ycirc:s$,Ycy:o$,ycy:c$,yen:r$,Yfr:a$,yfr:l$,YIcy:i$,yicy:d$,Yopf:u$,yopf:p$,Yscr:m$,yscr:f$,YUcy:h$,yucy:x$,yuml:g$,Yuml:b$,Zacute:v$,zacute:y$,Zcaron:j$,zcaron:N$,Zcy:S$,zcy:w$,Zdot:C$,zdot:E$,zeetrf:_$,ZeroWidthSpace:T$,Zeta:L$,zeta:R$,zfr:P$,Zfr:D$,ZHcy:k$,zhcy:O$,zigrarr:A$,zopf:I$,Zopf:q$,Zscr:M$,zscr:U$,zwj:$$,zwnj:F$},H$="Á",B$="á",V$="Â",K$="â",z$="´",X$="Æ",G$="æ",W$="À",Q$="à",Y$="&",J$="&",Z$="Å",e3="å",t3="Ã",n3="ã",s3="Ä",o3="ä",c3="¦",r3="Ç",a3="ç",l3="¸",i3="¢",d3="©",u3="©",p3="¤",m3="°",f3="÷",h3="É",x3="é",g3="Ê",b3="ê",v3="È",y3="è",j3="Ð",N3="ð",S3="Ë",w3="ë",C3="½",E3="¼",_3="¾",T3=">",L3=">",R3="Í",P3="í",D3="Î",k3="î",O3="¡",A3="Ì",I3="ì",q3="¿",M3="Ï",U3="ï",$3="«",F3="<",H3="<",B3="¯",V3="µ",K3="·",z3=" ",X3="¬",G3="Ñ",W3="ñ",Q3="Ó",Y3="ó",J3="Ô",Z3="ô",e5="Ò",t5="ò",n5="ª",s5="º",o5="Ø",c5="ø",r5="Õ",a5="õ",l5="Ö",i5="ö",d5="¶",u5="±",p5="£",m5='"',f5='"',h5="»",x5="®",g5="®",b5="§",v5="",y5="¹",j5="²",N5="³",S5="ß",w5="Þ",C5="þ",E5="×",_5="Ú",T5="ú",L5="Û",R5="û",P5="Ù",D5="ù",k5="¨",O5="Ü",A5="ü",I5="Ý",q5="ý",M5="¥",U5="ÿ",$5={Aacute:H$,aacute:B$,Acirc:V$,acirc:K$,acute:z$,AElig:X$,aelig:G$,Agrave:W$,agrave:Q$,amp:Y$,AMP:J$,Aring:Z$,aring:e3,Atilde:t3,atilde:n3,Auml:s3,auml:o3,brvbar:c3,Ccedil:r3,ccedil:a3,cedil:l3,cent:i3,copy:d3,COPY:u3,curren:p3,deg:m3,divide:f3,Eacute:h3,eacute:x3,Ecirc:g3,ecirc:b3,Egrave:v3,egrave:y3,ETH:j3,eth:N3,Euml:S3,euml:w3,frac12:C3,frac14:E3,frac34:_3,gt:T3,GT:L3,Iacute:R3,iacute:P3,Icirc:D3,icirc:k3,iexcl:O3,Igrave:A3,igrave:I3,iquest:q3,Iuml:M3,iuml:U3,laquo:$3,lt:F3,LT:H3,macr:B3,micro:V3,middot:K3,nbsp:z3,not:X3,Ntilde:G3,ntilde:W3,Oacute:Q3,oacute:Y3,Ocirc:J3,ocirc:Z3,Ograve:e5,ograve:t5,ordf:n5,ordm:s5,Oslash:o5,oslash:c5,Otilde:r5,otilde:a5,Ouml:l5,ouml:i5,para:d5,plusmn:u5,pound:p5,quot:m5,QUOT:f5,raquo:h5,reg:x5,REG:g5,sect:b5,shy:v5,sup1:y5,sup2:j5,sup3:N5,szlig:S5,THORN:w5,thorn:C5,times:E5,Uacute:_5,uacute:T5,Ucirc:L5,ucirc:R5,Ugrave:P5,ugrave:D5,uml:k5,Uuml:O5,uuml:A5,Yacute:I5,yacute:q5,yen:M5,yuml:U5},F5="&",H5="'",B5=">",V5="<",K5='"',hn={amp:F5,apos:H5,gt:B5,lt:V5,quot:K5};var Ie={};const z5={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376};var kt;function X5(){if(kt)return Ie;kt=1;var t=Ie&&Ie.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Ie,"__esModule",{value:!0});var n=t(z5),s=String.fromCodePoint||function(c){var r="";return c>65535&&(c-=65536,r+=String.fromCharCode(c>>>10&1023|55296),c=56320|c&1023),r+=String.fromCharCode(c),r};function o(c){return c>=55296&&c<=57343||c>1114111?"�":(c in n.default&&(c=n.default[c]),s(c))}return Ie.default=o,Ie}var Ot;function At(){if(Ot)return je;Ot=1;var t=je&&je.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(je,"__esModule",{value:!0}),je.decodeHTML=je.decodeHTMLStrict=je.decodeXML=void 0;var n=t(fn),s=t($5),o=t(hn),c=t(X5()),r=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;je.decodeXML=u(o.default),je.decodeHTMLStrict=u(n.default);function u(h){var y=f(h);return function(N){return String(N).replace(r,y)}}var p=function(h,y){return h<y?1:-1};je.decodeHTML=(function(){for(var h=Object.keys(s.default).sort(p),y=Object.keys(n.default).sort(p),N=0,C=0;N<y.length;N++)h[C]===y[N]?(y[N]+=";?",C++):y[N]+=";";var _=new RegExp("&(?:"+y.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),L=f(n.default);function T(g){return g.substr(-1)!==";"&&(g+=";"),L(g)}return function(g){return String(g).replace(_,T)}})();function f(h){return function(N){if(N.charAt(1)==="#"){var C=N.charAt(2);return C==="X"||C==="x"?c.default(parseInt(N.substr(3),16)):c.default(parseInt(N.substr(2),10))}return h[N.slice(1,-1)]||N}}return je}var ge={},It;function qt(){if(It)return ge;It=1;var t=ge&&ge.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(ge,"__esModule",{value:!0}),ge.escapeUTF8=ge.escape=ge.encodeNonAsciiHTML=ge.encodeHTML=ge.encodeXML=void 0;var n=t(hn),s=p(n.default),o=f(s);ge.encodeXML=g(s);var c=t(fn),r=p(c.default),u=f(r);ge.encodeHTML=C(r,u),ge.encodeNonAsciiHTML=g(r);function p(b){return Object.keys(b).sort().reduce(function(S,v){return S[b[v]]="&"+v+";",S},{})}function f(b){for(var S=[],v=[],x=0,M=Object.keys(b);x<M.length;x++){var P=M[x];P.length===1?S.push("\\"+P):v.push(P)}S.sort();for(var k=0;k<S.length-1;k++){for(var U=k;U<S.length-1&&S[U].charCodeAt(1)+1===S[U+1].charCodeAt(1);)U+=1;var I=1+U-k;I<3||S.splice(k,I,S[k]+"-"+S[U])}return v.unshift("["+S.join("")+"]"),new RegExp(v.join("|"),"g")}var h=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,y=String.prototype.codePointAt!=null?function(b){return b.codePointAt(0)}:function(b){return(b.charCodeAt(0)-55296)*1024+b.charCodeAt(1)-56320+65536};function N(b){return"&#x"+(b.length>1?y(b):b.charCodeAt(0)).toString(16).toUpperCase()+";"}function C(b,S){return function(v){return v.replace(S,function(x){return b[x]}).replace(h,N)}}var _=new RegExp(o.source+"|"+h.source,"g");function L(b){return b.replace(_,N)}ge.escape=L;function T(b){return b.replace(o,N)}ge.escapeUTF8=T;function g(b){return function(S){return S.replace(_,function(v){return b[v]||N(v)})}}return ge}var Mt;function G5(){return Mt||(Mt=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.encodeHTML5=t.encodeHTML4=t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=t.encode=t.decodeStrict=t.decode=void 0;var n=At(),s=qt();function o(f,h){return(!h||h<=0?n.decodeXML:n.decodeHTML)(f)}t.decode=o;function c(f,h){return(!h||h<=0?n.decodeXML:n.decodeHTMLStrict)(f)}t.decodeStrict=c;function r(f,h){return(!h||h<=0?s.encodeXML:s.encodeHTML)(f)}t.encode=r;var u=qt();Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return u.encodeXML}}),Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return u.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return u.encodeNonAsciiHTML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return u.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return u.escapeUTF8}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return u.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return u.encodeHTML}});var p=At();Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return p.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return p.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return p.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return p.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return p.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return p.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return p.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return p.decodeXML}})})(nt)),nt}var st,Ut;function W5(){if(Ut)return st;Ut=1;function t(l,i){if(!(l instanceof i))throw new TypeError("Cannot call a class as a function")}function n(l,i){for(var d=0;d<i.length;d++){var j=i[d];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(l,j.key,j)}}function s(l,i,d){return i&&n(l.prototype,i),l}function o(l,i){var d=typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(!d){if(Array.isArray(l)||(d=c(l))||i){d&&(l=d);var j=0,E=function(){};return{s:E,n:function(){return j>=l.length?{done:!0}:{done:!1,value:l[j++]}},e:function(H){throw H},f:E}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var w=!0,A=!1,X;return{s:function(){d=d.call(l)},n:function(){var H=d.next();return w=H.done,H},e:function(H){A=!0,X=H},f:function(){try{!w&&d.return!=null&&d.return()}finally{if(A)throw X}}}}function c(l,i){if(l){if(typeof l=="string")return r(l,i);var d=Object.prototype.toString.call(l).slice(8,-1);if(d==="Object"&&l.constructor&&(d=l.constructor.name),d==="Map"||d==="Set")return Array.from(l);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return r(l,i)}}function r(l,i){(i==null||i>l.length)&&(i=l.length);for(var d=0,j=new Array(i);d<i;d++)j[d]=l[d];return j}var u=G5(),p={fg:"#FFF",bg:"#000",newline:!1,escapeXML:!1,stream:!1,colors:f()};function f(){var l={0:"#000",1:"#A00",2:"#0A0",3:"#A50",4:"#00A",5:"#A0A",6:"#0AA",7:"#AAA",8:"#555",9:"#F55",10:"#5F5",11:"#FF5",12:"#55F",13:"#F5F",14:"#5FF",15:"#FFF"};return g(0,5).forEach(function(i){g(0,5).forEach(function(d){g(0,5).forEach(function(j){return h(i,d,j,l)})})}),g(0,23).forEach(function(i){var d=i+232,j=y(i*10+8);l[d]="#"+j+j+j}),l}function h(l,i,d,j){var E=16+l*36+i*6+d,w=l>0?l*40+55:0,A=i>0?i*40+55:0,X=d>0?d*40+55:0;j[E]=N([w,A,X])}function y(l){for(var i=l.toString(16);i.length<2;)i="0"+i;return i}function N(l){var i=[],d=o(l),j;try{for(d.s();!(j=d.n()).done;){var E=j.value;i.push(y(E))}}catch(w){d.e(w)}finally{d.f()}return"#"+i.join("")}function C(l,i,d,j){var E;return i==="text"?E=v(d,j):i==="display"?E=L(l,d,j):i==="xterm256Foreground"?E=P(l,j.colors[d]):i==="xterm256Background"?E=k(l,j.colors[d]):i==="rgb"&&(E=_(l,d)),E}function _(l,i){i=i.substring(2).slice(0,-1);var d=+i.substr(0,2),j=i.substring(5).split(";"),E=j.map(function(w){return("0"+Number(w).toString(16)).substr(-2)}).join("");return M(l,(d===38?"color:#":"background-color:#")+E)}function L(l,i,d){i=parseInt(i,10);var j={"-1":function(){return"<br/>"},0:function(){return l.length&&T(l)},1:function(){return x(l,"b")},3:function(){return x(l,"i")},4:function(){return x(l,"u")},8:function(){return M(l,"display:none")},9:function(){return x(l,"strike")},22:function(){return M(l,"font-weight:normal;text-decoration:none;font-style:normal")},23:function(){return U(l,"i")},24:function(){return U(l,"u")},39:function(){return P(l,d.fg)},49:function(){return k(l,d.bg)},53:function(){return M(l,"text-decoration:overline")}},E;return j[i]?E=j[i]():4<i&&i<7?E=x(l,"blink"):29<i&&i<38?E=P(l,d.colors[i-30]):39<i&&i<48?E=k(l,d.colors[i-40]):89<i&&i<98?E=P(l,d.colors[8+(i-90)]):99<i&&i<108&&(E=k(l,d.colors[8+(i-100)])),E}function T(l){var i=l.slice(0);return l.length=0,i.reverse().map(function(d){return"</"+d+">"}).join("")}function g(l,i){for(var d=[],j=l;j<=i;j++)d.push(j);return d}function b(l){return function(i){return(l===null||i.category!==l)&&l!=="all"}}function S(l){l=parseInt(l,10);var i=null;return l===0?i="all":l===1?i="bold":2<l&&l<5?i="underline":4<l&&l<7?i="blink":l===8?i="hide":l===9?i="strike":29<l&&l<38||l===39||89<l&&l<98?i="foreground-color":(39<l&&l<48||l===49||99<l&&l<108)&&(i="background-color"),i}function v(l,i){return i.escapeXML?u.encodeXML(l):l}function x(l,i,d){return d||(d=""),l.push(i),"<".concat(i).concat(d?' style="'.concat(d,'"'):"",">")}function M(l,i){return x(l,"span",i)}function P(l,i){return x(l,"span","color:"+i)}function k(l,i){return x(l,"span","background-color:"+i)}function U(l,i){var d;if(l.slice(-1)[0]===i&&(d=l.pop()),d)return"</"+i+">"}function I(l,i,d){var j=!1,E=3;function w(){return""}function A(V,R){return d("xterm256Foreground",R),""}function X(V,R){return d("xterm256Background",R),""}function O(V){return i.newline?d("display",-1):d("text",V),""}function H(V,R){j=!0,R.trim().length===0&&(R="0"),R=R.trimRight(";").split(";");var me=o(R),m;try{for(me.s();!(m=me.n()).done;){var q=m.value;d("display",q)}}catch(ee){me.e(ee)}finally{me.f()}return""}function K(V){return d("text",V),""}function ie(V){return d("rgb",V),""}var Q=[{pattern:/^\x08+/,sub:w},{pattern:/^\x1b\[[012]?K/,sub:w},{pattern:/^\x1b\[\(B/,sub:w},{pattern:/^\x1b\[[34]8;2;\d+;\d+;\d+m/,sub:ie},{pattern:/^\x1b\[38;5;(\d+)m/,sub:A},{pattern:/^\x1b\[48;5;(\d+)m/,sub:X},{pattern:/^\n/,sub:O},{pattern:/^\r+\n/,sub:O},{pattern:/^\r/,sub:O},{pattern:/^\x1b\[((?:\d{1,3};?)+|)m/,sub:H},{pattern:/^\x1b\[\d?J/,sub:w},{pattern:/^\x1b\[\d{0,3};\d{0,3}f/,sub:w},{pattern:/^\x1b\[?[\d;]{0,3}/,sub:w},{pattern:/^(([^\x1b\x08\r\n])+)/,sub:K}];function oe(V,R){R>E&&j||(j=!1,l=l.replace(V.pattern,V.sub))}var ne=[],he=l,D=he.length;e:for(;D>0;){for(var B=0,se=0,z=Q.length;se<z;B=++se){var W=Q[B];if(oe(W,B),l.length!==D){D=l.length;continue e}}if(l.length===D)break;ne.push(0),D=l.length}return ne}function F(l,i,d){return i!=="text"&&(l=l.filter(b(S(d))),l.push({token:i,data:d,category:S(d)})),l}var te=(function(){function l(i){t(this,l),i=i||{},i.colors&&(i.colors=Object.assign({},p.colors,i.colors)),this.options=Object.assign({},p,i),this.stack=[],this.stickyStack=[]}return s(l,[{key:"toHtml",value:function(d){var j=this;d=typeof d=="string"?[d]:d;var E=this.stack,w=this.options,A=[];return this.stickyStack.forEach(function(X){var O=C(E,X.token,X.data,w);O&&A.push(O)}),I(d.join(""),w,function(X,O){var H=C(E,X,O,w);H&&A.push(H),w.stream&&(j.stickyStack=F(j.stickyStack,X,O))}),E.length&&A.push(T(E)),A.join("")}}]),l})();return st=te,st}var Q5=W5();const Y5=yn(Q5),J5={"15m":900*1e3,"1h":3600*1e3,"24h":1440*60*1e3};function Z5(t,n){const s=n.keyword.trim().toLowerCase(),o=n.timeRange==="all"?null:(n.now??new Date).getTime()-J5[n.timeRange];return t.filter(c=>{const r=eF(c,n.source),u=n.level==="all"||c.level===n.level,p=!s||`${c.timestamp} ${c.level} ${c.source} ${c.message}`.toLowerCase().includes(s),f=Date.parse(c.timestamp),h=o==null||Number.isFinite(f)&&f>=o;return r&&u&&p&&h})}function eF(t,n){return n==="all"?!0:n==="errors"?t.level==="error":n==="solid-server"?t.source==="css"||t.source==="solid-server":n==="runtime"?t.source==="xpod"||t.source==="runtime":t.source===n}const tF=new Y5({fg:"hsl(var(--foreground))",bg:"hsl(var(--background))",newline:!0,escapeXML:!0});function nF(t){return t.includes("ERR_NGROK_8001")?"ERR_NGROK_8001: ngrok agent 无法连到 ngrok edge,通常是本机网络或代理限制。":t.includes("ERR_NGROK_9009")?"ERR_NGROK_9009: 当前 ngrok 计划或代理路径不允许该用法。":t.includes("DNS")||t.includes("DDNS")?"DNS/DDNS 相关错误:检查 Cloud 协调状态和当前公网地址。":null}function sF(t){return e.jsxs(J,{variant:"bordered",className:"mb-4",children:[e.jsx(ce,{className:"pb-2",children:e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsx(re,{children:"诊断导出"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"导出可交给开发者的脱敏运行时证据,默认不包含用户 Pod 内容。"})]}),e.jsxs(pe,{onClick:t.onExport,disabled:t.exporting,className:"gap-2",children:[e.jsx(cs,{className:"h-4 w-4"}),"导出诊断"]})]})}),e.jsxs(Z,{className:"grid gap-3 text-sm lg:grid-cols-[1fr_auto] lg:items-end",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium",children:"包含:"}),e.jsx("span",{className:"text-muted-foreground",children:"/service/status、隧道、DDNS、运行时配置摘要、最近错误和日志尾部。"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium",children:"排除:"}),e.jsx("span",{className:"text-muted-foreground",children:"Token、API key、数据库密码、认证 cookie、client secret、用户 Pod 内容。"})]})]}),e.jsxs("div",{className:"text-xs text-muted-foreground lg:text-right",children:["日志文件: ",t.logFileInfo]})]})]})}function wF(){const[t,n]=a.useState([]),[s,o]=a.useState(()=>new URLSearchParams(window.location.search).get("source")||"all"),[c,r]=a.useState("all"),[u,p]=a.useState("all"),[f,h]=a.useState(""),[y,N]=a.useState(!1),[C,_]=a.useState(!0),[L,T]=a.useState(""),[g,b]=a.useState(!1),[S,v]=a.useState("未读取"),x=a.useRef(null),M=a.useRef(null);a.useEffect(()=>{(async()=>{const j=await Cn({limit:500});n(j);const E=await En({lines:20});v(E?.file??"未找到日志文件")})()},[]),a.useEffect(()=>{if(y){M.current?.(),M.current=null;return}const d=Sn(j=>{T(""),n(E=>[...E,...j].slice(-500))},()=>{T("日志流连接异常,已保留当前视图。")});return M.current=d,()=>{d(),M.current=null}},[y]),a.useEffect(()=>{C&&!y&&x.current?.scrollIntoView({block:"end"})},[t,y,C]);const P=a.useMemo(()=>Z5(t,{source:s,level:c,keyword:f,timeRange:u}),[t,s,c,f,u]),k=a.useCallback(()=>{n([])},[]),U=a.useCallback(()=>{const d=P.map(A=>`[${A.timestamp}] [${A.level.toUpperCase()}] [${A.source}] ${A.message}`).join(`
|
|
4
4
|
`),j=new Blob([d],{type:"text/plain"}),E=URL.createObjectURL(j),w=document.createElement("a");w.href=E,w.download=`xpod-logs-${new Date().toISOString().slice(0,10)}.txt`,w.click(),URL.revokeObjectURL(E)},[P]),I=a.useCallback(async()=>{b(!0);try{const d=await wn(),j=new Blob([JSON.stringify(d,null,2)],{type:"application/json"}),E=URL.createObjectURL(j),w=document.createElement("a");w.href=E,w.download=`xpod-diagnostics-${new Date().toISOString().slice(0,10)}.json`,w.click(),URL.revokeObjectURL(E)}finally{b(!1)}},[]),F=d=>{try{return new Date(d).toLocaleTimeString()}catch{return d}},te=d=>{switch(d){case"error":return"text-destructive";case"warn":return"text-amber-600 dark:text-amber-300";case"debug":return"text-muted-foreground";default:return"text-foreground"}},l=d=>{switch(d){case"xpod":return"text-primary";case"css":return"text-green-700 dark:text-green-300";case"api":return"text-blue-700 dark:text-blue-300";case"gateway":return"text-amber-700 dark:text-amber-300";default:return"text-muted-foreground"}},i=P.map(d=>nF(d.message)).find(Boolean);return e.jsxs("div",{className:"p-4 sm:p-8 h-full flex flex-col max-w-6xl",children:[e.jsxs("div",{className:"flex flex-col gap-4 mb-6 lg:flex-row lg:items-start lg:justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"type-h1",children:"日志"}),e.jsx("p",{className:"mt-2 max-w-[65ch] text-sm text-muted-foreground",children:"实时检查运行时输出,并导出不包含 secret 的诊断证据。"})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0 flex-wrap",children:[e.jsxs(pe,{variant:"ghost",size:"sm",onClick:()=>N(!y),className:"gap-1.5 whitespace-nowrap",children:[y?e.jsx(is,{className:"w-4 h-4"}):e.jsx(as,{className:"w-4 h-4"}),y?"继续":"暂停"]}),e.jsxs(pe,{variant:"ghost",size:"sm",onClick:U,className:"gap-1.5 whitespace-nowrap",children:[e.jsx(Kn,{className:"w-4 h-4"}),"导出日志"]}),e.jsxs(pe,{variant:"ghost",size:"sm",onClick:k,className:"gap-1.5 whitespace-nowrap",children:[e.jsx(ps,{className:"w-4 h-4"}),"清空视图"]})]})]}),e.jsx(sF,{onExport:I,exporting:g,logFileInfo:S}),e.jsxs("div",{className:"mb-4 grid gap-3 lg:grid-cols-[170px_140px_140px_1fr_auto]",children:[e.jsxs(De,{value:s,onValueChange:d=>o(d),children:[e.jsx(Te,{className:"h-9 text-sm",children:e.jsx(ke,{})}),e.jsxs(Le,{children:[e.jsx(Y,{value:"all",children:"All Sources"}),e.jsx(Y,{value:"runtime",children:"Xpod Runtime"}),e.jsx(Y,{value:"gateway",children:"Gateway"}),e.jsx(Y,{value:"solid-server",children:"Solid Server"}),e.jsx(Y,{value:"api",children:"API Server"}),e.jsx(Y,{value:"errors",children:"Errors"})]})]}),e.jsxs(De,{value:u,onValueChange:d=>p(d),children:[e.jsx(Te,{className:"h-9 text-sm",children:e.jsx(ke,{})}),e.jsxs(Le,{children:[e.jsx(Y,{value:"all",children:"All time"}),e.jsx(Y,{value:"15m",children:"Last 15 min"}),e.jsx(Y,{value:"1h",children:"Last hour"}),e.jsx(Y,{value:"24h",children:"Last 24 hours"})]})]}),e.jsxs(De,{value:c,onValueChange:d=>r(d),children:[e.jsx(Te,{className:"h-9 text-sm",children:e.jsx(ke,{})}),e.jsxs(Le,{children:[e.jsx(Y,{value:"all",children:"全部等级"}),e.jsx(Y,{value:"error",children:"错误"}),e.jsx(Y,{value:"warn",children:"警告"}),e.jsx(Y,{value:"info",children:"信息"}),e.jsx(Y,{value:"debug",children:"调试"})]})]}),e.jsxs("div",{children:[e.jsx(Pe,{htmlFor:"keywordFilter",className:"sr-only",children:"关键词"}),e.jsx(Qe,{id:"keywordFilter",value:f,onChange:d=>h(d.target.value),placeholder:"按关键词过滤",className:"h-9"})]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx("input",{type:"checkbox",checked:C,onChange:d=>_(d.target.checked)}),"自动滚动"]})]}),L?e.jsx("div",{className:"mb-3 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:L}):null,i?e.jsx("div",{className:"mb-3 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-800 dark:border-amber-900 dark:bg-amber-950/20 dark:text-amber-200",children:i}):null,e.jsx(J,{variant:"bordered",className:"flex-1 min-h-[420px] overflow-hidden",children:e.jsx(Z,{className:"h-full p-0",children:e.jsx("div",{className:"h-full overflow-auto font-mono text-sm bg-background",children:P.length===0?e.jsx("div",{className:"p-6 text-muted-foreground text-center",children:"暂无日志"}):e.jsxs("div",{className:"p-4 space-y-1 min-w-max",children:[P.map((d,j)=>e.jsxs("div",{className:"flex gap-2 hover:bg-muted px-2 py-0.5 rounded w-max min-w-full",children:[e.jsx("span",{className:"text-muted-foreground shrink-0 w-20",children:F(d.timestamp)}),e.jsxs("span",{className:ae("shrink-0 w-14 font-semibold",te(d.level)),children:["[",d.level.toUpperCase(),"]"]}),e.jsxs("span",{className:ae("shrink-0 w-20",l(d.source)),children:["[",d.source,"]"]}),e.jsx("span",{className:"text-foreground whitespace-pre",dangerouslySetInnerHTML:{__html:tF.toHtml(d.message)}})]},`${d.timestamp}-${j}`)),e.jsx("div",{ref:x})]})})})})]})}function oF(t){const{changes:n,onReset:s}=t;return e.jsxs(J,{variant:"bordered",className:"mb-6",children:[e.jsx(ce,{className:"pb-2",children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx(re,{children:"待应用变更"}),e.jsx(pe,{type:"button",variant:"ghost",size:"sm",onClick:s,disabled:n.length===0,children:"重置未保存"})]})}),e.jsx(Z,{children:n.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"没有未保存的变更。"}):e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-amber-700 dark:text-amber-300",children:"保存后需要重启运行时才能完全生效。"}),e.jsx("div",{className:"divide-y divide-border rounded-md border border-border",children:n.map(o=>e.jsxs("div",{className:"grid gap-1 px-3 py-2 text-sm sm:grid-cols-[180px_1fr]",children:[e.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:o.key}),e.jsxs("span",{className:"font-mono text-xs text-foreground break-all",children:[o.from||"∅"," → ",o.to||"∅"]})]},o.key))})]})})]})}function ze(t){const{id:n,label:s,configured:o,value:c,onChange:r,placeholder:u,helper:p}=t;return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(Pe,{htmlFor:n,children:s}),e.jsxs("span",{className:ae("inline-flex items-center gap-1.5 rounded-md border px-2 py-1 text-xs",o?"border-green-200 text-green-700 dark:border-green-900 dark:text-green-300":"border-border text-muted-foreground"),children:[e.jsx(zn,{className:"h-3.5 w-3.5"}),o?"已配置":"未配置"]})]}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx(Qe,{id:n,type:"password",autoComplete:"new-password",value:c,onChange:f=>r(f.target.value),placeholder:u??"填写新 secret","aria-describedby":p?`${n}-helper`:void 0}),c?e.jsx(pe,{type:"button",variant:"ghost",onClick:()=>r(""),className:"shrink-0",children:"清除替换值"}):null]}),p?e.jsx("p",{id:`${n}-helper`,className:"text-xs text-muted-foreground",children:p}):null]})}const $t=["XPOD_DEPLOY_MODE","CSS_ROOT_FILE_PATH","CSS_BASE_URL","XPOD_TUNNEL_PROVIDER","XPOD_TUNNEL_ACTIVE_PROFILE_ID","XPOD_TUNNEL_PROFILES","XPOD_TUNNEL_PUBLIC_URL","CLOUDFLARE_TUNNEL_URL","SAKURA_TUNNEL_URL","CLOUDFLARE_TUNNEL_TOKEN","SAKURA_TUNNEL_TOKEN","NGROK_AUTHTOKEN","NGROK_URL","FRP_TUNNEL_TOKEN","FRP_TUNNEL_URL","XPOD_HTTPS_MODE","XPOD_HTTPS_CERT_PATH","XPOD_HTTPS_KEY_PATH","XPOD_CLOUD_API_ENDPOINT","XPOD_NODE_ID","XPOD_SP_DOMAIN","XPOD_NODE_TOKEN","XPOD_SERVICE_TOKEN","CSS_PORT","CSS_SPARQL_ENDPOINT","CSS_IDENTITY_DB_URL","CSS_LOGGING_LEVEL","CSS_SHOW_STACK_TRACE"],cF=new Set(["CLOUDFLARE_TUNNEL_TOKEN","SAKURA_TUNNEL_TOKEN","NGROK_AUTHTOKEN","FRP_TUNNEL_TOKEN","XPOD_NODE_TOKEN","XPOD_SERVICE_TOKEN","CSS_IDENTITY_DB_URL"]),lt={ngrok:{publicEndpointKey:"NGROK_URL",publicEndpointLabel:"ngrok 固定入口 URL",publicEndpointPlaceholder:"https://example.ngrok-free.dev",credentialKey:"NGROK_AUTHTOKEN",credentialLabel:"ngrok authtoken"},cloudflare:{publicEndpointKey:"CLOUDFLARE_TUNNEL_URL",publicEndpointLabel:"Cloudflare Tunnel 公开入口",publicEndpointPlaceholder:"https://example.trycloudflare.com",credentialKey:"CLOUDFLARE_TUNNEL_TOKEN",credentialLabel:"Cloudflare Tunnel Token"},sakura_frp:{publicEndpointKey:"SAKURA_TUNNEL_URL",publicEndpointLabel:"Sakura FRP 公开入口 URL",publicEndpointPlaceholder:"https://example.example.com",credentialKey:"SAKURA_TUNNEL_TOKEN",credentialLabel:"Sakura FRP Token"},frp:{publicEndpointKey:"FRP_TUNNEL_URL",publicEndpointLabel:"FRP 公开入口 URL",publicEndpointPlaceholder:"https://example.example.com",credentialKey:"FRP_TUNNEL_TOKEN",credentialLabel:"FRP Token"}};function rF(t){return t==="none"?null:lt[t]}const aF=["ngrok","cloudflare","sakura_frp","frp"];function bt(t){return t==="ngrok"||t==="cloudflare"||t==="sakura_frp"||t==="frp"?t:t==="sakura-frp"?"sakura_frp":"none"}function Ft(t){switch(t){case"ngrok":return"ngrok";case"cloudflare":return"Cloudflare";case"sakura_frp":return"Sakura FRP";case"frp":return"FRP"}}function lF(t,n){const s=[],o=new Set;for(const c of iF(t.XPOD_TUNNEL_PROFILES)){const r=lt[c.provider],u=c.credentialEnvKey||r.credentialKey,p=c.publicUrl||Ht(t,c.provider,r),f=n(u);s.push({id:c.id,provider:c.provider,label:c.label||Ft(c.provider),publicEndpointUrl:p,credentialConfigured:f,configured:!0,...r,credentialKey:u}),o.add(c.id)}for(const c of aF){if(o.has(c))continue;const r=lt[c],u=Ht(t,c,r),p=n(r.credentialKey);s.push({id:c,provider:c,label:Ft(c),publicEndpointUrl:u,credentialConfigured:p,configured:!!(u||p||bt(t.XPOD_TUNNEL_PROVIDER)===c),...r})}return s}function iF(t){if(!t?.trim())return[];try{const n=JSON.parse(t);return Array.isArray(n)?n.flatMap(s=>{if(!s||typeof s!="object"||Array.isArray(s))return[];const o=s,c=typeof o.id=="string"&&o.id.trim()?o.id.trim():"",r=bt(typeof o.provider=="string"?o.provider:void 0);return!c||r==="none"?[]:[{id:c,provider:r,label:typeof o.label=="string"?o.label:void 0,publicUrl:typeof o.publicUrl=="string"?o.publicUrl:void 0,credentialEnvKey:typeof o.credentialEnvKey=="string"?o.credentialEnvKey:void 0}]}):[]}catch{return[]}}function Ht(t,n,s){const o=(n==="cloudflare"||n==="sakura_frp")&&t.XPOD_TUNNEL_PUBLIC_URL||"";return t[s.publicEndpointKey]||o||""}function Bt(t){const n=t.filter(s=>s.configured).map(s=>({id:s.id,provider:s.provider,label:s.label,publicUrl:s.publicEndpointUrl,credentialEnvKey:s.credentialKey}));return n.length>0?JSON.stringify(n):""}function dF(t,n,s){const o=t.XPOD_TUNNEL_ACTIVE_PROFILE_ID?.trim();return o||(n!=="none"?n:s.find(c=>c.configured)?.id??"none")}function Vt(t){return cF.has(t)}function Kt(t,n,s){return{...t,[n]:s}}function Se(t){return e.jsxs("div",{className:"space-y-2",children:[e.jsx(Pe,{htmlFor:t.id,children:t.label}),e.jsx(Qe,{id:t.id,value:t.value,onChange:n=>t.onChange(n.target.value),placeholder:t.placeholder,readOnly:t.readOnly,"aria-readonly":t.readOnly||void 0}),t.helper?e.jsx("p",{className:"text-xs text-muted-foreground",children:t.helper}):null]})}function CF(){const t=Yt(),[n,s]=a.useState({}),[o,c]=a.useState({}),[r,u]=a.useState({}),[p,f]=a.useState({}),[h,y]=a.useState(null),[N,C]=a.useState(null),[_,L]=a.useState(!0),[T,g]=a.useState(!1),[b,S]=a.useState(!1),[v,x]=a.useState(""),[M,P]=a.useState(!1),k=n.XPOD_DEPLOY_MODE==="standalone"?"standalone":"local",U=bt(n.XPOD_TUNNEL_PROVIDER),I=["none","acme","manual"].includes(n.XPOD_HTTPS_MODE)?n.XPOD_HTTPS_MODE:"none",F=h?.status??"unknown",te=k==="local",l=!!n.XPOD_CLOUD_API_ENDPOINT,i=te&&l,d=N?.baseUrl||n.CSS_BASE_URL||(N?.fqdn?`https://${N.fqdn}/`:""),j=a.useCallback(async()=>{try{const m=await _n();C(m)}catch(m){console.error("Failed to load ddns status:",m),C(null)}},[]),E=a.useCallback(async()=>{try{const m=await Tn(),q={...m?.env??{}};s(q),c(q),u({}),f(m?.secrets??{})}catch(m){console.error("Failed to load config:",m)}finally{L(!1)}},[]),w=a.useCallback(async m=>{S(!0);try{const q=await Ln(m);y(q)}catch(q){console.error("Failed to refresh public ip check:",q),y(null)}finally{S(!1)}},[]);a.useEffect(()=>{let m=!0;return Promise.resolve().then(()=>{m&&E()}),()=>{m=!1}},[E]),a.useEffect(()=>{if(_)return;let m=!0;return Promise.resolve().then(()=>{m&&w(i?d:n.CSS_BASE_URL)}),()=>{m=!1}},[n.CSS_BASE_URL,i,d,k,_,w]),a.useEffect(()=>{if(_)return;let m=!0;return i?Promise.resolve().then(()=>{m&&j()}):Promise.resolve().then(()=>{m&&C(null)}),()=>{m=!1}},[i,j,_]);const A=(m,q)=>{s(ee=>Kt(ee,m,q))},X=(m,q)=>{u(ee=>Kt(ee,m,q))},O=a.useCallback(m=>!!p[m]?.configured,[p]),H=a.useCallback(m=>O(m)||!!r[m],[O,r]),K=a.useMemo(()=>lF(n,H),[n,H]),ie=dF(n,U,K),Q=K.find(m=>m.id===ie),oe=Q?.provider??"none",ne=rF(oe),he=m=>{const q=K.find(ee=>ee.id===m);s(ee=>({...ee,XPOD_TUNNEL_ACTIVE_PROFILE_ID:q?q.id:"",XPOD_TUNNEL_PROVIDER:q?.provider??"none"}))},D=(m,q)=>{const ee=K.map(_e=>_e.id===m.id?{..._e,publicEndpointUrl:q,configured:!0}:_e);s(_e=>({..._e,[m.publicEndpointKey]:q,XPOD_TUNNEL_PROFILES:Bt(ee)}))},B=a.useMemo(()=>{if(ne){if(!(Q?.publicEndpointUrl||"").trim())return`请填写 ${ne.publicEndpointLabel}`;if(!H(ne.credentialKey))return`请填写 ${ne.credentialLabel}`}if(i&&N?.mode==="tunnel"&&oe==="none")return"当前网络不可直连,必须启用一个隧道供应商。";const q=(n.CSS_BASE_URL||"").trim().startsWith("https://");return!i&&q&&oe==="none"&&I==="none"?"独立部署使用 https:// Base URL 时,需要配置 HTTPS 或启用隧道。":""},[Q?.publicEndpointUrl,oe,N?.mode,n.CSS_BASE_URL,I,i,ne,H]),se=a.useMemo(()=>{const m=[];for(const q of $t){const ee=n[q],_e=o[q];if(Vt(q)){r[q]&&m.push({key:q,from:O(q)?"[configured]":"",to:"[replace]"});continue}(ee??"")!==(_e??"")&&m.push({key:q,from:_e??"",to:ee??""})}return m},[n,o,O,r]),z=async()=>{if(B)return x(B),!1;g(!0),x("");try{const m={};for(const ee of $t)Vt(ee)?r[ee]&&(m[ee]=r[ee]):ee in n&&(m[ee]=n[ee]);m.XPOD_TUNNEL_ACTIVE_PROFILE_ID=oe==="none"?"":ie,m.XPOD_TUNNEL_PROVIDER=oe,m.XPOD_TUNNEL_PROFILES=Bt(K);const q=await Rn(m);return q?(x("配置已保存,需要重启服务生效"),await E()):x("保存失败"),!!q}catch{return x("保存失败"),!1}finally{g(!1)}},W=async()=>{if(t&&!t.restartCapability.supported){x("当前入口不支持重启操作。请在本机或携带管理 Token 操作。");return}x("正在重启服务..."),await Pn()?(x("重启信号已发送,请稍候..."),setTimeout(()=>window.location.reload(),3e3)):x("重启失败。远程访问时默认禁止重启,请在本机或携带管理 Token 操作。")},V=async()=>{if(t&&!t.configurationWriteCapability.supported){x("当前入口不支持保存运行时配置。请在本机或携带管理 Token 操作。");return}await z()&&await W()},R=()=>{s(o),u({}),x("未保存变更已重置")},me=a.useMemo(()=>b?"检测中...":F==="pass"?"可直连":F==="fail"?"不可直连":"未知",[b,F]);return _?e.jsxs("div",{className:"p-4 sm:p-8 max-w-4xl space-y-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"type-h1",children:"设置"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"正在读取运行时配置。"})]}),e.jsx(J,{variant:"bordered",children:e.jsxs(Z,{className:"space-y-3 pt-5",children:[e.jsx("div",{className:"h-4 w-40 rounded bg-muted"}),e.jsx("div",{className:"h-10 rounded bg-muted"}),e.jsx("div",{className:"h-10 rounded bg-muted"})]})})]}):e.jsxs("div",{className:"p-4 sm:p-8 max-w-4xl",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"type-h1",children:"设置"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"高级运行时设置。大多数用户应在 LinX 中完成配置。"})]}),e.jsx("div",{className:"mb-6 rounded-xl border border-amber-200 bg-amber-50/70 p-4 text-sm text-amber-900 dark:border-amber-900 dark:bg-amber-950/20 dark:text-amber-200",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx(pt,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:"高级运行时设置"}),e.jsx("p",{className:"mt-1",children:"这里修改的是本地 Xpod 运行时,不是用户 Pod 资料,也不是 Cloud IDP 账号设置。"})]})]})}),e.jsxs(J,{variant:"bordered",className:"mb-6",children:[e.jsx(ce,{children:e.jsx(re,{children:"运行时"})}),e.jsxs(Z,{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Pe,{children:"部署模式"}),e.jsxs(De,{value:k,onValueChange:m=>A("XPOD_DEPLOY_MODE",m),children:[e.jsx(Te,{children:e.jsx(ke,{})}),e.jsxs(Le,{children:[e.jsx(Y,{value:"local",children:"边缘部署"}),e.jsx(Y,{value:"standalone",children:"独立部署"})]})]})]}),e.jsx(Se,{id:"storageRoot",label:"存储目录",value:n.CSS_ROOT_FILE_PATH||"./data",onChange:m=>A("CSS_ROOT_FILE_PATH",m)})]}),e.jsx(Se,{id:"baseUrl",label:"资料入口 URL",value:i?d:n.CSS_BASE_URL||"http://127.0.0.1:3000",onChange:m=>A("CSS_BASE_URL",m),readOnly:i,helper:i?"托管模式下由 Cloud 分配稳定域名,本地只上报状态和隧道入口。":"独立部署需要保证该 URL 可被目标客户端访问。"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:k==="local"?"边缘部署:Cloud IDP 和稳定域名在云端,数据/SP 保留在本地。":"独立部署:域名、身份认证和证书都由本机或用户自管。"})]})]}),e.jsxs(J,{variant:"bordered",className:"mb-6",children:[e.jsx(ce,{className:"pb-2",children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx(re,{children:"网络访问"}),e.jsxs("span",{className:"text-sm",children:["外网: ",e.jsx("span",{className:ae(F==="pass"?"text-green-700 dark:text-green-300":F==="fail"?"text-destructive":"text-muted-foreground"),children:me})]})]})}),e.jsxs(Z,{className:"space-y-4",children:[i&&N?.mode==="tunnel"&&oe==="none"?e.jsx("div",{className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:"当前网络不可直连,请启用一个隧道供应商。"}):null,e.jsxs("div",{className:"space-y-2",children:[e.jsx(Pe,{children:"当前生效"}),e.jsxs(De,{value:ie,onValueChange:he,children:[e.jsx(Te,{children:e.jsx(ke,{})}),e.jsxs(Le,{children:[e.jsx(Y,{value:"none",children:"不使用隧道"}),K.map(m=>e.jsx(Y,{value:m.id,children:m.label},m.id))]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"可以记录多个隧道配置,但同一时间只启用当前选择的一个。公网、局域网、本机和 P2P 由状态页判断最优接入。"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm font-medium",children:"已记录隧道"}),e.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:K.map(m=>{const q=m.id===ie;return e.jsxs("div",{className:ae("rounded-xl border p-3",q?"border-primary bg-primary/5":"border-border"),children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:m.label}),e.jsx(pe,{type:"button",variant:q?"secondary":"ghost",size:"sm",onClick:()=>he(m.id),disabled:q,children:q?"当前生效":"设为当前"})]}),e.jsx("div",{className:"mt-2 break-all font-mono text-xs text-muted-foreground",children:m.publicEndpointUrl||"未配置入口"}),e.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:m.credentialConfigured?"密钥已配置":"未配置密钥"})]},m.id)})})]}),Q&&ne?e.jsxs("div",{className:"space-y-4 rounded-xl border border-border p-4",children:[e.jsx("div",{className:"text-sm font-medium",children:"编辑当前隧道"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"隧道入口 URL"}),e.jsx(Se,{id:"tunnelPublicEndpoint",label:ne.publicEndpointLabel,value:Q.publicEndpointUrl,onChange:m=>D(Q,m),placeholder:ne.publicEndpointPlaceholder,helper:"这是实际数据面入口,不替代上方的稳定资料 URL。"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"访问密钥"}),e.jsx(ze,{id:"tunnelCredential",label:ne.credentialLabel,configured:O(ne.credentialKey),value:r[ne.credentialKey]||"",onChange:m=>X(ne.credentialKey,m)})]})]}):e.jsx("div",{className:"rounded-md border border-border bg-muted/30 px-3 py-2 text-sm text-muted-foreground",children:"不使用隧道时,不填写隧道入口 URL 或访问密钥。"})]})]}),e.jsxs(J,{variant:"bordered",className:"mb-6",children:[e.jsx(ce,{children:e.jsx(re,{children:"Cloud 协调"})}),e.jsxs(Z,{className:"space-y-4",children:[e.jsx(Se,{id:"cloudEndpoint",label:"Cloud API endpoint",value:n.XPOD_CLOUD_API_ENDPOINT||"",onChange:m=>A("XPOD_CLOUD_API_ENDPOINT",m)}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(Se,{id:"nodeId",label:"nodeId",value:n.XPOD_NODE_ID||"",onChange:m=>A("XPOD_NODE_ID",m)}),e.jsx(Se,{id:"spDomain",label:"spDomain",value:n.XPOD_SP_DOMAIN||"",onChange:m=>A("XPOD_SP_DOMAIN",m)})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(ze,{id:"nodeToken",label:"Node token",configured:O("XPOD_NODE_TOKEN"),value:r.XPOD_NODE_TOKEN||"",onChange:m=>X("XPOD_NODE_TOKEN",m)}),e.jsx(ze,{id:"serviceToken",label:"Service token",configured:O("XPOD_SERVICE_TOKEN"),value:r.XPOD_SERVICE_TOKEN||"",onChange:m=>X("XPOD_SERVICE_TOKEN",m)})]})]})]}),k==="standalone"?e.jsxs(J,{variant:"bordered",className:"mb-6",children:[e.jsx(ce,{children:e.jsx(re,{children:"HTTPS"})}),e.jsxs(Z,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Pe,{children:"HTTPS 模式"}),e.jsxs(De,{value:I,onValueChange:m=>A("XPOD_HTTPS_MODE",m),children:[e.jsx(Te,{children:e.jsx(ke,{})}),e.jsxs(Le,{children:[e.jsx(Y,{value:"none",children:"关闭"}),e.jsx(Y,{value:"acme",children:"自动申请 ACME"}),e.jsx(Y,{value:"manual",children:"手动证书"})]})]})]}),I==="manual"?e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(Se,{id:"certPath",label:"证书路径",value:n.XPOD_HTTPS_CERT_PATH||"",onChange:m=>A("XPOD_HTTPS_CERT_PATH",m)}),e.jsx(Se,{id:"keyPath",label:"私钥路径",value:n.XPOD_HTTPS_KEY_PATH||"",onChange:m=>A("XPOD_HTTPS_KEY_PATH",m)})]}):null]})]}):null,e.jsx("div",{className:"mb-6",children:e.jsx(pe,{variant:"ghost",size:"sm",onClick:()=>P(m=>!m),children:M?"收起高级设置":"展开高级设置"})}),M?e.jsxs(J,{variant:"bordered",className:"mb-6",children:[e.jsx(ce,{children:e.jsx(re,{children:"高级设置"})}),e.jsxs(Z,{className:"space-y-4",children:[e.jsx(Se,{id:"cssPort",label:"端口",value:n.CSS_PORT||"3000",onChange:m=>A("CSS_PORT",m)}),e.jsx(Se,{id:"sparqlEndpoint",label:"SPARQL 存储",value:n.CSS_SPARQL_ENDPOINT||"",onChange:m=>A("CSS_SPARQL_ENDPOINT",m)}),e.jsx(ze,{id:"identityDb",label:"身份数据库 URL",configured:O("CSS_IDENTITY_DB_URL"),value:r.CSS_IDENTITY_DB_URL||"",onChange:m=>X("CSS_IDENTITY_DB_URL",m)}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Pe,{children:"日志级别"}),e.jsxs(De,{value:n.CSS_LOGGING_LEVEL||"info",onValueChange:m=>A("CSS_LOGGING_LEVEL",m),children:[e.jsx(Te,{className:"w-40",children:e.jsx(ke,{})}),e.jsxs(Le,{children:[e.jsx(Y,{value:"error",children:"error"}),e.jsx(Y,{value:"warn",children:"warn"}),e.jsx(Y,{value:"info",children:"info"}),e.jsx(Y,{value:"debug",children:"debug"})]})]})]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm text-foreground",children:[e.jsx("input",{type:"checkbox",id:"showStackTrace",checked:n.CSS_SHOW_STACK_TRACE==="true",onChange:m=>A("CSS_SHOW_STACK_TRACE",m.target.checked?"true":"false"),className:"rounded border-input"}),"显示错误堆栈"]})]})]}):null,e.jsx(oF,{changes:se,onReset:R}),t&&!t.configurationWriteCapability.supported?e.jsxs("div",{className:"rounded-md border border-border bg-muted/40 px-3 py-2 text-sm text-muted-foreground",children:["Configuration changes are not supported from this host capability",t.configurationWriteCapability.reason?`: ${t.configurationWriteCapability.reason}`:"","."]}):e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx(pe,{onClick:()=>{z()},disabled:T||!!B,children:T?"保存中...":"保存配置"}),t&&!t.restartCapability.supported?null:e.jsx(pe,{variant:"secondary",onClick:()=>{V()},disabled:T||!!B,children:"保存并重启"})]}),v||B?e.jsx("div",{className:ae("mt-4 rounded-md border px-3 py-2 text-sm",B||v&&v.includes("失败")?"border-destructive/30 bg-destructive/10 text-destructive":"border-green-200 bg-green-50 text-green-800 dark:border-green-900 dark:bg-green-950/20 dark:text-green-200"),children:v||B}):null]})}export{yF as AdminLayout,wF as LogsPage,vF as RdfPage,CF as SettingsPage,jF as StatusPage};
|