@brainfish-ai/components 0.33.1 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/conversation.d.ts +55 -12
  2. package/dist/esm/chunks/{ChatSearch.EPCaUj3O.js → ChatSearch.D5EABw51.js} +2 -2
  3. package/dist/esm/chunks/{ChatSearch.EPCaUj3O.js.map → ChatSearch.D5EABw51.js.map} +1 -1
  4. package/dist/esm/chunks/Conversation.Dq66Znf4.js +33 -0
  5. package/dist/esm/chunks/Conversation.Dq66Znf4.js.map +1 -0
  6. package/dist/esm/chunks/{FormattedMessage.D_knqVl-.js → FormattedMessage.Djy5cn5F.js} +2 -2
  7. package/dist/esm/chunks/{FormattedMessage.D_knqVl-.js.map → FormattedMessage.Djy5cn5F.js.map} +1 -1
  8. package/dist/esm/chunks/ai-badge.Be0978vU.js +5 -0
  9. package/dist/esm/chunks/ai-badge.Be0978vU.js.map +1 -0
  10. package/dist/esm/chunks/{button.D_2SonNs.js → button.Cs1X8upM.js} +2 -2
  11. package/dist/esm/chunks/{button.D_2SonNs.js.map → button.Cs1X8upM.js.map} +1 -1
  12. package/dist/esm/chunks/{combobox.MyoPH18G.js → combobox.CLT9CXUV.js} +2 -2
  13. package/dist/esm/chunks/{combobox.MyoPH18G.js.map → combobox.CLT9CXUV.js.map} +1 -1
  14. package/dist/esm/chunks/{date-picker.C2VT_rZ9.js → date-picker.D9CRxYJf.js} +2 -2
  15. package/dist/esm/chunks/{date-picker.C2VT_rZ9.js.map → date-picker.D9CRxYJf.js.map} +1 -1
  16. package/dist/esm/chunks/{feedback.CLMuSvsg.js → feedback.CGFAP0XS.js} +2 -2
  17. package/dist/esm/chunks/{feedback.CLMuSvsg.js.map → feedback.CGFAP0XS.js.map} +1 -1
  18. package/dist/esm/chunks/{file-upload-status.D8RhMcbO.js → file-upload-status.ClQeoQQB.js} +2 -2
  19. package/dist/esm/chunks/{file-upload-status.D8RhMcbO.js.map → file-upload-status.ClQeoQQB.js.map} +1 -1
  20. package/dist/esm/chunks/{filters.BHp3ukNW.js → filters.BRlRsGlZ.js} +2 -2
  21. package/dist/esm/chunks/{filters.BHp3ukNW.js.map → filters.BRlRsGlZ.js.map} +1 -1
  22. package/dist/esm/chunks/{font-picker.B9GPXyK4.js → font-picker.Dwwe5av-.js} +2 -2
  23. package/dist/esm/chunks/{font-picker.B9GPXyK4.js.map → font-picker.Dwwe5av-.js.map} +1 -1
  24. package/dist/esm/chunks/header-nav.DR1jmsyS.js +11 -0
  25. package/dist/esm/chunks/header-nav.DR1jmsyS.js.map +1 -0
  26. package/dist/esm/chunks/{header-pane.eU7f_pim.js → header-pane.qjpYA99q.js} +2 -2
  27. package/dist/esm/chunks/{header-pane.eU7f_pim.js.map → header-pane.qjpYA99q.js.map} +1 -1
  28. package/dist/esm/chunks/index.Ca2JkOFO.js +2 -0
  29. package/dist/esm/chunks/index.Ca2JkOFO.js.map +1 -0
  30. package/dist/esm/chunks/{input-with-tags.DLv9e0XI.js → input-with-tags.pmOKv67d.js} +2 -2
  31. package/dist/esm/chunks/{input-with-tags.DLv9e0XI.js.map → input-with-tags.pmOKv67d.js.map} +1 -1
  32. package/dist/esm/chunks/{sidebar.CcFsNjrN.js → sidebar.BhcrMAU3.js} +8 -8
  33. package/dist/esm/chunks/{sidebar.CcFsNjrN.js.map → sidebar.BhcrMAU3.js.map} +1 -1
  34. package/dist/esm/chunks/{suggestion-card.D-AsG_yB.js → suggestion-card.TDn-dEc0.js} +2 -2
  35. package/dist/esm/chunks/{suggestion-card.D-AsG_yB.js.map → suggestion-card.TDn-dEc0.js.map} +1 -1
  36. package/dist/esm/chunks/{two-level-combobox.BVZfsNSN.js → two-level-combobox.SDv7qc_m.js} +2 -2
  37. package/dist/esm/chunks/{two-level-combobox.BVZfsNSN.js.map → two-level-combobox.SDv7qc_m.js.map} +1 -1
  38. package/dist/esm/components/article-suggestions-banner.js +1 -1
  39. package/dist/esm/components/articles-coverage.js +3 -3
  40. package/dist/esm/components/articles-updated.js +2 -2
  41. package/dist/esm/components/chat-search.js +1 -1
  42. package/dist/esm/components/combobox.js +1 -1
  43. package/dist/esm/components/conversation.js +1 -1
  44. package/dist/esm/components/convos.js +11 -11
  45. package/dist/esm/components/date-picker.js +1 -1
  46. package/dist/esm/components/feedback.js +1 -1
  47. package/dist/esm/components/file-upload.js +1 -1
  48. package/dist/esm/components/filter.js +1 -1
  49. package/dist/esm/components/font-picker.js +1 -1
  50. package/dist/esm/components/input-with-tags.js +1 -1
  51. package/dist/esm/components/markdown.js +1 -1
  52. package/dist/esm/components/two-level-combobox.js +1 -1
  53. package/dist/esm/components/ui/alert-dialog.js +1 -1
  54. package/dist/esm/components/ui/breadcrumb.js +1 -1
  55. package/dist/esm/components/ui/button-group.js +1 -1
  56. package/dist/esm/components/ui/button.js +1 -1
  57. package/dist/esm/components/ui/combobox.js +1 -1
  58. package/dist/esm/components/ui/div-button.js +1 -1
  59. package/dist/esm/components/ui/item.js +1 -1
  60. package/dist/esm/components/ui/sheet.js +1 -1
  61. package/dist/esm/components/ui/tooltip.js +3 -3
  62. package/dist/esm/components/ui/tooltip.js.map +1 -1
  63. package/dist/esm/global.css +1 -1
  64. package/dist/esm/index.js +1 -1
  65. package/dist/esm/layouts/full-layout.js +1 -1
  66. package/dist/esm/layouts/header-nav.js +1 -1
  67. package/dist/esm/layouts/sidebar.js +1 -1
  68. package/dist/esm/scenes/knowledge-review.js +1 -1
  69. package/dist/esm/tailwind.preset.js +1 -1
  70. package/dist/esm/tailwind.preset.js.map +1 -1
  71. package/dist/index.d.ts +55 -12
  72. package/dist/stats.html +1 -1
  73. package/package.json +7 -7
  74. package/tailwind.preset.ts +1 -1
  75. package/dist/esm/chunks/Conversation.C2TpUr4-.js +0 -29
  76. package/dist/esm/chunks/Conversation.C2TpUr4-.js.map +0 -1
  77. package/dist/esm/chunks/header-nav.DmlIUqml.js +0 -14
  78. package/dist/esm/chunks/header-nav.DmlIUqml.js.map +0 -1
  79. package/dist/esm/chunks/index.uF4ME3WQ.js +0 -4
  80. package/dist/esm/chunks/index.uF4ME3WQ.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import{Sparkle as e,CaretDown as t,CaretUp as r}from"@phosphor-icons/react";import*as a from"react";import{B as l}from"../chunks/button.D_2SonNs.js";import{Tooltip as n,TooltipTrigger as o,TooltipContent as i}from"./ui/tooltip.js";import{ButtonGroup as c}from"./ui/button-group.js";import{c as s}from"../chunks/utils.C6Qu-kwd.js";const m=a.forwardRef(function({suggestionsCount:m,currentArticleIndex:u,totalArticles:d,onNextArticle:p,onPreviousArticle:b,onStartReviewSuggestions:f,onRejectAllSuggestions:g,onApproveAllSuggestions:E,className:v,...x},h){const k=u<d-1,N=u>0,A=u+1;/* @__PURE__ */
1
+ import{Sparkle as e,CaretDown as t,CaretUp as r}from"@phosphor-icons/react";import*as a from"react";import{B as l}from"../chunks/button.Cs1X8upM.js";import{Tooltip as n,TooltipTrigger as o,TooltipContent as i}from"./ui/tooltip.js";import{ButtonGroup as c}from"./ui/button-group.js";import{c as s}from"../chunks/utils.C6Qu-kwd.js";const m=a.forwardRef(function({suggestionsCount:m,currentArticleIndex:u,totalArticles:d,onNextArticle:p,onPreviousArticle:b,onStartReviewSuggestions:f,onRejectAllSuggestions:g,onApproveAllSuggestions:E,className:v,...x},h){const k=u<d-1,N=u>0,A=u+1;/* @__PURE__ */
2
2
  return a.createElement("div",{ref:h,className:s("flex bg-blue-200 rounded-md border border-blue-600",v),...x},/* @__PURE__ */a.createElement("div",{className:"flex-1 py-3 px-4 flex justify-between items-center"},/* @__PURE__ */a.createElement("div",{className:"flex items-center gap-2"},/* @__PURE__ */a.createElement(e,{size:32,weight:"fill",className:"text-blue-700"}),/* @__PURE__ */a.createElement("p",{className:"text-sm text-foreground"},function(e,t,r=`${t}s`){return`${e} ${1===e?t:r}`}(m,"way")," to level up this article.")),/* @__PURE__ */a.createElement(c,{orientation:"horizontal",rounded:!1,"aria-label":"Suggestion actions"},/* @__PURE__ */a.createElement(l,{variant:"link",onClick:f},"Start review"),/* @__PURE__ */a.createElement(l,{variant:"link",onClick:g},"Reject all"),/* @__PURE__ */a.createElement(l,{variant:"surface",elevation:"shadow",onClick:E},"Approve all"))),/* @__PURE__ */a.createElement("div",{className:"py-3 px-6 flex items-center bg-blue-300 border-l border-blue-700 gap-2 rounded-r-md"},/* @__PURE__ */a.createElement("p",{className:"text-sm text-foreground"},/* @__PURE__ */a.createElement("span",{"aria-hidden":"true"},A,"/",d),/* @__PURE__ */a.createElement("span",{className:"sr-only","aria-live":"polite"},"Article ",A," of ",d)),/* @__PURE__ */a.createElement(n,null,/* @__PURE__ */a.createElement(o,{asChild:!0},/* @__PURE__ */a.createElement(l,{variant:"link",size:"icon",disabled:!k,onClick:p,"aria-label":"Go to next article"},
3
3
  /* @__PURE__ */a.createElement(t,{"aria-hidden":"true",weight:"bold"}))),/* @__PURE__ */a.createElement(i,{side:"bottom",bgColor:"--bfc-foreground",className:"text-background"},"Next Article")),/* @__PURE__ */a.createElement(n,null,/* @__PURE__ */a.createElement(o,{asChild:!0},/* @__PURE__ */a.createElement(l,{variant:"link",size:"icon",disabled:!N,onClick:b,"aria-label":"Go to previous article"},
4
4
  /* @__PURE__ */a.createElement(r,{"aria-hidden":"true",weight:"bold"}))),/* @__PURE__ */a.createElement(i,{side:"top",bgColor:"--bfc-foreground",className:"text-background"},"Previous Article"))))});export{m as ArticleSuggestionsBanner};
@@ -1,5 +1,5 @@
1
- import e from"react";import{LineChart as t,CartesianGrid as a,XAxis as r,Line as l,PieChart as n,Pie as o,Label as c}from"recharts";import{a as s}from"../chunks/trend-value.BPBDBsk2.js";import{Card as m,CardHeader as i,CardContent as d}from"./ui/card.js";import{C as u,a as f,b as v}from"../chunks/chart.BDL2tf-S.js";import{f as p}from"../chunks/formatNumber.DhVn228t.js";import{u as x}from"../chunks/useChartDateFormatters.Dx2h5AAm.js";import{c as k}from"../chunks/utils.C6Qu-kwd.js";const E={covered:{label:"Covered",color:"var(--bfc-v2-color-blue-600, #357DE8)"},uncovered:{label:"Uncovered",color:"var(--bfc-v2-color-mono-300, #E5E5E5)"}};function h({total:h,trend:y,trendValue:g,coveragePercentage:b,data:N,chartConfig:j,locale:w,className:A}){const{tickFormatter:K,formatXLabel:B}=x(w),C=Object.keys(j),M=Math.round(Math.min(100,Math.max(0,b)));/* @__PURE__ */
2
- return e.createElement(m,{className:k("shadow-none border border-dark-300 rounded-lg",A)},/* @__PURE__ */e.createElement(i,{className:"p-0 space-y-0 border-b border-dark-300"},/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-1 justify-center py-4 px-4"},/* @__PURE__ */e.createElement("p",{className:"uppercase heading-xxxs font-semibold text-dark tracking-normal"},"Articles Generated by Brainfish (coverage)"),/* @__PURE__ */e.createElement("div",{className:"flex items-center gap-2"},/* @__PURE__ */e.createElement("span",{className:"font-mono text-3xl leading-10 text-dark"},p(h,{})),/* @__PURE__ */e.createElement(s,{trend:y,trendValue:g})))),/* @__PURE__ */e.createElement(d,{className:"flex gap-2 p-0"},/* @__PURE__ */e.createElement("div",{className:"flex-1 min-w-0 px-4 pt-4 pb-0"},/* @__PURE__ */e.createElement(u,{config:j,className:"h-48 w-full"},/* @__PURE__ */e.createElement(t,{data:N,margin:{top:8,left:20,right:20,bottom:0}},/* @__PURE__ */e.createElement(a,{horizontal:!0,vertical:!1,className:"stroke-dark-300"}),/* @__PURE__ */e.createElement(r,{dataKey:"date",tickLine:!1,axisLine:!1,tickMargin:8,padding:{left:15,right:15},minTickGap:32,interval:"preserveStartEnd",tickFormatter:K,tick:({x:t,y:a,payload:r,index:l})=>{const n=0===l,o=l===N.length-1,c=n?"start":o?"end":"middle",s=n?t-15:o?t+15:t;/* @__PURE__ */
3
- return e.createElement("text",{x:s,y:a,dy:12,textAnchor:c,className:"text-xs fill-dark-600"},K(r.value))}}),/* @__PURE__ */e.createElement(f,{cursor:!1,content:({active:t,payload:a,label:r})=>/* @__PURE__ */e.createElement(v,{active:t,payload:a,label:null!=r?B(r):""})}),C.map(t=>/* @__PURE__ */e.createElement(l,{key:t,dataKey:t,type:"monotone",stroke:`var(--color-${t})`,strokeWidth:2,dot:{r:4,fill:"white",strokeWidth:2,stroke:`var(--color-${t})`},activeDot:{r:5,fill:"white",strokeWidth:2,stroke:`var(--color-${t})`}}))))),/* @__PURE__ */e.createElement("div",{className:"w-80 shrink-0 flex items-center justify-center"},/* @__PURE__ */e.createElement(u,{config:E,className:"aspect-square w-full max-w-44"},/* @__PURE__ */e.createElement(n,null,/* @__PURE__ */e.createElement(o,{data:[{value:100,fill:"var(--color-uncovered)"}],dataKey:"value",innerRadius:"76%",outerRadius:"82%",stroke:"none",isAnimationActive:!1}),/* @__PURE__ */e.createElement(o,{data:[{name:"covered",value:M,fill:"var(--color-covered)"},{name:"uncovered",value:100-M,fill:"transparent"}],dataKey:"value",nameKey:"name",innerRadius:"68%",outerRadius:"90%",startAngle:90,endAngle:-270,stroke:"none"},
1
+ import e from"react";import{LineChart as t,CartesianGrid as a,XAxis as r,Line as l,PieChart as n,Pie as o,Label as c}from"recharts";import{a as s}from"../chunks/trend-value.BPBDBsk2.js";import{Card as m,CardHeader as i,CardContent as d}from"./ui/card.js";import{C as u,a as f,b as v}from"../chunks/chart.BDL2tf-S.js";import{f as p}from"../chunks/formatNumber.DhVn228t.js";import{u as x}from"../chunks/useChartDateFormatters.Dx2h5AAm.js";import{c as k}from"../chunks/utils.C6Qu-kwd.js";const E={covered:{label:"Covered",color:"var(--bfc-v2-color-blue-600, #357DE8)"},uncovered:{label:"Uncovered",color:"var(--bfc-v2-color-mono-300, #E5E5E5)"}};function h({total:h,trend:y,trendValue:g,coveragePercentage:b,data:N,chartConfig:j,locale:w,className:A}){const{tickFormatter:C,formatXLabel:K}=x(w),B=Object.keys(j),M=Math.round(Math.min(100,Math.max(0,b)));/* @__PURE__ */
2
+ return e.createElement(m,{className:k("shadow-none border border-dark-300 rounded-lg",A)},/* @__PURE__ */e.createElement(i,{className:"p-0 space-y-0 border-b border-dark-300"},/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-1 justify-center py-4 px-4"},/* @__PURE__ */e.createElement("p",{className:"uppercase heading-xxxs font-semibold text-dark tracking-normal"},"Articles Generated by Brainfish (coverage)"),/* @__PURE__ */e.createElement("div",{className:"flex items-center gap-2"},/* @__PURE__ */e.createElement("span",{className:"font-mono text-3xl leading-10 text-dark"},p(h,{})),/* @__PURE__ */e.createElement(s,{trend:y,trendValue:g})))),/* @__PURE__ */e.createElement(d,{className:"flex gap-2 p-0"},/* @__PURE__ */e.createElement("div",{className:"flex-1 min-w-0 px-4 pt-4 pb-0"},/* @__PURE__ */e.createElement(u,{config:j,className:"h-48 w-full"},/* @__PURE__ */e.createElement(t,{data:N,margin:{top:8,left:20,right:20,bottom:0}},/* @__PURE__ */e.createElement(a,{horizontal:!0,vertical:!1,className:"stroke-dark-300"}),/* @__PURE__ */e.createElement(r,{dataKey:"date",tickLine:!1,axisLine:!1,tickMargin:8,padding:{left:15,right:15},minTickGap:32,interval:"preserveStartEnd",tickFormatter:C,tick:({x:t,y:a,payload:r,index:l})=>{const n=0===l,o=l===N.length-1,c=n?"start":o?"end":"middle",s=n?t-15:o?t+15:t;/* @__PURE__ */
3
+ return e.createElement("text",{x:s,y:a,dy:12,textAnchor:c,className:"text-xs fill-dark-600"},C(r.value))}}),/* @__PURE__ */e.createElement(f,{cursor:!1,content:({active:t,payload:a,label:r})=>/* @__PURE__ */e.createElement(v,{active:t,payload:a,label:null!=r?K(r):""})}),B.map(t=>/* @__PURE__ */e.createElement(l,{key:t,dataKey:t,type:"monotone",stroke:`var(--color-${t})`,strokeWidth:2,dot:{r:4,fill:"white",strokeWidth:2,stroke:`var(--color-${t})`},activeDot:{r:5,fill:"white",strokeWidth:2,stroke:`var(--color-${t})`}}))))),/* @__PURE__ */e.createElement("div",{className:"w-80 shrink-0 flex items-center justify-center"},/* @__PURE__ */e.createElement(u,{config:E,className:"aspect-square w-full max-w-44"},/* @__PURE__ */e.createElement(n,null,/* @__PURE__ */e.createElement(o,{data:[{value:100,fill:"var(--color-uncovered)"}],dataKey:"value",innerRadius:"76%",outerRadius:"82%",stroke:"none",isAnimationActive:!1}),/* @__PURE__ */e.createElement(o,{data:[{name:"covered",value:M,fill:"var(--color-covered)"},{name:"uncovered",value:100-M,fill:"transparent"}],dataKey:"value",nameKey:"name",innerRadius:"68%",outerRadius:"90%",startAngle:90,endAngle:-270,stroke:"none"},
4
4
  /* @__PURE__ */e.createElement(c,{content:({viewBox:t})=>t&&"cx"in t&&"cy"in t?/* @__PURE__ */e.createElement("text",{x:t.cx,y:t.cy,textAnchor:"middle",dominantBaseline:"central"},/* @__PURE__ */e.createElement("tspan",{className:"font-mono text-3xl fill-dark-600"},M,"%")):null})))))))}export{h as ArticlesCoverage};
