claudeship 0.2.18 → 0.2.20

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 (48) hide show
  1. package/apps/server/package.json +1 -1
  2. package/apps/web/.next/BUILD_ID +1 -1
  3. package/apps/web/.next/app-build-manifest.json +6 -6
  4. package/apps/web/.next/app-path-routes-manifest.json +1 -1
  5. package/apps/web/.next/build-manifest.json +2 -2
  6. package/apps/web/.next/cache/.previewinfo +1 -1
  7. package/apps/web/.next/cache/.rscinfo +1 -1
  8. package/apps/web/.next/cache/.tsbuildinfo +1 -1
  9. package/apps/web/.next/cache/config.json +3 -3
  10. package/apps/web/.next/cache/eslint/.cache_j3uhuz +1 -1
  11. package/apps/web/.next/cache/webpack/client-production/0.pack +0 -0
  12. package/apps/web/.next/cache/webpack/client-production/index.pack +0 -0
  13. package/apps/web/.next/cache/webpack/edge-server-production/index.pack +0 -0
  14. package/apps/web/.next/cache/webpack/server-production/0.pack +0 -0
  15. package/apps/web/.next/cache/webpack/server-production/index.pack +0 -0
  16. package/apps/web/.next/prerender-manifest.json +9 -9
  17. package/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  18. package/apps/web/.next/server/app/_not-found.html +1 -1
  19. package/apps/web/.next/server/app/_not-found.rsc +2 -2
  20. package/apps/web/.next/server/app/index.html +1 -1
  21. package/apps/web/.next/server/app/index.rsc +3 -3
  22. package/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  23. package/apps/web/.next/server/app/project/[id]/page.js +1 -1
  24. package/apps/web/.next/server/app/project/[id]/page_client-reference-manifest.js +1 -1
  25. package/apps/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  26. package/apps/web/.next/server/app/settings.html +1 -1
  27. package/apps/web/.next/server/app/settings.rsc +2 -2
  28. package/apps/web/.next/server/app-paths-manifest.json +1 -1
  29. package/apps/web/.next/server/pages/404.html +1 -1
  30. package/apps/web/.next/server/pages/500.html +1 -1
  31. package/apps/web/.next/server/server-reference-manifest.json +1 -1
  32. package/apps/web/.next/static/chunks/87-e65fb39b36fc5ac8.js +1 -0
  33. package/apps/web/.next/static/chunks/app/page-8310956d8eae9762.js +1 -0
  34. package/apps/web/.next/static/chunks/app/project/[id]/page-3d9d2622b2801ab0.js +1 -0
  35. package/apps/web/.next/static/css/b92103813bcb2a3c.css +3 -0
  36. package/apps/web/.next/trace +18 -18
  37. package/apps/web/package.json +1 -1
  38. package/apps/web/src/components/chat/MessageInput.tsx +5 -8
  39. package/apps/web/src/components/chat/QueuePreview.tsx +98 -0
  40. package/apps/web/src/components/chat/StreamingMessage.tsx +126 -20
  41. package/apps/web/src/stores/useChatStore.ts +26 -6
  42. package/package.json +1 -1
  43. package/apps/web/.next/static/chunks/574-8fbf7d67ac55f996.js +0 -1
  44. package/apps/web/.next/static/chunks/app/page-637614a00e18faa8.js +0 -1
  45. package/apps/web/.next/static/chunks/app/project/[id]/page-c28098a9b8a94336.js +0 -1
  46. package/apps/web/.next/static/css/0a24552d9794f8c8.css +0 -3
  47. /package/apps/web/.next/static/{_uY1B78_jnG7JywlmeEpm → 91tvQbwE6MrVEkEolpLDW}/_buildManifest.js +0 -0
  48. /package/apps/web/.next/static/{_uY1B78_jnG7JywlmeEpm → 91tvQbwE6MrVEkEolpLDW}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{559:(e,t,r)=>{Promise.resolve().then(r.bind(r,8028))},660:(e,t,r)=>{"use strict";r.d(t,{F:()=>o});let a="http://localhost:14000/api";async function s(e,t){let r="".concat(a).concat(e),s=await fetch(r,{...t,headers:{"Content-Type":"application/json",...null==t?void 0:t.headers}});if(!s.ok)throw Error((await s.json().catch(()=>({message:"Request failed"}))).message||"HTTP error! status: ".concat(s.status));if(204!==s.status)return s.json()}let o={get:e=>s(e),post:(e,t)=>s(e,{method:"POST",body:t?JSON.stringify(t):void 0}),put:(e,t)=>s(e,{method:"PUT",body:t?JSON.stringify(t):void 0}),delete:(e,t)=>s(e,{method:"DELETE",body:t?JSON.stringify(t):void 0}),uploadFiles:async(e,t)=>{let r=new FormData;t.forEach(e=>r.append("files",e));let s="".concat(a,"/projects/").concat(e,"/files/upload"),o=await fetch(s,{method:"POST",body:r});if(!o.ok)throw Error((await o.json().catch(()=>({message:"Upload failed"}))).message||"HTTP error! status: ".concat(o.status));return o.json()}}},3300:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(8964).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},3792:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(8964).A)("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]])},3973:(e,t,r)=>{"use strict";var a=r(6145);r.o(a,"useParams")&&r.d(t,{useParams:function(){return a.useParams}}),r.o(a,"useRouter")&&r.d(t,{useRouter:function(){return a.useRouter}})},4264:(e,t,r)=>{"use strict";r.d(t,{I:()=>o});var a=r(4876),s=r(660);let o=(0,a.v)((e,t)=>({projects:[],currentProject:null,isLoading:!1,error:null,fetchProjects:async()=>{e({isLoading:!0,error:null});try{let t=await s.F.get("/projects");e({projects:t,isLoading:!1})}catch(t){e({error:t instanceof Error?t.message:"Failed to fetch projects",isLoading:!1})}},createProject:async t=>{e({isLoading:!0,error:null});try{let r=await s.F.post("/projects",t);return e(e=>({projects:[{id:r.id,name:r.name,projectType:r.projectType,backendFramework:r.backendFramework,updatedAt:r.updatedAt},...e.projects],isLoading:!1})),r}catch(t){throw e({error:t instanceof Error?t.message:"Failed to create project",isLoading:!1}),t}},deleteProject:async t=>{e({isLoading:!0,error:null});try{await s.F.delete("/projects/".concat(t)),e(e=>({projects:e.projects.filter(e=>e.id!==t),isLoading:!1}))}catch(t){throw e({error:t instanceof Error?t.message:"Failed to delete project",isLoading:!1}),t}},fetchProject:async t=>{e({isLoading:!0,error:null});try{let r=await s.F.get("/projects/".concat(t));e({currentProject:r,isLoading:!1})}catch(t){e({error:t instanceof Error?t.message:"Failed to fetch project",isLoading:!1})}},setCurrentProject:t=>e({currentProject:t}),clearError:()=>e({error:null})}))},4539:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(8964).A)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},4859:(e,t,r)=>{"use strict";r.d(t,{V_:()=>s,gM:()=>a,Xh:()=>o});var a=function(e){return e.WEB="WEB",e.NATIVE="NATIVE",e}({}),s=function(e){return e.NONE="NONE",e.EXPRESS="EXPRESS",e.FASTAPI="FASTAPI",e}({}),o=function(e){return e.USER="USER",e.ASSISTANT="ASSISTANT",e.SYSTEM="SYSTEM",e}({})},5338:(e,t,r)=>{"use strict";r.d(t,{p:()=>n});var a=r(8481),s=r(8526),o=r(9049);let n=s.forwardRef((e,t)=>{let{className:r,type:s,...n}=e;return(0,a.jsx)("input",{type:s,className:(0,o.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",r),ref:t,...n})});n.displayName="Input"},5594:(e,t,r)=>{"use strict";r.d(t,{$:()=>l});var a=r(8481),s=r(8526),o=r(4176),n=r(9049);let i=(0,o.F)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),l=s.forwardRef((e,t)=>{let{className:r,variant:s,size:o,...l}=e;return(0,a.jsx)("button",{className:(0,n.cn)(i({variant:s,size:o,className:r})),ref:t,...l})});l.displayName="Button"},6224:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(8964).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},7176:(e,t,r)=>{"use strict";r.d(t,{Y:()=>u});var a=r(8481),s=r(4816),o=r.n(s),n=r(9432),i=r(9150),l=r(7746),c=r(5594),d=r(9426);function p(){let{locale:e,setLocale:t,t:r}=(0,d.B)();return(0,a.jsx)(c.$,{variant:"ghost",size:"icon",onClick:()=>{t("en"===e?"ko":"en")},className:"h-9 w-9 text-xs font-medium",title:r("language.select"),children:"en"===e?"EN":"KO"})}function u(e){let{title:t,showBack:r,backHref:s="/"}=e,{t:u}=(0,d.B)(),m=t||u("common.appName");return(0,a.jsx)("header",{className:"sticky top-0 z-40 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:(0,a.jsxs)("div",{className:"flex h-14 w-full items-center justify-between px-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[r?(0,a.jsx)(o(),{href:s,children:(0,a.jsx)(c.$,{variant:"ghost",size:"icon",className:"h-9 w-9",children:(0,a.jsx)(i.A,{className:"h-5 w-5"})})}):(0,a.jsx)(n.default,{src:"/logo.svg",alt:"ClaudeShip",width:36,height:36,className:"rounded-lg"}),(0,a.jsx)("h1",{className:"text-lg font-semibold",children:m})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(p,{}),(0,a.jsx)(o(),{href:"/settings",children:(0,a.jsx)(c.$,{variant:"ghost",size:"icon",className:"h-9 w-9",title:u("header.settings"),children:(0,a.jsx)(l.A,{className:"h-5 w-5"})})})]})]})})}},8028:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>R});var a=r(8481),s=r(8526),o=r(3973),n=r(7176),i=r(4816),l=r.n(i),c=r(6224),d=r(3792),p=r(3300),u=r(8964);let m=(0,u.A)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);var h=r(9049);let g=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,h.cn)("rounded-xl border bg-card text-card-foreground shadow",r),...s})});g.displayName="Card",s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,h.cn)("flex flex-col space-y-1.5 p-6",r),...s})}).displayName="CardHeader",s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("h3",{ref:t,className:(0,h.cn)("font-semibold leading-none tracking-tight",r),...s})}).displayName="CardTitle",s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("p",{ref:t,className:(0,h.cn)("text-sm text-muted-foreground",r),...s})}).displayName="CardDescription",s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,h.cn)("p-6 pt-0",r),...s})}).displayName="CardContent",s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,h.cn)("flex items-center p-6 pt-0",r),...s})}).displayName="CardFooter";var x=r(5594),f=r(4859),j=r(9426);function y(e){var t;let{project:r,onDelete:s}=e,{locale:o}=(0,j.B)(),n=(r.projectType,(t=r.backendFramework)===f.V_.EXPRESS?"from-green-500/20 to-emerald-500/5":t===f.V_.FASTAPI?"from-teal-500/20 to-cyan-500/5":"from-blue-500/20 to-indigo-500/5");return(0,a.jsx)(l(),{href:"/project/".concat(r.id),children:(0,a.jsxs)(g,{className:"group relative cursor-pointer overflow-hidden border transition-all hover:border-primary/50 hover:shadow-lg",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br ".concat(n," opacity-0 transition-opacity group-hover:opacity-100")}),(0,a.jsxs)("div",{className:"relative p-4",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10 text-primary",children:function(e){switch(e){case f.gM.WEB:return(0,a.jsx)(c.A,{className:"h-5 w-5"});case f.gM.NATIVE:return(0,a.jsx)(d.A,{className:"h-5 w-5"});default:return(0,a.jsx)(c.A,{className:"h-5 w-5"})}}(r.projectType)}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("h3",{className:"truncate font-semibold",children:r.name}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:function(e,t){let r=new Date().getTime()-new Date(e).getTime(),a=Math.floor(r/6e4),s=Math.floor(r/36e5),o=Math.floor(r/864e5);return"ko"===t?a<1?"방금 전":a<60?"".concat(a,"분 전"):s<24?"".concat(s,"시간 전"):o<7?"".concat(o,"일 전"):new Date(e).toLocaleDateString("ko-KR"):a<1?"Just now":a<60?"".concat(a,"m ago"):s<24?"".concat(s,"h ago"):o<7?"".concat(o,"d ago"):new Date(e).toLocaleDateString("en-US")}(r.updatedAt,o)})]})]}),s&&(0,a.jsx)(x.$,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0 opacity-0 transition-opacity group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),s(r.id)},children:(0,a.jsx)(p.A,{className:"h-4 w-4 text-destructive"})})]}),(0,a.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[r.backendFramework!==f.V_.NONE&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium",children:[(0,a.jsx)(m,{className:"h-3 w-3"}),r.backendFramework===f.V_.EXPRESS?"Express":"FastAPI"]}),(0,a.jsx)("span",{className:"rounded-full bg-secondary px-2.5 py-0.5 text-xs text-muted-foreground",children:r.projectType===f.gM.WEB?"Web":"Native"})]})]})]})})}var N=r(4539);let v=(0,u.A)("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);function b(e){let{onClick:t}=e,{t:r}=(0,j.B)();return(0,a.jsxs)(g,{className:"group relative cursor-pointer overflow-hidden border-2 border-dashed transition-all hover:border-primary hover:shadow-lg",onClick:t,children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/10 to-primary/5 opacity-0 transition-opacity group-hover:opacity-100"}),(0,a.jsxs)("div",{className:"relative flex h-full min-h-[140px] flex-col items-center justify-center gap-3 p-6",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-xl bg-primary/10 transition-colors group-hover:bg-primary/20",children:(0,a.jsx)(N.A,{className:"h-6 w-6 text-primary transition-transform group-hover:scale-110"})}),(0,a.jsx)(v,{className:"absolute -right-1 -top-1 h-4 w-4 text-primary opacity-0 transition-opacity group-hover:opacity-100"})]}),(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("span",{className:"font-medium text-muted-foreground transition-colors group-hover:text-foreground",children:r("project.create")}),(0,a.jsx)("p",{className:"mt-1 text-xs text-muted-foreground/70",children:r("project.createDescription")})]})]})]})}function w(e){let{projects:t,onCreateClick:r,onDelete:s}=e;return(0,a.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:[t.map(e=>(0,a.jsx)(y,{project:e,onDelete:s},e.id)),(0,a.jsx)(b,{onClick:r})]})}let k=e=>{let{open:t,onOpenChange:r,children:s}=e;return t?(0,a.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,a.jsx)("div",{className:"fixed inset-0 bg-black/80",onClick:()=>null==r?void 0:r(!1)}),s]}):null},E=s.forwardRef((e,t)=>{let{className:r,children:s,...o}=e;return(0,a.jsx)("div",{ref:t,className:(0,h.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg sm:rounded-lg",r),onClick:e=>e.stopPropagation(),...o,children:s})});E.displayName="DialogContent";let S=e=>{let{className:t,...r}=e;return(0,a.jsx)("div",{className:(0,h.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...r})};S.displayName="DialogHeader";let A=e=>{let{className:t,...r}=e;return(0,a.jsx)("div",{className:(0,h.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...r})};A.displayName="DialogFooter";let P=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("h2",{ref:t,className:(0,h.cn)("text-lg font-semibold leading-none tracking-tight",r),...s})});P.displayName="DialogTitle";let C=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("p",{ref:t,className:(0,h.cn)("text-sm text-muted-foreground",r),...s})});C.displayName="DialogDescription";var F=r(5338);function T(e){let{open:t,onOpenChange:r,onSubmit:o,isLoading:n}=e,{t:i}=(0,j.B)(),[l,c]=(0,s.useState)(""),[d,p]=(0,s.useState)(f.gM.WEB),[u,m]=(0,s.useState)(f.V_.NONE);return(0,a.jsx)(k,{open:t,onOpenChange:r,children:(0,a.jsx)(E,{className:"max-w-lg",children:(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),l.trim()&&(o({name:l.trim(),projectType:d,backendFramework:u}),c(""),p(f.gM.WEB),m(f.V_.NONE))},children:[(0,a.jsxs)(S,{children:[(0,a.jsx)(P,{children:i("project.createTitle")}),(0,a.jsx)(C,{children:i("project.name")})]}),(0,a.jsxs)("div",{className:"grid gap-4 py-4",children:[(0,a.jsxs)("div",{className:"grid gap-2",children:[(0,a.jsx)("label",{htmlFor:"name",className:"text-sm font-medium",children:i("project.name")}),(0,a.jsx)(F.p,{id:"name",value:l,onChange:e=>c(e.target.value),placeholder:i("project.namePlaceholder"),autoFocus:!0})]}),(0,a.jsxs)("div",{className:"grid gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:i("project.type")}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,a.jsxs)(x.$,{type:"button",variant:d===f.gM.WEB?"default":"outline",className:"h-16 flex-col gap-1",onClick:()=>p(f.gM.WEB),children:[(0,a.jsx)("span",{className:"text-xl",children:"\uD83C\uDF10"}),(0,a.jsx)("span",{className:"text-xs",children:i("project.typeWeb")})]}),(0,a.jsxs)(x.$,{type:"button",variant:d===f.gM.NATIVE?"default":"outline",className:"h-16 flex-col gap-1",onClick:()=>p(f.gM.NATIVE),children:[(0,a.jsx)("span",{className:"text-xl",children:"\uD83D\uDCF1"}),(0,a.jsx)("span",{className:"text-xs",children:i("project.typeNative")})]})]})]}),d===f.gM.WEB&&(0,a.jsxs)("div",{className:"grid gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:i("project.backendStack")}),(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,a.jsxs)(x.$,{type:"button",variant:u===f.V_.NONE?"default":"outline",className:"h-20 flex-col gap-1",onClick:()=>m(f.V_.NONE),children:[(0,a.jsx)("span",{className:"text-lg",children:"⚡"}),(0,a.jsx)("span",{className:"text-xs text-center leading-tight",children:i("project.backendNone")})]}),(0,a.jsxs)(x.$,{type:"button",variant:u===f.V_.EXPRESS?"default":"outline",className:"h-20 flex-col gap-1",onClick:()=>m(f.V_.EXPRESS),children:[(0,a.jsx)("span",{className:"text-lg",children:"\uD83D\uDFE2"}),(0,a.jsxs)("span",{className:"text-xs text-center leading-tight",children:["Express",(0,a.jsx)("br",{}),"(Node.js)"]})]}),(0,a.jsxs)(x.$,{type:"button",variant:u===f.V_.FASTAPI?"default":"outline",className:"h-20 flex-col gap-1",onClick:()=>m(f.V_.FASTAPI),children:[(0,a.jsx)("span",{className:"text-lg",children:"\uD83D\uDC0D"}),(0,a.jsxs)("span",{className:"text-xs text-center leading-tight",children:["FastAPI",(0,a.jsx)("br",{}),"(Python)"]})]})]})]})]}),(0,a.jsxs)(A,{children:[(0,a.jsx)(x.$,{type:"button",variant:"outline",onClick:()=>r(!1),children:i("common.cancel")}),(0,a.jsx)(x.$,{type:"submit",disabled:!l.trim()||n,children:i(n?"common.loading":"common.create")})]})]})})})}var D=r(4264);function R(){let e=(0,o.useRouter)(),{t}=(0,j.B)(),[r,i]=(0,s.useState)(!1),{projects:l,isLoading:c,fetchProjects:d,createProject:p,deleteProject:u}=(0,D.I)();(0,s.useEffect)(()=>{d()},[d]);let m=async t=>{try{let r=await p(t);i(!1),e.push("/project/".concat(r.id))}catch(e){console.error("Failed to create project:",e)}},h=async e=>{if(confirm(t("project.deleteConfirm")))try{await u(e)}catch(e){console.error("Failed to delete project:",e)}};return(0,a.jsxs)("div",{className:"min-h-screen bg-background",children:[(0,a.jsx)(n.Y,{}),(0,a.jsxs)("main",{className:"container px-4 py-8",children:[(0,a.jsxs)("div",{className:"mb-8",children:[(0,a.jsx)("h2",{className:"text-2xl font-bold",children:t("home.title")}),(0,a.jsx)("p",{className:"mt-1 text-muted-foreground",children:0===l.length?t("home.createFirst"):"".concat(l.length," ").concat(1===l.length?"project":"projects")})]}),c&&0===l.length?(0,a.jsx)("div",{className:"flex h-40 items-center justify-center text-muted-foreground",children:t("common.loading")}):(0,a.jsx)(w,{projects:l,onCreateClick:()=>i(!0),onDelete:h})]}),(0,a.jsx)(T,{open:r,onOpenChange:i,onSubmit:m,isLoading:c})]})}},9049:(e,t,r)=>{"use strict";r.d(t,{cn:()=>o});var a=r(5806),s=r(4159);function o(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,s.QP)((0,a.$)(t))}},9426:(e,t,r)=>{"use strict";r.d(t,{B:()=>i});var a=r(4876),s=r(1203);let o={en:JSON.parse('{"common":{"appName":"ClaudeShip","loading":"Loading...","error":"Error","save":"Save","cancel":"Cancel","delete":"Delete","create":"Create","close":"Close","refresh":"Refresh","settings":"Settings"},"header":{"home":"Home","settings":"Settings"},"home":{"title":"My Projects","noProjects":"No projects yet","createFirst":"Create your first project to get started"},"project":{"create":"New Project","createDescription":"Build with AI","createTitle":"Create New Project","name":"Project Name","namePlaceholder":"my-awesome-app","type":"Project Type","typeWeb":"Web App","typeNative":"Native App","backendStack":"Backend Stack","backendNone":"Frontend Only","backendExpress":"Express (Node.js)","backendFastapi":"FastAPI (Python)","delete":"Delete Project","deleteConfirm":"Are you sure you want to delete this project?","updated":"Updated"},"chat":{"title":"Chat","placeholder":"Describe what you want to build...","askPlaceholder":"Ask a question about your project...","queuePlaceholder":"Queue another message...","send":"Send","thinking":"AI is thinking...","uploading":"Uploading files...","queueCount":"{count} message(s) queued","toolRunning":"Running","toolCompleted":"Completed","newConversation":"New Chat","modeAsk":"Ask","modeBuild":"Build"},"preview":{"title":"Preview","start":"Start Preview","stop":"Stop Preview","starting":"Starting...","notReady":"Project not ready for preview","waitForAI":"Wait for AI to create the project files","openInNewTab":"Open in New Tab"},"fileExplorer":{"title":"Files","empty":"No files yet","loading":"Loading files...","error":"Failed to load files","open":"Open File Explorer","close":"Close File Explorer"},"language":{"select":"Language","en":"English","ko":"한국어"},"settings":{"title":"Settings","projectsPath":{"title":"Projects Folder","description":"Location where your projects are stored","saved":"Settings saved successfully","note":"New projects will be created in this folder. Existing projects are not affected."}}}'),ko:JSON.parse('{"common":{"appName":"ClaudeShip","loading":"로딩 중...","error":"오류","save":"저장","cancel":"취소","delete":"삭제","create":"생성","close":"닫기","refresh":"새로고침","settings":"설정"},"header":{"home":"홈","settings":"설정"},"home":{"title":"내 프로젝트","noProjects":"프로젝트가 없습니다","createFirst":"첫 번째 프로젝트를 만들어 시작하세요"},"project":{"create":"새 프로젝트","createDescription":"AI와 함께 만들기","createTitle":"새 프로젝트 생성","name":"프로젝트 이름","namePlaceholder":"my-awesome-app","type":"프로젝트 유형","typeWeb":"웹 앱","typeNative":"네이티브 앱","backendStack":"백엔드 스택","backendNone":"프론트엔드 전용","backendExpress":"Express (Node.js)","backendFastapi":"FastAPI (Python)","delete":"프로젝트 삭제","deleteConfirm":"이 프로젝트를 삭제하시겠습니까?","updated":"업데이트"},"chat":{"title":"채팅","placeholder":"만들고 싶은 것을 설명하세요...","askPlaceholder":"프로젝트에 대해 질문하세요...","queuePlaceholder":"다음 메시지를 입력하세요...","send":"전송","thinking":"AI가 생각 중...","uploading":"파일 업로드 중...","queueCount":"{count}개의 메시지가 대기 중","toolRunning":"실행 중","toolCompleted":"완료","newConversation":"새 대화","modeAsk":"Ask","modeBuild":"Build"},"preview":{"title":"미리보기","start":"미리보기 시작","stop":"미리보기 중지","starting":"시작 중...","notReady":"프로젝트가 미리보기 준비가 되지 않았습니다","waitForAI":"AI가 프로젝트 파일을 생성할 때까지 기다려주세요","openInNewTab":"새 탭에서 열기"},"fileExplorer":{"title":"파일","empty":"파일이 없습니다","loading":"파일 로딩 중...","error":"파일 로드 실패","open":"파일 탐색기 열기","close":"파일 탐색기 닫기"},"language":{"select":"언어","en":"English","ko":"한국어"},"settings":{"title":"설정","projectsPath":{"title":"프로젝트 폴더","description":"프로젝트가 저장되는 위치","saved":"설정이 저장되었습니다","note":"새 프로젝트는 이 폴더에 생성됩니다. 기존 프로젝트에는 영향을 주지 않습니다."}}}')},n=(0,a.v)()((0,s.Zr)(e=>({locale:"ko",setLocale:t=>e({locale:t})}),{name:"claudeship-locale"}));function i(){let e=n(e=>e.locale);return{t:(t,r)=>(function(e,t,r){let a=t||n.getState().locale,s=e.split("."),i=o[a];for(let t of s)if(i&&"object"==typeof i&&t in i)i=i[t];else{for(let t of(i=o.en,s))if(!i||"object"!=typeof i||!(t in i))return e;else i=i[t];break}let l="string"==typeof i?i:e;if(r)for(let[e,t]of Object.entries(r))l=l.replace(RegExp("\\{".concat(e,"\\}"),"g"),String(t));return l})(t,e,r),locale:e,setLocale:n(e=>e.setLocale)}}}},e=>{e.O(0,[992,59,498,358],()=>e(e.s=559)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[78],{660:(e,t,s)=>{"use strict";s.d(t,{F:()=>l});let a="http://localhost:14000/api";async function r(e,t){let s="".concat(a).concat(e),r=await fetch(s,{...t,headers:{"Content-Type":"application/json",...null==t?void 0:t.headers}});if(!r.ok)throw Error((await r.json().catch(()=>({message:"Request failed"}))).message||"HTTP error! status: ".concat(r.status));if(204!==r.status)return r.json()}let l={get:e=>r(e),post:(e,t)=>r(e,{method:"POST",body:t?JSON.stringify(t):void 0}),put:(e,t)=>r(e,{method:"PUT",body:t?JSON.stringify(t):void 0}),delete:(e,t)=>r(e,{method:"DELETE",body:t?JSON.stringify(t):void 0}),uploadFiles:async(e,t)=>{let s=new FormData;t.forEach(e=>s.append("files",e));let r="".concat(a,"/projects/").concat(e,"/files/upload"),l=await fetch(r,{method:"POST",body:s});if(!l.ok)throw Error((await l.json().catch(()=>({message:"Upload failed"}))).message||"HTTP error! status: ".concat(l.status));return l.json()}}},4264:(e,t,s)=>{"use strict";s.d(t,{I:()=>l});var a=s(4876),r=s(660);let l=(0,a.v)((e,t)=>({projects:[],currentProject:null,isLoading:!1,error:null,fetchProjects:async()=>{e({isLoading:!0,error:null});try{let t=await r.F.get("/projects");e({projects:t,isLoading:!1})}catch(t){e({error:t instanceof Error?t.message:"Failed to fetch projects",isLoading:!1})}},createProject:async t=>{e({isLoading:!0,error:null});try{let s=await r.F.post("/projects",t);return e(e=>({projects:[{id:s.id,name:s.name,projectType:s.projectType,backendFramework:s.backendFramework,updatedAt:s.updatedAt},...e.projects],isLoading:!1})),s}catch(t){throw e({error:t instanceof Error?t.message:"Failed to create project",isLoading:!1}),t}},deleteProject:async t=>{e({isLoading:!0,error:null});try{await r.F.delete("/projects/".concat(t)),e(e=>({projects:e.projects.filter(e=>e.id!==t),isLoading:!1}))}catch(t){throw e({error:t instanceof Error?t.message:"Failed to delete project",isLoading:!1}),t}},fetchProject:async t=>{e({isLoading:!0,error:null});try{let s=await r.F.get("/projects/".concat(t));e({currentProject:s,isLoading:!1})}catch(t){e({error:t instanceof Error?t.message:"Failed to fetch project",isLoading:!1})}},setCurrentProject:t=>e({currentProject:t}),clearError:()=>e({error:null})}))},4859:(e,t,s)=>{"use strict";s.d(t,{V_:()=>r,gM:()=>a,Xh:()=>l});var a=function(e){return e.WEB="WEB",e.NATIVE="NATIVE",e}({}),r=function(e){return e.NONE="NONE",e.EXPRESS="EXPRESS",e.FASTAPI="FASTAPI",e}({}),l=function(e){return e.USER="USER",e.ASSISTANT="ASSISTANT",e.SYSTEM="SYSTEM",e}({})},5006:(e,t,s)=>{Promise.resolve().then(s.bind(s,9611))},5338:(e,t,s)=>{"use strict";s.d(t,{p:()=>n});var a=s(8481),r=s(8526),l=s(9049);let n=r.forwardRef((e,t)=>{let{className:s,type:r,...n}=e;return(0,a.jsx)("input",{type:r,className:(0,l.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:t,...n})});n.displayName="Input"},5594:(e,t,s)=>{"use strict";s.d(t,{$:()=>i});var a=s(8481),r=s(8526),l=s(4176),n=s(9049);let c=(0,l.F)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),i=r.forwardRef((e,t)=>{let{className:s,variant:r,size:l,...i}=e;return(0,a.jsx)("button",{className:(0,n.cn)(c({variant:r,size:l,className:s})),ref:t,...i})});i.displayName="Button"},7176:(e,t,s)=>{"use strict";s.d(t,{Y:()=>u});var a=s(8481),r=s(4816),l=s.n(r),n=s(9432),c=s(9150),i=s(7746),o=s(5594),d=s(9426);function m(){let{locale:e,setLocale:t,t:s}=(0,d.B)();return(0,a.jsx)(o.$,{variant:"ghost",size:"icon",onClick:()=>{t("en"===e?"ko":"en")},className:"h-9 w-9 text-xs font-medium",title:s("language.select"),children:"en"===e?"EN":"KO"})}function u(e){let{title:t,showBack:s,backHref:r="/"}=e,{t:u}=(0,d.B)(),x=t||u("common.appName");return(0,a.jsx)("header",{className:"sticky top-0 z-40 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:(0,a.jsxs)("div",{className:"flex h-14 w-full items-center justify-between px-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[s?(0,a.jsx)(l(),{href:r,children:(0,a.jsx)(o.$,{variant:"ghost",size:"icon",className:"h-9 w-9",children:(0,a.jsx)(c.A,{className:"h-5 w-5"})})}):(0,a.jsx)(n.default,{src:"/logo.svg",alt:"ClaudeShip",width:36,height:36,className:"rounded-lg"}),(0,a.jsx)("h1",{className:"text-lg font-semibold",children:x})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(m,{}),(0,a.jsx)(l(),{href:"/settings",children:(0,a.jsx)(o.$,{variant:"ghost",size:"icon",className:"h-9 w-9",title:u("header.settings"),children:(0,a.jsx)(i.A,{className:"h-5 w-5"})})})]})]})})}},9049:(e,t,s)=>{"use strict";s.d(t,{cn:()=>l});var a=s(5806),r=s(4159);function l(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,r.QP)((0,a.$)(t))}},9426:(e,t,s)=>{"use strict";s.d(t,{B:()=>c});var a=s(4876),r=s(1203);let l={en:JSON.parse('{"common":{"appName":"ClaudeShip","loading":"Loading...","error":"Error","save":"Save","cancel":"Cancel","delete":"Delete","create":"Create","close":"Close","refresh":"Refresh","settings":"Settings"},"header":{"home":"Home","settings":"Settings"},"home":{"title":"My Projects","noProjects":"No projects yet","createFirst":"Create your first project to get started"},"project":{"create":"New Project","createDescription":"Build with AI","createTitle":"Create New Project","name":"Project Name","namePlaceholder":"my-awesome-app","type":"Project Type","typeWeb":"Web App","typeNative":"Native App","backendStack":"Backend Stack","backendNone":"Frontend Only","backendExpress":"Express (Node.js)","backendFastapi":"FastAPI (Python)","delete":"Delete Project","deleteConfirm":"Are you sure you want to delete this project?","updated":"Updated"},"chat":{"title":"Chat","placeholder":"Describe what you want to build...","askPlaceholder":"Ask a question about your project...","queuePlaceholder":"Queue another message...","send":"Send","thinking":"AI is thinking...","uploading":"Uploading files...","queueCount":"{count} message(s) queued","toolRunning":"Running","toolCompleted":"Completed","newConversation":"New Chat","modeAsk":"Ask","modeBuild":"Build"},"preview":{"title":"Preview","start":"Start Preview","stop":"Stop Preview","starting":"Starting...","notReady":"Project not ready for preview","waitForAI":"Wait for AI to create the project files","openInNewTab":"Open in New Tab"},"fileExplorer":{"title":"Files","empty":"No files yet","loading":"Loading files...","error":"Failed to load files","open":"Open File Explorer","close":"Close File Explorer"},"language":{"select":"Language","en":"English","ko":"한국어"},"settings":{"title":"Settings","projectsPath":{"title":"Projects Folder","description":"Location where your projects are stored","saved":"Settings saved successfully","note":"New projects will be created in this folder. Existing projects are not affected."}}}'),ko:JSON.parse('{"common":{"appName":"ClaudeShip","loading":"로딩 중...","error":"오류","save":"저장","cancel":"취소","delete":"삭제","create":"생성","close":"닫기","refresh":"새로고침","settings":"설정"},"header":{"home":"홈","settings":"설정"},"home":{"title":"내 프로젝트","noProjects":"프로젝트가 없습니다","createFirst":"첫 번째 프로젝트를 만들어 시작하세요"},"project":{"create":"새 프로젝트","createDescription":"AI와 함께 만들기","createTitle":"새 프로젝트 생성","name":"프로젝트 이름","namePlaceholder":"my-awesome-app","type":"프로젝트 유형","typeWeb":"웹 앱","typeNative":"네이티브 앱","backendStack":"백엔드 스택","backendNone":"프론트엔드 전용","backendExpress":"Express (Node.js)","backendFastapi":"FastAPI (Python)","delete":"프로젝트 삭제","deleteConfirm":"이 프로젝트를 삭제하시겠습니까?","updated":"업데이트"},"chat":{"title":"채팅","placeholder":"만들고 싶은 것을 설명하세요...","askPlaceholder":"프로젝트에 대해 질문하세요...","queuePlaceholder":"다음 메시지를 입력하세요...","send":"전송","thinking":"AI가 생각 중...","uploading":"파일 업로드 중...","queueCount":"{count}개의 메시지가 대기 중","toolRunning":"실행 중","toolCompleted":"완료","newConversation":"새 대화","modeAsk":"Ask","modeBuild":"Build"},"preview":{"title":"미리보기","start":"미리보기 시작","stop":"미리보기 중지","starting":"시작 중...","notReady":"프로젝트가 미리보기 준비가 되지 않았습니다","waitForAI":"AI가 프로젝트 파일을 생성할 때까지 기다려주세요","openInNewTab":"새 탭에서 열기"},"fileExplorer":{"title":"파일","empty":"파일이 없습니다","loading":"파일 로딩 중...","error":"파일 로드 실패","open":"파일 탐색기 열기","close":"파일 탐색기 닫기"},"language":{"select":"언어","en":"English","ko":"한국어"},"settings":{"title":"설정","projectsPath":{"title":"프로젝트 폴더","description":"프로젝트가 저장되는 위치","saved":"설정이 저장되었습니다","note":"새 프로젝트는 이 폴더에 생성됩니다. 기존 프로젝트에는 영향을 주지 않습니다."}}}')},n=(0,a.v)()((0,r.Zr)(e=>({locale:"ko",setLocale:t=>e({locale:t})}),{name:"claudeship-locale"}));function c(){let e=n(e=>e.locale);return{t:(t,s)=>(function(e,t,s){let a=t||n.getState().locale,r=e.split("."),c=l[a];for(let t of r)if(c&&"object"==typeof c&&t in c)c=c[t];else{for(let t of(c=l.en,r))if(!c||"object"!=typeof c||!(t in c))return e;else c=c[t];break}let i="string"==typeof c?c:e;if(s)for(let[e,t]of Object.entries(s))i=i.replace(RegExp("\\{".concat(e,"\\}"),"g"),String(t));return i})(t,e,s),locale:e,setLocale:n(e=>e.setLocale)}}},9611:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>tl});var a=s(8481),r=s(8526),l=s(3973),n=s(7176),c=s(9049),i=s(5119),o=s(8630),d=s(4415),m=s(2839),u=s(4779),x=s(6224),h=s(6230),p=s(7060),f=s(9358),g=s(1627),j=s(4739),N=s(8756);function v(e){let{children:t,className:s}=e,r=(null==s?void 0:s.replace(/language-/,""))||"text";return(0,a.jsx)(N.f4,{theme:N.Zj.vsDark,code:t.trim(),language:r,children:e=>{let{className:t,style:s,tokens:r,getLineProps:l,getTokenProps:n}=e;return(0,a.jsx)("pre",{className:(0,c.cn)("rounded-lg p-4 overflow-x-auto text-sm my-3",t),style:s,children:(0,a.jsx)("code",{children:r.map((e,t)=>(0,a.jsxs)("div",{...l({line:e}),children:[(0,a.jsx)("span",{className:"inline-block w-8 text-right mr-4 text-gray-500 select-none text-xs",children:t+1}),e.map((e,t)=>(0,a.jsx)("span",{...n({token:e})},t))]},t))})})}})}function b(e){let{content:t,className:s}=e;return(0,a.jsx)("div",{className:(0,c.cn)("markdown-body",s),children:(0,a.jsx)(g.oz,{remarkPlugins:[j.A],components:{h1:e=>{let{children:t}=e;return(0,a.jsx)("h1",{className:"text-2xl font-bold mt-6 mb-4 pb-2 border-b border-border first:mt-0",children:t})},h2:e=>{let{children:t}=e;return(0,a.jsx)("h2",{className:"text-xl font-semibold mt-5 mb-3 pb-1.5 border-b border-border/50",children:t})},h3:e=>{let{children:t}=e;return(0,a.jsx)("h3",{className:"text-lg font-semibold mt-4 mb-2",children:t})},h4:e=>{let{children:t}=e;return(0,a.jsx)("h4",{className:"text-base font-semibold mt-3 mb-2",children:t})},p:e=>{let{children:t}=e;return(0,a.jsx)("p",{className:"my-2 leading-7",children:t})},ul:e=>{let{children:t}=e;return(0,a.jsx)("ul",{className:"my-3 ml-6 list-disc space-y-1.5",children:t})},ol:e=>{let{children:t}=e;return(0,a.jsx)("ol",{className:"my-3 ml-6 list-decimal space-y-1.5",children:t})},li:e=>{let{children:t}=e;return(0,a.jsx)("li",{className:"leading-7",children:t})},table:e=>{let{children:t}=e;return(0,a.jsx)("div",{className:"my-4 overflow-x-auto rounded-lg border border-border",children:(0,a.jsx)("table",{className:"w-full border-collapse text-sm",children:t})})},thead:e=>{let{children:t}=e;return(0,a.jsx)("thead",{className:"bg-muted/50",children:t})},tbody:e=>{let{children:t}=e;return(0,a.jsx)("tbody",{className:"divide-y divide-border",children:t})},tr:e=>{let{children:t}=e;return(0,a.jsx)("tr",{className:"border-b border-border last:border-0",children:t})},th:e=>{let{children:t}=e;return(0,a.jsx)("th",{className:"px-4 py-2.5 text-left font-semibold text-foreground",children:t})},td:e=>{let{children:t}=e;return(0,a.jsx)("td",{className:"px-4 py-2.5 text-muted-foreground",children:t})},pre:e=>{let{children:t}=e;return(0,a.jsx)(a.Fragment,{children:t})},code:e=>{let{className:t,children:s,...r}=e,l=null==t?void 0:t.includes("language-"),n=String(s).replace(/\n$/,"");return l?(0,a.jsx)(v,{className:t,children:n}):(0,a.jsx)("code",{className:"bg-muted px-1.5 py-0.5 rounded text-sm font-mono text-primary",...r,children:s})},blockquote:e=>{let{children:t}=e;return(0,a.jsx)("blockquote",{className:"my-4 pl-4 border-l-4 border-primary/30 italic text-muted-foreground",children:t})},hr:()=>(0,a.jsx)("hr",{className:"my-6 border-border"}),a:e=>{let{href:t,children:s}=e;return(0,a.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline underline-offset-2 hover:text-primary/80",children:s})},strong:e=>{let{children:t}=e;return(0,a.jsx)("strong",{className:"font-semibold text-foreground",children:t})},em:e=>{let{children:t}=e;return(0,a.jsx)("em",{className:"italic",children:t})},img:e=>{let{src:t,alt:s}=e;return(0,a.jsx)("img",{src:t,alt:s,className:"my-4 max-w-full rounded-lg border border-border"})}},children:t})})}let w={Read:(0,a.jsx)(i.A,{className:"h-3 w-3"}),Glob:(0,a.jsx)(o.A,{className:"h-3 w-3"}),Grep:(0,a.jsx)(d.A,{className:"h-3 w-3"}),Bash:(0,a.jsx)(m.A,{className:"h-3 w-3"}),Edit:(0,a.jsx)(u.A,{className:"h-3 w-3"}),Write:(0,a.jsx)(u.A,{className:"h-3 w-3"}),WebFetch:(0,a.jsx)(x.A,{className:"h-3 w-3"}),WebSearch:(0,a.jsx)(x.A,{className:"h-3 w-3"}),TodoWrite:(0,a.jsx)(h.A,{className:"h-3 w-3"}),Task:(0,a.jsx)(p.A,{className:"h-3 w-3"})},y={Read:"파일 읽기",Glob:"파일 검색",Grep:"내용 검색",Bash:"명령어 실행",Edit:"파일 수정",Write:"파일 생성",WebFetch:"웹 페이지",WebSearch:"웹 검색",Task:"에이전트",TodoWrite:"작업 목록"};function k(e){let{message:t}=e,s="USER"===t.role,r=[];if(!s&&t.metadata)try{r=("string"==typeof t.metadata?JSON.parse(t.metadata):t.metadata).toolActivities||[]}catch(e){}return(0,a.jsxs)("div",{className:(0,c.cn)("flex gap-3 p-4 rounded-lg",s?"bg-muted/50":"bg-background"),children:[(0,a.jsx)("div",{className:(0,c.cn)("flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-sm font-medium",s?"bg-primary text-primary-foreground":"bg-secondary text-secondary-foreground"),children:s?"U":"AI"}),(0,a.jsxs)("div",{className:"flex-1 space-y-2 overflow-hidden",children:[r.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap gap-1 mb-2",children:[r.slice(0,10).map((e,t)=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-muted text-xs text-muted-foreground",children:[(0,a.jsx)(f.A,{className:"h-3 w-3 text-green-600"}),w[e.name]||(0,a.jsx)(m.A,{className:"h-3 w-3"}),y[e.name]||e.name]},t)),r.length>10&&(0,a.jsxs)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full bg-muted text-xs text-muted-foreground",children:["+",r.length-10,"개"]})]}),(0,a.jsx)("div",{className:"max-w-none",children:s?(0,a.jsx)("div",{className:"whitespace-pre-wrap break-words leading-7",children:t.content}):(0,a.jsx)(b,{content:t.content})})]})]})}var A=s(4876),S=s(660),C=s(4859);let F=(0,A.v)((e,t)=>({status:"stopped",url:null,error:null,isLoading:!1,projectReady:{ready:!1,isFullstack:!1,frontend:{hasPackageJson:!1,hasNodeModules:!1,hasDevScript:!1}},startPreview:async t=>{e({isLoading:!0,error:null,status:"starting"});try{let s=await S.F.post("/projects/".concat(t,"/preview/start"));e({status:s.status,url:s.url||null,isLoading:!1})}catch(t){e({error:t instanceof Error?t.message:"Failed to start preview",status:"error",isLoading:!1})}},stopPreview:async t=>{e({isLoading:!0,error:null});try{await S.F.post("/projects/".concat(t,"/preview/stop")),e({status:"stopped",url:null,isLoading:!1})}catch(t){e({error:t instanceof Error?t.message:"Failed to stop preview",isLoading:!1})}},restartPreview:async t=>{e({isLoading:!0,error:null,status:"starting"});try{let s=await S.F.post("/projects/".concat(t,"/preview/restart"));e({status:s.status,url:s.url||null,isLoading:!1})}catch(t){e({error:t instanceof Error?t.message:"Failed to restart preview",status:"error",isLoading:!1})}},refreshPreview:()=>{let s=t().url;s&&e({url:"".concat(s.split("?")[0],"?t=").concat(Date.now())})},fetchStatus:async t=>{try{let s=await S.F.get("/projects/".concat(t,"/preview/status"));e({status:s.status,url:s.url||null})}catch(t){e({status:"stopped",url:null})}},checkProjectReady:async t=>{try{let s=await S.F.get("/projects/".concat(t,"/preview/ready"));e({projectReady:s})}catch(t){e({projectReady:{ready:!1,isFullstack:!1,frontend:{hasPackageJson:!1,hasNodeModules:!1,hasDevScript:!1}}})}},clearError:()=>e({error:null})})),E=/<restart-preview\s*\/>/g,P=0,T=(0,A.v)((e,t)=>({messages:[],isStreaming:!1,streamingBlocks:[],error:null,messageQueue:[],isProcessingQueue:!1,mode:"build",pendingQuestion:null,attachedFiles:[],isUploading:!1,setMode:t=>e({mode:t}),addFiles:t=>{let s=t.map(e=>({id:"file-".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),file:e,preview:e.type.startsWith("image/")?URL.createObjectURL(e):void 0,status:"pending"}));e(e=>({attachedFiles:[...e.attachedFiles,...s]}))},removeFile:t=>{e(e=>{let s=e.attachedFiles.find(e=>e.id===t);return(null==s?void 0:s.preview)&&URL.revokeObjectURL(s.preview),{attachedFiles:e.attachedFiles.filter(e=>e.id!==t)}})},clearFiles:()=>{t().attachedFiles.forEach(e=>{e.preview&&URL.revokeObjectURL(e.preview)}),e({attachedFiles:[]})},uploadFiles:async s=>{let a=t().attachedFiles.filter(e=>"pending"===e.status);if(0===a.length)return t().attachedFiles.filter(e=>"uploaded"===e.status&&e.uploadedPath).map(e=>e.uploadedPath);e({isUploading:!0});try{e(e=>({attachedFiles:e.attachedFiles.map(e=>"pending"===e.status?{...e,status:"uploading"}:e)}));let r=await S.F.uploadFiles(s,a.map(e=>e.file)),l=[];return e(e=>({attachedFiles:e.attachedFiles.map(e=>{if("uploading"===e.status){let t=r.files.find(t=>t.originalName===e.file.name);if(t)return l.push(t.path),{...e,status:"uploaded",uploadedPath:t.path}}return e})})),[...t().attachedFiles.filter(e=>"uploaded"===e.status&&e.uploadedPath).map(e=>e.uploadedPath)]}catch(t){return e(e=>({attachedFiles:e.attachedFiles.map(e=>"uploading"===e.status?{...e,status:"error",error:t.message}:e),error:t instanceof Error?t.message:"Failed to upload files"})),[]}finally{e({isUploading:!1})}},fetchMessages:async t=>{try{let s=await S.F.get("/projects/".concat(t,"/messages"));e({messages:s,error:null})}catch(t){e({error:t instanceof Error?t.message:"Failed to fetch messages"})}},fetchActiveSession:async s=>{try{let r=await S.F.get("/projects/".concat(s,"/chat/status")),l=t();if(r.isStreaming){if(!l.isStreaming){var a;e({isStreaming:!0,streamingBlocks:[]});let r=await fetch("".concat("http://localhost:14000/api","/projects/").concat(s,"/chat/subscribe"));if(!r.ok)throw Error("Failed to subscribe to session");let l=null==(a=r.body)?void 0:a.getReader();if(!l)throw Error("No response body");let n=new TextDecoder,c="";(async()=>{try{for(;;){let{done:t,value:s}=await l.read();if(t)break;let a=(c+=n.decode(s,{stream:!0})).split("\n");for(let t of(c=a.pop()||"",a))if(t.startsWith("data: "))try{let s=JSON.parse(t.slice(6));if(console.log("[SSE Subscribe Event]",s.type,s),"no_active_session"===s.type)break;if("text"===s.type&&s.content){let t={id:"text-".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),type:"text",content:s.content};e(e=>({streamingBlocks:[...e.streamingBlocks,t]}))}else if("tool_use"===s.type&&s.tool){let t={id:"tool-".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),type:"tool_use",tool:{name:s.tool.name,input:s.tool.input},status:"running",timestamp:Date.now()};e(e=>({streamingBlocks:[...e.streamingBlocks,t]}))}else if("tool_result"===s.type){let t=Date.now();e(e=>{let a=[...e.streamingBlocks];for(let e=a.length-1;e>=0;e--){let r=a[e];if("tool_use"===r.type&&"running"===r.status){let l=r.timestamp?t-r.timestamp:void 0;a[e]={...r,status:"completed",result:s.content,duration:l};break}}return{streamingBlocks:a}})}else"error"===s.type&&e({error:s.error})}catch(e){}}}finally{await t().fetchMessages(s),e({isStreaming:!1})}})()}}else l.isStreaming&&(await t().fetchMessages(s),e({isStreaming:!1,streamingBlocks:[]}))}catch(e){console.error("Failed to fetch active session:",e)}},queueMessage:(t,s)=>{let a={id:"queue-".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),content:s,status:"queued"},r={id:"temp-".concat(Date.now()),projectId:t,role:C.Xh.USER,content:s,createdAt:new Date};e(e=>({messageQueue:[...e.messageQueue,a],messages:[...e.messages,r]}))},deleteFromQueue:t=>{e(e=>({messageQueue:e.messageQueue.filter(e=>e.id!==t)}))},processQueue:async s=>{let a=t();if(!a.isProcessingQueue&&0!==a.messageQueue.length){for(e({isProcessingQueue:!0});t().messageQueue.length>0;){let a=t().messageQueue[0];e(e=>({messageQueue:e.messageQueue.map((e,t)=>0===t?{...e,status:"processing"}:e)})),await t().sendMessage(s,a.content,!0),e(e=>({messageQueue:e.messageQueue.slice(1)}))}e({isProcessingQueue:!1})}},sendMessage:async function(s,a){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t().isStreaming&&!r)return void t().queueMessage(s,a);if(!r){let t={id:"temp-".concat(Date.now()),projectId:s,role:C.Xh.USER,content:a,createdAt:new Date};e(e=>({messages:[...e.messages,t]}))}e({isStreaming:!0,streamingBlocks:[],error:null});try{var l;let r=t().mode,n=t().attachedFiles.filter(e=>"uploaded"===e.status&&e.uploadedPath).map(e=>e.uploadedPath),c=await fetch("".concat("http://localhost:14000/api","/projects/").concat(s,"/chat"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:a,mode:r,attachments:n.length>0?n:void 0})});if(n.length>0&&t().clearFiles(),!c.ok)throw Error("Failed to send message");let i=null==(l=c.body)?void 0:l.getReader();if(!i)throw Error("No response body");let o=new TextDecoder,d="";for(;;){let{done:t,value:a}=await i.read();if(t)break;let r=(d+=o.decode(a,{stream:!0})).split("\n");for(let t of(d=r.pop()||"",r))if(t.startsWith("data: "))try{let a=JSON.parse(t.slice(6));if(console.log("[SSE Event]",a.type,a),"text"===a.type&&a.content){let t=E.test(a.content);E.lastIndex=0;let r=a.content.replace(E,"").trim();if(t){let e=Date.now();e-P>3e3&&(P=e,F.getState().restartPreview(s))}if(r){let t={id:"text-".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),type:"text",content:r};e(e=>({streamingBlocks:[...e.streamingBlocks,t]}))}}else if("tool_use"===a.type&&a.tool){let t={id:"tool-".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),type:"tool_use",tool:{name:a.tool.name,input:a.tool.input},status:"running",timestamp:Date.now()};e(e=>({streamingBlocks:[...e.streamingBlocks,t]}))}else if("tool_result"===a.type){let t=Date.now();e(e=>{let s=[...e.streamingBlocks];for(let e=s.length-1;e>=0;e--){let r=s[e];if("tool_use"===r.type&&"running"===r.status){let l=r.timestamp?t-r.timestamp:void 0;s[e]={...r,status:"completed",result:a.content,duration:l};break}}return{streamingBlocks:s}})}else if("ask_user_question"===a.type&&a.askUserQuestion){let t={id:"question-".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),type:"ask_user_question",askUserQuestion:a.askUserQuestion,status:"waiting"};e(e=>({streamingBlocks:[...e.streamingBlocks,t],pendingQuestion:a.askUserQuestion}))}else"error"===a.type&&e({error:a.error})}catch(e){}}await t().fetchMessages(s)}catch(t){e({error:t instanceof Error?t.message:"Failed to send message"})}finally{e({isStreaming:!1}),t().messageQueue.length>0&&setTimeout(()=>t().processQueue(s),100)}},addMessage:t=>{e(e=>({messages:[...e.messages,t]}))},clearMessages:()=>{e({messages:[],streamingBlocks:[],messageQueue:[]})},clearError:()=>{e({error:null})},respondToQuestion:async(s,a)=>{if(!t().pendingQuestion)return;let r=Object.entries(a).map(e=>{let[t,s]=e;return"".concat(t,": ").concat(s)}).join("\n");e(e=>{let t=[...e.streamingBlocks];for(let e=t.length-1;e>=0;e--)if("ask_user_question"===t[e].type&&"waiting"===t[e].status){t[e]={...t[e],status:"completed"};break}return{streamingBlocks:t,pendingQuestion:null}}),await t().sendMessage(s,r)}}));var z=s(8031),R=s(40),L=s(4309),D=s(6569),I=s(6776),B=s(5594),$=s(4660),_=s(3527);let O=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)($.bL,{className:(0,c.cn)("grid gap-2",s),...r,ref:t})});O.displayName=$.bL.displayName;let U=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)($.q7,{ref:t,className:(0,c.cn)("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",s),...r,children:(0,a.jsx)($.C1,{className:"flex items-center justify-center",children:(0,a.jsx)(_.A,{className:"h-2.5 w-2.5 fill-current text-current"})})})});U.displayName=$.q7.displayName;var q=s(8367);let M=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(q.bL,{ref:t,className:(0,c.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",s),...r,children:(0,a.jsx)(q.C1,{className:(0,c.cn)("flex items-center justify-center text-current"),children:(0,a.jsx)(D.A,{className:"h-4 w-4"})})})});M.displayName=q.bL.displayName;var Q=s(2731);let W=(0,s(4176).F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),J=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(Q.b,{ref:t,className:(0,c.cn)(W(),s),...r})});J.displayName=Q.b.displayName;var K=s(5338);function V(e){let{data:t,isWaiting:s,onSubmit:l}=e,[n,c]=(0,r.useState)({}),[i,o]=(0,r.useState)({}),d=t.questions.every((e,t)=>n[t]||i[t]);return s?(0,a.jsxs)("div",{className:"rounded-lg border border-primary/30 bg-primary/5 p-4 space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-primary",children:[(0,a.jsx)(I.A,{className:"h-5 w-5"}),(0,a.jsx)("span",{className:"font-medium",children:"AI의 질문"})]}),t.questions.map((e,t)=>(0,a.jsxs)("div",{className:"space-y-3",children:[e.header&&(0,a.jsx)("span",{className:"inline-block px-2 py-0.5 text-xs font-medium bg-primary/10 text-primary rounded",children:e.header}),(0,a.jsx)("p",{className:"text-sm font-medium",children:e.question}),e.multiSelect?(0,a.jsx)("div",{className:"space-y-2",children:e.options.map((e,s)=>(0,a.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,a.jsx)(M,{id:"q".concat(t,"-o").concat(s),checked:(n[t]||[]).includes(e.label),onCheckedChange:s=>{var a,r;return a=e.label,r=!0===s,void c(e=>{let s=e[t]||[];return r?{...e,[t]:[...s,a]}:{...e,[t]:s.filter(e=>e!==a)}})}}),(0,a.jsxs)("div",{className:"grid gap-0.5 leading-none",children:[(0,a.jsx)(J,{htmlFor:"q".concat(t,"-o").concat(s),className:"text-sm cursor-pointer",children:e.label}),e.description&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:e.description})]})]},s))}):(0,a.jsx)(O,{value:n[t],onValueChange:e=>{c(s=>({...s,[t]:e}))},className:"space-y-2",children:e.options.map((e,s)=>(0,a.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,a.jsx)(U,{value:e.label,id:"q".concat(t,"-o").concat(s)}),(0,a.jsxs)("div",{className:"grid gap-0.5 leading-none",children:[(0,a.jsx)(J,{htmlFor:"q".concat(t,"-o").concat(s),className:"text-sm cursor-pointer",children:e.label}),e.description&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:e.description})]})]},s))}),(0,a.jsxs)("div",{className:"flex items-center gap-2 pt-1",children:[(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"또는 직접 입력:"}),(0,a.jsx)(K.p,{placeholder:"다른 답변...",value:i[t]||"",onChange:e=>{var s;return s=e.target.value,void o(e=>({...e,[t]:s}))},className:"h-8 text-sm flex-1"})]})]},t)),(0,a.jsx)(B.$,{onClick:()=>{let e={};t.questions.forEach((t,s)=>{let a=n[s],r=i[s];r?e[t.question]=r:Array.isArray(a)?e[t.question]=a.join(", "):a&&(e[t.question]=a)}),l(e)},disabled:!d,className:"w-full",size:"sm",children:"답변 제출"})]}):(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md text-sm bg-muted border border-border",children:[(0,a.jsx)(D.A,{className:"h-4 w-4 text-green-600"}),(0,a.jsxs)("span",{className:"text-muted-foreground",children:[(0,a.jsx)(I.A,{className:"h-4 w-4 inline mr-1"}),"질문 응답 완료"]})]})}let G={Read:(0,a.jsx)(i.A,{className:"h-4 w-4"}),Glob:(0,a.jsx)(o.A,{className:"h-4 w-4"}),Grep:(0,a.jsx)(d.A,{className:"h-4 w-4"}),Bash:(0,a.jsx)(m.A,{className:"h-4 w-4"}),Edit:(0,a.jsx)(u.A,{className:"h-4 w-4"}),Write:(0,a.jsx)(u.A,{className:"h-4 w-4"}),WebFetch:(0,a.jsx)(x.A,{className:"h-4 w-4"}),WebSearch:(0,a.jsx)(x.A,{className:"h-4 w-4"}),TodoWrite:(0,a.jsx)(h.A,{className:"h-4 w-4"}),Task:(0,a.jsx)(p.A,{className:"h-4 w-4"})};function H(e){var t,s;let a=null==(t=e.tool)?void 0:t.input,r=null==(s=e.tool)?void 0:s.name;if(!a||!r)return"";if("Read"===r&&a.file_path)return a.file_path.split("/").pop()||"";if("Glob"===r&&a.pattern||"Grep"===r&&a.pattern)return a.pattern;if("Bash"===r&&a.command){let e=a.command;return e.length>50?e.substring(0,50)+"...":e}return("Edit"===r||"Write"===r)&&a.file_path&&a.file_path.split("/").pop()||""}function Y(e){let{content:t}=e;return(0,a.jsx)(b,{content:t})}function X(e){var t,s;let{block:r}=e,l="running"===r.status,n=(null==(t=r.tool)?void 0:t.name)||"Unknown";return(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md text-sm ".concat(l?"bg-blue-50 dark:bg-blue-950 border border-blue-200 dark:border-blue-800":"bg-muted border border-border"),children:[l?(0,a.jsx)(z.A,{className:"h-4 w-4 animate-spin text-blue-600 dark:text-blue-400"}):(0,a.jsx)(f.A,{className:"h-4 w-4 text-green-600"}),(0,a.jsx)("span",{className:l?"text-blue-700 dark:text-blue-300":"text-muted-foreground",children:G[n]||(0,a.jsx)(m.A,{className:"h-4 w-4"})}),(0,a.jsx)("span",{className:"font-medium ".concat(l?"text-blue-800 dark:text-blue-200":""),children:{Read:"파일 읽기",Glob:"파일 검색",Grep:"내용 검색",Bash:"명령어 실행",Edit:"파일 수정",Write:"파일 생성",WebFetch:"웹 페이지 가져오기",WebSearch:"웹 검색",Task:"에이전트 실행",TodoWrite:"작업 목록 업데이트"}[n]||n}),H(r)&&(0,a.jsx)("span",{className:"truncate flex-1 ".concat(l?"text-blue-600 dark:text-blue-400":"text-muted-foreground"),children:H(r)}),void 0!==r.duration&&(0,a.jsxs)("span",{className:"text-xs text-muted-foreground ml-auto tabular-nums",children:["(",(s=r.duration)<1e3?"".concat(s,"ms"):"".concat((s/1e3).toFixed(1),"s"),")"]})]})}function Z(e){let{blocks:t}=e,[s,l]=(0,r.useState)(!1),n=t.length>5,c=t.length-4;if(!n||s)return(0,a.jsxs)("div",{className:"space-y-1",children:[t.map(e=>(0,a.jsx)(X,{block:e},e.id)),n&&s&&(0,a.jsxs)("button",{onClick:()=>l(!1),className:"flex items-center gap-1 px-3 py-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[(0,a.jsx)(R.A,{className:"h-4 w-4"}),(0,a.jsx)("span",{children:"접기"})]})]});let i=t.slice(0,2),o=t.slice(-2);return(0,a.jsxs)("div",{className:"space-y-1",children:[i.map(e=>(0,a.jsx)(X,{block:e},e.id)),(0,a.jsxs)("button",{onClick:()=>l(!0),className:"flex items-center gap-1 px-3 py-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors w-full justify-center border border-dashed border-border rounded-md hover:bg-muted/50",children:[(0,a.jsx)(L.A,{className:"h-4 w-4"}),(0,a.jsxs)("span",{children:[c,"개 더 보기"]})]}),o.map(e=>(0,a.jsx)(X,{block:e},e.id))]})}function ee(e){let{blocks:t,isStreaming:s=!0,projectId:r}=e,l=t.length>0,{respondToQuestion:n}=T(),c=function(e){let t=[],s=[];for(let a of e)"tool_use"===a.type?s.push(a):(s.length>0&&(t.push({type:"tool_group",blocks:s}),s=[]),t.push({type:"other",blocks:[a]}));return s.length>0&&t.push({type:"tool_group",blocks:s}),t}(t),i=e=>{n(r,e)};return(0,a.jsxs)("div",{className:"flex gap-3 p-4 rounded-lg bg-background",children:[(0,a.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-secondary text-secondary-foreground text-sm font-medium",children:"AI"}),(0,a.jsxs)("div",{className:"flex-1 space-y-2 overflow-hidden",children:[c.map((e,t)=>"tool_group"===e.type?(0,a.jsx)(Z,{blocks:e.blocks},"group-".concat(t)):e.blocks.map(e=>"text"===e.type?(0,a.jsx)(Y,{content:e.content||""},e.id):"ask_user_question"===e.type&&e.askUserQuestion?(0,a.jsx)(V,{data:e.askUserQuestion,isWaiting:"waiting"===e.status,onSubmit:i},e.id):null)),s&&!l&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,a.jsx)(z.A,{className:"h-4 w-4 animate-spin"}),(0,a.jsx)("span",{className:"text-sm",children:"AI가 생각 중..."})]}),s&&l&&(0,a.jsx)("span",{className:"inline-block w-2 h-4 bg-primary animate-pulse"})]})]})}function et(e){let{messages:t,streamingBlocks:s=[],isStreaming:l,projectId:n}=e,c=(0,r.useRef)(null);return(0,r.useEffect)(()=>{var e;null==(e=c.current)||e.scrollIntoView({behavior:"smooth"})},[t,s]),(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[0===t.length&&!l&&(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("p",{className:"text-lg font-medium",children:"안녕하세요!"}),(0,a.jsx)("p",{className:"text-sm",children:"무엇을 만들어 드릴까요?"})]})}),t.map(e=>(0,a.jsx)(k,{message:e},e.id)),s.length>0&&(0,a.jsx)(ee,{blocks:s,isStreaming:l,projectId:n}),(0,a.jsx)("div",{ref:c})]})}var es=s(7793),ea=s(3113),er=s(9426),el=s(2881);function en(){let{t:e}=(0,er.B)(),{mode:t,setMode:s,isStreaming:r}=T();return(0,a.jsxs)("div",{className:"flex gap-1 p-1 bg-muted rounded-lg w-fit",children:[(0,a.jsxs)("button",{onClick:()=>s("ask"),disabled:r,className:(0,c.cn)("flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-md transition-colors","ask"===t?"bg-blue-500 text-white":"text-muted-foreground hover:text-foreground hover:bg-muted-foreground/10",r&&"opacity-50 cursor-not-allowed"),children:[(0,a.jsx)(I.A,{className:"h-4 w-4"}),e("chat.modeAsk")]}),(0,a.jsxs)("button",{onClick:()=>s("build"),disabled:r,className:(0,c.cn)("flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-md transition-colors","build"===t?"bg-green-500 text-white":"text-muted-foreground hover:text-foreground hover:bg-muted-foreground/10",r&&"opacity-50 cursor-not-allowed"),children:[(0,a.jsx)(el.A,{className:"h-4 w-4"}),e("chat.modeBuild")]})]})}var ec=s(6241);function ei(e){let{files:t,onRemove:s}=e;return 0===t.length?null:(0,a.jsx)("div",{className:"flex flex-wrap gap-2 px-4 pb-2",children:t.map(e=>{var t;return(0,a.jsxs)("div",{className:"group relative flex items-center gap-2 rounded-lg border bg-muted/50 p-2",children:[e.preview?(0,a.jsx)("img",{src:e.preview,alt:e.file.name,className:"h-12 w-12 rounded object-cover"}):(0,a.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded bg-muted",children:(0,a.jsx)(i.A,{className:"h-6 w-6 text-muted-foreground"})}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"max-w-[120px] truncate text-xs font-medium",children:e.file.name}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:(t=e.file.size)<1024?"".concat(t," B"):t<1048576?"".concat((t/1024).toFixed(1)," KB"):"".concat((t/1048576).toFixed(1)," MB")})]}),"uploading"===e.status&&(0,a.jsx)(z.A,{className:"h-4 w-4 animate-spin text-muted-foreground"}),"error"===e.status&&(0,a.jsx)("span",{className:"text-xs text-destructive",children:e.error}),(0,a.jsx)("button",{onClick:()=>s(e.id),className:"absolute -right-2 -top-2 flex h-5 w-5 items-center justify-center rounded-full bg-destructive text-destructive-foreground opacity-0 transition-opacity group-hover:opacity-100",children:(0,a.jsx)(ec.A,{className:"h-3 w-3"})})]},e.id)})})}var eo=s(3300);function ed(e){let{items:t,onDelete:s}=e,[l,n]=(0,r.useState)(!0);return 0===t.length?null:(0,a.jsxs)("div",{className:"border-t bg-muted/30",children:[(0,a.jsx)("button",{onClick:()=>n(!l),className:"flex items-center justify-between w-full px-4 py-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[l?(0,a.jsx)(R.A,{className:"h-4 w-4"}):(0,a.jsx)(L.A,{className:"h-4 w-4"}),(0,a.jsxs)("span",{children:["Queue (",t.length,")"]})]})}),l&&(0,a.jsx)("div",{className:"px-4 pb-3 space-y-2",children:t.map((e,t)=>(0,a.jsx)(em,{item:e,isNext:0===t,onDelete:s},e.id))})]})}function em(e){let{item:t,isNext:s,onDelete:r}=e,l="processing"===t.status;return(0,a.jsxs)("div",{className:"relative flex items-start gap-2 p-3 rounded-md border ".concat(l?"bg-blue-50 dark:bg-blue-950 border-blue-200 dark:border-blue-800":"bg-background border-border"),children:[(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)("p",{className:"text-sm line-clamp-2 break-words",children:t.content})}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[s&&!l&&(0,a.jsx)("span",{className:"text-xs font-medium text-blue-600 dark:text-blue-400 px-1.5 py-0.5 bg-blue-100 dark:bg-blue-900 rounded",children:"Next"}),l&&(0,a.jsx)("span",{className:"text-xs font-medium text-blue-600 dark:text-blue-400 px-1.5 py-0.5 bg-blue-100 dark:bg-blue-900 rounded animate-pulse",children:"Processing"}),r&&!l&&(0,a.jsx)(B.$,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>r(t.id),children:(0,a.jsx)(eo.A,{className:"h-3 w-3"})})]})]})}let eu=["image/png","image/jpeg","image/gif","image/webp","application/pdf","text/plain","text/markdown","text/csv","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"];function ex(e){let{onSend:t,projectId:s,disabled:l,isStreaming:n,queueCount:c=0}=e,{t:i}=(0,er.B)(),{mode:o,attachedFiles:d,addFiles:m,removeFile:u,uploadFiles:x,isUploading:h,messageQueue:p,deleteFromQueue:f}=T(),[g,j]=(0,r.useState)(""),[N,v]=(0,r.useState)(!1),b=(0,r.useRef)(null),w=(0,r.useRef)(null),y=e=>{let t=e.filter(e=>eu.includes(e.type)?!(e.size>0x6400000)||(console.warn("File too large: ".concat(e.name)),!1):(console.warn("File type not allowed: ".concat(e.type)),!1)),s=5-d.length;s<=0||m(t.slice(0,s))},k=async()=>{if(!g.trim()&&0===d.length||l||h)return;let e=[];d.length>0&&(e=await x(s)),t(g.trim(),e.length>0?e:void 0),j(""),b.current&&(b.current.style.height="auto")};return(0,a.jsxs)("div",{className:"border-t bg-background ".concat(N?"ring-2 ring-ring ring-offset-2":""),onDragOver:e=>{e.preventDefault(),v(!0)},onDragLeave:e=>{e.preventDefault(),v(!1)},onDrop:e=>{e.preventDefault(),v(!1),e.dataTransfer.files&&y(Array.from(e.dataTransfer.files))},children:[(0,a.jsx)("div",{className:"p-4 pb-2",children:(0,a.jsx)(en,{})}),(0,a.jsx)(ei,{files:d,onRemove:u}),(0,a.jsxs)("div",{className:"flex items-end gap-2 px-4 pb-4",children:[(0,a.jsx)("input",{ref:w,type:"file",multiple:!0,accept:eu.join(","),onChange:e=>{e.target.files&&(y(Array.from(e.target.files)),e.target.value="")},className:"hidden"}),(0,a.jsx)(B.$,{type:"button",variant:"ghost",size:"icon",onClick:()=>{var e;return null==(e=w.current)?void 0:e.click()},disabled:l||d.length>=5,className:"h-10 w-10 shrink-0",children:(0,a.jsx)(es.A,{className:"h-4 w-4"})}),(0,a.jsx)("div",{className:"relative flex-1",children:(0,a.jsx)("textarea",{ref:b,value:g,onChange:e=>j(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),k())},onInput:()=>{let e=b.current;e&&(e.style.height="auto",e.style.height="".concat(Math.min(e.scrollHeight,200),"px"))},placeholder:i(n?"chat.queuePlaceholder":"ask"===o?"chat.askPlaceholder":"chat.placeholder"),disabled:l,rows:1,className:"w-full resize-none rounded-lg border border-input bg-background px-4 py-3 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"})}),(0,a.jsx)(B.$,{onClick:k,disabled:!g.trim()&&0===d.length||l||h,size:"icon",className:"h-10 w-10 shrink-0",children:(0,a.jsx)(ea.A,{className:"h-4 w-4"})})]}),(n||h)&&(0,a.jsx)("div",{className:"px-4 pb-2 flex items-center gap-2 text-xs text-muted-foreground",children:h?(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-blue-500"}),i("chat.uploading")]}):(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-yellow-500"}),i("chat.thinking")]})}),(0,a.jsx)(ed,{items:p,onDelete:f})]})}var eh=s(4025);function ep(e){let{projectId:t}=e,{t:s}=(0,er.B)(),[l,n]=(0,r.useState)(!1),{messages:c,isStreaming:i,streamingBlocks:o,messageQueue:d,fetchMessages:m,fetchActiveSession:u,sendMessage:x,clearMessages:h}=T();(0,r.useEffect)(()=>{h(),m(t),u(t)},[t,m,u,h]);let p=async()=>{if(!l&&!i){n(!0);try{await S.F.post("/projects/".concat(t,"/chat/reset"))}catch(e){console.error("Failed to reset session:",e)}finally{n(!1)}}};return(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsxs)("div",{className:"flex h-12 items-center justify-between border-b px-4",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:s("chat.title")}),(0,a.jsxs)(B.$,{variant:"ghost",size:"sm",onClick:p,disabled:l||i,title:s("chat.newConversation"),className:"gap-1.5",children:[(0,a.jsx)(eh.A,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:s("chat.newConversation")})]})]}),(0,a.jsx)(et,{messages:c,streamingBlocks:o,isStreaming:i,projectId:t}),(0,a.jsx)(ex,{onSend:e=>{x(t,e)},projectId:t,isStreaming:i,queueCount:d.length})]})}var ef=s(5732),eg=s(5631),ej=s(3792),eN=s(3774),ev=s(3787),eb=s(4246),ew=s(5471),ey=s(7604),ek=s(6021),eA=s(9085),eS=s(9696),eC=s(943);let eF="http://localhost:14000/api";function eE(e){let{projectId:t,isRunning:s}=e,[l,n]=(0,r.useState)([]),[c,i]=(0,r.useState)("all"),[o,d]=(0,r.useState)(!0),u=(0,r.useRef)(null),x=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(!s)return void n([]);(async()=>{try{let e=await fetch("".concat(eF,"/projects/").concat(t,"/preview/logs"));if(e.ok){let t=await e.json();n(t)}}catch(e){console.error("Failed to fetch logs:",e)}})()},[t,s]),(0,r.useEffect)(()=>{if(!s){x.current&&(x.current.close(),x.current=null);return}let e=new EventSource("".concat(eF,"/projects/").concat(t,"/preview/logs/stream"));return e.onmessage=e=>{try{let t=JSON.parse(e.data);"log"===t.type&&t.entry&&n(e=>{let s=[...e,t.entry];return s.length>1e3?s.slice(-1e3):s})}catch(e){}},e.onerror=()=>{e.close(),x.current=null},x.current=e,()=>{e.close(),x.current=null}},[t,s]),(0,r.useEffect)(()=>{o&&u.current&&(u.current.scrollTop=u.current.scrollHeight)},[l,o]);let h=(0,r.useCallback)(()=>{if(!u.current)return;let{scrollTop:e,scrollHeight:t,clientHeight:s}=u.current;d(t-e-s<50)},[]),p=async()=>{try{await fetch("".concat(eF,"/projects/").concat(t,"/preview/logs"),{method:"DELETE"}),n([])}catch(e){console.error("Failed to clear logs:",e)}},f=l.filter(e=>{switch(c){case"frontend":return"frontend"===e.source;case"backend":return"backend"===e.source;case"error":return"stderr"===e.level;default:return!0}});return s?(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsxs)("div",{className:"flex h-10 items-center justify-between border-b px-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(B.$,{variant:"all"===c?"secondary":"ghost",size:"sm",onClick:()=>i("all"),className:"h-7 px-2 text-xs",children:"All"}),(0,a.jsx)(B.$,{variant:"frontend"===c?"secondary":"ghost",size:"sm",onClick:()=>i("frontend"),className:"h-7 px-2 text-xs",children:"Frontend"}),(0,a.jsx)(B.$,{variant:"backend"===c?"secondary":"ghost",size:"sm",onClick:()=>i("backend"),className:"h-7 px-2 text-xs",children:"Backend"}),(0,a.jsxs)(B.$,{variant:"error"===c?"secondary":"ghost",size:"sm",onClick:()=>i("error"),className:"h-7 px-2 text-xs text-red-500",children:[(0,a.jsx)(eS.A,{className:"h-3 w-3 mr-1"}),"Errors"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(B.$,{variant:"ghost",size:"sm",onClick:()=>{let e=new Blob([f.map(e=>{let t=new Date(e.timestamp).toISOString();return"[".concat(t,"] [").concat(e.source,"] [").concat(e.level,"] ").concat(e.message)}).join("\n")],{type:"text/plain"}),s=URL.createObjectURL(e),a=document.createElement("a");a.href=s,a.download="console-".concat(t,"-").concat(Date.now(),".log"),a.click(),URL.revokeObjectURL(s)},className:"h-7 w-7 p-0",title:"Download logs",children:(0,a.jsx)(eC.A,{className:"h-4 w-4"})}),(0,a.jsx)(B.$,{variant:"ghost",size:"sm",onClick:p,className:"h-7 w-7 p-0",title:"Clear logs",children:(0,a.jsx)(eo.A,{className:"h-4 w-4"})})]})]}),(0,a.jsx)("div",{ref:u,onScroll:h,className:"flex-1 overflow-auto bg-zinc-950 p-2 font-mono text-xs",children:0===f.length?(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-zinc-500",children:(0,a.jsx)("span",{children:"No logs yet..."})}):(0,a.jsx)("div",{className:"space-y-0.5",children:f.map(e=>(0,a.jsxs)("div",{className:"flex gap-2 ".concat("stderr"===e.level?"text-red-400":"text-zinc-300"),children:[(0,a.jsx)("span",{className:"text-zinc-600 shrink-0",children:new Date(e.timestamp).toLocaleTimeString()}),(0,a.jsx)("span",{className:"shrink-0 px-1 rounded text-[10px] ".concat("frontend"===e.source?"bg-blue-500/20 text-blue-400":"bg-green-500/20 text-green-400"),children:"frontend"===e.source?"FE":"BE"}),(0,a.jsx)("span",{className:"whitespace-pre-wrap break-all",children:e.message})]},e.id))})})]}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(m.A,{className:"mx-auto h-8 w-8 mb-2 opacity-50"}),(0,a.jsx)("p",{className:"text-sm",children:"Start the preview to see console output"})]})})}var eP=s(262);function eT(e){let{error:t,onDismiss:s}=e,[l,n]=(0,r.useState)(!1),c=async()=>{let e=[t.message,t.location?"at ".concat(t.location.file,":").concat(t.location.line,":").concat(t.location.column):"",t.stack||""].filter(Boolean).join("\n\n");await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)};return(0,a.jsx)("div",{className:"absolute inset-0 bg-black/80 backdrop-blur-sm z-50 overflow-auto",children:(0,a.jsx)("div",{className:"min-h-full p-6",children:(0,a.jsxs)("div",{className:"max-w-2xl mx-auto bg-zinc-900 rounded-lg border border-red-500/50 overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 bg-red-500/10 border-b border-red-500/30",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500"}),(0,a.jsx)("span",{className:"font-medium ".concat({compile:"text-red-500",runtime:"text-orange-500",network:"text-yellow-500"}[t.type]),children:{compile:"Compilation Error",runtime:"Runtime Error",network:"Network Error"}[t.type]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(B.$,{variant:"ghost",size:"sm",onClick:c,className:"h-7 px-2 text-zinc-400 hover:text-white",children:l?(0,a.jsx)(D.A,{className:"h-4 w-4"}):(0,a.jsx)(eP.A,{className:"h-4 w-4"})}),(0,a.jsx)(B.$,{variant:"ghost",size:"sm",onClick:s,className:"h-7 px-2 text-zinc-400 hover:text-white",children:(0,a.jsx)(ec.A,{className:"h-4 w-4"})})]})]}),(0,a.jsxs)("div",{className:"p-4 space-y-4",children:[(0,a.jsx)("p",{className:"text-lg font-mono text-red-400 whitespace-pre-wrap",children:t.message}),t.location&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-zinc-400",children:[(0,a.jsx)(ew.A,{className:"h-4 w-4"}),(0,a.jsxs)("code",{className:"bg-zinc-800 px-2 py-0.5 rounded",children:[t.location.file,":",t.location.line,":",t.location.column]})]}),t.stack&&(0,a.jsxs)("div",{className:"mt-4",children:[(0,a.jsx)("p",{className:"text-xs text-zinc-500 mb-2 uppercase tracking-wide",children:"Stack Trace"}),(0,a.jsx)("pre",{className:"bg-zinc-950 p-3 rounded-lg text-xs text-zinc-400 overflow-x-auto font-mono",children:t.stack})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 bg-zinc-800/50 border-t border-zinc-700 flex justify-end",children:(0,a.jsx)(B.$,{variant:"outline",size:"sm",onClick:s,className:"text-zinc-300",children:"Dismiss"})})]})})})}let ez="http://localhost:14000/api",eR={desktop:{width:"100%",height:"100%",label:"Desktop"},tablet:{width:"768px",height:"1024px",label:"Tablet"},mobile:{width:"375px",height:"667px",label:"Mobile"}};function eL(e){let{projectId:t}=e,{t:s}=(0,er.B)(),[l,n]=(0,r.useState)(!1),[c,i]=(0,r.useState)(!0),[o,d]=(0,r.useState)(null),u=(0,r.useRef)(null),x=(0,r.useRef)(null),{status:h,url:p,error:f,isLoading:g,projectReady:j,startPreview:N,stopPreview:v,restartPreview:b,refreshPreview:w,fetchStatus:y,checkProjectReady:k,clearError:A}=F(),S=(0,r.useRef)(!1),C=(0,r.useRef)(0);(0,r.useRef)(h).current=h;let E=(0,r.useCallback)(e=>{c&&"running"===h&&(d(e.split("/").pop()||e),setTimeout(()=>d(null),2e3),x.current&&(x.current.src=x.current.src))},[c,h]);(0,r.useEffect)(()=>{if(!l||"running"!==h){u.current&&(u.current.close(),u.current=null);return}let e=new EventSource("".concat(ez,"/projects/").concat(t,"/preview/watch"));return e.onmessage=e=>{try{let t=JSON.parse(e.data);"file-change"===t.type&&E(t.path)}catch(e){}},e.onerror=()=>{e.close(),u.current=null},u.current=e,()=>{e.close(),u.current=null}},[l,h,t,E]),(0,r.useEffect)(()=>{n(!0)},[]),(0,r.useEffect)(()=>{let e=()=>{let e="".concat(ez,"/projects/").concat(t,"/preview/stop");navigator.sendBeacon(e)};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}},[t]),(0,r.useEffect)(()=>{S.current=!1,C.current=0,A()},[t,A]),(0,r.useEffect)(()=>{if(!l)return;y(t),k(t);let e=setInterval(()=>{y(t),"running"!==h&&"starting"!==h&&k(t)},2e3);return()=>clearInterval(e)},[t,y,k,h,l]),(0,r.useEffect)(()=>{if(!l||g||"starting"===h)return;let e=S.current,s=j.ready;if(!e&&s&&(C.current=0),S.current=s,s&&"stopped"===h&&C.current<3&&(C.current++,N(t)),s&&"error"===h&&C.current<3){let e=setTimeout(()=>{j.ready&&C.current<3&&(C.current++,A(),N(t))},3e3);return()=>clearTimeout(e)}},[l,j.ready,h,g,t,N,A]);let P=()=>N(t),[T,R]=(0,r.useState)("preview"),[L,D]=(0,r.useState)("desktop"),[I,$]=(0,r.useState)(null),_=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(!l||"running"!==h){_.current&&(_.current.close(),_.current=null);return}let e=new EventSource("".concat(ez,"/projects/").concat(t,"/preview/logs/stream"));return e.onmessage=e=>{try{let t=JSON.parse(e.data);if("log"===t.type&&t.entry&&"stderr"===t.entry.level){let e=function(e){if(e.includes("Compiling...")||e.includes("Ready in")||e.includes("Compiled successfully")||e.includes("Fast Refresh")||e.includes("○ Compiling")||e.includes("✓ Compiled"))return null;let t=/(?:\.\/)?([^:]+):(\d+):(\d+)/,s=e.match(/(?:Error|TypeError|SyntaxError|ReferenceError):\s*(.+)/);if(s){let a=e.match(t);return{type:"compile",message:s[1],stack:e,location:a?{file:a[1],line:parseInt(a[2],10),column:parseInt(a[3],10)}:void 0}}if(e.includes("Failed to compile")||e.includes("Compilation failed"))return{type:"compile",message:"Failed to compile. Check the console for more details.",stack:e};let a=e.match(/Module not found:\s*(.+)/);if(a){let s=e.match(t);return{type:"compile",message:a[1],stack:e,location:s?{file:s[1],line:parseInt(s[2],10),column:parseInt(s[3],10)}:void 0}}return null}(t.entry.message);e&&$(e)}}catch(e){}},e.onerror=()=>{e.close(),_.current=null},_.current=e,()=>{e.close(),_.current=null}},[l,h,t]),(0,r.useEffect)(()=>{"starting"===h&&$(null)},[h]);let O=(0,r.useCallback)(()=>{$(null)},[]);return(0,a.jsxs)("div",{className:"flex h-full flex-col border-l",children:[(0,a.jsxs)("div",{className:"flex h-12 items-center justify-between border-b px-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"h-2 w-2 rounded-full ".concat(l?"running"===h?"bg-green-500":"starting"===h?"bg-yellow-500 animate-pulse":"error"===h?"bg-red-500":"bg-gray-400":"bg-gray-400")}),(0,a.jsx)("span",{className:"text-sm text-muted-foreground",children:s(l?"running"===h?"preview.title":"starting"===h?"preview.starting":"error"===h?"common.error":"preview.stop":"common.loading")})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:["preview"===T&&"running"===h&&(0,a.jsxs)("div",{className:"flex items-center gap-0.5 mr-2 border-r pr-2",children:[(0,a.jsx)(B.$,{variant:"desktop"===L?"secondary":"ghost",size:"sm",onClick:()=>D("desktop"),className:"h-7 px-2",title:"Desktop",children:(0,a.jsx)(ef.A,{className:"h-4 w-4"})}),(0,a.jsx)(B.$,{variant:"tablet"===L?"secondary":"ghost",size:"sm",onClick:()=>D("tablet"),className:"h-7 px-2",title:"Tablet (768x1024)",children:(0,a.jsx)(eg.A,{className:"h-4 w-4"})}),(0,a.jsx)(B.$,{variant:"mobile"===L?"secondary":"ghost",size:"sm",onClick:()=>D("mobile"),className:"h-7 px-2",title:"Mobile (375x667)",children:(0,a.jsx)(ej.A,{className:"h-4 w-4"})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5 mr-2 border-r pr-2",children:[(0,a.jsx)(B.$,{variant:"preview"===T?"secondary":"ghost",size:"sm",onClick:()=>R("preview"),className:"h-7 px-2",title:"Preview",children:(0,a.jsx)(ef.A,{className:"h-4 w-4"})}),(0,a.jsx)(B.$,{variant:"console"===T?"secondary":"ghost",size:"sm",onClick:()=>R("console"),className:"h-7 px-2",title:"Console",children:(0,a.jsx)(m.A,{className:"h-4 w-4"})})]}),"running"===h?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(B.$,{variant:"ghost",size:"sm",onClick:()=>i(!c),className:"h-8 w-8 p-0 ".concat(c?"text-green-500":"text-muted-foreground"),title:c?"Auto-refresh ON":"Auto-refresh OFF",children:(0,a.jsx)(eN.A,{className:"h-4 w-4"})}),(0,a.jsx)(B.$,{variant:"ghost",size:"sm",onClick:()=>w(),disabled:g,className:"h-8 w-8 p-0",title:"Refresh",children:(0,a.jsx)(ev.A,{className:"h-4 w-4"})}),(0,a.jsx)(B.$,{variant:"ghost",size:"sm",onClick:()=>b(t),disabled:g,className:"h-8 w-8 p-0",title:"Restart server",children:(0,a.jsx)(eb.A,{className:"h-4 w-4"})}),(0,a.jsx)(B.$,{variant:"ghost",size:"sm",onClick:()=>{p&&window.open(p,"_blank")},className:"h-8 w-8 p-0",title:"Open in new tab",children:(0,a.jsx)(ew.A,{className:"h-4 w-4"})}),(0,a.jsx)(B.$,{variant:"ghost",size:"sm",onClick:()=>v(t),disabled:g,className:"h-8 w-8 p-0",title:"Stop",children:(0,a.jsx)(ey.A,{className:"h-4 w-4"})})]}):(0,a.jsx)(B.$,{variant:"ghost",size:"sm",onClick:P,disabled:!l||g||"starting"===h||!j.ready,title:s(j.ready?"preview.start":"preview.notReady"),className:"h-8 w-8 p-0",children:(0,a.jsx)(ek.A,{className:"h-4 w-4"})})]})]}),(0,a.jsx)("div",{className:"flex-1 bg-muted/30 overflow-hidden",children:"console"===T?(0,a.jsx)(eE,{projectId:t,isRunning:"running"===h}):l?"running"===h&&p?(0,a.jsxs)("div",{className:"relative h-full w-full ".concat("desktop"!==L?"flex items-center justify-center bg-muted/50 p-4":""),children:[(0,a.jsx)("iframe",{ref:x,src:p,style:{width:eR[L].width,height:eR[L].height,maxWidth:"100%",maxHeight:"100%"},className:"border-0 ".concat("desktop"!==L?"border rounded-lg shadow-lg bg-white":"")},p),I&&(0,a.jsx)(eT,{error:I,onDismiss:O}),"desktop"!==L&&(0,a.jsxs)("div",{className:"absolute bottom-4 left-4 px-2 py-1 bg-black/70 text-white text-xs rounded",children:[eR[L].label," (",eR[L].width," x ",eR[L].height,")"]}),o&&(0,a.jsxs)("div",{className:"absolute bottom-4 right-4 flex items-center gap-2 px-3 py-2 bg-green-500/90 text-white text-xs rounded-lg shadow-lg animate-pulse",children:[(0,a.jsx)(eN.A,{className:"h-3 w-3"}),(0,a.jsx)("span",{children:o})]})]}):"starting"===h?(0,a.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,a.jsxs)("div",{className:"text-center text-muted-foreground",children:[(0,a.jsx)(ev.A,{className:"mx-auto h-8 w-8 animate-spin mb-2"}),(0,a.jsx)("p",{children:s("preview.starting")})]})}):f?(0,a.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,a.jsxs)("div",{className:"text-center text-destructive",children:[(0,a.jsx)("p",{className:"font-medium",children:s("common.error")}),(0,a.jsx)("p",{className:"text-sm",children:f}),(0,a.jsx)(B.$,{variant:"outline",size:"sm",onClick:P,className:"mt-4",children:s("common.refresh")})]})}):j.ready?(0,a.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,a.jsxs)("div",{className:"text-center text-muted-foreground",children:[(0,a.jsx)(ek.A,{className:"mx-auto h-8 w-8 mb-2"}),(0,a.jsx)("p",{children:s("preview.start")})]})}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,a.jsxs)("div",{className:"text-center text-muted-foreground max-w-sm",children:[(0,a.jsx)(eA.A,{className:"mx-auto h-8 w-8 mb-3 text-muted-foreground/50"}),(0,a.jsx)("p",{className:"font-medium mb-3",children:s("preview.notReady")}),(0,a.jsxs)("div",{className:"text-xs space-y-3",children:[(0,a.jsxs)("div",{className:"border rounded-lg p-2",children:[(0,a.jsx)("p",{className:"font-medium mb-1.5 text-foreground",children:j.isFullstack?"Frontend":"Project"}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("div",{className:"h-2 w-2 rounded-full ".concat(j.frontend.hasPackageJson?"bg-green-500":"bg-gray-300 animate-pulse")}),(0,a.jsx)("span",{children:"package.json"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("div",{className:"h-2 w-2 rounded-full ".concat(j.frontend.hasDevScript?"bg-green-500":"bg-gray-300")}),(0,a.jsx)("span",{children:"dev script"})]})]})]}),j.isFullstack&&j.backend&&(0,a.jsxs)("div",{className:"border rounded-lg p-2",children:[(0,a.jsxs)("p",{className:"font-medium mb-1.5 text-foreground",children:["Backend ","FASTAPI"===j.backendFramework?"(Python)":"(Node.js)"]}),(0,a.jsx)("div",{className:"space-y-1",children:"FASTAPI"===j.backendFramework?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("div",{className:"h-2 w-2 rounded-full ".concat(j.backend.hasRequirementsTxt?"bg-green-500":"bg-gray-300 animate-pulse")}),(0,a.jsx)("span",{children:"requirements.txt"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("div",{className:"h-2 w-2 rounded-full ".concat(j.backend.hasMainPy?"bg-green-500":"bg-gray-300")}),(0,a.jsx)("span",{children:"main.py"})]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("div",{className:"h-2 w-2 rounded-full ".concat(j.backend.hasPackageJson?"bg-green-500":"bg-gray-300 animate-pulse")}),(0,a.jsx)("span",{children:"package.json"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("div",{className:"h-2 w-2 rounded-full ".concat(j.backend.hasDevScript?"bg-green-500":"bg-gray-300")}),(0,a.jsx)("span",{children:"dev script"})]})]})})]})]}),(0,a.jsx)("p",{className:"text-xs mt-4",children:s("preview.waitForAI")})]})}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,a.jsx)(z.A,{className:"h-6 w-6 animate-spin text-muted-foreground"})})})]})}var eD=s(794),eI=s(2475),eB=s(4373),e$=s(6925);let e_="http://localhost:14000/api";function eO(e){let{projectId:t,onFileSelect:s}=e,{t:l}=(0,er.B)(),[n,c]=(0,r.useState)([]),[i,o]=(0,r.useState)(!0),[d,m]=(0,r.useState)(!1),u=(0,r.useCallback)(async()=>{try{o(!0),m(!1);let e=await fetch("".concat(e_,"/projects/").concat(t,"/files"));if(!e.ok)throw Error("Failed to load files");let s=await e.json();c(s)}catch(e){m(!0)}finally{o(!1)}},[t]);(0,r.useEffect)(()=>{u()},[u]);let x=async e=>{if(s)try{let a=await fetch("".concat(e_,"/projects/").concat(t,"/files/content?path=").concat(encodeURIComponent(e)));if(!a.ok)throw Error("Failed to load file");let r=await a.json();s(e,r.content)}catch(e){}};return i?(0,a.jsx)("div",{className:"p-4 text-sm text-muted-foreground",children:l("fileExplorer.loading")}):d?(0,a.jsxs)("div",{className:"p-4",children:[(0,a.jsx)("p",{className:"text-sm text-destructive mb-2",children:l("fileExplorer.error")}),(0,a.jsxs)(B.$,{variant:"outline",size:"sm",onClick:u,children:[(0,a.jsx)(ev.A,{className:"h-3 w-3 mr-1"}),l("common.refresh")]})]}):(0,a.jsxs)("div",{className:"h-full flex flex-col",children:[(0,a.jsxs)("div",{className:"flex h-12 items-center justify-between px-4 border-b",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:l("fileExplorer.title")}),(0,a.jsx)(B.$,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:u,title:l("common.refresh"),children:(0,a.jsx)(ev.A,{className:"h-4 w-4"})})]}),(0,a.jsx)("div",{className:"flex-1 overflow-auto p-2",children:0===n.length?(0,a.jsx)("div",{className:"text-sm text-muted-foreground px-2 py-4 text-center",children:l("fileExplorer.empty")}):(0,a.jsx)(eU,{nodes:n,onFileClick:x})})]})}function eU(e){let{nodes:t,onFileClick:s,level:r=0}=e;return(0,a.jsx)("ul",{className:"space-y-0.5",children:t.map(e=>(0,a.jsx)(eq,{node:e,onFileClick:s,level:r},e.path))})}function eq(e){let{node:t,onFileClick:s,level:l}=e,[n,i]=(0,r.useState)(l<1),o="directory"===t.type;return(0,a.jsxs)("li",{children:[(0,a.jsxs)("div",{className:(0,c.cn)("flex items-center gap-1 px-2 py-1 rounded-sm cursor-pointer","hover:bg-accent text-sm"),style:{paddingLeft:"".concat(12*l+8,"px")},onClick:()=>{o?i(!n):s(t.path)},children:[o&&(0,a.jsx)("span",{className:"w-4 h-4 flex items-center justify-center flex-shrink-0",children:n?(0,a.jsx)(L.A,{className:"h-3 w-3"}):(0,a.jsx)(e$.A,{className:"h-3 w-3"})}),!o&&(0,a.jsx)("span",{className:"w-4 flex-shrink-0"}),(()=>{if(o)return n?(0,a.jsx)(eD.A,{className:"h-4 w-4 text-blue-400 flex-shrink-0"}):(0,a.jsx)(eI.A,{className:"h-4 w-4 text-blue-400 flex-shrink-0"});let e={ts:"text-blue-400",tsx:"text-blue-400",js:"text-yellow-400",jsx:"text-yellow-400",py:"text-green-400",json:"text-yellow-600",md:"text-gray-400",css:"text-purple-400",scss:"text-pink-400",html:"text-orange-400",prisma:"text-teal-400"}[t.extension||""]||"text-muted-foreground";return(0,a.jsx)(eB.A,{className:(0,c.cn)("h-4 w-4 flex-shrink-0",e)})})(),(0,a.jsx)("span",{className:"truncate",children:t.name})]}),o&&n&&t.children&&(0,a.jsx)(eU,{nodes:t.children,onFileClick:s,level:l+1})]})}let eM={ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",py:"python",json:"json",md:"markdown",css:"css",scss:"scss",html:"markup",prisma:"graphql",sql:"sql",sh:"bash",bash:"bash",yml:"yaml",yaml:"yaml",env:"bash",gitignore:"bash"};function eQ(e){let{path:t,content:s,language:l,onClose:n}=e,{t:c}=(0,er.B)(),[i,o]=(0,r.useState)(!1),d=t.split("/").pop()||t,m=eM[l]||"typescript",u=s.split("\n"),x=async()=>{await navigator.clipboard.writeText(s),o(!0),setTimeout(()=>o(!1),2e3)};return(0,a.jsx)("div",{className:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",children:(0,a.jsxs)("div",{className:"fixed inset-4 z-50 flex flex-col rounded-lg border bg-background shadow-lg md:inset-8 lg:inset-16",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-mono text-sm font-medium",children:d}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:t})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsxs)("span",{className:"text-xs text-muted-foreground mr-2",children:[u.length," lines"]}),(0,a.jsx)(B.$,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:x,title:i?"Copied!":"Copy",children:i?(0,a.jsx)(D.A,{className:"h-4 w-4 text-green-500"}):(0,a.jsx)(eP.A,{className:"h-4 w-4"})}),(0,a.jsx)(B.$,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:n,title:c("common.close"),children:(0,a.jsx)(ec.A,{className:"h-4 w-4"})})]})]}),(0,a.jsx)("div",{className:"flex-1 overflow-auto bg-[#1e1e1e]",children:(0,a.jsx)(N.f4,{theme:N.Zj.vsDark,code:s,language:m,children:e=>{let{className:t,style:s,tokens:r,getLineProps:l,getTokenProps:n}=e;return(0,a.jsx)("pre",{className:"text-sm leading-relaxed",style:{...s,margin:0,padding:"1rem",background:"#1e1e1e",minHeight:"100%"},children:(0,a.jsx)("code",{className:t,children:r.map((e,t)=>{let{key:s,...r}=l({line:e});return(0,a.jsxs)("div",{...r,className:"table-row hover:bg-white/5",children:[(0,a.jsx)("span",{className:"table-cell select-none pr-4 text-right text-gray-500 w-12",children:t+1}),(0,a.jsx)("span",{className:"table-cell",children:e.map((e,t)=>{let{key:s,...r}=n({token:e});return(0,a.jsx)("span",{...r},t)})})]},t)})})})}})})]})})}var eW=s(1858),eJ=s(4593),eK=s(3028);function eV(e){let{projectId:t}=e,[s,l]=(0,r.useState)([]),[n,c]=(0,r.useState)(null),[i,o]=(0,r.useState)(null),[d,m]=(0,r.useState)(!1),[u,x]=(0,r.useState)(null),[h,p]=(0,r.useState)(1),[f,g]=(0,r.useState)(!1),[j,N]=(0,r.useState)(""),[v,b]=(0,r.useState)(null),w=(0,r.useCallback)(async()=>{m(!0),x(null);try{let e=await S.F.get("/projects/".concat(t,"/database/tables"));l(e),e.length>0&&!n&&c(e[0].name)}catch(e){x(e instanceof Error?e.message:"Failed to load tables")}finally{m(!1)}},[t,n]),y=(0,r.useCallback)(async()=>{if(n){m(!0),x(null);try{let e=await S.F.get("/projects/".concat(t,"/database/tables/").concat(n,"/data?page=").concat(h,"&pageSize=").concat(50));o(e)}catch(e){x(e instanceof Error?e.message:"Failed to load table data")}finally{m(!1)}}},[t,n,h]);(0,r.useEffect)(()=>{w()},[w]),(0,r.useEffect)(()=>{n&&(p(1),y())},[n]),(0,r.useEffect)(()=>{n&&y()},[h,y]);let k=async e=>{if(!n||!i)return;let s=i.columns.find(e=>e.primaryKey);if(!s)return void x("No primary key found for this table");if(confirm("Are you sure you want to delete this row?"))try{await S.F.delete("/projects/".concat(t,"/database/tables/").concat(n,"/rows"),{primaryKey:s.name,primaryKeyValue:e[s.name]}),await y()}catch(e){x(e instanceof Error?e.message:"Failed to delete row")}},A=async()=>{if(j.trim()){m(!0),x(null);try{let e=await S.F.post("/projects/".concat(t,"/database/query"),{query:j});b(e)}catch(e){x(e instanceof Error?e.message:"Query execution failed")}finally{m(!1)}}},C=i?Math.ceil(i.total/50):0;return d&&0===s.length?(0,a.jsxs)("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:[(0,a.jsx)(ev.A,{className:"h-5 w-5 animate-spin mr-2"}),"Loading database..."]}):u&&0===s.length?(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(eW.A,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),(0,a.jsx)("p",{className:"text-sm",children:u}),(0,a.jsx)(B.$,{variant:"outline",size:"sm",onClick:w,className:"mt-2",children:"Retry"})]})}):(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[(0,a.jsxs)("h3",{className:"font-medium flex items-center gap-2",children:[(0,a.jsx)(eW.A,{className:"h-4 w-4"}),"Database"]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(B.$,{variant:f?"secondary":"outline",size:"sm",onClick:()=>g(!f),className:"h-8",children:"SQL"}),(0,a.jsx)(B.$,{variant:"ghost",size:"sm",onClick:w,disabled:d,className:"h-8 w-8 p-0",children:(0,a.jsx)(ev.A,{className:"h-4 w-4 ".concat(d?"animate-spin":"")})})]})]}),u&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 bg-destructive/10 text-destructive text-sm",children:[(0,a.jsx)(eS.A,{className:"h-4 w-4"}),u]}),f&&(0,a.jsxs)("div",{className:"border-b p-4 space-y-2",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(K.p,{value:j,onChange:e=>N(e.target.value),placeholder:"SELECT * FROM users LIMIT 10",className:"font-mono text-sm",onKeyDown:e=>{"Enter"===e.key&&e.metaKey&&A()}}),(0,a.jsxs)(B.$,{onClick:A,disabled:d,size:"sm",children:[(0,a.jsx)(ek.A,{className:"h-4 w-4 mr-1"}),"Run"]})]}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Press Cmd+Enter to execute"})]}),(0,a.jsxs)("div",{className:"flex flex-1 overflow-hidden",children:[(0,a.jsx)("div",{className:"w-48 border-r overflow-auto",children:(0,a.jsxs)("div",{className:"p-2 space-y-1",children:[s.map(e=>(0,a.jsxs)("button",{onClick:()=>{c(e.name),g(!1),b(null)},className:"w-full flex items-center justify-between px-3 py-2 text-sm rounded-md transition-colors ".concat(n===e.name?"bg-primary/10 text-primary":"hover:bg-muted"),children:[(0,a.jsxs)("span",{className:"flex items-center gap-2 truncate",children:[(0,a.jsx)(eJ.A,{className:"h-4 w-4 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:e.rowCount})]},e.name)),0===s.length&&(0,a.jsx)("p",{className:"text-sm text-muted-foreground px-3 py-2",children:"No tables found"})]})}),(0,a.jsx)("div",{className:"flex-1 flex flex-col overflow-hidden",children:f&&v?(0,a.jsx)("div",{className:"flex-1 overflow-auto",children:v.length>0?(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-muted/50 sticky top-0",children:(0,a.jsx)("tr",{children:Object.keys(v[0]).map(e=>(0,a.jsx)("th",{className:"px-3 py-2 text-left font-medium text-muted-foreground border-b",children:e},e))})}),(0,a.jsx)("tbody",{children:v.map((e,t)=>(0,a.jsx)("tr",{className:"border-b hover:bg-muted/30",children:Object.values(e).map((e,t)=>(0,a.jsx)("td",{className:"px-3 py-2 font-mono",children:null===e?(0,a.jsx)("span",{className:"text-muted-foreground",children:"NULL"}):String(e)},t))},t))})]}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"Query returned no results"})}):i?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"flex-1 overflow-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-muted/50 sticky top-0",children:(0,a.jsxs)("tr",{children:[i.columns.map(e=>(0,a.jsxs)("th",{className:"px-3 py-2 text-left font-medium text-muted-foreground border-b",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[e.name,e.primaryKey&&(0,a.jsx)("span",{className:"text-xs text-primary",children:"PK"})]}),(0,a.jsx)("span",{className:"text-xs font-normal",children:e.type})]},e.name)),(0,a.jsx)("th",{className:"w-10 border-b"})]})}),(0,a.jsx)("tbody",{children:i.rows.map((e,t)=>(0,a.jsxs)("tr",{className:"border-b hover:bg-muted/30",children:[i.columns.map(t=>(0,a.jsx)("td",{className:"px-3 py-2 font-mono",children:null===e[t.name]?(0,a.jsx)("span",{className:"text-muted-foreground",children:"NULL"}):String(e[t.name])},t.name)),(0,a.jsx)("td",{className:"px-2",children:(0,a.jsx)(B.$,{variant:"ghost",size:"sm",onClick:()=>k(e),className:"h-6 w-6 p-0 text-muted-foreground hover:text-destructive",children:(0,a.jsx)(eo.A,{className:"h-3 w-3"})})})]},t))})]})}),(0,a.jsxs)("div",{className:"flex items-center justify-between border-t px-4 py-2",children:[(0,a.jsxs)("span",{className:"text-sm text-muted-foreground",children:[i.total," rows total"]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(B.$,{variant:"outline",size:"sm",onClick:()=>p(e=>Math.max(1,e-1)),disabled:1===h,className:"h-8 w-8 p-0",children:(0,a.jsx)(eK.A,{className:"h-4 w-4"})}),(0,a.jsxs)("span",{className:"text-sm",children:[h," / ",C||1]}),(0,a.jsx)(B.$,{variant:"outline",size:"sm",onClick:()=>p(e=>Math.min(C,e+1)),disabled:h>=C,className:"h-8 w-8 p-0",children:(0,a.jsx)(e$.A,{className:"h-4 w-4"})})]})]})]}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"Select a table to view data"})})]})]})}var eG=s(8234),eH=s(4539),eY=s(6029),eX=s(1278),eZ=s(219);let e0={navigate:"Navigate to URL",click:"Click element",fill:"Fill input",waitFor:"Wait for element",screenshot:"Take screenshot",assert:"Assert visible"};function e4(e){let{projectId:t}=e,[s,l]=(0,r.useState)([]),[n,c]=(0,r.useState)(null),[i,o]=(0,r.useState)(!1),[d,m]=(0,r.useState)(!1),[u,x]=(0,r.useState)(null),[h,p]=(0,r.useState)(null),[f,g]=(0,r.useState)(!1),[j,N]=(0,r.useState)(""),[v,b]=(0,r.useState)([]),w=(0,r.useCallback)(async()=>{o(!0),x(null);try{let e=await S.F.get("/projects/".concat(t,"/testing/scenarios"));l(e)}catch(e){x(e instanceof Error?e.message:"Failed to load scenarios")}finally{o(!1)}},[t]);(0,r.useEffect)(()=>{w()},[w]);let y=async()=>{if(!j.trim()||0===v.length)return void x("Name and at least one step are required");o(!0),x(null);try{n?await S.F.put("/projects/".concat(t,"/testing/scenarios/").concat(n.id),{name:j,steps:v}):await S.F.post("/projects/".concat(t,"/testing/scenarios"),{name:j,steps:v}),await w(),g(!1)}catch(e){x(e instanceof Error?e.message:"Failed to save scenario")}finally{o(!1)}},k=async()=>{if(n&&confirm("Delete this test scenario?"))try{await S.F.delete("/projects/".concat(t,"/testing/scenarios/").concat(n.id)),c(null),await w()}catch(e){x(e instanceof Error?e.message:"Failed to delete scenario")}},A=async()=>{if(n){m(!0),x(null),p(null);try{let e=await S.F.post("/projects/".concat(t,"/testing/scenarios/").concat(n.id,"/run"));p(e)}catch(e){x(e instanceof Error?e.message:"Test execution failed")}finally{m(!1)}}},C=(e,t)=>{let s=[...v];s[e]={...s[e],...t},b(s)};return i&&0===s.length?(0,a.jsxs)("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:[(0,a.jsx)(ev.A,{className:"h-5 w-5 animate-spin mr-2"}),"Loading..."]}):(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[(0,a.jsxs)("h3",{className:"font-medium flex items-center gap-2",children:[(0,a.jsx)(eG.A,{className:"h-4 w-4"}),"Browser Testing"]}),(0,a.jsxs)(B.$,{variant:"outline",size:"sm",onClick:()=>{c(null),g(!0),N("New Test"),b([{action:"navigate",url:"/"}])},children:[(0,a.jsx)(eH.A,{className:"h-4 w-4 mr-1"}),"New Test"]})]}),u&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 bg-destructive/10 text-destructive text-sm",children:[(0,a.jsx)(eS.A,{className:"h-4 w-4"}),u]}),(0,a.jsxs)("div",{className:"flex flex-1 overflow-hidden",children:[(0,a.jsx)("div",{className:"w-56 border-r overflow-auto",children:(0,a.jsxs)("div",{className:"p-2 space-y-1",children:[s.map(e=>(0,a.jsxs)("button",{onClick:()=>{c(e),p(null),g(!1)},className:"w-full flex items-center gap-2 px-3 py-2 text-sm rounded-md transition-colors ".concat((null==n?void 0:n.id)===e.id?"bg-primary/10 text-primary":"hover:bg-muted"),children:[(0,a.jsx)(eG.A,{className:"h-4 w-4 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},e.id)),0===s.length&&(0,a.jsx)("p",{className:"text-sm text-muted-foreground px-3 py-2",children:"No test scenarios yet"})]})}),(0,a.jsx)("div",{className:"flex-1 overflow-auto",children:f?(0,a.jsxs)("div",{className:"p-4 space-y-4",children:[(0,a.jsx)(K.p,{value:j,onChange:e=>N(e.target.value),placeholder:"Test name",className:"font-medium"}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-muted-foreground",children:"Steps"}),v.map((e,t)=>(0,a.jsxs)("div",{className:"flex gap-2 items-start p-3 border rounded-lg",children:[(0,a.jsx)("select",{value:e.action,onChange:e=>C(t,{action:e.target.value}),className:"h-9 px-2 border rounded-md bg-background text-sm",children:Object.entries(e0).map(e=>{let[t,s]=e;return(0,a.jsx)("option",{value:t,children:s},t)})}),"navigate"===e.action&&(0,a.jsx)(K.p,{value:e.url||"",onChange:e=>C(t,{url:e.target.value}),placeholder:"/path or full URL",className:"flex-1"}),("click"===e.action||"waitFor"===e.action||"assert"===e.action)&&(0,a.jsx)(K.p,{value:e.selector||"",onChange:e=>C(t,{selector:e.target.value}),placeholder:"CSS selector",className:"flex-1 font-mono text-sm"}),"fill"===e.action&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(K.p,{value:e.selector||"",onChange:e=>C(t,{selector:e.target.value}),placeholder:"CSS selector",className:"flex-1 font-mono text-sm"}),(0,a.jsx)(K.p,{value:e.value||"",onChange:e=>C(t,{value:e.target.value}),placeholder:"Value",className:"flex-1"})]}),"screenshot"===e.action&&(0,a.jsx)(K.p,{value:e.name||"",onChange:e=>C(t,{name:e.target.value}),placeholder:"Screenshot name",className:"flex-1"}),(0,a.jsx)(B.$,{variant:"ghost",size:"sm",onClick:()=>{b(v.filter((e,s)=>s!==t))},className:"h-9 w-9 p-0 text-muted-foreground hover:text-destructive",children:(0,a.jsx)(eo.A,{className:"h-4 w-4"})})]},t)),(0,a.jsxs)(B.$,{variant:"outline",size:"sm",onClick:()=>{b([...v,{action:"click",selector:""}])},children:[(0,a.jsx)(eH.A,{className:"h-4 w-4 mr-1"}),"Add Step"]})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-4 border-t",children:[(0,a.jsx)(B.$,{onClick:y,disabled:i,children:"Save"}),(0,a.jsx)(B.$,{variant:"outline",onClick:()=>g(!1),children:"Cancel"})]})]}):n?(0,a.jsxs)("div",{className:"p-4 space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h4",{className:"text-lg font-medium",children:n.name}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(B.$,{variant:"outline",size:"sm",onClick:()=>{n&&(g(!0),N(n.name),b([...n.steps]))},children:"Edit"}),(0,a.jsx)(B.$,{variant:"outline",size:"sm",onClick:k,className:"text-destructive",children:(0,a.jsx)(eo.A,{className:"h-4 w-4"})}),(0,a.jsxs)(B.$,{onClick:A,disabled:d,size:"sm",children:[d?(0,a.jsx)(ev.A,{className:"h-4 w-4 animate-spin mr-1"}):(0,a.jsx)(ek.A,{className:"h-4 w-4 mr-1"}),"Run Test"]})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"text-sm font-medium text-muted-foreground",children:[n.steps.length," steps"]}),n.steps.map((e,t)=>{let s=null==h?void 0:h.steps[t];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-3 border rounded-lg ".concat((null==s?void 0:s.status)==="passed"?"border-green-500/50 bg-green-500/5":(null==s?void 0:s.status)==="failed"?"border-red-500/50 bg-red-500/5":""),children:[s?"passed"===s.status?(0,a.jsx)(eY.A,{className:"h-4 w-4 text-green-500"}):"failed"===s.status?(0,a.jsx)(eX.A,{className:"h-4 w-4 text-red-500"}):(0,a.jsx)(eZ.A,{className:"h-4 w-4 text-muted-foreground"}):(0,a.jsx)("div",{className:"h-4 w-4 rounded-full border-2"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("span",{className:"font-medium",children:e0[e.action]}),e.selector&&(0,a.jsx)("code",{className:"ml-2 text-xs bg-muted px-1.5 py-0.5 rounded",children:e.selector}),e.url&&(0,a.jsx)("code",{className:"ml-2 text-xs bg-muted px-1.5 py-0.5 rounded",children:e.url}),e.value&&(0,a.jsxs)("span",{className:"ml-2 text-sm text-muted-foreground",children:['= "',e.value,'"']})]})]},t)})]}),h&&(0,a.jsxs)("div",{className:"p-4 rounded-lg ".concat("passed"===h.status?"bg-green-500/10 text-green-700 dark:text-green-400":"bg-red-500/10 text-red-700 dark:text-red-400"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:["passed"===h.status?(0,a.jsx)(eY.A,{className:"h-5 w-5"}):(0,a.jsx)(eX.A,{className:"h-5 w-5"}),(0,a.jsxs)("span",{className:"font-medium",children:["Test ","passed"===h.status?"Passed":"Failed"]})]}),h.error&&(0,a.jsx)("p",{className:"mt-2 text-sm",children:h.error}),h.endTime&&h.startTime&&(0,a.jsxs)("p",{className:"mt-1 text-sm opacity-70",children:["Duration: ",h.endTime-h.startTime,"ms"]})]})]}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(eG.A,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),(0,a.jsx)("p",{children:"Select a test or create a new one"})]})})})]})]})}var e1=s(5552);function e2(e){let{projectId:t}=e,[s,l]=(0,r.useState)([]),[n,c]=(0,r.useState)(null),[o,d]=(0,r.useState)(null),[m,u]=(0,r.useState)(new Set),[x,h]=(0,r.useState)(!1),[p,f]=(0,r.useState)(null),[g,j]=(0,r.useState)(""),[N,v]=(0,r.useState)(!1),b=(0,r.useCallback)(async()=>{h(!0),f(null);try{let e=await S.F.get("/projects/".concat(t,"/checkpoints"));l(e)}catch(e){f(e instanceof Error?e.message:"Failed to load checkpoints")}finally{h(!1)}},[t]),w=(0,r.useCallback)(async()=>{try{let e=await S.F.get("/projects/".concat(t,"/checkpoints/status"));v(e.hasChanges)}catch(e){}},[t]);(0,r.useEffect)(()=>{b(),w()},[b,w]),(0,r.useEffect)(()=>{let e=setInterval(w,5e3);return()=>clearInterval(e)},[w]);let y=async e=>{c(e),u(new Set);try{let s=await S.F.get("/projects/".concat(t,"/checkpoints/diff?from=").concat(e.hash));d(s.files)}catch(e){d(null)}},k=async()=>{if(!g.trim())return void f("Please enter a checkpoint message");h(!0),f(null);try{await S.F.post("/projects/".concat(t,"/checkpoints"),{message:g}),j(""),await b(),await w()}catch(e){f(e instanceof Error?e.message:"Failed to create checkpoint")}finally{h(!1)}},A=async e=>{if(confirm('Restore to "'.concat(e.message,'"? This will discard current changes.'))){h(!0),f(null);try{await S.F.post("/projects/".concat(t,"/checkpoints/").concat(e.hash,"/restore")),await b(),await w(),c(null),d(null)}catch(e){f(e instanceof Error?e.message:"Failed to restore checkpoint")}finally{h(!1)}}};return x&&0===s.length?(0,a.jsxs)("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:[(0,a.jsx)(ev.A,{className:"h-5 w-5 animate-spin mr-2"}),"Loading..."]}):(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[(0,a.jsxs)("h3",{className:"font-medium flex items-center gap-2",children:[(0,a.jsx)(e1.A,{className:"h-4 w-4"}),"Checkpoints"]}),(0,a.jsx)(B.$,{variant:"ghost",size:"sm",onClick:b,disabled:x,className:"h-8 w-8 p-0",children:(0,a.jsx)(ev.A,{className:"h-4 w-4 ".concat(x?"animate-spin":"")})})]}),p&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 bg-destructive/10 text-destructive text-sm",children:[(0,a.jsx)(eS.A,{className:"h-4 w-4"}),p]}),N&&(0,a.jsxs)("div",{className:"border-b p-4 space-y-2",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(K.p,{value:g,onChange:e=>j(e.target.value),placeholder:"Checkpoint message...",className:"flex-1",onKeyDown:e=>{"Enter"===e.key&&k()}}),(0,a.jsxs)(B.$,{onClick:k,disabled:x,size:"sm",children:[(0,a.jsx)(eH.A,{className:"h-4 w-4 mr-1"}),"Save"]})]}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"You have unsaved changes"})]}),(0,a.jsxs)("div",{className:"flex flex-1 overflow-hidden",children:[(0,a.jsx)("div",{className:"w-72 border-r overflow-auto",children:(0,a.jsxs)("div",{className:"p-2 space-y-1",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-primary/5 border border-primary/20",children:[(0,a.jsx)("div",{className:"w-3 h-3 rounded-full bg-primary mt-1"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:"Current State"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:N?"Unsaved changes":"No changes"})]})]}),s.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>y(e),className:"w-full flex items-start gap-3 p-3 rounded-lg text-left transition-colors ".concat((null==n?void 0:n.hash)===e.hash?"bg-muted":"hover:bg-muted/50"),children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"w-3 h-3 rounded-full bg-muted-foreground/30 mt-1"}),t<s.length-1&&(0,a.jsx)("div",{className:"absolute top-4 left-1.5 w-px h-full bg-muted-foreground/20"})]}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm truncate",children:e.message}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mt-1",children:[(0,a.jsx)(eZ.A,{className:"h-3 w-3"}),(e=>{let t=new Date(e),s=new Date().getTime()-t.getTime();return s<6e4?"Just now":s<36e5?"".concat(Math.floor(s/6e4),"m ago"):s<864e5?"".concat(Math.floor(s/36e5),"h ago"):t.toLocaleDateString()})(e.timestamp)]}),e.filesChanged>0&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs mt-1",children:[(0,a.jsxs)("span",{className:"text-green-500",children:["+",e.insertions]}),(0,a.jsxs)("span",{className:"text-red-500",children:["-",e.deletions]}),(0,a.jsxs)("span",{className:"text-muted-foreground",children:[e.filesChanged," files"]})]})]})]},e.hash)),0===s.length&&(0,a.jsx)("p",{className:"text-sm text-muted-foreground px-3 py-2",children:"No checkpoints yet"})]})}),(0,a.jsx)("div",{className:"flex-1 overflow-auto",children:n&&o?(0,a.jsxs)("div",{className:"p-4 space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"font-medium",children:n.message}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:new Date(n.timestamp).toLocaleString()})]}),(0,a.jsxs)(B.$,{variant:"outline",size:"sm",onClick:()=>A(n),children:[(0,a.jsx)(eb.A,{className:"h-4 w-4 mr-1"}),"Restore"]})]}),0===o.length?(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"No differences from current state"}):(0,a.jsx)("div",{className:"space-y-2",children:o.map(e=>(0,a.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,a.jsxs)("button",{onClick:()=>(e=>{let t=new Set(m);t.has(e)?t.delete(e):t.add(e),u(t)})(e.path),className:"w-full flex items-center gap-2 p-3 hover:bg-muted/50 text-left",children:[m.has(e.path)?(0,a.jsx)(L.A,{className:"h-4 w-4"}):(0,a.jsx)(e$.A,{className:"h-4 w-4"}),(0,a.jsx)(i.A,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"flex-1 font-mono text-sm truncate",children:e.path}),(0,a.jsx)("span",{className:"text-xs px-2 py-0.5 rounded ".concat("added"===e.status?"bg-green-500/20 text-green-500":"deleted"===e.status?"bg-red-500/20 text-red-500":"bg-yellow-500/20 text-yellow-500"),children:e.status}),(0,a.jsxs)("span",{className:"text-xs text-green-500",children:["+",e.additions]}),(0,a.jsxs)("span",{className:"text-xs text-red-500",children:["-",e.deletions]})]}),m.has(e.path)&&(0,a.jsx)("pre",{className:"bg-zinc-950 p-4 text-xs font-mono overflow-x-auto max-h-96",children:e.diff.split("\n").map((e,t)=>(0,a.jsx)("div",{className:e.startsWith("+")&&!e.startsWith("+++")?"text-green-400 bg-green-500/10":e.startsWith("-")&&!e.startsWith("---")?"text-red-400 bg-red-500/10":e.startsWith("@@")?"text-blue-400":"text-zinc-400",children:e},t))})]},e.path))})]}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(e1.A,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),(0,a.jsx)("p",{children:"Select a checkpoint to view changes"})]})})})]})]})}var e5=s(6282),e3=s(9176),e8=s(3512);let e6=["SECRET","PASSWORD","KEY","TOKEN","API_KEY","PRIVATE","CREDENTIAL"];function e9(e){let t=e.toUpperCase();return e6.some(e=>t.includes(e))}function e7(e){let{projectId:t}=e,[s,l]=(0,r.useState)([]),[n,c]=(0,r.useState)(null),[o,d]=(0,r.useState)([]),[m,u]=(0,r.useState)(new Set),[x,h]=(0,r.useState)(!1),[p,f]=(0,r.useState)(!1),[g,j]=(0,r.useState)(null),[N,v]=(0,r.useState)(!1),b=(0,r.useCallback)(async()=>{h(!0),j(null);try{let e=await S.F.get("/projects/".concat(t,"/env"));l(e),e.length>0&&!n&&(c(e[0].path),d(e[0].variables))}catch(e){j("Failed to load environment files")}finally{h(!1)}},[t,n]),w=(0,r.useCallback)(async e=>{h(!0),j(null);try{let s=await S.F.get("/projects/".concat(t,"/env/file?path=").concat(encodeURIComponent(e)));d(s.variables),v(!1)}catch(t){j("Failed to load ".concat(e))}finally{h(!1)}},[t]);(0,r.useEffect)(()=>{b()},[b]),(0,r.useEffect)(()=>{n&&w(n)},[n,w]);let y=(e,t,s)=>{let a=[...o];a[e]={...a[e],[t]:s},d(a),v(!0)},k=async()=>{if(!n)return;if(o.filter(e=>!e.key.trim()).length>0)return void j("Variable names cannot be empty");let e=o.map(e=>e.key.trim()),s=e.filter((t,s)=>e.indexOf(t)!==s);if(s.length>0)return void j("Duplicate variable name: ".concat(s[0]));f(!0),j(null);try{await S.F.put("/projects/".concat(t,"/env/file?path=").concat(encodeURIComponent(n)),{variables:o}),v(!1)}catch(e){j("Failed to save environment variables")}finally{f(!1)}},A=async()=>{let e=prompt("Enter .env file name (e.g., .env.local):");if(e){if(!e.startsWith(".env"))return void j("File name must start with .env");try{await S.F.post("/projects/".concat(t,"/env/file?path=").concat(encodeURIComponent(e)),{variables:[]}),await b(),c(e)}catch(e){j("Failed to create environment file")}}};return x&&0===s.length?(0,a.jsxs)("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:[(0,a.jsx)(ev.A,{className:"h-5 w-5 animate-spin mr-2"}),"Loading..."]}):(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[(0,a.jsx)("h3",{className:"font-medium",children:"Environment Variables"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)(B.$,{variant:"outline",size:"sm",onClick:A,className:"h-8",children:[(0,a.jsx)(eH.A,{className:"h-4 w-4 mr-1"}),"New File"]}),(0,a.jsxs)(B.$,{variant:"default",size:"sm",onClick:k,disabled:!N||p,className:"h-8",children:[p?(0,a.jsx)(ev.A,{className:"h-4 w-4 animate-spin mr-1"}):(0,a.jsx)(e5.A,{className:"h-4 w-4 mr-1"}),"Save"]})]})]}),g&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 bg-destructive/10 text-destructive text-sm",children:[(0,a.jsx)(eS.A,{className:"h-4 w-4"}),g]}),(0,a.jsxs)("div",{className:"flex flex-1 overflow-hidden",children:[(0,a.jsx)("div",{className:"w-48 border-r overflow-auto",children:(0,a.jsxs)("div",{className:"p-2 space-y-1",children:[s.map(e=>(0,a.jsxs)("button",{onClick:()=>{var t;return t=e.path,void((!N||confirm("You have unsaved changes. Discard them?"))&&(c(t),u(new Set)))},className:"w-full flex items-center gap-2 px-3 py-2 text-sm rounded-md transition-colors ".concat(n===e.path?"bg-primary/10 text-primary":"hover:bg-muted"),children:[(0,a.jsx)(i.A,{className:"h-4 w-4 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.path})]},e.path)),0===s.length&&(0,a.jsx)("p",{className:"text-sm text-muted-foreground px-3 py-2",children:"No .env files found"})]})}),(0,a.jsx)("div",{className:"flex-1 overflow-auto",children:n?(0,a.jsxs)("div",{className:"p-4 space-y-3",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_1fr_auto] gap-2 px-2 text-xs font-medium text-muted-foreground uppercase tracking-wide",children:[(0,a.jsx)("div",{children:"Key"}),(0,a.jsx)("div",{children:"Value"}),(0,a.jsx)("div",{className:"w-16"})]}),o.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_1fr_auto] gap-2 items-center",children:[(0,a.jsx)(K.p,{value:e.key,onChange:e=>y(t,"key",e.target.value),placeholder:"VARIABLE_NAME",className:"font-mono text-sm"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(K.p,{type:e9(e.key)&&!m.has(e.key)?"password":"text",value:e.value,onChange:e=>y(t,"value",e.target.value),placeholder:"value",className:"font-mono text-sm pr-10"}),e9(e.key)&&(0,a.jsx)("button",{onClick:()=>(e=>{let t=new Set(m);t.has(e)?t.delete(e):t.add(e),u(t)})(e.key),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:m.has(e.key)?(0,a.jsx)(e3.A,{className:"h-4 w-4"}):(0,a.jsx)(e8.A,{className:"h-4 w-4"})})]}),(0,a.jsx)(B.$,{variant:"ghost",size:"sm",onClick:()=>{d(o.filter((e,s)=>s!==t)),v(!0)},className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,a.jsx)(eo.A,{className:"h-4 w-4"})})]},t)),(0,a.jsxs)(B.$,{variant:"outline",size:"sm",onClick:()=>{d([...o,{key:"",value:""}]),v(!0)},className:"w-full mt-4",children:[(0,a.jsx)(eH.A,{className:"h-4 w-4 mr-1"}),"Add Variable"]}),o.some(e=>e.key.startsWith("NEXT_PUBLIC_"))&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground mt-4",children:"Variables starting with NEXT_PUBLIC_ will be exposed to the browser."})]}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:(0,a.jsx)("p",{children:"Select a file or create a new one"})})})]})]})}var te=s(2425),tt=s(2858);let ts=[{id:"preview",icon:(0,a.jsx)(e8.A,{className:"h-4 w-4"}),label:"Preview"},{id:"database",icon:(0,a.jsx)(eW.A,{className:"h-4 w-4"}),label:"Database"},{id:"testing",icon:(0,a.jsx)(eG.A,{className:"h-4 w-4"}),label:"Testing"},{id:"checkpoint",icon:(0,a.jsx)(e1.A,{className:"h-4 w-4"}),label:"Checkpoint"},{id:"env",icon:(0,a.jsx)(te.A,{className:"h-4 w-4"}),label:"Env"}];function ta(e){let{projectId:t}=e,{t:s}=(0,er.B)(),[l,n]=(0,r.useState)(!1),[c,i]=(0,r.useState)(null),[o,d]=(0,r.useState)("preview");return(0,a.jsxs)("div",{className:"flex h-[calc(100vh-3.5rem)]",children:[(0,a.jsx)(B.$,{variant:"outline",size:"sm",onClick:()=>n(!l),className:"absolute left-4 top-16 z-10 h-8 w-8 p-0",title:s(l?"fileExplorer.close":"fileExplorer.open"),children:l?(0,a.jsx)(ec.A,{className:"h-4 w-4"}):(0,a.jsx)(tt.A,{className:"h-4 w-4"})}),l&&(0,a.jsx)("div",{className:"w-64 border-r bg-muted/30 flex-shrink-0",children:(0,a.jsx)(eO,{projectId:t,onFileSelect:(e,t)=>{let s=e.split(".").pop()||"";i({path:e,content:t,extension:s})}})}),(0,a.jsx)("div",{className:"border-r flex-shrink-0",style:{width:l?"calc(30% - 8rem)":"30%"},children:(0,a.jsx)(ep,{projectId:t})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col",style:{width:l?"calc(70%)":"70%"},children:[(0,a.jsx)("div",{className:"flex items-center border-b bg-muted/30 px-2",children:ts.map(e=>(0,a.jsxs)("button",{onClick:()=>d(e.id),className:"flex items-center gap-1.5 px-3 py-2 text-sm font-medium transition-colors border-b-2 -mb-px ".concat(o===e.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),title:e.label,children:[e.icon,(0,a.jsx)("span",{className:"hidden lg:inline",children:e.label})]},e.id))}),(0,a.jsx)("div",{className:"flex-1 overflow-hidden",children:(()=>{switch(o){case"preview":default:return(0,a.jsx)(eL,{projectId:t});case"database":return(0,a.jsx)(eV,{projectId:t});case"testing":return(0,a.jsx)(e4,{projectId:t});case"checkpoint":return(0,a.jsx)(e2,{projectId:t});case"env":return(0,a.jsx)(e7,{projectId:t})}})()})]}),c&&(0,a.jsx)(eQ,{path:c.path,content:c.content,language:c.extension,onClose:()=>{i(null)}})]})}var tr=s(4264);function tl(){let e=(0,l.useParams)(),t=(0,l.useRouter)(),s=e.id,{currentProject:c,fetchProject:i,isLoading:o,error:d}=(0,tr.I)();return((0,r.useEffect)(()=>{s&&i(s)},[s,i]),o&&!c)?(0,a.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,a.jsx)("p",{className:"text-muted-foreground",children:"로딩 중..."})}):d||!c?(0,a.jsxs)("div",{className:"flex h-screen flex-col items-center justify-center gap-4",children:[(0,a.jsx)(eS.A,{className:"h-12 w-12 text-destructive"}),(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("p",{className:"text-lg font-medium",children:"프로젝트를 찾을 수 없습니다"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:d||"프로젝트가 삭제되었거나 존재하지 않습니다."})]}),(0,a.jsx)(B.$,{onClick:()=>t.push("/"),variant:"outline",children:"홈으로 돌아가기"})]}):(0,a.jsxs)("div",{className:"min-h-screen bg-background",children:[(0,a.jsx)(n.Y,{title:c.name,showBack:!0,backHref:"/"}),(0,a.jsx)(ta,{projectId:s})]})}}},e=>{e.O(0,[992,87,59,498,358],()=>e(e.s=5006)),_N_E=e.O()}]);
@@ -0,0 +1,3 @@
1
+ @font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/8d697b304b401681-s.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/ba015fad6dcf6784-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/4cf2300e9c8272f7-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:Geist Fallback;src:local("Arial");ascent-override:95.94%;descent-override:28.16%;line-gap-override:0.00%;size-adjust:104.76%}.__className_188709{font-family:Geist,Geist Fallback;font-style:normal}.__variable_188709{--font-geist-sans:"Geist","Geist Fallback"}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/9610d9e46709d722-s.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/747892c23ea88013-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/93f479601ee12b01-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:Geist Mono Fallback;src:local("Arial");ascent-override:74.67%;descent-override:21.92%;line-gap-override:0.00%;size-adjust:134.59%}.__className_9a8899{font-family:Geist Mono,Geist Mono Fallback;font-style:normal}.__variable_9a8899{--font-geist-mono:"Geist Mono","Geist Mono Fallback"}*,:after,:before{--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/0.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/0.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: }/*
2
+ ! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
3
+ */*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;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,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;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,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{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}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--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 5.9% 10%;--radius:0.5rem}*{border-color:hsl(var(--border))}body{background-color: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}}.visible{visibility:visible}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-4{inset:1rem}.-right-1{right:-.25rem}.-right-2{right:-.5rem}.-top-1{top:-.25rem}.-top-2{top:-.5rem}.bottom-4{bottom:1rem}.left-1\.5{left:.375rem}.left-2{left:.5rem}.left-4{left:1rem}.left-\[50\%\]{left:50%}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-16{top:4rem}.top-2{top:.5rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-mb-px{margin-bottom:-1px}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-2{margin-left:.5rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-4{margin-right:1rem}.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}.mt-6{margin-top:1.5rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.table-cell{display:table-cell}.table-row{display:table-row}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1/1}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-40{height:10rem}.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-\[calc\(100vh-3\.5rem\)\]{height:calc(100vh - 3.5rem)}.h-full{height:100%}.h-screen{height:100vh}.max-h-60{max-height:15rem}.max-h-96{max-height:24rem}.min-h-\[140px\]{min-height:140px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-3{width:.75rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0}.max-w-2xl{max-width:42rem}.max-w-\[120px\]{max-width:120px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-y-1\/2,.translate-x-\[-50\%\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x:-50%}.translate-y-\[-50\%\]{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(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(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[1fr_1fr_auto\]{grid-template-columns:1fr 1fr auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.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-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.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-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * 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-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){border-color:hsl(var(--border))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-border{border-color:hsl(var(--border))}.border-border\/50{border-color:hsl(var(--border)/.5)}.border-green-500\/50{border-color:rgb(34 197 94/.5)}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-primary\/20{border-color:hsl(var(--primary)/.2)}.border-primary\/30{border-color:hsl(var(--primary)/.3)}.border-red-500\/30{border-color:rgb(239 68 68/.3)}.border-red-500\/50{border-color:rgb(239 68 68/.5)}.border-transparent{border-color:transparent}.border-zinc-700{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity,1))}.bg-\[\#1e1e1e\]{--tw-bg-opacity:1;background-color:rgb(30 30 30/var(--tw-bg-opacity,1))}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-background\/80{background-color:hsl(var(--background)/.8)}.bg-background\/95{background-color:hsl(var(--background)/.95)}.bg-black\/70{background-color:rgb(0 0 0/.7)}.bg-black\/80{background-color:rgb(0 0 0/.8)}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-blue-500\/20{background-color:rgb(59 130 246/.2)}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive)/.1)}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-green-500\/10{background-color:rgb(34 197 94/.1)}.bg-green-500\/20{background-color:rgb(34 197 94/.2)}.bg-green-500\/5{background-color:rgb(34 197 94/.05)}.bg-green-500\/90{background-color:rgb(34 197 94/.9)}.bg-muted{background-color:hsl(var(--muted))}.bg-muted-foreground\/20{background-color:hsl(var(--muted-foreground)/.2)}.bg-muted-foreground\/30{background-color:hsl(var(--muted-foreground)/.3)}.bg-muted\/30{background-color:hsl(var(--muted)/.3)}.bg-muted\/50{background-color:hsl(var(--muted)/.5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/10{background-color:hsl(var(--primary)/.1)}.bg-primary\/5{background-color:hsl(var(--primary)/.05)}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-red-500\/10{background-color:rgb(239 68 68/.1)}.bg-red-500\/20{background-color:rgb(239 68 68/.2)}.bg-red-500\/5{background-color:rgb(239 68 68/.05)}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.bg-yellow-500\/20{background-color:rgb(234 179 8/.2)}.bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.bg-zinc-800\/50{background-color:rgb(39 39 42/.5)}.bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.bg-zinc-950{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-blue-500\/20{--tw-gradient-from:rgb(59 130 246/0.2) var(--tw-gradient-from-position);--tw-gradient-to:rgb(59 130 246/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-green-500\/20{--tw-gradient-from:rgb(34 197 94/0.2) var(--tw-gradient-from-position);--tw-gradient-to:rgb(34 197 94/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-primary\/10{--tw-gradient-from:hsl(var(--primary)/0.1) var(--tw-gradient-from-position);--tw-gradient-to:hsl(var(--primary)/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-teal-500\/20{--tw-gradient-from:rgb(20 184 166/0.2) var(--tw-gradient-from-position);--tw-gradient-to:rgb(20 184 166/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-cyan-500\/5{--tw-gradient-to:rgb(6 182 212/0.05) var(--tw-gradient-to-position)}.to-emerald-500\/5{--tw-gradient-to:rgb(16 185 129/0.05) var(--tw-gradient-to-position)}.to-indigo-500\/5{--tw-gradient-to:rgb(99 102 241/0.05) var(--tw-gradient-to-position)}.to-primary\/5{--tw-gradient-to:hsl(var(--primary)/0.05) var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.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-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-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1\.5{padding-bottom:.375rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.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}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-7{line-height:1.75rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/50{color:hsl(var(--muted-foreground)/.5)}.text-muted-foreground\/70{color:hsl(var(--muted-foreground)/.7)}.text-orange-400{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.text-pink-400{--tw-text-opacity:1;color:rgb(244 114 182/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-purple-400{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-teal-400{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0/0.1),0 1px 2px -1px rgb(0 0 0/0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0/0.1),0 4px 6px -4px rgb(0 0 0/0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgb(0 0 0/0.1),0 2px 4px -2px rgb(0 0 0/0.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgb(0 0 0/0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-2{--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)}.ring-ring{--tw-ring-color:hsl(var(--ring))}.ring-offset-2{--tw-ring-offset-width:2px}.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)}.backdrop-blur{--tw-backdrop-blur:blur(8px)}.backdrop-blur,.backdrop-blur-sm{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px)}.backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;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}.file\:border-0::file-selector-button{border-width:0}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.first\:mt-0:first-child{margin-top:0}.last\:border-0:last-child{border-width:0}.hover\:border-primary:hover{border-color:hsl(var(--primary))}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary)/.5)}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive)/.9)}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted-foreground\/10:hover{background-color:hsl(var(--muted-foreground)/.1)}.hover\:bg-muted\/30:hover{background-color:hsl(var(--muted)/.3)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted)/.5)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary)/.9)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\:bg-white\/5:hover{background-color:rgb(255 255 255/.05)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary\/80:hover{color:hsl(var(--primary)/.8)}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px rgb(0 0 0/0.1),0 4px 6px -4px rgb(0 0 0/0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--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(1px + 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\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1: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(1px + 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-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\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:scale-110{--tw-scale-x:1.1;--tw-scale-y:1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:bg-primary\/20{background-color:hsl(var(--primary)/.2)}.group:hover .group-hover\:text-foreground{color:hsl(var(--foreground))}.group:hover .group-hover\:opacity-100{opacity:1}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgb(0 0 0/0.1),0 1px 2px -1px rgb(0 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)}@supports (backdrop-filter:var(--tw )){.supports-\[backdrop-filter\]\:bg-background\/60{background-color:hsl(var(--background)/.6)}}.dark\:border-blue-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity,1))}.dark\:bg-blue-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}.dark\:text-blue-200:is(.dark *){--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity,1))}.dark\:text-blue-300:is(.dark *){--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity,1))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\:inline{display:inline}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width:768px){.md\:inset-8{inset:2rem}}@media (min-width:1024px){.lg\:inset-16{inset:4rem}.lg\:inline{display:inline}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1280px){.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}