zdashboard 2.6.2 → 2.7.0

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.
Files changed (30) hide show
  1. package/dist/cli.js +728 -284
  2. package/dist/cli.js.map +1 -1
  3. package/dist/web/assets/ApprovalPanel-CXQRioSw.js +1 -0
  4. package/dist/web/assets/BatchDashboard-BigPUG8g.js +2 -0
  5. package/dist/web/assets/CheckpointViewer-DBmTkC_E.js +1 -0
  6. package/dist/web/assets/ConfigField-BqjVlteZ.js +1 -0
  7. package/dist/web/assets/DependencyGraph-DPVneSQh.js +1 -0
  8. package/dist/web/assets/{FileIcon-Bc03q6Gz.js → FileIcon-tDB2mYGC.js} +1 -1
  9. package/dist/web/assets/{FilterPills-CSZQenbh.js → FilterPills-CvO0pz85.js} +1 -1
  10. package/dist/web/assets/{ProgressBar-ycyJBwG-.js → ProgressBar-DIoIeYBA.js} +1 -1
  11. package/dist/web/assets/{Workspace-jCfxaTOM.js → Workspace-B2nKQnQf.js} +1 -1
  12. package/dist/web/assets/{badge-DUO7nDks.js → badge-CmIMTBDj.js} +1 -1
  13. package/dist/web/assets/index-BHL7sr_b.css +1 -0
  14. package/dist/web/assets/{index-BrvOKJRF.js → index-CtlFZEcM.js} +1 -1
  15. package/dist/web/assets/{index-Co_rMXPa.js → index-yx7txO50.js} +1565 -1565
  16. package/dist/web/assets/web-BBv8hkwo.js +1 -0
  17. package/dist/web/assets/{web-Bt0s1qFE.js → web-BX2cajm6.js} +1 -1
  18. package/dist/web/assets/web-BpBEbcYZ.js +1 -0
  19. package/dist/web/assets/web-CGbbhItO.js +2 -0
  20. package/dist/web/assets/web-CcDed_yx.js +1 -0
  21. package/dist/web/assets/{web-CCoznDNk.js → web-DsIjKVnn.js} +1 -1
  22. package/dist/web/assets/web-Eo4S0U_k.js +2 -0
  23. package/dist/web/favicon.svg +13 -5
  24. package/dist/web/index.html +2 -2
  25. package/package.json +1 -1
  26. package/dist/web/assets/index-4aiRmNbP.css +0 -1
  27. package/dist/web/assets/web-BKh2HY35.js +0 -2
  28. package/dist/web/assets/web-BrsVNrGk.js +0 -1
  29. package/dist/web/assets/web-DxK2pSVl.js +0 -1
  30. package/dist/web/assets/web-ShIDOvFD.js +0 -1
