@nivora/matrix 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +9 -9
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/react-loadable-manifest.json +8 -8
  6. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  7. package/.next/server/app/_global-error.html +2 -2
  8. package/.next/server/app/_global-error.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/.next/server/app/_not-found.html +1 -1
  17. package/.next/server/app/_not-found.rsc +1 -1
  18. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  19. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  20. package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  21. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  22. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  23. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  24. package/.next/server/app/matrix/page_client-reference-manifest.js +1 -1
  25. package/.next/server/app/page.js +2 -2
  26. package/.next/server/app/page_client-reference-manifest.js +1 -1
  27. package/.next/server/app/releases/[id]/page.js +3 -3
  28. package/.next/server/app/releases/[id]/page_client-reference-manifest.js +1 -1
  29. package/.next/server/app/releases/page.js +1 -1
  30. package/.next/server/app/releases/page_client-reference-manifest.js +1 -1
  31. package/.next/server/app/specs/[id]/page.js +1 -1
  32. package/.next/server/app/specs/[id]/page_client-reference-manifest.js +1 -1
  33. package/.next/server/app/traceability/archive/page.js +2 -2
  34. package/.next/server/app/traceability/archive/page.js.nft.json +1 -1
  35. package/.next/server/app/traceability/archive/page_client-reference-manifest.js +1 -1
  36. package/.next/server/app/traceability/design/[id]/page.js +1 -1
  37. package/.next/server/app/traceability/design/[id]/page.js.nft.json +1 -1
  38. package/.next/server/app/traceability/design/[id]/page_client-reference-manifest.js +1 -1
  39. package/.next/server/app/traceability/design/new/page.js +1 -1
  40. package/.next/server/app/traceability/design/new/page.js.nft.json +1 -1
  41. package/.next/server/app/traceability/design/new/page_client-reference-manifest.js +1 -1
  42. package/.next/server/app/traceability/design/page.js +2 -2
  43. package/.next/server/app/traceability/design/page_client-reference-manifest.js +1 -1
  44. package/.next/server/app/traceability/fs/[id]/page.js +3 -3
  45. package/.next/server/app/traceability/fs/[id]/page.js.nft.json +1 -1
  46. package/.next/server/app/traceability/fs/[id]/page_client-reference-manifest.js +1 -1
  47. package/.next/server/app/traceability/fs/page.js +2 -2
  48. package/.next/server/app/traceability/fs/page_client-reference-manifest.js +1 -1
  49. package/.next/server/app/traceability/page_client-reference-manifest.js +1 -1
  50. package/.next/server/app/traceability/risk/[id]/page.js +2 -2
  51. package/.next/server/app/traceability/risk/[id]/page.js.nft.json +1 -1
  52. package/.next/server/app/traceability/risk/[id]/page_client-reference-manifest.js +1 -1
  53. package/.next/server/app/traceability/risk/page.js +2 -2
  54. package/.next/server/app/traceability/risk/page_client-reference-manifest.js +1 -1
  55. package/.next/server/app/traceability/urs/[id]/page.js +2 -2
  56. package/.next/server/app/traceability/urs/[id]/page.js.nft.json +1 -1
  57. package/.next/server/app/traceability/urs/[id]/page_client-reference-manifest.js +1 -1
  58. package/.next/server/app/traceability/urs/page.js +2 -2
  59. package/.next/server/app/traceability/urs/page_client-reference-manifest.js +1 -1
  60. package/.next/server/app-paths-manifest.json +9 -9
  61. package/.next/server/chunks/1030.js +1 -1
  62. package/.next/server/chunks/1058.js +1 -1
  63. package/.next/server/chunks/1205.js +1 -1
  64. package/.next/server/chunks/2146.js +1 -1
  65. package/.next/server/chunks/2160.js +2 -2
  66. package/.next/server/chunks/2325.js +1 -1
  67. package/.next/server/chunks/3077.js +1 -0
  68. package/.next/server/chunks/5352.js +1 -1
  69. package/.next/server/chunks/6744.js +1 -0
  70. package/.next/server/chunks/7886.js +1 -0
  71. package/.next/server/chunks/{9231.js → 8698.js} +2 -2
  72. package/.next/server/middleware-build-manifest.js +1 -1
  73. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  74. package/.next/server/pages/404.html +1 -1
  75. package/.next/server/pages/500.html +2 -2
  76. package/.next/server/server-reference-manifest.js +1 -1
  77. package/.next/server/server-reference-manifest.json +1 -1
  78. package/.next/static/chunks/2204.7bdec7f5aa753cc7.js +1 -0
  79. package/.next/static/chunks/3056.aa61d4dbe54416ec.js +1 -0
  80. package/.next/static/chunks/{4016-aa5761d6944c564e.js → 4016-d84297c46c7686f3.js} +1 -1
  81. package/.next/static/chunks/app/releases/[id]/{page-ed5f3932911176e1.js → page-0cd46ed05d774f27.js} +2 -2
  82. package/.next/static/chunks/app/releases/page-bb42965b7680921d.js +1 -0
  83. package/.next/static/chunks/app/specs/[id]/page-7bfa960809127747.js +1 -0
  84. package/.next/static/chunks/app/traceability/archive/page-330c86054493d9af.js +1 -0
  85. package/.next/static/chunks/app/traceability/fs/[id]/{page-88def3234ccdc0ff.js → page-3db489cb623db2a0.js} +2 -2
  86. package/.next/static/chunks/app/traceability/risk/[id]/page-7ad88ba1689b2e04.js +1 -0
  87. package/.next/static/chunks/app/traceability/urs/[id]/page-e8872b6ed9179646.js +1 -0
  88. package/.next/static/chunks/webpack-7a795bfa2b8aa8ab.js +1 -0
  89. package/bin/cli.js +3 -2
  90. package/package.json +1 -1
  91. package/.next/server/chunks/4228.js +0 -1
  92. package/.next/server/chunks/7792.js +0 -1
  93. package/.next/server/chunks/972.js +0 -1
  94. package/.next/static/chunks/6184.1deabc6af2557dbb.js +0 -1
  95. package/.next/static/chunks/9447.55ff38194a755c72.js +0 -1
  96. package/.next/static/chunks/app/releases/page-4e43a538a0e874d8.js +0 -1
  97. package/.next/static/chunks/app/specs/[id]/page-8c890ab08da58f84.js +0 -1
  98. package/.next/static/chunks/app/traceability/archive/page-c458b43550f7034d.js +0 -1
  99. package/.next/static/chunks/app/traceability/risk/[id]/page-adc9c209850269e5.js +0 -1
  100. package/.next/static/chunks/app/traceability/urs/[id]/page-850d1a36c8348af1.js +0 -1
  101. package/.next/static/chunks/webpack-3cbbd068a3e89965.js +0 -1
  102. /package/.next/static/{q_cOKaae4m3MSKJsyyYq4 → -zkqeOw2buc-dKRsOhWAF}/_buildManifest.js +0 -0
  103. /package/.next/static/{q_cOKaae4m3MSKJsyyYq4 → -zkqeOw2buc-dKRsOhWAF}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";exports.id=4228,exports.ids=[4228],exports.modules={54228:(a,b,c)=>{c.d(b,{archiveDesignAction:()=>g,restoreDesignAction:()=>f,saveDesign:()=>e,updateDesignAction:()=>h});var d=c(99829);let e=(0,d.createServerReference)("403552e4b842bfe24d95e67c6d13d49bac9211e837",d.callServer,void 0,d.findSourceMapURL,"saveDesign"),f=(0,d.createServerReference)("404beeb5e8ef1f16054a1ebe26ebcb20ba1cb4397f",d.callServer,void 0,d.findSourceMapURL,"restoreDesignAction"),g=(0,d.createServerReference)("40a7881142602d0cdce526e8075bd303ffeadab996",d.callServer,void 0,d.findSourceMapURL,"archiveDesignAction"),h=(0,d.createServerReference)("60a9843cc78dc99dc97b4a36b2acd68f67ae7876c9",d.callServer,void 0,d.findSourceMapURL,"updateDesignAction")},99829:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0});var d={callServer:function(){return f.callServer},createServerReference:function(){return h.createServerReference},findSourceMapURL:function(){return g.findSourceMapURL}};for(var e in d)Object.defineProperty(b,e,{enumerable:!0,get:d[e]});let f=c(35766),g=c(87006),h=c(35569)}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=7792,exports.ids=[7792],exports.modules={57792:(a,b,c)=>{c.d(b,{saveFS:()=>j,saveRisk:()=>e,saveURS:()=>f,updateFSLinksAction:()=>g,updateRiskAction:()=>i,updateURSAction:()=>h});var d=c(99829);let e=(0,d.createServerReference)("40e96b65ed586a5cdd7c12132f5aa2a39f475b0217",d.callServer,void 0,d.findSourceMapURL,"saveRisk"),f=(0,d.createServerReference)("40f9ba2859ee6de602a9d91376776693376aa0fa4f",d.callServer,void 0,d.findSourceMapURL,"saveURS"),g=(0,d.createServerReference)("608454aa0d8a293604466726d6a7733176599501d9",d.callServer,void 0,d.findSourceMapURL,"updateFSLinksAction"),h=(0,d.createServerReference)("60b0f91c1e708a26dd7569d2ba8dba9832072d5075",d.callServer,void 0,d.findSourceMapURL,"updateURSAction"),i=(0,d.createServerReference)("60de5dda007eff227330d7fd062850db87aae271e1",d.callServer,void 0,d.findSourceMapURL,"updateRiskAction"),j=(0,d.createServerReference)("705401a4cb2a9767d77fc7819cc1e9818cc888c2f5",d.callServer,void 0,d.findSourceMapURL,"saveFS")}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=972,exports.ids=[972],exports.modules={11390:(a,b,c)=>{c.d(b,{R:()=>h});var d=c(48249),e=c(73142),f=c.n(e);function g({isOpen:a,onClose:b,children:c,width:e="500px"}){return a?(0,d.jsxs)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(4px)",background:"rgba(0, 0, 0, 0.5)",animation:"fadeIn 0.2s ease-out"},className:"jsx-5d567d25508aa188",children:[(0,d.jsx)("div",{onClick:a=>a.stopPropagation(),style:{background:"var(--bg-primary)",borderRadius:"12px",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",width:e,maxWidth:"90%",maxHeight:"90vh",overflow:"auto",border:"1px solid var(--border)",animation:"slideUp 0.2s ease-out"},className:"jsx-5d567d25508aa188",children:c}),(0,d.jsx)(f(),{id:"5d567d25508aa188",children:"@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes slideUp{from{opacity:0;transform:scale(.95)translatey(10px)}to{opacity:1;transform:scale(1)translatey(0)}}"})]}):null}function h({isOpen:a,onClose:b,onConfirm:c,title:e,message:f,confirmLabel:h="Confirm",cancelLabel:i="Cancel",isDangerous:j=!1}){return(0,d.jsx)(g,{isOpen:a,onClose:b,width:"400px",children:(0,d.jsxs)("div",{style:{padding:"1.5rem"},children:[(0,d.jsx)("h3",{style:{margin:"0 0 0.5rem 0",fontSize:"1.25rem",fontWeight:600},children:e}),(0,d.jsx)("p",{style:{margin:"0 0 1.5rem 0",color:"var(--text-secondary)",lineHeight:1.5},children:f}),(0,d.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.75rem"},children:[(0,d.jsx)("button",{onClick:b,className:"btn",style:{background:"transparent",border:"1px solid var(--border)",color:"var(--text-primary)"},children:i}),(0,d.jsx)("button",{onClick:()=>{c(),b()},className:"btn",style:{background:j?"var(--error)":"var(--accent)",color:"white",border:"none",fontWeight:600},children:h})]})]})})}c(67484)},11851:(a,b,c)=>{c.r(b),c.d(b,{default:()=>e});var d=c(5735);function e({children:a}){return(0,d.jsx)("div",{children:a})}},87767:(a,b,c)=>{c.r(b),c.d(b,{"4018ccaaa027ba7f3593e5d745a6fe390f7342043e":()=>w,"4020f05a9672914a4f917930d4c932391d5246a769":()=>t,"402d9b235abd2968da2b1e42d1730b1638c9c32124":()=>v,"407ab6ae77072963ae1d27ba83a2fb372a0035d7e1":()=>u,"40ce3b864634c94182c09d0f6ac7fefb5b0e53bbe6":()=>x,"40e96b65ed586a5cdd7c12132f5aa2a39f475b0217":()=>p,"40f8a2e055e173114c24aab3d7166e4cf6b15cd287":()=>s,"40f9ba2859ee6de602a9d91376776693376aa0fa4f":()=>n,"608454aa0d8a293604466726d6a7733176599501d9":()=>r,"60b0f91c1e708a26dd7569d2ba8dba9832072d5075":()=>o,"60de5dda007eff227330d7fd062850db87aae271e1":()=>q,"705401a4cb2a9767d77fc7819cc1e9818cc888c2f5":()=>m});var d=c(95349),e=c(29021),f=c.n(e),g=c(33873),h=c.n(g),i=c(42650),j=c(27954),k=c(13454);function l(a,b){let c=a.split("\n"),d=[],e=[],f=!1;for(let a of c){let b=a.trim();if(b.startsWith("@")&&!f){let a=b.split(/\s+/).filter(a=>a.startsWith("@"));e.push(...a)}else if(b.startsWith("Feature:")){f=!0;break}}let g=c.find(a=>a.trim().startsWith("Feature:")),i=g?.match(/Feature:\s*(.+)/),j=i?.[1]||h().basename(b),k=e.find(a=>/^@FS-\d+$/i.test(a))?.replace("@","").toUpperCase(),l=j.match(/^(FS-\d+)/i),m=h().basename(b).match(/^(FS-\d+)/i),n=k||l?.[1].toUpperCase()||m?.[1].toUpperCase()||h().basename(b,".feature").toUpperCase(),o=j;l&&(o=(o=o.substring(l[1].length).trim()).replace(/^[:\-\s]+/,""));let p=c.findIndex(a=>a.trim().startsWith("Feature:")),q="",r=[];for(let a=p+1;a<c.length;a++){let b=c[a].trim();if(b.startsWith("Scenario")||b.startsWith("Background")||b.startsWith("@"))break;b.startsWith("-")?r.push(b.substring(1).trim()):b&&!b.startsWith("Requirements:")&&(q+=(q?" ":"")+b)}let s=null;for(let a=0;a<c.length;a++){let b=c[a].trim();if(b.startsWith("Scenario Outline:")||b.startsWith("Scenario:")){s&&d.push(s);let e=b.startsWith("Scenario Outline:"),f=b.replace(/Scenario( Outline)?:\s*/,""),g=[];for(let b=a-1;b>=0;b--){let a=c[b].trim();if(a.startsWith("@")){let b=a.split(/\s+/).filter(a=>a.startsWith("@"));g.unshift(...b)}else if(a)break}s={name:f,tags:g,steps:[],line:a+1,is_outline:e}}s&&/^(Given|When|Then|And|But)\s/.test(b)&&s.steps.push(b)}s&&d.push(s);let t=e.filter(a=>a.match(/@URS-\d+/)).map(a=>a.replace("@","")),u=e.filter(a=>a.match(/@RISK-\d+/)).map(a=>a.replace("@","")),v=new Date().toISOString().split("T")[0];return{id:n,type:"fs",title:o,file_path:b,description:q,requirements:r,urs_ids:t,risk_ids:u,scenarios:d,scenario_count:d.length,created_at:v,updated_at:v}}async function m(a,b,d){try{let e,g=process.env.MACHINE_SPECS_DIR||h().join(process.cwd(),"specs"),j=a,m=b;if(!d&&a.startsWith("FS-NEW-")){let{getNextId:a}=await Promise.resolve().then(c.bind(c,624));e=a("FS","fs");let d=(m=b.includes("@FS-XXX")?b.replace("@FS-XXX",`@${e}`):b.replace(/Feature: FS-[A-Z0-9]+/,`Feature: ${e}`)).match(/Feature:\s*(.+)/),f=d?.[1]?.trim()||"Untitled",g=(f=f.replace(/^FS-\d+[:\-\s]*/,"")).toLowerCase().replace(/[^a-z0-9]+/g,"-");j=`${e}-${g}.feature`}else{let b=l(m,d||a),c=b.title.toLowerCase().replace(/[^a-z0-9]+/g,"-"),e=b.id;j=`${e}-${c}.feature`}let n=j.replace(/[^a-zA-Z0-9\-_\.]/g,"-").toLowerCase();if(!n.endsWith(".feature"))return{success:!1,error:"Filename must end with .feature"};let o=h().join(g,"fs",n);if(d&&d!==o&&f().existsSync(d)&&f().unlinkSync(d),!d&&f().existsSync(o))return{success:!1,error:`File ${n} already exists`};f().writeFileSync(o,m,"utf-8");let p=l(m,o);return(0,k.Dl)(p),(0,i.revalidatePath)("/"),(0,i.revalidatePath)("/matrix"),(0,i.revalidatePath)("/builder"),(0,i.revalidatePath)("/traceability"),{success:!0,id:p.id}}catch(a){return{success:!1,error:String(a)}}}async function n(a){try{let b=(0,j.r_)(a);return(0,i.revalidatePath)("/"),(0,i.revalidatePath)("/matrix"),(0,i.revalidatePath)("/builder"),(0,i.revalidatePath)("/traceability"),{success:!0,id:b.id}}catch(a){return{success:!1,error:String(a)}}}async function o(a,b){try{let{updateURS:d}=await Promise.resolve().then(c.bind(c,15177)),e=d(a,b);if(!e)return{success:!1,error:"URS not found"};return(0,i.revalidatePath)("/"),(0,i.revalidatePath)("/matrix"),(0,i.revalidatePath)("/builder"),(0,i.revalidatePath)("/traceability"),{success:!0,id:e.id}}catch(a){return{success:!1,error:String(a)}}}async function p(a){try{let b=(0,j.w)(a);return(0,i.revalidatePath)("/"),(0,i.revalidatePath)("/matrix"),(0,i.revalidatePath)("/builder"),(0,i.revalidatePath)("/traceability"),{success:!0,id:b.id}}catch(a){return{success:!1,error:String(a)}}}async function q(a,b){try{let{updateRisk:d}=await Promise.resolve().then(c.bind(c,18986)),e=d(a,b);if(!e)return{success:!1,error:"Risk not found"};return(0,i.revalidatePath)("/"),(0,i.revalidatePath)("/matrix"),(0,i.revalidatePath)("/builder"),(0,i.revalidatePath)("/traceability"),{success:!0,id:e.id}}catch(a){return{success:!1,error:String(a)}}}async function r(a,b){try{let{updateFSURSLinks:d}=await Promise.resolve().then(c.bind(c,13454));if(!d(a,b))return{success:!1,error:"Failed to update links"};return(0,i.revalidatePath)("/"),(0,i.revalidatePath)("/matrix"),(0,i.revalidatePath)("/traceability"),{success:!0,id:a}}catch(a){return{success:!1,error:String(a)}}}async function s(a){(0,j.PM)(a),(0,i.revalidatePath)("/traceability/urs"),(0,i.revalidatePath)(`/traceability/urs/${a}`)}async function t(a){(0,j.tf)(a),(0,i.revalidatePath)("/traceability/urs"),(0,i.revalidatePath)("/traceability/archive")}async function u(a){(0,j.kW)(a),(0,i.revalidatePath)("/traceability/fs"),(0,i.revalidatePath)(`/traceability/fs/${a}`)}async function v(a){(0,j.wO)(a),(0,i.revalidatePath)("/traceability/fs"),(0,i.revalidatePath)("/traceability/archive")}async function w(a){(0,j.Ei)(a),(0,i.revalidatePath)("/traceability/risk"),(0,i.revalidatePath)(`/traceability/risk/${a}`)}async function x(a){(0,j.og)(a),(0,i.revalidatePath)("/traceability/risk"),(0,i.revalidatePath)("/traceability/archive")}(0,c(89337).D)([m,n,o,p,q,r,s,t,u,v,w,x]),(0,d.A)(m,"705401a4cb2a9767d77fc7819cc1e9818cc888c2f5",null),(0,d.A)(n,"40f9ba2859ee6de602a9d91376776693376aa0fa4f",null),(0,d.A)(o,"60b0f91c1e708a26dd7569d2ba8dba9832072d5075",null),(0,d.A)(p,"40e96b65ed586a5cdd7c12132f5aa2a39f475b0217",null),(0,d.A)(q,"60de5dda007eff227330d7fd062850db87aae271e1",null),(0,d.A)(r,"608454aa0d8a293604466726d6a7733176599501d9",null),(0,d.A)(s,"40f8a2e055e173114c24aab3d7166e4cf6b15cd287",null),(0,d.A)(t,"4020f05a9672914a4f917930d4c932391d5246a769",null),(0,d.A)(u,"407ab6ae77072963ae1d27ba83a2fb372a0035d7e1",null),(0,d.A)(v,"402d9b235abd2968da2b1e42d1730b1638c9c32124",null),(0,d.A)(w,"4018ccaaa027ba7f3593e5d745a6fe390f7342043e",null),(0,d.A)(x,"40ce3b864634c94182c09d0f6ac7fefb5b0e53bbe6",null)},99829:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0});var d={callServer:function(){return f.callServer},createServerReference:function(){return h.createServerReference},findSourceMapURL:function(){return g.findSourceMapURL}};for(var e in d)Object.defineProperty(b,e,{enumerable:!0,get:d[e]});let f=c(35766),g=c(87006),h=c(35569)}};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6184],{9339:(e,r,c)=>{Object.defineProperty(r,"__esModule",{value:!0});var a={callServer:function(){return i.callServer},createServerReference:function(){return f.createServerReference},findSourceMapURL:function(){return t.findSourceMapURL}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let i=c(77304),t=c(4060),f=c(77197)},86184:(e,r,c)=>{c.d(r,{archiveDesignAction:()=>t,restoreDesignAction:()=>i,saveDesign:()=>n,updateDesignAction:()=>f});var a=c(9339);let n=(0,a.createServerReference)("403552e4b842bfe24d95e67c6d13d49bac9211e837",a.callServer,void 0,a.findSourceMapURL,"saveDesign"),i=(0,a.createServerReference)("404beeb5e8ef1f16054a1ebe26ebcb20ba1cb4397f",a.callServer,void 0,a.findSourceMapURL,"restoreDesignAction"),t=(0,a.createServerReference)("40a7881142602d0cdce526e8075bd303ffeadab996",a.callServer,void 0,a.findSourceMapURL,"archiveDesignAction"),f=(0,a.createServerReference)("60a9843cc78dc99dc97b4a36b2acd68f67ae7876c9",a.callServer,void 0,a.findSourceMapURL,"updateDesignAction")}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9447],{39447:(e,a,r)=>{r.d(a,{saveFS:()=>n,saveRisk:()=>d,saveURS:()=>S,updateFSLinksAction:()=>f,updateRiskAction:()=>v,updateURSAction:()=>i});var c=r(9339);let d=(0,c.createServerReference)("40e96b65ed586a5cdd7c12132f5aa2a39f475b0217",c.callServer,void 0,c.findSourceMapURL,"saveRisk"),S=(0,c.createServerReference)("40f9ba2859ee6de602a9d91376776693376aa0fa4f",c.callServer,void 0,c.findSourceMapURL,"saveURS"),f=(0,c.createServerReference)("608454aa0d8a293604466726d6a7733176599501d9",c.callServer,void 0,c.findSourceMapURL,"updateFSLinksAction"),i=(0,c.createServerReference)("60b0f91c1e708a26dd7569d2ba8dba9832072d5075",c.callServer,void 0,c.findSourceMapURL,"updateURSAction"),v=(0,c.createServerReference)("60de5dda007eff227330d7fd062850db87aae271e1",c.callServer,void 0,c.findSourceMapURL,"updateRiskAction"),n=(0,c.createServerReference)("705401a4cb2a9767d77fc7819cc1e9818cc888c2f5",c.callServer,void 0,c.findSourceMapURL,"saveFS")}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4549],{9339:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={callServer:function(){return n.callServer},createServerReference:function(){return o.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let n=t(77304),i=t(4060),o=t(77197)},65411:(e,r,t)=>{Promise.resolve().then(t.bind(t,73933))},73933:(e,r,t)=>{"use strict";t.d(r,{ReleasesClient:()=>d});var s=t(95155),a=t(12115),n=t(98500),i=t.n(n),o=t(9339);let l=(0,o.createServerReference)("40ba86e1c6a00fcc312dcd7ca7ac62c384302d2f84",o.callServer,void 0,o.findSourceMapURL,"createReleaseAction");function d({releases:e}){let[r,t]=(0,a.useState)(!1),[n,i]=(0,a.useState)(""),[o,d]=(0,a.useState)(""),[m,x]=(0,a.useState)(""),[g,h]=(0,a.useTransition)();return(0,s.jsxs)("div",{style:{maxWidth:"1200px",margin:"0 auto",padding:"2rem"},children:[(0,s.jsx)("header",{style:{marginBottom:"2rem"},children:(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{style:{fontSize:"2rem",fontWeight:700,marginBottom:"0.5rem"},children:"\uD83D\uDCE6 Releases"}),(0,s.jsx)("p",{style:{color:"var(--text-secondary)"},children:"Manage releases, track test execution, and compare changes"})]}),(0,s.jsx)("button",{onClick:()=>t(!0),className:"btn btn-primary",children:"+ New Release"})]})}),r&&(0,s.jsxs)("div",{className:"card",style:{marginBottom:"1.5rem"},children:[(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"1.5rem",paddingBottom:"1rem",borderBottom:"1px solid var(--border)"},children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{style:{margin:0,fontSize:"1.25rem",fontWeight:600},children:"\uD83D\uDCE6 New Release"}),(0,s.jsx)("p",{style:{margin:"0.25rem 0 0",color:"var(--text-secondary)",fontSize:"0.875rem"},children:"Create a new release to track features and test results"})]}),(0,s.jsxs)("div",{style:{display:"flex",gap:"0.75rem"},children:[(0,s.jsx)("button",{onClick:()=>t(!1),disabled:g,style:{padding:"0.75rem 1.5rem",background:"transparent",border:"1px solid var(--border)",borderRadius:"10px",color:"var(--text-secondary)",cursor:"pointer",fontWeight:600},children:"Cancel"}),(0,s.jsx)("button",{onClick:()=>{h(async()=>{await l({version:n,name:o,notes:m||void 0}),t(!1),i(""),d(""),x("")})},disabled:g||!n||!o,style:{padding:"0.75rem 1.5rem",fontSize:"0.9375rem",fontWeight:600,borderRadius:"10px",border:"none",cursor:!g&&n&&o?"pointer":"not-allowed",background:!g&&n&&o?"linear-gradient(135deg, var(--gradient-start), var(--gradient-end))":"var(--bg-hover)",color:!g&&n&&o?"white":"var(--text-secondary)",boxShadow:!g&&n&&o?"0 4px 12px rgba(99, 102, 241, 0.25)":"none"},children:g?"\uD83D\uDCBE Creating...":"\uD83D\uDCBE Create Release"})]})]}),(0,s.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"200px 1fr",gap:"1.5rem",marginBottom:"1.5rem"},children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{style:{display:"block",fontWeight:500,fontSize:"0.875rem",marginBottom:"0.5rem",color:"var(--text-primary)"},children:["Version ",(0,s.jsx)("span",{style:{color:"var(--accent)",fontSize:"0.75rem"},children:"Required"})]}),(0,s.jsx)("input",{type:"text",value:n,onChange:e=>i(e.target.value),placeholder:"e.g., 1.0.0",style:{width:"100%",padding:"0.875rem 1rem",fontSize:"0.9375rem",background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:"10px",color:"var(--text-primary)",outline:"none"}})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{style:{display:"block",fontWeight:500,fontSize:"0.875rem",marginBottom:"0.5rem",color:"var(--text-primary)"},children:["Name ",(0,s.jsx)("span",{style:{color:"var(--accent)",fontSize:"0.75rem"},children:"Required"})]}),(0,s.jsx)("input",{type:"text",value:o,onChange:e=>d(e.target.value),placeholder:"e.g., Initial Release, MVP, Feature Update",style:{width:"100%",padding:"0.875rem 1rem",fontSize:"0.9375rem",background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:"10px",color:"var(--text-primary)",outline:"none"}})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{style:{display:"block",fontWeight:500,fontSize:"0.875rem",marginBottom:"0.5rem",color:"var(--text-primary)"},children:["Release Notes ",(0,s.jsx)("span",{style:{color:"var(--text-secondary)",fontSize:"0.8125rem",fontWeight:400},children:"— optional"})]}),(0,s.jsx)("textarea",{value:m,onChange:e=>x(e.target.value),placeholder:"What's changing in this release...",rows:4,style:{width:"100%",padding:"0.875rem 1rem",fontSize:"0.9375rem",background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:"10px",color:"var(--text-primary)",outline:"none",resize:"vertical",fontFamily:"inherit"}})]})]}),0===e.length?(0,s.jsxs)("div",{className:"card",style:{textAlign:"center",padding:"3rem"},children:[(0,s.jsx)("p",{style:{fontSize:"3rem",marginBottom:"1rem"},children:"\uD83D\uDCE6"}),(0,s.jsx)("h2",{style:{marginBottom:"0.5rem"},children:"No Releases Yet"}),(0,s.jsx)("p",{style:{color:"var(--text-secondary)",marginBottom:"1rem"},children:"Create your first release to start tracking features and test results."}),(0,s.jsx)("button",{onClick:()=>t(!0),className:"btn btn-primary",children:"Create First Release"})]}):(0,s.jsx)("div",{style:{display:"grid",gap:"1rem"},children:e.map(e=>(0,s.jsx)(c,{release:e},e.id))})]})}function c({release:e}){let r={planning:{bg:"rgba(168, 85, 247, 0.1)",color:"#a855f7"},testing:{bg:"rgba(59, 130, 246, 0.1)",color:"#3b82f6"},released:{bg:"rgba(34, 197, 94, 0.1)",color:"#22c55e"}}[e.status];return(0,s.jsx)(i(),{href:`/releases/${e.id}`,style:{textDecoration:"none"},children:(0,s.jsx)("div",{className:"card",style:{borderLeft:`4px solid ${r.color}`,transition:"transform 0.15s, box-shadow 0.15s",cursor:"pointer"},children:(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[(0,s.jsxs)("div",{style:{flex:1},children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem",marginBottom:"0.5rem"},children:[(0,s.jsx)("code",{style:{fontSize:"1.25rem",fontWeight:700,color:r.color},children:e.id}),(0,s.jsxs)("span",{style:{fontSize:"1rem",fontWeight:600,color:"var(--text-primary)"},children:["v",e.version]}),(0,s.jsx)("span",{className:"badge",style:{background:r.bg,color:r.color},children:e.status})]}),(0,s.jsx)("h3",{style:{fontSize:"1.125rem",fontWeight:600,marginBottom:"0.5rem",color:"var(--text-primary)"},children:e.name}),(0,s.jsxs)("p",{style:{fontSize:"0.875rem",color:"var(--text-secondary)"},children:["Created ",e.created_at,e.released_at&&` • Released ${e.released_at}`]})]}),(0,s.jsxs)("div",{style:{display:"flex",gap:"1.5rem",textAlign:"center"},children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{style:{fontSize:"1.5rem",fontWeight:700,color:"var(--warning)"},children:e.fs_count}),(0,s.jsx)("div",{style:{fontSize:"0.75rem",color:"var(--text-secondary)"},children:"Features"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{style:{fontSize:"1.5rem",fontWeight:700,color:"var(--accent)"},children:e.test_runs}),(0,s.jsx)("div",{style:{fontSize:"0.75rem",color:"var(--text-secondary)"},children:"Test Runs"})]}),null!==e.latest_pass_rate&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{style:{fontSize:"1.5rem",fontWeight:700,color:100===e.latest_pass_rate?"var(--success)":e.latest_pass_rate>=80?"var(--warning)":"var(--error)"},children:[e.latest_pass_rate.toFixed(0),"%"]}),(0,s.jsx)("div",{style:{fontSize:"0.75rem",color:"var(--text-secondary)"},children:"Pass Rate"})]})]})]})})})}}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=65411)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5385],{9339:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={callServer:function(){return s.callServer},createServerReference:function(){return n.createServerReference},findSourceMapURL:function(){return l.findSourceMapURL}};for(var i in r)Object.defineProperty(t,i,{enumerable:!0,get:r[i]});let s=a(77304),l=a(4060),n=a(77197)},39982:(e,t,a)=>{"use strict";a.d(t,{URSDetailClient:()=>d});var r=a(95155),i=a(12115),s=a(98500),l=a.n(s),n=a(9339);let c=(0,n.createServerReference)("60ec32356e263479470747191396a309125148cf0b",n.callServer,void 0,n.findSourceMapURL,"updateURSAction");function d({urs:e,linkedFS:t,linkedRisks:a}){let[s,n]=(0,i.useState)(!1),[d,p]=(0,i.useTransition)(),[m,h]=(0,i.useState)({title:e.title,status:e.status,priority:e.priority,owner:e.owner,category:e.category,business_need:e.business_need,intended_use:e.intended_use,acceptance_criteria:e.acceptance_criteria}),u=e.title.includes("(Undefined)"),g=({value:e,onChange:t,multiline:a,placeholder:i})=>s?a?(0,r.jsx)("textarea",{value:e,onChange:e=>t(e.target.value),rows:4,className:"input",style:{width:"100%",resize:"vertical"}}):(0,r.jsx)("input",{type:"text",value:e,onChange:e=>t(e.target.value),className:"input",style:{width:"100%"}}):(0,r.jsx)("span",{style:{whiteSpace:"pre-wrap",color:"var(--text-secondary)",fontStyle:e?"normal":"italic"},children:e||i||"Not defined"}),x=({value:e,onChange:t,options:a})=>s?(0,r.jsx)("select",{value:e,onChange:e=>t(e.target.value),className:"input",children:a.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}):(0,r.jsx)("span",{style:{textTransform:"capitalize"},children:e});return(0,r.jsxs)("div",{children:[(0,r.jsxs)("header",{className:"page-header",children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"1rem",marginBottom:"0.5rem",flexWrap:"wrap"},children:[(0,r.jsx)("code",{style:{fontSize:"1.5rem",fontWeight:700,color:"var(--success)",background:"rgba(16, 185, 129, 0.1)",padding:"0.5rem 1rem",borderRadius:"8px"},children:e.id}),s?(0,r.jsx)(x,{value:m.status,onChange:e=>h({...m,status:e}),options:[{value:"draft",label:"Draft"},{value:"review",label:"Review"},{value:"approved",label:"Approved"}]}):(0,r.jsx)("span",{className:`badge ${"approved"===e.status?"badge-success":"badge-warning"}`,children:m.status}),s?(0,r.jsx)(x,{value:m.priority,onChange:e=>h({...m,priority:e}),options:[{value:"critical",label:"Critical"},{value:"high",label:"High"},{value:"medium",label:"Medium"},{value:"low",label:"Low"}]}):(0,r.jsx)("span",{className:"badge",style:{background:"var(--bg-hover)"},children:m.priority}),u&&!s&&(0,r.jsx)("span",{className:"badge",style:{background:"rgba(239, 68, 68, 0.2)",color:"var(--error)"},children:"Needs Definition"}),(0,r.jsx)("div",{style:{marginLeft:"auto",display:"flex",gap:"0.5rem"},children:s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{onClick:()=>{h({title:e.title,status:e.status,priority:e.priority,owner:e.owner,category:e.category,business_need:e.business_need,intended_use:e.intended_use,acceptance_criteria:e.acceptance_criteria}),n(!1)},className:"btn",disabled:d,children:"Cancel"}),(0,r.jsx)("button",{onClick:()=>{p(async()=>{await c(e.id,m),n(!1)})},className:"btn btn-primary",disabled:d,children:d?"Saving...":"\uD83D\uDCBE Save"})]}):(0,r.jsx)("button",{onClick:()=>n(!0),className:"btn btn-primary",children:"✏️ Edit"})})]}),s?(0,r.jsx)("input",{type:"text",value:m.title,onChange:e=>h({...m,title:e.target.value}),className:"input",style:{fontSize:"1.5rem",fontWeight:700,width:"100%",marginBottom:"0.5rem"}}):(0,r.jsx)("h1",{className:"page-title",children:m.title}),(0,r.jsxs)("p",{className:"page-subtitle",children:["User Requirement Specification • Owner: ",s?(0,r.jsx)("input",{type:"text",value:m.owner,onChange:e=>h({...m,owner:e.target.value}),className:"input",style:{width:"200px",display:"inline-block"}}):m.owner]})]}),u&&!s&&(0,r.jsx)("div",{className:"card",style:{marginBottom:"1.5rem",background:"rgba(239, 68, 68, 0.1)",borderLeft:"4px solid var(--error)"},children:(0,r.jsxs)("p",{style:{margin:0,color:"var(--error)"},children:["⚠️ This URS was auto-created from FS references. Click ",(0,r.jsx)("strong",{children:"Edit"})," to define its details."]})}),(0,r.jsxs)("div",{className:"card",style:{marginBottom:"1.5rem"},children:[(0,r.jsx)("h2",{className:"card-title",children:"\uD83D\uDD17 Traceability"}),(0,r.jsxs)("div",{style:{display:"flex",gap:"2rem",flexWrap:"wrap"},children:[(0,r.jsx)(o,{label:"Functional Specs",count:t.length,color:"var(--warning)"}),(0,r.jsx)(o,{label:"Test Scenarios",count:t.reduce((e,t)=>e+t.scenarios.length,0),color:"var(--accent)"}),(0,r.jsx)(o,{label:"Risk Assessments",count:a.length,color:"#f97316"})]})]}),(0,r.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"1.5rem"},children:[(0,r.jsxs)("div",{className:"card",children:[(0,r.jsx)("h2",{className:"card-title",children:"\uD83D\uDCCB Business Need"}),(0,r.jsx)("div",{style:{lineHeight:1.7},children:(0,r.jsx)(g,{value:m.business_need,onChange:e=>h({...m,business_need:e}),multiline:!0,placeholder:"Not defined"})})]}),(0,r.jsxs)("div",{className:"card",children:[(0,r.jsx)("h2",{className:"card-title",children:"\uD83C\uDFAF Intended Use"}),(0,r.jsx)("div",{style:{lineHeight:1.7},children:(0,r.jsx)(g,{value:m.intended_use,onChange:e=>h({...m,intended_use:e}),multiline:!0,placeholder:"Not defined"})})]})]}),(0,r.jsxs)("div",{className:"card",style:{marginTop:"1.5rem"},children:[(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"1rem"},children:[(0,r.jsx)("h2",{className:"card-title",style:{margin:0},children:"✅ Acceptance Criteria"}),s&&(0,r.jsx)("button",{onClick:()=>h({...m,acceptance_criteria:[...m.acceptance_criteria,""]}),className:"btn",style:{padding:"0.25rem 0.75rem"},children:"+ Add"})]}),0===m.acceptance_criteria.length?(0,r.jsx)("p",{style:{color:"var(--text-secondary)",fontStyle:"italic"},children:"No acceptance criteria defined"}):s?(0,r.jsx)("div",{style:{display:"grid",gap:"0.5rem"},children:m.acceptance_criteria.map((e,t)=>(0,r.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,r.jsx)("input",{type:"text",value:e,onChange:e=>{let a=[...m.acceptance_criteria];a[t]=e.target.value,h({...m,acceptance_criteria:a})},className:"input",style:{flex:1},placeholder:`Criterion ${t+1}`}),(0,r.jsx)("button",{onClick:()=>h({...m,acceptance_criteria:m.acceptance_criteria.filter((e,a)=>a!==t)}),className:"btn",style:{padding:"0.5rem"},children:"\xd7"})]},t))}):(0,r.jsx)("ul",{style:{margin:0,paddingLeft:"1.5rem"},children:m.acceptance_criteria.map((e,t)=>(0,r.jsx)("li",{style:{marginBottom:"0.5rem",color:"var(--text-secondary)"},children:e},t))})]}),(0,r.jsxs)("div",{className:"card",style:{marginTop:"1.5rem"},children:[(0,r.jsx)("h2",{className:"card-title",children:"⚙️ Linked Functional Specifications"}),0===t.length?(0,r.jsx)("p",{style:{color:"var(--text-secondary)"},children:"No FS linked yet"}):(0,r.jsx)("div",{style:{display:"grid",gap:"1rem"},children:t.map(e=>(0,r.jsx)(l(),{href:`/specs/${e.id}`,style:{textDecoration:"none"},children:(0,r.jsx)("div",{style:{padding:"1rem",background:"var(--bg-hover)",borderRadius:"8px",borderLeft:"4px solid var(--warning)"},children:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem"},children:[(0,r.jsx)("code",{style:{fontWeight:600,color:"var(--warning)"},children:e.id}),(0,r.jsx)("span",{style:{color:"var(--text-primary)"},children:e.title}),(0,r.jsxs)("span",{className:"badge badge-success",style:{marginLeft:"auto"},children:[e.scenario_count," tests"]})]})})},e.id))})]})]})}function o({label:e,count:t,color:a}){return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{style:{fontSize:"0.75rem",color:"var(--text-secondary)",marginBottom:"0.25rem"},children:e}),(0,r.jsx)("div",{style:{fontSize:"1.5rem",fontWeight:700,color:a},children:t})]})}},60550:(e,t,a)=>{"use strict";a.d(t,{ScenarioList:()=>l});var r=a(95155),i=a(12115);function s({scenario:e,isHighlighted:t}){return(0,r.jsxs)("div",{style:{padding:"1rem",background:t?"rgba(96, 165, 250, 0.1)":"var(--bg-hover)",borderRadius:"8px",border:t?"2px solid var(--accent)":"1px solid var(--border)"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem",marginBottom:"0.75rem"},children:[(0,r.jsx)("span",{style:{color:"var(--accent)"},children:"\uD83E\uDDEA"}),(0,r.jsx)("span",{style:{fontWeight:600},children:e.name}),e.tags.length>0&&(0,r.jsx)("span",{style:{marginLeft:"auto",fontSize:"0.75rem",color:"var(--text-secondary)"},children:e.tags.join(" ")})]}),(0,r.jsx)("div",{style:{fontFamily:"monospace",fontSize:"0.8125rem",lineHeight:1.6},children:e.steps.map((e,t)=>{var a;return(0,r.jsx)("div",{style:{color:(a=e).startsWith("Given")?"#a78bfa":a.startsWith("When")?"#60a5fa":a.startsWith("Then")?"#34d399":"var(--text-secondary)"},children:e},t)})})]})}function l({scenarios:e,highlightScenario:t}){let a=(0,i.useRef)(null);return(0,i.useEffect)(()=>{t&&a.current&&setTimeout(()=>{a.current?.scrollIntoView({behavior:"smooth",block:"center"})},100)},[t]),(0,r.jsx)("div",{style:{display:"grid",gap:"0.75rem"},children:e.map((e,i)=>{let l=t===e.name;return(0,r.jsx)("div",{ref:l?a:void 0,children:(0,r.jsx)(s,{scenario:e,isHighlighted:l})},i)})})}a(98500)},76164:(e,t,a)=>{Promise.resolve().then(a.t.bind(a,98500,23)),Promise.resolve().then(a.bind(a,97895)),Promise.resolve().then(a.bind(a,60550)),Promise.resolve().then(a.bind(a,39982))},97895:(e,t,a)=>{"use strict";a.d(t,{RiskDetailClient:()=>d});var r=a(95155),i=a(12115),s=a(98500),l=a.n(s),n=a(9339);let c=(0,n.createServerReference)("606e83d2c2c92ecd2809d7f358a323fb09123cf6fa",n.callServer,void 0,n.findSourceMapURL,"updateRiskAction");function d({risk:e,linkedFS:t}){let[a,s]=(0,i.useState)(!1),[n,d]=(0,i.useTransition)(),[m,h]=(0,i.useState)({title:e.title,status:e.status,category:e.category,impact:e.impact,probability:e.probability,risk_level:e.risk_level,residual_risk:e.residual_risk}),u=e.title.includes("(Undefined)");return(0,r.jsxs)("div",{children:[(0,r.jsxs)("header",{className:"page-header",children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"1rem",marginBottom:"0.5rem",flexWrap:"wrap"},children:[(0,r.jsx)("code",{style:{fontSize:"1.5rem",fontWeight:700,color:"#f97316",background:"rgba(249, 115, 22, 0.1)",padding:"0.5rem 1rem",borderRadius:"8px"},children:e.id}),a?(0,r.jsx)(({value:e,onChange:t,options:i})=>a?(0,r.jsx)("select",{value:e,onChange:e=>t(e.target.value),className:"input",children:i.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}):(0,r.jsx)("span",{style:{textTransform:"capitalize"},children:e}),{value:m.status,onChange:e=>h({...m,status:e}),options:[{value:"draft",label:"Draft"},{value:"review",label:"Review"},{value:"approved",label:"Approved"}]}):(0,r.jsx)("span",{className:`badge ${"approved"===e.status?"badge-success":"badge-warning"}`,children:m.status}),(0,r.jsx)(p,{level:m.risk_level}),u&&!a&&(0,r.jsx)("span",{className:"badge",style:{background:"rgba(239, 68, 68, 0.2)",color:"var(--error)"},children:"Needs Definition"}),(0,r.jsx)("div",{style:{marginLeft:"auto",display:"flex",gap:"0.5rem"},children:a?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{onClick:()=>{h({title:e.title,status:e.status,category:e.category,impact:e.impact,probability:e.probability,risk_level:e.risk_level,residual_risk:e.residual_risk}),s(!1)},className:"btn",disabled:n,children:"Cancel"}),(0,r.jsx)("button",{onClick:()=>{d(async()=>{await c(e.id,m),s(!1)})},className:"btn btn-primary",disabled:n,children:n?"Saving...":"\uD83D\uDCBE Save"})]}):(0,r.jsx)("button",{onClick:()=>s(!0),className:"btn btn-primary",children:"✏️ Edit"})})]}),a?(0,r.jsx)("input",{type:"text",value:m.title,onChange:e=>h({...m,title:e.target.value}),className:"input",style:{fontSize:"1.5rem",fontWeight:700,width:"100%",marginBottom:"0.5rem"}}):(0,r.jsx)("h1",{className:"page-title",children:m.title}),(0,r.jsxs)("p",{className:"page-subtitle",children:["Risk Assessment • Category: ",a?(0,r.jsx)("input",{type:"text",value:m.category,onChange:e=>h({...m,category:e.target.value}),className:"input",style:{width:"200px",display:"inline-block"}}):m.category," • GAMP Category ",e.gamp_category]})]}),u&&!a&&(0,r.jsx)("div",{className:"card",style:{marginBottom:"1.5rem",background:"rgba(239, 68, 68, 0.1)",borderLeft:"4px solid var(--error)"},children:(0,r.jsxs)("p",{style:{margin:0,color:"var(--error)"},children:["⚠️ This Risk was auto-created from FS references. Click ",(0,r.jsx)("strong",{children:"Edit"})," to define its details."]})}),(0,r.jsx)("div",{className:"card",style:{marginBottom:"1.5rem"},children:(0,r.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1rem"},children:[(0,r.jsx)(o,{label:"Impact",value:m.impact,isEditing:a,onChange:e=>h({...m,impact:e}),options:["low","medium","high","critical"]}),(0,r.jsx)(o,{label:"Probability",value:m.probability,isEditing:a,onChange:e=>h({...m,probability:e}),options:["low","medium","high"]}),(0,r.jsx)(o,{label:"Risk Level",value:m.risk_level,isEditing:a,onChange:e=>h({...m,risk_level:e}),options:["low","medium","high","critical"]}),(0,r.jsx)(o,{label:"Residual Risk",value:m.residual_risk,isEditing:a,onChange:e=>h({...m,residual_risk:e}),options:["acceptable","unacceptable","pending"]})]})}),(0,r.jsxs)("div",{className:"card",style:{marginBottom:"1.5rem"},children:[(0,r.jsx)("h2",{className:"card-title",children:"⚙️ Linked Functional Specifications"}),(0,r.jsx)("div",{style:{display:"flex",gap:"0.5rem",flexWrap:"wrap"},children:t.map(e=>(0,r.jsx)(l(),{href:`/specs/${e.id}`,children:(0,r.jsxs)("span",{className:"badge",style:{background:"rgba(245, 158, 11, 0.15)",color:"var(--warning)",padding:"0.5rem 1rem"},children:[e.id," - ",e.title]})},e.id))})]}),(0,r.jsxs)("div",{className:"card",style:{marginBottom:"1.5rem"},children:[(0,r.jsx)("h2",{className:"card-title",children:"\uD83D\uDD34 Identified Risks"}),0===e.risks.length?(0,r.jsx)("p",{style:{color:"var(--text-secondary)",fontStyle:"italic"},children:"No risks defined yet"}):(0,r.jsx)("div",{style:{display:"grid",gap:"0.5rem"},children:e.risks.map((e,t)=>(0,r.jsxs)("div",{style:{padding:"0.75rem 1rem",background:"var(--bg-hover)",borderRadius:"6px",display:"flex",alignItems:"center",gap:"1rem"},children:[(0,r.jsx)("code",{style:{fontWeight:600,color:"#f97316"},children:e.id}),(0,r.jsx)("span",{style:{flex:1,color:"var(--text-secondary)"},children:e.description}),(0,r.jsx)(p,{level:e.impact,small:!0})]},t))})]}),(0,r.jsxs)("div",{className:"card",children:[(0,r.jsx)("h2",{className:"card-title",children:"\uD83D\uDEE1️ Mitigations"}),0===e.mitigations.length?(0,r.jsx)("p",{style:{color:"var(--text-secondary)",fontStyle:"italic"},children:"No mitigations defined yet"}):(0,r.jsxs)("table",{className:"table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"Risk"}),(0,r.jsx)("th",{children:"Control"}),(0,r.jsx)("th",{children:"Test"})]})}),(0,r.jsx)("tbody",{children:e.mitigations.map((e,t)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsx)("code",{children:e.risk_id})}),(0,r.jsx)("td",{children:e.control}),(0,r.jsx)("td",{style:{color:"var(--text-secondary)"},children:e.test})]},t))})]})]})]})}function o({label:e,value:t,isEditing:a,onChange:i,options:s}){let l=m(t);return(0,r.jsxs)("div",{style:{textAlign:"center",padding:"1rem",background:"var(--bg-hover)",borderRadius:"8px"},children:[(0,r.jsx)("div",{style:{fontSize:"0.75rem",color:"var(--text-secondary)",marginBottom:"0.25rem"},children:e}),a?(0,r.jsx)("select",{value:t,onChange:e=>i(e.target.value),className:"input",style:{width:"100%",textAlign:"center"},children:s.map(e=>(0,r.jsx)("option",{value:e,style:{textTransform:"capitalize"},children:e},e))}):(0,r.jsx)("div",{style:{fontSize:"1.25rem",fontWeight:700,color:l,textTransform:"capitalize"},children:t})]})}function p({level:e,small:t}){let a=m(e);return(0,r.jsx)("span",{className:"badge",style:{background:`${a}20`,color:a,padding:t?"0.25rem 0.5rem":"0.5rem 1rem",fontSize:t?"0.75rem":"0.875rem",textTransform:"capitalize"},children:e})}function m(e){switch(e){case"critical":case"unacceptable":return"#dc2626";case"high":return"#f97316";case"medium":case"pending":return"#eab308";case"low":case"acceptable":return"#22c55e";default:return"var(--text-secondary)"}}}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=76164)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[551],{33480:(e,t,r)=>{Promise.resolve().then(r.bind(r,84547))},38942:(e,t,r)=>{"use strict";r.d(t,{R:()=>o});var i=r(95155),s=r(39092),n=r.n(s);function a({isOpen:e,onClose:t,children:r,width:s="500px"}){return e?(0,i.jsxs)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(4px)",background:"rgba(0, 0, 0, 0.5)",animation:"fadeIn 0.2s ease-out"},className:"jsx-5d567d25508aa188",children:[(0,i.jsx)("div",{onClick:e=>e.stopPropagation(),style:{background:"var(--bg-primary)",borderRadius:"12px",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",width:s,maxWidth:"90%",maxHeight:"90vh",overflow:"auto",border:"1px solid var(--border)",animation:"slideUp 0.2s ease-out"},className:"jsx-5d567d25508aa188",children:r}),(0,i.jsx)(n(),{id:"5d567d25508aa188",children:"@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes slideUp{from{opacity:0;transform:scale(.95)translatey(10px)}to{opacity:1;transform:scale(1)translatey(0)}}"})]}):null}function o({isOpen:e,onClose:t,onConfirm:r,title:s,message:n,confirmLabel:o="Confirm",cancelLabel:l="Cancel",isDangerous:d=!1}){return(0,i.jsx)(a,{isOpen:e,onClose:t,width:"400px",children:(0,i.jsxs)("div",{style:{padding:"1.5rem"},children:[(0,i.jsx)("h3",{style:{margin:"0 0 0.5rem 0",fontSize:"1.25rem",fontWeight:600},children:s}),(0,i.jsx)("p",{style:{margin:"0 0 1.5rem 0",color:"var(--text-secondary)",lineHeight:1.5},children:n}),(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.75rem"},children:[(0,i.jsx)("button",{onClick:t,className:"btn",style:{background:"transparent",border:"1px solid var(--border)",color:"var(--text-primary)"},children:l}),(0,i.jsx)("button",{onClick:()=>{r(),t()},className:"btn",style:{background:d?"var(--error)":"var(--accent)",color:"white",border:"none",fontWeight:600},children:o})]})]})})}r(12115)},64183:(e,t,r)=>{"use strict";r.d(t,{m:()=>s});var i=r(9339);let s=(0,i.createServerReference)("402d9b235abd2968da2b1e42d1730b1638c9c32124",i.callServer,void 0,i.findSourceMapURL,"restoreFSAction")},81982:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var i=r(9339);let s=(0,i.createServerReference)("4020f05a9672914a4f917930d4c932391d5246a769",i.callServer,void 0,i.findSourceMapURL,"restoreURSAction")},84547:(e,t,r)=>{"use strict";r.d(t,{ArchiveClient:()=>x});var i=r(95155),s=r(12115),n=r(98500),a=r.n(n),o=r(73321),l=r(81982),d=r(64183),c=r(90945),h=r(38942);function x({urs:e,fs:t,risks:r}){let n=(0,o.useRouter)(),[x,p]=(0,s.useState)(null),m=async()=>{x&&("urs"===x.type?await (0,l.Z)(x.id):"fs"===x.type?await (0,d.m)(x.id):"risk"===x.type&&await (0,c.I)(x.id),n.refresh(),p(null))};return(0,i.jsxs)("div",{children:[(0,i.jsxs)("header",{className:"page-header",style:{marginBottom:"2rem",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h1",{className:"page-title",children:"Archive"}),(0,i.jsx)("p",{className:"page-subtitle",children:"View and restore soft-deleted items"})]}),(0,i.jsx)(a(),{href:"/traceability",className:"btn",children:"Back to Matrix"})]}),(0,i.jsxs)("div",{style:{display:"grid",gap:"2rem"},children:[(0,i.jsxs)("section",{children:[(0,i.jsxs)("h2",{style:{fontSize:"1.25rem",fontWeight:600,marginBottom:"1rem"},children:["User Requirements (",e.length,")"]}),0===e.length?(0,i.jsx)("p",{style:{color:"var(--text-secondary)",fontStyle:"italic"},children:"No archived requirements"}):(0,i.jsx)("div",{className:"card",style:{padding:0,overflow:"hidden"},children:e.map(e=>(0,i.jsxs)("div",{style:{padding:"1rem",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(a(),{href:`/traceability/urs/${e.id}`,style:{textDecoration:"none",color:"inherit"},children:(0,i.jsxs)("div",{style:{fontWeight:600,cursor:"pointer",":hover":{textDecoration:"underline"}},children:[e.id,": ",e.title]})}),(0,i.jsx)("div",{style:{fontSize:"0.875rem",color:"var(--text-secondary)"},children:"Archived"})]}),(0,i.jsx)("button",{onClick:()=>p({id:e.id,type:"urs"}),className:"btn",children:"Restore"})]},e.id))})]}),(0,i.jsxs)("section",{children:[(0,i.jsxs)("h2",{style:{fontSize:"1.25rem",fontWeight:600,marginBottom:"1rem"},children:["Functional Specifications (",t.length,")"]}),0===t.length?(0,i.jsx)("p",{style:{color:"var(--text-secondary)",fontStyle:"italic"},children:"No archived specifications"}):(0,i.jsx)("div",{className:"card",style:{padding:0,overflow:"hidden"},children:t.map(e=>(0,i.jsxs)("div",{style:{padding:"1rem",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(a(),{href:`/traceability/fs/${e.id}`,style:{textDecoration:"none",color:"inherit"},children:(0,i.jsxs)("div",{style:{fontWeight:600,cursor:"pointer"},children:[e.id,": ",e.title]})}),(0,i.jsx)("div",{style:{fontSize:"0.875rem",color:"var(--text-secondary)"},children:e.file_path})]}),(0,i.jsx)("button",{onClick:()=>p({id:e.id,type:"fs"}),className:"btn",children:"Restore"})]},e.id))})]}),(0,i.jsxs)("section",{children:[(0,i.jsxs)("h2",{style:{fontSize:"1.25rem",fontWeight:600,marginBottom:"1rem"},children:["Risk Assessments (",r.length,")"]}),0===r.length?(0,i.jsx)("p",{style:{color:"var(--text-secondary)",fontStyle:"italic"},children:"No archived risks"}):(0,i.jsx)("div",{className:"card",style:{padding:0,overflow:"hidden"},children:r.map(e=>(0,i.jsxs)("div",{style:{padding:"1rem",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(a(),{href:`/traceability/risk/${e.id}`,style:{textDecoration:"none",color:"inherit"},children:(0,i.jsxs)("div",{style:{fontWeight:600,cursor:"pointer"},children:[e.id,": ",e.title]})}),(0,i.jsxs)("div",{style:{fontSize:"0.875rem",color:"var(--text-secondary)"},children:["Category: ",e.category]})]}),(0,i.jsx)("button",{onClick:()=>p({id:e.id,type:"risk"}),className:"btn",children:"Restore"})]},e.id))})]})]}),(0,i.jsx)(h.R,{isOpen:!!x,onClose:()=>p(null),onConfirm:m,title:"Restore Item",message:`Are you sure you want to restore ${x?.id}? It will appear in the main lists again.`,confirmLabel:"Restore"})]})}},90945:(e,t,r)=>{"use strict";r.d(t,{I:()=>s});var i=r(9339);let s=(0,i.createServerReference)("40ce3b864634c94182c09d0f6ac7fefb5b0e53bbe6",i.callServer,void 0,i.findSourceMapURL,"restoreRiskAction")}},e=>{e.O(0,[8500,2594,8441,3794,7358],()=>e(e.s=33480)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[510],{13987:(e,r,t)=>{"use strict";t.d(r,{j:()=>n});var i=t(95155),s=t(12115);function n({options:e,selected:r,onChange:t,placeholder:n,multi:l=!0,allowCustom:a=!0}){let[o,d]=(0,s.useState)(!1),[c,m]=(0,s.useState)(""),p=(0,s.useRef)(null),u=e.filter(e=>e.label.toLowerCase().includes(c.toLowerCase())&&(!l||!r.includes(e.value)));return(0,s.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.jsxs)("div",{ref:p,style:{position:"relative",flex:1},children:[l&&r.length>0&&(0,i.jsx)("div",{style:{display:"flex",gap:"0.25rem",flexWrap:"wrap",marginBottom:"0.5rem"},children:r.map(s=>{let n=e.find(e=>e.value===s);return(0,i.jsxs)("span",{className:"badge badge-success",style:{display:"flex",alignItems:"center",gap:"0.25rem"},children:[n?.value||s,(0,i.jsx)("button",{onClick:()=>{t(r.filter(e=>e!==s))},style:{background:"none",border:"none",cursor:"pointer",padding:0,fontSize:"1rem",color:"inherit"},children:"\xd7"})]},s)})}),(0,i.jsx)("input",{type:"text",value:l||o?c:(()=>{if(!l&&r.length>0){let t=e.find(e=>e.value===r[0]);return t?.label||r[0]}return""})(),onChange:e=>m(e.target.value),onFocus:()=>d(!0),placeholder:0!==r.length&&l?"Add more...":n,className:"input",style:{width:"100%"}}),o&&(0,i.jsxs)("div",{style:{position:"absolute",top:"100%",left:0,right:0,marginTop:"0.25rem",background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"8px",maxHeight:"200px",overflowY:"auto",zIndex:100,boxShadow:"0 4px 12px rgba(0,0,0,0.3)"},children:[0===u.length?(0,i.jsx)("div",{style:{padding:"0.75rem",color:"var(--text-secondary)",fontSize:"0.875rem"},children:a?"No matches - type to create":"No matching steps"}):u.slice(0,20).map(e=>(0,i.jsxs)("div",{onClick:()=>{var i;return i=e.value,void(l?t([...r,i]):(t([i]),d(!1)),m(""))},style:{padding:"0.625rem 0.75rem",cursor:"pointer",fontSize:"0.875rem",borderBottom:"1px solid var(--border)",transition:"background 0.15s"},onMouseEnter:e=>e.currentTarget.style.background="var(--bg-hover)",onMouseLeave:e=>e.currentTarget.style.background="transparent",children:[(0,i.jsx)("div",{style:{fontWeight:500},children:e.value}),e.label!==e.value&&(0,i.jsx)("div",{style:{fontSize:"0.75rem",color:"var(--text-secondary)",marginTop:"0.125rem"},children:e.label})]},e.value)),u.length>20&&(0,i.jsxs)("div",{style:{padding:"0.5rem",color:"var(--text-secondary)",fontSize:"0.75rem",textAlign:"center"},children:["+",u.length-20," more..."]})]})]})}},17948:(e,r,t)=>{"use strict";t.d(r,{KN:()=>c,Mo:()=>u,d0:()=>h,mQ:()=>d,t3:()=>p,wI:()=>o,yY:()=>g,zB:()=>m});var i=t(95155);t(12115);let s={width:"100%",padding:"0.875rem 1rem",fontSize:"0.9375rem",lineHeight:"1.5",color:"var(--text-primary)",background:"var(--bg-secondary)",borderWidth:"1px",borderStyle:"solid",borderColor:"var(--border)",borderRadius:"10px",outline:"none",transition:"all 0.2s ease"},n={borderColor:"var(--accent)",boxShadow:"0 0 0 3px rgba(99, 102, 241, 0.15)"},l={...s,cursor:"pointer",appearance:"none",backgroundImage:"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238888a0' d='M6 8L1 3h10z'/%3E%3C/svg%3E\")",backgroundRepeat:"no-repeat",backgroundPosition:"right 1rem center",paddingRight:"2.5rem"},a={...s,resize:"vertical",minHeight:"120px",fontFamily:"inherit"};function o(e,r){return{...s,...r===e?n:{}}}function d(e,r){return{...l,...r===e?n:{}}}function c(e,r){return{...a,...r===e?n:{}}}function m({label:e,children:r,required:t,compact:s,hint:n,action:l}){return(0,i.jsxs)("div",{style:{marginBottom:s?"0":"1.5rem"},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"0.5rem"},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,i.jsx)("label",{style:{fontWeight:500,fontSize:"0.875rem",color:"var(--text-primary)"},children:e}),t&&(0,i.jsx)("span",{style:{color:"var(--accent)",fontSize:"0.75rem"},children:"Required"}),n&&(0,i.jsxs)("span",{style:{color:"var(--text-secondary)",fontSize:"0.8125rem",fontWeight:400},children:["— ",n]})]}),l&&(0,i.jsx)("button",{onClick:l.onClick,style:{padding:"0.375rem 0.75rem",fontSize:"0.8125rem",fontWeight:500,background:"transparent",border:"1px solid var(--accent)",borderRadius:"6px",color:"var(--accent)",cursor:"pointer",transition:"all 0.2s"},children:l.label})]}),r]})}function p({status:e}){return"idle"===e.type?null:(0,i.jsxs)("div",{style:{marginBottom:"1.5rem",padding:"1rem 1.25rem",borderRadius:"10px",background:"success"===e.type?"rgba(16, 185, 129, 0.1)":"rgba(239, 68, 68, 0.1)",color:"success"===e.type?"var(--success)":"var(--error)",fontSize:"0.9375rem",display:"flex",alignItems:"center",gap:"0.5rem",borderWidth:"1px",borderStyle:"solid",borderColor:"success"===e.type?"rgba(16, 185, 129, 0.2)":"rgba(239, 68, 68, 0.2)"},children:["success"===e.type?"✅":"❌"," ",e.message]})}function u({icon:e,title:r,subtitle:t}){return(0,i.jsxs)("div",{style:{marginBottom:"2rem",paddingBottom:"1.5rem",borderBottom:"1px solid var(--border)"},children:[(0,i.jsxs)("h2",{style:{margin:0,fontSize:"1.25rem",fontWeight:600},children:[e," ",r]}),(0,i.jsx)("p",{style:{margin:"0.25rem 0 0",color:"var(--text-secondary)",fontSize:"0.875rem"},children:t})]})}function g({onClick:e,disabled:r,isPending:t,label:s="Save"}){return(0,i.jsx)("button",{onClick:e,disabled:r,style:{padding:"0.75rem 1.5rem",fontSize:"0.9375rem",fontWeight:600,borderRadius:"10px",border:"none",cursor:r?"not-allowed":"pointer",background:r?"var(--bg-hover)":"linear-gradient(135deg, var(--gradient-start), var(--gradient-end))",color:r?"var(--text-secondary)":"white",transition:"all 0.2s ease",boxShadow:r?"none":"0 4px 12px rgba(99, 102, 241, 0.25)"},children:t?"\uD83D\uDCBE Saving...":`💾 ${s}`})}function h({onClick:e}){return(0,i.jsx)("button",{onClick:e,style:{padding:"0.5rem",background:"transparent",border:"1px solid var(--border)",borderRadius:"8px",color:"var(--text-secondary)",cursor:"pointer",transition:"all 0.2s",lineHeight:1},title:"Remove",children:"✕"})}},38942:(e,r,t)=>{"use strict";t.d(r,{R:()=>a});var i=t(95155),s=t(39092),n=t.n(s);function l({isOpen:e,onClose:r,children:t,width:s="500px"}){return e?(0,i.jsxs)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(4px)",background:"rgba(0, 0, 0, 0.5)",animation:"fadeIn 0.2s ease-out"},className:"jsx-5d567d25508aa188",children:[(0,i.jsx)("div",{onClick:e=>e.stopPropagation(),style:{background:"var(--bg-primary)",borderRadius:"12px",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",width:s,maxWidth:"90%",maxHeight:"90vh",overflow:"auto",border:"1px solid var(--border)",animation:"slideUp 0.2s ease-out"},className:"jsx-5d567d25508aa188",children:t}),(0,i.jsx)(n(),{id:"5d567d25508aa188",children:"@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes slideUp{from{opacity:0;transform:scale(.95)translatey(10px)}to{opacity:1;transform:scale(1)translatey(0)}}"})]}):null}function a({isOpen:e,onClose:r,onConfirm:t,title:s,message:n,confirmLabel:a="Confirm",cancelLabel:o="Cancel",isDangerous:d=!1}){return(0,i.jsx)(l,{isOpen:e,onClose:r,width:"400px",children:(0,i.jsxs)("div",{style:{padding:"1.5rem"},children:[(0,i.jsx)("h3",{style:{margin:"0 0 0.5rem 0",fontSize:"1.25rem",fontWeight:600},children:s}),(0,i.jsx)("p",{style:{margin:"0 0 1.5rem 0",color:"var(--text-secondary)",lineHeight:1.5},children:n}),(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.75rem"},children:[(0,i.jsx)("button",{onClick:r,className:"btn",style:{background:"transparent",border:"1px solid var(--border)",color:"var(--text-primary)"},children:o}),(0,i.jsx)("button",{onClick:()=>{t(),r()},className:"btn",style:{background:d?"var(--error)":"var(--accent)",color:"white",border:"none",fontWeight:600},children:a})]})]})})}t(12115)},43992:(e,r,t)=>{"use strict";t.d(r,{RiskClient:()=>g});var i=t(95155),s=t(12115),n=t(73321),l=t(98500),a=t.n(l),o=t(9339);let d=(0,o.createServerReference)("4018ccaaa027ba7f3593e5d745a6fe390f7342043e",o.callServer,void 0,o.findSourceMapURL,"archiveRiskAction");var c=t(90945),m=t(13987),p=t(17948),u=t(38942);function g({risk:e,isNew:r=!1,fsItems:l}){let o=(0,n.useRouter)(),[g,b]=(0,s.useState)(r),[y,f]=(0,s.useState)(e?.title||""),[j,k]=(0,s.useState)(e?.status||"draft"),[C,S]=(0,s.useState)(e?.category||""),[w,R]=(0,s.useState)(e?.gamp_category||4),[z,I]=(0,s.useState)(e?.impact||"medium"),[B,_]=(0,s.useState)(e?.probability||"medium"),[W,N]=(0,s.useState)(e?.risk_level||"medium"),[F,L]=(0,s.useState)(e?.residual_risk||"acceptable"),[$,A]=(0,s.useState)(e?.fs_ids||[]),T=e?.risks?.length?e.risks.map(e=>({id:e.id,description:e.description,impact:e.impact,probability:e.probability})):[{id:"R-001.1",description:"",impact:"medium",probability:"medium"}],E=e?.mitigations?.length?e.mitigations.map(e=>({risk_id:e.risk_id,control:e.control,test:e.test})):[{risk_id:"R-001.1",control:"",test:""}],[H,M]=(0,s.useState)(T),[D,P]=(0,s.useState)(E),[O,Q]=(0,s.useState)(null),[U,q]=(0,s.useState)({type:"idle"}),[Y,K]=(0,s.useTransition)(),[G,J]=(0,s.useState)(!1),[V,X]=(0,s.useState)(!1),Z=(e,r,t)=>{let i=[...H];i[e]={...i[e],[r]:t},M(i)},ee=(e,r,t)=>{let i=[...D];i[e]={...i[e],[r]:t},P(i)},er=async()=>{J(!0)},et=async()=>{await d(e.id),o.refresh(),b(!1)},ei=async()=>{X(!0)},es=async()=>{await (0,c.I)(e.id),o.refresh()};return!g&&e?(0,i.jsxs)("div",{className:"card",style:{maxWidth:"900px"},children:[e.is_archived&&(0,i.jsxs)("div",{style:{background:"rgba(239, 68, 68, 0.1)",border:"1px solid var(--error)",padding:"1rem",borderRadius:"8px",marginBottom:"1.5rem",color:"var(--error)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,i.jsxs)("span",{children:[(0,i.jsx)("strong",{children:"Archived:"})," This item is soft-deleted and hidden from lists."]}),(0,i.jsx)("button",{onClick:ei,className:"btn",style:{background:"var(--bg-hover)",border:"1px solid var(--error)",color:"var(--error)"},children:"Restore"})]}),(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"2rem",paddingBottom:"1.5rem",borderBottom:"1px solid var(--border)"},children:[(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"1rem",marginBottom:"0.5rem"},children:[(0,i.jsx)("span",{style:{fontSize:"0.75rem",fontWeight:600,padding:"0.25rem 0.75rem",background:"#f97316",borderRadius:"6px",color:"white"},children:e.id}),(0,i.jsxs)("span",{className:`badge ${"acceptable"===e.residual_risk?"badge-success":"badge-error"}`,style:{textTransform:"capitalize"},children:["acceptable"===e.residual_risk?"✅":"⚠️"," ",e.residual_risk||"pending"]})]}),(0,i.jsx)("h1",{style:{margin:0,fontSize:"1.5rem",fontWeight:600,lineHeight:1.3},children:e.title})]}),(0,i.jsxs)("div",{style:{display:"flex",gap:"0.75rem"},children:[(0,i.jsx)("button",{onClick:er,className:"btn",style:{background:"transparent",border:"1px solid var(--error)",color:"var(--error)",display:e.is_archived?"none":"flex",alignItems:"center",gap:"0.5rem"},children:"\uD83D\uDDD1️ Archive"}),(0,i.jsxs)("button",{onClick:()=>b(!0),disabled:!!e.is_archived,className:"btn btn-primary",style:{display:"flex",gap:"0.5rem",alignItems:"center",opacity:e.is_archived?.5:1,cursor:e.is_archived?"not-allowed":"pointer"},children:[(0,i.jsx)("span",{children:"✏️"})," Edit"]})]})]}),(0,i.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1rem",marginBottom:"1.5rem"},children:[(0,i.jsx)(h,{label:"Category",value:e.category}),(0,i.jsx)(h,{label:"Impact",value:e.impact,color:v(e.impact)}),(0,i.jsx)(h,{label:"Probability",value:e.probability,color:v(e.probability)}),(0,i.jsx)(h,{label:"Risk Level",value:e.risk_level,color:v(e.risk_level)})]}),(0,i.jsx)(x,{label:"Linked Functional Specs",children:e.fs_ids.length>0?(0,i.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.5rem"},children:e.fs_ids.map(e=>(0,i.jsx)(a(),{href:`/traceability/fs/${e}`,children:(0,i.jsx)("span",{className:"badge badge-warning",children:e})},e))}):(0,i.jsx)("span",{style:{color:"var(--text-secondary)",fontStyle:"italic"},children:"No functional specs linked. Edit to add links."})}),e.risks.length>0&&(0,i.jsx)(x,{label:"Identified Risks",count:e.risks.length,children:(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:e.risks.map((e,r)=>(0,i.jsxs)("div",{style:{display:"flex",gap:"0.75rem",alignItems:"flex-start"},children:[(0,i.jsx)("span",{style:{color:"#f97316",fontWeight:600,fontSize:"0.875rem",fontFamily:"monospace",minWidth:"70px"},children:e.id}),(0,i.jsx)("span",{style:{lineHeight:1.6},children:e.description})]},r))})}),e.mitigations.length>0&&(0,i.jsx)(x,{label:"Mitigation & Control",count:e.mitigations.length,children:(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:e.mitigations.map((e,r)=>(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"0.25rem"},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,i.jsxs)("span",{style:{color:"var(--accent)",fontWeight:600,fontSize:"0.75rem"},children:["For ",e.risk_id,":"]}),(0,i.jsx)("span",{style:{fontWeight:500},children:e.control})]}),(0,i.jsxs)("div",{style:{fontSize:"0.875rem",color:"var(--text-secondary)",paddingLeft:"1rem"},children:["Test: ",e.test]})]},r))})}),(0,i.jsx)(u.R,{isOpen:G,onClose:()=>J(!1),onConfirm:et,title:"Archive Risk",message:"Are you sure you want to archive this Risk? It will be hidden from lists but can be restored later.",confirmLabel:"Archive",isDangerous:!0}),(0,i.jsx)(u.R,{isOpen:V,onClose:()=>X(!1),onConfirm:es,title:"Restore Risk",message:"Are you sure you want to restore this Risk?",confirmLabel:"Restore"})]}):(0,i.jsxs)("div",{className:"card",style:{maxWidth:"900px"},children:[(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"2rem",alignItems:"center"},children:[(0,i.jsx)(p.Mo,{icon:"⚠️",title:r?"New Risk Assessment":`Editing ${e?.id}`,subtitle:"Identify and mitigate risks"}),(0,i.jsxs)("div",{style:{display:"flex",gap:"0.75rem"},children:[!r&&(0,i.jsx)("button",{onClick:er,className:"btn",style:{color:"var(--error)",borderColor:"var(--error)"},children:"Archive"}),(0,i.jsx)("button",{onClick:()=>{r?o.back():b(!1)},className:"btn",children:"Cancel"}),(0,i.jsx)(p.yY,{onClick:()=>{q({type:"idle"}),K(async()=>{try{let i,s={title:y,status:j,category:C,gamp_category:w,fs_ids:$,impact:z,probability:B,risk_level:W,residual_risk:F,risks:H.filter(e=>e.description.trim()||e.id).map(e=>({id:e.id,description:e.description,impact:e.impact,probability:e.probability})),mitigations:D.filter(e=>e.control.trim()).map(e=>({risk_id:e.risk_id,control:e.control,test:e.test}))};if(r){let{saveRisk:e}=await t.e(9447).then(t.bind(t,39447));i=await e(s)}else{let{updateRiskAction:r}=await t.e(9447).then(t.bind(t,39447));i=await r(e.id,s)}i.success?(q({type:"success",message:`Saved ${i.id}`}),r?o.push(`/traceability/risk/${i.id}`):(o.refresh(),b(!1))):q({type:"error",message:i.error})}catch(e){q({type:"error",message:"Failed to save"})}})},disabled:Y||!y.trim(),isPending:Y,label:"Save Risk"})]})]}),(0,i.jsx)(p.t3,{status:U}),(0,i.jsx)(p.zB,{label:"Title",required:!0,children:(0,i.jsx)("input",{value:y,onChange:e=>f(e.target.value),style:(0,p.wI)("title",O),onFocus:()=>Q("title"),onBlur:()=>Q(null)})}),(0,i.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"1rem",marginBottom:"1.5rem"},children:[(0,i.jsx)(p.zB,{label:"Category",compact:!0,children:(0,i.jsx)("input",{value:C,onChange:e=>S(e.target.value),style:(0,p.wI)("cat",O),onFocus:()=>Q("cat")})}),(0,i.jsx)(p.zB,{label:"Link FS",required:!0,compact:!0,children:(0,i.jsx)(m.j,{options:l.map(e=>({value:e.id,label:`${e.id} - ${e.title}`})),selected:$,onChange:A,placeholder:"Search FS...",multi:!0})})]}),(0,i.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1rem",marginBottom:"1.5rem"},children:[(0,i.jsx)(p.zB,{label:"Impact",compact:!0,children:(0,i.jsxs)("select",{value:z,onChange:e=>I(e.target.value),style:(0,p.mQ)("imp",O),onFocus:()=>Q("imp"),children:[(0,i.jsx)("option",{value:"low",children:"\uD83D\uDFE2 Low"}),(0,i.jsx)("option",{value:"medium",children:"\uD83D\uDFE1 Medium"}),(0,i.jsx)("option",{value:"high",children:"\uD83D\uDFE0 High"}),(0,i.jsx)("option",{value:"critical",children:"\uD83D\uDD34 Critical"})]})}),(0,i.jsx)(p.zB,{label:"Probability",compact:!0,children:(0,i.jsxs)("select",{value:B,onChange:e=>_(e.target.value),style:(0,p.mQ)("prob",O),onFocus:()=>Q("prob"),children:[(0,i.jsx)("option",{value:"low",children:"\uD83D\uDFE2 Low"}),(0,i.jsx)("option",{value:"medium",children:"\uD83D\uDFE1 Medium"}),(0,i.jsx)("option",{value:"high",children:"\uD83D\uDD34 High"})]})}),(0,i.jsx)(p.zB,{label:"Risk Level",compact:!0,children:(0,i.jsxs)("select",{value:W,onChange:e=>N(e.target.value),style:(0,p.mQ)("lvl",O),onFocus:()=>Q("lvl"),children:[(0,i.jsx)("option",{value:"low",children:"\uD83D\uDFE2 Low"}),(0,i.jsx)("option",{value:"medium",children:"\uD83D\uDFE1 Medium"}),(0,i.jsx)("option",{value:"high",children:"\uD83D\uDFE0 High"}),(0,i.jsx)("option",{value:"critical",children:"\uD83D\uDD34 Critical"})]})}),(0,i.jsx)(p.zB,{label:"Residual Risk",compact:!0,children:(0,i.jsxs)("select",{value:F,onChange:e=>L(e.target.value),style:(0,p.mQ)("res",O),onFocus:()=>Q("res"),children:[(0,i.jsx)("option",{value:"acceptable",children:"✅ Acceptable"}),(0,i.jsx)("option",{value:"unacceptable",children:"❌ Unacceptable"}),(0,i.jsx)("option",{value:"pending",children:"⏳ Pending"})]})})]}),(0,i.jsx)(p.zB,{label:"Identified Risks",hint:"List specific risks",action:{label:"+ Add Risk",onClick:()=>M([...H,{id:`R-001.${H.length+1}`,description:"",impact:"medium",probability:"medium"}])},children:(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:H.map((e,r)=>(0,i.jsxs)("div",{style:{display:"flex",gap:"0.75rem",alignItems:"center"},children:[(0,i.jsx)("input",{value:e.id,onChange:e=>Z(r,"id",e.target.value),onFocus:()=>Q(`risk-id-${r}`),onBlur:()=>Q(null),placeholder:"R-ID",style:{...(0,p.wI)(`risk-id-${r}`,O),width:"100px",flexShrink:0}}),(0,i.jsx)("input",{value:e.description,onChange:e=>Z(r,"description",e.target.value),onFocus:()=>Q(`risk-desc-${r}`),onBlur:()=>Q(null),placeholder:"Risk description",style:{...(0,p.wI)(`risk-desc-${r}`,O),flex:1}}),H.length>1&&(0,i.jsx)(p.d0,{onClick:()=>{H.length>1&&M(H.filter((e,t)=>t!==r))}})]},r))})}),(0,i.jsx)(p.zB,{label:"Mitigations",hint:"Control measures and testing",action:{label:"+ Add Mitigation",onClick:()=>P([...D,{risk_id:"",control:"",test:""}])},children:(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:D.map((e,r)=>(0,i.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"100px 1fr 1fr auto",gap:"0.75rem",alignItems:"center",padding:"1rem",background:"var(--bg-secondary)",borderRadius:"10px",border:"1px solid var(--border)"},children:[(0,i.jsx)("input",{value:e.risk_id,onChange:e=>ee(r,"risk_id",e.target.value),onFocus:()=>Q(`mit-id-${r}`),onBlur:()=>Q(null),placeholder:"R-ID",style:(0,p.wI)(`mit-id-${r}`,O)}),(0,i.jsx)("input",{value:e.control,onChange:e=>ee(r,"control",e.target.value),onFocus:()=>Q(`mit-control-${r}`),onBlur:()=>Q(null),placeholder:"Control measure",style:(0,p.wI)(`mit-control-${r}`,O)}),(0,i.jsx)("input",{value:e.test,onChange:e=>ee(r,"test",e.target.value),onFocus:()=>Q(`mit-test-${r}`),onBlur:()=>Q(null),placeholder:"How to test",style:(0,p.wI)(`mit-test-${r}`,O)}),D.length>1&&(0,i.jsx)(p.d0,{onClick:()=>{D.length>1&&P(D.filter((e,t)=>t!==r))}})]},r))})})]})}function h({label:e,value:r,color:t}){return(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{style:{fontSize:"0.75rem",color:"var(--text-secondary)",fontWeight:500,marginBottom:"0.25rem"},children:e}),(0,i.jsx)("div",{style:{fontSize:"1rem",fontWeight:500,textTransform:"capitalize",color:t||"var(--text-primary)"},children:r||"—"})]})}function x({label:e,count:r,children:t}){return(0,i.jsxs)("div",{style:{marginBottom:"1.5rem"},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",marginBottom:"0.5rem"},children:[(0,i.jsx)("label",{style:{fontWeight:500,fontSize:"0.875rem",color:"var(--text-secondary)"},children:e}),void 0!==r&&(0,i.jsx)("span",{style:{fontSize:"0.75rem",padding:"0.125rem 0.5rem",background:"var(--bg-hover)",borderRadius:"9999px"},children:r})]}),(0,i.jsx)("div",{style:{lineHeight:1.7},children:t})]})}function v(e){switch(e?.toLowerCase()){case"high":return"#ef4444";case"medium":return"#f59e0b";case"low":return"#10b981";default:return"var(--text-primary)"}}},76640:(e,r,t)=>{Promise.resolve().then(t.bind(t,43992))},90945:(e,r,t)=>{"use strict";t.d(r,{I:()=>s});var i=t(9339);let s=(0,i.createServerReference)("40ce3b864634c94182c09d0f6ac7fefb5b0e53bbe6",i.callServer,void 0,i.findSourceMapURL,"restoreRiskAction")}},e=>{e.O(0,[8500,213,8441,3794,7358],()=>e(e.s=76640)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7245],{9339:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={callServer:function(){return a.callServer},createServerReference:function(){return o.createServerReference},findSourceMapURL:function(){return s.findSourceMapURL}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let a=t(77304),s=t(4060),o=t(77197)},13987:(e,r,t)=>{"use strict";t.d(r,{j:()=>a});var n=t(95155),i=t(12115);function a({options:e,selected:r,onChange:t,placeholder:a,multi:s=!0,allowCustom:o=!0}){let[l,d]=(0,i.useState)(!1),[c,u]=(0,i.useState)(""),p=(0,i.useRef)(null),m=e.filter(e=>e.label.toLowerCase().includes(c.toLowerCase())&&(!s||!r.includes(e.value)));return(0,i.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,n.jsxs)("div",{ref:p,style:{position:"relative",flex:1},children:[s&&r.length>0&&(0,n.jsx)("div",{style:{display:"flex",gap:"0.25rem",flexWrap:"wrap",marginBottom:"0.5rem"},children:r.map(i=>{let a=e.find(e=>e.value===i);return(0,n.jsxs)("span",{className:"badge badge-success",style:{display:"flex",alignItems:"center",gap:"0.25rem"},children:[a?.value||i,(0,n.jsx)("button",{onClick:()=>{t(r.filter(e=>e!==i))},style:{background:"none",border:"none",cursor:"pointer",padding:0,fontSize:"1rem",color:"inherit"},children:"\xd7"})]},i)})}),(0,n.jsx)("input",{type:"text",value:s||l?c:(()=>{if(!s&&r.length>0){let t=e.find(e=>e.value===r[0]);return t?.label||r[0]}return""})(),onChange:e=>u(e.target.value),onFocus:()=>d(!0),placeholder:0!==r.length&&s?"Add more...":a,className:"input",style:{width:"100%"}}),l&&(0,n.jsxs)("div",{style:{position:"absolute",top:"100%",left:0,right:0,marginTop:"0.25rem",background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"8px",maxHeight:"200px",overflowY:"auto",zIndex:100,boxShadow:"0 4px 12px rgba(0,0,0,0.3)"},children:[0===m.length?(0,n.jsx)("div",{style:{padding:"0.75rem",color:"var(--text-secondary)",fontSize:"0.875rem"},children:o?"No matches - type to create":"No matching steps"}):m.slice(0,20).map(e=>(0,n.jsxs)("div",{onClick:()=>{var n;return n=e.value,void(s?t([...r,n]):(t([n]),d(!1)),u(""))},style:{padding:"0.625rem 0.75rem",cursor:"pointer",fontSize:"0.875rem",borderBottom:"1px solid var(--border)",transition:"background 0.15s"},onMouseEnter:e=>e.currentTarget.style.background="var(--bg-hover)",onMouseLeave:e=>e.currentTarget.style.background="transparent",children:[(0,n.jsx)("div",{style:{fontWeight:500},children:e.value}),e.label!==e.value&&(0,n.jsx)("div",{style:{fontSize:"0.75rem",color:"var(--text-secondary)",marginTop:"0.125rem"},children:e.label})]},e.value)),m.length>20&&(0,n.jsxs)("div",{style:{padding:"0.5rem",color:"var(--text-secondary)",fontSize:"0.75rem",textAlign:"center"},children:["+",m.length-20," more..."]})]})]})}},17948:(e,r,t)=>{"use strict";t.d(r,{KN:()=>c,Mo:()=>m,d0:()=>g,mQ:()=>d,t3:()=>p,wI:()=>l,yY:()=>h,zB:()=>u});var n=t(95155);t(12115);let i={width:"100%",padding:"0.875rem 1rem",fontSize:"0.9375rem",lineHeight:"1.5",color:"var(--text-primary)",background:"var(--bg-secondary)",borderWidth:"1px",borderStyle:"solid",borderColor:"var(--border)",borderRadius:"10px",outline:"none",transition:"all 0.2s ease"},a={borderColor:"var(--accent)",boxShadow:"0 0 0 3px rgba(99, 102, 241, 0.15)"},s={...i,cursor:"pointer",appearance:"none",backgroundImage:"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238888a0' d='M6 8L1 3h10z'/%3E%3C/svg%3E\")",backgroundRepeat:"no-repeat",backgroundPosition:"right 1rem center",paddingRight:"2.5rem"},o={...i,resize:"vertical",minHeight:"120px",fontFamily:"inherit"};function l(e,r){return{...i,...r===e?a:{}}}function d(e,r){return{...s,...r===e?a:{}}}function c(e,r){return{...o,...r===e?a:{}}}function u({label:e,children:r,required:t,compact:i,hint:a,action:s}){return(0,n.jsxs)("div",{style:{marginBottom:i?"0":"1.5rem"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"0.5rem"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,n.jsx)("label",{style:{fontWeight:500,fontSize:"0.875rem",color:"var(--text-primary)"},children:e}),t&&(0,n.jsx)("span",{style:{color:"var(--accent)",fontSize:"0.75rem"},children:"Required"}),a&&(0,n.jsxs)("span",{style:{color:"var(--text-secondary)",fontSize:"0.8125rem",fontWeight:400},children:["— ",a]})]}),s&&(0,n.jsx)("button",{onClick:s.onClick,style:{padding:"0.375rem 0.75rem",fontSize:"0.8125rem",fontWeight:500,background:"transparent",border:"1px solid var(--accent)",borderRadius:"6px",color:"var(--accent)",cursor:"pointer",transition:"all 0.2s"},children:s.label})]}),r]})}function p({status:e}){return"idle"===e.type?null:(0,n.jsxs)("div",{style:{marginBottom:"1.5rem",padding:"1rem 1.25rem",borderRadius:"10px",background:"success"===e.type?"rgba(16, 185, 129, 0.1)":"rgba(239, 68, 68, 0.1)",color:"success"===e.type?"var(--success)":"var(--error)",fontSize:"0.9375rem",display:"flex",alignItems:"center",gap:"0.5rem",borderWidth:"1px",borderStyle:"solid",borderColor:"success"===e.type?"rgba(16, 185, 129, 0.2)":"rgba(239, 68, 68, 0.2)"},children:["success"===e.type?"✅":"❌"," ",e.message]})}function m({icon:e,title:r,subtitle:t}){return(0,n.jsxs)("div",{style:{marginBottom:"2rem",paddingBottom:"1.5rem",borderBottom:"1px solid var(--border)"},children:[(0,n.jsxs)("h2",{style:{margin:0,fontSize:"1.25rem",fontWeight:600},children:[e," ",r]}),(0,n.jsx)("p",{style:{margin:"0.25rem 0 0",color:"var(--text-secondary)",fontSize:"0.875rem"},children:t})]})}function h({onClick:e,disabled:r,isPending:t,label:i="Save"}){return(0,n.jsx)("button",{onClick:e,disabled:r,style:{padding:"0.75rem 1.5rem",fontSize:"0.9375rem",fontWeight:600,borderRadius:"10px",border:"none",cursor:r?"not-allowed":"pointer",background:r?"var(--bg-hover)":"linear-gradient(135deg, var(--gradient-start), var(--gradient-end))",color:r?"var(--text-secondary)":"white",transition:"all 0.2s ease",boxShadow:r?"none":"0 4px 12px rgba(99, 102, 241, 0.25)"},children:t?"\uD83D\uDCBE Saving...":`💾 ${i}`})}function g({onClick:e}){return(0,n.jsx)("button",{onClick:e,style:{padding:"0.5rem",background:"transparent",border:"1px solid var(--border)",borderRadius:"8px",color:"var(--text-secondary)",cursor:"pointer",transition:"all 0.2s",lineHeight:1},title:"Remove",children:"✕"})}},31704:(e,r,t)=>{Promise.resolve().then(t.bind(t,48688))},38942:(e,r,t)=>{"use strict";t.d(r,{R:()=>o});var n=t(95155),i=t(39092),a=t.n(i);function s({isOpen:e,onClose:r,children:t,width:i="500px"}){return e?(0,n.jsxs)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(4px)",background:"rgba(0, 0, 0, 0.5)",animation:"fadeIn 0.2s ease-out"},className:"jsx-5d567d25508aa188",children:[(0,n.jsx)("div",{onClick:e=>e.stopPropagation(),style:{background:"var(--bg-primary)",borderRadius:"12px",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",width:i,maxWidth:"90%",maxHeight:"90vh",overflow:"auto",border:"1px solid var(--border)",animation:"slideUp 0.2s ease-out"},className:"jsx-5d567d25508aa188",children:t}),(0,n.jsx)(a(),{id:"5d567d25508aa188",children:"@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes slideUp{from{opacity:0;transform:scale(.95)translatey(10px)}to{opacity:1;transform:scale(1)translatey(0)}}"})]}):null}function o({isOpen:e,onClose:r,onConfirm:t,title:i,message:a,confirmLabel:o="Confirm",cancelLabel:l="Cancel",isDangerous:d=!1}){return(0,n.jsx)(s,{isOpen:e,onClose:r,width:"400px",children:(0,n.jsxs)("div",{style:{padding:"1.5rem"},children:[(0,n.jsx)("h3",{style:{margin:"0 0 0.5rem 0",fontSize:"1.25rem",fontWeight:600},children:i}),(0,n.jsx)("p",{style:{margin:"0 0 1.5rem 0",color:"var(--text-secondary)",lineHeight:1.5},children:a}),(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.75rem"},children:[(0,n.jsx)("button",{onClick:r,className:"btn",style:{background:"transparent",border:"1px solid var(--border)",color:"var(--text-primary)"},children:l}),(0,n.jsx)("button",{onClick:()=>{t(),r()},className:"btn",style:{background:d?"var(--error)":"var(--accent)",color:"white",border:"none",fontWeight:600},children:o})]})]})})}t(12115)},48688:(e,r,t)=>{"use strict";t.d(r,{URSClient:()=>g});var n=t(95155),i=t(12115),a=t(73321),s=t(98500),o=t.n(s),l=t(9339);let d=(0,l.createServerReference)("40f8a2e055e173114c24aab3d7166e4cf6b15cd287",l.callServer,void 0,l.findSourceMapURL,"archiveURSAction");var c=t(81982),u=t(76444),p=t(13987),m=t(17948),h=t(38942);function g({urs:e,isNew:r=!1,linkedFS:s=[],allFS:l=[]}){let g=(0,a.useRouter)(),[y,b]=(0,i.useState)(r),[f,j]=(0,i.useState)(e?.title||""),[S,w]=(0,i.useState)(e?.status||"draft"),[C,k]=(0,i.useState)(e?.priority||"high"),[R,z]=(0,i.useState)(e?.owner||""),[B,_]=(0,i.useState)(e?.category||""),[N,W]=(0,i.useState)(e?.business_need||""),[I,A]=(0,i.useState)(e?.acceptance_criteria||[""]),[L,U]=(0,i.useState)(s.map(e=>e.id)),[F,q]=(0,i.useState)(null),[E,T]=(0,i.useState)({type:"idle"}),[D,H]=(0,i.useTransition)(),[O,$]=(0,i.useState)(!1),[M,P]=(0,i.useState)(!1),Q=async()=>{$(!0)},Y=async()=>{await d(e.id),g.refresh(),b(!1)},K=async()=>{P(!0)},Z=async()=>{await (0,c.Z)(e.id),g.refresh()};return!y&&e?(0,n.jsxs)("div",{className:"card",style:{maxWidth:"900px"},children:[e.is_archived&&(0,n.jsxs)("div",{style:{background:"rgba(239, 68, 68, 0.1)",border:"1px solid var(--error)",padding:"1rem",borderRadius:"8px",marginBottom:"1.5rem",color:"var(--error)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsxs)("span",{children:[(0,n.jsx)("strong",{children:"Archived:"})," This item is soft-deleted and hidden from lists."]}),(0,n.jsx)("button",{onClick:K,className:"btn",style:{background:"var(--bg-hover)",border:"1px solid var(--error)",color:"var(--error)"},children:"Restore"})]}),(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"2rem",paddingBottom:"1.5rem",borderBottom:"1px solid var(--border)"},children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"1rem",marginBottom:"0.5rem"},children:[(0,n.jsx)("span",{style:{fontSize:"0.75rem",fontWeight:600,padding:"0.25rem 0.75rem",background:"linear-gradient(135deg, var(--gradient-start), var(--gradient-end))",borderRadius:"6px",color:"white"},children:e.id}),(0,n.jsxs)("span",{className:`badge ${"approved"===e.status?"badge-success":"review"===e.status?"badge-warning":""}`,style:{textTransform:"capitalize"},children:["approved"===e.status?"✅":"review"===e.status?"\uD83D\uDC40":"\uD83D\uDCDD"," ",e.status]})]}),(0,n.jsx)("h1",{style:{margin:0,fontSize:"1.5rem",fontWeight:600,lineHeight:1.3},children:e.title})]}),(0,n.jsxs)("div",{style:{display:"flex",gap:"0.75rem"},children:[(0,n.jsx)("button",{onClick:Q,className:"btn",style:{background:"transparent",border:"1px solid var(--error)",color:"var(--error)",display:e.is_archived?"none":"flex",alignItems:"center",gap:"0.5rem"},children:"\uD83D\uDDD1️ Archive"}),(0,n.jsxs)("button",{onClick:()=>b(!0),disabled:!!e.is_archived,className:"btn btn-primary",style:{display:"flex",gap:"0.5rem",alignItems:"center",opacity:e.is_archived?.5:1,cursor:e.is_archived?"not-allowed":"pointer"},children:[(0,n.jsx)("span",{children:"✏️"})," Edit"]})]})]}),(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1rem",marginBottom:"1.5rem"},children:[(0,n.jsx)(x,{label:"Priority",value:e.priority,color:function(e){switch(e){case"critical":return"#ef4444";case"high":return"#f97316";case"medium":return"#f59e0b";case"low":return"#10b981";default:return"var(--text-primary)"}}(e.priority)}),(0,n.jsx)(x,{label:"Category",value:e.category}),(0,n.jsx)(x,{label:"Owner",value:e.owner}),(0,n.jsx)(x,{label:"Created",value:e.created_at?new Date(e.created_at).toLocaleDateString():void 0})]}),(0,n.jsx)(v,{label:"Linked Functional Specs",count:s.length,children:s.length>0?(0,n.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.5rem"},children:s.map(e=>(0,n.jsx)(o(),{href:`/traceability/fs/${e.id}`,style:{textDecoration:"none"},children:(0,n.jsx)("span",{className:"badge",style:{background:"rgba(245, 158, 11, 0.15)",color:"var(--warning)"},children:e.id})},e.id))}):(0,n.jsx)("span",{style:{color:"var(--text-secondary)",fontStyle:"italic"},children:"No linked FS"})}),(0,n.jsx)(v,{label:"Business Need",children:e.business_need?(0,n.jsx)("div",{className:"prose",children:(0,n.jsx)(u.oz,{children:e.business_need})}):(0,n.jsx)("span",{style:{color:"var(--text-secondary)",fontStyle:"italic"},children:"No business need specified"})}),e.acceptance_criteria&&e.acceptance_criteria.length>0&&(0,n.jsx)(v,{label:"Acceptance Criteria",count:e.acceptance_criteria.length,children:(0,n.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:e.acceptance_criteria.map((e,r)=>(0,n.jsxs)("div",{style:{display:"flex",gap:"0.75rem",alignItems:"flex-start"},children:[(0,n.jsxs)("span",{style:{color:"var(--accent)",fontWeight:600,fontSize:"0.875rem",minWidth:"24px"},children:[r+1,"."]}),(0,n.jsx)("span",{style:{lineHeight:1.6},children:e})]},r))})}),(0,n.jsx)(h.R,{isOpen:O,onClose:()=>$(!1),onConfirm:Y,title:"Archive Requirement",message:"Are you sure you want to archive this URS? It will be hidden from lists but can be restored later.",confirmLabel:"Archive",isDangerous:!0}),(0,n.jsx)(h.R,{isOpen:M,onClose:()=>P(!1),onConfirm:Z,title:"Restore Requirement",message:"Are you sure you want to restore this URS?",confirmLabel:"Restore"})]}):(0,n.jsxs)("div",{className:"card",style:{maxWidth:"900px"},children:[(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"2rem",paddingBottom:"1.5rem",borderBottom:"1px solid var(--border)"},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{style:{margin:0,fontSize:"1.25rem",fontWeight:600},children:r?"New User Requirement":`Editing ${e?.id}`}),(0,n.jsx)("p",{style:{margin:"0.25rem 0 0",color:"var(--text-secondary)",fontSize:"0.875rem"},children:r?"Create a new URS document":"Update requirement details"})]}),(0,n.jsxs)("div",{style:{display:"flex",gap:"0.75rem"},children:[!r&&(0,n.jsx)("button",{onClick:Q,style:{padding:"0.75rem 1.5rem",background:"transparent",border:"1px solid var(--error)",borderRadius:"10px",color:"var(--error)",cursor:"pointer",fontWeight:600},title:"Archive this requirement",children:"Archive"}),(0,n.jsx)("button",{onClick:()=>{r?g.back():(j(e?.title||""),w(e?.status||"draft"),k(e?.priority||"high"),z(e?.owner||""),_(e?.category||""),W(e?.business_need||""),A(e?.acceptance_criteria||[""]),U(s.map(e=>e.id)),b(!1))},style:{padding:"0.75rem 1.5rem",background:"transparent",border:"1px solid var(--border)",borderRadius:"10px",color:"var(--text-secondary)",cursor:"pointer",fontWeight:600},children:"Cancel"}),(0,n.jsx)(m.yY,{onClick:()=>{T({type:"idle"}),H(async()=>{try{let n,i={title:f,status:S,priority:C,owner:R,category:B,business_need:N,intended_use:"",acceptance_criteria:I.filter(e=>e.trim()),regulatory_refs:[]};if(r||e.id,r){let{saveURS:e}=await t.e(9447).then(t.bind(t,39447));n=await e(i)}else{let{updateURSAction:r}=await t.e(9447).then(t.bind(t,39447));n=await r(e.id,i)}if(!n.success)return void T({type:"error",message:n.error});let a=n.id,{updateFSLinksAction:o}=await t.e(9447).then(t.bind(t,39447)),d=s.map(e=>e.id);for(let e of new Set([...d,...L])){let r=l.find(r=>r.id===e);if(!r)continue;let t=new Set(r.urs_ids);L.includes(e)?t.add(a):t.delete(a),await o(e,Array.from(t))}T({type:"success",message:`Saved ${a}`}),r?g.push(`/traceability/urs/${a}`):(g.refresh(),b(!1))}catch(e){T({type:"error",message:"Failed to save"})}})},disabled:D||!f.trim()||!R.trim(),isPending:D,label:"Save URS"})]})]}),(0,n.jsx)(m.t3,{status:E}),(0,n.jsx)(m.zB,{label:"Title",required:!0,children:(0,n.jsx)("input",{type:"text",value:f,onChange:e=>j(e.target.value),onFocus:()=>q("title"),onBlur:()=>q(null),placeholder:"e.g., User Authentication Requirements",style:(0,m.wI)("title",F)})}),(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1rem",marginBottom:"1.5rem"},children:[(0,n.jsx)(m.zB,{label:"Status",compact:!0,children:(0,n.jsxs)("select",{value:S,onChange:e=>w(e.target.value),onFocus:()=>q("status"),onBlur:()=>q(null),style:(0,m.mQ)("status",F),children:[(0,n.jsx)("option",{value:"draft",children:"\uD83D\uDCDD Draft"}),(0,n.jsx)("option",{value:"review",children:"\uD83D\uDC40 Review"}),(0,n.jsx)("option",{value:"approved",children:"✅ Approved"})]})}),(0,n.jsx)(m.zB,{label:"Priority",compact:!0,children:(0,n.jsxs)("select",{value:C,onChange:e=>k(e.target.value),onFocus:()=>q("priority"),onBlur:()=>q(null),style:(0,m.mQ)("priority",F),children:[(0,n.jsx)("option",{value:"critical",children:"\uD83D\uDD34 Critical"}),(0,n.jsx)("option",{value:"high",children:"\uD83D\uDFE0 High"}),(0,n.jsx)("option",{value:"medium",children:"\uD83D\uDFE1 Medium"}),(0,n.jsx)("option",{value:"low",children:"\uD83D\uDFE2 Low"})]})}),(0,n.jsx)(m.zB,{label:"Category",compact:!0,children:(0,n.jsx)("input",{type:"text",value:B,onChange:e=>_(e.target.value),onFocus:()=>q("category"),onBlur:()=>q(null),placeholder:"e.g., Security",style:(0,m.wI)("category",F)})}),(0,n.jsx)(m.zB,{label:"Owner",required:!0,compact:!0,children:(0,n.jsx)("input",{type:"text",value:R,onChange:e=>z(e.target.value),onFocus:()=>q("owner"),onBlur:()=>q(null),placeholder:"e.g., Product Team",style:(0,m.wI)("owner",F)})})]}),(0,n.jsx)(m.zB,{label:"Linked Functional Specs",hint:"Select FS that implement this requirement",children:(0,n.jsx)(p.j,{options:l.map(e=>({value:e.id,label:`${e.id} - ${e.title}`})),selected:L,onChange:U,placeholder:"Search FS...",multi:!0})}),(0,n.jsx)(m.zB,{label:"Business Need",hint:"Describe why this requirement exists",children:(0,n.jsx)("textarea",{value:N,onChange:e=>W(e.target.value),onFocus:()=>q("businessNeed"),onBlur:()=>q(null),placeholder:"Describe the business problem this requirement addresses...",style:{...(0,m.KN)("businessNeed",F),minHeight:"140px"}})}),(0,n.jsx)(m.zB,{label:"Acceptance Criteria",hint:"Define measurable conditions for success",action:{label:"+ Add Criterion",onClick:()=>A([...I,""])},children:(0,n.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:I.map((e,r)=>(0,n.jsxs)("div",{style:{display:"flex",gap:"0.75rem",alignItems:"center"},children:[(0,n.jsxs)("span",{style:{color:"var(--accent)",fontWeight:600,fontSize:"0.875rem",minWidth:"24px"},children:[r+1,"."]}),(0,n.jsx)("input",{type:"text",value:e,onChange:e=>{var t;let n;return t=e.target.value,void((n=[...I])[r]=t,A(n))},onFocus:()=>q(`criterion-${r}`),onBlur:()=>q(null),placeholder:`Criterion ${r+1}`,style:{...(0,m.wI)(`criterion-${r}`,F),flex:1}}),I.length>1&&(0,n.jsx)("button",{onClick:()=>{I.length>1&&A(I.filter((e,t)=>t!==r))},style:{padding:"0.5rem",background:"transparent",border:"1px solid var(--border)",borderRadius:"8px",color:"var(--text-secondary)",cursor:"pointer"},children:"✕"})]},r))})}),(0,n.jsx)(h.R,{isOpen:O,onClose:()=>$(!1),onConfirm:Y,title:"Archive Requirement",message:"Are you sure you want to archive this URS? It will be hidden from lists but can be restored later.",confirmLabel:"Archive",isDangerous:!0}),(0,n.jsx)(h.R,{isOpen:M,onClose:()=>P(!1),onConfirm:Z,title:"Restore Requirement",message:"Are you sure you want to restore this URS?",confirmLabel:"Restore"})]})}function x({label:e,value:r,color:t}){return(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{style:{fontSize:"0.75rem",color:"var(--text-secondary)",fontWeight:500,marginBottom:"0.25rem"},children:e}),(0,n.jsx)("div",{style:{fontSize:"1rem",fontWeight:500,textTransform:"capitalize",color:t||"var(--text-primary)"},children:r||"—"})]})}function v({label:e,count:r,children:t}){return(0,n.jsxs)("div",{style:{marginBottom:"1.5rem"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",marginBottom:"0.5rem"},children:[(0,n.jsx)("label",{style:{fontWeight:500,fontSize:"0.875rem",color:"var(--text-secondary)"},children:e}),void 0!==r&&(0,n.jsx)("span",{style:{fontSize:"0.75rem",padding:"0.125rem 0.5rem",background:"var(--bg-hover)",borderRadius:"9999px"},children:r})]}),(0,n.jsx)("div",{style:{lineHeight:1.7},children:t})]})}},81982:(e,r,t)=>{"use strict";t.d(r,{Z:()=>i});var n=t(9339);let i=(0,n.createServerReference)("4020f05a9672914a4f917930d4c932391d5246a769",n.callServer,void 0,n.findSourceMapURL,"restoreURSAction")}},e=>{e.O(0,[8500,1157,8441,3794,7358],()=>e(e.s=31704)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (()=>{"use strict";var e,t,r,a,o,c,f,d,n={},i={};function b(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}},a=!0;try{n[e].call(r.exports,r,r.exports,b),a=!1}finally{a&&delete i[e]}return r.exports}b.m=n,e=[],b.O=(t,r,a,o)=>{if(r){o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[r,a,o];return}for(var f=1/0,c=0;c<e.length;c++){for(var[r,a,o]=e[c],d=!0,n=0;n<r.length;n++)(!1&o||f>=o)&&Object.keys(b.O).every(e=>b.O[e](r[n]))?r.splice(n--,1):(d=!1,o<f&&(f=o));if(d){e.splice(c--,1);var i=a();void 0!==i&&(t=i)}}return t},b.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return b.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,a){if(1&a&&(e=this(e)),8&a||"object"==typeof e&&e&&(4&a&&e.__esModule||16&a&&"function"==typeof e.then))return e;var o=Object.create(null);b.r(o);var c={};t=t||[null,r({}),r([]),r(r)];for(var f=2&a&&e;"object"==typeof f&&!~t.indexOf(f);f=r(f))Object.getOwnPropertyNames(f).forEach(t=>c[t]=()=>e[t]);return c.default=()=>e,b.d(o,c),o},b.d=(e,t)=>{for(var r in t)b.o(t,r)&&!b.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce((t,r)=>(b.f[r](e,t),t),[])),b.u=e=>"static/chunks/"+(({7330:"d3ac728e",7881:"2cdb6380",8747:"90542734"})[e]||e)+"."+({288:"eec78353ed692c58",448:"00c3a4af8c45f64c",628:"38b81cd56aaf4cf1",991:"718b573be77108f0",1371:"e9c049ff15fa0424",1455:"4b25458cc615feec",1633:"5050d8d1007aa587",1816:"a66aacf78a1f2b9e",2765:"8adcf70b75e6aeef",2947:"f836f6410050c641",2951:"8c1f9418d93f794e",3164:"23a30fb4d0160788",3197:"d8e82b560a160022",3242:"bb0fe7b7913ef780",3398:"dcb200a913a6c354",3477:"ec9165cd3e012b87",3619:"14ab2b037411c8dd",4410:"667e7a91b32268d8",4631:"fb52c10c618eda8d",4839:"47666b4d0dd6793d",5176:"4f4e736e3be7cf15",5290:"d0e93eb9d345026e",5838:"5c3810ae9f41fb2d",6034:"4c6801c982ca9779",6173:"85c05df7afadd80f",6184:"1deabc6af2557dbb",6257:"4802e493b197340d",6454:"7f2f7cf37c6cb691",6971:"ffe28a433af5503c",7048:"fae262ca1df0ad90",7330:"4b57bd9bce7cd3c1",7465:"55e7c3c6cc146535",7874:"574b3fc13af99551",7881:"d41c2c1792d85cbd",8037:"c5f9113a6cb1dbb7",8284:"b907c17d2a294557",8365:"9b15b21e000887e5",8486:"357508328aef1d93",8747:"d84bb73ebd95167a",8863:"b065187bd644df7b",8904:"c3becf8cf19ec1eb",9133:"c96e717400860724",9203:"577b14724e972a55",9447:"55ff38194a755c72",9536:"0478cfe5e9cfc9d5"})[e]+".js",b.miniCssF=e=>{},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},b.l=(e,t,r,o)=>{if(a[e])return void a[e].push(t);if(void 0!==r)for(var c,f,d=document.getElementsByTagName("script"),n=0;n<d.length;n++){var i=d[n];if(i.getAttribute("src")==e||i.getAttribute("data-webpack")=="_N_E:"+r){c=i;break}}c||(f=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,b.nc&&c.setAttribute("nonce",b.nc),c.setAttribute("data-webpack","_N_E:"+r),c.src=b.tu(e)),a[e]=[t];var u=(t,r)=>{c.onerror=c.onload=null,clearTimeout(l);var o=a[e];if(delete a[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach(e=>e(r)),t)return t(r)},l=setTimeout(u.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=u.bind(null,c.onerror),c.onload=u.bind(null,c.onload),f&&document.head.appendChild(c)},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.tt=()=>(void 0===o&&(o={createScriptURL:e=>e},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(o=trustedTypes.createPolicy("nextjs#bundler",o))),o),b.tu=e=>b.tt().createScriptURL(e),b.p="/_next/",c={8068:0,3334:0},b.f.j=(e,t)=>{var r=b.o(c,e)?c[e]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(3334|8068)$/.test(e))c[e]=0;else{var a=new Promise((t,a)=>r=c[e]=[t,a]);t.push(r[2]=a);var o=b.p+b.u(e),f=Error();b.l(o,t=>{if(b.o(c,e)&&(0!==(r=c[e])&&(c[e]=void 0),r)){var a=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;f.message="Loading chunk "+e+" failed.\n("+a+": "+o+")",f.name="ChunkLoadError",f.type=a,f.request=o,r[1](f)}},"chunk-"+e,e)}},b.O.j=e=>0===c[e],f=(e,t)=>{var r,a,[o,f,d]=t,n=0;if(o.some(e=>0!==c[e])){for(r in f)b.o(f,r)&&(b.m[r]=f[r]);if(d)var i=d(b)}for(e&&e(t);n<o.length;n++)a=o[n],b.o(c,a)&&c[a]&&c[a][0](),c[a]=0;return b.O(i)},(d=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(f.bind(null,0)),d.push=f.bind(null,d.push.bind(d))})();