@lunora/studio 1.0.0-alpha.96 → 1.0.0-alpha.98

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 (64) hide show
  1. package/dist/standalone/{chunk-NQ4FA65F.js → chunk-2TFGS62O.js} +1 -1
  2. package/dist/standalone/{chunk-JRAUQ4L2.js → chunk-3J6AAVUL.js} +1 -1
  3. package/dist/standalone/{chunk-AUXEGD24.js → chunk-4D56O2UT.js} +1 -1
  4. package/dist/standalone/{chunk-3PXUIMP2.js → chunk-5GMRSN6L.js} +1 -1
  5. package/dist/standalone/chunk-6FQJRXVI.js +11 -0
  6. package/dist/standalone/{chunk-7KU3LR7G.js → chunk-6IKXBSNY.js} +1 -1
  7. package/dist/standalone/{chunk-VWKQ6X2S.js → chunk-7CWPU3LW.js} +1 -1
  8. package/dist/standalone/{chunk-FA6AR5QU.js → chunk-7HWEPGII.js} +1 -1
  9. package/dist/standalone/{chunk-ZURV2PEP.js → chunk-7IIICQZ7.js} +1 -1
  10. package/dist/standalone/{chunk-LV5UVTHL.js → chunk-AIB3GCQI.js} +1 -1
  11. package/dist/standalone/{chunk-D7B2KFWM.js → chunk-AS4WSCMT.js} +1 -1
  12. package/dist/standalone/{chunk-57BUSXRD.js → chunk-ATLV7KWK.js} +1 -1
  13. package/dist/standalone/{chunk-ZCPQGIQW.js → chunk-BAZ2VU7R.js} +1 -1
  14. package/dist/standalone/{chunk-2FRLB5SB.js → chunk-BG54FBTO.js} +1 -1
  15. package/dist/standalone/{chunk-NSUBZT43.js → chunk-BLHSTFG3.js} +1 -1
  16. package/dist/standalone/{chunk-TAWXVVAZ.js → chunk-BMZPRRSX.js} +1 -1
  17. package/dist/standalone/{chunk-ESIEIGR3.js → chunk-D34YXUQY.js} +1 -1
  18. package/dist/standalone/{chunk-UE6A3CRB.js → chunk-DK4J7ZBH.js} +1 -1
  19. package/dist/standalone/{chunk-DGO2XJOT.js → chunk-DSU54IAT.js} +1 -1
  20. package/dist/standalone/{chunk-YOKL7XDT.js → chunk-FKBHX7BD.js} +1 -1
  21. package/dist/standalone/{chunk-LZGOETI3.js → chunk-HRRFUAP6.js} +1 -1
  22. package/dist/standalone/{chunk-TKFI6XYV.js → chunk-II5ZTRTW.js} +1 -1
  23. package/dist/standalone/{chunk-7URLLMST.js → chunk-IMME7XEE.js} +1 -1
  24. package/dist/standalone/{chunk-U5MIBWJD.js → chunk-IXAMI2KV.js} +1 -1
  25. package/dist/standalone/{chunk-UZHRBXA7.js → chunk-J3Q3ESBP.js} +1 -1
  26. package/dist/standalone/{chunk-AQZMKZMP.js → chunk-J6PMARYI.js} +1 -1
  27. package/dist/standalone/{chunk-TVRCPIAV.js → chunk-JNY7CFF4.js} +1 -1
  28. package/dist/standalone/{chunk-WOBRLIBX.js → chunk-JR4LDDRW.js} +1 -1
  29. package/dist/standalone/{chunk-SFQX7RUJ.js → chunk-JZUM7FBJ.js} +1 -1
  30. package/dist/standalone/{chunk-3WISGFZ7.js → chunk-KBBOZRRX.js} +1 -1
  31. package/dist/standalone/{chunk-2NO45MRI.js → chunk-KVYAMWYX.js} +1 -1
  32. package/dist/standalone/{chunk-LT236J7E.js → chunk-M2M3RYJU.js} +1 -1
  33. package/dist/standalone/{chunk-BLJANR7J.js → chunk-MCPDCNPO.js} +1 -1
  34. package/dist/standalone/{chunk-2IFGRS6R.js → chunk-N6N6MMWG.js} +1 -1
  35. package/dist/standalone/{chunk-Q2QILUP4.js → chunk-NTAN75BV.js} +1 -1
  36. package/dist/standalone/{chunk-WPERYUTG.js → chunk-O36FXWMR.js} +1 -1
  37. package/dist/standalone/{chunk-ECF57FQF.js → chunk-O3BG6T4B.js} +1 -1
  38. package/dist/standalone/{chunk-U7ILDM43.js → chunk-OQIGV6FX.js} +1 -1
  39. package/dist/standalone/{chunk-YEGFNH56.js → chunk-P33WK7YI.js} +1 -1
  40. package/dist/standalone/{chunk-GL7YL3VF.js → chunk-PLFTCTMX.js} +1 -1
  41. package/dist/standalone/{chunk-DXJWFZFI.js → chunk-QVK5DESS.js} +1 -1
  42. package/dist/standalone/{chunk-HJC67CE4.js → chunk-RE7VLJ6H.js} +1 -1
  43. package/dist/standalone/{chunk-I7FF5IIJ.js → chunk-T2NCAYLT.js} +1 -1
  44. package/dist/standalone/{chunk-OZK52CH2.js → chunk-T7AVSVIA.js} +1 -1
  45. package/dist/standalone/{chunk-KGPNIBOV.js → chunk-T7YW6OMG.js} +1 -1
  46. package/dist/standalone/{chunk-BAJXBWFJ.js → chunk-TLVSMHK2.js} +1 -1
  47. package/dist/standalone/{chunk-QNQTMABQ.js → chunk-TMZQNRFA.js} +1 -1
  48. package/dist/standalone/{chunk-WQJOV6L5.js → chunk-U3Y2BI4W.js} +2 -2
  49. package/dist/standalone/{chunk-2YGNOZPZ.js → chunk-UE2NC2ZZ.js} +1 -1
  50. package/dist/standalone/{chunk-44T6NSYY.js → chunk-URCRLZN7.js} +1 -1
  51. package/dist/standalone/{chunk-E2C6CK7F.js → chunk-UYOSHHOV.js} +1 -1
  52. package/dist/standalone/{chunk-BMYWOK5Q.js → chunk-V3EN6YQV.js} +1 -1
  53. package/dist/standalone/{chunk-QVPKPH2T.js → chunk-V4R4HI3U.js} +1 -1
  54. package/dist/standalone/{chunk-CFXL7MQK.js → chunk-VKK7A4VH.js} +1 -1
  55. package/dist/standalone/{chunk-LZ2RREQV.js → chunk-VOYG35OH.js} +1 -1
  56. package/dist/standalone/{chunk-EYIEO5QZ.js → chunk-W2GXYXCQ.js} +1 -1
  57. package/dist/standalone/{chunk-TGQH54CS.js → chunk-WG3WC2F2.js} +1 -1
  58. package/dist/standalone/{chunk-34WN3PEC.js → chunk-WZXZ6YN5.js} +1 -1
  59. package/dist/standalone/{chunk-MVJMAEP4.js → chunk-XGL7QCYN.js} +1 -1
  60. package/dist/standalone/{chunk-J4POSI6T.js → chunk-XUQEE25M.js} +1 -1
  61. package/dist/standalone/{chunk-IGBUUFPN.js → chunk-XYENOWOR.js} +1 -1
  62. package/dist/standalone/studio.js +1 -1
  63. package/package.json +6 -6
  64. package/dist/standalone/chunk-ETU7KIO4.js +0 -11
