test-lah 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +16 -16
- package/.next/standalone/.next/app-path-routes-manifest.json +1 -1
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/integrations/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[projectId]/summary/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +1 -1
- package/.next/standalone/.next/server/app/integrations.html +1 -1
- package/.next/standalone/.next/server/app/integrations.rsc +1 -1
- package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login.html +1 -1
- package/.next/standalone/.next/server/app/login.rsc +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects.html +1 -1
- package/.next/standalone/.next/server/app/projects.rsc +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +3 -3
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/pages-manifest.json +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/117-e69900da972e4921.js +2 -0
- package/.next/standalone/.next/static/chunks/137-a3e1f3eebce6c471.js +1 -0
- package/.next/standalone/.next/static/chunks/235-ebf466171ab253e2.js +1 -0
- package/.next/standalone/.next/static/chunks/485-15c13d8f9b2ad891.js +1 -0
- package/.next/standalone/.next/static/chunks/490-1eccd8c1e46190f4.js +62 -0
- package/.next/standalone/.next/static/chunks/575-8f213bbf0f9b5a37.js +1 -0
- package/.next/standalone/.next/static/chunks/648-db64ca8b0bff7cc8.js +1 -0
- package/.next/standalone/.next/static/chunks/6edf0643-db532f25b1f04785.js +2 -0
- package/.next/standalone/.next/static/chunks/80-f42274b2ba8fa9b3.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/integrations/page-c1d22a9f517c96ac.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-2fdaecfc1cb7d964.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[projectId]/page-99dba96eab165331.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[projectId]/summary/page-efd93968c6f2c7e0.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/page-ec221e3cbf5cda88.js +1 -0
- package/.next/standalone/.next/static/chunks/app/_not-found/page-d1995e10d27b5d8d.js +1 -0
- package/.next/standalone/.next/static/chunks/app/layout-6b5286432a7d5254.js +1 -0
- package/.next/standalone/.next/static/chunks/app/login/page-1f6552bb64f7540b.js +1 -0
- package/.next/standalone/.next/static/chunks/app/page-f57c2c1aef4e90cf.js +1 -0
- package/.next/standalone/.next/static/chunks/e6b68d76-12e11e14cd115b6a.js +5 -0
- package/.next/standalone/.next/static/chunks/fd9d1056-85ee78742a3b65a4.js +1 -0
- package/.next/standalone/.next/static/chunks/framework-f66176bb897dc684.js +1 -0
- package/.next/standalone/.next/static/chunks/main-app-0e69cb49b371c4fd.js +1 -0
- package/.next/standalone/.next/static/chunks/main-b11533768004a954.js +1 -0
- package/.next/standalone/.next/static/chunks/pages/_app-72b849fbd24ac258.js +1 -0
- package/.next/standalone/.next/static/chunks/pages/_error-7ba65e1336b92748.js +1 -0
- package/.next/standalone/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/.next/standalone/.next/static/chunks/webpack-859ed9aa51f47af4.js +1 -0
- package/.next/standalone/.next/static/css/6e654cedeb116983.css +3 -0
- package/.next/standalone/.next/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
- package/.next/standalone/.next/static/media/21350d82a1f187e9-s.woff2 +0 -0
- package/.next/standalone/.next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
- package/.next/standalone/.next/static/media/ba9851c3c22cd980-s.woff2 +0 -0
- package/.next/standalone/.next/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
- package/.next/standalone/.next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
- package/.next/standalone/.next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
- package/.next/standalone/package.json +2 -4
- package/.next/static/H65ReFd4QkcOzHCj-Zoxg/_buildManifest.js +1 -0
- package/.next/static/H65ReFd4QkcOzHCj-Zoxg/_ssgManifest.js +1 -0
- package/package.json +1 -1
- package/scripts/prepare-publish.js +11 -16
- /package/.next/{static/HMefPZOhmnPwumbb_n1dR → standalone/.next/static/H65ReFd4QkcOzHCj-Zoxg}/_buildManifest.js +0 -0
- /package/.next/{static/HMefPZOhmnPwumbb_n1dR → standalone/.next/static/H65ReFd4QkcOzHCj-Zoxg}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[51],{2142:function(e,t,r){Promise.resolve().then(r.bind(r,4530))},4530:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return $}});var a=r(7437),s=r(29),o=r.n(s),l=r(2265),n=r(9376),i=r(2575);let c=(0,l.memo)(function(e){let{node:t,position:r,isSelected:s,testCases:o,isDragged:n,edgeDragActive:i,isEdgeDropTarget:c,deleteMode:d,isDeleteChecked:x,onSelect:u,onAddChild:p,onDelete:m,onUnlinkNode:f,onRename:h,onUpdateNode:y,onDragStart:b,onEdgeStart:v,onToggleDeleteCheck:g,depth:j,svgRef:k}=e,[w,C]=(0,l.useState)(!1),[N,S]=(0,l.useState)(t.label),[M,L]=(0,l.useState)(!1),[E,D]=(0,l.useState)(!1),[R,I]=(0,l.useState)("horizontal"),[U,A]=(0,l.useState)(""),z=(0,l.useRef)(null),P=(0,l.useRef)(null),W=(0,l.useRef)(null),T=(0,l.useRef)({startX:0,startY:0,moved:!1}),{w:B,h:F}=0===j?{w:160,h:56}:1===j?{w:144,h:48}:{w:132,h:42},O=o.some(e=>"fail"===e.status),X=o.length>0&&o.every(e=>"pass"===e.status||"skip"===e.status);(0,l.useEffect)(()=>{let e=e=>{let r=e.detail;(null==r?void 0:r.parentId)===t.id&&(D(!0),A(""))};return window.addEventListener("mindmap:add-child",e),()=>window.removeEventListener("mindmap:add-child",e)},[t.id]),(0,l.useEffect)(()=>{if(!E)return;let e=e=>{W.current&&!W.current.contains(e.target)&&(U.trim()?Y():(D(!1),A("")))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[E,U]),(0,l.useEffect)(()=>{E&&P.current&&P.current.focus()},[E]);let H=(0,l.useCallback)(()=>{S(t.label),C(!0),setTimeout(()=>{var e;return null===(e=z.current)||void 0===e?void 0:e.focus()},0)},[t.label]),G=(0,l.useCallback)(()=>{N.trim()&&h(t.id,N.trim()),C(!1)},[N,t.id,h]),Y=(0,l.useCallback)(()=>{if(U.trim()){let e="vertical"===R?{x:r.x,y:r.y+F+60}:{x:r.x+B+120,y:r.y};p(t.id,U.trim(),e,R)}D(!1),A("")},[U,t.id,p,r.x,r.y,F,B,R]),_=(0,l.useCallback)(e=>t=>{t.stopPropagation(),I(e),D(!0),A("")},[]),K=(0,l.useCallback)(e=>{if(2===e.button||d)return;if(e.stopPropagation(),!e.target.closest('[data-drag-handle="true"]')){u(t.id);return}e.preventDefault(),T.current={startX:e.clientX,startY:e.clientY,moved:!1};let a=e=>e.preventDefault();document.addEventListener("contextmenu",a);let s=e=>{let a=e.clientX-T.current.startX,s=e.clientY-T.current.startY;!T.current.moved&&(Math.abs(a)>6||Math.abs(s)>6)&&(T.current.moved=!0,b(t.id,T.current.startX,T.current.startY,r.x,r.y))},o=()=>{window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",o),setTimeout(()=>document.removeEventListener("contextmenu",a),100)};window.addEventListener("mousemove",s),window.addEventListener("mouseup",o)},[t.id,u,b,d,r]),J=t.id.replace(/[^a-zA-Z0-9]/g,"").slice(0,8),V=s&&!d;return(0,a.jsxs)("g",{transform:"translate(".concat(r.x,", ").concat(r.y,")"),onMouseDown:K,onDoubleClick:e=>{e.stopPropagation(),d||H()},onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),style:{cursor:d?"pointer":"default",transition:n?"none":"transform 150ms ease-out"},onClick:()=>{d&&g(t.id)},children:[(0,a.jsxs)("defs",{children:[(0,a.jsxs)("linearGradient",{id:"fill-".concat(J),x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:"#FFFFFF"}),(0,a.jsx)("stop",{offset:"100%",stopColor:"#FAF9F7"})]}),(0,a.jsxs)("filter",{id:"shadow-".concat(J),x:"-10%",y:"-10%",width:"120%",height:"130%",children:[(0,a.jsx)("feDropShadow",{dx:"0",dy:"1",stdDeviation:"2",floodOpacity:"0.08"}),(0,a.jsx)("feDropShadow",{dx:"0",dy:"3",stdDeviation:"6",floodOpacity:"0.05"})]}),(0,a.jsxs)("filter",{id:"shadow-hover-".concat(J),x:"-10%",y:"-10%",width:"120%",height:"140%",children:[(0,a.jsx)("feDropShadow",{dx:"0",dy:"2",stdDeviation:"4",floodOpacity:"0.12"}),(0,a.jsx)("feDropShadow",{dx:"0",dy:"6",stdDeviation:"12",floodOpacity:"0.08"})]}),(0,a.jsxs)("filter",{id:"shadow-drag-".concat(J),x:"-20%",y:"-20%",width:"140%",height:"160%",children:[(0,a.jsx)("feDropShadow",{dx:"0",dy:"4",stdDeviation:"8",floodOpacity:"0.2"}),(0,a.jsx)("feDropShadow",{dx:"0",dy:"8",stdDeviation:"16",floodOpacity:"0.1"})]}),(0,a.jsxs)("filter",{id:"glow-".concat(J),x:"-50%",y:"-50%",width:"200%",height:"200%",children:[(0,a.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"3",result:"blur"}),(0,a.jsx)("feColorMatrix",{in:"blur",type:"matrix",values:"0 0 0 0 0.4 0 0 0 0 0.8 0 0 0 0 0.4 0 0 0 0.6 0"})]})]}),!d&&(0,a.jsxs)("g",{"data-drag-handle":"true",transform:"translate(0, ".concat(-F/2-10,")"),style:{cursor:n?"grabbing":"grab"},children:[(0,a.jsx)("rect",{x:-20,y:-7,width:40,height:14,rx:4,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:1,opacity:M||s?.9:.5,style:{transition:"opacity 150ms ease-out"}}),(0,a.jsx)("circle",{cx:-8,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,a.jsx)("circle",{cx:-8,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,a.jsx)("circle",{cx:-4,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,a.jsx)("circle",{cx:-4,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,a.jsx)("circle",{cx:0,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,a.jsx)("circle",{cx:0,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,a.jsx)("circle",{cx:4,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,a.jsx)("circle",{cx:4,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,a.jsx)("circle",{cx:8,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,a.jsx)("circle",{cx:8,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6})]}),c&&(0,a.jsx)("rect",{x:-B/2-6,y:-F/2-6,width:B+12,height:F+12,rx:8,fill:"var(--status-pass-bg)",stroke:"var(--status-pass-text)",strokeWidth:2,opacity:.5}),(()=>{let e=O?"var(--status-fail-bg)":X?"var(--status-pass-bg)":null;return(0,a.jsxs)(a.Fragment,{children:[e&&(0,a.jsx)("rect",{x:-B/2,y:-F/2,width:B,height:F,rx:4,fill:e,opacity:.15}),(0,a.jsx)("rect",{x:-B/2,y:-F/2,width:B,height:F,rx:4,fill:"url(#fill-".concat(J,")"),stroke:d&&x?"var(--status-fail-text)":"var(--border)",strokeWidth:d&&x?2:.5,filter:n?"url(#shadow-drag-".concat(J,")"):M?"url(#shadow-hover-".concat(J,")"):"url(#shadow-".concat(J,")"),style:{transition:"filter 200ms ease-out, stroke 150ms ease-out"}}),(0,a.jsx)("path",{d:"M ".concat(B/2-10," ").concat(-F/2," L ").concat(B/2," ").concat(-F/2," L ").concat(B/2," ").concat(-F/2+10," Z"),fill:"var(--bg-secondary)",opacity:.5}),(0,a.jsx)("path",{d:"M ".concat(B/2-10," ").concat(-F/2," L ").concat(B/2-10," ").concat(-F/2+10," L ").concat(B/2," ").concat(-F/2+10),fill:"none",stroke:"var(--border)",strokeWidth:.5,opacity:.4})]})})(),d&&(0,a.jsxs)("g",{transform:"translate(".concat(-B/2+8,", 0)"),children:[(0,a.jsx)("rect",{x:-7,y:-7,width:14,height:14,rx:3,fill:x?"var(--status-fail-text)":"transparent",stroke:x?"var(--status-fail-text)":"var(--border)",strokeWidth:1.5}),x&&(0,a.jsx)("path",{d:"M -4 0 L -1 3 L 4 -2",fill:"none",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]}),t.code&&!d&&(0,a.jsxs)("g",{transform:"translate(".concat(-B/2+6,", ").concat(-F/2-11,")"),style:{opacity:M||s?1:0,transition:"opacity 150ms ease-out"},children:[(0,a.jsx)("rect",{x:0,y:0,width:Math.max(6.5*t.code.length+10,28),height:14,rx:7,fill:"var(--accent)",opacity:.08}),(0,a.jsx)("text",{x:5,y:10,style:{fill:"var(--text-tertiary)",fontSize:8,fontWeight:500,fontFamily:"monospace",letterSpacing:"0.05em"},children:t.code})]}),w?(0,a.jsx)("foreignObject",{x:-B/2+8,y:-F/2+4,width:B-16,height:F-8,children:(0,a.jsx)("input",{ref:z,value:N,onChange:e=>S(e.target.value),onBlur:G,onKeyDown:e=>{"Enter"===e.key&&G(),"Escape"===e.key&&C(!1)},className:"w-full h-full bg-transparent outline-none text-center text-xs",style:{color:"var(--text-primary)",fontFamily:"inherit"}})}):(0,a.jsx)("text",{textAnchor:"middle",dominantBaseline:"central",className:"select-none",onClick:e=>{e.stopPropagation(),d||H()},style:{fill:"var(--text-primary)",fontSize:0===j?13:11.5,fontWeight:0===j?600:450,fontFamily:"inherit",letterSpacing:"-0.01em",cursor:M&&!d?"text":"default",pointerEvents:"auto"},children:t.label.length>22?t.label.slice(0,22)+"…":t.label}),V&&!w&&!i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("g",{transform:"translate(".concat(B/2+3,", ").concat(-11,")"),children:[(0,a.jsxs)("g",{onClick:_("horizontal"),onMouseDown:e=>e.stopPropagation(),style:{cursor:"pointer"},children:[(0,a.jsx)("rect",{x:0,y:0,width:22,height:22,rx:3,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:.75,opacity:.9}),(0,a.jsx)("line",{x1:11,y1:5,x2:11,y2:17,stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeLinecap:"round"}),(0,a.jsx)("line",{x1:5,y1:11,x2:17,y2:11,stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeLinecap:"round"})]}),(0,a.jsx)("g",{transform:"translate(".concat(24,", ").concat(7,")"),onMouseDown:e=>{e.stopPropagation(),e.preventDefault(),v(t.id,"pass",r.x+B/2+3+22+2+4,r.y-11+11,"horizontal")},onContextMenu:e=>{e.preventDefault(),e.stopPropagation(),v(t.id,"fail",r.x+B/2+3+22+2+4,r.y-11+11,"horizontal")},style:{cursor:"crosshair"},children:(0,a.jsx)("circle",{cx:4,cy:4,r:4,fill:"var(--status-pass-text)",opacity:.8,children:(0,a.jsx)("animate",{attributeName:"opacity",values:"0.6;1;0.6",dur:"2s",repeatCount:"indefinite"})})})]}),(0,a.jsxs)("g",{transform:"translate(".concat(-11,", ").concat(F/2+3,")"),children:[(0,a.jsxs)("g",{onClick:_("vertical"),onMouseDown:e=>e.stopPropagation(),style:{cursor:"pointer"},children:[(0,a.jsx)("rect",{x:0,y:0,width:22,height:22,rx:3,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:.75,opacity:.9}),(0,a.jsx)("line",{x1:11,y1:5,x2:11,y2:17,stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeLinecap:"round"}),(0,a.jsx)("line",{x1:5,y1:11,x2:17,y2:11,stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeLinecap:"round"})]}),(0,a.jsx)("g",{transform:"translate(".concat(24,", ").concat(7,")"),onMouseDown:e=>{e.stopPropagation(),e.preventDefault(),v(t.id,"pass",r.x-11+11,r.y+F/2+3+22+2+4,"vertical")},onContextMenu:e=>{e.preventDefault(),e.stopPropagation(),v(t.id,"fail",r.x-11+11,r.y+F/2+3+22+2+4,"vertical")},style:{cursor:"crosshair"},children:(0,a.jsx)("circle",{cx:4,cy:4,r:4,fill:"var(--accent)",opacity:.8,children:(0,a.jsx)("animate",{attributeName:"opacity",values:"0.6;1;0.6",dur:"2s",repeatCount:"indefinite"})})})]})]}),i&&!c&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("g",{transform:"translate(".concat(-B/2-10,", 0)"),children:(0,a.jsx)("circle",{r:6,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:1.5,opacity:.6,strokeDasharray:"3 2"})}),(0,a.jsx)("g",{transform:"translate(0, ".concat(-F/2-10,")"),children:(0,a.jsx)("circle",{r:6,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:1.5,opacity:.6,strokeDasharray:"3 2"})})]}),E&&(0,a.jsxs)("g",{children:["vertical"===R?(0,a.jsx)("line",{x1:0,y1:F/2,x2:0,y2:F/2+50,stroke:"var(--border-hover)",strokeWidth:1.5}):(0,a.jsx)("line",{x1:B/2,y1:0,x2:B/2+50,y2:0,stroke:"var(--border-hover)",strokeWidth:1.5}),(0,a.jsx)("rect",{x:"vertical"===R?-B/2:B/2+50,y:"vertical"===R?F/2+50:-F/2,width:B,height:F,rx:4,fill:"var(--bg-card)",stroke:"var(--accent)",strokeWidth:1,strokeDasharray:"4 3"}),(0,a.jsx)("foreignObject",{x:"vertical"===R?-B/2+4:B/2+50+4,y:"vertical"===R?F/2+50+4:-F/2+4,width:B-8,height:F-8,children:(0,a.jsx)("div",{ref:W,children:(0,a.jsx)("input",{ref:P,value:U,onChange:e=>A(e.target.value),onBlur:()=>{U.trim()?Y():(D(!1),A(""))},onKeyDown:e=>{"Enter"===e.key&&Y(),"Escape"===e.key&&(D(!1),A("")),e.stopPropagation()},onMouseDown:e=>e.stopPropagation(),placeholder:"Name node...",className:"w-full h-full bg-transparent outline-none text-center text-xs",style:{color:"var(--text-primary)",fontFamily:"inherit"}})})})]})]})});var d=r(8248),x=r(3448);function u(e){let{width:t=16,height:r=16,x:s=0,y:o=0,cx:n=1,cy:i=1,cr:c=1,className:u,glow:p=!1,...m}=e,f=(0,l.useId)(),h=(0,l.useRef)(null),[y,b]=(0,l.useState)({width:0,height:0});(0,l.useEffect)(()=>{let e=()=>{if(h.current){let{width:e,height:t}=h.current.getBoundingClientRect();b({width:e,height:t})}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let v=Array.from({length:Math.ceil(y.width/t)*Math.ceil(y.height/r)},(e,a)=>{let l=a%Math.ceil(y.width/t),c=Math.floor(a/Math.ceil(y.width/t));return{x:l*t+n+s,y:c*r+i+o,delay:5*Math.random(),duration:3*Math.random()+2}});return(0,a.jsxs)("svg",{ref:h,"aria-hidden":"true",className:(0,x.cn)("pointer-events-none absolute inset-0 h-full w-full text-neutral-400/80",u),...m,children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("radialGradient",{id:"".concat(f,"-gradient"),children:[(0,a.jsx)("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"1"}),(0,a.jsx)("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0"})]})}),v.map(e=>(0,a.jsx)(d.E.circle,{cx:e.x,cy:e.y,r:c,fill:p?"url(#".concat(f,"-gradient)"):"currentColor",initial:p?{opacity:.4,scale:1}:{},animate:p?{opacity:[.4,1,.4],scale:[1,1.5,1]}:{},transition:p?{duration:e.duration,repeat:1/0,repeatType:"reverse",delay:e.delay,ease:"easeInOut"}:{}},"".concat(e.x,"-").concat(e.y)))]})}let p=l.forwardRef((e,t)=>{let{className:r,children:s,rippleColor:o="#ffffff",duration:n="600ms",onClick:i,...c}=e,[d,u]=(0,l.useState)([]),p=e=>{let t=e.currentTarget.getBoundingClientRect(),r=Math.max(t.width,t.height),a={x:e.clientX-t.left-r/2,y:e.clientY-t.top-r/2,size:r,key:Date.now()};u(e=>[...e,a])};return(0,l.useEffect)(()=>{let e=null;if(d.length>0){let t=d[d.length-1];e=setTimeout(()=>{u(e=>e.filter(e=>e.key!==t.key))},parseInt(n))}return()=>{null!==e&&clearTimeout(e)}},[d,n]),(0,a.jsxs)("button",{className:(0,x.cn)("bg-background text-primary relative flex cursor-pointer items-center justify-center overflow-hidden rounded-lg border-2 px-4 py-2 text-center",r),onClick:e=>{p(e),null==i||i(e)},ref:t,...c,children:[(0,a.jsx)("div",{className:"relative z-10",children:s}),(0,a.jsx)("span",{className:"pointer-events-none absolute inset-0",children:d.map(e=>(0,a.jsx)("span",{className:"animate-rippling bg-background absolute rounded-full opacity-30",style:{width:"".concat(e.size,"px"),height:"".concat(e.size,"px"),top:"".concat(e.y,"px"),left:"".concat(e.x,"px"),backgroundColor:o,transform:"scale(0)","--duration":n}},e.key))})]})});function m(e){let{nodes:t,edges:r,testCases:s,selectedNodeId:o,onSelect:n,onAddNode:i,onDeleteNode:d,onDeleteNodes:x,onUnlinkNode:m,onRenameNode:y,onUpdateNode:b,onAddEdge:v,onDeleteEdge:g,onUpdateEdge:j,canUndo:k,canRedo:w,onUndo:C,onRedo:N}=e,S=(0,l.useMemo)(()=>(function(e){let t=new Map;if(0===e.length)return t;let r=new Map;for(let t of e)r.set(t.id,t);let a=new Set;for(let t of e)t.position&&a.add(t.id);let s=e.filter(e=>null===e.parentId);if(0===s.length)return t;let o=0;for(let e of s)o=function e(s,o,l,n,i){var c,d,x,u;let p=r.get(s);if(!p)return l;let m="vertical"===p.direction,f=m?null!==(d=null===(c=p.position)||void 0===c?void 0:c.x)&&void 0!==d?d:n:60+180*o,h=l;for(let t of p.children)h=m?e(t,o,h,n,i):e(t,o+1,h,n,i);let y=p.children.map(e=>t.get(e)).filter(Boolean),b=y.length>0?(Math.min(...y.map(e=>e.y))+Math.max(...y.map(e=>e.y)))/2:l;if(a.has(s)&&p.position){let r=y.length>0?b:l,a=p.position.x-(m?p.position.x:f),n=p.position.y-r;t.set(s,p.position);let i=l;for(let t of p.children)i=m?e(t,o,i,a,n):e(t,o+1,i,a,n);return i}return m?t.set(s,{x:(null!==(u=null===(x=p.position)||void 0===x?void 0:x.x)&&void 0!==u?u:0)+n,y:b+i}):t.set(s,{x:f+n,y:b+i}),h}(e.id,0,o,0,0);let l=Array.from(t.entries());if(l.length>0){let e=l.filter(e=>{let[t]=e;return!a.has(t)}).map(e=>{let[,t]=e;return t.y});if(e.length>0){let r=(Math.min(...e)+Math.max(...e))/2;for(let[e,s]of l)a.has(e)||t.set(e,{x:s.x,y:s.y-r+300})}}return t})(t),[t]),[M,L]=(0,l.useState)({x:0,y:0}),[E,D]=(0,l.useState)(1),[R,I]=(0,l.useState)(!1),[U,A]=(0,l.useState)({x:0,y:0}),[z,P]=(0,l.useState)(null),[W,T]=(0,l.useState)(!1),[B,F]=(0,l.useState)(null),[O,X]=(0,l.useState)(null),[H,G]=(0,l.useState)(null),[Y,_]=(0,l.useState)(null),[K,J]=(0,l.useState)(!1),[V,Z]=(0,l.useState)(new Set),[q,Q]=(0,l.useState)(!1),[$,ee]=(0,l.useState)(null),[et,er]=(0,l.useState)(!1),[ea,es]=(0,l.useState)(new Set),eo=(0,l.useRef)(null),el=(0,l.useRef)(null),en=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=eo.current;if(!e)return;let t=e=>{e.preventDefault();let t=e.deltaY>0?.9:1.1;D(e=>Math.max(.2,Math.min(3,e*t)))};return e.addEventListener("wheel",t,{passive:!1}),()=>e.removeEventListener("wheel",t)},[]);let ei=(0,l.useCallback)(()=>{let e=Array.from(S.values());if(0===e.length){D(1),L({x:0,y:0});return}if(!eo.current)return;let t=eo.current.getBoundingClientRect(),r=Math.min(...e.map(e=>e.x))-80,a=Math.max(...e.map(e=>e.x))+80,s=Math.min(...e.map(e=>e.y))-80,o=Math.max(...e.map(e=>e.y))+80,l=Math.min(t.width/(a-r),t.height/(o-s),1.5);D(l),L({x:t.width/2/l-(r+a)/2,y:t.height/2/l-(s+o)/2})},[S]);(0,l.useEffect)(()=>{let e=e=>{var r;let a=null===(r=e.target)||void 0===r?void 0:r.tagName;if("INPUT"!==a&&"TEXTAREA"!==a){if((e.ctrlKey||e.metaKey)&&(("="===e.key||"+"===e.key)&&(e.preventDefault(),D(e=>Math.min(3,1.15*e))),"-"===e.key&&(e.preventDefault(),D(e=>Math.max(.2,.85*e))),"0"===e.key&&(e.preventDefault(),ei())),"Tab"===e.key&&o&&!e.ctrlKey&&!e.metaKey){e.preventDefault();let r=t.find(e=>e.id===o);if(r){let e=new CustomEvent("mindmap:add-child",{detail:{parentId:r.id}});window.dispatchEvent(e)}}if("Enter"===e.key&&o&&!e.ctrlKey&&!e.metaKey){e.preventDefault();let r=t.find(e=>e.id===o);if(r){if(r.parentId){let e=new CustomEvent("mindmap:add-child",{detail:{parentId:r.parentId}});window.dispatchEvent(e)}else{let e=S.get(r.id);e&&i(null,"",{x:e.x,y:e.y+70})}}}"Delete"!==e.key&&"Backspace"!==e.key||!o||e.ctrlKey||e.metaKey||(e.preventDefault(),ee(o),Q(!0))}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[o,t,S,i,d,ei]);let ec=(0,l.useCallback)((e,t)=>{if(!eo.current)return{x:0,y:0};let r=eo.current.getBoundingClientRect();return{x:(e-r.left)/E-M.x,y:(t-r.top)/E-M.y}},[E,M]),ed=(0,l.useCallback)(e=>{e.target===eo.current&&(I(!0),A({x:e.clientX-M.x*E,y:e.clientY-M.y*E}))},[M,E]),ex=(0,l.useCallback)(e=>{if(R&&L({x:(e.clientX-U.x)/E,y:(e.clientY-U.y)/E}),z){let t=ec(z.startClientX,z.startClientY),r=ec(e.clientX,e.clientY),a=r.x-t.x,s=r.y-t.y,o=z.startNodeX+a,l=z.startNodeY+s;en.current={id:z.id,x:o,y:l},el.current||(el.current=requestAnimationFrame(()=>{en.current&&(b(en.current.id,{position:{x:en.current.x,y:en.current.y}}),en.current=null),el.current=null}))}if(O){let r=ec(e.clientX,e.clientY);X(e=>e?{...e,curX:r.x,curY:r.y}:null);let a=null;for(let e of t){if(e.id===O.fromId)continue;let t=S.get(e.id);if(!t)continue;let s=r.x-t.x,o=r.y-t.y;if(80>Math.abs(s)&&40>Math.abs(o)){a=e.id;break}}_(a)}},[R,U,E,z,O,ec,b,t,S]),eu=(0,l.useCallback)(()=>{if(O){let e={x:O.curX,y:O.curY};for(let r of t){let t=S.get(r.id);if(!t)continue;let a=e.x-t.x,s=e.y-t.y;if(80>Math.abs(a)&&40>Math.abs(s)&&r.id!==O.fromId){v(O.fromId,r.id,O.type);break}}X(null),_(null)}I(!1),P(null),el.current&&(cancelAnimationFrame(el.current),el.current=null)},[O,t,S,v]),ep=(0,l.useCallback)(e=>{e.target===eo.current&&(n(null),T(!1))},[n]),em=(0,l.useCallback)(e=>{e.target===eo.current&&(F(ec(e.clientX,e.clientY)),T(!0))},[ec]),ef=(0,l.useCallback)(e=>{e.trim()&&i(null,e.trim(),null!=B?B:void 0),T(!1),F(null)},[i,B]),eh=(0,l.useCallback)((e,t,r,a,s)=>{P({id:e,startNodeX:a,startNodeY:s,startClientX:t,startClientY:r})},[]),ey=(0,l.useCallback)((e,t,r,a,s)=>{X({fromId:e,type:t,startX:r,startY:a,curX:r,curY:a,direction:s})},[]),eb=(0,l.useCallback)(()=>{J(e=>!e),Z(new Set),er(!1),es(new Set)},[]),ev=(0,l.useCallback)(()=>{er(e=>!e),es(new Set),J(!1),Z(new Set)},[]),eg=(0,l.useCallback)(e=>{es(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},[]),ej=(0,l.useCallback)(()=>{Array.from(ea).forEach(e=>{e.startsWith("tree-")?m(e.replace("tree-","")):g(e)}),es(new Set),er(!1)},[ea,m,g]),ek=(0,l.useCallback)(e=>{Z(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},[]),ew=(0,l.useCallback)(()=>{$?(d($),ee(null)):V.size>0&&(x(Array.from(V)),Z(new Set),J(!1)),Q(!1)},[$,V,d,x]),eC=Array.from(S.values());return eC.length>0&&([...eC.map(e=>e.x)],[...eC.map(e=>e.x)]),eC.length>0&&([...eC.map(e=>e.y)],[...eC.map(e=>e.y)]),(0,a.jsxs)("div",{className:"relative w-full h-full overflow-hidden",style:{backgroundColor:"var(--bg-primary)"},children:[(0,a.jsx)(u,{width:24,height:24,cr:1,className:"text-neutral-300/60 dark:text-neutral-600/40"}),(0,a.jsxs)("div",{className:"absolute top-3 right-3 z-10 flex flex-col gap-1",children:[(0,a.jsx)("button",{onClick:()=>D(e=>Math.min(3,1.2*e)),className:"w-7 h-7 flex items-center justify-center text-xs rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},children:"+"}),(0,a.jsx)("button",{onClick:()=>D(e=>Math.max(.2,.8*e)),className:"w-7 h-7 flex items-center justify-center text-xs rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},children:"−"}),(0,a.jsx)("button",{onClick:ei,className:"w-7 h-7 flex items-center justify-center text-[10px] rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},children:"Fit"}),(0,a.jsxs)("div",{className:"text-[10px] text-center mt-0.5",style:{color:"var(--text-tertiary)"},children:[Math.round(100*E),"%"]}),(0,a.jsxs)("div",{className:"mt-1 border-t pt-1",style:{borderColor:"var(--border)"},children:[(0,a.jsx)("button",{onClick:eb,className:"w-7 h-7 flex items-center justify-center text-[10px] rounded border transition-colors",style:{borderColor:K?"var(--status-fail-text)":"var(--border)",color:K?"var(--status-fail-text)":"var(--text-secondary)",backgroundColor:K?"var(--status-fail-bg)":"var(--bg-card)"},title:K?"Exit delete mode":"Delete nodes",children:(0,a.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("polyline",{points:"3 6 5 6 21 6"}),(0,a.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})}),(0,a.jsx)("button",{onClick:ev,className:"w-7 h-7 mt-1 flex items-center justify-center text-[10px] rounded border transition-colors",style:{borderColor:et?"var(--status-skip-text)":"var(--border)",color:et?"var(--status-skip-text)":"var(--text-secondary)",backgroundColor:et?"var(--status-skip-bg)":"var(--bg-card)"},title:et?"Exit unlink mode":"Unlink lines",children:(0,a.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"M15 7h3a5 5 0 0 1 0 10h-3m-6 0H6a5 5 0 0 1 0-10h3"}),(0,a.jsx)("line",{x1:"8",y1:"12",x2:"16",y2:"12",strokeDasharray:"3 3"})]})})]})]}),(0,a.jsxs)("div",{className:"absolute top-3 left-3 z-10 flex flex-col gap-1",children:[(0,a.jsx)("button",{onClick:C,disabled:!k,className:"w-7 h-7 flex items-center justify-center text-xs rounded border transition-colors hover:bg-[var(--bg-secondary)] disabled:opacity-25",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},title:"Undo (Ctrl+Z)",children:(0,a.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[(0,a.jsx)("path",{d:"M3 5h5a3 3 0 0 1 0 6H6",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),(0,a.jsx)("path",{d:"M5.5 2.5L3 5l2.5 2.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})}),(0,a.jsx)("button",{onClick:N,disabled:!w,className:"w-7 h-7 flex items-center justify-center text-xs rounded border transition-colors hover:bg-[var(--bg-secondary)] disabled:opacity-25",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},title:"Redo (Ctrl+Shift+Z)",children:(0,a.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[(0,a.jsx)("path",{d:"M11 5H6a3 3 0 0 0 0 6h2",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),(0,a.jsx)("path",{d:"M8.5 2.5L11 5 8.5 7.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})})]}),K&&(0,a.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 z-20 flex items-center gap-3 px-4 py-2 rounded-lg border",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--status-fail-text)",boxShadow:"var(--shadow-lg)",animation:"fadeInDown 200ms ease-out"},children:[(0,a.jsx)("span",{className:"text-xs font-medium",style:{color:"var(--text-primary)"},children:"Select nodes to delete"}),(0,a.jsxs)("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{backgroundColor:"var(--status-fail-bg)",color:"var(--status-fail-text)"},children:[V.size," selected"]}),(0,a.jsx)("button",{onClick:()=>{V.size>0&&Q(!0)},disabled:0===V.size,className:"px-3 py-1 text-[11px] font-medium rounded transition-colors disabled:opacity-40",style:{backgroundColor:"var(--status-fail-text)",color:"white"},children:"Delete"}),(0,a.jsx)("button",{onClick:eb,className:"px-3 py-1 text-[11px] rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"})]}),et&&(0,a.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 z-20 flex items-center gap-3 px-4 py-2 rounded-lg border",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--status-skip-text)",boxShadow:"var(--shadow-lg)",animation:"fadeInDown 200ms ease-out"},children:[(0,a.jsx)("span",{className:"text-xs font-medium",style:{color:"var(--text-primary)"},children:"Select lines to unlink"}),(0,a.jsxs)("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{backgroundColor:"var(--status-skip-bg)",color:"var(--status-skip-text)"},children:[ea.size," selected"]}),(0,a.jsx)("button",{onClick:ej,disabled:0===ea.size,className:"px-3 py-1 text-[11px] font-medium rounded transition-colors disabled:opacity-40",style:{backgroundColor:"var(--status-skip-text)",color:"white"},children:"Unlink"}),(0,a.jsx)("button",{onClick:ev,className:"px-3 py-1 text-[11px] rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"})]}),q&&(0,a.jsx)("div",{className:"fixed inset-0 z-[400] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:()=>Q(!1),children:(0,a.jsxs)("div",{className:"w-full max-w-sm mx-4 p-5 rounded-xl border",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--border)",boxShadow:"var(--shadow-lg)"},onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("h3",{className:"text-sm font-semibold mb-2",style:{color:"var(--text-primary)"},children:["Delete ",$?"node":"".concat(V.size," node").concat(V.size>1?"s":""),"?"]}),(0,a.jsxs)("p",{className:"text-xs mb-4",style:{color:"var(--text-tertiary)"},children:["This will permanently remove the ",$?"node":"selected node".concat(V.size>1?"s":"")," and all their test cases. This action cannot be undone."]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{onClick:()=>Q(!1),className:"flex-1 px-3 py-2 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"}),(0,a.jsx)("button",{onClick:ew,className:"flex-1 px-3 py-2 text-xs font-medium rounded-lg transition-colors",style:{backgroundColor:"var(--status-fail-text)",color:"white"},children:"Delete"})]})]})}),o&&(0,a.jsxs)("div",{className:"absolute bottom-3 left-3 z-10 flex gap-2 text-[10px]",style:{color:"var(--text-tertiary)"},children:[(0,a.jsx)("span",{className:"px-1.5 py-0.5 rounded border",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},children:"Tab = add child"}),(0,a.jsx)("span",{className:"px-1.5 py-0.5 rounded border",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},children:"Enter = add sibling"}),(0,a.jsx)("span",{className:"px-1.5 py-0.5 rounded border",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},children:"Del = delete"})]}),(0,a.jsxs)("svg",{ref:eo,width:"100%",height:"100%",onMouseDown:ed,onMouseMove:ex,onMouseUp:eu,onClick:ep,onDoubleClick:em,style:{cursor:R?"grabbing":z?"grabbing":O?"crosshair":"default"},children:[(0,a.jsxs)("defs",{children:[(0,a.jsx)("marker",{id:"arrow-pass",markerWidth:"8",markerHeight:"8",refX:"8",refY:"4",orient:"auto",children:(0,a.jsx)("path",{d:"M0,0 L8,4 L0,8",fill:"var(--status-pass-text)"})}),(0,a.jsx)("marker",{id:"arrow-fail",markerWidth:"8",markerHeight:"8",refX:"8",refY:"4",orient:"auto",children:(0,a.jsx)("path",{d:"M0,0 L8,4 L0,8",fill:"var(--status-fail-text)"})}),(0,a.jsx)("marker",{id:"arrow-default",markerWidth:"8",markerHeight:"8",refX:"8",refY:"4",orient:"auto",children:(0,a.jsx)("path",{d:"M0,0 L8,4 L0,8",fill:"var(--text-tertiary)"})})]}),(0,a.jsxs)("g",{transform:"scale(".concat(E,") translate(").concat(M.x,", ").concat(M.y,")"),children:[t.map(e=>{let s;if(!e.parentId)return null;let o=S.get(e.parentId),l=S.get(e.id);if(!o||!l||r.some(t=>t.fromId===e.parentId&&t.toId===e.id||t.fromId===e.id&&t.toId===e.parentId))return null;let n=t.find(t=>t.id===e.parentId),i=(null==n?void 0:n.direction)==="vertical",c="tree-".concat(e.id),d=ea.has(c);if(i){let e=o.y+40,t=l.y-40;s="M ".concat(o.x," ").concat(o.y+28," C ").concat(o.x," ").concat(e,", ").concat(l.x," ").concat(t,", ").concat(l.x," ").concat(l.y-21)}else{let e=o.x+60,t=l.x-60;s="M ".concat(o.x+70," ").concat(o.y," C ").concat(e," ").concat(o.y,", ").concat(t," ").concat(l.y,", ").concat(l.x-60," ").concat(l.y)}let x=(o.x+l.x)/2,u=(o.y+l.y)/2;return(0,a.jsxs)("g",{children:[(0,a.jsx)("path",{d:s,fill:"none",stroke:"transparent",strokeWidth:12,style:{cursor:"pointer"},onClick:()=>{et?eg(c):v(e.parentId,e.id,"pass")},onDoubleClick:t=>{t.stopPropagation(),et||m(e.id)}}),(0,a.jsx)("path",{d:s,fill:"none",stroke:et&&d?"var(--status-skip-text)":"var(--border-hover)",strokeWidth:et&&d?2.5:1.5,strokeDasharray:et&&d?"6 4":"none",style:{pointerEvents:"none",transition:"stroke 150ms, stroke-width 150ms"}}),et&&(0,a.jsxs)("g",{transform:"translate(".concat(x,", ").concat(u,")"),style:{pointerEvents:"none"},children:[(0,a.jsx)("rect",{x:-7,y:-7,width:14,height:14,rx:3,fill:d?"var(--status-skip-text)":"var(--bg-card)",stroke:d?"var(--status-skip-text)":"var(--border)",strokeWidth:1.5}),d&&(0,a.jsx)("path",{d:"M -4 0 L -1 3 L 4 -2",fill:"none",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]})]},"tree-edge-".concat(e.id))}),r.map(e=>{let r;let s=S.get(e.fromId),o=S.get(e.toId);if(!s||!o)return null;let l="pass"===e.type,n="fail"===e.type;e.type;let i=l?"var(--status-pass-text)":n?"var(--status-fail-text)":"var(--text-tertiary)",c=(s.x+o.x)/2,d=(s.y+o.y)/2-12,x=ea.has(e.id),u=t.find(t=>t.id===e.fromId);return r=(null==u?void 0:u.direction)==="vertical"?"M ".concat(s.x," ").concat(s.y," C ").concat(s.x," ").concat(s.y+80,", ").concat(o.x," ").concat(o.y-80,", ").concat(o.x," ").concat(o.y):"M ".concat(s.x," ").concat(s.y," C ").concat(s.x+80," ").concat(s.y,", ").concat(o.x-80," ").concat(o.y,", ").concat(o.x," ").concat(o.y),(0,a.jsxs)("g",{children:[(0,a.jsx)("path",{d:r,fill:"none",stroke:"transparent",strokeWidth:16,style:{cursor:"pointer"},onClick:()=>{et?eg(e.id):l?j(e.id,{type:"fail"}):n?j(e.id,{type:"default"}):j(e.id,{type:"pass"})},onMouseEnter:()=>G(e.id),onMouseLeave:()=>G(null)}),(0,a.jsx)("path",{d:r,fill:"none",stroke:et&&x?"var(--status-skip-text)":i,strokeWidth:et&&x?2.5:H===e.id?2.5:1.8,strokeDasharray:et&&x?"6 4":l?"none":n?"6 4":"3 3",markerEnd:et?void 0:l?"url(#arrow-pass)":n?"url(#arrow-fail)":"url(#arrow-default)",style:{transition:"stroke-width 150ms ease-out, stroke 150ms ease-out",pointerEvents:"none"}}),et&&(0,a.jsxs)("g",{transform:"translate(".concat(c,", ").concat(d,")"),style:{pointerEvents:"none"},children:[(0,a.jsx)("rect",{x:-7,y:-7,width:14,height:14,rx:3,fill:x?"var(--status-skip-text)":"var(--bg-card)",stroke:x?"var(--status-skip-text)":"var(--border)",strokeWidth:1.5}),x&&(0,a.jsx)("path",{d:"M -4 0 L -1 3 L 4 -2",fill:"none",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]}),!et&&H===e.id&&(0,a.jsxs)("g",{transform:"translate(".concat(c,", ").concat(d-12,")"),style:{pointerEvents:"none"},children:[(0,a.jsx)("rect",{x:-22,y:-7,width:44,height:14,rx:7,fill:l?"var(--status-pass-bg)":n?"var(--status-fail-bg)":"var(--bg-secondary)",stroke:l?"var(--status-pass-text)":n?"var(--status-fail-text)":"var(--border)",strokeWidth:.5}),(0,a.jsx)("text",{textAnchor:"middle",dominantBaseline:"central",style:{fill:i,fontSize:9,fontWeight:500},children:l?"Pass":n?"Fail":"Default"})]})]},e.id)}),O&&(0,a.jsx)("line",{x1:O.startX,y1:O.startY,x2:O.curX,y2:O.curY,stroke:"pass"===O.type?"var(--status-pass-text)":"var(--status-fail-text)",strokeWidth:2,strokeDasharray:"6 4",opacity:.6}),t.map(e=>{var r;let l=S.get(e.id);if(!l)return null;let x=function(e,t){let r=0,a=e;for(;a.parentId;){r++;let e=t.find(e=>e.id===a.parentId);if(!e)break;a=e}return r}(e,t);return(0,a.jsx)(c,{node:e,position:l,isSelected:e.id===o,testCases:null!==(r=s[e.id])&&void 0!==r?r:[],isDragged:(null==z?void 0:z.id)===e.id,edgeDragActive:null!==O,isEdgeDropTarget:Y===e.id&&null!==O&&e.id!==O.fromId,deleteMode:K,isDeleteChecked:V.has(e.id),onSelect:n,onAddChild:(e,t,r,a)=>{i(e,t,r,a)},onDelete:d,onUnlinkNode:m,onRename:y,onUpdateNode:b,onDragStart:eh,onEdgeStart:ey,onToggleDeleteCheck:ek,depth:x,svgRef:eo},e.id)})]})]}),W&&B&&(0,a.jsx)(h,{position:B,scale:E,pan:M,svgRef:eo,onSubmit:ef,onCancel:()=>T(!1)}),0===t.length&&!W&&(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,a.jsx)(p,{onClick:()=>{if(!eo.current){F({x:0,y:0}),T(!0);return}let e=eo.current.getBoundingClientRect();F({x:e.width/2/E-M.x,y:e.height/2/E-M.y}),T(!0)},rippleColor:"rgba(0,0,0,0.08)",className:"text-sm px-6 py-2.5",style:{color:"var(--text-tertiary)",borderColor:"var(--border)",borderRadius:"var(--radius-pill)",backgroundColor:"transparent"},children:(0,a.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,a.jsx)("path",{d:"M8 3v10M3 8h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),"Create your first flow node"]})})}),t.length>0&&(0,a.jsx)(f,{nodes:t,positions:S,pan:M,scale:E})]})}function f(e){let{nodes:t,positions:r,pan:s,scale:o}=e,l=Array.from(r.values());if(0===l.length)return null;let n=Math.min(...l.map(e=>e.x)),i=Math.max(...l.map(e=>e.x)),c=Math.min(...l.map(e=>e.y)),d=Math.max(...l.map(e=>e.y)),x=i-n+80,u=d-c+80,p=Math.max(60,u/x*120),m=120/x,f=p/u;return(0,a.jsx)("div",{className:"absolute bottom-3 right-3 border z-10",style:{width:120,height:p,backgroundColor:"var(--bg-card)",borderColor:"var(--border)",borderRadius:"var(--radius-sm)",opacity:.85},children:(0,a.jsx)("svg",{width:120,height:p,children:t.map(e=>{let t=r.get(e.id);if(!t)return null;let s=(t.x-n+40)*m,o=(t.y-c+40)*f;return(0,a.jsx)("circle",{cx:s,cy:o,r:2.5,fill:"var(--accent)",opacity:.6},e.id)})})})}function h(e){let{position:t,scale:r,pan:s,svgRef:o,onSubmit:n,onCancel:i}=e,[c,d]=(0,l.useState)(""),x=(0,l.useRef)(null),u=(0,l.useRef)(null),p=(0,l.useCallback)(()=>{if(!o.current)return{left:"50%",top:"50%"};let e=o.current.getBoundingClientRect();return{left:(t.x+s.x)*r+e.left,top:(t.y+s.y)*r+e.top}},[t,r,s,o])(),m=144*r,f=48*r;return(0,l.useEffect)(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&(c.trim()?n(c):i())};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[c,n,i]),(0,a.jsxs)("div",{ref:u,className:"fixed z-50",style:{left:"".concat(p.left,"px"),top:"".concat(p.top,"px"),transform:"translate(-50%, 0)"},children:[(0,a.jsx)("div",{style:{width:2,height:20*r,margin:"0 auto",backgroundColor:"var(--border-hover)"}}),(0,a.jsx)("div",{style:{width:"".concat(m,"px"),height:"".concat(f,"px"),border:"1.5px dashed var(--accent)",borderRadius:4*r,backgroundColor:"var(--bg-card)",display:"flex",alignItems:"center",justifyContent:"center",padding:"".concat(4*r,"px")},children:(0,a.jsx)("input",{ref:x,autoFocus:!0,value:c,onChange:e=>d(e.target.value),onKeyDown:e=>{"Enter"===e.key&&c.trim()&&n(c),"Escape"===e.key&&i(),e.stopPropagation()},onBlur:()=>{c.trim()?n(c):i()},placeholder:"Name node...",className:"w-full h-full bg-transparent outline-none text-center text-xs",style:{color:"var(--text-primary)",fontFamily:"inherit"}})})]})}function y(e){return(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[(0,a.jsxs)("div",{className:"px-4 py-2 border-b flex items-center gap-2",style:{borderColor:"var(--border)"},children:[(0,a.jsx)("span",{className:"text-xs font-medium uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:"Flow Map"}),(0,a.jsxs)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:[e.nodes.length," node",1!==e.nodes.length?"s":""]}),(0,a.jsx)("div",{className:"flex-1"}),(0,a.jsx)("button",{onClick:e.onResetLayout,className:"px-2 py-1 text-[10px] rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",borderRadius:"var(--radius-sm)"},children:"Reset layout"})]}),(0,a.jsx)("div",{className:"flex-1 min-h-0",children:(0,a.jsx)(m,{nodes:e.nodes,edges:e.edges,testCases:e.testCases,selectedNodeId:e.selectedNodeId,onSelect:e.onSelect,onAddNode:e.onAddNode,onDeleteNode:e.onDeleteNode,onDeleteNodes:e.onDeleteNodes,onUnlinkNode:e.onUnlinkNode,onRenameNode:e.onRenameNode,onUpdateNode:e.onUpdateNode,onAddEdge:e.onAddEdge,onDeleteEdge:e.onDeleteEdge,onUpdateEdge:e.onUpdateEdge,canUndo:e.canUndo,canRedo:e.canRedo,onUndo:e.onUndo,onRedo:e.onRedo})})]})}p.displayName="RippleButton";var b=r(6481),v=r(740);function g(e){let{value:t,className:r=""}=e,s=Math.max(0,Math.min(100,t));return(0,a.jsx)("div",{className:"h-2 w-full overflow-hidden ".concat(r),style:{backgroundColor:"var(--bg-secondary)",borderRadius:"var(--radius-pill)"},children:(0,a.jsx)("div",{className:"h-full transition-all duration-150 ease-out",style:{width:"".concat(s,"%"),backgroundColor:s>=80?"var(--status-pass-text)":s>=50?"var(--status-skip-text)":"var(--status-fail-text)",borderRadius:"var(--radius-pill)"}})})}function j(e){let{onAdd:t,nodeLabel:r}=e,[s,o]=(0,l.useState)(""),n=(0,l.useRef)(null);(0,l.useEffect)(()=>{var e;null===(e=n.current)||void 0===e||e.focus()},[r]);let i=()=>{s.trim()&&(t(s.trim()),o(""))};return(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{ref:n,value:s,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"===e.key&&i()},placeholder:'Add test case for "'.concat(r,'"...'),className:"flex-1 px-3 py-2 text-sm bg-transparent outline-none border transition-colors focus:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)",color:"var(--text-primary)"}}),(0,a.jsx)("button",{onClick:i,disabled:!s.trim(),className:"px-4 py-2 text-sm font-medium rounded-md transition-opacity hover:opacity-80 disabled:opacity-30",style:{backgroundColor:"var(--accent)",color:"var(--bg-primary)",borderRadius:"var(--radius-sm)"},children:"+ Add"})]})}let k={untested:{bg:"var(--status-untested-bg)",text:"var(--status-untested-text)",label:"Untested"},pass:{bg:"var(--status-pass-bg)",text:"var(--status-pass-text)",label:"Pass"},fail:{bg:"var(--status-fail-bg)",text:"var(--status-fail-text)",label:"Fail"},skip:{bg:"var(--status-skip-bg)",text:"var(--status-skip-text)",label:"Skip"}};function w(e){let{status:t,onCycle:r}=e,s=k[t];return(0,a.jsx)("button",{onClick:r,className:"px-2.5 py-0.5 text-xs font-medium rounded-full transition-opacity hover:opacity-80 whitespace-nowrap",style:{backgroundColor:s.bg,color:s.text,borderRadius:"var(--radius-pill)"},children:s.label})}let C=["untested","pass","fail","skip"];function N(e){let{tc:t,visibleCols:r,expandAll:s,selected:o,onToggleSelect:n,onUpdate:i,onDelete:c,onDragStart:d,onDragOver:x,onDrop:u}=e,[p,m]=(0,l.useState)(null),[f,h]=(0,l.useState)(""),[y,b]=(0,l.useState)(!1),[v,g]=(0,l.useState)(null),j=(0,l.useRef)(null);(0,l.useEffect)(()=>{p&&j.current&&j.current.focus()},[p]);let k=e=>{var r;h(null!==(r=t[e])&&void 0!==r?r:""),m(e)},N=()=>{p&&(i({[p]:f}),m(null))},S=()=>{let e=C.indexOf(t.status);i({status:C[(e+1)%C.length]})},L=e=>{if("Enter"===e.key&&"steps"!==p&&N(),"Escape"===e.key&&(m(null),h("")),"Tab"===e.key){e.preventDefault(),N();let t=r.filter(e=>"status"!==e.key&&"code"!==e.key).map(e=>e.key),a=t.indexOf(p),s=e.shiftKey?t[a-1]:t[a+1];s&&k(s)}},E=e=>{let r=t[e];return r&&r.length>40};return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("tr",{className:"group transition-colors",style:{backgroundColor:y?"var(--bg-secondary)":"transparent"},onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),draggable:!0,onDragStart:d,onDragOver:x,onDrop:u,children:[(0,a.jsx)("td",{className:"px-2 py-1.5 border-b",style:{borderColor:"var(--border)",width:28},children:(0,a.jsx)("input",{type:"checkbox",checked:o,onChange:n,className:"cursor-pointer accent-[var(--accent)]",style:{width:14,height:14}})}),r.map(e=>(0,a.jsx)("td",{className:"px-2 py-1.5 text-xs border-b",style:{borderColor:"var(--border)",color:"var(--text-primary)",maxWidth:"steps"===e.key||"expected"===e.key?300:void 0},children:"status"===e.key?(0,a.jsx)(w,{status:t.status,onCycle:S}):"code"===e.key?(0,a.jsx)("span",{className:"font-mono text-[10px]",style:{color:"var(--text-tertiary)"},children:t.code||"—"}):"case_type"===e.key?(0,a.jsx)(M,{value:t.case_type||"General",onChange:e=>i({case_type:e})}):p===e.key?"steps"===e.key?(0,a.jsx)("textarea",{ref:j,value:f,onChange:e=>h(e.target.value),onBlur:N,onKeyDown:L,className:"w-full bg-transparent outline-none border rounded p-1 text-xs resize-none",style:{borderColor:"var(--accent)",color:"var(--text-primary)",minHeight:60},rows:3}):(0,a.jsx)("input",{ref:j,value:f,onChange:e=>h(e.target.value),onBlur:N,onKeyDown:L,className:"w-full bg-transparent outline-none border-b text-xs",style:{borderColor:"var(--accent)",color:"var(--text-primary)"}}):"links"===e.key?(0,a.jsx)("div",{className:"flex items-center gap-1",children:t.links?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("a",{href:t.links,target:"_blank",rel:"noopener noreferrer",className:"text-[11px] underline hover:opacity-80 transition-opacity",style:{color:"var(--accent)"},onClick:e=>e.stopPropagation(),children:"Open Link"}),(0,a.jsx)("button",{onClick:e=>{e.stopPropagation(),i({links:""})},className:"text-[10px] opacity-0 group-hover:opacity-100 hover:opacity-100 transition-opacity px-0.5",style:{color:"var(--status-fail-text)"},title:"Clear link",children:"\xd7"})]}):(0,a.jsx)("span",{className:"cursor-text block text-[11px]",onClick:()=>k(e.key),style:{color:"var(--text-tertiary)"},children:"Add link..."})}):(0,a.jsx)("span",{className:"cursor-text block",onClick:()=>{E(e.key)&&(v===e.key?g(null):g(e.key))},onDoubleClick:()=>k(e.key),title:E(e.key)?v===e.key||s?"Click to collapse \xb7 Double-click to edit":"Click to expand \xb7 Double-click to edit":"Double-click to edit",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:v===e.key||s&&E(e.key)?"pre-wrap":"nowrap",display:"block",maxHeight:v===e.key||s&&E(e.key)?"none":"1.2em",lineHeight:"1.2em"},children:t[e.key]||(0,a.jsx)("span",{style:{color:"var(--text-tertiary)"},children:"—"})})},e.key)),(0,a.jsx)("td",{className:"px-1 py-1.5 border-b",style:{borderColor:"var(--border)"},children:y&&(0,a.jsx)("button",{onClick:c,className:"text-[10px] opacity-50 hover:opacity-100 transition-opacity px-0.5",style:{color:"var(--status-fail-text)"},children:"\xd7"})})]})})}let S={Positive:{bg:"var(--status-pass-bg)",text:"var(--status-pass-text)"},Negative:{bg:"var(--status-fail-bg)",text:"var(--status-fail-text)"},General:{bg:"var(--bg-secondary)",text:"var(--text-tertiary)"}};function M(e){let{value:t,onChange:r}=e,s=S[t]||S.General;return(0,a.jsx)("select",{value:t,onChange:e=>r(e.target.value),className:"text-[10px] font-medium px-2 py-0.5 rounded-full border-0 outline-none cursor-pointer",style:{backgroundColor:s.bg,color:s.text},children:b.sP.map(e=>(0,a.jsx)("option",{value:e,children:e},e))})}function L(e){let{testCases:t,columns:r,expandAll:s,selectedIds:o,onToggleSelect:l,onToggleSelectAll:n,onUpdate:i,onDelete:c,onReorder:d}=e,x=r.filter(e=>e.visible),u=t.length>0&&t.every(e=>o.has(e.id)),p=t.some(e=>o.has(e.id)),m=(e,t)=>{e.dataTransfer.setData("text/plain",t),e.dataTransfer.effectAllowed="move"},f=e=>{e.preventDefault(),e.dataTransfer.dropEffect="move"},h=(e,r)=>{e.preventDefault();let a=e.dataTransfer.getData("text/plain");if(a===r)return;let s=t.map(e=>e.id),o=s.indexOf(a),l=s.indexOf(r);if(-1===o||-1===l)return;let n=[...s];n.splice(o,1),n.splice(l,0,a),d(n)};return 0===t.length?null:(0,a.jsx)("div",{className:"overflow-x-auto",style:{minWidth:0},children:(0,a.jsxs)("table",{className:"text-xs",style:{minWidth:"900px",width:"100%"},children:[(0,a.jsx)("thead",{className:"sticky top-0 z-10",style:{backgroundColor:"var(--bg-primary)"},children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-2 py-1.5 border-b",style:{borderColor:"var(--border)",width:28},children:(0,a.jsx)("input",{type:"checkbox",checked:u,ref:e=>{e&&(e.indeterminate=p&&!u)},onChange:n,className:"cursor-pointer accent-[var(--accent)]",style:{width:14,height:14}})}),x.map(e=>(0,a.jsx)("th",{className:"px-2 py-1.5 text-left text-[10px] font-medium uppercase tracking-wider border-b",style:{color:"var(--text-tertiary)",borderColor:"var(--border)",whiteSpace:"nowrap"},children:e.label},e.key)),(0,a.jsx)("th",{className:"w-6 border-b",style:{borderColor:"var(--border)"}})]})}),(0,a.jsx)("tbody",{children:t.map(e=>(0,a.jsx)(N,{tc:e,visibleCols:x,expandAll:s,selected:o.has(e.id),onToggleSelect:()=>l(e.id),onUpdate:t=>i(e.id,t),onDelete:()=>c(e.id),onDragStart:t=>m(t,e.id),onDragOver:f,onDrop:t=>h(t,e.id)},e.id))})]})})}function E(e){let{stats:t}=e;return(0,a.jsxs)("div",{className:"flex items-center gap-4 px-4 py-2 text-xs border-t flex-wrap",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:[(0,a.jsxs)("span",{children:["Total: ",(0,a.jsx)("strong",{style:{color:"var(--text-primary)"},children:t.total})]}),(0,a.jsxs)("span",{children:["Pass: ",(0,a.jsx)("strong",{style:{color:"var(--status-pass-text)"},children:t.pass}),t.total>0&&" (".concat(t.passRate,"%)")]}),(0,a.jsxs)("span",{children:["Fail: ",(0,a.jsx)("strong",{style:{color:"var(--status-fail-text)"},children:t.fail})]}),(0,a.jsxs)("span",{children:["Skip: ",(0,a.jsx)("strong",{style:{color:"var(--status-skip-text)"},children:t.skip})]}),(0,a.jsxs)("span",{children:["Untested: ",(0,a.jsx)("strong",{style:{color:"var(--status-untested-text)"},children:t.untested})]})]})}var D=r(8014);function R(e){let{open:t,onClose:r,node:s,testCases:o,columns:l}=e,n=l&&l.length>0?l:b.vJ;return t?(0,a.jsx)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:r,children:(0,a.jsxs)("div",{className:"w-full max-w-sm mx-4 rounded-xl p-5",style:{backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)",borderRadius:"var(--radius-lg)"},onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("h3",{className:"text-sm font-semibold mb-1",style:{color:"var(--text-primary)"},children:"Export Test Cases"}),(0,a.jsxs)("p",{className:"text-xs mb-4",style:{color:"var(--text-tertiary)"},children:["Export “",s.label,"” (",o.length," case",1!==o.length?"s":"",")"]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("button",{onClick:()=>{(0,D.iU)(s,o,n),r()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,a.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"Markdown (.md)"}),(0,a.jsx)("br",{}),(0,a.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Formatted table for documentation"})]}),(0,a.jsxs)("button",{onClick:()=>{(0,D.uJ)(s,o),r()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,a.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"JSON (.json)"}),(0,a.jsx)("br",{}),(0,a.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Structured data backup"})]}),(0,a.jsxs)("button",{onClick:()=>{(0,D.SI)(s,o,n),r()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,a.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"CSV (.csv)"}),(0,a.jsx)("br",{}),(0,a.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Spreadsheet-compatible format"})]}),(0,a.jsxs)("button",{onClick:async()=>{await (0,D.FU)(s,o,n),r()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,a.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"Excel (.xlsx)"}),(0,a.jsx)("br",{}),(0,a.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Styled spreadsheet for reporting"})]})]}),(0,a.jsx)("button",{onClick:r,className:"w-full mt-3 px-3 py-2 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"})]})}):null}var I=r(5084);async function U(e,t,r){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"google",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"en",l=arguments.length>6?arguments[6]:void 0,n=arguments.length>7?arguments[7]:void 0,i=await fetch("/api/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:e,prompt:t,apiKey:r,provider:a,model:s,language:o,baseURL:l,images:n})});if(!i.ok)throw Error((await i.json().catch(()=>({error:"Request failed"}))).error||"HTTP ".concat(i.status));return(await i.json()).testCases}I.Ry({title:I.Z_().describe("Short descriptive title of the test case"),steps:I.Z_().describe("Numbered test steps separated by newlines"),expected:I.Z_().describe("Expected result of the test")});var A=r(8028);let z=["User can log in with valid credentials","Invalid input shows validation error","Form submits successfully and redirects","Edge case: empty required fields"],P=["While you wait... have this cute cat!","Hang tight! Here's a furry friend.","Generating... enjoy this kitty!","Almost there! Cat says hi.","Test cases incoming... meow!"];function W(e){let{open:t,onClose:r,node:s,onGenerate:o}=e,{isConnected:n,activeProvider:i,activeProviderId:c}=(0,A.p)(),[d,x]=(0,l.useState)(""),[u,p]=(0,l.useState)(""),[m,f]=(0,l.useState)("en"),[h,y]=(0,l.useState)(!1),[b,v]=(0,l.useState)(!1),[g,j]=(0,l.useState)(null),[k,w]=(0,l.useState)([]),[C,N]=(0,l.useState)(""),[S,M]=(0,l.useState)(P[0]),[L,E]=(0,l.useState)(0),D=(0,l.useRef)(null),R=(0,l.useRef)(null),[I,W]=(0,l.useState)(!1),T=(0,l.useCallback)(async()=>{try{var e;let t=await fetch("https://api.thecatapi.com/v1/images/search?size=med"),r=await t.json();(null==r?void 0:null===(e=r[0])||void 0===e?void 0:e.url)&&N(r[0].url)}catch(e){N("")}M(P[Math.floor(Math.random()*P.length)])},[]);(0,l.useEffect)(()=>{t&&(x(s.label),p(""),j(null),v(!1),w([]),N(""),E(0))},[t,s.label]),(0,l.useEffect)(()=>{if(!b)return;T();let e=setInterval(()=>{E(e=>e+1),T()},2e3);return()=>clearInterval(e)},[b,T]);let B=e=>new Promise((t,r)=>{if(!e.type.startsWith("image/")){r(Error("Not an image file"));return}if(e.size>5242880){r(Error("Image too large (max ".concat(5,"MB)")));return}let a=new FileReader;a.onload=()=>t(a.result),a.onerror=()=>r(Error("Failed to read file")),a.readAsDataURL(e)}),F=(0,l.useCallback)(async e=>{let t=5-k.length;if(t<=0){j("Maximum ".concat(5," images allowed"));return}let r=Array.from(e).slice(0,t),a=[];for(let e of r)try{let t=await B(e);a.push(t)}catch(e){j(e instanceof Error?e.message:"Failed to load image")}a.length>0&&(w(e=>[...e,...a]),j(null))},[k.length]),O=(0,l.useCallback)(e=>{w(t=>t.filter((t,r)=>r!==e))},[]);(0,l.useEffect)(()=>{if(!t)return;let e=e=>{var t;let r=null===(t=e.clipboardData)||void 0===t?void 0:t.items;if(!r)return;let a=[];for(let e of Array.from(r))if(e.type.startsWith("image/")){let t=e.getAsFile();t&&a.push(t)}a.length>0&&(e.preventDefault(),F(a))};return document.addEventListener("paste",e),()=>document.removeEventListener("paste",e)},[t,F]);let X=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),W(!0)},[]),H=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),W(!1)},[]),G=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),W(!1),e.dataTransfer.files.length>0&&F(e.dataTransfer.files)},[F]),Y=(0,l.useCallback)(e=>{e.target.files&&e.target.files.length>0&&(F(e.target.files),e.target.value="")},[F]),_=async()=>{if(!n){j("Please configure an AI provider in Integrations first.");return}if(!u.trim()&&0===k.length){j("Please describe the feature, paste a ticket, or attach an image.");return}v(!0),j(null);try{let e=await U(d,u,i.apiKey,null!=c?c:void 0,i.defaultModel,m,i.baseURL||void 0,k.length>0?k:void 0);o(e),r()}catch(e){j(e instanceof Error?e.message:"Generation failed")}finally{v(!1)}};return t?(0,a.jsx)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:r,children:(0,a.jsxs)("div",{className:"flex rounded-xl overflow-hidden",style:{maxWidth:b?"720px":"512px",width:"100%",margin:"0 16px",backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)",transition:"max-width 400ms cubic-bezier(0.4, 0, 0.2, 1)"},onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",style:{maxWidth:"512px"},children:[(0,a.jsxs)("div",{className:"px-5 pt-5 pb-4 border-b",style:{borderColor:"var(--border)"},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-md flex items-center justify-center",style:{background:"linear-gradient(135deg, #8D6E63, #A1887F)"},children:(0,a.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,a.jsx)("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}),(0,a.jsx)("h3",{className:"text-sm font-semibold",style:{color:"var(--text-primary)"},children:"Generate Test Cases"})]}),(0,a.jsxs)("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:["Describe the feature and let AI generate test cases for “",s.label,"”"]})]}),(0,a.jsxs)("div",{className:"px-5 py-4 space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs font-medium block mb-1.5",style:{color:"var(--text-secondary)"},children:"Test Case Title"}),(0,a.jsx)("input",{value:d,onChange:e=>x(e.target.value),className:"w-full px-3 py-2 text-sm rounded-lg outline-none border transition-colors focus:border-[var(--accent)]",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)",color:"var(--text-primary)"},placeholder:"Feature name..."})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs font-medium block mb-1.5",style:{color:"var(--text-secondary)"},children:"Description / DoD / Ticket"}),(0,a.jsx)("textarea",{value:u,onChange:e=>p(e.target.value),rows:4,className:"w-full px-3 py-2 text-sm rounded-lg outline-none border resize-none transition-colors focus:border-[var(--accent)]",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)",color:"var(--text-primary)"},placeholder:"id"===m?"Jelaskan fitur, kriteria penerimaan, atau tempel tiket...":"Describe the feature, acceptance criteria, or paste a ticket..."}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5 mt-2",children:z.map(e=>(0,a.jsxs)("button",{onClick:()=>p(t=>t?"".concat(t,"\n").concat(e):e),className:"px-2 py-0.5 text-[10px] rounded-full border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:["+ ",e]},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"text-xs font-medium block mb-1.5",style:{color:"var(--text-secondary)"},children:["Screenshots ",(0,a.jsx)("span",{className:"font-normal",style:{color:"var(--text-tertiary)"},children:"(optional)"})]}),k.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-2 mb-2",children:k.map((e,t)=>(0,a.jsxs)("div",{className:"relative group rounded-lg overflow-hidden border",style:{borderColor:"var(--border)",width:72,height:72},children:[(0,a.jsx)("img",{src:e,alt:"Screenshot ".concat(t+1),className:"w-full h-full object-cover"}),(0,a.jsx)("button",{onClick:()=>O(t),className:"absolute top-0.5 right-0.5 w-5 h-5 rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",style:{backgroundColor:"rgba(0,0,0,0.7)",color:"#fff"},title:"Remove",children:(0,a.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,a.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},t))}),(0,a.jsx)("div",{ref:R,onDragOver:X,onDragLeave:H,onDrop:G,onClick:()=>{var e;return null===(e=D.current)||void 0===e?void 0:e.click()},className:"rounded-lg border-2 border-dashed cursor-pointer transition-colors",style:{borderColor:I?"var(--accent)":"var(--border)",backgroundColor:I?"var(--accent)08":"transparent",padding:k.length>0?"8px":"16px"},children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,a.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),(0,a.jsx)("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),(0,a.jsx)("polyline",{points:"21 15 16 10 5 21"})]}),(0,a.jsx)("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:k.length>0?"Add more (".concat(k.length,"/").concat(5,") \xb7 paste, drop, or click"):"Paste from clipboard, drop, or click to upload"})]})}),(0,a.jsx)("input",{ref:D,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:Y})]}),g&&(0,a.jsx)("div",{className:"text-xs px-3 py-2 rounded-lg",style:{backgroundColor:"var(--status-fail-bg)",color:"var(--status-fail-text)"},children:g}),!n&&(0,a.jsx)("div",{className:"text-xs px-3 py-2 rounded-lg",style:{backgroundColor:"var(--status-skip-bg)",color:"var(--status-skip-text)"},children:"No AI provider configured. Go to Integrations to set up."}),(0,a.jsxs)("div",{className:"rounded-lg border overflow-hidden",style:{borderColor:"var(--border)"},children:[(0,a.jsxs)("button",{onClick:()=>y(e=>!e),className:"w-full flex items-center justify-between px-3 py-2 transition-colors hover:bg-[var(--bg-secondary)]",children:[(0,a.jsx)("span",{className:"text-xs font-medium",style:{color:"var(--text-secondary)"},children:"Language"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[10px] font-mono font-semibold px-1.5 py-0.5 rounded",style:{backgroundColor:"var(--bg-secondary)",color:"var(--text-tertiary)"},children:"en"===m?"EN":"ID"}),(0,a.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:h?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms ease-out"},children:(0,a.jsx)("polyline",{points:"6 9 12 15 18 9"})})]})]}),(0,a.jsx)("div",{style:{maxHeight:h?"80px":"0px",overflow:"hidden",transition:"max-height 200ms ease-out"},children:(0,a.jsx)("div",{className:"px-3 pb-2 pt-1",children:(0,a.jsxs)("select",{value:m,onChange:e=>{f(e.target.value),y(!1)},className:"w-full px-2.5 py-1.5 text-xs rounded-md border outline-none transition-colors cursor-pointer",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)",color:"var(--text-primary)"},children:[(0,a.jsx)("option",{value:"en",children:"English"}),(0,a.jsx)("option",{value:"id",children:"Bahasa Indonesia"})]})})})]})]}),(0,a.jsxs)("div",{className:"px-5 py-4 border-t flex gap-2",style:{borderColor:"var(--border)"},children:[(0,a.jsx)("button",{onClick:r,className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"}),(0,a.jsx)("button",{onClick:_,disabled:b||!n,className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg transition-all hover:opacity-90 active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed",style:{background:"linear-gradient(135deg, #8D6E63, #A1887F)",color:"#fff",boxShadow:"0 2px 8px rgba(141,110,99,0.3)"},children:b?(0,a.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("svg",{className:"animate-spin",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,a.jsx)("circle",{cx:"12",cy:"12",r:"10",strokeDasharray:"30 70"})}),"Generating..."]}):"Generate Test Cases"})]})]}),(0,a.jsx)("div",{className:"flex-shrink-0 overflow-hidden",style:{width:b?"280px":"0px",transition:"width 400ms cubic-bezier(0.4, 0, 0.2, 1)"},children:(0,a.jsxs)("div",{className:"w-[280px] h-full flex flex-col items-center justify-center p-5 border-l",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)",opacity:b?1:0,transition:"opacity 300ms ease-out 100ms"},children:[(0,a.jsx)("div",{className:"w-full rounded-xl overflow-hidden mb-4 border",style:{borderColor:"var(--border)",height:180,backgroundColor:"var(--bg-card)"},children:C&&(0,a.jsx)("img",{src:C,alt:"Cute cat",width:280,height:180,className:"w-full h-full object-cover",style:{animation:"fadeIn 800ms ease-out"},onError:e=>{e.target.style.display="none"}},L)}),(0,a.jsx)("p",{className:"text-xs text-center mb-3",style:{color:"var(--text-secondary)",animation:"fadeIn 800ms ease-out"},children:S}),(0,a.jsx)("button",{onClick:T,className:"px-3 py-1.5 text-[10px] rounded-full border transition-colors hover:bg-[var(--bg-card)]",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:"New cat"})]})})]})}):null}let T={pass:{bg:"var(--status-pass-bg)",text:"var(--status-pass-text)"},fail:{bg:"var(--status-fail-bg)",text:"var(--status-fail-text)"},skip:{bg:"var(--status-skip-bg)",text:"var(--status-skip-text)"},untested:{bg:"var(--status-untested-bg)",text:"var(--status-untested-text)"}};function B(e){let{open:t,onClose:r,node:s,testCases:l,stats:n}=e;return t?(0,a.jsxs)("div",{style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:r,className:"jsx-540c0278eef48442 fixed inset-0 z-[300] flex items-center justify-center",children:[(0,a.jsxs)("div",{style:{backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)",borderRadius:"var(--radius-lg)",animation:"fadeInUp 200ms ease-out"},onClick:e=>e.stopPropagation(),className:"jsx-540c0278eef48442 w-full max-w-lg mx-4 rounded-xl overflow-hidden",children:[(0,a.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-540c0278eef48442 px-5 pt-5 pb-4 border-b",children:[(0,a.jsxs)("div",{className:"jsx-540c0278eef48442 flex items-center justify-between mb-2",children:[(0,a.jsxs)("div",{className:"jsx-540c0278eef48442 flex items-center gap-2",children:[s.code&&(0,a.jsx)("span",{style:{backgroundColor:"var(--bg-secondary)",color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-[10px] font-mono px-1.5 py-0.5 rounded",children:s.code}),(0,a.jsx)("h3",{style:{color:"var(--text-primary)"},className:"jsx-540c0278eef48442 text-sm font-semibold",children:s.label})]}),(0,a.jsx)("button",{onClick:r,style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-[10px] opacity-50 hover:opacity-100",children:"\xd7"})]}),s.notes&&(0,a.jsx)("p",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-xs",children:s.notes})]}),(0,a.jsxs)("div",{className:"jsx-540c0278eef48442 grid grid-cols-4 gap-3 p-5",children:[(0,a.jsx)(F,{label:"Total",value:n.total}),(0,a.jsx)(F,{label:"Pass",value:n.pass,color:"var(--status-pass-text)"}),(0,a.jsx)(F,{label:"Fail",value:n.fail,color:"var(--status-fail-text)"}),(0,a.jsx)(F,{label:"Untested",value:n.untested,color:"var(--status-untested-text)"})]}),(0,a.jsxs)("div",{className:"jsx-540c0278eef48442 px-5 pb-4",children:[(0,a.jsxs)("div",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 flex items-center justify-between text-[10px] mb-1.5",children:[(0,a.jsx)("span",{className:"jsx-540c0278eef48442",children:"Pass Rate"}),(0,a.jsxs)("span",{style:{color:n.passRate>=80?"var(--status-pass-text)":n.passRate>=50?"var(--status-skip-text)":"var(--status-fail-text)",fontWeight:600},className:"jsx-540c0278eef48442",children:[n.passRate,"%"]})]}),(0,a.jsx)("div",{style:{backgroundColor:"var(--bg-secondary)"},className:"jsx-540c0278eef48442 h-2 w-full rounded-full overflow-hidden",children:(0,a.jsx)("div",{style:{width:"".concat(n.passRate,"%"),backgroundColor:n.passRate>=80?"var(--status-pass-text)":n.passRate>=50?"var(--status-skip-text)":"var(--status-fail-text)"},className:"jsx-540c0278eef48442 h-full rounded-full transition-all duration-500"})})]}),l.length>0&&(0,a.jsxs)("div",{className:"jsx-540c0278eef48442 px-5 pb-4",children:[(0,a.jsx)("h4",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-[10px] font-semibold uppercase tracking-wider mb-2",children:"Test Cases"}),(0,a.jsx)("div",{className:"jsx-540c0278eef48442 space-y-1.5 max-h-48 overflow-y-auto",children:l.map(e=>{let t=T[e.status]||T.untested;return(0,a.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-540c0278eef48442 flex items-center gap-2 px-3 py-2 rounded-lg border",children:[(0,a.jsx)("span",{style:{backgroundColor:t.bg,color:t.text},className:"jsx-540c0278eef48442 text-[9px] font-mono px-1.5 py-0.5 rounded-full flex-shrink-0",children:e.status}),(0,a.jsx)("span",{style:{color:"var(--text-primary)"},className:"jsx-540c0278eef48442 text-[11px] flex-1 truncate",children:e.title}),e.code&&(0,a.jsx)("span",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-[9px] font-mono flex-shrink-0",children:e.code})]},e.id)})})]}),0===l.length&&(0,a.jsx)("div",{className:"jsx-540c0278eef48442 px-5 pb-5 text-center",children:(0,a.jsx)("p",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-xs",children:"No test cases for this node yet."})}),(0,a.jsx)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},className:"jsx-540c0278eef48442 px-5 py-3 border-t",children:(0,a.jsx)("button",{onClick:r,style:{borderColor:"var(--border)",color:"var(--text-secondary)"},className:"jsx-540c0278eef48442 w-full px-3 py-2 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-card)]",children:"Close"})})]}),(0,a.jsx)(o(),{id:"540c0278eef48442",children:"@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{from{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@-webkit-keyframes fadeInUp{from{opacity:0;-webkit-transform:translatey(12px);transform:translatey(12px)}to{opacity:1;-webkit-transform:translatey(0);transform:translatey(0)}}@-moz-keyframes fadeInUp{from{opacity:0;-moz-transform:translatey(12px);transform:translatey(12px)}to{opacity:1;-moz-transform:translatey(0);transform:translatey(0)}}@-o-keyframes fadeInUp{from{opacity:0;-o-transform:translatey(12px);transform:translatey(12px)}to{opacity:1;-o-transform:translatey(0);transform:translatey(0)}}@keyframes fadeInUp{from{opacity:0;-webkit-transform:translatey(12px);-moz-transform:translatey(12px);-o-transform:translatey(12px);transform:translatey(12px)}to{opacity:1;-webkit-transform:translatey(0);-moz-transform:translatey(0);-o-transform:translatey(0);transform:translatey(0)}}"})]}):null}function F(e){let{label:t,value:r,color:s}=e;return(0,a.jsxs)("div",{className:"text-center p-2 rounded-lg border",style:{borderColor:"var(--border)"},children:[(0,a.jsx)("div",{className:"text-[10px] mb-0.5",style:{color:"var(--text-tertiary)"},children:t}),(0,a.jsx)("div",{className:"text-lg font-semibold",style:{color:null!=s?s:"var(--text-primary)"},children:r})]})}function O(e){let t=[],r="",a=!1;for(let s=0;s<e.length;s++){let o=e[s];a?'"'===o?s+1<e.length&&'"'===e[s+1]?(r+='"',s++):a=!1:r+=o:'"'===o?a=!0:","===o?(t.push(r),r=""):r+=o}return t.push(r),t}function X(e){let{open:t,onClose:r,onImport:s,nodeLabel:o}=e,[n,i]=(0,l.useState)("csv"),[c,d]=(0,l.useState)(null),[x,u]=(0,l.useState)(null),[p,m]=(0,l.useState)(!1),f=(0,l.useRef)(null),h=()=>{d(null),u(null),m(!1)},y=(0,l.useCallback)(e=>{d(null),u(null);let t=new FileReader;t.onload=()=>{try{let r=t.result,a=e.name.endsWith(".json")||"application/json"===e.type?function(e){let t=JSON.parse(e),r=Array.isArray(t)?t:t.testCases||t.test_cases||t.cases;if(!Array.isArray(r))throw Error('JSON must be an array of test cases, or an object with a "testCases" array');let a=[];for(let e of r){if("string"==typeof e){e.trim()&&a.push({title:e.trim(),steps:"",expected:""});continue}if("object"!=typeof e||!e)continue;let t=e.title||e.name||e.testCase||e["test case"]||"";t&&"string"==typeof t&&a.push({title:t.trim(),steps:String(e.steps||e.instructions||"").trim(),expected:String(e.expected||e["expected result"]||e.result||"").trim()})}if(0===a.length)throw Error("No valid test cases found in JSON");return a}(r):function(e){let t=e.split("\n").map(e=>e.trim()).filter(e=>e.length>0);if(t.length<2)throw Error("CSV must have a header row and at least one data row");let r=O(t[0]).map(e=>e.toLowerCase().trim()),a=r.findIndex(e=>"title"===e||"test case"===e||"testcase"===e||"name"===e||"test case title"===e),s=r.findIndex(e=>"steps"===e||"test steps"===e||"step"===e||"instructions"===e),o=r.findIndex(e=>"expected"===e||"expected result"===e||"expected results"===e||"result"===e);if(-1===a)throw Error('Could not find a "title" or "test case" column in the CSV header');let l=[];for(let e=1;e<t.length;e++){let r=O(t[e]),n=(r[a]||"").trim();n&&l.push({title:n,steps:s>=0?(r[s]||"").trim():"",expected:o>=0?(r[o]||"").trim():""})}if(0===l.length)throw Error("No valid test cases found in CSV");return l}(r);u(a)}catch(e){d(e instanceof Error?e.message:"Failed to parse file")}},t.onerror=()=>d("Failed to read file"),t.readAsText(e)},[]);return t?(0,a.jsx)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:()=>{h(),r()},children:(0,a.jsxs)("div",{className:"w-full max-w-lg mx-4 rounded-xl overflow-hidden",style:{backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)"},onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"px-5 pt-5 pb-4 border-b",style:{borderColor:"var(--border)"},children:[(0,a.jsx)("h3",{className:"text-sm font-semibold mb-1",style:{color:"var(--text-primary)"},children:"Import Test Cases"}),(0,a.jsxs)("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:["Import test cases into “",o,"” from CSV or JSON"]})]}),(0,a.jsxs)("div",{className:"px-5 py-4 space-y-4",children:[(0,a.jsxs)("div",{className:"text-[11px] rounded-lg px-3 py-2",style:{backgroundColor:"var(--bg-secondary)",color:"var(--text-tertiary)"},children:[(0,a.jsx)("p",{className:"font-medium mb-1",style:{color:"var(--text-secondary)"},children:"Supported formats:"}),(0,a.jsxs)("ul",{className:"space-y-0.5 ml-3",children:[(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"CSV:"})," Header row with columns: title, steps, expected (or similar names)"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"JSON:"}),' Array of objects with "title", "steps", "expected" fields']})]})]}),(0,a.jsx)("div",{onDragOver:e=>{e.preventDefault(),m(!0)},onDragLeave:()=>m(!1),onDrop:e=>{e.preventDefault(),m(!1);let t=e.dataTransfer.files[0];t&&y(t)},onClick:()=>{var e;return null===(e=f.current)||void 0===e?void 0:e.click()},className:"border-2 border-dashed rounded-lg cursor-pointer transition-colors py-8",style:{borderColor:p?"var(--accent)":"var(--border)",backgroundColor:p?"var(--accent)08":"transparent"},children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,a.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"}),(0,a.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,a.jsx)("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]}),(0,a.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Drop a .csv or .json file here, or click to browse"})]})}),(0,a.jsx)("input",{ref:f,type:"file",accept:".csv,.json",className:"hidden",onChange:e=>{var t;let r=null===(t=e.target.files)||void 0===t?void 0:t[0];r&&y(r),e.target.value=""}}),c&&(0,a.jsx)("div",{className:"text-xs px-3 py-2 rounded-lg",style:{backgroundColor:"var(--status-fail-bg)",color:"var(--status-fail-text)"},children:c}),x&&x.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsxs)("span",{className:"text-xs font-medium",style:{color:"var(--text-secondary)"},children:["Preview (",x.length," test case",1!==x.length?"s":"",")"]}),(0,a.jsx)("button",{onClick:()=>u(null),className:"text-[10px] px-1.5 py-0.5 rounded border hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:"Clear"})]}),(0,a.jsxs)("div",{className:"max-h-[200px] overflow-auto rounded-lg border",style:{borderColor:"var(--border)"},children:[(0,a.jsxs)("table",{className:"text-[11px] w-full",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{style:{backgroundColor:"var(--bg-secondary)"},children:[(0,a.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",style:{color:"var(--text-tertiary)"},children:"#"}),(0,a.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",style:{color:"var(--text-tertiary)"},children:"Title"}),(0,a.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",style:{color:"var(--text-tertiary)"},children:"Steps"}),(0,a.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",style:{color:"var(--text-tertiary)"},children:"Expected"})]})}),(0,a.jsx)("tbody",{children:x.slice(0,20).map((e,t)=>(0,a.jsxs)("tr",{className:"border-t",style:{borderColor:"var(--border)"},children:[(0,a.jsx)("td",{className:"px-2 py-1",style:{color:"var(--text-tertiary)"},children:t+1}),(0,a.jsx)("td",{className:"px-2 py-1",style:{color:"var(--text-primary)"},children:e.title}),(0,a.jsx)("td",{className:"px-2 py-1 max-w-[120px] truncate",style:{color:"var(--text-secondary)"},children:e.steps||"—"}),(0,a.jsx)("td",{className:"px-2 py-1 max-w-[120px] truncate",style:{color:"var(--text-secondary)"},children:e.expected||"—"})]},t))})]}),x.length>20&&(0,a.jsxs)("div",{className:"px-2 py-1 text-[10px] border-t",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:["...and ",x.length-20," more"]})]})]})]}),(0,a.jsxs)("div",{className:"px-5 py-4 border-t flex gap-2",style:{borderColor:"var(--border)"},children:[(0,a.jsx)("button",{onClick:()=>{h(),r()},className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"}),(0,a.jsxs)("button",{onClick:()=>{x&&0!==x.length&&(s(x),h(),r())},disabled:!x||0===x.length,className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg transition-all hover:opacity-90 active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed",style:{background:"linear-gradient(135deg, #8D6E63, #A1887F)",color:"#fff"},children:["Import ",x?"(".concat(x.length,")"):""]})]})]})}):null}var H=r(535),G=r(1906),Y=r(6836),_=r(1854);let K=(0,H.j)("supports-backdrop-blur:bg-white/10 supports-backdrop-blur:dark:bg-black/10 mx-auto mt-8 flex h-[58px] w-max items-center justify-center gap-2 rounded-2xl border p-2 backdrop-blur-md"),J=l.forwardRef((e,t)=>{let{className:r,children:s,iconSize:o=40,iconMagnification:n=60,disableMagnification:i=!1,iconDistance:c=140,direction:u="middle",...p}=e,m=(0,G.c)(1/0);return(0,a.jsx)(d.E.div,{ref:t,onMouseMove:e=>m.set(e.pageX),onMouseLeave:()=>m.set(1/0),...p,className:(0,x.cn)(K({className:r}),{"items-start":"top"===u,"items-center":"middle"===u,"items-end":"bottom"===u}),children:l.Children.map(s,e=>l.isValidElement(e)&&e.type===V?l.cloneElement(e,{...e.props,mouseX:m,size:o,magnification:n,disableMagnification:i,distance:c}):e)})});J.displayName="Dock";let V=e=>{let{size:t=40,magnification:r=60,disableMagnification:s,distance:o=140,mouseX:n,className:i,children:c,...u}=e,p=(0,l.useRef)(null),m=Math.max(6,.2*t),f=(0,G.c)(1/0),h=(0,Y.H)(null!=n?n:f,e=>{var t,r;let a=null!==(r=null===(t=p.current)||void 0===t?void 0:t.getBoundingClientRect())&&void 0!==r?r:{x:0,width:0};return e-a.x-a.width/2}),y=s?t:r,b=(0,Y.H)(h,[-o,0,o],[t,y,t]),v=(0,_.q)(b,{mass:.15,stiffness:120,damping:25});return(0,a.jsx)(d.E.div,{ref:p,style:{width:v,height:v,padding:m},className:(0,x.cn)("flex aspect-square cursor-pointer items-center justify-center rounded-full",s&&"hover:bg-muted-foreground transition-colors",i),...u,children:(0,a.jsx)("div",{children:c})})};V.displayName="DockIcon";var Z=r(2198);function q(e){let{className:t,orientation:r="horizontal",...s}=e;return(0,a.jsx)(Z.Z,{"data-slot":"separator",orientation:r,className:(0,x.cn)("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",t),...s})}function Q(e){var t;let{selectedNode:r,testCases:s,stats:i,columns:c,projectId:d,fullscreen:x,onAddTestCase:u,onUpdateTestCase:p,onDeleteTestCase:m,onBulkDelete:f,onBulkUpdate:h,onReorderTestCases:y,onReorderColumn:k,onToggleColumn:w,onRenameColumn:C,onUpdateNode:N,onAddColumn:S,onDeleteColumn:M,confirmDialog:I}=e;(0,n.useRouter)();let[U,A]=(0,l.useState)(!1),[z,P]=(0,l.useState)(!1),[T,F]=(0,l.useState)(!1),[O,H]=(0,l.useState)(!1),[G,Y]=(0,l.useState)(!1),[_,K]=(0,l.useState)(!1),[Z,Q]=(0,l.useState)(!1),[$,ee]=(0,l.useState)(!1),[et,er]=(0,l.useState)(new Set),[ea,es]=(0,l.useState)(!1),[eo,el]=(0,l.useState)(""),en=(0,l.useRef)(null),ei=(0,l.useRef)(null),ec=x?c:c.filter(e=>"code"!==e.key),ed=b.vJ.map(e=>e.key);(0,l.useEffect)(()=>{er(new Set)},[null==r?void 0:r.id]);let ex=(0,l.useCallback)(e=>{er(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},[]),eu=(0,l.useCallback)(()=>{et.size===s.length?er(new Set):er(new Set(s.map(e=>e.id)))},[et.size,s]),ep=(0,l.useCallback)(()=>er(new Set),[]),em=(0,l.useCallback)(async()=>{r&&0!==et.size&&(!I||await I("Delete Test Cases","Delete ".concat(et.size," selected test case(s)?")))&&(f(r.id,Array.from(et)),er(new Set))},[r,et,f,I]),ef=(0,l.useCallback)(e=>{r&&0!==et.size&&(h(r.id,Array.from(et),{status:e}),er(new Set))},[r,et,h]);(0,l.useEffect)(()=>{ea&&en.current&&en.current.focus()},[ea]),(0,l.useEffect)(()=>{if(!_)return;let e=e=>{ei.current&&!ei.current.contains(e.target)&&K(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[_]);let eh=(0,l.useCallback)(e=>{if(r)for(let t of e)u(r.id,t.title,t.steps,t.expected)},[r,u]),ey=(0,l.useCallback)(e=>{if(r)for(let t of e)u(r.id,t.title,t.steps,t.expected)},[r,u]);return r?(0,a.jsxs)("div",{className:"jsx-bc071752c54fb059 flex flex-col h-full relative",children:[(0,a.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-bc071752c54fb059 px-4 py-3 border-b",children:[(0,a.jsx)("h2",{style:{color:"var(--text-primary)"},className:"jsx-bc071752c54fb059 text-base font-medium mb-2",children:r.label}),(0,a.jsx)(g,{value:i.passRate})]}),U&&(0,a.jsxs)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},className:"jsx-bc071752c54fb059 px-4 py-3 border-b",children:[(0,a.jsx)("label",{style:{color:"var(--text-tertiary)"},className:"jsx-bc071752c54fb059 text-xs font-medium mb-1 block",children:"Node Notes"}),(0,a.jsx)("textarea",{value:null!==(t=r.notes)&&void 0!==t?t:"",onChange:e=>N(r.id,{notes:e.target.value}),placeholder:"Add notes for this node...",rows:3,style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)",color:"var(--text-primary)"},className:"jsx-bc071752c54fb059 w-full px-3 py-2 text-sm bg-transparent outline-none border resize-none"})]}),(0,a.jsx)("div",{className:"jsx-bc071752c54fb059 px-4 py-3",children:(0,a.jsx)(j,{onAdd:e=>u(r.id,e),nodeLabel:r.label})}),et.size>0&&(0,a.jsxs)("div",{style:{borderColor:"var(--accent)",backgroundColor:"var(--accent)",animation:"fadeInUp 150ms ease-out"},className:"jsx-bc071752c54fb059 mx-4 mb-2 px-3 py-2 rounded-lg border flex items-center gap-3",children:[(0,a.jsxs)("span",{className:"jsx-bc071752c54fb059 text-xs font-medium text-white",children:[et.size," selected"]}),(0,a.jsx)("div",{className:"jsx-bc071752c54fb059 flex-1"}),["pass","fail","skip","untested"].map(e=>(0,a.jsxs)("button",{onClick:()=>ef(e),style:{color:"#fff"},className:"jsx-bc071752c54fb059 px-2 py-1 text-[10px] font-medium rounded-md transition-colors hover:bg-white/20",children:["Mark ",e.charAt(0).toUpperCase()+e.slice(1)]},e)),(0,a.jsx)("div",{className:"jsx-bc071752c54fb059 w-px h-4 bg-white/30"}),(0,a.jsx)("button",{onClick:em,style:{color:"#fff"},className:"jsx-bc071752c54fb059 px-2 py-1 text-[10px] font-medium rounded-md transition-colors hover:bg-white/20",children:"Delete"}),(0,a.jsx)("button",{onClick:ep,style:{color:"#fff"},title:"Clear selection",className:"jsx-bc071752c54fb059 px-1.5 py-1 text-[10px] font-medium rounded-md transition-colors hover:bg-white/20",children:"\xd7"})]}),(0,a.jsx)("div",{className:"jsx-bc071752c54fb059 flex-1 min-h-0 overflow-auto px-2",children:0===s.length?(0,a.jsx)(v.u,{message:"No test cases yet. Use the quick-add bar or Generate button to add test cases."}):(0,a.jsx)(L,{testCases:s,columns:ec,expandAll:Z,selectedIds:et,onToggleSelect:ex,onToggleSelectAll:eu,onUpdate:(e,t)=>p(r.id,e,t),onDelete:e=>m(r.id,e),onReorder:e=>y(r.id,e)})}),(0,a.jsx)(E,{stats:i}),(0,a.jsxs)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 flex-shrink-0 border-t py-2 flex justify-center relative",children:[_&&(0,a.jsxs)("div",{ref:ei,style:{bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:2,backgroundColor:"var(--bg-card)",borderColor:"var(--border)",boxShadow:"var(--shadow-lg)",animation:"fadeInUp 200ms ease-out",width:180},className:"jsx-bc071752c54fb059 absolute z-30 rounded-xl border",children:[(0,a.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-bc071752c54fb059 flex items-center justify-between px-3 py-2 border-b",children:[(0,a.jsx)("h4",{style:{color:"var(--text-primary)"},className:"jsx-bc071752c54fb059 text-[11px] font-semibold",children:"Columns"}),(0,a.jsx)("button",{onClick:()=>K(!1),style:{color:"var(--text-tertiary)"},className:"jsx-bc071752c54fb059 text-[10px] opacity-50 hover:opacity-100",children:"\xd7"})]}),(0,a.jsxs)("div",{className:"jsx-bc071752c54fb059 py-1 max-h-[240px] overflow-y-auto",children:[ec.map(e=>{let t=!ed.includes(e.key);return(0,a.jsxs)("div",{className:"jsx-bc071752c54fb059 flex items-center justify-between px-3 py-1.5 text-[11px] hover:bg-[var(--bg-secondary)] transition-colors group/col",children:[(0,a.jsxs)("button",{onClick:()=>r&&w(r.id,e.key),style:{color:e.visible?"var(--text-primary)":"var(--text-tertiary)"},className:"jsx-bc071752c54fb059 flex items-center gap-2 flex-1 text-left",children:[(0,a.jsx)("span",{className:"jsx-bc071752c54fb059 w-3 text-center",children:e.visible?"✓":""}),(0,a.jsx)("span",{className:"jsx-bc071752c54fb059",children:e.label})]}),t&&(0,a.jsx)("button",{onClick:async()=>{!r||!M||s.some(t=>{let r=t[e.key];return r&&"string"==typeof r&&""!==r.trim()})&&I&&!await I("Delete Column",'This column has data in some test cases. Delete "'.concat(e.label,'" anyway?'))||M(r.id,e.key)},style:{color:"var(--status-fail-text)"},title:"Delete ".concat(e.label),className:"jsx-bc071752c54fb059 w-4 h-4 flex items-center justify-center rounded opacity-0 group-hover/col:opacity-100 hover:opacity-100 transition-opacity text-[10px]",children:"\xd7"})]},e.key)}),ea?(0,a.jsx)("div",{className:"jsx-bc071752c54fb059 px-3 py-1.5",children:(0,a.jsx)("input",{ref:en,value:eo,onChange:e=>el(e.target.value),onKeyDown:e=>{"Enter"===e.key&&eo.trim()&&(null==S||S(r.id,eo.trim()),el(""),es(!1)),"Escape"===e.key&&(es(!1),el(""))},onBlur:()=>{eo.trim()&&(null==S||S(r.id,eo.trim())),el(""),es(!1)},placeholder:"Column name...",style:{borderColor:"var(--accent)",backgroundColor:"var(--bg-card)",color:"var(--text-primary)"},className:"jsx-bc071752c54fb059 w-full px-2 py-1 text-[11px] rounded border outline-none"})}):(0,a.jsxs)("button",{onClick:()=>es(!0),style:{color:"var(--accent)"},className:"jsx-bc071752c54fb059 w-full px-3 py-1.5 text-[11px] text-left flex items-center gap-2 hover:bg-[var(--bg-secondary)] transition-colors",children:[(0,a.jsx)("span",{className:"jsx-bc071752c54fb059 w-3 text-center",children:"+"}),(0,a.jsx)("span",{className:"jsx-bc071752c54fb059",children:"Add New Column"})]})]})]}),(0,a.jsxs)(J,{direction:"middle",iconSize:32,iconMagnification:44,iconDistance:100,children:[(0,a.jsx)(V,{children:(0,a.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,a.jsx)("button",{onClick:()=>H(!0),className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full hover:bg-[var(--bg-secondary)] transition-colors",children:(0,a.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,a.jsx)("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("polyline",{points:"14 2 14 8 20 8",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("line",{x1:"16",y1:"13",x2:"8",y2:"13",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("line",{x1:"16",y1:"17",x2:"8",y2:"17",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("polyline",{points:"10 9 9 9 8 9",className:"jsx-bc071752c54fb059"})]})}),(0,a.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Node Summary"})]})}),(0,a.jsx)(q,{orientation:"vertical",className:"h-full"}),(0,a.jsx)(V,{children:(0,a.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,a.jsx)("button",{onClick:()=>A(!U),style:{backgroundColor:U?"var(--bg-secondary)":"transparent"},className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full transition-colors",children:(0,a.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:U?"var(--accent)":"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,a.jsx)("path",{d:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("path",{d:"M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z",className:"jsx-bc071752c54fb059"})]})}),(0,a.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Notes"})]})}),(0,a.jsx)(V,{children:(0,a.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,a.jsx)("button",{onClick:()=>P(!0),className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full hover:bg-[var(--bg-secondary)] transition-colors",children:(0,a.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,a.jsx)("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("polyline",{points:"7 10 12 15 17 10",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("line",{x1:"12",y1:"15",x2:"12",y2:"3",className:"jsx-bc071752c54fb059"})]})}),(0,a.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Export"})]})}),(0,a.jsx)(V,{children:(0,a.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,a.jsx)("button",{onClick:()=>{let e=(0,D.G4)(r,s,c);navigator.clipboard.writeText(e).then(()=>{ee(!0),setTimeout(()=>ee(!1),2e3)})},style:{backgroundColor:$?"var(--bg-secondary)":"transparent"},className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full transition-colors",children:$?(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:(0,a.jsx)("polyline",{points:"20 6 9 17 4 12",className:"jsx-bc071752c54fb059"})}):(0,a.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,a.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1",className:"jsx-bc071752c54fb059"})]})}),(0,a.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:$?"Copied!":"Copy as Markdown"})]})}),(0,a.jsx)(V,{children:(0,a.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,a.jsx)("button",{onClick:()=>K(!_),style:{backgroundColor:_?"var(--bg-secondary)":"transparent"},className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full transition-colors",children:(0,a.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:_?"var(--accent)":"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,a.jsx)("rect",{x:"3",y:"3",width:"7",height:"7",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("rect",{x:"14",y:"3",width:"7",height:"7",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("rect",{x:"14",y:"14",width:"7",height:"7",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("rect",{x:"3",y:"14",width:"7",height:"7",className:"jsx-bc071752c54fb059"})]})}),(0,a.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Columns"})]})}),(0,a.jsx)(V,{children:(0,a.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,a.jsx)("button",{onClick:()=>Q(e=>!e),style:{backgroundColor:Z?"var(--bg-secondary)":"transparent"},className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full transition-colors",children:(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:Z?"var(--accent)":"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:Z?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("line",{x1:"3",y1:"18",x2:"21",y2:"18",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("polyline",{points:"7 3 3 6 7 9",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("polyline",{points:"17 15 21 18 17 21",className:"jsx-bc071752c54fb059"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("line",{x1:"3",y1:"18",x2:"21",y2:"18",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("polyline",{points:"17 3 21 6 17 9",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("polyline",{points:"7 15 3 18 7 21",className:"jsx-bc071752c54fb059"})]})})}),(0,a.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:Z?"Collapse All":"Expand All"})]})}),(0,a.jsx)(q,{orientation:"vertical",className:"h-full"}),(0,a.jsx)(V,{children:(0,a.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,a.jsx)("button",{onClick:()=>Y(!0),className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full hover:bg-[var(--bg-secondary)] transition-colors",children:(0,a.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,a.jsx)("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("polyline",{points:"17 8 12 3 7 8",className:"jsx-bc071752c54fb059"}),(0,a.jsx)("line",{x1:"12",y1:"3",x2:"12",y2:"15",className:"jsx-bc071752c54fb059"})]})}),(0,a.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Import Cases"})]})}),(0,a.jsx)(V,{children:(0,a.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,a.jsx)("button",{onClick:()=>F(!0),className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full hover:bg-[var(--bg-secondary)] transition-colors",children:(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:(0,a.jsx)("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",className:"jsx-bc071752c54fb059"})})}),(0,a.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Generate"})]})})]})]}),(0,a.jsx)(R,{open:z,onClose:()=>P(!1),node:r,testCases:s,columns:c}),(0,a.jsx)(W,{open:T,onClose:()=>F(!1),node:r,onGenerate:eh}),(0,a.jsx)(B,{open:O,onClose:()=>H(!1),node:r,testCases:s,stats:i}),(0,a.jsx)(X,{open:G,onClose:()=>Y(!1),onImport:ey,nodeLabel:r.label}),(0,a.jsx)(o(),{id:"bc071752c54fb059",children:"@-webkit-keyframes fadeInUp{from{opacity:0;-webkit-transform:translatey(8px);transform:translatey(8px)}to{opacity:1;-webkit-transform:translatey(0);transform:translatey(0)}}@-moz-keyframes fadeInUp{from{opacity:0;-moz-transform:translatey(8px);transform:translatey(8px)}to{opacity:1;-moz-transform:translatey(0);transform:translatey(0)}}@-o-keyframes fadeInUp{from{opacity:0;-o-transform:translatey(8px);transform:translatey(8px)}to{opacity:1;-o-transform:translatey(0);transform:translatey(0)}}@keyframes fadeInUp{from{opacity:0;-webkit-transform:translatey(8px);-moz-transform:translatey(8px);-o-transform:translatey(8px);transform:translatey(8px)}to{opacity:1;-webkit-transform:translatey(0);-moz-transform:translatey(0);-o-transform:translatey(0);transform:translatey(0)}}"})]}):(0,a.jsx)("div",{className:"h-full",children:(0,a.jsx)(v.u,{message:"Select a node from the mindmap to view its test cases."})})}function $(){var e,t,r,s,c,d;let x=(0,n.useParams)(),u=(0,n.useRouter)(),p=x.projectId,{projects:m,activeProject:f,activeProjectId:h,selectedNodeId:b,setSelectedNodeId:g,switchProject:j,mindmap:k,testCases:w,pushState:C,lastSaved:N,canUndo:S,canRedo:M,undo:L,redo:E,confirmDialog:D}=(0,i.Q)(),R=null!==(t=m[p])&&void 0!==t?t:null;(0,l.useEffect)(()=>{R&&h!==p&&j(p)},[p,h,R,j]),(0,l.useEffect)(()=>{g(null)},[p,g]);let I=(0,l.useMemo)(()=>{var e;return null!==(e=null==f?void 0:f.flows.find(e=>e.id===b))&&void 0!==e?e:null},[f,b]),[U,A]=(0,l.useState)("mindmap"),[z,P]=(0,l.useState)(.5),[W,T]=(0,l.useState)(!1),[B,F]=(0,l.useState)(!1),[O,X]=(0,l.useState)(!1),[H,G]=(0,l.useState)(!1),Y=(0,l.useRef)(null),_=(0,l.useRef)(null),K=(0,l.useRef)(null),J=(0,l.useRef)(null),V=(0,l.useRef)({mouseX:0,startRatio:.5}),Z=(0,l.useCallback)(e=>{e.preventDefault(),V.current={mouseX:e.clientX,startRatio:z},T(!0)},[z]);return((0,l.useEffect)(()=>{if(!W)return;let e=e=>{if(!Y.current)return;let t=Y.current.getBoundingClientRect(),r=(e.clientX-V.current.mouseX)/t.width;P(Math.max(.1,Math.min(.9,V.current.startRatio+r)))},t=()=>T(!1);return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[W]),R)?f&&f.id===p?(0,a.jsxs)("div",{className:"jsx-a894832df36b68ca h-full flex flex-col",children:[(0,a.jsxs)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},className:"jsx-a894832df36b68ca flex md:hidden border-b flex-shrink-0",children:[(0,a.jsx)("button",{onClick:()=>A("mindmap"),style:{color:"mindmap"===U?"var(--accent)":"var(--text-tertiary)",borderBottom:"mindmap"===U?"2px solid var(--accent)":"2px solid transparent"},className:"jsx-a894832df36b68ca flex-1 px-4 py-2 text-xs font-medium transition-colors",children:"Mindmap"}),(0,a.jsx)("button",{onClick:()=>A("testcases"),style:{color:"testcases"===U?"var(--accent)":"var(--text-tertiary)",borderBottom:"testcases"===U?"2px solid var(--accent)":"2px solid transparent"},className:"jsx-a894832df36b68ca flex-1 px-4 py-2 text-xs font-medium transition-colors",children:"Test Cases"})]}),(0,a.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-a894832df36b68ca flex items-center justify-between px-4 py-1.5 border-b flex-shrink-0",children:[(0,a.jsx)("div",{style:{color:"var(--text-tertiary)"},className:"jsx-a894832df36b68ca text-[10px]",children:N?(0,a.jsxs)("span",{className:"jsx-a894832df36b68ca",children:["Last saved ",function(e){let t=new Date(e),r=Math.floor((new Date().getTime()-t.getTime())/1e3),a=Math.floor(r/60),s=Math.floor(a/60);return r<10?"just now":r<60?"".concat(r,"s ago"):a<60?"".concat(a,"m ago"):s<24?"".concat(s,"h ago"):t.toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}(N)]}):(0,a.jsx)("span",{className:"jsx-a894832df36b68ca",children:"Not saved yet"})}),(0,a.jsxs)("div",{className:"jsx-a894832df36b68ca flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:()=>X(e=>!e),style:{color:"var(--text-tertiary)"},title:O?"Exit fullscreen":"Expand test cases",className:"jsx-a894832df36b68ca p-1 rounded transition-colors hover:bg-[var(--bg-secondary)]",children:O?(0,a.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-a894832df36b68ca",children:(0,a.jsx)("path",{d:"M8 3v3a2 2 0 01-2 2H3m18 0h-3a2 2 0 01-2-2V3m0 18v-3a2 2 0 012-2h3M3 16h3a2 2 0 012 2v3",className:"jsx-a894832df36b68ca"})}):(0,a.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-a894832df36b68ca",children:(0,a.jsx)("path",{d:"M8 3H5a2 2 0 00-2 2v3m18 0V5a2 2 0 00-2-2h-3m0 18h3a2 2 0 002-2v-3M3 16v3a2 2 0 002 2h3",className:"jsx-a894832df36b68ca"})})}),(0,a.jsx)("button",{onClick:()=>u.push("/projects/".concat(p,"/summary")),style:{borderColor:"var(--border)",color:"var(--text-secondary)"},className:"jsx-a894832df36b68ca hidden md:block px-3 py-1 text-xs font-medium rounded-md border transition-colors hover:bg-[var(--bg-secondary)]",children:"Project Report"}),(0,a.jsx)("button",{onClick:()=>{G(!0),setTimeout(()=>G(!1),1500);let e=new Event("save-project");window.dispatchEvent(e)},style:{borderColor:H?"var(--status-pass-text)":"var(--border)",color:H?"var(--status-pass-text)":"var(--text-secondary)",backgroundColor:H?"var(--status-pass-bg)":"transparent"},className:"jsx-a894832df36b68ca px-3 py-1 text-xs font-medium rounded-md border transition-all",children:H?"Saved!":"Save"})]})]}),(0,a.jsxs)("div",{ref:Y,style:{cursor:W?"col-resize":void 0},className:"jsx-a894832df36b68ca flex-1 flex min-h-0 relative",children:[!O&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{ref:_,style:{width:"".concat(100*z,"%")},className:"jsx-a894832df36b68ca "+"\n ".concat("mindmap"===U?"flex":"hidden","\n md:flex flex-col min-w-0 mobile-full-width\n "),children:(0,a.jsx)(y,{nodes:k.nodes,edges:k.edges,testCases:null!==(r=f.testCases)&&void 0!==r?r:{},selectedNodeId:b,onSelect:k.selectNode,onAddNode:(e,t,r,a)=>{C("Add node"),k.addNode(e,t,r,a)},onDeleteNode:e=>{C("Delete node"),k.deleteNode(e)},onDeleteNodes:e=>{C("Delete nodes"),k.deleteNodes(e)},onUnlinkNode:e=>{C("Unlink node"),k.unlinkNode(e)},onRenameNode:(e,t)=>{C("Rename node"),k.renameNode(e,t)},onUpdateNode:(e,t)=>{C("Update node"),k.updateNode(e,t)},onAddEdge:(e,t,r)=>{C("Add edge"),k.addEdge(e,t,r)},onDeleteEdge:e=>{C("Delete edge"),k.deleteEdge(e)},onUpdateEdge:(e,t)=>{C("Update edge"),k.updateEdge(e,t)},onResetLayout:()=>{C("Reset layout"),k.resetLayout()},canUndo:S,canRedo:M,onUndo:L,onRedo:E})}),(0,a.jsxs)("div",{ref:J,style:{width:20,cursor:"col-resize"},onMouseDown:Z,onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1),className:"jsx-a894832df36b68ca hidden md:flex items-center justify-center flex-shrink-0 select-none relative group",children:[(0,a.jsx)("div",{style:{backgroundColor:B||W?"var(--bg-secondary)":"transparent"},className:"jsx-a894832df36b68ca absolute inset-y-0 -left-2 -right-2 transition-colors duration-150"}),(0,a.jsx)("div",{style:{backgroundColor:"var(--border)",opacity:B||W?0:1},className:"jsx-a894832df36b68ca absolute inset-y-0 left-1/2 -translate-x-1/2 w-[1px] transition-opacity duration-150"}),(0,a.jsx)("div",{style:{background:"linear-gradient(180deg, #9E7AFF 0%, #FE8BBB 50%, #9E7AFF 100%)",opacity:B||W?.8:.4,animation:"beamFlow 3s ease-in-out infinite",backgroundSize:"100% 200%"},className:"jsx-a894832df36b68ca absolute inset-y-0 left-1/2 -translate-x-1/2 w-[2px] transition-opacity duration-150"}),(0,a.jsxs)("div",{className:"jsx-a894832df36b68ca relative z-10 flex flex-col gap-1.5",children:[(0,a.jsx)("div",{style:{backgroundColor:B||W?"var(--text-secondary)":"var(--text-tertiary)"},className:"jsx-a894832df36b68ca w-1.5 h-1.5 rounded-full transition-colors duration-150"}),(0,a.jsx)("div",{style:{backgroundColor:B||W?"var(--text-secondary)":"var(--text-tertiary)"},className:"jsx-a894832df36b68ca w-1.5 h-1.5 rounded-full transition-colors duration-150"}),(0,a.jsx)("div",{style:{backgroundColor:B||W?"var(--text-secondary)":"var(--text-tertiary)"},className:"jsx-a894832df36b68ca w-1.5 h-1.5 rounded-full transition-colors duration-150"})]})]})]}),(0,a.jsx)("div",{ref:K,style:{width:O?"100%":"".concat((1-z)*100,"%")},className:"jsx-a894832df36b68ca "+"\n ".concat("testcases"===U?"flex":"hidden","\n md:flex flex-col min-w-0 mobile-full-width\n "),children:(0,a.jsx)(Q,{selectedNode:I,testCases:w.testCases,stats:w.stats,columns:b?null!==(c=null!==(s=null===(e=f.columnConfigs)||void 0===e?void 0:e[b])&&void 0!==s?s:f.columnConfig)&&void 0!==c?c:[]:null!==(d=f.columnConfig)&&void 0!==d?d:[],projectId:p,fullscreen:O,onAddTestCase:w.addTestCase,onUpdateTestCase:w.updateTestCase,onDeleteTestCase:w.deleteTestCase,onBulkDelete:w.bulkDeleteTestCases,onBulkUpdate:w.bulkUpdateTestCases,onReorderTestCases:w.reorderTestCases,onToggleColumn:w.toggleColumnVisibility,onRenameColumn:w.updateColumnConfig,onUpdateNode:k.updateNode,onAddColumn:w.addColumn,onDeleteColumn:w.deleteColumn,onReorderColumn:w.reorderColumn,confirmDialog:D})})]}),(0,a.jsx)(o(),{id:"a894832df36b68ca",children:"@media(max-width:767px){.mobile-full-width.jsx-a894832df36b68ca{width:100%!important}}"})]}):(0,a.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,a.jsx)("div",{className:"text-sm",style:{color:"var(--text-tertiary)"},children:"Loading project..."})}):(0,a.jsx)(v.u,{message:"Project not found.",action:{label:"Back to Projects",onClick:()=>u.push("/projects")}})}},740:function(e,t,r){"use strict";r.d(t,{u:function(){return s}});var a=r(7437);function s(e){let{message:t,action:r}=e;return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center h-full gap-4 px-6 text-center",children:[(0,a.jsx)("img",{src:"https://static.vecteezy.com/system/resources/thumbnails/067/162/149/small/cute-duck-meme-sticker-transparent-cute-illustration-free-png.png",alt:"",className:"w-28 h-28 object-contain select-none opacity-15",draggable:!1}),(0,a.jsx)("p",{className:"text-sm max-w-[280px]",style:{color:"var(--text-tertiary)"},children:t}),r&&(0,a.jsx)("button",{onClick:r.onClick,className:"px-4 py-2 text-sm font-medium rounded-md transition-opacity hover:opacity-80",style:{backgroundColor:"var(--accent)",color:"var(--bg-primary)",borderRadius:"var(--radius-pill)"},children:r.label})]})}},8028:function(e,t,r){"use strict";r.d(t,{p:function(){return d}});var a=r(2265),s=r(9034);let o="qa-llm-config",l={apiKey:"",baseURL:"",defaultModel:"",secondaryModel:"",models:[],connected:!1};function n(){let e={};for(let t of s.MA)e[t.id]={...l,baseURL:t.baseURL||""};return{activeProvider:null,providers:e}}function i(){try{let t=localStorage.getItem(o);if(!t)return n();let r=JSON.parse(t);if(r.provider&&r.apiKey&&!r.providers){let e=n();return{...e,activeProvider:null,providers:{...e.providers,google:{...l,apiKey:r.apiKey,connected:!0}}}}let a=n(),i={...a,...r,providers:{...a.providers}};for(let t of s.MA){var e;let a=null===(e=r.providers)||void 0===e?void 0:e[t.id];i.providers[t.id]={...l,baseURL:t.baseURL||"",...a}}return i}catch(e){return n()}}function c(e){try{localStorage.setItem(o,JSON.stringify(e))}catch(e){}}function d(){let[e,t]=(0,a.useState)(n),[r,s]=(0,a.useState)(!1);(0,a.useEffect)(()=>{t(i()),s(!0)},[]);let o=(0,a.useCallback)((e,r)=>{let a=i(),s={...a,providers:{...a.providers,[e]:{...a.providers[e],...r}}};c(s),t(s)},[]),l=(0,a.useCallback)(e=>{let r={...i(),activeProvider:e};c(r),t(r)},[]),d=e.activeProvider?e.providers[e.activeProvider]:null,x=r&&!!d&&d.apiKey.length>0&&d.connected;return{config:e,loaded:r,isConnected:x,activeProvider:d,activeProviderId:e.activeProvider,updateProvider:o,setActiveProvider:l}}},8014:function(e,t,r){"use strict";r.d(t,{EZ:function(){return S},FU:function(){return w},G4:function(){return i},KG:function(){return d},SI:function(){return y},bb:function(){return x},cc:function(){return N},iU:function(){return u},uJ:function(){return p}});var a=r(6481),s=r(7853),o=r.n(s);let l={untested:"⬜ Untested",pass:"✅ Pass",fail:"❌ Fail",skip:"⏭ Skip"},n=e=>e.replace(/\n/g,"<br>").replace(/\|/g,"\\|");function i(e,t,r){let s=(r.length>0?r:a.vJ).filter(e=>e.visible),o=s.map(e=>e.label).join(" | "),i=s.map(()=>"---").join(" | "),c="# ".concat(e.code?e.code+" — ":"").concat(e.label,"\n\n");c+="| # | ".concat(o," |\n")+"|---|".concat(i,"|\n"),t.forEach((e,t)=>{let r=s.map(t=>"status"===t.key?l[e.status]:n(e[t.key]||""));c+="| ".concat(t+1," | ").concat(r.join(" | ")," |\n")});let d=t.length,x=t.filter(e=>"skip"===e.status).length,u=t.filter(e=>"pass"===e.status).length;return c+="\n**Pass rate: ".concat(u,"/").concat(d-x," (").concat(d-x>0?Math.round(u/(d-x)*100):0,"%)**\n")}function c(e,t,r){let a=new Blob([e],{type:r}),s=URL.createObjectURL(a),o=document.createElement("a");o.href=s,o.download=t,o.click(),URL.revokeObjectURL(s)}function d(e){c(function(e){let t="# ".concat(e.name,"\n\n");for(let x of e.flows){var r,s,o,i,c,d;let u=e.testCases[x.id];if(!u||0===u.length)continue;let p=((null!==(i=null!==(o=null===(r=e.columnConfigs)||void 0===r?void 0:r[x.id])&&void 0!==o?o:e.columnConfig)&&void 0!==i?i:[]).length>0?null!==(d=null!==(c=null===(s=e.columnConfigs)||void 0===s?void 0:s[x.id])&&void 0!==c?c:e.columnConfig)&&void 0!==d?d:[]:a.vJ).filter(e=>e.visible),m=p.map(e=>e.label).join(" | "),f=p.map(()=>"---").join(" | ");t+="## ".concat(x.code?x.code+" — ":"").concat(x.label,"\n\n")+"| # | ".concat(m," |\n")+"|---|".concat(f,"|\n"),u.forEach((e,r)=>{let a=p.map(t=>"status"===t.key?l[e.status]:n(e[t.key]||""));t+="| ".concat(r+1," | ").concat(a.join(" | ")," |\n")});let h=u.length,y=u.filter(e=>"skip"===e.status).length,b=u.filter(e=>"pass"===e.status).length,v=h-y>0?Math.round(b/(h-y)*100):0;t+="\n**Pass rate: ".concat(b,"/").concat(h-y," (").concat(v,"%)**\n\n---\n\n")}return t}(e),"".concat(e.name,".md"),"text/markdown")}function x(e){c(JSON.stringify(e,null,2),"".concat(e.name,".json"),"application/json")}function u(e,t,r){let a=(e.code||e.label).replace(/[^a-zA-Z0-9_-]/g,"_");c(i(e,t,r),"".concat(a,".md"),"text/markdown")}function p(e,t){let r=(e.code||e.label).replace(/[^a-zA-Z0-9_-]/g,"_");c(JSON.stringify({node:e,testCases:t},null,2),"".concat(r,".json"),"application/json")}function m(e,t){let r=e&&e.length>0?e:t;return r.length>0?r:a.vJ}function f(e,t){return t.map(t=>"status"===t.key?l[e.status]:e[t.key]||"")}function h(e){return e.includes(",")||e.includes('"')||e.includes("\n")?'"'.concat(e.replace(/"/g,'""'),'"'):e}function y(e,t,r){let s=(e.code||e.label).replace(/[^a-zA-Z0-9_-]/g,"_");c(function(e,t,r){let s=m(r,a.vJ).filter(e=>e.visible);return[["#",...s.map(e=>h(e.label))].join(","),...t.map((e,t)=>[String(t+1),...f(e,s).map(h)].join(","))].join("\n")}(0,t,r),"".concat(s,".csv"),"text/csv")}function b(e,t){var r,s,o;let l=null!==(o=null!==(s=null===(r=e.columnConfigs)||void 0===r?void 0:r[t])&&void 0!==s?s:e.columnConfig)&&void 0!==o?o:[];return l.length>0?l:a.vJ}function v(e){e.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFdbd8d3"}},e.font={name:"Inter",bold:!0,size:11},e.border={top:{style:"thin"},bottom:{style:"thin"},left:{style:"thin"},right:{style:"thin"}},e.alignment={vertical:"middle",horizontal:"left",wrapText:!0}}function g(e){e.border={top:{style:"thin"},bottom:{style:"thin"},left:{style:"thin"},right:{style:"thin"}},e.font={name:"Inter",size:11},e.alignment={vertical:"middle",horizontal:"left",wrapText:!0}}function j(e,t,r,a,s){let o=e.addWorksheet(t);return o.columns=[{header:"#",key:"row",width:6},...s.map(e=>({header:e.label,key:e.key,width:Math.max(e.label.length+4,18)}))],o.getRow(1).eachCell(v),a.forEach((e,t)=>{let r={row:t+1};s.forEach(t=>{"status"===t.key?r[t.key]=l[e.status]:r[t.key]=e[t.key]||""}),o.addRow(r).eachCell(g)}),o}async function k(e,t,r){let s=m(r,a.vJ).filter(e=>e.visible),l=new(o()).Workbook;return l.creator="Ayu Management Tools",j(l,e.label,e.label,t,s),new Blob([await l.xlsx.writeBuffer()],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})}async function w(e,t,r){let a=(e.code||e.label).replace(/[^a-zA-Z0-9_-]/g,"_"),s=await k(e,t,r),o=URL.createObjectURL(s),l=document.createElement("a");l.href=o,l.download="".concat(a,".xlsx"),l.click(),URL.revokeObjectURL(o)}async function C(e){let t=new(o()).Workbook;for(let r of(t.creator="Ayu Management Tools",e.flows)){let a=e.testCases[r.id];if(!a||0===a.length)continue;let s=b(e,r.id).filter(e=>e.visible);j(t,(r.code||r.label).substring(0,31).replace(/[\\/*?[\]]/g,"_"),r.label,a,s)}return new Blob([await t.xlsx.writeBuffer()],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})}async function N(e){let t=await C(e),r=URL.createObjectURL(t),a=document.createElement("a");a.href=r,a.download="".concat(e.name,".xlsx"),a.click(),URL.revokeObjectURL(r)}function S(e){c(function(e){let t="";for(let r of e.flows){let a=e.testCases[r.id];if(!a||0===a.length)continue;let s=b(e,r.id).filter(e=>e.visible);t+="# ".concat(r.code?r.code+" — ":"").concat(r.label,"\n")+(["#",...s.map(e=>h(e.label))].join(",")+"\n"),a.forEach((e,r)=>{let a=[String(r+1),...f(e,s).map(h)];t+=a.join(",")+"\n"}),t+="\n"}return t}(e),"".concat(e.name,".csv"),"text/csv")}},9034:function(e,t,r){"use strict";r.d(t,{MA:function(){return a}});let a=Object.values({openai:{id:"openai",name:"OpenAI",type:"native",description:"GPT models powering ChatGPT. Industry-leading language understanding.",logoUrl:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/openai.svg",keyUrl:"https://platform.openai.com/api-keys",keyPlaceholder:"sk-...",color:"#10A37F",sdkProvider:"openai",defaultModel:"gpt-4o-mini",popularModels:["gpt-4o","gpt-4o-mini","gpt-4-turbo","gpt-3.5-turbo"]},google:{id:"google",name:"Google Gemini",type:"native",description:"Google's multimodal AI with strong reasoning capabilities.",logoUrl:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/googlegemini.svg",keyUrl:"https://aistudio.google.com/apikey",keyPlaceholder:"AIza...",color:"#4285F4",sdkProvider:"google",defaultModel:"gemini-2.5-flash",popularModels:["gemini-2.5-flash","gemini-2.5-pro","gemini-2.0-flash"]},anthropic:{id:"anthropic",name:"Anthropic",type:"native",description:"Claude models — safe, steerable, and highly capable.",logoUrl:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/anthropic.svg",keyUrl:"https://console.anthropic.com/settings/keys",keyPlaceholder:"sk-ant-...",color:"#D97706",sdkProvider:"anthropic",defaultModel:"claude-sonnet-4-20250514",popularModels:["claude-sonnet-4-20250514","claude-haiku-4-20250514","claude-3-5-sonnet-20241022"]},deepseek:{id:"deepseek",name:"DeepSeek",type:"openai-compatible",description:"High-performance open-source models with competitive reasoning.",logoUrl:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/deepseek.svg",keyUrl:"https://platform.deepseek.com/api_keys",keyPlaceholder:"sk-...",color:"#4D6BFE",sdkProvider:"openai",baseURL:"https://api.deepseek.com/v1",defaultModel:"deepseek-chat",popularModels:["deepseek-chat","deepseek-reasoner"]},xiaomi:{id:"xiaomi",name:"Xiaomi (MiMo)",type:"openai-compatible",description:"Xiaomi's MiMo models — OpenAI-compatible API.",logoUrl:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/xiaomi.svg",keyUrl:"https://platform.xiaomimimo.com/",keyPlaceholder:"tp-...",color:"#FF6900",sdkProvider:"openai",baseURL:"https://token-plan-sgp.xiaomimimo.com/v1",defaultModel:"mimo-v2.5",popularModels:["mimo-v2.5","mimo-v2.5-pro"]},openrouter:{id:"openrouter",name:"OpenRouter",type:"openai-compatible",description:"Unified gateway to 200+ models — Claude, Llama, Mistral, Gemini, and more.",logoUrl:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/openrouter.svg",keyUrl:"https://openrouter.ai/keys",keyPlaceholder:"sk-or-...",color:"#6366F1",sdkProvider:"openai",baseURL:"https://openrouter.ai/api/v1",defaultModel:"openrouter/free",popularModels:["openrouter/free","meta-llama/llama-4-maverick:free","google/gemini-2.5-flash:free","deepseek/deepseek-chat-v3-0324:free","mistralai/mistral-small-3.2-24b:free","qwen/qwen3-235b-a22b:free","microsoft/phi-4-reasoning-plus:free"]},custom:{id:"custom",name:"Custom (OpenAI-compatible)",type:"openai-compatible",description:"Any OpenAI-compatible API — Ollama, LM Studio, vLLM, LiteLLM, etc.",logoUrl:"",keyUrl:"",keyPlaceholder:"sk-... or any key",color:"#6B7280",sdkProvider:"openai",defaultModel:"",popularModels:[],requiresBaseURL:!0}})},3448:function(e,t,r){"use strict";r.d(t,{cn:function(){return o}});var a=r(1994),s=r(3335);function o(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,s.m6)((0,a.W)(t))}}},function(e){e.O(0,[113,137,485,80,490,575,971,117,744],function(){return e(e.s=2142)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[993],{1172:function(e,t,r){Promise.resolve().then(r.bind(r,8715))},9376:function(e,t,r){"use strict";var s=r(5475);r.o(s,"useParams")&&r.d(t,{useParams:function(){return s.useParams}}),r.o(s,"usePathname")&&r.d(t,{usePathname:function(){return s.usePathname}}),r.o(s,"useRouter")&&r.d(t,{useRouter:function(){return s.useRouter}})},8715:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return i}});var s=r(7437),l=r(2265),a=r(9376),n=r(7648),o=r(2575),c=r(8014);function i(){var e,t,r;let c=(0,a.useParams)().projectId,{projects:i}=(0,o.Q)(),x=i[c],[m,f]=(0,l.useState)(!1);if(!x)return(0,s.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,s.jsx)("p",{style:{color:"var(--text-tertiary)"},children:"Project not found."})});let h=Object.values(x.testCases).flat(),p=x.flows.length,v=h.length,y=(null!==(e=x.edges)&&void 0!==e?e:[]).length,b=h.filter(e=>"pass"===e.status).length,j=h.filter(e=>"fail"===e.status).length,g=h.filter(e=>"skip"===e.status).length,k=h.filter(e=>"untested"===e.status).length,N=v-g,w=N>0?Math.round(b/N*100):0,C=x.flows.map(e=>{var t;let r=null!==(t=x.testCases[e.id])&&void 0!==t?t:[],s=r.filter(e=>"pass"===e.status).length,l=r.filter(e=>"fail"===e.status).length,a=r.filter(e=>"skip"===e.status).length,n=r.length,o=n-a;return{node:e,total:n,pass:s,fail:l,skip:a,rate:o>0?Math.round(s/o*100):0}});return(0,s.jsxs)("div",{className:"h-full overflow-auto",children:[(0,s.jsxs)("div",{className:"px-5 py-4 border-b flex items-center gap-3",style:{borderColor:"var(--border)"},children:[(0,s.jsx)(n.default,{href:"/projects/".concat(c),className:"text-xs px-2 py-1 rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"← Back"}),(0,s.jsxs)("h2",{className:"text-base font-medium flex-1",style:{color:"var(--text-primary)"},children:[x.name," — Summary"]}),(0,s.jsx)("button",{onClick:()=>f(!0),className:"px-3 py-1.5 text-xs font-medium rounded-md border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Export"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3 p-5",children:[(0,s.jsx)(d,{label:"Flow Nodes",value:p}),(0,s.jsx)(d,{label:"Test Cases",value:v}),(0,s.jsx)(d,{label:"Pass Rate",value:"".concat(w,"%"),color:"var(--status-pass-text)"}),(0,s.jsx)(d,{label:"Conditional Edges",value:y})]}),(0,s.jsxs)("div",{className:"px-5 pb-4",children:[(0,s.jsx)("h3",{className:"text-xs font-medium uppercase tracking-wider mb-3",style:{color:"var(--text-tertiary)"},children:"Status Breakdown"}),(0,s.jsxs)("div",{className:"flex gap-4 text-sm",style:{color:"var(--text-secondary)"},children:[(0,s.jsxs)("span",{children:["Pass: ",(0,s.jsx)("strong",{style:{color:"var(--status-pass-text)"},children:b})]}),(0,s.jsxs)("span",{children:["Fail: ",(0,s.jsx)("strong",{style:{color:"var(--status-fail-text)"},children:j})]}),(0,s.jsxs)("span",{children:["Skip: ",(0,s.jsx)("strong",{style:{color:"var(--status-skip-text)"},children:g})]}),(0,s.jsxs)("span",{children:["Untested: ",(0,s.jsx)("strong",{style:{color:"var(--status-untested-text)"},children:k})]})]})]}),(0,s.jsxs)("div",{className:"px-5 pb-4",children:[(0,s.jsx)("h3",{className:"text-xs font-medium uppercase tracking-wider mb-3",style:{color:"var(--text-tertiary)"},children:"Per-Node Breakdown"}),(0,s.jsxs)("table",{className:"w-full text-sm",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"text-left py-1.5 text-xs font-medium",style:{color:"var(--text-tertiary)"},children:"Code"}),(0,s.jsx)("th",{className:"text-left py-1.5 text-xs font-medium",style:{color:"var(--text-tertiary)"},children:"Node"}),(0,s.jsx)("th",{className:"text-right py-1.5 text-xs font-medium",style:{color:"var(--text-tertiary)"},children:"Cases"}),(0,s.jsx)("th",{className:"text-right py-1.5 text-xs font-medium",style:{color:"var(--text-tertiary)"},children:"Rate"}),(0,s.jsx)("th",{className:"py-1.5 w-24 text-xs font-medium",style:{color:"var(--text-tertiary)"}})]})}),(0,s.jsx)("tbody",{children:C.map(e=>{let{node:t,total:r,rate:l}=e;return(0,s.jsxs)("tr",{className:"border-t",style:{borderColor:"var(--border)"},children:[(0,s.jsx)("td",{className:"py-2 font-mono text-xs",style:{color:"var(--text-tertiary)"},children:t.code||"—"}),(0,s.jsx)("td",{className:"py-2",style:{color:"var(--text-primary)"},children:t.label}),(0,s.jsx)("td",{className:"py-2 text-right",style:{color:"var(--text-secondary)"},children:r}),(0,s.jsx)("td",{className:"py-2 text-right",style:{color:l>=80?"var(--status-pass-text)":l>=50?"var(--status-skip-text)":"var(--status-fail-text)"},children:r>0?"".concat(l,"%"):"—"}),(0,s.jsx)("td",{className:"py-2",children:r>0&&(0,s.jsx)("div",{className:"h-2 w-full rounded-full overflow-hidden",style:{backgroundColor:"var(--bg-secondary)"},children:(0,s.jsx)("div",{className:"h-full rounded-full",style:{width:"".concat(l,"%"),backgroundColor:l>=80?"var(--status-pass-text)":l>=50?"var(--status-skip-text)":"var(--status-fail-text)"}})})})]},t.id)})})]})]}),(null!==(t=x.edges)&&void 0!==t?t:[]).length>0&&(0,s.jsxs)("div",{className:"px-5 pb-4",children:[(0,s.jsx)("h3",{className:"text-xs font-medium uppercase tracking-wider mb-3",style:{color:"var(--text-tertiary)"},children:"Conditional Edges"}),(0,s.jsx)("div",{className:"flex flex-col gap-2",children:(null!==(r=x.edges)&&void 0!==r?r:[]).map(e=>{var t,r;let l=x.flows.find(t=>t.id===e.fromId),a=x.flows.find(t=>t.id===e.toId);return(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs",style:{color:"var(--text-secondary)"},children:[(0,s.jsx)("span",{style:{color:"var(--text-primary)"},children:null!==(t=null==l?void 0:l.label)&&void 0!==t?t:"?"}),(0,s.jsx)("span",{style:{color:"pass"===e.type?"var(--status-pass-text)":"var(--status-fail-text)"},children:"pass"===e.type?"→ ✓ Pass →":"→ ✗ Fail →"}),(0,s.jsx)("span",{style:{color:"var(--text-primary)"},children:null!==(r=null==a?void 0:a.label)&&void 0!==r?r:"?"})]},e.id)})})]}),(0,s.jsx)(u,{open:m,onClose:()=>f(!1),project:x})]})}function d(e){let{label:t,value:r,color:l}=e;return(0,s.jsxs)("div",{className:"p-3 rounded-md border",style:{borderColor:"var(--border)",borderRadius:"var(--radius-md)"},children:[(0,s.jsx)("div",{className:"text-xs mb-1",style:{color:"var(--text-tertiary)"},children:t}),(0,s.jsx)("div",{className:"text-lg font-medium",style:{color:null!=l?l:"var(--text-primary)"},children:r})]})}function u(e){let{open:t,onClose:r,project:l}=e;return t?(0,s.jsx)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:r,children:(0,s.jsxs)("div",{className:"w-full max-w-sm mx-4 rounded-xl p-5",style:{backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)",borderRadius:"var(--radius-lg)"},onClick:e=>e.stopPropagation(),children:[(0,s.jsx)("h3",{className:"text-sm font-semibold mb-1",style:{color:"var(--text-primary)"},children:"Export Project"}),(0,s.jsxs)("p",{className:"text-xs mb-4",style:{color:"var(--text-tertiary)"},children:["Export “",l.name,"” as:"]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("button",{onClick:()=>{(0,c.KG)(l),r()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,s.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"Markdown (.md)"}),(0,s.jsx)("br",{}),(0,s.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Formatted tables for documentation"})]}),(0,s.jsxs)("button",{onClick:()=>{(0,c.bb)(l),r()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,s.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"JSON (.json)"}),(0,s.jsx)("br",{}),(0,s.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Full data backup"})]}),(0,s.jsxs)("button",{onClick:()=>{(0,c.EZ)(l),r()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,s.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"CSV (.csv)"}),(0,s.jsx)("br",{}),(0,s.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Spreadsheet-compatible format"})]}),(0,s.jsxs)("button",{onClick:async()=>{await (0,c.cc)(l),r()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,s.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"Excel (.xlsx)"}),(0,s.jsx)("br",{}),(0,s.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Styled spreadsheet for reporting"})]})]}),(0,s.jsx)("button",{onClick:r,className:"w-full mt-3 px-3 py-2 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"})]})}):null}},8014:function(e,t,r){"use strict";r.d(t,{EZ:function(){return R},FU:function(){return N},G4:function(){return c},KG:function(){return d},SI:function(){return v},bb:function(){return u},cc:function(){return C},iU:function(){return x},uJ:function(){return m}});var s=r(6481),l=r(7853),a=r.n(l);let n={untested:"⬜ Untested",pass:"✅ Pass",fail:"❌ Fail",skip:"⏭ Skip"},o=e=>e.replace(/\n/g,"<br>").replace(/\|/g,"\\|");function c(e,t,r){let l=(r.length>0?r:s.vJ).filter(e=>e.visible),a=l.map(e=>e.label).join(" | "),c=l.map(()=>"---").join(" | "),i="# ".concat(e.code?e.code+" — ":"").concat(e.label,"\n\n");i+="| # | ".concat(a," |\n")+"|---|".concat(c,"|\n"),t.forEach((e,t)=>{let r=l.map(t=>"status"===t.key?n[e.status]:o(e[t.key]||""));i+="| ".concat(t+1," | ").concat(r.join(" | ")," |\n")});let d=t.length,u=t.filter(e=>"skip"===e.status).length,x=t.filter(e=>"pass"===e.status).length;return i+="\n**Pass rate: ".concat(x,"/").concat(d-u," (").concat(d-u>0?Math.round(x/(d-u)*100):0,"%)**\n")}function i(e,t,r){let s=new Blob([e],{type:r}),l=URL.createObjectURL(s),a=document.createElement("a");a.href=l,a.download=t,a.click(),URL.revokeObjectURL(l)}function d(e){i(function(e){let t="# ".concat(e.name,"\n\n");for(let u of e.flows){var r,l,a,c,i,d;let x=e.testCases[u.id];if(!x||0===x.length)continue;let m=((null!==(c=null!==(a=null===(r=e.columnConfigs)||void 0===r?void 0:r[u.id])&&void 0!==a?a:e.columnConfig)&&void 0!==c?c:[]).length>0?null!==(d=null!==(i=null===(l=e.columnConfigs)||void 0===l?void 0:l[u.id])&&void 0!==i?i:e.columnConfig)&&void 0!==d?d:[]:s.vJ).filter(e=>e.visible),f=m.map(e=>e.label).join(" | "),h=m.map(()=>"---").join(" | ");t+="## ".concat(u.code?u.code+" — ":"").concat(u.label,"\n\n")+"| # | ".concat(f," |\n")+"|---|".concat(h,"|\n"),x.forEach((e,r)=>{let s=m.map(t=>"status"===t.key?n[e.status]:o(e[t.key]||""));t+="| ".concat(r+1," | ").concat(s.join(" | ")," |\n")});let p=x.length,v=x.filter(e=>"skip"===e.status).length,y=x.filter(e=>"pass"===e.status).length,b=p-v>0?Math.round(y/(p-v)*100):0;t+="\n**Pass rate: ".concat(y,"/").concat(p-v," (").concat(b,"%)**\n\n---\n\n")}return t}(e),"".concat(e.name,".md"),"text/markdown")}function u(e){i(JSON.stringify(e,null,2),"".concat(e.name,".json"),"application/json")}function x(e,t,r){let s=(e.code||e.label).replace(/[^a-zA-Z0-9_-]/g,"_");i(c(e,t,r),"".concat(s,".md"),"text/markdown")}function m(e,t){let r=(e.code||e.label).replace(/[^a-zA-Z0-9_-]/g,"_");i(JSON.stringify({node:e,testCases:t},null,2),"".concat(r,".json"),"application/json")}function f(e,t){let r=e&&e.length>0?e:t;return r.length>0?r:s.vJ}function h(e,t){return t.map(t=>"status"===t.key?n[e.status]:e[t.key]||"")}function p(e){return e.includes(",")||e.includes('"')||e.includes("\n")?'"'.concat(e.replace(/"/g,'""'),'"'):e}function v(e,t,r){let l=(e.code||e.label).replace(/[^a-zA-Z0-9_-]/g,"_");i(function(e,t,r){let l=f(r,s.vJ).filter(e=>e.visible);return[["#",...l.map(e=>p(e.label))].join(","),...t.map((e,t)=>[String(t+1),...h(e,l).map(p)].join(","))].join("\n")}(0,t,r),"".concat(l,".csv"),"text/csv")}function y(e,t){var r,l,a;let n=null!==(a=null!==(l=null===(r=e.columnConfigs)||void 0===r?void 0:r[t])&&void 0!==l?l:e.columnConfig)&&void 0!==a?a:[];return n.length>0?n:s.vJ}function b(e){e.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFdbd8d3"}},e.font={name:"Inter",bold:!0,size:11},e.border={top:{style:"thin"},bottom:{style:"thin"},left:{style:"thin"},right:{style:"thin"}},e.alignment={vertical:"middle",horizontal:"left",wrapText:!0}}function j(e){e.border={top:{style:"thin"},bottom:{style:"thin"},left:{style:"thin"},right:{style:"thin"}},e.font={name:"Inter",size:11},e.alignment={vertical:"middle",horizontal:"left",wrapText:!0}}function g(e,t,r,s,l){let a=e.addWorksheet(t);return a.columns=[{header:"#",key:"row",width:6},...l.map(e=>({header:e.label,key:e.key,width:Math.max(e.label.length+4,18)}))],a.getRow(1).eachCell(b),s.forEach((e,t)=>{let r={row:t+1};l.forEach(t=>{"status"===t.key?r[t.key]=n[e.status]:r[t.key]=e[t.key]||""}),a.addRow(r).eachCell(j)}),a}async function k(e,t,r){let l=f(r,s.vJ).filter(e=>e.visible),n=new(a()).Workbook;return n.creator="Ayu Management Tools",g(n,e.label,e.label,t,l),new Blob([await n.xlsx.writeBuffer()],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})}async function N(e,t,r){let s=(e.code||e.label).replace(/[^a-zA-Z0-9_-]/g,"_"),l=await k(e,t,r),a=URL.createObjectURL(l),n=document.createElement("a");n.href=a,n.download="".concat(s,".xlsx"),n.click(),URL.revokeObjectURL(a)}async function w(e){let t=new(a()).Workbook;for(let r of(t.creator="Ayu Management Tools",e.flows)){let s=e.testCases[r.id];if(!s||0===s.length)continue;let l=y(e,r.id).filter(e=>e.visible);g(t,(r.code||r.label).substring(0,31).replace(/[\\/*?[\]]/g,"_"),r.label,s,l)}return new Blob([await t.xlsx.writeBuffer()],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})}async function C(e){let t=await w(e),r=URL.createObjectURL(t),s=document.createElement("a");s.href=r,s.download="".concat(e.name,".xlsx"),s.click(),URL.revokeObjectURL(r)}function R(e){i(function(e){let t="";for(let r of e.flows){let s=e.testCases[r.id];if(!s||0===s.length)continue;let l=y(e,r.id).filter(e=>e.visible);t+="# ".concat(r.code?r.code+" — ":"").concat(r.label,"\n")+(["#",...l.map(e=>p(e.label))].join(",")+"\n"),s.forEach((e,r)=>{let s=[String(r+1),...h(e,l).map(p)];t+=s.join(",")+"\n"}),t+="\n"}return t}(e),"".concat(e.name,".csv"),"text/csv")}}},function(e){e.O(0,[113,648,575,971,117,744],function(){return e(e.s=1172)}),_N_E=e.O()}]);
|
package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/page-ec221e3cbf5cda88.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[164],{9483:function(e,t,s){Promise.resolve().then(s.bind(s,865))},865:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return k}});var r=s(7437),a=s(29),o=s.n(a),n=s(2265),l=s(7648),i=s(2575),d=s(8014),c=s(740),f=s(3448);function x(e){let{width:t=40,height:s=40,squares:a=[24,24],className:o,squaresClassName:l,...i}=e,[d,c]=a,[x,u]=(0,n.useState)(null);return(0,r.jsx)("svg",{width:t*d,height:s*c,className:(0,f.cn)("absolute inset-0 h-full w-full border border-gray-400/30",o),...i,children:Array.from({length:d*c}).map((e,a)=>{let o=a%d*t,n=Math.floor(a/d)*s;return(0,r.jsx)("rect",{x:o,y:n,width:t,height:s,className:(0,f.cn)("stroke-gray-400/30 transition-all duration-100 ease-in-out not-[&:hover]:duration-1000",x===a?"fill-gray-300/30":"fill-transparent",l),onMouseEnter:()=>u(a),onMouseLeave:()=>u(null)},a)})})}var u=s(4008),p=s(1906),m=s(1854),h=s(9960);let b={some:0,all:1};function g(e){let{value:t,startValue:s=0,direction:a="up",delay:o=0,className:l,decimalPlaces:i=0,...d}=e,c=(0,n.useRef)(null),x=(0,p.c)("down"===a?t:s),u=(0,m.q)(x,{damping:60,stiffness:100}),g=function(e){let{root:t,margin:s,amount:r,once:a=!1,initial:o=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},[l,i]=(0,n.useState)(o);return(0,n.useEffect)(()=>{if(!e.current||a&&l)return;let o={root:t&&t.current||void 0,margin:s,amount:r};return function(e,t,{root:s,margin:r,amount:a="some"}={}){let o=(0,h.I)(e),n=new WeakMap,l=new IntersectionObserver(e=>{e.forEach(e=>{let s=n.get(e.target);if(!!s!==e.isIntersecting){if(e.isIntersecting){let s=t(e.target,e);"function"==typeof s?n.set(e.target,s):l.unobserve(e.target)}else"function"==typeof s&&(s(e),n.delete(e.target))}})},{root:s,rootMargin:r,threshold:"number"==typeof a?a:b[a]});return o.forEach(e=>l.observe(e)),()=>l.disconnect()}(e.current,()=>(i(!0),a?void 0:()=>i(!1)),o)},[t,e,s,a,r]),l}(c,{once:!0,margin:"0px"});return(0,n.useEffect)(()=>{let e=null;return g&&(e=setTimeout(()=>{x.set("down"===a?s:t)},1e3*o)),()=>{null!==e&&clearTimeout(e)}},[x,g,o,t,a,s]),(0,n.useEffect)(()=>u.on("change",e=>{c.current&&(c.current.textContent=Intl.NumberFormat("en-US",{minimumFractionDigits:i,maximumFractionDigits:i}).format(Number(e.toFixed(i))))}),[u,i]),(0,r.jsx)("span",{ref:c,className:(0,f.cn)("inline-block tracking-wider text-black tabular-nums dark:text-white",l),...d,children:s})}var y=s(6376);let v=[{icon:(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#1A1A1A",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 00-2.91-.09z"}),(0,r.jsx)("path",{d:"M12 15l-3-3a22 22 0 012-3.95A12.88 12.88 0 0122 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 01-4 2z"}),(0,r.jsx)("path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"}),(0,r.jsx)("path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"})]}),bg:"#F5F0EB"},{icon:(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#1A1A1A",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("circle",{cx:"12",cy:"12",r:"6"}),(0,r.jsx)("circle",{cx:"12",cy:"12",r:"2",fill:"#6F4E37"})]}),bg:"#EDE6DD"},{icon:(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#1A1A1A",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M10 2v7.527a2 2 0 01-.211.896L4.72 20.55a1 1 0 00.9 1.45h12.76a1 1 0 00.9-1.45l-5.069-10.127A2 2 0 0114 9.527V2"}),(0,r.jsx)("path",{d:"M8.5 2h7"}),(0,r.jsx)("path",{d:"M7 16h10"})]}),bg:"#F7F3EE"},{icon:(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#1A1A1A",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M8.5 14.5A2.5 2.5 0 0011 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 11-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 002.5 2.5z"})}),bg:"#F5F0EB"},{icon:(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#1A1A1A",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 006 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"}),(0,r.jsx)("path",{d:"M9 18h6"}),(0,r.jsx)("path",{d:"M10 22h4"})]}),bg:"#EDE6DD"},{icon:(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#1A1A1A",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 01-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 011-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 011.52 0C14.51 3.81 17 5 19 5a1 1 0 011 1z"}),(0,r.jsx)("path",{d:"M12 8v4"}),(0,r.jsx)("path",{d:"M12 16h.01"})]}),bg:"#F7F3EE"},{icon:(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#1A1A1A",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",fill:"#6F4E37",opacity:"0.2"})}),bg:"#F5F0EB"},{icon:(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#1A1A1A",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("line",{x1:"6",y1:"11",x2:"10",y2:"11"}),(0,r.jsx)("line",{x1:"8",y1:"9",x2:"8",y2:"13"}),(0,r.jsx)("line",{x1:"15",y1:"12",x2:"15.01",y2:"12"}),(0,r.jsx)("line",{x1:"18",y1:"10",x2:"18.01",y2:"10"}),(0,r.jsx)("path",{d:"M17.32 5H6.68a4 4 0 00-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 003 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 019.828 16h4.344a2 2 0 011.414.586L17 18c.5.5 1 1 2 1a3 3 0 003-3c0-1.544-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0017.32 5z"})]}),bg:"#EDE6DD"},{icon:(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#1A1A1A",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),(0,r.jsx)("path",{d:"M2 17l10 5 10-5"}),(0,r.jsx)("path",{d:"M2 12l10 5 10-5",fill:"#6F4E37",opacity:"0.15"})]}),bg:"#F7F3EE"},{icon:(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#1A1A1A",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M12 2a10 10 0 1010 10 4 4 0 01-5-5 4 4 0 01-5-5"}),(0,r.jsx)("path",{d:"M8.5 8.5v.01"}),(0,r.jsx)("path",{d:"M16 15.5v.01"}),(0,r.jsx)("path",{d:"M12 12v.01"}),(0,r.jsx)("path",{d:"M11 17v.01"}),(0,r.jsx)("path",{d:"M7 14v.01"})]}),bg:"#F5F0EB"},{icon:(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#1A1A1A",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",fill:"#6F4E37",opacity:"0.2"})}),bg:"#EDE6DD"},{icon:(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#1A1A1A",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("polygon",{points:"16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76",fill:"#6F4E37",opacity:"0.2"})]}),bg:"#F7F3EE"},{icon:(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#1A1A1A",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M19.439 7.85c-.049.322.059.648.289.878l1.568 1.568c.47.47.706 1.087.706 1.704s-.235 1.233-.706 1.704l-1.611 1.611a.98.98 0 01-.837.276c-.47-.07-.802-.48-.968-.925a2.501 2.501 0 10-3.214 3.214c.446.166.855.497.925.968a.979.979 0 01-.276.837l-1.61 1.611a2.404 2.404 0 01-1.705.707 2.402 2.402 0 01-1.704-.706l-1.568-1.568a1.026 1.026 0 00-.877-.29c-.493.074-.84.504-1.02.968a2.5 2.5 0 11-3.237-3.237c.464-.18.894-.527.967-1.02a1.026 1.026 0 00-.289-.877l-1.568-1.568A2.402 2.402 0 011.998 12c0-.617.236-1.234.706-1.704L4.23 8.77c.24-.24.581-.353.917-.303.515.077.877.528 1.073.978a2.5 2.5 0 103.259-3.259c-.45-.196-.9-.558-.977-1.073-.05-.336.062-.676.303-.917l1.525-1.525A2.402 2.402 0 0112 1.998c.617 0 1.234.236 1.704.706l1.568 1.568c.23.23.556.338.877.29.493-.074.84-.504 1.02-.968a2.5 2.5 0 113.237 3.237c-.464.18-.894.527-.967 1.02z"})}),bg:"#F5F0EB"},{icon:(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#1A1A1A",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z"}),(0,r.jsx)("polyline",{points:"3.27 6.96 12 12.01 20.73 6.96"}),(0,r.jsx)("line",{x1:"12",y1:"22.08",x2:"12",y2:"12"})]}),bg:"#EDE6DD"}];function j(e){let t=0;for(let s=0;s<e.length;s++)t=(t<<5)-t+e.charCodeAt(s)|0;return v[Math.abs(t)%v.length]}function k(){let{projects:e,createProject:t,deleteProject:s,duplicateProject:a,importProject:f,renameProject:p,profile:m,profileInitials:h,promptDialog:b,confirmDialog:v}=(0,i.Q)(),k=Object.values(e),[w,C]=(0,n.useState)(null),[N,A]=(0,n.useState)(""),[E,L]=(0,n.useState)(null),[M,D]=(0,n.useState)(!1),[F,I]=(0,n.useState)(!1),[S,P]=(0,n.useState)(null),B=(0,n.useRef)(null),R=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!E)return;let e=e=>{B.current&&!B.current.contains(e.target)&&L(null)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[E]),(0,n.useEffect)(()=>{(0,y.b2)()},[]);let z=(0,n.useMemo)(()=>{let e=k.flatMap(e=>Object.values(e.testCases).flat()),t=e.length,s=e.filter(e=>"pass"===e.status).length,r=e.filter(e=>"skip"===e.status).length,a=k.reduce((e,t)=>e+t.flows.length,0),o=t-r;return{totalCases:t,totalNodes:a,overallPassRate:o>0?Math.round(s/o*100):0}},[k]);if(0===k.length)return(0,r.jsx)("div",{className:"h-full overflow-auto p-6",children:(0,r.jsx)(c.u,{message:"No projects yet. Create your first project to get started.",action:{label:"+ New Project",onClick:async()=>{let e=await b("New Project","Enter project name:");(null==e?void 0:e.trim())&&t(e.trim())}}})});let W=(e,t)=>{C(e),A(t),L(null)},U=()=>{w&&N.trim()&&p(w,N.trim()),C(null)},T=async(e,t)=>{L(null),await v("Delete Project",'Delete "'.concat(t,'"? This cannot be undone.'))&&s(e)};return(0,r.jsxs)("div",{className:"jsx-ef3362fdbd774571 h-full overflow-auto relative",children:[(0,r.jsxs)("div",{className:"jsx-ef3362fdbd774571 absolute inset-0 overflow-hidden pointer-events-none",children:[(0,r.jsx)(x,{width:48,height:48,squares:[32,32],className:"opacity-30",squaresClassName:"fill-neutral-200/20"}),(0,r.jsx)("div",{style:{background:"linear-gradient(to bottom, var(--bg-primary) 0%, transparent 15%, transparent 85%, var(--bg-primary) 100%)"},className:"jsx-ef3362fdbd774571 absolute inset-0"})]}),(0,r.jsxs)("div",{className:"jsx-ef3362fdbd774571 relative p-6",children:[(0,r.jsxs)("div",{className:"jsx-ef3362fdbd774571 flex items-center justify-between mb-6",children:[(0,r.jsxs)("div",{className:"jsx-ef3362fdbd774571",children:[(0,r.jsx)("h2",{style:{color:"var(--text-primary)"},className:"jsx-ef3362fdbd774571 text-lg font-medium",children:"All Projects"}),(0,r.jsxs)("p",{style:{color:"var(--text-tertiary)"},className:"jsx-ef3362fdbd774571 text-xs mt-0.5",children:[k.length," project",1!==k.length?"s":""]})]}),(0,r.jsxs)("div",{className:"jsx-ef3362fdbd774571 flex items-center gap-2",children:[(0,r.jsx)("button",{onClick:()=>D(!0),style:{borderColor:"#6F4E37",color:"#6F4E37",borderRadius:"var(--radius-pill)",boxShadow:"0 0 12px rgba(111,78,55,0.3), 0 0 24px rgba(111,78,55,0.15)",animation:"glowPulse 2s ease-in-out infinite"},className:"jsx-ef3362fdbd774571 px-4 py-2 text-sm font-medium rounded-md border transition-all hover:scale-105",children:"Donate Please \uD83E\uDD7A\uD83D\uDC49\uD83D\uDC48"}),(0,r.jsx)("button",{onClick:()=>{var e;return null===(e=R.current)||void 0===e?void 0:e.click()},style:{borderColor:"var(--border)",color:"var(--text-secondary)",borderRadius:"var(--radius-pill)"},className:"jsx-ef3362fdbd774571 px-4 py-2 text-sm font-medium rounded-md border transition-opacity hover:opacity-80",children:"Import Project"}),(0,r.jsx)("input",{ref:R,type:"file",accept:".json",onChange:e=>{var t;let s=null===(t=e.target.files)||void 0===t?void 0:t[0];if(!s)return;let r=new FileReader;r.onload=()=>{let e=f(r.result);e.ok?P(null):P(e.error||"Import failed")},r.readAsText(s),e.target.value=""},className:"jsx-ef3362fdbd774571 hidden"}),(0,r.jsx)("button",{onClick:async()=>{let e=await b("New Project","Enter project name:");(null==e?void 0:e.trim())&&t(e.trim())},style:{backgroundColor:"var(--accent)",color:"var(--bg-primary)",borderRadius:"var(--radius-pill)"},className:"jsx-ef3362fdbd774571 px-4 py-2 text-sm font-medium rounded-md transition-opacity hover:opacity-80",children:"+ New Project"})]})]}),S&&(0,r.jsxs)("div",{style:{backgroundColor:"var(--status-fail-bg)",color:"var(--status-fail-text)"},className:"jsx-ef3362fdbd774571 mb-4 text-xs px-3 py-2 rounded-lg flex items-center justify-between",children:[(0,r.jsxs)("span",{className:"jsx-ef3362fdbd774571",children:["Import failed: ",S]}),(0,r.jsx)("button",{onClick:()=>P(null),className:"jsx-ef3362fdbd774571 ml-2 font-bold",children:"\\u00d7"})]}),(0,r.jsx)("div",{className:"jsx-ef3362fdbd774571 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-5",children:k.map(e=>{let t=Object.values(e.testCases).flat(),s=t.length,o=t.filter(e=>"pass"===e.status).length,n=t.filter(e=>"fail"===e.status).length,i=t.filter(e=>"skip"===e.status).length,c=t.filter(e=>"untested"===e.status).length,f=s-i,x=f>0?Math.round(o/f*100):0,p=w===e.id;return(0,r.jsxs)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},className:"jsx-ef3362fdbd774571 group relative flex flex-col rounded-xl border overflow-hidden transition-all duration-200 hover:shadow-lg hover:border-[var(--border-hover)]",children:[(0,r.jsxs)("div",{style:{background:"linear-gradient(135deg, #F7F5F1 0%, #EDEAE3 100%)"},className:"jsx-ef3362fdbd774571 relative h-24 overflow-hidden",children:[(0,r.jsx)(u.K,{width:28,height:28,x:-1,y:-1,strokeDasharray:"4 2",className:"text-neutral-400/20"}),(0,r.jsx)("div",{className:"jsx-ef3362fdbd774571 absolute inset-0 flex items-center justify-center pointer-events-none",children:(0,r.jsx)("img",{src:"https://static.vecteezy.com/system/resources/thumbnails/067/162/149/small/cute-duck-meme-sticker-transparent-cute-illustration-free-png.png",alt:"",style:{opacity:.08},className:"jsx-ef3362fdbd774571 h-[70%] object-contain select-none"})}),(0,r.jsx)("div",{style:{background:x>=80?"var(--status-pass-text)":x>=50?"var(--status-skip-text)":s>0?"var(--status-fail-text)":"var(--border)"},className:"jsx-ef3362fdbd774571 absolute bottom-0 left-0 right-0 h-1"}),(0,r.jsx)("div",{style:{backgroundColor:j(e.id).bg},className:"jsx-ef3362fdbd774571 absolute top-4 left-4 w-10 h-10 rounded-lg flex items-center justify-center",children:j(e.id).icon})]}),(0,r.jsxs)("div",{className:"jsx-ef3362fdbd774571 flex-1 p-4 flex flex-col gap-3",children:[p?(0,r.jsx)("input",{autoFocus:!0,value:N,onChange:e=>A(e.target.value),onBlur:U,onKeyDown:e=>{"Enter"===e.key&&U(),"Escape"===e.key&&C(null)},style:{borderColor:"var(--accent)",color:"var(--text-primary)"},className:"jsx-ef3362fdbd774571 text-sm font-semibold bg-transparent outline-none border-b px-0 py-0.5"}):(0,r.jsx)("h3",{style:{color:"var(--text-primary)"},className:"jsx-ef3362fdbd774571 text-sm font-semibold truncate",children:e.name}),(0,r.jsxs)("div",{style:{color:"var(--text-tertiary)"},className:"jsx-ef3362fdbd774571 flex items-center gap-3 text-xs",children:[(0,r.jsxs)("span",{className:"jsx-ef3362fdbd774571 flex items-center gap-1",children:[(0,r.jsx)(g,{value:e.flows.length,className:"text-xs font-medium",style:{color:"var(--text-primary)"}}),(0,r.jsx)("span",{className:"jsx-ef3362fdbd774571",children:"nodes"})]}),(0,r.jsx)("span",{style:{backgroundColor:"var(--border)"},className:"jsx-ef3362fdbd774571 w-px h-3"}),(0,r.jsxs)("span",{className:"jsx-ef3362fdbd774571 flex items-center gap-1",children:[(0,r.jsx)(g,{value:s,className:"text-xs font-medium",style:{color:"var(--text-primary)"}}),(0,r.jsx)("span",{className:"jsx-ef3362fdbd774571",children:"cases"})]})]}),s>0&&(0,r.jsxs)("div",{className:"jsx-ef3362fdbd774571 space-y-1",children:[(0,r.jsxs)("div",{style:{color:"var(--text-tertiary)"},className:"jsx-ef3362fdbd774571 flex items-center justify-between text-[10px]",children:[(0,r.jsx)("span",{className:"jsx-ef3362fdbd774571",children:"Pass rate"}),(0,r.jsxs)("span",{style:{color:x>=80?"var(--status-pass-text)":x>=50?"var(--status-skip-text)":"var(--status-fail-text)",fontWeight:600},className:"jsx-ef3362fdbd774571",children:[x,"%"]})]}),(0,r.jsx)("div",{style:{backgroundColor:"var(--bg-secondary)"},className:"jsx-ef3362fdbd774571 h-1.5 w-full rounded-full overflow-hidden",children:(0,r.jsx)("div",{style:{width:"".concat(x,"%"),backgroundColor:x>=80?"var(--status-pass-text)":x>=50?"var(--status-skip-text)":"var(--status-fail-text)"},className:"jsx-ef3362fdbd774571 h-full rounded-full transition-all duration-500"})}),(0,r.jsxs)("div",{className:"jsx-ef3362fdbd774571 flex gap-1 mt-1",children:[o>0&&(0,r.jsxs)("span",{style:{backgroundColor:"var(--status-pass-bg)",color:"var(--status-pass-text)"},className:"jsx-ef3362fdbd774571 text-[9px] px-1.5 py-0.5 rounded-full",children:[o," pass"]}),n>0&&(0,r.jsxs)("span",{style:{backgroundColor:"var(--status-fail-bg)",color:"var(--status-fail-text)"},className:"jsx-ef3362fdbd774571 text-[9px] px-1.5 py-0.5 rounded-full",children:[n," fail"]}),i>0&&(0,r.jsxs)("span",{style:{backgroundColor:"var(--status-skip-bg)",color:"var(--status-skip-text)"},className:"jsx-ef3362fdbd774571 text-[9px] px-1.5 py-0.5 rounded-full",children:[i," skip"]}),c>0&&(0,r.jsxs)("span",{style:{backgroundColor:"var(--status-untested-bg)",color:"var(--status-untested-text)"},className:"jsx-ef3362fdbd774571 text-[9px] px-1.5 py-0.5 rounded-full",children:[c," todo"]})]})]}),(0,r.jsxs)("div",{style:{color:"var(--text-tertiary)",borderColor:"var(--border)"},className:"jsx-ef3362fdbd774571 text-[10px] mt-auto pt-2 border-t",children:["Created ",new Date(e.createdAt).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]})]}),(0,r.jsx)("div",{className:"jsx-ef3362fdbd774571 absolute top-3 right-3 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity duration-150 z-10",children:(0,r.jsx)("button",{onClick:t=>{t.preventDefault(),t.stopPropagation(),L(E===e.id?null:e.id)},style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)",color:"var(--text-secondary)"},className:"jsx-ef3362fdbd774571 w-7 h-7 flex items-center justify-center rounded-md border text-xs transition-colors hover:bg-[var(--bg-secondary)]",children:(0,r.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",className:"jsx-ef3362fdbd774571",children:[(0,r.jsx)("circle",{cx:"6",cy:"2.5",r:"1",fill:"currentColor",className:"jsx-ef3362fdbd774571"}),(0,r.jsx)("circle",{cx:"6",cy:"6",r:"1",fill:"currentColor",className:"jsx-ef3362fdbd774571"}),(0,r.jsx)("circle",{cx:"6",cy:"9.5",r:"1",fill:"currentColor",className:"jsx-ef3362fdbd774571"})]})})}),E===e.id&&(0,r.jsxs)("div",{ref:B,style:{backgroundColor:"var(--bg-card)",borderColor:"var(--border)",boxShadow:"var(--shadow-lg)"},className:"jsx-ef3362fdbd774571 absolute top-11 right-3 z-30 py-1 min-w-[140px] border rounded-lg",children:[(0,r.jsxs)(l.default,{href:"/projects/".concat(e.id),className:"flex items-center gap-2 px-3 py-1.5 text-xs hover:bg-[var(--bg-secondary)]",style:{color:"var(--text-primary)"},onClick:()=>L(null),children:[(0,r.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",className:"jsx-ef3362fdbd774571",children:(0,r.jsx)("path",{d:"M2 6h8M7 3l3 3-3 3",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-ef3362fdbd774571"})}),"Open"]}),(0,r.jsxs)("button",{onClick:t=>{t.stopPropagation(),W(e.id,e.name)},style:{color:"var(--text-primary)"},className:"jsx-ef3362fdbd774571 w-full flex items-center gap-2 px-3 py-1.5 text-xs hover:bg-[var(--bg-secondary)]",children:[(0,r.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",className:"jsx-ef3362fdbd774571",children:(0,r.jsx)("path",{d:"M8.5 1.5l2 2-7 7H1.5v-2l7-7z",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-ef3362fdbd774571"})}),"Rename"]}),(0,r.jsxs)("button",{onClick:t=>{t.stopPropagation(),a(e.id),L(null)},style:{color:"var(--text-primary)"},className:"jsx-ef3362fdbd774571 w-full flex items-center gap-2 px-3 py-1.5 text-xs hover:bg-[var(--bg-secondary)]",children:[(0,r.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",className:"jsx-ef3362fdbd774571",children:[(0,r.jsx)("rect",{x:"3.5",y:"3.5",width:"6",height:"6",rx:"1",stroke:"currentColor",strokeWidth:"1.2",className:"jsx-ef3362fdbd774571"}),(0,r.jsx)("path",{d:"M8.5 3.5V2.5a1 1 0 00-1-1h-5a1 1 0 00-1 1v5a1 1 0 001 1h1",stroke:"currentColor",strokeWidth:"1.2",className:"jsx-ef3362fdbd774571"})]}),"Duplicate"]}),(0,r.jsxs)("button",{onClick:t=>{t.stopPropagation(),(0,d.bb)(e),L(null)},style:{color:"var(--text-primary)"},className:"jsx-ef3362fdbd774571 w-full flex items-center gap-2 px-3 py-1.5 text-xs hover:bg-[var(--bg-secondary)]",children:[(0,r.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",className:"jsx-ef3362fdbd774571",children:[(0,r.jsx)("path",{d:"M10 7v3a1 1 0 01-1 1H3a1 1 0 01-1-1V7",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",className:"jsx-ef3362fdbd774571"}),(0,r.jsx)("polyline",{points:"4 5 6 7 8 5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-ef3362fdbd774571"}),(0,r.jsx)("line",{x1:"6",y1:"1",x2:"6",y2:"7",stroke:"currentColor",strokeWidth:"1.2",className:"jsx-ef3362fdbd774571"})]}),"Export JSON"]}),(0,r.jsx)("div",{style:{borderColor:"var(--border)"},className:"jsx-ef3362fdbd774571 border-t my-1"}),(0,r.jsxs)("button",{onClick:t=>{t.stopPropagation(),T(e.id,e.name)},style:{color:"var(--status-fail-text)"},className:"jsx-ef3362fdbd774571 w-full flex items-center gap-2 px-3 py-1.5 text-xs hover:bg-[var(--bg-secondary)]",children:[(0,r.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",className:"jsx-ef3362fdbd774571",children:(0,r.jsx)("path",{d:"M1.5 3h9M4.5 3V1.5h3V3M3 3v7.5h6V3",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-ef3362fdbd774571"})}),"Delete"]})]}),(0,r.jsx)(l.default,{href:"/projects/".concat(e.id),className:"absolute inset-0 z-0",onClick:()=>L(null)})]},e.id)})}),(0,r.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-ef3362fdbd774571 relative mt-8 pt-6 border-t",children:[(0,r.jsxs)("div",{className:"jsx-ef3362fdbd774571 flex items-center gap-4 mb-4",children:[(0,r.jsx)("div",{style:{border:"1px solid var(--border)"},className:"jsx-ef3362fdbd774571 w-10 h-10 rounded-lg overflow-hidden flex-shrink-0",children:m.avatarUrl?(0,r.jsx)("img",{src:m.avatarUrl,alt:"Avatar",className:"jsx-ef3362fdbd774571 w-full h-full object-cover"}):(0,r.jsx)("div",{style:{backgroundColor:m.bannerColor,color:"#fff"},className:"jsx-ef3362fdbd774571 w-full h-full flex items-center justify-center text-sm font-bold",children:h})}),(0,r.jsxs)("div",{className:"jsx-ef3362fdbd774571",children:[(0,r.jsx)("div",{style:{color:"var(--text-primary)"},className:"jsx-ef3362fdbd774571 text-sm font-medium",children:m.name||"Anonymous Tester"}),(0,r.jsx)("div",{style:{color:"var(--text-tertiary)"},className:"jsx-ef3362fdbd774571 text-[10px]",children:m.role||"No role set"})]})]}),(0,r.jsxs)("div",{className:"jsx-ef3362fdbd774571 grid grid-cols-2 sm:grid-cols-4 gap-3",children:[(0,r.jsxs)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},className:"jsx-ef3362fdbd774571 p-3 rounded-lg border",children:[(0,r.jsx)("div",{style:{color:"var(--text-tertiary)"},className:"jsx-ef3362fdbd774571 text-[10px] uppercase tracking-wider mb-1",children:"Projects"}),(0,r.jsx)(g,{value:k.length,className:"text-lg font-semibold",style:{color:"var(--accent)"}})]}),(0,r.jsxs)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},className:"jsx-ef3362fdbd774571 p-3 rounded-lg border",children:[(0,r.jsx)("div",{style:{color:"var(--text-tertiary)"},className:"jsx-ef3362fdbd774571 text-[10px] uppercase tracking-wider mb-1",children:"Test Cases"}),(0,r.jsx)(g,{value:z.totalCases,className:"text-lg font-semibold",style:{color:"var(--status-pass-text)"}})]}),(0,r.jsxs)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},className:"jsx-ef3362fdbd774571 p-3 rounded-lg border",children:[(0,r.jsx)("div",{style:{color:"var(--text-tertiary)"},className:"jsx-ef3362fdbd774571 text-[10px] uppercase tracking-wider mb-1",children:"Flow Nodes"}),(0,r.jsx)(g,{value:z.totalNodes,className:"text-lg font-semibold",style:{color:"#9E7AFF"}})]}),(0,r.jsxs)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},className:"jsx-ef3362fdbd774571 p-3 rounded-lg border",children:[(0,r.jsx)("div",{style:{color:"var(--text-tertiary)"},className:"jsx-ef3362fdbd774571 text-[10px] uppercase tracking-wider mb-1",children:"Pass Rate"}),(0,r.jsxs)("div",{className:"jsx-ef3362fdbd774571 flex items-baseline gap-0.5",children:[(0,r.jsx)(g,{value:z.overallPassRate,className:"text-lg font-semibold",style:{color:z.overallPassRate>=80?"var(--status-pass-text)":"var(--status-skip-text)"}}),(0,r.jsx)("span",{style:{color:z.overallPassRate>=80?"var(--status-pass-text)":"var(--status-skip-text)"},className:"jsx-ef3362fdbd774571 text-sm font-medium",children:"%"})]})]})]})]})]}),M&&(0,r.jsx)("div",{style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:()=>D(!1),className:"jsx-ef3362fdbd774571 fixed inset-0 z-[400] flex items-center justify-center",children:(0,r.jsxs)("div",{style:{backgroundColor:"var(--bg-card)",borderColor:"var(--border)",boxShadow:"var(--shadow-lg)",animation:"fadeInUp 200ms ease-out"},onClick:e=>e.stopPropagation(),className:"jsx-ef3362fdbd774571 w-full max-w-lg mx-4 rounded-xl border overflow-hidden",children:[(0,r.jsxs)("div",{style:{background:"linear-gradient(180deg, #FFF8E1 0%, var(--bg-card) 100%)"},className:"jsx-ef3362fdbd774571 px-6 pt-6 pb-5 flex flex-col items-center text-center",children:[(0,r.jsx)("div",{className:"jsx-ef3362fdbd774571 w-20 h-20 mb-4 flex items-center justify-center",children:(0,r.jsxs)("svg",{width:"60",height:"60",viewBox:"0 0 48 48",fill:"none",className:"jsx-ef3362fdbd774571",children:[(0,r.jsx)("path",{d:"M8 16h24v20a8 8 0 01-8 8H16a8 8 0 01-8-8V16z",fill:"#6F4E37",className:"jsx-ef3362fdbd774571"}),(0,r.jsx)("path",{d:"M32 20h4a4 4 0 010 8h-4",stroke:"#6F4E37",strokeWidth:"2.5",strokeLinecap:"round",className:"jsx-ef3362fdbd774571"}),(0,r.jsx)("path",{d:"M14 12c0-2 2-4 4-4s4 2 4 4",stroke:"#BCAAA4",strokeWidth:"2",strokeLinecap:"round",opacity:"0.6",className:"jsx-ef3362fdbd774571"}),(0,r.jsx)("path",{d:"M20 10c0-2 2-4 4-4s4 2 4 4",stroke:"#BCAAA4",strokeWidth:"2",strokeLinecap:"round",opacity:"0.4",className:"jsx-ef3362fdbd774571"}),(0,r.jsx)("rect",{x:"6",y:"38",width:"28",height:"4",rx:"2",fill:"#D7CCC8",className:"jsx-ef3362fdbd774571"})]})}),(0,r.jsx)("h3",{style:{color:"var(--text-primary)"},className:"jsx-ef3362fdbd774571 text-base font-semibold mb-2",children:"Please, Buy me a Coffee.."}),(0,r.jsx)("p",{style:{color:"var(--text-secondary)"},className:"jsx-ef3362fdbd774571 text-sm leading-relaxed",children:"If Test Lah! has been helpful, consider buying Qois a coffee. Any size will do. He's very tired."})]}),(0,r.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-ef3362fdbd774571 px-6 py-4 border-t",children:[(0,r.jsx)("p",{style:{color:"var(--text-tertiary)"},className:"jsx-ef3362fdbd774571 text-[10px] font-semibold uppercase tracking-wider mb-2",children:"Pickup Location"}),(0,r.jsx)("p",{style:{color:"var(--text-primary)"},className:"jsx-ef3362fdbd774571 text-sm font-medium mb-1",children:"Toko Kopi TUKU — BSD"}),(0,r.jsx)("p",{style:{color:"var(--text-secondary)"},className:"jsx-ef3362fdbd774571 text-xs leading-relaxed",children:"Ruko Sektor 1.3, Blok RB No. 1, Jl. Griya Loka Raya No.1, Serpong, Tangerang Selatan"})]}),(0,r.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-ef3362fdbd774571 px-6 py-4 border-t flex gap-2",children:[(0,r.jsxs)("div",{onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),className:"jsx-ef3362fdbd774571 flex-1 relative",children:[(0,r.jsx)("button",{onClick:()=>D(!1),style:{borderColor:"var(--border)",color:"var(--text-secondary)"},className:"jsx-ef3362fdbd774571 w-full px-3 py-2.5 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",children:"Maybe Later"}),F&&(0,r.jsx)("div",{style:{width:240,backgroundColor:"var(--bg-card)",borderColor:"var(--border)",boxShadow:"var(--shadow-lg)",animation:"fadeInUp 200ms ease-out"},className:"jsx-ef3362fdbd774571 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 z-[410] rounded-xl border overflow-hidden",children:(0,r.jsx)("img",{src:"https://i.pinimg.com/564x/82/74/4d/82744d1c73b0296c5f32e6f669ac05e6.jpg",alt:"Maybe next time?",width:240,style:{borderRadius:11},className:"jsx-ef3362fdbd774571 w-full h-auto block"})})]}),(0,r.jsx)("a",{href:"https://maps.google.com/?q=Toko+Kopi+TUKU+BSD",target:"_blank",rel:"noopener noreferrer",style:{backgroundColor:"#6F4E37",color:"#fff"},className:"jsx-ef3362fdbd774571 flex-1 px-3 py-2.5 text-xs font-medium rounded-lg text-center transition-opacity hover:opacity-80",children:"Open in Maps"})]}),(0,r.jsxs)("div",{style:{borderColor:"var(--border)",backgroundColor:"#FAFAF8"},className:"jsx-ef3362fdbd774571 px-6 py-4 border-t",children:[(0,r.jsx)("p",{style:{color:"var(--text-secondary)",direction:"rtl"},className:"jsx-ef3362fdbd774571 text-xs text-center leading-relaxed mb-3",children:"اِنَّ الْمُصَّدِّقِيْنَ وَالْمُصَّدِّقٰتِ وَاَقْرَضُوا اللّٰهَ قَرْضًا حَسَنًا يُّضٰعَفُ لَهُمْ وَلَهُمْ اَجْرٌ كَرِيْمٌ ١٨"}),(0,r.jsx)("p",{style:{color:"var(--text-tertiary)"},className:"jsx-ef3362fdbd774571 text-[10px] text-center leading-relaxed",children:"“Sesungguhnya orang-orang yang bersedekah baik laki-laki maupun perempuan dan meminjamkan kepada Allah dengan pinjaman yang baik, akan dilipatgandakan (balasannya) bagi mereka; dan mereka akan mendapat pahala yang mulia.” (QS Al Hadid: 18)"})]})]})}),(0,r.jsx)(o(),{id:"ef3362fdbd774571",children:"@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{from{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@-webkit-keyframes fadeInUp{from{opacity:0;-webkit-transform:translatey(16px);transform:translatey(16px)}to{opacity:1;-webkit-transform:translatey(0);transform:translatey(0)}}@-moz-keyframes fadeInUp{from{opacity:0;-moz-transform:translatey(16px);transform:translatey(16px)}to{opacity:1;-moz-transform:translatey(0);transform:translatey(0)}}@-o-keyframes fadeInUp{from{opacity:0;-o-transform:translatey(16px);transform:translatey(16px)}to{opacity:1;-o-transform:translatey(0);transform:translatey(0)}}@keyframes fadeInUp{from{opacity:0;-webkit-transform:translatey(16px);-moz-transform:translatey(16px);-o-transform:translatey(16px);transform:translatey(16px)}to{opacity:1;-webkit-transform:translatey(0);-moz-transform:translatey(0);-o-transform:translatey(0);transform:translatey(0)}}@-webkit-keyframes fadeInRight{from{opacity:0;-webkit-transform:translatey(-50%)translatex(16px);transform:translatey(-50%)translatex(16px)}to{opacity:1;-webkit-transform:translatey(-50%)translatex(0);transform:translatey(-50%)translatex(0)}}@-moz-keyframes fadeInRight{from{opacity:0;-moz-transform:translatey(-50%)translatex(16px);transform:translatey(-50%)translatex(16px)}to{opacity:1;-moz-transform:translatey(-50%)translatex(0);transform:translatey(-50%)translatex(0)}}@-o-keyframes fadeInRight{from{opacity:0;-o-transform:translatey(-50%)translatex(16px);transform:translatey(-50%)translatex(16px)}to{opacity:1;-o-transform:translatey(-50%)translatex(0);transform:translatey(-50%)translatex(0)}}@keyframes fadeInRight{from{opacity:0;-webkit-transform:translatey(-50%)translatex(16px);-moz-transform:translatey(-50%)translatex(16px);-o-transform:translatey(-50%)translatex(16px);transform:translatey(-50%)translatex(16px)}to{opacity:1;-webkit-transform:translatey(-50%)translatex(0);-moz-transform:translatey(-50%)translatex(0);-o-transform:translatey(-50%)translatex(0);transform:translatey(-50%)translatex(0)}}@-webkit-keyframes glowPulse{0%,100%{-webkit-box-shadow:0 0 12px rgba(111,78,55,.3),0 0 24px rgba(111,78,55,.15);box-shadow:0 0 12px rgba(111,78,55,.3),0 0 24px rgba(111,78,55,.15)}50%{-webkit-box-shadow:0 0 20px rgba(111,78,55,.5),0 0 40px rgba(111,78,55,.25);box-shadow:0 0 20px rgba(111,78,55,.5),0 0 40px rgba(111,78,55,.25)}}@-moz-keyframes glowPulse{0%,100%{-moz-box-shadow:0 0 12px rgba(111,78,55,.3),0 0 24px rgba(111,78,55,.15);box-shadow:0 0 12px rgba(111,78,55,.3),0 0 24px rgba(111,78,55,.15)}50%{-moz-box-shadow:0 0 20px rgba(111,78,55,.5),0 0 40px rgba(111,78,55,.25);box-shadow:0 0 20px rgba(111,78,55,.5),0 0 40px rgba(111,78,55,.25)}}@-o-keyframes glowPulse{0%,100%{box-shadow:0 0 12px rgba(111,78,55,.3),0 0 24px rgba(111,78,55,.15)}50%{box-shadow:0 0 20px rgba(111,78,55,.5),0 0 40px rgba(111,78,55,.25)}}@keyframes glowPulse{0%,100%{-webkit-box-shadow:0 0 12px rgba(111,78,55,.3),0 0 24px rgba(111,78,55,.15);-moz-box-shadow:0 0 12px rgba(111,78,55,.3),0 0 24px rgba(111,78,55,.15);box-shadow:0 0 12px rgba(111,78,55,.3),0 0 24px rgba(111,78,55,.15)}50%{-webkit-box-shadow:0 0 20px rgba(111,78,55,.5),0 0 40px rgba(111,78,55,.25);-moz-box-shadow:0 0 20px rgba(111,78,55,.5),0 0 40px rgba(111,78,55,.25);box-shadow:0 0 20px rgba(111,78,55,.5),0 0 40px rgba(111,78,55,.25)}}"})]})}},740:function(e,t,s){"use strict";s.d(t,{u:function(){return a}});var r=s(7437);function a(e){let{message:t,action:s}=e;return(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center h-full gap-4 px-6 text-center",children:[(0,r.jsx)("img",{src:"https://static.vecteezy.com/system/resources/thumbnails/067/162/149/small/cute-duck-meme-sticker-transparent-cute-illustration-free-png.png",alt:"",className:"w-28 h-28 object-contain select-none opacity-15",draggable:!1}),(0,r.jsx)("p",{className:"text-sm max-w-[280px]",style:{color:"var(--text-tertiary)"},children:t}),s&&(0,r.jsx)("button",{onClick:s.onClick,className:"px-4 py-2 text-sm font-medium rounded-md transition-opacity hover:opacity-80",style:{backgroundColor:"var(--accent)",color:"var(--bg-primary)",borderRadius:"var(--radius-pill)"},children:s.label})]})}},4008:function(e,t,s){"use strict";s.d(t,{K:function(){return n}});var r=s(7437),a=s(2265),o=s(3448);function n(e){let{width:t=40,height:s=40,x:n=-1,y:l=-1,strokeDasharray:i="0",squares:d,className:c,...f}=e,x=(0,a.useId)();return(0,r.jsxs)("svg",{"aria-hidden":"true",className:(0,o.cn)("pointer-events-none absolute inset-0 h-full w-full fill-gray-400/30 stroke-gray-400/30",c),...f,children:[(0,r.jsx)("defs",{children:(0,r.jsx)("pattern",{id:x,width:t,height:s,patternUnits:"userSpaceOnUse",x:n,y:l,children:(0,r.jsx)("path",{d:"M.5 ".concat(s,"V.5H").concat(t),fill:"none",strokeDasharray:i})})}),(0,r.jsx)("rect",{width:"100%",height:"100%",strokeWidth:0,fill:"url(#".concat(x,")")}),d&&(0,r.jsx)("svg",{x:n,y:l,className:"overflow-visible",children:d.map(e=>{let[a,o]=e;return(0,r.jsx)("rect",{strokeWidth:"0",width:t-1,height:s-1,x:a*t+1,y:o*s+1},"".concat(a,"-").concat(o))})})]})}},8014:function(e,t,s){"use strict";s.d(t,{EZ:function(){return A},FU:function(){return w},G4:function(){return i},KG:function(){return c},SI:function(){return b},bb:function(){return f},cc:function(){return N},iU:function(){return x},uJ:function(){return u}});var r=s(6481),a=s(7853),o=s.n(a);let n={untested:"⬜ Untested",pass:"✅ Pass",fail:"❌ Fail",skip:"⏭ Skip"},l=e=>e.replace(/\n/g,"<br>").replace(/\|/g,"\\|");function i(e,t,s){let a=(s.length>0?s:r.vJ).filter(e=>e.visible),o=a.map(e=>e.label).join(" | "),i=a.map(()=>"---").join(" | "),d="# ".concat(e.code?e.code+" — ":"").concat(e.label,"\n\n");d+="| # | ".concat(o," |\n")+"|---|".concat(i,"|\n"),t.forEach((e,t)=>{let s=a.map(t=>"status"===t.key?n[e.status]:l(e[t.key]||""));d+="| ".concat(t+1," | ").concat(s.join(" | ")," |\n")});let c=t.length,f=t.filter(e=>"skip"===e.status).length,x=t.filter(e=>"pass"===e.status).length;return d+="\n**Pass rate: ".concat(x,"/").concat(c-f," (").concat(c-f>0?Math.round(x/(c-f)*100):0,"%)**\n")}function d(e,t,s){let r=new Blob([e],{type:s}),a=URL.createObjectURL(r),o=document.createElement("a");o.href=a,o.download=t,o.click(),URL.revokeObjectURL(a)}function c(e){d(function(e){let t="# ".concat(e.name,"\n\n");for(let f of e.flows){var s,a,o,i,d,c;let x=e.testCases[f.id];if(!x||0===x.length)continue;let u=((null!==(i=null!==(o=null===(s=e.columnConfigs)||void 0===s?void 0:s[f.id])&&void 0!==o?o:e.columnConfig)&&void 0!==i?i:[]).length>0?null!==(c=null!==(d=null===(a=e.columnConfigs)||void 0===a?void 0:a[f.id])&&void 0!==d?d:e.columnConfig)&&void 0!==c?c:[]:r.vJ).filter(e=>e.visible),p=u.map(e=>e.label).join(" | "),m=u.map(()=>"---").join(" | ");t+="## ".concat(f.code?f.code+" — ":"").concat(f.label,"\n\n")+"| # | ".concat(p," |\n")+"|---|".concat(m,"|\n"),x.forEach((e,s)=>{let r=u.map(t=>"status"===t.key?n[e.status]:l(e[t.key]||""));t+="| ".concat(s+1," | ").concat(r.join(" | ")," |\n")});let h=x.length,b=x.filter(e=>"skip"===e.status).length,g=x.filter(e=>"pass"===e.status).length,y=h-b>0?Math.round(g/(h-b)*100):0;t+="\n**Pass rate: ".concat(g,"/").concat(h-b," (").concat(y,"%)**\n\n---\n\n")}return t}(e),"".concat(e.name,".md"),"text/markdown")}function f(e){d(JSON.stringify(e,null,2),"".concat(e.name,".json"),"application/json")}function x(e,t,s){let r=(e.code||e.label).replace(/[^a-zA-Z0-9_-]/g,"_");d(i(e,t,s),"".concat(r,".md"),"text/markdown")}function u(e,t){let s=(e.code||e.label).replace(/[^a-zA-Z0-9_-]/g,"_");d(JSON.stringify({node:e,testCases:t},null,2),"".concat(s,".json"),"application/json")}function p(e,t){let s=e&&e.length>0?e:t;return s.length>0?s:r.vJ}function m(e,t){return t.map(t=>"status"===t.key?n[e.status]:e[t.key]||"")}function h(e){return e.includes(",")||e.includes('"')||e.includes("\n")?'"'.concat(e.replace(/"/g,'""'),'"'):e}function b(e,t,s){let a=(e.code||e.label).replace(/[^a-zA-Z0-9_-]/g,"_");d(function(e,t,s){let a=p(s,r.vJ).filter(e=>e.visible);return[["#",...a.map(e=>h(e.label))].join(","),...t.map((e,t)=>[String(t+1),...m(e,a).map(h)].join(","))].join("\n")}(0,t,s),"".concat(a,".csv"),"text/csv")}function g(e,t){var s,a,o;let n=null!==(o=null!==(a=null===(s=e.columnConfigs)||void 0===s?void 0:s[t])&&void 0!==a?a:e.columnConfig)&&void 0!==o?o:[];return n.length>0?n:r.vJ}function y(e){e.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFdbd8d3"}},e.font={name:"Inter",bold:!0,size:11},e.border={top:{style:"thin"},bottom:{style:"thin"},left:{style:"thin"},right:{style:"thin"}},e.alignment={vertical:"middle",horizontal:"left",wrapText:!0}}function v(e){e.border={top:{style:"thin"},bottom:{style:"thin"},left:{style:"thin"},right:{style:"thin"}},e.font={name:"Inter",size:11},e.alignment={vertical:"middle",horizontal:"left",wrapText:!0}}function j(e,t,s,r,a){let o=e.addWorksheet(t);return o.columns=[{header:"#",key:"row",width:6},...a.map(e=>({header:e.label,key:e.key,width:Math.max(e.label.length+4,18)}))],o.getRow(1).eachCell(y),r.forEach((e,t)=>{let s={row:t+1};a.forEach(t=>{"status"===t.key?s[t.key]=n[e.status]:s[t.key]=e[t.key]||""}),o.addRow(s).eachCell(v)}),o}async function k(e,t,s){let a=p(s,r.vJ).filter(e=>e.visible),n=new(o()).Workbook;return n.creator="Ayu Management Tools",j(n,e.label,e.label,t,a),new Blob([await n.xlsx.writeBuffer()],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})}async function w(e,t,s){let r=(e.code||e.label).replace(/[^a-zA-Z0-9_-]/g,"_"),a=await k(e,t,s),o=URL.createObjectURL(a),n=document.createElement("a");n.href=o,n.download="".concat(r,".xlsx"),n.click(),URL.revokeObjectURL(o)}async function C(e){let t=new(o()).Workbook;for(let s of(t.creator="Ayu Management Tools",e.flows)){let r=e.testCases[s.id];if(!r||0===r.length)continue;let a=g(e,s.id).filter(e=>e.visible);j(t,(s.code||s.label).substring(0,31).replace(/[\\/*?[\]]/g,"_"),s.label,r,a)}return new Blob([await t.xlsx.writeBuffer()],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})}async function N(e){let t=await C(e),s=URL.createObjectURL(t),r=document.createElement("a");r.href=s,r.download="".concat(e.name,".xlsx"),r.click(),URL.revokeObjectURL(s)}function A(e){d(function(e){let t="";for(let s of e.flows){let r=e.testCases[s.id];if(!r||0===r.length)continue;let a=g(e,s.id).filter(e=>e.visible);t+="# ".concat(s.code?s.code+" — ":"").concat(s.label,"\n")+(["#",...a.map(e=>h(e.label))].join(",")+"\n"),r.forEach((e,s)=>{let r=[String(s+1),...m(e,a).map(h)];t+=r.join(",")+"\n"}),t+="\n"}return t}(e),"".concat(e.name,".csv"),"text/csv")}},6376:function(e,t,s){"use strict";s.d(t,{b2:function(){return g}});var r=s(6481);let a="mock-dashboard-project",o="node-login",n="node-dashboard",l="node-settings",i="mock-cakra-project",d="cakra-overview",c="cakra-datasource",f="cakra-reports",x=[{id:o,code:"N-001",label:"Login Page",parentId:null,children:[n],shape:"rounded",notes:"User authentication flow",position:{x:250,y:100}},{id:n,code:"N-002",label:"Dashboard",parentId:o,children:[l],shape:"rounded",notes:"Main dashboard view after login",position:{x:250,y:250}},{id:l,code:"N-003",label:"Settings",parentId:n,children:[],shape:"rounded",notes:"User settings and preferences",position:{x:250,y:400}}],u=[{id:"edge-1",fromId:o,toId:n,type:"pass"},{id:"edge-2",fromId:n,toId:l,type:"pass"}],p={[o]:[{id:"tc-001",code:"TC-001",title:"Valid login with correct credentials",steps:'1. Open login page\n2. Enter valid username\n3. Enter valid password\n4. Click "Login" button',expected:"User is redirected to Dashboard page. Welcome message displays username.",status:"pass",case_type:"General",notes:'Tested with user "Ayu"',links:"",order:0},{id:"tc-002",code:"TC-002",title:"Invalid login with wrong credentials",steps:'1. Open login page\n2. Enter invalid username\n3. Enter any password\n4. Click "Login" button',expected:'Error popup appears: "Maaf, nama kamu tidak terdaftar". User stays on login page.',status:"pass",case_type:"Negative",notes:"DenialModal should appear",links:"",order:1},{id:"tc-003",code:"TC-003",title:"Login page UI elements visibility",steps:"1. Open login page\n2. Check logo image\n3. Check title text\n4. Check input field\n5. Check button",expected:'Logo displays duck image. Title shows "QA Management Tools". Input has placeholder. Button shows "Masuk ke Dashboard".',status:"untested",case_type:"General",notes:"Visual regression check",links:"",order:2}],[n]:[{id:"tc-004",code:"TC-004",title:"Dashboard loads project list",steps:"1. Login successfully\n2. Wait for dashboard to load\n3. Check project dropdown",expected:"Project list displays all created projects. Header shows QA Dashboard logo.",status:"pass",case_type:"Positive",notes:"",links:"",order:0},{id:"tc-005",code:"TC-005",title:"Create new project",steps:'1. Click project dropdown\n2. Click "New Project"\n3. Enter project name\n4. Confirm',expected:'New project appears in dropdown. Progress bar shows "Project created!"',status:"fail",case_type:"Positive",notes:"Bug: progress bar not showing on some browsers",links:"",order:1}],[l]:[{id:"tc-006",code:"TC-006",title:"Access settings page",steps:"1. Login\n2. Navigate to /profile\n3. Check profile form",expected:"Profile page loads with name, avatar color, and role fields.",status:"skip",case_type:"General",notes:"Settings page not implemented yet",links:"",order:0}]},m=[{id:d,code:"CK-001",label:"Overview Dashboard",parentId:null,children:[c,f],shape:"rounded",notes:"Main dashboard with data summary cards and charts",position:{x:250,y:100}},{id:c,code:"CK-002",label:"Data Sources",parentId:d,children:[],shape:"rounded",notes:"Connect and manage mobile data sources",position:{x:100,y:280}},{id:f,code:"CK-003",label:"Reports",parentId:d,children:[],shape:"rounded",notes:"Generate and export aggregated reports",position:{x:400,y:280}}],h=[{id:"cakra-edge-1",fromId:d,toId:c,type:"pass"},{id:"cakra-edge-2",fromId:d,toId:f,type:"pass"}],b={[d]:[{id:"ck-tc-001",code:"CK-TC-001",title:"Dashboard loads summary cards",steps:"1. Login to Revamp Cakra\n2. Wait for overview to load\n3. Check summary cards",expected:"Summary cards display total data sources, active connections, and last sync time.",status:"pass",case_type:"Positive",notes:"",links:"",order:0},{id:"ck-tc-002",code:"CK-TC-002",title:"Data refresh button works",steps:"1. Click refresh button on overview\n2. Wait for loading indicator\n3. Verify data updates",expected:"Loading spinner appears. Data refreshes with latest values from connected sources.",status:"untested",case_type:"Positive",notes:"",links:"",order:1}],[c]:[{id:"ck-tc-003",code:"CK-TC-003",title:"Add new data source",steps:'1. Navigate to Data Sources\n2. Click "Add Source"\n3. Enter API endpoint\n4. Enter auth token\n5. Click Connect',expected:'New data source appears in the list with status "Connected". Test connection succeeds.',status:"pass",case_type:"Positive",notes:"",links:"",order:0},{id:"ck-tc-004",code:"CK-TC-004",title:"Remove data source",steps:"1. Navigate to Data Sources\n2. Click delete on a source\n3. Confirm deletion",expected:"Data source is removed from list. Associated data is archived.",status:"fail",case_type:"Negative",notes:"Bug: confirmation dialog missing, deletes immediately",links:"",order:1}],[f]:[{id:"ck-tc-005",code:"CK-TC-005",title:"Generate PDF report",steps:'1. Navigate to Reports\n2. Select date range\n3. Click "Generate PDF"\n4. Wait for generation',expected:"PDF file downloads with aggregated data, charts, and summary table.",status:"untested",case_type:"General",notes:"",links:"",order:0}]};function g(){let e="qa-dashboard";try{let t=localStorage.getItem(e),s=t?JSON.parse(t):{projects:{},activeProjectId:null,selectedNodeId:null},g=!1;s.projects[a]||(s.projects[a]={id:a,name:"Simple Dashboard QA",createdAt:new Date().toISOString(),flows:x,testCases:p,columnConfig:[...r.vJ],columnConfigs:{},edges:u,userProfile:{name:"Ayu",bannerColor:"#81C784",role:"QA Engineer"},nodeCounter:3,tcCounter:{[o]:3,[n]:2,[l]:1}},s.activeProjectId=a,g=!0),s.projects[i]||(s.projects[i]={id:i,name:"Revamp Cakra",createdAt:new Date(Date.now()-864e5).toISOString(),flows:m,testCases:b,columnConfig:[...r.vJ],columnConfigs:{},edges:h,userProfile:{name:"Ayu",bannerColor:"#64B5F6",role:"QA Lead"},nodeCounter:3,tcCounter:{[d]:2,[c]:2,[f]:1}},g=!0),g&&localStorage.setItem(e,JSON.stringify(s))}catch(e){}}},3448:function(e,t,s){"use strict";s.d(t,{cn:function(){return o}});var r=s(1994),a=s(3335);function o(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,a.m6)((0,r.W)(t))}},1906:function(e,t,s){"use strict";s.d(t,{c:function(){return l}});var r=s(4357),a=s(2265),o=s(5750),n=s(3576);function l(e){let t=(0,n.h)(()=>(0,r.BX)(e)),{isStatic:s}=(0,a.useContext)(o._);if(s){let[,s]=(0,a.useState)(e);(0,a.useEffect)(()=>t.on("change",s),[])}return t}},1854:function(e,t,s){"use strict";s.d(t,{q:function(){return f}});var r=s(7493),a=s(8441),o=s(6147);function n(e){return"number"==typeof e?e:parseFloat(e)}var l=s(2265),i=s(5750),d=s(1906),c=s(6836);function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{isStatic:s}=(0,l.useContext)(i._),f=()=>(0,r.i)(e)?e.get():e;if(s)return(0,c.H)(f);let x=(0,d.c)(f());return(0,l.useInsertionEffect)(()=>(function(e,t,s={}){let l;let i=e.get(),d=null,c=i,f="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,x=()=>{d&&(d.stop(),d=null),e.animation=void 0},u=()=>{let t=n(e.get()),r=n(c);if(t===r){x();return}let o=d?d.getGeneratorVelocity():e.getVelocity();x(),d=new a.L({keyframes:[t,r],velocity:o,type:"spring",restDelta:.001,restSpeed:.01,...s,onUpdate:l})},p=()=>{u(),e.animation=d??void 0,e.events.animationStart?.notify(),d?.then(()=>{e.animation=void 0,e.events.animationComplete?.notify()})};if(e.attach((e,t)=>{c=e,l=e=>t(f?e+f:e),o.Wi.postRender(p)},x),(0,r.i)(t)){let r=!0===s.skipInitialAnimation,a=t.on("change",t=>{r?(r=!1,e.jump(f?t+f:t,!1)):e.set(f?t+f:t)}),o=e.on("destroy",a);return()=>{a(),o()}}return x})(x,e,t),[x,JSON.stringify(t)]),x}(e,{type:"spring",...t})}},6836:function(e,t,s){"use strict";s.d(t,{H:function(){return function e(t,s,o,n){if("function"==typeof t)return function(e){d.S1.current=[],e();let t=i(d.S1.current,e);return d.S1.current=void 0,t}(t);if(void 0!==o&&!Array.isArray(o)&&"function"!=typeof s)return function(t,s,r,o){let n=(0,a.h)(()=>Object.keys(r)),l=(0,a.h)(()=>({}));for(let a of n)l[a]=e(t,s,r[a],o);return l}(t,s,o,n);let l="function"==typeof s?s:function(...e){let t=!Array.isArray(e[0]),s=t?0:-1,a=e[0+s],o=e[1+s],n=e[2+s],l=e[3+s],i=(0,r.s)(o,n,l);return t?i(a):i}(s,o,n),f=Array.isArray(t)?c(t,l):c([t],e=>{let[t]=e;return l(t)}),x=Array.isArray(t)?void 0:t.accelerate;return x&&!x.isTransformed&&"function"!=typeof s&&Array.isArray(o)&&(null==n?void 0:n.clamp)!==!1&&(f.accelerate={...x,times:s,keyframes:o,isTransformed:!0,...(null==n?void 0:n.ease)?{ease:n.ease}:{}}),f}}});var r=s(8460),a=s(3576),o=s(6147),n=s(2014),l=s(1906);function i(e,t){let s=(0,l.c)(t()),r=()=>s.set(t());return r(),(0,n.L)(()=>{let t=()=>o.Wi.preRender(r,!1,!0),s=e.map(e=>e.on("change",t));return()=>{s.forEach(e=>e()),(0,o.Pn)(r)}}),s}var d=s(4357);function c(e,t){let s=(0,a.h)(()=>[]);return i(e,()=>{s.length=0;let r=e.length;for(let t=0;t<r;t++)s[t]=e[t].get();return t(s)})}}},function(e){e.O(0,[113,137,485,648,575,971,117,744],function(){return e(e.s=9483)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[409],{7589:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return n(3634)}])},3634:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}}),n(7043);let i=n(7437);n(2265);let o={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},l={display:"inline-block"},r={display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},d={fontSize:14,fontWeight:400,lineHeight:"49px",margin:0};function s(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("title",{children:"404: This page could not be found."}),(0,i.jsx)("div",{style:o,children:(0,i.jsxs)("div",{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,i.jsx)("h1",{className:"next-error-h1",style:r,children:"404"}),(0,i.jsx)("div",{style:l,children:(0,i.jsx)("h2",{style:d,children:"This page could not be found."})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},function(e){e.O(0,[971,117,744],function(){return e(e.s=7589)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{1780:function(e,t,r){Promise.resolve().then(r.t.bind(r,2827,23)),Promise.resolve().then(r.t.bind(r,2778,23)),Promise.resolve().then(r.bind(r,5369))},6586:function(e,t,r){"use strict";r.d(t,{SE:function(){return l},wH:function(){return o}});var n=r(7437),s=r(2265);let a=(0,s.createContext)(null);function l(){let e=(0,s.useContext)(a);if(!e)throw Error("useProgress must be used within ProgressProvider");return e}function o(e){let{children:t}=e,[r,l]=(0,s.useState)(0),[o,u]=(0,s.useState)(""),[i,c]=(0,s.useState)(!1),d=(0,s.useRef)(null),f=(0,s.useRef)(null),v=(0,s.useCallback)(()=>{d.current&&(clearInterval(d.current),d.current=null),f.current&&(clearTimeout(f.current),f.current=null)},[]),h=(0,s.useCallback)(()=>{c(!1),l(0),u("")},[]),x=(0,s.useCallback)(e=>{v(),l(0),u(e||""),c(!0),d.current=setInterval(()=>{l(e=>e>=90?(d.current&&clearInterval(d.current),d.current=null,90):e+15*Math.random())},300),f.current=setTimeout(()=>{h()},8e3)},[v,h]),b=(0,s.useCallback)((e,t)=>{l(Math.min(95,e)),t&&u(t)},[]),m=(0,s.useCallback)(e=>{v(),l(100),e&&u(e),setTimeout(()=>{h()},500)},[v,h]),k=(0,s.useCallback)(()=>{v(),h()},[v,h]);return(0,s.useEffect)(()=>()=>v(),[v]),(0,n.jsxs)(a.Provider,{value:{startProgress:x,updateProgress:b,completeProgress:m,cancelProgress:k,isProgressing:i},children:[t,(0,n.jsxs)("div",{className:"fixed bottom-0 left-0 right-0 z-[600] transition-all duration-300 ease-out",style:{opacity:i?1:0,transform:i?"translateY(0)":"translateY(100%)",pointerEvents:i?"auto":"none"},children:[(0,n.jsx)("div",{className:"h-1 w-full",style:{backgroundColor:"var(--bg-secondary)"},children:(0,n.jsx)("div",{className:"h-full transition-all duration-200 ease-out",style:{width:"".concat(r,"%"),backgroundColor:r>=100?"var(--status-pass-text)":"var(--accent)",boxShadow:r>=100?"0 0 10px var(--status-pass-text)":"none"}})}),o&&(0,n.jsxs)("div",{className:"flex items-center justify-center py-2 px-4 text-xs font-medium cursor-pointer",onClick:k,style:{backgroundColor:"var(--bg-card)",color:r>=100?"var(--status-pass-text)":"var(--text-secondary)",borderTop:"1px solid var(--border)"},children:[r>=100&&(0,n.jsx)("svg",{className:"mr-2",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,n.jsx)("path",{d:"M2 6l3 3 5-5",stroke:"var(--status-pass-text)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),o]})]})]})}},5369:function(e,t,r){"use strict";r.d(t,{Providers:function(){return a}});var n=r(7437),s=r(6586);function a(e){let{children:t}=e;return(0,n.jsx)(s.wH,{children:t})}},2778:function(){},2827:function(e){e.exports={style:{fontFamily:"'__Inter_f367f3', '__Inter_Fallback_f367f3'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}}},function(e){e.O(0,[418,971,117,744],function(){return e(e.s=1780)}),_N_E=e.O()}]);
|