5
5
  //# sourceMappingURL=articles-coverage.js.map
@@ -1,5 +1,5 @@
1
- import e from"react";import{LineChart as t,CartesianGrid as a,XAxis as r,Line as c}from"recharts";import{a as s}from"../chunks/trend-value.BPBDBsk2.js";import{Card as l,CardHeader as n,CardContent as o}from"./ui/card.js";import{C as m,a as i,b as d,c as p,d as k}from"../chunks/chart.BDL2tf-S.js";import{f as u}from"../chunks/formatNumber.DhVn228t.js";import{u as f}from"../chunks/useChartDateFormatters.Dx2h5AAm.js";import{c as h}from"../chunks/utils.C6Qu-kwd.js";function x({total:x,trend:E,trendValue:y,data:g,chartConfig:b,dashedKeys:N=[],locale:v,className:j}){const{tickFormatter:w,formatXLabel:A}=f(v),C=Object.keys(b);/* @__PURE__ */
1
+ import e from"react";import{LineChart as t,CartesianGrid as a,XAxis as r,Line as c}from"recharts";import{a as s}from"../chunks/trend-value.BPBDBsk2.js";import{Card as l,CardHeader as n,CardContent as o}from"./ui/card.js";import{C as m,a as i,b as d,c as p,d as k}from"../chunks/chart.BDL2tf-S.js";import{f as u}from"../chunks/formatNumber.DhVn228t.js";import{u as f}from"../chunks/useChartDateFormatters.Dx2h5AAm.js";import{c as h}from"../chunks/utils.C6Qu-kwd.js";function x({total:x,trend:E,trendValue:y,data:g,chartConfig:b,dashedKeys:N=[],locale:v,className:j}){const{tickFormatter:w,formatXLabel:C}=f(v),A=Object.keys(b);/* @__PURE__ */
2
2
  return e.createElement(l,{className:h("shadow-none border border-dark-300 rounded-lg",j)},/* @__PURE__ */e.createElement(n,{className:"p-0 space-y-0 border-b border-dark-300"},/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-1 justify-center py-4 px-4"},/* @__PURE__ */e.createElement("p",{className:"uppercase heading-xxxs font-semibold text-dark tracking-normal"},"Articles updated"),/* @__PURE__ */e.createElement("div",{className:"flex items-center gap-2"},/* @__PURE__ */e.createElement("span",{className:"font-mono text-3xl leading-10 text-dark"},u(x,{})),/* @__PURE__ */e.createElement(s,{trend:E,trendValue:y})))),/* @__PURE__ */e.createElement(o,{className:"p-4"},/* @__PURE__ */e.createElement(m,{config:b,className:"h-48 w-full"},/* @__PURE__ */e.createElement(t,{data:g,margin:{top:8,left:20,right:20,bottom:0}},/* @__PURE__ */e.createElement(a,{horizontal:!0,vertical:!1,className:"stroke-dark-300"}),/* @__PURE__ */e.createElement(r,{dataKey:"date",tickLine:!1,axisLine:!1,tickMargin:8,padding:{left:15,right:15},minTickGap:32,interval:"preserveStartEnd",tickFormatter:w,tick:({x:t,y:a,payload:r,index:c})=>{const s=0===c,l=c===g.length-1,n=s?"start":l?"end":"middle",o=s?t-15:l?t+15:t;/* @__PURE__ */
3
- return e.createElement("text",{x:o,y:a,dy:12,textAnchor:n,className:"text-xs fill-dark-600"},w(r.value))}}),/* @__PURE__ */e.createElement(i,{cursor:!1,content:({active:t,payload:a,label:r})=>/* @__PURE__ */e.createElement(d,{active:t,payload:a,label:A(r),className:"min-w-52"})}),C.map(t=>{const a=N.includes(t);/* @__PURE__ */
3
+ return e.createElement("text",{x:o,y:a,dy:12,textAnchor:n,className:"text-xs fill-dark-600"},w(r.value))}}),/* @__PURE__ */e.createElement(i,{cursor:!1,content:({active:t,payload:a,label:r})=>/* @__PURE__ */e.createElement(d,{active:t,payload:a,label:C(r),className:"min-w-52"})}),A.map(t=>{const a=N.includes(t);/* @__PURE__ */
4
4
  return e.createElement(c,{key:t,dataKey:t,type:"monotone",stroke:`var(--color-${t})`,strokeWidth:2,strokeDasharray:a?"5 5":void 0,dot:({cx:t,cy:a,stroke:r})=>/* @__PURE__ */e.createElement("circle",{cx:t,cy:a,r:4,fill:"white",stroke:r,strokeWidth:2}),activeDot:{r:5,strokeWidth:0}})}),/* @__PURE__ */e.createElement(p,{content:/* @__PURE__ */e.createElement(k,null)})))))}export{x as ArticlesUpdated};
5
5
  //# sourceMappingURL=articles-updated.js.map
@@ -1,2 +1,2 @@
1
- export{C as ChatSearch,a as ChatSearchProvider,N as NextBestActionType,R as ResolvedConversationFooter,u as useChatSearch,b as useIsChatSearchDirty,v as validateUrlString}from"../chunks/ChatSearch.EPCaUj3O.js";
1
+ export{C as ChatSearch,a as ChatSearchProvider,N as NextBestActionType,R as ResolvedConversationFooter,u as useChatSearch,b as useIsChatSearchDirty,v as validateUrlString}from"../chunks/ChatSearch.D5EABw51.js";
2
2
  //# sourceMappingURL=chat-search.js.map
@@ -1,2 +1,2 @@
1
- export{C as Combobox}from"../chunks/combobox.MyoPH18G.js";
1
+ export{C as Combobox}from"../chunks/combobox.CLT9CXUV.js";
2
2
  //# sourceMappingURL=combobox.js.map
@@ -1,2 +1,2 @@
1
- export{C as ContextPillBadge,a as Conversation,b as ConversationActions,c as ConversationInput,d as ConversationMessageAssistant,e as ConversationMessageUser,f as ConversationMessages,g as ConversationProvider,h as ConversationStatus,i as ConversationSuggestions,j as getConversationStatusLabel,u as useConversation}from"../chunks/Conversation.C2TpUr4-.js";
1
+ export{C as ContextPillBadge,a as Conversation,b as ConversationActions,c as ConversationInput,d as ConversationMessageAssistant,e as ConversationMessageUser,f as ConversationMessages,g as ConversationProvider,h as ConversationStatus,i as ConversationSuggestions,j as getConversationStatusLabel,u as useConversation}from"../chunks/Conversation.Dq66Znf4.js";
2
2
  //# sourceMappingURL=conversation.js.map