@@ -0,0 +1 @@
1
+ import{u as k,j as t,r as o,E as K,_ as q}from"./index-yx7txO50.js";import{C as G,M as Q,I as T,F as X}from"./FileIcon-tDB2mYGC.js";import{u as Y,C as F}from"./ConfigField-BqjVlteZ.js";import"./index-CtlFZEcM.js";function Z({path:e}){const{icon:s}=k();return t.jsx("div",{className:"grid place-items-center h-full text-center text-muted-foreground",children:t.jsxs("div",{children:[s("file-question","h-10 w-10 mx-auto mb-3 opacity-50"),t.jsx("p",{children:"该格式无法预览"}),t.jsx("p",{className:"mt-1 font-mono text-xs break-all",children:e})]})})}let U=null;const V=new Set,E={get:()=>U,set:e=>{U=e,V.forEach(s=>s(e))},subscribe:e=>(V.add(e),()=>{V.delete(e)})};function ee({containerRef:e}){const{icon:s}=k(),[n,m]=o.useState([]),[p,i]=o.useState(null);o.useEffect(()=>{const u=e.current;if(!u)return;let c=!1;const l=()=>{if(c)return;const d=u.querySelectorAll("h1[id], h2[id], h3[id]"),x=[];d.forEach(b=>{var v;x.push({id:b.id,text:((v=b.textContent)==null?void 0:v.trim())??"",level:parseInt(b.tagName[1],10)})}),m(x)};l();const r=new MutationObserver(l);return r.observe(u,{childList:!0,subtree:!0,characterData:!0}),()=>{c=!0,r.disconnect()}},[e]),o.useEffect(()=>{const u=e.current;if(!u||!n.length)return;const c=new IntersectionObserver(l=>{const r=l.filter(d=>d.isIntersecting);if(r.length){const d=r.reduce((x,b)=>x.boundingClientRect.top<b.boundingClientRect.top?x:b);i(d.target.id)}},{root:u,rootMargin:"-60px 0px -70% 0px",threshold:0});return n.forEach(({id:l})=>{const r=u.querySelector(`#${CSS.escape(l)}`);r&&c.observe(r)}),()=>c.disconnect()},[n,e]);const f=u=>{var l;const c=(l=e.current)==null?void 0:l.querySelector(`#${CSS.escape(u)}`);c==null||c.scrollIntoView({behavior:"smooth",block:"start"})};return n.length?t.jsxs("nav",{className:"hidden md:flex w-44 shrink-0 flex-col border-l pl-3 py-2 overflow-y-auto","aria-label":"文档大纲",children:[t.jsxs("div",{className:"flex items-center gap-1 mb-2 text-sm font-medium text-muted-foreground uppercase tracking-wider",children:[s("file-text","h-3 w-3"),t.jsx("span",{children:"大纲"})]}),t.jsx("ul",{className:"space-y-0.5",children:n.map(u=>t.jsx("li",{children:t.jsx("button",{type:"button",onClick:()=>f(u.id),className:`w-full text-left text-sm leading-snug py-0.5 px-1.5 rounded truncate transition-colors ${p===u.id?"bg-primary/10 text-foreground font-medium":"text-muted-foreground hover:bg-muted/70"}`,style:{paddingLeft:6+(u.level-1)*10},children:u.text||u.id})},u.id))})]}):null}const te=2500;function ne(e){const s=e.slice(e.lastIndexOf("/")+1).toLowerCase();if(s==="justfile"||s==="makefile")return G;const n=e.slice(e.lastIndexOf(".")).toLowerCase();return n===".md"||n===".markdown"?Q:[".svg",".png",".jpg",".jpeg",".gif",".webp",".ico"].includes(n)?T:[".sql",".txt",".csv",".tsv",".json",".yaml",".yml",".xml",".py",".js",".ts",".java",".go",".rs",".rb",".php",".c",".cpp",".h",".cs",".swift",".kt",".scala",".sh",".bash",".zsh",".fish",".env",".gitignore",".dockerfile"].includes(n)?G:Z}function re(e){const{icon:s}=k(),[n,m]=o.useState(()=>E.get()),[p,i]=o.useState(!1),f=o.useRef(null),u=n?ne(n):null;return o.useEffect(()=>E.subscribe(m),[]),o.useEffect(()=>{const c=f.current;if(!c)return;const l=()=>{var x;const d=((x=c.textContent)==null?void 0:x.length)??0;i(d>te)};l();const r=new MutationObserver(l);return r.observe(c,{childList:!0,subtree:!0,characterData:!0}),()=>r.disconnect()},[n]),t.jsx("div",{className:"mx-auto h-full max-w-5xl bg-background border rounded-lg shadow-sm overflow-hidden flex flex-col",children:n&&u?t.jsxs("div",{className:"flex-1 min-h-0 flex overflow-hidden",children:[t.jsx("div",{ref:f,className:"flex-1 min-h-0 overflow-auto",children:t.jsx(u,{path:n})}),p&&t.jsx(ee,{containerRef:f})]}):t.jsx(K,{icon:s("eye","h-6 w-6"),title:"从左侧选择文件预览",hint:"支持 Markdown、图片、代码等格式",tone:"primary"})})}const se=Object.freeze(Object.defineProperty({__proto__:null,default:re},Symbol.toStringTag,{value:"Module"}));function oe(e,s,n,m){var p=this,i=o.useRef(null),f=o.useRef(0),u=o.useRef(0),c=o.useRef(null),l=o.useRef([]),r=o.useRef(),d=o.useRef(),x=o.useRef(e),b=o.useRef(!0),v=o.useRef(),y=o.useRef();x.current=e;var a=typeof window<"u",j=!s&&s!==0&&a;if(typeof e!="function")throw new TypeError("Expected a function");s=+s||0;var I=!!(n=n||{}).leading,R=!("trailing"in n)||!!n.trailing,C=!!n.flushOnExit&&R,S="maxWait"in n,A="debounceOnServer"in n&&!!n.debounceOnServer,M=S?Math.max(+n.maxWait||0,s):null,P=o.useMemo(function(){var w=function(h){var g=l.current,N=r.current;return l.current=r.current=null,f.current=h,u.current=u.current||h,d.current=x.current.apply(N,g)},_=function(h,g){j&&cancelAnimationFrame(c.current),c.current=j?requestAnimationFrame(h):setTimeout(h,g)},z=function(h){if(!b.current)return!1;var g=h-i.current;return!i.current||g>=s||g<0||S&&h-f.current>=M},H=function(h){return c.current=null,R&&l.current?w(h):(l.current=r.current=null,d.current)},$=function h(){var g=Date.now();if(I&&u.current===f.current&&J(),z(g))return H(g);if(b.current){var N=s-(g-i.current),L=S?Math.min(N,M-(g-f.current)):N;_(h,L)}},J=function(){m&&m({})},O=function(){if(a||A){var h,g=Date.now(),N=z(g);if(l.current=[].slice.call(arguments),r.current=p,i.current=g,C&&!v.current&&(v.current=function(){var L;((L=globalThis.document)==null?void 0:L.visibilityState)==="hidden"&&y.current.flush()},(h=globalThis.document)==null||h.addEventListener==null||h.addEventListener("visibilitychange",v.current)),N){if(!c.current&&b.current)return f.current=i.current,_($,s),I?w(i.current):d.current;if(S)return _($,s),w(i.current)}return c.current||_($,s),d.current}};return O.cancel=function(){var h=c.current;h&&(j?cancelAnimationFrame(c.current):clearTimeout(c.current)),f.current=0,l.current=i.current=r.current=c.current=null,h&&m&&m({})},O.isPending=function(){return!!c.current},O.flush=function(){return c.current?H(Date.now()):d.current},O},[I,S,s,M,R,C,j,a,A,m]);return y.current=P,o.useEffect(function(){return b.current=!0,function(){var w;C&&y.current.flush(),v.current&&((w=globalThis.document)==null||w.removeEventListener==null||w.removeEventListener("visibilitychange",v.current),v.current=null),b.current=!1}},[C]),P}function ie(e,s){return e===s}function ce(e,s,n){var m=ie,p=o.useRef(e),i=o.useState({})[1],f=oe(o.useCallback(function(c){p.current=c,i({})},[i]),s,n,i),u=o.useRef(e);return m(u.current,e)||(f(e),u.current=e),[p.current,f]}const D={hiddenDirs:{type:"string[]",label:"隐藏目录",default:[".git","node_modules","dist","build"]},defaultExpandDepth:{type:"number",label:"默认展开深度",default:2},showHidden:{type:"boolean",label:"显示隐藏文件",default:!1}};function W(e,s){return!s||e.name.toLowerCase().includes(s)?!0:(e.children??[]).some(n=>W(n,s))}function B({node:e,depth:s,filter:n,current:m,onSelectFile:p}){const i=(e.children??[]).filter(r=>W(r,n)),[f,u]=o.useState(!e.defaultCollapsed),c=n?!0:f;if(!i.length&&n)return null;const{icon:l}=k();return t.jsxs("div",{children:[(()=>{const r=e.name.match(/^([a-z]+)(?: \((\d+)\))?$/),d=r?l(r[1]):void 0;return t.jsxs("button",{onClick:()=>u(x=>!x),className:"w-full flex items-center gap-1.5 px-2 py-1 text-sm text-foreground hover:bg-muted rounded-md mx-1",style:{paddingLeft:8+s*14,width:"calc(100% - 8px)"},children:[t.jsx("span",{className:`h-3 w-3 shrink-0 inline-flex items-center justify-center text-muted-foreground transition-transform ${c?"rotate-90":""}`,children:l("chevron-right")}),d?t.jsx("span",{className:"h-3.5 w-3.5 shrink-0 inline-flex items-center justify-center text-muted-foreground",children:d}):t.jsx("span",{className:"h-3.5 w-3.5 shrink-0 inline-flex items-center justify-center text-muted-foreground transition-colors",children:l(c?"folder-open":"folder")}),t.jsx("span",{className:"font-medium truncate",children:r?r[1]:e.name}),(r==null?void 0:r[2])&&t.jsx("span",{className:"ml-auto mr-1 shrink-0 rounded-full bg-muted px-1.5 text-xs font-mono text-muted-foreground",children:r[2]})]})})(),c&&i.map(r=>r.kind==="dir"?t.jsx(B,{node:r,depth:s+1,filter:n,current:m,onSelectFile:p},r.name+s):t.jsxs("button",{onClick:()=>r.path&&p(r.path),className:`w-full flex items-center gap-1.5 pr-2 py-1 text-sm hover:bg-muted rounded-md mx-1 ${m===r.path?"bg-primary/10 text-foreground font-medium":"text-muted-foreground"}`,style:{paddingLeft:20+s*14,width:"calc(100% - 8px)"},children:[t.jsx(X,{name:r.name,active:m===r.path}),t.jsx("span",{className:"truncate",children:r.name})]},r.path))]})}function ue({worktrees:e}){const[s,n]=o.useState(!0),{icon:m}=k(),p=i=>{window.dispatchEvent(new CustomEvent("zd-dashboard-nav",{detail:{mode:"apply",wt:i.name}}))};return t.jsxs("div",{className:"mb-1",children:[t.jsxs("button",{onClick:()=>n(i=>!i),className:"w-full flex items-center gap-1 px-2 py-1.5 text-sm font-medium text-muted-foreground tracking-wide hover:text-foreground",children:[t.jsx("span",{className:`h-3 w-3 inline-flex items-center justify-center transition-transform ${s?"rotate-90":""}`,children:m("chevron-right")}),t.jsx("span",{className:"h-3 w-3 inline-flex items-center justify-center",children:m("git-branch")}),t.jsxs("span",{children:["Worktrees (",e.length,")"]})]}),s&&e.map(i=>t.jsxs("button",{onClick:()=>p(i),title:`${i.branch}${i.dirty?" · 有未提交变更":""}`,className:"w-full flex items-center gap-1.5 px-2 py-1 text-sm text-foreground hover:bg-muted border-l-2 border-transparent",style:{paddingLeft:14},children:[t.jsx("span",{className:"truncate font-mono text-sm",children:i.branch}),t.jsxs("span",{className:"text-muted-foreground truncate",children:["/",i.name]}),i.dirty&&t.jsx("span",{className:"ml-auto flex-none h-2 w-2 rounded-full bg-destructive shrink-0",title:"有未提交变更"})]},i.name))]})}function le({navTarget:e}){const s=o.useSyncExternalStore(E.subscribe,E.get),[n,m]=o.useState(null),[p,i]=o.useState(""),[f]=ce(p,150),[u,c]=o.useState([]),[l,r]=o.useState(!1),{config:d,save:x,saving:b}=Y("view",D);o.useEffect(()=>{e!=null&&e.filter&&i(e.filter)},[e==null?void 0:e.filter,e==null?void 0:e.navToken]),o.useEffect(()=>{fetch("/__files",{cache:"no-store"}).then(a=>a.json()).then(a=>m(a.tree??[]))},[]),o.useEffect(()=>{fetch("/__worktrees",{cache:"no-store"}).then(a=>a.json()).then(c).catch(()=>c([]))},[]);const v=o.useMemo(()=>n?n.filter(a=>W(a,f)):[],[n,f]),y=u.length>0;return t.jsxs("div",{className:"p-2",children:[t.jsx("input",{value:p,onChange:a=>i(a.target.value.toLowerCase()),placeholder:"过滤…",className:"w-full h-7 px-2 text-xs rounded border border-border bg-background focus:outline-none focus:border-primary"}),n?!v.length&&!y?t.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"无匹配"}):t.jsxs("div",{className:"py-1",children:[y&&t.jsx(ue,{worktrees:u}),v.map(a=>t.jsx(B,{node:a,depth:0,filter:f,current:s,onSelectFile:j=>E.set(j)},a.name))]}):t.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"加载中…"}),t.jsxs("div",{className:"border-t border-border mt-2",children:[t.jsxs("button",{onClick:()=>r(a=>!a),className:"w-full flex items-center gap-1.5 px-3 py-2 text-xs font-medium text-muted-foreground hover:text-foreground",children:[t.jsx("span",{className:`h-3 w-3 shrink-0 inline-flex items-center justify-center transition-transform ${l?"rotate-90":""}`,children:k().icon("chevron-right")}),"⚙️ 配置"]}),l&&t.jsxs("div",{className:"px-3 pb-3 space-y-3",children:[t.jsx(F,{key_:"hiddenDirs",field:D.hiddenDirs,value:d.hiddenDirs,onChange:(a,j)=>x({...d,[a]:j})}),t.jsx(F,{key_:"defaultExpandDepth",field:D.defaultExpandDepth,value:d.defaultExpandDepth,onChange:(a,j)=>x({...d,[a]:j})}),t.jsx(F,{key_:"showHidden",field:D.showHidden,value:d.showHidden,onChange:(a,j)=>x({...d,[a]:j})}),t.jsx("div",{className:"text-xs text-muted-foreground",children:b?"保存中…":"配置已保存"})]})]})]})}const ae=Object.freeze(Object.defineProperty({__proto__:null,default:le},Symbol.toStringTag,{value:"Module"})),xe={mode:"view",label:"项目浏览",icon:"👁️",description:"openspec / docs / 文档预览",Sidebar:o.lazy(()=>q(()=>Promise.resolve().then(()=>ae),void 0)),Workspace:o.lazy(()=>q(()=>Promise.resolve().then(()=>se),void 0))};export{le as ViewSidebar,re as ViewWorkspace,xe as default};
@@ -1,4 +1,4 @@
1
- import{r as C,d as N,u as de,j as f,B as O,e as ge,_ as pe}from"./index-Co_rMXPa.js";import{F as me}from"./FilterPills-CSZQenbh.js";function g(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function $(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function De(t,e){const r=g(t);return isNaN(e)?$(t,NaN):(e&&r.setDate(r.getDate()+e),r)}function xe(t,e){const r=g(t);if(isNaN(e))return $(t,NaN);if(!e)return r;const s=r.getDate(),n=$(t,r.getTime());n.setMonth(r.getMonth()+e+1,0);const c=n.getDate();return s>=c?n:(r.setFullYear(n.getFullYear(),n.getMonth(),s),r)}function S(t,e){const{years:r=0,months:s=0,weeks:n=0,days:c=0,hours:i=0,minutes:o=0,seconds:l=0}=e,u=g(t),d=s||r?xe(u,s+r*12):u,a=c||n?De(d,c+n*7):d,p=o+i*60,m=(l+p*60)*1e3;return $(t,a.getTime()+m)}const Fe=864e5,be=6e4,ve=36e5;function V(t){const e=g(t);return e.setHours(0,0,0,0),e}function K(t){const e=g(t),r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),+t-+r}function ye(t,e){const r=V(t),s=V(e),n=+r-K(r),c=+s-K(s);return Math.round((n-c)/Fe)}function M(t,e){const r=g(t),s=g(e),n=r.getTime()-s.getTime();return n<0?-1:n>0?1:n}function Ee(t,e){const r=g(t),s=g(e),n=r.getFullYear()-s.getFullYear(),c=r.getMonth()-s.getMonth();return n*12+c}function Ce(t,e){const r=g(t),s=g(e);return r.getFullYear()-s.getFullYear()}function Ae(t,e){const r=g(t),s=g(e),n=Q(r,s),c=Math.abs(ye(r,s));r.setDate(r.getDate()-n*c);const i=+(Q(r,s)===-n),o=n*(c-i);return o===0?0:o}function Q(t,e){const r=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return r<0?-1:r>0?1:r}function W(t){return e=>{const s=(t?Math[t]:Math.trunc)(e);return s===0?0:s}}function J(t,e){return+g(t)-+g(e)}function je(t,e,r){const s=J(t,e)/ve;return W(r==null?void 0:r.roundingMethod)(s)}function ze(t,e,r){const s=J(t,e)/be;return W(r==null?void 0:r.roundingMethod)(s)}function we(t){const e=g(t);return e.setHours(23,59,59,999),e}function ke(t){const e=g(t),r=e.getMonth();return e.setFullYear(e.getFullYear(),r+1,0),e.setHours(23,59,59,999),e}function Ne(t){const e=g(t);return+we(e)==+ke(e)}function Re(t,e){const r=g(t),s=g(e),n=M(r,s),c=Math.abs(Ee(r,s));let i;if(c<1)i=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-n*c);let o=M(r,s)===-n;Ne(g(t))&&c===1&&M(t,s)===1&&(o=!1),i=n*(c-Number(o))}return i===0?0:i}function Oe(t,e,r){const s=J(t,e)/1e3;return W(r==null?void 0:r.roundingMethod)(s)}function Se(t,e){const r=g(t),s=g(e),n=M(r,s),c=Math.abs(Ce(r,s));r.setFullYear(1584),s.setFullYear(1584);const i=M(r,s)===-n,o=n*(c-+i);return o===0?0:o}function Me(t){const e=g(t.start),r=g(t.end),s={},n=Se(r,e);n&&(s.years=n);const c=S(e,{years:s.years}),i=Re(r,c);i&&(s.months=i);const o=S(c,{months:s.months}),l=Ae(r,o);l&&(s.days=l);const u=S(o,{days:s.days}),d=je(r,u);d&&(s.hours=d);const a=S(u,{hours:s.hours}),p=ze(r,a);p&&(s.minutes=p);const F=S(a,{minutes:s.minutes}),m=Oe(r,F);return m&&(s.seconds=m),s}var ae={};const w=[[{color:"0, 0, 0",class:"ansi-black"},{color:"187, 0, 0",class:"ansi-red"},{color:"0, 187, 0",class:"ansi-green"},{color:"187, 187, 0",class:"ansi-yellow"},{color:"0, 0, 187",class:"ansi-blue"},{color:"187, 0, 187",class:"ansi-magenta"},{color:"0, 187, 187",class:"ansi-cyan"},{color:"255,255,255",class:"ansi-white"}],[{color:"85, 85, 85",class:"ansi-bright-black"},{color:"255, 85, 85",class:"ansi-bright-red"},{color:"0, 255, 0",class:"ansi-bright-green"},{color:"255, 255, 85",class:"ansi-bright-yellow"},{color:"85, 85, 255",class:"ansi-bright-blue"},{color:"255, 85, 255",class:"ansi-bright-magenta"},{color:"85, 255, 255",class:"ansi-bright-cyan"},{color:"255, 255, 255",class:"ansi-bright-white"}]],$e=/(https?:\/\/(?:[A-Za-z0-9#;/?:@=+$',_.!~*()[\]-]|&amp;|%[A-Fa-f0-9]{2})+)/gm;class R{static escapeForHtml(e){return new R().escapeForHtml(e)}static linkify(e){return new R().linkify(e)}static ansiToHtml(e,r){return new R().ansiToHtml(e,r)}static ansiToJson(e,r){return new R().ansiToJson(e,r)}static ansiToText(e){return new R().ansiToText(e)}constructor(){this.fg=this.bg=this.fg_truecolor=this.bg_truecolor=null,this.bright=0,this.decorations=[]}setupPalette(){this.PALETTE_COLORS=[];for(let n=0;n<2;++n)for(let c=0;c<8;++c)this.PALETTE_COLORS.push(w[n][c].color);let e=[0,95,135,175,215,255],r=(n,c,i)=>e[n]+", "+e[c]+", "+e[i];for(let n=0;n<6;++n)for(let c=0;c<6;++c)for(let i=0;i<6;++i)this.PALETTE_COLORS.push(r(n,c,i));let s=8;for(let n=0;n<24;++n,s+=10)this.PALETTE_COLORS.push(s+", "+s+", "+s)}escapeForHtml(e){return e.replace(/[&<>\"]/gm,r=>r=="&"?"&amp;":r=='"'?"&quot;":r=="<"?"&lt;":r==">"?"&gt;":"")}linkify(e){return e.replace($e,r=>`<a href="${r}">${r}</a>`)}ansiToHtml(e,r){return this.process(e,r,!0)}ansiToJson(e,r){return r=r||{},r.json=!0,r.clearLine=!1,this.process(e,r,!0)}ansiToText(e){return this.process(e,{},!1)}process(e,r,s){let n=this,c=e.split(/\033\[/),i=c.shift();r==null&&(r={}),r.clearLine=/\r/.test(e);let o=c.map(l=>this.processChunk(l,r,s));if(r&&r.json){let l=n.processChunkJson("");return l.content=i,l.clearLine=r.clearLine,o.unshift(l),r.remove_empty&&(o=o.filter(u=>!u.isEmpty())),o}else o.unshift(i);return o.join("")}processChunkJson(e,r,s){r=typeof r>"u"?{}:r;let n=r.use_classes=typeof r.use_classes<"u"&&r.use_classes,c=r.key=n?"class":"color",i={content:e,fg:null,bg:null,fg_truecolor:null,bg_truecolor:null,isInverted:!1,clearLine:r.clearLine,decoration:null,decorations:[],was_processed:!1,isEmpty:()=>!i.content},o=e.match(/^([!\x3c-\x3f]*)([\d;]*)([\x20-\x2c]*[\x40-\x7e])([\s\S]*)/m);if(!o)return i;i.content=o[4];let l=o[2].split(";");if(o[1]!==""||o[3]!=="m"||!s)return i;let u=this;for(;l.length>0;){let d=l.shift(),a=parseInt(d);if(isNaN(a)||a===0)u.fg=u.bg=null,u.decorations=[];else if(a===1)u.decorations.push("bold");else if(a===2)u.decorations.push("dim");else if(a===3)u.decorations.push("italic");else if(a===4)u.decorations.push("underline");else if(a===5)u.decorations.push("blink");else if(a===7)u.decorations.push("reverse");else if(a===8)u.decorations.push("hidden");else if(a===9)u.decorations.push("strikethrough");else if(a===21)u.removeDecoration("bold");else if(a===22)u.removeDecoration("bold"),u.removeDecoration("dim");else if(a===23)u.removeDecoration("italic");else if(a===24)u.removeDecoration("underline");else if(a===25)u.removeDecoration("blink");else if(a===27)u.removeDecoration("reverse");else if(a===28)u.removeDecoration("hidden");else if(a===29)u.removeDecoration("strikethrough");else if(a===39)u.fg=null;else if(a===49)u.bg=null;else if(a>=30&&a<38)u.fg=w[0][a%10][c];else if(a>=90&&a<98)u.fg=w[1][a%10][c];else if(a>=40&&a<48)u.bg=w[0][a%10][c];else if(a>=100&&a<108)u.bg=w[1][a%10][c];else if(a===38||a===48){let p=a===38;if(l.length>=1){let F=l.shift();if(F==="5"&&l.length>=1){let m=parseInt(l.shift());if(m>=0&&m<=255)if(!n)this.PALETTE_COLORS||u.setupPalette(),p?u.fg=this.PALETTE_COLORS[m]:u.bg=this.PALETTE_COLORS[m];else{let A=m>=16?"ansi-palette-"+m:w[m>7?1:0][m%8].class;p?u.fg=A:u.bg=A}}else if(F==="2"&&l.length>=3){let m=parseInt(l.shift()),A=parseInt(l.shift()),v=parseInt(l.shift());if(m>=0&&m<=255&&A>=0&&A<=255&&v>=0&&v<=255){let j=m+", "+A+", "+v;n?p?(u.fg="ansi-truecolor",u.fg_truecolor=j):(u.bg="ansi-truecolor",u.bg_truecolor=j):p?u.fg=j:u.bg=j}}}}}return u.fg===null&&u.bg===null&&u.decorations.length===0||(i.fg=u.fg,i.bg=u.bg,i.fg_truecolor=u.fg_truecolor,i.bg_truecolor=u.bg_truecolor,i.decorations=u.decorations,i.decoration=u.decorations.slice(-1).pop()||null,i.was_processed=!0),i}processChunk(e,r,s){r=r||{};let n=this.processChunkJson(e,r,s),c=r.use_classes;if(n.decorations=n.decorations.filter(a=>{if(a==="reverse"){n.fg||(n.fg=w[0][7][c?"class":"color"]),n.bg||(n.bg=w[0][0][c?"class":"color"]);let p=n.fg;n.fg=n.bg,n.bg=p;let F=n.fg_truecolor;return n.fg_truecolor=n.bg_truecolor,n.bg_truecolor=F,n.isInverted=!0,!1}return!0}),r.json)return n;if(n.isEmpty())return"";if(!n.was_processed)return n.content;let i=[],o=[],l=[],u={},d=a=>{let p=[],F;for(F in a)a.hasOwnProperty(F)&&p.push("data-"+F+'="'+this.escapeForHtml(a[F])+'"');return p.length>0?" "+p.join(" "):""};return n.isInverted&&(u["ansi-is-inverted"]="true"),n.fg&&(c?(i.push(n.fg+"-fg"),n.fg_truecolor!==null&&(u["ansi-truecolor-fg"]=n.fg_truecolor,n.fg_truecolor=null)):i.push("color:rgb("+n.fg+")")),n.bg&&(c?(i.push(n.bg+"-bg"),n.bg_truecolor!==null&&(u["ansi-truecolor-bg"]=n.bg_truecolor,n.bg_truecolor=null)):i.push("background-color:rgb("+n.bg+")")),n.decorations.forEach(a=>{if(c){o.push("ansi-"+a);return}a==="bold"?o.push("font-weight:bold"):a==="dim"?o.push("opacity:0.5"):a==="italic"?o.push("font-style:italic"):a==="hidden"?o.push("visibility:hidden"):a==="strikethrough"?l.push("line-through"):l.push(a)}),l.length&&o.push("text-decoration:"+l.join(" ")),c?'<span class="'+i.concat(o).join(" ")+'"'+d(u)+">"+n.content+"</span>":'<span style="'+i.concat(o).join(";")+'"'+d(u)+">"+n.content+"</span>"}removeDecoration(e){const r=this.decorations.indexOf(e);r>=0&&this.decorations.splice(r,1)}}var Ie=R,T={exports:{}};function G(t){if(!t)return"";if(!/\r/.test(t))return t;for(t=t.replace(/\r+\n/gm,`
1
+ import{r as C,d as N,u as de,j as f,B as O,e as ge,_ as pe}from"./index-yx7txO50.js";import{F as me}from"./FilterPills-CvO0pz85.js";function g(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function $(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function De(t,e){const r=g(t);return isNaN(e)?$(t,NaN):(e&&r.setDate(r.getDate()+e),r)}function xe(t,e){const r=g(t);if(isNaN(e))return $(t,NaN);if(!e)return r;const s=r.getDate(),n=$(t,r.getTime());n.setMonth(r.getMonth()+e+1,0);const c=n.getDate();return s>=c?n:(r.setFullYear(n.getFullYear(),n.getMonth(),s),r)}function S(t,e){const{years:r=0,months:s=0,weeks:n=0,days:c=0,hours:i=0,minutes:o=0,seconds:l=0}=e,u=g(t),d=s||r?xe(u,s+r*12):u,a=c||n?De(d,c+n*7):d,p=o+i*60,m=(l+p*60)*1e3;return $(t,a.getTime()+m)}const Fe=864e5,be=6e4,ve=36e5;function V(t){const e=g(t);return e.setHours(0,0,0,0),e}function K(t){const e=g(t),r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),+t-+r}function ye(t,e){const r=V(t),s=V(e),n=+r-K(r),c=+s-K(s);return Math.round((n-c)/Fe)}function M(t,e){const r=g(t),s=g(e),n=r.getTime()-s.getTime();return n<0?-1:n>0?1:n}function Ee(t,e){const r=g(t),s=g(e),n=r.getFullYear()-s.getFullYear(),c=r.getMonth()-s.getMonth();return n*12+c}function Ce(t,e){const r=g(t),s=g(e);return r.getFullYear()-s.getFullYear()}function Ae(t,e){const r=g(t),s=g(e),n=Q(r,s),c=Math.abs(ye(r,s));r.setDate(r.getDate()-n*c);const i=+(Q(r,s)===-n),o=n*(c-i);return o===0?0:o}function Q(t,e){const r=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return r<0?-1:r>0?1:r}function W(t){return e=>{const s=(t?Math[t]:Math.trunc)(e);return s===0?0:s}}function J(t,e){return+g(t)-+g(e)}function je(t,e,r){const s=J(t,e)/ve;return W(r==null?void 0:r.roundingMethod)(s)}function ze(t,e,r){const s=J(t,e)/be;return W(r==null?void 0:r.roundingMethod)(s)}function we(t){const e=g(t);return e.setHours(23,59,59,999),e}function ke(t){const e=g(t),r=e.getMonth();return e.setFullYear(e.getFullYear(),r+1,0),e.setHours(23,59,59,999),e}function Ne(t){const e=g(t);return+we(e)==+ke(e)}function Re(t,e){const r=g(t),s=g(e),n=M(r,s),c=Math.abs(Ee(r,s));let i;if(c<1)i=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-n*c);let o=M(r,s)===-n;Ne(g(t))&&c===1&&M(t,s)===1&&(o=!1),i=n*(c-Number(o))}return i===0?0:i}function Oe(t,e,r){const s=J(t,e)/1e3;return W(r==null?void 0:r.roundingMethod)(s)}function Se(t,e){const r=g(t),s=g(e),n=M(r,s),c=Math.abs(Ce(r,s));r.setFullYear(1584),s.setFullYear(1584);const i=M(r,s)===-n,o=n*(c-+i);return o===0?0:o}function Me(t){const e=g(t.start),r=g(t.end),s={},n=Se(r,e);n&&(s.years=n);const c=S(e,{years:s.years}),i=Re(r,c);i&&(s.months=i);const o=S(c,{months:s.months}),l=Ae(r,o);l&&(s.days=l);const u=S(o,{days:s.days}),d=je(r,u);d&&(s.hours=d);const a=S(u,{hours:s.hours}),p=ze(r,a);p&&(s.minutes=p);const F=S(a,{minutes:s.minutes}),m=Oe(r,F);return m&&(s.seconds=m),s}var ae={};const w=[[{color:"0, 0, 0",class:"ansi-black"},{color:"187, 0, 0",class:"ansi-red"},{color:"0, 187, 0",class:"ansi-green"},{color:"187, 187, 0",class:"ansi-yellow"},{color:"0, 0, 187",class:"ansi-blue"},{color:"187, 0, 187",class:"ansi-magenta"},{color:"0, 187, 187",class:"ansi-cyan"},{color:"255,255,255",class:"ansi-white"}],[{color:"85, 85, 85",class:"ansi-bright-black"},{color:"255, 85, 85",class:"ansi-bright-red"},{color:"0, 255, 0",class:"ansi-bright-green"},{color:"255, 255, 85",class:"ansi-bright-yellow"},{color:"85, 85, 255",class:"ansi-bright-blue"},{color:"255, 85, 255",class:"ansi-bright-magenta"},{color:"85, 255, 255",class:"ansi-bright-cyan"},{color:"255, 255, 255",class:"ansi-bright-white"}]],$e=/(https?:\/\/(?:[A-Za-z0-9#;/?:@=+$',_.!~*()[\]-]|&amp;|%[A-Fa-f0-9]{2})+)/gm;class R{static escapeForHtml(e){return new R().escapeForHtml(e)}static linkify(e){return new R().linkify(e)}static ansiToHtml(e,r){return new R().ansiToHtml(e,r)}static ansiToJson(e,r){return new R().ansiToJson(e,r)}static ansiToText(e){return new R().ansiToText(e)}constructor(){this.fg=this.bg=this.fg_truecolor=this.bg_truecolor=null,this.bright=0,this.decorations=[]}setupPalette(){this.PALETTE_COLORS=[];for(let n=0;n<2;++n)for(let c=0;c<8;++c)this.PALETTE_COLORS.push(w[n][c].color);let e=[0,95,135,175,215,255],r=(n,c,i)=>e[n]+", "+e[c]+", "+e[i];for(let n=0;n<6;++n)for(let c=0;c<6;++c)for(let i=0;i<6;++i)this.PALETTE_COLORS.push(r(n,c,i));let s=8;for(let n=0;n<24;++n,s+=10)this.PALETTE_COLORS.push(s+", "+s+", "+s)}escapeForHtml(e){return e.replace(/[&<>\"]/gm,r=>r=="&"?"&amp;":r=='"'?"&quot;":r=="<"?"&lt;":r==">"?"&gt;":"")}linkify(e){return e.replace($e,r=>`<a href="${r}">${r}</a>`)}ansiToHtml(e,r){return this.process(e,r,!0)}ansiToJson(e,r){return r=r||{},r.json=!0,r.clearLine=!1,this.process(e,r,!0)}ansiToText(e){return this.process(e,{},!1)}process(e,r,s){let n=this,c=e.split(/\033\[/),i=c.shift();r==null&&(r={}),r.clearLine=/\r/.test(e);let o=c.map(l=>this.processChunk(l,r,s));if(r&&r.json){let l=n.processChunkJson("");return l.content=i,l.clearLine=r.clearLine,o.unshift(l),r.remove_empty&&(o=o.filter(u=>!u.isEmpty())),o}else o.unshift(i);return o.join("")}processChunkJson(e,r,s){r=typeof r>"u"?{}:r;let n=r.use_classes=typeof r.use_classes<"u"&&r.use_classes,c=r.key=n?"class":"color",i={content:e,fg:null,bg:null,fg_truecolor:null,bg_truecolor:null,isInverted:!1,clearLine:r.clearLine,decoration:null,decorations:[],was_processed:!1,isEmpty:()=>!i.content},o=e.match(/^([!\x3c-\x3f]*)([\d;]*)([\x20-\x2c]*[\x40-\x7e])([\s\S]*)/m);if(!o)return i;i.content=o[4];let l=o[2].split(";");if(o[1]!==""||o[3]!=="m"||!s)return i;let u=this;for(;l.length>0;){let d=l.shift(),a=parseInt(d);if(isNaN(a)||a===0)u.fg=u.bg=null,u.decorations=[];else if(a===1)u.decorations.push("bold");else if(a===2)u.decorations.push("dim");else if(a===3)u.decorations.push("italic");else if(a===4)u.decorations.push("underline");else if(a===5)u.decorations.push("blink");else if(a===7)u.decorations.push("reverse");else if(a===8)u.decorations.push("hidden");else if(a===9)u.decorations.push("strikethrough");else if(a===21)u.removeDecoration("bold");else if(a===22)u.removeDecoration("bold"),u.removeDecoration("dim");else if(a===23)u.removeDecoration("italic");else if(a===24)u.removeDecoration("underline");else if(a===25)u.removeDecoration("blink");else if(a===27)u.removeDecoration("reverse");else if(a===28)u.removeDecoration("hidden");else if(a===29)u.removeDecoration("strikethrough");else if(a===39)u.fg=null;else if(a===49)u.bg=null;else if(a>=30&&a<38)u.fg=w[0][a%10][c];else if(a>=90&&a<98)u.fg=w[1][a%10][c];else if(a>=40&&a<48)u.bg=w[0][a%10][c];else if(a>=100&&a<108)u.bg=w[1][a%10][c];else if(a===38||a===48){let p=a===38;if(l.length>=1){let F=l.shift();if(F==="5"&&l.length>=1){let m=parseInt(l.shift());if(m>=0&&m<=255)if(!n)this.PALETTE_COLORS||u.setupPalette(),p?u.fg=this.PALETTE_COLORS[m]:u.bg=this.PALETTE_COLORS[m];else{let A=m>=16?"ansi-palette-"+m:w[m>7?1:0][m%8].class;p?u.fg=A:u.bg=A}}else if(F==="2"&&l.length>=3){let m=parseInt(l.shift()),A=parseInt(l.shift()),v=parseInt(l.shift());if(m>=0&&m<=255&&A>=0&&A<=255&&v>=0&&v<=255){let j=m+", "+A+", "+v;n?p?(u.fg="ansi-truecolor",u.fg_truecolor=j):(u.bg="ansi-truecolor",u.bg_truecolor=j):p?u.fg=j:u.bg=j}}}}}return u.fg===null&&u.bg===null&&u.decorations.length===0||(i.fg=u.fg,i.bg=u.bg,i.fg_truecolor=u.fg_truecolor,i.bg_truecolor=u.bg_truecolor,i.decorations=u.decorations,i.decoration=u.decorations.slice(-1).pop()||null,i.was_processed=!0),i}processChunk(e,r,s){r=r||{};let n=this.processChunkJson(e,r,s),c=r.use_classes;if(n.decorations=n.decorations.filter(a=>{if(a==="reverse"){n.fg||(n.fg=w[0][7][c?"class":"color"]),n.bg||(n.bg=w[0][0][c?"class":"color"]);let p=n.fg;n.fg=n.bg,n.bg=p;let F=n.fg_truecolor;return n.fg_truecolor=n.bg_truecolor,n.bg_truecolor=F,n.isInverted=!0,!1}return!0}),r.json)return n;if(n.isEmpty())return"";if(!n.was_processed)return n.content;let i=[],o=[],l=[],u={},d=a=>{let p=[],F;for(F in a)a.hasOwnProperty(F)&&p.push("data-"+F+'="'+this.escapeForHtml(a[F])+'"');return p.length>0?" "+p.join(" "):""};return n.isInverted&&(u["ansi-is-inverted"]="true"),n.fg&&(c?(i.push(n.fg+"-fg"),n.fg_truecolor!==null&&(u["ansi-truecolor-fg"]=n.fg_truecolor,n.fg_truecolor=null)):i.push("color:rgb("+n.fg+")")),n.bg&&(c?(i.push(n.bg+"-bg"),n.bg_truecolor!==null&&(u["ansi-truecolor-bg"]=n.bg_truecolor,n.bg_truecolor=null)):i.push("background-color:rgb("+n.bg+")")),n.decorations.forEach(a=>{if(c){o.push("ansi-"+a);return}a==="bold"?o.push("font-weight:bold"):a==="dim"?o.push("opacity:0.5"):a==="italic"?o.push("font-style:italic"):a==="hidden"?o.push("visibility:hidden"):a==="strikethrough"?l.push("line-through"):l.push(a)}),l.length&&o.push("text-decoration:"+l.join(" ")),c?'<span class="'+i.concat(o).join(" ")+'"'+d(u)+">"+n.content+"</span>":'<span style="'+i.concat(o).join(";")+'"'+d(u)+">"+n.content+"</span>"}removeDecoration(e){const r=this.decorations.indexOf(e);r>=0&&this.decorations.splice(r,1)}}var Ie=R,T={exports:{}};function G(t){if(!t)return"";if(!/\r/.test(t))return t;for(t=t.replace(/\r+\n/gm,`
2
2
  `);/\r./.test(t);)t=t.replace(/^([^\r\n]*)\r+([^\r\n]+)/gm,function(e,r,s){return s+r.slice(s.length)});return t}function Te(t){for(var e=0,r=0;r<t.length;r++)t[e].length<=t[r].length&&(e=r);return e}function X(t){if(!/\r/.test(t))return t;for(var e=t.split("\r"),r=[];e.length>0;){var s=Te(e);r.push(e[s]),e=e.slice(s+1)}return r.join("\r")}function Le(t){if(!t)return"";if(!/\r/.test(t))return t;if(!/\n/.test(t))return X(t);t=t.replace(/\r+\n/gm,`
3
3
  `);var e=t.lastIndexOf(`
4
4
  `);return G(t.slice(0,e))+`
@@ -0,0 +1 @@
1
+ import{u as b,r as m,j as e,E as C,_ as N}from"./index-yx7txO50.js";import{C as _,M as I,I as E,F as V}from"./FileIcon-tDB2mYGC.js";import{F}from"./FilterPills-CvO0pz85.js";import{u as R,C as P}from"./ConfigField-BqjVlteZ.js";import"./index-CtlFZEcM.js";let w=null;const v=new Set,g={get:()=>w,set:t=>{w=t,v.forEach(r=>r(t))},subscribe:t=>(v.add(t),()=>{v.delete(t)})};function U({path:t}){return e.jsx("iframe",{src:"/"+encodeURI(t),title:"预览",className:"w-full h-full border-0 bg-white"})}function O({path:t}){const[r,u]=m.useState([]),[l,i]=m.useState(!0);return m.useEffect(()=>{let s=!1;return i(!0),u([]),fetch("/"+encodeURI(t),{cache:"no-store"}).then(n=>n.text()).then(n=>{if(s)return;const c=n.match(/--[A-Za-z0-9_-]+\s*:\s*[^;}\n]+/g)??[];if(!c.length){u([]),i(!1);return}const a=x=>/^(#([0-9a-fA-F]{3,8})\b|rgb|rgba|hsl|hsla|oklch|oklab|color\()/i.test(x.trim()),o=c.filter(x=>a(x)),f=c.filter(x=>/font|family|type/.test(x.toLowerCase())&&!a(x)),d=c.filter(x=>!o.includes(x)&&!f.includes(x)),h=x=>{const j=x.indexOf(":"),k=x.slice(0,j).trim(),S=x.slice(j+1).trim();return{name:k,value:S}},p=[];o.length&&p.push({label:`配色 · ${o.length}`,items:o.map(h)}),f.length&&p.push({label:`字体 · ${f.length}`,items:f.map(h)}),d.length&&p.push({label:`其他 · ${d.length}`,items:d.map(h)}),u(p),i(!1)}).catch(()=>{s||(u([]),i(!1))}),()=>{s=!0}},[t]),l?e.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"解析中…"}):r.length?e.jsx("div",{className:"p-8 flex flex-col gap-7",children:r.map(s=>{const n=s.items.some(a=>/^(#|rgb|rgba|hsl|hsla|oklch|oklab|color\()/i.test(a.value)),c=s.items.some(a=>/font|family|type/i.test(a.name));return e.jsxs("section",{children:[e.jsx("div",{className:"mb-3 text-sm font-semibold uppercase text-muted-foreground",children:s.label}),n?e.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(var(--token-card-min-w), 1fr))"},children:s.items.filter(a=>/^(#|rgb|rgba|hsl|hsla|oklch|oklab|color\()/i.test(a.value)).map(({name:a,value:o})=>e.jsxs("div",{className:"overflow-hidden rounded-lg border bg-background",children:[e.jsx("div",{className:"h-[var(--design-preview-h)] border-b",style:{background:o}}),e.jsx("div",{className:"px-2.5 pt-2 font-mono text-sm break-all",children:a}),e.jsx("div",{className:"px-2.5 pb-2 text-xs text-muted-foreground",children:o})]},a))}):c?e.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(var(--token-card-min-w), 1fr))"},children:s.items.map(({name:a,value:o})=>e.jsxs("div",{className:"overflow-hidden rounded-lg border bg-background",children:[e.jsx("div",{className:"grid h-[var(--design-preview-h)] place-items-center text-2xl",style:{fontFamily:o},children:"Aa"}),e.jsx("div",{className:"px-2.5 font-mono text-sm",children:a})]},a))}):e.jsx("div",{className:"flex flex-col gap-1",children:s.items.map(({name:a,value:o})=>e.jsxs("div",{className:"flex justify-between gap-3 px-2.5 py-1.5 rounded border bg-background text-xs",children:[e.jsx("span",{className:"font-mono",children:a}),e.jsx("span",{className:"text-muted-foreground",children:o})]},a))})]},s.label)})}):e.jsx("p",{className:"p-3 text-xs",children:"未发现 CSS 变量"})}function $({path:t}){return e.jsx("div",{className:"grid place-items-center p-8",children:e.jsx("video",{src:"/"+encodeURI(t),controls:!0,className:"max-w-full max-h-[80vh] rounded border"})})}function L({path:t}){return e.jsx("div",{className:"grid place-items-center p-8",children:e.jsx("audio",{src:"/"+encodeURI(t),controls:!0,className:"w-full max-w-2xl"})})}function A({path:t}){return e.jsx("div",{className:"grid place-items-center p-8 h-full",children:e.jsx("iframe",{src:"/"+encodeURI(t),title:"PDF",className:"w-full h-full max-h-[80vh] rounded border bg-white"})})}function z({path:t}){const[r,u]=m.useState("");return m.useEffect(()=>{let l=!1,i="",s=null;return fetch("/"+encodeURI(t)).then(n=>n.blob()).then(async n=>{var c;if(!l){if(i=URL.createObjectURL(n),s=new FontFace("zd-font-preview",`url(${i})`),await s.load(),l){(c=s.dispose)==null||c.call(s);return}document.fonts.add(s),u(t.split("/").pop()??t)}}).catch(()=>{l||u(t.split("/").pop()??t)}),()=>{var n;if(l=!0,s)try{document.fonts.delete(s),(n=s.dispose)==null||n.call(s)}catch{}i&&URL.revokeObjectURL(i)}},[t]),e.jsxs("div",{className:"h-full overflow-auto p-8 grid gap-6 place-content-center text-center",children:[e.jsx("div",{className:"text-xs text-muted-foreground font-mono break-all",children:t}),e.jsx("div",{className:"text-5xl",style:{fontFamily:r?"'zd-font-preview', serif":"serif"},children:"Aa 字体预览 0123"})]})}function D({path:t}){const{icon:r}=b();return e.jsx("div",{className:"grid place-items-center h-full text-center text-muted-foreground",children:e.jsxs("div",{children:[r("image-off","h-10 w-10 mx-auto mb-3 opacity-50"),e.jsx("p",{children:"该格式无法预览"}),e.jsx("p",{className:"mt-1 font-mono text-xs break-all",children:t})]})})}const M={page:U,icon:E,token:O,md:I,video:$,audio:L,pdf:A,component:_,font:z};function T(t){return M[t]??D}function W({mode:t,onMode:r,w:u,h:l,onW:i,onH:s}){const{icon:n}=b(),c=[{v:0,icon:n("monitor","h-3.5 w-3.5"),label:"桌面"},{v:768,icon:n("tablet","h-3.5 w-3.5"),label:"768"},{v:375,icon:n("smartphone","h-3.5 w-3.5"),label:"375"},{v:"custom",icon:n("sliders-horizontal","h-3.5 w-3.5"),label:"自定义"}],a="w-[var(--design-input-w)] h-7 px-1 text-center text-xs rounded border border-border bg-background text-foreground [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none focus:outline-none focus:border-primary";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex items-center gap-1 rounded-md border border-border p-0.5 bg-muted",children:e.jsx(F,{items:c.map(o=>({key:String(o.v),label:o.label,renderLabel:()=>e.jsxs(e.Fragment,{children:[o.icon,e.jsx("span",{className:"hidden sm:inline",children:o.label})]})})),value:String(t),onChange:o=>r(o==="0"?0:o==="custom"?"custom":Number(o)),ariaLabel:"视口模式"})}),e.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx("input",{type:"number",value:u,min:280,max:3e3,step:8,onChange:o=>i(Number(o.target.value)),"aria-label":"自定义宽度",className:a}),e.jsx("span",{className:"text-muted-foreground/70",children:"×"}),e.jsx("input",{type:"number",value:l,min:400,max:3e3,step:8,onChange:o=>s(Number(o.target.value)),"aria-label":"自定义高度",className:a}),e.jsx("span",{className:"text-sm text-muted-foreground/70",children:"px"})]})]})}function G(){const{icon:t}=b(),[r,u]=m.useState(()=>g.get()),[l,i]=m.useState(0),[s,n]=m.useState(1024),[c,a]=m.useState(768);m.useEffect(()=>g.subscribe(u),[]);const o=r?T(r.type):null,f=l===0?"桌面":l==="custom"?`${s} × ${c}`:`${l}px`;return e.jsx("div",{className:"mx-auto h-full flex flex-col bg-background border rounded-lg shadow-sm overflow-hidden",children:r&&o?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"h-[var(--design-toolbar-h)] flex-none flex items-center justify-between px-3.5 border-b bg-background text-xs",children:[e.jsx("span",{className:"font-mono truncate",children:r.path}),e.jsx("span",{className:"text-muted-foreground ml-3 flex-none",children:f}),e.jsx(W,{mode:l,onMode:i,w:s,h:c,onW:n,onH:a})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:r.type==="page"?e.jsx("div",{className:"mx-auto bg-background overflow-hidden",style:{maxWidth:l===0?void 0:l==="custom"?s:l,height:l==="custom"?c:"100%"},children:e.jsx(o,{path:r.path})}):e.jsx("div",{className:"mx-auto max-w-5xl h-full overflow-auto",children:e.jsx(o,{path:r.path})})})]}):e.jsx(C,{icon:t("palette","h-6 w-6"),title:"从左侧选择一个资产预览",hint:"点左侧折叠钮展开资产树 · 改文件即时刷新",tone:"primary"})})}const H=Object.freeze(Object.defineProperty({__proto__:null,default:G},Symbol.toStringTag,{value:"Module"})),q={page:"monitor",component:"blocks",icon:"shapes",token:"palette",md:"book-open",video:"video",audio:"audio-lines",pdf:"file-text",font:"type"},Z=[{key:"page",label:"页面"},{key:"component",label:"组件"},{key:"icon",label:"图标"},{key:"token",label:"Tokens"},{key:"md",label:"文档"},{key:"video",label:"视频"},{key:"audio",label:"音频"},{key:"pdf",label:"PDF"},{key:"font",label:"字体"}],y={folders:{type:"string[]",label:"扫描文件夹",default:[]}};function B(){const t=m.useSyncExternalStore(g.subscribe,g.get),[r,u]=m.useState(null),[l,i]=m.useState(!1),{config:s,save:n,loading:c,saving:a}=R("design",y);m.useEffect(()=>{if(c)return;const d=Array.isArray(s.folders)?s.folders:[],h=d.length>0?`?path=${encodeURIComponent(d.join(","))}`:"";fetch("/__design/assets"+h,{cache:"no-store"}).then(p=>p.json()).then(u)},[s,c]);const o=m.useMemo(()=>r?Z.map(d=>({...d,items:r[d.key]??[]})).filter(d=>d.items.length>0):[],[r]),f=(d,h)=>{const p={...s,[d]:h};n(p)};return e.jsxs("div",{children:[e.jsx("div",{className:"p-3 flex items-center gap-2",children:e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("div",{className:"text-xs text-muted-foreground truncate",children:"设计资产"})})}),o.map(d=>e.jsx(J,{group:d,current:t},d.key)),e.jsxs("div",{className:"border-t border-border mt-2",children:[e.jsxs("button",{onClick:()=>i(d=>!d),className:"w-full flex items-center gap-1.5 px-3 py-2 text-xs font-medium text-muted-foreground hover:text-foreground",children:[e.jsx("span",{className:`h-3 w-3 shrink-0 inline-flex items-center justify-center transition-transform ${l?"rotate-90":""}`,children:b().icon("chevron-right")}),"⚙️ 配置"]}),l&&e.jsxs("div",{className:"px-3 pb-3 space-y-3",children:[e.jsx(P,{key_:"folders",field:y.folders,value:s.folders,onChange:f}),e.jsx("div",{className:"text-xs text-muted-foreground",children:a?"保存中…":"配置已保存"})]})]})]})}function J({group:t,current:r}){const[u,l]=m.useState(!0),{icon:i}=b(),s=q[t.key];return e.jsxs("div",{className:"mb-1.5 px-1",children:[e.jsxs("button",{onClick:()=>l(n=>!n),className:"w-full flex items-center gap-1.5 pt-2 pb-1 text-sm font-semibold uppercase tracking-wide text-muted-foreground hover:text-foreground rounded-md",children:[i("chevron-right",`h-3 w-3 shrink-0 transition-transform ${u?"rotate-90":""}`),s&&i(s,"h-3.5 w-3.5 shrink-0"),e.jsx("span",{className:"truncate",children:t.label}),e.jsx("span",{className:"ml-auto shrink-0 rounded-full bg-muted px-1.5 font-mono text-xs font-normal",children:t.items.length})]}),u&&t.items.map(n=>e.jsxs("button",{onClick:()=>g.set({path:n.path,type:n.type}),className:`w-full text-left flex items-center gap-2 px-2.5 py-1.5 text-xs hover:bg-muted rounded-md ${(r==null?void 0:r.path)===n.path?"bg-primary/10 text-foreground font-medium":"text-muted-foreground"}`,children:[e.jsx(V,{name:n.name,active:(r==null?void 0:r.path)===n.path}),e.jsx("span",{className:"truncate",children:n.name}),n.ext&&e.jsx("span",{className:"ml-auto font-mono text-xs text-muted-foreground/60",children:n.ext})]},n.path))]})}const K=Object.freeze(Object.defineProperty({__proto__:null,default:B},Symbol.toStringTag,{value:"Module"})),se={mode:"design",label:"设计资产",icon:"🎨",description:"设计资产分类浏览 · zdesign",Sidebar:m.lazy(()=>N(()=>Promise.resolve().then(()=>K),void 0)),Workspace:m.lazy(()=>N(()=>Promise.resolve().then(()=>H),void 0))};export{B as DesignSidebar,G as DesignWorkspace,se as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Workspace-B2nKQnQf.js","assets/index-yx7txO50.js","assets/index-BHL7sr_b.css","assets/ProgressBar-DIoIeYBA.js"])))=>i.map(i=>d[i]);
2
+ import{r as o,_ as t}from"./index-yx7txO50.js";const a={mode:"stats",label:"项目统计",icon:"📊",description:"项目文件统计 · 扫描生成",Workspace:o.lazy(()=>t(()=>import("./Workspace-B2nKQnQf.js"),__vite__mapDeps([0,1,2,3])))};export{a as default};
@@ -0,0 +1 @@
1
+ import{u as b,r as a,j as e,B as v,E as j,_ as h}from"./index-yx7txO50.js";import{B as p}from"./badge-CmIMTBDj.js";import{F as y}from"./FilterPills-CvO0pz85.js";import{u as k,C as d}from"./ConfigField-BqjVlteZ.js";const _=[{key:"mine",label:"我的"},{key:"all",label:"全部"},{key:"active",label:"active"},{key:"resolved",label:"resolved"},{key:"closed",label:"closed"}];function N({status:l}){const t=l==="active"?"destructive":l==="resolved"?"success":"neutral";return e.jsx(p,{variant:t,children:l})}function w({severity:l}){const t=Number(l),o=t<=1?"destructive":t===2||t===3?"warning":"neutral";return e.jsxs(p,{variant:o,children:["S",t]})}function S(){const{icon:l}=b(),[t,o]=a.useState(null),[r,c]=a.useState(!1),[n,u]=a.useState("mine"),m=a.useCallback(()=>{c(!0),fetch("/__bugs",{cache:"no-store"}).then(s=>s.json()).then(o).finally(()=>c(!1))},[]);a.useEffect(m,[m]);const f=s=>n==="all"?!0:n==="mine"?s.mine:s.status===n,x=t!=null&&t.ok?t.bugs.filter(f):[],g=t!=null&&t.ok?{mine:t.bugs.filter(s=>s.mine).length,all:t.bugs.length,active:t.bugs.filter(s=>s.status==="active").length,resolved:t.bugs.filter(s=>s.status==="resolved").length,closed:t.bugs.filter(s=>s.status==="closed").length}:null;return e.jsxs("div",{className:"mx-auto h-full max-w-6xl flex flex-col bg-background border rounded-lg shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"flex-none flex items-center gap-2 px-3 py-2 border-b",children:[e.jsx(y,{items:_.map(s=>({key:s.key,label:s.label,badge:g?String(g[s.key]):void 0})),value:n,onChange:u,ariaLabel:"状态筛选"}),e.jsx("span",{className:"ml-auto text-sm text-muted-foreground",children:"禅道 · 只读"}),e.jsx(v,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:m,title:"刷新",children:l("refresh-cw",`h-3.5 w-3.5 ${r?"animate-spin":""}`)})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:t?t.ok?x.length?e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{className:"sticky top-0 bg-background border-b",children:e.jsxs("tr",{className:"text-left text-muted-foreground",children:[e.jsx("th",{className:"px-3 py-2 font-medium w-16",children:"#"}),e.jsx("th",{className:"px-3 py-2 font-medium",children:"标题"}),e.jsx("th",{className:"px-3 py-2 font-medium w-14",children:"严重度"}),e.jsx("th",{className:"px-3 py-2 font-medium w-20",children:"状态"}),e.jsx("th",{className:"px-3 py-2 font-medium w-20",children:"指派"})]})}),e.jsx("tbody",{children:x.map(s=>e.jsxs("tr",{className:"border-b last:border-0 hover:bg-muted/40 transition-colors",children:[e.jsx("td",{className:"px-3 py-2 font-mono text-muted-foreground",children:s.id}),e.jsx("td",{className:"px-3 py-2",children:e.jsxs("button",{className:"text-left hover:text-primary hover:underline flex items-center gap-1",onClick:()=>window.open(`${t.url}/bug-view-${s.id}.html`,"_blank","noopener"),title:"在禅道打开",children:[e.jsx("span",{className:"truncate max-w-[var(--bug-title-max-w)]",children:s.title}),l("external-link","h-3 w-3 shrink-0 text-muted-foreground")]})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx(w,{severity:s.severity})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx(N,{status:s.status})}),e.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:s.assignedTo||"—"})]},s.id))})]}):e.jsx(j,{icon:l("bug","h-6 w-6"),title:n==="mine"?"没有指派给你的 bug":"该状态下无 bug",hint:"🎉"}):e.jsx("p",{className:"p-4 text-xs text-destructive",children:t.error}):e.jsx("p",{className:"p-4 text-xs text-muted-foreground",children:"加载中…"})})]})}function C(){return e.jsx(S,{})}const B=Object.freeze(Object.defineProperty({__proto__:null,default:C},Symbol.toStringTag,{value:"Module"})),i={url:{type:"string",label:"服务器 URL",default:""},account:{type:"string",label:"账号",default:""},token:{type:"string",label:"Token",default:""},product:{type:"number",label:"产品 ID",default:0}};function E(){const{config:l,save:t,saving:o}=k("bugs",i),r=(c,n)=>{const u={...l,[c]:n};t(u)};return e.jsxs("div",{className:"p-3",children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-3",children:"禅道 Bugs 配置"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(d,{key_:"url",field:i.url,value:l.url,onChange:r}),e.jsx(d,{key_:"account",field:i.account,value:l.account,onChange:r}),e.jsx(d,{key_:"token",field:i.token,value:l.token,onChange:r}),e.jsx(d,{key_:"product",field:i.product,value:l.product,onChange:r}),e.jsx("div",{className:"text-xs text-muted-foreground",children:o?"保存中…":"配置已保存"})]})]})}const P=Object.freeze(Object.defineProperty({__proto__:null,default:E},Symbol.toStringTag,{value:"Module"})),L={mode:"bugs",label:"禅道 Bugs",icon:"🎯",description:"只读 bug 列表",Sidebar:a.lazy(()=>h(()=>Promise.resolve().then(()=>P),void 0)),Workspace:a.lazy(()=>h(()=>Promise.resolve().then(()=>B),void 0))};export{E as BugSidebar,C as BugWorkspace,L as default};
@@ -1,2 +1,2 @@
1
- import{u as h,r as a,a as W,j as e,E as C,_ as O}from"./index-Co_rMXPa.js";import{B as m}from"./badge-DUO7nDks.js";import{P as $}from"./ProgressBar-ycyJBwG-.js";import{M as b,r as N}from"./index-BrvOKJRF.js";const k=/^\s*-\s*\[([ xX])\]\s*(.*)$/;function R(s){return s.split(`
1
+ import{u as h,r as a,a as W,j as e,E as C,_ as O}from"./index-yx7txO50.js";import{B as m}from"./badge-CmIMTBDj.js";import{P as $}from"./ProgressBar-DIoIeYBA.js";import{M as b,r as N}from"./index-CtlFZEcM.js";const k=/^\s*-\s*\[([ xX])\]\s*(.*)$/;function R(s){return s.split(`
2
2
  `).filter(n=>k.test(n)).map(n=>{const t=n.match(k);return{text:((t==null?void 0:t[2])??n).trim(),checked:(t==null?void 0:t[1])!==" "}})}function w(s,n){return n===0?0:Math.round(s/n*100)}function y({done:s,total:n}){const t=w(s,n),o=t===100?"success":t>0?"warning":"neutral";return e.jsxs(m,{variant:o,children:[s,"/",n," · ",t,"%"]})}function v(){return e.jsx(m,{variant:"info",children:"worktree 执行中"})}function B(){return e.jsx(m,{variant:"info",children:"含测试策略"})}function I({name:s,pending:n}){const t=n?"neutral":"success";return e.jsx(m,{variant:t,children:n?`${s} · 等待前置`:s})}function A({tasks:s}){const n=R(s);if(!n.length)return e.jsx("p",{className:"text-xs text-muted-foreground",children:"无 tasks.md"});const t=n.findIndex(o=>!o.checked);return e.jsx("ul",{className:"space-y-1 text-xs",children:n.map((o,l)=>{const i=l===t;return e.jsxs("li",{className:`flex items-start gap-2 rounded px-1.5 -mx-1.5 py-0.5 ${i?"bg-warning/10 border-l-2 border-warning":""} ${o.checked?"text-foreground":"text-muted-foreground"}`,children:[o.checked?e.jsx("span",{className:"mt-0.5 h-3.5 w-3.5 shrink-0 rounded-full bg-success text-white flex items-center justify-center text-xs",children:"✓"}):e.jsx("span",{className:`mt-0.5 h-3.5 w-3.5 shrink-0 rounded-full border ${i?"border-warning":"border-muted-foreground/50"}`}),e.jsx("span",{children:o.text}),i&&e.jsx("span",{className:"ml-auto flex-none text-xs font-medium text-warning",children:"← 下一步"})]},l)})})}function L({item:s,onSelect:n}){const{icon:t}=h();return e.jsxs("button",{type:"button",onClick:n,className:"w-full text-left rounded-lg border bg-card p-4 hover:bg-muted/50 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[t("folder-open","h-4 w-4 text-muted-foreground"),e.jsx("span",{className:"text-sm font-medium font-mono truncate",children:s.name}),e.jsx(y,{done:s.done,total:s.total}),s.inWorktree&&e.jsx(v,{})]}),e.jsx($,{value:w(s.done,s.total),className:"h-1 mb-2"}),e.jsxs("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[e.jsx("span",{className:s.hasProposal?"text-foreground":"",children:"proposal"}),e.jsx("span",{className:s.hasDesign?"text-foreground":"",children:"design"})]})]})}function M({refreshKey:s}){const{icon:n}=h(),[t,o]=a.useState([]);return a.useEffect(()=>{fetch("/__worktrees",{cache:"no-store"}).then(l=>l.json()).then(o).catch(()=>o([]))},[s]),t.length?e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n("git-branch","h-3.5 w-3.5 text-muted-foreground"),e.jsx("span",{className:"text-sm text-muted-foreground mr-1",children:"Worktree:"}),t.map(l=>e.jsxs("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded border text-xs font-mono bg-info/10 text-info border-info/30",title:l.head,children:[l.name,"@",l.branch||"detached"]},l.name))]}):null}function z({navTarget:s}){const{icon:n}=h(),[t,o]=a.useState([]),[l,i]=a.useState(0);a.useRef(!1),W(()=>{},()=>i(r=>r+1));const[S,_]=a.useState(null),[c,E]=a.useState(null),[f,x]=a.useState(!0),[p,g]=a.useState(null),[U,P]=a.useState(!1),j=a.useCallback(()=>{x(!0),fetch("/__apply",{cache:"no-store"}).then(r=>r.json()).then(o).catch(r=>g(r.message)).finally(()=>x(!1))},[]);a.useEffect(()=>{j()},[j,l]);const u=a.useCallback(r=>{x(!0),_(r),P(!0),fetch(`/__apply/change?name=${encodeURIComponent(r)}`,{cache:"no-store"}).then(d=>d.json()).then(E).catch(d=>g(d.message)).finally(()=>x(!1))},[]);return a.useEffect(()=>{if(!(s!=null&&s.wt)||!t.length)return;const r=t.find(d=>d.name===s.wt);r&&u(r.name)},[s==null?void 0:s.wt,s==null?void 0:s.navToken,t,u]),f&&!t.length?e.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"mx-auto mb-3.5 grid h-14 w-14 place-items-center rounded-[var(--radius-lg)] bg-primary text-primary-foreground text-2xl font-bold animate-pulse",children:"⚙️"}),e.jsx("p",{children:"加载执行进度…"})]})}):p?e.jsx("div",{className:"flex h-full items-center justify-center text-destructive",children:e.jsx("p",{children:p})}):e.jsxs("div",{className:"mx-auto h-full max-w-6xl flex flex-col bg-background border rounded-lg shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"flex-none px-4 py-3 border-b flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:"OpenSpec 执行进度"}),e.jsx("span",{className:"ml-auto text-sm text-muted-foreground",children:"openspec/changes/"})]}),e.jsxs("div",{className:"flex-1 min-h-0 overflow-auto p-4 space-y-4",children:[e.jsx(M,{refreshKey:l}),t.length?e.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:t.map(r=>e.jsx(L,{item:r,onSelect:()=>u(r.name)},r.name))}):e.jsx(C,{icon:n("folder-git-2","h-6 w-6"),title:"没有进行中的 change",hint:"在 openspec/changes/ 下创建 change 后会显示在这里"}),S&&c&&!f&&e.jsxs("section",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"text-sm font-medium",children:c.name}),e.jsx(y,{done:c.done,total:c.total}),c.inWorktree&&e.jsx(v,{}),c.hasTestStrategy&&e.jsx(B,{})]}),c.dependsOn.length>0&&e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"依赖:"}),c.dependsOn.map(r=>e.jsx(I,{name:r,pending:t.some(d=>d.name===r)},r))]}),c.proposal&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-muted-foreground mb-2 flex items-center gap-1",children:[n("file-text","h-3 w-3")," proposal.md"]}),e.jsx("div",{className:"prose dark:prose-invert max-w-none text-xs border rounded-lg p-3 bg-card",children:e.jsx(b,{remarkPlugins:[N],children:c.proposal})})]}),c.design&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-muted-foreground mb-2 flex items-center gap-1",children:[n("file-text","h-3 w-3")," design.md"]}),e.jsx("div",{className:"prose dark:prose-invert max-w-none text-xs border rounded-lg p-3 bg-card",children:e.jsx(b,{remarkPlugins:[N],children:c.design})})]}),e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-muted-foreground mb-2 flex items-center gap-1",children:[n("file-text","h-3 w-3")," tasks.md"]}),e.jsx("div",{className:"border rounded-lg p-3 bg-card",children:e.jsx(A,{tasks:c.tasks})})]})]})]})]})}function D({navTarget:s}){return e.jsx(z,{navTarget:s})}const K=Object.freeze(Object.defineProperty({__proto__:null,default:D},Symbol.toStringTag,{value:"Module"})),F={mode:"apply",label:"执行进度",icon:"⚙️",description:"OpenSpec change 执行进度 · zapply",Workspace:a.lazy(()=>O(()=>Promise.resolve().then(()=>K),void 0))};export{D as ApplyWorkspace,F as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/BatchDashboard-BigPUG8g.js","assets/index-yx7txO50.js","assets/index-BHL7sr_b.css"])))=>i.map(i=>d[i]);
2
+ import{j as t,r as e,_ as o}from"./index-yx7txO50.js";const r=e.lazy(()=>o(()=>import("./BatchDashboard-BigPUG8g.js"),__vite__mapDeps([0,1,2])));function a(){return t.jsx(r,{})}const p=Object.freeze(Object.defineProperty({__proto__:null,default:a},Symbol.toStringTag,{value:"Module"})),l={mode:"apply-batch",label:"批量执行",icon:"⚡",description:"zapply 批量并行执行驾驶舱",Workspace:e.lazy(()=>o(()=>Promise.resolve().then(()=>p),void 0))};export{a as ApplyBatchWorkspace,l as default};
@@ -1,7 +1,15 @@
1
- <!-- zview dashboard favicon:圆角方块 + v(配色同主题 light accent/ink) -->
1
+ <!-- zdashboard favicon: rounded square with subtle gradient + abstract dashboard mark -->
2
2
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
3
- <rect width="32" height="32" rx="7" fill="#18181b"/>
4
- <text x="16" y="17" text-anchor="middle" dominant-baseline="central"
5
- font-family="ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif"
6
- font-size="20" font-weight="700" fill="#fafafa">v</text>
3
+ <defs>
4
+ <linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">
5
+ <stop offset="0%" stop-color="#6366f1"/>
6
+ <stop offset="100%" stop-color="#8b5cf6"/>
7
+ </linearGradient>
8
+ </defs>
9
+ <rect width="32" height="32" rx="8" fill="url(#bg)"/>
10
+ <g fill="none" stroke="#ffffff" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
11
+ <rect x="8" y="10" width="4" height="12" rx="1.2" opacity="0.9"/>
12
+ <rect x="14" y="6" width="4" height="16" rx="1.2"/>
13
+ <rect x="20" y="13" width="4" height="9" rx="1.2" opacity="0.9"/>
14
+ </g>
7
15
  </svg>
@@ -5,8 +5,8 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
  <link rel="icon" href="/__app/favicon.svg" type="image/svg+xml" />
7
7
  <title>zdashboard · 项目洞察</title>
8
- <script type="module" crossorigin src="/assets/index-Co_rMXPa.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-4aiRmNbP.css">
8
+ <script type="module" crossorigin src="/assets/index-yx7txO50.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-BHL7sr_b.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zdashboard",
3
- "version": "2.6.2",
3
+ "version": "2.7.0",
4
4
  "description": "ZCode skill dashboard platform — pluggable viewers for zdesign/zview/zreview/zgoal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1 +0,0 @@
1
- *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-sans);font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--font-mono);font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--success: 142 76% 36%;--success-foreground: 0 0% 100%;--warning: 32 95% 44%;--warning-foreground: 0 0% 100%;--info: 199 89% 48%;--info-foreground: 0 0% 100%;--radius-sm: 6px;--radius-md: 10px;--radius-lg: 14px;--radius-xl: 18px;--radius-full: 9999px;--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);--shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--border-width: 1px;--text-xs: .75rem;--text-sm: .875rem;--text-base: 1rem;--text-lg: 1.125rem;--topbar-h: 52px;--statusbar-h: 28px;--chip-h: 19px;--icon-rail-w: 48px;--sidebar-w: 280px;--design-preview-h: 72px;--design-toolbar-h: 38px;--design-input-w: 50px;--review-sidebar-w: 240px;--token-card-min-w: 150px;--bug-title-max-w: 420px;--background: 0 0% 100%;--foreground: 240 10% 3.9%;--card: 0 0% 100%;--card-foreground: 240 10% 3.9%;--popover: 0 0% 100%;--popover-foreground: 240 10% 3.9%;--primary: 240 5.9% 10%;--primary-foreground: 0 0% 98%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 240 5.9% 90%;--input: 240 5.9% 90%;--ring: 240 10% 3.9%;--terminal-bg: 13 17 23;--terminal-fg: 201 209 217;--radius: .5rem}[data-mode=dark]{--success: 134 61% 64%;--success-foreground: 0 0% 100%;--warning: 38 92% 50%;--warning-foreground: 0 0% 100%;--info: 199 89% 48%;--info-foreground: 0 0% 100%;--background: 240 10% 3.9%;--foreground: 0 0% 98%;--card: 240 10% 3.9%;--card-foreground: 0 0% 98%;--popover: 240 10% 3.9%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 240 5.9% 10%;--secondary: 240 3.7% 15.9%;--secondary-foreground: 0 0% 98%;--muted: 240 3.7% 15.9%;--muted-foreground: 240 5% 64.9%;--accent: 240 3.7% 15.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 240 3.7% 15.9%;--input: 240 3.7% 15.9%;--ring: 240 4.9% 83.9%}*{border-color:hsl(var(--border))}body{background:hsl(var(--background));color:hsl(var(--foreground))}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px var(--tw-prose-kbd-shadows),0 3px 0 var(--tw-prose-kbd-shadows);font-size:.875em;border-radius:.3125rem;padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding-top:.8571429em;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-inline-start:1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: rgb(17 24 39 / 10%);--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: rgb(255 255 255 / 10%);--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.5714286em;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-inline-start:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;border-radius:.3125rem;padding-top:.1428571em;padding-inline-end:.3571429em;padding-bottom:.1428571em;padding-inline-start:.3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(.prose-sm>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-inline-start:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.dot-grid{background-image:radial-gradient(circle at 1px 1px,hsl(var(--border)) 1px,transparent 0);background-size:20px 20px}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.left-0{left:0}.right-0{right:0}.right-2{right:.5rem}.top-0{top:0}.top-1\/2{top:50%}.top-2{top:.5rem}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.col-span-full{grid-column:1 / -1}.m-0{margin:0}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[1px\]{height:1px}.h-\[var\(--chip-h\)\]{height:var(--chip-h)}.h-\[var\(--design-preview-h\)\]{height:var(--design-preview-h)}.h-\[var\(--design-toolbar-h\)\]{height:var(--design-toolbar-h)}.h-\[var\(--statusbar-h\)\]{height:var(--statusbar-h)}.h-\[var\(--topbar-h\)\]{height:var(--topbar-h)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\[80vh\]{max-height:80vh}.max-h-full{max-height:100%}.min-h-0{min-height:0px}.min-h-\[1\.25rem\]{min-height:1.25rem}.min-h-\[3\.4em\]{min-height:3.4em}.w-0{width:0px}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-44{width:11rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[1px\]{width:1px}.w-\[45\%\]{width:45%}.w-\[calc\(var\(--sidebar-w\)\*0\.78\)\]{width:calc(var(--sidebar-w) * .78)}.w-\[var\(--design-input-w\)\]{width:var(--design-input-w)}.w-\[var\(--icon-rail-w\)\]{width:var(--icon-rail-w)}.w-\[var\(--sidebar-w\)\]{width:var(--sidebar-w)}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[8rem\]{min-width:8rem}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-\[var\(--bug-title-max-w\)\]{max-width:var(--bug-title-max-w)}.max-w-\[var\(--sidebar-w\)\]{max-width:var(--sidebar-w)}.max-w-full{max-width:100%}.max-w-none{max-width:none}.flex-1{flex:1 1 0%}.flex-none{flex:none}.shrink-0{flex-shrink:0}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.place-items-center{place-items:center}.content-start{align-content:flex-start}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-7{gap:1.75rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-\[var\(--radius-full\)\]{border-radius:var(--radius-full)}.rounded-\[var\(--radius-lg\)\]{border-radius:var(--radius-lg)}.rounded-\[var\(--radius-md\)\]{border-radius:var(--radius-md)}.rounded-\[var\(--radius-sm\)\]{border-radius:var(--radius-sm)}.rounded-\[var\(--radius-xl\)\]{border-radius:var(--radius-xl)}.rounded-full{border-radius:var(--radius-full)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-l-\[var\(--radius-md\)\]{border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.rounded-r-\[var\(--radius-md\)\]{border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}.rounded-t-lg{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.border{border-width:var(--border-width)}.border-0{border-width:0px}.border-b{border-bottom-width:var(--border-width)}.border-l{border-left-width:var(--border-width)}.border-l-0{border-left-width:0px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:var(--border-width)}.border-r-0{border-right-width:0px}.border-t{border-top-width:var(--border-width)}.border-blue-500\/30{border-color:#3b82f64d}.border-border{border-color:hsl(var(--border))}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-destructive\/20{border-color:hsl(var(--destructive) / .2)}.border-destructive\/30{border-color:hsl(var(--destructive) / .3)}.border-info\/30{border-color:hsl(var(--info) / .3)}.border-input{border-color:hsl(var(--input))}.border-muted-foreground\/50{border-color:hsl(var(--muted-foreground) / .5)}.border-orange-500\/30{border-color:#f973164d}.border-primary{border-color:hsl(var(--primary))}.border-red-500\/30{border-color:#ef44444d}.border-success\/20{border-color:hsl(var(--success) / .2)}.border-success\/30{border-color:hsl(var(--success) / .3)}.border-success\/40{border-color:hsl(var(--success) / .4)}.border-transparent{border-color:transparent}.border-warning{border-color:hsl(var(--warning))}.border-warning\/30{border-color:hsl(var(--warning) / .3)}.border-yellow-500\/30{border-color:#eab3084d}.border-l-blue-400{--tw-border-opacity: 1;border-left-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-l-orange-400{--tw-border-opacity: 1;border-left-color:rgb(251 146 60 / var(--tw-border-opacity, 1))}.border-l-red-500{--tw-border-opacity: 1;border-left-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-background\/50{background-color:hsl(var(--background) / .5)}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/40{background-color:#0006}.bg-blue-500\/10{background-color:#3b82f61a}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-destructive\/15{background-color:hsl(var(--destructive) / .15)}.bg-info\/10{background-color:hsl(var(--info) / .1)}.bg-info\/15{background-color:hsl(var(--info) / .15)}.bg-muted{background-color:hsl(var(--muted))}.bg-muted-foreground{background-color:hsl(var(--muted-foreground))}.bg-muted-foreground\/30{background-color:hsl(var(--muted-foreground) / .3)}.bg-muted-foreground\/40{background-color:hsl(var(--muted-foreground) / .4)}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/60{background-color:hsl(var(--muted) / .6)}.bg-orange-500\/10{background-color:#f973161a}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-red-500\/10{background-color:#ef44441a}.bg-secondary{background-color:hsl(var(--secondary))}.bg-success{background-color:hsl(var(--success))}.bg-success\/10{background-color:hsl(var(--success) / .1)}.bg-success\/15{background-color:hsl(var(--success) / .15)}.bg-success\/60{background-color:hsl(var(--success) / .6)}.bg-terminal-bg{background-color:hsl(var(--terminal-bg))}.bg-warning\/10{background-color:hsl(var(--warning) / .1)}.bg-warning\/15{background-color:hsl(var(--warning) / .15)}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-px{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-3{padding-left:.75rem}.pr-2{padding-right:.5rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-2\.5{padding-top:.625rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:1.5rem;line-height:2rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-base{font-size:var(--text-base);line-height:1.5}.text-lg{font-size:var(--text-lg);line-height:1.5}.text-sm{font-size:var(--text-sm);line-height:1.5}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:var(--text-xs);line-height:1.5}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/80{color:hsl(var(--foreground) / .8)}.text-info{color:hsl(var(--info))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/50{color:hsl(var(--muted-foreground) / .5)}.text-muted-foreground\/60{color:hsl(var(--muted-foreground) / .6)}.text-muted-foreground\/70{color:hsl(var(--muted-foreground) / .7)}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-success{color:hsl(var(--success))}.text-terminal-fg{color:hsl(var(--terminal-fg))}.text-terminal-fg\/40{color:hsl(var(--terminal-fg) / .4)}.text-terminal-fg\/50{color:hsl(var(--terminal-fg) / .5)}.text-terminal-fg\/70{color:hsl(var(--terminal-fg) / .7)}.text-warning{color:hsl(var(--warning))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.no-underline{text-decoration-line:none}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-80{opacity:.8}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: var(--shadow-lg);--tw-shadow-colored: var(--shadow-lg);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: var(--shadow-md);--tw-shadow-colored: var(--shadow-md);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: var(--shadow-sm);--tw-shadow-colored: var(--shadow-sm);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-\[width\,transform\]{transition-property:width,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in,.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.slide-in-from-left-1{--tw-enter-translate-x: -.25rem}.duration-200{animation-duration:.2s}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.running{animation-play-state:running}.\[appearance\:textfield\]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}@media (prefers-color-scheme: dark){.dark\:prose-invert{--tw-prose-body: var(--tw-prose-invert-body);--tw-prose-headings: var(--tw-prose-invert-headings);--tw-prose-lead: var(--tw-prose-invert-lead);--tw-prose-links: var(--tw-prose-invert-links);--tw-prose-bold: var(--tw-prose-invert-bold);--tw-prose-counters: var(--tw-prose-invert-counters);--tw-prose-bullets: var(--tw-prose-invert-bullets);--tw-prose-hr: var(--tw-prose-invert-hr);--tw-prose-quotes: var(--tw-prose-invert-quotes);--tw-prose-quote-borders: var(--tw-prose-invert-quote-borders);--tw-prose-captions: var(--tw-prose-invert-captions);--tw-prose-kbd: var(--tw-prose-invert-kbd);--tw-prose-kbd-shadows: var(--tw-prose-invert-kbd-shadows);--tw-prose-code: var(--tw-prose-invert-code);--tw-prose-pre-code: var(--tw-prose-invert-pre-code);--tw-prose-pre-bg: var(--tw-prose-invert-pre-bg);--tw-prose-th-borders: var(--tw-prose-invert-th-borders);--tw-prose-td-borders: var(--tw-prose-invert-td-borders)}}.last\:border-0:last-child{border-width:0px}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-muted-foreground\/40:hover{border-color:hsl(var(--muted-foreground) / .4)}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/10:hover{background-color:hsl(var(--destructive) / .1)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/40:hover{background-color:hsl(var(--muted) / .4)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-muted\/70:hover{background-color:hsl(var(--muted) / .7)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-success:hover{background-color:hsl(var(--success))}.hover\:bg-success\/20:hover{background-color:hsl(var(--success) / .2)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-primary:focus{border-color:hsl(var(--primary))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:-translate-y-0\.5{--tw-translate-y: -.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:border-muted-foreground\/30{border-color:hsl(var(--muted-foreground) / .3)}.group:hover .group-hover\:bg-primary\/10{background-color:hsl(var(--primary) / .1)}.group:hover .group-hover\:opacity-100{opacity:1}.group:hover .group-hover\:shadow-md{--tw-shadow: var(--shadow-md);--tw-shadow-colored: var(--shadow-md);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.prose-headings\:scroll-mt-4 :is(:where(h1,h2,h3,h4,h5,h6,th):not(:where([class~=not-prose],[class~=not-prose] *))){scroll-margin-top:1rem}.prose-pre\:m-0 :is(:where(pre):not(:where([class~=not-prose],[class~=not-prose] *))){margin:0}.prose-pre\:bg-transparent :is(:where(pre):not(:where([class~=not-prose],[class~=not-prose] *))){background-color:transparent}.prose-pre\:p-0 :is(:where(pre):not(:where([class~=not-prose],[class~=not-prose] *))){padding:0}@media (min-width: 640px){.sm\:absolute{position:absolute}.sm\:relative{position:relative}.sm\:left-auto{left:auto}.sm\:top-auto{top:auto}.sm\:z-30{z-index:30}.sm\:z-auto{z-index:auto}.sm\:block{display:block}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:h-full{height:100%}.sm\:w-0{width:0px}.sm\:w-\[var\(--sidebar-w\)\]{width:var(--sidebar-w)}.sm\:max-w-none{max-width:none}.sm\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:border-r{border-right-width:var(--border-width)}.sm\:shadow-lg{--tw-shadow: var(--shadow-lg);--tw-shadow-colored: var(--shadow-lg);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.sm\:shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}}@media (min-width: 768px){.md\:flex{display:flex}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (min-width: 1280px){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (prefers-color-scheme: dark){.dark\:text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.dark\:text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.\[\&\:\:-webkit-outer-spin-button\]\:appearance-none::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}@font-face{font-family:VT323;font-style:normal;font-weight:400;font-display:swap;src:url(/assets/vt323-latin-400-normal-wDgJuOC9.woff2) format("woff2");size-adjust:135%}[data-theme=pixel]{--success: 134 61% 44%;--success-foreground: 0 0% 100%;--warning: 30 50% 40%;--warning-foreground: 0 0% 100%;--info: 199 64% 54%;--info-foreground: 0 0% 100%;--background: 240 21% 96%;--foreground: 240 21% 11%;--card: 240 21% 96%;--card-foreground: 240 21% 11%;--popover: 240 21% 96%;--popover-foreground: 240 21% 11%;--primary: 16 77% 61%;--primary-foreground: 0 0% 100%;--secondary: 250 30% 80%;--secondary-foreground: 240 21% 11%;--muted: 250 30% 80%;--muted-foreground: 220 14% 40%;--accent: 250 30% 80%;--accent-foreground: 240 21% 11%;--destructive: 0 60% 50%;--destructive-foreground: 0 0% 100%;--border: 240 15% 70%;--input: 240 15% 70%;--ring: 16 77% 61%;--radius-sm: 0px;--radius-md: 0px;--radius-lg: 0px;--radius-xl: 0px;--radius-full: 0px;--radius: 0px;--shadow-sm: none;--shadow-md: none;--shadow-lg: none;--border-width: 2px;--font-mono: "VT323", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--text-xs: .85rem;--text-sm: 1rem;--text-base: 1.15rem;--text-lg: 1.3rem;--topbar-h: 52px;--statusbar-h: 28px;--chip-h: 19px;--icon-rail-w: 48px}[data-theme=pixel][data-mode=dark]{--success: 134 61% 44%;--success-foreground: 0 0% 100%;--warning: 30 50% 40%;--warning-foreground: 0 0% 100%;--info: 199 64% 54%;--info-foreground: 0 0% 100%;--background: 240 21% 11%;--foreground: 0 0% 95%;--card: 240 25% 15%;--card-foreground: 0 0% 95%;--popover: 240 25% 15%;--popover-foreground: 0 0% 95%;--primary: 16 77% 61%;--primary-foreground: 0 0% 100%;--secondary: 250 30% 26%;--secondary-foreground: 0 0% 95%;--muted: 250 30% 26%;--muted-foreground: 220 14% 60%;--accent: 250 30% 26%;--accent-foreground: 0 0% 95%;--destructive: 0 60% 50%;--destructive-foreground: 0 0% 100%;--border: 240 25% 26%;--input: 240 25% 26%;--ring: 16 77% 61%;--radius-sm: 0px;--radius-md: 0px;--radius-lg: 0px;--radius-xl: 0px;--radius-full: 0px;--radius: 0px;--shadow-sm: none;--shadow-md: none;--shadow-lg: none;--border-width: 2px;--font-mono: "VT323", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--text-xs: .85rem;--text-sm: 1rem;--text-base: 1.15rem;--text-lg: 1.3rem;--topbar-h: 52px;--statusbar-h: 28px;--chip-h: 19px;--icon-rail-w: 48px}[data-theme=pixel] .dot-grid{background-size:12px 12px;background-image:radial-gradient(circle at 1px 1px,hsl(var(--border)) 1.2px,transparent 0)}[data-theme=slate]{--terminal-bg: 15 23 42;--terminal-fg: 241 245 249;--success: 142 76% 36%;--success-foreground: 0 0% 100%;--warning: 32 95% 44%;--warning-foreground: 0 0% 100%;--info: 199 89% 48%;--info-foreground: 0 0% 100%;--background: 248 250 252;--foreground: 15 23 42;--card: 248 250 252;--card-foreground: 15 23 42;--popover: 248 250 252;--popover-foreground: 15 23 42;--primary: 59 130 246;--primary-foreground: 0 0% 100%;--secondary: 241 245 249;--secondary-foreground: 15 23 42;--muted: 241 245 249;--muted-foreground: 100 116 139;--accent: 241 245 249;--accent-foreground: 15 23 42;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 100%;--border: 226 232 240;--input: 226 232 240;--ring: 59 130 246;--text-xs: .8rem;--text-sm: .95rem;--text-base: 1.1rem;--text-lg: 1.25rem;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--radius-full: 9999px;--border-width: 1px;--radius: 8px;--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);--shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1)}[data-theme=slate][data-mode=dark]{--terminal-bg: 2 6 23;--terminal-fg: 248 250 252;--success: 134 61% 64%;--success-foreground: 0 0% 100%;--warning: 38 92% 50%;--warning-foreground: 0 0% 100%;--info: 199 89% 48%;--info-foreground: 0 0% 100%;--background: 15 23 42;--foreground: 248 250 252;--card: 15 23 42;--card-foreground: 248 250 252;--popover: 15 23 42;--popover-foreground: 248 250 252;--primary: 96 165 250;--primary-foreground: 15 23 42;--secondary: 30 41 59;--secondary-foreground: 248 250 252;--muted: 30 41 59;--muted-foreground: 148 163 184;--accent: 30 41 59;--accent-foreground: 248 250 252;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 100%;--border: 30 41 59;--input: 30 41 59;--ring: 96 165 250;--text-xs: .8rem;--text-sm: .95rem;--text-base: 1.1rem;--text-lg: 1.25rem;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--radius-full: 9999px;--border-width: 1px;--radius: 8px;--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);--shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1)}
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Workspace-jCfxaTOM.js","assets/index-Co_rMXPa.js","assets/index-4aiRmNbP.css","assets/ProgressBar-ycyJBwG-.js"])))=>i.map(i=>d[i]);
2
- import{r as o,_ as t}from"./index-Co_rMXPa.js";const a={mode:"stats",label:"项目统计",icon:"📊",description:"项目文件统计 · 扫描生成",Workspace:o.lazy(()=>t(()=>import("./Workspace-jCfxaTOM.js"),__vite__mapDeps([0,1,2,3])))};export{a as default};
@@ -1 +0,0 @@
1
- import{u as g,r as a,j as e,B as p,E as f,_ as b}from"./index-Co_rMXPa.js";import{B as u}from"./badge-DUO7nDks.js";import{F as j}from"./FilterPills-CSZQenbh.js";const v=[{key:"mine",label:"我的"},{key:"all",label:"全部"},{key:"active",label:"active"},{key:"resolved",label:"resolved"},{key:"closed",label:"closed"}];function y({status:l}){const s=l==="active"?"destructive":l==="resolved"?"success":"neutral";return e.jsx(u,{variant:s,children:l})}function k({severity:l}){const s=Number(l),r=s<=1?"destructive":s===2||s===3?"warning":"neutral";return e.jsxs(u,{variant:r,children:["S",s]})}function N(){const{icon:l}=g(),[s,r]=a.useState(null),[m,i]=a.useState(!1),[n,x]=a.useState("mine"),o=a.useCallback(()=>{i(!0),fetch("/__bugs",{cache:"no-store"}).then(t=>t.json()).then(r).finally(()=>i(!1))},[]);a.useEffect(o,[o]);const h=t=>n==="all"?!0:n==="mine"?t.mine:t.status===n,c=s!=null&&s.ok?s.bugs.filter(h):[],d=s!=null&&s.ok?{mine:s.bugs.filter(t=>t.mine).length,all:s.bugs.length,active:s.bugs.filter(t=>t.status==="active").length,resolved:s.bugs.filter(t=>t.status==="resolved").length,closed:s.bugs.filter(t=>t.status==="closed").length}:null;return e.jsxs("div",{className:"mx-auto h-full max-w-6xl flex flex-col bg-background border rounded-lg shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"flex-none flex items-center gap-2 px-3 py-2 border-b",children:[e.jsx(j,{items:v.map(t=>({key:t.key,label:t.label,badge:d?String(d[t.key]):void 0})),value:n,onChange:x,ariaLabel:"状态筛选"}),e.jsx("span",{className:"ml-auto text-sm text-muted-foreground",children:"禅道 · 只读"}),e.jsx(p,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:o,title:"刷新",children:l("refresh-cw",`h-3.5 w-3.5 ${m?"animate-spin":""}`)})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:s?s.ok?c.length?e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{className:"sticky top-0 bg-background border-b",children:e.jsxs("tr",{className:"text-left text-muted-foreground",children:[e.jsx("th",{className:"px-3 py-2 font-medium w-16",children:"#"}),e.jsx("th",{className:"px-3 py-2 font-medium",children:"标题"}),e.jsx("th",{className:"px-3 py-2 font-medium w-14",children:"严重度"}),e.jsx("th",{className:"px-3 py-2 font-medium w-20",children:"状态"}),e.jsx("th",{className:"px-3 py-2 font-medium w-20",children:"指派"})]})}),e.jsx("tbody",{children:c.map(t=>e.jsxs("tr",{className:"border-b last:border-0 hover:bg-muted/40 transition-colors",children:[e.jsx("td",{className:"px-3 py-2 font-mono text-muted-foreground",children:t.id}),e.jsx("td",{className:"px-3 py-2",children:e.jsxs("button",{className:"text-left hover:text-primary hover:underline flex items-center gap-1",onClick:()=>window.open(`${s.url}/bug-view-${t.id}.html`,"_blank","noopener"),title:"在禅道打开",children:[e.jsx("span",{className:"truncate max-w-[var(--bug-title-max-w)]",children:t.title}),l("external-link","h-3 w-3 shrink-0 text-muted-foreground")]})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx(k,{severity:t.severity})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx(y,{status:t.status})}),e.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:t.assignedTo||"—"})]},t.id))})]}):e.jsx(f,{icon:l("bug","h-6 w-6"),title:n==="mine"?"没有指派给你的 bug":"该状态下无 bug",hint:"🎉"}):e.jsx("p",{className:"p-4 text-xs text-destructive",children:s.error}):e.jsx("p",{className:"p-4 text-xs text-muted-foreground",children:"加载中…"})})]})}function w(){return e.jsx(N,{})}const _=Object.freeze(Object.defineProperty({__proto__:null,default:w},Symbol.toStringTag,{value:"Module"})),T={mode:"bugs",label:"禅道 Bugs",icon:"🎯",description:"只读 bug 列表 · zgoal",Workspace:a.lazy(()=>b(()=>Promise.resolve().then(()=>_),void 0))};export{w as BugWorkspace,T as default};
@@ -1 +0,0 @@
1
- import{u as h,r as c,j as e,E as S,_ as N}from"./index-Co_rMXPa.js";import{C as _,M as V,I,F as C}from"./FileIcon-Bc03q6Gz.js";import{F as E}from"./FilterPills-CSZQenbh.js";import"./index-BrvOKJRF.js";let w=null;const j=new Set,p={get:()=>w,set:t=>{w=t,j.forEach(o=>o(t))},subscribe:t=>(j.add(t),()=>{j.delete(t)})};function R({path:t}){return e.jsx("iframe",{src:"/"+encodeURI(t),title:"预览",className:"w-full h-full border-0 bg-white"})}function F({path:t}){const[o,d]=c.useState([]),[l,r]=c.useState(!0);return c.useEffect(()=>{let s=!1;return r(!0),d([]),fetch("/"+encodeURI(t),{cache:"no-store"}).then(n=>n.text()).then(n=>{if(s)return;const m=n.match(/--[A-Za-z0-9_-]+\s*:\s*[^;}\n]+/g)??[];if(!m.length){d([]),r(!1);return}const i=u=>/^(#([0-9a-fA-F]{3,8})\b|rgb|rgba|hsl|hsla|oklch|oklab|color\()/i.test(u.trim()),a=m.filter(u=>i(u)),x=m.filter(u=>/font|family|type/.test(u.toLowerCase())&&!i(u)),b=m.filter(u=>!a.includes(u)&&!x.includes(u)),g=u=>{const v=u.indexOf(":"),k=u.slice(0,v).trim(),y=u.slice(v+1).trim();return{name:k,value:y}},f=[];a.length&&f.push({label:`配色 · ${a.length}`,items:a.map(g)}),x.length&&f.push({label:`字体 · ${x.length}`,items:x.map(g)}),b.length&&f.push({label:`其他 · ${b.length}`,items:b.map(g)}),d(f),r(!1)}).catch(()=>{s||(d([]),r(!1))}),()=>{s=!0}},[t]),l?e.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"解析中…"}):o.length?e.jsx("div",{className:"p-8 flex flex-col gap-7",children:o.map(s=>{const n=s.items.some(i=>/^(#|rgb|rgba|hsl|hsla|oklch|oklab|color\()/i.test(i.value)),m=s.items.some(i=>/font|family|type/i.test(i.name));return e.jsxs("section",{children:[e.jsx("div",{className:"mb-3 text-sm font-semibold uppercase text-muted-foreground",children:s.label}),n?e.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(var(--token-card-min-w), 1fr))"},children:s.items.filter(i=>/^(#|rgb|rgba|hsl|hsla|oklch|oklab|color\()/i.test(i.value)).map(({name:i,value:a})=>e.jsxs("div",{className:"overflow-hidden rounded-lg border bg-background",children:[e.jsx("div",{className:"h-[var(--design-preview-h)] border-b",style:{background:a}}),e.jsx("div",{className:"px-2.5 pt-2 font-mono text-sm break-all",children:i}),e.jsx("div",{className:"px-2.5 pb-2 text-xs text-muted-foreground",children:a})]},i))}):m?e.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(var(--token-card-min-w), 1fr))"},children:s.items.map(({name:i,value:a})=>e.jsxs("div",{className:"overflow-hidden rounded-lg border bg-background",children:[e.jsx("div",{className:"grid h-[var(--design-preview-h)] place-items-center text-2xl",style:{fontFamily:a},children:"Aa"}),e.jsx("div",{className:"px-2.5 font-mono text-sm",children:i})]},i))}):e.jsx("div",{className:"flex flex-col gap-1",children:s.items.map(({name:i,value:a})=>e.jsxs("div",{className:"flex justify-between gap-3 px-2.5 py-1.5 rounded border bg-background text-xs",children:[e.jsx("span",{className:"font-mono",children:i}),e.jsx("span",{className:"text-muted-foreground",children:a})]},i))})]},s.label)})}):e.jsx("p",{className:"p-3 text-xs",children:"未发现 CSS 变量"})}function P({path:t}){return e.jsx("div",{className:"grid place-items-center p-8",children:e.jsx("video",{src:"/"+encodeURI(t),controls:!0,className:"max-w-full max-h-[80vh] rounded border"})})}function U({path:t}){return e.jsx("div",{className:"grid place-items-center p-8",children:e.jsx("audio",{src:"/"+encodeURI(t),controls:!0,className:"w-full max-w-2xl"})})}function O({path:t}){return e.jsx("div",{className:"grid place-items-center p-8 h-full",children:e.jsx("iframe",{src:"/"+encodeURI(t),title:"PDF",className:"w-full h-full max-h-[80vh] rounded border bg-white"})})}function L({path:t}){const[o,d]=c.useState("");return c.useEffect(()=>{let l=!1,r="",s=null;return fetch("/"+encodeURI(t)).then(n=>n.blob()).then(async n=>{var m;if(!l){if(r=URL.createObjectURL(n),s=new FontFace("zd-font-preview",`url(${r})`),await s.load(),l){(m=s.dispose)==null||m.call(s);return}document.fonts.add(s),d(t.split("/").pop()??t)}}).catch(()=>{l||d(t.split("/").pop()??t)}),()=>{var n;if(l=!0,s)try{document.fonts.delete(s),(n=s.dispose)==null||n.call(s)}catch{}r&&URL.revokeObjectURL(r)}},[t]),e.jsxs("div",{className:"h-full overflow-auto p-8 grid gap-6 place-content-center text-center",children:[e.jsx("div",{className:"text-xs text-muted-foreground font-mono break-all",children:t}),e.jsx("div",{className:"text-5xl",style:{fontFamily:o?"'zd-font-preview', serif":"serif"},children:"Aa 字体预览 0123"})]})}function $({path:t}){const{icon:o}=h();return e.jsx("div",{className:"grid place-items-center h-full text-center text-muted-foreground",children:e.jsxs("div",{children:[o("image-off","h-10 w-10 mx-auto mb-3 opacity-50"),e.jsx("p",{children:"该格式无法预览"}),e.jsx("p",{className:"mt-1 font-mono text-xs break-all",children:t})]})})}const z={page:R,icon:I,token:F,md:V,video:P,audio:U,pdf:O,component:_,font:L};function T(t){return z[t]??$}function W({mode:t,onMode:o,w:d,h:l,onW:r,onH:s}){const{icon:n}=h(),m=[{v:0,icon:n("monitor","h-3.5 w-3.5"),label:"桌面"},{v:768,icon:n("tablet","h-3.5 w-3.5"),label:"768"},{v:375,icon:n("smartphone","h-3.5 w-3.5"),label:"375"},{v:"custom",icon:n("sliders-horizontal","h-3.5 w-3.5"),label:"自定义"}],i="w-[var(--design-input-w)] h-7 px-1 text-center text-xs rounded border border-border bg-background text-foreground [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none focus:outline-none focus:border-primary";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex items-center gap-1 rounded-md border border-border p-0.5 bg-muted",children:e.jsx(E,{items:m.map(a=>({key:String(a.v),label:a.label,renderLabel:()=>e.jsxs(e.Fragment,{children:[a.icon,e.jsx("span",{className:"hidden sm:inline",children:a.label})]})})),value:String(t),onChange:a=>o(a==="0"?0:a==="custom"?"custom":Number(a)),ariaLabel:"视口模式"})}),e.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx("input",{type:"number",value:d,min:280,max:3e3,step:8,onChange:a=>r(Number(a.target.value)),"aria-label":"自定义宽度",className:i}),e.jsx("span",{className:"text-muted-foreground/70",children:"×"}),e.jsx("input",{type:"number",value:l,min:400,max:3e3,step:8,onChange:a=>s(Number(a.target.value)),"aria-label":"自定义高度",className:i}),e.jsx("span",{className:"text-sm text-muted-foreground/70",children:"px"})]})]})}function A(){const{icon:t}=h(),[o,d]=c.useState(()=>p.get()),[l,r]=c.useState(0),[s,n]=c.useState(1024),[m,i]=c.useState(768);c.useEffect(()=>p.subscribe(d),[]);const a=o?T(o.type):null,x=l===0?"桌面":l==="custom"?`${s} × ${m}`:`${l}px`;return e.jsx("div",{className:"mx-auto h-full flex flex-col bg-background border rounded-lg shadow-sm overflow-hidden",children:o&&a?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"h-[var(--design-toolbar-h)] flex-none flex items-center justify-between px-3.5 border-b bg-background text-xs",children:[e.jsx("span",{className:"font-mono truncate",children:o.path}),e.jsx("span",{className:"text-muted-foreground ml-3 flex-none",children:x}),e.jsx(W,{mode:l,onMode:r,w:s,h:m,onW:n,onH:i})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:o.type==="page"?e.jsx("div",{className:"mx-auto bg-background overflow-hidden",style:{maxWidth:l===0?void 0:l==="custom"?s:l,height:l==="custom"?m:"100%"},children:e.jsx(a,{path:o.path})}):e.jsx("div",{className:"mx-auto max-w-5xl h-full overflow-auto",children:e.jsx(a,{path:o.path})})})]}):e.jsx(S,{icon:t("palette","h-6 w-6"),title:"从左侧选择一个资产预览",hint:"点左侧折叠钮展开资产树 · 改文件即时刷新",tone:"primary"})})}const D=Object.freeze(Object.defineProperty({__proto__:null,default:A},Symbol.toStringTag,{value:"Module"})),M={page:"monitor",component:"blocks",icon:"shapes",token:"palette",md:"book-open",video:"video",audio:"audio-lines",pdf:"file-text",font:"type"},G=[{key:"page",label:"页面"},{key:"component",label:"组件"},{key:"icon",label:"图标"},{key:"token",label:"Tokens"},{key:"md",label:"文档"},{key:"video",label:"视频"},{key:"audio",label:"音频"},{key:"pdf",label:"PDF"},{key:"font",label:"字体"}];function H(){const t=c.useSyncExternalStore(p.subscribe,p.get),[o,d]=c.useState(null);c.useEffect(()=>{fetch("/__design/assets",{cache:"no-store"}).then(r=>r.json()).then(d)},[]);const l=c.useMemo(()=>o?G.map(r=>({...r,items:o[r.key]??[]})).filter(r=>r.items.length>0):[],[o]);return o?e.jsxs("div",{children:[e.jsxs("div",{className:"p-3 text-xs text-muted-foreground",children:[l.reduce((r,s)=>r+s.items.length,0)," 个资产"]}),l.map(r=>e.jsx(Z,{group:r,current:t},r.key))]}):e.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"加载中…"})}function Z({group:t,current:o}){const[d,l]=c.useState(!0),{icon:r}=h(),s=M[t.key];return e.jsxs("div",{className:"mb-1.5 px-1",children:[e.jsxs("button",{onClick:()=>l(n=>!n),className:"w-full flex items-center gap-1.5 pt-2 pb-1 text-sm font-semibold uppercase tracking-wide text-muted-foreground hover:text-foreground rounded-md",children:[r("chevron-right",`h-3 w-3 shrink-0 transition-transform ${d?"rotate-90":""}`),s&&r(s,"h-3.5 w-3.5 shrink-0"),e.jsx("span",{className:"truncate",children:t.label}),e.jsx("span",{className:"ml-auto shrink-0 rounded-full bg-muted px-1.5 font-mono text-xs font-normal",children:t.items.length})]}),d&&t.items.map(n=>e.jsxs("button",{onClick:()=>p.set({path:n.path,type:n.type}),className:`w-full text-left flex items-center gap-2 px-2.5 py-1.5 text-xs hover:bg-muted rounded-md ${(o==null?void 0:o.path)===n.path?"bg-primary/10 text-foreground font-medium":"text-muted-foreground"}`,children:[e.jsx(C,{name:n.name,active:(o==null?void 0:o.path)===n.path}),e.jsx("span",{className:"truncate",children:n.name}),n.ext&&e.jsx("span",{className:"ml-auto font-mono text-xs text-muted-foreground/60",children:n.ext})]},n.path))]})}const q=Object.freeze(Object.defineProperty({__proto__:null,default:H},Symbol.toStringTag,{value:"Module"})),X={mode:"design",label:"设计资产",icon:"🎨",description:"设计资产分类浏览 · zdesign",Sidebar:c.lazy(()=>N(()=>Promise.resolve().then(()=>q),void 0)),Workspace:c.lazy(()=>N(()=>Promise.resolve().then(()=>D),void 0))};export{H as DesignSidebar,A as DesignWorkspace,X as default};
@@ -1 +0,0 @@
1
- import{u as k,j as t,r as c,E as B,_ as z}from"./index-Co_rMXPa.js";import{C as q,M as J,I as K,F as Q}from"./FileIcon-Bc03q6Gz.js";import"./index-BrvOKJRF.js";function T({path:e}){const{icon:s}=k();return t.jsx("div",{className:"grid place-items-center h-full text-center text-muted-foreground",children:t.jsxs("div",{children:[s("file-question","h-10 w-10 mx-auto mb-3 opacity-50"),t.jsx("p",{children:"该格式无法预览"}),t.jsx("p",{className:"mt-1 font-mono text-xs break-all",children:e})]})})}let G=null;const $=new Set,y={get:()=>G,set:e=>{G=e,$.forEach(s=>s(e))},subscribe:e=>($.add(e),()=>{$.delete(e)})};function X({containerRef:e}){const{icon:s}=k(),[r,f]=c.useState([]),[h,o]=c.useState(null);c.useEffect(()=>{const i=e.current;if(!i)return;let u=!1;const a=()=>{if(u)return;const l=i.querySelectorAll("h1[id], h2[id], h3[id]"),x=[];l.forEach(b=>{var g;x.push({id:b.id,text:((g=b.textContent)==null?void 0:g.trim())??"",level:parseInt(b.tagName[1],10)})}),f(x)};a();const n=new MutationObserver(a);return n.observe(i,{childList:!0,subtree:!0,characterData:!0}),()=>{u=!0,n.disconnect()}},[e]),c.useEffect(()=>{const i=e.current;if(!i||!r.length)return;const u=new IntersectionObserver(a=>{const n=a.filter(l=>l.isIntersecting);if(n.length){const l=n.reduce((x,b)=>x.boundingClientRect.top<b.boundingClientRect.top?x:b);o(l.target.id)}},{root:i,rootMargin:"-60px 0px -70% 0px",threshold:0});return r.forEach(({id:a})=>{const n=i.querySelector(`#${CSS.escape(a)}`);n&&u.observe(n)}),()=>u.disconnect()},[r,e]);const d=i=>{var a;const u=(a=e.current)==null?void 0:a.querySelector(`#${CSS.escape(i)}`);u==null||u.scrollIntoView({behavior:"smooth",block:"start"})};return r.length?t.jsxs("nav",{className:"hidden md:flex w-44 shrink-0 flex-col border-l pl-3 py-2 overflow-y-auto","aria-label":"文档大纲",children:[t.jsxs("div",{className:"flex items-center gap-1 mb-2 text-sm font-medium text-muted-foreground uppercase tracking-wider",children:[s("file-text","h-3 w-3"),t.jsx("span",{children:"大纲"})]}),t.jsx("ul",{className:"space-y-0.5",children:r.map(i=>t.jsx("li",{children:t.jsx("button",{type:"button",onClick:()=>d(i.id),className:`w-full text-left text-sm leading-snug py-0.5 px-1.5 rounded truncate transition-colors ${h===i.id?"bg-primary/10 text-foreground font-medium":"text-muted-foreground hover:bg-muted/70"}`,style:{paddingLeft:6+(i.level-1)*10},children:i.text||i.id})},i.id))})]}):null}const Y=2500;function Z(e){const s=e.slice(e.lastIndexOf("/")+1).toLowerCase();if(s==="justfile"||s==="makefile")return q;const r=e.slice(e.lastIndexOf(".")).toLowerCase();return r===".md"||r===".markdown"?J:[".svg",".png",".jpg",".jpeg",".gif",".webp",".ico"].includes(r)?K:[".sql",".txt",".csv",".tsv",".json",".yaml",".yml",".xml",".py",".js",".ts",".java",".go",".rs",".rb",".php",".c",".cpp",".h",".cs",".swift",".kt",".scala",".sh",".bash",".zsh",".fish",".env",".gitignore",".dockerfile"].includes(r)?q:T}function ee(e){const{icon:s}=k(),[r,f]=c.useState(()=>y.get()),[h,o]=c.useState(!1),d=c.useRef(null),i=r?Z(r):null;return c.useEffect(()=>y.subscribe(f),[]),c.useEffect(()=>{const u=d.current;if(!u)return;const a=()=>{var x;const l=((x=u.textContent)==null?void 0:x.length)??0;o(l>Y)};a();const n=new MutationObserver(a);return n.observe(u,{childList:!0,subtree:!0,characterData:!0}),()=>n.disconnect()},[r]),t.jsx("div",{className:"mx-auto h-full max-w-5xl bg-background border rounded-lg shadow-sm overflow-hidden flex flex-col",children:r&&i?t.jsxs("div",{className:"flex-1 min-h-0 flex overflow-hidden",children:[t.jsx("div",{ref:d,className:"flex-1 min-h-0 overflow-auto",children:t.jsx(i,{path:r})}),h&&t.jsx(X,{containerRef:d})]}):t.jsx(B,{icon:s("eye","h-6 w-6"),title:"从左侧选择文件预览",hint:"支持 Markdown、图片、代码等格式",tone:"primary"})})}const te=Object.freeze(Object.defineProperty({__proto__:null,default:ee},Symbol.toStringTag,{value:"Module"}));function re(e,s,r,f){var h=this,o=c.useRef(null),d=c.useRef(0),i=c.useRef(0),u=c.useRef(null),a=c.useRef([]),n=c.useRef(),l=c.useRef(),x=c.useRef(e),b=c.useRef(!0),g=c.useRef(),O=c.useRef();x.current=e;var L=typeof window<"u",N=!s&&s!==0&&L;if(typeof e!="function")throw new TypeError("Expected a function");s=+s||0;var R=!!(r=r||{}).leading,I=!("trailing"in r)||!!r.trailing,S=!!r.flushOnExit&&I,w="maxWait"in r,W="debounceOnServer"in r&&!!r.debounceOnServer,D=w?Math.max(+r.maxWait||0,s):null,A=c.useMemo(function(){var v=function(m){var p=a.current,j=n.current;return a.current=n.current=null,d.current=m,i.current=i.current||m,l.current=x.current.apply(j,p)},E=function(m,p){N&&cancelAnimationFrame(u.current),u.current=N?requestAnimationFrame(m):setTimeout(m,p)},F=function(m){if(!b.current)return!1;var p=m-o.current;return!o.current||p>=s||p<0||w&&m-d.current>=D},P=function(m){return u.current=null,I&&a.current?v(m):(a.current=n.current=null,l.current)},M=function m(){var p=Date.now();if(R&&i.current===d.current&&U(),F(p))return P(p);if(b.current){var j=s-(p-o.current),C=w?Math.min(j,D-(p-d.current)):j;E(m,C)}},U=function(){f&&f({})},_=function(){if(L||W){var m,p=Date.now(),j=F(p);if(a.current=[].slice.call(arguments),n.current=h,o.current=p,S&&!g.current&&(g.current=function(){var C;((C=globalThis.document)==null?void 0:C.visibilityState)==="hidden"&&O.current.flush()},(m=globalThis.document)==null||m.addEventListener==null||m.addEventListener("visibilitychange",g.current)),j){if(!u.current&&b.current)return d.current=o.current,E(M,s),R?v(o.current):l.current;if(w)return E(M,s),v(o.current)}return u.current||E(M,s),l.current}};return _.cancel=function(){var m=u.current;m&&(N?cancelAnimationFrame(u.current):clearTimeout(u.current)),d.current=0,a.current=o.current=n.current=u.current=null,m&&f&&f({})},_.isPending=function(){return!!u.current},_.flush=function(){return u.current?P(Date.now()):l.current},_},[R,w,s,D,I,S,N,L,W,f]);return O.current=A,c.useEffect(function(){return b.current=!0,function(){var v;S&&O.current.flush(),g.current&&((v=globalThis.document)==null||v.removeEventListener==null||v.removeEventListener("visibilitychange",g.current),g.current=null),b.current=!1}},[S]),A}function ne(e,s){return e===s}function se(e,s,r){var f=ne,h=c.useRef(e),o=c.useState({})[1],d=re(c.useCallback(function(u){h.current=u,o({})},[o]),s,r,o),i=c.useRef(e);return f(i.current,e)||(d(e),i.current=e),[h.current,d]}function V(e,s){return!s||e.name.toLowerCase().includes(s)?!0:(e.children??[]).some(r=>V(r,s))}function H({node:e,depth:s,filter:r,current:f,onSelectFile:h}){const o=(e.children??[]).filter(n=>V(n,r)),[d,i]=c.useState(!e.defaultCollapsed),u=r?!0:d;if(!o.length&&r)return null;const{icon:a}=k();return t.jsxs("div",{children:[(()=>{const n=e.name.match(/^([a-z]+)(?: \((\d+)\))?$/),l=n?a(n[1]):void 0;return t.jsxs("button",{onClick:()=>i(x=>!x),className:"w-full flex items-center gap-1.5 px-2 py-1 text-sm text-foreground hover:bg-muted rounded-md mx-1",style:{paddingLeft:8+s*14,width:"calc(100% - 8px)"},children:[t.jsx("span",{className:`h-3 w-3 shrink-0 inline-flex items-center justify-center text-muted-foreground transition-transform ${u?"rotate-90":""}`,children:a("chevron-right")}),l?t.jsx("span",{className:"h-3.5 w-3.5 shrink-0 inline-flex items-center justify-center text-muted-foreground",children:l}):t.jsx("span",{className:"h-3.5 w-3.5 shrink-0 inline-flex items-center justify-center text-muted-foreground transition-colors",children:a(u?"folder-open":"folder")}),t.jsx("span",{className:"font-medium truncate",children:n?n[1]:e.name}),(n==null?void 0:n[2])&&t.jsx("span",{className:"ml-auto mr-1 shrink-0 rounded-full bg-muted px-1.5 text-xs font-mono text-muted-foreground",children:n[2]})]})})(),u&&o.map(n=>n.kind==="dir"?t.jsx(H,{node:n,depth:s+1,filter:r,current:f,onSelectFile:h},n.name+s):t.jsxs("button",{onClick:()=>n.path&&h(n.path),className:`w-full flex items-center gap-1.5 pr-2 py-1 text-sm hover:bg-muted rounded-md mx-1 ${f===n.path?"bg-primary/10 text-foreground font-medium":"text-muted-foreground"}`,style:{paddingLeft:20+s*14,width:"calc(100% - 8px)"},children:[t.jsx(Q,{name:n.name,active:f===n.path}),t.jsx("span",{className:"truncate",children:n.name})]},n.path))]})}function ce({worktrees:e}){const[s,r]=c.useState(!0),{icon:f}=k(),h=o=>{window.dispatchEvent(new CustomEvent("zd-dashboard-nav",{detail:{mode:"apply",wt:o.name}}))};return t.jsxs("div",{className:"mb-1",children:[t.jsxs("button",{onClick:()=>r(o=>!o),className:"w-full flex items-center gap-1 px-2 py-1.5 text-sm font-medium text-muted-foreground tracking-wide hover:text-foreground",children:[t.jsx("span",{className:`h-3 w-3 inline-flex items-center justify-center transition-transform ${s?"rotate-90":""}`,children:f("chevron-right")}),t.jsx("span",{className:"h-3 w-3 inline-flex items-center justify-center",children:f("git-branch")}),t.jsxs("span",{children:["Worktrees (",e.length,")"]})]}),s&&e.map(o=>t.jsxs("button",{onClick:()=>h(o),title:`${o.branch}${o.dirty?" · 有未提交变更":""}`,className:"w-full flex items-center gap-1.5 px-2 py-1 text-sm text-foreground hover:bg-muted border-l-2 border-transparent",style:{paddingLeft:14},children:[t.jsx("span",{className:"truncate font-mono text-sm",children:o.branch}),t.jsxs("span",{className:"text-muted-foreground truncate",children:["/",o.name]}),o.dirty&&t.jsx("span",{className:"ml-auto flex-none h-2 w-2 rounded-full bg-destructive shrink-0",title:"有未提交变更"})]},o.name))]})}function oe({navTarget:e}){const s=c.useSyncExternalStore(y.subscribe,y.get),[r,f]=c.useState(null),[h,o]=c.useState(""),[d]=se(h,150),[i,u]=c.useState([]);c.useEffect(()=>{e!=null&&e.filter&&o(e.filter)},[e==null?void 0:e.filter,e==null?void 0:e.navToken]),c.useEffect(()=>{fetch("/__files",{cache:"no-store"}).then(l=>l.json()).then(l=>f(l.tree??[]))},[]),c.useEffect(()=>{fetch("/__worktrees",{cache:"no-store"}).then(l=>l.json()).then(u).catch(()=>u([]))},[]);const a=c.useMemo(()=>r?r.filter(l=>V(l,d)):[],[r,d]),n=i.length>0;return t.jsxs("div",{className:"p-2",children:[t.jsx("input",{value:h,onChange:l=>o(l.target.value.toLowerCase()),placeholder:"过滤…",className:"w-full h-7 px-2 text-xs rounded border border-border bg-background focus:outline-none focus:border-primary"}),r?!a.length&&!n?t.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"无匹配"}):t.jsxs("div",{className:"py-1",children:[n&&t.jsx(ce,{worktrees:i}),a.map(l=>t.jsx(H,{node:l,depth:0,filter:d,current:s,onSelectFile:x=>y.set(x)},l.name))]}):t.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"加载中…"})]})}const ue=Object.freeze(Object.defineProperty({__proto__:null,default:oe},Symbol.toStringTag,{value:"Module"})),de={mode:"view",label:"项目浏览",icon:"👁️",description:"openspec / docs / 文档预览",Sidebar:c.lazy(()=>z(()=>Promise.resolve().then(()=>ue),void 0)),Workspace:c.lazy(()=>z(()=>Promise.resolve().then(()=>te),void 0))};export{oe as ViewSidebar,ee as ViewWorkspace,de as default};