@@ -1 +1 @@
1
- import{a as We,b as De,c as Fe,d as Oe,e as we}from"./chunk-MKYEFQCA.js";import"./chunk-2PJNAWB3.js";import"./chunk-SD4BERSA.js";import"./chunk-IC4L6G56.js";import{a as qe}from"./chunk-3SCGCJYS.js";import{a as Ve}from"./chunk-IGCNMZSB.js";import"./chunk-2QSHLBCO.js";import"./chunk-BGBLQ563.js";import"./chunk-IVFHIQOT.js";import"./chunk-QBWRC5YX.js";import{a as ze}from"./chunk-3CWGJYBB.js";import{a as Te}from"./chunk-RMN2JN4S.js";import"./chunk-GRL5MG3Z.js";import"./chunk-7T7UOTYK.js";import{R as ke}from"./chunk-CFPZYHPY.js";import"./chunk-T6VMSOBB.js";import"./chunk-7QIFDWQV.js";import{c as ie}from"./chunk-FXCBF4XT.js";import"./chunk-2OUPA2WJ.js";import{b as me}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import"./chunk-QLQADHFE.js";import{a as D}from"./chunk-VDW32UET.js";import{c as Ee}from"./chunk-LZGOETI3.js";import{f as Ne}from"./chunk-ETU7KIO4.js";import"./chunk-XBDKZZ67.js";import{a as Ce}from"./chunk-XQCVZAGU.js";import{a as Le,b as je,c as Re,d as pe,e as W,f as L}from"./chunk-WJQLNYGX.js";import{a as Me,e as Ae}from"./chunk-WQH3LT2P.js";import{d as ue,f as le,g as be,h as Ke,o as re,r as _e}from"./chunk-IUYFXK4X.js";import{a as Ie,b as $e}from"./chunk-YEGFNH56.js";import{a as d,e as ye,f as Be,g as Ge,h as He}from"./chunk-3XIESWL4.js";var ge=ye(Ge(),1);var ne=ye(Be(),1);var t=ye(He(),1);var Se="none",Je=["all","open","resolved","ignored"],Pe=["critical","high","medium","low"],Qe=le(D.resolveIssue),Xe=le(D.ignoreIssue),Ue=le(D.assignIssue),Ye=le(D.setIssueSeverity),Ze=le(D.explainIssue),es=d(n=>Array.isArray(n?.issues)?n.issues:[],"Ye"),ss=d(n=>n==="resolved"?"success":n==="ignored"?"secondary":"warning","Ze"),ts=d(n=>n==="critical"?"destructive":n==="high"?"warning":n==="medium"?"info":"secondary","Pe"),as=d(n=>{let e=(0,ge.c)(44),{expanded:u,issue:s,shardKey:$}=n,i=Ne(),r=ue(),[a,o]=(0,ne.useState)(void 0),{busy:T,error:C,run:j}=qe(),K;e[0]!==i||e[1]!==s||e[2]!==j||e[3]!==$?(K=d(()=>{o(void 0),j(async()=>{let g={culprit:s.culprit,sampleMessage:s.sampleMessage,title:s.title},I=await i.query(Ze,g,be($));o(I)})},"K"),e[0]=i,e[1]=s,e[2]=j,e[3]=$,e[4]=K):K=e[4];let z=K;if(!u)return null;let k;if(e[5]!==s.sampleMessage){let g=$e(s.sampleMessage);k=g===void 0?void 0:Ie(g.body),e[5]=s.sampleMessage,e[6]=k}else k=e[6];let _=k,E=`issues-detail-${s.hash}`,h;e[7]!==s.sampleMessage?(h=(0,t.jsx)("p",{className:"whitespace-pre-wrap font-mono text-xs text-muted-foreground",children:s.sampleMessage}),e[7]=s.sampleMessage,e[8]=h):h=e[8];let x;e[9]!==r?(x=r("Suggested fix"),e[9]=r,e[10]=x):x=e[10];let M;e[11]!==x?(M=(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:x}),e[11]=x,e[12]=M):M=e[12];let v;e[13]!==_||e[14]!==s.hash||e[15]!==r?(v=_===void 0?(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground","data-testid":`issues-hint-empty-${s.hash}`,children:r("No known fix for this error yet.")}):(0,t.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-sm","data-testid":`issues-hint-${s.hash}`,children:_}),e[13]=_,e[14]=s.hash,e[15]=r,e[16]=v):v=e[16];let y;e[17]!==M||e[18]!==v?(y=(0,t.jsxs)("div",{children:[M,v]}),e[17]=M,e[18]=v,e[19]=y):y=e[19];let b=`issues-explain-${s.hash}`,w;e[20]!==T||e[21]!==r?(w=r(T?"Explaining\u2026":"Explain in plain language"),e[20]=T,e[21]=r,e[22]=w):w=e[22];let m;e[23]!==T||e[24]!==z||e[25]!==w||e[26]!==b?(m=(0,t.jsx)("div",{children:(0,t.jsx)(ie,{"data-testid":b,disabled:T,onClick:z,size:"sm",type:"button",variant:"outline",children:w})}),e[23]=T,e[24]=z,e[25]=w,e[26]=b,e[27]=m):m=e[27];let f;e[28]!==C||e[29]!==s.hash?(f=C!==null&&(0,t.jsx)("p",{className:"text-xs text-destructive","data-testid":`issues-explain-error-${s.hash}`,role:"alert",children:C}),e[28]=C,e[29]=s.hash,e[30]=f):f=e[30];let p;e[31]!==a||e[32]!==s.hash||e[33]!==r?(p=a!==void 0&&(a.degraded?(0,t.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":`issues-degraded-${s.hash}`,children:a.reason==="no-ai-binding"?r("No AI binding is configured. Wire an AI binding to enable plain-language explanations \u2014 the suggested fix above is always available."):r("The AI model could not explain this error right now. The suggested fix above still applies.")}):(0,t.jsxs)("div",{"data-testid":`issues-explanation-${s.hash}`,children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:r("AI explanation")}),(0,t.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-sm",children:a.explanation}),a.groundedId===void 0&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground","data-testid":`issues-ungrounded-${s.hash}`,children:r("No catalog fix matched this error, so this explanation is the model's own reading of the message. Verify before acting on it.")}),(0,t.jsx)("p",{className:"mt-1 text-[0.7rem] text-muted-foreground",children:r("Generated by {model}",{model:a.model})})]})),e[31]=a,e[32]=s.hash,e[33]=r,e[34]=p):p=e[34];let c;e[35]!==m||e[36]!==f||e[37]!==p||e[38]!==h||e[39]!==y?(c=(0,t.jsx)(L,{className:"bg-muted/30",colSpan:7,children:(0,t.jsxs)("div",{className:"flex flex-col gap-3 py-1",children:[h,y,m,f,p]})}),e[35]=m,e[36]=f,e[37]=p,e[38]=h,e[39]=y,e[40]=c):c=e[40];let S;return e[41]!==c||e[42]!==E?(S=(0,t.jsx)(pe,{"data-testid":E,children:c}),e[41]=c,e[42]=E,e[43]=S):S=e[43],S},"et"),is=d(n=>{let e=(0,ge.c)(119),{busy:u,issue:s,rowError:$,runTriage:i,shardKey:r}=n,a=ue(),[o,T]=(0,ne.useState)(!1),C;e[0]===Symbol.for("react.memo_cache_sentinel")?(C=d(()=>{T(ls)},"C"),e[0]=C):C=e[0];let j=C,K;e[1]!==s.hash||e[2]!==i?(K=d(ae=>{let ce=ae===null||ae===Se?null:ae;re(i(s.hash,Ye,{severity:ce}))},"K"),e[1]=s.hash,e[2]=i,e[3]=K):K=e[3];let z=K,k;e[4]!==s.hash||e[5]!==i?(k=d(ae=>{if(ae.key!=="Enter")return;let ce=ae.currentTarget.value.trim();re(i(s.hash,Ue,{assignee:ce===""?null:ce}))},"k"),e[4]=s.hash,e[5]=i,e[6]=k):k=e[6];let _=k,E=`issues-row-${s.hash}`,h;e[7]!==a?(h=a("Toggle issue details"),e[7]=a,e[8]=h):h=e[8];let x=`issues-toggle-${s.hash}`,M=`mt-1 size-3 shrink-0 text-muted-foreground transition-transform ${o?"rotate-90":""}`,v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=(0,t.jsx)("path",{d:"m9 6 6 6-6 6"}),e[9]=v):v=e[9];let y;e[10]!==M?(y=(0,t.jsx)("svg",{"aria-hidden":"true",className:M,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",children:v}),e[10]=M,e[11]=y):y=e[11];let b;e[12]!==s.title?(b=(0,t.jsx)("span",{className:"block truncate font-medium",title:s.title,children:s.title}),e[12]=s.title,e[13]=b):b=e[13];let w;e[14]!==s.culprit?(w=(0,t.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",title:s.culprit,children:s.culprit}),e[14]=s.culprit,e[15]=w):w=e[15];let m;e[16]!==b||e[17]!==w?(m=(0,t.jsxs)("span",{className:"min-w-0",children:[b,w]}),e[16]=b,e[17]=w,e[18]=m):m=e[18];let f;e[19]!==o||e[20]!==m||e[21]!==h||e[22]!==x||e[23]!==y?(f=(0,t.jsxs)("button",{"aria-expanded":o,"aria-label":h,className:"flex w-full items-start gap-2 text-left","data-testid":x,onClick:j,type:"button",children:[y,m]}),e[19]=o,e[20]=m,e[21]=h,e[22]=x,e[23]=y,e[24]=f):f=e[24];let p;e[25]!==s.hash||e[26]!==$?(p=$!==void 0&&(0,t.jsx)("p",{className:"mt-1 text-xs text-destructive","data-testid":`issues-action-error-${s.hash}`,role:"alert",children:$}),e[25]=s.hash,e[26]=$,e[27]=p):p=e[27];let c;e[28]!==f||e[29]!==p?(c=(0,t.jsxs)(L,{className:"max-w-80",children:[f,p]}),e[28]=f,e[29]=p,e[30]=c):c=e[30];let S=`issues-status-${s.hash}`,g;e[31]!==s.status?(g=ss(s.status),e[31]=s.status,e[32]=g):g=e[32];let I;e[33]!==s.status||e[34]!==S||e[35]!==g?(I=(0,t.jsx)(L,{children:(0,t.jsx)(me,{"data-testid":S,variant:g,children:s.status})}),e[33]=s.status,e[34]=S,e[35]=g,e[36]=I):I=e[36];let R=s.severity??Se,l;e[37]!==a?(l=a("Set severity"),e[37]=a,e[38]=l):l=e[38];let oe=`issues-severity-${s.hash}`,q;e[39]!==a?(q=a("\u2014"),e[39]=a,e[40]=q):q=e[40];let N;e[41]!==s.severity||e[42]!==a?(N=s.severity===void 0?(0,t.jsx)("span",{className:"text-muted-foreground",children:a("\u2014")}):(0,t.jsx)(me,{variant:ts(s.severity),children:s.severity}),e[41]=s.severity,e[42]=a,e[43]=N):N=e[43];let A;e[44]!==q||e[45]!==N?(A=(0,t.jsx)(De,{placeholder:q,children:N}),e[44]=q,e[45]=N,e[46]=A):A=e[46];let V;e[47]!==l||e[48]!==oe||e[49]!==A?(V=(0,t.jsx)(Fe,{"aria-label":l,className:"h-7 w-[110px]","data-testid":oe,children:A}),e[47]=l,e[48]=oe,e[49]=A,e[50]=V):V=e[50];let de;e[51]===Symbol.for("react.memo_cache_sentinel")?(de=Pe.map(rs),e[51]=de):de=e[51];let F;e[52]!==a?(F=a("Clear"),e[52]=a,e[53]=F):F=e[53];let O;e[54]!==F?(O=(0,t.jsxs)(Oe,{children:[de,(0,t.jsx)(we,{value:Se,children:F})]}),e[54]=F,e[55]=O):O=e[55];let U;e[56]!==u||e[57]!==z||e[58]!==R||e[59]!==V||e[60]!==O?(U=(0,t.jsx)(L,{children:(0,t.jsxs)(We,{disabled:u,onValueChange:z,value:R,children:[V,O]})}),e[56]=u,e[57]=z,e[58]=R,e[59]=V,e[60]=O,e[61]=U):U=e[61];let B;e[62]!==a?(B=a("Assignee"),e[62]=a,e[63]=B):B=e[63];let fe=`issues-assignee-${s.hash}`,xe=s.assignee??"",ve=s.assignee??"",G;e[64]!==a?(G=a("Unassigned"),e[64]=a,e[65]=G):G=e[65];let H;e[66]!==u||e[67]!==_||e[68]!==B||e[69]!==fe||e[70]!==xe||e[71]!==ve||e[72]!==G?(H=(0,t.jsx)(L,{children:(0,t.jsx)(ke,{"aria-label":B,className:"h-7 w-32","data-testid":fe,defaultValue:xe,disabled:u,onKeyDown:_,placeholder:G},ve)}),e[66]=u,e[67]=_,e[68]=B,e[69]=fe,e[70]=xe,e[71]=ve,e[72]=G,e[73]=H):H=e[73];let J;e[74]!==s.count?(J=(0,t.jsx)(L,{className:"text-right",children:(0,t.jsx)(me,{variant:"secondary",children:s.count})}),e[74]=s.count,e[75]=J):J=e[75];let P;e[76]!==s.lastSeen?(P=_e(s.lastSeen),e[76]=s.lastSeen,e[77]=P):P=e[77];let Q;e[78]!==P?(Q=(0,t.jsx)(L,{className:"text-xs tabular-nums text-muted-foreground",children:P}),e[78]=P,e[79]=Q):Q=e[79];let X;e[80]!==u||e[81]!==s.hash||e[82]!==s.status||e[83]!==i||e[84]!==a?(X=s.status!=="resolved"&&(0,t.jsx)(ie,{"data-testid":`issues-resolve-${s.hash}`,disabled:u,onClick:d(()=>{re(i(s.hash,Qe,{}))},"onClick"),size:"xs",variant:"outline",children:a("Resolve")}),e[80]=u,e[81]=s.hash,e[82]=s.status,e[83]=i,e[84]=a,e[85]=X):X=e[85];let Y;e[86]!==u||e[87]!==s.hash||e[88]!==s.status||e[89]!==i||e[90]!==a?(Y=s.status!=="ignored"&&(0,t.jsx)(ie,{"data-testid":`issues-ignore-${s.hash}`,disabled:u,onClick:d(()=>{re(i(s.hash,Xe,{}))},"onClick"),size:"xs",variant:"ghost",children:a("Ignore")}),e[86]=u,e[87]=s.hash,e[88]=s.status,e[89]=i,e[90]=a,e[91]=Y):Y=e[91];let Z;e[92]!==u||e[93]!==s.assignee||e[94]!==s.hash||e[95]!==s.status||e[96]!==i||e[97]!==a?(Z=s.status!=="open"&&(0,t.jsx)(ie,{"data-testid":`issues-reopen-${s.hash}`,disabled:u,onClick:d(()=>{re(i(s.hash,Ue,{assignee:s.assignee??null}))},"onClick"),size:"xs",variant:"ghost",children:a("Reopen")}),e[92]=u,e[93]=s.assignee,e[94]=s.hash,e[95]=s.status,e[96]=i,e[97]=a,e[98]=Z):Z=e[98];let ee;e[99]!==X||e[100]!==Y||e[101]!==Z?(ee=(0,t.jsx)(L,{className:"text-right",children:(0,t.jsxs)("div",{className:"flex justify-end gap-1",children:[X,Y,Z]})}),e[99]=X,e[100]=Y,e[101]=Z,e[102]=ee):ee=e[102];let se;e[103]!==c||e[104]!==I||e[105]!==U||e[106]!==H||e[107]!==J||e[108]!==Q||e[109]!==E||e[110]!==ee?(se=(0,t.jsxs)(pe,{"data-testid":E,children:[c,I,U,H,J,Q,ee]}),e[103]=c,e[104]=I,e[105]=U,e[106]=H,e[107]=J,e[108]=Q,e[109]=E,e[110]=ee,e[111]=se):se=e[111];let te;e[112]!==o||e[113]!==s||e[114]!==r?(te=(0,t.jsx)(as,{expanded:o,issue:s,shardKey:r},s.sampleMessage),e[112]=o,e[113]=s,e[114]=r,e[115]=te):te=e[115];let he;return e[116]!==se||e[117]!==te?(he=(0,t.jsxs)(t.Fragment,{children:[se,te]}),e[116]=se,e[117]=te,e[118]=he):he=e[118],he},"tt"),ks=d(n=>{let e=(0,ge.c)(38),{initialShardKey:u}=n,s=ue(),$=Ne(),{queryShardKey:i,setShardKey:r,shardKey:a}=ze(u),[o,T]=(0,ne.useState)("all"),[C,j]=(0,ne.useState)(ns),[K,z]=(0,ne.useState)(os),k;e[0]!==o?(k=o==="all"?{}:{status:o},e[0]=o,e[1]=k):k=e[1];let _;e[2]!==i?(_={live:!0,shardKey:i},e[2]=i,e[3]=_):_=e[3];let{data:E,error:h,liveError:x}=Ee(D.getIssues,k,_),M=E!==void 0,v;if(e[4]!==K||e[5]!==C||e[6]!==$||e[7]!==E||e[8]!==h||e[9]!==x||e[10]!==M||e[11]!==i||e[12]!==r||e[13]!==a||e[14]!==o||e[15]!==s){let y=es(E),b;e[17]!==$||e[18]!==i?(b=d(async(l,oe,q)=>{z(N=>{if(!N.has(l))return N;let A=new Map(N);return A.delete(l),A}),j(N=>new Set(N).add(l));try{await $.query(oe,{...q,hash:l},be(i))}catch(N){let A=Ke(N);z(V=>new Map(V).set(l,A))}j(N=>{let A=new Set(N);return A.delete(l),A})},"N"),e[17]=$,e[18]=i,e[19]=b):b=e[19];let w=b,m;e[20]!==s?(m=d(l=>s(l==="all"?"All":l==="open"?"Open":l==="resolved"?"Resolved":"Ignored"),"u"),e[20]=s,e[21]=m):m=e[21];let f=m,p;e[22]!==h?(p=h!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"issues-error",role:"alert",children:h}),e[22]=h,e[23]=p):p=e[23];let c;e[24]!==r||e[25]!==a?(c=(0,t.jsx)(Te,{onChange:r,testId:"issues-shard-input",value:a}),e[24]=r,e[25]=a,e[26]=c):c=e[26];let S;e[27]!==x?(S=(0,t.jsx)(Ve,{message:x,prefix:"issues"}),e[27]=x,e[28]=S):S=e[28];let g;e[29]!==o||e[30]!==f?(g=Je.map(l=>(0,t.jsx)(ie,{"data-active":o===l?"":void 0,"data-testid":`issues-filter-${l}`,onClick:d(()=>{T(l)},"onClick"),size:"xs",variant:o===l?"default":"outline",children:f(l)},l)),e[29]=o,e[30]=f,e[31]=g):g=e[31];let I;e[32]!==g?(I=(0,t.jsx)("div",{className:"ms-auto flex items-center gap-1","data-testid":"issues-status-filter",role:"group",children:g}),e[32]=g,e[33]=I):I=e[33];let R;e[34]!==I||e[35]!==c||e[36]!==S?(R=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,S,I]}),e[34]=I,e[35]=c,e[36]=S,e[37]=R):R=e[37],v=(0,t.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-issues-panel",children:[p,R,M&&y.length===0?(0,t.jsx)(Ce,{description:s("No grouped errors yet. When a function throws or a container crashes, matching errors fold into a single issue here."),testId:"issues-empty",title:s("No issues")}):(0,t.jsx)(Me,{className:"overflow-hidden py-0",children:(0,t.jsx)(Ae,{className:"px-0",children:(0,t.jsxs)(Le,{"data-testid":"issues-table",children:[(0,t.jsx)(je,{children:(0,t.jsxs)(pe,{children:[(0,t.jsx)(W,{children:s("Issue")}),(0,t.jsx)(W,{children:s("Status")}),(0,t.jsx)(W,{children:s("Severity")}),(0,t.jsx)(W,{children:s("Assignee")}),(0,t.jsx)(W,{className:"text-right",children:s("Events")}),(0,t.jsx)(W,{children:s("Last seen")}),(0,t.jsx)(W,{className:"text-right",children:s("Actions")})]})}),(0,t.jsx)(Re,{children:y.map(l=>(0,t.jsx)(is,{busy:C.has(l.hash),issue:l,rowError:K.get(l.hash),runTriage:w,shardKey:i},l.hash))})]})})})]}),e[4]=K,e[5]=C,e[6]=$,e[7]=E,e[8]=h,e[9]=x,e[10]=M,e[11]=i,e[12]=r,e[13]=a,e[14]=o,e[15]=s,e[16]=v}else v=e[16];return v},"kt");function ls(n){return!n}d(ls,"st");function rs(n){return(0,t.jsx)(we,{value:n,children:n},n)}d(rs,"at");function ns(){return new Set}d(ns,"it");function os(){return new Map}d(os,"rt");export{ks as default};
1
+ import{a as We,b as De,c as Fe,d as Oe,e as we}from"./chunk-MKYEFQCA.js";import"./chunk-2PJNAWB3.js";import"./chunk-SD4BERSA.js";import"./chunk-IC4L6G56.js";import{a as qe}from"./chunk-3SCGCJYS.js";import{a as Ve}from"./chunk-IGCNMZSB.js";import"./chunk-2QSHLBCO.js";import"./chunk-BGBLQ563.js";import"./chunk-IVFHIQOT.js";import"./chunk-QBWRC5YX.js";import{a as ze}from"./chunk-3CWGJYBB.js";import{a as Te}from"./chunk-RMN2JN4S.js";import"./chunk-GRL5MG3Z.js";import"./chunk-7T7UOTYK.js";import{R as ke}from"./chunk-CFPZYHPY.js";import"./chunk-T6VMSOBB.js";import"./chunk-7QIFDWQV.js";import{c as ie}from"./chunk-FXCBF4XT.js";import"./chunk-2OUPA2WJ.js";import{b as me}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import"./chunk-QLQADHFE.js";import{a as D}from"./chunk-VDW32UET.js";import{c as Ee}from"./chunk-HRRFUAP6.js";import{f as Ne}from"./chunk-6FQJRXVI.js";import"./chunk-XBDKZZ67.js";import{a as Ce}from"./chunk-XQCVZAGU.js";import{a as Le,b as je,c as Re,d as pe,e as W,f as L}from"./chunk-WJQLNYGX.js";import{a as Me,e as Ae}from"./chunk-WQH3LT2P.js";import{d as ue,f as le,g as be,h as Ke,o as re,r as _e}from"./chunk-IUYFXK4X.js";import{a as Ie,b as $e}from"./chunk-P33WK7YI.js";import{a as d,e as ye,f as Be,g as Ge,h as He}from"./chunk-3XIESWL4.js";var ge=ye(Ge(),1);var ne=ye(Be(),1);var t=ye(He(),1);var Se="none",Je=["all","open","resolved","ignored"],Pe=["critical","high","medium","low"],Qe=le(D.resolveIssue),Xe=le(D.ignoreIssue),Ue=le(D.assignIssue),Ye=le(D.setIssueSeverity),Ze=le(D.explainIssue),es=d(n=>Array.isArray(n?.issues)?n.issues:[],"Ye"),ss=d(n=>n==="resolved"?"success":n==="ignored"?"secondary":"warning","Ze"),ts=d(n=>n==="critical"?"destructive":n==="high"?"warning":n==="medium"?"info":"secondary","Pe"),as=d(n=>{let e=(0,ge.c)(44),{expanded:u,issue:s,shardKey:$}=n,i=Ne(),r=ue(),[a,o]=(0,ne.useState)(void 0),{busy:T,error:C,run:j}=qe(),K;e[0]!==i||e[1]!==s||e[2]!==j||e[3]!==$?(K=d(()=>{o(void 0),j(async()=>{let g={culprit:s.culprit,sampleMessage:s.sampleMessage,title:s.title},I=await i.query(Ze,g,be($));o(I)})},"K"),e[0]=i,e[1]=s,e[2]=j,e[3]=$,e[4]=K):K=e[4];let z=K;if(!u)return null;let k;if(e[5]!==s.sampleMessage){let g=$e(s.sampleMessage);k=g===void 0?void 0:Ie(g.body),e[5]=s.sampleMessage,e[6]=k}else k=e[6];let _=k,E=`issues-detail-${s.hash}`,h;e[7]!==s.sampleMessage?(h=(0,t.jsx)("p",{className:"whitespace-pre-wrap font-mono text-xs text-muted-foreground",children:s.sampleMessage}),e[7]=s.sampleMessage,e[8]=h):h=e[8];let x;e[9]!==r?(x=r("Suggested fix"),e[9]=r,e[10]=x):x=e[10];let M;e[11]!==x?(M=(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:x}),e[11]=x,e[12]=M):M=e[12];let v;e[13]!==_||e[14]!==s.hash||e[15]!==r?(v=_===void 0?(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground","data-testid":`issues-hint-empty-${s.hash}`,children:r("No known fix for this error yet.")}):(0,t.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-sm","data-testid":`issues-hint-${s.hash}`,children:_}),e[13]=_,e[14]=s.hash,e[15]=r,e[16]=v):v=e[16];let y;e[17]!==M||e[18]!==v?(y=(0,t.jsxs)("div",{children:[M,v]}),e[17]=M,e[18]=v,e[19]=y):y=e[19];let b=`issues-explain-${s.hash}`,w;e[20]!==T||e[21]!==r?(w=r(T?"Explaining\u2026":"Explain in plain language"),e[20]=T,e[21]=r,e[22]=w):w=e[22];let m;e[23]!==T||e[24]!==z||e[25]!==w||e[26]!==b?(m=(0,t.jsx)("div",{children:(0,t.jsx)(ie,{"data-testid":b,disabled:T,onClick:z,size:"sm",type:"button",variant:"outline",children:w})}),e[23]=T,e[24]=z,e[25]=w,e[26]=b,e[27]=m):m=e[27];let f;e[28]!==C||e[29]!==s.hash?(f=C!==null&&(0,t.jsx)("p",{className:"text-xs text-destructive","data-testid":`issues-explain-error-${s.hash}`,role:"alert",children:C}),e[28]=C,e[29]=s.hash,e[30]=f):f=e[30];let p;e[31]!==a||e[32]!==s.hash||e[33]!==r?(p=a!==void 0&&(a.degraded?(0,t.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":`issues-degraded-${s.hash}`,children:a.reason==="no-ai-binding"?r("No AI binding is configured. Wire an AI binding to enable plain-language explanations \u2014 the suggested fix above is always available."):r("The AI model could not explain this error right now. The suggested fix above still applies.")}):(0,t.jsxs)("div",{"data-testid":`issues-explanation-${s.hash}`,children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:r("AI explanation")}),(0,t.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-sm",children:a.explanation}),a.groundedId===void 0&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground","data-testid":`issues-ungrounded-${s.hash}`,children:r("No catalog fix matched this error, so this explanation is the model's own reading of the message. Verify before acting on it.")}),(0,t.jsx)("p",{className:"mt-1 text-[0.7rem] text-muted-foreground",children:r("Generated by {model}",{model:a.model})})]})),e[31]=a,e[32]=s.hash,e[33]=r,e[34]=p):p=e[34];let c;e[35]!==m||e[36]!==f||e[37]!==p||e[38]!==h||e[39]!==y?(c=(0,t.jsx)(L,{className:"bg-muted/30",colSpan:7,children:(0,t.jsxs)("div",{className:"flex flex-col gap-3 py-1",children:[h,y,m,f,p]})}),e[35]=m,e[36]=f,e[37]=p,e[38]=h,e[39]=y,e[40]=c):c=e[40];let S;return e[41]!==c||e[42]!==E?(S=(0,t.jsx)(pe,{"data-testid":E,children:c}),e[41]=c,e[42]=E,e[43]=S):S=e[43],S},"et"),is=d(n=>{let e=(0,ge.c)(119),{busy:u,issue:s,rowError:$,runTriage:i,shardKey:r}=n,a=ue(),[o,T]=(0,ne.useState)(!1),C;e[0]===Symbol.for("react.memo_cache_sentinel")?(C=d(()=>{T(ls)},"C"),e[0]=C):C=e[0];let j=C,K;e[1]!==s.hash||e[2]!==i?(K=d(ae=>{let ce=ae===null||ae===Se?null:ae;re(i(s.hash,Ye,{severity:ce}))},"K"),e[1]=s.hash,e[2]=i,e[3]=K):K=e[3];let z=K,k;e[4]!==s.hash||e[5]!==i?(k=d(ae=>{if(ae.key!=="Enter")return;let ce=ae.currentTarget.value.trim();re(i(s.hash,Ue,{assignee:ce===""?null:ce}))},"k"),e[4]=s.hash,e[5]=i,e[6]=k):k=e[6];let _=k,E=`issues-row-${s.hash}`,h;e[7]!==a?(h=a("Toggle issue details"),e[7]=a,e[8]=h):h=e[8];let x=`issues-toggle-${s.hash}`,M=`mt-1 size-3 shrink-0 text-muted-foreground transition-transform ${o?"rotate-90":""}`,v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=(0,t.jsx)("path",{d:"m9 6 6 6-6 6"}),e[9]=v):v=e[9];let y;e[10]!==M?(y=(0,t.jsx)("svg",{"aria-hidden":"true",className:M,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",children:v}),e[10]=M,e[11]=y):y=e[11];let b;e[12]!==s.title?(b=(0,t.jsx)("span",{className:"block truncate font-medium",title:s.title,children:s.title}),e[12]=s.title,e[13]=b):b=e[13];let w;e[14]!==s.culprit?(w=(0,t.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",title:s.culprit,children:s.culprit}),e[14]=s.culprit,e[15]=w):w=e[15];let m;e[16]!==b||e[17]!==w?(m=(0,t.jsxs)("span",{className:"min-w-0",children:[b,w]}),e[16]=b,e[17]=w,e[18]=m):m=e[18];let f;e[19]!==o||e[20]!==m||e[21]!==h||e[22]!==x||e[23]!==y?(f=(0,t.jsxs)("button",{"aria-expanded":o,"aria-label":h,className:"flex w-full items-start gap-2 text-left","data-testid":x,onClick:j,type:"button",children:[y,m]}),e[19]=o,e[20]=m,e[21]=h,e[22]=x,e[23]=y,e[24]=f):f=e[24];let p;e[25]!==s.hash||e[26]!==$?(p=$!==void 0&&(0,t.jsx)("p",{className:"mt-1 text-xs text-destructive","data-testid":`issues-action-error-${s.hash}`,role:"alert",children:$}),e[25]=s.hash,e[26]=$,e[27]=p):p=e[27];let c;e[28]!==f||e[29]!==p?(c=(0,t.jsxs)(L,{className:"max-w-80",children:[f,p]}),e[28]=f,e[29]=p,e[30]=c):c=e[30];let S=`issues-status-${s.hash}`,g;e[31]!==s.status?(g=ss(s.status),e[31]=s.status,e[32]=g):g=e[32];let I;e[33]!==s.status||e[34]!==S||e[35]!==g?(I=(0,t.jsx)(L,{children:(0,t.jsx)(me,{"data-testid":S,variant:g,children:s.status})}),e[33]=s.status,e[34]=S,e[35]=g,e[36]=I):I=e[36];let R=s.severity??Se,l;e[37]!==a?(l=a("Set severity"),e[37]=a,e[38]=l):l=e[38];let oe=`issues-severity-${s.hash}`,q;e[39]!==a?(q=a("\u2014"),e[39]=a,e[40]=q):q=e[40];let N;e[41]!==s.severity||e[42]!==a?(N=s.severity===void 0?(0,t.jsx)("span",{className:"text-muted-foreground",children:a("\u2014")}):(0,t.jsx)(me,{variant:ts(s.severity),children:s.severity}),e[41]=s.severity,e[42]=a,e[43]=N):N=e[43];let A;e[44]!==q||e[45]!==N?(A=(0,t.jsx)(De,{placeholder:q,children:N}),e[44]=q,e[45]=N,e[46]=A):A=e[46];let V;e[47]!==l||e[48]!==oe||e[49]!==A?(V=(0,t.jsx)(Fe,{"aria-label":l,className:"h-7 w-[110px]","data-testid":oe,children:A}),e[47]=l,e[48]=oe,e[49]=A,e[50]=V):V=e[50];let de;e[51]===Symbol.for("react.memo_cache_sentinel")?(de=Pe.map(rs),e[51]=de):de=e[51];let F;e[52]!==a?(F=a("Clear"),e[52]=a,e[53]=F):F=e[53];let O;e[54]!==F?(O=(0,t.jsxs)(Oe,{children:[de,(0,t.jsx)(we,{value:Se,children:F})]}),e[54]=F,e[55]=O):O=e[55];let U;e[56]!==u||e[57]!==z||e[58]!==R||e[59]!==V||e[60]!==O?(U=(0,t.jsx)(L,{children:(0,t.jsxs)(We,{disabled:u,onValueChange:z,value:R,children:[V,O]})}),e[56]=u,e[57]=z,e[58]=R,e[59]=V,e[60]=O,e[61]=U):U=e[61];let B;e[62]!==a?(B=a("Assignee"),e[62]=a,e[63]=B):B=e[63];let fe=`issues-assignee-${s.hash}`,xe=s.assignee??"",ve=s.assignee??"",G;e[64]!==a?(G=a("Unassigned"),e[64]=a,e[65]=G):G=e[65];let H;e[66]!==u||e[67]!==_||e[68]!==B||e[69]!==fe||e[70]!==xe||e[71]!==ve||e[72]!==G?(H=(0,t.jsx)(L,{children:(0,t.jsx)(ke,{"aria-label":B,className:"h-7 w-32","data-testid":fe,defaultValue:xe,disabled:u,onKeyDown:_,placeholder:G},ve)}),e[66]=u,e[67]=_,e[68]=B,e[69]=fe,e[70]=xe,e[71]=ve,e[72]=G,e[73]=H):H=e[73];let J;e[74]!==s.count?(J=(0,t.jsx)(L,{className:"text-right",children:(0,t.jsx)(me,{variant:"secondary",children:s.count})}),e[74]=s.count,e[75]=J):J=e[75];let P;e[76]!==s.lastSeen?(P=_e(s.lastSeen),e[76]=s.lastSeen,e[77]=P):P=e[77];let Q;e[78]!==P?(Q=(0,t.jsx)(L,{className:"text-xs tabular-nums text-muted-foreground",children:P}),e[78]=P,e[79]=Q):Q=e[79];let X;e[80]!==u||e[81]!==s.hash||e[82]!==s.status||e[83]!==i||e[84]!==a?(X=s.status!=="resolved"&&(0,t.jsx)(ie,{"data-testid":`issues-resolve-${s.hash}`,disabled:u,onClick:d(()=>{re(i(s.hash,Qe,{}))},"onClick"),size:"xs",variant:"outline",children:a("Resolve")}),e[80]=u,e[81]=s.hash,e[82]=s.status,e[83]=i,e[84]=a,e[85]=X):X=e[85];let Y;e[86]!==u||e[87]!==s.hash||e[88]!==s.status||e[89]!==i||e[90]!==a?(Y=s.status!=="ignored"&&(0,t.jsx)(ie,{"data-testid":`issues-ignore-${s.hash}`,disabled:u,onClick:d(()=>{re(i(s.hash,Xe,{}))},"onClick"),size:"xs",variant:"ghost",children:a("Ignore")}),e[86]=u,e[87]=s.hash,e[88]=s.status,e[89]=i,e[90]=a,e[91]=Y):Y=e[91];let Z;e[92]!==u||e[93]!==s.assignee||e[94]!==s.hash||e[95]!==s.status||e[96]!==i||e[97]!==a?(Z=s.status!=="open"&&(0,t.jsx)(ie,{"data-testid":`issues-reopen-${s.hash}`,disabled:u,onClick:d(()=>{re(i(s.hash,Ue,{assignee:s.assignee??null}))},"onClick"),size:"xs",variant:"ghost",children:a("Reopen")}),e[92]=u,e[93]=s.assignee,e[94]=s.hash,e[95]=s.status,e[96]=i,e[97]=a,e[98]=Z):Z=e[98];let ee;e[99]!==X||e[100]!==Y||e[101]!==Z?(ee=(0,t.jsx)(L,{className:"text-right",children:(0,t.jsxs)("div",{className:"flex justify-end gap-1",children:[X,Y,Z]})}),e[99]=X,e[100]=Y,e[101]=Z,e[102]=ee):ee=e[102];let se;e[103]!==c||e[104]!==I||e[105]!==U||e[106]!==H||e[107]!==J||e[108]!==Q||e[109]!==E||e[110]!==ee?(se=(0,t.jsxs)(pe,{"data-testid":E,children:[c,I,U,H,J,Q,ee]}),e[103]=c,e[104]=I,e[105]=U,e[106]=H,e[107]=J,e[108]=Q,e[109]=E,e[110]=ee,e[111]=se):se=e[111];let te;e[112]!==o||e[113]!==s||e[114]!==r?(te=(0,t.jsx)(as,{expanded:o,issue:s,shardKey:r},s.sampleMessage),e[112]=o,e[113]=s,e[114]=r,e[115]=te):te=e[115];let he;return e[116]!==se||e[117]!==te?(he=(0,t.jsxs)(t.Fragment,{children:[se,te]}),e[116]=se,e[117]=te,e[118]=he):he=e[118],he},"tt"),ks=d(n=>{let e=(0,ge.c)(38),{initialShardKey:u}=n,s=ue(),$=Ne(),{queryShardKey:i,setShardKey:r,shardKey:a}=ze(u),[o,T]=(0,ne.useState)("all"),[C,j]=(0,ne.useState)(ns),[K,z]=(0,ne.useState)(os),k;e[0]!==o?(k=o==="all"?{}:{status:o},e[0]=o,e[1]=k):k=e[1];let _;e[2]!==i?(_={live:!0,shardKey:i},e[2]=i,e[3]=_):_=e[3];let{data:E,error:h,liveError:x}=Ee(D.getIssues,k,_),M=E!==void 0,v;if(e[4]!==K||e[5]!==C||e[6]!==$||e[7]!==E||e[8]!==h||e[9]!==x||e[10]!==M||e[11]!==i||e[12]!==r||e[13]!==a||e[14]!==o||e[15]!==s){let y=es(E),b;e[17]!==$||e[18]!==i?(b=d(async(l,oe,q)=>{z(N=>{if(!N.has(l))return N;let A=new Map(N);return A.delete(l),A}),j(N=>new Set(N).add(l));try{await $.query(oe,{...q,hash:l},be(i))}catch(N){let A=Ke(N);z(V=>new Map(V).set(l,A))}j(N=>{let A=new Set(N);return A.delete(l),A})},"N"),e[17]=$,e[18]=i,e[19]=b):b=e[19];let w=b,m;e[20]!==s?(m=d(l=>s(l==="all"?"All":l==="open"?"Open":l==="resolved"?"Resolved":"Ignored"),"u"),e[20]=s,e[21]=m):m=e[21];let f=m,p;e[22]!==h?(p=h!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"issues-error",role:"alert",children:h}),e[22]=h,e[23]=p):p=e[23];let c;e[24]!==r||e[25]!==a?(c=(0,t.jsx)(Te,{onChange:r,testId:"issues-shard-input",value:a}),e[24]=r,e[25]=a,e[26]=c):c=e[26];let S;e[27]!==x?(S=(0,t.jsx)(Ve,{message:x,prefix:"issues"}),e[27]=x,e[28]=S):S=e[28];let g;e[29]!==o||e[30]!==f?(g=Je.map(l=>(0,t.jsx)(ie,{"data-active":o===l?"":void 0,"data-testid":`issues-filter-${l}`,onClick:d(()=>{T(l)},"onClick"),size:"xs",variant:o===l?"default":"outline",children:f(l)},l)),e[29]=o,e[30]=f,e[31]=g):g=e[31];let I;e[32]!==g?(I=(0,t.jsx)("div",{className:"ms-auto flex items-center gap-1","data-testid":"issues-status-filter",role:"group",children:g}),e[32]=g,e[33]=I):I=e[33];let R;e[34]!==I||e[35]!==c||e[36]!==S?(R=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,S,I]}),e[34]=I,e[35]=c,e[36]=S,e[37]=R):R=e[37],v=(0,t.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-issues-panel",children:[p,R,M&&y.length===0?(0,t.jsx)(Ce,{description:s("No grouped errors yet. When a function throws or a container crashes, matching errors fold into a single issue here."),testId:"issues-empty",title:s("No issues")}):(0,t.jsx)(Me,{className:"overflow-hidden py-0",children:(0,t.jsx)(Ae,{className:"px-0",children:(0,t.jsxs)(Le,{"data-testid":"issues-table",children:[(0,t.jsx)(je,{children:(0,t.jsxs)(pe,{children:[(0,t.jsx)(W,{children:s("Issue")}),(0,t.jsx)(W,{children:s("Status")}),(0,t.jsx)(W,{children:s("Severity")}),(0,t.jsx)(W,{children:s("Assignee")}),(0,t.jsx)(W,{className:"text-right",children:s("Events")}),(0,t.jsx)(W,{children:s("Last seen")}),(0,t.jsx)(W,{className:"text-right",children:s("Actions")})]})}),(0,t.jsx)(Re,{children:y.map(l=>(0,t.jsx)(is,{busy:C.has(l.hash),issue:l,rowError:K.get(l.hash),runTriage:w,shardKey:i},l.hash))})]})})})]}),e[4]=K,e[5]=C,e[6]=$,e[7]=E,e[8]=h,e[9]=x,e[10]=M,e[11]=i,e[12]=r,e[13]=a,e[14]=o,e[15]=s,e[16]=v}else v=e[16];return v},"kt");function ls(n){return!n}d(ls,"st");function rs(n){return(0,t.jsx)(we,{value:n,children:n},n)}d(rs,"at");function ns(){return new Set}d(ns,"it");function os(){return new Map}d(os,"rt");export{ks as default};
@@ -1 +1 @@
1
- import{a as re}from"./chunk-IGCNMZSB.js";import{a as X}from"./chunk-3CWGJYBB.js";import{a as V}from"./chunk-RMN2JN4S.js";import"./chunk-GRL5MG3Z.js";import"./chunk-7T7UOTYK.js";import"./chunk-CFPZYHPY.js";import"./chunk-7QIFDWQV.js";import{c as O}from"./chunk-FXCBF4XT.js";import"./chunk-2OUPA2WJ.js";import{b as B}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as Y}from"./chunk-3WISGFZ7.js";import"./chunk-XXQUMVWH.js";import"./chunk-DGO2XJOT.js";import"./chunk-QLQADHFE.js";import{a as Q}from"./chunk-VDW32UET.js";import{c as J}from"./chunk-LZGOETI3.js";import"./chunk-ETU7KIO4.js";import"./chunk-XBDKZZ67.js";import{a as G}from"./chunk-XQCVZAGU.js";import{a as Z,b as ee,c as te,d as U,e as n,f as o}from"./chunk-WJQLNYGX.js";import{a as R,e as W}from"./chunk-WQH3LT2P.js";import{d as z,r as H}from"./chunk-IUYFXK4X.js";import"./chunk-YEGFNH56.js";import{a,e as T,f as de,g as me,h as he,j as P}from"./chunk-3XIESWL4.js";var le=T(me(),1),ae=T(de(),1);var t=T(he(),1);var ue={action:"outline",mutation:"default",query:"secondary"},se=a(r=>r<1e3?`${r<10?r.toFixed(1):Math.round(r).toString()}ms`:`${(r/1e3).toFixed(2)}s`,"z"),fe=a(r=>r.calls===0?"\u2014":r.errors===0?"0":`${r.errors.toString()} (${(r.errors/r.calls*100).toFixed(1)}%)`,"de"),pe=a(r=>{let e=r.conflicts??0;return r.calls===0?"\u2014":e===0?"0":`${e.toString()} (${(e/r.calls*100).toFixed(1)}%)`},"me"),xe={calls:a((r,e)=>e.calls-r.calls,"calls"),recent:a((r,e)=>e.lastCalledAt-r.lastCalledAt,"recent"),slowest:a((r,e)=>e.maxDurationMs-r.maxDurationMs,"slowest")},_e=a(r=>{let e=(0,le.c)(47),{functions:A,initialShardKey:ne}=r,l=z(),{queryShardKey:E,setShardKey:y,shardKey:v}=X(ne),[i,oe]=(0,ae.useState)("recent"),w;e[0]===Symbol.for("react.memo_cache_sentinel")?(w={},e[0]=w):w=e[0];let $;e[1]!==E?($={live:!0,shardKey:E},e[1]=E,e[2]=$):$=e[2];let{data:ie,error:c,errorSource:S,liveError:b}=J(Q.getFunctionStats,w,$),k=ie?.functions??null,C;e[3]!==A?(C=new Map((A??[]).map(ge)),e[3]=A,e[4]=C):C=e[4];let j=C,F;e[5]===Symbol.for("react.memo_cache_sentinel")?(F=a(M=>{oe(M.currentTarget.dataset.sort)},"F"),e[5]=F):F=e[5];let ce=F,D;if(e[6]!==c||e[7]!==S||e[8]!==j||e[9]!==b||e[10]!==y||e[11]!==v||e[12]!==i||e[13]!==k||e[14]!==l){let M=k===null?[]:k.toSorted(xe[i]),d;e[16]!==l?(d=l("Recent"),e[16]=l,e[17]=d):d=e[17];let m;e[18]!==d?(m={key:"recent",label:d},e[18]=d,e[19]=m):m=e[19];let h;e[20]!==l?(h=l("Most called"),e[20]=l,e[21]=h):h=e[21];let u;e[22]!==h?(u={key:"calls",label:h},e[22]=h,e[23]=u):u=e[23];let f;e[24]!==l?(f=l("Slowest"),e[24]=l,e[25]=f):f=e[25];let p;e[26]!==f?(p={key:"slowest",label:f},e[26]=f,e[27]=p):p=e[27];let I;e[28]!==p||e[29]!==m||e[30]!==u?(I=[m,u,p],e[28]=p,e[29]=m,e[30]=u,e[31]=I):I=e[31];let q=I,x;e[32]!==y||e[33]!==v?(x=(0,t.jsx)(V,{onChange:y,testId:"fs-shard-input",value:v}),e[32]=y,e[33]=v,e[34]=x):x=e[34];let g;e[35]!==b?(g=(0,t.jsx)(re,{message:b,prefix:"fs"}),e[35]=b,e[36]=g):g=e[36];let N;e[37]!==q||e[38]!==i?(N=(0,t.jsx)("div",{className:"ml-auto flex items-center gap-1",role:"group",children:q.map(s=>(0,t.jsx)(O,{"data-sort":s.key,"data-testid":`fs-sort-${s.key}`,onClick:ce,size:"sm",type:"button",variant:i===s.key?"secondary":"ghost",children:s.label},s.key))}),e[37]=q,e[38]=i,e[39]=N):N=e[39];let K;e[40]!==x||e[41]!==g||e[42]!==N?(K=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[x,g,N]}),e[40]=x,e[41]=g,e[42]=N,e[43]=K):K=e[43];let _;e[44]!==c||e[45]!==S?(_=c!==null&&(0,t.jsx)(Y,{error:S,testId:"fs-error"}),e[44]=c,e[45]=S,e[46]=_):_=e[46],D=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-function-stats",children:[K,_,k!==null&&M.length===0&&c===null&&(0,t.jsx)(G,{description:l("Per-function call counts, error rates, and latency land here after your first request."),icon:(0,t.jsxs)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{d:"M3 3v18h18"}),(0,t.jsx)("path",{d:"M7 14l4-4 3 3 5-6"})]}),testId:"fs-empty",title:l("No functions have run on this shard yet.")}),M.length>0&&(0,t.jsx)(R,{className:"overflow-hidden py-0",children:(0,t.jsx)(W,{className:"px-0",children:(0,t.jsxs)(Z,{"data-testid":"fs-table",children:[(0,t.jsx)(ee,{children:(0,t.jsxs)(U,{children:[(0,t.jsx)(n,{children:l("function")}),(0,t.jsx)(n,{children:l("kind")}),(0,t.jsx)(n,{className:"text-right",children:l("calls")}),(0,t.jsx)(n,{className:"text-right",children:l("errors")}),(0,t.jsx)(n,{className:"text-right",children:l("conflicts")}),(0,t.jsx)(n,{className:"text-right",children:l("avg")}),(0,t.jsx)(n,{className:"text-right",children:l("max")}),(0,t.jsx)(n,{children:l("last run")}),(0,t.jsx)(n,{children:l("last error")})]})}),(0,t.jsx)(te,{children:M.map(s=>{let L=j.get(s.path);return(0,t.jsxs)(U,{"data-testid":`fs-row-${s.path}`,children:[(0,t.jsx)(o,{className:"font-medium",children:s.path}),(0,t.jsx)(o,{children:L===void 0?(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"}):(0,t.jsx)(B,{variant:ue[L],children:L})}),(0,t.jsx)(o,{className:"text-right tabular-nums",children:s.calls}),(0,t.jsx)(o,{className:P("text-right tabular-nums",s.errors>0&&"text-destructive"),children:fe(s)}),(0,t.jsx)(o,{className:P("text-right tabular-nums",(s.conflicts??0)>0&&"text-warning"),children:pe(s)}),(0,t.jsx)(o,{className:"text-right tabular-nums",children:s.calls===0?"\u2014":se(s.totalDurationMs/s.calls)}),(0,t.jsx)(o,{className:"text-right tabular-nums",children:s.calls===0?"\u2014":se(s.maxDurationMs)}),(0,t.jsx)(o,{className:"text-muted-foreground",children:H(s.lastCalledAt,"\u2014")}),(0,t.jsx)(o,{className:"max-w-[24ch] truncate text-destructive",title:s.lastErrorMessage??void 0,children:s.lastErrorMessage??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})})]},s.path)})})]})})})]}),e[6]=c,e[7]=S,e[8]=j,e[9]=b,e[10]=y,e[11]=v,e[12]=i,e[13]=k,e[14]=l,e[15]=D}else D=e[15];return D},"De");function ge(r){return[r.path,r.kind]}a(ge,"ue");export{_e as FunctionStatsPanel};
1
+ import{a as re}from"./chunk-IGCNMZSB.js";import{a as X}from"./chunk-3CWGJYBB.js";import{a as V}from"./chunk-RMN2JN4S.js";import"./chunk-GRL5MG3Z.js";import"./chunk-7T7UOTYK.js";import"./chunk-CFPZYHPY.js";import"./chunk-7QIFDWQV.js";import{c as O}from"./chunk-FXCBF4XT.js";import"./chunk-2OUPA2WJ.js";import{b as B}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as Y}from"./chunk-KBBOZRRX.js";import"./chunk-XXQUMVWH.js";import"./chunk-DSU54IAT.js";import"./chunk-QLQADHFE.js";import{a as Q}from"./chunk-VDW32UET.js";import{c as J}from"./chunk-HRRFUAP6.js";import"./chunk-6FQJRXVI.js";import"./chunk-XBDKZZ67.js";import{a as G}from"./chunk-XQCVZAGU.js";import{a as Z,b as ee,c as te,d as U,e as n,f as o}from"./chunk-WJQLNYGX.js";import{a as R,e as W}from"./chunk-WQH3LT2P.js";import{d as z,r as H}from"./chunk-IUYFXK4X.js";import"./chunk-P33WK7YI.js";import{a,e as T,f as de,g as me,h as he,j as P}from"./chunk-3XIESWL4.js";var le=T(me(),1),ae=T(de(),1);var t=T(he(),1);var ue={action:"outline",mutation:"default",query:"secondary"},se=a(r=>r<1e3?`${r<10?r.toFixed(1):Math.round(r).toString()}ms`:`${(r/1e3).toFixed(2)}s`,"z"),fe=a(r=>r.calls===0?"\u2014":r.errors===0?"0":`${r.errors.toString()} (${(r.errors/r.calls*100).toFixed(1)}%)`,"de"),pe=a(r=>{let e=r.conflicts??0;return r.calls===0?"\u2014":e===0?"0":`${e.toString()} (${(e/r.calls*100).toFixed(1)}%)`},"me"),xe={calls:a((r,e)=>e.calls-r.calls,"calls"),recent:a((r,e)=>e.lastCalledAt-r.lastCalledAt,"recent"),slowest:a((r,e)=>e.maxDurationMs-r.maxDurationMs,"slowest")},_e=a(r=>{let e=(0,le.c)(47),{functions:A,initialShardKey:ne}=r,l=z(),{queryShardKey:E,setShardKey:y,shardKey:v}=X(ne),[i,oe]=(0,ae.useState)("recent"),w;e[0]===Symbol.for("react.memo_cache_sentinel")?(w={},e[0]=w):w=e[0];let $;e[1]!==E?($={live:!0,shardKey:E},e[1]=E,e[2]=$):$=e[2];let{data:ie,error:c,errorSource:S,liveError:b}=J(Q.getFunctionStats,w,$),k=ie?.functions??null,C;e[3]!==A?(C=new Map((A??[]).map(ge)),e[3]=A,e[4]=C):C=e[4];let j=C,F;e[5]===Symbol.for("react.memo_cache_sentinel")?(F=a(M=>{oe(M.currentTarget.dataset.sort)},"F"),e[5]=F):F=e[5];let ce=F,D;if(e[6]!==c||e[7]!==S||e[8]!==j||e[9]!==b||e[10]!==y||e[11]!==v||e[12]!==i||e[13]!==k||e[14]!==l){let M=k===null?[]:k.toSorted(xe[i]),d;e[16]!==l?(d=l("Recent"),e[16]=l,e[17]=d):d=e[17];let m;e[18]!==d?(m={key:"recent",label:d},e[18]=d,e[19]=m):m=e[19];let h;e[20]!==l?(h=l("Most called"),e[20]=l,e[21]=h):h=e[21];let u;e[22]!==h?(u={key:"calls",label:h},e[22]=h,e[23]=u):u=e[23];let f;e[24]!==l?(f=l("Slowest"),e[24]=l,e[25]=f):f=e[25];let p;e[26]!==f?(p={key:"slowest",label:f},e[26]=f,e[27]=p):p=e[27];let I;e[28]!==p||e[29]!==m||e[30]!==u?(I=[m,u,p],e[28]=p,e[29]=m,e[30]=u,e[31]=I):I=e[31];let q=I,x;e[32]!==y||e[33]!==v?(x=(0,t.jsx)(V,{onChange:y,testId:"fs-shard-input",value:v}),e[32]=y,e[33]=v,e[34]=x):x=e[34];let g;e[35]!==b?(g=(0,t.jsx)(re,{message:b,prefix:"fs"}),e[35]=b,e[36]=g):g=e[36];let N;e[37]!==q||e[38]!==i?(N=(0,t.jsx)("div",{className:"ml-auto flex items-center gap-1",role:"group",children:q.map(s=>(0,t.jsx)(O,{"data-sort":s.key,"data-testid":`fs-sort-${s.key}`,onClick:ce,size:"sm",type:"button",variant:i===s.key?"secondary":"ghost",children:s.label},s.key))}),e[37]=q,e[38]=i,e[39]=N):N=e[39];let K;e[40]!==x||e[41]!==g||e[42]!==N?(K=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[x,g,N]}),e[40]=x,e[41]=g,e[42]=N,e[43]=K):K=e[43];let _;e[44]!==c||e[45]!==S?(_=c!==null&&(0,t.jsx)(Y,{error:S,testId:"fs-error"}),e[44]=c,e[45]=S,e[46]=_):_=e[46],D=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-function-stats",children:[K,_,k!==null&&M.length===0&&c===null&&(0,t.jsx)(G,{description:l("Per-function call counts, error rates, and latency land here after your first request."),icon:(0,t.jsxs)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{d:"M3 3v18h18"}),(0,t.jsx)("path",{d:"M7 14l4-4 3 3 5-6"})]}),testId:"fs-empty",title:l("No functions have run on this shard yet.")}),M.length>0&&(0,t.jsx)(R,{className:"overflow-hidden py-0",children:(0,t.jsx)(W,{className:"px-0",children:(0,t.jsxs)(Z,{"data-testid":"fs-table",children:[(0,t.jsx)(ee,{children:(0,t.jsxs)(U,{children:[(0,t.jsx)(n,{children:l("function")}),(0,t.jsx)(n,{children:l("kind")}),(0,t.jsx)(n,{className:"text-right",children:l("calls")}),(0,t.jsx)(n,{className:"text-right",children:l("errors")}),(0,t.jsx)(n,{className:"text-right",children:l("conflicts")}),(0,t.jsx)(n,{className:"text-right",children:l("avg")}),(0,t.jsx)(n,{className:"text-right",children:l("max")}),(0,t.jsx)(n,{children:l("last run")}),(0,t.jsx)(n,{children:l("last error")})]})}),(0,t.jsx)(te,{children:M.map(s=>{let L=j.get(s.path);return(0,t.jsxs)(U,{"data-testid":`fs-row-${s.path}`,children:[(0,t.jsx)(o,{className:"font-medium",children:s.path}),(0,t.jsx)(o,{children:L===void 0?(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"}):(0,t.jsx)(B,{variant:ue[L],children:L})}),(0,t.jsx)(o,{className:"text-right tabular-nums",children:s.calls}),(0,t.jsx)(o,{className:P("text-right tabular-nums",s.errors>0&&"text-destructive"),children:fe(s)}),(0,t.jsx)(o,{className:P("text-right tabular-nums",(s.conflicts??0)>0&&"text-warning"),children:pe(s)}),(0,t.jsx)(o,{className:"text-right tabular-nums",children:s.calls===0?"\u2014":se(s.totalDurationMs/s.calls)}),(0,t.jsx)(o,{className:"text-right tabular-nums",children:s.calls===0?"\u2014":se(s.maxDurationMs)}),(0,t.jsx)(o,{className:"text-muted-foreground",children:H(s.lastCalledAt,"\u2014")}),(0,t.jsx)(o,{className:"max-w-[24ch] truncate text-destructive",title:s.lastErrorMessage??void 0,children:s.lastErrorMessage??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})})]},s.path)})})]})})})]}),e[6]=c,e[7]=S,e[8]=j,e[9]=b,e[10]=y,e[11]=v,e[12]=i,e[13]=k,e[14]=l,e[15]=D}else D=e[15];return D},"De");function ge(r){return[r.path,r.kind]}a(ge,"ue");export{_e as FunctionStatsPanel};
@@ -1 +1 @@
1
- import{b as B}from"./chunk-XF2B7P5A.js";import{b as A}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as P}from"./chunk-3WISGFZ7.js";import"./chunk-XXQUMVWH.js";import"./chunk-DGO2XJOT.js";import"./chunk-QLQADHFE.js";import{a as M}from"./chunk-VDW32UET.js";import{c as F}from"./chunk-LZGOETI3.js";import"./chunk-ETU7KIO4.js";import"./chunk-XBDKZZ67.js";import{a as R,b as q,c as z,d as K,e as U,f as _}from"./chunk-WJQLNYGX.js";import{a as E,e as j}from"./chunk-WQH3LT2P.js";import{d as V}from"./chunk-IUYFXK4X.js";import"./chunk-YEGFNH56.js";import{a as k,e as O,g as H,h as W}from"./chunk-3XIESWL4.js";var G=O(H(),1);var t=O(W(),1);var $={binding:"outline",secret:"destructive",var:"secondary"},J=k((n,e)=>{if(n===void 0)return[];let m=[];return n.workerUrl!==void 0&&m.push({label:e("URL"),value:n.workerUrl}),n.environment!==void 0&&m.push({label:e("Environment"),value:n.environment}),n.deploymentId!==void 0&&m.push({label:e("Deployment"),value:n.deploymentId}),n.versionTag!==void 0&&m.push({label:e("Version"),value:n.versionTag}),m},"B"),le=k(n=>{let e=(0,G.c)(52),{initialShardKey:m}=n,r=V(),w;e[0]===Symbol.for("react.memo_cache_sentinel")?(w={},e[0]=w):w=e[0];let C=m??"",S;e[1]!==C?(S={shardKey:C},e[1]=C,e[2]=S):S=e[2];let{data:s,error:l,errorSource:N,isLoading:D}=F(M.getSettings,w,S),a,c,p,d,o,i,u;if(e[3]!==l||e[4]!==N||e[5]!==s?.deploy||e[6]!==s?.settings||e[7]!==r){let L=J(s?.deploy,r),T;e[15]!==s?.settings?(T=s?.settings??[],e[15]=s?.settings,e[16]=T):T=e[16],a=T,c="flex flex-col gap-4",p="lunora-settings";let y;e[17]!==r?(y=r("Open in Cloudflare"),e[17]=r,e[18]=y):y=e[18],e[19]!==y?(d=(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-3",children:(0,t.jsx)("a",{className:"text-sm text-primary underline-offset-4 hover:underline","data-testid":"set-cf-link",href:B,rel:"noreferrer",target:"_blank",children:y})}),e[19]=y,e[20]=d):d=e[20];let b;e[21]!==r?(b=r("View-only \u2014 values are masked. Edit vars, secrets, and bindings in wrangler or the Cloudflare dashboard."),e[21]=r,e[22]=b):b=e[22],e[23]!==b?(o=(0,t.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"set-readonly-note",children:b}),e[23]=b,e[24]=o):o=e[24],e[25]!==l||e[26]!==N?(i=l!==null&&(0,t.jsx)(P,{error:N,testId:"set-error"}),e[25]=l,e[26]=N,e[27]=i):i=e[27],u=L.length>0&&(0,t.jsxs)(E,{className:"py-0","data-testid":"set-deploy",children:[(0,t.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,t.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:r("Deployment")})}),(0,t.jsx)(j,{className:"py-3",children:(0,t.jsx)("dl",{className:"grid grid-cols-[8rem_minmax(0,1fr)] gap-x-4 gap-y-1 text-sm",children:L.map(Q)})})]}),e[3]=l,e[4]=N,e[5]=s?.deploy,e[6]=s?.settings,e[7]=r,e[8]=a,e[9]=c,e[10]=p,e[11]=d,e[12]=o,e[13]=i,e[14]=u}else a=e[8],c=e[9],p=e[10],d=e[11],o=e[12],i=e[13],u=e[14];let h;e[28]!==r?(h=r("Environment & bindings"),e[28]=r,e[29]=h):h=e[29];let f;e[30]!==h?(f=(0,t.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,t.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:h})}),e[30]=h,e[31]=f):f=e[31];let g;e[32]!==l||e[33]!==D||e[34]!==a.length||e[35]!==r?(g=l===null&&!D&&a.length===0&&(0,t.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"set-empty",children:r("No environment variables or bindings.")}),e[32]=l,e[33]=D,e[34]=a.length,e[35]=r,e[36]=g):g=e[36];let x;e[37]!==a||e[38]!==r?(x=a.length>0&&(0,t.jsx)(j,{className:"px-0 py-0",children:(0,t.jsxs)(R,{"data-testid":"set-table",children:[(0,t.jsx)(q,{children:(0,t.jsxs)(K,{children:[(0,t.jsx)(U,{children:r("name")}),(0,t.jsx)(U,{children:r("kind")}),(0,t.jsx)(U,{children:r("value")})]})}),(0,t.jsx)(z,{children:a.map(X)})]})}),e[37]=a,e[38]=r,e[39]=x):x=e[39];let v;e[40]!==f||e[41]!==g||e[42]!==x?(v=(0,t.jsxs)(E,{className:"py-0",children:[f,g,x]}),e[40]=f,e[41]=g,e[42]=x,e[43]=v):v=e[43];let I;return e[44]!==v||e[45]!==c||e[46]!==p||e[47]!==d||e[48]!==o||e[49]!==i||e[50]!==u?(I=(0,t.jsxs)("div",{className:c,"data-testid":p,children:[d,o,i,u,v]}),e[44]=v,e[45]=c,e[46]=p,e[47]=d,e[48]=o,e[49]=i,e[50]=u,e[51]=I):I=e[51],I},"le");function Q(n){return(0,t.jsxs)("div",{className:"contents","data-testid":"set-deploy-row",children:[(0,t.jsx)("dt",{className:"text-muted-foreground",children:n.label}),(0,t.jsx)("dd",{className:"truncate font-mono text-xs",title:n.value,children:n.value})]},n.label)}k(Q,"G");function X(n){return(0,t.jsxs)(K,{"data-testid":"set-row",children:[(0,t.jsx)(_,{className:"font-mono text-xs font-medium",children:n.name}),(0,t.jsx)(_,{children:(0,t.jsx)(A,{variant:$[n.kind],children:n.bindingType??n.kind})}),(0,t.jsx)(_,{className:"max-w-[28ch] truncate font-mono text-xs text-muted-foreground",children:n.value??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})})]},n.name)}k(X,"H");export{le as SettingsPanel};
1
+ import{b as B}from"./chunk-XF2B7P5A.js";import{b as A}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as P}from"./chunk-KBBOZRRX.js";import"./chunk-XXQUMVWH.js";import"./chunk-DSU54IAT.js";import"./chunk-QLQADHFE.js";import{a as M}from"./chunk-VDW32UET.js";import{c as F}from"./chunk-HRRFUAP6.js";import"./chunk-6FQJRXVI.js";import"./chunk-XBDKZZ67.js";import{a as R,b as q,c as z,d as K,e as U,f as _}from"./chunk-WJQLNYGX.js";import{a as E,e as j}from"./chunk-WQH3LT2P.js";import{d as V}from"./chunk-IUYFXK4X.js";import"./chunk-P33WK7YI.js";import{a as k,e as O,g as H,h as W}from"./chunk-3XIESWL4.js";var G=O(H(),1);var t=O(W(),1);var $={binding:"outline",secret:"destructive",var:"secondary"},J=k((n,e)=>{if(n===void 0)return[];let m=[];return n.workerUrl!==void 0&&m.push({label:e("URL"),value:n.workerUrl}),n.environment!==void 0&&m.push({label:e("Environment"),value:n.environment}),n.deploymentId!==void 0&&m.push({label:e("Deployment"),value:n.deploymentId}),n.versionTag!==void 0&&m.push({label:e("Version"),value:n.versionTag}),m},"B"),le=k(n=>{let e=(0,G.c)(52),{initialShardKey:m}=n,r=V(),w;e[0]===Symbol.for("react.memo_cache_sentinel")?(w={},e[0]=w):w=e[0];let C=m??"",S;e[1]!==C?(S={shardKey:C},e[1]=C,e[2]=S):S=e[2];let{data:s,error:l,errorSource:N,isLoading:D}=F(M.getSettings,w,S),a,c,p,d,o,i,u;if(e[3]!==l||e[4]!==N||e[5]!==s?.deploy||e[6]!==s?.settings||e[7]!==r){let L=J(s?.deploy,r),T;e[15]!==s?.settings?(T=s?.settings??[],e[15]=s?.settings,e[16]=T):T=e[16],a=T,c="flex flex-col gap-4",p="lunora-settings";let y;e[17]!==r?(y=r("Open in Cloudflare"),e[17]=r,e[18]=y):y=e[18],e[19]!==y?(d=(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-3",children:(0,t.jsx)("a",{className:"text-sm text-primary underline-offset-4 hover:underline","data-testid":"set-cf-link",href:B,rel:"noreferrer",target:"_blank",children:y})}),e[19]=y,e[20]=d):d=e[20];let b;e[21]!==r?(b=r("View-only \u2014 values are masked. Edit vars, secrets, and bindings in wrangler or the Cloudflare dashboard."),e[21]=r,e[22]=b):b=e[22],e[23]!==b?(o=(0,t.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"set-readonly-note",children:b}),e[23]=b,e[24]=o):o=e[24],e[25]!==l||e[26]!==N?(i=l!==null&&(0,t.jsx)(P,{error:N,testId:"set-error"}),e[25]=l,e[26]=N,e[27]=i):i=e[27],u=L.length>0&&(0,t.jsxs)(E,{className:"py-0","data-testid":"set-deploy",children:[(0,t.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,t.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:r("Deployment")})}),(0,t.jsx)(j,{className:"py-3",children:(0,t.jsx)("dl",{className:"grid grid-cols-[8rem_minmax(0,1fr)] gap-x-4 gap-y-1 text-sm",children:L.map(Q)})})]}),e[3]=l,e[4]=N,e[5]=s?.deploy,e[6]=s?.settings,e[7]=r,e[8]=a,e[9]=c,e[10]=p,e[11]=d,e[12]=o,e[13]=i,e[14]=u}else a=e[8],c=e[9],p=e[10],d=e[11],o=e[12],i=e[13],u=e[14];let h;e[28]!==r?(h=r("Environment & bindings"),e[28]=r,e[29]=h):h=e[29];let f;e[30]!==h?(f=(0,t.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,t.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:h})}),e[30]=h,e[31]=f):f=e[31];let g;e[32]!==l||e[33]!==D||e[34]!==a.length||e[35]!==r?(g=l===null&&!D&&a.length===0&&(0,t.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"set-empty",children:r("No environment variables or bindings.")}),e[32]=l,e[33]=D,e[34]=a.length,e[35]=r,e[36]=g):g=e[36];let x;e[37]!==a||e[38]!==r?(x=a.length>0&&(0,t.jsx)(j,{className:"px-0 py-0",children:(0,t.jsxs)(R,{"data-testid":"set-table",children:[(0,t.jsx)(q,{children:(0,t.jsxs)(K,{children:[(0,t.jsx)(U,{children:r("name")}),(0,t.jsx)(U,{children:r("kind")}),(0,t.jsx)(U,{children:r("value")})]})}),(0,t.jsx)(z,{children:a.map(X)})]})}),e[37]=a,e[38]=r,e[39]=x):x=e[39];let v;e[40]!==f||e[41]!==g||e[42]!==x?(v=(0,t.jsxs)(E,{className:"py-0",children:[f,g,x]}),e[40]=f,e[41]=g,e[42]=x,e[43]=v):v=e[43];let I;return e[44]!==v||e[45]!==c||e[46]!==p||e[47]!==d||e[48]!==o||e[49]!==i||e[50]!==u?(I=(0,t.jsxs)("div",{className:c,"data-testid":p,children:[d,o,i,u,v]}),e[44]=v,e[45]=c,e[46]=p,e[47]=d,e[48]=o,e[49]=i,e[50]=u,e[51]=I):I=e[51],I},"le");function Q(n){return(0,t.jsxs)("div",{className:"contents","data-testid":"set-deploy-row",children:[(0,t.jsx)("dt",{className:"text-muted-foreground",children:n.label}),(0,t.jsx)("dd",{className:"truncate font-mono text-xs",title:n.value,children:n.value})]},n.label)}k(Q,"G");function X(n){return(0,t.jsxs)(K,{"data-testid":"set-row",children:[(0,t.jsx)(_,{className:"font-mono text-xs font-medium",children:n.name}),(0,t.jsx)(_,{children:(0,t.jsx)(A,{variant:$[n.kind],children:n.bindingType??n.kind})}),(0,t.jsx)(_,{className:"max-w-[28ch] truncate font-mono text-xs text-muted-foreground",children:n.value??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})})]},n.name)}k(X,"H");export{le as SettingsPanel};
@@ -1 +1 @@
1
- import{c as k,d as I,e as S,f as w,h as T,i as X,j as B,k as g,l as K,m as D,n as E,o as G,p as O}from"./chunk-U7ILDM43.js";import{d as j,m as q}from"./chunk-IUYFXK4X.js";import{a as x,e as C,g as F,h as H}from"./chunk-3XIESWL4.js";var L=C(F(),1);var e=C(H(),1);var R=50,$={value:{colors:{dark:["var(--chart-1)"],light:["var(--chart-1)"]},label:"value"}},W=x(o=>{let a=o.columns.find(t=>o.rows.length>0&&o.rows.every(l=>typeof l[t]=="number"))??null;return{label:o.columns.find(t=>t!==a)??null,value:a}},"G"),z=x(o=>{let a=(0,L.c)(3),{data:t,kind:l}=o,s;return a[0]!==t||a[1]!==l?(s=(0,e.jsx)(B,{className:"h-full w-full",config:$,children:l==="area"?(0,e.jsxs)(X,{data:t,children:[(0,e.jsx)(k,{vertical:!1}),(0,e.jsx)(w,{axisLine:!1,dataKey:"label",tickLine:!1}),(0,e.jsx)(K,{content:(0,e.jsx)(g,{})}),(0,e.jsx)(S,{dataKey:"value",fill:"var(--color-value-0)",fillOpacity:.2,stroke:"var(--color-value-0)",type:"monotone"})]}):(0,e.jsxs)(T,{data:t,children:[(0,e.jsx)(k,{vertical:!1}),(0,e.jsx)(w,{axisLine:!1,dataKey:"label",tickLine:!1}),(0,e.jsx)(K,{content:(0,e.jsx)(g,{})}),(0,e.jsx)(I,{dataKey:"value",dot:!1,stroke:"var(--color-value-0)",strokeWidth:2,type:"monotone"})]})}),a[0]=t,a[1]=l,a[2]=s):s=a[2],s},"H"),U=x(o=>{let a=(0,L.c)(21),{axes:t,result:l}=o,s=j(),u;a[0]!==l?(u=W(l),a[0]=l,a[1]=u):u=a[1];let N=u,m;a[2]!==l.columns?(m=new Set(l.columns),a[2]=l.columns,a[3]=m):m=a[3];let h=m,v=t!==void 0&&h.has(t.x)?t.x:N.label,f;a[4]!==t?.y||a[5]!==h?(f=t?.y.find(r=>h.has(r)),a[4]=t?.y,a[5]=h,a[6]=f):f=a[6];let A=f,d=A??N.value,p;a[7]!==v||a[8]!==l.rows||a[9]!==d?(p=d===null?[]:l.rows.slice(0,R).map((r,c)=>({label:v===null?`#${(c+1).toString()}`:q(r[v]),value:Number(r[d])||0})),a[7]=v,a[8]=l.rows,a[9]=d,a[10]=p):p=a[10];let y=p;if(d===null){let r;a[11]!==s?(r=s("No numeric column to chart."),a[11]=s,a[12]=r):r=a[12];let c;return a[13]!==r?(c=(0,e.jsx)("p",{className:"p-4 text-sm text-muted-foreground","data-testid":"sql-chart-empty",children:r}),a[13]=r,a[14]=c):c=a[14],c}let n=t!==void 0&&A!==void 0?t.kind:"bar",i;a[15]!==y||a[16]!==n?(i=n==="bar"?(0,e.jsxs)(D,{className:"h-full w-full",config:$,data:y,children:[(0,e.jsx)(G,{dataKey:"label"}),(0,e.jsx)(E,{dataKey:"value"}),(0,e.jsx)(O,{})]}):(0,e.jsx)(z,{data:y,kind:n}),a[15]=y,a[16]=n,a[17]=i):i=a[17];let b;return a[18]!==n||a[19]!==i?(b=(0,e.jsx)("div",{className:"h-80 w-full p-3","data-chart-kind":n,"data-testid":"sql-chart",children:i}),a[18]=n,a[19]=i,a[20]=b):b=a[20],b},"R");export{U as a};
1
+ import{c as k,d as I,e as S,f as w,h as T,i as X,j as B,k as g,l as K,m as D,n as E,o as G,p as O}from"./chunk-OQIGV6FX.js";import{d as j,m as q}from"./chunk-IUYFXK4X.js";import{a as x,e as C,g as F,h as H}from"./chunk-3XIESWL4.js";var L=C(F(),1);var e=C(H(),1);var R=50,$={value:{colors:{dark:["var(--chart-1)"],light:["var(--chart-1)"]},label:"value"}},W=x(o=>{let a=o.columns.find(t=>o.rows.length>0&&o.rows.every(l=>typeof l[t]=="number"))??null;return{label:o.columns.find(t=>t!==a)??null,value:a}},"G"),z=x(o=>{let a=(0,L.c)(3),{data:t,kind:l}=o,s;return a[0]!==t||a[1]!==l?(s=(0,e.jsx)(B,{className:"h-full w-full",config:$,children:l==="area"?(0,e.jsxs)(X,{data:t,children:[(0,e.jsx)(k,{vertical:!1}),(0,e.jsx)(w,{axisLine:!1,dataKey:"label",tickLine:!1}),(0,e.jsx)(K,{content:(0,e.jsx)(g,{})}),(0,e.jsx)(S,{dataKey:"value",fill:"var(--color-value-0)",fillOpacity:.2,stroke:"var(--color-value-0)",type:"monotone"})]}):(0,e.jsxs)(T,{data:t,children:[(0,e.jsx)(k,{vertical:!1}),(0,e.jsx)(w,{axisLine:!1,dataKey:"label",tickLine:!1}),(0,e.jsx)(K,{content:(0,e.jsx)(g,{})}),(0,e.jsx)(I,{dataKey:"value",dot:!1,stroke:"var(--color-value-0)",strokeWidth:2,type:"monotone"})]})}),a[0]=t,a[1]=l,a[2]=s):s=a[2],s},"H"),U=x(o=>{let a=(0,L.c)(21),{axes:t,result:l}=o,s=j(),u;a[0]!==l?(u=W(l),a[0]=l,a[1]=u):u=a[1];let N=u,m;a[2]!==l.columns?(m=new Set(l.columns),a[2]=l.columns,a[3]=m):m=a[3];let h=m,v=t!==void 0&&h.has(t.x)?t.x:N.label,f;a[4]!==t?.y||a[5]!==h?(f=t?.y.find(r=>h.has(r)),a[4]=t?.y,a[5]=h,a[6]=f):f=a[6];let A=f,d=A??N.value,p;a[7]!==v||a[8]!==l.rows||a[9]!==d?(p=d===null?[]:l.rows.slice(0,R).map((r,c)=>({label:v===null?`#${(c+1).toString()}`:q(r[v]),value:Number(r[d])||0})),a[7]=v,a[8]=l.rows,a[9]=d,a[10]=p):p=a[10];let y=p;if(d===null){let r;a[11]!==s?(r=s("No numeric column to chart."),a[11]=s,a[12]=r):r=a[12];let c;return a[13]!==r?(c=(0,e.jsx)("p",{className:"p-4 text-sm text-muted-foreground","data-testid":"sql-chart-empty",children:r}),a[13]=r,a[14]=c):c=a[14],c}let n=t!==void 0&&A!==void 0?t.kind:"bar",i;a[15]!==y||a[16]!==n?(i=n==="bar"?(0,e.jsxs)(D,{className:"h-full w-full",config:$,data:y,children:[(0,e.jsx)(G,{dataKey:"label"}),(0,e.jsx)(E,{dataKey:"value"}),(0,e.jsx)(O,{})]}):(0,e.jsx)(z,{data:y,kind:n}),a[15]=y,a[16]=n,a[17]=i):i=a[17];let b;return a[18]!==n||a[19]!==i?(b=(0,e.jsx)("div",{className:"h-80 w-full p-3","data-chart-kind":n,"data-testid":"sql-chart",children:i}),a[18]=n,a[19]=i,a[20]=b):b=a[20],b},"R");export{U as a};
@@ -1 +1 @@
1
- import{R as k}from"./chunk-CFPZYHPY.js";import"./chunk-7QIFDWQV.js";import{c as q}from"./chunk-FXCBF4XT.js";import"./chunk-2OUPA2WJ.js";import{b as F}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as B}from"./chunk-3WISGFZ7.js";import"./chunk-XXQUMVWH.js";import"./chunk-DGO2XJOT.js";import"./chunk-QLQADHFE.js";import{a as R}from"./chunk-VDW32UET.js";import{c as P}from"./chunk-LZGOETI3.js";import"./chunk-ETU7KIO4.js";import"./chunk-XBDKZZ67.js";import{a as M}from"./chunk-XQCVZAGU.js";import{a as G,b as H,c as J,d as T,e as x,f as w}from"./chunk-WJQLNYGX.js";import{a as z,e as D}from"./chunk-WQH3LT2P.js";import{d as U,r as O}from"./chunk-IUYFXK4X.js";import"./chunk-YEGFNH56.js";import{a as b,e as j,f as V,g as X,h as Y}from"./chunk-3XIESWL4.js";var K=j(X(),1),W=j(V(),1);var t=j(Y(),1);var de=b(()=>{let e=(0,K.c)(39),r=U(),[s,$]=(0,W.useState)(""),y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y={},e[0]=y):y=e[0];let{data:A,error:i,errorSource:S,isLoading:_,refetch:E}=P(R.getAuthAuditLog,y),C;if(e[1]!==A?.entries||e[2]!==s){let a=A?.entries??[],v=s.trim().toLowerCase();C=v===""?a:a.filter(N=>N.event.toLowerCase().includes(v)||(N.actorId??"").toLowerCase().includes(v)||(N.actorEmail??"").toLowerCase().includes(v)||(N.ip??"").toLowerCase().includes(v)||N.outcome.toLowerCase().includes(v)),e[1]=A?.entries,e[2]=s,e[3]=C}else C=e[3];let o=C,I;e[4]===Symbol.for("react.memo_cache_sentinel")?(I=b(a=>{$(a.target.value)},"I"),e[4]=I):I=e[4];let Q=I,l;e[5]!==r?(l=r("Filter security events"),e[5]=r,e[6]=l):l=e[6];let n;e[7]!==r?(n=r("filter event, actor, IP"),e[7]=r,e[8]=n):n=e[8];let c;e[9]!==s||e[10]!==l||e[11]!==n?(c=(0,t.jsx)(k,{"aria-label":l,className:"h-8 w-56","data-testid":"aa-search",onChange:Q,placeholder:n,value:s}),e[9]=s,e[10]=l,e[11]=n,e[12]=c):c=e[12];let d;e[13]!==E?(d=b(()=>{E()},"m"),e[13]=E,e[14]=d):d=e[14];let m;e[15]!==r?(m=r("Refresh"),e[15]=r,e[16]=m):m=e[16];let u;e[17]!==d||e[18]!==m?(u=(0,t.jsx)(q,{"data-testid":"aa-refresh",onClick:d,size:"xs",type:"button",variant:"ghost",children:m}),e[17]=d,e[18]=m,e[19]=u):u=e[19];let h;e[20]!==c||e[21]!==u?(h=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,u]}),e[20]=c,e[21]=u,e[22]=h):h=e[22];let f;e[23]!==i||e[24]!==S?(f=i!==null&&(0,t.jsx)(B,{error:S,testId:"aa-error"}),e[23]=i,e[24]=S,e[25]=f):f=e[25];let p;e[26]!==i||e[27]!==o.length||e[28]!==_||e[29]!==r?(p=i===null&&!_&&o.length===0&&(0,t.jsx)(M,{description:r("Authentication and security events are recorded here."),testId:"aa-empty",title:r("No security events.")}),e[26]=i,e[27]=o.length,e[28]=_,e[29]=r,e[30]=p):p=e[30];let g;e[31]!==o||e[32]!==r?(g=o.length>0&&(0,t.jsx)(z,{className:"overflow-hidden py-0",children:(0,t.jsx)(D,{className:"max-h-[30rem] overflow-auto px-0",children:(0,t.jsxs)(G,{"data-testid":"aa-table",children:[(0,t.jsx)(H,{children:(0,t.jsxs)(T,{children:[(0,t.jsx)(x,{children:r("time")}),(0,t.jsx)(x,{children:r("event")}),(0,t.jsx)(x,{children:r("actor")}),(0,t.jsx)(x,{children:r("ip / user agent")}),(0,t.jsx)(x,{children:r("outcome")})]})}),(0,t.jsx)(J,{children:o.map(a=>(0,t.jsxs)(T,{"data-testid":"aa-row",children:[(0,t.jsx)(w,{className:"text-muted-foreground tabular-nums",children:O(a.ts,"\u2014")}),(0,t.jsx)(w,{children:(0,t.jsx)(F,{variant:"secondary",children:a.event})}),(0,t.jsx)(w,{className:"max-w-[24ch] truncate font-mono text-xs",title:a.actorId??void 0,children:a.actorEmail??a.actorId??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})}),(0,t.jsxs)(w,{className:"max-w-[28ch] truncate text-xs text-muted-foreground",title:a.userAgent??void 0,children:[a.ip??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"}),a.userAgent!==void 0&&(0,t.jsxs)("span",{className:"ml-1 opacity-70",children:["\xB7 ",a.userAgent]})]}),(0,t.jsx)(w,{children:(0,t.jsx)(F,{variant:a.outcome==="failure"?"destructive":"outline",children:r(a.outcome)})})]},a.seq))})]})})}),e[31]=o,e[32]=r,e[33]=g):g=e[33];let L;return e[34]!==f||e[35]!==p||e[36]!==g||e[37]!==h?(L=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-auth-audit",children:[h,f,p,g]}),e[34]=f,e[35]=p,e[36]=g,e[37]=h,e[38]=L):L=e[38],L},"ce");export{de as default};
1
+ import{R as k}from"./chunk-CFPZYHPY.js";import"./chunk-7QIFDWQV.js";import{c as q}from"./chunk-FXCBF4XT.js";import"./chunk-2OUPA2WJ.js";import{b as F}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as B}from"./chunk-KBBOZRRX.js";import"./chunk-XXQUMVWH.js";import"./chunk-DSU54IAT.js";import"./chunk-QLQADHFE.js";import{a as R}from"./chunk-VDW32UET.js";import{c as P}from"./chunk-HRRFUAP6.js";import"./chunk-6FQJRXVI.js";import"./chunk-XBDKZZ67.js";import{a as M}from"./chunk-XQCVZAGU.js";import{a as G,b as H,c as J,d as T,e as x,f as w}from"./chunk-WJQLNYGX.js";import{a as z,e as D}from"./chunk-WQH3LT2P.js";import{d as U,r as O}from"./chunk-IUYFXK4X.js";import"./chunk-P33WK7YI.js";import{a as b,e as j,f as V,g as X,h as Y}from"./chunk-3XIESWL4.js";var K=j(X(),1),W=j(V(),1);var t=j(Y(),1);var de=b(()=>{let e=(0,K.c)(39),r=U(),[s,$]=(0,W.useState)(""),y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y={},e[0]=y):y=e[0];let{data:A,error:i,errorSource:S,isLoading:_,refetch:E}=P(R.getAuthAuditLog,y),C;if(e[1]!==A?.entries||e[2]!==s){let a=A?.entries??[],v=s.trim().toLowerCase();C=v===""?a:a.filter(N=>N.event.toLowerCase().includes(v)||(N.actorId??"").toLowerCase().includes(v)||(N.actorEmail??"").toLowerCase().includes(v)||(N.ip??"").toLowerCase().includes(v)||N.outcome.toLowerCase().includes(v)),e[1]=A?.entries,e[2]=s,e[3]=C}else C=e[3];let o=C,I;e[4]===Symbol.for("react.memo_cache_sentinel")?(I=b(a=>{$(a.target.value)},"I"),e[4]=I):I=e[4];let Q=I,l;e[5]!==r?(l=r("Filter security events"),e[5]=r,e[6]=l):l=e[6];let n;e[7]!==r?(n=r("filter event, actor, IP"),e[7]=r,e[8]=n):n=e[8];let c;e[9]!==s||e[10]!==l||e[11]!==n?(c=(0,t.jsx)(k,{"aria-label":l,className:"h-8 w-56","data-testid":"aa-search",onChange:Q,placeholder:n,value:s}),e[9]=s,e[10]=l,e[11]=n,e[12]=c):c=e[12];let d;e[13]!==E?(d=b(()=>{E()},"m"),e[13]=E,e[14]=d):d=e[14];let m;e[15]!==r?(m=r("Refresh"),e[15]=r,e[16]=m):m=e[16];let u;e[17]!==d||e[18]!==m?(u=(0,t.jsx)(q,{"data-testid":"aa-refresh",onClick:d,size:"xs",type:"button",variant:"ghost",children:m}),e[17]=d,e[18]=m,e[19]=u):u=e[19];let h;e[20]!==c||e[21]!==u?(h=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,u]}),e[20]=c,e[21]=u,e[22]=h):h=e[22];let f;e[23]!==i||e[24]!==S?(f=i!==null&&(0,t.jsx)(B,{error:S,testId:"aa-error"}),e[23]=i,e[24]=S,e[25]=f):f=e[25];let p;e[26]!==i||e[27]!==o.length||e[28]!==_||e[29]!==r?(p=i===null&&!_&&o.length===0&&(0,t.jsx)(M,{description:r("Authentication and security events are recorded here."),testId:"aa-empty",title:r("No security events.")}),e[26]=i,e[27]=o.length,e[28]=_,e[29]=r,e[30]=p):p=e[30];let g;e[31]!==o||e[32]!==r?(g=o.length>0&&(0,t.jsx)(z,{className:"overflow-hidden py-0",children:(0,t.jsx)(D,{className:"max-h-[30rem] overflow-auto px-0",children:(0,t.jsxs)(G,{"data-testid":"aa-table",children:[(0,t.jsx)(H,{children:(0,t.jsxs)(T,{children:[(0,t.jsx)(x,{children:r("time")}),(0,t.jsx)(x,{children:r("event")}),(0,t.jsx)(x,{children:r("actor")}),(0,t.jsx)(x,{children:r("ip / user agent")}),(0,t.jsx)(x,{children:r("outcome")})]})}),(0,t.jsx)(J,{children:o.map(a=>(0,t.jsxs)(T,{"data-testid":"aa-row",children:[(0,t.jsx)(w,{className:"text-muted-foreground tabular-nums",children:O(a.ts,"\u2014")}),(0,t.jsx)(w,{children:(0,t.jsx)(F,{variant:"secondary",children:a.event})}),(0,t.jsx)(w,{className:"max-w-[24ch] truncate font-mono text-xs",title:a.actorId??void 0,children:a.actorEmail??a.actorId??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})}),(0,t.jsxs)(w,{className:"max-w-[28ch] truncate text-xs text-muted-foreground",title:a.userAgent??void 0,children:[a.ip??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"}),a.userAgent!==void 0&&(0,t.jsxs)("span",{className:"ml-1 opacity-70",children:["\xB7 ",a.userAgent]})]}),(0,t.jsx)(w,{children:(0,t.jsx)(F,{variant:a.outcome==="failure"?"destructive":"outline",children:r(a.outcome)})})]},a.seq))})]})})}),e[31]=o,e[32]=r,e[33]=g):g=e[33];let L;return e[34]!==f||e[35]!==p||e[36]!==g||e[37]!==h?(L=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-auth-audit",children:[h,f,p,g]}),e[34]=f,e[35]=p,e[36]=g,e[37]=h,e[38]=L):L=e[38],L},"ce");export{de as default};
@@ -1 +1 @@
1
- import{a as C}from"./chunk-V53KNYRN.js";import{a as T}from"./chunk-5Y3QLNWX.js";import{b as v}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as k}from"./chunk-3WISGFZ7.js";import"./chunk-XXQUMVWH.js";import"./chunk-DGO2XJOT.js";import"./chunk-QLQADHFE.js";import{a as S}from"./chunk-VDW32UET.js";import{c as b}from"./chunk-LZGOETI3.js";import"./chunk-ETU7KIO4.js";import"./chunk-XBDKZZ67.js";import{a as c}from"./chunk-XQCVZAGU.js";import{a as w,b as A,c as O,d as f,e as l,f as s}from"./chunk-WJQLNYGX.js";import{a as y,e as N}from"./chunk-WQH3LT2P.js";import{d as x}from"./chunk-IUYFXK4X.js";import"./chunk-YEGFNH56.js";import{a as n,e as p,f as $,h as L}from"./chunk-3XIESWL4.js";var F=p($(),1);var e=p(L(),1);var q=n(a=>{let t=a.trim();if(t.length===0)return{context:void 0,error:null};try{let o=JSON.parse(t);return o===null||typeof o!="object"||Array.isArray(o)?{context:void 0,error:"Targeting context must be a JSON object."}:{context:o,error:null}}catch{return{context:void 0,error:"Targeting context is not valid JSON."}}},"L"),D='{ "targetingKey": "user-123", "plan": "premium" }',M=n(a=>a.type==="object"?JSON.stringify(a.value):String(a.value),"V"),Y=n(({initialShardKey:a=""})=>{let t=x(),[o,j]=(0,F.useState)(""),{context:g,error:m}=q(o),I=g===void 0?{}:{context:g},{data:i,error:J,errorSource:K,liveError:E}=b(S.listFlags,I,{live:!0,shardKey:a}),u=i!==void 0,U=i?.configured??!1,h=Array.isArray(i?.flags)?[...i.flags].toSorted((r,V)=>r.key.localeCompare(V.key)):[],d;return u&&!U?d=(0,e.jsx)(c,{description:t("No @lunora/flags provider is wired in this deployment. Add lunora/flags.ts with defineFlags({ provider }) to gate code paths on feature flags."),testId:"flags-unconfigured",title:t("No flags provider configured")}):u&&h.length===0?d=(0,e.jsx)(c,{description:t('A flags provider is configured, but no handler reads a flag yet. Call ctx.flags.boolean("key", false) in a query, mutation, or action.'),testId:"flags-empty",title:t("No flags read")}):d=(0,e.jsx)(y,{className:"overflow-hidden py-0",children:(0,e.jsx)(N,{className:"px-0",children:(0,e.jsxs)(w,{"data-testid":"flags-table",children:[(0,e.jsx)(A,{children:(0,e.jsxs)(f,{children:[(0,e.jsx)(l,{children:t("Key")}),(0,e.jsx)(l,{children:t("Type")}),(0,e.jsx)(l,{children:t("Value")}),(0,e.jsx)(l,{children:t("Reason")}),(0,e.jsx)(l,{children:t("Variant")})]})}),(0,e.jsx)(O,{children:h.map(r=>(0,e.jsxs)(f,{"data-testid":`flags-row-${r.key}`,children:[(0,e.jsx)(s,{className:"font-mono text-xs",children:r.key}),(0,e.jsx)(s,{className:"font-mono text-xs text-muted-foreground",children:r.type}),(0,e.jsx)(s,{className:"font-mono text-xs",children:M(r)}),(0,e.jsx)(s,{children:r.errorCode===void 0?(0,e.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:r.reason??"\u2014"}):(0,e.jsx)(v,{"data-testid":`flags-error-${r.key}`,variant:"destructive",children:r.errorCode})}),(0,e.jsx)(s,{className:"font-mono text-xs text-muted-foreground",children:r.variant??"\u2014"})]},r.key))})]})})}),(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-flags-panel",children:[J!==null&&(0,e.jsx)(k,{error:K,testId:"flags-error"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:t('Feature flags are read in code with ctx.flags.<type>("key", default). They evaluate through the OpenFeature provider configured in lunora/flags.ts; edit the targeting context below to see how each flag resolves for a given audience.')}),(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsx)(T,{htmlFor:"flags-targeting-context",children:t("Targeting context (JSON)")}),(0,e.jsx)(C,{className:"font-mono text-xs","data-testid":"flags-context-input",id:"flags-targeting-context",onChange:n(r=>{j(r.target.value)},"onChange"),placeholder:D,rows:3,value:o}),m!==null&&(0,e.jsx)("p",{className:"text-xs text-destructive","data-testid":"flags-context-error",role:"alert",children:t(m)}),E!==void 0&&(0,e.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-500","data-testid":"flags-live-error",role:"alert",children:t("Live updates unavailable; showing the last evaluation.")})]}),d]})},"X");export{Y as default};
1
+ import{a as C}from"./chunk-V53KNYRN.js";import{a as T}from"./chunk-5Y3QLNWX.js";import{b as v}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as k}from"./chunk-KBBOZRRX.js";import"./chunk-XXQUMVWH.js";import"./chunk-DSU54IAT.js";import"./chunk-QLQADHFE.js";import{a as S}from"./chunk-VDW32UET.js";import{c as b}from"./chunk-HRRFUAP6.js";import"./chunk-6FQJRXVI.js";import"./chunk-XBDKZZ67.js";import{a as c}from"./chunk-XQCVZAGU.js";import{a as w,b as A,c as O,d as f,e as l,f as s}from"./chunk-WJQLNYGX.js";import{a as y,e as N}from"./chunk-WQH3LT2P.js";import{d as x}from"./chunk-IUYFXK4X.js";import"./chunk-P33WK7YI.js";import{a as n,e as p,f as $,h as L}from"./chunk-3XIESWL4.js";var F=p($(),1);var e=p(L(),1);var q=n(a=>{let t=a.trim();if(t.length===0)return{context:void 0,error:null};try{let o=JSON.parse(t);return o===null||typeof o!="object"||Array.isArray(o)?{context:void 0,error:"Targeting context must be a JSON object."}:{context:o,error:null}}catch{return{context:void 0,error:"Targeting context is not valid JSON."}}},"L"),D='{ "targetingKey": "user-123", "plan": "premium" }',M=n(a=>a.type==="object"?JSON.stringify(a.value):String(a.value),"V"),Y=n(({initialShardKey:a=""})=>{let t=x(),[o,j]=(0,F.useState)(""),{context:g,error:m}=q(o),I=g===void 0?{}:{context:g},{data:i,error:J,errorSource:K,liveError:E}=b(S.listFlags,I,{live:!0,shardKey:a}),u=i!==void 0,U=i?.configured??!1,h=Array.isArray(i?.flags)?[...i.flags].toSorted((r,V)=>r.key.localeCompare(V.key)):[],d;return u&&!U?d=(0,e.jsx)(c,{description:t("No @lunora/flags provider is wired in this deployment. Add lunora/flags.ts with defineFlags({ provider }) to gate code paths on feature flags."),testId:"flags-unconfigured",title:t("No flags provider configured")}):u&&h.length===0?d=(0,e.jsx)(c,{description:t('A flags provider is configured, but no handler reads a flag yet. Call ctx.flags.boolean("key", false) in a query, mutation, or action.'),testId:"flags-empty",title:t("No flags read")}):d=(0,e.jsx)(y,{className:"overflow-hidden py-0",children:(0,e.jsx)(N,{className:"px-0",children:(0,e.jsxs)(w,{"data-testid":"flags-table",children:[(0,e.jsx)(A,{children:(0,e.jsxs)(f,{children:[(0,e.jsx)(l,{children:t("Key")}),(0,e.jsx)(l,{children:t("Type")}),(0,e.jsx)(l,{children:t("Value")}),(0,e.jsx)(l,{children:t("Reason")}),(0,e.jsx)(l,{children:t("Variant")})]})}),(0,e.jsx)(O,{children:h.map(r=>(0,e.jsxs)(f,{"data-testid":`flags-row-${r.key}`,children:[(0,e.jsx)(s,{className:"font-mono text-xs",children:r.key}),(0,e.jsx)(s,{className:"font-mono text-xs text-muted-foreground",children:r.type}),(0,e.jsx)(s,{className:"font-mono text-xs",children:M(r)}),(0,e.jsx)(s,{children:r.errorCode===void 0?(0,e.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:r.reason??"\u2014"}):(0,e.jsx)(v,{"data-testid":`flags-error-${r.key}`,variant:"destructive",children:r.errorCode})}),(0,e.jsx)(s,{className:"font-mono text-xs text-muted-foreground",children:r.variant??"\u2014"})]},r.key))})]})})}),(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-flags-panel",children:[J!==null&&(0,e.jsx)(k,{error:K,testId:"flags-error"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:t('Feature flags are read in code with ctx.flags.<type>("key", default). They evaluate through the OpenFeature provider configured in lunora/flags.ts; edit the targeting context below to see how each flag resolves for a given audience.')}),(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsx)(T,{htmlFor:"flags-targeting-context",children:t("Targeting context (JSON)")}),(0,e.jsx)(C,{className:"font-mono text-xs","data-testid":"flags-context-input",id:"flags-targeting-context",onChange:n(r=>{j(r.target.value)},"onChange"),placeholder:D,rows:3,value:o}),m!==null&&(0,e.jsx)("p",{className:"text-xs text-destructive","data-testid":"flags-context-error",role:"alert",children:t(m)}),E!==void 0&&(0,e.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-500","data-testid":"flags-live-error",role:"alert",children:t("Live updates unavailable; showing the last evaluation.")})]}),d]})},"X");export{Y as default};