@@ -1,28 +1,28 @@
1
- import e,{useState as t,useEffect as a,useRef as s,useMemo as r}from"react";import{S as n}from"../chunks/status-badge.Cf3R4nVr.js";import{ArrowSquareOut as l,CheckCircle as c,XCircle as i,ListMagnifyingGlass as m,UserCircle as o,Eye as d,UserFocus as u,Circle as p}from"@phosphor-icons/react";import{F as f}from"../chunks/FormattedMessage.D_knqVl-.js";import{Spinner as g}from"./ui/spinner.js";import{B as E}from"../chunks/button.D_2SonNs.js";import{useForm as h,Controller as v}from"react-hook-form";import{Select as N,SelectTrigger as x,SelectValue as b,SelectContent as w,SelectItem as y}from"./ui/select.js";import{Label as k}from"./ui/label.js";import{Textarea as C}from"./ui/textarea.js";import{Tooltip as j,TooltipTrigger as A,TooltipContent as _}from"./ui/tooltip.js";import{c as z}from"../chunks/utils.C6Qu-kwd.js";import{DivButton as O}from"./ui/div-button.js";import{ScrollArea as S}from"./ui/scroll-area.js";import{Sheet as D,SheetTrigger as F,SheetContent as R,SheetHeader as M,SheetTitle as I,SheetDescription as q}from"./ui/sheet.js";import{Badge as P}from"./ui/badge.js";import{G as T}from"../chunks/generating-star.BN9p_FDu.js";import{Item as W,ItemHeader as B,ItemTitle as L,ItemContent as U,ItemDescription as G}from"./ui/item.js";import{Accordion as K,AccordionItem as H,AccordionTrigger as Z,AccordionContent as V}from"./ui/accordion.js";import{c as $,b as J}from"../chunks/formatDate.D2xEZm8f.js";import{createId as Q}from"@paralleldrive/cuid2";import{Table as X,TableHeader as Y,TableRow as ee,TableHead as te,TableBody as ae,TableCell as se}from"./ui/table.js";import '../global.css';import '../convos.css';/* empty css */import"@radix-ui/react-accordion";import"clsx";import"tailwind-merge";import"./ui/alert-dialog.js";import"./ui/alert.js";import"@radix-ui/react-avatar";import"./ui/button-group.js";import"./ui/calendar.js";import"./ui/card.js";import"@radix-ui/react-collapsible";import"./ui/command.js";import"./ui/dialog.js";import"./ui/dropdown-menu.js";import"./ui/icon.js";import"./ui/input.js";import"./ui/popover.js";import"./ui/progress.js";import"./ui/radio-group.js";import"./ui/separator.js";import"./ui/switch.js";import"../logos/microsoft-teams-logo.js";import"../logos/slack-logo.js";import"../logos/microsoft-logo.js";import{d as re}from"../chunks/dark.DuW7JuAk.js";function ne({messageId:s}){const{fetchAnswerDiagnostics:r}=Ae(),[n,c]=t(null),[i,m]=t(!0);return a(()=>{r(s).then(e=>c(e)).finally(()=>m(!1))},[r,s]),/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-4 px-4 flex-shrink-0 bg-surface","data-name":"discard-dialog-answer-diagnostic"},i?/* @__PURE__ */e.createElement("div",{className:"flex items-center justify-center h-full"},/* @__PURE__ */e.createElement(g,null)):/* @__PURE__ */e.createElement(e.Fragment,null,n&&/* @__PURE__ */e.createElement(e.Fragment,null,/* @__PURE__ */e.createElement("dl",{className:"grid grid-cols-[1fr_2fr] grid-rows-2 gap-5"},/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-1"},/* @__PURE__ */e.createElement("dt",{className:"heading-xs"},"Confidence"),/* @__PURE__ */e.createElement("dd",{className:"text-sm"},n.confidence_score)),n.answer_generation_type&&/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-1"},/* @__PURE__ */e.createElement("dt",{className:"heading-xs"},"Answer Type"),/* @__PURE__ */e.createElement("dd",{className:"text-sm"},n.answer_generation_type)),n.query_context_relevance&&/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-1"},/* @__PURE__ */e.createElement("dt",{className:"heading-xs"},"Relevance"),/* @__PURE__ */e.createElement("dd",{className:"text-sm"},n.query_context_relevance)),n.context_sufficiency&&/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-1"},/* @__PURE__ */e.createElement("dt",{className:"heading-xs"},"Context"),/* @__PURE__ */e.createElement("dd",{className:"text-sm"},n.context_sufficiency))),n.confidence_justification&&/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-2","data-name":"diagnostic-justification"},/* @__PURE__ */e.createElement("span",{className:"heading-xs"},"Justification"),/* @__PURE__ */e.createElement("p",{className:"text-sm my-0"},n.confidence_justification)),n.evidence_from_context&&n.evidence_from_context.length>0&&/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-2","data-name":"diagnostic-evidence"},/* @__PURE__ */e.createElement("span",{className:"heading-xs"},"Evidence (from Knowledge Base)"),n.evidence_from_context.map((t,a)=>/* @__PURE__ */e.createElement("div",{key:a,className:"flex flex-col gap-1"},t.supporting_quote&&/* @__PURE__ */e.createElement("p",{className:"text-sm my-0"},t.supporting_quote),t.url&&/* @__PURE__ */e.createElement(E,{variant:"link",size:"sm",className:"flex gap-1 text-sm self-end items-center",asChild:!0},/* @__PURE__ */e.createElement("a",{href:t.url,target:"_blank",rel:"noopener noreferrer"},/* @__PURE__ */e.createElement("span",null,"Source"),/* @__PURE__ */e.createElement(l,{size:16})))))))))}var le=/* @__PURE__ */(e=>(e.INCORRECT_ANSWER="incorrect_answer",e.HALLUCINATED_ANSWER="hallucinated_answer",e.OVERSHARING="oversharing",e.WRONG_ARTICLE_SURFACED="wrong_article_surfaced",e.OTHER="other",e))(le||{});const ce={incorrect_answer:"Incorrect answer",hallucinated_answer:"Hallucinated answer",oversharing:"Oversharing",wrong_article_surfaced:"Wrong article surfaced",other:"Other"};function ie({discarded:r,discardedMeta:n,onSubmit:l,onApprove:m,selectOpenRef:o,className:d}){const[u,p]=t(r??!1),[f,g]=t(!1),[O,S]=t(r),D=s(null);a(()=>{S(r),r&&p(!0)},[r]);const F=e=>{g(e),o&&(o.current.isOpen=e)};a(()=>{o&&(o.current.close=()=>F(!1))},[o]);const{control:R,register:M,handleSubmit:I,reset:q,formState:{isSubmitting:P}}=h({defaultValues:{reason:n?.reason,preferredAnswer:n?.suggestedAnswer||""}});a(()=>{q({reason:n?.reason,preferredAnswer:n?.suggestedAnswer||""})},[n,q]),a(()=>{D.current&&(D.current.inert=!u)},[u]);const T=null!=O,W=!T||!1===O,B=!T||!0===O;/* @__PURE__ */
2
- return e.createElement("div",{className:z("space-y-4",d)},/* @__PURE__ */e.createElement("div",{className:"flex gap-2 px-4"},W&&/* @__PURE__ */e.createElement(j,null,/* @__PURE__ */e.createElement(A,{asChild:!0},/* @__PURE__ */e.createElement(E,{variant:"surface",elevation:"shadow",size:"sm",className:z("text-default !opacity-100",{"bg-green-600 text-dark-100":!1===O}),disabled:T,onClick:async()=>{try{await m(),S(!1),p(!1),F(!1)}catch(e){console.error("Failed to approve:",e)}}},
3
- /* @__PURE__ */e.createElement(c,null)," ",!1===O?"Approved":"Approve")),/* @__PURE__ */e.createElement(_,null,/* @__PURE__ */e.createElement("span",null,"Approve the answer"))),B&&/* @__PURE__ */e.createElement(j,null,/* @__PURE__ */e.createElement(A,{asChild:!0},/* @__PURE__ */e.createElement(E,{variant:"surface",elevation:"shadow",size:"sm",className:z("text-default !opacity-100",{"bg-red-600 text-dark-100":!0===O}),disabled:T,onClick:()=>p(!u)},
1
+ import e,{useState as t,useEffect as a,useRef as s,useMemo as r}from"react";import{S as n}from"../chunks/status-badge.Cf3R4nVr.js";import{ArrowSquareOut as l,CheckCircle as c,XCircle as i,ListMagnifyingGlass as m,UserCircle as o,Eye as d,UserFocus as u,Circle as p}from"@phosphor-icons/react";import{F as f}from"../chunks/FormattedMessage.Djy5cn5F.js";import{Spinner as g}from"./ui/spinner.js";import{B as E}from"../chunks/button.Cs1X8upM.js";import{useForm as h,Controller as v}from"react-hook-form";import{Select as N,SelectTrigger as x,SelectValue as b,SelectContent as w,SelectItem as y}from"./ui/select.js";import{Label as k}from"./ui/label.js";import{Textarea as j}from"./ui/textarea.js";import{Tooltip as C,TooltipTrigger as A,TooltipContent as _}from"./ui/tooltip.js";import{c as z}from"../chunks/utils.C6Qu-kwd.js";import{DivButton as O}from"./ui/div-button.js";import{ScrollArea as S}from"./ui/scroll-area.js";import{Sheet as D,SheetTrigger as F,SheetContent as R,SheetHeader as M,SheetTitle as I,SheetDescription as q}from"./ui/sheet.js";import{Badge as P}from"./ui/badge.js";import{G as T}from"../chunks/generating-star.BN9p_FDu.js";import{Item as W,ItemHeader as B,ItemTitle as L,ItemContent as U,ItemDescription as G}from"./ui/item.js";import{Accordion as K,AccordionItem as H,AccordionTrigger as Z,AccordionContent as V}from"./ui/accordion.js";import{c as $,b as J}from"../chunks/formatDate.D2xEZm8f.js";import{createId as Q}from"@paralleldrive/cuid2";import{Table as X,TableHeader as Y,TableRow as ee,TableHead as te,TableBody as ae,TableCell as se}from"./ui/table.js";import '../global.css';import '../convos.css';/* empty css */import"@radix-ui/react-accordion";import"clsx";import"tailwind-merge";import"./ui/alert-dialog.js";import"./ui/alert.js";import"@radix-ui/react-avatar";import"./ui/button-group.js";import"./ui/calendar.js";import"./ui/card.js";import"@radix-ui/react-collapsible";import"./ui/command.js";import"./ui/dialog.js";import"./ui/dropdown-menu.js";import"./ui/icon.js";import"./ui/input.js";import"./ui/popover.js";import"./ui/progress.js";import"./ui/radio-group.js";import"./ui/separator.js";import"./ui/switch.js";import"../logos/microsoft-teams-logo.js";import"../logos/slack-logo.js";import"../logos/microsoft-logo.js";import{d as re}from"../chunks/dark.DuW7JuAk.js";function ne({messageId:s}){const{fetchAnswerDiagnostics:r}=Ae(),[n,c]=t(null),[i,m]=t(!0);return a(()=>{r(s).then(e=>c(e)).finally(()=>m(!1))},[r,s]),/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-4 px-4 flex-shrink-0 bg-surface","data-name":"discard-dialog-answer-diagnostic"},i?/* @__PURE__ */e.createElement("div",{className:"flex items-center justify-center h-full"},/* @__PURE__ */e.createElement(g,null)):/* @__PURE__ */e.createElement(e.Fragment,null,n&&/* @__PURE__ */e.createElement(e.Fragment,null,/* @__PURE__ */e.createElement("dl",{className:"grid grid-cols-[1fr_2fr] grid-rows-2 gap-5"},/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-1"},/* @__PURE__ */e.createElement("dt",{className:"heading-xs"},"Confidence"),/* @__PURE__ */e.createElement("dd",{className:"text-sm"},n.confidence_score)),n.answer_generation_type&&/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-1"},/* @__PURE__ */e.createElement("dt",{className:"heading-xs"},"Answer Type"),/* @__PURE__ */e.createElement("dd",{className:"text-sm"},n.answer_generation_type)),n.query_context_relevance&&/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-1"},/* @__PURE__ */e.createElement("dt",{className:"heading-xs"},"Relevance"),/* @__PURE__ */e.createElement("dd",{className:"text-sm"},n.query_context_relevance)),n.context_sufficiency&&/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-1"},/* @__PURE__ */e.createElement("dt",{className:"heading-xs"},"Context"),/* @__PURE__ */e.createElement("dd",{className:"text-sm"},n.context_sufficiency))),n.confidence_justification&&/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-2","data-name":"diagnostic-justification"},/* @__PURE__ */e.createElement("span",{className:"heading-xs"},"Justification"),/* @__PURE__ */e.createElement("p",{className:"text-sm my-0"},n.confidence_justification)),n.evidence_from_context&&n.evidence_from_context.length>0&&/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-2","data-name":"diagnostic-evidence"},/* @__PURE__ */e.createElement("span",{className:"heading-xs"},"Evidence (from Knowledge Base)"),n.evidence_from_context.map((t,a)=>/* @__PURE__ */e.createElement("div",{key:a,className:"flex flex-col gap-1"},t.supporting_quote&&/* @__PURE__ */e.createElement("p",{className:"text-sm my-0"},t.supporting_quote),t.url&&/* @__PURE__ */e.createElement(E,{variant:"link",size:"sm",className:"flex gap-1 text-sm self-end items-center",asChild:!0},/* @__PURE__ */e.createElement("a",{href:t.url,target:"_blank",rel:"noopener noreferrer"},/* @__PURE__ */e.createElement("span",null,"Source"),/* @__PURE__ */e.createElement(l,{size:16})))))))))}var le=/* @__PURE__ */(e=>(e.INCORRECT_ANSWER="incorrect_answer",e.HALLUCINATED_ANSWER="hallucinated_answer",e.OVERSHARING="oversharing",e.WRONG_ARTICLE_SURFACED="wrong_article_surfaced",e.OTHER="other",e))(le||{});const ce={incorrect_answer:"Incorrect answer",hallucinated_answer:"Hallucinated answer",oversharing:"Oversharing",wrong_article_surfaced:"Wrong article surfaced",other:"Other"};function ie({discarded:r,discardedMeta:n,onSubmit:l,onApprove:m,selectOpenRef:o,className:d}){const[u,p]=t(r??!1),[f,g]=t(!1),[O,S]=t(r),D=s(null);a(()=>{S(r),r&&p(!0)},[r]);const F=e=>{g(e),o&&(o.current.isOpen=e)};a(()=>{o&&(o.current.close=()=>F(!1))},[o]);const{control:R,register:M,handleSubmit:I,reset:q,formState:{isSubmitting:P}}=h({defaultValues:{reason:n?.reason,preferredAnswer:n?.suggestedAnswer||""}});a(()=>{q({reason:n?.reason,preferredAnswer:n?.suggestedAnswer||""})},[n,q]),a(()=>{D.current&&(D.current.inert=!u)},[u]);const T=null!=O,W=!T||!1===O,B=!T||!0===O;/* @__PURE__ */
2
+ return e.createElement("div",{className:z("space-y-4",d)},/* @__PURE__ */e.createElement("div",{className:"flex gap-2 px-4"},W&&/* @__PURE__ */e.createElement(C,null,/* @__PURE__ */e.createElement(A,{asChild:!0},/* @__PURE__ */e.createElement(E,{variant:"surface",elevation:"shadow",size:"sm",className:z("text-default !opacity-100",{"bg-green-600 text-dark-100":!1===O}),disabled:T,onClick:async()=>{try{await m(),S(!1),p(!1),F(!1)}catch(e){console.error("Failed to approve:",e)}}},
3
+ /* @__PURE__ */e.createElement(c,null)," ",!1===O?"Approved":"Approve")),/* @__PURE__ */e.createElement(_,null,/* @__PURE__ */e.createElement("span",null,"Approve the answer"))),B&&/* @__PURE__ */e.createElement(C,null,/* @__PURE__ */e.createElement(A,{asChild:!0},/* @__PURE__ */e.createElement(E,{variant:"surface",elevation:"shadow",size:"sm",className:z("text-default !opacity-100",{"bg-red-600 text-dark-100":!0===O}),disabled:T,onClick:()=>p(!u)},
4
4
  /* @__PURE__ */e.createElement(i,null),!0===O?"Discarded":"Discard")),/* @__PURE__ */e.createElement(_,null,/* @__PURE__ */e.createElement("span",null,"Discard the answer")))),/* @__PURE__ */e.createElement("div",{className:z("grid transition-[grid-template-rows] duration-300 ease-in-out",u?"grid-rows-[1fr]":"grid-rows-[0fr]")},O?/* @__PURE__ */e.createElement("div",{className:z("overflow-hidden min-h-0 px-4 bg-dark-200 space-y-4",u?"py-4 mb-4":"py-0"),"data-name":"discard-dialog-reason"},
5
5
  /* @__PURE__ */e.createElement("div",{className:"space-y-1"},/* @__PURE__ */e.createElement(k,{htmlFor:"reason",className:"text-sm"},"Reason"),/* @__PURE__ */e.createElement("span",{className:"text-sm block"},n?.reason&&ce[n.reason])),
6
6
  /* @__PURE__ */e.createElement("div",{className:"space-y-1"},/* @__PURE__ */e.createElement(k,{htmlFor:"preferredAnswer",className:"text-sm"},"Preferred answer"),/* @__PURE__ */e.createElement("span",{className:"text-sm block"},n?.suggestedAnswer))):/* @__PURE__ */e.createElement("form",{ref:D,onSubmit:I(async e=>{try{await l(e),S(!0),F(!1)}catch(t){console.error("Failed to discard:",t)}}),className:z("overflow-hidden min-h-0 px-4 bg-dark-200 transition-all duration-300 ease-in-out",u?"py-4 mb-4":"py-0")},
7
7
  /* @__PURE__ */e.createElement("fieldset",{className:"space-y-4","data-name":"discard-dialog-reason"},/* @__PURE__ */e.createElement("div",{className:"space-y-1"},/* @__PURE__ */e.createElement(k,{htmlFor:"reason",className:"heading-xs"},"Reason"),/* @__PURE__ */e.createElement(v,{control:R,name:"reason",rules:{required:!0},render:({field:t})=>/* @__PURE__ */e.createElement(N,{value:t.value,onValueChange:t.onChange,open:f,onOpenChange:F,required:!0},
8
8
  /* @__PURE__ */e.createElement(x,{className:"border-dark-300 bg-surface"},/* @__PURE__ */e.createElement(b,{placeholder:"Select a reason"})),
9
- /* @__PURE__ */e.createElement(w,null,Object.values(le).map(t=>/* @__PURE__ */e.createElement(y,{key:t,value:t},ce[t]))))}),/* @__PURE__ */e.createElement("span",{className:"text-xs text-subtle ml-1 hidden"},"Give your ambient agent a descriptive name that reflects its purpose. This agent will learn from your content to provide personalized assistance.")),/* @__PURE__ */e.createElement("div",{className:"space-y-1"},/* @__PURE__ */e.createElement(k,{htmlFor:"preferredAnswer",className:"heading-xs"},"Preferred answer"),/* @__PURE__ */e.createElement(C,{id:"preferredAnswer",required:!0,minLength:10,placeholder:"Explain what you'd like Brainfish to do next time in this case....",rows:4,className:"h-52 resize-none bg-surface",...M("preferredAnswer")}),/* @__PURE__ */e.createElement("span",{className:"text-xs text-subtle ml-1 hidden"},"Tell Brainfish why this is the incorrect answer.")),/* @__PURE__ */e.createElement("div",{className:"flex gap-2 !mb-1 justify-end mr-1"},/* @__PURE__ */e.createElement(E,{variant:"link",size:"sm",type:"button",onClick:()=>{p(!1),F(!1),q()}},"Cancel"),/* @__PURE__ */e.createElement(E,{type:"submit",variant:"default",elevation:"shadow",size:"sm",disabled:P},P?"Submitting...":"Submit"))))))}function me({id:a,discarded:r,discardedMeta:n,open:l,onOpenChange:c,...i}){const{onDiscard:o,onApprove:d}=Ae(),[u,p]=t(!1),f=s({isOpen:!1,close:()=>{}}),g=l??u,E=c??p;/* @__PURE__ */
9
+ /* @__PURE__ */e.createElement(w,null,Object.values(le).map(t=>/* @__PURE__ */e.createElement(y,{key:t,value:t},ce[t]))))}),/* @__PURE__ */e.createElement("span",{className:"text-xs text-subtle ml-1 hidden"},"Give your ambient agent a descriptive name that reflects its purpose. This agent will learn from your content to provide personalized assistance.")),/* @__PURE__ */e.createElement("div",{className:"space-y-1"},/* @__PURE__ */e.createElement(k,{htmlFor:"preferredAnswer",className:"heading-xs"},"Preferred answer"),/* @__PURE__ */e.createElement(j,{id:"preferredAnswer",required:!0,minLength:10,placeholder:"Explain what you'd like Brainfish to do next time in this case....",rows:4,className:"h-52 resize-none bg-surface",...M("preferredAnswer")}),/* @__PURE__ */e.createElement("span",{className:"text-xs text-subtle ml-1 hidden"},"Tell Brainfish why this is the incorrect answer.")),/* @__PURE__ */e.createElement("div",{className:"flex gap-2 !mb-1 justify-end mr-1"},/* @__PURE__ */e.createElement(E,{variant:"link",size:"sm",type:"button",onClick:()=>{p(!1),F(!1),q()}},"Cancel"),/* @__PURE__ */e.createElement(E,{type:"submit",variant:"default",elevation:"shadow",size:"sm",disabled:P},P?"Submitting...":"Submit"))))))}function me({id:a,discarded:r,discardedMeta:n,open:l,onOpenChange:c,...i}){const{onDiscard:o,onApprove:d}=Ae(),[u,p]=t(!1),f=s({isOpen:!1,close:()=>{}}),g=l??u,E=c??p;/* @__PURE__ */
10
10
  return e.createElement(D,{modal:!1,open:g,onOpenChange:E,...i},/* @__PURE__ */e.createElement(F,{asChild:!0,onClick:e=>e.stopPropagation(),onKeyUp:e=>e.stopPropagation()},/* @__PURE__ */e.createElement(O,{variant:"shadowSurface",size:"sm","aria-label":"Inspect answer information"},/* @__PURE__ */e.createElement(m,{className:"text-dark-600"})," Inspect")),/* @__PURE__ */e.createElement(R,{className:"space-y-4 px-0",onEscapeKeyDown:e=>{f.current.isOpen&&(e.preventDefault(),f.current.close())},onInteractOutside:e=>{f.current.isOpen&&e.preventDefault()}},
11
11
  /* @__PURE__ */e.createElement(M,{className:"px-4"},/* @__PURE__ */e.createElement(I,{className:"heading-sm m-0"},"Answer information"),/* @__PURE__ */e.createElement(q,{className:"sr-only"},"Shows answer diagnostics and allows you to provide feedback.")),
12
12
  /* @__PURE__ */e.createElement(S,{className:"h-[calc(100vh-4rem)] pb-4"},/* @__PURE__ */e.createElement(ie,{discarded:r,discardedMeta:n,onSubmit:async e=>{await o(a,e.reason,e.preferredAnswer).then(()=>E(!1))},onApprove:async()=>{await d(a)},selectOpenRef:f}),/* @__PURE__ */e.createElement(ne,{messageId:a}))))}const oe=({score:t})=>{const a=`${t}%`;return!t||t>100?/* @__PURE__ */e.createElement(P,{variant:"disabled"},"N/A"):t>=80?/* @__PURE__ */e.createElement(P,{variant:"success"},a):t>=40&&t<80?/* @__PURE__ */e.createElement(P,{variant:"warning"},a):/* @__PURE__ */e.createElement(P,{variant:"disabled"},"N/A")},de=/(```[\s\S]*?```|`[^`\n]+`|<(?:[a-zA-Z][a-zA-Z0-9+.-]*:|www\.)[^\s>]+>)/g,ue=/^<(?:[a-zA-Z][a-zA-Z0-9+.-]*:|www\.)[^\s>]+>$/;function pe(e){return e.split(de).map(e=>function(e){return e.startsWith("```")||e.startsWith("`")&&e.endsWith("`")||ue.test(e)}(e)?e:e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")).join("")}var fe=/* @__PURE__ */(e=>(e.ACTION="action",e.FEEDBACK="feedback",e.QUESTION="question",e.ANSWER="answer",e))(fe||{}),ge=/* @__PURE__ */(e=>(e.Positive="positive",e.Negative="negative",e))(ge||{});const Ee=e=>"answer"===e.type,he=e=>"question"===e.type,ve=e=>"feedback"===e.type,Ne=e=>"action"===e.type;function xe({attachments:t}){/* @__PURE__ */
13
13
  return e.createElement("div",{className:"flex gap-2 flex-wrap"},t.filter(e=>"image"===e.type).map((t,a)=>/* @__PURE__ */e.createElement("div",{key:a,className:"relative bg-dark-300 p-1 rounded shrink-0"},/* @__PURE__ */e.createElement("a",{href:t.url,target:"_blank",rel:"noopener noreferrer"},/* @__PURE__ */e.createElement("img",{src:t.url,alt:"",className:"size-14 object-cover rounded"})),/* @__PURE__ */e.createElement("div",{className:"absolute top-1.5 right-1.5 bg-dark-300 rounded-full p-0.5"},/* @__PURE__ */e.createElement(d,{size:8})))))}function be(t){const{id:a,content:s,timestamp:c,locale:i,isFeedbackDialogOpen:m,onFeedbackDialogChange:d}=t,u=r(()=>pe(s),[s]),{locale:p}=Ae(),g=$(c,i||p);if(Ee(t)){const{relatedArticles:s,discarded:r,discardedMeta:n,confidenceScore:c}=t;/* @__PURE__ */
14
14
  return e.createElement("li",{className:"relative before-line after-line list-none [&_a]:break-all"},/* @__PURE__ */e.createElement(W,{className:"message-item"},/* @__PURE__ */e.createElement(B,{className:"justify-start gap-0"},/* @__PURE__ */e.createElement(T,{variant:"gradient",className:"relative -left-[6px]"}),/* @__PURE__ */e.createElement(L,{className:"text-xs font-bold"},"Generated answer "+(r?"(Discarded)":""))),/* @__PURE__ */e.createElement(U,{className:z("message-ai-content",{"py-6":!s?.length,"pt-6 pb-0":s?.length})},
15
- /* @__PURE__ */e.createElement("div",{className:"message-content-wrapper"},/* @__PURE__ */e.createElement(f,{message:{content:u}}),/* @__PURE__ */e.createElement("div",{className:"flex gap-2 justify-between mt-2 items-center"},/* @__PURE__ */e.createElement("span",{className:"message-timestamp"},g),/* @__PURE__ */e.createElement("div",{className:"flex items-center gap-2"},c&&/* @__PURE__ */e.createElement(j,null,/* @__PURE__ */e.createElement(A,{asChild:!0},/* @__PURE__ */e.createElement(O,{variant:"outline",size:"sm",className:"text-xs p-1 h-auto"},c)),/* @__PURE__ */e.createElement(_,null,/* @__PURE__ */e.createElement("p",null,"Answer score: ",c))),/* @__PURE__ */e.createElement(me,{id:a,discarded:r,discardedMeta:n,open:m,onOpenChange:d})))),!!s?.length&&/* @__PURE__ */e.createElement(K,{type:"single",collapsible:!0,className:"p-0 custom-dashed-border-t-dark-300 w-full"},/* @__PURE__ */e.createElement(H,{value:"related-articles"},/* @__PURE__ */e.createElement(Z,{className:"px-6"},"Related articles"),/* @__PURE__ */e.createElement(V,null,/* @__PURE__ */e.createElement("ul",{className:"message-article-list"},s.map(t=>/* @__PURE__ */e.createElement("li",{key:t.id,className:"grid gap-2 grid-cols-[auto_1fr] items-center justify-items-start"},
15
+ /* @__PURE__ */e.createElement("div",{className:"message-content-wrapper"},/* @__PURE__ */e.createElement(f,{message:{content:u}}),/* @__PURE__ */e.createElement("div",{className:"flex gap-2 justify-between mt-2 items-center"},/* @__PURE__ */e.createElement("span",{className:"message-timestamp"},g),/* @__PURE__ */e.createElement("div",{className:"flex items-center gap-2"},c&&/* @__PURE__ */e.createElement(C,null,/* @__PURE__ */e.createElement(A,{asChild:!0},/* @__PURE__ */e.createElement(O,{variant:"outline",size:"sm",className:"text-xs p-1 h-auto"},c)),/* @__PURE__ */e.createElement(_,null,/* @__PURE__ */e.createElement("p",null,"Answer score: ",c))),/* @__PURE__ */e.createElement(me,{id:a,discarded:r,discardedMeta:n,open:m,onOpenChange:d})))),!!s?.length&&/* @__PURE__ */e.createElement(K,{type:"single",collapsible:!0,className:"p-0 custom-dashed-border-t-dark-300 w-full"},/* @__PURE__ */e.createElement(H,{value:"related-articles"},/* @__PURE__ */e.createElement(Z,{className:"px-6"},"Related articles"),/* @__PURE__ */e.createElement(V,null,/* @__PURE__ */e.createElement("ul",{className:"message-article-list"},s.map(t=>/* @__PURE__ */e.createElement("li",{key:t.id,className:"grid gap-2 grid-cols-[auto_1fr] items-center justify-items-start"},
16
16
  /* @__PURE__ */e.createElement(oe,{score:Math.round(100*t.score)}),
17
17
  /* @__PURE__ */e.createElement(E,{variant:"link",size:"xs",asChild:!0,className:"flex items-center gap-2 min-w-0 !justify-start w-full"},
18
18
  /* @__PURE__ */e.createElement("a",{href:t.url,target:"_blank",rel:"noopener noreferrer"},/* @__PURE__ */e.createElement("span",{className:"truncate"},t.title),/* @__PURE__ */e.createElement(l,{className:"size-4 flex-shrink-0",weight:"regular"}))))))))))))}const h=ve(t)?t.feedback:null;/* @__PURE__ */
19
- return e.createElement("li",{className:"relative list-none before-line--user after-line--user"},/* @__PURE__ */e.createElement(W,{className:"message-item"},/* @__PURE__ */e.createElement(B,{className:"basis-0"},/* @__PURE__ */e.createElement(o,{weight:"fill",size:24})),/* @__PURE__ */e.createElement(U,{className:"message-user-content"},he(t)&&/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-2"},t.attachments&&t.attachments.some(e=>"image"===e.type)&&/* @__PURE__ */e.createElement(xe,{attachments:t.attachments}),!t.onlyShowAttachments&&/* @__PURE__ */e.createElement(f,{message:{content:u}}),/* @__PURE__ */e.createElement("span",{className:"message-timestamp"},g)),ve(t)&&h&&/* @__PURE__ */e.createElement(e.Fragment,null,/* @__PURE__ */e.createElement("div",{className:"message-header"},/* @__PURE__ */e.createElement("div",{className:"message-feedback-text"},"positive"===h?"Upvoted as helpful":"Downvoted as not helpful"),/* @__PURE__ */e.createElement("div",{className:"message-meta"},/* @__PURE__ */e.createElement(n,{variant:"positive"===h?"success":"destructive"},"positive"===h?"Answered":"Unable to help"))),s&&/* @__PURE__ */e.createElement("div",{className:"text-base mb-1"},s),/* @__PURE__ */e.createElement("span",{className:"message-timestamp-simple"},g)),Ne(t)&&/* @__PURE__ */e.createElement("div",{className:"message-header"},/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-2"},/* @__PURE__ */e.createElement("span",{className:"text-subtle text-sm italic"},s),/* @__PURE__ */e.createElement("span",{className:"message-timestamp-simple"},g)),/* @__PURE__ */e.createElement("div",{className:"message-meta"},/* @__PURE__ */e.createElement(n,{variant:"warning"},"Action"))))))}function we({conversationId:s,open:r,onOpenChange:n,...l}){const[c,i]=t(),[m,o]=t(),{fetchAttributes:d}=Ae();return a(()=>{d(s).then(e=>{i(e),o(function(e){const t=["id","name","email","phone"];if(0===e.length)return[];const a=e=>{const a=t.indexOf(e);return-1===a?1/0:a};return Object.keys(e[0]).sort((e,t)=>a(e)-a(t))}(e))}).catch(()=>{})},[d,s]),c?.length?/* @__PURE__ */e.createElement(D,{modal:!1,open:r,onOpenChange:n,...l},/* @__PURE__ */e.createElement(j,null,/* @__PURE__ */e.createElement(A,{asChild:!0},/* @__PURE__ */e.createElement(F,{asChild:!0,onClick:e=>e.stopPropagation(),onKeyUp:e=>e.stopPropagation()},/* @__PURE__ */e.createElement(O,{variant:"ghost",size:"icon",className:"size-7 [&_svg]:size-6 text-dark-900","aria-label":"Open Custom attributes dialog"},
20
- /* @__PURE__ */e.createElement(u,{size:24})))),/* @__PURE__ */e.createElement(_,null,"Customer attributes")),/* @__PURE__ */e.createElement(R,{className:"space-y-4"},/* @__PURE__ */e.createElement(M,null,/* @__PURE__ */e.createElement(I,{className:"heading-sm m-0"},"Custom attributes"),/* @__PURE__ */e.createElement(q,{className:"sr-only"},"Custom attributes are used to store additional information about the conversation.")),m&&/* @__PURE__ */e.createElement(S,{className:"h-[calc(100vh-8rem)]"}," ",/* @__PURE__ */e.createElement(X,{className:"bg-surface","data-test-id":"attributes-table"},/* @__PURE__ */e.createElement(Y,null,/* @__PURE__ */e.createElement(ee,null,m.map(t=>/* @__PURE__ */e.createElement(te,{key:t,className:"capitalize font-bold"},t)))),/* @__PURE__ */e.createElement(ae,null,c.map(t=>/* @__PURE__ */e.createElement(ee,{key:t?.id??Q(),className:"border-none"},m.map(a=>/* @__PURE__ */e.createElement(se,{key:a,"data-title":a},"boolean"==typeof t[a]?String(t[a]):t[a]))))))))):null}const ye=e.forwardRef(({className:t,streamName:a,dotColor:s="transparent",...r},n)=>/* @__PURE__ */e.createElement(j,null,/* @__PURE__ */e.createElement(A,{asChild:!0},/* @__PURE__ */e.createElement("div",{ref:n,role:"button",className:z("flex items-center gap-1 rounded-full p-0",t),tabIndex:0},
21
- /* @__PURE__ */e.createElement(P,{...r,className:"bg-surface rounded-full border border-dark-300 text-subtle"},/* @__PURE__ */e.createElement("span",{className:"flex items-center gap-1"},/* @__PURE__ */e.createElement(p,{size:8,weight:"bold",className:"!size-2 rounded-full",style:{backgroundColor:s},color:"transparent"===s?re[300]:"transparent"}),/* @__PURE__ */e.createElement("span",{className:"max-w-32 truncate inline-block"},a))))),/* @__PURE__ */e.createElement(_,null,a)));ye.displayName="StreamBadge";const ke=({score:t,status:a,statusMessage:s})=>t?/* @__PURE__ */e.createElement(j,null,/* @__PURE__ */e.createElement(A,{asChild:!0},/* @__PURE__ */e.createElement(O,{variant:"ghost",size:"sm",className:"p-0 h-[26px]"},/* @__PURE__ */e.createElement(n,{variant:a,suffix:t},s))),/* @__PURE__ */e.createElement(_,null,/* @__PURE__ */e.createElement("p",null,"Conversation score: ",t))):/* @__PURE__ */e.createElement(n,{variant:a,suffix:t},s);function Ce({locale:a,value:s,question:r,timestamp:n,location:l,source:c,status:i,statusMessage:m,hasAttributes:o,onClick:d,className:u,score:p,...f}){const{getMessages:g,isLoading:E,locale:h}=Ae(),[v,N]=t(null),[x,b]=t(null),w=(e,t)=>a=>{a?(N(e),t&&b(t)):(N(null),b(null))},y=null!==v,k=a||h,C=g(s),j=E(s),A=[J(n,k),l].filter(Boolean).join(" • ");/* @__PURE__ */
19
+ return e.createElement("li",{className:"relative list-none before-line--user after-line--user"},/* @__PURE__ */e.createElement(W,{className:"message-item"},/* @__PURE__ */e.createElement(B,{className:"basis-0"},/* @__PURE__ */e.createElement(o,{weight:"fill",size:24})),/* @__PURE__ */e.createElement(U,{className:"message-user-content"},he(t)&&/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-2"},t.attachments&&t.attachments.some(e=>"image"===e.type)&&/* @__PURE__ */e.createElement(xe,{attachments:t.attachments}),!t.onlyShowAttachments&&/* @__PURE__ */e.createElement(f,{message:{content:u}}),/* @__PURE__ */e.createElement("span",{className:"message-timestamp"},g)),ve(t)&&h&&/* @__PURE__ */e.createElement(e.Fragment,null,/* @__PURE__ */e.createElement("div",{className:"message-header"},/* @__PURE__ */e.createElement("div",{className:"message-feedback-text"},"positive"===h?"Upvoted as helpful":"Downvoted as not helpful"),/* @__PURE__ */e.createElement("div",{className:"message-meta"},/* @__PURE__ */e.createElement(n,{variant:"positive"===h?"success":"destructive"},"positive"===h?"Answered":"Unable to help"))),s&&/* @__PURE__ */e.createElement("div",{className:"text-base mb-1"},s),/* @__PURE__ */e.createElement("span",{className:"message-timestamp-simple"},g)),Ne(t)&&/* @__PURE__ */e.createElement("div",{className:"message-header"},/* @__PURE__ */e.createElement("div",{className:"flex flex-col gap-2"},/* @__PURE__ */e.createElement("span",{className:"text-subtle text-sm italic"},s),/* @__PURE__ */e.createElement("span",{className:"message-timestamp-simple"},g)),/* @__PURE__ */e.createElement("div",{className:"message-meta"},/* @__PURE__ */e.createElement(n,{variant:"warning"},"Action"))))))}function we({conversationId:s,open:r,onOpenChange:n,...l}){const[c,i]=t(),[m,o]=t(),{fetchAttributes:d}=Ae();return a(()=>{d(s).then(e=>{i(e),o(function(e){const t=["id","name","email","phone"];if(0===e.length)return[];const a=e=>{const a=t.indexOf(e);return-1===a?1/0:a};return Object.keys(e[0]).sort((e,t)=>a(e)-a(t))}(e))}).catch(()=>{})},[d,s]),c?.length?/* @__PURE__ */e.createElement(D,{modal:!1,open:r,onOpenChange:n,...l},/* @__PURE__ */e.createElement(C,null,/* @__PURE__ */e.createElement(A,{asChild:!0},/* @__PURE__ */e.createElement(F,{asChild:!0,onClick:e=>e.stopPropagation(),onKeyUp:e=>e.stopPropagation()},/* @__PURE__ */e.createElement(O,{variant:"ghost",size:"icon",className:"size-7 [&_svg]:size-6 text-dark-900","aria-label":"Open Custom attributes dialog"},
20
+ /* @__PURE__ */e.createElement(u,{size:24})))),/* @__PURE__ */e.createElement(_,null,"Customer attributes")),/* @__PURE__ */e.createElement(R,{className:"space-y-4"},/* @__PURE__ */e.createElement(M,null,/* @__PURE__ */e.createElement(I,{className:"heading-sm m-0"},"Custom attributes"),/* @__PURE__ */e.createElement(q,{className:"sr-only"},"Custom attributes are used to store additional information about the conversation.")),m&&/* @__PURE__ */e.createElement(S,{className:"h-[calc(100vh-8rem)]"}," ",/* @__PURE__ */e.createElement(X,{className:"bg-surface","data-test-id":"attributes-table"},/* @__PURE__ */e.createElement(Y,null,/* @__PURE__ */e.createElement(ee,null,m.map(t=>/* @__PURE__ */e.createElement(te,{key:t,className:"capitalize font-bold"},t)))),/* @__PURE__ */e.createElement(ae,null,c.map(t=>/* @__PURE__ */e.createElement(ee,{key:t?.id??Q(),className:"border-none"},m.map(a=>/* @__PURE__ */e.createElement(se,{key:a,"data-title":a},"boolean"==typeof t[a]?String(t[a]):t[a]))))))))):null}const ye=e.forwardRef(({className:t,streamName:a,dotColor:s="transparent",...r},n)=>/* @__PURE__ */e.createElement(C,null,/* @__PURE__ */e.createElement(A,{asChild:!0},/* @__PURE__ */e.createElement("div",{ref:n,role:"button",className:z("flex items-center gap-1 rounded-full p-0",t),tabIndex:0},
21
+ /* @__PURE__ */e.createElement(P,{...r,className:"bg-surface rounded-full border border-dark-300 text-subtle"},/* @__PURE__ */e.createElement("span",{className:"flex items-center gap-1"},/* @__PURE__ */e.createElement(p,{size:8,weight:"bold",className:"!size-2 rounded-full",style:{backgroundColor:s},color:"transparent"===s?re[300]:"transparent"}),/* @__PURE__ */e.createElement("span",{className:"max-w-32 truncate inline-block"},a))))),/* @__PURE__ */e.createElement(_,null,a)));ye.displayName="StreamBadge";const ke=({score:t,status:a,statusMessage:s})=>t?/* @__PURE__ */e.createElement(C,null,/* @__PURE__ */e.createElement(A,{asChild:!0},/* @__PURE__ */e.createElement(O,{variant:"ghost",size:"sm",className:"p-0 h-[26px]"},/* @__PURE__ */e.createElement(n,{variant:a,suffix:t},s))),/* @__PURE__ */e.createElement(_,null,/* @__PURE__ */e.createElement("p",null,"Conversation score: ",t))):/* @__PURE__ */e.createElement(n,{variant:a,suffix:t},s);function je({locale:a,value:s,question:r,timestamp:n,location:l,source:c,status:i,statusMessage:m,hasAttributes:o,onClick:d,className:u,score:p,...f}){const{getMessages:g,isLoading:E,locale:h}=Ae(),[v,N]=t(null),[x,b]=t(null),w=(e,t)=>a=>{a?(N(e),t&&b(t)):(N(null),b(null))},y=null!==v,k=a||h,j=g(s),C=E(s),A=[J(n,k),l].filter(Boolean).join(" • ");/* @__PURE__ */
22
22
  return e.createElement(H,{value:s,className:z('border border-dark-200 hover:border-dark-300 rounded-lg bg-dark-100 [&[data-state="open"]]:bg-surface [&[data-state="open"]]:border-dark-100',{"shadow-md shadow-dark-300":y},u),...f},
23
23
  /* @__PURE__ */e.createElement(Z,{className:"flex-row-reverse px-4 gap-1 items-center [&[data-state=open]]:px-6",onClick:e=>{if(e.target.closest('[role="dialog"]'))return e.preventDefault(),void e.stopPropagation();d?.()}},
24
24
  /* @__PURE__ */e.createElement(W,{size:"sm",className:"flex-1 p-0 justify-between"},/* @__PURE__ */e.createElement(U,{className:"max-w-[400px]"},/* @__PURE__ */e.createElement(L,{className:"text-base text-default"},r),/* @__PURE__ */e.createElement(G,{className:"text-xs text-default flex items-center gap-1"},A,c&&/* @__PURE__ */e.createElement(ye,{streamName:c.name,dotColor:c.color}))),/* @__PURE__ */e.createElement("div",{className:"flex items-center gap-0"},o&&/* @__PURE__ */e.createElement(we,{conversationId:s,open:"attributes"===v,onOpenChange:w("attributes")}),i&&/* @__PURE__ */e.createElement(ke,{score:p,status:i,statusMessage:m})))),
25
- /* @__PURE__ */e.createElement(V,{className:"flex flex-col gap-4 text-balance px-5"},j?/* @__PURE__ */e.createElement("div",{className:"text-center text-subtle py-4"},"Loading messages..."):/* @__PURE__ */e.createElement("ul",{className:"list-none space-y-4"},C.map((t,a)=>{const s=he(t)?t:null,r=s?.attachments?.length?s.attachments:null;return 0===a?r?/* @__PURE__ */e.createElement(be,{key:t.id,...{...t,onlyShowAttachments:!0},isFeedbackDialogOpen:"feedback"===v&&x===t.id,onFeedbackDialogChange:w("feedback",t.id)}):null:/* @__PURE__ */e.createElement(be,{key:t.id,...t,isFeedbackDialogOpen:"feedback"===v&&x===t.id,onFeedbackDialogChange:w("feedback",t.id)})}))))}const je=e.createContext(void 0);function Ae(){const t=e.useContext(je);if(void 0===t)throw new Error("useConvosContext must be used within a ConvosProvider");return t}function _e({children:t,value:a}){/* @__PURE__ */
26
- return e.createElement(je.Provider,{value:a},t)}function ze({convos:t,fetchMessages:a,fetchAttributes:s,fetchAnswerDiagnostics:r,onDiscard:n,onApprove:l}){const[c,i]=e.useState({}),[m,o]=e.useState({}),d=e.useRef(/* @__PURE__ */new Set),u=e.useRef({}),p=e.useCallback(e=>{d.current.has(e)||u.current[e]||(u.current[e]=!0,o(t=>({...t,[e]:!0})),a(e).then(t=>{i(a=>({...a,[e]:t})),d.current.add(e)}).catch(()=>{}).finally(()=>{delete u.current[e],o(t=>{const a={...t};return delete a[e],a})}))},[a]),f=t[0]?.locale,g=e.useMemo(()=>({fetchMessages:a,fetchAttributes:s,getMessages:e=>c[e]||[],isLoading:e=>m[e]||!1,handleFetchMessages:p,locale:f,fetchAnswerDiagnostics:e=>r(e),onDiscard:n,onApprove:l}),[a,s,c,m,p,f,r,n,l]);/* @__PURE__ */
27
- return e.createElement(_e,{value:g},/* @__PURE__ */e.createElement(K,{type:"single",collapsible:!0,className:"w-full space-y-2"},t.map(t=>/* @__PURE__ */e.createElement(Ce,{...t,key:t.value,onClick:()=>p(t.value)}))))}const Oe=({children:t})=>/* @__PURE__ */e.createElement("div",{className:"flex flex-col items-center justify-center h-full w-full mt-40 gap-2"},/* @__PURE__ */e.createElement(T,{className:"size-8",variant:"disabled"}),/* @__PURE__ */e.createElement("div",{className:"text-subtlest text-sm w-96 text-center leading-5"},t));export{Ce as Convo,ze as Convos,_e as ConvosProvider,Oe as EmptyConvos,ge as Feedback,be as Message,xe as MessageAttachmentImageThumbnails,fe as MessageType,n as StatusBadge,Ee as isAIAnswer,Ne as isAction,ve as isFeedback,he as isUserQuestion,Ae as useConvosContext};
25
+ /* @__PURE__ */e.createElement(V,{className:"flex flex-col gap-4 text-balance px-5"},C?/* @__PURE__ */e.createElement("div",{className:"text-center text-subtle py-4"},"Loading messages..."):/* @__PURE__ */e.createElement("ul",{className:"list-none space-y-4"},j.map((t,a)=>{const s=he(t)?t:null,r=s?.attachments?.length?s.attachments:null;return 0===a?r?/* @__PURE__ */e.createElement(be,{key:t.id,...{...t,onlyShowAttachments:!0},isFeedbackDialogOpen:"feedback"===v&&x===t.id,onFeedbackDialogChange:w("feedback",t.id)}):null:/* @__PURE__ */e.createElement(be,{key:t.id,...t,isFeedbackDialogOpen:"feedback"===v&&x===t.id,onFeedbackDialogChange:w("feedback",t.id)})}))))}const Ce=e.createContext(void 0);function Ae(){const t=e.useContext(Ce);if(void 0===t)throw new Error("useConvosContext must be used within a ConvosProvider");return t}function _e({children:t,value:a}){/* @__PURE__ */
26
+ return e.createElement(Ce.Provider,{value:a},t)}function ze({convos:t,fetchMessages:a,fetchAttributes:s,fetchAnswerDiagnostics:r,onDiscard:n,onApprove:l}){const[c,i]=e.useState({}),[m,o]=e.useState({}),d=e.useRef(/* @__PURE__ */new Set),u=e.useRef({}),p=e.useCallback(e=>{d.current.has(e)||u.current[e]||(u.current[e]=!0,o(t=>({...t,[e]:!0})),a(e).then(t=>{i(a=>({...a,[e]:t})),d.current.add(e)}).catch(()=>{}).finally(()=>{delete u.current[e],o(t=>{const a={...t};return delete a[e],a})}))},[a]),f=t[0]?.locale,g=e.useMemo(()=>({fetchMessages:a,fetchAttributes:s,getMessages:e=>c[e]||[],isLoading:e=>m[e]||!1,handleFetchMessages:p,locale:f,fetchAnswerDiagnostics:e=>r(e),onDiscard:n,onApprove:l}),[a,s,c,m,p,f,r,n,l]);/* @__PURE__ */
27
+ return e.createElement(_e,{value:g},/* @__PURE__ */e.createElement(K,{type:"single",collapsible:!0,className:"w-full space-y-2"},t.map(t=>/* @__PURE__ */e.createElement(je,{...t,key:t.value,onClick:()=>p(t.value)}))))}const Oe=({children:t})=>/* @__PURE__ */e.createElement("div",{className:"flex flex-col items-center justify-center h-full w-full mt-40 gap-2"},/* @__PURE__ */e.createElement(T,{className:"size-8",variant:"disabled"}),/* @__PURE__ */e.createElement("div",{className:"text-subtlest text-sm w-96 text-center leading-5"},t));export{je as Convo,ze as Convos,_e as ConvosProvider,Oe as EmptyConvos,ge as Feedback,be as Message,xe as MessageAttachmentImageThumbnails,fe as MessageType,n as StatusBadge,Ee as isAIAnswer,Ne as isAction,ve as isFeedback,he as isUserQuestion,Ae as useConvosContext};
28
28
  //# sourceMappingURL=convos.js.map
@@ -1,2 +1,2 @@
1
- export{D as DatePicker}from"../chunks/date-picker.C2VT_rZ9.js";
1
+ export{D as DatePicker}from"../chunks/date-picker.D9CRxYJf.js";
2
2
  //# sourceMappingURL=date-picker.js.map
@@ -1,2 +1,2 @@
1
- export{F as Feedback}from"../chunks/feedback.CLMuSvsg.js";
1
+ export{F as Feedback}from"../chunks/feedback.CGFAP0XS.js";
2
2
  //# sourceMappingURL=feedback.js.map
@@ -1,2 +1,2 @@
1
- export{F as FileUpload,a as FileUploadStatus,f as formatFileSize}from"../chunks/file-upload-status.D8RhMcbO.js";
1
+ export{F as FileUpload,a as FileUploadStatus,f as formatFileSize}from"../chunks/file-upload-status.ClQeoQQB.js";
2
2
  //# sourceMappingURL=file-upload.js.map
@@ -1,2 +1,2 @@
1
- export{F as Filter,a as Filters,O as Operator}from"../chunks/filters.BHp3ukNW.js";
1
+ export{F as Filter,a as Filters,O as Operator}from"../chunks/filters.BRlRsGlZ.js";
2
2
  //# sourceMappingURL=filter.js.map
@@ -1,2 +1,2 @@
1
- export{F as FontPicker,a as FontPickerItem,c as clearFontCache,g as getCachedFonts,l as loadFont,s as setCachedFonts,u as useFontOptions}from"../chunks/font-picker.B9GPXyK4.js";
1
+ export{F as FontPicker,a as FontPickerItem,c as clearFontCache,g as getCachedFonts,l as loadFont,s as setCachedFonts,u as useFontOptions}from"../chunks/font-picker.Dwwe5av-.js";
2
2
  //# sourceMappingURL=font-picker.js.map
@@ -1,2 +1,2 @@
1
- export{I as InputWithTags}from"../chunks/input-with-tags.DLv9e0XI.js";
1
+ export{I as InputWithTags}from"../chunks/input-with-tags.pmOKv67d.js";
2
2
  //# sourceMappingURL=input-with-tags.js.map
@@ -1,2 +1,2 @@
1
- export{C as CodeBlock,F as FormattedMessage,M as MemoizedReactMarkdown,Z as ZoomableImage}from"../chunks/FormattedMessage.D_knqVl-.js";export{MermaidDiagram}from"../chunks/MermaidDiagram.PRgXQ5Yh.js";
1
+ export{C as CodeBlock,F as FormattedMessage,M as MemoizedReactMarkdown,Z as ZoomableImage}from"../chunks/FormattedMessage.Djy5cn5F.js";export{MermaidDiagram}from"../chunks/MermaidDiagram.PRgXQ5Yh.js";
2
2
  //# sourceMappingURL=markdown.js.map
@@ -1,2 +1,2 @@
1
- export{T as TwoLevelCombobox}from"../chunks/two-level-combobox.BVZfsNSN.js";
1
+ export{T as TwoLevelCombobox}from"../chunks/two-level-combobox.SDv7qc_m.js";
2
2
  //# sourceMappingURL=two-level-combobox.js.map
@@ -1,4 +1,4 @@
1
- import*as e from"react";import*as a from"@radix-ui/react-alert-dialog";import{c as t}from"../../chunks/utils.C6Qu-kwd.js";import{b as s}from"../../chunks/button.D_2SonNs.js";const l=e.createContext({}),o=e.forwardRef(({onOpenChange:t,...s},o)=>{const n=e.useCallback(()=>{t?.(!1)},[t]);/* @__PURE__ */
1
+ import*as e from"react";import*as a from"@radix-ui/react-alert-dialog";import{c as t}from"../../chunks/utils.C6Qu-kwd.js";import{b as s}from"../../chunks/button.Cs1X8upM.js";const l=e.createContext({}),o=e.forwardRef(({onOpenChange:t,...s},o)=>{const n=e.useCallback(()=>{t?.(!1)},[t]);/* @__PURE__ */
2
2
  return e.createElement(l.Provider,{value:{onClose:n}},/* @__PURE__ */e.createElement(a.Root,{onOpenChange:t,...s}))});o.displayName=a.Root.displayName;const n=a.Trigger,r=a.Portal,d=e.forwardRef(({className:s,zIndex:l,...o},n)=>/* @__PURE__ */e.createElement(a.Overlay,{className:t("fixed inset-0 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",l||"z-50",s),...o,ref:n}));d.displayName=a.Overlay.displayName;const c=e.forwardRef(({className:s,zIndex:l,...o},n)=>/* @__PURE__ */e.createElement(r,null,/* @__PURE__ */e.createElement(d,{zIndex:l}),/* @__PURE__ */e.createElement(a.Content,{ref:n,className:t("fixed left-[50%] top-[50%] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] border border-border bg-background p-0 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-md",l||"z-50",s),...o})));c.displayName=a.Content.displayName;const i=({className:a,...s})=>/* @__PURE__ */e.createElement("div",{className:t("flex flex-col text-center sm:text-left",a),...s});i.displayName="AlertDialogHeader";const m=({className:a,...s})=>/* @__PURE__ */e.createElement("div",{className:t("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 pb-4 px-4",a),...s});m.displayName="AlertDialogFooter";const f=e.forwardRef(({className:s,...l},o)=>/* @__PURE__ */e.createElement(a.Title,{ref:o,className:t("text-lg font-medium px-4 my-0 h-12 flex items-center",s),...l}));f.displayName=a.Title.displayName;const p=e.forwardRef(({className:s,...l},o)=>/* @__PURE__ */e.createElement(a.Description,{ref:o,className:t("text-sm px-4 py-3 my-0",s),...l}));p.displayName=a.Description.displayName;const N=e.forwardRef(({className:o,variant:n,asChild:r,onClick:d,...c},i)=>{const{onClose:m}=e.useContext(l),f=e.useCallback(async e=>{if(!d)return;const a=d(e);if(null!=(t=a)&&"object"==typeof t&&"then"in t){e.preventDefault();try{await a,m?.()}catch(s){console.error("AlertDialogAction onClick failed:",s)}}var t},[d,m]);/* @__PURE__ */
3
3
  return e.createElement(a.Action,{ref:i,className:t(s({variant:n}),o),onClick:f,...c})});N.displayName=a.Action.displayName;const u=e.forwardRef(({className:l,variant:o,...n},r)=>/* @__PURE__ */e.createElement(a.Cancel,{ref:r,className:t(s({variant:o||"link"}),"mt-2 sm:mt-0 text-foreground",l),...n}));u.displayName=a.Cancel.displayName;export{o as AlertDialog,N as AlertDialogAction,u as AlertDialogCancel,c as AlertDialogContent,p as AlertDialogDescription,m as AlertDialogFooter,i as AlertDialogHeader,d as AlertDialogOverlay,r as AlertDialogPortal,f as AlertDialogTitle,n as AlertDialogTrigger};
4
4
  //# sourceMappingURL=alert-dialog.js.map
@@ -1,4 +1,4 @@
1
- import*as e from"react";import{S as a}from"../../chunks/index.uF4ME3WQ.js";import{MoreHorizontal as r,ChevronRight as s}from"lucide-react";import{c as t}from"../../chunks/utils.C6Qu-kwd.js";const l=e.forwardRef(({...a},r)=>/* @__PURE__ */e.createElement("nav",{ref:r,"aria-label":"breadcrumb",...a}));l.displayName="Breadcrumb";const m=e.forwardRef(({className:a,...r},s)=>/* @__PURE__ */e.createElement("ol",{ref:s,className:t("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5 list-none",a),...r}));m.displayName="BreadcrumbList";const c=e.forwardRef(({className:a,...r},s)=>/* @__PURE__ */e.createElement("li",{ref:s,className:t("inline-flex items-center gap-1.5",a),...r}));c.displayName="BreadcrumbItem";const n=e.forwardRef(({asChild:r,className:s,...l},m)=>{const c=r?a:"a";/* @__PURE__ */
1
+ import*as e from"react";import{S as a}from"../../chunks/index.Ca2JkOFO.js";import{MoreHorizontal as r,ChevronRight as s}from"lucide-react";import{c as t}from"../../chunks/utils.C6Qu-kwd.js";const l=e.forwardRef(({...a},r)=>/* @__PURE__ */e.createElement("nav",{ref:r,"aria-label":"breadcrumb",...a}));l.displayName="Breadcrumb";const m=e.forwardRef(({className:a,...r},s)=>/* @__PURE__ */e.createElement("ol",{ref:s,className:t("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5 list-none",a),...r}));m.displayName="BreadcrumbList";const c=e.forwardRef(({className:a,...r},s)=>/* @__PURE__ */e.createElement("li",{ref:s,className:t("inline-flex items-center gap-1.5",a),...r}));c.displayName="BreadcrumbItem";const n=e.forwardRef(({asChild:r,className:s,...l},m)=>{const c=r?a:"a";/* @__PURE__ */
2
2
  return e.createElement(c,{ref:m,className:t("transition-colors hover:text-foreground",s),...l})});n.displayName="BreadcrumbLink";const o=e.forwardRef(({className:a,...r},s)=>/* @__PURE__ */e.createElement("span",{ref:s,role:"link","aria-disabled":"true","aria-current":"page",className:t("font-normal text-foreground",a),...r}));o.displayName="BreadcrumbPage";const i=({children:a,className:r,...l})=>/* @__PURE__ */e.createElement("li",{role:"presentation","aria-hidden":"true",className:t("[&>svg]:w-3.5 [&>svg]:h-3.5",r),...l},a??/* @__PURE__ */e.createElement(s,null));i.displayName="BreadcrumbSeparator";const d=({className:a,...s})=>/* @__PURE__ */e.createElement("span",{role:"presentation","aria-hidden":"true",className:t("flex h-9 w-9 items-center justify-center",a),...s},
3
3
  /* @__PURE__ */e.createElement(r,{className:"h-4 w-4"}),
4
4
  /* @__PURE__ */e.createElement("span",{className:"sr-only"},"More"));d.displayName="BreadcrumbElipssis";export{l as Breadcrumb,d as BreadcrumbEllipsis,c as BreadcrumbItem,n as BreadcrumbLink,m as BreadcrumbList,o as BreadcrumbPage,i as BreadcrumbSeparator};
@@ -1,4 +1,4 @@
1
- import t from"react";import{S as e}from"../../chunks/index.uF4ME3WQ.js";import{cva as o}from"class-variance-authority";import{c as r}from"../../chunks/utils.C6Qu-kwd.js";import{Separator as a}from"./separator.js";const n=o("flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",{variants:{orientation:{horizontal:"",vertical:"flex-col"},rounded:{true:"",false:""}},compoundVariants:[{orientation:"horizontal",rounded:!0,className:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none"},{orientation:"vertical",rounded:!0,className:"[&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"}],defaultVariants:{orientation:"horizontal",rounded:!0}});function i({className:e,orientation:o,rounded:a,...i}){/* @__PURE__ */
1
+ import t from"react";import{S as e}from"../../chunks/index.Ca2JkOFO.js";import{cva as o}from"class-variance-authority";import{c as r}from"../../chunks/utils.C6Qu-kwd.js";import{Separator as a}from"./separator.js";const n=o("flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",{variants:{orientation:{horizontal:"",vertical:"flex-col"},rounded:{true:"",false:""}},compoundVariants:[{orientation:"horizontal",rounded:!0,className:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none"},{orientation:"vertical",rounded:!0,className:"[&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"}],defaultVariants:{orientation:"horizontal",rounded:!0}});function i({className:e,orientation:o,rounded:a,...i}){/* @__PURE__ */
2
2
  return t.createElement("div",{role:"group","data-slot":"button-group","data-orientation":o,className:r(n({orientation:o,rounded:a}),e),...i})}function s({className:o,asChild:a=!1,...n}){const i=a?e:"div";/* @__PURE__ */
3
3
  return t.createElement(i,{className:r("bg-muted shadow-xs flex items-center gap-2 rounded-md border px-4 text-sm font-medium [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",o),...n})}function l({className:e,orientation:o="vertical",...n}){/* @__PURE__ */
4
4
  return t.createElement(a,{"data-slot":"button-group-separator",orientation:o,className:r("bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",e),...n})}export{i as ButtonGroup,l as ButtonGroupSeparator,s as ButtonGroupText,n as buttonGroupVariants};
@@ -1,2 +1,2 @@
1
- import"react";import"../../chunks/index.uF4ME3WQ.js";import"class-variance-authority";import"../../chunks/utils.C6Qu-kwd.js";export{B as Button,b as buttonVariants}from"../../chunks/button.D_2SonNs.js";
1
+ import"react";import"../../chunks/index.Ca2JkOFO.js";import"class-variance-authority";import"../../chunks/utils.C6Qu-kwd.js";export{B as Button,b as buttonVariants}from"../../chunks/button.Cs1X8upM.js";
2
2
  //# sourceMappingURL=button.js.map
@@ -1,2 +1,2 @@
1
- export{C as Combobox}from"../../chunks/combobox.MyoPH18G.js";
1
+ export{C as Combobox}from"../../chunks/combobox.CLT9CXUV.js";
2
2
  //# sourceMappingURL=combobox.js.map
@@ -1,3 +1,3 @@
1
- import*as e from"react";import{S as r}from"../../chunks/index.uF4ME3WQ.js";import{cva as o}from"class-variance-authority";import{c as a}from"../../chunks/utils.C6Qu-kwd.js";const t=o("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-[3px] focus-visible:border-ring focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",suggestion:"bg-blue-600 text-white rounded-full",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",dark:"bg-dark-700 text-white shadow hover:bg-dark-800 dark:bg-primary dark:text-primary-foreground dark:hover:bg-primary/80 focus-visible:bg-dark-800 dark:focus-visible:bg-primary/80",shadow:"bg-primary text-primary rounded border border-border shadow-[2px_2px_0_0_#0A0A0D] hover:shadow-none !transition-shadow duration-300 ease-in-out active:shadow-[inset_2px_2px_0_0_#262626] dark:shadow-[2px_2px_0_0_#FFF] dark:hover:shadow-none dark:active:shadow-[inset_2px_2px_0_0_#FFF]",shadowSurface:"bg-surface text-dark-900 rounded border border-border shadow-[2px_2px_0_0_#0A0A0D] hover:shadow-none !transition-shadow duration-300 ease-in-out active:shadow-[inset_2px_2px_0_0_#262626] dark:shadow-[2px_2px_0_0_#FFF] dark:hover:shadow-none dark:active:shadow-[inset_2px_2px_0_0_#FFF]"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-sm",lg:"h-10 rounded-md px-8",icon:"h-9 w-9 [&_svg]:size-5"}},defaultVariants:{variant:"default",size:"default"}}),s=e.forwardRef(({className:o,variant:s,size:n,asChild:i=!1,onClick:d,onKeyDown:u,...c},h)=>{const p=i?r:"div";/* @__PURE__ */
1
+ import*as e from"react";import{S as r}from"../../chunks/index.Ca2JkOFO.js";import{cva as o}from"class-variance-authority";import{c as a}from"../../chunks/utils.C6Qu-kwd.js";const t=o("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-[3px] focus-visible:border-ring focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",suggestion:"bg-blue-600 text-white rounded-full",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",dark:"bg-dark-700 text-white shadow hover:bg-dark-800 dark:bg-primary dark:text-primary-foreground dark:hover:bg-primary/80 focus-visible:bg-dark-800 dark:focus-visible:bg-primary/80",shadow:"bg-primary text-primary rounded border border-border shadow-[2px_2px_0_0_#0A0A0D] hover:shadow-none !transition-shadow duration-300 ease-in-out active:shadow-[inset_2px_2px_0_0_#262626] dark:shadow-[2px_2px_0_0_#FFF] dark:hover:shadow-none dark:active:shadow-[inset_2px_2px_0_0_#FFF]",shadowSurface:"bg-surface text-dark-900 rounded border border-border shadow-[2px_2px_0_0_#0A0A0D] hover:shadow-none !transition-shadow duration-300 ease-in-out active:shadow-[inset_2px_2px_0_0_#262626] dark:shadow-[2px_2px_0_0_#FFF] dark:hover:shadow-none dark:active:shadow-[inset_2px_2px_0_0_#FFF]"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-sm",lg:"h-10 rounded-md px-8",icon:"h-9 w-9 [&_svg]:size-5"}},defaultVariants:{variant:"default",size:"default"}}),s=e.forwardRef(({className:o,variant:s,size:n,asChild:i=!1,onClick:d,onKeyDown:u,...c},h)=>{const p=i?r:"div";/* @__PURE__ */
2
2
  return e.createElement(p,{className:a(t({variant:s,size:n,className:o})),ref:h,role:"button",tabIndex:0,onClick:d,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.currentTarget.click()),u?.(e)},...c})});s.displayName="DivButton";export{s as DivButton,t as divButtonVariants};
3
3
  //# sourceMappingURL=div-button.js.map
@@ -1,4 +1,4 @@
1
- import*as e from"react";import{S as t}from"../../chunks/index.uF4ME3WQ.js";import{cva as a}from"class-variance-authority";import{c as s}from"../../chunks/utils.C6Qu-kwd.js";import{Separator as r}from"./separator.js";function n({className:t,...a}){/* @__PURE__ */
1
+ import*as e from"react";import{S as t}from"../../chunks/index.Ca2JkOFO.js";import{cva as a}from"class-variance-authority";import{c as s}from"../../chunks/utils.C6Qu-kwd.js";import{Separator as r}from"./separator.js";function n({className:t,...a}){/* @__PURE__ */
2
2
  return e.createElement("div",{role:"list","data-slot":"item-group",className:s("group/item-group flex flex-col",t),...a})}function i({className:t,...a}){/* @__PURE__ */
3
3
  return e.createElement(r,{"data-slot":"item-separator",orientation:"horizontal",className:s("my-0",t),...a})}const l=a("group/item [a]:hover:bg-accent/50 focus-visible:border-ring focus-visible:ring-ring/50 [a]:transition-colors flex flex-wrap items-center rounded-md border border-transparent text-sm outline-none transition-colors duration-100 focus-visible:ring-[3px]",{variants:{variant:{default:"bg-transparent",outline:"border-border",muted:"bg-muted/50"},size:{default:"gap-4 p-4 ",sm:"gap-2.5 px-4 py-3"}},defaultVariants:{variant:"default",size:"default"}});function o({className:a,variant:r="default",size:n="default",asChild:i=!1,...o}){const m=i?t:"div";/* @__PURE__ */
4
4
  return e.createElement(m,{"data-slot":"item","data-variant":r,"data-size":n,className:s(l({variant:r,size:n,className:a})),...o})}const m=a("flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none",{variants:{variant:{default:"bg-transparent",icon:"bg-muted size-8 rounded-sm border [&_svg:not([class*='size-'])]:size-4",image:"size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover"}},defaultVariants:{variant:"default"}});function c({className:t,variant:a="default",...r}){/* @__PURE__ */
@@ -1,4 +1,4 @@
1
- import*as e from"react";import*as t from"@radix-ui/react-dialog";import{cva as a}from"class-variance-authority";import{X as s}from"@phosphor-icons/react";import{c as o}from"../../chunks/utils.C6Qu-kwd.js";import{B as l}from"../../chunks/button.D_2SonNs.js";const i=t.Root,r=t.Trigger,n=t.Close,d=t.Portal,m=e.forwardRef(({className:a,...s},l)=>/* @__PURE__ */e.createElement(t.Overlay,{className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...s,ref:l}));m.displayName=t.Overlay.displayName;const c=a("fixed z-50 gap-4 bg-surface py-6 px-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),f=e.forwardRef(({side:a="right",className:i,children:r,...n},f)=>/* @__PURE__ */e.createElement(d,null,/* @__PURE__ */e.createElement(m,null),/* @__PURE__ */e.createElement(t.Content,{ref:f,className:o(c({side:a}),i),...n},/* @__PURE__ */e.createElement(t.Close,{asChild:!0,className:"absolute right-4 top-4"},/* @__PURE__ */e.createElement(l,{variant:"ghost",size:"icon",className:"[&_svg]:size-6 ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none"},
1
+ import*as e from"react";import*as t from"@radix-ui/react-dialog";import{cva as a}from"class-variance-authority";import{X as s}from"@phosphor-icons/react";import{c as o}from"../../chunks/utils.C6Qu-kwd.js";import{B as l}from"../../chunks/button.Cs1X8upM.js";const i=t.Root,r=t.Trigger,n=t.Close,d=t.Portal,m=e.forwardRef(({className:a,...s},l)=>/* @__PURE__ */e.createElement(t.Overlay,{className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...s,ref:l}));m.displayName=t.Overlay.displayName;const c=a("fixed z-50 gap-4 bg-surface py-6 px-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),f=e.forwardRef(({side:a="right",className:i,children:r,...n},f)=>/* @__PURE__ */e.createElement(d,null,/* @__PURE__ */e.createElement(m,null),/* @__PURE__ */e.createElement(t.Content,{ref:f,className:o(c({side:a}),i),...n},/* @__PURE__ */e.createElement(t.Close,{asChild:!0,className:"absolute right-4 top-4"},/* @__PURE__ */e.createElement(l,{variant:"ghost",size:"icon",className:"[&_svg]:size-6 ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none"},
2
2
  /* @__PURE__ */e.createElement(s,{className:"size-6"}),
3
3
  /* @__PURE__ */e.createElement("span",{className:"sr-only"},"Close"))),r)));f.displayName=t.Content.displayName;const p=({className:t,...a})=>/* @__PURE__ */e.createElement("div",{className:o("flex flex-col text-center sm:text-left !mt-0",t),...a});p.displayName="SheetHeader";const u=({className:t,...a})=>/* @__PURE__ */e.createElement("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a});u.displayName="SheetFooter";const N=e.forwardRef(({className:a,...s},l)=>/* @__PURE__ */e.createElement(t.Title,{ref:l,className:o("text-lg font-semibold text-foreground",a),...s}));N.displayName=t.Title.displayName;const g=e.forwardRef(({className:a,...s},l)=>/* @__PURE__ */e.createElement(t.Description,{ref:l,className:o("text-sm text-muted-foreground",a),...s}));g.displayName=t.Description.displayName;export{i as Sheet,n as SheetClose,f as SheetContent,g as SheetDescription,u as SheetFooter,p as SheetHeader,m as SheetOverlay,d as SheetPortal,N as SheetTitle,r as SheetTrigger};
4
4
  //# sourceMappingURL=sheet.js.map
@@ -1,4 +1,4 @@
1
- import*as t from"react";import*as e from"@radix-ui/react-tooltip";import{c as o}from"../../chunks/utils.C6Qu-kwd.js";const a=({delayDuration:o=200,...a})=>/* @__PURE__ */t.createElement(e.Provider,{delayDuration:o,...a}),r=e.Root,i=e.Trigger,s=t.forwardRef(({className:a,sideOffset:r=4,bgColor:i,children:s,style:l,...d},n)=>{const m=i?.startsWith("--")?`var(${i})`:i;/* @__PURE__ */
2
- return t.createElement(e.Portal,null,/* @__PURE__ */t.createElement(e.Content,{ref:n,sideOffset:r,style:m?{...l,"--tooltip-bg":m}:l,className:o("z-50 overflow-hidden rounded-md px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",m?"bg-[var(--tooltip-bg)]":"bg-primary",a),...d},s,
3
- /* @__PURE__ */t.createElement(e.Arrow,{className:m?"fill-[var(--tooltip-bg)]":"fill-primary"})))});s.displayName=e.Content.displayName;export{r as Tooltip,s as TooltipContent,a as TooltipProvider,i as TooltipTrigger};
1
+ import*as t from"react";import*as e from"@radix-ui/react-tooltip";import{c as a}from"../../chunks/utils.C6Qu-kwd.js";const o=({delayDuration:a=200,...o})=>/* @__PURE__ */t.createElement(e.Provider,{delayDuration:a,...o}),r=e.Root,i=e.Trigger,s=t.forwardRef(({className:o,sideOffset:r=4,bgColor:i,children:s,style:d,...l},n)=>{const m=i?.startsWith("--")?`var(${i})`:i;/* @__PURE__ */
2
+ return t.createElement(e.Portal,null,/* @__PURE__ */t.createElement(e.Content,{ref:n,sideOffset:r,style:m?{...d,"--tooltip-bg":m}:d,className:a("z-50 overflow-hidden rounded-md px-3 py-1.5 text-xs text-dark-100 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",m?"bg-[var(--tooltip-bg)]":"bg-dark",o),...l},s,
3
+ /* @__PURE__ */t.createElement(e.Arrow,{className:m?"fill-[var(--tooltip-bg)]":"fill-dark"})))});s.displayName=e.Content.displayName;export{r as Tooltip,s as TooltipContent,o as TooltipProvider,i as TooltipTrigger};
4
4
  //# sourceMappingURL=tooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","sources":["../../../../src/components/ui/tooltip.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\n\nimport { cn } from '@/lib/utils';\n\nconst TooltipProvider = ({ delayDuration = 200, ...props }: TooltipPrimitive.TooltipProviderProps) => (\n <TooltipPrimitive.Provider delayDuration={delayDuration} {...props} />\n);\n\nconst Tooltip = TooltipPrimitive.Root;\n\nconst TooltipTrigger = TooltipPrimitive.Trigger;\n\ninterface TooltipContentProps extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> {\n bgColor?: string;\n}\n\nconst TooltipContent = React.forwardRef<React.ElementRef<typeof TooltipPrimitive.Content>, TooltipContentProps>(\n ({ className, sideOffset = 4, bgColor, children, style, ...props }, ref) => {\n const resolvedBg = bgColor?.startsWith('--') ? `var(${bgColor})` : bgColor;\n\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n // set --tooltip-bg CSS variable for the background color\n style={resolvedBg ? ({ ...style, '--tooltip-bg': resolvedBg } as React.CSSProperties) : style}\n className={cn(\n 'z-50 overflow-hidden rounded-md px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]',\n resolvedBg ? 'bg-[var(--tooltip-bg)]' : 'bg-primary',\n className,\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className={resolvedBg ? 'fill-[var(--tooltip-bg)]' : 'fill-primary'} />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n },\n);\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n"],"names":["TooltipProvider","delayDuration","props","React","createElement","TooltipPrimitive","Provider","Tooltip","Root","TooltipTrigger","Trigger","TooltipContent","forwardRef","className","sideOffset","bgColor","children","style","ref","resolvedBg","startsWith","Portal","Content","cn","Arrow","displayName"],"mappings":"qHAKA,MAAMA,EAAkB,EAAGC,gBAAgB,OAAQC,oBACjDC,EAAAC,cAACC,EAAiBC,SAAjB,CAA0BL,mBAAkCC,IAGzDK,EAAUF,EAAiBG,KAE3BC,EAAiBJ,EAAiBK,QAMlCC,EAAiBR,EAAMS,WAC3B,EAAGC,YAAWC,aAAa,EAAGC,UAASC,WAAUC,WAAUf,GAASgB,KAClE,MAAMC,EAAaJ,GAASK,WAAW,MAAQ,OAAOL,KAAaA;AAEnE,OACEZ,EAAAC,cAACC,EAAiBgB,OAAjB,oBACClB,EAAAC,cAACC,EAAiBiB,QAAjB,CACCJ,MACAJ,aAEAG,MAAOE,EAAc,IAAKF,EAAO,eAAgBE,GAAuCF,EACxFJ,UAAWU,EACT,2ZACAJ,EAAa,yBAA2B,aACxCN,MAEEX,GAEHc;+BACAX,EAAiBmB,MAAjB,CAAuBX,UAAWM,EAAa,2BAA6B,qBAMvFR,EAAec,YAAcpB,EAAiBiB,QAAQG"}
1
+ {"version":3,"file":"tooltip.js","sources":["../../../../src/components/ui/tooltip.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\n\nimport { cn } from '@/lib/utils';\n\nconst TooltipProvider = ({ delayDuration = 200, ...props }: TooltipPrimitive.TooltipProviderProps) => (\n <TooltipPrimitive.Provider delayDuration={delayDuration} {...props} />\n);\n\nconst Tooltip = TooltipPrimitive.Root;\n\nconst TooltipTrigger = TooltipPrimitive.Trigger;\n\ninterface TooltipContentProps extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> {\n bgColor?: string;\n}\n\nconst TooltipContent = React.forwardRef<React.ElementRef<typeof TooltipPrimitive.Content>, TooltipContentProps>(\n ({ className, sideOffset = 4, bgColor, children, style, ...props }, ref) => {\n const resolvedBg = bgColor?.startsWith('--') ? `var(${bgColor})` : bgColor;\n\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n // set --tooltip-bg CSS variable for the background color\n style={resolvedBg ? ({ ...style, '--tooltip-bg': resolvedBg } as React.CSSProperties) : style}\n className={cn(\n 'z-50 overflow-hidden rounded-md px-3 py-1.5 text-xs text-dark-100 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]',\n resolvedBg ? 'bg-[var(--tooltip-bg)]' : 'bg-dark',\n className,\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className={resolvedBg ? 'fill-[var(--tooltip-bg)]' : 'fill-dark'} />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n },\n);\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n"],"names":["TooltipProvider","delayDuration","props","React","createElement","TooltipPrimitive","Provider","Tooltip","Root","TooltipTrigger","Trigger","TooltipContent","forwardRef","className","sideOffset","bgColor","children","style","ref","resolvedBg","startsWith","Portal","Content","cn","Arrow","displayName"],"mappings":"qHAKA,MAAMA,EAAkB,EAAGC,gBAAgB,OAAQC,oBACjDC,EAAAC,cAACC,EAAiBC,SAAjB,CAA0BL,mBAAkCC,IAGzDK,EAAUF,EAAiBG,KAE3BC,EAAiBJ,EAAiBK,QAMlCC,EAAiBR,EAAMS,WAC3B,EAAGC,YAAWC,aAAa,EAAGC,UAASC,WAAUC,WAAUf,GAASgB,KAClE,MAAMC,EAAaJ,GAASK,WAAW,MAAQ,OAAOL,KAAaA;AAEnE,OACEZ,EAAAC,cAACC,EAAiBgB,OAAjB,oBACClB,EAAAC,cAACC,EAAiBiB,QAAjB,CACCJ,MACAJ,aAEAG,MAAOE,EAAc,IAAKF,EAAO,eAAgBE,GAAuCF,EACxFJ,UAAWU,EACT,iZACAJ,EAAa,yBAA2B,UACxCN,MAEEX,GAEHc;+BACAX,EAAiBmB,MAAjB,CAAuBX,UAAWM,EAAa,2BAA6B,kBAMvFR,EAAec,YAAcpB,EAAiBiB,QAAQG"}